aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
AgeCommit message (Collapse)AuthorFilesLines
2003-06-18mangle.c (mangle_conv_op_name_for_type): Correct sprintf format string again.Mark Mitchell2-1/+6
* mangle.c (mangle_conv_op_name_for_type): Correct sprintf format string again. From-SVN: r68141
2003-06-18re PR debug/4252 (cc1: Invalid option `-fdump-translation-unit')Robert Abeles2-1/+6
PR debug/4252 * c-opts.c (c_common_handle_option): Pass -fdump argument suffix to dump_switch_p(). * tree-dump.c (dump_switch_p): Remove redundant 'dump-' prefix from static strings in dump_files. cp: * optimize.c (dump_function): Form complete flag name by prefixing 'fdump-' to string returned by dump_flag_name(). java: * lang.c (java_handle_option): Likewise. From-SVN: r68137
2003-06-17mangle.c (mangle_conv_op_name_for_type): Correct sprintf format string.Mark Mitchell2-1/+7
* mangle.c (mangle_conv_op_name_for_type): Correct sprintf format string. From-SVN: r68124
2003-06-17re PR c++/10929 (-Winline warns about functions for which no definition is ↵Jason Merrill2-1/+7
visible) PR c++/10929 * tree-inline.c (expand_call_inline): Don't warn about failing to inline a function which was made inline by -finline-functions. * cp/decl.c (grokfndecl): Don't mark a function inline for -finline-functions if it isn't defined. From-SVN: r68122
2003-06-17Correct PR number.Mark Mitchell1-1/+1
From-SVN: r68119
2003-06-17re PR c++/10712 (ICE in constructor_name_full, at cp/decl2.c:1255)Mark Mitchell2-0/+6
PR c++/1255 * class.c (handle_using_decl): Robustify. PR c++/1255 * g++.dg/lookup/using3.C: New test. From-SVN: r68118
2003-06-17re PR c++/11105 ([3.3/3.4 regression of sorts] ICE in ↵Mark Mitchell4-114/+176
mangle_conv_op_name_for_type) PR c++/11105 * cp-tree.h (DECL_CONV_FN_TYPE): New method. * mangle.c (struct globals): Remove internal_mangling_p. (write_unqualified_name): Use DECL_CONV_FN_TYPE. (write_template_parm): Don't write out the level number. (conv_type_names): New variable. (hash_type): New function. (compare_type): Likewise. (mangle_conv_op_name_for_type): Don't try to mangle conversion operator names. * search.c (lookup_conversion_operator): New function. (lookup_fnfields_1): Use it. PR c++/11105 * g++.dg/abi/conv1.C: Remove it. * g++.dg/template/conv7.C: New test. * g++.dg/template/conv8.C: Likewise. * g++.old-deja/g++.ext/pretty2.C: Do not test __FUNCTION__ for a conversion operator. From-SVN: r68095
2003-06-17except.c: Remove duplicate declaration of push_eh_cleanup.Andreas Jaeger3-3/+6
* except.c: Remove duplicate declaration of push_eh_cleanup. * call.c: Remove extra declaration of inhibit_warnings. From-SVN: r68065
2003-06-17mangle.c: Convert to ISO C.Nathanael Nerode2-201/+136
2003-06-16 Jens-Michael Hoffmann <jensmh@gmx.de> * mangle.c: Convert to ISO C. From-SVN: r68050
2003-06-16decl.c, [...]: Don't use the PTR macro.Kaveh R. Ghazi5-7/+12
cp: * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR macro. gcc: * bitmap.c, builtins.c, c-incpath.c, cgraph.c, config/frv/frv.c, config/mips/mips.c, cppfiles.c, cpphash.c, cppinit.c, cpplib.c, dwarf2out.c, dwarfout.c, except.c, expr.c, expr.h, fold-const.c, function.c, gcc.c, genoutput.c, gensupport.c, global.c, haifa-sched.c, hashtable.c, ifcvt.c, integrate.c, local-alloc.c, loop.c, mips-tdump.c, mips-tfile.c, mkdeps.c, protoize.c, read-rtl.c, recog.h, reload1.c, sbitmap.c, ssa-dce.c, stringpool.c, tlink.c, tree.c, varasm.c, varray.c: Don't use the PTR macro. From-SVN: r68043
2003-06-16* tree.c: Convert to ISO C.Nathanael Nerode2-251/+147
From-SVN: r68040
2003-06-16cp-tree.h: Follow spelling conventions.Kazu Hirata5-10/+17
* cp-tree.h: Follow spelling conventions. * mangle.c: Likewise. * method.c: Likewise. * parser.c: Likewise. From-SVN: r68015
2003-06-14tree.h (init_function_start): Remove filename and line paramters.Nathan Sidwell4-3/+9
* tree.h (init_function_start): Remove filename and line paramters. * function.c (init_function_start): Remove filename and line parameters. Use DECL_SOURCE_LOCATION. * c-decl.c (store_parm_decls): Adjust init_function_start call. (c_expand_body_1): Likewise. * coverage.c (create_coverage): Likewise. * ada/utils.c (begin_subprog_body): Adjust init_function_start call. * cp/decl.c (start_function): Adjust init_function_start call. * cp/method.c (use_thunk): Likewise. * cp/semantics.c (genrtl_start_function): Likewise. * f/com.c (stor_parm_decls): Adjust init_function_start call. * java/class.c (emit_register_classes): Adjust init_function_start call. * java/decl.c (complete_start_java_method): Likewise. * java/resource.c (write_resource_constructor): Likewise. * objc/objc-act.c (build_tmp_function_decl): Set line number to zero. (hack_method_prototype): Adjust init_function_start call. * treelang/treetree.c (tree_code_create_function_initial): Adjust init_function_start call. From-SVN: r67953
2003-06-14Makefile.in: Update to use common.opt and lang_opt_files.Neil Booth2-2/+5
* Makefile.in: Update to use common.opt and lang_opt_files. (c-options.c, c-options.h): Remove. (options.c, options.h): Add. * c-opts.c: Include options.h not c-options.h. * common.opt: New file. * configure, configure.in: Add lang_opt_files. * opts.c: Include flags.h and diagnostic.h. (common_handle_option): New. (handle_option): Update to recognize common options and all language-dependent options. * opts.h (CL_F77, CL_JAVA, CL_ADA, CL_COMMON, CL_TREELANG): New. (struct cl_option): Make flags of type int. * opts.h: Flag option with front ends to which it applies. Handle duplicate options. * toplev.c (filename): Remove. (independent_decode_option): Don't handle filenames and -quiet. (process_options, do_compile): Update. ada: * Make-lang.in: Update to use options.c and options.h. * misc.c: Include options.h not aoptions.h. (gnat_handle_option): Abort on unrecognized switch. (gnat_init_options): Request Ada switches. cp: * Make-lang.in: Remove c-options.o. f: * Make-lang.in: Update to use options.c and options.h. * top.c: Include options.h not f-options.h. (gnat_handle_option): Abort on unrecognized switch. (ffe_init_options): From com.c. Request F77 options. (ffe_handle_options): Abort on unrecognized switch. * com.c (ffe_init_options): Move to top.c. * top.h (fee_init_options): New. java: * Make-lang.in: Update to use options.c and options.h. * lang.c: Include options.h not j-options.h. (java_handle_option): Abort on unrecognized option. (java_init_options): Request Java switches. treelang: * Make-lang.in: Update to use options.c and options.h. * tree1.c: Include options.h not t-options.h. (treelang_init_options): New. (treelang_handle_option): Abort on unrecognized switch. * treetree.c (LANG_HOOKS_INIT_OPTIONS): Override. * treetree.h (treelang_init_options): New. From-SVN: r67941
2003-06-13* lex.c: Convert to ISO C.Nathanael Nerode2-74/+47
From-SVN: r67904
2003-06-13init.c: removes use of PARAMS macro.Nathanael Nerode2-122/+59
2003-05-19 Jens-Michael Hoffmann <jensmh@gmx.de> * init.c: removes use of PARAMS macro. Use ISO style function declarations. (Not copyright-significant change.) From-SVN: r67902
2003-06-13* rtti.c: Remove PARAMS.Nathanael Nerode2-21/+23
From-SVN: r67898
2003-06-13* typeck2.c: Convert to ISO C.Nathanael Nerode2-46/+24
From-SVN: r67895
2003-06-12re PR c++/10635 (ICE (segfault) when dereferencing an incomplete type casted ↵Mark Mitchell2-0/+10
from a void pointer) PR c++/10635 * typeck.c (build_c_cast): Check that the destination type is complete. PR c++/10635 * g++.dg/expr/cast1.C: New test. [[Split portion of a mixed commit.]] From-SVN: r67840.2
2003-06-12re PR c++/10432 (ICE in poplevel, at cp/decl.c:1230)Mark Mitchell4-17/+9
PR c++/10432 * cp-tree.h (finish_declarator): Remove. * decl.c (cp_finish_decl): Make sure to pop_nested_class even for erroneous declarations. * semantics.c (finish_declarator): Remove. PR c++/10432 * g++.dg/parse/error1.C: New test. From-SVN: r67804
2003-06-11decl2.c (generate_ctor_or_dtor_function): Avoid expanding a global static ↵Roger Sayle2-14/+39
constructor/destructor if it will be empty, i.e. * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a global static constructor/destructor if it will be empty, i.e. either doesn't call any ctors/dtors or only calls pure or const ctors/dtors. From-SVN: r67800
2003-06-11mangle.c (tm_p.h): Include it.Mark Mitchell3-1/+5
* mangle.c (tm_p.h): Include it. * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H). From-SVN: r67798
2003-06-11re PR c++/11131 (Unrelated declaration removes inline flag from function)Mark Mitchell2-3/+11
PR c++/11131 * tree.c (cp_cannot_inline_fn): Check for "inline" before instantiation. From-SVN: r67783
2003-06-10oopsJason Merrill1-1/+1
From-SVN: r67727
2003-06-10re PR c++/10968 (If member function implicitly instantiated, explicit ↵Jason Merrill1-0/+3
instantiation of class fails to instantiate it) PR c++/10968 * pt.c (mark_decl_instantiated): Set TREE_SYMBOL_REFERENCED. [[Split portion of a mixed commit.]] From-SVN: r67725.2
2003-06-10re PR c++/10968 (If member function implicitly instantiated, explicit ↵Jason Merrill1-0/+5
instantiation of class fails to instantiate it) PR c++/10968 * pt.c (mark_decl_instantiated): Set TREE_SYMBOL_REFERENCED. [[Split portion of a mixed commit.]] From-SVN: r67723.2
2003-06-10[multiple changes]Geoffrey Keating2-2/+8
2003-06-10 Andrew Pinski <pinskia@physics.uc.edu> * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY. (start_cleanup_cnt): New. 2003-06-10 Geoffrey Keating <geoffk@apple.com> * g++.dg/pch/static-1.C: New file. * g++.dg/pch/static-1.Hs: New file. From-SVN: r67719
2003-06-10re PR c++/11131 (Unrelated declaration removes inline flag from function)Mark Mitchell5-7/+22
PR c++/11131 * tree-inline.c (inlinable_function_p): Call the language-specific hook early. PR c++/11131 * cp-tree.h (template_for_substitution): Declare. * decl2.c (mark_used): Use it when figuring out whether or not a function is inline. * pt.c (template_for_substitution): Give it external linkage. * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as possible. PR c++/11131 * g++.dg/opt/template1.C: New test. From-SVN: r67698
2003-06-09re PR c++/8861 ([ABI] mangling floating point literal in template arg ↵Zack Weinberg2-26/+81
expression) PR 8861 * mangle.c (write_real_cst): New function. Implement ABI-compliant mangling of floating-point literals when -fabi-version>=2; provide backward compatibility with 3.3 when -fabi-version=1 (with warning). Clarify commentary. (write_template_arg_literal): Use write_real_cst. From-SVN: r67670
2003-06-08* Makfile.in, cp/Make-lang.in: Forgotten commit.Neil Booth1-1/+2
From-SVN: r67616
2003-06-07* cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.Andreas Jaeger2-14/+13
From-SVN: r67592
2003-06-07Makefile.in (OJBS, c-opts.o): Update.Neil Booth4-6/+13
* Makefile.in (OJBS, c-opts.o): Update. (c-options.c, c-options.h): Rename options.h and options.c. (options.h): Rename options_.h. (opts.o): New. * c-common.h (c_common_handle_option): Replace c_common_decode_option. (c_common_init_options): Update prototype. * c-lang.c (c_init_options): Update prototype. (LANG_HOOKS_HANDLE_OPTION): Override. (LANG_HOOKS_DECODE_OPTION): Drop. * c-opts.c: Include opts.h and options.h instead of c-options.h and c-options.c. (lang_flags): Move to file scope. (find_opt, c_common_decode_option): Remove. (CL_C, CL_OBJC, CL_CXX, CL_OBJCXX, CL_JOINED, CL_SEPARATE, CL_REJECT_NEGATIVE): Move to opts.h. (missing_arg): Update prototype. (c_common_init_options): Update for new prototype. (c_common_handle_options): Filenames are passed as N_OPTS. * hooks.c (hook_int_void_0): New. * hooks.h (hook_int_void_0): New. * langhooks-def.h (LANG_HOOKS_INIT_OPTIONS): New default. (LANG_HOOKS_HANDLE_OPTION): Default to NULL for now. (LANG_HOOKS_INITIALIZER): Update. * langhooks.h (init_options): Update. (handle_option): New. * opts.c, opts.h: New files. * opts.sh: Update c file to include opts.h and options.h. * toplev.c: Include opts.h; change options.h to options_.h. (parse_options_and_default_flags): Get lang_mask, use handle_option for language-specific handling. * objc/objc-lang.c (LANG_HOOKS_DECODE_OPTON): Drop. (LANG_HOOKS_HANDLE_OPTION): Override. (objc_init_options): Update. ada: * misc.c (gnat_init_options): Update. cp: * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop. (LANG_HOOKS_HANDLE_OPTION): Override. * cp-tree.h (cxx_init_options): Update. * lex.c (cxx_init_options): Update. f: * com.c (ffe_init_options): Update. java: * lang.c (java_init_options): Update. From-SVN: r67584
2003-06-05install.tex: Document profiledbootstrap.Jan Hubicka2-0/+8
* install.tex: Document profiledbootstrap. * Makefile.tpl (profiledbootstrap): New target. * Makefile.in (profiledbootstrap): New target. * Makefile.in (clean, distclean): Kill new stages (POSTSTAGE1_FLAGS_TO_PASS): Break from ... (STAGE2_FLAGS_TO_PASS): ... this one. (STAGEPROFILE_FLAGS_TO_PASS, STAGEFEEDBACK_FLAGS_TO_PASS): New. (stage[2-4]_build): Add POSTSTAGE1_FLAGS_TO_PASS. (stageprofile_build, stageprofile_copy, stagefeedback_build, stagefeedback_copy): New. (restageprofile, restagefeedback, stageprofile-start, stageprofile, stagefeedback-start): Likewise. * Make-lang.in: Add support for stageprofile and stagefeedback From-SVN: r67498
2003-06-04decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.J"orn Rennecke2-1/+7
gcc/cp: * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out. gcc/testsuite/g++.old-deja/g++.oliva: * template1.C (bar): Remove xfail marker. From-SVN: r67465
2003-06-04g77spec.c (lang_specific_driver): Remove ALT_LIBM usage.Andreas Jaeger2-3/+4
* g77spec.c (lang_specific_driver): Remove ALT_LIBM usage. * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage. From-SVN: r67419
2003-06-04cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.Jason Merrill3-4/+15
2003-06-03 Jason Merrill <jason@redhat.com> * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors. * cp/decl.c (reshape_init): Handle vectors. * testsuite/g++.dg/init/array10.C: New. From-SVN: r67414
2003-06-03re PR c++/10940 (Bad code with explicit specialization)Kriang Lerdsuwanakij2-10/+18
PR c++/10940 * pt.c (check_explicit_specialization): Check for 'static' earlier. * g++.dg/template/spec10.C: New test. From-SVN: r67373
2003-05-31class.c (dump_array): Call CONSTRUCTOR_ELTS to access the operand of a ↵Diego Novillo2-1/+6
CONSTRUCTOR node. * class.c (dump_array): Call CONSTRUCTOR_ELTS to access the operand of a CONSTRUCTOR node. From-SVN: r67279
2003-05-31decl.c (cp_binding_level::this_entity): Rename from this_class.Gabriel Dos Reis2-109/+150
* decl.c (cp_binding_level::this_entity): Rename from this_class. (cxx_scope_descriptor): New function. (cxx_scope_debug): Likewise. (push_binding_level): Use it. (pop_binding_level): Likewise. (suspend_binding_level): Likewise. (resume_binding_level): Likewise. (pushlevel_class): Adjust use of this_class. (pushtag): Likewise. (lookup_name_real): Likewise. (global_scope_name): New variable. (initialize_predefined_identifiers): Initialize it. (push_namespace): Use it. (make_cxx_scope): New function. (pushlevel): Use it. (pushlevel_class): Likewise. (push_binding_level): Simplify. Loose the last two arguments. (make_binding_level): Remove. (initial_push__namespace_scope): New function. (push_namespace): Use it. Simplify. (cxx_init_decl_processing): Likewise. (declare_namespace_level): Remove. From-SVN: r67269
2003-05-31re PR c++/10956 (ICE when specializing a template member function of a ↵Kriang Lerdsuwanakij2-2/+9
template class, in tsubst, at cp/pt.c:6459) PR c++/10956 * pt.c (instantiate_decl): Don't use full template arguments if we are dealing with specializations. * g++.dg/template/spec9.C: New test. From-SVN: r67268
2003-05-29decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.Gabriel Dos Reis2-77/+84
* decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS. (binding_depth): Unconditionally define. (is_class_level): Likewise. (indent): Likewise. Take an indenting parameter. (push_binding_level): Remove conditional definittion. (pop_binding_level): Likewise. (suspend_binding_level): Likewise. (resume_binding_level): Likewise. (pushlevel): Likewise. (pushlevel_class): Likewise. (poplevel_class): Likewise. (pop_everything): Likewise. From-SVN: r67226
2003-05-29name-lookup.h (global_scope_p): New macro.Gabriel Dos Reis3-35/+42
* name-lookup.h (global_scope_p): New macro. * decl.c (pop_binding_level): Use it. Don't refer directly to global_binding_level. (suspend_binding_level): Likewise. (global_bindings_p): Likewise. (print_other_binding_stack): Likewise. (print_binding_stack): Likewise. (maybe_push_to_top_level): Likewise. (pushdecl_namespace_level): Likewise. (cxx_init_decl_processing): Likewise. (start_decl): Likewise. (cp_finish_decl): Likewise. (start_function): Likewise. (global_binding_level): Remove. From-SVN: r67221
2003-05-25parser.c (cp_parser_explicit_instantiation): Restore old access before ↵Kriang Lerdsuwanakij2-2/+11
template instantiation. * parser.c (cp_parser_explicit_instantiation): Restore old access before template instantiation. * g++.dg/template/access11.C: New test. From-SVN: r67166
2003-05-23rs6000.c (expand_block_move): Unify the TARGET_STRING and ! TARGET_STRING cases.Geoffrey Keating2-5/+10
* config/rs6000/rs6000.c (expand_block_move): Unify the TARGET_STRING and ! TARGET_STRING cases. From-SVN: r67140
2003-05-23re PR c++/10682 (chokes on a typedef for an enum inside a class template)Kriang Lerdsuwanakij2-1/+7
PR c++/10682 * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to check for implicitly created typedef to an enum. * g++.dg/template/instantiate4.C: New test. From-SVN: r67118
2003-05-21init.c (build_vec_delete): Copy the address into a temporary variable before ↵Jason Merrill3-7/+22
calling build_vec_delete_1. * init.c (build_vec_delete): Copy the address into a temporary variable before calling build_vec_delete_1. * decl2.c (delete_sanity): Don't call stabilize_reference. From-SVN: r67072
2003-05-21c-parse.in (fndef): Set DECL_SOURCE_LINE and FILE earlier.Nathan Sidwell2-1/+18
* c-parse.in (fndef): Set DECL_SOURCE_LINE and FILE earlier. (nested_function): Likewise. (notype_nested_function): Likewise. cp: * pt.c (register_specialization): Update the decl's location, if necessary. (check_explicit_specialization): Likewise. From-SVN: r67063
2003-05-21c-pretty-print.c (pp_c_integer_literal): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.Kaveh R. Ghazi2-10/+7
gcc: * c-pretty-print.c (pp_c_integer_literal): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX. cp: * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX. From-SVN: r67055
2003-05-21re PR c++/9738 ([mingw] Internal compiler error in rest_of_compilation, at ↵Danny Smith2-0/+16
toplev.c: 3491) PR c++/9738 * config/i386/winnt.c (i386_pe_encode_section_info): Enable even if not first. * cp/decl.c (duplicate_decls): Re-invoke make_decl_rtl if the old decl had instantiated DECL_RTL. (Base on Richard Henderson 2003-05-13 patch to c-decl.c). * testsuite/g++.dg/ext/dllimport2.C: New file. * testsuite/g++.dg/ext/dllimport3.C: New file. From-SVN: r67049
2003-05-20fix whitespaceJason Merrill1-1/+1
From-SVN: r67036