diff --git a/test/cases/no declspec.c b/test/cases/no declspec.c index 0b4c36d0..720a2c66 100644 --- a/test/cases/no declspec.c +++ b/test/cases/no declspec.c @@ -1,4 +1,12 @@ __declspec(align(4)) int foo; +#if __has_declspec_attribute(noreturn) +#error "__has_declspec_attribute macro should not work without -fdeclspec" +#endif + +#if __has_declspec_attribute(x) +#error "__has_declspec_attribute macro should not work without -fdeclspec" +#endif + #define EXPECTED_ERRORS \ "no declspec.c:1:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes" \