(build_binary_op): Warn for ordered compare of ptr with 0

only if pedantic in both cases.

From-SVN: r6039
This commit is contained in:
Richard Stallman 1993-11-08 21:51:20 +00:00
parent 0031ac5789
commit 840f571bf5

View File

@ -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