Bug 154084 - gcc -E -o silently stops output when line exceeds 4k
gcc -E -o silently stops output when line exceeds 4k
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-04-07 01:51 EDT by D. Hugh Redelmeier
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version: gcc-3.4.3-22.fc3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-04-07 09:09:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description D. Hugh Redelmeier 2005-04-07 01:51:05 EDT
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 01:54:51 EDT
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 09:09:01 EDT
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 11:29:16 EDT
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.