# Bug Notice DevCpp 4.9.9.0

## Recommended Posts

IDE: DevCpp 4.9.9.0; Compiler: mingw 3.3.1 I ran across this little bastard while I was working one of my projects
lpProgramMemory = &Memory[(PB*BANK_SIZE) +  PC];
switch(*lpProgramMemory){

. . // ..


Here
///////////////// Processor Flags  \\\\\\\\\\\\\\\
BOOL bEmulation; // 6502 Emulation mode 8 bit;


And Here
//////////// Internal Registers \\\\\\\\\\\\\\\\\
WORD A;             // the Accumulator


The compiler told me that A, And bEumulation were both undeclared And that case 0x61 was unreachable, all of which were not true The culprit was the \\\ marks in the comments in the code

Won’t Work

Works


weird huh? -Frank

##### Share on other sites
That's not a bug in Dev C++ or MinGW, that's the fault of the programming language. The \ at the end of a line is a line continuation token, which means that if you have a \ at the end of a line, it makes that line part of the line with the \ at the end. That means that if you have a // style comment with a \ at the end of the line, it comments out the next line too.

##### Share on other sites
backslash and the end of a line extends the comment to the following one.

##### Share on other sites
Wow, That's about the dumbest thing I possible ever heard of.
Why in gods name would anyone ever for any reason think of implementing something like that into a programming language.

- Frank

##### Share on other sites
It's one of the things C++ inherited from C, which had only /* */ style comments, so this kind of problem didn't come up. In particular, line continuation characters were designed to support preprocessor macro definitions.

##### Share on other sites
I Know but it's in a comment So it should igonre it. That is in a sane world.

I think it's an over-sight on in the Dev-Cpp IDE a bug.

-Frank

##### Share on other sites
Quote:
 Original post by FrankCashioI think it's an over-sight on in the Dev-Cpp IDE a bug.-Frank

It's not. It's characteristic of the language itself. just don't use those god-awful \\\\\\\\\\\\\\\ comments.

## Create an account

Register a new account

• ### Forum Statistics

• Total Topics
628284
• Total Posts
2981831

• 10
• 10
• 10
• 11
• 17