aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2000-12-13 12:49:56 -0500
committerDJ Delorie <dj@gcc.gnu.org>2000-12-13 12:49:56 -0500
commit8d3b081e507e40cd869991f50d3aa69af2bf6ee3 (patch)
tree4d825204cc6d736848469f84216d08b0f498f0cb /gcc
parent75444da78647e5721b21ef35ea99ea3aac56f46d (diff)
downloadgcc-8d3b081e507e40cd869991f50d3aa69af2bf6ee3.zip
gcc-8d3b081e507e40cd869991f50d3aa69af2bf6ee3.tar.gz
gcc-8d3b081e507e40cd869991f50d3aa69af2bf6ee3.tar.bz2
typeck.c (build_binary_op): Do signed/unsigned warnings for >?
* typeck.c (build_binary_op): Do signed/unsigned warnings for >? and <? operators. From-SVN: r38222
Diffstat (limited to 'gcc')
-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 0ef0b3d..724c7e0 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 762f552..6d12cbd 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));