authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2016-02-13 23:03:39-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2016-02-13 23:03:39-07:00
log5032854aec2a0afb9c272d2c26c409d7bfe48661
treeb364ba827c2659a34690267d4cc6ad16c6cc0657
parent5771bd805ee48aca5d56088fb8a1449bb7c3760d

parseh: more specific warning for different calling conventions


1 files changed, 23 insertions(+), 1 deletions(-)

src/parseh.cpp+23-1
...@@ -471,18 +471,40 @@ static TypeTableEntry *resolve_type_with_table(Context *c, const Type *ty, const...@@ -471,18 +471,40 @@ static TypeTableEntry *resolve_type_with_table(Context *c, const Type *ty, const
471 case CC_C: // __attribute__((cdecl))471 case CC_C: // __attribute__((cdecl))
472 break;472 break;
473 case CC_X86StdCall: // __attribute__((stdcall))473 case CC_X86StdCall: // __attribute__((stdcall))
474 emit_warning(c, decl, "function type has x86 stdcall calling convention");
475 return c->codegen->builtin_types.entry_invalid;
474 case CC_X86FastCall: // __attribute__((fastcall))476 case CC_X86FastCall: // __attribute__((fastcall))
477 emit_warning(c, decl, "function type has x86 fastcall calling convention");
478 return c->codegen->builtin_types.entry_invalid;
475 case CC_X86ThisCall: // __attribute__((thiscall))479 case CC_X86ThisCall: // __attribute__((thiscall))
480 emit_warning(c, decl, "function type has x86 thiscall calling convention");
481 return c->codegen->builtin_types.entry_invalid;
476 case CC_X86VectorCall: // __attribute__((vectorcall))482 case CC_X86VectorCall: // __attribute__((vectorcall))
483 emit_warning(c, decl, "function type has x86 vectorcall calling convention");
484 return c->codegen->builtin_types.entry_invalid;
477 case CC_X86Pascal: // __attribute__((pascal))485 case CC_X86Pascal: // __attribute__((pascal))
486 emit_warning(c, decl, "function type has x86 pascal calling convention");
487 return c->codegen->builtin_types.entry_invalid;
478 case CC_X86_64Win64: // __attribute__((ms_abi))488 case CC_X86_64Win64: // __attribute__((ms_abi))
489 emit_warning(c, decl, "function type has x86 64win64 calling convention");
490 return c->codegen->builtin_types.entry_invalid;
479 case CC_X86_64SysV: // __attribute__((sysv_abi))491 case CC_X86_64SysV: // __attribute__((sysv_abi))
492 emit_warning(c, decl, "function type has x86 64sysv calling convention");
493 return c->codegen->builtin_types.entry_invalid;
480 case CC_AAPCS: // __attribute__((pcs("aapcs")))494 case CC_AAPCS: // __attribute__((pcs("aapcs")))
495 emit_warning(c, decl, "function type has aapcs calling convention");
496 return c->codegen->builtin_types.entry_invalid;
481 case CC_AAPCS_VFP: // __attribute__((pcs("aapcs-vfp")))497 case CC_AAPCS_VFP: // __attribute__((pcs("aapcs-vfp")))
498 emit_warning(c, decl, "function type has aapcs-vfp calling convention");
499 return c->codegen->builtin_types.entry_invalid;
482 case CC_IntelOclBicc: // __attribute__((intel_ocl_bicc))500 case CC_IntelOclBicc: // __attribute__((intel_ocl_bicc))
501 emit_warning(c, decl, "function type has intel_ocl_bicc calling convention");
502 return c->codegen->builtin_types.entry_invalid;
483 case CC_SpirFunction: // default for OpenCL functions on SPIR target503 case CC_SpirFunction: // default for OpenCL functions on SPIR target
504 emit_warning(c, decl, "function type has SPIR function calling convention");
505 return c->codegen->builtin_types.entry_invalid;
484 case CC_SpirKernel: // inferred for OpenCL kernels on SPIR target506 case CC_SpirKernel: // inferred for OpenCL kernels on SPIR target
485 emit_warning(c, decl, "function type has non C calling convention");507 emit_warning(c, decl, "function type has SPIR kernel calling convention");
486 return c->codegen->builtin_types.entry_invalid;508 return c->codegen->builtin_types.entry_invalid;
487 }509 }
488510