cp:
[official-gcc.git] / gcc / cp / ChangeLog
blob31fc320856eae1fc3711f1ee0984ae3cb279c079
1 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
3         PR c++/2645, DR 295
4         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
5         tf_keep_type_decl.
6         (make_typename_type): Use tsubst_flags_t.
7         * decl.c (make_typename_type): Adjust. Return non-artificial
8         TYPE_DECLs, if required.
9         (grokdeclarator): Simplify CVR qualification handling. Allow bad
10         qualifiers on typedef types.
11         * decl2.c (handle_class_head): Adjust make_typename_type call.
12         * parse.y (nested_name_specifier): Likewise.
13         (typename_sub0): Likewise.
14         (typename_sub1): Likewise.
15         * pt.c (convert_template_argument): Adjust make_typename_type
16         return value.
17         (tsubst): Adjust cp_build_qualified_type_real calls.
18         (check_cv_quals_for_unify): Cope with alowing bad qualifications
19         on template type parms.
20         (instantiate_decl): Recheck substitutions to give warnings on bad
21         qualifications.
22         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
24 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
26         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
28         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
29         unless DECL_ALWAYS_INLINE.
31 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
33         * typeck.c (cp_pointer_int_sum): Renamed from
34         pointer_int_sum, call pointer_int_sum.
36 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
38         * decl.c (duplicate_decls): Return 0 if issued error about
39         redeclaration.
41 2002-02-19  Jason Merrill  <jason@redhat.com>
43         ABI change: Mangle `void (A::*)() const' as 
44         M1AKFvvE, not MK1AFvvE.
45         * mangle.c (write_function_type): Write cv-quals for member
46         function type here.
47         (write_pointer_to_member_type): Not here.
49 2002-02-18  Jason Merrill  <jason@redhat.com>
51         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
52         (do_decl_instantiation): Likewise.
54 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
56         PR c++/5685
57         * decl.c (duplicate_decls): Make warning unconditional
58         if duplicate default argument declarations are present.
60 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
62         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
63         shortening.
65 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
67         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
68         remove incorrect comment. Move #if 0'd code to common path. Use
69         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
71 2002-02-13  Jason Merrill  <jason@redhat.com>
73         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
74         (finish_function): Don't warn if current_function_returns_null.
76         * typeck2.c (digest_init): Do handle values of vector type.
78         * typeck2.c (digest_init, process_init_constructor): Treat vectors
79         like arrays.
81 2002-02-11  Jason Merrill  <jason@redhat.com>
83         * parse.y (reserved_declspecs): Don't handle attributes.
84         (reserved_typespecquals): Handle them here.
85         * Make-lang.in (parse.c): Adjust expected conflicts.
87 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
89         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
90         instead of compstmt.
91         (compstmt_or_stmtexpr): Renamed from compstmt.
92         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
94 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
96         Rename instantiate_type_flags to tsubst_flags_t & expand use.
97         * cp-tree.h (instantiate_type_flags): Rename to ...
98         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
99         add tf_warning flag.
100         (instantiate_type): Adjust prototype.
101         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
102         do_type_instantiation, cp_build_qualified_type_real): Likewise.
103         cp_build_qualified_type: Adjust.
104         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
105         tf_*.
106         * call.c (standard_conversion): Rename itf_* to tf_*.
107         (reference_binding): Likewise.
108         (convert_like_real): Likewise.
109         * cvt.c (cp_convert_to_pointer): Likewise.
110         (convert_to_reference): Likewise.
111         * decl.c (lookup_namespace_name): Use tf_* flags.
112         (make_typename_type): Likewise.
113         (grokdeclarator): Likewise.
114         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
115         (coerce_template_template_parms, convert_template_argument,
116         coerce_template_parms, maybe_get_template_decl_from_type_decl,
117         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
118         instantiate_class_template, tsubst_template_arg_vector, 
119         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument, 
120         tsubst_decl, tsubst_arg_types, tsubst_function_type,
121         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr, 
122         instantiate_template, fn_type_unification,
123         resolve_overloaded_unification, verify_class_unification, 
124         unify, get_bindings_real, do_type_instantiation, 
125         regenerate_decl_from_template, instantiate_decl, 
126         tsubst_initializer_list, tsubst_enum,
127         get_mostly_instantiated_function_type,
128         invalid_nontype_parm_type_p): Likewise.
129         * tree.c (cp_build_qualified_type_real): Likewise.
130         * typeck.c (build_binary_op): Rename itf_* to tf_*.
131         (build_ptrmemfunc): Likewise.
132         (convert_for_assignment): Likewise.
134 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
136         PR c++/109
137         * decl.c (grokdeclarator): Allow friend declarations from
138         dependent types.
139         * decl2.c (handle_class_head): Don't push into template parm contexts.
140         * pt.c (push_template_decl_real): Template parm contexts are never
141         being defined.
143 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
145         * class.c: Include target.h.
146         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
147         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
148         bit-field layout.
149         * Make-lang.in: Adjust deps.
151 2002-02-05  Jason Merrill  <jason@redhat.com>
153         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
155 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
157         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
158         (finish_switch_cond): Set SWITCH_TYPE.
160 2002-02-04  Richard Henderson  <rth@redhat.com>
162         * method.c (use_thunk): Always initialize the block tree.  Reindent.
163         * semantics.c (expand_body): Emit thunks after function, not before.
165 2002-02-04  Jason Merrill  <jason@redhat.com>
167         * decl.c (start_function): Call cplus_decl_attributes immediately
168         after grokdeclarator.
170         * decl.c (start_function): Combine DECL_RESULT handling code.
172 2002-02-03  Jason Merrill  <jason@redhat.com>
174         * xref.c: Remove.
175         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
176         (cp/xref.o): Remove dependencies.
177         * class.c (finish_struct_1, check_methods): Don't call xref fns.
178         (finish_struct_1): Likewise.
179         * friend.c (make_friend_class): Likewise.
180         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
181         * spew.c (read_process_identifier): Likewise.
183 2002-02-01  Jason Merrill  <jason@redhat.com>
185         PR c++/4872
186         * decl.c (finish_function): Warn about a non-void function with 
187         no return statement and no abnormal exit.
188         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
189         (current_function_returns_abnormally): New macro.
190         * call.c (build_call): Set it.
192         * typeck.c (build_component_ref): Always complain about offsetof
193         constructs on non-PODs.  Only make it an error for members of
194         virtual bases.
196         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
197         (dump_function_decl): Always dump parms.
199         * decl2.c (finish_static_data_member_decl): Complain about a local
200         class with a static data member.
202         PR c++/4286
203         * search.c (lookup_field_1): Don't xref a static data member
204         just because we looked it up.
206 2002-01-31  Jason Merrill  <jason@redhat.com>
208         * Make-lang.in (parse.c): Handle .output file.
210         PR c++/3395
211         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
212         not TREE_TYPE.
213         * semantics.c (finish_class_definition): Adjust.
215         Allow attributes in parms and casts.
216         * parse.y (named_parm): Don't strip attrs.
217         (declmods): Remove 'attributes' production.
218         (nonempty_cv_qualifiers): Accept attributes.
219         (ATTRIBUTE): Give precedence.
220         * decl.c (groktypename): Handle attributes.
221         (grokparms): Likewise.
223 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
225         * decl2.c (cxx_decode_option): Pass 0 as last argument to
226         cpp_handle_option.
227         * lang-specs.h: Use cpp_unique_options instead of cpp_options
228         when used together with cc1_options.
230 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
232         PR c++/5132
233         * typeck2.c (digest_init): Make sure non-array core type is
234         instantiated.
235         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
236         constructor, rather than build a new one.
237         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
238         PURPOSE of constructor elts.
240 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
242         * Make-lang.in (parse.c): Adjust expected number of
243         shift-reduce conflicts.
244         (decl.o): Depend on diagnostic.h.
245         * decl.c: Include diagnostic.h.
246         (grokdeclarator): Check for null pointer.
247         (finish_function): Don't abort when
248         current_binding_level->parm_flag != 1, if errors have
249         occurred; throw away the statement tree and extra binding
250         levels, and continue.
251         * lex.c (note_list_got_semicolon): Check for null pointer.
252         * method.c (hack_identifier): Just return error_mark_node if
253         value is error_mark_node.
254         * parse.y (primary: TYPEID(type_id)): No need to use
255         TYPE_MAIN_VARIANT here.
256         (handler_seq): Accept an empty list of catch clauses and
257         generate a fake handler block to avoid later crashes.
258         (ansi_raise_identifier): Accept the error token too.
259         * semantics.c (begin_class_definition,
260         finish_class_definition): Check for error_mark_node.
262 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
264         * typeck2.c (friendly_abort): Delete definition.
265         * cp-tree.h (friendly_abort): Don't prototype.
266         (my_friendly_assert): Use fancy_abort.
268 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
270         * cp-tree.h (my_friendly_abort): Remove.
272 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
274         * spew.c (pending_inlines, pending_inlines_tail,
275         processing_these_inlines): Make static.
276         (mark_pending_inlines): Remove static.
277         (begin_parsing_inclass_inline): If in function, save pi
278         for GC to cp_function_chain->unparsed_inlines instead.
279         (process_next_inline): Likewise.
280         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
281         (mark_pending_inlines): Add prototype.
282         * decl.c (spew_debug): Remove unused extern.
283         (mark_lang_function): Call mark_pending_inlines.
285 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
287         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
288         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
289         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
290         Change my_fancy_abort() to abort().
292 2002-01-23  Jason Merrill  <jason@redhat.com>
294         PR c++/5453
295         * class.c (fixed_type_or_null): Fix thinko.
297         PR c++/3331
298         * init.c (resolve_offset_ref): Use build_indirect_ref.
300         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
302 2002-01-22  Jason Merrill  <jason@redhat.com>
304         * parse.y (function_body): Suppress the block for the outermost
305         curly braces.
306         * decl.c (pushdecl): Don't try to skip it.
307         (begin_function_body): Keep the block we create, not the next one.
308         * init.c (emit_base_init): Don't mess with keep_next_level.
310         * class.c (build_base_path): Tweak formatting.
312 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
314         Fix regression introduced with patch for c++/775
315         * parse.y (class_head_defn): Check for template specializations
316         with a different class-key.
318 2002-01-17  Jason Merrill  <jason@redhat.com>
320         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
321         (begin_function_body): Call them and keep_next_level.
322         * init.c (emit_base_init): Call keep_next_level.
323         * semantics.c (setup_vtbl_ptr): Lose.
324         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
325         (vtbls_set_up_p): Lose.
326         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
327         * method.c (do_build_copy_constructor): Likewise.
328         (synthesize_method): Call finish_mem_initializers.
329         * parse.y (nodecls): Likewise.
331         * error.c (dump_type_suffix): Print the exception specs before
332         recursing.
333         (dump_function_decl): Here, too.
335         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
337 2002-01-10  Ira Ruben   <ira@apple.com>
339         PR c++/907
340         * decl.c (start_method): Handle attrlist.
342 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
344         * decl2.c (max_tinst_depth): Increase default limit to 500.
346 2002-01-10  Graham Stott  <grahams@redhat.com>
348         * spew.c (YYCHAR): Uppercase macro parameter and add
349         parenthesis.
350         (YYCODE): Likewise.
351         (NAME): Uppercase macro parameter.
353 2002-01-09  Graham Stott  <grahams@redhat.com>
355         * decl.h (grokdeclarator): Wrap long line.
357         * semantics.c (FINISH_COND): Uppercase macro paramaters and
358         add parenthesis.
360 2002-01-08  Graham Stott  <grahams@redhat.com>
362         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
363         (PALLOC): Uppercase macro parameter and whitespace.
364         (SALLOC): Uppercase macro parameter.
365         (SFREE): Uppercase macros parameter, add parenthese and
366         whitespace.
367         (STREQL): Uppercase macro parameter and whitespace.
368         (STRNEQ): Likewise.
369         (STRLSS): Likewise.
370         (STRLEQ): Likewise.
371         (STRGTR): Likewise.
372         (STRGEQ): Likewise.
374         * call.c (convert_like): Add parenthesis and wrap.
375         (convert_like_with_context): Likewise.
376         (ICS_RANK): Whitespace.
377         (NEED_TEMPORARY_P): Remove parenthesis.
379         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
380         whitespace.
381         (VTT_MARKED_BINFO_P): Likewise.
383         * decl.c (BINDING_LEVEL): Add parenthesis.
384         (DEF_OPERATOR): Likewise.
386         * mangle.c (MANGLE_TRACE): Add parenthesis.
387         (MANGLE_TRACE_TREE): Likewise.
388         (write_signed_number): Likewise.
389         (write_unsigned_number): Likewise.
391         * pt.c (ccat): Uppercase macro parameter.
392         (cat): Likewise
394         * search.c (SET_BINFO_ACCESS): Add parenthesis.
396 2002-01-07  Jason Merrill  <jason@redhat.com>
398         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
399         to pedwarn.
401         PR c++/3536
402         * method.c (make_thunk): If !flag_weak, give the thunk the
403         function's linkage.
404         (use_thunk): Here, too.
406 2002-01-07  Graham Stott  <grahams@redhat.com>
408         * error.c: Update copyright date.
409         (print_scope_operator): Add parenthesis.
410         (print_left_paren): Likewise.
411         (print_right_paren): Likewise.
412         (print_left_bracket): Likewise.
413         (print_right_bracket): Likewise.
414         (print_template_argument_list_start): Likewise.
415         (print_template_argument_list_end): Likewise.
416         (print_non_consecutive_character): Likewise.
417         (print_tree_identifier): Likewise.
418         (print_identifier): Likewise.
419         (NEXT_CODE): Uppercase macro parameter.
420         (ident_fndecl): Delete unused.
421         (GLOBAL_THING): Likewise.
423 2002-01-06  Graham Stott  <grahams@redhat.com>
425         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
426         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
427         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
428         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
429         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
430         (C_IS_RESERVED_WORD): Uppercase macro parameter.
431         (C_RID_YYCODE) Likewise.
432         (ptrmem_cst): Use rtx.
433         (LOCAL_BINDING_P): Add whitespace.
434         (INHERITED_VALUE_BINDING_P): Likewise.
435         (BINDING_SCOPE): Wrap long line.
436         (BINDING_HAS_LEVEL_P): Remove parenthesis.
437         (BINDING_VALUE): Wrap long line.
438         (BINDING_TYPE): Whitespace.
439         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
440         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
441         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
442         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
443         (same_type_p): Uppercase macro parameters.
444         (same_type_ignoring_top_level_qualifiers_p): Likewise.
445         (OVL_FUNCTION): Wrap long line.
446         (OVL_CHAIN): Whitespace.
447         (OVL_CURRENT): Add parenthesis and whitespace.
448         (OVL_NEXT): Whitespace.
449         (OVL_USED): Likewise.
450         (IDENTIFIER_TYPE_VALUE): Likewise.
451         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
452         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
453         (LANG_ID_FIELD): Whitespace.
454         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
455         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
456         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
457         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
458         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
459         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
460         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
461         (IDENTIFIER_VIRTUAL_P): Likewise.
462         (IDENTIFIER_OPNAME_P): Likewise.
463         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
464         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
465         (C_SET_EXP_ORIGINAL_CODE): Likewise.
466         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
467         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
468         (IS_AGGR_TYPE): Uppercase macro parameter.
469         (CLASS_TYPE_P): Likewise.
470         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
471         (IS_AGGR_TYPE_2): Whitespace.
472         (TAGGED_TYPE_P): Uppercase macro parameter.
473         (TYPE_BUILT_IN): Whitespace.
474         (TYPE_FOR_JAVA): Likewise.
475         (FUNCTION_ARG_CHAIN): Remove parenthesis.
476         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
477         (FUNCTION_FIRST_USER_PARAM): Likewise.
478         (PROMOTES_TO_AGGR_TYPE): Whitespace.
479         (DERIVED_FROM_P): Add parenthesis and wrap.
480         (UNIQUELY_DERIVED_FROM_P): Likewise.
481         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
482         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
483         (CLASSTYPE_USE_TEMPLATE): Whitespace.
484         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
485         (TYPE_GETS_DELETE): Add parenthesis.
486         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
487         (TYPE_HAS_ASSIGN_REF): Likewise,
488         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
489         (TYPE_HAS_INIT_REF): Likewise.
490         (TYPE_HAS_CONST_INIT_REF): Likewise.
491         (TYPE_BEING_DEFINED): Likewise.
492         (TYPE_LANG_SPECIFIC): Likewise.
493         (CLASSTYPE_RTTI): Likewise.
494         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
495         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
496         (TYPE_OVERLOADS_ARROW): Likewise.
497         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
498         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
499         (CLASSTYPE_METHOD_VEC): Likewise.
500         (CLASSTYPE_MARKED_N): Likewise.
501         (CLASSTYPE_MARKED): Likewise.
502         (CLASSTYPE_MARKED2): Likewise.
503         (CLASSTYPE_MARKED3): Likewise.
504         (CLASSTYPE_MARKED4): Likewise.
505         (CLASSTYPE_MARKED5): Likewise.
506         (CLASSTYPE_MARKED6): Likewise.
507         (SET_CLASSTYPE_MARKED): Whitespace.
508         (CLEAR_CLASSTYPE_MARKED): Likewise.
509         (SET_CLASSTYPE_MARKED2): Likewise.
510         (CLEAR_CLASSTYPE_MARKED2): Likewise.
511         (SET_CLASSTYPE_MARKED3): Likewise.
512         (CLEAR_CLASSTYPE_MARKED3): Likewise.
513         (SET_CLASSTYPE_MARKED4): Likewise.
514         (CLEAR_CLASSTYPE_MARKED4): Likewise.
515         (SET_CLASSTYPE_MARKED5): Likewise.
516         (CLEAR_CLASSTYPE_MARKED5): Likewise.
517         (SET_CLASSTYPE_MARKED6): Likewise.
518         (CLEAR_CLASSTYPE_MARKED6): Likewise.
519         (CLASSTYPE_TAGS): Likewise.
520         (CLASSTYPE_VSIZE): Likewise.
521         (CLASSTYPE_VBASECLASSES): Likewise.
522         (CANONICAL_BINFO): Add parenthesis.
523         (CLASSTYPE_SIZE(NODE): Likewise.
524         (CLASSTYPE_SIZE_UNIT): Likewise.
525         (CLASSTYPE_ALIGN(NODE): Likewise.
526         (CLASSTYPE_USER_ALIGN): Likewise.
527         (TYPE_JAVA_INTERFACE): Likewise.
528         (CLASSTYPE_PURE_VIRTUALS): Likewise.
529         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
530         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
531         (CLASSTYPE_HAS_MUTABLE): Likewise.
532         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
533         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
534         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
535         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
536         (CLASSTYPE_INTERFACE_ONLY): Likewise.
537         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
538         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
539         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
540         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
541         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
542         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
543         (BINFO_UNSHARED_MARKED): Whitespace.
544         (BINFO_MARKED): Whitespace and wrap.
545         (SET_BINFO_MARKED): Likewise.
546         (CLEAR_BINFO_MARKED): Likewise.
547         (BINFO_VTABLE_PATH_MARKED): Likewise.
548         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
549         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
550         (BINFO_SUBVTT_INDEX): Remove parenthesis.
551         (BINFO_VPTR_INDEX): Likewise.
552         (BINFO_PRIMARY_BASE_OF): Likewise,
553         (CLASSTYPE_VFIELDS): Whitespace.
554         (VF_DERIVED_VALUE): Wrap long line.
555         (NAMESPACE_LEVEL): Whitespace.
556         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
557         (DEFARG_POINTER): Whitespace.
558         (DECL_NEEDED_P): Remove parenthesis.
559         (DECL_LANGUAGE): Whitespace.
560         (SET_DECL_LANGUAGE): Add parenthesis.
561         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
562         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
563         (DECL_IN_AGGR_P): Whitespace.
564         (DECL_FRIEND_P): Likewise.
565         (DECL_BEFRIENDING_CLASSES): Likewise.
566         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
567         (DECL_NONCONVERTING_P): Whitespace.
568         (DECL_PURE_VIRTUAL_P): Likewise.
569         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
570         (DECL_PENDING_INLINE_INFO): Whitespace.
571         (DECL_SORTED_FIELDS): Likewise.
572         (DECL_DEFERRED_FN): Likewise.
573         (DECL_TEMPLATE_INFO): Likewise.
574         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
575         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
576         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
577         (TMPL_ARGS_LEVEL): Likewise.
578         (SET_TMPL_ARGS_LEVEL): Likewise.
579         (INNERMOST_TEMPLATE_PARMS): Whitespace.
580         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
581         (INTEGRAL_CODE_P(CODE): Add parenthesis.
582         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
583         (TYPE_HAS_CONSTRUCTOR): Whitespace.
584         (TREE_HAS_CONSTRUCTOR): Likewise.
585         (TYPE_HAS_DESTRUCTOR): Likewise.
586         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
587         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
588         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
589         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
590         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
591         (TYPE_PTRMEMFUNC_P): Likewise.
592         (TYPE_PTRMEMFUNC_FLAG): Likewise.
593         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
594         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
595         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
596         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
597         (DECL_ACCESS): Whitespace.
598         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
599         (DECL_GLOBAL_DTOR_P): Likewise.
600         (GLOBAL_INIT_PRIORITY): Likewise.
601         (DECL_TEMPLATE_PARMS): Likewise.
602         (DECL_TEMPLATE_RESULT): Likewise.
603         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
604         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
605         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
606         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
607         (PRIMARY_TEMPLATE_P): Add parenthesis.
608         (DECL_USE_TEMPLATE): Whitespace.
609         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
610         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
611         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
612         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
613         (CALL_DECLARATOR_PARMS): Remove parenthesis.
614         (CALL_DECLARATOR_QUALS): Likewise.
615         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
616         (TEMP_NAME_P): Wrap.
617         (VFIELD_NAME_P): Likewise.
618         (B_SET): Uppercase macro parameters and add parenthesis.
619         (B_CLR): Likewise.
620         (B_TST): Likewise.
621         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
622         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
623         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
624         (same_or_base_type_p): Likewise.
625         (cp_deprecated): Likewise.
627 2002-01-05  Richard Henderson  <rth@redhat.com>
629         * semantics.c (expand_body): Revert last change.
631 2002-01-04  Jason Merrill  <jason@redhat.com>
633         PR c++/4122
634         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
635         lost primary.
637         * class.c (build_vtbl_initializer): Check for a lost primary
638         before calculating the vtable entry to throw away.
640 2002-01-02  Jason Merrill  <jason@redhat.com>
642         * semantics.c (expand_body): Call outlining_inline_function when
643         emitting an inline function out of line.
645 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
647         PR c++/5116, c++/764 reversion
648         * call.c (build_new_op): Revert the instantiations. They are
649         incorrect.
651 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
653         PR c++/5089
654         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
656 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
658         PR c++/3716
659         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
660         (tsubst, case POINTER_TYPE): Handle pmfs here.
661         (tsubst, case OFFSET_TYPE): Check it is not an offset to
662         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
664 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
666         PR c++/35
667         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
668         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
669         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
670         PARM_DECL.
671         (tsubst_template_parms): Break up loop statements.
672         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
673         parm PARM_DECLs don't get promoted.
675 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
677         PR c++/5123
678         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
679         (build_x_function_call): Cope with a COMPONENT_REF containing a
680         TEMPLATE_ID_EXPR.
682 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
684         PR c++/5213
685         * pt.c (convert_template_argument): Be more careful determining
686         when RECORD_TYPE templates are or are not templates.
688 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
690         PR c++/775
691         * cp-tree.h (handle_class_head): Adjust prototype.
692         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
693         parameters. Use for all class heads.
694         * parse.y (named_class_head_sans_basetype, named_class_head,
695         named_complex_class_head_sans_basetype,
696         named_class_head_sans_basetype_defn,
697         unnamed_class_head): Remove.
698         (class_head, class_head_apparent_template): Recognize class heads
699         (class_head_decl, class_head_defn): New reductions. Process class
700         heads.
701         (structsp): Adjust class definition and class declaration
702         reductions.
703         (maybe_base_class_list): Give diagnostic on empty list.
705 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
707         PR c++/4379
708         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
709         single non-static member.
710         (unary_complex_lvalue): If it cannot be a pointer to member, don't
711         make it so. Check it is not pointer to reference.
713 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
715         PR c++/5132
716         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
717         are processing a template decl.
719 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
721         PR c++/5116, c++/764
722         * call.c (build_new_op): Make sure template class operands are
723         instantiated. Simplify arglist construction.
725 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
727         * call.c (build_user_type_conversion_1): Use my_friendly_assert
728         rather than if ... abort.
729         * cvt.c (convert_to_reference): Likewise.
730         * semantics.c (setup_vtbl_ptr): Likewise.
731         * pt.c (lookup_template_class): Comment typo.
733 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
735         PR c++/5125
736         * pt.c (push_template_decl_real): Make sure DECL has
737         DECL_LANG_SPECIFIC.
739 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
741         PR c++/335
742         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
743         for non-reference fields.
744         * typeck.c (require_complete_type): Use resolve_offset_ref).
746 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
748         PR c++/196
749         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
751 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
753         PR c++/160
754         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
755         up. Don't stabilize_references when initializing a reference.
757 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
759         * decl2.c (lang_f_options): Const-ify.
761 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
763         * config-lang.in (diff_excludes): Remove.
765 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
767         PR c++/90
768         * typeck.c (build_function_call_real): Use original function
769         expression for errors.
771 2001-12-18  Jason Merrill  <jason@redhat.com>
773         PR c++/3242
774         * class.c (add_method): Do compare 'this' quals when trying to match a
775         used function.  Don't defer to another used function.
777 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
779         * pt.c (instantiate_clone): Remove, fold into ...
780         (instantiate_template): ... here. Simplify by removing mutual
781         recursion.
782         * typeck2.c (build_m_component_ref): Don't cv qualify the function
783         pointed to by a pointer to function.
784         * class.c (delete_duplicate_fields_1): Typo.
786 2001-12-18  Jason Merrill  <jason@redhat.com>
788         C++ ABI change: destroy value arguments in caller.
789         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
790         create an extra binding level for the parameters.
791         * decl.c (store_parm_decls): Don't do parameter cleanups.
793 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
795         * call.c (build_new_method_call): Use '%#V'.
796         * error.c (cv_to_string): Use V parameter to determine padding.
798 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
800         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
801         spellings in messages.
803 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
805         * cp-tree.h: Delete #defines for cp_error, cp_warning,
806         cp_pedwarn, and cp_compiler_error.
807         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
808         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
809         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
810         typeck2.c: Change calls to the above macros to use their
811         language-independent equivalents: error, warning, pedwarn, and
812         internal_error respectively.
814 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
816         * decl2.c (finish_file): Remove back_end_hook.
818 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
820         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
821         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
822         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
824 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
826         * lang-options.h: Use American spelling in messages.
828 2001-12-13  Jason Merrill  <jason@redhat.com>
830         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
832         Use cleanups to run base and member destructors.
833         * init.c (push_base_cleanups): New function, split out from...
834         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
835         * decl.c (finish_destructor_body): Move vbase destruction code to
836         push_base_cleanups.
837         (begin_function_body, finish_function_body): New fns.
838         (finish_function): Move [cd]tor handling and call_poplevel to
839         finish_function_body.
840         (pushdecl): Skip the new level.
841         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
842         (setup_vtbl_ptr): Call push_base_cleanups.
843         * method.c (synthesize_method): Call {begin,end}_function_body.
844         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
845         * cp-tree.h: Declare new fns.
846         * parse.y (function_body, .begin_function_body): New nonterminals.
847         (fndef, pending_inline, function_try_block): Use function_body.
848         (ctor_initializer_opt, function_try_block): No longer has a value.
849         (base_init): Remove .set_base_init token.
850         (.set_base_init, compstmt_or_error): Remove.
851         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
853         * optimize.c (maybe_clone_body): Fix parameter updating.
855 2001-12-12  Jason Merrill  <jason@redhat.com>
857         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
858         * semantics.c (genrtl_start_function): Don't pass
859         parms_have_cleanups or push an extra binding level.
860         (genrtl_finish_function): Lose cleanup_label cruft.
862         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
863         (ctor_label): Remove.
864         * semantics.c (finish_return_stmt): Lose ctor_label support.
865         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
866         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
867         dtor_label.
869         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
870         check for [cd]tors.
871         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
873         * decl.c (finish_function): Check VMS_TARGET, not VMS.
875         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
876         (end_cleanup_fn): And poplevel.
878         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
879         if we're in a template.
881 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
883         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
884         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
885         THIS_NAME_P): Delete.
886         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
887         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
888         with internal naming scheme.
889         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
891 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
893         * decl.c (grokdeclarator): Deprecated implicit typename use.
895 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
897         PR g++/51
898         * parse.y (frob_specs): Indicate it is a language linkage which
899         contained the extern.
900         * decl.c (grokdeclarator): Allow extern language linkage with
901         other specifiers.
903 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
905         PR g++/72
906         * decl.c (add_binding): Don't reject duplicate typedefs involving
907         template parameters.
909 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
911         * parse.y, semantics.c: Similarly.
913 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
915         PR g++/87
916         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
917         (copy_args_p): Rename to ...
918         (copy_fn_p): ... here.
919         (grok_special_member_properties): New function.
920         (grok_op_properties): Lose VIRTUALP parameter.
921         (copy_assignment_arg_p): Remove.
922         * call.c (build_over_call): Use copy_fn_p.
923         * decl.c (grokfndecl): Reformat. Adjust call to
924         grok_op_properties.
925         (copy_args_p): Rename to ...
926         (copy_fn_p): ... here. Reject template functions. Check for pass
927         by value.
928         (grok_special_member_properties): Remember special functions.
929         (grok_ctor_properties): Don't remember them here, just check.
930         (grok_op_properties): Likewise.
931         (start_method): Call grok_special_member_properties.
932         * decl2.c (grokfield): Likewise.
933         (copy_assignment_arg_p): Remove.
934         (grok_function_init): Don't remember abstract assignment here.
935         * pt.c (instantiate_class_template): Call
936         grok_special_member_properties.
937         (tsubst_decl): Adjust grok_op_properties call.
939 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
941         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
942         RID_TYPES_COMPATIBLE_P.
944 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
946         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
947         call to build_aggr_init.
948         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
950 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
952         * parse.y: Replace uses of the string non-terminal with STRING.
953         Don't perform string concatentaion here.
954         (string): Remove non-terminal.
955         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
957 2001-12-05  Jason Merrill  <jason@redhat.com>
959         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
960         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
961         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
962         * pt.c (push_tinst_level): No longer static.
963         * cp-tree.h: Declare them.
965         * init.c (resolve_offset_ref): Don't check access for the base
966         conversion to access a FIELD_DECL.
968         * cp-tree.h (TYPE_REFFN_P): New macro.
969         * decl.c (bad_specifiers): Check it, too.
971         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
972         on the __*_type_info type if we haven't seen a definition.
974 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
976         * decl.c: Include c-common.h.
977         (shadow_warning): Move to c-common.c.
979 Wed Dec  5 17:00:49 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
981         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
983 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
985         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
987 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
989         PR g++/164
990         * init.c (sort_base_init): Allow binfos to be directly specified.
991         * method.c (do_build_copy_constructor): Explicitly convert to the
992         base instance.
993         (do_build_assign_ref): Likewise.
995 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
997         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
998         declaration and initialization.
1000 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
1002         * typeck2.c: Remove leading capital from diagnostic messages, as
1003         per GNU coding standards.
1005 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
1007         PR c++/3394
1008         * decl.c (xref_basetypes): Handle attributes between
1009         'class' and name.
1011 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
1013         PR g++/3381
1014         * parse.y (named_complex_class_head_sans_basetype): Add new
1015         reduction.
1016         * Make-lang.in (parse.c): Adjust expected conflict count.
1018 2001-12-03  Jason Merrill  <jason@redhat.com>
1020         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
1021         immediate binfos for our virtual bases.
1023 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
1025         * call.c (build_java_interface_fn_ref): Similarly.
1026         * except.c (is_admissible_throw_operand): Similarly.
1027         * init.c (build_java_class_ref): Similarly.
1028         * xref.c (open_xref_file): Similarly.
1030 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
1032         * class.c (finish_struct): Remove trailing periods from messages.
1033         * decl.c (check_tag_decl): Similarly.
1034         * lex.c (cxx_set_yydebug): Similarly.
1035         * typeck2.c (friendly_abort): Similarly.
1037 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
1039         PR c++/3048
1040         * cp-tree.h (ovl_member): Remove.
1041         * decl2.c (merge_functions): Handle extern "C" functions
1042         specially.
1043         * tree.c (ovl_member): Remove.
1045 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
1047         PR c++/4842
1048         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
1049         FUNCTION_DECL, as input.
1050         (mark_overriders): Remove.
1051         (warn_hidden): Rework for the new ABI.
1053 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
1055         PR c++/3471
1056         * call.c (convert_like_real): Do not build additional temporaries
1057         for rvalues of class type.
1059 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
1061         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
1062         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
1063         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
1064         (DERIVED_FROM_P): Likewise.
1065         (enum base_access): Renumber, add ba_quiet bit mask.
1066         (get_binfo): Remove.
1067         (get_base_distance): Remove.
1068         (binfo_value): Remove.
1069         (ACCESSIBLY_DERIVED_FROM_P): Remove.
1070         * call.c (standard_conversion): Use lookup_base.
1071         * class.c (strictly_overrides): Likewise.
1072         (layout_virtual_bases): Likewise.
1073         (warn_about_ambiguous_direct_bases): Likewise.
1074         (is_base_of_enclosing_class): Likewise.
1075         (add_vcall_offset_vtbl_entries_1): Likewise.
1076         * cvt.c (build_up_reference): Adjust comment.
1077         * init.c (build_member_call): Reformat.
1078         * search.c (get_binfo): Remove.
1079         (get_base_distance_recursive): Remove.
1080         (get_base_distance): Remove.
1081         (lookup_base_r): Tweak.
1082         (lookup_base): Add ba_quiet control. Complete the types here.
1083         (covariant_return_p): Use lookup_base.
1084         * tree.c (binfo_value): Remove.
1085         (maybe_dummy_object): Use lookup_base.
1086         * typeck.c (build_static_cast): Use lookup_base.
1087         (get_delta_difference): Likewise.
1088         * typeck2.c (binfo_or_else): Use lookup_base.
1089         (build_scoped_ref): Add back error_mark_check.
1090         (build_m_component_ref): Use lookup_base.
1092 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
1094         * Make-lang.in (c++.generated-manpages): New dummy target.
1096 Tue Nov 27 09:03:47 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1098         * Make-lang.in (cp-lang.o): Depends on c-common.h.
1099         * cp-lang.c (c-common.h): Include.
1100         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
1101         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
1102         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
1104 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
1106         * decl2.c (c_language): Move to c-common.c.
1107         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
1108         functions.
1109         (cxx_init): Update.
1111 2001-11-26  Jason Merrill  <jason@redhat.com>
1113         * call.c (joust): Remove COND_EXPR hack.
1115 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
1117         * search.c (lookup_base_r): Declare bk in variable declaration
1118         space.
1120 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
1122         PR g++/3145
1123         * class.c (build_vbase_pointer): Remove.
1124         (build_vbase_path): Remove.
1125         (build_base_path): New function.
1126         * cp-tree.h (base_access, base_kind): New enumerations.
1127         (build_base_path): Declare.
1128         (convert_pointer_to_real): Remove.
1129         (convert_pointer_to): Remove.
1130         (lookup_base): Declare.
1131         (convert_pointer_to_vbase): Remove.
1132         * call.c (build_scoped_method_call): Use lookup_base &
1133         build_base_path instead of convert_pointer_to_real,
1134         get_base_distance & get_binfo.
1135         (build_over_call): Likewise.
1136         * cvt.c (cp_convert_to_pointer): Likewise.
1137         (convert_to_pointer_force): Likewise.
1138         (build_up_reference): Likewise.
1139         (convert_pointer_to_real): Remove.
1140         (convert_pointer_to): Remove.
1141         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
1142         instead of convert_pointer_to_vbase & build_vbase_path.
1143         (emit_base_init): Use build_base_path instead of
1144         convert_pointer_to_real.
1145         (expand_virtual_init): Lose unrequired conversions.
1146         (resolve_offset_ref): Use lookup_base and build_base_path
1147         instead of convert_pointer_to.
1148         * rtti.c (build_dynamic_cast_1): Use lookup_base &
1149         build_base_path instead of get_base_distance & build_vbase_path.
1150         * search.c (get_vbase_1): Remove.
1151         (get_vbase): Remove.
1152         (convert_pointer_to_vbase): Remove.
1153         (lookup_base_recursive): New function.
1154         (lookup_base): New function.
1155         * typeck.c (require_complete_type): Use lookup_base &
1156         build_base_path instead of convert_pointer_to.
1157         (build_component_ref): Likewise.
1158         (build_x_function_call): Likewise.
1159         (get_member_function_from_ptrfunc): Likewise.
1160         (build_component_addr): Likewise.
1161         * typeck2.c (build_scoped_ref): Likewise.
1163 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1165         * cp-tree.h (CP_TYPE_QUALS): Removed.
1166         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
1167         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
1168         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
1169         * dump.c (cp_dump_tree): Use void* dump_info argument to match
1170         lang-hooks prototype.
1171         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
1172         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
1173         CP_TYPE_QUALS changed to cp_type_quals.
1174         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
1175         (CXX_C_OBJS): Remove c-dump.o.
1177 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
1179         PR c++/3637
1180         * pt.c (lookup_template_class): Ensure that all specializations
1181         are registered on the list corresponding to the most general
1182         template.
1184 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
1186         * call.c (non_reference): Add documentation.
1187         (convert_class_to_reference): Do not strip reference types
1188         from conversion operators.
1189         (maybe_handle_ref_bind): Simplify.
1190         (compare_ics): Correct handling of references.
1192 2001-11-19  John Wilkinson <johnw@research.att.com>
1194         * dump.c (dump_op): New function.
1195         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
1196         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
1197         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
1199 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
1201         PR4629
1202         * semantics.c (finish_sizeof): Make sure that expression created
1203         while processing a template do not have a type.
1204         (finish_alignof): Likewise.
1205         * typeck.c (c_sizeof): Likewise.
1206         (expr_sizeof): Likewise.
1208 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
1210         * lex.c (cxx_finish): Call c_common_finish.
1211         (finish_parse): Remove.
1213 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1215         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
1216         when displaying error message about missing array bounds.
1218 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1220         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
1221         CONST_CAST_EXPR.
1222         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
1224 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
1226         * cp-tree.h (print_class_statistics): Restore.
1228 2001-11-15  Jason Merrill  <jason@redhat.com>
1230         * method.c (use_thunk): Don't emit debugging information for thunks.
1232         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
1233         * decl.c (make_typename_type): Handle getting a class template.
1234         * search.c (lookup_field_r): A class template is good enough for
1235         want_type.
1237         * call.c (convert_like_real): Only use cp_convert for the bad part.
1238         (standard_conversion): Also allow bad int->enum.
1239         * typeck.c (ptr_reasonably_similar): Also allow functions to
1240         interconvert.  Pointers to same-size integers are reasonably
1241         similar.
1243         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
1244         give it void type.
1246 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
1248         PR g++/3154
1249         * init.c (sort_base_init): Remove unreachable code.
1250         (expand_member_init): Adjust comment to reflect reality. Simplify
1251         and remove unreachable code.
1253 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
1255         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
1256         (cxx_init): Update prototype.
1257         * decl.c (init_decl_processing): Rename.  Move null node init
1258         to its creation time.
1259         * lex.c (cxx_init_options): Update.
1260         (cxx_init): Combine with old init_parse; also call
1261         cxx_init_decl_processing.
1263 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
1265         * decl.c (check_initializer): Try to complete the type of an
1266         array element before checking whether it's complete.  Don't
1267         complain about arrays with complete element types but an
1268         unknown size.
1269         (cp_finish_decl): Build the hierarchical constructor before
1270         calling maybe_deduce_size_from_array_init.
1272 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
1274         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
1276 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
1278         PR g++/4206
1279         * parse.y (already_scoped_stmt): Remove.
1280         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
1282 2001-11-12  H.J. Lu <hjl@gnu.org>
1284         * cvt.c (ocp_convert): Don't warn the address of a weak
1285         function is always `true'.
1287 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
1289         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
1290         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
1291         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
1292         * cp-tree.h (print_class_statistics): Remove.
1293         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
1294         cxx_print_identifier, cxx_set_yydebug): New.
1295         * lex.c (set_yydebug): Rename c_set_yydebug.
1296         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
1297         lang_print_xnode): Rename.
1298         * tree.c (print_lang_statistics): Rename.
1300 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1302         * class.c (dump_array): Fix format specifier warning.
1304 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
1306         * cp-lang.c (LANG_HOOKS_NAME): Override.
1307         (struct lang_hooks): Constify.
1308         * lex.c (cxx_init_options): Update.
1309         (lang_identify): Remove.
1310         * parse.y (language_string): Remove.
1312 2001-11-08  Andreas Franck  <afranck@gmx.de>
1314         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
1315         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
1316         suggested by autoconf.
1317         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
1318         (c++.install-common): Use the transformed target alias names.
1320 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
1322         * Make-lang.in: Update.
1323         * cp-lang.c: Include langhooks-def.h.
1325 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1327         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
1329 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1331         * lex.c (copy_lang_type): Add static prototype.
1333 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1335         * pt.c (unify): Handle SCOPE_REF.
1337 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
1339         * tree.c (cp_copy_res_decl_for_inlining): Adjust
1340         DECL_ABSTRACT_ORIGIN for the return variable.
1342 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
1344         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
1346 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
1348         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
1349         semantics.c, spew.c: Fix spelling errors.
1351 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1353         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
1355 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
1357         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
1358         pop_everything.
1360 Tue Oct 23 14:00:20 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1362         * cp-lang.c (cxx_get_alias_set): New function.
1363         Point LANG_HOOKS_GET_ALIAS_SET to it.
1365 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1367         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
1368         * cp-tree.h (make_unbound_class_template): Prototype new function.
1369         * decl.c (make_unbound_class_template): New function.
1370         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
1371         * error.c (dump_type): Likewise.
1372         * mangle.c (write_type): Likewise.
1373         * parse.y (template_parm): Likewise.
1374         (template_argument): Use make_unbound_class_template.
1375         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
1376         (tsubst): Likewise.
1377         (tsubst_copy): Likewise.
1378         (unify): Likewise.
1379         * tree.c (walk_tree): Likewise.
1380         * typeck.c (comptypes): Likewise.
1382 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1384         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
1385         extra calls into fewer ones.
1387 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
1389         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
1390         Warn when merging inline with attribute noinline.
1391         (start_decl, start_function): Warn if inline and attribute
1392         noinline appear in the same declaration.
1394 2001-10-16  H.J. Lu <hjl@gnu.org>
1396         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
1397         for tree checking disabled.
1399 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
1401         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
1402         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
1404 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
1406         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
1407         (unify): Only handle MINUS_EXPR specially if the above flag is set
1408         and the subtracted constant is 1.  Clear the flag on recursive calls.
1409         Set it when unifying the maximum value in an INTEGER_TYPE's range.
1411 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
1413         * decl.c (bad_specifiers): Don't allow exception specifications
1414         on any typedefs.
1416 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
1418         * cp/lex.c (init_cp_pragma): Similarly.
1420 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1422         * pt.c (lookup_template_class): Build complete template arguments
1423         for BOUND_TEMPLATE_TEMPLATE_PARM.
1425 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1427         * cp-tree.h (TYPE_BINFO): Update comment.
1428         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
1429         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
1430         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
1431         (copy_type): Prototype new function.
1432         * lex.c (copy_lang_decl): Gather tree node statistics.
1433         (copy_lang_type): New function.
1434         (copy_type): Likewise.
1435         (cp_make_lang_type): Create lang_type for
1436         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
1437         and BOUND_TEMPLATE_TEMPLATE_PARM.
1438         * pt.c (tsubst): Use copy_type instead of copy_node.
1439         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
1441 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1443         * pt.c (determine_specialization): Ignore functions without
1444         DECL_TEMPLATE_INFO.
1446 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
1448         PR g++/4476
1449         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
1451 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
1453         * typeck2.c (store_init_value): Don't re-digest a bracketed
1454         initializer.
1456         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
1457         ANON_AGGR_TYPE_P.
1459 2001-10-11  Richard Henderson  <rth@redhat.com>
1461         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
1462         of an asm statement.
1463         (build_vtbl_ref_1): Split out from build_vtbl_ref.
1464         (build_vfn_ref): Use it to handle vtable descriptors before
1465         calling build_vtable_entry_ref.
1466         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
1468 2001-10-10  Richard Henderson  <rth@redhat.com>
1470         * parse.y (asm_operand): Allow named operands.
1471         * semantics.c (finish_asm_stmt): Tweek for changed location
1472         of the operand constrant.
1474 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
1476         * call.c (standard_conversion): Add bad conversion between
1477         integers and pointers.
1478         (convert_like_real): Don't use convert_for_initialization for bad
1479         conversions; complain here and use cp_convert.
1480         (build_over_call): Don't handle bad conversions specially.
1481         (perform_implicit_conversion): Allow bad conversions.
1482         (can_convert_arg_bad): New fn.
1483         * cp-tree.h: Declare it.
1484         * typeck.c (convert_for_assignment): Use it.
1485         (ptr_reasonably_similar): Any target type is similar to void.
1487 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
1489         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
1490         (cp/cp-lang.o): New rule.
1491         * cp-tree.h: Declare hooks.
1492         * tree.c: Make hooks non-static.
1493         (init_tree): Don't initialize hooks here.
1494         * lex.c: Likewise.  Move definition of lang_hooks to...
1495         * cp-lang.c: ... new file.
1497 2001-10-08  Richard Henderson  <rth@redhat.com>
1499         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
1500         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
1502 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1504         * class.c (build_vtable_entry_ref): Const-ify.
1505         * decl.c (predefined_identifier,
1506         initialize_predefined_identifiers): Likewise.
1507         * init.c (build_new_1): Likewise.
1508         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
1509         Likewise.
1511 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
1513         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
1514         (INSNS_PER_STMT): Likewise.
1515         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
1516         (copy_body, initialize_inlined_parameters): Likewise.
1517         (declare_return_variable, inlinable_function_p): Likewise.
1518         (expand_call_inline, expand_calls_inline): Likewise.
1519         (optimize_inline_calls, clone_body): Likewise.
1520         * tree.c (walk_tree): Moved to ../tree-inline.c.
1521         (walk_tree_without_duplicates): Likewise.
1522         (copy_tree_r, remap_save_expr): Likewise.
1524 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
1526         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
1527         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
1528         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
1529         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
1530         (flag_inline_trees): Moved declaration to ../tree-inline.h.
1531         (walk_tree): Moved declaration to ../tree-inline.h.
1532         (walk_tree_without_duplicates, copy_tree_r): Likewise.
1533         (remap_save_expr): Likewise.
1534         * decl.c: Include tree-inline.h.
1535         (lang_mark_tree): Don't mark inlined_fns.
1536         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
1537         * optimize.c: Include tree-inline.h.
1538         (optimize_inline_calls): Move declaration to ../tree.h, as
1539         non-static.
1540         (remap_decl): Use language-independent constructs and hooks.
1541         (remap_block, copy_body_r, declare_return_variable): Likewise.
1542         (inlinable_function_p): Likewise.  Don't test for
1543         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
1544         no longer language-specific.
1545         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
1546         call of dump_function to...
1547         (optimize_function): Here...
1548         (clone_body): New function, extracted from...
1549         (maybe_clone_body): ... here.  Build decl_map locally and pass
1550         it on to clone_body.
1551         * pt.c, semantics.c: Include tree-inline.h.
1552         * tree.c: Likewise.
1553         (cp_walk_subtrees): New language-specific hook for tree inlining.
1554         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
1555         cp_is_overload_p, cp_auto_var_in_fn_p,
1556         cp_copy_res_decl_for_inlining): Likewise.
1557         (walk_tree): Move language-specific constructs into...
1558         (cp_walk_subtrees): this new function.
1559         (copy_tree_r): Use language-independent constructs and hooks.
1560         (init_tree): Initialize tree inlining hooks.
1561         (remap_save_expr): Adjust prototype so that the declaration
1562         does not require the definition of splay_tree.
1564 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
1566         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
1567         to build the declaration instead of the declaration itself.
1569 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
1571         * decl2.c (cxx_decode_option): Add 'else'.
1573         * spew.c (end_input): No longer static.
1574         * cp-tree.h: Declare it.
1575         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
1577 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
1579         * call.c (build_over_call), typeck.c (build_function_call_real):
1580         Pass type attributes to check_function_format rather than name or
1581         assembler name.  Don't require there to be a name or assembler
1582         name to check formats.
1584 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
1586         * decl.c (init_decl_processing): Don't call
1587         init_function_format_info.  Initialize lang_attribute_table
1588         earlier.
1589         (builtin_function): Call decl_attributes.
1590         (insert_default_attributes): New.
1592 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
1594         * decl.c (grokdeclarator): Copy array typedef handling from C
1595         frontend.
1597         * decl.c (grokdeclarator): Copy too-large array handling from C
1598         frontend.
1600 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
1602         * config-lang.in (target_libs): Added target-gperf, so that we
1603         don't try to build it if C++ is disabled.
1605 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
1607         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
1608         (cp/errfn.o): Delete rule.
1609         (cp/error.o): Depend on flags.h.
1610         * errfn.c: Delete file.
1611         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
1612         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
1613         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
1614         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
1615         internal_error respectively.  Make cp_deprecated into a macro.
1616         Don't define cp_printer typedef or declare cp_printers.
1617         * error.c: Include flags.h.
1618         Delete: struct tree_formatting_info, print_function_argument_list,
1619         print_declaration, print_expression, print_function_declaration,
1620         print_function_parameter, print_type_id, print_cv_qualifier_seq,
1621         print_type_specifier_seq, print_simple_type_specifier,
1622         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
1623         print_parameter_declaration_clause, print_exception_specification,
1624         print_nested_name_specifier, and definition of cp_printers.
1625         (locate_error): New function.
1626         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
1627         rewritten in terms of locate_error and diagnostic.c.
1628         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
1629         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
1630         (init_error): Adjust to match.
1632 Sat Sep 22 09:15:31 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1634         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
1636 2001-09-21  Richard Henderson  <rth@redhat.com>
1638         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
1639         (build_vtbl_initializer): Likewise.
1640         (build_vfn_ref): New.
1641         * cp-tree.h: Declare it.
1642         * call.c (build_over_call): Use it.
1643         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
1644         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
1646 Fri Sep 21 08:16:19 2001  J"orn Rennecke <amylaar@redhat.com>
1648         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
1650 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
1652         Table-driven attributes.
1653         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
1654         * decl2.c (cplus_decl_attributes): Only take one attributes
1655         parameter.
1656         * cp-tree.c (cplus_decl_attributes): Update prototype.
1657         * class.c (finish_struct), decl.c (start_decl, start_function),
1658         decl2.c (grokfield), friend.c (do_friend), parse.y
1659         (parse_bitfield): Update calls to cplus_decl_attributes.
1660         * decl.c (grokdeclarator): Take a pointer to a single ordinary
1661         attribute list.
1662         * decl.h (grokdeclarator): Update prototype.
1663         * decl2.c (grokfield): Take a single ordinary attribute list.
1664         * friend.c (do_friend): Likewise.
1665         * decl.c (shadow_tag, groktypename, start_decl,
1666         start_handler_parms, grokdeclarator, grokparms, start_function,
1667         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
1668         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
1669         (process_template_parm, do_decl_instantiation): Pass single
1670         ordinary attribute lists around.
1671         * decl.c (grokdeclarator): Correct handling of nested attributes.
1672         Revert the patch
1673         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
1674                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
1675                 not the left.
1676         .
1677         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
1678         (cp_attribute_table): Declare.
1679         * decl.c (valid_lang_attribute): Don't define.
1680         (lang_attribute_table): Define.
1681         (init_decl_processing): Initialize lang_attribute_table instead of
1682         valid_lang_attribute.
1683         * tree.c (cp_valid_lang_attribute): Remove.
1684         (handle_java_interface_attribute, handle_com_interface_attribute,
1685         handle_init_priority_attribute): New functions.
1686         (cp_attribute_table): New array.
1687         * decl2.c (import_export_class): Don't use
1688         targetm.valid_type_attribute.
1690 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
1692         * Make-lang.in (cp/error.o): Depend on real.h
1693         * error.c: #include "real.h"
1695 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1697         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
1698         xmalloc/strcpy/strcat.
1700 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1702         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
1703         Const-ification.
1704         * pt.c (tsubst_decl): Likewise.
1706 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1708         * decl2.c (lang_f_options): Const-ification.
1709         * lex.c (cplus_tree_code_name): Likewise.
1710         * spew.c (yyerror): Likewise.
1712 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
1714         PR c++/3986
1715         * class.c (force_canonical_binfo_r): Check & move an indirect
1716         primary base first.
1717         (force_canonical_binfo): Check that it's not already
1718         canonical.
1719         (mark_primary_virtual_base): Remove BINFO parameter.
1720         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
1722 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
1724         Remove TYPE_NONCOPIED_PARTS.
1725         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
1726         CLASSTYPE_PURE_VIRTUALS.
1727         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
1728         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
1729         (layout_class_type): Don't call fixup_inline_methods here ...
1730         (finish_struct_1): ... call it here.
1732 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
1734         * decl.c (duplicate_decls): Remove code deadling with
1735         DECL_SAVED_INSNS.
1736         * decl2.c (finish_file): Likewise.
1737         * pt.c (instantiate_decl): Likewise.
1738         * semantics.c (expand_body): Don't defer local functions if
1739         they wouldn't be deferred for some other reason.  Don't
1740         generate RTL for functions that will not be emitted.
1741         (genrtl_start_function): Remove code deadling with
1742         DECL_SAVED_INSNS.
1743         (genrtl_finish_function): Likewise.
1745 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
1747         PR c++/4203
1748         * call.c (build_over_call): Do not optimize any empty base
1749         construction.
1751 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1753         * error.c (dump_template_decl): Output template parameters
1754         together with their specifiers.
1755         Output `class' prefix for template template parameter.
1756         (dump_decl): Fix formatting.
1758 2001-08-30  Kurt Garloff  <garloff@suse.de>
1760         * optimize.c (inlinable_function_p): Allow only smaller single
1761         functions. Halve inline limit after reaching recursive limit.
1763 2001-08-30  Joern Rennecke <amylaar@redhat.com>
1764             Jason Merrill  <jason_merrill@redhat.com>
1766         * class.c (build_vtable_entry_ref): Subtract in char*, not
1767         ptrdiff_t.
1769 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
1771         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
1772         (build_cplus_array_type): Use cp_build_qualified_type, not
1773         TYPE_MAIN_VARIANT, to get an unqualified version.
1775         * decl2.c (grok_alignof): Lose.
1776         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
1777         * typeck.c (c_alignof): Lose.
1778         * semantics.c (finish_sizeof, finish_alignof): New.
1779         * parse.y: Use them.
1780         * cp-tree.h: Declare them.
1782 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
1784         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
1785         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
1786         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
1788 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
1790         * typeck2.c (add_exception_specifier): Only require complete type if
1791         not in processing template declaration.
1793 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1795         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
1796         GNU_xref_start_scope and GNU_xref_end_scope.
1798         * tree.c (TYPE_HASH): Moved to ../tree.h.
1800 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
1802         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
1803         on COMPOUND_EXPRs.
1805 2001-08-14  Richard Henderson  <rth@redhat.com>
1807         * class.c, cp-tree.h (build_vfn_ref): Remove.
1808         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
1810 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
1812         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
1813         empty class assignment as having side-effects to avoid
1814         spurious warnings.
1816 2001-08-13  Zack Weinberg  <zackw@panix.com>
1818         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
1819         * except.c: Include libfuncs.h.
1821 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
1823         * decl.c (grokdeclarator): Clarify diagnostic message.
1825 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1827         * decl2.c (do_nonmember_using_decl): Replace using directive
1828         with using declaration in the error message.
1830 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1832         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
1833         criterion to avoid rebuilding expression tree instead of
1834         processing_template_decl.
1836 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
1838         Support named return value optimization for inlines, too.
1839         * decl.c (finish_function): Nullify returns here.
1840         * semantics.c (genrtl_start_function): Not here.
1841         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
1842         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
1843         Also nullify the CLEANUP_STMT for the nrv.
1844         * cp-tree.h: Declare it.
1845         * optimize.c (declare_return_variable): Replace the nrv with the
1846         return variable.
1847         * typeck.c (check_return_expr): Be more flexible on alignment check.
1848         Ignore cv-quals when checking for a matching type.
1850 2001-08-09  Richard Henderson  <rth@redhat.com>
1852         * decl2.c (finish_objects): Use target hooks instead of
1853         assemble_constructor and assemble_destructor.
1855 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
1857         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
1859 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
1861         PR c++/3820
1862         Stop using TYPE_NONCOPIED_PARTS.
1863         * call.c (build_over_call): Be careful when copy constructing
1864         or assigning to an empty class.
1865         * class.c (check_bases_and_members): It has a
1866         COMPLEX_ASSIGN_REF if it has a vptr.
1867         (layout_class_type): Don't add empty class padding to
1868         TYPE_NONCOPIED_PARTS.
1869         (finish_struct_1): Don't add the VFIELD either.
1870         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
1871         initialization.
1873 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
1875         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
1877 2001-08-06  Richard Henderson  <rth@redhat.com>
1879         * decl2.c (finish_objects): Pass a symbol_ref and priority to
1880         assemble_{constructor,destructor}.  Remove priority handling.
1882 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
1884         Don't allow template-id in using-declaration.
1885         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
1886         (do_class_using_decl): Likewise.
1888 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
1890         * cp/spew.c (read_token): No need to pop buffers.
1892 2001-08-02  Stan Shebs  <shebs@apple.com>
1894         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
1895         (fnaddr_from_vtable_entry): Remove decl.
1896         * method.c (use_thunk): Update comment.
1898 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
1900         * repo.c (get_base_filename): Change return value to const char
1901         pointer.
1903 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
1905         Kill -fhonor-std.
1906         * NEWS: Document.
1907         * cp-tree.h (flag_honor_std): Remove.
1908         (CPTI_FAKE_STD): Remove.
1909         (std_node): Remove comment about it being NULL.
1910         (fake_std_node): Remove.
1911         * decl.c (in_fake_std): Remove.
1912         (walk_namespaces_r): Remove fake_std_node check.
1913         (push_namespace): Remove in_fake_std code.
1914         (pop_namespace): Likewise.
1915         (lookup_name_real): Remove fake_std_node check.
1916         (init_decl_processing): Always create std_node. Always add
1917         std:: things there.
1918         (builtin_function): Always put non '_' fns in std.
1919         * decl2.c (flag_honor_std): Remove.
1920         (lang_f_options): Remove honor-std.
1921         (unsupported_options): Add honor-std.
1922         (set_decl_namespace): Remove fake_std_node check.
1923         (validate_nonmember_using_decl): Likewise.
1924         (do_using_directive): Likewise.
1925         (handle_class_head): Likewise.
1926         * dump.c (cp_dump_tree): Likewise.
1927         * except.c (init_exception_processing): Adjust.
1928         * init.c (build_member_call): Remove fake_std_node check.
1929         (build_offset_ref): Likewise.
1930         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
1931         * rtti.c (init_rtti_processing): Adjust.
1933 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
1935         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
1936         operand while calling cp_tree_equal.
1938 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
1940         The 3.0 ABI no longer has vbase pointer fields.
1941         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
1942         FORMAT_VBASE_NAME): Remove.
1943         * method.c (do_build_copy_constructor): Adjust.
1944         (do_build_assign_ref): Adjust.
1945         * search.c (lookup_field_r): Adjust.
1946         * typeck.c (build_component_ref): Adjust.
1948         The 3.0 ABI always has a vtable pointer at the start of every
1949         polymorphic class.
1950         * rtti.c (build_headof_sub): Remove.
1951         (build_headof): Adjust.
1952         (get_tinfo_decl_dynamic): No need to check flag_rtti
1953         here. Adjust.
1954         (create_real_tinfo_var): Explain why we need a hidden name.
1956 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
1958         PR c++/3631
1959         * class.c (update_vtable_entry_for_fn): The fixed adjustment
1960         of a virtual thunk should be from declaring base.
1962 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
1964         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
1965         the shared virtual base, so preserving inheritance graph order.
1967 2001-07-30  Andreas Jaeger  <aj@suse.de>
1969         * decl2.c: Remove unused var global_temp_name_counter.
1971 2001-07-28  Richard Henderson  <rth@redhat.com>
1973         * method.c (pending_inlines): Remove.
1975 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
1977         * class.c (mark_primary_virtual_base): Don't adjust base
1978         offsets here.
1979         (dfs_unshared_virtual_bases): Adjust them here.
1980         (mark_primary_bases): Explain why we adjust at the end.
1982 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
1984         * class.c (finish_struct_1): When copying the primary base's
1985         VFIELD, make sure we find it is at offset zero.
1987 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1989         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
1990         tsubst_expr for default template arguments.
1992 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
1994         PR c++/3621
1995         * spew.c (yylex): Only copy the token's lineno, if it is
1996         non-zero.
1998 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
2000         PR c++/3624
2001         * call.c (resolve_args): Simplify, call
2002         convert_from_reference.
2003         (build_new_op): Resolve and convert from reference ARG1
2004         earlier. Adjust ARG2 & ARG3 resolve and conversion.
2006 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
2008         * decl.c (last_function_parm_tags): Remove.
2009         (current_function_parm_tags): Remove.
2010         (init_decl_processing): Adjust.
2011         (start_function): Adjust.
2012         (store_parm_decls): Adjust.
2014         PR c++/3152
2015         * decl.c (grokdeclarator): Detect when a function typedef is
2016         declaring a function, and create last_function_parms correctly.
2018 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
2020         * call.c (joust): Only prefer a non-builtin candidate to a builtin
2021         one if they have the same signature.
2023         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
2024         it rather than toplevel_bindings_p.  Give it a mangled name if static.
2025         (convert_to_reference): Adjust.
2026         * decl2.c (get_temp_name): Lose.
2027         * mangle.c (mangle_ref_init_variable): New fn.
2028         (mangle_guard_variable): Strip the ref-init header.
2029         * cp-tree.h: Adjust.
2030         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
2031         initializer.
2032         (grok_reference_init): Always use DECL_INITIAL.
2034 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2036         PR c++/3416
2037         * call.c (build_conditional_expr): Recheck args after
2038         conversions.
2039         * cp-tree.h (build_conditional_expr): Move to correct file.
2040         * typeck.c (decay_conversion): Diagnose any unknown types
2041         reaching here.
2042         (build_binary_op): Don't do initial decay or default
2043         conversions on overloaded functions.
2044         (build_static_cast): Don't do a decay conversion here.
2046 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2048         PR c++/3543
2049         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
2050         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
2052 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2054         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
2055         (create_vtbl_ptr): ... here.
2057 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2059         * class.c (build_vbase_offset_vbtl_entries): Look for
2060         non-primary base of which we are a sub vtable.
2062 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
2064         * semantics.c (finish_this_expr):  Remove unused code.
2066 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
2068         Simplify rtti, now we've only one ABI.
2069         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
2070         CPTI_TINFO_VAR_ID.
2071         (tinfo_decl_id, tinfo_var_id): Remove.
2072         (get_typeid_1): Remove.
2073         * rtti.c
2074         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
2075         (typeid_ok_p): New function.
2076         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
2077         (get_tinfo_decl): Remove old abi documentation.
2078         (tinfo_from_decl): Remove.
2079         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
2080         (get_typeid_1): Remove.
2081         (get_base_offset): Remove.
2082         (synthesize_tinfo_var): Absorb get_base_offset.
2083         (create_real_tinfo_var): Don't use tinfo_decl_id.
2085 2001-07-23  Graham Stott  <grahams@redhat.com>
2087         * cp/class.c (type_requires_array_cookie): Fix use of uninitialised
2088         variable has_two_argument_delete_p.
2090 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
2092         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
2093         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
2094         (CPTI_INDEX_IDENTIFIER): Remove.
2095         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
2096         (delta2_identifier): Remove.
2097         (index_identifier): Remove.
2098         (pfn_or_delta2_identifier): Remove.
2099         (flag_vtable_thunks): Remove.
2100         (VTABLE_DELTA2_NAME): Remove.
2101         (VTABLE_INDEX_NAME): Remove.
2102         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
2103         (vfunc_ptr_type_node): Adjust.
2104         (VTABLE_NAME_PREFIX): Adjust.
2105         (build_vfn_ref): Lose first parameter.
2106         (fixup_all_virtual_upcast_offsets): Remove.
2107         * decl.c (initialize_predefined_identifiers): Remove
2108         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
2109         (init_decl_processing): Remove no-vtable-thunk code.
2110         * decl2.c (flag_vtable_thunks): Remove.
2111         (mark_vtable_entries): Remove no-vtable-thunk code.
2112         * error.c (dump_decl): Remove no-vtable-thunk code.
2113         (dump_expr): Adjust ptr to member function code.
2114         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
2115         code.
2116         * rtti.c (build_headof): Remove no-vtable-thunk code.
2117         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
2118         * search.c (get_base_distance): Remove expand_upcast_fixups case.
2119         (virtual_context) Remove.
2120         (expand_upcast_fixups): Remove.
2121         (fixup_virtual_upcast_offsets): Remove.
2122         (fixup_all_virtual_upcast_offsets): Remove.
2123         * typeck.c (get_member_function_from_ptrfunc): Remove
2124         no-vtable-thunk code.
2125         * call.c (build_over_call): Adjust call to build_vfn_ref.
2126         * class.c (build_vfn_ref): Lose first parameter. Remove
2127         no-vtable-thunk code.
2128         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
2129         (build_vtable_entry): Remove no-vtable-thunk code.
2131 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
2133         Remove old-abi remnants. Remove comments about old abi
2134         behaviour. Remove references to 'new-abi' in comments.
2135         * cp-tree.h: Adjust comments.
2136         (vbase_offsets_in_vtable_p): Delete.
2137         (vcall_offsets_in_vtable_p): Delete.
2138         (vptrs_present_everywhere_p): Delete.
2139         (all_overridden_vfuns_in_vtables_p): Delete.
2140         (merge_primary_and_secondary_vtables_p): Delete.
2141         (TYPE_CONTAINS_VPTR_P): Adjust.
2142         (VTT_NAME_PREFIX): Remove.
2143         (CTOR_VTBL_NAME_PREFIX): Remove.
2144         (init_vbase_pointers): Remove.
2145         * class.c: Adjust coments.
2146         (build_vbase_pointer_fields): Delete.
2147         (build_vbase_pointer): Remove old-abi code.
2148         (build_secondary_vtable): Likewise.
2149         (modify_all_vtables): Likewise.
2150         (create_vtable_ptr): Likewise.
2151         (layout_class_type): Likewise.
2152         (finish_struct_1): Likewise.
2153         (finish_vtbls): Likewise.
2154         (dfs_finish_vtbls): Delete.
2155         (build_vbase_offset_vtbl_entries): Remove old-abi code.
2156         * cvt.c: Adjust comments.
2157         * decl.c: Adjust comments.
2158         * decl2.c: Adjust comments.
2159         * init.c: Adjust comments.
2160         (construct_virtual_bases): Remove old-abi code.
2161         * lang-specs.h: Remove -fno-new-abi.
2162         * mangle.c: Adjust comments.
2163         * rtti.c: Adjust comments.
2164         (get_base_offset): Remove old-abi-code.
2165         * search.c: Adjust comments.
2166         (dfs_init_vbase_pointers): Remove.
2167         (dfs_vtable_path_unmark): Remove.
2168         (init_vbase_pointers): Remove.
2169         * semantics.c: Adjust comments.
2170         (emit_associated_thunks): Remove old-abi code.
2171         * typeck.c: Adjust comments.
2173 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
2175         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
2176         params.h.
2178 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
2180         * class.c (finish_struct_anon): Forbid nested classes.
2182 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
2184         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
2185         * optimize.c: Include debug.h.
2186         (maybe_clone_body): Use debug hook.
2187         * semantics.c: Include debug.h.
2188         (expand_body): Use debug hook.
2190 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
2192         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
2194 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
2196         * class.c (type_requires_array_cookie): New function.
2197         (check_methods): Don't try to figure out whether the type needs a
2198         cookie here.
2199         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
2200         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
2201         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
2202         * pt.c (instantiate_class_template): Don't set
2203         TYPE_VEC_DELETE_TAKES_SIZE.
2204         * NEWS: Document ABI changes from GCC 3.0.
2206 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
2207             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
2209         * NEWS (Changes in GCC 3.0): Fix typo.
2211 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
2213         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
2214         which attributes are to be attached, and a flags argument.  Update
2215         call to decl_attributes.
2216         (grokfield): Update call to decl_attributes.
2217         * class.c (finish_struct): Update call to cplus_decl_attributes.
2218         * cp-tree.h (cplus_decl_attributes): Update prototype.
2219         * decl.c (start_decl, grokdeclarator, start_function): Update
2220         calls to decl_attributes and cplus_decl_attributes.
2221         * friend.c (do_friend): Update call to cplus_decl_attributes.
2222         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
2224 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
2226         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
2227         for `register' variables with an asm-specification.
2229 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
2231         * semantics.c (finish_asm_stmt): Mark the output operands
2232         to an asm addressable, if necessary.
2234 2001-07-11  Ben Elliston  <bje@redhat.com>
2236         * Revert this change -- there is a subtle bug.
2238         PR c++/80
2239         * decl.c (finish_enum): New "attributes" argument; pass it to
2240         cplus_decl_attributes.  Use a narrower type if the enum is packed.
2241         * cp-tree.h (finish_enum): Adjust prototype.
2242         * parse.y (enum_head): New non-terminal.
2243         (structsp): Use it. Enums now may be preceded or followed by
2244         optional attributes -- pass their chained tree to finish_enum().
2245         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
2247 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
2249         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
2250         variables.
2252 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
2254         * semantics.c (cp_expand_stmt): Fix for null
2255         current_function_return_value.
2257 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
2259         * call.c (build_op_delete_call): Initialize fn.
2260         (convert_like_real): Delete conditional.
2261         (joust): Initialize *w and *l.
2262         * class.c: Add prototype for binfo_ctor_vtable.
2263         (get_primary_binfo): Initialize result.
2264         * init.c (build_java_class_ref): Initialize name.
2266 2001-07-09  Erik Rozendaal  <dlr@acm.org>
2268         * typeck.c (unary_complex_lvalue): Do not duplicate the
2269         argument to modify, pre-, or post-increment when used as an
2270         lvalue and when the argument has side-effects.
2272 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
2274         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
2275         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
2276         cplus_decl_attributes even if attrs is NULL.
2277         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
2279 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
2281         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
2282         calls to decl_attributes.
2284 2001-07-06  Ira Ruben   <ira@apple.com>
2286         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
2287         be DECL_TEMPLATE_RESULT.
2289 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2291         * cp-tree.h (copy_template_template_parm): Rename to ...
2292         (bind_template_template_parm): ... here.
2293         * tree.c (copy_template_template_parm): Rename to ...
2294         (bind_template_template_parm): ... here.  Remove the case when
2295         NEWARGS is NULL_TREE.
2296         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
2297         BOUND_TEMPLATE_TEMPLATE_PARM.
2298         * pt.c (lookup_template_class): Adjust.
2300 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
2302         * cvt.c (convert_lvalue): New fn.
2303         * cp-tree.h: Declare it.
2304         * method.c (do_build_assign_ref): Use it.
2305         (do_build_copy_constructor): Convert parm to base types
2306         before calling base constructors.
2308         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
2309         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
2310         optimize.
2311         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
2313 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
2315         * optimize.c (optimize_inline_calls): New function, broken out
2316         of ...
2317         (optimize_function): ... here. Call it. Don't inline if it is
2318         a thunk.
2319         (dump_function): Print name of dump flag causing this dump.
2320         * semantics.c (expand_body): Move thunk inline check to
2321         optimize_function.
2323 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
2325         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
2326         (comptypes): Use target.comp_type_attributes.
2328 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
2330         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
2332 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
2334         * error.c (lang_print_error_function): Add a `diagnostic_context *'
2335         parameter. Tweak.
2337 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
2339         * decl2.c (import_export_class): Update.
2341 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
2343         * error.c (init_error): Adjust settings.
2345 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
2347         * error.c (init_error): Adjust settings.
2349 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
2351         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
2352         return pointers to data members by reference rather than by value.
2354 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
2356         Implement the Named Return Value optimization.
2357         * cp-tree.h (struct cp_language_function): Add x_return_value.
2358         (current_function_return_value): Now a macro.
2359         * decl.c: Don't define it.
2360         (define_label, finish_case_label): Don't clear it.
2361         (init_decl_processing): Don't register it with GC.
2362         * semantics.c (genrtl_finish_function): Don't check it for
2363         no_return_label.  Copy the RTL from the return value to
2364         current_function_return_value and walk, calling...
2365         (nullify_returns_r): ...this new fn.
2366         * typeck.c (check_return_expr): Set current_function_return_value.
2368 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
2370         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
2371         sharing a ctor vtable with.  Merge code for cases 1 and 2.
2372         (binfo_ctor_vtable): New fn.
2373         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
2375 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
2377         * class.c (dfs_find_final_overrider): Fix logic.
2379         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
2380         virtual thunk instead of non-virtual.
2381         (get_matching_virtual): Uncomment.
2383         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
2384         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
2385         PARM, not ARG.
2387 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
2389         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
2390         we've not emerged from the hierarchy of RTTI_BINFO on reaching
2391         a non-virtual base.
2393 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
2395         * NEWS: Update release number.
2397 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
2399         PR c++/3130, c++/3131, c++/3132
2400         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
2401         * class.c (force_canonical_binfo_r): Move
2402         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
2403         virtual bases unless they're primary and what they're primary
2404         too has been moved.
2405         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
2406         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
2407         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
2408         derived binfo.
2409         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
2410         (layout_nonempty_base_or_field): Add most derived type
2411         parameter. Adjust.
2412         (layout_empty_base): Likewise.
2413         (build_base_field): Likewise.
2414         (build_base_fields): Likewise.
2415         (propagate_binfo_offsets): Add most derived type
2416         parameter. Skip non canonical virtual bases too.
2417         (dfs_set_offset_for_unshared_vbases): Don't skip primary
2418         bases. Do skip canonical bases.
2419         (layout_virtual_bases): Adjust.
2420         (layout_class_type): Adjust.
2421         (dfs_get_primary_binfo): Build list of virtual primary base
2422         candidates.
2423         (get_primary_binfo): Check that the shared virtual primary
2424         base candidate was found first.
2425         (accumulate_vtbl_inits): Don't do anything for non-vptr
2426         containing binfos. For case 1 primary virtual bases, keep
2427         checking that we've not emerged from the hierarchy of RTTI_BINFO.
2429 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
2431         PR c++/3089
2432         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
2433         hierarchy looking for primary bases for a ctor
2434         vtable. Recursively call oneself, if we meet our primary via
2435         this route and haven't met it yet via inheritance graph order.
2437 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
2439         * lang-options.h: Emit documentation for -fno-honor-std, not
2440         -fhonor-std.
2442 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
2444         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
2445         Don't clobber delta.
2446         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
2448 2001-06-10  Mark Mitchell <mark@codesourcery.com>
2449             Gabriel Dos Reis  <gdr@codesourcery.com>
2451         * Make-lang.in (cp/call.o): Depend on diagnostic.h
2452         (cp/typeck.o): Depend on diagnostic.h
2453         (cp/typeck2.o): Depend on diagnostic.h
2454         (cp/repo.o): Depend on dignostic.h
2455         * typeck.c: #include diagnostic.h
2456         (convert_for_initialization): Remove extern declaration for
2457         warningcount and errorcount.
2459         * call.c: #include diagnostic.h
2460         (convert_like_real): Remove extern declaration for warnincount and
2461         errorcount.
2463         * repo.c: #include diagnostic.h
2464         * typeck2.c: #include diagnostic.h
2466 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
2468         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
2469         in previous change.
2471 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
2473         PR c++/2929
2474         * friend.c (do_friend): Use push_decl_namespace for classes at
2475         namespace scope.
2477 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
2478             Jason Merrill <jason_merrill@redhat.com>
2480         PR c++/3061
2481         * class.c (build_secondary_vtable): Use assert, rather than an error
2482         message.
2483         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
2484         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
2485         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
2486         Don't set BINFO_VTABLE for a primary virtual base.
2488 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
2490         * decl.c (duplicate_decls): Update source position information
2491         when a template function is defined.
2493 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
2495         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
2497 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
2499         PR c++/2914
2500         * decl.c (pushtag): Don't push into a complete type's scope.
2502 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
2504         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
2505         (struct lang_decl_flags): Lose generate_with_vtable_p.
2506         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
2507         * class.c (copy_virtuals): Adjust.
2508         * decl2.c (mark_vtable_entries): Adjust.
2509         * method.c (make_thunk, build_vtable_entry): Adjust.
2510         * class.c (update_vtable_entry_for_fn): Only look as far as the
2511         first defining class.
2512         (build_vtbl_initializer): Put nothing in the slot for a function only
2513         defined in a lost primary virtual base.
2514         (add_vcall_offset_vtbl_entries_1): Use the same code for
2515         the lost primary case and the normal case.
2516         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
2517         (get_vfield_offset, get_derived_offset): Lose.
2518         (dfs_find_final_overrider): Use look_for_overrides_here.
2519         (get_matching_virtual): New fn.
2520         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
2521         not BV_VCALL_INDEX.
2522         * search.c (look_for_overrides_here): Split out from...
2523         (look_for_overrides_r): Here.
2525         * class.c (find_final_overrider): Return error_mark_node on error.
2527         * decl2.c (key_method): #if 0 accidental change.
2529 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
2531         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
2532         (build_over_call): Likewise.
2533         * decl.c (grokparms): Likewise.
2534         * pt.c (tsubst_decl): Likewise.
2535         * typeck.c (convert_arguments): Likewise.
2537 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
2539         * semantics.c (begin_class_definition): Robustify.
2541         * pt.c (instantiate_decl): Tell the repository code about the
2542         clones, not the cloned functions.
2543         * repo.c (repo_template_used): Explicitly instantiate the cloned
2544         function, not the clones.
2546 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
2548         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
2549         ICS_BAD_FLAG on created conversion.
2550         (compare_ics): Break out rank.
2552 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
2554         * decl.c (xref_tag): Remove extraneous %s on dependent name
2555         lookup warning.
2557 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
2559         * class.c (layout_vtable_decl): Fix off by one error on
2560         build_index_type.
2561         (build_vtt): Likewise.
2562         (build_ctor_vtbl_group): Likewise.
2564 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
2566         * class.c (maybe_indent_hierarchy): New function.
2567         (dump_class_hierarchy_r): Add flags. Dump extra binfo
2568         information, if enabled. Use maybe_indent_hierarchy. Adjust
2569         output format.
2570         (dump_class_hierarchy): Adjust prototype. Adjust output format.
2571         (dump_array, dump_vtable, dump_vtt): New functions.
2572         (finish_struct_1): Adjust hierarchy dumping.
2573         (initialize_vtable): Call dump_vtable.
2574         (build_vtt): Call dump_vtt.
2575         (build_ctor_vtbl_group): Call dump_vtable.
2576         * decl2.c (flag_dump_class_layout): Remove.
2577         (cxx_decode_option): Remove dump translation unit
2578         and dump class hierarchy check. Call dump_switch_p.
2579         (finish_file): Adjust dumping.
2580         (dump.c): Only dump base classes if not TDF_SLIM.
2581         Only dump namespace members if not TDF_SLIM.
2582         * optimize.c (dump_function): New function.
2583         (optimize_function): Call dump_function.
2584         * semantics.c (expand_body): Use dump_enabled_p.
2586 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
2588         PR g++/2936
2589         Part missed from first commit
2590         * decl2.c (finish_anon_union): Copy context.
2592 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
2594         PR g++/2936
2595         * optimize.c (remap_decl): Remap anonymous aggregate members too.
2597 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
2599         PR g++/2823
2600         * semantics.c (expand_body): Don't optimize thunks.
2602 2001-05-25  Sam TH  <sam@uchicago.edu>
2604         * cp-tree.h lex.h: Fix header include guards.
2606 2001-05-25  Mark Mitchell <mark@codesourcery.com>
2608         * decl.c (init_decl_processing): Tweak.
2610 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
2612         * decl.c (duplicate_decls): Tidy.
2613         (init_decl_processing): Always set flag_no_builtin.
2615 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
2617         PR c++/2184
2618         * decl2.c (do_local_using_decl): Push the decls, even in a
2619         template.
2621 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
2623         * optimize.c (initialize_inlined_parameters): Don't set
2624         TREE_READONLY for a VAR_DECL taking the place of an inlined
2625         PARM_DECL.
2627 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
2629         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
2630         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
2631         attribute.
2633 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
2635         * parse.y: Refer to compound literals as such, not as
2636         constructor-expressions.
2638 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
2640         * call.c (build_op_delete_call): Ignore exception-specifications
2641         when looking for matching delete operators.
2642         * init.c (build_new_1): Compute whether or not the allocation
2643         function used is a placement allocation function or not, and
2644         communicate this information to build_op_delete_call.
2646 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
2648         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
2649         (build_vtbl_ref): Adjust.
2650         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
2651         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
2652         Re-add vtable-gc.
2653         (unsupported_options): Correspondingly.
2655         * decl2.c (maybe_make_one_only): Check flag_weak, not
2656         supports_one_only().
2658         * cp-tree.def (START_CATCH_STMT): Lose.
2659         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
2660         * tree.c (cp_statement_code_p): Don't case it.
2661         * semantics.c (cp_expand_stmt): Likewise.
2662         * cp-tree.h (START_CATCH_TYPE): Lose.
2663         (HANDLER_TYPE): New.
2664         * except.c (expand_start_catch_block): Don't start any blocks.
2665         Return the type.
2666         (expand_end_catch_block): Don't end any blocks.
2667         * parse.y (handler): Don't pass anything from finish_handler_parms
2668         to finish_handler.
2669         * pt.c (tsubst_expr): Likewise.
2670         * semantics.c (begin_handler): Call note_level_for_catch here.
2671         (finish_handler_parms): Don't return anything.
2672         (genrtl_catch_block, begin_catch_block): Lose.
2673         (genrtl_handler): Call expand_start_catch here.
2675 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
2677         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
2678         (get_vtable_decl, build_vtt): Not here.
2680 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
2682         PR c++/2781
2683         * optimize.c (update_cloned_parm): Copy addressability and other
2684         flags.
2686 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2688         * pt.c (determine_specialization): Ignore artificial functions.
2690 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
2692         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
2693         (C_RID_CODE): Remove.
2694         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
2695         (init_parse): Don't do it here.
2697 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
2699         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
2700         function declaration to avoid stripping the symbol's attributes.
2702 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
2704         * decl.c (pushdecl): Adjust error string.
2705         (xref_tag): Adjust friend class injection warning. Remove the
2706         inherited name from the class shadowed scope.
2708 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
2710         * except.c (cp_protect_cleanup_actions): New function.
2711         (init_exception_processing): Don't set protect_cleanup_actions
2712         here.  Do set lang_protect_cleanup_actions.
2714 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
2716         * spew.c (read_token): Call yyerror on all unexpected tokens.
2718 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
2720         * init.c (member_init_ok_or_else): Take a tree rather than
2721         string for name.
2722         (expand_member_init): Adjust.
2724 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
2726         * decl.c (duplicate_decls): Suppress warning about duplicate
2727         decls if the first decl is a friend.
2729 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
2731         * except.c (choose_personality_routine): Export.  Add
2732         explanatory comment.  Take an enum languages, not a boolean.
2733         (initialize_handler_parm): Adjust to match.
2734         * cp-tree.h: Prototype choose_personality_routine.
2735         * lex.c (handle_pragma_java_exceptions): New function.
2736         (init_cp_pragma): Register #pragma GCC java_exceptions.
2738 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
2740         * method.c (build_mangled_C99_name): Remove unused prototype.
2742 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
2744         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
2745         * typeck.c (get_member_function_from_ptrfunc,
2746         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
2747         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
2749         Reverted Geoff Keating's 2001-05-03's patch.
2751 2001-05-11  Ira Ruben   <ira@apple.com>
2753         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
2755 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
2757         * cp-tree.h (finish_label_expr, lookup_label): Delete.
2758         * parse.y: Update for '&&'; don't issue warning here.
2759         * semantics.c (finish_label_expr): Delete.
2761 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
2763         * splay-tree.h (splay_tree_max): New function.
2764         (splay_tree_min): Likewise.
2766 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
2768         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
2769         (pfn_vflag_identifier): Define.
2770         Update comment about layout of pointer functions.
2771         (build_ptrmemfunc1): Update prototype.
2772         (expand_ptrmemfunc_cst): Update prototype.
2773         * decl.c (initialize_predefined_identifiers): Initialize
2774         pfn_vflag_identifier.
2775         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
2776         an extra field to the type.
2777         * expr.c (cplus_expand_constant): Pass 'flag' between
2778         expand_ptrmemfunc_cst and build_ptrmemfunc1.
2779         * typeck.c (get_member_function_from_ptrfunc): When
2780         FUNCTION_BOUNDARY < 16, look at additional field to determine
2781         if a pointer-to-member is a real pointer or a vtable offset.
2782         (build_ptrmemfunc1): Add new parameter to contain extra field.
2783         (build_ptrmemfunc): Pass the extra field around.
2784         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
2785         (pfn_from_ptrmemfunc): Ignore the extra field.
2787 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
2789         * cp-tree.h (flag_inline_trees): Update documentation.
2790         * decl.c (init_decl_processing): Adjust handling of
2791         flag_inline_functions and flag_inline_trees to support -O3.
2792         (grokfndecl): Set DECL_INLINE on all functions if that's what
2793         the user requested.
2794         (save_function_data): Clear DECL_INLINE in
2795         current_function_cannot_inline is non-NULL.
2796         * decl2.c (flag_inline_trees): Update documentation.
2798 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
2800         * dump.c (cp_dump_tree, USING_STMT case): New case.
2801         * tree.c (cp_statement_code_p): Add USING_STMT.
2802         * decl2.c (do_using_directive): Add the using directive statement.
2804         * tree.c (walk_tree): Reformat an if block.
2806 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
2808         * decl.c (compute_array_index_type): Don't try to do anything with
2809         the indices when processing a template.
2811 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2813         * call.c: NULL_PTR -> NULL.
2814         * class.c: Likewise.
2815         * cvt.c: Likewise.
2816         * decl.c: Likewise.
2817         * decl2.c: Likewise.
2818         * except.c: Likewise.
2819         * init.c: Likewise.
2820         * rtti.c: Likewise.
2821         * search.c: Likewise.
2822         * tree.c: Likewise.
2823         * typeck.c: Likewise.
2824         * typeck2.c: Likewise.
2826 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
2828         * decl2.c (do_using_directive): Revert previous patch.
2830 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
2832         * cp-tree.def (USING_STMT): New statement node.
2833         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
2834         * decl2.c (do_using_directive): Add USING_STMT to statement
2835         tree. Don't emit errors when processing template decl.
2836         * pt.c (tsubst_expr, USING_STMT case): New case.
2837         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
2839 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
2841         * call.c (build_new_op): Convert args from reference here.
2842         (build_conditional_expr): Don't convert here.
2844 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
2846         * spew.c (last_token_id): New static variable.
2847         (read_token): Set it here.
2848         (yyerror): Use it here.
2850 2001-04-30  Richard Henderson  <rth@redhat.com>
2852         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
2853         * decl.c: Likewise.
2855 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
2857         * gxxint.texi: Remove.
2858         * Make-lang.in: Remove all traces of gxxint.texi.
2860 Mon Apr 30 16:14:10 2001  Mark P Mitchell  <mark@codesourcery.com>
2862         * decl2.c (start_static_initialization_or_destruction): Correct
2863         logic to handle the -fno-use-cxa-atexit case.
2865 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
2867         * optimize.c (update_cloned_parm): New function.
2868         (maybe_clone_body): Use it.  Update the `this' parameter too.
2870 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
2872         * decl2.c (unsupported_options): Add new-abi.
2873         * lang-options.h: Remove no longer supported options.
2875 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
2877         * except.c (can_convert_eh): Don't check template parms,
2878         typename types etc.
2880 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
2882         * optimize.c (maybe_clone_body): Copy parameter names and locations.
2884 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
2886         * cp-tree.h (adjust_clone_args): Prototype new function.
2887         * class.c (adjust_clone_args): New function.
2888         * decl.c (start_function): Call it for in charge ctors.
2890 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
2892         * method.c (use_thunk): Make sure that thunks really are emitted
2893         when requested.
2895 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
2897         * mangle.c (write_chars): New macro.
2898         (hwint_to_ascii): New function
2899         (write_number): Use it.
2900         (write_integer_cst): Deal with really big numbers.
2902 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
2904         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
2905         the clone.
2907 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
2909         * decl.c (grokdeclarator): Set context of namespace scope
2910         TYPE_DECLS.
2912 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
2914         * cp/optimize.c: Include hashtab.h.
2915         (struct inline_data): Add tree_pruner.
2916         (expand_call_inline, expand_calls_inline): Use it when calling
2917         walk_tree.
2918         (optimize_function): Initialize and free tree_pruner.
2920 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
2922         Lazy __FUNCTION__ generation.
2923         * cp-tree.def (FUNCTION_NAME): Remove.
2924         * cp-tree.h (function_name_declared_p): Remove.
2925         (cp_fname_init): Prototype.
2926         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
2927         don't call declare_function_name. Call start_fname_decls.
2928         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
2929         clobber the line number.
2930         (cp_fname_init): New function.
2931         (start_function): Call start_fname_decls.
2932         (finish_function): Call finish_fname_decls.
2933         * lex.c (reswords): Add slots for __FUNCTION__ et al.
2934         (rid_to_yy): Add mappings for __FUNCTION__ et al.
2935         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
2936         * parse.y (VAR_FUNC_NAME): New token.
2937         (primary): Add VAR_FUNC_NAME.
2938         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
2939         generation.
2940         (tsubst, FUNCTION_NAME case): Remove.
2941         (tsubst_copy, FUNCTION_NAME case): Remove.
2942         (tsubst_expr, DECL_STMT case): Be careful with a
2943         DECL_PRETTY_FUNCTION_P.
2944         (instantiate_decl): Remove function_name_declared_p.
2945         * semantics.c (begin_compound_statement): Don't call
2946         declare_function_name here.
2947         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
2948         (finish_translation_unit): Call finish_fname_decls.
2949         (expand_body): Remove function_name_declared_p.
2950         * typeck2.c (digest_init): Allow any ERROR_MARK.
2952 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
2954         * pt.c (tsubst_decl): Use VOID_TYPE_P.
2955         * semantics.c: Fix some typos.
2957 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
2959         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
2961 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2963         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
2965 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
2967         * except.c (build_throw): Wrap the initialization of the exception
2968         object in a MUST_NOT_THROW_EXPR.
2969         (do_free_exception): #if 0.
2971 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
2973         * cp-tree.h (finish_enum): Change prototype.
2974         * decl.c (finish_enum): Reorganize.
2975         * parse.y (structsp): Adjust calls to finish_enum.
2977 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
2979         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
2980         't' case.
2982 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
2984         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
2985         (layout_empty_base): Return at end flag.
2986         (build_base_field): Likewise.
2987         (build_base_fields): Likewise.
2988         (layout_virtual_bases): Don't add 1 to eoc value.
2989         (end_of_class): Use full size for empty bases.
2990         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
2991         empty bases. Don't add 1 to eoc value. Only add trailing padding
2992         if we're an empty class with no empty bases.
2993         (dump_class_hierarchy): Dump size and alignment.
2995 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
2997         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
2998         ICS_BAD_FLAG.
3000 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
3002         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
3003         is found, look first if name does not match the structure name.
3005 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
3007         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
3008         set.
3009         (SET_DECL_LANGUAGE): New macro.
3010         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
3011         (pushdecl): Likewise.
3012         (build_library_fn_1): Likewise.
3013         (build_cp_library_fn): Likewise.
3014         (grokfndecl): Likewise.
3015         (grokvardecl): Mark `extern "C"' variables as having C linkage.
3016         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
3017         * lex.c (retrofit_lang_decl): Likewise.
3018         * mangle.c (mangle_decl_string): Don't mangle the names of
3019         variables declared with C language linkage.
3020         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
3022 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
3024         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
3025         flag_access_control from uninitialized storage.
3027 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
3029         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
3030         * mangle.c (write_pointer_to_member_type): Fix mangling of
3031         pointers to cv-qualified member function types.
3033         * init.c (build_delete): Create a SAVE_EXPR for the address if
3034         we're going to use it more than once.
3036 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
3038         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
3039         (expand_ptremfunc_cst): Change prototype.
3040         (delta2_from_ptrmemfunc): Remove.
3041         * expr.c (cplus_expand_constant): Adjust call to
3042         expand_ptrmemfunc_cst.
3043         * typeck.c (build_ptrmemfunc1): Simplify.
3044         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
3045         results in a constant.
3046         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
3047         (delta2_from_ptrmemfunc): Remove.
3048         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
3050 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
3052         * cp-tree.h (decl_namespace_list): New macro.
3053         (struct saved_scope): Add decl_ns_list.
3054         * decl.c (mark_saved_scope): Mark it.
3055         * decl2.c: Lose static decl_namespace_list.
3056         (init_decl2): Don't save it.
3058 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3060         * cp-tree.h (warn_return_type, yylex): Delete redundant
3061         declarations.
3063         * decl.c (current_class_depth, global_namespace): Likewise.
3065         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
3067         * repo.c (flag_use_repository): Likewise.
3069 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3071         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
3072         set_block, pushdecl, getdecls, gettags, init_decl_processing,
3073         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
3074         lvalue_or_else, print_lang_statistics, comp_target_types,
3075         unsigned_type, signed_type, signed_or_unsigned_type,
3076         build_function_call, mark_addressable, incomplete_type_error):
3077         Delete redundant declarations.
3079 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
3081         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
3082         (TYPE_ANONYMOUS_P): New macro.
3083         (TAGGED_TYPE_P): New macro.
3084         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
3085         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
3086         * tree.c (no_linkage_helper): Likewise.
3087         * semantics.c (begin_class_definition): Likewise.
3088         * pt.c (convert_template_argument): Likewise.
3089         * lex.c (check_for_missing_semicolon): Likewise.
3091 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
3093         * class.c (dfs_unshared_virtual_bases): New function.
3094         (mark_primary_bases): Call it.
3095         (check_bases): Ignore virtual bases when determining
3096         nearly-emptiness.
3098 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
3100         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
3102 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
3104         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
3105         cloned function to the clone.
3107 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3109         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
3111         * semantics.c: Include expr.h.
3113 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
3115         * method.c (implicitly_declare_fn): Commonize code for copy ctor
3116         and assignment op. Set TREE_USED for parameter.
3118 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
3120         * class.c (find_final_overrider_data): Add `candidates'.
3121         (dfs_find_final_overrider): Don't issue error messages
3122         prematurely.
3123         (find_final_overrider): Issue error messages here.
3124         (build_base_field): Don't warn about amgibuous direct bases here.
3125         (warn_about_ambiguous_direct_bases): New function.
3126         (layout_class_type): Use it.
3128 2001-04-10  Richard Henderson  <rth@redhat.com>
3130         * typeck.c (build_array_ref): Push the array reference inside
3131         COMPOUND_EXPR and COND_EXPR.
3133 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
3135         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
3136         * decl.c (duplicate_decls): Adjust accordingly.
3137         (maybe_commonize_var): Likewise.
3138         (grokfndecl): Likewise.
3139         (start_function): Likewise.
3140         (start_method): Likewise.
3141         * decl2.c (key_method): Likewise.
3142         (import_export_decl): Likewise.
3143         * method.c (implicitly_declare_fn): Likewise.
3144         * optimize.c (maybe_clone_body): Likewise.
3146 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
3148         * lang-specs.h: Add __DEPRECATED.
3150 Thu Apr  5 16:54:29 2001  J"orn Rennecke <amylaar@redhat.com>
3152         * search.c (get_dynamic_cast_base_type): When building a new
3153         constant, set its type to ssizetype.
3155 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
3157         * optimize.c (expand_call_inline): Only add newly inlined statements
3158         into inlined_stmts.
3160 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
3162         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
3163         (OPERATOR_FORMAT): Likewise.
3164         (OPERATOR_TYPENAME_FORMAT): Likewise.
3165         * operators.def: Remove old name-mangling information.
3166         * decl.c (grok_op_properties): Adjust accordingly.
3167         * lex.c (init_operators): Likewise.
3168         * rtti.c (get_tinfo_decl): Issue error messages about types that
3169         have variable size.
3171 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
3173         * decl2.c (import_export_decl): Don't call import_export_class
3174         when processing an inline member function.
3175         * semantics.c (expand_body): Call import_export_decl before
3176         emitting inline functions.
3178 2001-03-28  Richard Henderson  <rth@redhat.com>
3180         IA-64 ABI Exception Handling:
3181         * cp-tree.def (EH_SPEC_BLOCK): New.
3182         (MUST_NOT_THROW_EXPR): New.
3183         * cp-tree.h: Update changed function declarations.
3184         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
3185         (CPTI_CALL_UNEXPECTED): New.
3186         (struct cp_language_function): Rename x_eh_spec_try_block
3187         to x_eh_spec_block.
3188         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
3189         * decl.c (current_binding_level): If no current function
3190         bindings, revert to scope_chain.
3191         (initialize_predefined_identifiers): Remove __cp_push_exception.
3192         (store_parm_decls): Use begin_eh_spec_block.
3193         (finish_function): Use finish_eh_spec_block.
3194         (mark_lang_function): Update for name changes.
3195         * decl2.c (finish_file): No mark_all_runtime_matches.
3196         * dump.c (cp_dump_tree): Handle new tree codes.
3197         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
3198         * except.c (catch_language_init, catch_language): Remove.
3199         (init_exception_processing): Don't set language code.
3200         Initialize call_unexpected_node, protect_cleanup_actions,
3201         eh_personality_libfunc, lang_eh_runtime_type.
3202         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
3203         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
3204         (prepare_eh_type): Split out type canonicalizations ...
3205         (build_eh_type_type): ... from here.
3206         (build_eh_type_type_ref): Remove.
3207         (mark_all_runtime_matches): Remove.
3208         (build_exc_ptr): New.
3209         (do_begin_catch, do_end_catch): New.
3210         (do_pop_exception): Remove.
3211         (build_terminate_handler): Remove.
3212         (choose_personality_routine): Split out language choice from ...
3213         (initialize_handler_parm): ... here.
3214         Use MUST_NOT_THROW_EXPR.
3215         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
3216         exception object handling.
3217         (expand_start_eh_spec, expand_end_eh_spec): Remove.
3218         (expand_exception_blocks, alloc_eh_object): Remove.
3219         (begin_eh_spec_block, finish_eh_spec_block): New.
3220         (do_allocate_exception, do_free_exception): New.
3221         (expand_throw): Merge into ...
3222         (build_throw): ... here.  Update for abi.
3223         * expr.c (cplus_expand_expr): No expand_internal_throw.
3224         Handle MUST_NOT_THROW_EXPR.
3225         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
3226         * semantics.c (*) Update for except.h name changes.
3227         (genrtl_try_block): No protect_with_terminate.
3228         (genrtl_eh_spec_block): New.
3229         (genrtl_handler): Don't emit the goto here.
3230         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
3231         (genrtl_finish_function): Don't expand_exception_blocks.
3232         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
3234 2001-03-28  Richard Henderson  <rth@redhat.com>
3236         * decl.c (struct named_label_list): Rename eh_region to
3237         in_try_scope, add in_catch_scope.
3238         (struct binding_level): Rename eh_region to is_try_scope,
3239         add is_catch_scope.
3240         (note_level_for_try): Rename from note_level_for_eh.
3241         (note_level_for_catch): New.
3242         (poplevel): Copy both is_try_scope and is_catch_scope to
3243         the named_label_list struct.
3244         (check_previous_goto_1): Don't check for catch block via
3245         DECL_ARTIFICIAL; use in_try_scope instead.
3246         (check_goto): Likewise.
3247         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
3248         * except.c (expand_start_catch_block): Call note_level_for_catch.
3249         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
3251 2001-03-27  Richard Henderson  <rth@redhat.com>
3253         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
3254         exceptions_via_longjmp.
3256 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
3258         * pt.c (check_default_tmpl_args):  Make error messages clearer.
3260 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
3262         * error.c:  Also undefine 'A' macro used for cp_printers definition.
3264 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3266         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
3268 2001-03-26  Mike Yang <yang@research.att.com>
3269             Mark Mitchell  <mark@codesourcery.com>
3271         * dump.c (dump_access): New function.
3272         (cp_dump_tree): Use it.  Dump basetype information for class
3273         types.
3275 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
3277         * Makefile.in (optimize.o): Depend on params.h.
3278         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
3279         (init_decl_processing): Set flag_no_inline when doing
3280         inlining-on-trees.
3281         * optimize.c: Include params.h.
3282         (struct inline_data): Improve documentation of FNS.  Add
3283         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
3284         (INSNS_PER_STMT): New macro.
3285         (remap_block): Use CLONING_P.
3286         (inlinable_function_p): Don't inline big functions.
3287         (expand_call_inline): Keep track of how much inlining we've done.
3288         (optimize_function): Set FIRST_INLINED_FN.
3289         (maybe_clone_body): Set CLONING_P.
3290         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
3291         tree nodes.
3292         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
3293         rest_of_compilation.  Clear DECL_RTL for local variables
3294         afterwards.
3295         (clear_decl_rtl): New function.
3297 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
3299         Implement DR 209
3300         * cp-tree.h (skip_type_access_control,
3301         reset_type_access_control): Prototype.
3302         * decl.c (grokdeclarator): Access of friends is not checked.
3303         * parse.y (component_decl_list): Reset type access control.
3304         * semantics.c (decl_type_access_control): Clear
3305         current_type_lookups.
3306         (save_type_access_control): Don't save if not deferring.
3307         (skip_type_access_control, reset_type_access_control): New
3308         functions.
3309         (begin_class_definition): Do type access control for basetypes.
3310         Start deferred access control.
3311         (finish_class_definition): Resume immediate access control if
3312         this is a local class.
3314 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3316         * class.c (add_method): Use memcpy/memmove, not bcopy.
3318         * decl.c (duplicate_decls): Likewise.
3320 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
3322         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
3323         not `_'.
3325 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
3327         * decl.c (local_names): Define.
3328         (push_local_name): New.
3329         (grok_reference_init): Return init if initializing static reference
3330         variable with non-constant instead of emitting it.
3331         Move expand_static_init call to cp_finish_decl.
3332         (layout_var_decl): Call push_local_name.
3333         (maybe_commonize_var): Allow inlining functions even if they have
3334         static local variables, use comdat_linkage for them if flag_weak.
3335         (check_initializer): Call obscure_complex_init if
3336         grok_reference_init returned non-zero.
3337         (save_function_data): Clear x_local_names.
3338         (pop_cp_function_context): Free x_local_names.
3339         (mark_inlined_fns): Remove.
3340         (mark_lang_function): Mark x_local_names.
3341         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
3342         Mark inlined_fns as tree, remove call to mark_inlined_fns.
3343         * class.c (alter_access): Ensure DECL_ACCESS is never set if
3344         DECL_DISCRIMINATOR_P.
3345         * cp-tree.h (cp_language_function): Add x_local_names.
3346         (lang_decl_flags): Add discriminator into u2.
3347         (lang_decl_inlined_fns): Remove.
3348         (lang_decl): inlined_fns is now a TREE_VEC.
3349         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
3350         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
3351         TREE_VEC, not a custom structure.
3352         (optimize_function): Likewise.
3353         * mangle.c (discriminator_for_local_entity): Discriminate among
3354         VAR_DECL local entities.
3355         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
3356         is not valid.
3358 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
3360         Add support for Java interface method calls.
3361         * cp-tree.h (struct lang_type): Add java_interface flag.
3362         (TYPE_JAVA_INTERFACE): New macro.
3363         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
3364         by setting TYPE_JAVA_INTERFACE.
3365         * call.c (java_iface_lookup_fn): New static.
3366         (build_over_call): If calling a method declared in a
3367         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
3368         expression which resolves the function address.
3369         (build_java_interface_fn_ref): New function.
3371 2001-03-22  Richard Henderson  <rth@redhat.com>
3373         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
3374         * except.c: Don't include it.
3376 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
3377             based on an idea from Joe Buck <jbuck@synopsys.com>
3379         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
3380         New nonterminals.
3381         (data_def, component_decl): Add reductions to bad_decl.
3383 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
3385         * method.c (do_build_assign_ref): Don't use build_modify_expr for
3386         anonymous aggregates, since they don't have assignment operator
3387         method.
3388         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
3389         assignment operators for anonymous structure fields.
3391 2001-03-21  Jason Merrill  <jason@redhat.com>
3393         * pt.c (instantiate_decl): Abort if we see a member constant
3394         instantiation that doesn't already have its initializer.
3395         Downgrade explicit instantiation without definition to pedwarn.
3397         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
3398         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
3399         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
3401         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
3402         (pending_vtables): Remove.
3403         * decl2.c (pending_vtables): Remove.
3404         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
3405         CLASSTYPE_VTABLE_NEEDS_WRITING.
3406         (import_export_class): Likewise.
3407         (init_decl2): Don't mark pending_vtables.
3408         * lex.c (handle_pragma_vtable): Just sorry.
3409         * pt.c (instantiate_class_template): Don't mess with
3410         CLASSTYPE_VTABLE_NEEDS_WRITING.
3411         (mark_class_instantiated): Likewise.
3412         * ptree.c (print_lang_type): Don't print it.
3413         * semantics.c (begin_class_definition): Don't set it.
3415         * pt.c (template_tail): Replace with last_pending_template.
3416         (maybe_templates, maybe_template_tail): Remove.
3417         (add_pending_template): Adjust.
3418         (instantiate_pending_templates): Adjust.
3420         * cp-tree.h (struct saved_scope): Remove lang_stack field.
3421         (current_lang_stack): Remove.
3422         * decl.c (maybe_push_to_top_level): Don't initialize it.
3423         (duplicate_decls): Use current_lang_depth.
3424         (xref_basetypes): Likewise.
3425         * class.c (current_lang_depth): New fn.
3426         (push_lang_context): Use more varray functionality.
3427         (pop_lang_context): Likewise.
3429         * error.c (GLOBAL_THING): Always use '__'.
3431 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
3433         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
3435         * mangle.c (mangle_decl_string): Mangle the names of overloaded
3436         operators, even when they have `extern "C"' linkage.
3438 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
3440         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
3441         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
3442         where it's not necessary.
3443         (add_method): Remove optimization involving comparison of
3444         DECL_ASSEMBLER_NAME.
3445         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
3446         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
3447         where it's not necessary.
3448         (check_methods): Likewise.
3449         (build_clone): Likewise.
3450         (built_vtt): Likewise.
3451         * cp-tree.h (DECL_NEEDED_P): Likewise.
3452         * decl.c (pushtag): Likewise.
3453         (duplicate_decls): Likewise.
3454         (pushdecl): Likewise.
3455         (builtin_function): Likewise.
3456         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
3457         (build_cp_library_fn): Likewise.
3458         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
3459         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
3460         where it's not necessary.
3461         (make_rtl_for_nonlocal_decl): Likewise.
3462         (cp_finish_decl): Likewise.
3463         (grokfndecl): Likewise.
3464         (grokvardecl): Likewise.
3465         (grokdeclarator): Likewise.
3466         (start_function): Likewise.
3467         (cp_missing_return_ok_p): Likewise.
3468         * decl2.c (grokclassfn): Likewise.
3469         (check_classfn): Likewise.
3470         (finish_static_data_member_decl): Likewise.
3471         (grokfield): Likewise.
3472         * error.c (GLOBAL_IORD_P): Remove.
3473         (dump_global_iord): Improve output.
3474         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
3475         * except.c (nothrow_libfn_p): Summarily reject any function not in
3476         namespace-scope.
3477         * init.c (build_java_class_ref): Don't explicitly set
3478         DECL_ASSEMBLER_NAME after calling mangle_decl.
3479         * mangle.c (mangle_decl_string): Handle extern "C" functions.
3480         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
3481         * method.c (set_mangled_name_for_decl): Don't explicitly set
3482         DECL_ASSEMBLER_NAME after calling mangle_decl.
3483         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
3484         IDENTIFIER_GLOBAL_VALUE for the thunk.
3485         * pt.c (set_mangled_name_for_template_decl): Remove.
3486         (check_explicit_specialization): Don't use it.
3487         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
3488         (tsubst_friend_function): Likewise.
3489         (tsubst_decl): Likewise.
3490         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
3491         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
3492         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
3493         where it's not necessary.
3494         (tinfo_base_init): Likewise.
3495         (create_real_tinfo_var): Likewise.
3496         * search.c (looup_field_1): Likewise.
3497         * semantics.c (finish_named_return_value): Likewise.
3498         * tree.c (init_tree): Set lang_set_decl_assembler_name.
3500 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
3502         Correct semantics restrictions checking in throw-expression.
3503         * except.c (is_admissible_throw_operand): New function.
3504         (build_throw): Use it.
3506 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
3508         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
3509         and its ilk.
3511 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
3513         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
3514         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
3515         * decl.c (duplicate_decls): Likewise.
3516         (builtin_function): Likewise.
3517         (build_library_fn): Likewise.
3518         (build_cp_library_fn): Likewise.
3519         (check_initializer): Likewise.
3520         (cp_finish_decl): Likewise.
3521         * decl2.c (grokfield): Likewise.
3522         (grok_function_init): Remove #if 0'd code.
3523         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
3524         * friend.c (do_friend): Likewise.
3525         * init.c (get_temp_regvar): Likewise.
3526         * method.c (make_thunk): Likewise.
3527         * pt.c (tsubst_friend_function): Likewise.
3528         (tsubst_decl): Likewise.
3529         (regenerate_decl_from_template): Likewise.
3530         * semantics.c (genrtl_named_return_value): Likewise.
3531         (expand_body): Likewise.
3532         (genrtl_finish_function): Likewise.
3533         * tree.c (cp_tree_equal): Likewise.
3535 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
3537         * call.c (convert_like_real): Add extra semantics to INNER
3538         parameter. Don't convert to temporary if a user conversion
3539         gives us an lvalue that we're about to bind to a reference.
3540         Set INNER to indicate pending reference binding on recursive
3541         calls.
3543 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
3545         * cp/lex.c: Delete duplicate pending_lang_change.
3547 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
3549         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
3550         Similarly.
3551         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
3552         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
3554 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
3556         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
3558 2001-03-08  Stan Shebs  <shebs@apple.com>
3560         * cp-tree.h (set_identifier_local_value): Remove unused decl.
3562 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
3564         * spew.c: Remove references to CPP_OSTRING.
3566 2001-03-06  Andrew Haley  <aph@redhat.com>
3568         * typeck.c (convert_arguments): Check that we have an fndecl.
3570 2001-03-05  Andrew Haley  <aph@redhat.com>
3572         * typeck.c (convert_arguments): Don't do ellipsis conversion for
3573         __built_in_constant_p.
3575 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
3577         * typeck.c (build_static_cast): Allow enum to enum conversions
3578         as per DR 128.
3580 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
3582         * class.c (check_field_decls): Pointers to member do not a
3583         non-pod struct make, as per DR 148.
3585 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
3587         * call.c (joust): cp_pedwarn when using gnu extension concerning
3588         worst conversion sequences.
3590 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
3592         * decl.c: Replace all uses of 'boolean' with 'bool'.
3594 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
3596         * lang-specs.h: Add zero initializer for cpp_spec field to
3597         all array elements that need one.  Don't put an #ifdef inside
3598         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
3599         use it.
3601 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
3603         Implement using decls inside template functions.
3604         * decl2.c (validate_nonmember_using_decl): Don't special case
3605         fake_std_node in the global namespace. Don't reject early when
3606         processing a template.
3607         (do_local_using_decl): Add to statement tree. Don't do further
3608         processing when building a template.
3609         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
3611 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
3613         * decl2.c (do_nonmember_using_decl): Don't complain if we find
3614         same function. Do complain about ambiguating extern "C"
3615         declarations.
3617 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
3619         Remove floating point and complex type template constant parms.
3620         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
3621         COMPLEX_TYPE extensions.
3622         (invalid_nontype_parm_type_p): Likewise.
3624 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
3626         * except.c (call_eh_info): Revert "match_function"'s type.
3628 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
3630         Fix ctor vtable vcall offsets.
3631         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
3632         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
3633         (get_matching_base): Remove.
3634         (get_original_base): New function.
3635         (build_vtbl_initializer): Initialize vid.rtti_binfo.
3636         Use a virtual thunk for a ctor vtable with an index
3637         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
3638         primary base within a constructor vtable. Only set
3639         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
3640         when primary base has been lost.
3641         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
3643 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
3645         * call.c (joust): Ensure more_specialized()'s argument length
3646         parameter has correct value for constructors.
3648 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
3650         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
3652         * decl.c (mark_inlined_fns): Prototype.
3654 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
3656         * spew.c (yylex): Correct handling of friends.
3658 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
3660         * mangle.c (write_encoding): Pass write_function_type the
3661         FUNCTION_DECL for the function being encoded.
3662         (write_function_type): Pass it along to write_bare_function_type.
3663         (write_bare_function_type): Pass it along to write_method_parms.
3664         (write_method_parms): Don't mangle the compiler-generated
3665         parameters to a constructor or destructor.
3667 2001-02-22  Andreas Jaeger  <aj@suse.de>
3669         * optimize.c: Include toplev.h for
3670         note_deferral_of_defined_inline_function prototype.
3672 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
3674         * cp-tree.h (struct lang_decl_inlined_fns): New.
3675         (struct lang_decls): Add inlined_fns.
3676         (DECL_INLINED_FNS): New macro.
3677         * optimize.c (struct inline_data): Add inlined_fns.
3678         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
3679         (inlinable_function_p): Likewise, fix typo in comment,
3680         function is not inlinable if it already inlined function currently
3681         being optimized.
3682         (expand_call_inline): Add fn to inlined_fns if necessary.
3683         (optimize_function): Initialize inlined_fns.
3684         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
3685         * decl.c (mark_inlined_fns): New function.
3686         (lang_mark_tree): Call it.
3688 2001-02-21  Jason Merrill  <jason@redhat.com>
3690         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
3691         (DECL_UNINLINABLE): Move to middle-end.
3693         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
3694         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
3695         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
3696         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
3697         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
3699         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
3700         second parm of op=.
3702 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
3704         * decl2.c (set_decl_namespace): Allow explicit instantiations in
3705         any namespace.
3707 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3709         * optimize.c (expand_call_inline): Don't walk subtrees of type
3710         nodes.
3712 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
3714         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
3715         for a destructor.
3717 2001-02-18  Jason Merrill  <jason@redhat.com>
3719         Do put the VTT parameter in DECL_ARGUMENTS.
3720         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
3721         (current_vtt_parm): New macro.
3722         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
3723         (DECL_HAS_VTT_PARM_P): New macro.
3724         (DECL_VTT_PARM): Remove.
3725         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
3726         * decl.c (duplicate_decls): Only copy the operator code if
3727         appropriate.
3728         (start_function): Set current_vtt_parm.
3729         (lang_mark_tree): Don't mark vtt_parm.
3730         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
3731         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
3732         * class.c (build_clone): Maybe remove the VTT parm.
3733         * optimize.c (maybe_clone_body): Set up the VTT parm.
3734         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
3735         * call.c (build_over_call): Just allow the VTT arg.
3736         * method.c (make_thunk): Don't set DECL_VTT_PARM.
3737         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
3738         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
3739         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
3740         * error.c (dump_function_decl): Likewise.
3741         * call.c (build_user_type_conversion_1, convert_like_real): Abort
3742         if we try to call a constructor with in-charge or VTT parms.
3743         * method.c (skip_artificial_parms_for): New fn.
3744         * call.c (add_function_candidate, build_over_call): Call it.
3745         * call.c (build_new_method_call): Use current_vtt_parm.
3746         * init.c (expand_virtual_init): Likewise.
3747         * class.c (same_signature_p): No longer static.
3748         * cp-tree.h: Declare it.
3749         * search.c (look_for_overrides_r): Use it.
3751 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
3753         * cp-tree.h (new_abi_rtti_p): Remove.
3754         (name_mangling_version): Likewise.
3755         (flag_do_squangling): Likewise.
3756         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
3757         * decl.c (grokfndecl): Likewise.
3758         * decl2.c (name_mangling_version): Remove.
3759         (flag_do_squangling): Likewise.
3760         (lang_f_options): Remove `squangle'.
3761         (unsupported_options): Add `squangle'.
3762         (cxx_decode_option): Issue a warning about uses of
3763         -fname-mangling-version.
3764         (finish_file): Remove old ABI support.
3765         * pt.c (check_explicit_specialization): Likewise.
3766         (tsubst_decl): Likewise.
3767         * rtti.c (init_rtti_processing): Likewise.
3768         (build_headof): Likewise.
3769         (get_tinfo_decl_dynamic): Likewise.
3770         (tinfo_from_decl): Likewise.
3771         (build_dynamic_cast_1): Likewise.
3772         (synthesize_tinfo_var): Likewise.
3773         * init.c (build_new): Allow enumeration types for the array-bounds
3774         in a direct-new-declarator.
3776         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
3778         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
3779         TREE_PROTECTED from the template being specialized.
3781 2001-02-17  Jason Merrill  <jason@redhat.com>
3783         * decl2.c (build_artificial_parm): Set TREE_READONLY.
3785         * decl.c (bad_specifiers): Allow throw specs on things with
3786         pointer-to-function or -member-function type.
3787         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
3788         a pmf.
3790 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
3792         * call.c (check_dtor_name): Handle template names correctly.
3794 2001-02-16  Jason Merrill  <jason@redhat.com>
3796         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
3797         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
3798         * optimize.c (maybe_clone_body): Don't substitute it.
3799         * call.c (build_new_method_call): Check in_chrg instead.
3800         * init.c (expand_virtual_init): Likewise.
3802 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
3804         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
3805         class-type introduces at least a type-name.
3807 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
3809         * call.c (convert_like_real): Create a temporary for non-lvalue.
3811 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
3813         * cp-tree.h: Fix typos in comments.
3815 2001-02-16  Jason Merrill  <jason@redhat.com>
3817         * optimize.c (remap_block): If we're compiling a clone, pass the
3818         new block to insert_block.
3820 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
3822         * semantics.c (finish_asm_stmt): Robustify.
3824 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
3826         * pt.c (push_template_decl_real): Don't remangle the name of a
3827         class template.
3829 2001-02-15  Jim Meyering  <meyering@lucent.com>
3831         * Make-lang.in (c++.install-common): Depend on installdirs.
3832         (c++.install-info): Likewise.
3833         (c++.install-man): Likewise.
3835 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
3837         * typeck2.c (build_m_component_ref): Robustify.
3839 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
3841         * friend.c (do_friend): Don't take the nested [template] class
3842         into account when deciding whether to warn about the friend
3843         function not referring to a template function.
3845 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
3847         * typeck.c (build_unary_op): Clarify error message.
3849 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
3851         * parse.y (component_constructor_declarator): allow optional
3852         parentheses around constructor class name.
3854 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
3856         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
3857         section.
3858         * init.c (emit_base_init): Remove incorrect comment about
3859         virtual bases.
3860         * method.c (make_thunk): Fix comment alignment.
3862 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
3864         Kill remnants of this is variable.
3865         * cp-tree.h (flag_this_is_variable): Remove.
3866         * decl2.c (flag_this_is_variable): Remove.
3867         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
3868         (build_vbase_path): The path is non-static, even in a cdtor.
3869         (resolves_to_fixed_type_p): Add additional return value.
3870         * search.c (init_vbase_pointers): Adjust.
3871         * tree.c (lvalue_p_1): Adjust.
3872         * typeck.c (mark_addressable): Adjust.
3874 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
3876         * pt.c (unify): Don't check cv quals of array types.
3878 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
3880         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
3881         check whether we already have the type.
3883 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
3885         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
3886         * call.c (build_op_delete_call): Simplify to remove duplicate
3887         code.
3888         * class.c (clone_function_decl): Don't build the deleting variant
3889         of a non-virtual destructor.
3890         * decl.c (finish_destructor_body): Don't call delete if this is a
3891         non-virtual destructor.
3892         * init.c (build_delete): Explicitly call `operator delete' when
3893         deleting an object with a non-virtual destructor.
3895 2001-02-13  Jason Merrill  <jason@redhat.com>
3897         * lang-specs.h: Add more __EXCEPTIONS.
3899 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
3901         * typeck2.c (process_init_constructor): Check
3902         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
3904 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
3906         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
3907         Remove spurious information in comment. Allow further
3908         adjustments of REFERENCE_TYPE args.
3910 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
3912         * errfn.c (cp_deprecated): Tweak diagnostic text.
3913         * parse.y (new_initializer): Deprecate initializer lists
3914         extension.
3916 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
3918         Remove old ABI support.
3920 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
3922         * decl2.c (flag_vtable_thunks): Always set it to 1.
3923         (flag_new_abi): Likewise.
3924         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
3926         * Makefile.in (g++spec.o): Fix typo.
3928 2001-02-09  Jason Merrill  <jason@redhat.com>
3930         * lang-specs.h: Restore definition of __EXCEPTIONS.
3932 2001-02-08  Jason Merrill  <jason@redhat.com>
3934         * search.c (shared_member_p): New function.
3935         (lookup_field_r): Use it.
3936         * cp-tree.h (SHARED_MEMBER_P): Remove.
3938         * method.c (process_overload_item): Handle template-dependent array
3939         bounds.
3940         * pt.c (type_unification_real): If we end up with undeduced nontype
3941         parms, try again.
3943         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
3944         types.
3946         * typeck2.c (friendly_abort): Don't say anything if we have
3947         earlier errors or sorries.
3949         * decl.c (check_tag_decl): Notice attempts to redefine bool and
3950         wchar_t.  Ignore if in_system_header.
3952         * decl.c (maybe_push_cleanup_level): New fn...
3953         (start_decl_1): ...split out from here.
3954         * cvt.c (build_up_reference): Use it.
3955         * cp-tree.h: Declare it.
3957 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
3959         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
3960         spec.
3962 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
3964         * pt.c (lookup_template_class): Make sure it's a primary
3965         template or template_template_parm when called from the parser.
3966         (instantiate_template_class): Add assertion.
3968 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
3970         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
3971         from error_mark_node.
3973 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
3975         Fix specification and implementation bugs in V3 ABI
3976         construction vtables.
3977         * cp-tree.h (flag_dump_class_layout): New flag.
3978         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
3979         (BINFO_LOST_PRIMARY_P): New flag.
3980         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
3981         (BINFO_PRIMARY_MARKED_P): Rename to ...
3982         (BINFO_PRIMARY_P): ... here.
3983         (binfo_via_virtual): New prototype.
3984         * decl2.c (flag_dump_class_layout): New flag.
3985         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
3986         use `=' as a file name separator.
3987         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
3988         bases.
3989         (build_vtbl_address): If this is a virtual primary base, then
3990         get the vtbl of what it is ultimately primary for.
3991         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
3992         for BINFO_PRIMARY_P.
3993         (dfs_skip_nonprimary_vbases_markedp): Likewise.
3994         (get_shared_vbase_if_not_primary): Likewise.
3995         (dfs_get_pure_virtuals): Likewise.
3996         (expand_upcast_fixups): Likewise.
3997         (fixup_virtual_upcast_offsets): Likewise.
3998         (dfs_find_vbase_instance): Likewise.
3999         (find_vbase_instance): Likewise.
4000         (binfo_from_vbase): Adjust comment to reflect reality.
4001         (binfo_via_virtual): New function.
4002         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
4003         for binfo walking during VTT construction.
4004         (dfs_mark_primary_bases): Remove.
4005         (force_canonical_binfo_r): New function.
4006         (force_canonical_binfo): New function.
4007         (mark_primary_virtual_base): New function.
4008         (mark_primary_bases): Walk in inheritance graph order, use
4009         mark_primary_virtual_base.
4010         (determine_primary_base): Use some more intermediate variables.
4011         (dfs_find_final_overrider): Don't check for overriding along a
4012         virtual path.
4013         (dfs_modify_vtables): Walk into primary virtual bases too.
4014         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
4015         (build_base_fields): Likewise.
4016         (dfs_set_offset_for_unshared_vbases): Likewise.
4017         (layout_virtual_bases): Likewise.
4018         (end_of_class): Likewise.
4019         (finish_struct_1): Call dump_class_hierarchy, if requested.
4020         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
4021         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
4022         (dump_class_hierarchy): Add file parameter. Append to file, if
4023         required.
4024         (finish_vtbls): Adjust accumulate_vtbl_inits call.
4025         Use canonical base for virtual bases.
4026         (build_vtt): Add more comments. Adjust build_vtt_inits call.
4027         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
4028         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
4029         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
4030         virtual VTTs.
4031         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
4032         from DATA.  We want virtual primary bases and all bases via virtual.
4033         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
4034         virtual base when not a construction vtable.
4035         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
4036         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
4037         Use canonical bases when processing virtual bases.
4038         (accumulate_vtbl_inits): We're interested in any base via a
4039         virtual path.
4040         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
4041         within a construction vtable, determine what is being overridden.
4042         (build_vtbl_initializer): Add more comments
4043         (add_vcall_offset_vtbl_entries_1): Adjust comment.
4044         (build_rtti_vtbl_entries): Check if the base has lost its
4045         primary.
4047 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
4049         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
4051 Sun Feb  4 15:52:44 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4053         * decl.c (pushdecl): Call abort instead of fatal.
4054         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
4055         * init.c (build_new_1): Likewise.
4056         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
4057         * decl.c (build_typename_type): hash_table_init now returns void.
4058         decl.c (init_decl_processing): Make an error non-fatal.
4060 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
4062         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
4063         Document.
4064         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
4065         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
4066         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
4067         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
4068         * decl.c (maybe_commonize_var): Use the new name-mangling where
4069         appropriate.
4070         * decl2.c (comdat_linkage): Enhance comments.  Make all
4071         compiler-generated things static, if COMDAT is not available.
4072         (get_tinfo_decl): Do not make typeinfo objects that belong in the
4073         library COMDAT.
4074         (tinfo_base_init): Use the correct mangled name for typeinfo
4075         strings, and push them into the global scope.
4076         (typeinfo_in_lib_p): New function.
4077         (synthesize_tinfo_var): Use it.
4078         (create_real_tinfo_var): Likewise.
4080 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
4082         * decl.c (push_class_binding): Use context_for_name_lookup instead
4083         of CP_DECL_CONTEXT.
4084         * search.c (context_for_name_lookup): Remove static.  Check for NULL
4085         context in the loop.
4086         * cp-tree.h (context_for_name_lookup): Add prototype.
4088 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
4090         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
4091         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
4092         Remove.
4093         * call.c (convert_class_to_reference, build_user_type_conversion_1,
4094         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
4096 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
4098         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
4099         of macros used when compiling g++spec.c.
4100         * g++spec.c (lang_specific_driver): Link with the shared
4101         libgcc by default.
4103 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
4105         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
4106         make_reference_declarator, make_call_declarator), method.c
4107         (implicitly_declare_fn), parse.y (namespace_using_decl,
4108         notype_unqualified_id, expr_or_declarator, new_type_id,
4109         after_type_declarator, direct_after_type_declarator,
4110         notype_declarator, complex_notype_declarator,
4111         complex_direct_notype_declarator, qualified_id,
4112         notype_qualified_id, overqualified_id, direct_new_declarator,
4113         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
4114         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
4115         instead of build_parse_node.
4117 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4119         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
4120         (minus_one_node): Moved to top level gcc directory.  Renamed
4121         to integer_minus_one_node.
4123         * init.c (init_init_processing): Don't set minus_one_node.
4124         (build_vec_init): Use integer_minus_one_node.
4126         * rtti.c (get_tinfo_decl_dynamic): Likewise.
4128 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
4130         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
4131         identical and they would be replaced with constant, remove
4132         MODIFY_EXPR from the tree.
4134 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4136         * Make-lang.in: Remove all dependencies on defaults.h.
4137         * call.c: Don't include defaults.h.
4138         * decl.c: Likewise.
4139         * decl2.c: Likewise.
4140         * except.c: Likewise.
4141         * pt.c: Likewise.
4142         * rtti.c: Likewise.
4143         * tree.c: Likewise.
4144         * typeck.c: Likewise.
4146 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
4148         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
4149         operators even in "C" linkage.
4150         * method.c (set_mangled_name_for_decl): Likewise.
4151         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
4152         overloaded operators in "C" linkage.
4154 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
4156         * pt.c (tsubst_decl): Remove IN_DECL parameter.
4157         (tsubst_arg_types): Check parameter is not void.
4158         (tsubst): Adjust tsubst_decl call.
4160 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
4162         * call.c (add_builtin_candidate): Quote std properly, from
4163         previous change.
4165 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4167         * pt.c (check_explicit_specialization): Clone constructors and
4168         destructors.
4170 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
4172         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
4173         indicates anything special about template depth. Make sure we
4174         only count the user visible template classes.
4176 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
4178         * call.c (build_conv): Typo in comment.
4179         (add_builtin_candidate): Add more explanation.
4180         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
4181         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
4182         when we have enumeral types.
4183         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
4184         candidates for relops and eqops.
4185         (joust): Simplify control flow. Allow a non-template user
4186         function to hide a builtin.
4188 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
4190         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
4191         (more_specialized): Add deduction parameter.
4192         * call.c (joust): Adjust more_specialized call.
4193         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
4194         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
4195         (get_bindings_order): Remove.
4196         (get_bindings_real): Add DEDUCE parameter.
4197         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
4198         REFERENCE_TYPE jig for DEDUCE_ORDER.
4199         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
4200         maybe_adjust_types_for_deduction.
4201         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
4202         directly.
4203         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
4204         (check_cv_quals_for_unify): Use new unify qualifier flags.
4205         (unify): Clear new unify qualifier flags.
4206         (get_bindings_real): Add DEDUCE parameter.
4207         (get_bindings): Adjust call to get_bindings_real.
4208         (get_bindings_overload): Likewise.
4209         (most_specialized_instantiation): Adjust call to
4210         more_specialized.
4212 2001-01-19  Jason Merrill  <jason@redhat.com>
4214         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
4216         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
4217         -fnew-abi.
4219 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
4221         * decl2.c (arg_assoc_class): Fix double iteration logic.
4223 2001-01-19  Jason Merrill  <jason@redhat.com>
4225         * init.c (build_delete): Always call convert_force to strip cv-quals.
4227         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
4228         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
4229         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
4231 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
4233         * search.c (get_vbase_1): Count only virtual bases.
4235 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
4237         * class.c (duplicate_tag_error): Robustify flag clearing.
4239 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
4241         * cp-tree.h (lookup_template_class): Add complain parm.
4242         * decl.c (lookup_namespace_name): Adjust call to
4243         lookup_template_class.
4244         (make_typename_type): Likewise.
4245         * semantics.c (finish_template_type): Likewise.
4246         * pt.c (lookup_template_class): Add complain parm. Adjust.
4247         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
4248         (tsubst): Likewise.
4250 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
4252         * pt.c (copy_default_args_to_explicit_spec): Preserve
4253         object's CV quals. Reorganize.
4255 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
4257         * typeck.c (build_modify_expr): Say `initialization' for
4258         INIT_EXPRs.
4259         * init.c (build_default_init): Convert to enumeral type, if
4260         needed.
4262 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
4264         * parse.y (nomods_initdcl0): Properly set things up for
4265         initdcl0_innards.
4267 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
4269         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
4270         (type_unification_real): Set it.
4271         (unify): Use it.
4273 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
4275         * decl.c (finish_destructor_body): Convert to vbase pointer here.
4277 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
4279         * semantics.c (begin_class_definition): Check we're not inside a
4280         template parm list.
4282 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
4284         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
4285         BASELINK_P.
4287 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4289         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
4290         * call.c (build_over_call): Add comment.
4292 2001-01-16 Daniel Berlin <dberlin@redhat.com>
4294         * cvt.c (ocp_convert): Handle vector type conversion
4295         * typeck2.c (digest_init): Handle vector type initializations
4297 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
4299         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
4300           was given.
4302 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
4304         * pt.c (check_nontype_parm): Rename to ...
4305         (invalid_nontype_parm_type_p): ... here.
4306         (process_template_parm): Adjust.
4307         (convert_template_argument): Adjust.
4309 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
4311         * pt.c (check_nontype_parm): New function.
4312         (process_template_parm): Use it.
4313         (convert_template_argument): Use it.
4314         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
4315         member.
4317 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
4319         * tree.c: Add defaults.h
4320         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
4321         * Make-lang.in (cp/tree.o): Add defaults.h.
4323 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
4325         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
4327 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
4329         * g++.1: Change to be ".so man1/gcc.1".
4331 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
4333         * Make-lang.in (c++.info, c++.install-info): Build and install g++
4334         internals info.
4335         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
4336         ($(srcdir)/cp/g++int.info): New target.
4337         * gxxint.texi: Add info directory entry.  Use @@ in email address.
4338         * .cvsignore: Update.
4340 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
4342         * typeck.c (build_c_cast): Do template processing earlier.
4343         Always pedwarn on array casts.
4345 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
4347         * friend.c (make_friend_class): Make sure a templated class is
4348         actually a template.
4350 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
4352         * decl2.c (get_guard): Set linkage from guarded decl.
4354 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
4356         * call.c (convert_default_arg): Check for unprocessed
4357         DEFAULT_ARG.
4358         * cp-tree.h (replace_defarg): Move to spew.c.
4359         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
4360         spew.c, which is where they really are.
4361         (done_pending_defargs): Declare.
4362         (unprocessed_defarg_fn): Declare.
4363         * decl.c (replace_defarg): Move to spew.c
4364         * parse.y (structsp): Call done_pending_defargs.
4365         * spew.c (defarg_fns): Rearrange list structure.
4366         (defarg_fnsdone): New static variable.
4367         (defarg_depfns): New static variable.
4368         (init_spew): Adjust.
4369         (add_defarg_fn): Store the type in TREE_TYPE.
4370         (do_pending_defargs): Detect and deal with ordering constraints
4371         and circularity.
4372         (done_pending_defargs): New function.
4373         (unprocessed_defarg_fn): New function.
4374         (replace_defarg): Moved from decl.c. Robustify. Don't save
4375         if circularity detected.
4377 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
4379         * pt.c (unify): Check array has a domain, before checking
4380         whether it is variable sized.
4382 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
4384         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
4385         parameters with pointers to arrays of unknown bound.
4387 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
4389         * parse.y (template_parm_header, template_spec_header): New
4390         reductions. Split out from ...
4391         (template_header): ... here. Use them.
4392         (template_template_parm): Use template_parm_header.
4393         * semantics.c (finish_template_template_parm): Add assert.
4395 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
4397         * mangle.c (write_builtin_type): Fix thinko.
4399         * pt.c (copy_default_args_to_explicit_spec_1): New function.
4400         (copy_default_args_to_explicit_spec): Likewise.
4401         (check_explicit_specialization): Use it.
4403         * class.c (finish_struct_1):  Remove last argument in call to
4404         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
4405         * decl.c (builtin_function): Likewise.
4406         (build_cp_library_fn): Likewise.
4407         (check_initializer): Likewise.
4408         (make_rtl_for_nonlocal_decl): Likewise.
4409         (cp_finish_decl): Likewise.
4410         (start_function): Likewise.
4411         * decl2.c (finish_anon_union): Likewise.
4412         * friend.c (do_friend): Likewise.
4413         * init.c (build_java_class_ref): Likewise.
4414         * method.c (make_thunk): Likewise.
4415         * pt.c (tsubst_friend_function): Likewise.
4416         * semantics.c (expand_body): Likewise.
4418 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
4420         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
4421         looking at DECL_CLONED_FUNCTION for non-functions.
4423 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
4425         * error.c (dump_template_parameter): Use parm to determine how
4426         to print default value.
4428 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
4430         * class.c (duplicate_tag_error): Clear more flags.
4432 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
4434         * call.c (build_new_method_call): Use binfo_for_vbase.
4436 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
4438         * cp-tree.h (flag_cond_mismatch): Don't declare.
4439         * decl2.c (flag_cond_mismatch): Don't define.
4440         (lang_f_options): Remove cond-mismatch.
4441         (unsupported_options): Add cond-mismatch.
4443 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
4445         * class.c (handle_using_decl): Reject using of constructor name
4446         of sourcing class. Allow injecting of a method with same name as
4447         nested class. Fixup error messages.
4449 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
4451         * decl2.c (lang_decode_option): Handle -Wformat=2.
4453 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
4455         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
4456         initialized_in_class.
4457         (DECL_DEFINED_IN_CLASS_P): Rename to ...
4458         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
4459         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
4460         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
4461         * pt.c (check_default_tmpl_args): Adjust for
4462         DECL_INITIALIZED_IN_CLASS_P.
4463         (instantiate_class_template): Likewise.
4464         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
4466         * class.c (finish_struct): Constify saved_filename.
4468 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
4470         * class.c (duplicate_tag_error): Adjust diagnostic.
4471         (finish_struct): Locally set location to start of struct.
4472         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
4474 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
4476         * decl.c (struct binding_level): Adjust class_shadowed comments
4477         to reflect reality.
4478         (push_class_level_binding): Adjust comments to reflect reality.
4479         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
4480         Don't set TREE_VALUE on the class_shadowed list.
4482 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4484         * decl2.c (acceptable_java_type): Allow references too.
4485         * init.c (build_java_class_ref): When using the new ABI, search
4486         `class$' and have it mangled with `mangle_decl.'
4487         * mangle.c (write_java_integer_type_codes): New function.
4488         (write_builtin_type): Detect and mangle Java integer and real
4489         types.
4491 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
4493         * decl2.c (grokfield): Don't accept `asm' specifiers for
4494         non-static data members.
4496 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4498         * expr.c (cplus_expand_expr): Don't reset `target'.
4500 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
4502         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
4504 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
4506         * parse.y (template_datadef): Check for error_mark_node.
4508 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
4510         * cp-tree.def (DEFAULT_ARG): Make `x' class.
4512 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
4514         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
4515         (record_builtin_type): Make non-static.
4516         (flag_short_double): Don't declare.
4517         (init_decl_processing): Remove the creation of many tree nodes now
4518         in c_common_nodes_and_builtins.
4519         (build_void_list_node): New function.
4520         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
4521         * cp-tree.h (flag_short_wchar): Don't declare.
4523 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
4525         * call.c (build_conv): Don't use build1 for USER_CONV.
4526         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
4528 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
4530         * lex.c (lang_init): Call c_common_lang_init.
4532 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
4534         * search.c (lookup_fnfields_here): Remove.
4535         (look_for_overrides_r): Use lookup_fnfields_1.
4536         Ignore functions from using declarations.
4538 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
4540         Implement exceptions specifiers for implicit member functions.
4541         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
4542         * method.c (synthesize_exception_spec): New function.
4543         (locate_dtor, locate_ctor, locate_copy): New functions.
4544         (implicitly_declare_fn): Generate the exception spec too.
4545         * search.c (check_final_overrider): Check artificial functions
4546         too.
4547         * typeck2.c (merge_exception_specifiers): New function.
4549 2001-01-03  Jason Merrill  <jason@redhat.com>
4551         * init.c (build_default_init): New fn.
4552         (perform_member_init): Split out from here.
4553         (build_new_1): Use it.  Simplify initialization logic.
4554         (build_vec_init): Take an array, rather than a pointer and maxindex.
4555         Speed up simple initializations.  Don't clean up if we're assigning.
4556         * cp-tree.h: Adjust.
4557         * decl2.c (do_static_initialization): Remove TREE_VEC case.
4558         * parse.y (new_initializer): Return void_zero_node for ().
4559         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
4560         * typeck2.c (digest_init): Only complain about user-written
4561         CONSTRUCTORs.
4563 2000-12-22  Mike Stump  <mrs@wrs.com>
4565         * decl2.c: (max_tinst_depth): Increase to 50.
4567 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
4569         * class.c (invalidate_class_lookup_cache): Zero the
4570         previous_class_values.
4571         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
4572         TREE_INT_CST_HIGH.
4573         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
4574         * decl.c (free_bindings): New variable.
4575         (push_binding): Don't create a new binding if we have one on the
4576         free list.
4577         (pop_binding): Put old bindings on the free list.
4578         (init_decl_processing): Use size_int, not build_int_2.
4579         Register free_bindings as a GC root.
4580         (cp_make_fname_decl): Use size_int, not build_int_2.
4581         (push_inline_template_parms_recursive): Likewise.
4582         (end_template_parm_list): Likewise.
4583         (for_each_tempalte_parm): Do not use walk_tree_without_duplicates.
4584         (tsubst_template_parms): Use size_int, not build_int_2.
4585         (tsubst): Likewise.
4586         * rtti.c (get_vmi_pseudo_type_info): Likewise.
4588 2001-01-02  Richard Henderson  <rth@redhat.com>
4590         * parse.y (asm): Set ASM_INPUT_P.
4592 2001-01-02  Jason Merrill  <jason@redhat.com>
4594         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
4595         for v3 ABI.
4597         * typeck.c (cp_truthvalue_conversion): New fn.
4598         * cvt.c (ocp_convert): Use it.
4600         * cp-tree.h: Lose c-common.c decls.
4602         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
4603         * cvt.c (convert_to_void): Use type_unknown_p.
4605         * typeck.c (strip_all_pointer_quals): Also strip quals from
4606         pointer-to-member types.
4608         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
4609         parse.y as C.
4611         * call.c (build_new_method_call): Do evaluate the object parameter
4612         when accessing a static member.
4613         * typeck.c (build_component_ref): Likewise.
4615 2001-01-02  Andreas Jaeger  <aj@suse.de>
4617         * decl.c (cp_missing_noreturn_ok_p): New.
4618         (init_decl_processing): Set lang_missing_noreturn_ok_p.
4620 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
4622         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
4624 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
4626         * class.c (pushclass): Remove #if 0'd code.
4627         * cp-tree.h (overload_template_name): Remove.
4628         * decl.c (store_bindings): Simplify.
4629         (pop_from_top_level): Likewise.
4630         * pt.c (overload_template_name): Remove.
4631         (instantiate_decl): Don't call push_to_top_level if it's not
4632         needed.
4634 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
4636         * pt.c (register_local_specialization): Don't return a value.
4637         (lookup_template_class): Use move-to-front heuristic when looking
4638         up template instantiations.
4639         (instantiate_decl): Only push_to_top_level when we're actually
4640         going to instantiate the template.
4642 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
4644         * search.c (binfo_for_vtable): Return least derived class, not
4645         most.  Handle secondary vtables.
4647 2000-12-22  Jason Merrill  <jason@redhat.com>
4649         * pt.c (more_specialized): Don't optimize len==0.
4650         (fn_type_unification): If we're adding the return type, increase len.
4652         * typeck.c (build_binary_op): Fix pmf comparison logic.
4654         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
4655         DECL_STATIC_FUNCTION_P.
4657         * semantics.c (genrtl_finish_function): Don't try to jump to
4658         return_label unless it exists.
4660         In partial ordering for a call, ignore parms for which we don't have
4661         a real argument.
4662         * call.c (joust): Pass len to more_specialized.
4663         (add_template_candidate_real): Strip 'this', pass len.
4664         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
4665         (get_bindings_order): New fn.  Pass len down.
4666         (get_bindings_real): Strip 'this', pass len.
4667         (fn_type_unification): Likewise.
4668         (type_unification_real): Succeed after checking 'len' args.
4669         (most_specialized_instantiation): Lose explicit_args parm.
4670         * class.c (resolve_address_of_overloaded_function): Strip 'this',
4671         pass len.
4673 2000-12-21  Jason Merrill  <jason@redhat.com>
4675         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
4676         DECL_TEMPLATE_RESULT.
4678         * search.c (lookup_field_r): Call lookup_fnfields_1, not
4679         lookup_fnfields_here.
4681         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
4683         * call.c (build_object_call): Also allow conversions that return
4684         reference to pointer to function.
4685         (add_conv_candidate): Handle totype being ref to ptr to fn.
4686         (build_field_call): Also allow members of type reference to function.
4687         Lose support for calling pointer to METHOD_TYPE fields.
4689         * error.c (dump_expr): Handle *_CAST_EXPR.
4691         * typeck2.c (build_scoped_ref): Always convert to the naming class.
4693         * tree.c (break_out_cleanups): Lose.
4694         * cp-tree.h: Remove prototype.
4695         * typeck.c (build_component_ref): Don't break_out_cleanups.
4696         (build_compound_expr): Likewise.
4697         * semantics.c (finish_expr_stmt): Likewise.
4699 2000-12-20  Richard Henderson  <rth@redhat.com>
4701         * cp-tree.h: Update declarations.
4702         * decl.c (finish_case_label): Return the new stmt node.
4703         * semantics.c (finish_goto_stmt): Likewise.
4704         (finish_expr_stmt, finish_return_stmt): Likewise.
4705         (finish_break_stmt, finish_continue_stmt): Likewise.
4706         (finish_asm_stmt): Likewise.
4707         * parse.y (already_scoped_stmt): Set STMT_LINENO.
4708         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
4709         (simple_if, simple_stmt): Return the new stmt node.
4710         (save_lineno): New.
4712 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
4714         * cp-tree.h: Don't declare warn_long_long.
4716 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4718         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
4719         IS_AGGR_TYPE.
4721 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4723         * pt.c (unify): Handle when both ARG and PARM are
4724         BOUND_TEMPLATE_TEMPLATE_PARM.
4726 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4728         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
4729         DECL_TEMPLATE_PARM_P.
4731 2000-12-15  Jason Merrill  <jason@redhat.com>
4733         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
4735         * init.c (build_new_1): Don't strip quals from type.
4737         * decl.c (pushdecl): Don't check for linkage on a non-decl.
4739         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
4741         * call.c (build_new_function_call): Lose space before paren in
4742         error message.
4743         (build_new_method_call): Likewise.
4745         * typeck2.c (build_m_component_ref): Propagate quals from datum.
4747 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4749         * pt.c (check_explicit_specialization): Propagate default
4750         function arguments to explicit specializations.
4752 2000-12-13  DJ Delorie  <dj@redhat.com>
4754         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
4755         and <? operators.
4757 2000-12-08  Jason Merrill  <jason@redhat.com>
4759         * error.c (dump_function_name): Don't let the user see __comp_ctor.
4761         Clean up copy-initialization in overloading code.
4762         * call.c (build_user_type_conversion_1): Die if we are asked to
4763         convert to the same or a base type.
4764         (implicit_conversion): Avoid doing so.  Lose reference binding code.
4765         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
4766         direct-initialization.  Also do direct-init part of copy-init.
4767         (build_user_type_conversion): Don't provide context to convert_like.
4768         * cvt.c (ocp_convert): build_user_type_conversion will now provide
4769         the constructor call for copy-init.
4771         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
4772         instantiation of a member template.
4773         (do_decl_instantiation): Not here.
4775 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
4777         * class.c (check_field_decls): Don't special case anonymous
4778         fields in error messages.
4779         (note_name_declared_in_class): Use %D on diagnostic.
4781         * tree.c (pod_type_p): Use strip_array_types.
4782         (cp_valid_lang_attribute): Likewise.
4783         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
4784         multiple evaluations.
4785         (cp_has_mutable_p): Use strip_array_types.
4787 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
4789         * cp-tree.h (sufficient_parms_p): Declare new function.
4790         * call.c (sufficient_parms_p): New function, broken out of ...
4791         (add_function_candidate): ... here. Use it.
4792         (add_conv_candidate): Use it.
4793         * decl.c (grok_ctor_properties): Use it.
4795 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
4797         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
4799 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
4801         * decl2.c (lang_decode_option): Handle -Wformat-security.
4803 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4805         * pt.c (verify_class_unification): New function.
4806         (get_class_bindings): Use it.
4807         (try_class_unification): Tidy.
4808         (unify): Handle when argument of a template-id is not
4809         template parameter dependent.
4810         (template_args_equal): Handle when TREE_CODE's do not match.
4812 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
4814         * lang-specs.h (c++): When invoking the stand-alone preprocessor
4815         for -save-temps, pass all relevant -Defines to it, and then don't
4816         pass them to cc1plus.
4818 2000-12-05  Will Cohen  <wcohen@redhat.com>
4820         * decl.c (finish_case_label): Cleared
4821         more_cleanups_ok in surrounding function scopes.
4822         (define_label): Likewise.
4824 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
4826         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
4827         (get_matching_virtual): Remove.
4828         (look_for_overrides): Declare new function.
4829         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
4830         DECL_VINDEX here.
4831         * class.c (check_for_override): Move base class iteration code
4832         to look_for_overrides.
4833         * search.c (next_baselink): Remove.
4834         (get_virtuals_named_this): Remove.
4835         (get_virtual_destructor): Remove.
4836         (tree_has_any_destructors_p): Remove.
4837         (struct gvnt_info): Remove.
4838         (check_final_overrider): Remove `virtual' from error messages.
4839         (get_matching_virtuals): Remove. Move functionality to ...
4840         (look_for_overrides): ... here, and ...
4841         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
4842         to be overriding.
4844 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
4846         * typeck.c (get_delta_difference): If via a virtual base,
4847         return zero.
4848         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
4849         adjustment.
4851 2000-12-04  Richard Henderson  <rth@redhat.com>
4853         * error.c (dump_tree): Use output_add_string not OB_PUTS.
4855 2000-12-04  Jason Merrill  <jason@redhat.com>
4857         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
4858         (write_builtin_type): Pass intSI_type_node and the like through
4859         type_for_mode.
4860         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
4861         Pass intSI_type_node and the like through type_for_mode.
4862         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
4863         * pt.c (tsubst, unify): Likewise.
4864         * tree.c (walk_tree): Likewise.
4865         * error.c (dump_type): Likewise.
4866         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
4868         * Make-lang.in: Tweak top comment for emacs.
4869         (cp/TAGS): Restore.
4871         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
4873         * class.c (clone_function_decl): Robustify.
4875 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
4877         * decl.c (store_bindings): Only search in the non modified
4878         old_bindings for duplicates.
4880 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
4882         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
4883         TYPE_POLYMORPHIC_P.
4885         * typeck.c (build_static_cast): Remove unused variable.
4887 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4889         * pt.c: Fix typo in comment.
4891 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
4893         * decl2.c (warn_format): Remove definition.
4894         (lang_decode_option): Handle -Wformat-nonliteral,
4895         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
4897 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
4899         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
4900         (init_decl_processing): Don't create string_type_node,
4901         const_string_type_node, wint_type_node, intmax_type_node,
4902         uintmax_type_node, default_function_type, ptrdiff_type_node and
4903         unsigned_ptrdiff_type_node.  Adjust position of call to
4904         c_common_nodes_and_builtins.
4905         (identifier_global_value): New function.
4907 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
4909         * call.c (standard_conversion): Reject pointer to member
4910         conversions from ambiguous, inaccessible or virtual bases.
4911         * typeck.c (build_static_cast): Don't check pointers to members
4912         specially.
4914 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
4916         * method.c (do_build_copy_constructor): Preserve cv
4917         qualifications when accessing source object members.
4918         (do_build_assign_ref): Likewise. Remove separate diagnostics for
4919         unnamed fields.
4921 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
4923         * method.c (do_build_assign_ref): Construct appropriately
4924         CV-qualified base reference. Don't allow const casts in base
4925         conversion.
4927 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
4929         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
4930         incomplete return type.
4932 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
4934         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
4935         * semantics.c (finish_base_specifier): Accept a _TYPE not a
4936         _DECL.
4938 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
4940         * spew.c (yyerror): Cope if yylval.ttype is NULL.
4942 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
4944         * decl.c (grokdeclarator): Diagnose undefined template contexts.
4946 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
4948         * decl.c (grokdeclarator): Do type access control on friend
4949         class.
4951 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
4953         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
4954         bison parser ickiness.
4955         * pt.c (tsubst_friend_function): Enter namespace scope when
4956         tsubsting the function name.
4957         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
4959 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
4961         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
4962         * cvt.c (cp_convert_to_pointer): Add force parameter.
4963         Allow conversions via virtual base if forced.
4964         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
4965         (ocp_convert): Likewise.
4966         * search.c (binfo_from_vbase): Return the virtual base's binfo.
4967         * typeck.c (get_delta_difference): Adjust handling of virtual
4968         bases.
4970 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
4972         * tree.c (struct list_hash): Remove.
4973         (list_hash_table): Make it be an htab.
4974         (struct list_proxy): New type.
4975         (list_hash_eq): New function.
4976         (list_hash_pieces): Renamed from ...
4977         (list_hash): ... this.
4978         (list_hash_lookup): Remove.
4979         (list_hash_add): Remove.
4980         (hash_tree_cons): Use the generic hashtable.
4981         (mark_list_hash): Remove.
4982         (init_tree): Create the hashtable.
4984 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
4986         * method.c (build_mangled_C9x_name): Rename to
4987         build_mangled_C99_name.  Change C9X references in comments to
4988         refer to C99.
4990 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
4992         * parse.y (unary_expr): Move VA_ARG from here ...
4993         (primary): ... to here.
4995 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
4997         * semantics.c (finish_id_expr): If type is error_mark, return
4998         error_mark.
5000 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
5002         * pt.c (lookup_template_class): Simplify loop exit constructs.
5003         Cope when there is no partial instantiation of a template
5004         template member.
5006 Thu Nov 23 02:16:47 2000  J"orn Rennecke <amylaar@redhat.com>
5008         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
5010 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
5012         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
5013         prefix.
5015         * pt.c (do_decl_instantiate): Explicitly clone constructors and
5016         destructors that haven't already been cloned.
5018 2000-11-20  Richard Henderson  <rth@redhat.com>
5020         * parse.y (yyparse_1): Rename the parser entry point.
5022 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
5024         * mangle.c (write_name): Use <unscoped-name> for names directly in
5025         function scope.
5026         (write_unscoped_name): Accept names directly in function scope.
5028 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
5030         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
5031         * parse.y (extdef): Add EXPORT reduction.
5032         * spew.c (yylex): Don't skip export here.
5034 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
5036         * decl.c (init_decl_processing): Correct name of pure virtual
5037         function under the new ABI.
5038         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
5039         (throw_bad_typeid): Likewise for bad typeid function.
5041 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
5043         * decl.c (grokparms): Don't even function types of `void' type,
5044         either.
5045         * mangle.c (write_type): Don't crash when confronted with the
5046         error_mark_node.
5048         * decl.c (grokparms): Don't create parameters of `void' type.
5050 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
5052         * lex.c (mark_impl_file_chain): Delete.
5053         (init_parse): Remove call to ggc_add_string_root.  No need to
5054         ggc_strdup a string constant.  Do not add impl_file_chain to GC
5055         roots.
5056         (handle_pragma_implementation): No need to ggc_strdup main_filename.
5058 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
5060         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
5062 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
5064         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
5065         * decl.c (grokdeclarator): Don't reject void parms here.
5066         (require_complete_types_for_parms): Simplify, use
5067         complete_type_or_else.
5068         (grokparms): Remove bitrot. Remove funcdef parm.
5069         Deal with ellipsis parm lists here.
5070         * semantics.c (finish_parmlist): Don't append void_list_node
5071         here. Set PARMLIST_ELLIPSIS_P.
5073 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
5075         * typeck2.c (incomplete_type_error): Reorganise to avoid
5076         excessive diagnostics.
5078 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
5080         * lex.c (struct impl_files, internal_filename): Constify a char *.
5082 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
5084         * mangle.c (write_special_name_constructor): Don't generate
5085         assembler junk when confronted with an old-style constructor.
5086         (write_special_name_destructor): Likewise.
5087         (mangle_decl_string): Do it here instead.
5089 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
5091         * call.c (op_error): Make error messages clearer.
5093 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
5095         * decl.c (wrapup_globals_for_namespace): Don't mark things
5096         TREE_ASM_WRITTEN when they're not.
5098 2000-11-15  Jason Merrill  <jason@redhat.com>
5100         * typeck2.c (friendly_abort): Uncount the error before handing
5101         off to fancy_abort.
5103 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
5105         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
5107 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
5109         * class.c (build_vtbl_initializer): Fix typo in comment.
5110         * typeck.c (expr_sizeof): Don't crash on errors.
5112 2000-11-14  Jim Wilson  <wilson@redhat.com>
5114         * lang-specs.h: Add %2 after %(cc1_options).
5116 2000-11-14  Richard Henderson  <rth@redhat.com>
5118         * typeck.c (c_sizeof): Be strict about casting result value
5119         back to c_size_type_node.
5120         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
5122 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
5124         * typeck.c (build_unary_op): Use boolean_increment from
5125         c-common.c, moving the relevant code there.
5127 2000-11-11  Jason Merrill  <jason@redhat.com>
5129         * typeck.c (mark_addressable): Don't call put_var_into_stack.
5131         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
5132         in inlines.
5134 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5136         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
5137         * lex.c (copy_lang_decl): Likewise.
5139 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
5141         * dump.c (cp_dump_tree): Don't dump function bodies here.
5143         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
5144         (dump.o): Update dependency list.
5145         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
5146         (flag_dump_translation_unit): Likewise.
5147         (CP_TYPE_QUALS): Adjust definition.
5148         (DECL_C_BIT_FIELD): Remove.
5149         (SET_DECL_C_BIT_FIELD): Likewise.
5150         (CLEAR_DECL_C_BIT_FIELD): Likewise.
5151         (add_maybe_template): Likewise.
5152         (strip_array_types): Likewise.
5153         (dump_node_to_file): Likewise.
5154         (cp_dump_tree): New function.
5155         * decl.c (init_decl_processing): Set lang_dump_tree.
5156         * decl2.c (flag_dump_translation_unit): Remove.
5157         * dump.c: Move most of it to ../c-dump.c.
5158         (cp_dump_tree): New function.
5159         * pt.c (add_maybe_template): Remove.
5160         * typeck.c (strip_array_types): Likewise.
5162 2000-11-07  Eric Christopher  <echristo@redhat.com>
5164         * decl.c (init_decl_processing): Change definition of
5165         __wchar_t to wchar_t.  Remove artificial declaration of
5166         wchar_t.
5167         * lex.c: Change instances of __wchar_t to wchar_t.
5169 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
5171         * lex.c (do_identifier): Don't lookup_name for operators.
5172         * parse.y (operator): Save looking_for_typename.
5173         (unoperator): Restore it.
5174         * spew.c (frob_opname): Use nth_token for lookahead.
5176 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
5178         * decl.c (grok_op_properties): Always use coerce_new_type and
5179         coerce_delete_type.
5180         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
5181         exception specification. Tidy up.
5182         (coerce_delete_type): Preserve exception specification. Tidy up.
5184 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
5186         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
5187         (push_binding_level), error.c (cp_tree_printer), pt.c
5188         (process_partial_specialization, tsubst_template_arg_vector),
5189         search.c (lookup_member): Use memset () instead of bzero ().
5191 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
5193         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
5195 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
5197         * Make-lang.in (c++.distdir): Remove.
5199 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
5201         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
5202         declarations from different namespaces to be combined.
5204 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
5206         * decl.c: Include tm_p.h.
5208 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
5210         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
5212 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
5214         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
5215         (build_overload_value), repo.c (open_repo_file), xref.c
5216         (open_xref_file): Use strchr () and strrchr () instead of index ()
5217         and rindex ().
5219 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
5221         * call.c (build_over_call): Call fold on the CALL_EXPR.
5223 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
5225         * error.c (dump_template_decl): Separate template hearders with
5226         space not comma.
5228 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
5230         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
5231         TS_* flags with corresponding TFF_*.  Adjust prototypes of
5232         functions (which used to take a tree_string_flags) to take an int.
5234         * cp-tree.h (enum tree_string_flags): Remove
5235         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
5236         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
5237         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
5238         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
5239         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
5240         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
5241         (type_as_string, decl_as_string, expr_as_string,
5242         context_as_string): Adjust prototype.
5244         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
5245         instead of TS_PLAIN.
5247         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
5248         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
5249         plain `0'.
5251 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
5253         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
5254         (linkage_kind): New enumeration.
5255         (decl_linkage): New function.
5256         * decl2.c (comdat_linkage): Extend comment.
5257         * error.c (dump_function_decl): Print the arguments used to
5258         instantiate a template, even when not printing the type of the
5259         function.
5260         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
5261         not TREE_PUBLIC, to test for external linkage.
5262         * tree.c (decl_linkage): New function.
5264 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
5266         * pt.c (instantiate_decl): Always instantiate static data members
5267         initialized in-class.
5269 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
5271         * Make-lang.in: Move all build rules here from Makefile.in,
5272         adapt to new context.  Wrap all rules that change the current
5273         directory in parentheses.  Expunge all references to $(P).
5274         When one command depends on another and they're run all at
5275         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
5276         all object-file generation rules.  Delete obsolete variables.
5278         * Makefile.in: Delete.
5279         * config-lang.in: Delete outputs= line.
5281 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
5283         * error.c (dump_function_decl): Print no space between
5284         `ptr-operator' the `type-specifier' of the return type.
5285         (dump_type_prefix): Make sure we put space at the appropriate
5286         place.
5288 2000-10-23  Jason Merrill  <jason@redhat.com>
5290         * call.c (equal_functions): Also call decls_match for extern "C" fns.
5292 2000-10-22  Jason Merrill  <jason@redhat.com>
5294         * call.c (build_conditional_expr): Use ocp_convert to force
5295         rvalue conversion.
5297 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
5299         * call.c (standard_conversion): Use RVALUE_CONVs for all
5300         expressions that satisfy lvalue_p, not just those that satisfy
5301         real_lvalue_p.
5303         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
5305         * typeck.c (c_sizeof): Return an expression of `size_t' type,
5306         not one with TYPE_IS_SIZETYPE set.
5307         (dubious_conversion_warnings): Remove special-case code.
5309 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
5311         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
5312         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
5313         (dump_type_prefix): Print vector-of-int as 'int vector'.
5314         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
5315         * tree.c (walk_tree): Handle VECTOR_TYPE.
5317         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
5319 2000-10-21  Jason Merrill  <jason@redhat.com>
5321         * parse.y (operator): Set got_object from got_scope.
5322         Set looking_for_typename.
5323         * decl.c (lookup_name_real): Clear val after setting from_obj.
5324         Reorganize diagnostic.
5326 2000-10-20  Jason Merrill  <jason@redhat.com>
5328         * tree.c (walk_tree): Don't walk into default args.
5330         * error.c (dump_expr): Use host_integerp.
5332 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
5334         * typeck2.c (abstract_virtuals_error): Use "because" instead of
5335         "since" in error message.
5337 Fri Oct 20 13:54:59 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5339         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
5341 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
5343         * decl.c (revert_static_member_fn): Fixed typo.
5345 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
5347         * class.c (subobject_offset_fn): New type.
5348         (dfs_record_base_offsets): Remove.
5349         (record_base_offsets): Likewise.
5350         (dfs_search_base_offsets): Likewise.
5351         (record_subobject_offset): New function.
5352         (check_subobject_offset): Likewise.
5353         (walk_subobject_offsets): Likewise.
5354         (record_subobject_offsets): Likewise.
5355         (layout_conflict_p): Reimplement.
5356         (layout_nonempty_base_or_field): Correct handling of type
5357         conflicts during layout.
5358         (layout_empty_base): Likewise.
5359         (build_base_field): Adjust to handle new representation of empty
5360         base offset table.
5361         (build_base_fields): Likewise.
5362         (layout_virtual_bases): Likewise.
5363         (splay_tree_compare_integer_csts): New function.
5364         (layout_class_type): Use a splay_tree, rather than a varray, to
5365         represent the offsets of empty bases.
5367         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
5368         * decl.c (select_decl): Don't return declarations that are
5369         DECL_ANTICIPATED.
5371 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
5373         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
5374         (fake_std_node): New macro.
5375         * decl.c (in_std): Rename to ...
5376         (in_fake_std): ... this.
5377         (flag_no_builtin): Remove.
5378         (flag_no_nonansi_builtin): Likewise.
5379         (walk_namespaces_r): Use fake_std_node.
5380         (push_namespace): Use std_identifier.
5381         (pop_namespace): Use in_fake_std.
5382         (lookup_name_real): Use fake_std_node.
5383         (init_decl_processing): When -fhonor-std, create the `std'
5384         namespace.  Don't create a dummy fake_std_node in that case.
5385         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
5386         (builtin_function): Put builtins whose names don't begin
5387         with `_' in the std namespace.
5388         * decl2.c (flag_no_builtin): Remove.
5389         (flag_no_nonansi_builtin): Likewise.
5390         (set_decl_namespace): Use fake_std_node.
5391         (validate_nonmember_using_decl): Likewise.
5392         (do_using_directive): Likewise.
5393         (handle_class_head): Likewise.
5394         * dump.c (dequeue_and_dump): Likewise.
5395         * except.c (init_exception_processing): Use std_identifier.
5396         * init.c (build_member_call): Use fake_std_node.
5397         * rtti.c (init_rtti_processing): Use std_identifier.
5399 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
5401         * cp-tree.h (back_end_hook): Remove declaration.
5402         * decl2.c (back_end_hook): Remove definition.
5404         * dump.c (dequeue_and_dump): Dump TREE_USED.
5406 Tue Oct 17 20:19:06 2000  Brad Lucier <lucier@math.purdue.edu>
5408         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
5410 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
5412         * decl.c (WINT_TYPE): Define.
5413         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
5414         c_size_type_node, signed_size_type_node and wint_type_node.
5416 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
5418         * decl2.c (warn_missing_format_attribute): New variable.
5419         (lang_decode_option): Decode -Wmissing-format-attribute.
5421 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
5423         * typeck.c (qualify_type): Remove.
5424         (composite_pointer_type): Fix handling of conversions to `cv void*'.
5426 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5428         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
5430 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5432         * Makefile.in (parse.c, parse.h): Create atomically.
5434 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
5436         * class.c (current_obstack): Remove.
5437         * decl.c (ggc_p): Remove.
5438         (start_decl): Don't use decl_tree_cons.
5439         (grokdeclarator): Don't use build_decl_list.
5440         (start_function): Don't use decl_tree_cons.
5441         (finish_function): Don't mess with obstacks.
5442         * decl2.c (grok_x_components): Don't use build_decl_list.
5443         * lex.c (make_call_declarator): Don't call decl_tree_cons.
5444         (implicitly_declare_fn): Don't call build_decl_list.
5445         * parse.y (frob_specs): Don't call build_decl_list or
5446         decl_tree_cons.
5447         (expr_or_declarator_intern): Don't call decl_tree_cons.
5448         (primary): Don't call build_decl_list.
5449         (fcast_or_absdcl): Likewise.
5450         (typed_declspecs): Don't call decl_tree_cons.
5451         (reserved_declspecs): Don't call build_decl_list.
5452         (declmods): Likewise.
5453         (reserved_typespecquals): Likewise.
5454         (aggr): Likewise.
5455         (new_type_id): Likewise.
5456         (cv_qualifiers): Likewise.
5457         (after_type_declarator_intern): Likewise.
5458         (notype_declarator_intern): Likewise.
5459         (absdcl_intern): Likewise.
5460         (named_parm): Likewise.
5461         * pt.c (most_specialized_class): Likewise.
5462         * repo.c (temporary_obstack): Make it a structure, not a pointer.
5463         (init_repo): Initialize it.
5464         * search.c (current_obstack): Remove.
5465         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
5467 2000-10-09  Richard Henderson  <rth@cygnus.com>
5469         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
5470         (c++ language support bits for libgcc): Remove.
5471         (c++.clean): Remove cplib2.txt cleanup.
5472         * config-lang.in (headers, lib2funcs): Remove.
5474         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
5475         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
5476         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
5477         * inc/new.h, inc/typeinfo: Remove files.
5479 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
5481         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
5482         defined.
5483         (init_decl_processing): Initialize intmax_type_node and
5484         uintmax_type_node.
5486 2000-10-06  Richard Henderson  <rth@cygnus.com>
5488         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
5489         (original_result_rtx): Remove.
5490         * decl.c (save_function_data): Don't clear x_result_rtx.
5491         (mark_lang_function): Don't mark it either.
5492         * expr.c (fixup_result_decl): Remove.
5493         * semantics.c (genrtl_named_return_value): Frob the return decl
5494         before calling emit_local_var.
5495         (genrtl_finish_function): Don't call fixup_result_decl.
5496         Always emit the jump to return_label.
5498 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
5500         * pt.c (lookup_template_class): Set current access for enum.
5501         (tsubst_enum): Set file & line for enum decl.
5503         * spew.c (yylex): Remove unused variable.
5505 2000-10-05  Richard Henderson  <rth@cygnus.com>
5507         * semantics.c (genrtl_finish_function): Don't init or check
5508         can_reach_end; remove noreturn and return value checks.
5510 2000-10-05  Tom Tromey  <tromey@cygnus.com>
5512         * init.c (build_java_class_ref): Use `build_static_name' with a
5513         suffix, not a prefix, to build the class object's name.
5515 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
5517         * cp-tree.h (access_kind): Fix comment typo.
5518         * decl2.c (grokfield): Fix diagnostic typo.
5519         * semantics.c (finish_template_type): Fix comment typo.
5520         (finish_qualified_object_call_expr): Likewise.
5522 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
5524         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
5525         tsubsting fails.
5527 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
5529         * spew.c (frob_id): New static function.
5530         (frob_opname): Use it.
5531         (yylex): Use it.
5533 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
5535         * decl.c (lang_mark_false_label_stack): Remove.
5536         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
5538 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
5540         * gxxint.texi: Use @email for formatting email addresses.
5542 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
5544         * error.c: Remove direct obstack manipulation.  Replace with
5545         output_buffer-based formatting.  Adjust calls to removed macros.
5546         (obstack_chunk_alloc, obstack_chunk_free): Remove.
5547         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
5548         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
5550 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
5552         * ir.texi: Move to ../c-tree.texi.
5554 2000-09-20  Jason Merrill  <jason@redhat.com>
5556         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
5558 2000-09-21  Andreas Jaeger  <aj@suse.de>
5560         * errfn.c: Move declaration of cp_printer and cp_printers to ...
5561         * cp-tree.h: ... here.
5563         * error.c: Remove declaration of cp_printer.
5565 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
5567         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
5569 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
5571         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
5572         users.
5574 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
5576         * decl.c (start_function): Robustify.
5578 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5580         * cp-tree.h (check_function_format): Accept a `status' parameter.
5582         * call.c, typeck.c: Updates calls to `check_function_format'.
5584 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
5586         * decl2.c (handle_class_head): Always push some scope even
5587         in the error case.
5589 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
5591         * cp-tree.h (struct cp_language_function): Remove
5592         x_scope_stmt_stack and name_declared.
5593         (current_scope_stmt_stack): Remove.
5594         (function_name_declared_p): New macro.
5595         (struct lang_decl_flags): Use c_lang_decl as a base class.
5596         (context): Remove.
5597         (struct lang_decl): Replace saved_tree with context.
5598         (DECL_FRIEND_CONTEXT): Adjust accordingly.
5599         (SET_DECL_FRIEND_CONTEXT): Likewise.
5600         (DECL_VIRTUAL_CONTEXT): Likewise.
5601         (DECL_SAVED_TREE): Remove.
5602         (C_DECLARED_LABEL_FLAG): Likewise.
5603         (cplus_expand_expr_stmt): Don't declare.
5604         (add_decl_stmt): Likewise.
5605         (add_scope_stmt): Likewise.
5606         * decl.c (mark_stmt_tree): Remove.
5607         (case_compare): Likewise.
5608         (finish_case_label): Use c_add_case_label.
5609         (init_decl_processing): Set more language-specific hooks.
5610         (build_enumerator): Fix typo in comment.
5611         (cplus_expand_expr_stmt): Remove.
5612         (mark_lang_function): Use mark_c_language_function.
5613         (lang_mark_tree): Use c_mark_lang_decl.
5614         * decl2.c: Change order of inclusion.
5615         * except.c: Likewise.
5616         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
5617         back on c_expand_expr.
5618         * friend.c: Include expr.h.
5619         * init.c: Change order of inclusion.
5620         * Makefile.in: Update dependencies.
5621         * lex.h (free_lang_decl_chain): Remove.
5622         * optimize.c (maybe_clone_body): Use function_name_declared_p.
5623         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
5624         it doesn't exist.
5625         (instantiate_decl): Use function_name_declared_p.
5626         * semantics.c (lang_expand_expr_stmt): Remove.
5627         (set_current_function_name_declared): Likewise.
5628         (current_function_name_declared): Likewise.
5629         (begin_compound_stmt): Use function_name_declared_p.
5630         (add_decl_stmt): Remove.
5631         (setup_vtbl_ptr): Use function_name_declared_p.
5632         (add_scope_stmt): Remove.
5633         (current_scope_stmt_stack): New function.
5634         (cp_expand_stmt): Don't handle SCOPE_STMTs.
5635         (expand_body): Use function_name_declared_p.
5636         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
5637         * typeck.c: Change order of includes.
5638         (convert_sequence): Remove.
5640 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
5642         * lex.c (reswords): Add _Complex.
5644 Thu Sep 14 12:10:45 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5646         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
5648 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
5650         * init.c (begin_init_stmts): Don't use // comments.
5652 2000-09-12  Jason Merrill  <jason@redhat.com>
5654         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
5655         all non-extern arrays.
5657         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
5658         typenames, too.  Downgrade complaint to pedwarn.
5659         (xref_tag): Warn about surprising behavior of 'friend struct T'.
5660         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
5661         'class This::Inherited'.
5663 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
5665         * decl.c (finish_case_label): Given the LABEL_DECL a
5666         DECL_CONTEXT.
5668 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
5670         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
5671         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
5672         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
5673         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
5674         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
5675         New macros.
5676         (sorry_for_unsupported_tree, print_scope_operator,
5677         print_left_paren, print_right_paren, print_left_bracket,
5678         print_right_bracket, print_whitespace): Likewise.
5679         (aggr_variety): Rename to class_key_or_enum.
5680         (print_type): Rename to print_type_id.
5681         (print_type_specifier_seq, print_simple_type_specifier,
5682         print_elaborated_type_specifier,
5683         print_rest_of_abstract_declarator,
5684         print_parameter_declaration_clause, print_exception_specification,
5685         print_nested_name_specifier, print_template_id,
5686         typedef_original_name,  print_template_argument_list_start,
5687         print_template_argument_list_end): New functions.
5689 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
5691         * ir.texi: Add more documentation.
5693 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
5695         * cp-tree.h (struct saved_scope): Remove x_function_parms.
5696         (current_function_parms): Don't define.
5697         (struct cp_language_function): Remove parms_stored.
5698         (current_function_just_assigned_this): Don't define.
5699         (current_function_parms_stored): Likewise.
5700         (static_ctors): Declare.
5701         (static_dtors): Likewise.
5702         (SF_EXPAND): Don't define.
5703         (expand_start_early_try_stmts): Remove declaration.
5704         (store_parm_decls): Likewise.
5705         * decl.c (static_ctors): Don't declare.
5706         (static_dtors): Likewise.
5707         (struct binding_level): Remove this_block.
5708         (poplevel): Remove dead code.
5709         (set_block): Likewise.
5710         (mark_binding_level): Don't mark this_block.
5711         (mark_saved_scope): Don't mark x_function_parms.
5712         (init_decl_processing): Don't add current_function_parms as a GC
5713         root.
5714         (check_function_type): Change prototype.
5715         (start_function): Remove RTL-generation code.
5716         (expand_start_early_try_stmts): Remove.
5717         (store_parm_decls): Give it internal linkage.  Remove
5718         RTL-generation code.
5719         (finish_function): Remove RTL-generation code.
5720         * decl2.c (static_ctors): Fix formatting.
5721         (static_dtors): Likewise.
5722         * method.c (use_thunk): Don't call store_parm_decls.
5723         (synthesize_method): Likewise.
5724         * optimize.c (maybe_clone_body): Likewise.
5725         * parse.y (fn.def2): Likewise.
5726         (.set_base_init): Likewise.
5727         (nodecls): Likewise.
5728         * pt.c (instantiate_decl): Likewise.
5729         * rtti.c (synthesize_tinfo_fn): Likewise.
5730         * semantics.c (genrtl_try_block): Simplify.
5731         (expand_body): Use genrtl_start_function and
5732         genrtl_finish_function.
5733         (genrtl_start_function): New function.
5734         (genrtl_finish_function): Likewise.
5736 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
5738         * error.c (cp_tree_printer, case 'P'): Append break.
5740 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
5742         * cp-tree.h (frob_opname): Declare.
5743         * parse.y (saved_scopes): New static variable.
5744         (cp_parse_init): Adjust.
5745         (do_id): If lastiddecl is NULL, do do_identifier.
5746         (operator): Save scope information.
5747         (unoperator): New reduction. Restore scope information.
5748         (operator_name): Append unoperator. Call frob_opname.
5749         * spew.c (frob_opname): Define.
5751 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
5753         * decl.c, rtti.c: Include defaults.h if not already included.
5754         Don't define the *_TYPE_SIZE macros.
5756 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
5758         * cp-tree.h (push_switch): Change prototype.
5759         (check_cp_case_value): Remove declaration.
5760         (decl_constant_value): Likewise.
5761         * decl.c (struct cp_switch): Add switch_stmt and cases.
5762         (case_compare): New function.
5763         (push_switch): Set switch_stmt.  Initialize cases.
5764         (pop_switch): Clean up cases.
5765         (define_case_label): Rename to ...
5766         (finish_case_label): ... this.  Do semantic analysis for case
5767         labels here.
5768         (start_function): Correct comment.
5769         * decl2.c (check_cp_case_value): Remove.
5770         * expr.c (do_case): Remove.
5771         * pt.c (tsubst_expr): Adjust call to finish_case_label.
5772         * semantics.c (genrtl_do_poplevel): Remove declaration.
5773         (RECHAIN_STMTS): Remove.
5774         (finish_break_stmt): Use build_break_stmt.
5775         (finish_continue_stmt): Use build_continue_stmt.
5776         (finish_switch_cond): Adjust condition here, rater than in
5777         c_expand_start_case.
5778         (finish_case_label): Remove.
5779         * typeck.c (c_expand_return): Remove.
5780         (c_expand_start_case): Likewise.
5782 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
5784         * ir.texi: Document type nodes.
5786 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
5788         * cp-tree.h (init_cp_semantics): Declare.
5789         (genrtl_try_block): Don't declare.
5790         (genrtl_handler): Likewise.
5791         (genrtl_catch_block): Likewise.
5792         (genrtl_ctor_stmt): Likewise.
5793         (genrtl_subobject): Likewise.
5794         (genrtl_do_poplevel): Likewise.
5795         (genrtl_named_return_value): Likewise.
5796         * lex.c (init_parse): Call init_cp_semantics.
5797         * semantics.c (genrtl_try_block): Give it internal linkage.
5798         (genrtl_handler): Likewise.
5799         (genrtl_catch_block): Likewise.
5800         (genrtl_ctor_stmt): Likewise.
5801         (genrtl_subobject): Likewise.
5802         (genrtl_do_poplevel): Likewise.
5803         (genrtl_named_return_value): Likewise.
5804         (lang_expand_stmt): Rename to ...
5805         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
5806         (init_cp_semantics): Define.
5808         * decl.c (initialize_local_var): Remove RTL-generating code.
5809         * semantics.c (genrtl_try_block): Fix formatting.
5811         Move statement-tree facilities from C++ to C front-end.
5812         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
5813         (void_zero_node): Remove.
5814         (stmt_tree): Likewise.
5815         (scope_chain): Adjust.
5816         (language_function): Rename to cp_language_function.
5817         (cp_function_chain): Adjust.
5818         (current_stmt_tree): Remove.
5819         (last_tree): Likewise.
5820         (last_expr_type): Likewise.
5821         (struct lang_decl): Adjust.
5822         (STMT_IS_FULL_EXPR_P): Remove.
5823         (add_tree): Remove.
5824         (begin_stmt_tree): Likewise.
5825         (finish_stmt_tree): Likewise.
5826         (walk_tree_fn): Likewise.
5827         (walk_stmt_tree): Likewise.
5828         * class.c (finish_struct): Replace use of add_tree with add_stmt.
5829         * decl.c (mark_stmt_tree): Adjust type.
5830         (init_decl_processing): Don't build void_zero_node.
5831         (initialize_local_var): Adjust usage of current_stmt_tree.
5832         (finish_enum): Use add_stmt, not add_tree.
5833         (save_function_data): Adjust use of language_function.
5834         (finish_constructor_body): Use add_stmt, not add_tree.
5835         (finish_destructor_body): Likewise.
5836         (push_cp_function_context): Adjust use of language_function.
5837         (pop_cp_function_context): Likewise.
5838         (mark_lang_function): Likewise.
5839         (mark_cp_function_context): Likewise.
5840         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
5841         (build_vec_init): Likewise.
5842         * semantics.c (SET_LAST_STMT): Remove.
5843         (RECHAIN_STMTS): Don't use it.
5844         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
5845         (current_stmt_tree): Define.
5846         (add_tree): Remove.
5847         (finish_goto_stmt): Use add_stmt, not add_tree.
5848         (finish_expr_stmt): Likewise.
5849         (begin_if_stmt): Likewise.
5850         (finish_then_clause): Likewise.
5851         (begin_while_stmt): Likewise.
5852         (begin_do_stmt): Likewise.
5853         (finish_return_stmt): Likewise.
5854         (begin_for_stmt): Likewise.
5855         (finish_break_stmt): Likewise.
5856         (finish_continue_stmt): Likewise.
5857         (begin_switch_stmt): Likewise.
5858         (finish_case_label): Likewise.
5859         (begin_try_block): Likewise.
5860         (begin_function_try_block): Likewise.
5861         (begin_handler): Likewise.
5862         (begin_catch_block): Likewise.
5863         (begin_compound_stmt): Likewise.
5864         (begin_asm_stmt): Likewise.
5865         (finish_asm_stmt): Likewise.
5866         (finish_label_stmt): Likewise.
5867         (add_decl_stmt): Likewise.
5868         (finish_subobject): Likewise.
5869         (finish_decl_cleanup): Likewise.
5870         (finish_named_return_value): Likewise.
5871         (setup_vtbl_ptr): Likewise.
5872         (add_scope_stmt): Likewise.
5873         (finish_stmt_expr): Likewise.
5874         (prune_unused_decls): Remove.
5875         (begin_stmt_tree): Likewise.
5876         (finish_stmt_tree): Likewise.
5877         (prep_stmt): Adjust use of current_stmt_tree.
5878         (lang_expand_stmt): Likewise.
5879         * tree.c (statement_code_p): Remove.
5880         (cp_statement_code_p): New function.
5881         (walk_stmt_tree): Remove.
5882         (init_tree): Set lang_statement_code_p.
5884 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
5886         Integrated preprocessor.
5888         * Make-lang.in, Makefile.in: Remove all references to input.c,
5889         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
5890         * gxx.gperf, hash.h, input.c: Delete.
5891         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
5892         initialized properly.
5894         * class.c (fixup_pending_inline): Take a tree, not a
5895         struct pending_inline *.  All callers changed.
5896         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
5897         RID_PROTECTED entries in ridpointers[] array here.
5898         * decl.c (duplicate_decls): Do not refer to struct
5899         pending_inline.
5900         (record_builtin_type, init_decl_processing): Use RID_MAX not
5901         CP_RID_MAX.
5902         (grokdeclarator): Use C_IS_RESERVED_WORD.
5903         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
5904         cpplib.
5905         (grok_x_components): Do not inspect pending_inlines chain.
5907         * cp-tree.h (struct lang_identifier): Add rid_code entry.
5908         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
5909         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
5910         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
5911         TIME_IDENTIFIER_FILEINFO): Kill.
5912         Update prototypes.
5913         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
5914         single 32-bit word.
5915         * parse.y: Call do_pending_inlines unconditionally.
5916         reinit_parse_for_method is now snarf_method.  fn.defpen is no
5917         longer necessary.  Remove unnecessary <itype> annotation on
5918         SCOPE.  Do not refer to end_of_file or struct pending_inline.
5919         * semantics.c (begin_inline_definitions): Call
5920         do_pending_inlines unconditionally.
5922         * lex.c: Remove all code now shared with C front end.
5923         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
5924         into the get_identifier table.  Rewrite pragma handling to
5925         work with the registry.  Move code to save tokens for later
5926         processing to spew.c.
5928         * spew.c: Rewrite everything in terms of token streams instead
5929         of text.  Move routines here from lex.c / input.c as
5930         appropriate.  GC-mark trees hanging off the pending inlines
5931         chain.
5933 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
5935         * NEWS: Mention that the named return value extension has been
5936         deprecated.
5937         * cp-tree.h (original_result_rtx): Define.
5938         (TREE_REFERENCE_EXPR): Remove.
5939         (DECL_VPARENT): Likewise.
5940         (pushdecl_nonclass_level): Likewise.
5941         (store_return_init): Likewise.
5942         (reinit_lang_specific): Likewise.
5943         (genrtl_named_return_value): Change prototype.
5944         * decl.c (original_result_rtx): Remove.
5945         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
5946         Do not generate RTL for local variables here.
5947         (store_return_init): Remove.
5948         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
5949         store_return_init.
5950         (finish_named_return_value): Adjust accordingly.  Warn that this
5951         extension is deprecated.
5952         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
5954 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
5956         * pt.c (type_unification_real): Replace switch with if.
5957         (unify): Tsubst non-type parms before comparing.
5959 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
5961         * error.c (dump_typename): New function, broken out of ...
5962         (dump_type): ... here. Use it.
5963         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
5965 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
5967         * init.c (build_offset_ref): Deal with namespace scoped
5968         TEMPLATE_ID_EXPRs.
5970 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
5972         * class.c (resolve_address_of_overloaded_function): Add
5973         explanation message.
5974         * decl.c (define_case_label): Reformat explanation.
5975         * decl2.c (finish_static_data_member_decl): Likewise.
5976         (grokfield): Likewise.
5977         * friend.c (do_friend): Likewise.
5979 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
5981         * tree.c (walk_tree): Expose tail recursion.
5982         (walk_stmt_tree): New function.
5983         * cp-tree.h: Prototype walk_stmt_tree.
5984         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
5985         the BLOCKs directly.  If a BLOCK has no variables after
5986         pruning, discard it.
5987         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
5988         restore the line number.
5990 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
5992         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
5993         (pt.o): Remove dependency on HTAB_H.
5994         * cp-tree.h: Include hashtab.h.
5995         (walk_tree): Change prototype.
5996         (walk_tree_without_duplicates): New function.
5997         * decl.c (check_default_argument): Use it.
5998         * optimize.c (remap_decl): Adjust calls to walk_tree.
5999         (copy_body): Likewise.
6000         (expand_calls_inline): Likewise.
6001         (calls_setjmp_p): Use walk_tree_without_duplicates.
6002         * pt.c: Don't include hashtab.h.
6003         (for_each_template_parm): Use walk_tree_without_duplicates.
6004         * semantics.c (finish-stmt_tree): Likewise.
6005         (expand_body): Likewise.
6006         * tree.c (walk_tree): Add additional parameter.
6007         (walk_tree_without_duplicates): New function.
6008         (count_trees): Use it.
6009         (verify_stmt_tree): Adjust call to walk_tree.
6010         (find_tree): Use walk_tree_without_duplicates.
6011         (no_linkage_check): Likewise.
6012         (break_out_target_exprs): Adjust call to walk_tree.
6013         (cp_unsave): Likewise.
6015 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6017         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
6018         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
6019         * cp-tree.h (TYPE_BINFO): Adjust comment.
6020         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
6021         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
6022         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
6023         (TYPE_TEMPLATE_INFO): Likewise.
6024         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
6025         * class.c (push_nested_class): Likewise.
6026         * decl.c (lookup_name_real): Likewise.
6027         (grokdeclarator): Likewise.
6028         (grok_op_properties): Likewise.
6029         (xref_tag): Likewise.
6030         (xref_basetypes): Likewise.
6031         * decl2.c (constructor_name_full): Likewise.
6032         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
6033         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
6034         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
6035         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6036         (dump_type_suffix): Likewise.
6037         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
6038         instead.
6039         (get_aggr_from_typedef): Likewise.
6040         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
6041         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6042         (write_template_parm): Likewise.
6043         (write_template_template_parm): Check tree code instead of
6044         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6045         * method.c (build_overload_nested_name): Add
6046         BOUND_TEMPLATE_TEMPLATE_PARM.
6047         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
6048         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6049         * pt.c (convert_template_argument): Check tree code instead of
6050         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6051         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
6052         (for_each_template_parm): Adjust comment.
6053         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
6054         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6055         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
6056         template_args_equal to compare template template parameter cases.
6057         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6058         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
6059         instead.
6060         * tree.c (copy_template_template_parm): Decide whether to create
6061         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
6062         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6063         (copy_tree_r): Likewise.
6064         * typeck.c (comptypes): Likewise.  Check tree code instead of
6065         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6067 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
6069         * decl.c (finish_function): Move the code for handling functions
6070         marked with the constructor and destructor attributes inside the
6071         expand_p block.
6073 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
6075         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
6077 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
6079         * pt.c (lookup_template_class): Remove abort.
6080         * tree.c (get_type_decl): Allow error_mark_node.
6082 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
6084         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
6085         TEMPLATE_ID_EXPRs.
6087 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
6089         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
6090         new ABI mangling.
6092 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
6094         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
6095         union tag mismatch error reporting.
6097 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
6099         * call.c (build_scoped_method_call): Check it is not a namespace.
6101 2000-08-30  Jason Merrill  <jason@redhat.com>
6103         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
6105         * tree.c (bot_manip): Check TREE_CONSTANT rather than
6106         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
6107         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
6109         * decl.c (start_function): Always call make_function_rtl.
6111 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
6113         * semantics.c (prune_unused_decls): New function.
6114         (finish_stmt_tree): Call it via walk_tree.
6116 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
6118         * class.c (build_secondary_vtable): Constify a char *.
6119         * decl.c (init_decl_processing): Initialize function_id_node,
6120         pretty_function_id_node, and func_id_node.
6121         * input.c (struct input_source): Constify 'str'.
6122         (feed_input): Constify first argument.
6123         * mangle.c (write_identifier): Constify argument.
6124         * pt.c (mangle_class_name_for_template): Constify argument.
6126 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
6128         * typeck.c (mark_addressable): Remove code that pokes around in
6129         RTL.
6131 2000-08-28  Jason Merrill  <jason@redhat.com>
6133         * lex.c (file_name_nondirectory): Move to toplev.c.
6135         * cp-tree.h (LOCAL_CLASS_P): New macro.
6136         * class.c (finish_struct_1): Use it.
6138 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
6140         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
6141         (write_encoding): Pass another argument to write_name.
6142         (write_name): Add ignore_local_scope parameter.  Fix handling of
6143         local names.
6144         (write_nested_name): Use write_unqualified_name.
6145         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
6146         (write_template_prefix): Use write_unqualified_name.
6147         (write_component): Remove.
6148         (write_local_name): Add parameter.  Use direct local entity to
6149         discriminator calculation.
6150         (write_class_enum_type): Pass another argument to write_name.
6151         (write_template_template_arg): Likewise.
6152         (make_guard_variable): Likewise.
6154 2000-08-27  Jason Merrill  <jason@redhat.com>
6156         * decl.c (pushdecl): Matching decls for local externs are found in
6157         the current level.  Propagate linkage information from previous
6158         declarations.
6160 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
6162         * ir.texi (Expressions): Fix typo.
6164 2000-08-25  Greg McGary  <greg@mcgary.org>
6166         * tree.c (init_tree): Use ARRAY_SIZE.
6168 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
6170         * error.c (cp_tree_printer): Rework.
6172 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
6174         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
6175         dyn-string.o.
6176         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
6177         (cp-demangle.o): Remove target.
6178         (dyn-string.o): Likewise.
6180         * decl.c (grokfndecl): Require that `main' return an `int'.
6181         * mangle.c (write_encoding): Don't mangle return types for
6182         conversion functions.
6184 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
6186         * error.c (tree_formatting_info): New data type.
6187         (tree_being_formatted): New macro.
6188         (tree_formatting_flags): Likewise.
6189         (put_whitespace): Likewise.
6190         (print_tree_identifier): Likewise.
6191         (print_identifier): Likewise.
6192         (cp_tree_printer, print_function_argument_list, print_declaration,
6193         print_expression, print_function_declaration,
6194         print_function_parameter, print_type, print_cv_qualifier): New
6195         functions.
6196         (init_error): Initialize lang_printer.
6198 2000-08-24  Jason Merrill  <jason@redhat.com>
6200         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
6201         adjustment necessary.
6203 2000-08-24  Greg McGary  <greg@mcgary.org>
6205         * cp-tree.h (MAIN_NAME_P): Remove macro.
6207 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
6209         * error.c (print_instantiation_context): Don't forget to flush the
6210         buffer.
6212 2000-08-23  Jason Merrill  <jason@redhat.com>
6214         * typeck.c (build_ptrmemfunc): Save the input pmf.
6216         * method.c (process_modifiers): Use same_type_p.
6218 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
6220         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
6221         * mangle.c (write_function_type): Change prototype.
6222         (write_encoding): Don't mangle return types for
6223         constructors or destructors.
6224         (write_type): Adjust call to write_function_type.
6225         * pt.c (instantiate_template): Instantiate alternate entry points
6226         when instantiating the main function.
6228 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
6230         * error.c (cp_print_error_function): Don't use embedded '\n' in
6231         output_printf.
6233 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
6235         * decl.c (init_decl_processing): Remove bogus initialization.
6236         * error.c (lang_print_error_function): Restore here.
6237         (init_error): Initialize print_error_function.
6239 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
6241         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
6243 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
6245         * Makefile.in (error.o): Depends on diagnostic.h
6247         * cp-tree.h (problematic_instantiation_changed,
6248         record_last_problematic_instantiation, current_instantiation,
6249         print_instantiation_context): Declare.
6250         (maybe_print_template_context): Remove.
6252         * decl.c (init_decl_processing): Set print_error_function to NULL.
6253         (lang_print_error_function): Remove, since we're using a new
6254         machinery.
6256         * error.c: #include diagnostic.h
6257         (function_category): New function.
6258         (cp_diagnostic_starter): Likewise.
6259         (cp_diagnostic_finalizer): Likewise.
6260         (cp_print_error_function): Likewise.
6261         (maybe_print_instantiation_context): Likewise.
6262         (print_instantiation_full_context): Likewise.
6263         (print_instantiation_partial_context): Likewise.
6264         (print_instantiation_context): Define.
6265         (init_error): Initialize diagnostic pager and finalizer.
6267         * pt.c (problematic_instantiation_changed): Define.
6268         (record_last_problematic_instantiation): Likewise.
6269         (current_instantiation): Likewise.
6270         (maybe_print_template_context): Remove.
6271         (print_template_context): Likewise.
6272         (current_tinst_level): Make static to reflect Brendan Kehoe's
6273         change of 1995-04-13.
6274         (push_tinst_level): Call print_instantiation_context.
6276 2000-08-21  Nix  <nix@esperi.demon.co.uk>
6278         * lang-specs.h: Do not process -o or run the assembler if
6279         -fsyntax-only.
6281 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
6283         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
6284         variables.
6285         * decl2.c (lang_decode_option): Disable gettext attributes for
6286         -ansi.
6288 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
6290         * lex.c (lang_init_options): Default diagnostic message maximum
6291         length to 80, when line-wrapping.
6293 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
6295         * class.c (build_vtbl_initializer): Clear the entire
6296         vtbl_init_data.  Start keeping track of the functions for which we
6297         have created vcall offsets here.
6298         (dfs_build_vcall_offset_vtbl_entries): Remove.
6299         (build_vcall_offset_vtbl_entries): Reimplement.
6300         (add_vcall_offset_vtbl_entries_r): New function.
6301         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
6302         computing when vcall offsets are necessary.
6304 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
6306         * decl.c (member_function_or_else): Use cp_error ... %T.
6307         (grokdeclarator): Likewise.
6308         (start_method): Likewise.
6309         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
6311 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
6313         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
6314         TYPE_DECLs.
6316 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
6318         * cp-tree.h (PTRMEM_OK_P): New macro.
6319         (itf_ptrmem_ok): New enumeration value.
6320         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
6321         argument. Diagnose implicit pointer to member.
6322         (instantiate_type): Don't diagnose implicit pointer to member
6323         here. Pass itf_ptrmem_ok if ok. Adjust calls to
6324         resolve_address_of_overloaded_function.
6325         * init.c (build_offset_ref): Set PTRMEM_OK_P.
6326         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
6327         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
6328         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
6329         (build_unary_op): Deal with single non-static member in
6330         microsoft-land.
6332 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
6334         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
6336 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
6338         * cp-tree.h (enum_name_string): Remove prototype.
6339         (report_case_error): Remove prototype.
6340         * cp/typeck2.c (enum_name_string): Remove.
6341         (report_case_error): Remove.
6342         * error.c (dump_expr): Deal with enum values directly.
6343         Correctly negate integer constant.
6345 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
6347         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
6348         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
6349         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
6350         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
6351         (__cxa_vec_new): Use __cxa_vec_new2.
6352         (__cxa_vec_delete): Use __cxa_vec_delete2.
6354 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
6356         * vec.cc (__cxa_vec_new): Set "C" linkage.
6357         (__cxa_vec_ctor): Likewise.
6358         (__cxa_vec_cctor): Likewise.
6359         (__cxa_vec_dtor): Likewise.
6360         (__cxa_vec_delete): Likewise.
6361         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
6362         (__cxa_vec_ctor): Likewise.
6363         (__cxa_vec_cctor): Likewise.
6364         (__cxa_vec_dtor): Likewise.
6365         (__cxa_vec_delete): Likewise.
6367 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
6369         * class.c (instantiate_type): Reinstate local variable
6370         deleted in previous change.
6372         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
6373         itf_no_attributes.
6375 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
6377         * cp-tree.h (instantiate_type_flags): New enumeration.
6378         (instantiate_type): Change parameter.
6379         * class.c (instantiate_type): Adjust prototype. Adjust.
6380         * call.c (standard_conversion): Adjust instantiate_type call.
6381         (reference_binding): Likewise.
6382         (build_op_delete_call): Likewise.
6383         (convert_like_real): Likewise.
6384         * cvt.c (cp_convert_to_pointer): Likewise.
6385         (convert_to_reference): Likewise.
6386         * pt.c (convert_nontype_argument): Likewise.
6387         * typeck.c (build_binary_op): Likewise.
6388         (build_ptrmemfunc): Likewise.
6389         (convert_for_assignment): Likewise.
6391 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
6393         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
6394         (current_aggr): Define.
6395         * decl.c (grokdeclarator): Make sure a friend class is an
6396         elaborated type specifier.
6397         * parse.y (current_aggr): Remove static definition.
6398         (cp_parse_init): Adjust.
6399         (structsp): Clear and restore current_aggr.
6400         (component_decl_list): Clear current_aggr.
6402         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
6403         aggregate tag on the typename's context.
6405         * pt.c (tsubst_friend_class): Return error_mark_node, if
6406         parms becomes NULL.
6407         (instantiate_class_template): Ignore error_mark_node friend types.
6409 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
6411         * cvt.c (warn_ref_binding): New static function, broken out of ...
6412         (convert_to_reference): ... here. Use it.
6414 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
6416         * parse.y (template_arg): Add rule for template qualified with
6417         global scope.
6419 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
6421         * decl2.c (add_function): Reorganize.
6422         (arg_assoc): Do not consider function template decls.
6424 2000-08-11  Jason Merrill  <jason@redhat.com>
6426         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
6427         looking inside.
6429 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
6431         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
6432         (lookup_nested_tag): Likewise.
6434         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
6435         can be produced.
6437 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
6439         * parse.y (named_complex_class_head_sans_basetype): Remove
6440         always true if.
6442 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
6444         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
6445         explicit TEMPLATE_ID_EXPR args.
6446         (build_expr_from_tree, case CALL_EXPR): Likewise.
6448 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
6450         * decl.c (check_tag_decl): Diagnose typename's which don't
6451         declare anything.
6453 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
6455         * init.c (build_aggr_init): Reject bogus array initializers
6456         early.
6458 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
6460         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
6461         runtime.
6462         * cp/tinfo.cc (__dynamic_cast): Likewise.
6463         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
6465 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
6467         * cvt.c (convert_to_pointer_force): Fix error message when
6468         attempting to cast from ambiguous base.
6470 2000-08-08  Jason Merrill  <jason@redhat.com>
6472         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
6473         (tsubst_template_arg_vector): Likewise.
6475         * decl2.c (build_anon_union_vars): Choose the largest field; don't
6476         assume that one will be as large as the union.
6478 2000-08-07  Kazu Hirata  <kazu@hxi.com>
6480         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
6481         * decl.c (pop_labels): Likewise.
6483 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
6485         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
6486         specifications.
6487         (__pointer_to_member_type_info): Likewise.
6488         (__base_class_info): Likewise.
6489         (__class_type_info): Likewise.
6490         (__si_class_type_info): Likewise.
6491         (__vmi_class_type_info): Likewise.
6492         * tinfo.cc (__si_class_type_info::__do_find_public_src):
6493         Changed member names to match specifications.
6494         (__vmi_class_type_info::__do_find_public_src): Likewise.
6495         (__si_class_type_info::__do_dyncast): Likewise.
6496         (__vmi_class_type_info::__do_dyncast): Likewise.
6497         (__si_class_type_info::__do_upcast): Likewise.
6498         (__vmi_class_type_info::__do_upcast): Likewise.
6499         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
6500         (__pbase_type_info::__pointer_catch): Likewise.
6501         (__pointer_type_info::__pointer_catch): Likewise.
6502         (__pointer_to_member_type_info::__pointer_catch): Likewise.
6504 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
6506         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
6507         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
6508         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
6510 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
6512         * cp-tree.h (add_method): Change prototype.
6513         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
6514         Don't double the size of the method vector in the error case.
6515         (handle_using_decl): Adjust call to add_method.
6516         (add_implicitly_declared_members): Likewise.
6517         (clone_function_decl): Likewise.
6518         * decl2.c (check_classfn): Likewise.
6519         * semantics.c (finish_member_declaration): Likewise.
6521 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
6523         * decl.c (flag_isoc94): New variable.
6525 2000-08-02  Jason Merrill  <jason@redhat.com>
6527         * pt.c (do_type_instantiation): Add complain parm; don't complain
6528         if called recursively.
6529         * cp-tree.h, parse.y: Adjust.
6531 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
6533         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
6534         -Wno-strict-prototypes.
6536         * g++spec.c: Adjust type of second argument to
6537         lang_specific_driver, and update code as necessary.
6539         * cp-tree.h: Don't prototype min_precision here.
6540         (my_friendly_assert): Cast expression to void.
6541         * semantics.c (do_poplevel): Initialize scope_stmts.
6543 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
6545         * cp-tree.h (DECL_NEEDED_P): Tweak.
6547 2000-07-28  Jason Merrill  <jason@redhat.com>
6549         * lang-specs.h: Use %i in rule for .ii files.
6551 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
6553         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
6555 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
6557         Allow indirect primary bases.
6558         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
6559         primary_base.
6560         (CLASSTYPE_VFIELD_PARENT): Remove.
6561         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
6562         (BINFO_PRIMARY_BINFO): Remove.
6563         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
6564         (BINFO_VBASE_PRIMARY_P): Likewise.
6565         (BINFO_PRIMARY_BASE_OF): New macro.
6566         (BINFO_INDIRECT_PRIMARY_P): Likewise.
6567         (get_primary_binfo): New function.
6568         * decl.c (lang_mark_tree): Make lang_type::primary_base.
6569         * class.c (vcall_offset_data_s): Rename to ...
6570         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
6571         and add ctor_vtbl_p.
6572         (get_derived_offset): Use get_primary_binfo.
6573         (dfs_mark_primary_bases): Adjust handling of virtual primary
6574         bases.
6575         (mark_primary_bases): Likewise.
6576         (set_primary_base): Take a binfo, not an integer, as a
6577         representation of the primary base.
6578         (indirect_primary_base_p): Remove.
6579         (determine_primary_base): Adjust for indirect primary bases.
6580         (dfs_find_final_overrider): Fix typo in coment.
6581         (update_vtable_entry_for_fn): Use get_primary_binfo.
6582         (layout_nonempty_base_or_field): Tweak.
6583         (build_base_fields): Adjust for new primary base semantics.
6584         (dfs_propagate_binfo_offsets): Remove.
6585         (propagate_binfo_offsets): Rewrite.
6586         (dfs_set_offset_for_shared_vbases): Remove.
6587         (layout_virtual_bases): Don't use it.
6588         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
6589         ABI.
6590         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
6591         CLASSTYPE_VFIELD_PARENT.
6592         (dfs_get_primary_binfo): New function.
6593         (get_primary_binfo): Likewise.
6594         (dump_class_hierarchy_r): Tweak printing of primary bases.
6595         (build_vtbl_initializer): Fix typo in comments.  Use
6596         vtbl_init_data.
6597         (build_vcall_and_vbase_vtbl_entries): Likewise.
6598         (build_vbaes_offset_vtbl_entries): Likewise.
6599         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
6600         BV_VCALL_INDEX to handle indirect primary bases.
6601         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
6602         (build_rtti_vtbl_entries): Likewise.
6603         * search.c (get_shared_vbase_if_not_primary): Tweak.
6604         (find_vbase_instance): Likewise.
6605         (binfo_for_vtable): Simplify.
6606         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
6607         (make_binfo): Make it have 11 entries.
6609 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
6611         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
6612         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
6613         ascertaining primaryness.
6614         (G): Remove template_args.
6615         (decl_is_template_id): New function.
6616         (write_encoding): Use decl_is_template_id.
6617         (write_name): Likewise.  Handle type_decls.  Get main variant of
6618         type decls.
6619         (write_nested_name): Likewise.
6620         (write_prefix): Likewise.
6621         (write_template_prefix): Likewise.
6622         (write_special_name_constructor): Remove defunct production from
6623         comment.
6624         (write_bare_function_type): Remove comment about absent parameter.
6625         (write_template_template_arg): Add missing grammar production to
6626         comment.
6628 2000-07-27  Jason Merrill  <jason@redhat.com>
6630         * decl.c (duplicate_decls): If common_type produces a non-typedef
6631         type for a typedef, just use the old type.
6633 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
6635         * cp-tree.h (function_depth): Declare.
6636         (verify_stmt_tree): Likewise.
6637         (find_tree): Likewise.
6638         * decl.c (function_depth): Give it external linkage.
6639         * optimize.c (optimize_function): Increment and decrement it.
6640         * tree.c (verify_stmt_tree_r): New function.
6641         (verify_stmt_tree): Likewise.
6642         (find_tree_r): Likewise.
6643         (find_tree): Likewise.
6645 2000-07-27  Jason Merrill  <jason@redhat.com>
6647         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
6648         TYPE_PTRMEMFUNC_P.
6649         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
6651 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
6653         * decl.c (start_cleanup_fn): Mark the function as `inline'.
6654         * decl2.c (get_guard): Call cp_finish_decl, not
6655         rest_of_decl_compilation, for local guards.
6656         * lex.c (do_identifier): Remove unused variable.
6658 Wed Jul 26 15:05:51 CEST 2000   Marc Espie <espie@cvs.openbsd.org>
6660         * parse.y:  Add missing ';'.
6662 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
6664         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
6665         of `extern "C++"'.
6667 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6669         Kill strict_prototype. Backwards compatibility only for
6670         non NO_IMPLICIT_EXTERN_C systems.
6671         * cp-tree.h (flag_strict_prototype): Remove.
6672         (strict_prototype): Remove.
6673         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
6674         * decl.c (maybe_push_to_top_level): Adjust.
6675         (pop_from_top_level): Adjust.
6676         (decls_match): Only allow sloppy parm matching for ancient
6677         system headers.
6678         (init_decl_processing): Adjust.
6679         (grokdeclarator): Adjust.
6680         * decl2.c (flag_strict_prototype): Remove.
6681         (strict_prototype): Remove.
6682         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
6683         (lang_f_options): Remove "strict-prototype".
6684         (unsupported-options): Add "strict-prototype".
6685         * lex.c (do_identifier): Adjust.
6686         (do_scoped_id): Adjust.
6687         * parse.y (empty_parms): Adjust.
6688         * class.c (push_lang_context): Adjust.
6689         (pop_lang_context): Adjust.
6690         * typeck.c (comp_target_parms): Adjust.
6692 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6694         * decl.c (poplevel): Deal with anonymous variables at for scope.
6695         (maybe_inject_for_scope_var): Likewise.
6697 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
6699         * decl.c: Remove all signal handling code, now done in toplev.c.
6701 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
6703         * decl.c (make_rtl_for_nonlocal_decl): Rework.
6705         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
6706         correctly.
6708 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
6710         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
6711         Define my_friendly_assert and my_friendly_abort as macros
6712         which may call friendly_abort.  Prototype friendly abort, not
6713         my_friendly_abort or my_friendly_assert.
6714         * decl.c (signal_catch): Report the signal caught in the error
6715         message.  Call fatal directly.
6716         * typeck2.c (ack, my_friendly_assert): Delete.
6717         (my_friendly_abort): Rename to friendly_abort.  Expect file,
6718         line, and function parameters.  Report the abort code, then
6719         call fancy_abort.  Do not mask an abort if errors have
6720         already occurred.
6722 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
6724         * typeck.c (comp_target_parms): Remove obsolete parameter.
6725         (comp_target_types): Adjust.
6727 2000-07-17  Jason Merrill  <jason@redhat.com>
6729         * typeck.c (mark_addressable): Never set TREE_USED.
6730         * call.c (build_call): Don't abort on calls to library functions
6731         that have been declared normally.
6733         * typeck.c (build_binary_op): Fix grammar in warning.
6735         * exception.cc (__eh_free): Fix prototype.
6737         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
6739         * decl.c (pushdecl): Handle seeing an OVERLOAD in
6740         IDENTIFIER_NAMESPACE_VALUE.
6742 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
6744         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
6745         * method.c (use_thunk): Correct handling of vcall offsets.
6747 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
6749         * .cvsignore: parse.h and parse.c have no cp- prefix.
6751 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
6753         * .cvsignore: New file.
6755 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
6757         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
6759 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
6761         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
6762         * parse.c: Remove.
6763         * parse.h: Likewise.
6765 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
6767         * class.c (layout_class_type): Add pointers to virtual bases after
6768         base classes under the old ABI.
6770 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
6772         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
6773         (finish_continue_stmt): Likewise.
6774         (begin_for_stmt): Remove call to note_level_for_for.
6775         (finish_goto_stmt): Change call from build_min_nt
6776         to build_stmt.
6777         (finish_expr_stmt): Likewise.
6778         (begin_if_stmt): Likewise.
6779         (begin_while_stmt): Likewise.
6780         (finish_while_stmt): Likewise.
6781         (finish_return_stmt): Likewise.
6782         (begin_for_stmt): Likewise.
6783         (finish_for_stmt): Likewise.
6784         (finish_break_stmt): Likewise.
6785         (begin_switch_stmt): Likewise.
6786         (finish_case_label): Likewise.
6787         (genrtl_try_block): Likewise.
6788         (begin_try_block): Likewise.
6789         (begin_handler): Likewise.
6790         (begin_compound_stmt): Likewise.
6791         (finish_asm_stmt): Likewise.
6792         (finish_label_stmt): Likewise.
6793         (add_decl_stmt): Likewise.
6794         (finish_subobject): Likewise.
6795         (finish_decl_cleanup): Likewise.
6796         (finish_named_return_value): Likewise.
6797         (setup_vtbl_ptr): Likewise.
6798         (add_scope_stmt): Likewise.
6799         * decl.c (finish_constructor_body): Likewise.
6800         (finish_destructor_body): Likewise.
6801         * optimize.c (copy_body_r): Likewise.
6802         (initialize_inlined_parameters): Likewise.
6803         (declare_return_variable): Likewise.
6804         (expand_call_inline): Likewise.
6806 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
6808         * semantics.c (expand_body): Sync interface information
6809         at the end of function body expansion.
6811 2000-07-09  Jason Merrill  <jason@redhat.com>
6813         * init.c (build_new_1): Bail early if the call to new fails.
6815         * decl.c (compute_array_index_type): Check specifically for
6816         an INTEGER_CST, not just TREE_CONSTANT.
6818         * decl.c (duplicate_decls): Don't call duplicate_decls on
6819         the DECL_TEMPLATE_RESULT.
6820         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
6821         codes.
6823         * error.c (dump_template_bindings): Don't crash if we had an
6824         invalid argument list.
6826         * typeck.c (c_expand_start_case): Do narrowing here.
6827         * semantics.c (finish_switch_cond): Not here.
6829 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
6831         * parse.y (asm_clobbers): Do string concatenation.
6833 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
6835         * decl.c (pushtag): Don't put local classes in template functions
6836         on the local_classes list.
6838 2000-07-04  Scott Snyder  <snyder@fnal.gov>
6840         * decl2.c (get_guard): Add missing return for old ABI local
6841         variable case.
6843 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
6845         * cp-tree.h (char_type_p): New function.
6846         * decl.c (init_decl_processing): Don't initialize
6847         signed_wchar_type_node or unsigned_wchar_type_node.
6848         (complete_array_type): Handle brace-enclosed string-constants.
6849         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
6850         * tree.c (char_type_p): New function.
6851         * typeck2.c (digest_init): Use char_type_p.
6853 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
6855         * pt.c (tsubst): Don't layout type, if it's error_mark.
6857 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
6859         * pt.c (instantiate_pending_templates): Reset template level.
6861 2000-07-05  Jason Merrill  <jason@redhat.com>
6863         * call.c (joust): Don't complain about `operator char *()' beating
6864         `operator const char *() const'.
6866 2000-07-04  scott snyder  <snyder@fnal.gov>
6867             Jason Merrill  <jason@redhat.com>
6869         * repo.c (repo_get_id): Handle the case where a class with virtual
6870         bases has a null TYPE_BINFO_VTABLE.
6872 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
6873             Jason Merrill  <jason@redhat.com>
6875         * parse.y (member_init): Just pass in the type.
6876         * init.c (expand_member_init): Handle getting a type.
6878 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
6879             Jason Merrill  <jason@redhat.com>
6881         * decl.c (finish_function): Warn if a function has no return
6882         statement.
6883         Suggested by Andrew Koenig.
6884         * typeck.c (check_return_expr): Do set current_function_returns_value
6885         if we got an error_mark_node.
6887 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
6889         * decl2.c (push_decl_namespace): Push the original namespace.
6891 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
6893         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
6894         * semantics.c (begin_class_definition): Clear it.
6896 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
6898         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
6899         (genrtl_expr_stmt): Likewise.
6900         (genrtl_decl_stmt): Likewise.
6901         (genrtl_if_stmt): Likewise.
6902         (genrtl_while_stmt): Likewise.
6903         (genrtl_do_stmt): Likewise.
6904         (genrtl_return_stmt): Likewise.
6905         (genrtl_for_stmt): Likewise.
6906         (genrtl_break_stmt): Likewise.
6907         (genrtl_continue_stmt): Likewise.
6908         (genrtl_scope_stmt): Likewise.
6909         (genrtl_switch_stmt): Likewise.
6910         (genrtl_case_label): Likewise.
6911         (genrtl_begin_compound_stmt): Likewise.
6912         (genrtl_finish_compound_stmt): Likewise.
6913         (genrtl_compound_stmt): Likewise.
6914         (genrtl_asm_stmt): Likewise.
6916         * init.c (begin_init_stmts): Remove call to
6917         genrtl_begin_compound_stmt.
6918         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
6920         * semantics.c (lang_expand_stmt): Changed call to
6921         genrtl_compound_stmt to ignore return value.
6923 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
6925         * mangle.c (canonicalize_for_substitution): Return the canonical
6926         variant of a type.
6928         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
6929         TYPE_DECL.
6930         * typeck.c (commonparms): Remove obstack manipulations.
6932 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
6934         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
6936         * Makefile.in (OBJS): Added ../c-semantics.o.
6937         (OBJDEPS): Likewise.
6939         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
6940         ../c-common.h.
6941         (struct stmt_tree): Added comment.
6942         (current_function_name_declared): Removed.
6943         (stmts_are_full_exprs_p): Likewise.
6944         (genrtl_do_pushlevel): Likewise.
6945         (genrtl_clear_out_block): Likewise.
6946         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
6947         (DECL_ANON_UNION_ELEMS): Likewise.
6948         (emit_local_var): Likewise.
6949         (make_rtl_for_local_static): Likewise.
6950         (do_case): Likewise.
6951         (expand_stmt): Likewise.
6952         (genrtl_decl_cleanup): Likewise.
6953         (c_expand_asm_operands): Likewise.
6954         (c_expand_return): Likewise.
6955         (c_expand_start_case): Likewise.
6957         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
6958         (emit_local_var): Likewise.
6959         (initialize_local_var): Change reference to
6960         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
6961         Change reference to stmts_are_full_exprs_p to
6962         current_stmt_tree->stmts_are_full_exprs_p.
6963         (push_cp_function_context): Likewise.
6965         * expect.c (expand_throw): Change reference to
6966         stmts_are_full_exprs_p.
6968         * init.c (build_aggr_init): Change reference to
6969         stmts_are_full_exprs_p.
6970         (build_vec_init): Likewise.
6972         * optimize.c (maybe_clone_body): Change reference to
6973         current_function_name_declared to
6974         cp_function_chain->name_declared.
6976         * pt.c (instantiate_decl): Change reference to
6977         current_function_name_declared to
6978         cp_function_chain->name_declared.
6980         * semantics.c (expand_cond): Moved declaration to c-common.h.
6981         (genrtl_do_pushlevel): Moved to c-semantics.c.
6982         (genrtl_clear_out_block): Likewise.
6983         (genrtl_goto_stmt): Likewise.
6984         (genrtl_expr_stmt): Likewise.
6985         (genrtl_decl_stmt): Likewise.
6986         (gerntl_if_stmt): Likewise.
6987         (genrtl_while_stmt): Likewise.
6988         (genrtl_do_stmt): Likewise.
6989         (genrtl_return_stmt): Likewise.
6990         (genrtl_for_stmt): Likewise.
6991         (genrtl_break_stmt): Likewise.
6992         (genrtl_continue_stmt): Likewise.
6993         (genrtl_scope_stmt): Likewise.
6994         (genrtl_switch_stmt): Likewise.
6995         (genrtl_case_label): Likewise.
6996         (genrtl_begin_compound_stmt): Likewise.
6997         (genrtl_finish_compound_stmt): Likewise.
6998         (genrtl_compound_stmt): Likewise.
6999         (genrtl_asm_stmt): Likewise.
7000         (genrtl_decl_cleanup): Likewise.
7001         (expand_cond): Likewise.
7002         (expand_stmt): Renamed to ...
7003         (lang_expand_stmt): ... this.
7004         (lang_expand_expr_stmt): Initialize.
7005         (set_current_function_name_declared): Likewise.
7006         (stmts_are_full_exprs_p): Likewise.
7007         (current_function_name_declared): Likewise.
7008         (anon_aggr_type_p): Likewise.
7009         (do_poplevel): Change reference to
7010         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
7011         Change reference to stmts_are_full_exprs_p to
7012         current_stmt_tree->stmts_are_full_exprs_p.
7013         (add_tree): Likewise.
7014         (finish_expr_stmt): Likewise.
7015         (prep_stmt): Likewise.
7016         (lang_expand_stmt): Likewise.
7017         (begin_compound_stmt): Change reference to
7018         current_function_name_declared to
7019         cp_function_chain->name_declared and call to
7020         current_function_name_declared().
7021         (setup_vtbl_ptr): Likewise.
7022         (genrtl_do_poplevel): Removed.
7024 2000-06-30  Jason Merrill  <jason@redhat.com>
7026         * init.c (init_init_processing): Go back to aligning like
7027         double_type_node for old ABI.
7028         (get_cookie_size): Make cookie larger if we get a type that needs
7029         more alignment.
7030         (build_vec_delete): Call it.
7032         * typeck.c (qualify_type_recursive): New fn.
7033         (composite_pointer_type): Use it.
7034         (build_binary_op): Use composite_pointer_type.
7036 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
7037             Jason Merrill  <jason@redhat.com>
7039         * typeck.c (check_return_expr): Don't complain about returning
7040         NULL from operator new if -fcheck-new.
7041         * cp-tree.h: Declare flag_check_new here.
7042         * init.c: Not here.
7044 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
7046         * mangle.c (find_substitution): Use same_type_p.
7047         (write_encoding): Don't check for substitutions.
7049 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
7051         * parse.y (expr_no_comma_rangle): New non-terminal.
7052         (template_parm): Use it for default parameter case.
7053         (template_arg): Use it.
7054         (expr_no_commas): Remove commented out undefined extensions.
7055         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
7056         * parse.h, parse.c: Rebuilt.
7058 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
7060         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
7061         (finish_asm_stmt): Do it here, instead.
7063         * cp-tree.h (ridpointers): Don't declare.
7064         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
7065         (record_builtin_java_type): Likewise.
7066         (init_decl_processing): Likewise.
7067         * lex.c: Move inclusion of lex.h.
7068         (ridpointers): Don't define.
7069         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
7070         RID_MAX.
7071         * lex.h (enum rid): Rename to ...
7072         (enum cp_rid): ... this.
7073         (ridpointers): Don't declare.
7074         * parse.y: Move inclusion of lex.h.
7075         * parse.c: Regenerated.
7076         * spew.c: Move inclusion of lex.h.
7078         * cp-tree.h (struct language_function): Remove temp_name_counter.
7079         (temp_name_counter): Remove.
7080         (get_temp_name): Change prototype.
7081         (get_guard): New function.
7082         (get_guard_cond): Likewise.
7083         (set_guard): Likewise.
7084         * cvt.c (build_up_reference): Adjust call to get_temp_name.
7085         * decl.c (expand_static_init): Use get_guard and friends to
7086         implement guard variables.
7087         * decl2.c (get_temp_name): Assume that the variables created are
7088         always static.
7089         (get_sentry): Rename to ...
7090         (get_guard): ... this.  Implement new ABI guard variables.
7091         (get_guard_bits): New function.
7092         (get_guard_cond): Likewise.
7093         (set_guard): Likewise.
7094         (start_static_initialization_or_destruction): Use them.
7095         (do_static_initialization): Replace sentry with guard throughout.
7096         (do_static_destruction): Likewise.
7097         * init.c (create_temporary_var): Add comment.
7099 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
7101         * mangle.c (find_substitution): Use same_type_p.
7102         (write_encoding): Don't check for substitutions.
7104 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
7106         * parse.y (expr_no_comma_rangle): New non-terminal.
7107         (template_parm): Use it for default parameter case.
7108         (template_arg): Use it.
7109         (expr_no_commas): Remove commented out undefined extensions.
7110         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
7111         * parse.h, parse.c: Rebuilt.
7113 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
7115         * cp-tree.h (flag_const_strings): Remove.
7116         (warn_parentheses): Likewise.
7117         (warn_format): Likewise.
7118         (common_type): Likewise.
7119         (default_conversion): Likewise.
7120         (build_binary_op): Likewise.
7121         (cp_build_binary_op): New macro.
7122         * call.c (build_new_op): Use cp_build_binary_op instead of
7123         build_binary_op.
7124         * class.c (build_vtable_entry_ref): Likewise.
7125         * decl.c (expand_static_init): Likewise.
7126         (compute_array_index_type): Likewise.
7127         (build_enumerator): Likewise.
7128         * decl2.c (delete_sanity): Likewise.
7129         (start_static_initialization_or_destruction): Likewise.
7130         * error.c (dump_type_suffix): Likewise.
7131         * init.c (resolve_offset_ref): Likewise.
7132         (build_new): Likewise.
7133         (build_new_1): Likewise.
7134         (build_vec_delete_1): Likewise.
7135         (build_vec_init): Likewise.
7136         (build_delete): Likewise.
7137         * rtti.c (synthesize_tinfo_fn): Likewise.
7138         (synthesize_tinfo_var): Likewise.
7139         * search.c (expand_upcast_fixups): Likewise.
7140         (fixup_all_virtual_upcast_offsets): Likewise.
7141         * typeck.c (build_array_ref): Likewise.
7142         (get_member_function_from_ptrfunc): Likewise.
7143         (build_binary_op): Add parameter.
7144         (pointer_int_sum): Use cp_build_binary_op.
7145         (pointer_diff): Likewise.
7146         (build_modify_expr): Likewise.
7147         (get_delta_difference): Likewise.
7148         (build_ptrmemfunc): Likewise.
7150 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
7152         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
7153         * decl.c (create_implicit_typedef): Adjust.
7154         * decl2.c (build_artificial_parm): Adjust.
7155         * method.c (implicitly_declare_fn): Adjust.
7156         * pt.c (push_inline_template_parms_recursive): Adjust.
7157         (process_template_parm): Adjust.
7158         (overloaded_template_name): Adjust.
7159         * semantics.c (finish_template_template_parm): Adjust.
7161 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
7163         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
7164         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
7165         where to emit thunks.
7166         (build_vtt): Adjust call to build_vtt_inits.
7167         (build_vtt_inits): Add parameter to indicate whether or not
7168         sub-VTTs for virtual bases should be included.  Adjust handling of
7169         construction vtables.
7170         (get_matching_base): New function.
7171         (dfs_build_vtt_inits): Rename to ...
7172         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
7173         construction vtables.
7174         (dfs_fixup_binfo_vtbls): Likewise.
7175         (build_ctor_vtbl_groups): Build construction vtables for virtual
7176         bases, too.
7177         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
7178         to build construction vtbls.
7179         (dfs_accumulate_vtbl_inits): Adjust handling of
7180         construction vtables.
7182         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
7183         types correctly.
7185 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
7187         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
7189 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
7191         * search.c (hides): Remove.
7192         (is_subobject_of_p): Add most_derived parameter. Use
7193         CANONICAL_BINFO.
7194         (lookup_field_queue_p): Adjust.
7195         (lookup_field_r): Adjust.
7197 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
7199         * decl2.c (handle_class_head): Bash typedefs to the type's main
7200         decl.
7202 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
7204         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
7205         (begin_global_stmt_expr): ... this.
7206         (genrtl_finish_stmt_expr): Rename to ...
7207         (finish_global_stmt_expr): ... this.
7208         * init.c (begin_init_stmts): Adjust calls.
7209         (finish_init_stmts): Likewise.
7210         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
7211         (begin_global_stmt_expr): ... this.
7212         (genrtl_finish_stmt_expr): Rename to ...
7213         (finish_global_stmt_expr): ... this.
7215 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
7217         * search.c (lookup_member): Fix typo in comment.
7219 2000-06-24  Jason Merrill  <jason@redhat.com>
7221         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
7222         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
7224 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
7226         * parse.y (complex_direct_notype_declarator): Support global_scope.
7227         * Makefile.in: Adjust conflict count.
7229 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
7231         * parse.y (template_arg): Convert TEMPLATE_DECL
7232         that is a template template parameter to
7233         TEMPLATE_TEMPLATE_PARM here.
7235         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
7236         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
7237         (copy_template_template_parm): Adjust prototype.
7238         * decl.c (grokdeclarator): Remove dead code.
7239         * pt.c (process_template_parm): Tidy.
7240         (lookup_template_class): Construct nodes in
7241         copy_template_template_parm.
7242         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
7243         lookup_template_class.  Use TYPE_TI_TEMPLATE.
7244         * tree.c (copy_template_template_parm): Add NEWARGS
7245         parameter.
7246         (mapcar): Adjust call to copy_template_template_parm.
7247         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
7248         * method.c (build_template_template_parm_names): Change error
7249         code to avoid compilation warning.
7251         * gxxint.texi: Document template template parameter
7252         name mangling.
7254 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
7256         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
7257         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
7258         (cp-demangle.o): New rule.
7259         (dyn-string.o): Likewise.
7260         * inc/cxxabi.h (__cxa_demangle): New declaration.
7262 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
7264         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
7265         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
7266         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
7267         a tree, not an int.
7268         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
7269         (make_thunk): Change prototype.
7270         (emit_thunk): Rename to use_thunk.
7271         (mangle_thunk): Change prototype.
7272         * class.c (get_derived_offset): Simplify.
7273         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
7274         BV_GENERATE_THUNK_WITH_VTABLE_P.
7275         (build_primary_vtable): Simplify.
7276         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
7277         (dfs_find_base): Remove.
7278         (update_vtable_entry_for_fn): Correct bug in finding the base
7279         where a virtual function was first declared.  Figure out whether
7280         or not to emit a vcall-thunk with the vtables in which it appears.
7281         Correct logic for deciding whether to use an ordinary thunk, or a
7282         vcall thunk.
7283         (finish_struct_1): Remove unnecssary code.
7284         (build_vtbl_initializer): Use ssize_int for the running counter of
7285         negative indices.
7286         (build_vtbl_initializer): Only use vcall thunks where necessary.
7287         Mark thunks as needing to be emitted with their vtables, or not.
7288         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
7289         indices.  Use size_binop.
7290         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
7291         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
7292         size_binop.
7293         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
7294         (build_vtable_entry): Mark thunks as needing to be emitted with
7295         their vtables, or not.
7296         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
7297         * decl2.c (mark_vtable_entries): Use use_thunk instead of
7298         emit_thunk.
7299         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
7300         information.
7301         * error.c (dump_expr): Use BV_FN.
7302         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
7303         not an int.
7304         * method.c (make_thunk): Likewise.
7305         (emit_thunk): Rename to use_thunk.  Allow callers to decide
7306         whether or not to actually emit the thunk.  Adjust for changes in
7307         representation of vcall offsets.
7308         * search.c (dfs_get_pure_virtuals): Use BV_FN.
7309         * semantics.c (emit_associated_thunks): New function.
7310         (expand_body): Use it.
7311         * ir.texi: Adjust decriptions of thunks.
7313 2000-06-22  Jason Merrill  <jason@redhat.com>
7315         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
7316         (tsubst_friend_function): Copy it here.
7318         * decl.c (grok_op_properties): Fix typo.
7320         * decl2.c (delete_sanity): Clarify warning, avoid failure on
7321         deleting void*.
7323         * pt.c (check_explicit_specialization): Clarify error.
7325         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
7326         an old OVERLOAD when we're declaring a non-function.
7327         (pushdecl, destroy_local_var): Check for error_mark_node.
7328         (warn_extern_redeclared_static): Also bail early if
7329         we're a CONST_DECL.
7330         (push_overloaded_decl): Ignore an old error_mark_node.
7332 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
7334         * call.c (build_x_va_arg): Check if in a template decl.
7335         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
7337 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7339         * class.c (push_lang_context): TYPE_NAME gets you to the Java
7340         types DECLs.
7341         * decl.c (check_goto): Computed gotos assumed OK.
7343 2000-06-20  Jason Merrill  <jason@redhat.com>
7345         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
7346         for which we don't need to look for instantiations.
7348 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
7350         * parse.y (program): Always call finish_translation_unit.
7351         * parse.c, parse.h: Rebuilt.
7353 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
7355         * method.c: Don't include hard-reg-set.h.
7357 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
7359         * rtti.c (get_base_offset): Cope when vbase field is in a base.
7361 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
7363         * call.c (build_conditional_expr): Use VOID_TYPE_P.
7364         * cvt.c (cp_convert_to_pointer): Likewise.
7365         (convert_to_void): Likewise.
7366         * error.c (dump_expr): Likewise.
7367         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
7368         * init.c (build_delete): Likewise.
7369         * method.c (emit_thunk): Likewise.
7370         * optmize.c (declare_return_variable): Likewise.
7371         * rtti.c (get_tinfo_decl_dynamic): Likewise.
7372         (get_typeid): Likewise.
7373         (build_dynamic_cast_1): Likewise.
7374         * typeck.c (composite_pointer_type): Likewise.
7375         (common_type): Likewise.
7376         (build_indirect_ref): Likewise.
7377         (build_binary_op): Likewise.
7378         (build_x_compound_expr): Likewise.
7379         (check_return_expr): Likewise.
7380         * typeck2.c (add_exception_specifier): Likewise.
7382         * mangle.c (write_method_parms): Use direct comparison for end
7383         of parmlist.
7385 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
7387         * cp-tree.h (genrtl_try_block): Declare function.
7388         (genrtl_handler): Likewise.
7389         (genrtl_catch_block): Likewise.
7390         (genrtl_ctor_stmt): Likewise.
7391         (genrtl_subobject): Likewise.
7392         (genrtl_decl_cleanup): Likewise.
7393         (genrtl_do_poplevel): Likewise.
7394         (genrtl_do_pushlevel): Likewise.
7395         (genrtl_clear_out_block): Likewise.
7396         (genrtl_goto_stmt): Likewise.
7397         (genrtl_expr_stmt): Likewise.
7398         (genrtl_decl_stmt): Likewise.
7399         (genrtl_if_stmt): Likewise.
7400         (genrtl_while_stmt): Likewise.
7401         (genrtl_do_stmt): Likewise.
7402         (genrtl_return_stmt): Likewise.
7403         (genrtl_for_stmt): Likewise.
7404         (genrtl_break_stmt): Likewise.
7405         (genrtl_continue_stmt): Likewise.
7406         (genrtl_scope_stmt): Likewise.
7407         (genrtl_switch_stmt): Likewise.
7408         (genrtl_case_label): Likewise.
7409         (genrtl_begin_compound_stmt): Likewise.
7410         (genrtl_finish_compound_stmt): Likewise.
7411         (genrtl_compound_stmt): Likewise.
7412         (genrtl_asm_stmt): Likewise.
7413         (genrtl_named_return_value): Likewise.
7414         (genrtl_begin_stmt_expr): Likewise.
7415         (genrtl_finish_stmt_expr): Likewise.
7416         (finish_for_stmt): Removed first argument.
7417         (finish_switch_stmt): Likewise.
7419         * semantics.c (genrtl_try_block): Define function.
7420         (genrtl_handler): Likewise.
7421         (genrtl_catch_block): Likewise.
7422         (genrtl_ctor_stmt): Likewise.
7423         (genrtl_subobject): Likewise.
7424         (genrtl_decl_cleanup): Likewise.
7425         (genrtl_do_poplevel): Likewise.
7426         (genrtl_do_pushlevel): Likewise.
7427         (genrtl_clear_out_block): Likewise.
7428         (genrtl_goto_stmt): Likewise.
7429         (genrtl_expr_stmt): Likewise.
7430         (genrtl_decl_stmt): Likewise.
7431         (genrtl_if_stmt): Likewise.
7432         (genrtl_while_stmt): Likewise.
7433         (genrtl_do_stmt): Likewise.
7434         (genrtl_return_stmt): Likewise.
7435         (genrtl_for_stmt): Likewise.
7436         (genrtl_break_stmt): Likewise.
7437         (genrtl_continue_stmt): Likewise.
7438         (genrtl_scope_stmt): Likewise.
7439         (genrtl_switch_stmt): Likewise.
7440         (genrtl_case_label): Likewise.
7441         (genrtl_begin_compound_stmt): Likewise.
7442         (genrtl_finish_compound_stmt): Likewise.
7443         (genrtl_compound_stmt): Likewise.
7444         (genrtl_asm_stmt): Likewise.
7445         (genrtl_named_return_value): Likewise.
7446         (genrtl_begin_stmt_expr): Likewise.
7447         (genrtl_finish_stmt_expr): Likewise.
7448         (finish_for_stmt): Removed first argument and generate rtl
7449         specific code.
7450         (finish_switch_stmt): Likewise.
7451         (do_poplevel): Removed generate rtl specific code.
7452         (do_pushlevel): Likewise.
7453         (add_tree): Likewise.
7454         (finish_goto_stmt): Likewise.
7455         (finish_expr_stmt): Likewise.
7456         (begin_if_stmt): Likewise.
7457         (finish_if_stmt_cond): Likewise.
7458         (finish_then_clause): Likewise.
7459         (begin_else_clause): Likewise.
7460         (finish_else_clause): Likewise.
7461         (finish_if_stmt): Likewise.
7462         (clear_out_block): Likewise.
7463         (begin_while_stmt): Likewise.
7464         (finish_while_stmt_cond): Likewise.
7465         (finish_while_stmt): Likewise.
7466         (begin_do_stmt): Likewise.
7467         (finish_do_body): Likewise.
7468         (finish_do_stmt): Likewise.
7469         (finish_return_stmt): Likewise.
7470         (begin_for_stmt): Likewise.
7471         (finish_for_init_stmt): Likewise.
7472         (finish_for_cond): Likewise.
7473         (finish_for_expr): Likewise.
7474         (finish_break_stmt): Likewise.
7475         (finish_continue_stmt): Likewise.
7476         (begin_switch_stmt): Likewise.
7477         (finish_switch_cond): Likewise.
7478         (finish_case_label): Likewise.
7479         (begin_try_block): Likewise.
7480         (begin_function_try_block): Likewise.
7481         (finish_try_block): Likewise.
7482         (finish_cleanup_try_block): Likewise.
7483         (finish_cleanup): Likewise.
7484         (finish_function_try_block): Likewise.
7485         (finish_handler_sequence): Likewise.
7486         (finish_function_handler_sequence): Likewise.
7487         (begin_handler): Likewise.
7488         (finish_handler_parms): Likewise.
7489         (begin_catch_block): Likewise.
7490         (finish_handler): Likewise.
7491         (begin_compound_stmt): Likewise.
7492         (finish_compound_stmt): Likewise.
7493         (finish_asm_stmt): Likewise.
7494         (finish_label_stmt): Likewise.
7495         (finish_label_decl): Likewise.
7496         (finish_subobject): Likewise.
7497         (finish_decl_cleanup): Likewise.
7498         (finish_named_return_value): Likewise.
7499         (begin_stmt_expr): Likewise.
7500         (finish_stmt_expr): Likewise.
7502         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
7503         to call genrtl_expr_stmt when appropriate.
7505         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
7506         begin_compound_expr to call genrtl_begin_stmt_expr and
7507         genrtl_begin_compound_expr when appropriate.
7508         (finish_init_stmts): Changed calls to finish_compound_expr and
7509         finish_stmt_expr to call genrtl_finish_compound_expr and
7510         genrtl_finish_stmt_expr when appropriate.
7511         (expand_default_init): Changed call to finish_expr_stmt to call
7512         genrtl_expr_stmt when appropriate.
7513         (build_vec_init): Likewise.
7515         * parse.y (simple_stmt): Removed first argument from call to
7516         finish_for_stmt. Removed first argument from call to
7517         finish_switch_stmt.
7519         * parse.c: Regenerated.
7521         * pt.c (tsubst_expr): Removed first argument from call to
7522         finish_for_stmt. Removed first argument from call to
7523         finish_switch_stmt.
7525 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
7527         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
7528         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
7530         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
7531         (cplus_tree_code_length[]): Likewise.
7532         (cplus_tree_code_name[]): Likewise.
7533         (init_parse): Added call to add_c_tree_codes. Changed
7534         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
7536 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
7538         * cp-tree.h (finish_mem_initializers): Declare.
7539         (count_trees): Likewise.
7540         * parse.y (base_init): Use finish_mem_initializers.
7541         * semantics.c (finish_mem_initializers): New function.
7543         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
7544         the number of trees.
7545         (n_trees): Remove.
7546         (count_trees): Don't use it.
7548 2000-06-15  Jason Merrill  <jason@redhat.com>
7550         * tree.c (count_trees): New debugging function.
7552         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
7553         * init.c (build_member_call): Pull out the name of a DECL.
7555         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
7556         * semantics.c (expand_body): Push to TV_INTEGRATION here.
7557         * optimize.c (optimize_function): Not here.
7558         * pt.c (instantiate_decl): Push to TV_PARSE.
7560 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
7562         * cp-tree.h (struct language_function): Remove x_base_init_list
7563         and x_member_init_list.
7564         (current_base_init_list): Remove.
7565         (current_member_init_list): Likewise.
7566         (setup_vtbl_ptr): Change prototype.
7567         (emit_base_init): Likewise.
7568         (expand_member_init): Likewise.
7569         (reinit_parse_for_function): Remove.
7570         * decl.c (save_function_data): Don't clear x_base_init_list and
7571         x_member_init_list.
7572         (mark_language_function): Don't mark them.
7573         * init.c (perform_member_init): Tweak comment.
7574         (sort_member_init): Take the list of initializers as an argument.
7575         (sort_base_init): Likewise.
7576         (emit_base_init): Likewise.
7577         (expand_member_init): Return the initializer.  Don't use global
7578         variables.
7579         * lex.c (reinit_parse_for_function): Remove.
7580         * method.c (build_template_parm_names): Correct substitution.
7581         (do_build_copy_constructor): Don't use current_member_init_list
7582         and current_base_init_list.
7583         (synthesize_method): Likewise.
7584         * parse.y (base_init): Split mem-initializers into
7585         base-initializers and field-initializers.
7586         (member_init_list): Build up the list here.
7587         (member_init): Return the initializer.
7588         (fn.depfn): Don't use reinit_parse_for_function.
7589         * parse.c: Regenerated.
7590         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
7591         ERROR_MARK.
7592         (tsubst_expr): Don't use current_member_init_list
7593         and current_base_init_list.
7594         (tsubst_expr_values): Rename to ...
7595         (tsubst_initializer_list): ... this.  Use convert_from_reference.
7596         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
7597         and current_base_init_list.
7598         (begin_function_definition): Don't call reinit_parse_for_function.
7600         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
7602         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
7603         correctly.
7605         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
7607 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
7609         * cp-tree.h (IF_COND): Move to c-common.h.
7610         (THEN_CLAUSE): Likewise.
7611         (ELSE_CLAUSE): Likewise.
7612         (WHILE_COND): Likewise.
7613         (WHILE_BODY): Likewise.
7614         (DO_COND): Likewise.
7615         (DO_BODY): Likewise.
7616         (RETURN_EXPR): Likewise.
7617         (EXPR_STMT_EXPR): Likewise.
7618         (FOR_INIT_STMT): Likewise.
7619         (FOR_COND): Likewise.
7620         (FOR_EXPR): Likewise.
7621         (FOR_BODY): Likewise.
7622         (SWITCH_COND): Likewise.
7623         (SWITCH_BODY): Likewise.
7624         (CASE_LOW): Likewise.
7625         (CASE_HIGH): Likewise.
7626         (GOTO_DESTINATION): Likewise.
7627         (COMPOUND_BODY): Likewise.
7628         (ASM_CV_QUAL): Likewise.
7629         (ASM_STRING): Likewise.
7630         (ASM_OUTPUTS): Likewise.
7631         (ASM_INPUTS): Likewise.
7632         (ASM_CLOBBERS): Likewise.
7633         (DECL_STMT_DECL): Likewise.
7634         (STMT_EXPR_STMT): Likewise.
7635         (LABEL_STMT_LABEL): Likewise.
7636         (SCOPE_BEGIN_P): Likewise.
7637         (SCOPE_END_P): Likewise.
7638         (SCOPE_STMT_BLOCK): Likewise.
7639         (SCOPE_NULLIFIED_P): Likewise.
7640         (SCOPE_NO_CLEANUPS_P): Likewise.
7641         (SCOPE_PARTIAL_P): Likewise.
7642         (ASM_VOLATILE_P): Likewise.
7643         (STMT_LINENO): Likewise.
7644         (STMT_LINENO_FOR_FN_P): Likewise.
7646         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
7647         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
7648         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
7649         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
7650         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
7652         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
7654         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
7655         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
7657         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
7658         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
7659         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
7661 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
7663         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
7664         * class.c (dfs_find_final_overrider): Set it appropriately.
7665         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
7666         avoid unneeded secondary vptrs.
7668 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
7670         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
7671         (check_bitfield_decl, check_field_decl): Likewise.
7672         (build_vtbl_or_vbase_field, build_base_field): Likewise.
7673         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
7674         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
7675         (xfer_tag, finish_enum): Likewise.
7676         * decl2.c (finish_builtin_type): Likewise.
7677         * init.c (init_init_processing): Likewise.
7678         * pt.c (instantiate_class_template): Likewise.
7679         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
7680         * cp-tree.h (struct lang_type): Add user_align member.
7681         (CLASSTYPE_USER_ALIGN): Define.
7683 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
7685         * Make-lang.in (c++.install-common): Install g++-cross in
7686         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
7687         $(target_alias)-g++ and $(target_alias)-c++.
7689 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
7691         * class.c (vcall_offset_data_s): Add last_init and fns.
7692         (overrides): Rename to same_signature_p.
7693         (dfs_find_final_overrider): Adjust accordingly.
7694         (mark_overriders): Likewise.
7695         (warn_hidden): Likewise.
7696         (build_vtbl_initializer): Reorganize machinery for building things
7697         at negative offsets.
7698         (build_vcall_and_vbase_vtbl_entries): Likewise.
7699         (build_vbase_offset_vtbl_entries): Likewise.
7700         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
7701         offset entries.  Do not create two entries for functions with the
7702         same signature.
7703         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
7704         (build_rtti_vtbl_entries): Reorganize machinery for building things
7705         at negative offsets.
7707         * optimize.c (expand_call_inline): Don't recurse into the code
7708         used to initialize the parameters more than once.
7710 2000-06-11  Mark Mitchell <mark@codesourcery.com>
7712         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
7713         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
7714         (find_substitution): Only use the `Sa' substitution for
7715         std::allocator, not instantiations of it.
7716         (write_template_prefix): Move comment.  Only use a TREE_LIST to
7717         represent substitutions for a member template.
7718         (write_array_type): Mangle array dimensions correctly.
7719         * optimize.c (maybe_clone_body): Copy more information from the
7720         cloned function.
7721         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
7722         on the regenerated declaration.
7724 2000-06-11  Chip Salzenberg  <chip@valinux.com>
7725             Mark Mitchell <mark@codesourcery.com>
7727         * class.c (build_vtable): Clarify comment.
7728         (build_ctor_vtbl_group): Pass the most derived type to
7729         build_vtable.
7731 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7733         * decl2.c (compare_options): Don't needlessly cast away const-ness.
7735 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
7737         * decl.c (add_binding): Handle duplicate declarations of external
7738         variables.
7740 2000-06-09  Chip Salzenberg  <chip@valinux.com>
7741             Mark Mitchell <mark@codesourcery.com>
7743         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
7744         argument.
7745         (write_signed_number): New macro.
7746         (write_unsigned_number): Likewise.
7747         (write_source_name): Use them.
7748         (write_number): Handle signed and unsigned values.
7749         (write_integer_cst): Use tree_int_cst_sgn, and use
7750         write_unsigned_number or write_signed_number as appropriate.
7751         (write_discriminator): Use write_unsigned_number or
7752         write_signed_number as appropriate.
7753         (write_template_arg_literal): Likewise.
7754         (write_array_type): Use tree_low_cst.
7755         (write_template_parm):  Use write_unsigned_number or
7756         write_signed_number as appropriate.
7757         (write_substitution): Adjust call to write_number.
7758         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
7759         (write_expression): Handle non-type template arguments of
7760         reference type correctly.
7761         (mangle_thunk): Use write_signed_number.
7763 2000-06-09  Chip Salzenberg  <chip@valinux.com>
7765         * mangle.c (find_substition): Don't mangle objects with typename
7766         substitutions (e.g. "cin" as "Si").
7768 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
7770         * call.c (add_candidate): Use ggc_alloc_cleared.
7771         * decl.c (lookup_label): Likewise.
7772         * lex.c (retrofit_lang_decl): Likewise.
7774 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
7776         * semantics.c (expand_body): Push to TV_EXPAND.
7777         * optimize.c (optimize_function): Push to TV_INTEGRATION.
7778         * decl.c (start_function): Always call announce_function.
7780         * tinfo2.cc: Just declare abort.
7782 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
7784         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
7785         whenever @ is a symbolic name.
7787 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
7789         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
7791 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
7793         * decl.c (pushdecl): Look up functions by DECL_NAME, not
7794         DECL_ASSEMBLER_NAME.
7796 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
7798         * decl2.c (c_language): Define.
7800 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
7802         * lex.c (lang_init_options): Tweak.
7804         * decl2.c: Remove #inclusion of diagnostic.h
7805         (lang_decode_option): Move diagnostic formatting options to
7806         toplevel.
7808         * lang-options.h: Remove documentation for diagnostic options.
7810         * Makefile.in (lex.o): Depends upon diagnostic.h
7812 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
7814         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
7815         the same DECL_RESULT, it's not a redefinition.
7816         * pt.c (tsubst_decl): Remove code to handle illegal
7817         specializations.
7819 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
7821         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
7823 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
7825         * search.c (maybe_suppress_debug_info): Don't check
7826         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
7828         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
7829         here if extern_p.
7831         Remember instantiation context in deferred instantiations.
7832         * cp-tree.h (struct tinst_level): Remove.
7833         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
7834         * pt.c (current_tinst_level): Now a tree.
7835         (print_template_context, push_tinst_level, pop_tinst_level,
7836         tinst_for_decl): Adjust.
7837         (reopen_tinst_level): New fn.
7838         (init_pt): Register current_tinst_level as a root.
7839         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
7840         of the pending templates list.
7841         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
7842         * lex.c (extract_interface_info): Adjust.
7843         * decl2.c (warn_if_unknown_interface): Adjust.
7845 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
7847         * class.c (indirect_primary_base_p): New function.
7848         (determine_primary_base): Use it.
7850 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
7852         Update new-abi dynamic cast algorithm.
7853         * tinfo.cc (__class_type_info::__dyncast_result): Add
7854         whole_details. Adjust constructor.
7855         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
7856         Avoid unnecessary searching.
7857         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
7859 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7861         * decl.c (init_decl_processing): Don't call record_component_aliases.
7862         * tree.c (build_cplus_array_type_1): Likewise.
7864 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
7866         * ir.texi: Correct typo.
7867         * mangle.c (write_expression): Handle non-type template arguments
7868         with reference type.
7869         * method.c (build_overload_value): Likewise.
7870         * pt.c (convert_nontype_argument): Explicitly represent conversion
7871         to a reference with an ADDR_EXPR.
7872         (unify): Always unify arguments in left-to-right order.
7874 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
7875             Mark Mitchell  <mark@codesourcery.com>
7877         * Make-lang.in (CXX_SRCS): Add mangle.c.
7878         * Makefile.in (CXX_OBJS): Add mangle.o.
7879         (mangle.o): New rule.
7881         * class.c (local_classes): New variable.
7882         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
7883         (get_vtt_name): Use mangle_vtt_name for new ABI.
7884         (init_class_processing): Initialize local_classes.
7885         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
7886         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
7887         (std_identifier): New macro.
7888         (DECL_VOLATILE_MEMFUNC_P): New macro.
7889         (DECL_NAMESPACE_STD_P): Likewise.
7890         (local_classes): Declare.
7891         (get_mostly_instantiated_function_type): Declare.
7892         (init_mangle): Declare.
7893         (mangle_decl): Likewise.
7894         (mangle_type_string): Likewise.
7895         (mangle_type): Likewise.
7896         (mangle_typeinfo_for_type): Likewise.
7897         (mangle_typeinfo_string_for_type): Likewise.
7898         (mangle_vtbl_for_type): Likewise.
7899         (mangle_vtt_for_type): Likewise.
7900         (mangle_ctor_vtbl_for_type): Likewise.
7901         (mangle_thunk): Likewise.
7902         (mangle_conv_op_name_for_type): Likewise.
7903         (mangle_guard_variable): Likewise.
7904         * decl.c (pushtag): Keep track of local classes.
7905         (initialize_predefined_identifiers): Initialize std_identifier.
7906         (init_decl_processing): Use std_identifier.
7907         (start_decl): Don't treat instantiations as specializations.
7908         (grokdeclarator): Likewise.
7909         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
7910         name for fully-instantiated templates.
7911         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
7912         destructors with the new ABI.
7913         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
7914         (grokfield): Use mangle_type for new ABI.
7915         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
7916         (get_sentry): Use mangle_guard_variable for new ABI.
7917         (start_static_initialization_or_destruction): Likewise.
7918         * expr.c (extract_aggr_init): Remove.
7919         (extract_scalar_init): Likewise.
7920         (extract_init): Remove #if 0'd code.
7921         * mangle.c: New function.
7922         * method.c (build_mangled_name): Assert not flag_new_abi.
7923         (build_static_name): Likewise.
7924         (build_decl_overload_real): Likewise.
7925         (build_typename_overload): Likewise.
7926         (build_overload_with_type): Likewise.
7927         (build_overload_name): Likewise.
7928         (get_ctor_vtbl_name): Likewise.
7929         (start_squangling): Likewise.
7930         (get_id_2): Likewise.
7931         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
7932         (init_method): Call init_mangle for new ABI.
7933         (make_thunk): Call mangle_thunk for new ABI.
7934         * operators.def: Correct new ABI manglings for the `%' operator.
7935         Add `::' operator.
7936         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
7937         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
7938         (lookup_template_class): Call mangle_decl for new ABI.
7939         (get_mostly_instantiated_function_type): New function.
7940         (set_mangled_name_for_template_decl): Use it.
7941         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
7942         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
7943         conversion op names.
7944         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
7945         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
7946         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
7947         mangle_typeinfo_string_for_type.
7949 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
7951         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
7952         (INNERMOST_TEMPLATE_ARGS): New macro.
7953         (innermost_args): Remove.
7954         (get_innermost_template_args): New function.
7955         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
7956         * error.c (dump_function_decl): Be caution when using
7957         most_general_template.
7958         * method.c (build_template_parm_names):  Use
7959         INNERMOST_TEMPLATE_ARGS.
7960         * pt.c (add_to_template_args): Tidy comment
7961         (get_innermost_template_args): New function.
7962         (check_explicit_specialization): Clear DECL_INITIAL for a new
7963         specialization.
7964         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
7965         Tidy.
7966         (push_template_decl): Always register specializations of the most
7967         general template.
7968         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
7969         (coerce_template_parms): Likewise.
7970         (lookup_template_class): Likewise.
7971         (innermost_args): Remove.
7972         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
7973         (tsubst_decl): Handle tricky specializations.  Use
7974         get_innermost_template_args.
7975         (instantiate_template): Simplify handling of partial
7976         instantiations.
7977         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
7978         (most_general_template): Reimplement, in a more straightforward
7979         manner.
7980         (regenerate_decl_from_template): Tweak formatting.  Use
7981         TMPL_ARGS_DEPTH for clarity.
7982         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
7984         * dump.c (dequeue_and_dump): Dump information about thunks.
7986 2000-06-01  Richard Henderson  <rth@cygnus.com>
7988         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
7990 2000-06-01  Richard Henderson  <rth@cygnus.com>
7992         * decl2.c (unsupported_options): Fix typo, make const.
7993         (lang_decode_option): Fix bsearch argument order.
7995 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
7997         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
7998         on FIELD_DECLs.
8000 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8002         * cp-tree.h (c_get_alias_set): Deleted.
8003         * Makefile.in (decl.o): Include ../expr.h.
8004         * decl.c (expr.h): Include.
8005         (init_decl_processing): Call record_component_aliases for arrays.
8006         (grokdeclarator): Likewise.
8007         Set TREE_ADDRESSABLE for fields that aren't bitfields.
8008         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
8010 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
8012         Remove guiding declaration support.
8013         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
8014         (flag_guiding_decls): Remove.
8015         * call.c (build_user_type_conversion_1): Remove support for
8016         guiding decls.
8017         (build_new_function_call): Likewise.
8018         (build_new_op): Likewise.
8019         (build_new_method_call): Likewise.
8020         * decl.c (start_function): Likewise.
8021         * friend.c (is_friend): Likewise.
8022         (do_friend): Likewise.
8023         * decl2.c ((flag_dump_translation_unit): Make it const.
8024         (flag_guiding_decls): Remove.
8025         (unsupported_options): New variable
8026         (compare_options): New function.
8027         (lang_decode_option): Use them.
8029         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
8031         * method.c (mangle_expression): Adjust test for legal expression
8032         operators.
8034         * pt.c (instantiate_decl): Save and restore the local
8035         specializations list.
8037 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
8039         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
8041 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
8043         * call.c (add_template_candidate_real): Handle member template
8044         constructors for classes with virtual bases.
8045         (build_user_type_conversion_1): Use in_charge_arg_for_name.
8046         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
8048         * ir.texi: Update thunk documentation.
8050         * call.c (joust): Fix handling of overloaded builtin operators.
8052 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
8054         * cp-tree.h (DECL_ANTICIPATED): New macro.
8055         Document new use of DECL_LANG_FLAG_7.
8056         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
8057         in the user namespace.
8058         * lex.c (do_identifier): If the identifier's declaration has
8059         DECL_ANTICIPATED on, it has not yet been declared.  But do not
8060         replace it with an ordinary implicit declaration.
8062         * tinfo2.cc: Include stdlib.h.
8064 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
8066         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
8067         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
8068         CLASSTYPE_ALIGN.
8070 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
8072         * decl2.c (lang_decode_option): Use skip_leading_substring instead
8073         of plain strncmp.
8075 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
8077         * operators.def (<?): Duplicated, should have been...
8078         (>?): this.  Fixed.
8080 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
8081             Mark Mitchell  <mark@codesourcery.com>
8083         * cp-tree.h (ansi_opname): Make it a macro.
8084         (ansi_assopname): Likewise.
8085         (struct lang_decl_flags): Add assignment_operator_p.
8086         (struct lang_decl): Add operator_code.
8087         (DECL_VTT_PARM): Adjust.
8088         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
8089         overloaded operator.
8090         (SET_OVERLOADED_OPERATOR_CODE): New macro.
8091         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
8092         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
8093         (opname_tab): Remove.
8094         (assignop_tab): Likewise.
8095         (operator_name_info_t): New type.
8096         (operator_name_info): New variable.
8097         (assignment_operator_name_info): Likewise.
8098         (build_cp_library_fn): Remove declaration.
8099         (push_cp_library_fn): Likewise.
8100         (operator_name_string): Likewise.
8101         (build_decl_overload): Likewise.
8102         * call.c (print_z_candidates): Simplify.
8103         (build_object_call): Adjust usage of ansi_opname.  Use
8104         DECL_OVERLOADED_OPERATOR_P.
8105         (op_error): Adjust operator name lookup.
8106         (build_conditional_expr): Adjust usage of ansi_opname.
8107         (build_new_op): Likewise.
8108         (build_op_delete_call): Likewise.
8109         (build_over_call): Likewise.
8110         (joust): Use DECL_OVERLOADED_OPERATOR_P.
8111         * decl.c (duplicate_decls): Copy operator_code.
8112         (init_decl_processing): Adjust parameters to push_cp_library_fn.
8113         (builtin_function): Adjust parameters to build_library_fn_1.
8114         (build_library_fn_1): Accept an overloaded operator code.
8115         (build_library_fn): Pass ERROR_MARK.
8116         (build_cp_library_fn): Accept an overloaded operator code.
8117         (push_cp_library_fn): Likewise.
8118         (grokfndecl): Tweak.
8119         (grokdeclarator): Simplify code to compute names of overloaded
8120         operators.  Adjust use of ansi_opname.
8121         (ambi_op_p): Work on tree_codes, not identifiers.
8122         (unary_op_p): Likewise.
8123         (grok_op_properties): Likewise.
8124         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
8125         (lang_mark_tree): Don't try to mark the operator_code.
8126         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
8127         * error.c (dump_decl): Remove special handling for operator
8128         names.
8129         (dump_function_name): Likewise.
8130         (dump_expr): Adjust name lookup of operators.
8131         (op_to_string): Simplify.
8132         (assop_to_string): Likewise.
8133         * init.c (build_new_1): Adjust use of ansi_opname.
8134         * lex.c (opname_tab): Remove.
8135         (assignop_tab): Likewise.
8136         (ansi_opname): Likewise.
8137         (ansi_assopname): Likewise.
8138         (operator_name_string): Likewise.
8139         (reinit_lang_specific): Likewise.
8140         (operator_name_info): New variable.
8141         (assignment_operator_name_info): Likewise.
8142         (init_operators): New function.
8143         (init_parse): Use it.
8144         (do_identifier): Adjust use of ansi_opname.
8145         * method.c (mangle_expression): Don't use ansi_opname for
8146         mangling.
8147         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
8148         (build_decl_overload): Remove.
8149         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
8150         (do_build_assign_ref): Adjust use of ansi_opname.
8151         (synthesize_method): Likewise.
8152         (implicitly_declare_fn): Likewise.
8153         * operators.def: New file.
8154         * parse.y (operator): Adjust use of ansi_opname.
8155         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
8156         (set_mangled_name_for_template_decl): Don't play games with
8157         current_namespace.
8158         (special_function_p): Adjust use of ansi_opname.
8159         * typeck.c (check_return_expr): Likewise.
8160         * Make-lang.in (cc1plus): Depend on operators.def.
8161         * Makefile.in (lex.o): Likewise.
8162         (decl.o): Likewise.
8164 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
8166         * Make-lang.in (cplib2.ready): Eradicate.
8168 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8170         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
8171         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
8172         (built_min, cp_tree_equal): Likewise.
8174 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
8176         * class.c (layout_nonempty_base_or_field): Replace
8177         `record_layout_info' with `record_layout_info_s'.
8179 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
8181         Fix goto checking.
8182         * cp-tree.h (struct language_function): x_named_labels is now
8183         a struct named_label_list*.
8184         * decl.c (struct named_label_use_list): Renamed from...
8185         (struct named_label_list): ...this.  New struct.
8186         (push_binding_level): Don't set eh_region.
8187         (note_level_for_eh): New fn.
8188         (pop_label): Take label and old value directly.
8189         (pop_labels): Adjust for new named_labels format.
8190         (lookup_label): Likewise.
8191         (poplevel): Note characteristics of a binding level containing a
8192         named label.  Mess with named label lists earlier.
8193         (mark_named_label_lists): New fn.
8194         (mark_lang_function): Call it.
8195         (use_label): New fn, split out from...
8196         (make_label_decl): ...here.  Don't call it.
8197         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
8198         check_previous_gotos): New fns, split out from...
8199         (define_label): ...here.
8200         (check_switch_goto): New fn.
8201         (define_case_label): Call it.
8202         (check_goto): New fn.
8203         * semantics.c (finish_goto_stmt): Call it and use_label.
8204         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
8205         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
8207 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
8209         * class.c (build_vtable_entry_ref): Correct usage of
8210         get_vtbl_decl_for_binfo.
8212         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
8213         * method.c (implicitly_declare_fn): Not here.
8215 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
8217         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
8218         (CPTI_PTMD_DESC_TYPE): ... here.
8219         (ptmd_desc_type_node): Rename to ...
8220         (ptm_desc_type_node): ... here.
8221         * decl.c: Likewise.
8222         * rtti.c (ptmd_initializer): Rename to ...
8223         (ptm_initializer): ... here.
8224         (sythesize_tinfo_var): Adjust. Deal with pointer to member
8225         function.
8226         (create_tinfo_types): Adjust.
8228 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
8230         Finish implementation of VTTs.
8231         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
8232         CPTI_VTT_PARM_IDENTIFIER.
8233         (vtt_parm_identifier): New macro.
8234         (vtt_parm_type): Likewise.
8235         (BINFO_SUBVTT_INDEX): Likewise.
8236         (BINFO_VPTR_INDEX): Likewise.
8237         (struct lang_decl): Add vtt_parm.
8238         (DECL_VTT_PARM): New macro.
8239         (DECL_USE_VTT_PARM): Likewise.
8240         (DECL_NEEDS_VTT_PARM_P): Likewise.
8241         (get_vtt_name): Declare.
8242         (build_artificial_parm): Likewise.
8243         (fixup_all_virtual_upcast_offsets): Likewise.
8244         (expand_indirect_vtbls_init): Remove.
8245         * call.c (build_new_method_call): Pass the vtt to subobject
8246         constructors and destructors.
8247         * class.c (get_vtt_name): Give it external linkage.
8248         (build_clone): Handle the magic VTT parameters for clones.
8249         (clone_function_decl): Fix typo in comment.
8250         (build_vtt): Keep track of the indices in the VTTs where various
8251         entities are stored.
8252         (build_vtt_inits): Likewise.
8253         (dfs_build_vtt_inits): Likewise.
8254         (build_ctor_vtbl_group): Tweak type of construction vtables.
8255         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
8256         primary bases, when building construction vtables.
8257         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
8258         (initialize_predefined_identifiers): Add vtt_parm_identifier.
8259         (init_decl_processing): Initialize vtt_parm_type.
8260         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
8261         (lang_mark_tree): Make vtt_parm.
8262         * decl2.c (build_artificial_parm): New function.
8263         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
8264         (grokclassfn): Use build_artificial_parm.
8265         * init.c (initialize_vtbl_ptrs): Call
8266         fixup_all_virtual_upcast_offsets directly.
8267         (perform_member_init): Use the complete subobject destructor for
8268         member cleanups.
8269         (build_vtbl_address): New function.
8270         (expand_virtual_init): Handle VTTs.
8271         * optimize (maybe_clone_body): Likewise.
8272         * search.c (fixup_all_virtual_upcast_offsets): Give it external
8273         linkage.
8274         (expand_indirect_vtbls_init): Remove.
8275         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
8276         * tree.c (make_binfo): Make them bigger.
8278 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
8280         * inc/cxxabi.h (__pbase_type_info): Define, based on
8281         __pointer_type_info.
8282         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
8283         (__pointer_to_member_type_info): Likewise.
8284         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
8285         (__pointer_to_member_type_info::__is_pointer_p): Remove.
8286         (__pointer_type_info::__do_catch): Rename to ...
8287         (__pbase_type_info::__do_catch): ... here. Adjust.
8288         (__pbase_type_info::__pointer_catch): Implement.
8289         (__pointer_type_info::__pointer_catch): Adjust.
8290         (__pointer_to_member_type_info::__pointer_catch): Adjust.
8292 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
8294         * tinfo.h (__user_type_info::contained_virtual_p): New
8295         predicate.
8296         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
8297         shaped hierarchy.
8298         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
8299         diamond shaped hierarchy. Add early out for mixed diamond and
8300         duplicate shaped hierarchy.
8302 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
8304         * cp-tree.h (build_delete): Change prototype.
8305         (build_vec_delete): Likewise.
8306         * call.c (build_scoped_method_call): Use special_function_kind
8307         values to indicate the kind of destruction to be done.
8308         (build_method_call): Likewise.
8309         * decl.c (finish_destructor_body): Likewise.
8310         (maybe_build_cleanup_1): Likewise.  Rename to ...
8311         (maybe_build_cleanup): ... this.
8312         * decl2.c (delete_sanity): Use special_function_kind
8313         values to indicate the kind of destruction to be done.
8314         (build_cleanup): Likewise.
8315         * init.c (perform_member_init): Likewise.
8316         (build_vec_delete_1): Likewise.
8317         (build_dtor_call): Simplify.
8318         (build_delete): Use special_function_kind
8319         values to indicate the kind of destruction to be done.
8320         (build_vbase_delete): Likewise.
8321         (build_vec_delete): Likewise.
8323         * init.c (sort_member_init): Fix typo in error message generation
8324         code.
8326 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
8328         * semantics.c (begin_class_definition): make the packed
8329         attribute be sensitive to the "-fpack-struct" command line flag
8331 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
8333         Update new-abi upcast algorithm.
8334         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
8335         prototype and meaning of return value.
8336         (__si_class_type_info::__do_upcast): Likewise.
8337         (__vmi_class_type_info::__do_upcast): Likewise.
8338         * tinfo.cc (__class_type_info::__upcast_result): Replace
8339         whole2dst with part2dst. Adjust ctor.
8340         (__class_type_info::__do_upcast): Adjust call of worker function.
8341         (__class_type_info::__do_upcast): Adjust.
8342         (__si_class_type_info::__do_upcast): Adjust. Use parent's
8343         __do_upcast.
8344         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
8345         virtual base in diamond hierarchy bug.
8347 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
8349         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
8350         and bitfield to tinfo_fn_p.
8351         (DECL_TINFO_FN_P): Adjust.
8352         (SET_DECL_TINFO_FN_P): Likewise.
8353         (DECL_MUTABLE_P): Likewise.
8354         (DECL_C_BIT_FIELD): Likewise.
8355         (SET_DECL_C_BIT_FIELD): Likewise.
8356         (CLEAR_DECL_C_BIT_FIELD): Likewise.
8357         (DECL_UNINLINABLE): Likewise.
8358         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
8359         (handle_using_decl): Remove assertion.
8360         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
8361         to build FIELD_DECLs.
8362         (build_base_field): Likewise.
8363         (layout_class_type): Likewise.
8364         * decl.c (init_decl_processing): Likewise.
8365         (build_ptrmemfunc_type): Likewise.
8366         (grokdeclarator): Likewise.
8367         * decl2.c (grok_x_components): Likewise.
8368         * except.c (call_eh_info): Likewise.
8369         * init.c (init_init_processing): Likewise.
8370         * rtti.c (expand_class_desc): Likewise.
8371         (create_pseudo_type_info): Likewise.
8372         (get_vmi_pseudo_type_info): Likewise.
8373         (create_tinfo_types): Likewise.
8374         * ptree.c (print_lang_decl): Adjust.
8375         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
8376         before checking DECL_MUTABLE_P.
8378         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
8379         parameters for template functions.
8380         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
8381         destructors as well as constructors.
8383 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
8385         * class.c (build_ctor_vtbl_group): Set inits.
8386         * optimize.c (maybe_clone_body): Set DECL_INLINE and
8387         DECL_THIS_INLINE appropriately for clones.
8389         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
8390         (DECL_CONV_FN_P): Simplify.
8391         (DECL_OPERATOR): Remove.
8392         (language_to_string): Declare.
8393         * decl.c (duplicate_decls): Fix typo in comment.
8394         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
8395         (grok_op_properties): Use DECL_CONV_FN_P instead of
8396         IDENTIFIER_TYPENAME_P.
8397         * dump.c (dequeue_and_dump): Dump the language linkage of
8398         declarations.
8399         * error.c (language_to_string): Give it external linkage.
8400         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
8401         (implicitly_declare_fn): Set DECL_LANGUAGE.
8402         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
8403         IDENTIFIER_TYPENAME_P.
8404         (tsubst_decl): Likewise.
8405         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
8406         * semantics.c (finish_member_declaration): Don't mark members of
8407         classes declared in an extern "C" region as extern "C".
8409 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8411         * decl2.c (qualified_lookup_using_namespace): Look through
8412         namespace aliases.
8414         * decl.c (push_using_decl): Return the old decl on namespace level.
8416 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
8418         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
8419         (VTT_NAME_PREFIX): New macro.
8420         (CTOR_VTBL_NAME_PREFIX): Likewise.
8421         (get_ctor_vtbl_name): New function.
8422         * class.c (get_vtable_name): Simplify.
8423         (get_vtt_name): New function.
8424         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
8425         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
8426         when a virtual base becomes primary.
8427         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
8428         VTTs.
8429         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
8430         additional parameters.
8431         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
8432         (initialize_array): New function.
8433         (build_vtt): Likewise.
8434         (build_vtt_inits): Likewise.
8435         (dfs_build_vtt_inits): Likewise.
8436         (dfs_fixup_binfo_vtbls): Likewise.
8437         (build_ctor_vtbl_group): Likewise.
8438         (initialize_vtable): Use initialize_array.
8439         (accumulate_vtbl_inits): Reimplement to handle construction
8440         vtables.
8441         (dfs_accumulate_vtbl_inits): Likewise.
8442         (bulid_vtbl_initializer): Adjust parameter name.
8443         * method.c (build_typename_overload): Remove #if 0'd code.
8444         (get_ctor_vtbl_name): New function.
8445         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
8446         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
8448         * cp-tree.h (struct lang_type): Remove search_slot.
8449         (CLASSTYPE_SEARCH_SLOT): Remove.
8450         (emit_base_init): Change prototype.
8451         (initialize_vtbl_ptrs): Likewise.
8452         (expand_indirect_vtbls_init): Likewise.
8453         (clear_search_slots): Remove.
8454         * decl.c (lang_mark_tree): Don't mark search_slot.
8455         * init.c (initialize_vtbl_ptrs): Simplify.
8456         (emit_base_init): Likewise.
8457         * search.c (struct vbase_info): Document decl_ptr.
8458         (convert_pointer_to_single_level): Remove.
8459         (dfs_find_vbases): Remove.
8460         (dfs_init_base_pointers): Simplify.
8461         (dfs_clear_vbase_slots): Remove.
8462         (dfs_vtable_path_unmark): New function.
8463         (init_vbase_pointers): Simplify.
8464         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
8465         (expand_indirect_vtbls_init): Simplify.  Don't call
8466         mark_all_temps_used.
8467         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
8468         initialize_vtbl_ptrs.
8470 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
8472         * except.c: Add static prototypes.
8474 2000-05-20  H.J. Lu  <hjl@gnu.org>
8476         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
8478 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
8480         Don't create a separate copy of virtual bases for the
8481         CLASSTYPE_VBASECLASSES list.
8482         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
8483         (BINFO_FOR_VBASE): Remove.
8484         (CANONICAL_BINFO): Adjust.
8485         (binfo_for_vbase): New function.
8486         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
8487         instead of BINFO_FOR_VBASE.
8488         (build_vbase_pointer): Likewise.
8489         (build_secondary_vtable): Likewise.
8490         (dfs_mark_primary_bases): Likewise.
8491         (mark_primary_bases): Likewise.
8492         (layout_nonempty_base_or_field): Likewise.
8493         (dfs_set_offset_for_shared_vbases): Likewise.
8494         (dfs_set_offset_for_unshared_vbases): Likewise.
8495         (layout_virtual_bases): Likewise.  Adjust for changes to the
8496         CLASSTYPE_VBASECLASSES list.
8497         (dump_class_hierarchy_r): Use binfo_for_vbase
8498         instead of BINFO_FOR_VBASE.
8499         (dump_class_hierarchy): Likewise.
8500         (finish_vtbls): Likewise.
8501         (build_vtbl_initializer): Adjust for changes to the
8502         CLASSTYPE_VBASECLASSES list.
8503         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
8504         * decl.c (finish_destructor_body): Adjust for changes to the
8505         CLASSTYPE_VBASECLASSES list.
8506         * init.c (sort_base_init): Use binfo_for_vbase.
8507         (construct_virtual_bases): Adjust for changes to the
8508         CLASSTYPE_VBASECLASSES list.
8509         (expand_member_init): Use binfo_for_vbase.
8510         (build_vbase_delete):  Adjust for changes to the
8511         CLASSTYPE_VBASECLASSES list.
8512         * method.c (do_build_copy_constructor): Likewise.
8513         * rtti.c (get_base_offset): Use binfo_for_vbase.
8514         (expand_class_desc): Remove #if 0'd code.
8515         * search.c (struct vbase_info): Remove vbase_types.
8516         (get_base_distance):  Use binfo_for_vbase.
8517         (lookup_field_queue_p): Use CANONICAL_BINFO.
8518         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
8519         (get_pure_virtuals): Adjust for changes to the
8520         CLASSTYPE_VBASECLASSES list.
8521         (dfs_find_vbases): Use binfo_for_vbase.
8522         (dfs_init_vbase_pointers): Likewise.
8523         (init_vbase_pointers): Don't initialize vi.vbase_types.
8524         (virtual_context): Use binfo_for_vbase.
8525         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
8526         CLASSTYPE_VBASECLASSES list.
8527         (expand_indirect_vtbls_init): Simplify.
8528         (dfs_get_vbase_types): Don't replicate virtual bases.
8529         (find_vbase_instance): Use binfo_for_vbase.
8530         (binfo_for_vbase): New function.
8531         * typeck.c (get_delta_difference): Use binfo_for_vbase.
8533 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
8535         * decl2.c (finish_anon_union): Generalize error messages to handle
8536         anonymous structures.
8537         * init.c (perform_member_init): Remove `name' parameter.
8538         (build_field_list): New function.
8539         (sort_member_init): Handle anonymous union initialization order
8540         correctly.  Check for multiple initializations of the same union.
8541         (emit_base_init): Don't look up fields by name here.
8542         (expand_member_init): Record the result of name lookup for future
8543         reference.
8544         * typeck.c (build_component_ref): Fix formatting.
8546 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
8548         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
8549         * typeck.c (build_x_compound_expr): Replace warn_unused with
8550         warn_unused_value.
8552         * decl2.c (lang_decode_option): Update -Wall unused flags by
8553         calling set_Wunused.
8555 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
8557         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
8558         * init.c (dfs_vtable_path_unmark): Remove.
8559         * search.c (marked_new_vtable_p): Likewise.
8560         (unmarked_new_vtable_p): Likewise.
8561         (dfs_search_slot_nonempty_p): Likewise.
8562         (dfs_mark): Likewise.
8563         (dfs_vtable_path_unmark): Likewise.
8564         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
8565         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
8566         (dfs_init_vbase_pointers): Remove special-case new ABI code.
8567         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
8568         (init_vbase_pointers): Simplify.
8569         (expand_indirect_vtbls_init): Likewise.
8571         * class.c (copy_virtuals): New function.
8572         (build_primary_table): Use it.
8573         (build_secondary_vtable): Likewise.
8574         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
8575         indicate that no vcall offset is required.
8576         (add_virtual_function): Likewise.
8577         (modify_all_vtables): Likewise.
8578         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
8579         (dfs_accumulate_vtbl_inits): Likewise.
8580         (build_vtbl_initializer): Make changes to handle construction
8581         vtables.
8582         (dfs_build_vcall_offset_vtbl_entries): Likewise.
8583         (build_rtti_vtbl_entries): Likewise.
8584         (build_vtable_entries): Handle a NULL vcall_index.
8586 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
8588         * decl2.c (lang_decode_option): Fix thinko.
8590 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
8592         * except.c (check_handlers): New fn.
8593         * cp-tree.h: Declare it.
8594         * semantics.c (finish_handler_sequence): Call it.
8595         (finish_function_handler_sequence): Likewise.
8596         (finish_handler_parms): Set TREE_TYPE on the handler.
8597         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
8598         * search.c (get_base_distance_recursive): If protect>1, ignore
8599         special access.
8600         (get_base_distance): Don't reduce watch_access.
8602 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
8604         * lex.c: #include diagnostic.h.
8605         (lang_init_options): Set default prefixing rules.
8607         * lang-options.h: Add -fdiagnostics-show-location=.
8609         * decl2.c: #include diagnostic.h.
8610         (lang_decode_option): Handle -fdiagnostics-show-location=.
8612 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
8614         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
8615         * vec.cc: Revert my 2000-05-07 change.
8617 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
8619         * class.c (check_field_decls): Complain about non-static data
8620         members with same name as class in class with constructor.
8622 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
8624         * decl.c (grokdeclarator): Allow non-static data members with
8625         same name as class.
8627 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
8629         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
8630         and pending_inline.filename.  Update prototypes.
8631         * decl.c (define_label): Constify filename parameter.
8632         * decl2.c (warn_if_unknown_interface): Constify local char *.
8633         * input.c Constify input_source.filename. Don't declare
8634         input_filename or lineno.  Constify filename parameter to feed_input.
8635         * lex.c (init_parse): Constify parameter and return value.
8636         (cp_pragma_interface, cp_pragma_implementation): Constify
8637         filename argument.
8638         (reinit_parse_for_method, reinit_parse_for_block,
8639         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
8640         Constify local char *.
8641         * pt.c: Don't declare lineno or input_filename.
8642         (print_template_context, tsubst_friend_function, tsubst_decl,
8643         tsubst, instantiate_decl): Constify local char *.
8644         * semantics.c (expand_body): Constify local char *.
8645         * tree.c (build_srcloc): Constify filename parameter.
8646         * typeck.c (c_expand_asm_operands): Constify filename
8647         parameter.
8649 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
8651         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
8652         offsetof expansion.
8654 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
8656         * inc/cxxabi.h:  Fix typos in comment.
8657         (__base_class_info::__offset): Use a static_cast.
8659 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
8661         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
8662         of std::size_t and std::ptrdiff_t respectively.
8663         * tinfo.cc: Likewise.
8664         * vec.cc: Likewise.
8666 2000-05-06  Richard Henderson  <rth@cygnus.com>
8668         * typeck.c (build_c_cast): Don't warn integer->pointer size
8669         mismatch for constants.
8671 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
8673         * rtti.c (ptmd_initializer): Set non-public, if class is
8674         incomplete.
8676         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
8677         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
8678         __cxa_vec_delete): Likewise.
8679         * tinfo.cc (__dynamic_cast): Likewise.
8680         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
8681         __cxa_vec_delete): Likewise.
8683 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
8685         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
8686         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
8687         (lang_decl_flags): Add vcall_offset.
8688         (THUNK_VCALL_OFFSET): Use it.
8689         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
8690         * method.c (make_thunk): Create the lang_decl here, not in
8691         emit_thunk.
8692         (emit_thunk): Make generic thunks into ordinary functions once
8693         they have been fed to expand_body.
8694         * semantics.c (expand_body): Set current_function_is_thunk here.
8696 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8698         * class.c (update_vtable_entry_for_fn): Prototype.
8700         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
8701         and `tmpl'.
8703         * search.c (dfs_build_inheritance_graph_order): Prototype.
8705 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
8707         * cp-tree.h (special_function_kind): Add various kinds of
8708         destructors.
8709         (special_function_p): New function.
8710         * class.c (overrides): Don't let one kind of destructor override
8711         another.
8712         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
8713         whether or not to instantiate a template.
8714         * tree.c (special_function_p): Define.
8716 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
8718         * cp-tree.def (THUNK_DECL): Remove.
8719         * cp-tree.h (DECL_THUNK_P): New macro.
8720         (DECL_NON_THUNK_FUNCTION_P): Likewise.
8721         (DECL_EXTERN_C_FUNCTION_P): Likewise.
8722         (SET_DECL_THUNK_P): Likewise.
8723         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
8724         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
8725         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
8726         * decl.c (decls_match): Use DECL_EXTERN_C_P.
8727         (duplicate_decls): Likewise.
8728         (pushdecl): Likewise.  Adjust thunk handling.
8729         (grokfndecl): Use DECL_EXTERN_C_P.
8730         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
8731         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
8732         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
8733         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
8734         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
8735         DECL_NO_STATIC_CHAIN.
8736         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
8737         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
8738         * search.c (covariant_return_p): Remove THUNK_DECL handling.
8739         * ir.texi: Update.
8741 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
8743         * tree.c (walk_tree): Set lineno.
8745 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
8747         * exception.cc: Update license notice.
8748         * new.cc: Likewise.
8749         * new1.cc: Likewise.
8750         * new2.cc: Likewise.
8751         * tinfo.cc: Likewise.
8752         * tinfo2.cc: Likewise.
8753         * vec.cc: Likewise.
8754         * inc/cxxabi.h: Likewise.
8755         * inc/exception: Likewise.
8756         * inc/new: Likewise.
8757         * inc/new.h: Likewise.
8758         * inc/typeinfo: Likewise.
8760 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
8762         * tree.c (build_target_expr_with_type): If we already have a
8763         TARGET_EXPR, just return it.
8765         * optimize.c (initialize_inlined_parameters): Don't generate an
8766         EXPR_STMT if we can just use DECL_INITIAL.
8767         * decl.c (emit_local_var): Only make the initialization a
8768         full-expression if stmts_are_full_exprs_p.
8770 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
8772         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
8773         macro.
8774         * call.c (standard_conversion): Use it.
8775         (direct_reference_binding): Likewise.
8776         (build_over_call): Likewise.
8777         (is_properly_derived_from): Likewise.
8778         (compare_ics): Likewise.
8779         * class.c (resolves_to_fixed_type_p): Likewise.
8780         * optimize.c (declare_return_variable): Likewise.
8781         * pt.c (is_specialization_of): Likewise.
8782         (unify): Likewise.
8783         * typeck.c (comp_target_parms): Likeiwse.
8784         (build_static_cast): Likewise.
8785         (build_reinterpret_cast): Likewise.
8786         (build_const_cast): Likewise.
8787         (comp_ptr_ttypes_real): Likewise.
8788         (comp_ptr_ttypes_const): Likewise.
8789         * typeck2.c (process_init_constructor): Likewise.
8791 2000-04-30  Scott Snyder <snyder@fnal.gov>
8793         * decl.c (finish_destructor_body): Use the base destructor when
8794         destroying virtual bases.
8796 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
8798         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
8799         STMT_EXPRs.
8800         * optimize.c (struct inline_data): Add target_exprs field.
8801         (declare_return_variable): When a function returns an aggregate,
8802         use the variable declared in the TARGET_EXPR as the remapped
8803         DECL_RESULT.
8804         (expand_call_inline): Update the pending target_exprs stack.
8805         (optimize_function): Initialize the stack.
8807         * decl2.c (finish_file): Fix typo in comment.
8809         * method.c (emit_thunk): Don't try to return a `void' value.
8811         * optimize.c (initialize_inlined_parameters): If the parameter is
8812         addressable, we need to make a new VAR_DECL, even if the
8813         initializer is constant.
8815 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
8817         * decl.c (grok_op_properties): Add an extra check of argtypes.
8819 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
8821         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
8822         variables.
8823         (initialize_inlined_parameters): Try to avoid creating new
8824         VAR_DECLs.
8826 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
8828         * lex.c (my_get_run_time): Remove.
8829         (init_filename_times): Use get_run_time instead of my_get_run_time.
8830         (check_newline): Likewise.
8831         (dump_time_statistics): Likewise.
8832         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
8833         of computing elapsed time explicitly.
8835 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
8837         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
8838         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
8839         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
8840         before calling decl_constant_value.
8841         * class.c (check_bitfield_decl): Likewise.
8842         * cvt.c (ocp_convert): Likewise.
8843         (convert): Likewise.
8844         * decl.c (compute_array_index_type): Likewise.
8845         (build_enumerator): Likewise.
8846         * decl2.c (check_cp_case_value): Likewise.
8847         * pt.c (convert_nontype_argument): Likewise.
8848         (tsubst): Likewise.
8849         * typeck.c (decay_conversion): Likewise.
8850         (build_compound_expr): Likewise.
8851         (build_reinterpret_cast): Likewise.
8852         (build_c_cast): Likewise.
8853         (convert_for_assignment): Likewise.
8855 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
8857         * decl.c (finish_function): Don't play games with DECL_INLINE.
8859 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
8861         * ir.texi: Correct typo.
8863 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8865         * decl.c (grokdeclarator): Reject VLAs as members.
8867 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
8869         * call.c (standard_conversion): Accept conversion between
8870         COMPLEX_TYPEs.
8872         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
8874 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
8876         * decl2.c (finish_file): Remove double setup for accounting
8877         compile time.
8879 2000-04-24  Robert Lipe <robertlipe@usa.net>
8881         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
8883 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
8885         * new.cc (set_new_handler): Needs to be in std::.
8887 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
8889         * cp-tree.h (lang_decl): Remove pretty_function_p.
8890         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
8891         language-specific node.
8892         * decl.c (cp_make_fname_decl): Use build_decl, not
8893         build_lang_decl, to build the variables.
8894         (grokvardecl): Don't call build_lang_decl for local variables in
8895         templates.
8896         (grokdeclarator): Don't call build_lang_decl for local type
8897         declarations in templates.
8898         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
8899         zero'd memory, rather than calling memset.
8900         * pt.c: Include hashtab.h.
8901         (local_specializations): New variable.
8902         (retrieve_local_specialization): Use it.
8903         (register_local_specialization): Likewise.
8904         (tsubst_decl): Don't assume local variables have
8905         DECL_LANG_SPECIFIC.
8906         (instantiate_decl): Set up local_specializations.
8907         * Makefile.in (HTAB_H): New variable.
8909 2000-04-23  Richard Henderson  <rth@cygnus.com>
8911         * typeck.c (c_expand_asm_operands): Restore the original
8912         contents of the output list.
8914 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
8916         * ir.texi:  Document complex number representation.
8918 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
8920         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
8921         (target_incomplete_p): New function.
8922         (tinfo_base_init): Create comdat NTBS name variable.
8923         (ptr_initializer): Add non_public parameter. Calculate it.
8924         (ptmd_initializer): Likewise.
8925         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
8926         (create_real_tinfo_var): Add non_public parameter. Use it.
8927         Push proxy into global namespace.
8928         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
8929         New enumeration.
8930         * inc/typeinfo (type_info::before, type_info::operator==):
8931         Compare __name addresses.
8933         * tinfo2.cc: Remove new-abi builtins comment.
8935 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
8937         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
8939         * call.c (joust): Exit early if we get the same function, too.
8941         * decl2.c (key_method): Return NULL_TREE for template classes.
8942         (import_export_class): Don't need to check for template classes.
8944 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
8946         * lex.c: Remove references to cccp.c.
8948 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
8950         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
8951         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
8952         (DECL_DESTRUCTOR_P): Use destructor_attr.
8953         (DECL_CONST_MEMFUNC_P): Reimplement.
8954         (DECL_VOLATILE_MEMFUNC_P): Remove.
8955         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
8956         (overrides): Use DECL_DESTRUCTOR_P.
8957         (check_for_override): Likewise.
8958         * decl.c (start_function): Likewise.
8959         * decl2.c (grokfclassfn): Likewise.
8960         (check_classfn): Likewise.
8961         (grok_function_init): Likewise.
8963 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
8965         * decl2.c (grokfield): Issue error on illegal data member
8966         declaration.
8968 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
8970         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
8972 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
8974         * class.c (build_vtable_entry): Don't build thunks for type-info
8975         functions.
8977 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
8979         * decl.c (decls_match): Allow a redeclaration of a builtin to
8980         specify args while the builtin did not.
8982 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
8984         * cp-tree.def (THUNK_DECL): Add to documentation.
8985         * cp-tree.h (flag_huge_objects): Declare.
8986         * class.c (modify_vtable_entry): Tidy.
8987         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
8988         Calculate delta appropriately for the new ABI.
8989         (dfs_modify_vtables): Use it.
8990         (modify_all_vtables): Fix thinko in code to add overriding copies
8991         of functions to primary vtables.
8992         (build_clone): Fix typo in comment.
8993         (clone_function_decl): Correct order of destructors in vtable.
8994         (build_vbase_offset_vtbl_entries): Adjust comment.
8995         (dfs_vcall_offset_queue_p): Remove.
8996         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
8997         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
8998         (build_vtable_entry): Correct check for pure virtual functions.
8999         Don't declare flag_huge_objects.
9000         * decl.c (flag_huge_objects): Remove declaration.
9001         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
9002         Use int_size_in_bytes.
9003         (emit_thunk): Handle vcall offset thunks.
9005 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9007         * decl2.c (parse_time, varconst_time): Delete declarations.
9008         (finish_file): Delete LINENO declaration.
9009         START_TIME and THIS_TIME now long.
9011 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
9013         * class.c (build_base_field): Reformat comment.
9015         * inc/cxxabi.h (stddef.h): Comment inclusion.
9016         (__base_class_info::__offset): Comment shift.
9018 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
9020         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
9021         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
9022         (cp_push_exception_identifier): New macro.
9023         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
9024         (DECL_BASE_DESTRUCTOR_P): Likewise.
9025         (DECL_DELETING_DESTRUCTOR_P): Likewise.
9026         (get_vtbl_decl_for_binfo): Fix formatting.
9027         (in_charge_arg_for_name): New macro.
9028         (maybe_build_cleanup_and_delete): Remove declaration.
9029         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
9030         (in_charge_arg_for_name): New function.
9031         (build_new_method_call): Use it.  Handle cloned destructors.
9032         (build_clone): Don't make the base constructor virtual.
9033         Automatically defer generated functions.
9034         (clone_function_decl): Handle destructors, too.
9035         (clone_constructors_and_destructors): Likewise.
9036         (create_vtable_ptr): Don't create a vtable entry for a cloned
9037         function.
9038         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
9039         (initialize_predefined_identifiers): Update appropriately.
9040         (finish_destructor_body): Simplify.
9041         (maybe_build_cleanup_and_delete): Remove.
9042         * except.c (expand_throw): Handle new-ABI destructors.
9043         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
9044         (build_dtor_call): New function.
9045         (build_delete): Use it.  Simplify.
9046         * optimize.c (maybe_clone_body): Handle destructors.
9047         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
9049         * exception.cc (cleanup_fn): New typedef.
9050         (CALL_CLEANUP): New macro.
9051         (cp_eh_info): Use them.
9052         (__cp_push_exception): Likewise.
9053         (__cp_pop_exception): Likewise.
9055 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
9057         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
9058         (complete_dtor_identifier): New macro.
9059         (CLASSTYPE_FIRST_CONVERSION): Remove.
9060         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
9061         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
9062         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
9063         (CLASSTYPE_CONSTRUCTORS): Likewise.
9064         (CLASSTYPE_DESTRUCTORS): Likewise.
9065         (lang_decl): Add cloned_function.
9066         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
9067         (DECL_BASE_CONSTRUCTOR_P): Likewise.
9068         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
9069         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
9070         (DECL_CLONED_FUNCTION_P): Likewise.
9071         (DECL_CLONED_FUNCTION): Likewise.
9072         (clone_function_decl): Declare.
9073         (maybe_clone_body): Likewise.
9074         * call.c (build_user_type_conversion_1): Call complete object
9075         constructors in the new ABI.
9076         (build_new_method_call): Don't add in-charge parameters under the
9077         new ABI.
9078         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
9079         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
9080         CLASSTYPE_DESTRUCTOR_SLOT.
9081         (build_clone): New function.
9082         (clone_function_decl): Likewise.
9083         (clone_constructors_and_destructors): Likewise.
9084         (check_bases_and_members): Use it.
9085         * decl.c (iniitialize_predefined_identifiers): Initialize
9086         complete_dtor_identifier.
9087         (finish_function): Don't add extra code to a clone.
9088         (lang_mark_tree): Mark cloned_function.
9089         * decl2.c (mark_used): Don't bother trying to instantiate things
9090         we synthesized.
9091         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
9092         * method.c (set_mangled_name_for_decl): Don't treat clones as
9093         constructors.
9094         (synthesize_method): Sythesize cloned functions, not the clones.
9095         * optimize.c (inline_data): Update comment on ret_label.
9096         (remap_block): Don't assume DECL_INITIAL exists.
9097         (copy_body_r): Allow ret_label to be NULL.
9098         (maybe_clone_body): Define.
9099         * pt.c (tsubst_decl): Handle clones.
9100         (instantiate_clone): New function.
9101         (instantiate_template): Use it.
9102         (set_mangled_name_for_template_decl): Don't treat clones as
9103         constructors.
9104         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
9105         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
9106         * semantics.c (expand_body): Clone function bodies as necessary.
9108         * optimize.c (remap_decl): Avoid sharing structure for arrays
9109         whose size is only known at run-time.
9110         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
9112         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
9113         to has_in_charge_parm_p.
9114         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
9115         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
9116         (DECL_COPY_CONSTRUCTOR_P): New macro.
9117         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
9118         (build_user_type_conversion_1): Likewise.
9119         (convert_like_real): Likewise.
9120         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
9121         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
9122         (copy_args_p): Likewise.
9123         (grok_ctor_properties): Likewise.
9124         (start_function): Likewise.
9125         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
9126         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
9127         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
9128         * method.c (do_build_copy_constructor): Use
9129         DECL_HAS_IN_CHARGE_PARM_P.
9130         (synthesize_method): Likewise.
9131         * pt.c (instantiate_template): Remove goto.
9132         * tree.c (build_cplus_method_type): Remove mention of obstacks in
9133         comment.
9135         * cp-tre.h (finish_function): Change prototype.
9136         * decl.c (end_cleanup_fn): Adjust caller.
9137         (finish_function): Take only one parameter.
9138         * decl2.c (finish_objects): Adjust caller.
9139         (finish_static_storage_duration_function): Likewise.
9140         * method.c (emit_thunk): Likewise.
9141         * parse.y: Likewise.
9142         * parse.c: Regenerated.
9143         * pt.c (instantiate_decl): Likewise.
9144         * rtti.c (synthesize_tinfo_fn): Likewise.
9145         * semantics.c (expand_body): Likewise.
9147         * cp-tree.h (copy_decl): New function.
9148         * class.c (finish_struct_1): Use it.
9149         * lex.c (copy_decl): Define it.
9150         * pt.c (tsubst_decl): Likewise.
9151         * tree.c (copy_template_template_parm): Likewise.
9153         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
9154         has_nonpublic_assign_ref.
9155         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
9156         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
9157         * class.c (finish_struct_methods): Don't set
9158         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
9159         (interface_only): Don't declare.
9160         (interface_unknown): Likewise.
9162 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9164         * tree.h (HAVE_TEMPLATES): Remove definition.
9165         * lang-options.h (-fthis-is-variable): Remove documentation.
9167 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
9169         * class.c (instantiate_type): Handle object-relative template-id.
9171         * semantics.c (finish_expr_stmt): Call convert_to_void here.
9172         * decl.c (cplus_expand_expr_stmt): Not here.
9174         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
9175         Initialize exprtype earlier.
9177         * parse.y (fn.def1): Check for defining types in return types.
9179         * decl.c (check_tag_decl): Notice extra fundamental types.
9180         Diagnose empty decls in classes, too.
9182         * decl.c (grokdeclarator): Don't override an anonymous name if no
9183         declarator was given.
9185         * cvt.c (convert_to_void): Call resolve_offset_ref.
9187         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
9189         * decl2.c (decl_namespace): Handle getting a type.
9191         * typeck.c (build_c_cast): Re-enable warning for cast between
9192         pointer and integer of different size.
9194 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
9196         * inc/cxxabi.h (__pointer_type_info): Add restrict and
9197         incomplete flags.
9198         (__pointer_type_info::__pointer_catch): New virtual function.
9199         (__pointer_to_member_type_info): Derive from
9200         __pointer_type_info. Adjust.
9201         (__pointer_to_member_type_info::__do_catch): Remove.
9202         (__pointer_to_member_type_info::__is_pointer_p): Declare.
9203         (__pointer_to_member_type_info::__pointer_catch): Declare.
9204         * rtti.c (qualifier_flags): Add restrict flag.
9205         (ptmd_initializer): Reorder members.
9206         (create_tinfo_types): Expand comments. Reorder
9207         ptmd_desc_type_node members.
9208         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
9209         Implement.
9210         (__pointer_type_info::__do_catch): Move specific code into
9211         __pointer_catch. Call it.
9212         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
9213         specific catch checking. Fix void conversion check.
9214         (__pointer_to_member_type_info::__do_catch): Remove.
9215         (__pointer_to_member_type_info::__pointer_catch): Implement.
9217 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9219         * lex.c (init_parse): Remove traces of classof and headof.
9220         * decl2.c (flag_operator_names): Default to 1.
9221         (lang_decode_option): Do not set it for -ansi.
9223 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
9225         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
9226         (DECL_MAIN_VARIANT): Remove.
9227         * decl.c (duplicate_decls): Don't set it.
9228         (start_function): Likewise.
9229         (lang_mark_tree): Don't mark it.
9230         * decl2.c (defer_fn): Don't use it.
9231         * lex.c (retrofit_lang_decl): Don't set it.
9232         * pt.c (tsubst_decl): Likewise.
9233         * ptree.c (print_lang_decl): Don't print it.
9234         * typeck.c (mark_addressable): Don't use it.
9236 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
9238         * vec.cc: Include <new> and <exception>.
9239         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
9240         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
9241         terminate.
9242         (__cxa_vec_delete): Catch dtor exceptions.
9244 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
9246         Prepend __ to implementation defined names.
9247         * inc/typeinfo (type_info): Rename _name to __name.
9248         (type_info::type_info): Rename parameter.
9249         (type_info::operator==, type_info::operator!=,
9250         type_info::before): Likewise.
9251         (type_info::is_pointer_p, type_info::is_function_p,
9252         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
9253         parameters.
9254         * inc/cxxabi.h
9255         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
9256         (__pointer_type_info::__pointer_type_info): Likewise.
9257         (__pointer_type_info::is_pointer_p,
9258         __pointer_type_info::do_catch): Prepend __. Rename parameters.
9259         (__array_type_info::__array_type_info): Rename parameters.
9260         (__function_type_info::__function_type_info): Likewise.
9261         (__function_type_info::is_function_p): Prepend __.
9262         (__enum_type_info::__enum_type_info): Rename parameters.
9263         (__pointer_to_member_type_info::__pointer_to_member_type_info):
9264         Likewise.
9265         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
9266         parameters.
9267         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
9268         (__class_type_info::__class_type_info): Rename parameters.
9269         (__class_type_info::sub_kind): Prepend __. Adjust member names.
9270         (__class_type_info::upcast_result,
9271         __class_type_info::dyncast_result): Prepend __. Move definition
9272         into tinfo.cc.
9273         (__class_type_info::do_upcast, __class_type_info::do_catch,
9274         __class_type_info::find_public_src,
9275         __class_type_info::do_dyncast,
9276         __class_type_info::do_find_public_src): Prepend __. Rename
9277         parameters.
9278         (__si_class_type_info::__si_class_type_info): Rename parameters.
9279         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
9280         __si_class_type_info::do_find_public_src): Prepent __. Rename
9281         parameters.
9282         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
9283         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
9284         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
9285         parameters.
9286         (__dynamic_cast): Rename parameters.
9287         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
9288         type_info::do_catch, type_info::do_upcast): Prepend __.
9289         (contained_p, public_p, virtual_p, contained_public_p,
9290         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
9291         (__class_type_info::do_catch,
9292         __class_type_info::do_upcast): Prepend __. Adjust.
9293         (__class_type_info::__upcast_result,
9294         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
9295         Adjust.
9296         (__class_type_info::find_public_src): Prepend __. Adjust.
9297         (__class_type_info::do_find_public_src,
9298         __si_class_type_info::do_find_public_src,
9299         __vmi_class_type_info::do_find_public_src): Likewise.
9300         (__class_type_info::do_dyncast,
9301         __si_class_type_info::do_dyncast,
9302         __vmi_class_type_info::do_dyncast): Likewise.
9303         (__class_type_info::do_upcast,
9304         __si_class_type_info::do_upcast,
9305         __vmi_class_type_info::do_upcast): Likewise.
9306         (__dynamic_cast): Adjust.
9307         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
9308         (__function_type_info::is_function_p): Likewise.
9309         (__pointer_type_info::do_catch): Likewise. Adjust.
9310         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
9311         (__throw_type_match_rtti_2): Adjust.
9312         (__is_pointer): Adjust.
9314 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
9316         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
9317         (complete_ctor_identifier): New macro.
9318         (special_function_kind): Add sfk_copy_constructor and
9319         sfk_assignment_operator.
9320         (LOOKUP_HAS_IN_CHARGE): Remove.
9321         (cons_up_default_function): Rename to ...
9322         (implicitly_declare_fn): ... this.
9323         * call.c (build_new_method_call): Add in-charge parameters for
9324         constructors here.
9325         * class.c (add_implicitly_declared_members): Change parameter name
9326         from cant_have_assignment to cant_have_const_assignment.
9327         Replace calls to cons_up_default_function to implicitly_declare_fn.
9328         * cvt.c (ocp_convert): Use complete_ctor_identifier.
9329         * decl.c (initialize_predefined_identifiers): Initialize it.
9330         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
9331         complex expression.
9332         * init.c (expand_default_init): Don't calculate the in-charge
9333         parameter here.
9334         (build_new_1): Likewise.
9335         * lex.c (cons_up_default_function): Move to method.c.
9336         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
9337         (implicitly_declare_fn): New function.
9338         * typeck.c (build_static_cast): Use complete_ctor_identifier.
9339         (build_modify_expr): Likewise.
9340         * typeck2.c (build_functional_cast): Likewise.
9342         Under the new ABI, constructors don't return `this'.
9343         * cp-tree.h (warn_reorder): Declare.
9344         (special_function_kind): New enum.
9345         (global_base_init_list): Remove declaration.
9346         (emit_base_init): Don't return a value.
9347         (check_base_init): Don't declare.
9348         (is_aggr_typedef): Likewise.
9349         * decl.c (check_special_function_return_type): New function.
9350         (return_types): Remove.
9351         (grokdeclarator): Use check_special_function_return_type.
9352         (start_function): Don't initialize ctor_label under the new ABI.
9353         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
9354         * init.c (begin_init_stmts): Move to top of file.
9355         (finish_init_stmts): Likewise.
9356         (warn_reorder): Don't declare.
9357         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
9358         value.
9359         (check_base_init): Remove.
9360         (is_aggr_typedef): Likewise.
9361         (build_new_1): Don't use the return value of a constructor.
9362         * semantics.c (setup_vtbl_ptr): Don't use the return value
9363         of emit_base_init.
9364         * typeck.c (check_return_expr): Don't magically convert return
9365         statements into `return this' in constructors under the new ABI.
9367         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
9368         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
9369         (base_ctor_identifier): New macro.
9370         (base_dtor_identifier): Likewise.
9371         (deleting_dtor_identifier): Likewise.
9372         * decl.c: Don't include obstack.h.
9373         (obstack_chunk_alloc): Don't define.
9374         (obstack_chunk_free): Likewise.
9375         (struct predefined_identifier): New type.
9376         (initialize_predefined_identifiers): New function.
9377         (init_decl_processing): Use it.
9378         (debug_temp_inits): Remove.
9379         (start_method): Don't call preserve_data.
9380         (hack_incomplete_structures): Update comment.
9381         * init.c (init_init_processing): Don't initialize
9382         nelts_identifier.
9383         (build_offset_rf): Remove dead code.
9384         (build_delete): Use CLASSTYPE_N_BASECLASSES.
9385         * search.c (init_search_processing): Don't initialize
9386         vptr_identifier.
9388 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9390         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
9391         some sign_compare warnings.
9393 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
9395         Rename abi::__vmi_class_type_info members.
9396         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
9397         base_list, detail_masks members to vmi_flags, vmi_base_count,
9398         vmi_bases and vmi_flags_masks respectively.
9399         (__vmi_class_type_info::vmi_flags_masks): Rename
9400         details_unknown_mask to flags_unknown_mask.
9401         * tinfo.cc (__class_type_info::do_upcast): Adjust.
9402         (__vmi_class_type_info::do_find_public_src): Adjust.
9403         (__vmi_class_type_info::do_dyncast): Adjust.
9404         (__vmi_class_type_info::do_upcast): Adjust.
9406 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
9408         * tinfo.cc (convert_to_base): New function.
9409         (get_vbase_offset): Remove. Move into convert_to_base.
9410         (__vmi_class_type_info::do_find_public_src): Adjust.
9411         (__vmi_class_type_info::do_dyncast): Adjust.
9412         (__vmi_class_type_info::do_upcast): Adjust.
9414 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
9416         * tinfo.cc (operator=): Use __builtin_strcmp.
9417         * tinfo2.cc (before): Likewise.
9419 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
9421         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
9422         (DECL_SAVED_INLINE): Rename to ...
9423         (DECL_DEFERRED_FN): ... this.
9424         (in_function_p): Remove declaration.
9425         (mark_inline_for_output): Rename to ...
9426         (defer_fn): ... this.
9427         * decl.c (finish_function): Adjust call to mark_inline_for_output.
9428         (in_function_p): Remove definition.
9429         * decl2.c (saved_inlines): Rename to ...
9430         (deferred_fns): ... this.
9431         (saved_inlines_used): Rename to ...
9432         (deferred_fns_used): ... this.
9433         (mark_inline_for_output): Rename to ...
9434         (defer_fn): ... this.
9435         (finish_file): Adjust accordingly.
9436         (init_decl2): Likewise.
9437         * lex.c (cons_up_default_function): Likewise.
9438         * pt.c (mark_decl_instantiated): Likewise.
9439         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
9440         circumstances.
9441         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
9442         * semantics.c (expand_body): Defer more functions.
9444 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
9446         * vec.cc: New file.
9447         * Make-lang.in (CXX_LIB2FUNCS): Add it.
9448         (vec.o): Build it.
9449         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
9450         __cxa_vec_delete): Declare.
9452 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
9454         * rtti.c (dfs_class_hint_mark): New static function.
9455         (dfs_class_hint_unmark): New static function.
9456         (class_hint_flags): Use them.
9458 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
9460         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
9462 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
9464         * cp-tree.h (instantiate_decl): Change prototype.
9465         * decl2.c (mark_used): Adjust call.
9466         * optimize.c (inlinable_function_p): Adjust handling of templates.
9467         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
9468         (do_type_instantiation): Likewise.
9469         (instantiate_decl): Defer more templates.
9470         (instantiate_pending_templates): Adjust logic to handle inline
9471         friend functions.
9473         * Makefile.in (GGC_H): New variable.  Use it throughout in place
9474         of ggc.h.
9476         * call.c: Don't include obstack.h.  Include ggc.h.
9477         (obstack_chunk_alloc): Don't define.
9478         (obstack_chunk_free): Likewise.
9479         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
9480         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
9481         (pop_switch): Free it.
9483         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
9485         * dump.c (dequeue_and_dump): Don't try to print the bit_position
9486         if we don't have a DECL_FIELD_OFFSET.
9488 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
9490         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
9491         special_function_p.
9493 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9495         * cfns.gperf (hash, libc_name_p): Prototype.
9497         * rtti.c (build_dynamic_cast_1): Constification.
9499         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
9501         * semantics.c (deferred_type_access_control): Prototype.
9503 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
9505         Correct many new ABI issues regarding vbase and vcall offset
9506         layout.
9507         * cp-tree.h (BINFO_VTABLE): Document.
9508         (struct lang_type): Tweak formatting.
9509         (BINFO_PRIMARY_BINFO): Add to documentation.
9510         (CLASSTYPE_VSIZE): Fix typo in comment.
9511         (CLASSTYPE_VBASECLASSES): Update documentation.
9512         (BINFO_VBASE_MARKED): Remove.
9513         (SET_BINFO_VBASE_MARKED): Likewise.
9514         (CLEAR_BINFO_VBASE_MARKED): Likewise.
9515         (BINFO_FIELDS_MARKED): Remove.
9516         (SET_BINFO_FIELDS_MARKED): Likewise.
9517         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
9518         (enum access_kind): New enumeration.
9519         (num_extra_vtbl_entries): Remove declaration.
9520         (size_extra_vtbl_entries): Likewise.
9521         (get_vtbl_decl_for_binfo): New function.
9522         (dfs_vbase_unmark): Remove declaration.
9523         (mark_primary_bases): Likewise.
9524         * class.c (SAME_FN): Remove.
9525         (struct vcall_offset_data_s): Move definition.
9526         (build_vbase_pointer): Use `build', not `build_binary_op', to
9527         access the vbase pointer under the new ABI.
9528         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
9529         (build_primary_vtable): Likewise.
9530         (dfs_mark_primary_bases): Move here from search.c.
9531         (mark_primary_bases): Likewise.
9532         (determine_primary_bases): Under the new ABI, don't make a base
9533         class a primary base just because we don't yet have any virtual
9534         functions.
9535         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
9536         (num_vfun_entries): Remove.
9537         (dfs_count_virtuals): Likewise.
9538         (num_extra_vtbl_entries): Likewise.
9539         (size_extra_vtbl_entries): Likewise.
9540         (layout_virtual_bases): Iterate in inheritance graph order under
9541         the new ABI.
9542         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
9543         indicate that a vfield is present.
9544         (init_class_processing): Initialize access_public_node, etc., from
9545         ak_public, etc.
9546         (get_vtbl_decl_for_binfo): New function.
9547         (dump_class_hierarchy_r): Likewise.
9548         (dump_class_hierarchy): Use it.
9549         (finish_vtbls): Build the vtbls in inheritance graph order.
9550         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
9551         (initialize_vtable): Use get_vtbl_decl_for_binfo.
9552         (accumulate_vtbl_inits): Add comments explaining why a pre-order
9553         walk is required.
9554         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
9555         where the vptr points, even for primary vtables.
9556         (build_vtbl_initializer): Adjust handling of vbase and vcall
9557         offsets.
9558         (build_vcall_and_vbase_vtable_entries): New function.
9559         (dfs_build_vbase_offset_vtbl_entries): Remove.
9560         (build_vbase_offset_vtbl_entries): Reimplement.
9561         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
9562         were already handled in a primary base class vtable.
9563         (build_vcall_offset_vtbl_entries): Adjust.
9564         (build_rtti_vtbl_entries): Adjust.
9565         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
9566         * init.c (expand_virtual_init): Simplify.
9567         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
9568         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
9569         * search.c (BINFO_ACCESS): New macro.
9570         (SET_BINFO_ACCESS): Likewise.
9571         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
9572         (access_in_type): Likewise.
9573         (dfs_accessible_p): Likewise.
9574         (protected_accessible_p): Likewise.
9575         (lookup_fnfields_1): Adjust documentation.
9576         (dfs_mark_primary_bases): Move to class.c
9577         (mark_primary_bases): Likewise.
9578         (dfs_vbase_unmark): Remove.
9579         (virtual_context): Use BINFO_FOR_VBASE.
9580         (dfs_get_vbase_types): Simplify.
9581         (dfs_build_inheritance_graph_order): New function.
9582         (get_vbase_types): Use it.
9583         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
9585         * tinfo.cc (get_vbase_offset): New function.
9586         (__vmi_class_type_info::do_find_public_src): Use it.
9587         (__vmi_class_type_info::do_dyncast): Likewise.
9588         (__vmi_class_type_info::do_upcast): Likewise.
9590 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
9592         * lang-specs.h: Pass -fno-show-column to the preprocessor.
9594 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
9596         * rtti.c (class_hint_flags): Rename flags.
9597         (class_initializer): Remove flags.
9598         (synthesize_tinfo_var): Combine offset and flags. Add flags
9599         for __vmi_class_type_info.
9600         (create_tinfo_types): Remove flags from __class_type_info and
9601         __si_class_type_info. Merge flags and offset from
9602         base_class_type_info.
9603         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
9604         (__base_class_info::is_virtual_p): Adjust.
9605         (__base_class_info::is_public_p): Adjust.
9606         (__base_class_info::offset): New accessor.
9607         (__class_type_info::details): Remove member.
9608         (__class_type_info::__class_type_info): Lose details.
9609         (__class_type_info::detail_masks): Remove.
9610         (__si_class_type_info::__si_class_type_info): Lose details.
9611         (__vmi_class_type_info::details): New member.
9612         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
9613         (__vmi_class_type_info::detail_masks): New member.
9614         * tinfo.cc (__class_type_info::do_upcast): Initialize result
9615         with unknown_details_mask.
9616         (__vmi_class_type_info::do_find_public_src): Adjust
9617         (__vmi_class_type_info::do_dyncast): Adjust.
9618         (__vmi_class_type_info::do_upcast): Set result details, if
9619         needed. Adjust.
9620         (__dynamic_cast): Temporarily #if out optimization.
9622 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
9624         * rtti.c (get_tinfo_decl): Mark used.
9625         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
9626         mark as dealt with, if we output it.
9628 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
9630         * class.c: Reorganize to put virtual function table initialization
9631         machinery at the end of the file.
9633 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
9635         * class.c (finish_struct): Use bitsize_zero_node.
9636         * pt.c (instantiate_class_template): Likewise.
9638 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
9640         Put RTTI entries at negative offsets in new ABI.
9641         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
9642         vbase offset at index -3, not -1.
9643         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
9644         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
9645         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
9646         (build_rtti_vtbl_entries): New function.
9647         (set_rtti_entry): Remove.
9648         (build_primary_vtable): Don't use it.
9649         (build_secondary_vtable): Likewise.
9650         (start_vtable): Remove.
9651         (first_vfun_index): New function.
9652         (set_vindex): Likewise.
9653         (add_virtual_function): Don't call start_vtable.  Do call
9654         set_vindex.
9655         (set_primary_base): Rename parameter.
9656         (determine_primary_base): Likewise.
9657         (num_vfun_entries): Don't use skip_rtti_stuff.
9658         (num_extra_vtbl_entries): Include RTTI information.
9659         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
9660         (skip_rtti_stuff): Remove.
9661         (dfs_modify_vtables): Don't use it.
9662         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
9663         (layout_nonempty_base_or_field): Update size handling.
9664         (create_vtable_ptr): Tweak.
9665         (layout_class_type): Adjust parameter names.
9666         (finish_struct_1): Simplify.
9667         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
9668         (skip_rtti_stuff): Remove.
9669         (first_vfun_index): New function.
9670         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
9671         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
9672         (marked_vtable_pathp): Declare.
9673         (unmarked_vtable_pathp): Likewise.
9674         * error.c (dump_expr): Use first_vfun_index to calculate vtable
9675         offsets.
9676         * rtti.c (build_headof): Look for RTTI at negative offsets.
9677         (get_tinfo_decl_dynamic): Likewise.
9678         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
9679         here.
9680         (create_pseudo_type_info): Do it here instead.  Adjust so that
9681         vptr points at first virtual function.
9682         * search.c (marked_vtable_pathp): Make it global.
9683         (unmarked_vtable_pathp): Likewise.
9684         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
9685         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
9686         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
9687         (get_pure_virtuals): Likewise.
9688         (expand_upcast_fixups): Likewise.
9689         * tree.c (debug_binfo): Likewise.
9690         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
9691         negative offset.
9693 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9695         * class.c (check_field_decl): Fix typo.
9696         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
9697         (check_methods): Likewise.
9698         (check_field_decls): Likewise.
9699         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
9700         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
9701         Use DECL_RESULT_FLD, not DECL_RESULT.
9702         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
9703         * lex.c (identifier_type): Likewise.
9704         * pt.c (determine_specialization, lookup_template_class): Likewise.
9705         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
9706         (resolve_overloaded_unification, more_specialized): Likewise.
9707         * semantics.c (finish_member_declaration): Likewise.
9708         * typeck.c (build_x_function_call): Likewise.
9710 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
9712         * class.c (layout_empty_base): Handle empty bases with non-byte
9713         alignment.
9714         (build_base_field): Likewise.
9715         (layout_virtual_bases): Likewise.
9717         * class.c (finish_struct_1): Fix typo in this change:
9719         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9721 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
9723         * decl.c (grokdeclarator): Count partial specializations when
9724         keeping track of how many template classes have been seen.
9726         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
9728 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9730         * class.c (build_vbase_pointer_fields): layout_field now place_field.
9731         (get_vfield_offset): Use byte_position.
9732         (set_rtti_entry): Set OFFSET to ssizetype zero.
9733         (get_binfo_offset_as_int): Deleted.
9734         (dfs_record_base_offsets): Use tree_low_cst.
9735         (dfs_search_base_offsets): Likewise.
9736         (layout_nonempty_base_or_field): Reflect changes in RLI format
9737         and call byte_position.
9738         (layout_empty_base): Convert offset to ssizetype.
9739         (build_base_field): use rli_size_unit_so_far.
9740         (dfs_propagate_binfo_offsets): Do computation in proper type.
9741         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
9742         (layout_class_type): Reflect changes in RLI names and fields.
9743         (finish_struct_1): Set DECL_FIELD_OFFSET.
9744         * dump.c (dequeue_and_dump): Call bit_position.
9745         * expr.c (cplus_expand_constant): Use byte_position.
9746         * rtti.c (expand_class_desc): Use bitsize_one_node.
9747         * typeck.c (build_component_addr): Use byte_position and don't
9748         special case for zero offset.
9750 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
9752         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
9754         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
9755         tinfo object.
9756         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
9757         vtable.
9759 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
9761         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
9762         DECL_P macros.
9763         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
9764         make_typename_type, check_initializer, cp_finish_decl,
9765         xref_tag): Likewise.
9766         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
9767         decl_namespace, arg_assoc_template_arg, arg_assoc,
9768         validate_nonmember_using_decl, do_class_using_decl): Likewise.
9769         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
9770         args_to_string): Likewise.
9771         * friend.c (is_friend): Likewise.
9772         * lex.c (note_got_semicolon, note_list_got_semicolon,
9773         is_global): Likewise.
9774         * method.c (build_overload_nested_name, build_overload_value,
9775         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
9776         * parse.y (typename_sub, typename_sub1): Likewise.
9777         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
9778         process_partial_specialization, convert_template_argument,
9779         template_args_equal, add_pending_template, lookup_template_class,
9780         for_each_template_parm_r, maybe_fold_nontype_arg,
9781         tsubst, instantiate_template, type_unification_real, unify,
9782         instantiate_pending_templates, set_mangled_name_for_template_decl):
9783         Likewise.
9784         * repo.c (repo_get_id, repo_template_used): Likewise.
9785         * search.c (lookup_field_1): Likewise.
9786         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
9787         * xref.c (classname): Likewise.
9789 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
9791         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
9792         (CANONICAL_BINFO): New macro.
9793         (BINFO_NEW_VTABLE_MARKED): Use it.
9794         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
9795         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
9796         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
9797         not TREE_TYPE.
9798         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
9799         (build_secondary_vtable): Likewise.
9800         (dfs_finish_vtbls): Likewise.
9801         (dfs_accumulate_vtbl_inits): Likewise.
9802         (accumulate_vtbl_inits): New function.
9803         (finish_vtbls): Make sure that virtual bases come after
9804         non-virtual bases in the vtable group.
9805         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
9806         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
9807         * search.c (struct vbase_info): Move definition.
9808         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
9809         (unmarked_new_vtable_p): Likewise.
9810         (dfs_mark_vtable_path): Remove.
9811         (dfs_mark_new_vtable): Remove.
9812         (dfs_unmark_new_vtable): Likewise.
9813         (dfs_clear_search_slot): Likewise.
9814         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
9815         (dfs_clear_vbase_slots): Likewise.
9816         (init_vbase_pointers): LIkewise.
9818 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
9820         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
9821         SIZETYPE to a non-SIZETYPE.
9823 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
9825         * class.c (layout_virtual_bases): Adjust names in conditionally
9826         compiled code.
9828         * class.c (record_base_offsets): New function.
9829         (layout_conflict_p): Likewise.
9830         (layout_nonempty_base_or_field): Use it.
9831         (layout_empty_base): New function.
9832         (build_base_field): Use it.
9833         (build_base_fields): Update comment.
9834         (layout_virtual_bases): Fold in a little code form
9835         layout_basetypes.  Use layout_empty_base.
9836         (layout_basetypes): Remove.
9837         (end_of_class): New function.
9838         (layout_class_type): Use it.  Adjust.
9840         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
9841         (fntype_p): Remove.
9842         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
9843         comment.
9844         (dfs_skip_nonprimary_vbases_markedp): Likewise.
9845         * typeck.c (fntype_p): Remove.
9847         * cp-tree.h (TI_SPEC_INFO): Remove.
9848         (CLASSTYPE_TI_SPEC_INFO): Likewise.
9849         * pt.c (process_partial_specialization): Likewise.
9851         * class.c (build_base_field): Fix thinko in computation of binfo
9852         offsets.
9854         * tree.c (mark_local_for_remap_p): Mark variables declared in
9855         TARGET_EXPRs as well.
9857 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
9859         * typeck.c (require_complete_type, complete_type,
9860         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
9861         build_array_ref, convert_arguments, pointer_diff,
9862         build_x_unary_op, build_unary_op, build_c_cast,
9863         build_modify_expr): Use COMPLETE_TYPE_P etc.
9864         * call.c (is_complete, convert_like_real,
9865         build_new_method_call): Likewise.
9866         * class.c (build_vbase_pointer_fields, check_bases,
9867         build_base_field, finish_struct_1, pushclass): Likewise.
9868         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
9869         * decl.c (maybe_process_template_type_declaration, pushtag,
9870         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
9871         layout_var_decl, check_initializer, cp_finish_decl,
9872         grokdeclarator, require_complete_types_for_parms,
9873         grok_op_properties, xref_tag, xref_basetypes,
9874         check_function_type): Likewise.
9875         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
9876         * friend.c (do_friend): Likewise.
9877         * init.c (build_offset_ref): Likewise.
9878         * parse.y (structsp): Likewise.
9879         * pt.c (maybe_process_partial_specialization,
9880         tsubst_friend_function, instantiate_class_template, tsubst,
9881         do_type_instantiation, instantiate_pending_templates): Likewise.
9882         * repo.c (repo_get_id): Likewise.
9883         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
9884         synthesize_tinfo_var, emit_support_tinfos): Likewise.
9885         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
9886         * semantics.c (begin_class_definition): Likewise.
9887         * tree.c (build_cplus_method_type): Likewise.
9888         * typeck2.c (digest_init, build_functional_cast,
9889         add_exception_specifier): Likewise.
9890         * parse.h, parse.c: Regenerated.
9892 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
9894         * inc/cxxabi.h: New header file. Define new-abi entry points.
9895         (__pointer_type_info::target): Rename member to ...
9896         (__pointer_type_info::type): ... here.
9897         (__base_class_info::type): Rename member to ...
9898         (__base_class_info::base): ... here.
9899         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
9900         * cp-tree.h (CPTI_ABI): New global tree enumeration.
9901         (abi_node): New global tree node.
9902         * decl.c (abi_node): Document.
9903         (init_decl_processing): Initialize abi_node.
9904         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
9905         (get_vmi_pseudo_type_info): Likewise.
9906         (create_tinfo_types): Likewise.
9907         (emit_support_tinfos): Likewise.
9908         * tinfo.h (cxxabi.h): Include for new-abi.
9909         Move rtti class definitions to new header file.
9910         * tinfo.cc (abi): Use the namespace.
9911         (std): Move new abi rtti classes from here ...
9912         (__cxxabiv1): ... to here.
9913         * tinfo2.cc (cxxabi.h): Include for new-abi.
9914         Move rtti class definitions to new header file.
9915         (std): Move new abi rtti classes from here ...
9916         (__cxxabiv1): ... to here.
9917         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
9918         namespace.
9920 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
9921             Jason Merrill  <jason@casey.cygnus.com>
9923         * method.c (build_overload_int): Use host_integerp.
9925 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
9927         * init.c (build_offset_ref): Handle the case of a templated member
9928         function.
9930 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9932         * except.c (expand_exception_blocks): Clear catch_clauses_last.
9934 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
9936         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
9937         * class.c (check_bitfield_decl): Turn illegal bitfields into
9938         non-bitfields.
9939         (dfs_propagate_binfo_offsets): Adjust for new size_binop
9940         semantics.
9941         (dfs_offset_for_unshared_vbases): Likewise.
9942         * cvt.c (cp_convert_to_pointer): Convert NULL to a
9943         pointer-to-member correctly under the new ABI.
9944         * expr.c (cplus_expand_constant): Don't use cp_convert when
9945         turning an offset into a pointer-to-member.
9946         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
9947         when dereferencing them under the new ABI.
9948         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
9949         of pointers-to-members under the new ABI.
9951         * class.c (check_bitfield_decl): Remove restriction on really long
9952         bitfields.
9953         (layout_class_type): Implement new ABI handling of bitfields
9954         longer than their types.
9956 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9958         * parse.y (extdefs): Call ggc_collect.
9959         * parse.c: Regenerated.
9961 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
9963         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
9964         (note_name_declared_in_class): Use OVL_CURRENT to get at a
9965         potential overload.
9967 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9969         * class.c (build_vbase_path): Use integer_zerop.
9970         (build_vtable_entry): Use tree_low_cst.
9971         (get_vfield_offset): Use bit_position.
9972         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
9973         Use tree_low_cst.
9974         (check_bitfield_decl): Set DECL_SIZE using convert.
9975         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
9976         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
9977         Use tree_low_cst.
9978         (finish_struct_1): Use bit_position.
9979         (dump_class_hierarchy): Use tree_low_cst.
9980         * cp-tree.h (min_precision): Add declaration.
9981         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
9982         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
9983         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
9984         * expr.c (cplus_expand_constant): Use bit_position.
9985         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
9986         * rtti.c (get_base_offset): Use bit_position.
9987         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
9988         host_integerp, and tree_low_cst.
9989         (pointer_int_sum): Use integer_zerop.
9990         (build_component_addr): Use bit_position.
9992 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
9994         * typeck.c (require_complete_type): Don't assume size_zero_node.
9995         (complete_type_or_else): Likewise.
9997 2000-03-16  Steven Grady <grady@digitaldeck.com>
9998             Jason Merrill  <jason@casey.cygnus.com>
10000         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
10002 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
10004         * decl2.c (grokfield): Bail out if type is error_mark_node.
10006 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
10008         * tinfo2.cc (__ptr_to_member_data): Rename to ...
10009         (__pointer_to_member_data): ... here. Adjust.
10010         * rtti.c (create_tinfo_types): Adjust.
10012 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
10014         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
10015         * decl.c (ref_desc_type_node): Undocument.
10016         * rtti.c (ptr_ref_initializer): Rename to ...
10017         (ptr_initializer): ... here. Adjust comments.
10018         (ptmd_initializer): Fix comment thinko.
10019         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
10020         (create_tinfo_types): Remove ref_desc_type_node init.
10021         * tinfo2.cc (__reference_type_info): Remove.
10023 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
10025         * decl.c (cp_finish_decl): Remove obsolete comment.
10027         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
10029 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
10031         * cp-tree.h: Tweak documentation.
10032         * class.c (build_vbase_pointer_fields): Layout the fields, too.
10033         (avoid_overlap): Remove.
10034         (get_binfo_offset_as_int): New function.
10035         (dfs_serach_base_offsets): Likewise.
10036         (layout_nonempty_base_or_field): Likewise.
10037         (build_base_field): Layout fields here.  Avoid placing two objects
10038         of the same type at the same address, under the new ABI.
10039         (build_base_fields): Adjust accordingly.
10040         (create_vtable_ptr): Return the new field, but don't attach it to
10041         TYPE_FIELDS.
10042         (remove_base_field): Remove.
10043         (remove_base_fields): Remove.
10044         (layout_basetypes): Adjust accordingly.
10045         (layout_class_type): Call layout_field for each field, rather than
10046         just making a wholesale call to layout_type.
10048 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
10050         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
10052 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
10054         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
10056         * except.c (dtor_nothrow): New fn.
10057         (do_pop_exception): Use it.  Take type parm.
10058         (push_eh_cleanup): Take type parm.
10059         (expand_start_catch_block): Pass it.
10060         (build_eh_type_type_ref): Accept null type.
10062 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
10064         * cp-tree.h (revert_static_member_fn): Change prototype.
10065         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
10066         (grok_op_properties): Likewise.
10067         (start_function): Likewise.
10068         (revert_static_member_fn): Simplify.
10069         * pt.c (check_explicit_specialization): Adjust call to
10070         revert_static_member_fn.
10072 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
10074         * cp-tree.h (scope_kind): New type.
10075         (tmpl_spec_kind): Likewise.
10076         (declare_pseudo_global_level): Remove.
10077         (pseudo_global_level_p): Rename to template_parm_scope_p.
10078         (pushlevel): Remove declaration.
10079         (begin_scope): New function.
10080         (finish_scope): Likewise.
10081         (current_tmpl_spec_kind): Likewise.
10082         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
10083         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
10084         Add template_spec_p.
10085         (toplevel_bindings_p): Adjust.
10086         (declare_pseudo_global_level): Remove.
10087         (pseudo_global_level_p): Rename to template_parm_scope_p.
10088         (current_tmpl_spec_kind): New function.
10089         (begin_scope): Likewise.
10090         (finish_scope): Likewise.
10091         (maybe_push_to_top_level): Adjust.
10092         (maybe_process_template_type_declaration): Likewise.
10093         (pushtag): Likewise.
10094         (pushdecl_nonclass_level): Likewise.
10095         (lookup_tag): Likewise.
10096         (grokfndecl): Handle member template specializations.  Share
10097         constructor and non-constructor code.
10098         * decl2.c (check_classfn): Handle member template specializations.
10099         * pt.c (begin_template_parm_list): Use begin_scope.
10100         (begin_specialization): Likewise.
10101         (end_specialization): Likewise.
10102         (check_explicit_specialization): Use current_tmpl_spec_kind.
10103         Handle member template specializations.
10104         (end_template_decl): Use finish_scope.  Remove call to
10105         get_pending_sizes.
10106         (push_template_decl_real): Remove bogus error message.
10107         (tsubst_decl): Fix typo in code contained in comment.
10108         (instantiate_template): Handle member template specializations.
10109         (most_general_template): Likewise.
10111 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
10113         * lex.c (whitespace_cr): Compress consecutive calls to warning().
10114         (do_identifier): Ditto for error().
10116         * pt.c (convert_nontype_argument): Ditto for cp_error().
10117         (convert_template_argument): Ditto for cp_pedwarn().
10119 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
10121         * exception.cc (__check_null_eh_spec): New fn.
10122         * except.c (expand_end_eh_spec): Call it if the spec is throw().
10124 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
10126         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
10127         * except.c (expand_end_eh_spec): Add the return type.
10128         * rtti.c (throw_bad_cast): Add the parmtypes.
10129         (throw_bad_typeid): Likewise.
10131         * semantics.c (expand_stmt): Only leave out rtl for unused
10132         artificials, and set DECL_IGNORED_P on them as well.
10133         * decl.c (wrapup_globals_for_namespace): Likewise.
10135 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
10137         * decl.c (maybe_commonize_var): Skip all artificial decls.
10138         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
10140 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
10142         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
10143         * cp-tree.h: Declare flag_enforce_eh_specs.
10144         * decl.c (store_parm_decls, finish_function): Check it.
10146         C library functions don't throw.
10147         * Makefile.in (cfns.h): New target.
10148         (except.o): Depend on it.
10149         * Make-lang.in (cc1plus): Depend on cfns.gperf.
10150         * cfns.gperf: New file.
10151         * cfns.h: Generated.
10152         * except.c: Include it.
10153         (nothrow_libfn_p): New fn.
10154         * decl.c (grokfndecl): Use it.
10155         * cp-tree.h: Declare it.
10157         * decl.c (push_overloaded_decl_1, auto_function,
10158         define_function): Lose.
10159         (build_library_fn_1): New static fn.
10160         (builtin_function): Use it.
10161         (get_atexit_node): Use build_library_fn_ptr.
10162         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
10163         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
10164         push_void_library_fn, push_throw_library_fn): New fns.
10165         * cp-tree.h: Declare them.
10166         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
10167         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
10168         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
10169         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
10170         * rtti.c (build_runtime_decl): Lose.
10171         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
10172         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
10173         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
10175         * call.c (build_call): Remove result_type parm.
10176         Call mark_used on unused artificial fns.
10177         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
10179 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
10181         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
10182         appropriate.
10183         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
10184         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
10185         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
10186         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
10187         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
10188         expand_generic_desc): Likewise.
10190 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
10192         * exception.cc (__cp_pop_exception): Cleanup the original object.
10194 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
10196         * decl.c (grok_op_properties): Merge conversion to void warning
10197         with other silly op warnings.
10199 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
10201         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
10202         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
10204 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
10206         * decl.c (cp_make_fname_decl): New function.
10207         (wrapup_globals_for_namespace): Don't emit unused static vars.
10208         (init_decl_processing): Remove comment about use of
10209         array_domain_type. Set make_fname_decl.
10210         (cp_finish_decl): Remove __FUNCTION__ nadgering.
10211         * semantics.c (begin_compound_stmt): Remove
10212         current_function_name_declared flagging.
10213         (expand_stmt): Don't emit unused local statics.
10214         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
10215         specially.
10217 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
10219         * typeck.c (convert_for_assignment): Don't look at array
10220         initializer.
10221         * call.c (convert_like_real): Likewise.
10223 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
10225         Add initial support for '\uNNNN' specifier.
10226         * lex.c (read_ucs): New fn.
10227         (readescape, skip_white_space): Call it.
10228         (is_extended_char, is_extended_char_1): New fns.
10229         (utf8_extend_token): New fn, #if 0'd out.
10230         (real_yylex): Treat extended chars like letters.
10232         * search.c (note_debug_info_needed): Walk the bases even if we
10233         weren't deferring the type itself.
10235 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10237         * decl2.c (finish_objects): Constify a char*.
10239         * method.c (emit_thunk): Likewise.
10241 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
10243         * typeck.c (dubious_conversion_warnings): Look through
10244         REFERENCE_TYPE.
10246 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10248         * class.c (dfs_modify_vtables): I is now unsigned.
10249         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
10250         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
10251         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
10252         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
10253         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
10254         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
10255         Call integer_all_onesp.
10256         * typeck2.c (process_init_constructor): Use compare_tree_int.
10258         * lang-specs.h (as): Don't call if -syntax-only.
10260 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
10262         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
10263         RTL_EXPR_HAS_NO_SCOPE after all.
10265 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
10267         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
10268         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
10269         RTL_EXPR_HAS_NO_SCOPE.
10271         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
10272         later.
10274         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
10276 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
10278         * call.c (convert_like): Macrofy.
10279         (convert_like_with_context): New macro.
10280         (convert_like_real): Renamed from convert_like.  Add calling
10281         context parameters, for diagnostics. Add recursive flag.  Call
10282         dubious_conversion_warnings for outer conversion.
10283         (build_user_type_conversion): Use convert_like_with_context.
10284         (build_over_call): Likewise. Don't warn about dubious
10285         conversions here. Adjust convert_default_arg calls.
10286         (convert_default_arg): Add context parameters for diagnostics.
10287         Pass through to convert_like_with_context.
10288         * cp-tree.h (convert_default_arg): Add context parameters.
10289         (dubious_conversion_warnings): Prototype new function.
10290         * typeck.c (convert_arguments): Adjust convert_default_arg call.
10291         (dubious_conversion_warnings): New function, broken
10292         out of convert_for_assignment.
10293         (convert_for_assignment): Adjust.
10295 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
10297         * decl2.c (key_method): Break out from...
10298         (import_export_vtable, import_export_class): ...here.
10300         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
10301         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
10303         * search.c (note_debug_info_needed, dfs_debug_mark,
10304         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
10305         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
10307 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
10309         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
10310         typos.
10312 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
10314         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
10315         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
10316         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
10317         (lang_type): Split gets_new into has_new and has_array_new.
10318         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
10319         (TYPE_GETS_NEW): Split into ...
10320         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
10321         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
10322         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
10323         (build_op_new_call): Don't declare.
10324         (build_new_1): Likewise.
10325         * call.c (build_op_new_call): Remove.
10326         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
10327         instead of TYPE_NEEDS_DESTRUCTOR.
10328         (finish_struct_bits): Likewise.
10329         (add_implicitly_declared_members): Likewise.
10330         (check_field_decl): Likewise.
10331         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
10332         correctly under the new ABI.
10333         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
10334         instead of TYPE_NEEDS_DESTRUCTOR.
10335         (initialize_local_var): Likewise.
10336         (destroy_local_var): Likewise.
10337         (cp_finish_decl): Likewise.
10338         (register_dtor_fn): Likewise.
10339         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
10340         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
10341         TYPE_VEC_DELETE_TAKES_SIZE here.
10342         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
10343         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
10344         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
10345         (finish_destructor_body): Likewise.
10346         (maybe_build_cleanup_1): Likewise.
10347         * decl2.c (do_static_destruction): Likewise.
10348         * init.c (build_new_1): Make it static.
10349         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
10350         (expand_cleanup_for_base): Likewise.
10351         (get_cookie_size): New function.
10352         (build_new_1): Handle array-new cookies correctly under the new
10353         ABI.
10354         (build_vec_delete_1): Likewise.
10355         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
10356         (build_delete): Likewise.
10357         (build_vec_delete): Handle array-new cookies correctly under the new
10358         ABI.
10359         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
10360         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
10361         TYPE_HAS_ARRAY_NEW_OPERATOR.
10362         * ptree.c (print_lang_type): Check them.
10363         * search.c (context_for_name_lookup): Fix typo in comment.
10364         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
10365         * tree.c (break_out_cleanups): Likewise.
10366         (build_cplus_array_test_1): Likewise.
10367         (cp_build_qualified_type_real): Likewise.
10368         * typeck.c (complete_type): Likewise.
10370         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
10371         the command-line, not the end.
10373 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
10375         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
10377 2000-03-02  Tom Tromey  <tromey@cygnus.com>
10379         * cp-tree.h (build_java_class_ref): Declare.
10380         * init.c (build_java_class_ref): No longer static.
10381         * except.c (expand_throw): Generate a Java-style `throw' if the
10382         thrown object is a "Java" object.
10383         (initialize_handler_parm): Generate a Java-style lookup of
10384         exception info if the caught object is a "Java" object.
10385         (catch_language, catch_language_init): New globals.
10386         (decl_is_java_type): New function.
10387         (expand_start_catch_block): Don't call push_eh_info() or
10388         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
10389         class reference to build_catch_block.
10391 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10393         * typeck.c (comptypes): Treat sizetype like its language equivalent.
10395 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
10397         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
10398         to merge reference/pointer code and fix incorrect warnings.
10400 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
10402         * search.c (protected_accessible_p): Use context_for_name_lookup.
10404         * init.c (construct_virtual_bases): Fix thinko.
10405         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
10407 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
10409         * decl.c (current_function_decl): Move to toplev.c.
10411 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
10413         * pt.c (fn_type_unification): Unify return type, whenever
10414         provided.
10415         (get_bindings_real): Only pass return type when necessary.
10416         Remove explicit return type check.
10417         * class.c (resolve_address_of_overloaded_function): Pass desired
10418         return type to fn_type_unification.
10420 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10422         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
10423         DECL_FIELD_SIZE.
10424         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
10425         DECL_FIELD_SIZE.
10426         * rtti.c (expand_class_desc): Likewise.
10427         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
10428         (THUNK_VCALL_OFFSET): Likewise.
10429         (THUNK_DELTA): Reflect changes in ../tree.h.
10431 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
10433         * search.c (protected_accessible_p): Also allow the access if
10434         the member is public in DERIVED.  Lose TYPE parm.
10435         (friend_accessible_p): Lose TYPE parm.
10436         (accessible_p): Adjust.
10438 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10440         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
10441         on things that are not sizes; ssize_binop deleted.
10442         Call size_diffop when appropriate.
10443         (dfs_build_vcall_offset_vtbl_entries): Likewise.
10444         (build_primary_vtable, build_secondary_vtable): Likewise.
10445         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
10446         Variable I is HOST_WIDE_INT.
10447         (get_vfield_offset): Pass proper types to size_binop.
10448         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
10449         (finish_struct_1): Likewise.
10450         (skip_rtti_stuff): Arg N is now pointer to signed.
10451         (layout_class_type): Use size_zero_node.
10452         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
10453         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
10454         * decl.c (complete_arry_type): Pass proper types to size_binop.
10455         (xref_basetypes): BINFO_OFFSET is sizetype.
10456         * error.c (dump_expr): Don't use size_binop non-sizes.
10457         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
10458         * init.c (construct_virtual_bases): Fix type error.
10459         (build_vec_delete_1): Pass proper type to size_binop and don't
10460         fold result.
10461         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
10462         * rtti.c (get_base_offset): Pass proper type to size_binop.
10463         * search.c (dfs_find_vbases): Fix type error.
10464         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
10465         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
10466         * tree.c (debug_binfo): Variable N is signed.
10467         Use HOST_WIDE_INT_PRINT_DEC.
10468         * typeck.c (comptypes): sizetype is same as equivalent integer type.
10469         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
10470         size_one_node and size_zero_node.
10471         (c_alignof): Use size_one_node.
10472         (build_component_addr): Pass proper types to size_binop.
10473         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
10475 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
10477         Implement class scope using-declarations for functions.
10478         * class.c (handle_using_decl): Call add_method for used functions.
10479         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
10480         (add_method): Used functions are hidden by local functions.
10481         (check_bases_and_members): Handle using-decls before finalizing
10482         CLASSTYPE_METHOD_VEC.
10483         * call.c (add_function_candidate): Add ctype parm; if non-zero,
10484         override the type of 'this' accordingly.
10485         (add_template_candidate, add_template_candidate_real): Add ctype parm.
10486         (convert_class_to_reference, build_user_type_conversion_1,
10487         build_new_function_call, build_object_call, build_new_op,
10488         build_new_method_call): Pass ctype parm.
10490         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
10491         the baselink.
10492         * call.c (convert_class_to_reference, build_user_type_conversion_1,
10493         build_new_function_call, build_object_call, build_new_op,
10494         build_new_method_call, build_op_delete_call): Don't get basetype_path
10495         from a baselink.
10496         * typeck.c (build_component_ref): Likewise.
10497         * init.c (build_offset_ref): Likewise.
10498         (resolve_offset_ref): Don't call enforce_access.
10499         Call build_scoped_ref.
10500         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
10501         would cause an error or if -pedantic.
10502         * class.c (alter_access): Lose binfo parm.
10504 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
10506         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
10507         types.
10509 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
10511         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
10512         pseudo_type_info creation into the std namespace
10514 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
10516         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
10517         (import_export_class): Remove declaration.
10518         * decl2.c (import_export_class): Make it static.
10519         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
10520         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
10521         EXPR_WITH_FILE_LOCATION.
10522         * lex.c (check_newline): Tweak filename/lineno setting.
10523         * semantics.c (begin_while_stmt): Fix typo in comment.
10525 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10527         * lang-options.h (-fmessage-length=): Add missing option.
10529         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
10531 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
10533         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
10535 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
10537         * optimize.c (expand_call_inline): Emit the return label before
10538         evaluating the return value.
10540 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
10542         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
10543         than duplicating functionality here.
10544         * optimize.c: Include input.h.
10545         (expand_call_inline): Use push_srcloc and pop_srcloc.
10546         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
10547         * parse.c: Regenerated.
10548         * Makefile.in (lex.o): Depend on input.h.
10549         (optimize.o): Likewise.
10551 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
10553         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
10554         function type, rather than ICE.
10556 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
10558         * decl.c (grokdeclarator): Call decl_type_access_control.
10559         * parse.y (parse_end_decl): Don't call decl_type_access_control if
10560         decl is null.
10562 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
10564         * decl.c (decls_match): Remove obsolete static member nadgering.
10566 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10568         * decl.c (grokdeclarator): Change ANSI to ISO.
10569         * lex.c (consume_string, readescape, do_identifier): Likewise.
10570         (parse_float, real_yylex): Likewise.
10571         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
10572         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
10573         new_type_id, maybe_label_decls, simple_stmt,
10574         for.init.statement): Likewise.
10575         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
10576         * semantics.c (finish_named_return_value): Likewise.
10577         * parse.c: Regenerate.
10579 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
10581         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
10582         (CPTI_CLASS_STAR_TYPE): Remove.
10583         (vtable_index_type): Likewise.
10584         (class_star_type_node): Remove.
10585         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
10586         (build_binary_op_nodefault): Remove.
10587         * call.c (build_new_op): Use build_binary_op instead of
10588         build_binary_op_nodefault.
10589         * decl.c (init_decl_processing): Remove class_star_type_node
10590         initialization.  Make delta_type_node ptrdiff_type_node under the
10591         new ABI.  Initialize vtable_index_type.
10592         (build_ptrmemfunc_type): Build different structures for the new
10593         ABI.
10594         (build_enumerator): Use build_binary_op instead of
10595         build_binary_op_nodefault.
10596         * method.c (build_overload_value): Mangle pointers-to-members
10597         appropriately under the new ABI.
10598         * typeck.c (build_array_ref): Use build_binary_op instead of
10599         build_binary_op_nodefault.
10600         (get_member_function_from_ptrfunc): Adjust for the new ABI.
10601         (build_binary_op_nodefault): Rename to ...
10602         (build_binary_op): ... this.  Remove old version.  Adjust for
10603         pointer-to-member comparisons under the new ABI.
10604         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
10605         (build_ptrmemfunc): Adjust for the new ABI.
10606         (expand_ptrmemfunc_cst): Likewise.
10607         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
10608         (pfn_from_ptrmemfunc): Adjust for the new ABI.
10610 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
10612         * call.c (build_object_call): Compress consecutive calls to
10613         cp_error.
10614         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
10615         (build_op_delete_call): Adjust message formatting.
10617         * class.c (check_bases): Compress consecutive calls to
10618         cp_pedwarn.
10619         (finish_struct_anon): Say 'ISO C++'.
10621         * decl.c (start_decl): Same here.
10622         (grok_reference_init): Likewise.
10623         (grokfndecl): Correct message formatting.
10624         (grokfndecl): Improve diagnostic.
10625         (check_static_variable_definition): Likewise. Say 'ISO C++'
10626         (compute_array_index_type): Say 'ISO C++'
10627         (create_array_type_for_decl): Compress consecutive calls to
10628         cp_error.
10629         (grokdeclarator): Say 'ISO C++'
10630         (grok_op_properties): Likewise.
10632         * decl2.c (delete_sanity): Clairify diagnostic.
10633         (check_member_template): Same here.
10634         (grok_function_init): Use consistent terminology.
10636         * expr.c (do_case): Say 'ISO C++'
10638         * friend.c (do_friend): Compress consecutive calls to warning.
10640 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
10642         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
10643         * class.c (build_secondary_vtable): Reorganize.  Don't create a
10644         new vtable under the new ABI.
10645         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
10646         computing the size.
10647         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
10648         the initializing elements.
10649         (initialize_vtable): New function.
10650         (dfs_finish_vtbls): Use it.
10651         (dfs_accumulate_vtbl_inits): New function.
10652         (finish_vtbls): Merge primary and secondary vtables under the new
10653         ABI.
10654         (finish_struct_1): Remove redundant call to layout_vtable_decl.
10655         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
10656         aren't VAR_DECLs.
10658         * class.c (build_vtable): New function, split out from ...
10659         (get_vtable_decl): ... here, and ...
10660         (build_secondary_vtable): ... here.
10662         * pt.c (tsubst_decl): Fix formatting.
10664 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10666         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
10667         (avoid_overlap, build_base_field): Likewise.
10668         (build_base_field, build_base_fields, is_empty_class):
10669         Test DECL_SIZE with integer_zero.
10670         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
10671         * cp-tree.h (struct lang_type): New field size_unit.
10672         (CLASSTYPE_SIZE_UNIT): New macro.
10673         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
10674         (cp_finish_decl): Delete -Wlarger-than processing.
10675         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
10676         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
10677         * tree.c (make_binfo): binfo vector is one entry longer.
10678         (walk_tree): Walk DECL_SIZE_UNIT.
10680 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
10682         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
10683         comment.
10684         (build_vtable_entry): Don't assume all vtable entries are
10685         functions.
10686         (build_vtbl_initializer): Adjust accordingly.
10687         (get_vtable_decl): Fix formatting.
10689 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
10691         * semantics.c (deferred_type_access_control): Walk the entire
10692         type_lookups list.
10693         (save_type_access_control): Rename from
10694         initial_deferred_type_access_control.  Just remember the value.
10695         (decl_type_access_control): New fn.
10696         (begin_function_definition): Use deferred_type_access_control, after
10697         we've started the function.  Set type_lookups to error_mark_node.
10698         * parse.y (frob_specs, fn.def1): Adjust.
10699         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
10700         (parse_end_decl, parse_bitfield0, parse_method): New fns.
10701         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
10702         (after_type_component_declarator0): Likewise.
10703         (after_type_component_declarator): Likewise.
10704         (notype_component_declarator): Likewise.
10705         * cp-tree.h: Adjust.
10707         * decl.c (redeclaration_error_message): Allow redeclaration of
10708         namespace-scope decls.
10710 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
10712         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
10714 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
10716         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
10717         * decl2.c (grokclassfn): Likewise.
10719         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
10721         * decl2.c (lang_decode_option): Don't set default message length
10722         here.
10723         * lex.c (lang_init_options): Set it here.
10725 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
10727         Make DECL_CONTEXT mean the class in which a member function was
10728         declared, even for a virtual function.
10729         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
10730         (DECL_FRIEND_CONTEXT): New macro.
10731         (DECL_REAL_CONTEXT): Remove.
10732         (SET_DECL_FRIEND_CONTEXT): Likewise.
10733         (DECL_VIRTUAL_CONTEXT): Adjust.
10734         (DECL_CLASS_SCOPE_P): Use TYPE_P.
10735         (add_friends): Remove.
10736         (hack_decl_function_context): Likewise.
10737         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
10738         CP_DECL_CONTEXT.
10739         (build_over_call): Fix indentation.  Use DECL_CONTEXT
10740         instead of DECL_CLASS_CONTEXT.
10741         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
10742         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
10743         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
10744         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
10745         (build_base_field): Likewise.
10746         (finish_struct_1): Likewise.
10747         (build_self_reference): Likewise.
10748         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
10749         DECL_REAL_CONTEXT.
10750         (pushtag): Use decl_function_context, not
10751         hack_decl_function_context.
10752         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
10753         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
10754         (pushdecl): Remove bogus code.
10755         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
10756         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
10757         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
10758         Use decl_function_context, nothack_decl_function_context.
10759         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
10760         (grokdeclarator): Likewise.  Use decl_function_context, not
10761         hack_decl_function_context.
10762         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
10763         (start_function): Use DECL_FRIEND_CONTEXT, not
10764         DECL_CLASS_CONTEXT.  Use decl_function_context, not
10765         hack_decl_function_context.
10766         (finish_function): Use decl_function_context, not
10767         hack_decl_function_context.
10768         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
10769         DECL_CLASS_CONTEXT.
10770         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
10771         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
10772         (grokfield): Likewise.
10773         (finish_builtin_type): Likewise.
10774         (finish_vtable_vardec): Use decl_function_context, not
10775         hack_decl_function_context.
10776         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
10777         (start_static_initialization_or_destruction): Likewise.
10778         (finish_static_initialization_or_destruction): Likewise.
10779         (mark_used): Adjust logic for deciding when to synthesize methods.
10780         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
10781         DECL_REAL_CONTEXT.
10782         * error.c (dump_function_decl): Use DECL_CONTEXT, not
10783         DECL_CLASS_CONTEXT.
10784         * friend.c (is_friend): Likewise.
10785         (add_friends): Remove.
10786         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
10787         * lex.c (begin_definition_of_inclass_inline): Use
10788         decl_function_context, not hack_decl_function_context.
10789         (process_next_inline): Likewise.
10790         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
10791         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
10792         DECL_CLASSS_CONTEXT.
10793         (hack_identifier): Likewise.
10794         (synthesize_method):  Use decl_function_context, not
10795         hack_decl_function_context.
10796         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
10797         DECL_REAL_CONTEXT.
10798         (is_member_template): Use decl_function_context, not
10799         hack_decl_function_context.  Use DECL_CONTEXT, not
10800         DECL_CLASS_CONTEXT.
10801         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
10802         DECL_CLASS_CONTEXT.
10803         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
10804         DECL_REAL_CONTEXT.
10805         (push_template_decl_real): Likewise.
10806         (instantiate_class_template): Don't call add_friends.
10807         (tsubst_default_argument): Use DECL_CONTEXT, not
10808         DECL_REAL_CONTEXT.
10809         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
10810         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
10811         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
10812         DECL_CLASS_CONTEXT.
10813         * repo.c (repo_inline_used): Likewise.
10814         * search.c (current_scope): Adjust for new _CONTEXT macros.
10815         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
10816         DECL_REAL_CONTEXT.
10817         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
10818         (lookup_fnfields_here):Likewise.
10819         (check_final_overrider): Likewise.
10820         (init_vbase_pointers): Likewise.
10821         (virtual_context): Likewise.
10822         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
10823         (expand_body): Use decl_function_context, not
10824         hack_decl_function_context.
10825         * tree.c (hack_decl_function_context): Remove.
10826         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
10827         DECL_CLASS_CONTEXT.
10828         * typeck2.c (error_not_base_type): Likewise.
10830 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
10832         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
10834 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10836         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
10838 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
10840         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
10842 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
10844         * decl2.c (lang_decode_option): Enable automatic line wrapping.
10846 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
10848         * parse.y (frob_specs): Split out...
10849         (parse_decl): From here.
10850         (fn.def2): Call initial_deferred_type_access_control.
10851         (after_type_component_declarator0): Call frob_specs.
10852         (notype_component_declarator0): Likewise.
10853         * search.c (friend_accessible_p): Nested classes are friends of their
10854         enclosing classes.
10856 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
10858         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
10859         used to create an implicit temporary.
10861         * class.c (dfs_modify_vtables): Tweak calculation of functions to
10862         override.
10864 2000-02-08  Nathan Sidwell  <nathan@acm.org>
10866         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
10867         strip array element qualifiers too.
10869 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
10871         * decl.c (store_parm_decls): Don't build cleanups for parameters
10872         while processing_template_decl.
10874 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
10876         * cp-tree.h (struct saved_scope): Add incomplete field.
10877         (namespace_scope_incomplete): New macro.
10878         * decl.c (pushdecl): Use it.
10879         (hack_incomplete_structures): Use it.  See through artificial
10880         binding levels.
10881         (mark_saved_scope): Mark it.
10883         Implement access control for nested types.
10884         * search.c (type_access_control): New fn.
10885         (accessible_p): Now we do perform access control for types.
10886         * semantics.c (deferred_type_access_control): New fn.
10887         (initial_deferred_type_access_control): New fn.
10888         (begin_function_definition): Call it.  Add lookups parm.
10889         * decl.c (struct binding_level): Add this_class field.
10890         (pushlevel_class): Set it.
10891         (mark_binding_level): Mark it.
10892         (lookup_name_real): Use it.  Call type_access_control.
10893         (mark_saved_scope): Mark lookups field.
10894         * cp-tree.h (flagged_type_tree): Add lookups field.
10895         (struct saved_scope): Add lookups field.
10896         (type_lookups): New macro.
10897         * parse.y (declmods): Now <ftype>.
10898         (parse_decl): Add lookups parm.  Call
10899         initial_deferred_type_access_control.
10900         (lang_extdef): Clear type_lookups.
10901         (typed_declspecs, declmods, typespec): Set lookups field.
10902         (initdcl): Call deferred_type_access_control.
10903         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
10904         component_decl_1, named_parm): Adjust.
10905         * friend.c (is_friend): Nested classes are friends of their
10906         enclosing classes.
10908         * class.c (currently_open_derived_class): New fn.
10909         * method.c (hack_identifier): Use it.
10911         * lex.c (do_identifier): Remove obsolete code.
10913         * parse.y (typed_typespecs): Propagate new_type_flag properly.
10915 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
10917         * tinfo.h: Remove apostrophes from C++ comment (xgettext
10918         thinks this file is plain C).
10920 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10922         * Makefile.in (call.o): Depend on $(EXPR_H).
10924         * call.c: Include "expr.h".
10926         * class.c (dump_class_hierarchy): Add prototype.
10928         * search.c (dfs_get_pure_virtuals): Likewise.
10930 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
10932         * parse.y (simple_stmt): Allow :: token in asm parameter list.
10933         * parse.c: Rebuilt.
10935 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
10937         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
10938         Store it in DECL_FCONTEXT.
10939         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
10941 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
10943         * tinfo.h (old abi): #include "tconfig.h".
10944         * tinfo.cc (convert_to_base): Move into old abi section.
10946 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
10948         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
10949         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
10950         (BINFO_PRIMARY_BINFO): New macro.
10951         (BF_DELTA): Rename to ...
10952         (BV_DELTA): ... this.
10953         (BF_VCALL_INDEX): Rename to ...
10954         (BV_VCALL_INDEX): ... this.
10955         (BF_FN): Rename to ...
10956         (BV_FN): ... this.
10957         * class.c (build_vbase_path): Adjust for changes to reverse_path.
10958         (set_rtti_entry): Rename BF_ macros to BV_ variants.
10959         (modify_vtable_entry): Simplify.
10960         (add_virtual_function): Rename BF_ macros to BV_ variants.
10961         (build_vtable_initializer): Likewise.
10962         (get_class_offset_1): Remove.
10963         (dfs_get_class_offset): Likewise.
10964         (get_class_offset): Likewise.
10965         (dfs_find_final_overrider): New function.
10966         (find_final_overrider): Likewise.
10967         (modify_one_vtable): Remove.
10968         (dfs_find_base): New function.
10969         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
10970         find_final_overrider.
10971         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
10972         virtuals.
10973         (dfs_fixup_vtable_deltas): Remove.
10974         (override_one_vtable): Remove.
10975         (merge_overrides): Likewise.
10976         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
10977         unreal chilren of virtual bases.
10978         (finish_struct_1): Don't use merge_overrides.  Don't use
10979         dfs_fixup_vtable_deltas.
10980         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
10981         BINFOs.
10983 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
10984             Jason Merrill  <jason@yorick.cygnus.com>
10986         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
10988 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
10990         * exception.cc (__throw_bad_typeid): Add missing std::.
10992 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10994         * cp-tree.h (make_thunk): PROTO -> PARAMS.
10996 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
10998         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
11000         Runtime support for new-abi rtti.
11001         * inc/typeinfo (type_info::operator!=): Define in class.
11002         (type_info::before, type_info::name, type_info::operator==,
11003         type_info::operator!=): Define new ABI implementations.
11004         (type_info::is_pointer_p, type_info::is_function_p): Declare
11005         new virtual functions.
11006         (type_info::do_catch, type_info::do_upcast): Likewise.
11008         * tinfo.h (__base_class_info): Define new class.
11009         (__class_type_info): Likewise.
11010         (__si_class_type_info): Likewise.
11011         (__vmi_class_type_info): Likewise.
11012         (__dynamic_cast): Prototype.
11014         * tinfo.cc: Conditionalize old and new rtti mechanisms.
11015         (type_info::is_pointer_p): Define new function.
11016         (type_info::is_function_p): Likewise.
11017         (type_info::do_catch): Likewise.
11018         (type_info::do_upcast): Likewise.
11019         (vtable_prefix): New structure for vtable access.
11020         (adjust_pointer): Define new template function.
11021         (contained_p, public_p, virtual_p, contained_public_p,
11022         contained_nonpublic_p, contained_nonvirtual_p): Define new
11023         functions.
11024         (nonvirtual_base_type): New local variable.
11025         (__class_type_info::~__class_type_info): Define.
11026         (__si_class_type_info::~__si_class_type_info): Likewise.
11027         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
11028         (__class_type_info::do_catch): Define new function.
11029         (__class_type_info::do_upcast): Likewise.
11030         (__class_type_info::find_public_src): Likewise.
11031         (__class_type_info::do_find_public_src): Likewise.
11032         (__si_class_type_info::do_find_public_src): Likewise.
11033         (__vmi_class_type_info::do_find_public_src): Likewise.
11034         (__class_type_info::do_dyncast): Likewise.
11035         (__si_class_type_info::do_dyncast): Likewise.
11036         (__vmi_class_type_info::do_dyncast): Likewise.
11037         (__class_type_info::do_upcast): Likewise.
11038         (__si_class_type_info::do_upcast): Likewise.
11039         (__vmi_class_type_info::do_upcast): Likewise.
11040         (__dynamic_cast): Likewise.
11042         * tinfo2.cc (__fundamental_type_info): Define new class.
11043         (__pointer_type_info): Likewise.
11044         (__reference_type_info): Likewise.
11045         (__array_type_info): Likewise.
11046         (__function_type_info): Likewise.
11047         (__enum_type_info): Likewise.
11048         (__ptr_to_member_type_info): Likewise.
11049         (__fundamental_type_info::~__fundamental_type_info): Define.
11050         (__pointer_type_info::~__pointer_type_info): Likewise.
11051         (__reference_type_info::~__reference_type_info): Likewise.
11052         (__array_type_info::~__array_type_info): Likewise.
11053         (__function_type_info::~__function_type_info): Likewise.
11054         (__enum_type_info::~__enum_type_info): Likewise.
11055         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
11056         (__pointer_type_info::do_catch): Define new function.
11057         (__ptr_to_member_type_info::do_catch): Define new function.
11059         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
11060         (__is_pointer): Likewise.
11062         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
11064 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
11066         * cp/class.c (build_vtable): Rename to build_primary_vtable.
11067         (prepare_fresh_vtable): Rename to build_secondary_vtable.
11068         (make_new_vtable): New function.
11069         (modify_vtable_entry): Handle generation of new vtables correctly.
11070         (modify_one_vtable): Remove unused parameter.
11071         (dfs_fixup_vtable_deltas): Likewise.
11072         (override_one_vtable): Use build_secondary_vtable.
11073         (finish_struct_1): Use build_primary_vtable and
11074         build_secondary_vtable.
11076 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
11078         * cp/decl.c: Adjust variable names, comments, help strings.
11080 2000-01-29  Nathan Sidwell  <nathan@acm.org>
11082         * new2.cc (operator delete[]): Use operator delete, don't assume
11083         implementation.
11085 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
11087         * class.c (build_vtbl_initializer): Add argument to
11088         build_vtable_entry call.
11090 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
11092         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
11093         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
11094         (BF_DELTA): New macro.
11095         (BF_VCALL_INDEX): Likewise.
11096         (BF_FN): Likewise.
11097         (THUNK_VCALL_OFFSET): Likewise.
11098         (make_thunk): Change prototype.
11099         * class.c (build_vtable_entry): Integrate
11100         build_vtable_entry_for_fn.  Handle vcall indices.
11101         (build_vtable_entry_for_fn): Remove.
11102         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
11103         BF_VCALL_INDEX, BF_FN.
11104         (modify_vtable_entry): Integrate common code from
11105         modify_one_vtable and dfs_fixup_vtable_deltas.
11106         (add_virtual_function): Set BF_VCALL_INDEX.
11107         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
11108         and BF_FN.
11109         (modify_one_vtable): Simplify.
11110         (dfs_fixup_vtable_deltas): Likewise.
11111         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
11112         * method.c (make_thunk): Handle vcall indices.
11114 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
11116         Compiler side new abi rtti (not enabled).
11117         * cp-tree.h (new_abi_rtti_p): New macro.
11118         (emit_support_tinfos): Prototype new function.
11119         (tinfo_decl_p): Likewise.
11120         (emit_tinfo_decl): Likwise.
11121         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
11122         macros.
11123         (doing_runtime): New local static.
11124         (init_rtti_processing): Add new-abi initializer.
11125         (get_tinfo_decl): Add new-abi logic.
11126         (tinfo_from_decl): Likewise.
11127         (build_dynamic_cast_1): Likewise.
11128         (qualifier_flags): New static function.
11129         (tinfo_base_init): Likewise.
11130         (generic_initializer): Likewise.
11131         (ptr_ref_initializer): Likewise.
11132         (ptmd_initializer): Likewise.
11133         (class_hint_flags): Likewise.
11134         (class_initializer): Likewise.
11135         (synthesize_tinfo_var): Likewise.
11136         (create_real_tinfo_var): Likewise.
11137         (create_pseudo_type_info): Likewise.
11138         (get_vmi_pseudo_type_info): Likewise.
11139         (create_tinfo_types): Likewise.
11140         (emit_support_tinfos): New global function.
11141         (tinfo_decl_p): New global predicate.
11142         (emit_tinfo_decl): New global function.
11143         * class.c (set_rtti_entry): Generalize for old and new rtti.
11144         (build_vtbl_initializer): Likewise.
11145         * decl2.c (finish_file): Likewise.
11147 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
11149         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
11150         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
11152 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
11154         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
11155         for scopes.
11157 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
11159         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
11161 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
11163         * optimize.c (calls_setjmp_r): Supply new argument
11164         to special_function_p.
11166 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11168         * call.c: PROTO -> PARAMS.
11169         * class.c: Likewise.
11170         * cp-tree.h: Likewise.
11171         * cvt.c: Likewise.
11172         * decl.c: Likewise.
11173         * decl.h: Likewise.
11174         * decl2.c: Likewise.
11175         * dump.c: Likewise.
11176         * errfn.c: Likewise.
11177         * error.c: Likewise.
11178         * except.c: Likewise.
11179         * expr.c: Likewise.
11180         * init.c: Likewise.
11181         * input.c: Likewise.
11182         * lex.c: Likewise.
11183         * lex.h: Likewise.
11184         * method.c: Likewise.
11185         * optimize.c: Likewise.
11186         * parse.y: Likewise.
11187         * pt.c: Likewise.
11188         * repo.c: Likewise.
11189         * rtti.c: Likewise.
11190         * search.c: Likewise.
11191         * semantics.c: Likewise.
11192         * spew.c: Likewise.
11193         * tree.c: Likewise.
11194         * typeck.c: Likewise.
11195         * typeck2.c: Likewise.
11196         * xref.c: Likewise.
11198 2000-01-25  Richard Henderson  <rth@cygnus.com>
11200         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
11202 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
11204         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
11205         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
11206         (struct vcall_offset_data_s): New type.
11207         (dfs_vcall_offset_queue_p): New function.
11208         (dfs_build_vcall_offset_vtbl_entries): Likewise.
11209         (build_vcall_offset_vtbl_entries): Likewise.
11210         (layout_vtable_decl): Likewise.
11211         (num_vfun_entries): Likewise.
11212         (num_extra_vtbl_entries): Add the entries for vcall offsets.
11213         (build_vtbl_initializer): Likewise.
11214         (dfs_finish_vtabls): Use layout_vtable_decl.
11215         (modify_one_vtables): Always duplicate vtables under the new ABI.
11216         (finish_struct_1): Use layout_vtable_decl.
11218 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11220         * decl.c (member_function_or_else): Change third arg from a format
11221         specifier to an `enum overload_flags'.  Callers changed.
11223 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
11225         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
11226         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
11227         build_const_cast, get_delta_difference, check_return_expr): Avoid
11228         ANSI string concatenation usage.
11230 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
11232         * class.c (layout_class_type): Put the fields required to make a
11233         class non-empty at the end, not the beginning, of the TYPE_FIELDs
11234         list.
11236 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
11238         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
11239         template.
11241         * decl2.c (mark_used): Do instantiate inlines that have been
11242         explicitly instantiated.
11244 2000-01-24  Richard Henderson  <rth@cygnus.com>
11246         * call.c (build_over_call): Use expand_tree_builtin.
11247         * typeck.c (build_function_call_real): Likewise.
11248         (build_binary_op_nodefault): Handle unordered compares.
11250 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
11252         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
11253         cp_tree_index values.
11254         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
11255         New global node #defines for them.
11256         * rtti.c (call_void_fn): Replace with ...
11257         (build_runtime_decl): ... new static function.
11258         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
11259         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
11260         (build_dynamic_cast_1): Always produce correctly typed result.
11261         Explicitly produce type_info addresses. Use dynamic_cast_node.
11262         * exception.cc (__throw_bad_cast): Return `void *'.
11263         (__throw_bad_typeid): Return `const type_info &'.
11265 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
11267         * cp-tree.h (get_vtable_decl): Prototype new function.
11268         * class.c (get_vtable_decl): New function. Broken out from ...
11269         (build_vtable): ... here. Use it.
11270         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
11271         by get_vtable_decl.
11273 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
11275         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
11276         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
11277         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
11278         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
11279         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
11280         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
11281         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
11282         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
11283         (CPTI_TINFO_VAR_ID): New enumeration.
11284         (__tp_desc_type_node, __access_mode_type_node,
11285         __bltn_desc_type_node, __user_desc_type_node,
11286         __class_desc_type_node, __ptr_desc_type_node,
11287         __attr_desc_type_node, __func_desc_type_node,
11288         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
11289         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
11290         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
11291         enum_desc_type_node, class_desc_type_node,
11292         si_class_desc_type_node, vmi_class_desc_type_node,
11293         ptmd_desc_type_node, base_desc_type_node): New #defines.
11294         (tinfo_fn_id, tinfo_fn_type): Rename to ...
11295         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
11296         (tinfo_var_id): New enumeration.
11297         (DECL_TINFO_FN_P): Augment comment.
11298         * decl.c (cp_global_trees): Adjust documentation.
11299         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
11300         tinfo_decl_type and tinfo_var_id.
11301         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
11302         (build_typeid): Remove unused variable.
11303         (get_tinfo_var): Use tinfo_var_id.
11304         (tinfo_name): New static function.
11305         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
11306         (tinfo_from_decl): Likewise.
11307         (get_base_offset): New static function, broken out of
11308         expand_class_desc.
11309         (expand_si_desc): Use tinfo_name.
11310         (expand_class_desc): Likewise. Lose local static variable.
11311         Use base_desc_type_node. Use get_base_offset.
11312         (expand_ptr_desc): Use tinfo_name.
11313         (expand_attr_desc): Likewise.
11314         (expand_generic_desc): Likewise.
11316         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
11317         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
11319 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
11321         * cp-tree.h (__eprintf): Remove declaration.
11322         * tree.c (__eprintf): Remove definition.
11324 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
11325             Mark Mitchell  <mark@codesourcery.com>
11327         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
11328         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
11330 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
11332         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
11334 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
11336         * cp-tree.h (register_dtor_fn): New function.
11337         * decl.c (destroy_local_static): Rename to ...
11338         (register_dtor_fn): ... this.  Give it external linkage.
11339         (expand_static_init): Use it.
11340         * decl2.c (do_static_initialization): Likewise, if using
11341         __cxa_atexit.
11342         (do_static_destruction): Check that __cxa_atexit is not in use.
11343         (finish_file): Don't call do_static_destruction if using
11344         __cxa_atexit.
11346         * typeck.c (convert_arguments): Restore two-message error
11347         reporting.
11349 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
11351         Remap dynamic cast hint values to be consistent across ABIs.
11352         * search.c (dynamic_cast_base_recurse): Remap generated value.
11353         (get_dynamic_cast_base_type): Adjust documentation.
11354         * tinfo.h (__user_type_info::dyncast): Likewise.
11355         (__user_type_info::find_public_subobj): Remap BOFF meaning.
11356         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
11357         (__class_type_info::do_dyncast): Likewise.
11358         (__class_type_info::do_find_public_subobj): Likewise.
11359         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
11361 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
11363         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
11365         * typeck2.c (incomplete_type_error): Restore previous
11366         cp_error and cp_error_at call sequence.
11368 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
11370         * class.c (dump_class_hierarchy): Make format agree with argument;
11371         cast pointer to unsigned long and print with %lx.
11373 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
11375         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
11377         * typeck.c (composite_pointer_type, common_type,
11378         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
11379         build_function_call_real, convert_arguments,
11380         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
11381         build_unary_op, mark_addressable, build_compound_expr,
11382         build_static_cast, build_reinterpret_cast, build_const_cast,
11383         build_c_cast, build_modify_expr, get_delta_difference,
11384         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
11385         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
11386         into a single one.
11387         * typeck2.c (readonly_error, abstract_virtuals_error,
11388         process_init_constructor, check_for_new_type): Likewise.
11390 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
11392         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
11393         VAR_DECLs.
11395 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
11397         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
11398         (build_x_typeid): Likewise.
11399         (get_tinfo_fn): Likewise.
11400         (get_tinfo_fn_unused): Rename to ...
11401         (get_tinfo_decl): ... here.
11402         * rtti.c (build_headof): Replace logic error with assertion.
11403         (get_tinfo_fn_dynamic): Rename to ...
11404         (get_tinfo_decl_dynamic): ... here. Make static. Use
11405         complete_type_or_else.
11406         (build_x_typeid): Move into ...
11407         (build_typeid): ... here. Adjust call to
11408         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
11409         throw_bad_typeid expression.
11410         (get_tinfo_fn_unused): Rename to ...
11411         (get_tinfo_decl): ... here. Adjust comment.
11412         (get_tinfo_fn): Delete.
11413         (tinfo_from_decl): New static function.
11414         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
11415         (get_typeid): Use complete_type_or_else.
11416         (build_dynamic_cast_1): Adjust calls to
11417         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
11418         * parse.y (primary): Adjust call to build_typeid.
11419         * except.c (build_eh_type_type_ref): Adjust call to
11420         get_tinfo_decl. Mark as used.
11421         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
11422         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
11423         * parse.c: Regenerated.
11425 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
11427         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
11428         calling convention.
11429         (resolves_to_fixed_type_p): Document calling convention.
11430         * rtti.c (build_x_typeid): Initialize NONNULL.
11432         * cp-tree.h (build_shared_int_cst): New function.
11433         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
11434         * class.c (modify_vtable_entry): Likewise.
11435         (add_virtual_function): Split out code to generated shared
11436         INTEGER_CSTs to build_share_int_cst.
11437         (modify_all_vtables): Handle all the overridden functions here.
11438         Add overridden functions from non-primary virtual bases to the
11439         primary vtable.
11440         (finish_struct_1): Adjust call to modify_all_vtables.  Add
11441         overridden functions from non-primary bases to the vtable.
11442         * tree.c (build_shared_int_cst): New function.
11444         * cp-tree.h (scratchalloc): Remove.
11445         (build_scratch_list): Likewise.
11446         * call.c (convert_class_to_reference): Replace build_scratch_list
11447         and build_expr_list with build_tree_list.
11448         (add_candidate): Replace scratchalloc with expralloc.  Note memory
11449         leak.
11450         (build_user_type_conversion_1):  Replace build_scratch_list
11451         and build_expr_list with build_tree_list.
11452         (build_new_op): Likewise.
11453         (build_op_delete_call): Likewise.
11454         (convert_like): Likewise.
11455         * cvt.c (ocp_convert): Likewise.
11456         * decl.c (start_decl): Likewise.
11457         (start_function): Likewise.
11458         (finish_destructor_body): Likewise.
11459         (maybe_build_cleanup_1): Likewise.
11460         * decl2.c (reparse_decl_as_expr): Likewise.
11461         * init.c (perform_member_init): Likewise.
11462         (expand_cleanup_for_base): Likewise.
11463         (build_builtin_delete_call): Likewise.
11464         (build_new_1): Likewise.
11465         (build_delete): Likewise.
11466         * method.c (do_build_assign_ref): Likewise.
11467         * parse.y (already_scoped_stmt): Likewise.
11468         (nontrivial_exprlist): Likewise.
11469         (net_initializer): Likewise.
11470         (initlist): Likewise.
11471         * parse.c: Regenerated.
11472         * rtti.c (build_x_typeid): Likewise.
11473         (build_dynamic_cast_1): Likewise.
11474         * typeck.c (build_x_compound_expr): Likewise.
11475         (build_static_cast): Likewise.
11476         (build_modify_expr): Likewise.
11478         * cp-tree.h (DECL_VINDEX): Add documentation.
11479         * class.c (build_vtable_entry): Likewise.
11480         (start_vtable): Add comment.
11481         (add_virtual_function): Replace pending_hard_virtuals with
11482         overridden_virtuals and pending_virtuals with new_virtuals.
11483         Replace redundant assignments with assertions.
11484         (check_for_override): Add comment.
11485         (check_bases_and_members): Replace pending_hard_virtuals with
11486         overridden_virtuals and pending_virtuals with new_virtuals.
11487         (create_vtbl_ptr): Likewise.
11488         (layout_class_type): Likewise.
11489         (finish_struct_1): Likewise.  Add comments.
11491 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
11493         * class.c (finish_struct_1): Replace redundant code with
11494         assertions.
11496         * cp-tree.h (flag_new_abi): Move.
11497         (flag_use_cxa_atexit): Likewise.
11498         (flag_honor_std): Likewise.
11499         (flag_rtti): Likewise.
11500         (vbase_offsets_in_vtable_p): Define.
11501         (vptrs_present_everywhere_p): Likewise.
11502         (TYPE_CONTAINS_VPTR_P): Likewise.
11503         (dfs_walk_real): Declare.
11504         * class.c (build_vbase_pointer_fields): Check
11505         vbase_offsets_in_vtable_p.
11506         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
11507         BINFO_VPTR_FIELD.
11508         (build_vbase_offset_vtbl_entries): Simplify.
11509         (build_vbase_offset_vtbl_entries): Adjust.
11510         (build_vbase_pointer): Add ability to look up vbase offsets in
11511         vtable.
11512         (start_vtable): New function.
11513         (add_virtual_function): Use it.
11514         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
11515         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
11516         (build_vtbl_initializer): Take the type of the complete object as
11517         input.  Use it to correctly calculate vbase offsets.
11518         (dfs_finish_vtbls): Pass the complete type to
11519         build_vtbl_initializer.
11520         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
11521         (create_vtable_ptr): Create a vtable even if there are no
11522         new virtual functions, under the new ABI.
11523         (finish_struct_1): Likewise.
11524         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
11525         * decl.c (exapnd_static_init): Remove call to
11526         preserve_initializer.
11527         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
11528         vtables.
11529         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
11530         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
11531         (construct_virtual_bases): Don't initialize virtual base pointers
11532         under the new ABI.
11533         (build_aggr_init): Clean up comment.
11534         (expand_aggr_init_1): Likewise.
11535         * rtti.c (expand_class_desc): Store the virtual function table
11536         index where the vbase offset lives in the offset field.
11537         * search.c (dfs_walk_real): Make it global.
11538         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
11539         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
11541         * tinfo.h (USItype): Make it signed under the new ABI.
11542         * tinfo.cc (convert_to_base): New function.  Encapsulate base
11543         conversion logic here.
11544         (__class_type_info::do_upcast): Use it.
11545         (__class_type_info::do_dyncast): Likewise.
11546         (__class_type_info::do_find_public_subobj): Likewise.
11548         * init.c (construct_virtual_bases): Don't look up the addresses of
11549         virtual bases at run-time.
11551         * class.c (build_vbase_pointer): Relocate.
11552         (build_vbase_pointer_fields): Likewise.
11553         (dfs_build_vbase_offset_vtbl_entries): Likewise.
11554         (build_vbase_offset_vtbl_entries): Likewise.
11556         * decl.c (init_decl_processing): Complain if -fnew-abi
11557         -fno-vtable-thunks is used.
11559         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
11560         flag_new_abi.
11562 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
11564         * cp-tree.h (num_extra_vtbl_entries): New function.
11565         (size_extra_vtbl_entries): Likewise.
11566         (dfs_vtable_path_unmark): Likewise.
11567         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
11568         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
11569         * class.c (num_extra_vtbl_entries): New function.
11570         (size_extra_vtbl_entries): Likewise.
11571         (dfs_build_vbase_offset_vtbl_entries): New function.
11572         (build_vbase_offset_vtbl_entries): Likewise.
11573         (build_vtbl_initializer): Use it.
11574         (finish_struct_1): Adjust vtable sizes (using
11575         num_extra_vtbl_entries).
11576         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
11577         THUNK_DECL is non-NULL before expanding it.
11578         * init.c (expand_virtual_init): Adjust the vtable pointer by
11579         size_extra_vtbl_entries before storing it.
11580         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
11581         Handle TREE_LIST parameters here, not in the dfs_* functions.
11582         (dfs_unmarked_real_bases_queue_p): Adjust.
11583         (dfs_marked_real_bases_queue_p): Likewise.
11584         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
11585         (dfs_vtable_path_marked_real_bases_queue_p): New function.
11586         (dfs_vtable_path_unmark): Likewise.
11588 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
11590         * optimize.c (copy_body_r): Clear the operand three of a
11591         TARGET_EXPR when copying it.
11593 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11595         * method.c (build_decl_overload_real): Check whether we are in ::
11596         before returning __builtin_new/delete.
11598 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
11600         * pt.c (tsubst_friend_function): Improve comment.
11601         (instantiate_decl): Avoid crashing when a "nested" function is
11602         instantiated from the top level.
11604         * dump.c (dqeueue_and_dump): Dump
11605         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
11607 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11609         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
11611 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
11613         * g++spec.c (lang_specific_driver): Add -fnew-abi if
11614         ENABLE_NEW_GXX_ABI defined.
11615         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
11616         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
11617         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
11619 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
11621         * decl.c (start_cleanup_fn): Call pushdecl.
11623         * call.c (convert_class_to_reference): Fix typos.
11624         (build_conditional_expr): Handle errors gracefully.
11625         * class.c (push_nested_class): Likewise.
11626         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
11627         (DECL_THIS_EXTERN): Use it.
11628         (DECL_THIS_STATIC): Likewise.
11629         * cvt.c (convert_to_void): Handle errors gracefully.
11630         (build_expr_type_conversion): Likewise.
11631         * decl.c (maybe_push_decl): Likewise.
11632         (start_decl_1): Likewise.
11633         (require_complete_types_for_parms): Likewise.
11634         * parse.y (structsp): Likewise.
11635         (base_class): Likewise.
11636         * parse.c: Regenerated.
11637         * pt.c (finish_member_template_decl): Likewise.
11638         * typeck.c (decay_conversion): Likewise.
11640         * cp-tree.h (dfs_skip_vbases): New function.
11641         (find_vbase_instance): Likewise.
11642         * class.c (determine_primary_base): Allow a nearly empty base to
11643         serve as a primary base class under the new ABI.
11644         (get_class_offset_1): Rename to ...
11645         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
11646         messages here.
11647         (get_class_offset): Use it.  Issue error messages here.
11648         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
11649         find the right copies of virtual bases.
11650         (fixup_vtable_deltas1): Rename to ...
11651         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
11652         bases as primary bases.
11653         (fixup_vtable_deltas): Remove.
11654         (override_one_vtable): Handle virtual bases as primary bases.
11655         (merge_overrides): Likewise.
11656         (finish_struct_1): Likewise.
11657         (dump_class_hierarchy): Dump primary-ness of bases as well.
11658         * search.c (mark_primary_bases): Use a pre-order traversal to
11659         handle primary virtual bases.
11660         (dfs_skip_vbases): New fiunction.
11661         (expand_upcast_fixups): Adjust to handle primary virtual bases.
11662         (fixup_virtual_upcast_offsets): Likewise.
11663         (fixup_all_virtual_upcast_offsets): Likewise.
11664         (dfs_find_vbase_instances): New function.
11665         (find_vbase_instance): Likewise.
11667 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
11669         * lex.c (DIR_SEPARATOR): Delete macro.
11671 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
11673        * decl2.c (lang_decode_option): Handle automatic line wrapping
11674        option.
11676 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
11678         * friend.c (do_friend): Don't resolve scopes when processing
11679         template declarations, even if the qualifying scope doesn't
11680         involve template parameters.
11682 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
11684         * class.c (dfs_modify_vtables_queue_p): Remove.
11685         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
11686         and dfs_marked_real_bases_queue_p instead of
11687         dfs_modify_vtables_queue_p.
11689         * class.c (build_vbase_path): Simplify.
11690         (dfs_propagate_binfo_offsets): New function.
11691         (propagate_binfo_offsets): Use it.
11692         (remove_base_field): Simplify.
11693         (dfs_set_offset_for_vbases): Remove.
11694         (dfs_set_offset_for_shared_vbases): New function.
11695         (dfs_set_offset_for_unshared_vbases): Likewise.
11696         (layout_virtual_bases): Use them.
11697         (layout_basetypes): Don't call propagate_binfo_offsets.
11698         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
11699         for the vbases.
11701         * class.c (build_base_field): New function, split out from ...
11702         (build_base_fields): ... here.  Use it.  Allocate primary bases
11703         first, under the new ABI.
11704         (get_vtable_entry): Remove.
11705         (remove_base_field): New function, split out from ...
11706         (remove_base_fields): ... here.  Adjust since primary bases come
11707         first under the new ABI.
11709         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
11710         (initialize_vtbl_ptrs): New function.
11711         (expand_indirect_vtbls_init): Change prototype.
11712         (convert_pointer_to_vbase): Declare.
11713         * init.c (expand_direct_vtbls_init): Remove.
11714         (dfs_initialize_vtbl_ptrs): New function.
11715         (initialize_vtbl_ptrs): Likewise.
11716         (emit_base_init): Use initialize_vtbl_ptrs.
11717         * search.c (convert_pointer_to_vbase): Make it global.
11718         (expand_indirect_vtbls_init): Remove vtable initialization code.
11719         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
11721         * class.c (dfs_finish_vtbls): New function.
11722         (finish_vtbls): Use it.
11723         (dump_class_hierarchy): New function.
11725         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
11726         (BINFO_VBASE_PRIMARY_P): New macro.
11727         (BINFO_VIRTUALS): Add to documentation.
11728         (SET_BINFO_PRIMARY_MARKED_P): Remove.
11729         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
11730         (dfs_mark_primary_bases_queue_p): Likewise.
11731         (dfs_unmarked_real_bases_queue_p): New function.
11732         (dfs_marked_real_bases_queue_p): Likewise.
11733         * search.c (dfs_mark_primary_bases): Adjust.
11734         (mark_primary_bases): Likewise.
11735         (get_shared_vbase_if_not_primary): New function.
11736         (dfs_unmarked_real_bases_queue_p): Likewise.
11737         (dfs_marked_real_bases_queue_p): Likewise.
11738         (dfs_get_pure_virtuals): Simplify.
11739         (get_pure_virtuals): Likewise.
11741 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11743         * lex.c: Include tm_p.h.
11745 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
11747         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
11749 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
11751         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
11752         * pt.c (instantiate_decl): Defer comdat templates that might not be
11753         needed.
11755         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
11756         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
11757         (finish_file): Likewise.
11759         * decl2.c (import_export_class): Undo 12/14 change.
11761         * error.c (dump_decl): operator new, not operatornew.
11763         * class.c (field_decl_cmp): A nontype is "greater" than a type.
11764         * search.c (lookup_field_1): Look for the last field with the
11765         desired name.
11767 2000-01-05  Nathan Sidwell  <nathan@acm.org>
11769         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
11770         FUNCTION_DECL.
11772 2000-01-05  Nathan Sidwell  <nathan@acm.org>
11774         * typeck.c (build_static_cast): Don't strip target qualifiers
11775         when casting from a class.
11777 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11779         * class.c (warn_hidden): Initialize variable `fndecl'.
11781 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
11783         * decl.c (flag_isoc9x): New variable to be able to use code in
11784         c-common.c.  For now always zero.
11786 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
11788         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
11789         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
11790         or unshare_base_binfos for virtual bases here.
11791         * search.c (dfs_get_vbase_types): Do it here.
11792         (get_vbase_types): Adjust.
11794 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
11796         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
11797         (BINFO_PRIMARY_MARKED_P): Use flag 5.
11798         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
11799         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
11800         (unmark_primary_bases): Remove declaration.
11801         (unmarkedp): Declare.
11802         (dfs_vbase_unmark): Likewise.
11803         * class.c (determine_primary_base): Return immediately if there
11804         are no base classes.  Call mark_primary_bases here.
11805         (modify_all_direct_vtables): Remove.
11806         (modify_all_indirect_vtables): Remove.
11807         (dfs_modify_vtables_queue_p): New function.
11808         (dfs_modify_vtables): New function.
11809         (modify_all_vtables): Use them.
11810         (build_base_fields): Build FIELD_DECLs for primary virtual base
11811         classes.
11812         (create_vtable_ptr): Don't call determine_primary_base here.
11813         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
11814         (dfs_set_offset_for_vbases): ... this.
11815         (layout_virtual_bases): Use it.
11816         (layout_class_type): Call determine_primary_base here.
11817         * search.c (unmarkedp): Make it global.
11818         (shared_marked_p): Simplify.
11819         (shared_unmarked_p): Likewise.
11820         (dfs_primary_bases_queue_p): Remove.
11821         (dfs_unmark_primary_bases): Likewise.
11822         (unmark_primary_bases): Likewise.
11823         (mark_primary_bases): Simplify.
11824         (get_pure_virtuals): Don't call mark_primary_bases here.
11825         (dfs_vbase_unmark): New function.
11826         (get_vbase_types): Simplify.
11828         * class.c (struct base_info): Remove.
11829         (determine_primary_base): Take has_virtual_p rather than a
11830         base_info as input.  Don't calculate max_has_virtual.
11831         (finish_struct_bits): Remove max_has_virtual argument.
11832         (create_vtable_ptr): Remove max_has_virtual_p argument.
11833         (layout_virtual_bases): Remove max argument.
11834         (layout_basetypes): Likewise.
11835         (layout_class_type): Remove max_has_virtual_p argument.
11836         (finish_struct_1): Remove max_has_virtual.
11838         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
11839         (layout_basetypes): Remove.
11840         * class.c (propagate_binfo_offsets): Moved here from tree.c.
11841         Update to handle primary virtual bases.
11842         (remove_base_fields): New function, split out from
11843         layout_basetypes.
11844         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
11845         (layout_virtual_bases): New function, split out from
11846         layout_basetypes.  Update to handle primary virtual bases.
11847         (layout_basetypes): Moved here from tree.c.  Use
11848         remove_base_fields and layout_virtual_bases.
11849         * search.c (dfs_mark_primary_bases_queue_p): New function.
11850         (mark_primary_bases): Use it.
11851         * tree.c (CEIL): Remove.
11852         (propagate_binfo_offsets): Remove.
11853         (layout_basetypes): Remove.
11855 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
11857         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
11858         (BINFO_PRIMARY_MARKED_P): New macro.
11859         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
11860         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
11861         (mark_primary_bases): New function.
11862         (unmark_primary_bases): Likewise.
11863         * search.c (get_abstract_virtuals_1): Remove.
11864         (dfs_mark_primary_bases): New function.
11865         (mark_primary_bases): Likewise.
11866         (dfs_unmark_primary_bases): Likewise.
11867         (unmark_primary_bases): Likewise.
11868         (dfs_get_pure_virtuals): Likewise.
11870 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
11872         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
11873         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
11874         (modify_one_vtable): Adjust.
11875         (fixup_vtable_deltas1): Likewise.
11876         (override_one_vtable): Likewise.
11877         * search.c (get_abstract_virtuals_1): Likewise.
11878         (get_pure_virtuals): Likewise.
11879         (expand_upcast_fixups): Likewise.
11880         * tree.c (debug_binfo): Likewise.
11882         * class.c (build_vtable): Don't return a value.  Don't rebuild
11883         vtables for bases that have already been handled.
11884         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
11885         already been handled.
11886         (modify_one_vtable): Adjust accordingly.
11887         (fixup_vtable_deltas1): Likewise.
11888         (finish_struct_1): Likewise.
11890 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11892         * call.c (build_new_method_call): Also check destructors.