diff options
author | Araq <rumpf_a@web.de> | 2013-02-27 23:57:04 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2013-02-27 23:57:04 +0100 |
commit | 8090b6c02704cd7e8942ac846c9e086874d88241 (patch) | |
tree | ae3c13fa79151e3841d1689e641a9878dd3c846f /compiler | |
parent | b4232a672f2d0c80d95d90f943a62956e764683d (diff) | |
download | Nim-8090b6c02704cd7e8942ac846c9e086874d88241.tar.gz |
small improvements
Diffstat (limited to 'compiler')
-rwxr-xr-x | compiler/magicsys.nim | 5 | ||||
-rwxr-xr-x | compiler/main.nim | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/compiler/magicsys.nim b/compiler/magicsys.nim index 6ff714dc7..005ee3ae3 100755 --- a/compiler/magicsys.nim +++ b/compiler/magicsys.nim @@ -38,7 +38,10 @@ proc newSysType(kind: TTypeKind, size: int): PType = proc getSysSym(name: string): PSym = result = StrTableGet(systemModule.tab, getIdent(name)) - if result == nil: rawMessage(errSystemNeeds, name) + if result == nil: + rawMessage(errSystemNeeds, name) + result = newSym(skError, getIdent(name), systemModule, systemModule.info) + result.typ = newType(tyError, systemModule) if result.kind == skStub: loadStub(result) proc sysTypeFromName*(name: string): PType = diff --git a/compiler/main.nim b/compiler/main.nim index ce08eaa30..04e550aea 100755 --- a/compiler/main.nim +++ b/compiler/main.nim @@ -462,9 +462,10 @@ proc MainCommand = gCmd = cmdCompileToC wantMainModule() CommandCompileToC() - of "cpp", "compiletocpp": + of "cpp", "compiletocpp": extccomp.cExt = ".cpp" gCmd = cmdCompileToCpp + if cCompiler == ccGcc: setCC("gpp") wantMainModule() DefineSymbol("cpp") CommandCompileToC() |