2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
2008-12-26 08:51:21 +08:00
|
|
|
|
|
|
|
// CC qualifier can be applied only to functions
|
|
|
|
int __attribute__((stdcall)) var1; // expected-warning{{'stdcall' attribute only applies to function types}}
|
|
|
|
int __attribute__((fastcall)) var2; // expected-warning{{'fastcall' attribute only applies to function types}}
|
|
|
|
|
|
|
|
// Different CC qualifiers are not compatible
|
2009-11-04 11:36:09 +08:00
|
|
|
void __attribute__((stdcall, fastcall)) foo3(void); // expected-error{{stdcall and fastcall attributes are not compatible}}
|
2008-12-26 08:51:21 +08:00
|
|
|
void __attribute__((stdcall)) foo4();
|
2009-11-04 11:36:09 +08:00
|
|
|
void __attribute__((fastcall)) foo4(void); // expected-error{{fastcall and stdcall attributes are not compatible}}
|