Bug 834410 - gcc-4.7 discards whitespace in preprocessor
Summary: gcc-4.7 discards whitespace in preprocessor
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 17
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 828573
TreeView+ depends on / blocked
 
Reported: 2012-06-21 19:05 UTC by Bill Nottingham
Modified: 2014-03-17 03:31 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-06-21 19:19:49 UTC
Type: Bug
Embargoed:


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

Description Bill Nottingham 2012-06-21 19:05:25 UTC
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 19:19:49 UTC
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.