My compiler raises a warning #381-D: extra ";" ignored
#381-D: extra ";" ignored
in this situation:
I have a structure defined as follows:
struct example_s { u8_t foo; SOME_MACRO(bar); };
The SOME_MACRO(x)
macro performs the following actions:
#if defined(SYSTEM_A) #define SOME_MACRO(x) u16_t x##something #else #define SOME_MACRO(x) #endif
Of course, the warning is correct if SYSTEM_A
not defined. Just because I have now ;
inside the structure. But does anyone know a way to avoid this correctly? I do not want to break the typical C-style by moving ;
into the macro.
source share