From 626da27ad632ac06da5b3f12c02485445410d9f4 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Mon, 29 Jul 2019 19:39:52 +0200 Subject: [PATCH] better C error message --- compiler/main.v | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/compiler/main.v b/compiler/main.v index b7d0f9569e..0430e67199 100644 --- a/compiler/main.v +++ b/compiler/main.v @@ -806,10 +806,11 @@ mut args := '' println('cc took $diff ms') println('=========\n') } - // println('C OUTPUT:') if res.contains('error: ') { - println(res) - panic('clang error') + if v.pref.is_debug { + println(res) + } + panic('C error. This should never happen. Please create a GitHub issue.') } // Link it if we are cross compiling and need an executable if v.os == .linux && !linux_host && v.pref.build_mode != .build {