Invalid Pragmas

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 listing below, generates warning with the invalid pragmas setting enabled.

Listing 1. Invalid Pragmas
#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 table below lists various options on how to control the recognition of invalid pragmas.

Table 1. Controlling invalid pragmas
To control this option from here... use this setting
CodeWarrior IDE Illegal Pragmas in the C/C++ PowerPC Compiler > Warnings panel
source code #pragma warn_illpragma
command line -warnings illpragmas
Related information
Checking Pragma Settings
Saving and Restoring Pragma Settings
Determining Which Settings Are Saved and Restored
Pragma Scope