From 840f571bf524a1d708c3c24f5ab6d3d8c9f1cbc6 Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Mon, 8 Nov 1993 21:51:20 +0000 Subject: [PATCH] (build_binary_op): Warn for ordered compare of ptr with 0 only if pedantic in both cases. From-SVN: r6039 --- gcc/c-typeck.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 410e10d0c8f..6cd52c5e7bf 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -2211,7 +2211,7 @@ build_binary_op (code, orig_op0, orig_op1, convert_p) { result_type = integer_type_node; op1 = null_pointer_node; - if (! flag_traditional) + if (pedantic) pedwarn ("ordered comparison of pointer with integer zero"); } else if (code1 == POINTER_TYPE && TREE_CODE (op0) == INTEGER_CST -- 2.30.2