diff options
Diffstat (limited to 'clang/test/Sema/attr-mode.c')
-rw-r--r-- | clang/test/Sema/attr-mode.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/test/Sema/attr-mode.c b/clang/test/Sema/attr-mode.c index 77bd2f737a4..179b1819b1f 100644 --- a/clang/test/Sema/attr-mode.c +++ b/clang/test/Sema/attr-mode.c @@ -24,8 +24,8 @@ typedef unsigned unwind_word __attribute((mode(unwind_word))); int **__attribute((mode(QI)))* i32; // expected-error{{mode attribute}} -__attribute__((mode(QI))) int invalid_func() { return 1; } // expected-error{{'mode' attribute only applies to variables and typedefs}} -enum invalid_enum { A1 __attribute__((mode(QI))) }; // expected-error{{'mode' attribute only applies to variables and typedefs}} +__attribute__((mode(QI))) int invalid_func() { return 1; } // expected-error{{'mode' attribute only applies to variables, fields and typedefs}} +enum invalid_enum { A1 __attribute__((mode(QI))) }; // expected-error{{'mode' attribute only applies to variables, fields and typedefs}} typedef _Complex double c32 __attribute((mode(SC))); int c32_test[sizeof(c32) == 8 ? 1 : -1]; @@ -76,3 +76,7 @@ void test_TCtype(c128ibm *a) { f_ft128_complex_arg (a); } #else #error Unknown test architecture. #endif + +struct S { + int n __attribute((mode(HI))); +}; |