This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] ARI related: Use of GCC poison pragma


> > > So would a patch adding
> > > #if (GCC_VERSION >= 3000)
> > > #pragma GCC poison xvasprintf
> > > #endif
> >
> > I don't think we really need the GCC_VERSION check, do we?
>
> I still think that this should only be parsed by GCC.  So a
> conditional to restrict to GCC compiler is needed, but I suppose you
> meant that the use of a GCC prior to 3000 is not needed...

I don't see why. Looking at the C 89 reference manual, it clearly states
that unknown pragmas are simply ignored:

| 3.8.6 Pragma directive
|
| Semantics
|
|    A preprocessing directive of the form
|
|          # pragma  pp-tokens<opt> new-line
|
| causes the implementation to behave in an implementation-defined
| manner.  Any pragma that is not recognized by the implementation is
| ignored.

So, protecting the pragma with a GCC-specific check seems to be
useless. Or is there something else we're trying to do?

-- 
Joel


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