From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,fedbd18693809193 X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1994-10-12 16:10:27 PST Newsgroups: comp.sys.dec Path: bga.com!news.sprintlink.net!howland.reston.ans.net!EU.net!CERN.ch!news From: danpop@cernapo.cern.ch (Dan Pop) Subject: Re: Is cc broken on OSF/1 and ULTRIX? Message-ID: Sender: news@news.cern.ch (USENET News System) Organization: CERN European Lab for Particle Physics References: <37h7di$p9b@decuac.dec.com> Date: Wed, 12 Oct 1994 22:35:15 GMT In <37h7di$p9b@decuac.dec.com> murphy@dco.dec.com (Rick Murphy) writes: >In article 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