Merge pull request #2657 from def-/noreturn

Pass noReturn pragma to C code.
This commit is contained in:
Andreas Rumpf 2015-05-08 02:08:32 +02:00
commit 9422dbf337
6 changed files with 31 additions and 25 deletions

View file

@ -26,8 +26,8 @@ type
hasAssume, # CC has __assume (Visual C extension)
hasGcGuard, # CC supports GC_GUARD to keep stack roots
hasGnuAsm, # CC's asm uses the absurd GNU assembler syntax
hasNakedDeclspec, # CC has __declspec(naked)
hasNakedAttribute # CC has __attribute__((naked))
hasDeclspec, # CC has __declspec(X)
hasAttribute, # CC has __attribute__((X))
TInfoCCProps* = set[TInfoCCProp]
TInfoCC* = tuple[
name: string, # the short name of the compiler
@ -85,7 +85,7 @@ compiler gcc:
structStmtFmt: "$1 $3 $2 ", # struct|union [packed] $name
packedPragma: "__attribute__((__packed__))",
props: {hasSwitchRange, hasComputedGoto, hasCpp, hasGcGuard, hasGnuAsm,
hasNakedAttribute})
hasAttribute})
# LLVM Frontend for GCC/G++
compiler llvmGcc:
@ -127,7 +127,7 @@ compiler vcc:
asmStmtFrmt: "__asm{$n$1$n}$n",
structStmtFmt: "$3$n$1 $2",
packedPragma: "#pragma pack(1)",
props: {hasCpp, hasAssume, hasNakedDeclspec})
props: {hasCpp, hasAssume, hasDeclspec})
# Intel C/C++ Compiler
compiler icl: