aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-common.h
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-01-05 19:05:46 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2007-01-05 19:05:46 +0000
commitb3c6d2ea006d4c688964c044a081ddea7884148a (patch)
tree5758b8cb24576b1e3eb71016f81cfeab25bbd494 /gcc/c-common.h
parent97af925ba7b16e64c9f8b48cbfd5b4ccaa905f36 (diff)
downloadgcc-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.h1
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);