Bug 154084 - gcc -E -o silently stops output when line exceeds 4k
Summary: gcc -E -o silently stops output when line exceeds 4k
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 3
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-04-07 05:51 UTC by D. Hugh Redelmeier
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version: gcc-3.4.3-22.fc3
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-04-07 13:09:01 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
source for gcc-E-truncation.c (1.09 KB, text/plain)
2005-04-07 05:54 UTC, D. Hugh Redelmeier
no flags Details

Description D. Hugh Redelmeier 2005-04-07 05:51:05 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050323 Firefox/1.0.2 Fedora/1.0.2-1.3.1

Description of problem:
-E tells gcc to output the result of preprocessing, without compiling it.

When gcc -E -o generates a line longer than 4k, it stops output in the middle.  No other lines are produced.  The exit code is 0 (happy).

Truncation is bad.
Truncation without diagnostic is worse.

Version-Release number of selected component (if applicable):
gcc-3.4.2-6.fc3

How reproducible:
Always

Steps to Reproduce:
1. gcc -E -o gcc-E-truncation.E gcc-E-truncation.c 
2. echo $?
3. examine the last line of output.
(see attached file gcc-E-truncation.c)

Actual Results:  Exit code was 0.
The output stopped at 4k into the long line
No diagnostic

Expected Results:  proper output produced

Additional info:

Comment 1 D. Hugh Redelmeier 2005-04-07 05:54:51 UTC
Created attachment 112800 [details]
source for gcc-E-truncation.c

the file contains comments describing how to preprocess the program.  This step
fails with truncation.

Comment 2 Jakub Jelinek 2005-04-07 13:09:01 UTC
Can't reproduce with current FC3 testing update.
gcc -E -o gcc-E-truncation.E gcc-E-truncation.c; gcc -E gcc-E-truncation.c | wc;
wc gcc-E-truncation.E
     18    1368   12279
   18  1368 12279 gcc-E-truncation.E


Comment 3 D. Hugh Redelmeier 2005-04-07 15:29:16 UTC
Appology: it turns out that a tool I was using to examine the output had this
bad behaviour.  gcc itself seems to be fine.



Note You need to log in before you can comment on or make changes to this bug.