cancel
Showing results for 
Search instead for 
Did you mean: 

IDE recognition of _Static_assert

Brian H
Senior

The STM32 compiler toolchain supplied with CubeIDE 1.13.1 recognizes the _Static_assert statement, but the IDE itself does not (it marks it as a syntax error).  Can this be fixed?  Is there a setting I can change in the IDE to stop flagging _Static_assert as a syntax error without turning off all syntax checking?

Image showing IDE highlighting _Static_assert statement as a syntax error:

BrianH_1-1694553298522.png

Image showing correct compiler treatment of _Static_assert:

BrianH_0-1694553238771.png

To be clear, this is not a show-stopping problem; it's just an annoyance factor.

12 REPLIES 12

That worked for me.  Thanks!

Very helpful.  I had to switch the CDT provider from global to project-specific in order to get it to allow me to add an entry ("Add..." is grayed out if "Use global provider shared between projects" is checked on the Providers tab).

How would I add this to the global provider?  This isn't the only project where I might use _Static_assert, so it would be convenient to put it in this global place.

Radosław
Senior II

think it's impossible.   I'm usually pass this tips in ReadMe , 😉