Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7944 Discussions

Bug report: Comment fools C++ Compiler 11.1.054 for Windows

helmuth_lang
Beginner
373 Views

Look at this code:

double x;

x /* comment */ += 3 ; //OK with INTEL compiler

x /* comment */ -= 3 ; //OK with INTEL compiler

x /* comment */ *= 3 ; //OK with INTEL compiler

x /* comment */ /= 3 ;//Error with INTEL 11.1.054

//The code Line below isidentical to the above, but with the commentstripped. It then works!

x /= 3 ; //OK with INTEL compiler

----------------------------------------------------

The compiler generates this error message:

error: expected an expression

1> x /* comment */ /= 3 ; //Error with INTEL 11.1.054

1> ^

-------------------------------------------------------

All code above works with Microsoft C++ 2008

0 Kudos
3 Replies
Dale_S_Intel
Employee
373 Views

Sure enough, I see the same behavior you describe. Thanks for pointing that out. I'll submit an issue to our bug tracking system and report back here when I have more info.

Thanks!

Dale

0 Kudos
levicki
Valued Contributor I
373 Views

Ha! That looks like the compiler is eating the space between */ and /=, unlike this forum software which keeps adding them everywhere :)

0 Kudos
Dale_S_Intel
Employee
373 Views

Yes, an issue has been submitted for that space problem thing. I don't know when it will be fixed, but I did request higher priority for it.

Dale

0 Kudos
Reply