Page 1 of 1
Visual Studio compiler error from comment. Yep just happened
Posted: Tue Jan 06, 2015 5:39 am
by Mind Calamity
Excuse the horrible title, but what the hell just happened ?
[youtube]tARZPOHvxyM[/youtube]
Apparently commented out code can still cause errors.
Wrapping it in a multi-line comment fixes it tho:
http://prntscr.com/5p24zo
Re: Visual Studio compiler error from comment. Yep just happ
Posted: Tue Jan 06, 2015 8:36 am
by insider
Re: Visual Studio compiler error from comment. Yep just happ
Posted: Tue Jan 06, 2015 8:44 am
by Zonder
My guess is debug symbols aren't up to date, it usually knows this though and indicates the source/pdb isn't up to date
Re: Visual Studio compiler error from comment. Yep just happ
Posted: Tue Jan 06, 2015 9:24 am
by TheSHEEEP
U wot m8?!

Re: Visual Studio compiler error from comment. Yep just happ
Posted: Tue Jan 06, 2015 9:27 am
by Mind Calamity
I did a clean/rebuild a few times too, nothing helped, I guess VC++ has a drinking problem.

Re: Visual Studio compiler error from comment. Yep just happ
Posted: Tue Jan 06, 2015 1:51 pm
by Klaim
Did you report this bug?
Re: Visual Studio compiler error from comment. Yep just happ
Posted: Tue Jan 06, 2015 2:08 pm
by Xavyiy
Something similar happened to me some months ago at work.
The problem was a copy-pasted code from an internal website, that somehow included some hidden(non visible) & non-valid characters, driving crazy the compiler.
Try to copy-paste your code to a new notepad document, remove the file, re-recreate it and finally copy-paste the code from notepad. It worked for me, after some minutes of "WTF is going on here"

.
Cheers!
Re: Visual Studio compiler error from comment. Yep just happ
Posted: Tue Jan 06, 2015 2:15 pm
by Klaim
Xavyiy wrote:Something similar happened to me some months ago at work.
The problem was a copy-pasted code from an internal website, that somehow included some hidden(non visible) & non-valid characters, driving crazy the compiler.
Try to copy-paste your code to a new notepad document, remove the file, re-recreate it and finally copy-paste the code from notepad. It worked for me, after some minutes of "WTF is going on here"

.
Cheers!
Ah yes I got something similar at some point.
Re: Visual Studio compiler error from comment. Yep just happ
Posted: Tue Jan 06, 2015 2:19 pm
by al2950
Klaim wrote:Xavyiy wrote:Something similar happened to me some months ago at work.
The problem was a copy-pasted code from an internal website, that somehow included some hidden(non visible) & non-valid characters, driving crazy the compiler.
Try to copy-paste your code to a new notepad document, remove the file, re-recreate it and finally copy-paste the code from notepad. It worked for me, after some minutes of "WTF is going on here"

.
Cheers!
Ah yes I got something similar at some point.
Me too! Note to self, never copy & paste code! Still do it though

Re: Visual Studio compiler error from comment. Yep just happ
Posted: Tue Jan 06, 2015 2:54 pm
by Kojack
In particular, powerpoint and pdf like to modify symbols like plus, minus, single and double quotes into ones that look almost identical in the font but are different ascii codes so VS doesn't understand them.
Re: Visual Studio compiler error from comment. Yep just happ
Posted: Tue Jan 06, 2015 4:03 pm
by Zonder
ah yest the old joke of changing a semicolon to a greek question mark

Re: Visual Studio compiler error from comment. Yep just happ
Posted: Tue Jan 06, 2015 5:31 pm
by Mind Calamity
That's just evil
Anyways I didn't copy code from any documents, it was from another source file, at least the pixel skip calculation was from there, but that shouldn't happen as it's still plaintext.
I also noticed a bug with undo, it happens almost always if you undo a lot of stuff, and then redo it you get a huge mess of re-arranged/broken code, I'm not sure if this is related to Visual Assist or if it's a pure Visual Studio bug.
I'll look into reporting the comment bug, but I don't know how to reproduce it, so I doubt it'd be of much use.