diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-05 19:05:46 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-05 19:05:46 +0000 |
commit | 6b68e71ad8f9dc3c16f8a8b41929909bf4b7fd54 (patch) | |
tree | 5758b8cb24576b1e3eb71016f81cfeab25bbd494 /gcc/c-common.h | |
parent | 526171162c5a8611070563c2a4541daea790d31b (diff) | |
download | gcc-6b68e71ad8f9dc3c16f8a8b41929909bf4b7fd54.tar.gz |
./:
* c-common.c (decl_with_nonnull_addr_p): New function.
(c_common_truthvalue_conversion): Call it.
* c-typeck.c (build_binary_op): Likewise.
* c-common.h (decl_with_nonnull_addr_p): Declare.
cp/:
* typeck.c (build_binary_op): Warn about comparing a non-weak
address to NULL.
testsuite/:
* gcc.dg/Walways-true-1.c: New test.
* gcc.dg/Walways-true-2.c: New test.
* g++.dg/warn/Walways-true-1.C: New test.
* g++.dg/warn/Walways-true-2.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120493 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-common.h')
-rw-r--r-- | gcc/c-common.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/c-common.h b/gcc/c-common.h index b2b10bd2d7b..86b44870a57 100644 --- a/gcc/c-common.h +++ b/gcc/c-common.h @@ -652,6 +652,7 @@ extern tree c_common_unsigned_type (tree); extern tree c_common_signed_type (tree); extern tree c_common_signed_or_unsigned_type (int, tree); extern tree c_build_bitfield_integer_type (unsigned HOST_WIDE_INT, int); +extern bool decl_with_nonnull_addr_p (tree); extern tree c_common_truthvalue_conversion (tree); extern void c_apply_type_quals_to_decl (int, tree); extern tree c_sizeof_or_alignof_type (tree, bool, int); |