Re: GCC 6 symbol poisoning and c++ header usage is fragile

2016-04-22 Thread Martin Sebor
On 04/21/2016 07:20 AM, Jonathan Wakely wrote: On 21 April 2016 at 13:33, Szabolcs Nagy wrote: On 21/04/16 12:52, Jonathan Wakely wrote: On 21 April 2016 at 12:11, Szabolcs Nagy wrote: the root cause is c++: c++ headers include random libc headers with _GNU_SOURCE ftm so all sorts of

Re: GCC 6 symbol poisoning and c++ header usage is fragile

2016-04-21 Thread Jonathan Wakely
On 21 April 2016 at 17:47, Jason Merrill wrote: > On Thu, Apr 21, 2016 at 11:57 AM, Jonathan Wakely > wrote: >> >> I once tried to write a gcc plugin that would check all names defined >> by libstdc++ and ensure they were either in the reserved namespace, or >> were in a

Re: GCC 6 symbol poisoning and c++ header usage is fragile

2016-04-21 Thread Jason Merrill
On Thu, Apr 21, 2016 at 12:47 PM, Jason Merrill wrote: > On Thu, Apr 21, 2016 at 11:57 AM, Jonathan Wakely > wrote: >> >> I once tried to write a gcc plugin that would check all names defined >> by libstdc++ and ensure they were either in the reserved

Re: GCC 6 symbol poisoning and c++ header usage is fragile

2016-04-21 Thread Jonathan Wakely
On 21 April 2016 at 15:32, Joel Sherrill wrote: >> Those rules belong in a POSIX binding for C++, not in the C++ >> standard, but unfortunately the group working on that has been >> inactive for some time. >> >> (In the absence of an official binding, I think a reasonable rule that >> would work

Re: GCC 6 symbol poisoning and c++ header usage is fragile

2016-04-21 Thread Joel Sherrill
On 4/21/2016 8:20 AM, Jonathan Wakely wrote: On 21 April 2016 at 13:33, Szabolcs Nagy wrote: On 21/04/16 12:52, Jonathan Wakely wrote: On 21 April 2016 at 12:11, Szabolcs Nagy wrote: the root cause is c++: c++ headers include random libc headers with _GNU_SOURCE ftm so all sorts of

Re: GCC 6 symbol poisoning and c++ header usage is fragile

2016-04-21 Thread Jonathan Wakely
On 21 April 2016 at 13:33, Szabolcs Nagy wrote: > On 21/04/16 12:52, Jonathan Wakely wrote: >> On 21 April 2016 at 12:11, Szabolcs Nagy wrote: >>> the root cause is c++: c++ headers include random libc headers with >>> _GNU_SOURCE ftm so all sorts of unexpected symbols are defined/declared. >> >>

Re: GCC 6 symbol poisoning and c++ header usage is fragile

2016-04-21 Thread David Edelsohn
On Thu, Apr 21, 2016 at 8:33 AM, Szabolcs Nagy wrote: > On 21/04/16 12:52, Jonathan Wakely wrote: >> On 21 April 2016 at 12:11, Szabolcs Nagy wrote: >>> the root cause is c++: c++ headers include random libc headers with >>> _GNU_SOURCE ftm so all sorts of unexpected

Re: GCC 6 symbol poisoning and c++ header usage is fragile

2016-04-21 Thread Michael Matz
Hi, On Thu, 21 Apr 2016, Szabolcs Nagy wrote: > there is also , , usage and go-system.h is special. > (and gmp.h includes when built with c++) > > so i can prepare a patch with INCLUDE_{MAP,SET,LIST} and remove the > explicit libc/libstdc++ includes. This. > >> auto-profile.c > >>

Re: GCC 6 symbol poisoning and c++ header usage is fragile

2016-04-21 Thread Szabolcs Nagy
On 21/04/16 12:52, Jonathan Wakely wrote: > On 21 April 2016 at 12:11, Szabolcs Nagy wrote: >> the root cause is c++: c++ headers include random libc headers with >> _GNU_SOURCE ftm so all sorts of unexpected symbols are defined/declared. > > Yes, I'd really like to be able to stop defining

Re: GCC 6 symbol poisoning and c++ header usage is fragile

2016-04-21 Thread Jonathan Wakely
On 21 April 2016 at 12:11, Szabolcs Nagy wrote: > the root cause is c++: c++ headers include random libc headers with > _GNU_SOURCE ftm so all sorts of unexpected symbols are defined/declared. Yes, I'd really like to be able to stop defining _GNU_SOURCE unconditionally. It needs some libstdc++

Re: GCC 6 symbol poisoning and c++ header usage is fragile

2016-04-21 Thread Szabolcs Nagy
On 21/04/16 12:36, Richard Biener wrote: > On Thu, Apr 21, 2016 at 1:11 PM, Szabolcs Nagy wrote: >> building gcc6 using musl based gcc6 fails with symbol poisoning error >> (details at the end of the mail). >> >> the root cause is c++: c++ headers include random libc

Re: GCC 6 symbol poisoning and c++ header usage is fragile

2016-04-21 Thread Richard Biener
On Thu, Apr 21, 2016 at 1:11 PM, Szabolcs Nagy wrote: > building gcc6 using musl based gcc6 fails with symbol poisoning error > (details at the end of the mail). > > the root cause is c++: c++ headers include random libc headers with > _GNU_SOURCE ftm so all sorts of

GCC 6 symbol poisoning and c++ header usage is fragile

2016-04-21 Thread Szabolcs Nagy
building gcc6 using musl based gcc6 fails with symbol poisoning error (details at the end of the mail). the root cause is c++: c++ headers include random libc headers with _GNU_SOURCE ftm so all sorts of unexpected symbols are defined/declared. since it's unlikely the c++ standard gets fixed (to