cancel
Showing results for 
Search instead for 
Did you mean: 

CubeIDE incorrectly flags __attribute__((fallthrough)) as syntax error

I have

// Prevent a compiler warning on fall-through from one 'case' to another in
// a 'switch' statement
// https://gcc.gnu.org/onlinedocs/gcc/Statement-Attributes.html
#define INTENTIONAL_FALLTHROUGH __attribute__((fallthrough))

 

But the IDE flags it as a syntax error:

AndrewNeil_0-1745942028203.png

and it's not just the macro:

AndrewNeil_1-1745942185891.png

 

The usage is correct according to GCC documentation:

https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/Statement-Attributes.html

 

This is purely in the editor - the actual compiler gives 0 errors and 0 warnings.

IDE v1.13.1 on Win 11.

 

Seems to be a known Eclipse issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=567227

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
0 REPLIES 0