OSDN Git Service

* genautomata.c (write_automata): Include xstrerror output in the
authorbje <bje@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 18 Jan 2007 03:12:27 +0000 (03:12 +0000)
committerbje <bje@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 18 Jan 2007 03:12:27 +0000 (03:12 +0000)
error message if writing the DFA description file fails.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120891 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/genautomata.c

index 3cc70a1..81ffc51 100644 (file)
@@ -1,3 +1,8 @@
+2007-01-18  Ben Elliston  <bje@au.ibm.com>
+
+       * genautomata.c (write_automata): Include xstrerror output in the
+       error message if writing the DFA description file fails.
+
 2007-01-17  H.J. Lu  <hongjiu.lu@intel.com>
 
        * config/mips/mips-protos.h (mips_output_external): Make it
index e63df33..d4b94ca 100644 (file)
@@ -9234,8 +9234,8 @@ write_automata (void)
     {
       fflush (output_description_file);
       if (ferror (stdout) != 0)
-       fatal ("Error in writing DFA description file %s",
-               output_description_file_name);
+       fatal ("Error in writing DFA description file %s: %s",
+               output_description_file_name, xstrerror (errno));
       fclose (output_description_file);
     }
   finish_automaton_decl_table ();