better error message when C compilation fails

This commit is contained in:
Araq
2013-03-19 08:43:45 +01:00
parent 09fc94c4c2
commit b7d1901747
3 changed files with 10 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
#
#
# The Nimrod Compiler
# (c) Copyright 2012 Andreas Rumpf
# (c) Copyright 2013 Andreas Rumpf
#
# See the file "copying.txt", included in this
# distribution, for details about the copyright.
@@ -573,7 +573,12 @@ proc CallCCompiler*(projectfile: string) =
else:
res = execProcesses(cmds, {poUseShell, poParentStreams},
gNumberOfProcessors)
if res != 0: rawMessage(errExecutionOfProgramFailed, [])
if res != 0:
if gNumberOfProcessors <= 1:
rawMessage(errExecutionOfProgramFailed, [])
else:
rawMessage(errGenerated, " execution of an external program failed; " &
"rerun with --parallelBuild:1 to see the error message")
if optNoLinking notin gGlobalOptions:
# call the linker:
var it = PStrEntry(toLink.head)

View File

@@ -132,6 +132,7 @@ proc exec(cpu: PCPU) =
let opcode = cpu.mem.readByte(cpu.r.pc)
#echo("OPCODE: 0x", toHex(opcode, 2))
cpu.r.pc.inc()
# PROBLEM: 0x7B is part of some range later but the compiler does not care!
case opcode
of 0x06:
# LD B, n

View File

@@ -13,6 +13,7 @@ version 0.9.2
- acyclic vs prunable; introduce GC hints
- CGEN: ``restrict`` pragma + backend support; computed goto support
- document NimMain and check whether it works for threading
- implement ``system.locals`` magic iterator
Bugs
@@ -31,6 +32,7 @@ Bugs
in c++ mode)
- bootstrapping does not work in C++ mode
- case statement exhaustiveness checking is still wrong
- the new m&s GC is still buggy
version 0.9.4