1 // RUN: %clang_cc1 -fsyntax-only -verify %s 2 3 struct __attribute__((packed)) { 4 unsigned options; 5 template <typename T> getOptions__anon0e3551c901086 void getOptions() { 7 (T *)&options; 8 } 9 template <typename U> getOptions2__anon0e3551c9010810 void getOptions2() { 11 (U)&options; 12 } 13 } s; 14 15 struct __attribute__((packed)) { // expected-error {{anonymous structs and classes must be class members}} 16 unsigned options ; getOptions__anon0e3551c9020817 template <typename T> getOptions() // expected-error {{a type specifier is required for all declarations}} 18 { 19 (T *) & options; 20 } 21 }; 22