From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23850 invoked by alias); 15 Nov 2012 17:57:45 -0000 Received: (qmail 23839 invoked by uid 22791); 15 Nov 2012 17:57:44 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_NO X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 15 Nov 2012 17:57:41 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 860FC2E1A2; Thu, 15 Nov 2012 12:57:40 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id TKdl7DFVdA9l; Thu, 15 Nov 2012 12:57:40 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 4ACE92E054; Thu, 15 Nov 2012 12:57:40 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 95C27C87DF; Thu, 15 Nov 2012 09:57:38 -0800 (PST) Date: Thu, 15 Nov 2012 17:57:00 -0000 From: Joel Brobecker To: Pierre Muller Cc: gdb@sourceware.org Subject: Re: [RFC] ARI related: Use of GCC poison pragma Message-ID: <20121115175738.GF3806@adacore.com> References: <009b01cdc30f$c7684e80$5638eb80$@muller@ics-cnrs.unistra.fr> <20121115151350.GB3806@adacore.com> <000901cdc34d$c7301e50$55905af0$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000901cdc34d$c7301e50$55905af0$@muller@ics-cnrs.unistra.fr> User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-11/txt/msg00038.txt.bz2 > > > 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 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