Other Parts Discussed in Thread: HALCOGEN
Tool/software: TI C/C++ Compiler
Compiling with --preproc_only creates some weired style C-Code when e.g., float.h is included (I only cecked system headers float, math etc, and not HALCoGen generated).
Example Code:
#include <float.h>
int main(void) {
return 0;
}
And -pp gives (newlines removed), and these are the first lines of code:
# pragma diag_push
# pragma CHECK_MISRA("-19.7")
# pragma CHECK_MISRA("-19.4")
# pragma CHECK_MISRA("-19.1")
# pragma CHECK_MISRA("-19.15")
# pragma diag_pop
_Pragma("diag_push")
_Pragma("CHECK_MISRA(\"-19.4\")")
_Pragma("CHECK_MISRA(\"-19.1\")")
_Pragma("CHECK_MISRA(\"-19.6\")")
#pragma diag_push
#pragma CHECK_MISRA("-19.4")
....
It's always the same for the system headers:
- Frist the misra rules 19.7, 19.4, 19.1 and 19.15 have these weired pragma which exactly one whitespace between # and pragma
- after that all #pragams are fine (no whitespace between # and pragma)
Now my questions are:
- What is this? I am not aware that this is valid C-code.
- Why are only these four pragmas that weired, and all other are normal?
CCS-Project: pp-pragma.zip