Hi,
Compile this:
#pragma message ("#PRAGMA MESSAGE") // LINE 1 #pragma GCC warning "#PRAGMA GCC WARNING" // LINE 3 #pragma GCC error "#PRAGMA GCC ERROR" // LINE 5 #warning ("#WARNING 1") // LINE 7 #pragma clang diagnostic ignored "-W#warnings" // LINE 9 #warning ("#WARNING 2") // LINE 10 #error ("#ERROR") // LINE 12
CVI 2013:
test.c - 1 error, 5 warnings 1, 9 warning: #PRAGMA MESSAGE 3, 13 warning: unknown pragma ignored [-Wunknown-pragmas] 5, 13 warning: unknown pragma ignored [-Wunknown-pragmas] 7, 2 warning: #warning is a language extension [-W#warnings] 7, 2 warning: #warning ("#WARNING 1") // LINE 7 [-W#warnings] 12, 2 error: #error ("#ERROR") // LINE 12
That's fine. It doesn't know the two "#pragma GCC", which are Clang 3+ (I guess).
BUT
CVI 2015 file compilation:
5, 13 error: #PRAGMA GCC ERROR 7, 2 warning: #warning is a language extension [-W#warnings] 7, 2 warning: #warning ("#WARNING 1") // LINE 7 [-W#warnings] 12, 2 error: #error ("#ERROR") // LINE 12
Where are the line 1 (#pragma message) and 3 (#pragma GCC warning) texts?
Even more interesting is the interactive window:
Interactive Execution - 1 error 5, 13 error: #PRAGMA GCC ERROR
Where's the rest? CVI 2013 shows everything there, too.
Another thing I find odd: #warning produces 2 warnings with the same flag, thus line 9 disables line 10 (warning 2). So one has the "warning: #warning is a language extension" or no "gcc warnings" at all...