From owner-freebsd-questions Mon Feb 26 08:38:57 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id IAA29566 for questions-outgoing; Mon, 26 Feb 1996 08:38:57 -0800 (PST) Received: from obie.softweyr.com (slcmodem1-p3-10.intele.net [204.118.149.141]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id IAA29552 for ; Mon, 26 Feb 1996 08:38:52 -0800 (PST) Received: (from wes@localhost) by obie.softweyr.com (8.6.12/8.6.12) id JAA01860; Mon, 26 Feb 1996 09:38:57 -0800 Date: Mon, 26 Feb 1996 09:38:57 -0800 Message-Id: <199602261738.JAA01860@obie.softweyr.com> From: wes@intele.net To: questions@freebsd.org Subject: Re: cc in FreeBSD Sender: owner-questions@freebsd.org Precedence: bulk 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