PR11196, the _GNU_SOURCE requirement.

Jan van Dijk jan@etpmod.phys.tue.nl
Mon Mar 8 23:08:00 GMT 2004


	Hello,

Today I was looking at some libstdc++ bugs in bugzilla to see if there are 
outstanding issues which affect our projects. I started to study 
http://gcc.gnu.org/PR11196 (using today's HEAD).

An analysis (see added comment) revealed that the problem is that _GNU_SOURCE 
is unconditionally defined in gcc/config/linux.h (and other configs). That 
would make this  a c++ front-end issue, were it not for the note in that file 
that this definition is required by libstdc++...

Does this mean that modules which are compiled with -U_GNU_SOURCE may not 
compile if they use libstdc++ headers? Worse, can subtle errors then be 
expected because a different set of overloads is available than the library 
bits were compiled with?

I googled, checked Changelog files and searched the archives to no avail: 
could somebody enlighten me why this define is necessary? It would be nice to 
be able to compile in strict X mode, where X is whatever version of the 
standard.

	Thanks, Jan.

-- 
dr.ir. Jan van Dijk
Eindhoven University of Technology
Department of Applied Physics
Group Elementary Processes in Gas Discharges
jan@etpmod.phys.tue.nl
+31 40 247 57 65



More information about the Libstdc++ mailing list