rolandshacks / vs64

C64 Development Environment for Visual Studio Code
Other
102 stars 18 forks source link

Binary values in CC64 project seem to break parsing #76

Closed 3vi1 closed 1 month ago

3vi1 commented 1 month ago

This might be a quick/easy one: I'm just now trying out VS64, opened the included c example, and see that the binary value is not parsed correctly in the editor.

binary type in c example

The code actually compiles and runs fine. Is there any way to stop the spurious warning?

Thanks!

rolandshacks commented 1 month ago

Hi. Parsing/linting is not done by vs64. Which C/C++ extension do you use? I am using the "standard" Microsoft C/C++ extension and with that, everything looks fine. Binary literals have been introduced with C++14, maybe it is somewhere in your C/C++ settings (outside the vs64 config) ?

3vi1 commented 1 month ago

Thanks so much for pointing me in the correct direction. I'm using the standard, up to date, MS C/C++ extension (on Linux).

After reading your reply I noticed there was a specifically name C/C++ configuration setting "C64" at the bottom. Was this set by VS64, or maybe one of the other extensions I previously tested?

C64 Setting

So, I went into the "C64" configuration and the "C standard" setting within was set to an older C standard (maybe C99?). I flipped it to C23 and now the spurious warning has disappeared.

Thanks again for your help! Looking forward to playing with this extension more next weekend!

3vi1 commented 1 month ago

Closing as complete!