diff options
author | Volker Reichelt <reichelt@igpm.rwth-aachen.de> | 2006-04-19 17:36:59 +0000 |
---|---|---|
committer | Volker Reichelt <reichelt@gcc.gnu.org> | 2006-04-19 17:36:59 +0000 |
commit | b815a6316cbd95ebdd3f049627db5932efc9c9b7 (patch) | |
tree | 1b1b416ba12653ba3a4a4523b30deb456d8b744f /gcc/cp | |
parent | d149fba0ff511eda85cb47a630ffc499ea5a8756 (diff) | |
download | gcc-b815a6316cbd95ebdd3f049627db5932efc9c9b7.zip gcc-b815a6316cbd95ebdd3f049627db5932efc9c9b7.tar.gz gcc-b815a6316cbd95ebdd3f049627db5932efc9c9b7.tar.bz2 |
re PR c++/26036 (Treating a class object as a function with member variables causes hang)
PR c++/26036
* typeck.c (convert_arguments): Return error_mark_node instead of
error_mark_list.
* cp-tree.h (error_mark_list): Remove declaration.
* decl.c (error_mark_list): Remove definition.
(cxx_init_decl_processing): Do not initialize error_mark_list.
* g++.dg/expr/call3.C: New test.
From-SVN: r113087
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/cp/cp-tree.h | 4 | ||||
-rw-r--r-- | gcc/cp/decl.c | 6 | ||||
-rw-r--r-- | gcc/cp/typeck.c | 2 |
4 files changed, 8 insertions, 11 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 27d31ba..aa5b60e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,12 @@ 2006-04-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de> + PR c++/26036 + * typeck.c (convert_arguments): Return error_mark_node instead of + error_mark_list. + * cp-tree.h (error_mark_list): Remove declaration. + * decl.c (error_mark_list): Remove definition. + (cxx_init_decl_processing): Do not initialize error_mark_list. + PR c++/10385 * rtti.c (build_dynamic_cast_1): Check for invalid conversions before calling convert_to_reference. diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index f82ab32..0848747 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -3184,10 +3184,6 @@ typedef enum base_kind { binfo. */ } base_kind; -/* in decl{2}.c */ -/* A node that is a list (length 1) of error_mark_nodes. */ -extern GTY(()) tree error_mark_list; - /* Node for "pointer to (virtual) function". This may be distinct from ptr_type_node so gdb can distinguish them. */ #define vfunc_ptr_type_node vtable_entry_type diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 9e101c1..215371a 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -106,9 +106,6 @@ static void initialize_local_var (tree, tree); static void expand_static_init (tree, tree); static tree next_initializable_field (tree); -/* Erroneous argument lists can use this *IFF* they do not modify it. */ -tree error_mark_list; - /* The following symbols are subsumed in the cp_global_trees array, and listed here individually for documentation purposes. @@ -3118,9 +3115,6 @@ cxx_init_decl_processing (void) /* Initially, C. */ current_lang_name = lang_name_c; - error_mark_list = build_tree_list (error_mark_node, error_mark_node); - TREE_TYPE (error_mark_list) = error_mark_node; - /* Create the `std' namespace. */ push_namespace (std_identifier); std_node = current_namespace; diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 6ee84a1..a7bdd55 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -2787,7 +2787,7 @@ convert_arguments (tree typelist, tree values, tree fndecl, int flags) } else error ("too few arguments to function"); - return error_mark_list; + return error_mark_node; } } |