Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Pierre Muller <pierre.muller@ics-cnrs.unistra.fr>
Cc: gdb@sourceware.org
Subject: Re: [RFC] ARI related: Use of GCC poison pragma
Date: Thu, 15 Nov 2012 17:57:00 -0000	[thread overview]
Message-ID: <20121115175738.GF3806@adacore.com> (raw)
In-Reply-To: <000901cdc34d$c7301e50$55905af0$@muller@ics-cnrs.unistra.fr>

> > > 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


  reply	other threads:[~2012-11-15 17:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-15  9:01 Pierre Muller
2012-11-15 15:14 ` Joel Brobecker
2012-11-15 16:25   ` Pierre Muller
2012-11-15 17:57     ` Joel Brobecker [this message]
     [not found]   ` <50a51777.47f0440a.09dd.2b79SMTPIN_ADDED@mx.google.com>
2012-11-15 18:14     ` Pedro Alves
2012-11-15 20:13       ` Pierre Muller
2012-11-15 20:33         ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121115175738.GF3806@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb@sourceware.org \
    --cc=pierre.muller@ics-cnrs.unistra.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox