Skip to content

Commit

Permalink
add no declspec tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eightfilms committed Sep 30, 2023
1 parent 74d7a2f commit 5ae950c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/cases/no declspec.c
Original file line number Diff line number Diff line change
@@ -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" \

0 comments on commit 5ae950c

Please sign in to comment.