This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix fold-const comparisons with 0x7fffffffU
- To: jakub at redhat dot com
- Subject: Re: [PATCH] Fix fold-const comparisons with 0x7fffffffU
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Mon, 02 Apr 2001 09:34:48 -0700
- Cc: kenner at vlsi1 dot ultra dot nyu dot edu, gcc-patches at gcc dot gnu dot org
- Organization: CodeSourcery, LLC
- References: <20010329234930.B557@sunsite.ms.mff.cuni.cz>
It seems to me that `signed_type' is doing the wrong in this case.
The comment above its definition says that it returns a signed type;
if it just returns the same unsigned pointer type, that's not right.
I would prefer that return error_mark_node, which would make it easier
to catch these kinds of problems in the future.
If we agree on this interface tightening, then we should not commit
your patch, but instead check the return value from signed_type, in
the `switch' statement just below your code.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com