stdcall-fastcall.c revision 04a67a6aa3dfdc92d57f7f8d93ba397348c868a4
1// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3// CC qualifier can be applied only to functions
4int __attribute__((stdcall)) var1; // expected-warning{{'stdcall' only applies to function types; type here is 'int'}}
5int __attribute__((fastcall)) var2; // expected-warning{{'fastcall' only applies to function types; type here is 'int'}}
6
7// Different CC qualifiers are not compatible
8void __attribute__((stdcall, fastcall)) foo3(void); // expected-error{{stdcall and fastcall attributes are not compatible}}
9void __attribute__((stdcall)) foo4(); // expected-note{{previous declaration is here}}
10void __attribute__((fastcall)) foo4(void); // expected-error{{function declared 'fastcall' here was previously declared 'stdcall'}}
11