Current behavior, Steps to reproduce and Expected behavior
Hi!
I am working on a CMSIS solution for an STM32H7 microcontroller, which uses the "--std=gnu11" definition found in the cdefault.yml included in the CMSIS-Toolbox, version 2.14.1.
However, the compile_macros.h file, which I assume is generated by the VS Code CMSIS Solution extension, always contains #define __STDC_VERSION__ 202311L, no matter which standard is set in the *.csolution.yml file.
This causes the clangd extension to incorrectly assume gnu23 is used in the build, and causes linting issue to appear for example on stdbool.h related variables in VS Code:
After a quick test by removing the "Add:" node in the .clangd file that includes the compile_macros.h file, the issue is no longer present, and linting is working as expected:
My expectation would rather be that the standard version defined in the generated compiler_macros.h file respects the default or explicit settings from the opened *.csolution.yml project.
Additional Information
Extension Version: 1.68.1-5-d2a01dd
Current behavior, Steps to reproduce and Expected behavior
Hi!
I am working on a CMSIS solution for an STM32H7 microcontroller, which uses the "--std=gnu11" definition found in the cdefault.yml included in the CMSIS-Toolbox, version 2.14.1.
However, the compile_macros.h file, which I assume is generated by the VS Code CMSIS Solution extension, always contains
#define __STDC_VERSION__ 202311L, no matter which standard is set in the *.csolution.yml file.This causes the clangd extension to incorrectly assume gnu23 is used in the build, and causes linting issue to appear for example on stdbool.h related variables in VS Code:
After a quick test by removing the "Add:" node in the .clangd file that includes the compile_macros.h file, the issue is no longer present, and linting is working as expected:
My expectation would rather be that the standard version defined in the generated compiler_macros.h file respects the default or explicit settings from the opened *.csolution.yml project.
Additional Information
Extension Version: 1.68.1-5-d2a01dd