x86-attr-force-align-arg-pointer.c revision 5a0164d6ab843ca61437ec59a504365cb1c98f43
1// RUN: %clang_cc1 -triple i386-apple-darwin10 -fsyntax-only -verify %s 2 3int a __attribute__((force_align_arg_pointer)); // expected-warning{{attribute only applies to function types}} 4 5// It doesn't matter where the attribute is located. 6void b(void) __attribute__((force_align_arg_pointer)); 7void __attribute__((force_align_arg_pointer)) c(void); 8 9// Functions only have to be declared force_align_arg_pointer once. 10void b(void) {} 11 12// It doesn't matter which declaration has the attribute. 13void d(void); 14void __attribute__((force_align_arg_pointer)) d(void) {} 15 16// Attribute is ignored on function pointer types. 17void (__attribute__((force_align_arg_pointer)) *p)(); 18 19