CT sizeof(+friends) for {.importc, completeStruct.} types, enable ABI static checks (#13926)
* -d:checkabi obsolete (ABI check now enforced); add `addTypeHeader` helper
* cleanups
* import sizeof at CT for {.completeType.}
* address comments; revert default enabling of -d:checkAbi for now
* mimportc_size_check.nim => msizeof5.nim; merge mabi_check.nim into msizeof5.nim; refactor
* all pragmas in errmsgs should be written: '.importc' (un-ambiguous and less verbose than {.importc.})
This commit is contained in:
parent
5c534b2943
commit
66db9de714
14 changed files with 221 additions and 39 deletions
|
|
@ -40,7 +40,10 @@ type
|
|||
wImmediate, wConstructor, wDestructor, wDelegator, wOverride,
|
||||
wImportCpp, wImportObjC,
|
||||
wImportCompilerProc,
|
||||
wImportc, wImportJs, wExportc, wExportCpp, wExportNims, wIncompleteStruct, wRequiresInit,
|
||||
wImportc, wImportJs, wExportc, wExportCpp, wExportNims,
|
||||
wIncompleteStruct, # deprecated
|
||||
wCompleteStruct,
|
||||
wRequiresInit,
|
||||
wAlign, wNodecl, wPure, wSideEffect, wHeader,
|
||||
wNoSideEffect, wGcSafe, wNoreturn, wNosinks, wMerge, wLib, wDynlib,
|
||||
wCompilerProc, wCore, wProcVar, wBase, wUsed,
|
||||
|
|
@ -128,6 +131,7 @@ const
|
|||
"importcpp", "importobjc",
|
||||
"importcompilerproc", "importc", "importjs", "exportc", "exportcpp", "exportnims",
|
||||
"incompletestruct",
|
||||
"completestruct",
|
||||
"requiresinit", "align", "nodecl", "pure", "sideeffect",
|
||||
"header", "nosideeffect", "gcsafe", "noreturn", "nosinks", "merge", "lib", "dynlib",
|
||||
"compilerproc", "core", "procvar", "base", "used",
|
||||
|
|
@ -186,6 +190,7 @@ proc canonPragmaSpelling*(w: TSpecialWord): string =
|
|||
of wNoSideEffect: "noSideEffect"
|
||||
of wImportCompilerProc: "importCompilerProc"
|
||||
of wIncompleteStruct: "incompleteStruct"
|
||||
of wCompleteStruct: "completeStruct"
|
||||
of wRequiresInit: "requiresInit"
|
||||
of wSideEffect: "sideEffect"
|
||||
of wLineDir: "lineDir"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue