Home | History | Annotate | Download | only in Preprocessor
      1 // RUN: %clang_cc1 -E %s | grep '#pragma foo bar'
      2 // RUN: %clang_cc1 -fsyntax-only -Wunknown-pragmas -verify %s
      3 
      4 // GCC doesn't expand macro args for unrecognized pragmas.
      5 #define bar xX
      6 #pragma foo bar   // expected-warning {{unknown pragma ignored}}
      7 
      8 #pragma STDC FP_CONTRACT ON
      9 #pragma STDC FP_CONTRACT OFF
     10 #pragma STDC FP_CONTRACT DEFAULT
     11 #pragma STDC FP_CONTRACT IN_BETWEEN  // expected-warning {{expected 'ON' or 'OFF' or 'DEFAULT' in pragma}}
     12 
     13 #pragma STDC FENV_ACCESS ON          // expected-warning {{pragma STDC FENV_ACCESS ON is not supported, ignoring pragma}}
     14 #pragma STDC FENV_ACCESS OFF
     15 #pragma STDC FENV_ACCESS DEFAULT
     16 #pragma STDC FENV_ACCESS IN_BETWEEN   // expected-warning {{expected 'ON' or 'OFF' or 'DEFAULT' in pragma}}
     17 
     18 #pragma STDC CX_LIMITED_RANGE ON
     19 #pragma STDC CX_LIMITED_RANGE OFF
     20 #pragma STDC CX_LIMITED_RANGE DEFAULT
     21 #pragma STDC CX_LIMITED_RANGE IN_BETWEEN   // expected-warning {{expected 'ON' or 'OFF' or 'DEFAULT' in pragma}}
     22 
     23 #pragma STDC CX_LIMITED_RANGE    // expected-warning {{expected 'ON' or 'OFF' or 'DEFAULT' in pragma}}
     24 #pragma STDC CX_LIMITED_RANGE ON FULL POWER  // expected-warning {{expected end of directive in pragma}}
     25 
     26 #pragma STDC SO_GREAT  // expected-warning {{unknown pragma in STDC namespace}}
     27 #pragma STDC   // expected-warning {{unknown pragma in STDC namespace}}
     28 
     29