"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "test/Sema/callingconv-iamcu.c" between
cfe-8.0.1.src.tar.xz and cfe-9.0.0.src.tar.xz

About: Clang is an LLVM front end for the C, C++, and Objective-C languages. Clang aims to provide a better user experience through expressive diagnostics, a high level of conformance to language standards, fast compilation, and low memory use.

callingconv-iamcu.c  (cfe-8.0.1.src.tar.xz):callingconv-iamcu.c  (cfe-9.0.0.src.tar.xz)
// RUN: %clang_cc1 %s -fsyntax-only -triple i686-intel-elfiamcu -verify // RUN: %clang_cc1 %s -fsyntax-only -triple i686-intel-elfiamcu -verify
void __attribute__((fastcall)) foo(float *a) { // expected-warning {{calling con vention 'fastcall' ignored for this target}} void __attribute__((fastcall)) foo(float *a) { // expected-warning {{'fastcall' calling convention is not supported for this target}}
} }
void __attribute__((stdcall)) bar(float *a) { // expected-warning {{calling conv ention 'stdcall' ignored for this target}} void __attribute__((stdcall)) bar(float *a) { // expected-warning {{'stdcall' ca lling convention is not supported for this target}}
} }
void __attribute__((fastcall(1))) baz(float *a) { // expected-error {{'fastcall' attribute takes no arguments}} void __attribute__((fastcall(1))) baz(float *a) { // expected-error {{'fastcall' attribute takes no arguments}}
} }
void __attribute__((fastcall)) test2(int a, ...) { // expected-warning {{calling convention 'fastcall' ignored for this target}} void __attribute__((fastcall)) test2(int a, ...) { // expected-warning {{'fastca ll' calling convention is not supported for this target}}
} }
void __attribute__((stdcall)) test3(int a, ...) { // expected-warning {{calling convention 'stdcall' ignored for this target}} void __attribute__((stdcall)) test3(int a, ...) { // expected-warning {{'stdcall ' calling convention is not supported for this target}}
} }
void __attribute__((thiscall)) test4(int a, ...) { // expected-warning {{calling convention 'thiscall' ignored for this target}} void __attribute__((thiscall)) test4(int a, ...) { // expected-warning {{'thisca ll' calling convention is not supported for this target}}
} }
void __attribute__((cdecl)) ctest0() {} void __attribute__((cdecl)) ctest0() {}
void __attribute__((cdecl(1))) ctest1(float x) {} // expected-error {{'cdecl' at tribute takes no arguments}} void __attribute__((cdecl(1))) ctest1(float x) {} // expected-error {{'cdecl' at tribute takes no arguments}}
void (__attribute__((fastcall)) *pfoo)(float*) = foo; // expected-warning {{call ing convention 'fastcall' ignored for this target}} void (__attribute__((fastcall)) *pfoo)(float*) = foo; // expected-warning {{'fas tcall' calling convention is not supported for this target}}
void (__attribute__((stdcall)) *pbar)(float*) = bar; // expected-warning {{calli ng convention 'stdcall' ignored for this target}} void (__attribute__((stdcall)) *pbar)(float*) = bar; // expected-warning {{'stdc all' calling convention is not supported for this target}}
void (*pctest0)() = ctest0; void (*pctest0)() = ctest0;
void ctest2() {} void ctest2() {}
void (__attribute__((cdecl)) *pctest2)() = ctest2; void (__attribute__((cdecl)) *pctest2)() = ctest2;
typedef void (__attribute__((fastcall)) *Handler) (float *); // expected-warning {{calling convention 'fastcall' ignored for this target}} typedef void (__attribute__((fastcall)) *Handler) (float *); // expected-warning {{'fastcall' calling convention is not supported for this target}}
Handler H = foo; Handler H = foo;
int __attribute__((pcs("aapcs", "aapcs"))) pcs1(void); // expected-error {{'pcs' attribute takes one argument}} int __attribute__((pcs("aapcs", "aapcs"))) pcs1(void); // expected-error {{'pcs' attribute takes one argument}}
int __attribute__((pcs())) pcs2(void); // expected-error {{'pcs' attribute takes one argument}} int __attribute__((pcs())) pcs2(void); // expected-error {{'pcs' attribute takes one argument}}
int __attribute__((pcs(pcs1))) pcs3(void); // expected-error {{'pcs' attribute r equires a string}} \ int __attribute__((pcs(pcs1))) pcs3(void); // expected-error {{'pcs' attribute r equires a string}} \
// expected-error {{invalid PCS type} } // expected-error {{invalid PCS type} }
int __attribute__((pcs(0))) pcs4(void); // expected-error {{'pcs' attribute requ ires a string}} int __attribute__((pcs(0))) pcs4(void); // expected-error {{'pcs' attribute requ ires a string}}
/* These are ignored because the target is i386 and not ARM */ /* These are ignored because the target is i386 and not ARM */
int __attribute__((pcs("aapcs"))) pcs5(void); // expected-warning {{calling conv int __attribute__((pcs("aapcs"))) pcs5(void); // expected-warning {{'pcs' callin
ention 'pcs' ignored for this target}} g convention is not supported for this target}}
int __attribute__((pcs("aapcs-vfp"))) pcs6(void); // expected-warning {{calling int __attribute__((pcs("aapcs-vfp"))) pcs6(void); // expected-warning {{'pcs' ca
convention 'pcs' ignored for this target}} lling convention is not supported for this target}}
int __attribute__((pcs("foo"))) pcs7(void); // expected-error {{invalid PCS type }} int __attribute__((pcs("foo"))) pcs7(void); // expected-error {{invalid PCS type }}
void ctest3(); void ctest3();
void __attribute__((cdecl)) ctest3() {} void __attribute__((cdecl)) ctest3() {}
typedef __attribute__((stdcall)) void (*PROC)(); // expected-warning {{calling c onvention 'stdcall' ignored for this target}} typedef __attribute__((stdcall)) void (*PROC)(); // expected-warning {{'stdcall' calling convention is not supported for this target}}
PROC __attribute__((cdecl)) ctest4(const char *x) {} PROC __attribute__((cdecl)) ctest4(const char *x) {}
void __attribute__((intel_ocl_bicc)) inteloclbifunc(float *a) {} // expected-war ning {{calling convention 'intel_ocl_bicc' ignored for this target}} void __attribute__((intel_ocl_bicc)) inteloclbifunc(float *a) {} // expected-war ning {{'intel_ocl_bicc' calling convention is not supported for this target}}
struct type_test {} __attribute__((stdcall)); // expected-warning {{calling conv ention 'stdcall' ignored for this target}} expected-warning {{'stdcall' attribut e only applies to functions and methods}} struct type_test {} __attribute__((stdcall)); // expected-warning {{'stdcall' ca lling convention is not supported for this target}} expected-warning {{'stdcall' attribute only applies to functions and methods}}
 End of changes. 12 change blocks. 
14 lines changed or deleted 14 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)