On Fri, Jan 30, 2015 at 12:52 AM, Joseph Myers <jos...@codesourcery.com> wrote:
>
> Ian: this patch does *not* change go/gofrontend/go.cc; you'll need to
> update that (such an update is of course best done before this patch
> goes in; since the overload currently exists, updating it does not
> depend on this patch).  I thought the go/gofrontend/ code wasn't
> supposed to use GCC-specific interfaces like that directly any more?

I've committed this patch to fix the problem for the Go frontend.
You're right: the Go frontend is not supposed to depend on GCC code in
this way.  It still does for error_at and this one call to
fatal_error.  These may be the last thing we need to fix--at least, I
can't think of anything else.

Ian
diff -r ff40d0d71cce go/go.cc
--- a/go/go.cc  Fri Jan 30 07:56:16 2015 -0800
+++ b/go/go.cc  Fri Jan 30 08:03:27 2015 -0800
@@ -63,7 +63,8 @@
        {
          file = fopen(filename, "r");
          if (file == NULL)
-           fatal_error("cannot open %s: %m", filename);
+           fatal_error(Linemap::unknown_location(),
+                       "cannot open %s: %m", filename);
        }
 
       Lex lexer(filename, file, ::gogo->linemap());

Reply via email to