summaryrefslogtreecommitdiff
path: root/src/cmd/gc/obj.c
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-04-11 14:52:06 -0700
committerRuss Cox <rsc@golang.org>2010-04-11 14:52:06 -0700
commitc6596f656eb56d8e98114fdbd21faa913733e9e4 (patch)
tree16cca026d745fdf4b2f55352c675d3ca3e71d1ef /src/cmd/gc/obj.c
parentcc06efd94099837c0744e8d8fce883ba9ec318d4 (diff)
downloadgolang-c6596f656eb56d8e98114fdbd21faa913733e9e4.tar.gz
gc: distinguish fatal compiler bug from error+exit
R=ken2 CC=golang-dev http://codereview.appspot.com/902044
Diffstat (limited to 'src/cmd/gc/obj.c')
-rw-r--r--src/cmd/gc/obj.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/cmd/gc/obj.c b/src/cmd/gc/obj.c
index 12054645f..97786cd6e 100644
--- a/src/cmd/gc/obj.c
+++ b/src/cmd/gc/obj.c
@@ -12,8 +12,11 @@ void
dumpobj(void)
{
bout = Bopen(outfile, OWRITE);
- if(bout == nil)
- fatal("cant open %s", outfile);
+ if(bout == nil) {
+ flusherrors();
+ print("can't create %s: %r\n", outfile);
+ errorexit();
+ }
Bprint(bout, "%s\n", thestring);
Bprint(bout, " exports automatically generated from\n");