diff options
-rw-r--r-- | gcc/cp/ChangeLog | 12 | ||||
-rw-r--r-- | gcc/cp/call.c | 7 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/parse/crash57.C | 10 |
4 files changed, 28 insertions, 6 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 24cfd3920e4..ea83f252f07 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2010-10-21 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/46117 + * call.c (add_function_candidate): Don't use TREE_VALUE on null + parmnode. + 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com> * parser.c (cp_parser_objc_method_type): Mark inline. Return a @@ -6,9 +12,9 @@ cp_parser_objc_method_type and to objc_build_method_signature. (cp_parser_objc_method_prototype_list): Updated calls to objc_add_method_declaration. Use token->type to determine if it - is a class method or not. + is a class method or not. (cp_parser_objc_method_definition_list): Same change. - + 2010-10-20 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com> PR c++/46056 @@ -20,7 +26,7 @@ * cp-lang.c (finish_file): Removed. * decl2.c (cp_write_global_declarations): Call objc_write_global_declarations when compiling Objective-C++. - + 2010-10-19 Paolo Carlini <paolo.carlini@oracle.com> PR c++/46046 diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 1ecc367e1c1..bdf97a2c239 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -1613,9 +1613,10 @@ add_function_candidate (struct z_candidate **candidates, /* Kludge: When looking for a function from a subobject while generating an implicit copy/move constructor/operator=, don't consider anything that takes (a reference to) an unrelated type. See c++/44909. */ - else if ((flags & LOOKUP_SPECULATIVE) - || (current_function_decl - && DECL_DEFAULTED_FN (current_function_decl))) + else if (parmlist + && ((flags & LOOKUP_SPECULATIVE) + || (current_function_decl + && DECL_DEFAULTED_FN (current_function_decl)))) { if (DECL_CONSTRUCTOR_P (fn)) i = 1; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b52798d5aa5..5e9b6a10989 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2010-10-21 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/46117 + * g++.dg/parse/crash57.C: New. + 2010-10-21 Uros Bizjak <ubizjak@gmail.com> H.J. Lu <hongjiu.lu@intel.com> diff --git a/gcc/testsuite/g++.dg/parse/crash57.C b/gcc/testsuite/g++.dg/parse/crash57.C new file mode 100644 index 00000000000..c6daf777eb9 --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/crash57.C @@ -0,0 +1,10 @@ +// PR c++/46117 + +struct A +{ + A (typename int); // { dg-error "before|declaration" } +}; + +struct B : A {}; + +B b; |