small improvements

This commit is contained in:
Araq
2013-02-27 23:57:04 +01:00
parent b4232a672f
commit 8090b6c027
2 changed files with 6 additions and 2 deletions

View File

@@ -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 =

View File

@@ -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()