summaryrefslogtreecommitdiff
path: root/gcc/cp
Commit message (Collapse)AuthorAgeFilesLines
* Move C++ specific ChangeLog entry for "cp_binding_level reorg" patchDevang Patel2002-09-251-0/+16
| | | | | | from Changelog into cp/Changelog From-SVN: r57523
* class.c (contains_empty_class_p): New method.Mark Mitchell2002-09-252-2/+60
| | | | | | | | | | | | | | | * cp/class.c (contains_empty_class_p): New method. (walk_subobject_offsets): Correct computation of field offset. (layout_empty_base): Correct placement of emtpy base classes. (layout_class_type): Warn about ABI changes. * doc/invoke.texi: Add more -Wabi examples. * gcc/testsuite/g++.dg/abi/empty5.C: New test. * gcc/testsuite/g++.dg/abi/empty6.C: New test. * gcc/testsuite/g++.dg/abi/vbase12.C: New test. From-SVN: r57508
* c-common.c (flag_abi_version): New variable.Mark Mitchell2002-09-233-5/+43
| | | | | | | | | | | | | | | | | | | | | | | | * c-common.c (flag_abi_version): New variable. * c-common.h (flag_abi_version): Declare it. * c-opts.c (missing_arg): Add -fabi-version. (c_common_decode_option): Process -fabi-version. * doc/invoke.texi (-fabi-version): Document it. (-Wabi): Add information about bit-fields in unions. * cp/class.c (layout_virtual_bases): Do not round the size of the type to a multiple of the alignment before laying out virtual bases. (layout_class_type): Correct handling of bit-fields that are wider than their type inside unions. Round the size of the type to a even number of bytes when computing the size without virtual bases. * cp/cp-tree.h (abi_version_at_least): New macro. * g++.dg/abi/bitfield6.C: New test. * g++.dg/abi/bitfield7.C: New test. * g++.dg/abi/bitfield8.C: New test. * g++.dg/abi/vbase11.C: New test. From-SVN: r57432
* ChangeLog: Follow spelling conventions.Kazu Hirata2002-09-2124-164/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ChangeLog: Follow spelling conventions. * ChangeLog.2: Likewise. * call.c: Likewise. * class.c: Likewise. * cp-tree.h: Likewise. * cvt.c: Likewise. * decl.c: Likewise. * decl2.c: Likewise. * except.c: Likewise. * friend.c: Likewise. * g++spec.c: Likewise. * init.c: Likewise. * lex.c: Likewise. * mangle.c: Likewise. * method.c: Likewise. * operators.def: Likewise. * optimize.c: Likewise. * pt.c: Likewise. * rtti.c: Likewise. * search.c: Likewise. * semantics.c: Likewise. * spew.c: Likewise. * tree.c: Likewise. * typeck.c: Likewise. From-SVN: r57387
* cp-tree.h: New prototype for walk_vtabls().Devang Patel2002-09-193-51/+82
| | | | | | | | | | | | | | | | | | | 2002-09-19 Devang Patel <dpatel@apple.com> * cp/cp-tree.h: New prototype for walk_vtabls(). * cp/decl.c (walk_vtables_r): New function. (struct cp_binding_level): Add new members, namespaces, names_size and vtables. (add_decl_to_level): Add decl in namespaces or vtables chain, if conditions match. (walk_vtables): New function. (walk_namespaces_r): Travers separate namespace chain for namespace decls. (wrapup_globals_for_namespace): Use names_size instead of list_length(). * cp/decl2.c (finish_file): Use walk_vtables() instead of walk_globals() to walk vtable decls. From-SVN: r57305
* decl.c (grokdeclarator): Use assert, not internal_error.Nathan Sidwell2002-09-182-17/+14
| | | | | | | | | | cp: * decl.c (grokdeclarator): Use assert, not internal_error. Don't ICE with invalid pointers & references. testsuite: * g++.old-deja/g++.other/crash32.C: Mark ICE. From-SVN: r57277
* Makefile.am (CFILES): Add cxxfilt.c.Zack Weinberg2002-09-173-338/+15
| | | | | | | | | | | | | | | | | | | | binutils: * Makefile.am (CFILES): Add cxxfilt.c. (cxxfilt_SOURCES): Now just cxxfilt.c $(BULIBS). (cxxfilt_LDADD): Delete. Remove all references to underscore.c. Regen dependencies. * configure.in: Define TARGET_PREPENDS_UNDERSCORE in config.h from $UNDERSCORE, rather than AC_SUBSTing it. * binutils/cxxfilt.c: Moved here from gcc/cp, minor adjustments to fit into binutils framework. * configure, config.in, Makefile.in, doc/Makefile.in: Regenerate. gcc/cp: * Make-lang.in: Remove all references to the demangler. * cxxfilt.c: Moved to binutils. From-SVN: r57235
* re PR c++/7718 ('complex' template instantiation causes internal compiler ↵Nathan Sidwell2002-09-162-2/+3
| | | | | | | | | | | | error (gcc 3.1, gcc 3.2)) cp: PR c++/7718 * pt.c (tsubst_decl): Remove assert. testsuite: * g++.dg/template/subst1.C: New test. From-SVN: r57211
* Remove DR 295 implementation.Nathan Sidwell2002-09-164-15/+32
| | | | | | | | | | | | | | | | cp: Remove DR 295 implementation. * pt.c (check_cv_quals_for_unify): Disable function & method cases. * tree.c (cp_build_qualified_type_real): Likewise. Don't warn about ignoring volatile qualifiers. * search.c (lookup_member): Correct documentation. testsuite: * g++.dg/template/qualttp20.C: Adjust expected errors. * g++.old-deja/g++.jason/report.C: Likewise. * g++.old-deja/g++.other/qual1.C: Likewise. From-SVN: r57209
* Index: gcc/ChangeLogGeoffrey Keating2002-09-162-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-09-12 Geoffrey Keating <geoffk@apple.com> * ggc-common.c (ggc_mark_rtx_children_1): Update for changed name mangling. The following changes are merged from pch-branch: * doc/gty.texi (GTY Options): Document %a. * gengtype.c (do_scalar_typedef): New function. (process_gc_options): Handle `length' option. (set_gc_used_type): A pointer to an array of structures doesn't qualify as a pointer to a structure. (output_escaped_param): Add `%a' escape. (write_gc_structure_fields): Allow 'desc' on array of unions. (main): Define `uint8', `jword' and `JCF_u2' as scalars; use do_scalar_typedef. * gengtype.c (enum rtx_code): Make global. (rtx_format): Make global. (rtx_next): New. (gen_rtx_next): New. (write_rtx_next): New. (adjust_field_rtx_def): Skip fields marked by chain_next. (open_base_files): Delete redundant prototype. (write_enum_defn): New. (output_mangled_typename): Correct abort call. (write_gc_marker_routine_for_structure): Handle chain_next and chain_prev options. (finish_root_table): Don't output redundant \n. (main): Call gen_rtx_next, write_rtx_next, write_enum_defn. * c-tree.h (union lang_tree_node): Add chain_next option. * gengtype.h (NUM_PARAM): New definition. (struct type): For TYPE_PARAM_STRUCT, allow multiple parameters. * gengtype.c (find_param_structure): New. (adjust_field_type): Handle param<n>_is option. (process_gc_options): Detect use_params option. Update callers. (set_gc_used_type): Add 'param' parameter, update callers. Handle 'use_params' option. (open_base_files): Add splay-tree.h to list of files included. (output_mangled_typename): New. (write_gc_structure_fields): Update 'param' parameter to support multiple parameters. Change name mangling. Allow parameterized fields to have an apparent scalar type. Handle param<n>_is options, use_param option. (write_gc_marker_routine_for_structure): Update for change to name mangling. Better guess the output file for parameterized types. (write_gc_types): Update for change to name mangling. (write_gc_root): Update for change to name mangling. Handle (ignore) param<n>_is options. * doc/gty.texi (GTY Options): Add description of param<n>_is options, use_params option. * ggc.h (ggc_mark_rtx): Update for changed name mangling. * gengtype-lex.l: Produce token for param<n>_is. * gengtype-yacc.y: Parse param<n>_is. * gengtype.c (adjust_field_tree_exp): Don't name a variable 'rindex'. * rtl.c: Update comment describing rtx_format. * rtl.h (union rtunion): Separate definition and typedef. (struct rtx_def): Use gengtype to mark. * Makefile.in (gengtype.o): Also depend on rtl.def. * ggc.h (ggc_mark_rtx_children): Delete prototype. (ggc_mark_rtx): Change to alias of gengtype-generated routine. * ggc-common.c (ggc_mark_rtx_children): Delete. (ggc_mark_rtx_children_1): Delete. (gt_ggc_m_rtx_def): Delete. * gengtype.c (adjust_field_rtx_def): New. (adjust_field_type): Call adjust_field_rtx_def. (write_gc_structure_fields): Add 'default' case to switch if none is specified; remove unused code. * tree.h (struct tree_exp): Update for change to meaning of special. * gengtype.c (adjust_field_tree_exp): New function. (adjust_field_type): Handle `tree_exp' special here. (write_gc_structure_fields): Don't handle `tree_exp' special here. Handle new `dot' option. * gengtype.h: Make `info' a pointer-to-const. * gengtype-yacc.y (yacc_ids): Use xasprintf. * gengtype.c (write_gc_structure_fields): Remove implementation of `always' option, add `default' option. * doc/gty.texi (GTY Options): Remove documentation of `always', add `default'. Index: gcc/cp/ChangeLog 2002-09-12 Geoffrey Keating <geoffk@apple.com> * cp-tree.h (union lang_tree_node): Add chain_next option. Index: gcc/f/ChangeLog 2002-09-12 Geoffrey Keating <geoffk@apple.com> * com.c (union lang_tree_node): Add chain_next option. Index: gcc/java/ChangeLog 2002-09-12 Geoffrey Keating <geoffk@apple.com> * java-tree.h (union lang_tree_node): Add chain_next option. From-SVN: r57206
* parse.y (parse_finish_call_expr): Check lookup_member result.Nathan Sidwell2002-09-162-0/+8
| | | | | | | | | cp: * parse.y (parse_finish_call_expr): Check lookup_member result. testsuite: * g++.dg/lookup/scoped2.C: New test. From-SVN: r57195
* re PR c++/7015 (certain __asm__ constructs rejected)Nathan Sidwell2002-09-163-4/+12
| | | | | | | | | | | | | | cp: 2002-09-16 Nathan Sidwell <nathan@codesourcery.com> PR c++/7015 * semantic.c (finish_asm_stmt): Fix operand/output_operands thinko. * typeck.c (c_expand_asm_operands): Protect from error_mark_node. testsuite * g++.dg/ext/asm3.C: New test. From-SVN: r57192
* re PR c++/7919 (using declarations screw this pointer)Nathan Sidwell2002-09-152-1/+17
| | | | | | | | | | | cp: PR c++/7919 * call.c (build_over_call): Convert this pointer for fns found by using decls. testsuite: * g++.dg/inherit/using2.C: New test. From-SVN: r57165
* ChangeLog: Follow spelling conventions.Kazu Hirata2002-09-152-4/+9
| | | | | | | * ChangeLog: Follow spelling conventions. * ChangeLog.1: Likewise. From-SVN: r57162
* re PR c++/7768 (__PRETTY_FUNCTION__ for template destructor is wrong)Nathan Sidwell2002-09-142-0/+6
| | | | | | | | | | cp: PR c++/7768 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P. testsuite: * g++.dg/template/pretty1.C: New test From-SVN: r57152
* * loop.c: Fix a comment typo.Kazu Hirata2002-09-141-1/+1
| | | | From-SVN: r57145
* error.c: Fix comment formatting.Kazu Hirata2002-09-1419-107/+128
| | | | | | | | | | | | | | | | | | | | | | | * error.c: Fix comment formatting. * except.c: Likewise. * expr.c: Likewise. * friend.c: Likewise. * g++spec.c: Likewise. * init.c: Likewise. * lex.c: Likewise. * mangle.c: Likewise. * method.c: Likewise. * optimize.c: Likewise. * pt.c: Likewise. * rtti.c: Likewise. * search.c: Likewise. * semantics.c: Likewise. * spew.c: Likewise. * tree.c: Likewise. * typeck.c: Likewise. * typeck2.c: Likewise. From-SVN: r57138
* pt.c (unify, ARRAY_TYPE): Element type can be more qualified.Nathan Sidwell2002-09-132-1/+5
| | | | | | | | | cp: * pt.c (unify, ARRAY_TYPE): Element type can be more qualified. testsuite: * g++.dg/template/deduce1.C: New test. From-SVN: r57120
* cp-tree.h, tree.c: New function non_cast_lvalue_p.Matt Austern2002-09-133-1/+10
| | | | | | | | | | | | 2002-09-13 Matt Austern <austern@apple.com> * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p. * cp/call.c: Change call-by-const-reference mechanism to use non_cast_lvalue_p when deciding whether the create a temporary. We need a temporary when passing, e.g. (long) x by const ref. * testsuite/g++.dg/other/constref[12].C: New, regression tests for passing a cast expression to a function by const reference. From-SVN: r57115
* decl.c: Fix comment formatting.Kazu Hirata2002-09-133-136/+141
| | | | | | | * decl.c: Fix comment formatting. * decl2.c: Likewise. From-SVN: r57104
* call.c: Fix comment formatting.Kazu Hirata2002-09-136-67/+75
| | | | | | | | | | * call.c: Fix comment formatting. * class.c: Likewise. * cp-lang.c: Likewise. * cp-tree.h: Likewise. * cvt.c: Likewise. From-SVN: r57083
* Makefile.in: Remove all references to s-under and underscore.c.Zack Weinberg2002-09-113-7/+313
| | | | | | | | | | | | | | | | | | | | | | | | gcc: * Makefile.in: Remove all references to s-under and underscore.c. * collect2.c, tlink.c: Change all uses of prepends_underscore to look directly at USER_LABEL_PREFIX. gcc/cp: * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c, and c++filt from cxxfilt.o + version.o + $(LIBDEPS). * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with minor adjustments (use version_string, eliminate yet another duplicate of xmalloc) libiberty: * cplus-dem.c: Code code under #ifdef MAIN moved to gcc/cp/cxxfilt.c. * testsuite/Makefile.in: Adjust for test-demangle. * testsuite/regress-demangle: Deleted. * testsuite/test-demangle.c: New file. * testsuite/demangle-expected: Change \$ to $ throughout, now that this file is not being read by a shell script. From-SVN: r57037
* * cp-tree.h (require_complete_eh_spec_types): Add prototype.Kaveh R. Ghazi2002-09-092-0/+5
| | | | From-SVN: r56960
* typeck2.c (add_exception_specifier): Only pedwarn for an incomplete type.Jason Merrill2002-09-045-16/+81
| | | | | | | | | | | | | * typeck2.c (add_exception_specifier): Only pedwarn for an incomplete type. (require_complete_eh_spec_types): New fn. (cxx_incomplete_type_diagnostic): Also support pedwarning. * typeck.c (complete_type_or_diagnostic): Likewise. * call.c (build_call): Call require_complete_eh_spec_types. * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting on an incomplete type. From-SVN: r56822
* decl.c (start_cleanup_fn): Clear interface_only before start_function, ↵Jakub Jelinek2002-09-042-0/+8
| | | | | | | | | | | restore it afterwards. * decl.c (start_cleanup_fn): Clear interface_only before start_function, restore it afterwards. * g++.dg/other/cxa-atexit1.C: New test. From-SVN: r56790
* cp-lang.c (cp_expr_size): Allow initialization from a CONSTRUCTOR.Jason Merrill2002-09-012-1/+8
| | | | | | | * cp-lang.c (cp_expr_size): Allow initialization from a CONSTRUCTOR. From-SVN: r56720
* Mark pr last change.Richard Henderson2002-08-301-0/+1
| | | | From-SVN: r56693
* tree.c: Include target.h.Richard Henderson2002-08-303-1/+17
| | | | | | | | | * tree.c: Include target.h. (cp_cannot_inline_tree_fn): Don't auto-inline functions that don't bind locally. * Makefile.in (tree.o): Update. From-SVN: r56692
* c-common.c (warn_abi): New variable.Mark Mitchell2002-08-272-1/+43
| | | | | | | | | | | | | | | | | * c-common.c (warn_abi): New variable. * c-common.h (warn_abi): Likewise. * c-opts.c (COMMAND_LINE_OPTIONS): Add -Wabi. (c_common_decode_option): Handle it. * doc/invoke.texi:P Document -Wabi. * class.c (layout_virtual_bases): Warn about bugs in G++ that result in incorrect object layouts. (layout_class_type): Likewise. * testsuite/g++.dg/abi/bitfield5.C: New test. * testsuite/g++.dg/abi/vbase10.C: Likewise. From-SVN: r56618
* tree.c (lvalue_p_1): Add argument for whether casts of lvalues are allowable.Matt Austern2002-08-254-17/+59
| | | | | | | | | | | | | | | | | | | 2002-08-24 Matt Austern <austern@apple.com> * tree.c (lvalue_p_1): Add argument for whether casts of lvalues are allowable. (real_lvalue_p): Update caller. (lvalue_p): Ditto. (non_cast_lvalue_or_else): New. * tree.h: Declare it. * typeck.c (build_unary_op): Use non_cast_lvalue_or_else. 2002-08-24 Matt Austern <austern@apple.com> * g++.dg/ext/lvaddr.C: New test. * g++.dg/ext/lvcast.C: New test. From-SVN: r56560
* typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR and ↵Mark Mitchell2002-08-232-1/+27
| | | | | | | | | | | COND_EXPR specially; fix error message output. * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR and COND_EXPR specially; fix error message output. * testsuite/g++.dg/inherit/cond1.C: New test. From-SVN: r56524
* c-common.h (RETURN_STMT_EXPR): Rename from RETURN_EXPR.Jason Merrill2002-08-223-2/+7
| | | | | | | | | | | | | | | | * c-common.h (RETURN_STMT_EXPR): Rename from RETURN_EXPR. * c-common.def: Adjust. * c-dump.c (c_dump_tree): Adjust. * c-semantics.c (genrtl_return_stmt): Adjust. * c-pretty-print.c (pp_c_statement): Adjust. * tree-inline.c (copy_body_r): Adjust. 2002-08-22 Jason Merrill <jason@redhat.com> * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR. * semantics.c (nullify_returns_r): Likewise. From-SVN: r56523
* Fix PR/7621Gabriel Dos Reis2002-08-172-2/+18
| | | | | | | | Fix PR/7621 * typeck.c (finish_class_member_access_expr): Diagnose cases where name lookup finds nothing. From-SVN: r56409
* semantics.c (finish_then_clause): Remove redundant assignment.Jason Merrill2002-08-162-21/+51
| | | | | | | | | | * semantics.c (finish_then_clause): Remove redundant assignment. (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the extra binding level outside the if/switch statement. (finish_while_cond, finish_for_cond): Rewrite complex condition into the loop body. From-SVN: r56402
* parse.y (sizeof, [...]): New non-terminals to increment skip_evaluation.Alexandre Oliva2002-08-153-13/+40
| | | | | | | | | | * parse.y (sizeof, alignof, typeof): New non-terminals to increment skip_evaluation. Replace terminals with them and decrement skip_evaluation at the end of rules using them. * decl2.c (mark_used): Don't assemble_external if skipping evaluation. From-SVN: r56359
* *** empty log message ***Gabriel Dos Reis2002-08-152-1/+13
| | | | From-SVN: r56347
* re PR c++/7598 (offsetof broken)Nathan Sidwell2002-08-152-0/+24
| | | | | | | | | | | cp: PR c++/7598 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes regression caused by my 2002-08-08 patch. testsuite: * g++.dg/other/offsetof1.C: New test From-SVN: r56346
* decl.c (pushdecl_class_level): Honor requests to bind names to OVERLOADs.Mark Mitchell2002-08-132-8/+14
| | | | | | | * decl.c (pushdecl_class_level): Honor requests to bind names to OVERLOADs. From-SVN: r56258
* decl2.c (build_call_from_tree): Fix uninitialized variable.Kaveh R. Ghazi2002-08-114-3/+15
| | | | | | | | * decl2.c (build_call_from_tree): Fix uninitialized variable. * parse.y (parse_finish_call_expr): Likewise. * repo.c (old_args, old_dir, old_main): Const-ify. From-SVN: r56208
* decl.c (duplicate_decls): Replace DECL_SOURCE_FILE + DECL_SOURCE_LINE with ↵Gabriel Dos Reis2002-08-115-20/+20
| | | | | | | | | | | | | DECL_SOURCE_LOCATION. * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE + DECL_SOURCE_LINE with DECL_SOURCE_LOCATION. * optimize.c (maybe_clone_body): Likewise. * pt.c (tsubst_enum): Likewise. (lookup_template_class): Likewise. * tree.c (cp_copy_res_decl_for_inlining): Likewise. From-SVN: r56206
* c-opts.c (set_std_cxx98, [...]): New.Neil Booth2002-08-102-5/+7
| | | | | | | | | | | | | | | | | | | | * c-opts.c (set_std_cxx98, set_std_c89): New. (COMMAND_LINE_OPTIONS): Move more from cppinit.c. (c_common_decode_option): Handle new switches from cppinit.c. Add -std=gnu++98. * cppinit.c (set_lang): Rename cpp_set_lang. Export. (no_arg, no_num): Remove. (COMMAND_LINE_OPTIONS): Move more to c-opts.c. Drop all lang- switches apart from -lang-objc and lang-asm. (cpp_handle_option): Similarly. * cpplib.h (cpp_set_lang): New. * doc/cppopts.texi, doc/invoke.texi: Document -std=c++98, -std=gnu++98. * objc/lang-specs.h: Remove -ansi. cp: * lang-specs.h: Remove -ansi. From-SVN: r56185
* tree.c (maybe_dummy_object): Replace // with /* */eNathan Sidwell2002-08-102-2/+7
| | | | | | | | | cp: * tree.c (maybe_dummy_object): Replace // with /* */e testsuite: * gcc.dg/bitfld-4.c: Add blank options. From-SVN: r56183
* call.c (standard_conversion): Use build_ptrmem_type.Mark Mitchell2002-08-097-89/+154
| | | | | | | | | | | | | | | | | | | | * call.c (standard_conversion): Use build_ptrmem_type. * cp-tree.h (build_ptrmem_type): New function. (adjust_result_of_qualified_name_lookup): Likewise. * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate static data members. (build_ptrmem_type): New function. (grokdeclarator): Do not use build_offset_type when encountering a qualified name. * parse.y (parse_finish_call_expr): Use adjust_result_of_qualified_name_lookup. * search.c (adjust_result_of_qualified_name_lookup): New function. * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than accessing OFFSET_TYPEs directly. * g++.dg/template/crash1.C: New test. From-SVN: r56169
* cleanup whitespacing a tad.Mike Stump2002-08-091-15/+15
| | | | From-SVN: r56145
* call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.Mike Stump2002-08-0910-45/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid. (type_decays_to): Likewise. * class.c (find_final_overrider): Likewise. (maybe_note_name_used_in_class): Likewise. * decl.c (current_tmpl_spec_kind): Likewise. (add_binding): Likewise. (push_class_binding): Likewise. (duplicate_decls): Likewise. (layout_var_decl): Likewise. (grokfndecl): Likewise. (grokdeclarator): Likewise. (check_default_argument): Likewise. * decl2.c (handle_class_head): Likewise. * error.c (dump_template_decl): Likewise. * init.c (build_offset_ref): Likewise. * pt.c (check_specialization_scope): Likewise. (determine_specialization): Likewise. (check_explicit_specialization): Likewise. (maybe_check_template_type): Likewise. (process_partial_specialization): Likewise. (check_default_tmpl_args): Likewise. (push_template_decl_real): Likewise. (convert_template_argument): Likewise. (try_class_unification): Likewise. (get_bindings_real): Likewise. (do_decl_instantiation): Likewise. * semantics.c (begin_function_definition): Likewise. (finish_member_declaration): Likewise. (check_multiple_declarators): Likewise. * typeck.c (comp_array_types): Likewise. (comptypes): Likewise. (expr_sizeof): Likewise. (build_binary_op): Likewise. (dubious_conversion_warnings): Likewise. (check_return_expr): Likewise. From-SVN: r56144
* typeck.c (build_class_member_access_expr): Do not return error_mark_node ↵Mark Mitchell2002-08-082-1/+5
| | | | | | | | | when no error has occurred. * typeck.c (build_class_member_access_expr): Do not return error_mark_node when no error has occurred. From-SVN: r56138
* typeck.c (build_component_addr): Remove.Nathan Sidwell2002-08-082-47/+13
| | | | | | | | | | | cp: * typeck.c (build_component_addr): Remove. (build_unary_op): Just check it's not a bitfield, and then build an ADDR_EXPR. testsuite: * g++.dg/other/packed1.C: New test. From-SVN: r56132
* class.c (convert_to_base): Correct check for error_mark_node.Nathan Sidwell2002-08-082-5/+9
| | | | | | | * class.c (convert_to_base): Correct check for error_mark_node. (create_vtable_ptr): Remove unused VFUNS_P parm From-SVN: r56127
* configure.in (enable_coverage): New enable switch.Nathan Sidwell2002-08-082-0/+5
| | | | | | | | | | | | | | | | | | | | * configure.in (enable_coverage): New enable switch. * configure: Rebuilt. * Makefile.in (COVERAGE_FLAGS, coverageexts): New variables. (INTERNAL_CFLAGS): Append COVERAGE_FLAGS. (ALL_FLAGS): Reorder so INTERNAL_CFLAGS comes after CFLAGS. (mostlyclean): Remove coverage files. * doc/install.texi: Document enable_coverage. * cp/Make-lang.in (c++.mostlyclean): Remove coverage files. * ada/Make-lang.in (ada.mostlyclean): Remove coverage files. * f/Make-lang.in (f.mostlyclean): Remove coverage files. * java/Make-lang.in (java.mostlyclean): Remove coverage files. * objc/Make-lang.in (objc.mostlyclean): Remove coverage files. * treelang/Make-lang.in (treelang.mostlyclean): Remove coverage files. From-SVN: r56126
* Rework build_component_ref.Mark Mitchell2002-08-0819-435/+635
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * call.c (build_vfield_ref): Do not go through build_component_ref. (build_field_call): Use build_class_member_access_expr. (build_user_type_conversion_1): Use BASELINK_FUNCTIONS. (build_object_call): Likewise. * class.c (convert_to_base): New function. (type_requires_array_cookie): Use BASELINK_FUNCTIONS. (instantiate_type): Handle BASELINKs. * cp-tree.def (BASELINK): New tree code. * cp-tree.h (BASELINK_P): Reimplement. (SET_BASELINK_P): Remove. (BASELINK_BINFO): Reimplement. (BASELINK_FUNCTIONS): Likewise. (BASELINK_ACCESS_BINFO): Likewise. (BASELINK_OPTYPE): Likewise. (convert_to_base): New function. (name_p): Likewise. (build_object_ref): Remove. (build_component_ref_1): Likewise. (build_component_ref): Likewise. (build_x_component_ref): Likewise. (build_class_member_access_expr): New function. (finish_class_member_access_expr): Likewise. (build_ptrmemfunc_access_expr): Likewise. * decl.c (grokdeclarator): Handle BASELINKs. * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using finish_class_member_access_expr. (arg_assoc): Handle BASELINKs. (do_class_using_decl): Likewise. * error.c (dump_decl): Likewise. (dump_expr): Use build_ptrmemfunc_access_expr. * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find destructors. (build_throw): Use BASELINK_FUNCTIONS. * init.c (perform_member_init): Use build_class_member_access_expr. (build_offset_ref): Handle BASELINKs. Use build_class_member_access_expr. * method.c (hack_identifier): Likewise. * parse.y (do_id): Use BASELINK, not TREE_LIST. (primary): Remove uses of build_object_ref. * pt.c (lookup_template_function): Handle BASELINKs. (resolve_overloaded_unification): Likewise. * search.c (build_baselink): Build a BASELINK, not a TREE_LIST. (lookup_field): Use BASELINK, not TREE_LIST. (lookup_fnfiels): Likewise. (setup_class_bindings): Likewise. * semantics.c (finish_object_call_expr): Do not use build_method_call when we already know what function is being called. * spew.c (identifier_type): Use BASELINK, not TREE_LIST. * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not TREE_CHAIN. (name_p): New function. * typeck.c (build_object_ref): Remove. (build_component_ref_1): Likewise. (build_x_component_ref): Likewise. (build_class_member_access_expr): New function. (finish_class_member_access_expr): Likewise. (build_ptrmemfunc_access_expr): Likewise. (get_member_function_from_ptrfunc): Use build_ptrmemfunc_access_expr. (build_binary_op): Likewise. (build_unary_op): Likewise. (build_ptrmemfunc): Likewise. (pfn_from_ptrmemfunc): Likewise. * typeck2.c (build_m_component_ref): Adjust comment. * g++.dg/abi/offsetof.C: Tweak error messages. * g++.old-deja/g++.mike/p10769a.C: Likewise. From-SVN: r56117