summaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authordj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>2000-12-13 17:49:56 +0000
committerdj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>2000-12-13 17:49:56 +0000
commit45658a1501dd204722a28ac952f24235980e236f (patch)
tree4d825204cc6d736848469f84216d08b0f498f0cb /gcc/cp
parent14282c1a50bb8baa4213372d6b7f6e3ab1b43433 (diff)
downloadgcc-45658a1501dd204722a28ac952f24235980e236f.tar.gz
* typeck.c (build_binary_op): Do signed/unsigned warnings for >?
and <? operators. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38222 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/typeck.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 0ef0b3d4481..724c7e098c4 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2000-12-11 DJ Delorie <dj@redhat.com>
+
+ * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
+ and <? operators.
+
2000-12-08 Jason Merrill <jason@redhat.com>
* 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));