summaryrefslogtreecommitdiff
path: root/gcc/cp
Commit message (Collapse)AuthorAgeFilesLines
* * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.jason1997-10-232-0/+5
| | | | | | | Fixes libstdc++ failure. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@16153 138bc75d-0d04-0410-961f-82ee72b054a4
* * toplev.c (flag_exceptions): Default value is 2.law1997-10-232-0/+9
| | | | | | | | | | | | (compile_file): If flag_exceptions still has the value 2, then set it to 0. * lex.c (lang_init): Enable flag_exceptions by default if no command line switch was specified. Gross hacks to allow front-ends to override -fexceptions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@16152 138bc75d-0d04-0410-961f-82ee72b054a4
* * method.c (build_template_parm_names, build_decl_overload_real):brendan1997-10-233-11/+19
| | | | | | | | | | | | | Add static to definitions. * pt.c (add_to_template_args, note_template_header, processing_explicit_specialization, type_unification_real): Likewise. ({determine,check}_explicit_specialization): Use a single string for error messages. fixes problems building with sunos4 system cc git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@16150 138bc75d-0d04-0410-961f-82ee72b054a4
* * except.c (expand_exception_blocks): Call do_pending_stack_adust.jason1997-10-202-0/+16
| | | | | | | | (expand_end_catch_block): Likewise. (expand_end_eh_spec): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@16106 138bc75d-0d04-0410-961f-82ee72b054a4
* Mon Oct 20 11:44:20 1997 Mark Mitchell <mmitchell@usa.net>jason1997-10-207-4/+26
| | | | | | | | | | | | | | * decl.c (duplicate_decls): Handle template specializations correctly. * error.c (dump_function_name): Fix printing of specializations of member functions that are not member templates. * cp-tree.h (processing_specialization): Make global. * pt.c (processing_specialization): Likewise. * lex.c (cons_up_default_function): Save and restore processing_specialization to avoid confusion. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@16101 138bc75d-0d04-0410-961f-82ee72b054a4
* * decl.c (init_decl_processing): Give null_node unknown* type.jason1997-10-204-8/+27
| | | | | | | | | * typeck.c (comp_target_types): Handle UNKNOWN_TYPE. (common_type): Likewise. * error.c (args_as_string): Recognize null_node. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@16100 138bc75d-0d04-0410-961f-82ee72b054a4
* * pt.c (determine_explicit_specialization): Initialize "dummy"law1997-10-162-1/+6
| | | | | | | to keep Purify quiet. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15938 138bc75d-0d04-0410-961f-82ee72b054a4
* * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.jason1997-10-164-84/+93
| | | | | | | | | | | | (build_overload_int): Not here. Wed Oct 15 00:35:28 1997 Mike Stump <mrs@wrs.com> * class.c (build_type_pathname): Remove. (prepare_fresh_vtable): Fix problem with complex MI vtable names. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15928 138bc75d-0d04-0410-961f-82ee72b054a4
* * parse.y (unary_expr): Give a pedwarn if someone tries to use thebrendan1997-10-152-0/+7
| | | | | | | &&label GNU extension. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15907 138bc75d-0d04-0410-961f-82ee72b054a4
* fix two typosbrendan1997-10-142-2/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15906 138bc75d-0d04-0410-961f-82ee72b054a4
* regenjason1997-10-141-12/+12
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15905 138bc75d-0d04-0410-961f-82ee72b054a4
* Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>jason1997-10-143-1/+9
| | | | | | | | | | * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it, so as to avoid incorrect manglings. * method.c (build_decl_overload_real): Don't mangle return types for constructors. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15904 138bc75d-0d04-0410-961f-82ee72b054a4
* * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,jason1997-10-1419-230/+246
| | | | | | | | | | scratch_tree_cons): Define as macros for now. * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c, lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c, typeck2.c: Use them and the expression_obstack variants. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15900 138bc75d-0d04-0410-961f-82ee72b054a4
* * decl.c (store_return_init): Allow classes with explicit ctors tobkoz1997-10-142-1/+7
| | | | | | | be used with the named return values extension. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15896 138bc75d-0d04-0410-961f-82ee72b054a4
* * pt.c (instantiate_decl): Fix previous change.jason1997-10-102-5/+17
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15888 138bc75d-0d04-0410-961f-82ee72b054a4
* add GPL comment at the topbrendan1997-10-101-0/+20
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15884 138bc75d-0d04-0410-961f-82ee72b054a4
* add an initial very rough description of how `explicit' is handledbrendan1997-10-101-0/+7
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15883 138bc75d-0d04-0410-961f-82ee72b054a4
* * pt.c (tsubst): Fix thinko.jason1997-10-093-41/+44
| | | | | | | | | | (instantiate_decl): Really use the original template. * call.c (build_new_method_call): Use simple constructor_name for error messages. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15882 138bc75d-0d04-0410-961f-82ee72b054a4
* * method.c (build_underscore_int): Don't use ANSI specificlaw1997-10-092-1/+7
| | | | | | | features. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15881 138bc75d-0d04-0410-961f-82ee72b054a4
* * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERNjason1997-10-082-2/+8
| | | | | | | for our key method; it might have been inlined by -O3. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15877 138bc75d-0d04-0410-961f-82ee72b054a4
* Tue Oct 7 23:00:12 1997 Mark Mitchell <mmitchell@usa.net>jason1997-10-083-2/+35
| | | | | | | | | | | | | | | | | | | | | | | * decl.c (make_typename_type): Do not try to call lookup_field for non-aggregate types. Tue Oct 7 22:52:10 1997 Jason Merrill <jason@yorick.cygnus.com> * typeck.c (build_reinterpret_cast): Tweak. Tue Oct 7 22:45:31 1997 Alexandre Oliva <oliva@dcc.unicamp.br> * typeck.c (build_reinterpret_cast): converting a void pointer to function pointer with a reinterpret_cast produces a warning if -pedantic is issued Tue Oct 7 22:43:43 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de> * typeck.c (c_expand_return): Don't warn about returning a reference-type variable as a reference. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15876 138bc75d-0d04-0410-961f-82ee72b054a4
* * method.c (build_static_name): Fix typo.jason1997-10-083-2/+11
| | | | | | | | | | 1997-10-07 Brendan Kehoe <brendan@lisa.cygnus.com> * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on OLDDECL before we try to do DECL_USE_TEMPLATE. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15873 138bc75d-0d04-0410-961f-82ee72b054a4
* Undo last incorrect change.law1997-10-072-7/+0
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15871 138bc75d-0d04-0410-961f-82ee72b054a4
* * cp-tree.h (JOINER): Define to '_' if no '$' or '.' characterslaw1997-10-072-0/+7
| | | | | | | are allowed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15869 138bc75d-0d04-0410-961f-82ee72b054a4
* * decl.c (duplicate_decls): Don't warn about template instances.jason1997-10-076-26/+32
| | | | | | | | | | | | | | | | | | | * typeck.c (mark_addressable): Lose ancient code that unsets DECL_EXTERNAL. * pt.c (do_decl_instantiation): Lose support for instantiating non-templates. * call.c (build_new_function_call): Fix handling of null explicit template args. (build_new_method_call): Likewise. Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net> * method.c (build_underscore_int): Fix typo. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15851 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree.c (print_lang_statistics): #if 0 call tobrendan1997-10-061-0/+5
| | | | | | | | | print_inline_obstack_statistics until its definition is checked in. the definition of the fn's not checked in yet by jason git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15849 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree.c (print_lang_statistics): #if 0 call tobrendan1997-10-061-0/+2
| | | | | | | | | print_inline_obstack_statistics until its definition is checked in. the definition of the fn's not checked in yet by jason git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15848 138bc75d-0d04-0410-961f-82ee72b054a4
* Mon Oct 6 09:27:29 1997 Jason Merrill <jason@yorick.cygnus.com>jason1997-10-064-8/+20
| | | | | | | | | | | * pt.c (instantiate_decl): Look for the original template. (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations of member templates. Fixes tstring. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15838 138bc75d-0d04-0410-961f-82ee72b054a4
* tweakjason1997-10-011-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15828 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (g++FAQ.*): New rules.jason1997-10-014-2/+2197
| | | | | | | | | | (CONFLICTS): Update. * g++FAQ.texi: Moved from libg++. * parse.y (PFUNCNAME): Only specify the type once. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15827 138bc75d-0d04-0410-961f-82ee72b054a4
* * lex.c (real_yylex): Clean up the code to fully behave the waybrendan1997-10-012-28/+27
| | | | | | | the c-lex.c parser does for complex and real numbers. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15826 138bc75d-0d04-0410-961f-82ee72b054a4
* * method.c (build_decl_overload_real): Reformat.jason1997-09-302-1/+7
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15804 138bc75d-0d04-0410-961f-82ee72b054a4
* * method.c (synthesize_method): If at_eof, determine our linkage.jason1997-09-302-0/+7
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15803 138bc75d-0d04-0410-961f-82ee72b054a4
* 1997-09-29 Paul Eggert <eggert@twinsun.com>jason1997-09-304-16/+37
| | | | | | | | | | | | | | * lex.c (real_yylex): Treat `$' just like `_', except issue a diagnostic if !dollars_in_ident or if pedantic. * lang-specs.h (@c++): -ansi no longer implies -$. * decl2.c (lang_decode_option): -traditional and -ansi now do not mess with dollars_in_ident. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15802 138bc75d-0d04-0410-961f-82ee72b054a4
* Mon Sep 29 19:57:51 1997 H.J. Lu (hjl@gnu.ai.mit.edu)jason1997-09-3010-16/+57
| | | | | | | | | | | | | | | | | | | * Makefile.in (parse.o, decl.o): Also depend on $(srcdir)/../except.h $(srcdir)/../output.h. (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h $(srcdir)/../except.h $(srcdir)/../output.h. (typeck.o, init.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h. * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping. * expr.c (cplus_expand_expr): Make it static. * decl2.c, init.c, typeck.c: Include "expr.h". (expand_expr): Use proper values when calling the function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15801 138bc75d-0d04-0410-961f-82ee72b054a4
* Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br>jason1997-09-295-0/+37
| | | | | | | | | | | | | | | | | | * lang-options.h: new -Wold-style-cast flag. * cp-tree.h (warn_old_style_cast): new variable. * decl2.c (warn_old_style_cast): ditto. (lang_decode_option): support -Wold-style-cast. (reparse_absdcl_as_casts): produce old-style-cast warning. Mon Sep 29 09:20:53 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com> * decl.c (cp_finish_decl): Allow expand_aggr_init to set TREE_USED, reset value based on already_used. * init.c (expand_member_init): Revert change. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15793 138bc75d-0d04-0410-961f-82ee72b054a4
* * cp-tree.h, decl.c, decl2.c, pt.c:jason1997-09-295-46/+22
| | | | | | | | | Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public. * decl2.c (lang_decode_option): Add missing ;. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15789 138bc75d-0d04-0410-961f-82ee72b054a4
* Sat Sep 27 16:22:48 1997 Jason Merrill <jason@yorick.cygnus.com>jason1997-09-2822-4571/+6031
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * friend.c (do_friend): Disable injection for all template-derived decls. * decl2.c (lang_decode_option): Handle -fguiding-decls. * parse.y (notype_template_declarator): New nonterminal. (direct_notype_declarator): Use it. (complex_direct_notype_declarator): Likewise. (object_template_id): Accept any kind of identifier after TEMPLATE. (notype_qualified_id): Don't add template declarators here. Sat Sep 27 16:21:58 1997 Mark Mitchell <mmitchell@usa.net> * call.c (add_template_candidate): Add explicit_targs parameter. (build_scoped_method_call): Use it. (build_overload_call_real): Likewise. (build_user_type_conversion_1): Likewise. (build_new_function_call): Likewise. (build_object_call): Likewise. (build_new_op): Likewise. (build_new_method_call): Likewise. (build_new_function_call): Handle TEMPLATE_ID_EXPR. (build_new_method_call): Likewise. * class.c (finish_struct_methods): Add specialization pass to determine which methods were specializing which other methods. (instantiate_type): Handle TEMPLATE_ID_EXPR. * cp-tree.def (TEMPLATE_ID_EXPR): New tree code. * cp-tree.h (name_mangling_version): New variable. (flag_guiding_decls): Likewise. (build_template_decl_overload): New function. (begin_specialization): Likewise. (reset_specialization): Likewise. (end_specialization): Likewise. (determine_explicit_specialization): Likewise. (check_explicit_specialization): Likewise. (lookup_template_function): Likewise. (fn_type_unification): Add explicit_targs parameter. (type_unification): Likewise. * decl.c (duplicate_decls): Add smarts for explicit specializations. (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function specializations. (grokfndecl): Call check_explicit_specialization. * decl2.c (lang_decode_option): Handle -fname-mangling-version. (build_expr_from_tree): Handle TEMPLATE_ID_EXPR. (check_classfn): Handle specializations. * error.c (dump_function_name): Print specialization arguments. * friend.c (do_friend): Don't call pushdecl for template instantiations. * init.c (build_member_call): Handle TEMPLATE_ID_EXPR. * lang-options.h: Add -fname-mangling-version, -fguiding-decls, and -fno-guiding-decls. * lex.c (identifier_type): Return PFUNCNAME for template function names. * method.c (build_decl_overload_real): New function. (build_template_parm_names): New function. (build_overload_identifier): Use it. (build_underscore_int): New function. (build_overload_int): Use it. Add levels for template parameters. (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs. (build_overload_nested_names): Handle template type parameters. (build_template_decl_overload): New function. * parse.y (YYSTYPE): New ntype member. (nested_name_specifier): Use it. (nested_name_specifier_1): Likewise. (PFUNCNAME): New token. (template_id, object_template_id): New non-terminals. (template_parm_list): Note specializations. (template_def): Likewise. (structsp): Likewise. (fn.def2): Handle member template specializations. (component_decl_1): Likewise. (direct_notype_declarator): Handle template-ids. (component_decl_1): Likewise. (direct_notype_declarator): Handle template-ids. (primary): Handle TEMPLATE_ID_EXPR, and template-ids. * pt.c (processing_specializations): New variable. (template_header_count): Likewise. (type_unification_real): New function. (processing_explicit_specialization): Likewise. (note_template_header): Likewise. (is_member_template): Handle specializations. (end_template_decl): Call reset_specialization. (push_template_decl): Handle member template specializations. (tsubst): Likewise. (tsubst_copy): Handle TEMPLATE_ID_EXPR. (instantiate_template): Handle specializations. (instantiate_decl): Likewise. (fn_type_unification): Handle explicit_targs. (type_unification): Likewise. Allow incomplete unification without an error message, if allow_incomplete. (get_bindings): Use new calling sequence for fn_type_unification. * spew.c (yylex): Handle PFUNCNAME. * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR. (really_overloaded_fn): Likewise. (get_first_fn): Handle function templates. * typeck.c (build_x_function_call): Use really_overloaded_fn. Handle TEMPLATE_ID_EXPR. (build_x_unary_op): Likewise. (build_unary_op): Likewise. (mark_addressable): Templates whose address is taken are marked as used. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15774 138bc75d-0d04-0410-961f-82ee72b054a4
* regenjason1997-09-271-3541/+3594
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15749 138bc75d-0d04-0410-961f-82ee72b054a4
* 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>jason1997-09-262-1/+6
| | | | | | | | * decl.c (init_decl_processing): Declare __builtin_constant_p as accepting any kind of type, not only int. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15734 138bc75d-0d04-0410-961f-82ee72b054a4
* * search.c (get_matching_virtual): Notice virtual bases when sorryingjason1997-09-262-1/+5
| | | | | | | about covariant returns. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15732 138bc75d-0d04-0410-961f-82ee72b054a4
* * parse.y (member_init): Also imply typename here. Remove ancientjason1997-09-263-58/+50
| | | | | | | extension for initializing base members. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15720 138bc75d-0d04-0410-961f-82ee72b054a4
* fix thinkojason1997-09-262-84/+95
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15719 138bc75d-0d04-0410-961f-82ee72b054a4
* Handle multi-level typenames and implicit typename in base list.jason1997-09-254-25/+104
| | | | | | | | | | | | | | | | | | | * parse.y (typename_sub{,[0-2]}): New rules. (structsp, rule TYPENAME_KEYWORD): Use typename_sub. (nonnested_type): New rule. (complete_type_name): Use it. (base_class.1): Use typename_sub and nonnested_type. (nested_name_specifier): Don't elide std:: here. * decl.c (make_typename_type): Handle getting a type for NAME. (lookup_name_real): Turn std:: into :: here. Rvalue conversions were removed in London. * call.c (is_subseq): Don't consider lvalue transformations. (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK. (joust): Reenable ?: kludge. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15715 138bc75d-0d04-0410-961f-82ee72b054a4
* updatejason1997-09-241-1/+6
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15687 138bc75d-0d04-0410-961f-82ee72b054a4
* * decl.c (start_function): Up warning of no return type to be abrendan1997-09-232-1/+6
| | | | | | | pedwarn. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15660 138bc75d-0d04-0410-961f-82ee72b054a4
* * call.c (build_over_call): Do require_complete_type beforejason1997-09-202-1/+7
| | | | | | | | | build_cplus_new. Fixes t20.C mode problem. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15598 138bc75d-0d04-0410-961f-82ee72b054a4
* * search.c (lookup_field): Call complete_type in all cases.jason1997-09-183-5/+15
| | | | | | | | | Fixes CLN problems. * decl.c (finish_function): Just warn about flowing off the end. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15555 138bc75d-0d04-0410-961f-82ee72b054a4
* * decl.c (grokparms): Don't bash a permanent list node if we'rejason1997-09-172-1/+6
| | | | | | | in a function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15516 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.brendan1997-09-172-1/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15514 138bc75d-0d04-0410-961f-82ee72b054a4