Description
#pragma diagnostic push
#pragma diag_suppress
int get_free_no_warn()
{
// warnings for uninitialized variable off
int a;
return a;
// warnings for uninitialized variable on
}
#pragma diagnostic pop
int get_free_warn()
{
int a;
return a;
}
:!$XCFE test.cpp
"test.cpp", line 2: warning: expected an error number or error tag
#pragma diag_suppress
^
"test.cpp", line 2: warning: expected a ","
#pragma diag_suppress
^
"test.cpp", line 2: internal error: assertion failed at: "pragma.c", line 1192
in process_immediate_pragmas
#pragma diag_suppress
^
1 catastrophic error detected in the compilation of "test.cpp".
Compilation aborted.
Description
#pragma diagnostic push
#pragma diag_suppress
int get_free_no_warn()
{
// warnings for uninitialized variable off
int a;
return a;
// warnings for uninitialized variable on
}
#pragma diagnostic pop
int get_free_warn()
{
int a;
return a;
}
:!$XCFE test.cpp
"test.cpp", line 2: warning: expected an error number or error tag
#pragma diag_suppress
^
"test.cpp", line 2: warning: expected a ","
#pragma diag_suppress
^
"test.cpp", line 2: internal error: assertion failed at: "pragma.c", line 1192
in process_immediate_pragmas
#pragma diag_suppress
^
1 catastrophic error detected in the compilation of "test.cpp".
Compilation aborted.