[prev in list] [next in list] [prev in thread] [next in thread]
List: hpux-cxx-dev
Subject: Re: CXX-DEV: C++ Keywords used as variables in C headers
From: Amitav Mishra <amitavm () india ! hp ! com>
Date: 2005-04-21 5:49:04
Message-ID: 20050421054811.GK3513 () india ! hp ! com
[Download RAW message or body]
There is no way to ask a C/C++ compiler to allow keywords as variable
names. So if you are using a C++ compiler, you must change the names.
(Or play macro games, as Dennis says. But that is a dirty game. :-)
If you are using the "C header" in pure C programs, you can compile it
using a C-only compiler. With aCC, you can use the -Ae option to make
it behave like a C-only compiler. Or use /opt/ansic/bin/cc to compile
C-only programs.
-amitav
On Wed, Apr 20, 2005 at 05:50:01PM -0700, Ramesh Thummala wrote:
> I have a few C code header files which have C++ keywords like private,
> class etc defined as variables in them. When i am including these C
> headers into my C++ code, the aCC seems to complain that the variables
> are C++ key words.
_________________________________________________________________
To leave this mailing list, send mail to majordomo@cxx.cup.hp.com
with the message UNSUBSCRIBE cxx-dev
_________________________________________________________________
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic