This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: Add comment to explow.c
- From: Eric Christopher <echristo at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: 12 Feb 2002 01:47:50 -0800
- Subject: PATCH: Add comment to explow.c
Here's a patch to add an explanatory comment to explow.c. Alternately we
can add a check and abort, but I can't off hand think of a way that we
won't abort later on anyhow.
OK? Other thoughts?
-eric
--
I will not use abbrev.
2002-02-12 Eric Christopher <echristo@redhat.com>
* explow.c (hard_function_value): Add comment explaining
signed/unsigned comparison.
Index: explow.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/explow.c,v
retrieving revision 1.89
diff -u -p -w -r1.89 explow.c
--- explow.c 2002/02/04 17:58:08 1.89
+++ explow.c 2002/02/12 09:47:24
@@ -1603,6 +1603,10 @@ hard_function_value (valtype, func, outg
unsigned HOST_WIDE_INT bytes = int_size_in_bytes (valtype);
enum machine_mode tmpmode;
+ /* int_size_in_bytes can return -1. We don't need a check here
+ since the value of bytes will be large enough that no mode
+ will match and we will abort later in this function. */
+
for (tmpmode = GET_CLASS_NARROWEST_MODE (MODE_INT);
tmpmode != VOIDmode;
tmpmode = GET_MODE_WIDER_MODE (tmpmode))