From 8d3b081e507e40cd869991f50d3aa69af2bf6ee3 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Wed, 13 Dec 2000 12:49:56 -0500 Subject: [PATCH] typeck.c (build_binary_op): Do signed/unsigned warnings for >? * typeck.c (build_binary_op): Do signed/unsigned warnings for >? and + + * typeck.c (build_binary_op): Do signed/unsigned warnings for >? + and * error.c (dump_function_name): Don't let the user see __comp_ctor. diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 762f552caac..6d12cbd3262 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -3921,7 +3921,8 @@ build_binary_op (code, orig_op0, orig_op1, convert_p) resultcode = xresultcode; } - if (short_compare && warn_sign_compare) + if ((short_compare || code == MIN_EXPR || code == MAX_EXPR) + && warn_sign_compare) { int op0_signed = ! TREE_UNSIGNED (TREE_TYPE (orig_op0)); int op1_signed = ! TREE_UNSIGNED (TREE_TYPE (orig_op1));