From: danpop@cernapo.cern.ch (Dan Pop)
Subject: Re: Is cc broken on OSF/1 and ULTRIX?
Date: Wed, 12 Oct 1994 22:35:15 GMT [thread overview]
Message-ID: <CxL02r.JuC@news.cern.ch> (raw)
In-Reply-To: 37h7di$p9b@decuac.dec.com
In <37h7di$p9b@decuac.dec.com> murphy@dco.dec.com (Rick Murphy) writes:
>In article <CxKC80.5xr@news.cern.ch> danpop@cernapo.cern.ch (Dan Pop) writes:
>>c89 does the right thing, but cc doesn't. C++ style comments are not
>>supported by either K&R or ANSI C and this feature (I'd call it bug)
>>is not documented in the man page.
>
>See the c preprocessor manpage -
>
> The cpp preprocessor accepts C++-style end of line comments (//). This
> means that everything following the two slashes (//) to the end of the line
> in which they appear is considered as a comment.
>
>>cc on AIX, Solaris, SunOS, IRIX, HPUX and Domain/OS behaves correctly.
>>Will DEC fix its cc?
>See above. Using cc -std1 works `correctly' as well.
I would like to get the correct behaviour as default and C++ comments
enabled as a result of a compiler option. Is there any reason to get
the broken behaviour as default, especially since nobody else (except,
probably, Turbo C for MSDOS) is doing this?
Historically, cc without any options invokes a K&R C compiler (with
various ANSI extensions, these days). I've never seen before a cc with
C++ extensions by default and I don't think this is a very good idea,
especially since it breaks valid K&R C code.
Dan
--
Dan Pop
CERN, CN Division
Email: danpop@cernapo.cern.ch
Mail: CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
prev parent reply other threads:[~1994-10-12 22:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-10-12 14:00 Is cc broken on OSF/1 and ULTRIX? Dan Pop
1994-10-12 15:39 ` Ron Natalie
1994-10-13 15:29 ` Wayne Scott
1994-10-12 17:46 ` Rick Murphy
1994-10-12 22:35 ` Dan Pop [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox