Bug 834410 - gcc-4.7 discards whitespace in preprocessor
gcc-4.7 discards whitespace in preprocessor
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
17
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 828573
  Show dependency treegraph
 
Reported: 2012-06-21 15:05 EDT by Bill Nottingham
Modified: 2014-03-16 23:31 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-21 15:19:49 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
test data (160 bytes, text/plain)
2012-06-21 15:05 EDT, Bill Nottingham
no flags Details

  None (edit)
Description Bill Nottingham 2012-06-21 15:05:25 EDT
Created attachment 593562 [details]
test data

Description of problem:

Example file attached.

On gcc-4.7:
[notting@nostromo: ~]$ gcc -E -P -x c -D'N_(x)=x' testfile
 "This is a test of gcc. It is only a test."
 "We like tests, Yes we do. We like tests, how about you?"
 "A test is a test is a test."

On gcc-4.4:
[notting@shell: ~]$ gcc -E -P -x c -D'N_(x)=x' testfile
 "This is a test of gcc. It is only a test."


 "We like tests, Yes we do. We like tests, how about you?"




 "A test is a test is a test."

Version-Release number of selected component (if applicable):
gcc-4.7.0-5.fc17.x86_64

How reproducible:
100%

Additional info:

Yes, this actually broke something in a package build.
Comment 1 Jakub Jelinek 2012-06-21 15:19:49 EDT
If some package relies on this, it abuses the preprocessor for something that it is not meant to be used for.
AFAIK all versions of gcc behave this way if there is more than a few lines of vertical whitespace, the difference is only with -P and a one to 7 lines or so.
The change was intentional, it made the preprocessor behave consistently, not depending on some internal implementation detail limit.

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