This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/37192] --combine problems with one source defining _GNU_SOURCE and the other one doesn't



------- Comment #3 from edwintorok at gmail dot com  2008-08-21 17:52 -------
(In reply to comment #2)
> This sounds like a glibc bug really.  glibc's headers has invalid C in it :).
> 
> >why does --combine 
> Because GCC checks that the prototypes are compatible across translational
> units with --combine and errors out if they are not since that is invalid C :).
> 

Agreed, but I thought --combine is smarter than to just concatenate the
sources.
Compiling the sources separately works, and they are valid C separately.

IMHO LTO should deal with situations like this, or make an exception for system
headers.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37192


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]