Skip to content

Commit

Permalink
fix nim-lang#11590: c compiler warnings silently ignored, giving unde…
Browse files Browse the repository at this point in the history
…fined behavior
  • Loading branch information
timotheecour committed Apr 16, 2020
1 parent 6914de0 commit 9a5b3fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion compiler/extccomp.nim
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,8 @@ proc execCmdsInParallel(conf: ConfigRef; cmds: seq[string]; prettyCb: proc (idx:
cmds[i])
else:
tryExceptOSErrorMessage(conf, "invocation of external compiler program failed."):
res = execProcesses(cmds, {poStdErrToStdOut, poUsePath, poParentStreams},
# keep writing errors/warnings to stderr
res = execProcesses(cmds, {poUsePath, poParentStreams},
conf.numberOfProcessors, prettyCb, afterRunEvent=runCb)
if res != 0:
if conf.numberOfProcessors <= 1:
Expand Down
4 changes: 3 additions & 1 deletion config/nim.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,9 @@ llvm_gcc.options.size = "-Os"
# Configuration for the LLVM CLang compiler:
clang.options.debug = "-g"
clang.cpp.options.debug = "-g"
clang.options.always = "-w"
# pending fixing `sem.nim.c:16829:37: error: & has lower precedence than ==`
# when compiling nim, we can remove `-Wno-error=parentheses`
clang.options.always = "-Werror -Wno-error=parentheses"
clang.options.speed = "-O3"
clang.options.size = "-Os"

Expand Down

0 comments on commit 9a5b3fc

Please sign in to comment.