diff options
author | Ian Lance Taylor <iant@google.com> | 2007-01-05 19:05:46 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2007-01-05 19:05:46 +0000 |
commit | b3c6d2ea006d4c688964c044a081ddea7884148a (patch) | |
tree | 5758b8cb24576b1e3eb71016f81cfeab25bbd494 /gcc/c-common.h | |
parent | 97af925ba7b16e64c9f8b48cbfd5b4ccaa905f36 (diff) | |
download | gcc-b3c6d2ea006d4c688964c044a081ddea7884148a.zip gcc-b3c6d2ea006d4c688964c044a081ddea7884148a.tar.gz gcc-b3c6d2ea006d4c688964c044a081ddea7884148a.tar.bz2 |
c-common.c (decl_with_nonnull_addr_p): New function.
./: * 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.
From-SVN: r120493
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 b2b10bd..86b4487 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); |