gcc main.c
main.c:
int main() { void *a = &&lab; lab: return 0; }
~/tmp/CHECK $ cppcheck main.c Checking main.c ... main.c:3:13: error: Syntax Error: AST broken, binary operator '=' doesn't have two operands. [internalAstError] void *a = &&lab; ^
But this code is correct from gcc C point of view. See: https://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html
Is it possible to fix it?
Igor
Log in to post a comment.
gcc main.c
main.c:
int main()
{
void *a = &&lab;
lab:
return 0;
}
~/tmp/CHECK $ cppcheck main.c
Checking main.c ...
main.c:3:13: error: Syntax Error: AST broken, binary operator '=' doesn't have two operands. [internalAstError]
void *a = &&lab;
^
But this code is correct from gcc C point of view.
See: https://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html
Is it possible to fix it?
Igor