This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: C++ name with leading underscore character not Compiling
> > 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.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/