Bug 834410

Summary: gcc-4.7 discards whitespace in preprocessor
Product: [Fedora] Fedora Reporter: Bill Nottingham <notting>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: jakub, law, rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-21 19:19:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 828573    
Attachments:
Description Flags
test data none

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.