diff options
author | matz <matz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-02 04:22:45 +0000 |
---|---|---|
committer | matz <matz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-02 04:22:45 +0000 |
commit | ae84079f60ba4b17406aa3cdf1eae1cea010ffe7 (patch) | |
tree | 81e0ec0700839598638506aadcfb471636db87e6 /gcc/cp/lex.c | |
parent | 0dc02c83cfce5adc2119ed59f21c228aa392a606 (diff) | |
download | gcc-ae84079f60ba4b17406aa3cdf1eae1cea010ffe7.tar.gz |
PR c++/19542
* c-common.c (c_common_nodes_and_builtins): Create global null_node.
(warn_strict_null_sentinel): Define.
(check_function_sentinel): Check for null_node as valid sentinel too.
* c-common.h (c_tree_index): Added CTI_NULL.
(null_node) Define global_tree[CTI_NULL].
(warn_strict_null_sentinel): Declare.
* c-opts.c: (c_common_handle_option): Handle -Wstrict-null-sentinel.
* c.opt: (Wstrict-null-sentinel): New C++ option.
* doc/invoke.texi (C++ Options): Document -Wstrict-null-sentinel.
* cp-tree.h (cp_tree_index): Remove CPTI_NULL, to be defined in C
common frontend.
(null_node): Remove.
* lex.c (cxx_init): Move null_node initialisation to C common frontend.
* g++.dg/warn/sentinel.C: New testcase for __null sentinels added.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99091 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/lex.c')
-rw-r--r-- | gcc/cp/lex.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index c5f21d1b195..04f648fddc8 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -347,11 +347,6 @@ cxx_init (void) cxx_init_decl_processing (); - /* Create the built-in __null node. It is important that this is - not shared. */ - null_node = make_node (INTEGER_CST); - TREE_TYPE (null_node) = c_common_type_for_size (POINTER_SIZE, 0); - /* The fact that G++ uses COMDAT for many entities (inline functions, template instantiations, virtual tables, etc.) mean that it is fundamentally unreliable to try to make decisions |