delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/04/18/14:15:30

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

> > So, the case here ("_name" as an argument name) should be fine.
> 
>   Except that that was just an example, and in fact a 
> misleading one, because what Chelton's code was /actually/ 
> using was "_N"...  hence the problem.

Ah yes, I didn't see that (I thought his second case was the example,
but you are right).

_N is used in <ctype> (as are a number of others like _U and _L). It
isn't used in the Linux versions (at least RedHat EL 3/4 and
derivatives), which is presumably why he didn't see it before porting.
Of course this is the danger of using non-standard language features -
these things come and bite you at unexpected times.

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

Tim.

===========================  cut here  ============================
 Tim Adye      T DOT J DOT Adye AT rl DOT ac DOT 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/


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019