X-Spam-Check-By: sourceware.org
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain; 	charset="US-ASCII"
Subject: RE: C++ name with leading underscore character not Compiling
Date: Mon, 16 Apr 2007 14:47:52 +0100
Message-ID: <7231C15EAC2F164CA6DC326D97493C8B01FA065B@exchange35.fed.cclrc.ac.uk>
In-Reply-To: <01a501c7802b$1d84f3f0$2e08a8c0@CAM.ARTIMI.COM>
References: <1cbe225f0704160234u24b104a5o9b459178e895a5a8@mail.gmail.com> <018901c7800b$5c4ec450$2e08a8c0@CAM.ARTIMI.COM> <4623592C.2000905@sh.cvut.cz> <019c01c7801a$6db51f00$2e08a8c0@CAM.ARTIMI.COM> <7231C15EAC2F164CA6DC326D97493C8B01FA0655@exchange35.fed.cclrc.ac.uk> <01a001c7801d$e5d16220$2e08a8c0@CAM.ARTIMI.COM> <7231C15EAC2F164CA6DC326D97493C8B01FA0656@exchange35.fed.cclrc.ac.uk> <01a501c7802b$1d84f3f0$2e08a8c0@CAM.ARTIMI.COM>
From: "Adye, TJ \(Tim\)" <T.J.Adye@rl.ac.uk>
To: "Dave Korn" <dave.korn@artimi.com>, <cygwin@cygwin.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id l3IEm5Zx010572

Hi Dave,

Dave Korn wrote 16 April 2007 14:28:-
> 
> On 16 April 2007 13:14, Adye, TJ (Tim) wrote:
> 
> > I'm a bit surprised this isn't flagged by the compiler (it 
> > warns you about lots of other non-standard usages), though I guess
it 
> > would be a bit ugly to implement (the compiler would have to 
> > distinguish between usage in a standard header and other code).
> 
>   Actually, the compiler already has a good deal of knowlege 
> about what constitute system headers and what constitute user 
> headers: see '-Wsystem-headers' in the docs.  So I think that 
> it wouldn't actually be hard to implement, and I may even 
> take a look at doing so myself.

That would certainly be an interesting improvement.

An alternative might be to distinguish between <> and "" includes. My
concern was more that the determination of system headers is done in the
preprocessor, while the type of identifier is determined later by the
compiler. But I guess the latter knows about the former (eg. for error
messages). It's a long time since I delved into the GCC sources...

Tim.

===========================  cut here  ============================
 Tim Adye      T.J.Adye@rl.ac.uk       http://hepunx.rl.ac.uk/~adye
 BaBar/Atlas Groups, Particle Physics Dept, Rutherford Appleton Lab

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


