Commit 840f571b by Richard Stallman

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

only if pedantic in both cases.

From-SVN: r6039
parent 0031ac57
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment