summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite/g++.dg/parse
Commit message (Collapse)AuthorAgeFilesLines
...
* 2005-08-10 James A. Morrison <phython@gcc.gnu.org>phython2005-08-111-0/+9
| | | | | | | | PR c++/23225 * tree.c (build_pointer_type_for_mode): Robustify. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102977 138bc75d-0d04-0410-961f-82ee72b054a4
* 2005-08-05 James A. Morrison <phython@gcc.gnu.org>phython2005-08-061-0/+13
| | | | | | | | | PR c++/22514 * name-lookup.c (cp_emit_debug_info_for_using): Do nothing if sorrycount or errorcount are nonzero. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102799 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/21929nathan2005-06-141-1/+1
| | | | | | | * g++.dg/parse/crash11.C: Update git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100939 138bc75d-0d04-0410-961f-82ee72b054a4
* cp:nathan2005-06-131-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | PR c++/20789 * decl.c (cp_finish_decl): Clear runtime runtime initialization if in-class decl's initializer is bad. PR c++/21929 * parser.c (struct cp_parser): Document that scope could be error_mark. (cp_parser_diagnose_invalid_type_name): Cope with error_mark for scope. (cp_parser_nested_name_specifier): Return NULL_TREE on error. (cp_parser_postfix_expression): Deal with null or error_mark scope. (cp_parser_elaborated_type_specifier): Adjust cp_parser_nested_name_specifier call. * parser (cp_parser_skip_to_end_of_block_or_statement): Cleanup. testsuite: PR c++/21929 * g++.dg/parse/crash26.C: New. PR c++/20789 * g++.dg/init/member1.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100880 138bc75d-0d04-0410-961f-82ee72b054a4
* cp:nathan2005-06-071-0/+11
| | | | | | | | | | * parser.c (cp_parser_late_parsing_default_args): Fix overeager assert in previous patch. testsuite: * g++.dg/parse/defarg10.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100702 138bc75d-0d04-0410-961f-82ee72b054a4
* cp:nathan2005-06-061-0/+20
| | | | | | | | | | | | | | PR 21903 * cp-tree.def (DEFAULT_ARG): Document TREE_CHAIN use. * parser.c (cp_parser_late_parsing_default_args): Propagate parsed argument to any early instantiations. * pt.c (tsubst_arg_types): Chain early instantiation of default arg. testsuite: PR 21903 * g++.dg/parse/defarg9.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100669 138bc75d-0d04-0410-961f-82ee72b054a4
* cp:nathan2005-05-271-0/+15
| | | | | | | | | | | | PR c++/21681 * parser.c (cp_parser_late_parsing_for_member): Disable access checking for template functions. testsuite: PR c++/21681 * g++.dg/parse/template16.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100252 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/21495jakub2005-05-191-0/+14
| | | | | | | | | | | * decl.c (grokdeclarator): Fix "storage class specified for" error reporting. * g++.dg/parse/extern1.C: New test. * g++.dg/tls/diag-2.C: Adjust expected error message wording. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99960 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/20905mmitchel2005-04-081-0/+14
| | | | | | | | | | | | | | | | | | | * parser.c (cp_parser_type_specifier_seq): Add is_condition parameter. (cp_parser_new_type_id): Pass it. (cp_parser_condition): Likewise. (cp_parser_conversion_type_id): Likewise. (cp_parser_type_id): Likewise. (cp_parser_type_specifier_seq): In a condition, do not allow invalid type-specifier combinations. (cp_parser_exception_declaration): Adjust call to cp_parser_type_specifier_seq. PR c++/20905 * g++.dg/parse/cond2.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97857 138bc75d-0d04-0410-961f-82ee72b054a4
* * g++.dg/parse/repo1.C: Use cleanup-repo-files.janis2005-03-311-0/+2
| | | | | | | | | | | | | | | * g++.dg/template/repo1.C: Ditto. * g++.dg/template/repo2.C: Ditto. * g++.dg/template/repo3.C: Ditto. * g++.old-deja/g++.pt/instantiate4.C: Ditto. * g++.old-deja/g++.pt/instantiate6.C: Ditto. * g++.old-deja/g++.pt/repo1.C: Ditto. * g++.old-deja/g++.pt/repo2.C: Ditto. * g++.old-deja/g++.pt/repo3.C: Ditto. * g++.old-deja/g++.pt/repo4.C: Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97339 138bc75d-0d04-0410-961f-82ee72b054a4
* cp:nathan2005-03-311-3/+12
| | | | | | | | | | | | | | | | | | | | | | PR c++/19203, implement DR 214 * call.c (joust): Use more_specialized_fn. * cp-tree.h (DEDUCE_ORDER): Remove. (more_specialized): Replace with ... (more_specialized_fn): ... this. * pt.c (maybe_adjust_types_for_deduction): Remove DEDUCE_ORDER case. (type_unification_real): Remove DEDUCE_ORDER case. (more_specialized): Replace with ... (more_specialized_fn): ... this. Implement DR 214. (most_specialized_instantiation): Use get_bindings_real directly. testsuite: PR c++/19203, DR 214 * g++.dg/parse/ambig3.C: Not ambiguous. * g++.dg/template/spec20.C: New. * g++.dg/template/spec21.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97336 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/20499reichelt2005-03-221-2/+2
| | | | | | | | | | * parser.c (cp_parser_class_head): Return NULL_TREE when encountering a redefinition. * g++.dg/parse/error16.C: Tweak error markers. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96870 138bc75d-0d04-0410-961f-82ee72b054a4
* 2005-03-21 Paolo Carlini <pcarlini@suse.de>paolo2005-03-211-1/+1
| | | | | | | * g++.dg/parse/crash25.C: Fix typo. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96795 138bc75d-0d04-0410-961f-82ee72b054a4
* 2005-03-21 Paolo Carlini <pcarlini@suse.de>paolo2005-03-212-0/+16
| | | | | | | | | | | | | | | | PR c++/20461 * g++.dg/parse/crash24.C: New test. PR c++/20536 * g++.dg/parse/crash25.C: New test. 2005-03-21 Paolo Carlini <pcarlini@suse.de> PR c++/20147 * g++.dg/ext/stmtexpr4.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96785 138bc75d-0d04-0410-961f-82ee72b054a4
* * g++.dg/other/cv_func.C, g++.dg/other/offsetof3.C,jsm282005-03-151-1/+1
| | | | | | | | | | g++.dg/parse/error11.C, g++.dg/tc1/dr108.C, g++.dg/template/local4.C, g++.dg/template/nontype6.C, g++.dg/warn/deprecated.C: Ensure uniqueness of test assertion names. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96463 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/19991mmitchel2005-02-233-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * init.c (integral_constant_value): Iterate if the value of a decl is itself a constant. PR c++/20152 * parser.c (cp_parser_class_head): Check for redefintions here. * semantics.c (begin_class_definition): Not here. PR c++/20153 * decl2.c (build_anon_union_vars): Add type parameter. (finish_anon_union): Pass it. PR c++/20148 * error.c (dump_expr): Do not print the body of a BIND_EXPR. Handle STATEMENT_LIST. PR c++/19991 * g++.dg/parse/constant7.C: New test. PR c++/20152 * g++.dg/parse/error27.C: New test. * g++.dg/template/qualttp15.C: Adjust error markers. * g++.old-deja/g++.other/struct1.C: Likewise. PR c++/20153 * g++.dg/template/error17.C: New test. PR c++/20148 * g++.dg/parser/error26.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95438 138bc75d-0d04-0410-961f-82ee72b054a4
* * parser.c (cp_parser_direct_declarator): Always complain aboutmmitchel2005-02-221-0/+23
| | | | | | | | | non-constant array bounds when in a function scope. * semantics.c (finish_id_expression): Do not mark dependent names as non-constant. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95417 138bc75d-0d04-0410-961f-82ee72b054a4
* cp:nathan2005-02-141-0/+14
| | | | | | | | | | | | PR c++/19608 * parser.c (cp_parser_late_parsing_for_member): Use current_function_decl as scope to push to and from. testsuite: PR c++/19608 * g++.dg/parse/local-class1.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95036 138bc75d-0d04-0410-961f-82ee72b054a4
* cp:nathan2005-02-141-0/+11
| | | | | | | | | | | | | | | | | | | | | | PR c++/19884 * pt.c (check_explicit_specialization): Make sure namespace binding lookup found an overloaded function. (lookup_template_function): Just assert FNS is an overloaded function. PR c++/19895 * decl.c (grokdeclarator): Check for error mark node in ptrmem construction. testsuite: PR c++/19895 * g++.dg/parse/ptrmem3.C: New. PR c++/19884 * g++.old-deja/g++.oliva/template6.C: Add another case. * g++.dg/template/explicit6.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95009 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/19787mmitchel2005-02-101-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * call.c (initialize_reference): Robustify. PR ++/19732 * decl.c (grokdeclarator): Check for invalid use of destructor names. PR c++/19762 * parser.c (cp_parser_unqualified_id): Avoid creating destructor names with invalid types. PR c++/19826 * parser.c (cp_parser_direct_declarator): Allow type-dependent expressions as array bounds. PR c++/19739 * parser.c (cp_parser_attributes_list): Allow empty lists. PR c++/19787 * g++.dg/conversion/ambig1.C: New test. PR c++/19739 * g++.dg/ext/attrib19.C: New test. PR c++/19732 * g++.dg/parse/dtor5.C: New test. PR c++/19762 * g++.dg/template/dtor3.C: New test. PR c++/19826 * g++.dg/template/static11.C: New test. * g++.dg/template/crash2.C: Remove dg-error marker. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94788 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/19733mmitchel2005-02-091-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * class.c (add_method): Don't set TYPE_HAS_DESTRUCTOR. (check_bases): Give warnings about a base class with a non-virtual destructor, even if it is implicit. (finish_struct_bits): Don't copy TYPE_HAS_DESTRUCTOR. (maybe_warn_about_overly_private_class): Don't use TYPE_HAS_DESTRUCTOR. (finish_struct_methods): Don't set TYPE_HAS_DESTRUCTOR. (check_for_override): Give it external linkage. (add_implicitly_declared_members): Generate destructors lazily. (check_field_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not TYPE_HAS_DESTRUCTOR. (check_bases_and_members): Call check_methods before check_field_decls. (check_bases_and_members): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not TYPE_HAS_DESTRUCTOR. (finish_struct_1): Do not use TYPE_HAS_DESTRUCTOR. * cp-tree.def (PSEUDO_DTOR_EXPR): Document. * cp-tree.h (TYPE_HAS_DESTRUCTOR): Remove. (lang_type_class): Add lazy_destructor. (CLASSTYPE_LAZY_DESTRUCTOR): New macro. (CLASSTYPE_DESTRUCTORS): Robustify. (TYPE_HAS_DESTRUCTOR): Remove. (check_for_override): Declare. (build_vbase_delete): Remove. * cvt.c (convert_to_void): Issue errors about pseudo-destructor expressions. * decl.c (cxx_maybe_build_cleanup): Remove dead code. * except.c (dtor_nothrow): Lazily create destructors if necessary. (build_throw): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. * init.c (build_delete): Lazily create destructors, if necessary. (build_vbase_delete): Remove. * method.c (locate_dtor): Simplify. (implicitly_declare_fn): Add support for destructors. * parser.c (cp_parser_lookup_name): Lazily create destructors, if necessary. * pt.c (check_explicit_specialization): Don't use TYPE_HAS_DESTRUCTOR. (instantiate_class_template): Likewise. * ptree.c (cxx_print_type): Don't print TYPE_HAS_DESTRUCTOR. * rtti.c (emit_support_tinfos): Robustify. * search.c (lookup_fnfields_1): Lazily create destructors. * typeck.c (build_class_member_access_expr): Remove PSEUDO_DTOR_EXPR handling. (lookup_destructor): Likewise. PR c++/19733 * g++.dg/parse/crash23.C: New test. * g++.dg/warn/Weff1.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94759 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/17401giovannibajo2005-02-031-0/+16
| | | | | | | | | | | | | | * parser.c (cp_parser_pure_specifier): Emit a specific error message with an invalid pure specifier. * decl2.c (grok_function_init): Remove. (grokfield): An initializer for a method is a always a pure specifier. PR c++/17401 * g++.dg/parse/error25.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94656 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/cp/ChangeLog:aoliva2005-02-011-6/+6
| | | | | | | | | | | | | | | PR c++/18757 PR c++/19366 PR c++/19499 * parser.c (cp_parser_template_id): Revert 2004-12-09's patch. Issue an error when creating the template id. * pt.c (fn_type_unification): Return early if the explicit template arg list is an error_mark_node. gcc/testsuite/ChangeLog: * g++.dg/parse/typename7.C: Adjust error messages. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94520 138bc75d-0d04-0410-961f-82ee72b054a4
* * decl.c (build_enumerator): Do not issue duplicate error messagesmmitchel2005-02-011-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | about invalid enumeration constants. * parser.c (cp_parser_non_integral_constant_expression): Always set parser->non_integral_constant_expression_p. (cp_parser_primary_expression): Add cast_p parameter. Issue errors about invalid uses of floating-point literals in cast-expressions. (cp_parser_postfix_expression): Add cast_p parameter. (cp_parser_open_square_expression): Pass it. (cp_parser_parenthesized_expression_list): Add cast_p parameter. (cp_parser_unary_expression): Likewise. (cp_parser_new_placement): Pass it. (cp_parser_direct_new_declarator): Likewise. (cp_parser_new_initializer): Likewise. (cp_parser_cast_expression): Add cast_p parameter. (cp_parser_binary_expression): Likewise. (cp_parser_question_colon_clause): Likewise. (cp_parser_assignment_expression): Likewise. (cp_parser_expression): Likewise. (cp_parser_constant_expression): If an integral constant expression is invalid, return error_mark_node. (cp_parser_expression_statement): Pass cast_p. (cp_parser_condition): Likewise. (cp_parser_iteration_statement): Likewise. (cp_parser_jump_statement): Likewise. (cp_parser_mem_initializer): Likewise. (cp_parser_template_argument): Likewise. (cp_parser_parameter_declaration): Likewise. (cp_parser_initializer): Likewise. (cp_parser_throw_expression): Likewise. (cp_parser_attribute_list): Likewise. (cp_parser_simple_cast_expression): Likewise. (cp_parser_functional_cast): Likewise. (cp_parser_late_parsing_default_args): Likewise. (cp_parser_sizeof_operand): Save/restore non_integral_constant_expression_p. * include/std/std_limits.h (numeric_limits<float>::has_denorm): Add required cast. (numeric_limits<double>::has_denorm): Likewise. (numeric_limits<long double>::has_denorm): Likewise. * g++.dg/other/warning1.C: Adjust error messags. * g++.dg/parse/constant5.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94512 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/19395mmitchel2005-01-311-0/+7
| | | | | | | | | | | | | | | | | | * decl.c (grokdeclarator): Refactor code so that qualified names are never allowed as the declarator in a typedef. PR c++/19367 * name-lookup.c (do_nonmember_using_decl): Avoid overloading builtin declarations. PR c++/19395 * g++.dg/parse/error24.C: New test. PR c++/19367 * g++.dg/lookup/builtin1.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94466 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/19244mmitchel2005-01-061-0/+4
| | | | | | | | | | | | | | | | | * class.c (add_implicitly_declared_members): Remove dead code. * decl.c (grokfndecl): Add sfk parameter. Use it do set DECL_CONSTRUCTOR_P. (grokdeclarator): Adjust calls to grokfndecl. * method.c (implicitly_declare_fn): Improve documentation. * parser.c (cp_parser_direct_declarator): Do not consider a function to be a constructor if the containing class was originally anonymous. PR c++/19244 * g++.dg/parser/ctor2.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@93004 138bc75d-0d04-0410-961f-82ee72b054a4
* cp:nathan2005-01-051-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | PR c++/19030 * cp-tree.h (start_decl): Take pointer to pushed scope, not bool. * name-lookup.h (push_scope): Return pushed scope, not flag. * name-lookup.c (push_scope): Return scope that should be popped, not a flag. * decl.c (start_decl): Adjust. (grokfndecl): Adjust scope push and pop. * decl2.c (check_classfn): Likewise. * parser.c (cp_parser_condition, cp_parser_conversion_function_id, cp_parser_init_declarator, cp_parser_direct_declarator, cp_parser_class_specifier, cp_parser_class_head, cp_parser_lookup_name, cp_parser_constructor_declarator_p): Likewise. * pt.c (instantiate_class_template, resolve_typename_type): Likewise. testsuite: PR c++/19030 * g++.dg/parse/crash22.C: New git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92946 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/19149mmitchel2004-12-271-0/+7
| | | | | | | | | | * decl.c (check_tag_decl): Robustify. PR c++/19149 * g++.dg/parse/error23.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92648 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/17595mmitchel2004-12-231-0/+8
| | | | | | | | | | | * parser.c (cp_parser_error): Issue better messages about #pragma in locations where it is not permitted. PR c++/17595 * g++.dg/parse/pragma2.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92573 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/18738mmitchel2004-12-151-1/+1
| | | | | | | | | | | | | | | | | | * decl.c (make_typename_type): Do not handle namespace-scoped names here. (tag_name): Handle typename_type. (check_elaborated_type_specifier): Handle typenames. * parser.c (cp_parser_diagnose_invalid_type_name): Improve comment. (cp_parser_elaborated_type_specifier): Use cp_parser_diagnose_invalid_type_name. PR c++/18738 * g++.dg/template/typename8.C: New test. * g++.dg/parse/friend2.C: Tweak error message. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92172 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/18731reichelt2004-12-103-0/+21
| | | | | | | | | | | * parser.c (cp_parser_class_head): Reject typedef-name in class head. * g++.dg/parser/struct-1.C: New test. * g++.dg/parser/struct-2.C: New test. * g++.dg/parser/struct-3.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91993 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/cp/ChangeLog:aoliva2004-12-092-1/+32
| | | | | | | | | | | | PR c++/18757 * parser.c (cp_parser_template_id): Don't create a CPP_TEMPLATE_ID if parsing failed. gcc/testsuite/ChangeLog: * g++.dg/parse/typename5.C: Adjust for new error. * g++.dg/parse/typename7.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91935 138bc75d-0d04-0410-961f-82ee72b054a4
* cp:nathan2004-12-031-0/+11
| | | | | | | | | | | | PR c++/18782 * decl.c (grokdeclarator): Make sure class in pointer to member is not a namespace. testsuite: PR c++/18782 * g++.dg/parse/ptrmem2.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91681 138bc75d-0d04-0410-961f-82ee72b054a4
* cp:nathan2004-12-021-0/+7
| | | | | | | | | | | | PR c++/18758 * parser.c (cp_parser_class_head): Return NULL_TREE when push_template_decl fails. Update comment. testsuite: PR 18758 * g++.dg/parse/crash21.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91636 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/18123lerdsuwa2004-12-021-0/+7
| | | | | | | | | | | * parser.c (cp_parser_type_specifier): Catch template declaration of enum. * g++.dg/parse/enum2.C: New test. * g++.old-deja/g++.pt/enum5.C: Adjust error location. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91630 138bc75d-0d04-0410-961f-82ee72b054a4
* cp:nathan2004-12-011-0/+14
| | | | | | | | | | | | PR c++/18729 * parser.c (cp_parser_class_name): Check decl's type is not error_mark_node. testsuite: PR C++/18729 * g++.dg/parse/crash20.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91566 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/18001mmitchel2004-11-251-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-common.h (lvalue_use): Move here from c-ctypeck.c. (lvalue_or_else): Declare. * c-common.c (lvalue_or_else): Move here from c-typeck.c. * c-typeck.c (lvalue_use): Remove. (lvalue_or_else): Remove. PR c++/18556 * toplev.c (check_global_declarations): Set DECL_IGNORED_P on unemitted variables with static storage duration. PR c++/18445 * class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with unknown_type as non matching. Tidy up. * pt.c (build_non_dependent_expr): Do not build a NON_DEPENDENT_EXPR for a VAR_DECL. PR c++/18001 * cp-tree.h (lvalue_or_else): Remove declaration. * tree.c (lvalue_or_else): Remove. * typeck.c (build_unary_op): Adjust call to lvalue_or_else. (build_modify_expr): Likewise. PR c++/18625 * decl.c (duplicate_decls): Return error_mark_node on error, as specified. PR c++/18466 * decl.c (grokvardecl): Keep track of whether or not a there was explicit qualification. * name-lookup.c (set_decl_namespace): Complain about explicit qualification of a name within its own namespace. PR c++/18545 * typeck.c (check_return_expr): Robustify. PR c++/18445 * g++.dg/template/crash28.C: Likewise. PR c++/18001 * g++.dg/expr/unary2.C: Adjust lvalue messages. * g++.dg/ext/lvaddr.C: Likewise. * g++.dg/opt/pr7503-3.C: Likewise. PR c++/18466 * g++.dg/parse/qualified3.C: New test. * g++.old-deja/g++.other/friend7.C: Remove bogus qualification. PR c++/18545 * g++.dg/expr/return1.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91301 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/17473mmitchel2004-11-241-0/+2
| | | | | | | | | | | | | | | | | | | | * name-lookup.c (supplement_binding): Do not allow typedefs to be redefined in class scope. PR c++/18285 * parser.c (cp_parser_set_decl_type_spec): Do not try to allow redefinitions of builtin types other that "bool" or "wchar_t". PR c++/17473 * g++.dg/tc1/dr56.C: Remove. * g++.dg/template/typedef1.C: Add dg-error markers. * g++.old-deja/g++.other/typedef7.C: Likewise. PR c++/18285 * g++.dg/parse/typedef7.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91254 138bc75d-0d04-0410-961f-82ee72b054a4
* Friend class name lookup 1/n, PR c++/18471lerdsuwa2004-11-158-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * decl.c (lookup_and_check_tag): New function. (xref_tag, start_enum): Use it. (check_elaborated_type_specifier): Move TEMPLATE_TYPE_PARM check before !DECL_IMPLICIT_TYPEDEF_P. Also display previously declared location. * name-lookup.c (lookup_name_current_level): Rename to ... (lookup_name_innermost_nonclass_level): ... this. (lookup_type_scope): New function. * name-lookup.h (lookup_name_current_level): Rename to ... (lookup_name_innermost_nonclass_level): ... this. (lookup_type_scope): Add declaration. * g++.dg/lookup/struct1.C: Adjust expected error. * g++.dg/parse/elab1.C: Likewise. * g++.dg/parse/elab2.C: Likewise. * g++.dg/parse/int-as-enum1.C: Likewise. * g++.dg/parse/struct-as-enum1.C: Likewise. * g++.dg/parse/typedef1.C: Likewise. * g++.dg/parse/typedef3.C: Likewise. * g++.dg/parse/typedef4.C: Likewise. * g++.dg/parse/typedef5.C: Likewise. * g++.dg/template/nontype4.C: Likewise. * g++.old-deja/g++.benjamin/typedef01.C: Likewise. * g++.old-deja/g++.other/elab1.C: Likewise. * g++.old-deja/g++.other/syntax4.C: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90657 138bc75d-0d04-0410-961f-82ee72b054a4
* * g++.dg/parse/cast1.C: Run only on ILP32.ebotcazou2004-11-131-0/+1
| | | | | | | * g++.old-deja/g++.mike/p784.C: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90601 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/18389mmitchel2004-11-121-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * decl.c (start_decl): Make sure to set *pop_scope_p. Return error_mark_node to indicate errors. PR c++/18429 * parser.c (cp_parser_direct_declarator): Disallow non-constant array bounds when not inside a function. PR c++/18436 * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an unqualified name resolves to a member function. PR c++/18407 * pt.c (tsubst_copy_and_build): Handle qualified names used from a derived class correctly. * decl2.c (import_export_decl): Fix typo in comment. * tree.c (pod_type_p): Likewise. PR c++/18389 * g++.dg/parse/cond1.C: New test. PR c++/18429 * g++.dg/template/array9.C: New test. * g++.dg/ext/vla1.C: Adjust error messages. * g++.dg/ext/vlm1.C: Likewise. * g++.dg/template/crash2.C: Likewise. PR c++/18436 * g++.dg/template/call3.C: New test. PR c++/18407 * g++.dg/template/ptrmem11.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90545 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/18124mmitchel2004-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * parser.c (cp_parser_type_parameter): Robustify. PR c++/18155 * parser.c (cp_parser_single_declaration): Disallow template typedefs. PR c++/18177 * typeck.c (build_const_cast): Use error_operand_p. PR c++/18124 * g++.dg/template/crash25.C: New test. PR c++/18155 * g++.dg/template/typedef2.C: New test. * g++.dg/parse/crash13.C: Adjust error markers. PR c++/18177 * g++.dg/conversion/const3.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90016 138bc75d-0d04-0410-961f-82ee72b054a4
* cp:nathan2004-10-222-0/+14
| | | | | | | | | | | | | | | | | | | | | PR c++/18095 * parser.c (eof_token): Make const, correctly initialize rid and location fields. (struct cp_lexer): Replace buffer_end pointer with buffer_length count. Adjust. (cp_lexer_new_main): Directly grow lexer's buffer here. Don't zero it out. (cp_lexer_new_from_tokens): Adjust. (cp_lexer_grow_buffer): Remove. (cp_lexer_peek_nth_token, cp_lexer_consume_token, cp_lexer_purge_token): Add const casts. testsuite: PR c++/18095 * g++.dg/parse/crash18.C: New. * g++.dg/parse/crash19.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89439 138bc75d-0d04-0410-961f-82ee72b054a4
* * call.c (struct conversion): Add base_p.mmitchel2004-10-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (convert_like): Add c_cast_p argument. (convert_like_with_conversion): Likewise. (build_conv): Clear base_p. (standard_conversion): Set it, for derived-to-base conversions. (convert_like_real): Add c_cast_p parameter. Handle pointer conversions directly rather than relying on ocp_convert. (perform_direct_initialization_if_possible): Add c_cast_p parameter. * cp-tree.h (perform_direct_initialization_if_possible): Change prototype. (convert_member_func_to_ptr): New function. * typeck.c (check_for_casting_away_constness): Add diag_fn parameter. (build_static_cast_1): New function, split out from ... (build_static_cast): ... here. Use build_static_cast_1. (build_reinterpret_cast_1): New function, split out from ... (build_reinterpret_cast): ... here. Use build_reinterpret_cast_1. (build_const_cast_1): New function, split out from ... (build_const_cast): ... here. Use build_const_cast_1. (build_c_cast): Rewrite to use build_const_cast_1, build_static_cast_1, and build_reinterpret_cast_1. (convert_member_func_to_ptr): New function. * g++.dg/conversion/reinterpret1.C: Adjust error markers. * g++.dg/conversion/const2.C: New test. * g++.dg/expr/reinterpret2.C: New test. * g++.dg/expr/reinterpret3.C: New test. * g++.dg/expr/cast2.C: New test. * g++.dg/expr/copy1.C: New test. * g++.dg/other/conversion1.C: Change error message. * g++.dg/parse/comma1.C: Use __extension__ to allow casts from function pointers to void *. * g++.old-deja/g++.mike/p10148.C: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89300 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-10-19 Paolo Bonzini <bonzini@gnu.org>bonzini2004-10-191-0/+32
| | | | | | | | | | | | | | | PR c++/18047 * parser.c (enum cp_parser_prec): Give relational expressions a higher precedence than equality expressions. 2004-10-19 Paolo Bonzini <bonzini@gnu.org> PR c++/18047 * g++.dg/parse/expr3.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89272 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/17042mmitchel2004-10-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * decl.c (declare_global_var): Use the return value from pushdecl. PR c++/14667 * parser.c (cp_parser_simple_declaration): Do not diagnose invalid type names if we have already found a valid type. (cp_parser_member_declaration): Likewise. PR c++/17852 * parser.c (cp_parser_member_specification_opt): Handle CPP_PRAGMA. PR c++/17042 * g++.dg/init/dso_handle1.C: New test. PR c++/17852 * g++.dg/parse/pragma1.C: New test. PR c++/14667 * g++.dg/parse/typedef6.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89119 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/17042mmitchel2004-10-152-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | * decl.c (declare_global_var): Use the return value from pushdecl. PR c++/14667 * parser.c (cp_parser_simple_declaration): Do not diagnose invalid type names if we have already found a valid type. (cp_parser_member_declaration): Likewise. PR c++/17852 * parser.c (cp_parser_member_specification_opt): Handle CPP_PRAGMA. PR c++/17042 * g++.dg/init/dso_handle1.C: New test. PR c++/17852 * g++.dg/parse/pragma1.C: New test. PR c++/14667 * g++.dg/parse/typedef6.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89118 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/15786mmitchel2004-10-121-0/+5
| | | | | | | | | | | | | | | | | | | * parser.c (cp_parser_declarator): Add member_p parameter. (cp_parser_condition): Adjust calls to cp_parser_declarator. (cp_parser_explicit_instantiation): Likewise. (cp_parser_init_declarator): Likewise. (cp_parser_direct_declarator): Add member_p parameter. Do not parse tentatively when parsing the parameters to a member. (cp_parser_type_id): Adjust calls to cp_parser_declarator. (cp_parser_parameter_declaration): Likewise. (cp_parser_member_declaration): Likewise. (cp_parser_exception_declaration): Likewise. PR c++/15876 * g++.dg/parse/error22.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88914 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/17393mmitchel2004-10-101-0/+12
| | | | | | | | | | | * decl.c (grokdeclarator): Robustify error-recovery on invalid declarations. PR c++/17393 * g++.dg/parse/error21.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88855 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/17867mmitchel2004-10-102-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a constructor. PR c++/17670 * init.c (build_new): Correct comments. * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in the non-array case. PR c++/17821 * parser.c (cp_parser_postfix_dot_deref_expression): If the pseduo-destructor-name production does not work, fall back to the ordinary production. PR c++/17826 * tree.c (cp_tree_equal): Handle a BASELINK. PR c++/17687 * g++.dg/parse/error19.C: New test. PR c++/17670 * g++.dg/init/new11.C: New test. PR c++/17821 * g++.dg/parse/error20.C: New test. PR c++/17826 * g++.dg/template/crash24.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88836 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud