From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24851 invoked by alias); 27 May 2009 18:15:35 -0000 Received: (qmail 24832 invoked by uid 22791); 27 May 2009 18:15:33 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 27 May 2009 18:15:27 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n4RIF1or006331; Wed, 27 May 2009 14:15:02 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n4RIF0Ao003706; Wed, 27 May 2009 14:15:00 -0400 Received: from opsy.redhat.com (vpn-12-136.rdu.redhat.com [10.11.12.136]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n4RIEx6G011041; Wed, 27 May 2009 14:14:59 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id BE060508281; Wed, 27 May 2009 12:14:58 -0600 (MDT) To: Joel Brobecker Cc: muller@ics.u-strasbg.fr, gdb-patches@sourceware.org Subject: Re: [ARI] Add "bzero" References: <200904301028.29435.pedro@codesourcery.com> <200905061038.11004.pedro@codesourcery.com> <20090506160250.GJ10734@adacore.com> <20090521002704.GG16152@adacore.com> From: Tom Tromey Reply-To: tromey@redhat.com Date: Wed, 27 May 2009 18:15:00 -0000 In-Reply-To: <20090521002704.GG16152@adacore.com> (Joel Brobecker's message of "Wed\, 20 May 2009 17\:27\:04 -0700") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-05/txt/msg00584.txt.bz2 >>>>> "Joel" == Joel Brobecker writes: Tom> For this specific case, and some others like it, perhaps using #pragma Tom> poison would be better. That would result in a compile time error, Tom> rather than a report on a web page. Joel> I really liked the idea and gave it a quick try, but I don't know Joel> how to make it work. I thought I would put the pragma at the end of Joel> defs.h, since defs.h is always included. But defs.h is also always Joel> the first file to be included, and so any #include that follows it Joel> which references any of the poisoned identifier will cause an error. Joel> Do you see another way? Nope. In gcc I think the possibly-offending system headers are all included in a single header file ("system.h"), and then the poisoning is done at the end of that file. Tom