iarsystems / iar-vsc-build

Visual Studio Code extension for developing and building IAR projects
Mozilla Public License 2.0
38 stars 5 forks source link

IntelliSense marks binary constants as errors #44

Closed stdockd closed 1 year ago

stdockd commented 1 year ago

When using binary constants in my project, IntelliSense marks them as errors, even though the project builds and runs without any issues. This happens only when C/C++ configuration provider is set to IAR Build.

Here's an example: image

As far as I know, IAR supports binary literals since version 9.20, but I'm having this issue using both 9.20.2 and 9.30.1 with VSCode.

HampusAdolfsson commented 1 year ago

The C/C++ extension that we rely on for intellisense doesn't directly support IAR compilers, so we have to make some compromises when configuring the intellisense. We currently configure it close to standard C with a few msvc extensions, and as far as I know binary constants are not standard C.

We might change the intellisense to be closer to clang C in the next release. It would match the IAR compiler better in a number of cases, including this one.

HampusAdolfsson commented 1 year ago

We've changed the intellisense mode to clang in extension version 1.30.1. You should no longer see these errors for binary constants.