OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1069611
)
(build_binary_op): Warn for ordered compare of ptr with 0
author
rms
<rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 8 Nov 1993 21:51:20 +0000
(21:51 +0000)
committer
rms
<rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 8 Nov 1993 21:51:20 +0000
(21:51 +0000)
only if pedantic in both cases.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6039
138bc75d
-0d04-0410-961f-
82ee72b054a4
gcc/c-typeck.c
patch
|
blob
|
history
diff --git
a/gcc/c-typeck.c
b/gcc/c-typeck.c
index
410e10d
..
6cd52c5
100644
(file)
--- 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