read_rtx tweek

Richard Henderson rth@cygnus.com
Thu Nov 4 13:41:00 GMT 1999


Cleans up the error reporting for bad modes that Dan Nicolaescu
(should have) seen in genrecog.

It also probably obviates Alexandre's patch from earlier, as these
calls to fatal were introduced with the last gcc2 merge.  Oh well.


r~


        * rtl.c (read_rtx): Use fatal_with_file_and_line not fatal.

Index: rtl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/rtl.c,v
retrieving revision 1.53
diff -c -p -d -r1.53 rtl.c
*** rtl.c	1999/11/04 19:51:48	1.53
--- rtl.c	1999/11/04 21:35:04
*************** Boston, MA 02111-1307, USA.  */
*** 28,33 ****
--- 28,34 ----
  #include "ggc.h"
  #include "obstack.h"
  #include "toplev.h"
+ 
  #define	obstack_chunk_alloc	xmalloc
  #define	obstack_chunk_free	free
  
*************** read_rtx (infile)
*** 923,929 ****
        }
  
    if (tmp_code == UNKNOWN)
!     fatal ("Unknown rtx read in rtl.read_rtx(). Code name was %s .", tmp_char);
  
    /* (NIL) stands for an expression that isn't there.  */
    if (tmp_code == NIL)
--- 924,930 ----
        }
  
    if (tmp_code == UNKNOWN)
!     fatal_with_file_and_line (infile, "unknown rtx code `%s'", tmp_char);
  
    /* (NIL) stands for an expression that isn't there.  */
    if (tmp_code == NIL)
*************** read_rtx (infile)
*** 951,958 ****
  	  break;
  
        if (j == MAX_MACHINE_MODE)
! 	fatal ("Unknown mode read in rtl.read_rtx(). Mode name was %s.",
! 	       tmp_char);
  
        PUT_MODE (return_rtx, (enum machine_mode) j);
      }
--- 952,958 ----
  	  break;
  
        if (j == MAX_MACHINE_MODE)
! 	fatal_with_file_and_line (infile, "unknown mode `%s'", tmp_char);
  
        PUT_MODE (return_rtx, (enum machine_mode) j);
      }


More information about the Gcc-patches mailing list