2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -E %s | grep '#pragma foo bar'
|
|
|
|
// RUN: %clang_cc1 -fsyntax-only -Wunknown-pragmas -verify %s
|
2006-07-03 05:50:31 +08:00
|
|
|
|
|
|
|
// GCC doesn't expand macro args for unrecognized pragmas.
|
|
|
|
#define bar xX
|
2009-04-20 05:10:26 +08:00
|
|
|
#pragma foo bar // expected-warning {{unknown pragma ignored}}
|
2006-07-03 05:50:31 +08:00
|
|
|
|
2009-04-20 05:20:35 +08:00
|
|
|
#pragma STDC FP_CONTRACT ON
|
|
|
|
#pragma STDC FP_CONTRACT OFF
|
|
|
|
#pragma STDC FP_CONTRACT DEFAULT
|
2009-04-20 05:50:08 +08:00
|
|
|
#pragma STDC FP_CONTRACT IN_BETWEEN // expected-warning {{expected 'ON' or 'OFF' or 'DEFAULT' in pragma}}
|
2009-04-20 05:20:35 +08:00
|
|
|
|
2009-04-20 05:55:32 +08:00
|
|
|
#pragma STDC FENV_ACCESS ON // expected-warning {{pragma STDC FENV_ACCESS ON is not supported, ignoring pragma}}
|
2009-04-20 05:20:35 +08:00
|
|
|
#pragma STDC FENV_ACCESS OFF
|
|
|
|
#pragma STDC FENV_ACCESS DEFAULT
|
2009-04-20 05:50:08 +08:00
|
|
|
#pragma STDC FENV_ACCESS IN_BETWEEN // expected-warning {{expected 'ON' or 'OFF' or 'DEFAULT' in pragma}}
|
2009-04-20 05:20:35 +08:00
|
|
|
|
|
|
|
#pragma STDC CX_LIMITED_RANGE ON
|
|
|
|
#pragma STDC CX_LIMITED_RANGE OFF
|
|
|
|
#pragma STDC CX_LIMITED_RANGE DEFAULT
|
2009-04-20 05:50:08 +08:00
|
|
|
#pragma STDC CX_LIMITED_RANGE IN_BETWEEN // expected-warning {{expected 'ON' or 'OFF' or 'DEFAULT' in pragma}}
|
|
|
|
|
|
|
|
#pragma STDC CX_LIMITED_RANGE // expected-warning {{expected 'ON' or 'OFF' or 'DEFAULT' in pragma}}
|
|
|
|
#pragma STDC CX_LIMITED_RANGE ON FULL POWER // expected-warning {{expected end of macro in STDC pragma}}
|
2009-04-20 05:20:35 +08:00
|
|
|
|
2009-04-20 05:25:37 +08:00
|
|
|
#pragma STDC SO_GREAT // expected-warning {{unknown pragma in STDC namespace}}
|
|
|
|
#pragma STDC // expected-warning {{unknown pragma in STDC namespace}}
|
2009-04-20 05:20:35 +08:00
|
|
|
|