summary refs log tree commit diff stats
path: root/compiler/main.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/main.nim')
-rwxr-xr-xcompiler/main.nim3
1 files changed, 2 insertions, 1 deletions
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()