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]
Other format: [Raw text]

Re: bogus signed/unsigned warning


In message <Pine.LNX.4.44.0208261527110.32252-100000@subraumtor.thphy.uni-duess
eldorf.de>, Ansgar Esztermann writes:
 >Hello,
 >
 >this is my first submission, so if I mixed anything up with the 
 >formal process, please bear with me.
 >I would like to contribute more in the future. I gather that I need 
 >to sign a copyright assignment for that. Where do I get one, and whom 
 >do I send it to?
 >
 >As to the patch, I have also changed the appropriate testcases to no
 >longer expect failure.
 >Is this the proper approach, or should this be done at a later stage?
 >
 >Description:
 >gcc used to issue bogus warnings with -Wsign-compare if one of the 
 >operands was a statement expression. This caused testcases 10 and 12 in
 >gcc.dg/compare2.c to fail.
 >
 >ChangeLog:
 >2002-08-26  Ansgar Esztermann  <ansgar@thphy.uni-duesseldorf.de>
 >
 >        * fold-const.c (tree_expr_nonnegative_p): Handle statement 
 >		  expressions.
 >
 >		* gcc.dg/compare2.c Removed xfail from cases 10 and 12.
The problem I see with this patch is that it "pollutes" fold-const
with c-common.  

fold-const should be totally language independent.

One way to deal with this would be to have languages register a
routine to call when tree_expr_nonnegative_p encounters a node it
does not understand.

See gcc/langhooks*

jeff


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