This is the mail archive of the gcc-patches@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]

Re: [cpplib]: Implement #pragma GCC whatever


Zack,
Oh dear. I appear to have confused myself, and installed the patch,
despite clearly only asking for permission. I apologize. Fortunately
we're not too far off base here.

Zack Weinberg wrote:
> Mm, what you actually did was take #pragma once out of the GCC
> namespace.  I have no problem with that - it's an old deprecated
> pragma, we may not want to perpetuate it by putting it in 'our'
My thinking exactly, [I misremembered that I'd changed my mind about
this and the stuff about system_header.]
> namespace.  Your choice - but the documentation needs to match.
Ok, I think all that needs to be said is something about currently
supported pragmas being in the GCC namespace.

> I believe it's hiding under "C++ Extensions" in invoke.texi.
Yup. I see it, it affects both cpp and g++. Given that the docs for it
say `this will go away', do we want to move it into the GCC namespace
anyway?

> This patch is approved once you take #pragma system_header out of the
> global namespace,
I think it should stay in the global namespace, momentarily, in order
to give libstd++3 time to catch up.

> You should perhaps submit a patch implementing this namespace in
> c-pragma.c as well.
Good idea.

I've installed the attached patch which clarifies the GCC namespace.
Once again, I appologize for jumping the gun on this one, [I was
getting a bit punchy, and had neglected to put a big 'NOOO' label over
the commit button, good job I wasn't on Apollo 13!]

nathan

-- 
Dr Nathan Sidwell   ::   http://www.codesourcery.com   ::   CodeSourcery LLC
         'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org
2000-06-24  Nathan Sidwell  <nathan@codesourcery.com>

	* cpp.texi: Clarify #pragma GCC namespace.

Index: cpp.texi
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cpp.texi,v
retrieving revision 1.22
diff -c -3 -p -r1.22 cpp.texi
*** cpp.texi	2000/06/23 10:56:09	1.22
--- cpp.texi	2000/06/24 09:17:15
*************** some old C programs contain such lines.
*** 2646,2655 ****
  The ANSI standard specifies that the effect of the @samp{#pragma}
  directive is implementation-defined.  The GNU C preprocessor recognizes
  some pragmas, and passes unrecognized ones through to the preprocessor
! output, so they are available to the compilation pass.  GNU C preprocessor
! pragmas are of the form @samp{#pragma GCC ...}. For backwards
! compatibility previously supported pragmas are also recognized without
! the @samp{GCC}, however that use is deprecated.
  
  @findex #ident
  The @samp{#ident} directive is supported for compatibility with certain
--- 2646,2660 ----
  The ANSI standard specifies that the effect of the @samp{#pragma}
  directive is implementation-defined.  The GNU C preprocessor recognizes
  some pragmas, and passes unrecognized ones through to the preprocessor
! output, so they are available to the compilation pass.
! 
! In line with the C99 standard, which introduces a STDC namespace for
! C99 pragmas, the preprocessor introduces a GCC namespace for GCC
! pragmas.  Supported GCC preprocessor pragmas are of the form
! @samp{#pragma GCC ...}.  For backwards compatibility previously
! supported pragmas are also recognized without the @samp{GCC} prefix,
! however that use is deprecated.  Pragmas that are already deprecated
! are not recognized with a @samp{GCC} prefix.
  
  @findex #ident
  The @samp{#ident} directive is supported for compatibility with certain

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