Hi, using SEGGER Embedded studio for ARM Release 3.40.
Compiler error points to wrong place (headerfile).
I had an error in my code but the compiler was pointing to a unrealated preprocessor macro in a headerfile.
It is very confusing.
Example code that isolates the problem
-------------------------------
// Macro without any error
#define A_MACRO(ERR_CODE) \
do \
{ \
} while (0)
// enum with missing ";" at the end
enum missingsemicolon_e{
MISSING_SEMI_COLON
} // <<<----------- ERROR is here (missing ; )
// call to macro just after.
A_MACRO(err_code)
-------------------------------
Can somebody confirm this bug?
Best regards
Peter
Compiler error points to wrong place (headerfile).
I had an error in my code but the compiler was pointing to a unrealated preprocessor macro in a headerfile.
It is very confusing.
Example code that isolates the problem
-------------------------------
// Macro without any error
#define A_MACRO(ERR_CODE) \
do \
{ \
} while (0)
// enum with missing ";" at the end
enum missingsemicolon_e{
MISSING_SEMI_COLON
} // <<<----------- ERROR is here (missing ; )
// call to macro just after.
A_MACRO(err_code)
-------------------------------
Can somebody confirm this bug?
Best regards
Peter