This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [PATCH] Fix fold-const comparisons with 0x7fffffffU



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]