This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: G++ defining _GNU_SOURCE
- To: Franz dot Sirl-kernel at lauterbach dot com (Franz Sirl)
- Subject: Re: G++ defining _GNU_SOURCE
- From: Joern Rennecke <amylaar at redhat dot com>
- Date: Thu, 21 Jun 2001 00:43:37 +0100 (BST)
- Cc: pedwards at disaster dot jaj dot com (Phil Edwards),jason_merrill at redhat dot com (Jason Merrill),rth at redhat dot com (Richard Henderson),mark at codesourcery dot com (Mark Mitchell), gcc at gcc dot gnu dot org,gcc-patches at gcc dot gnu dot org, dje at watson dot ibm dot com (David Edelsohn)
> 1. define CPLUSCPLUS_CPP_SPEC as "-D_GNU_SOURCE " + CPP_SPEC. Am I right to
> assume that K&R doesn't support:
>
> #define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE " CPP_SPEC
Yes.
> ? Or is there a way to do this in K&R? Otherwise most of the stuff between
> CPP_SPEC and CPLUSPLUS_CPP_SPEC has to be shared (like aix51.h does) and
> this looks quite error prone to me.
You can put the stuff for CPP_SPEC into an extra_spec, which is then used
both by CPP_SPEC and CPLUSPLUS_CPP_SPEC.