[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: odd compiler behaviour?



On Sun, Mar 16, 2003 at 04:45:31AM +0000, Colin Watson wrote:
| On Sat, Mar 15, 2003 at 08:06:33PM +0000, Bruynooghe Floris wrote:

| > But using `//' is also a C++ism no?
| 
| Certainly traditionally yes, although I don't remember right now whether
| C99 allows them

The '//' comments are part of C99, ANSI C++, and Java.  Neither C89
nor K&R included '//' comments in the specification.  gcc will allow
'//' comments in "old" C code[1] but some compilers (eg Sun's
compiler) won't.

HTH,
-D

[1] By "old" code I mean code that wasn't written to the C99 spec, and
    versions of gcc prior to 3.x (eg 2.95) when support for the C99
    spec was added.

-- 
Who can say, "I have kept my heart pure;
I am clean and without sin"?
        Proverbs 20:9
 
http://dman.ddts.net/~dman/

Attachment: pgptEg2pac9oU.pgp
Description: PGP signature


Reply to: