rusty@GARNET.BERKELEY.EDU (12/08/89)
Here are patches for fixing functions that fall off the end. I did
this last night when I woke up and couldn't get back to sleep; I just
compiled gcc on a sparcstation with gcc -W and then eyeballed the
warnings and fixed the code as necessary (for a few it entailed adding
an abort() but for most it simply consisted of adding a
/*NOTREACHED*/). This is simple (although tedious) enough that it
seems to me that this ought to be done before each release of gcc.
diff -r -c gcc-1.36-old/c-typeck.c gcc-1.36/c-typeck.c
*** gcc-1.36-old/c-typeck.c Thu Aug 24 14:44:57 1989
--- gcc-1.36/c-typeck.c Thu Dec 7 03:46:06 1989
***************
*** 561,566 ****
--- 561,567 ----
if (mode == TYPE_MODE (long_double_type_node))
return long_double_type_node;
abort ();
+ /* NOTREACHED */
}
tree
diff -r -c gcc-1.36-old/caller-save.c gcc-1.36/caller-save.c
*** gcc-1.36-old/caller-save.c Wed Feb 22 08:50:12 1989
--- gcc-1.36/caller-save.c Thu Dec 7 03:52:30 1989
***************
*** 353,356 ****
--- 353,357 ----
return HImode;
else
abort ();
+ /* NOTREACHED */
}
diff -r -c gcc-1.36-old/cccp.c gcc-1.36/cccp.c
*** gcc-1.36-old/cccp.c Mon Sep 11 20:43:13 1989
--- gcc-1.36/cccp.c Thu Dec 7 03:56:52 1989
***************
*** 1054,1059 ****
--- 1054,1060 ----
perror:
pfatal_with_name (in_fname);
+ /* NOTREACHED */
}
/* Pre-C-Preprocessor to translate ANSI trigraph idiocy in BUF
***************
*** 4799,4804 ****
--- 4800,4807 ----
return 0;
line1 = instack[i].lineno;
}
+ abort ();
+ /* NOTREACHED */
}
/*
Common subdirectories: gcc-1.36-old/config and gcc-1.36/config
diff -r -c gcc-1.36-old/emit-rtl.c gcc-1.36/emit-rtl.c
*** gcc-1.36-old/emit-rtl.c Wed Sep 20 21:33:11 1989
--- gcc-1.36/emit-rtl.c Thu Dec 7 03:50:00 1989
***************
*** 410,415 ****
--- 410,416 ----
}
else
abort ();
+ /* NOTREACHED */
}
/* Like `gen_lowpart', but refer to the most significant part. */
***************
*** 449,454 ****
--- 450,456 ----
}
else
abort ();
+ /* NOTREACHED */
}
/* Return 1 iff X, assumed to be a SUBREG,
diff -r -c gcc-1.36-old/expr.c gcc-1.36/expr.c
*** gcc-1.36-old/expr.c Sun Sep 17 22:52:16 1989
--- gcc-1.36/expr.c Thu Dec 7 03:48:09 1989
***************
*** 1089,1094 ****
--- 1089,1095 ----
#endif
else
abort ();
+ /* NOTREACHED */
}
/* Pushing data onto the stack. */
***************
*** 3386,3391 ****
--- 3387,3393 ----
default:
abort ();
}
+ /* NOTREACHED */
}
/* Expand code for a post- or pre- increment or decrement
diff -r -c gcc-1.36-old/gcc.c gcc-1.36/gcc.c
*** gcc-1.36-old/gcc.c Sun Sep 17 13:51:58 1989
--- gcc-1.36/gcc.c Thu Dec 7 03:45:08 1989
***************
*** 740,745 ****
--- 740,746 ----
/* Return child's process number. */
return pid;
}
+ /* NOTREACHED */
}
/* Execute the command specified by the arguments on the current line of spec.
diff -r -c gcc-1.36-old/loop.c gcc-1.36/loop.c
*** gcc-1.36-old/loop.c Sat Sep 9 21:48:44 1989
--- gcc-1.36/loop.c Thu Dec 7 03:50:22 1989
***************
*** 4383,4388 ****
--- 4383,4389 ----
default:
abort ();
}
+ /* NOTREACHED */
}
diff -r -c gcc-1.36-old/recog.c gcc-1.36/recog.c
*** gcc-1.36-old/recog.c Sat Aug 5 21:12:48 1989
--- gcc-1.36/recog.c Thu Dec 7 03:53:30 1989
***************
*** 851,856 ****
--- 851,857 ----
return gen_rtx (MEM, GET_MODE (op), plus_constant (y, offset));
}
abort ();
+ /* NOTREACHED */
}
#ifdef REGISTER_CONSTRAINTS
diff -r -c gcc-1.36-old/reload1.c gcc-1.36/reload1.c
*** gcc-1.36-old/reload1.c Sat Sep 16 17:16:41 1989
--- gcc-1.36/reload1.c Thu Dec 7 03:52:00 1989
***************
*** 1774,1779 ****
--- 1774,1781 ----
case RELOAD_FOR_OPERAND_ADDRESS:
return ! reload_reg_in_use_for_operands[regno];
}
+ abort ();
+ /* NOTREACHED */
}
/* Return 1 if the value in reload reg REGNO, as used by a reload
***************
*** 1803,1808 ****
--- 1805,1812 ----
case RELOAD_FOR_INPUT_RELOAD_ADDRESS:
return 1;
}
+ abort ();
+ /* NOTREACHED */
}
/* Return 1 if the value in reload reg REGNO, as used by a reload
***************
*** 1832,1837 ****
--- 1836,1843 ----
case RELOAD_FOR_OUTPUT_RELOAD_ADDRESS:
return 1;
}
+ abort ();
+ /* NOTREACHED */
}
/* Vector of reload-numbers showing the order in which the reloads should
diff -r -c gcc-1.36-old/tree.c gcc-1.36/tree.c
*** gcc-1.36-old/tree.c Sun Aug 6 14:35:29 1989
--- gcc-1.36/tree.c Thu Dec 7 03:47:09 1989
***************
*** 1745,1750 ****
--- 1745,1751 ----
default:
abort ();
}
+ /* NOTREACHED */
}
/* Constructors for pointer, array and function types.
Common subdirectories: gcc-1.36-old/config/SCCS and gcc-1.36/config/SCCS
diff -r -c gcc-1.36-old/config/out-sparc.c gcc-1.36/config/out-sparc.c
*** gcc-1.36-old/config/out-sparc.c Wed Sep 6 00:54:34 1989
--- gcc-1.36/config/out-sparc.c Thu Dec 7 03:54:50 1989
***************
*** 916,921 ****
--- 916,922 ----
}
}
else abort ();
+ /* NOTREACHED */
}
/* Return a REG that occurs in ADDR with coefficient 1.
***************
*** 941,946 ****
--- 942,948 ----
if (GET_CODE (addr) == REG)
return addr;
abort ();
+ /* NOTREACHED */
}
void
***************
*** 1036,1041 ****
--- 1038,1044 ----
if (GET_CODE (operands[0]) == REG)
return "[%%g1+%%lo(%m1)],%0";
abort ();
+ /* NOTREACHED */
}
/* Output a floating-point load-from-memory whose operands are OPERANDS[0,1].