This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/37192] --combine problems with one source defining _GNU_SOURCE and the other one doesn't
- From: "edwintorok at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Aug 2008 17:52:49 -0000
- Subject: [Bug c/37192] --combine problems with one source defining _GNU_SOURCE and the other one doesn't
- References: <bug-37192-15165@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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