summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-02-27 23:57:04 +0100
committerAraq <rumpf_a@web.de>2013-02-27 23:57:04 +0100
commit8090b6c02704cd7e8942ac846c9e086874d88241 (patch)
treeae3c13fa79151e3841d1689e641a9878dd3c846f /compiler
parentb4232a672f2d0c80d95d90f943a62956e764683d (diff)
downloadNim-8090b6c02704cd7e8942ac846c9e086874d88241.tar.gz
small improvements
Diffstat (limited to 'compiler')
-rwxr-xr-xcompiler/magicsys.nim5
-rwxr-xr-xcompiler/main.nim3
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()