Date: Mon, 26 Feb 1996 09:38:57 -0800 From: wes@intele.net To: questions@freebsd.org Subject: Re: cc in FreeBSD Message-ID: <199602261738.JAA01860@obie.softweyr.com>
next in thread | raw e-mail | index | archive | help
Wes Santee writes:
> Not sure if this question is apropos for the Questions list, but is
> there a switch in the cc for FreeBSD (gcc 2.6.3, looks like) that
> allows C++-style comments in a C source file?
The 'info' file for cpp from gcc-2.7.2 says the following:
`-lang-c'
`-lang-c89'
`-lang-c++'
`-lang-objc'
`-lang-objc++'
Specify the source language. `-lang-c' is the default; it allows
recognition of C++ comments (comments that begin with `//' and end
at end of line), since this is a common feature and it will most
likely be in the next C standard. `-lang-c89' disables
recognition of C++ comments. `-lang-c++' handles C++ comment
syntax and includes extra default include directories for C++.
`-lang-objc' enables the Objective C `#import' directive.
`-lang-objc++' enables both C++ and Objective C extensions.
These options are generated by the compiler driver `gcc', but not
passed from the `gcc' command line unless you use the driver's
`-Wp' option.
The standard FreeBSD compiler driver must be passed -lang-c89 to cpp.
Try adding -Wp -lang-c to your cc options and see if that works.
--
Wes Peters | Yes I am a pirate, two hundred years too late
Softweyr | The cannons don't thunder, there's nothing to plunder
Consulting | I'm an over forty victim of fate...
wes@intele.net | Jimmy Buffett
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199602261738.JAA01860>
