Xref: news-dnh.mv.net comp.os.msdos.djgpp:551 Path: news-dnh.mv.net!mv!news.sprintlink.net!demon!chocolat.demon.co.uk!PS From: Paul Shirley Newsgroups: comp.os.msdos.djgpp Subject: Re: c++ comments Date: Sat, 24 Jun 95 02:23:41 GMT Organization: a loose end. Lines: 41 References: <803925756snz AT chocolat DOT demon DOT co DOT uk> <3sf3dn$4i6 AT odin DOT diku DOT dk> <3sfbl8$pvt AT agate DOT berkeley DOT edu> Reply-To: PS AT chocolat DOT demon DOT co DOT uk To: djgpp AT sun DOT soe DOT clarkson DOT edu Dj-Gateway: from newsgroup comp.os.msdos.djgpp korpela AT albert DOT ssl DOT berkeley DOT edu "Eric J. Korpela" writes: ;)Morten Welinder wrote: ;)>void ;)>main () ;)>{ ;)> printf ("%d\n", 10 //* ;)> 2 // 1 */ ;)> ); ;)>} ;)> ;)>This program should print 10, not 5. ;) ;)Or even better the compiler should print... ;) ;)t1.c: In function `main': ;)t1.c:4: warning: implicit declaration of function `printf' ;)t1.c:6: parse error before `)' ;) ;):) ;) ;)I do agree with your point, though. The C++ comment convention ;)should be used for C++. After all, it's a different language. ;) ;)Even though the compiler can understand both [C and C++], one shouldn't ;)mix the two in the same file. You don't see anyone trying to put ;)Fortran comments in their C code. What annoys me is the way that there *is* a flag to allow C++ comments, but its undocumented,unsupported and almost impossible to use! (And if you don't believe me.. try compiling C++ code with the C-C++ flag and watch it fail to locate any C++ headers, it really is C++ in C) More to the point, in a world full of PC compilers that default to allowing this, gcc should at least allow the option. (I'd build it into the gcc code if I actually used C ;) -- Paul Shirley: SemiProfessional Coffee & Chocolate Taster