RE: [Dev-C++] Dev-C++ Bug? Using backslash within comments
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Reid T. <Rei...@at...> - 2005-07-06 17:30:06
|
Jonathan Dearborn wrote: > Reid, you're definitely right about escaping the line-break. That's > the problem, but is that a feature of the compiler (as Peter said) or > is it a little mistake in the compiler source? As I said before, > other compilers ignore the backslash if it's in a comment (as I > believe they should). Also, if it's a feature, shouldn't it be > useful? There is a separate comment style (the old style /*text*/) > in case you want to comment multiple lines. Escape characters > shouldn't affect comments. I think this is just a bug. A small bug, > but how should it be handled?=20 >=20 > Verne, are you saying your compiler gave a warning because there's > code after the main() return? That's fine, it's just a comment. I > would expect that. I use Dev-C++ exclusively for editing and > compiling, by the way.=20 >=20 > _________________________________________________________________ > Don't just search. Find. Check out the new MSN Search! > http://search.msn.click-url.com/go/onm00200636ave/direct/01/ SOLARIS SUN compiler $ CC -V CC: Sun C++ 5.5 2003/03/12 $ CC test.C does not ignore it "test.C", line 11: Warning: The variable y has not yet been assigned a value. 1 Warning(s) detected. NOTE: The other compilers may very well output a similar warning IF you pass the proper flags. EXAMPLE: cygwin compiler called 'g++ -Wall' declares=20 $ g++ -Wall test.cpp test.cpp:9:5: warning: multi-line comment SOLARIS gcc $ g++ -v Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/specs gcc version 2.95.2 19991024 (release) does not ignore it AIX $ cc -v exec: /usr/bin/pg(/usr/bin/pg,/usr/lib/nls/msg/en_US/vacpp.help,NULL)=20 VisualAge C++ Professional / C for AIX Compiler, Version 6 does not ignore it CYGWIN $ g++ -v Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs Configured with: /gcc/gcc-3.4.4/gcc-3.4.4-1/configure --verbose --prefix=3D/usr --exec-prefix=3D/usr --sysconfdir=3D/etc = --libdir=3D/usr/lib --libexecdir=3D/usr/lib --mandir=3D/usr/share/man = --infodir=3D/usr/share/info --enable-languages=3Dc,ada,c++,d,f77,java,objc --enable-nls --without-included-gettext --enable-version-specific-runtime-libs --without-x --enable-libgcj --disable-java-awt --with-system-zlib --enable-interpreter --disable-libgcj-debug --enable-threads=3Dposix --enable-java-gc=3Dboehm --disable-win32-registry = --enable-sjlj-exceptions --enable-hash-synchronization --enable-libstdcxx-debug : (reconfigured)=20 Thread model: posix gcc version 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125) does not ignore it So, based on empirical evidence, no, prob not a bug. reid |