If you enable the compiler's setting for reporting invalid pragmas, the compiler issues a warning when it encounters a pragma it does not recognize. For example, the pragma statements in The following listing generate warnings with the invalid pragmas setting enabled.
#pragma silly_data off // WARNING: silly_data is not a pragma. #pragma ANSI_strict select // WARNING: select is not defined #pragma ANSI_strict on // OK
The following table shows how to control the recognition of invalid pragmas.
| To control this option from here... | use this setting |
|---|---|
| CodeWarrior IDE | Illegal Pragmas in the C/C++ Build > Settings > S12Z Compiler > Warnings panel |
| source code | #pragma warn_illpragma |
| command line | -warnings illpragmas |