OSDN Git Service

PR c++/11554
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2003-12-21  Mark Mitchell  <mark@codesourcery.com>
2
3         PR c++/11554
4         * init.c (sort_mem_initializers): Add warning.
5
6 2003-12-21  Kazu Hirata  <kazu@cs.umass.edu>
7
8         * call.c: Fix comment formatting.
9         * class.c: Likewise.
10         * cp-tree.h: Likewise.
11         * cvt.c: Likewise.
12         * cxx-pretty-print.c: Likewise.
13         * decl.c: Likewise.
14         * decl2.c: Likewise.
15         * error.c: Likewise.
16         * except.c: Likewise.
17         * init.c: Likewise.
18         * name-lookup.c: Likewise.
19         * parser.c: Likewise.
20         * pt.c: Likewise.
21         * rtti.c: Likewise.
22         * semantics.c: Likewise.
23         * typeck.c: Likewise.
24         * typeck2.c: Likewise.
25
26 2003-12-19  Kazu Hirata  <kazu@cs.umass.edu>
27
28         * cvt.c: Remove uses of "register" specifier in
29         declarations of arguments and local variables.
30         * decl.c: Likewise.
31         * decl2.c: Likewise.
32         * expr.c: Likewise.
33         * friend.c: Likewise.
34         * lex.c: Likewise.
35         * name-lookup.c: Likewise.
36         * repo.c: Likewise.
37         * search.c: Likewise.
38         * tree.c: Likewise.
39         * typeck.c: Likewise.
40         * typeck2.c: Likewise.
41
42 2003-12-19  Mark Mitchell  <mark@codesourcery.com>
43
44         PR c++/12795
45         * name-lookup.c (pushdecl): Do not treated any functions as being
46         "nested" in C++.
47
48 2003-12-19  Jason Merrill  <jason@redhat.com>
49
50         PR c++/13371
51         * typeck.c (build_modify_expr): Stabilize lhs if we're narrowing.
52         * cvt.c (convert_to_void): Don't warn about the RHS of a comma
53         being useless if TREE_NO_UNUSED_WARNING is set.
54
55 2003-12-18  Richard Henderson  <rth@redhat.com>
56
57         * cp-tree.h (struct lang_type_header): Remove __extension__.
58
59 2003-12-18  Jason Merrill  <jason@redhat.com>
60
61         PR c++/12253
62         * init.c (build_vec_init): Initialization of an element from
63         an initializer list is also a full-expression.
64
65         * parser.c, pt.c, semantics.c: Rename constant_expression_p
66         to integral_constant_expression_p.
67
68 2003-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
69
70         PR c++/13262
71         * pt.c (instantiate_decl): Wrap push_nested_class and
72         pop_nested_class around cp_finish_decl call for static member
73         variable.
74
75 2003-12-18  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
76
77         PR c++/9154
78         * parser.c (cp_parser_template_argument): A type-id followed by '>>'
79         is just an user typo, and should be accepted as last resort if any
80         other parsing fails.
81         (cp_parser_enclosed_template_argument_list): If the argument list is
82         parsed correctly, but the next token is '>>', emit a diagnostic.
83         (cp_parser_next_token_ends_template_argument): Accept '>>' as 
84         delimiter of template argument, it will be later detected as a typo.
85
86 2003-12-17  Kelley Cook  <kcook@gcc.gnu.org>
87
88         * Make-lang.in: Replace cp/g++.1 with $(docobjdir)/g++.1.
89
90 2003-12-17  Mark Mitchell  <mark@codesourcery.com>
91
92         PR c++/10603
93         PR c++/12827
94         * parser.c (cp_parser_error): Help c_parse_error print good
95         messages if the next token is a keyword.
96         (cp_parser_parameter_declaration_list): When resynchronizing after
97         a bad parameter declaration, stop if a comma is found.
98         (cp_parser_parameter_declaration): Avoid backtracking.
99
100 2003-12-16  Mark Mitchell  <mark@codesourcery.com>
101
102         PR c++/12696
103         * decl.c (reshape_init): Recover quickly from errors.
104
105 2003-12-16  Nathan Sidwell  <nathan@codesourcery.com>
106
107         PR c++/9043
108         C++ ABI change: Mangling array indices in templates.
109         * decl.c (compute_array_index_type): Reorganize for earlier
110         template errors. Use value_dependent_expression_p for abi-2.
111         * mangle.c (write_array_type): Check broken mangling for
112         expression indices on abi-1
113
114 2003-12-16  Mark Mitchell  <mark@codesourcery.com>
115
116         PR c++/12696
117         * decl.c (reshape_init): Recover quickly from errors.
118
119         PR c++/13275
120         * lex.c (reswords): Add "__offsetof" and "__offsetof__".
121         * parser.c (cp_parser): Add in_offsetof_p.
122         (cp_parser_new): Initialize it.
123         (cp_parser_primary_expression): Handle __offsetof__ (...).
124         (cp_parser_postfix_expression): Allow casts to pointer type and
125         uses of "->" in a constant expression if implementing offsetof.
126         (cp_parser_unary_expression): Allow the use of "&" in a constant
127         expression if implementing offsetof.
128
129 2003-12-16  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
130
131         PR c++/2294
132         * name-lookup.c (push_overloaded_decl): always construct an OVERLOAD
133         if the declaration comes from an using declaration.
134
135 2003-12-16  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
136
137         * semantics.c (finish_id_expression): Refactor the code to handle
138         template parameters, and emit a more informative error message
139         when they are used within an integral constant expression.
140
141 2003-12-16  Nathan Sidwell  <nathan@codesourcery.com>
142
143         PR c++/13387
144         * class.c (finish_struct_1): Compute mode and alias set for
145         CLASSTYPE_AS_BASE.
146         * call.c (build_over_call): Use CLASSTYPE_AS_BASE for trivial
147         assignment of a class, as necessary.
148         * cp-lang.c (cxx_get_alias_set): The alias set as a base is the
149         same as for the complete type.
150
151         PR c++/13242
152         C++ ABI change. Mangling template parameters of reference type
153         * mangle.c (write_template_args): Remove unreachable code.
154         (write_template_arg): Look through an argument of reference type.
155
156 2003-12-16  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
157
158         PR c++/2294
159         * name-lookup.c (push_overloaded_decl): always construct an OVERLOAD
160         if the declaration comes from an using declaration.
161
162 2003-12-15  Mark Mitchell  <mark@codesourcery.com>
163
164         PR c++/10926
165         * decl2.c (grokfield): Robustify.
166
167         PR c++/11116
168         * parser.c (cp_parser_throw_expression): Determine whether or not
169         an assignment-expression is present by doing one-token lookahead.
170
171         PR c++/13269
172         * parser.c (cp_parser_function_definition_after_declarator): Stop
173         scanning tokens when reaching EOF.
174
175         PR c++/12989
176         * typeck.c (cxx_sizeof_or_alignof_expr): Robustify.
177
178         PR c++/13310
179         * pt.c (dependent_template_p): Handle OVERLOADs.
180
181 2003-12-15  Mark Mitchell  <mark@codesourcery.com>
182
183         PR c++/13243
184         PR c++/12573
185         * parser.c (cp_parser_postfix_expression): Tighten handling of
186         integral constant expressions.
187         (cp_parser_unary_expression): Likewise.
188         * pt.c (value_dependent_expression_p): Remove handling for
189         COMPONENT_REFs.
190
191 2003-12-15  Nathan Sidwell  <nathan@codesourcery.com>
192
193         * class.c (add_method): Disallow destructor for java classes.
194         * decl.c (xref_basetypes): Check java class inheritance.
195         * decl2.c (check_java_method): Skip artificial params.
196
197         PR c++/13241
198         C++ ABI change. Mangling of symbols in expressions.
199         * mangle.c (write_mangled_name): Add top_level flag. Rework for
200         nested and unnested mangling. Deal with abi version 1 and version
201         2 differences.
202         (write_expression): Adjust write_mangled_name call.
203         (mangle_decl_string): Use write_mangled_name for all non-type decls.
204
205 2003-12-14  Mark Mitchell  <mark@codesourcery.com>
206
207         PR c++/10779
208         PR c++/12160
209         * parser.c (struct cp_parser): Add in_template_argument_list_p.
210         (cp_parser_error): Use c_parse_error.
211         (cp_parser_name_lookup_error): New function.
212         (cp_parser_new): Initialize it.
213         (cp_parser_declarator): Add parenthesized_p parameter.
214         (cp_parser_nested_name_specifier_opt): Use
215         cp_parser_name_lookup_error.
216         (cp_parser_parenthesized_expression_list): Improve comments.
217         (cp_parser_condition): Adjust call to cp_parser_declarator.
218         (cp_parser_template_parameter): Adjust call to
219         cp_parser_parameter_declaration.
220         (cp_parser_template_argument_list): Set
221         in_template_argument_list_p.
222         (cp_parser_explicit_instantiation): Adjust call to
223         cp_parser_declarator.
224         (cp_parser_simple_type_specifier): Remove unncessary code.
225         (cp_parser_using_declaration): Use cp_parser_name_lookup_error.
226         (cp_parser_init_declarator): Handle member function definitions.
227         (cp_parser_direct_declarator): Adjust call to
228         cp_parser_declarator.
229         (cp_parser_type_id): Adjust call to cp_parser_declarator.
230         (cp_parser_parameter_declaration_list): Avoid backtracking where
231         possible.
232         (cp_parser_parameter_declaration): Add parenthesized_p parameter.
233         (cp_parser_function_definition): Remove.
234         (cp_parser_member_declaration): Do not backtrack to look for
235         function definitions.
236         (cp_parser_exception_declaration): Adjust call to
237         cp_parser_declarator.
238         (cp_parser_single_declaration): Handle function definitions via
239         cp_parser_init_declarator.
240         (cp_parser_save_member_function_body): New function.
241
242 2003-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
243
244         PR c++/13106
245         * decl.c (finish_function): Check if return type is dependent before
246         issuing no return statement warning.
247
248 2003-12-12  Nathan Sidwell  <nathan@codesourcery.com>
249
250         PR c++/13118
251         * cp-tree.h (lang_decl_u): Add thunk_alias member.
252         (THUNK_VIRTUAL_OFFSET): Must be a FUNCTION_DECL.
253         (THUNK_ALIAS_P): Remove.
254         (THUNK_ALIAS): Adjust.
255         * class.c (update_vtable_entry_for_fn): Get the vbase within the
256         overriding function's return type.
257         (dump_thunk): Adjust THUNK_ALIAS printing.
258         (build_vtbl_initializer): Adjust THUNK_ALIAS use.
259         * method.c (make_thunk): Revert 12881 test change. Clear
260         THUNK_ALIAS.
261         (finish_thunk): Adjust THUNK_ALIAS setting.
262         (use_thunk): Adjust THUNK_ALIAS use.
263         * semantics.c (emit_associated_thunks): Likewise.
264
265         PR c++/13114, c++/13115
266         * class.c (layout_empty_base): Propagate the move of an empty base
267         to offset zero.
268
269         PR c++/12881
270         * method.c (make_thunk): Deal with thunk aliases when searching
271         for a thunk. Robustify assertion.
272
273 2003-12-11  Nathan Sidwell  <nathan@codesourcery.com>
274
275         * mangle.c (conv_type_names): Holds IDENTIFIER_NODEs only.
276         (hash_type): Use TYPE_UID of the identifier's type.
277         (compare_type): Adjust.
278         (mangle_conv_op_name_for_type): Store identifier nodes only, use
279         TYPE_UID has hash value.
280
281 2003-12-10  Mark Mitchell  <mark@codesourcery.com>
282
283         * cp-tree.h (DECL_CONV_FN_P): Check that DECL_NAME is non-NULL.
284
285 2003-12-08  Matt Austern  <austern@apple.com>
286
287         PR c/13134
288         * decl.c (duplicate_decls): Copy visibility flag when appropriate.
289         
290 2003-12-09  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
291
292         * init.c (build_new_1): Deal with an OVERLOAD set when
293         looking up for _Jv_AllocObject.
294         * except.c (build_throw): Likewise for _Jv_Throw.
295
296 2003-12-08  Jason Merrill  <jason@redhat.com>
297
298         PR c++/11971
299         * tree.c (build_local_temp): Split out from build_cplus_new.
300         (force_target_expr): New fn.
301         * call.c (call_builtin_trap): Call it.  Take a type parm.
302         (convert_arg_to_ellipsis): Pass it.
303         (build_x_va_arg): Use call_builtin_trap.
304
305         PR c++/11929
306         * call.c (magic_varargs_p): New fn.
307         (build_over_call): Do no ellipsis conversions for arguments to 
308         functions with magic varargs.
309
310         * name-lookup.c, init.c, except.c: Revert Giovanni's patch from
311         yesterday.
312
313         Give the anonymous namespace a null DECL_NAME.
314         * cp-tree.h: Don't declare anonymous_namespace_name.
315         * decl.c: Don't define it.
316         * dump.c (cp_dump_tree): Don't check for it.
317         * cxx-pretty-print.c (pp_cxx_original_namespace_definition): Likewise.
318         * error.c (dump_decl): Likewise.
319         * name-lookup.c: Define it here.
320         (push_namespace): Put it in DECL_ASSEMBLER_NAME instead.
321         * mangle.c (write_unqualified_name): Adjust.
322
323 2003-12-07  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
324
325         PR c++/2294
326         * name-lookup.c (push_overloaded_decl): Always construct an
327         OVERLOAD unless the declaration is a built-in.
328         (set_namespace_binding): While binding OVERLOADs with only one
329         declaration, we still need to call supplement_binding.
330         * init.c (build_new_1): Deal with an OVERLOAD set when
331         looking up for _Jv_AllocObject.
332         * except.c (build_throw): Likewise for _Jv_Throw.
333
334 2003-12-06  Mark Mitchell  <mark@codesourcery.com>
335
336         PR c++/13323
337         * class.c (same_signature_p): Handle conversion operators
338         correctly.
339         (check_for_override): Likewise.
340
341 2003-12-06  Kelley Cook  <kcook@gcc.gnu.org>
342
343         * Make-lang.in (GXX_CROSS_NAME, CXX_CROSS_NAME): Delete.
344         (c++.install_common, cp/g++.1, c++.install-man): Adjust for above.
345         (c++.uninstall): Likewise.
346
347 2003-12-05  Danny Smith <dannysmith@gcc.gnu.org>
348             Mark Mitchell  <mark@codesourcery.com>
349
350         PR c++/13305
351         * parser.c (cp_parser_elaborated_type_specifier): Accept
352         attributes.
353         
354 2003-12-05  Mark Mitchell  <mark@codesourcery.com>
355
356         PR c++/13314
357         * parser.c (cp_parser_class_specifier): Match push_scope/pop_scope
358         calls.
359         (cp_parser_class_head): Likewise.
360
361 2003-12-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
362
363         PR c++/13166
364         * parser.c (cp_parser_late_parsing_default_args): Make sure the
365         context is a class before calling push_nested_class and
366         pop_nested_class.
367
368 2003-12-03  James E Wilson  <wilson@specifixinc.com>
369
370         * g++spec.c (lang_specific_driver): Delete USE_LIBUNWIND_EXCEPTIONS
371         support.
372
373 2003-12-03  Mark Mitchell  <mark@codesourcery.com>
374
375         PR c++/9127
376         * cp-tree.h (at_namespace_scope_p): New function.
377         * parser.c (cp_parser_class_head): Handle invalid explicit
378         specializations.
379         * search.c (at_namespace_scope_p): New function.
380
381         PR c++/13179
382         * semantics.c (finish_handler_parms): Do not call eh_type_info for
383         types used in templates.
384
385         PR c++/10771
386         * parser.c (cp_parser_check_for_invalid_template_id): New
387         function.
388         (cp_parser_simple_type_specifier): Use it.
389         (cp_parser_elaborated_type_specifier): Likewise.
390         (cp_parser_class_head): Likewise.
391
392 2003-12-02  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
393
394         PR c++/10126
395         * pt.c (convert_nontype_argument): Handle default conversions
396         while converting a pointer to member function.
397
398 2003-12-02  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
399
400         PR c++/12573
401         * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
402         looking into them recursively.
403
404 2003-12-02  Richard Henderson  <rth@redhat.com>
405
406         * name-lookup.h (struct cp_binding_level): Use ENUM_BITFIELD.
407         * parser.c (struct cp_token): Likewise.   
408         (struct cp_parser_token_tree_map_node): Likewise.
409         * lex.c (struct resword): Move const after ENUM_BITFIELD.
410
411 2003-11-30  Mark Mitchell  <mark@codesourcery.com>
412
413         PR c++/9849
414         * parser.c (cp_lexer_prev_token): New function.
415         (cp_parser_skip_to_closing_parenthesis): Add consume_paren
416         parameter.
417         (cp_parser_nested_name_specifier_opt): Add is_declaration
418         parameter.
419         (cp_parser_nested_name_specifier): Likewise.
420         (cp_parser_class_or_namespace_name): Likewise.
421         (cp_parser_class_name): Likewise.
422         (cp_parser_template_id): Likewise.
423         (cp_parser_template_name): Likewise.
424         (cp_parser_id_expression): Adjust calls to
425         cp_parser_nested_name_specifier_op, cp_parser_template_id,
426         cp_parser_class_name.
427         (cp_parser_unqualified_id): Likewise.
428         (cp_parser_postfix_expression): Likewise.
429         (cp_parser_pseudo_destructor_name): Likewise.
430         (cp_parser_cast_expression): Likewise.
431         (cp_parser_mem_initializer_id): Likewise.
432         (cp_parser_simple_type_specifier): Likewise.
433         (cp_parser_type_name): Likewise.
434         (cp_parser_elaborated_type_specifier): Likewise.
435         (cp_parser_qualified_namespace_specifier): Likewise.
436         (cp_parser_using_declaration): Likewise.
437         (cp_parser_using_directive): Likewise.
438         (cp_parser_ptr_operator): Likewise.
439         (cp_parser_declarator_id): Likewise.
440         (cp_parser_class_head): Likewise.
441         (cp_parser_base_specifier): Likewise.
442         (cp_parser_constructor_declarator_p): Likewise.
443         (cp_parser_direct_declarator): Fix typo in comment.
444         (cp_parser_parenthesized_expression_list): Adjust call to
445         cp_parser_skip_to_closing_parenthesis.
446         (cp_parser_selection_statement): Likewise.
447
448 2003-11-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
449
450         PR c++/12924
451         * typeck.c (finish_class_member_access_expr): Handle TEMPLATE_ID_EXPR
452         with OVERLOAD and DECL nodes as the first operand.
453
454 2003-11-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
455
456         * pt.c (tsubst) <ARRAY_REF>: Remove erroneous argument to build_nt.
457
458 2003-11-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
459
460         PR c++/5369
461         * friend.c (is_friend): Handle member function of a class
462         template as template friend.
463         (do_friend): Likewise.
464         * decl2.c (check_classfn): Add template_header_p parameter.
465         * decl.c (start_decl): Adjust check_classfn call.
466         (grokfndecl): Likewise.
467         * pt.c (is_specialization_of_friend): New function.
468         (uses_template_parms_level): Likewise.
469         (push_template_decl_real): Use uses_template_parms_level.
470         (tsubst_friend_function): Adjust check_classfn call.
471         * cp-tree.h (check_classfn): Adjust declaration.
472         (uses_template_parms_level): Add declaration.
473         (is_specialization_of_friend): Likewise.
474
475 2003-11-21  Mark Mitchell  <mark@codesourcery.com>
476
477         PR c++/12515
478         * pt.c (build_non_dependent_expr): Handle GNU extension to ?:
479         operator.
480
481 2003-11-21  Jan Hubicka  <jh@suse.cz>
482
483         * parser.c (cp_parser_postfix_expression): Initialize 's' to
484         NULL_TREE.
485
486 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
487
488         * Make-lang.in (c++.extraclean): Delete.
489
490 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
491
492         * Make-lang.in (check-g++, lang_checks): Add.
493
494 2003-11-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
495
496         PR c++/12932
497         * class.c (currently_open_derived_class): Check if
498         current_class_type is NULL_TREE.
499         * semantics.c (finish_call_expr): Check if
500         currently_open_derived_class returns NULL_TREE.
501         * cp-tree.h (DERIVED_FROM_P): Add parenthesis around PARENT
502         parameter.
503
504 2003-11-17  Jason Merrill  <jason@redhat.com>
505
506         * init.c (build_new_1): Preevaluate placement args.
507         * call.c (build_op_delete_call): Don't expose placement args to
508         overload resolution.
509
510 2003-11-16  Jason Merrill  <jason@redhat.com>
511
512         * Make-lang.in (c++.tags): Create TAGS.sub files in each directory
513         and TAGS files that include them for each front end.
514
515 2003-11-15  Bernardo Innocenti  <bernie@develer.com>
516
517         PR c++/2294
518         * name-lookup.c: Revert previous patch for PR c++/2294 to prevent
519         build failure on libjava.
520
521 2003-11-14  Giovanni Bajo  <giovannibajo@libero.it>
522
523         PR c++/2294
524         * name-lookup.c (push_overloaded_decl): Always construct an OVERLOAD
525         unless the declaration is a built-in.
526         (set_namespace_binding): While binding OVERLOADs with only one
527         declaration, we still need to call supplement_binding.
528
529 2003-11-14  Mark Mitchell  <mark@codesourcery.com>
530
531         PR c++/12762
532         * parser.c (cp_parser_enclosed_template_argument_list): New
533         function.
534         (cp_parser_template_id): Use it.
535         (cp_parser_simple_type_specifier): Recognize invalid template
536         syntax.
537
538 2003-11-14  Giovanni Bajo  <giovannibajo@libero.it>
539
540         PR c++/2094
541         * pt.c (unify): Add support for PTRMEM_CST and
542         FIELD_DECL unification.
543
544 2003-11-13  Richard Earnshaw  <rearnsha@arm.com>
545
546         * decl.c (grokfndecl): Change OK to type tree.
547
548 2003-11-12  Mark Mitchell  <mark@codesourcery.com>
549
550         * tree.c (build_target_expr_with_type): Treate VA_ARG_EXPR like
551         CONSTRUCTOR.
552
553         * decl.c (cp_make_fname_decl): When creating a top-level
554         __FUNCTION__-like symbol, do register it with pushdecl.
555
556         * decl.c (finish_case_label): Do not check that we are within a
557         switch statement here.
558         * parser.c (struct cp_parser): Add in_iteration_statement_p and
559         in_switch_statement_p.
560         (cp_parser_new): Initialize them.
561         (cp_parser_labeled_statement): Check validity of case labels
562         here.
563         (cp_parser_selection_statement): Set in_switch_statement_p.
564         (cp_parser_iteration_statement): Set in_iteration_statement_p.
565         (cp_parser_jump_statement): Check validity of break/continue
566         statements here.
567
568         PR c++/12735
569         * cp-tree.h (duplicate_decls): Return a tree.
570         * decl.c (duplicate_decls): Clarify documentation.  Return
571         error_mark_node to indicate a failed redeclaration.
572         * friend.c (do_friend): Handle that case.
573         * name-lookup.c (pushdecl): Likewise.
574
575 2003-11-11  Jason Merrill  <jason@redhat.com>
576
577         * cp-tree.h (DECL_NAMESPACE_ASSOCIATIONS): New macro.
578         * name-lookup.c (parse_using_directive): New fn.
579         (is_associated_namespace): New fn.
580         (arg_assoc_namespace): Also check associated namespaces.
581         * name-lookup.h: Declare new fns.
582         * pt.c (maybe_process_partial_specialization): Allow
583         specialization in associated namespace.
584         * parser.c (cp_parser_using_directive): Accept attributes.  Use
585         parse_using_directive.
586
587 2003-11-10  Richard Henderson  <rth@redhat.com>
588
589         * cvt.c (convert_to_void): Use void_zero_node after overload failure.
590
591 2003-11-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
592
593         PR c++/12832
594         * name-lookup.c (supplement_binding): Gracefully handle names
595         used at non-class scope prior declaration.
596
597 2003-11-06  Matt Austern  <austern@apple.com>
598
599         * decl.c (duplicate_decls): copy DECL_VISIBILITY field.
600         * method.c (use_thunk): give thunk same visibility as function.
601         * optimize.c (maybe_clone_body): copy DECL_VISIBILITY field.
602         
603 2003-11-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
604
605         PR c++/11616
606         * pt.c (instantiate_pending_templates): Save and restore
607         input_location.
608
609 2003-11-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
610
611         PR c++/2019
612         * friend.c (add_friend): Don't display previous declaration in
613         case of duplicate friend warning.
614
615 2003-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
616
617         PR c++/9810
618         * call.c (build_over_call): Check access using primary template
619         if FN is a member function template.
620
621 2003-11-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
622
623         PR c++/12796
624         * class.c (handle_using_decl): Set input_location before calling
625         error_not_base_type.
626
627 2003-10-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
628
629         PR c++/10371
630         * semantics.c (finish_non_static_data_member): Handle when
631         both processing_template_decl and qualifying_scope are true.
632
633 2003-10-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
634
635         PR c++/11076
636         * class.c (handle_using_decl): Swap arguments of error_not_base_type.
637         * parser.c (cp_parser_direct_declarator): Only resolve typename for
638         namespace scope declarations.
639
640 2003-10-24  Nathan Sidwell  <nathan@codesourcery.com>
641
642         PR c++/12698, c++/12699, c++/12700, c++/12566
643         * cp-tree.h (THUNK_ALIAS_P, THUNK_ALIAS): New.
644         (debug_class, debug_thunks): New.
645         * class.c (dump_class_hierarchy_1): New break out from ...
646         (dump_class_hierarchy): ... here.
647         (dump_thunk, debug_thunks, debug_class): New.
648         (update_vtable_entry_for_fn): Add ssizetype casts. Correct
649         continued search for primary binfo via virtual.
650         (build_vtbl_initializer): Follow covariant thunk alias.
651         * method.c (make_thunk): Clear DECL_THUNKS of the thunk.
652         (finish_thunk): Look for an alias of the covariant thunk and point
653         to it.
654         (use_thunk): We should never use an alias.
655         * semantics.c (emit_associated_thunks): Do not emit aliases.
656
657         PR c++/12566
658         * cp-tree.h (cp_fname_init): Add TYPE pointer param.
659         * decl.c (cp_fname_init): Add TYPE pointer param. Set it. Don't
660         create an ad-hoc ERROR_MARK.
661         (cp_make_fname_decl): Adjust.
662         * pt.c (tsubst_expr): Adjust.
663
664 2003-10-23  Jason Merrill  <jason@redhat.com>
665
666         PR c++/12726
667         * tree.c (build_target_expr_with_type): Don't call force_rvalue
668         for CONSTRUCTORs.
669
670 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
671
672         * call.c: Fix comment formatting.
673         * class.c: Likewise.
674         * cxx-pretty-print.c: Likewise.
675         * init.c: Likewise.
676         * parser.c: Likewise.
677         * pt.c: Likewise.
678         * semantics.c: Likewise.
679         * tree.c: Likewise.
680         * typeck.c: Likewise.
681         * typeck2.c: Likewise.
682
683 2003-10-21  Mark Mitchell  <mark@codesourcery.com>
684
685         PR c++/11962
686         * typeck.c (build_x_conditional_expr): Handle missing middle
687         operands in templates.
688         * mangle.c (write_expression): Issue errors about attempts to
689         mangle a non-existant middle operator to the ?: operator.
690
691 2003-10-21  Robert Bowdidge   <bowdidge@apple.com>
692         * decl.c (cp_finish_decl): Remove clause intended for asm directives 
693           in struct or class fields: this code is never executed.
694
695 2003-10-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
696
697         * decl.c (start_decl): Exit if push_template_decl returns
698         error_mark_node.
699
700 2003-10-20  Kazu Hirata  <kazu@cs.umass.edu>
701
702         * ChangeLog: Fix typos.
703         * call.c: Fix comment typos.
704         * class.c: Likewise.
705         * cp-tree.h: Likewise.
706         * cvt.c: Likewise.
707         * cxx-pretty-print.c: Likewise.
708         * decl.c: Likewise.
709         * decl2.c: Likewise.
710         * init.c: Likewise.
711         * mangle.c: Likewise.
712         * name-lookup.c: Likewise.
713         * parser.c: Likewise.
714         * search.c: Likewise.
715         * semantics.c: Likewise.
716         * tree.c: Likewise.
717         * typeck.c: Likewise.
718
719 2003-10-20  Jan Hubicka  <jh@suse.cz>
720
721         * decl.c (start_cleanup_fn):  Set DECL_DECLARED_INLINE_P to deffer
722         the expansion.
723
724 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
725
726         * Make-lang.in (c++.install-info): Remove.
727
728 2003-10-20  Jason Merrill  <jason@redhat.com>
729
730         * class.c (layout_class_type): Set DECL_ARTIFICIAL on padding
731         field.
732
733 2003-10-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
734
735         PR c++/9781, c++/10583, c++/11862
736         * decl.c (cp_finish_decl): Exit immediately if decl is an
737         error_mark_node.
738         * pt.c (push_template_decl_real): Return error_mark_node for
739         invalid template declaration of variable.
740
741 2003-10-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
742
743         PR c++/12495
744         * pt.c (lookup_template_class): Handle when current_class_type
745         is a local class.
746
747 2003-10-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
748
749         PR c++/2513
750         * decl.c (make_typename_type): Use dependent_type_p.
751         (make_unbound_class_template): Likewise.
752         * pt.c (instantiate_class_template): Increment
753         processing_template_decl during substitution of template friend
754         function.  Preincrement processing_template_decl rather than
755         postincrement.
756         (get_mostly_instantiated_function_type): Increment
757         processing_template_decl during partial substitution of function
758         type.
759
760 2003-10-15  Jan Hubicka  <jh@suse.cz>
761
762         PR c++/12574
763         * decl2.c (cxx_callgraph_analyze_expr): Deal with baselink.
764
765 2003-10-14  Jason Merrill  <jason@redhat.com>
766
767         PR c++/11878
768         * tree.c (build_target_expr_with_type): Call force_rvalue for
769         classes with non-trivial copy ctors.
770
771         PR c++/11063
772         * typeck.c (build_modify_expr): Call convert rather than abort.
773
774 2003-10-14  Gabriel Dos Reis  <gdr@integrable-solutions.net>
775
776         Breack out decl.c (3/n)
777         * name-lookup.c: Include flags.h
778         (lookup_name_current_level): Make static.
779         (add_decl_to_level): Likewise.
780         (push_local_binding): Likewise.
781         (push_overloaded_decl): Likewise.
782         (lookup_using_namespace): Likewise.
783         (qualified_lookup_using_namespace): Likewise.
784         (lookup_type_current_level): Likewise.
785         (unqualified_namespace_lookup): Likewise.
786         (namespace_ancestor): Likewise.
787         (push_using_directive): Likewise.
788         * decl.c (pushdecl): Move to name-lookup.c.
789         (pushdecl_top_level_1): Likewise.
790         (pushdecl_top_level): Likewise.
791         (pushdecl_top_level_and_finish): Likewise.
792         (maybe_push_decl): Likewise.
793         (push_using_decl): Likewise.
794         (push_overloaded_decl): Likewise.
795         (make_anon_name): Likewise.
796         (anon_cnt): Likewise.
797         (clear_anon_tags): Likewise.
798         (maybe_inject_for_scope_var): Likewise.
799         (check_for_out_of_scope_variable): Likewise.
800         * Make-lang.in (cp/name-lookup.o): Depend on flags.h.
801         * decl.c (warn_extern_redeclared_static): Export.
802         * cp-tree.h (warn_extern_redeclared_static): Declare.
803
804 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
805
806         * Make-lang.in: Replace uses of $(target_alias) with
807         $(target_noncanonical).
808
809 2003-10-13  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
810
811         * ChangeLog: Add PR number to patch for PR c++/12370.
812
813 2003-10-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
814
815         * name-lookup.h (cxx_scope_find_binding_for_name): Don't export.
816         (binding_for_name): Likewise.
817         (cxx_binding_clear): Move to name-lookup.c.
818         * name-lookup.c (cxx_scope_find_binding_for_name): Now static.
819         (binding_for_name): Likewise.
820         * decl2.c (is_ancestor): Move to name-lookup.c
821         (namespace_ancestor): Likewise.
822         (add_using_namespace): Likewise.
823         (ambiguous_decl): Likewise.
824         (lookup_using_namespace): Likewise.
825         (qualified_lookup_using_namespace): Likewise.
826         (set_decl_namespace): Likewise.
827         (decl_namespace): Likewise.
828         (current_decl_namespace): Likewise.
829         (push_decl_namespace): Likewise.
830         (pop_decl_namespace): Likewise.
831         (push_scope): Likewise.
832         (pop_scope): Likewise.
833         (struct arg_lookup): Likewise.
834         (arg_assoc): Likewise.
835         (arg_assoc_args): Likewise.
836         (arg_assoc_type): Likewise.
837         (add_function): Likewise.
838         (arg_assoc_namespace): Likewise.
839         (arg_assoc_class): Likewise.
840         (arg_assoc_template_arg): Likewise.
841         (do_namespace_alias): Likewise.
842         (validate_nonmember_using_decl): Likewise.
843         (do_nonmember_using_decl): Likewise.
844         (do_toplevel_using_decl): Likewise.
845         (do_local_using_decl): Likewise.
846         (do_class_using_decl): Likewise.
847         (do_using_directive): Likewise.
848         (constructor_name_full): Likewise.
849         (constructor_name): Likewise.
850         (constructor_name_p): Likewise.
851
852 2003-10-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
853
854         Break out decl.c (2/n) 
855         * name-lookup.c: Include diagnostic.h
856         (cxx_binding_free): Make static.
857         (cxx_binding_make): Likewise.
858         (binding_table_new): Likewise
859         (binding_table_free): Likewise.
860         (binding_table_insert): Likewise.
861         (binding_table_find_anon_type): Likewise.
862         (binding_table_reverse_maybe_remap): Likewise.
863         (supplement_binding): Likewise.
864         * name-lookup.h (global_scope_name): Declare extern.
865         (global_type_node): Likewise.
866         (cxx_binding_free): Don't export.
867         (cxx_binding_make): Likewise.
868         (binding_table_new): Likewise.
869         (binding_table_free): Likewise.
870         (binding_table_insert): Likewise.
871         (binding_table_find_anon_type): Likewise.
872         (binding_table_reverse_maybe_remap): Likewise.
873         * Make-lang.in (cp/name-lookup.o): Depend on $(DIAGNOSTIC_H)
874         * decl.c (lookup_namespace_name): Move to name-lookup.c
875         (select_decl): Likewise.
876         (unqualified_namespace_lookup): Likewise.
877         (lookup_qualified_name): Likewise.
878         (lookup_name_real): Likewise.
879         (lookup_name_nonclass): Likewise.
880         (lookup_function_nonclass): Likewise.
881         (lookup_name): Likewise.
882         (lookup_name_current_level): Likewise.
883         (lookup_type_current_level): Likewise.
884         (lookup_flags): Likewise.
885         (qualify_lookup): Likewise.
886         (lookup_tag): Likewise.
887         (lookup_tag_reverse): Likewise.
888         (getdecls): Likewise.
889         (storedecls): Remove.
890         (cxx_remember_type_decls): Move to name-lookup.c.
891         (global_bindings_p): Likewise.
892         (innermost_nonclass_level): Likewise.
893         (toplevel_bindings_p): Likewise.
894         (namespace_bindings_p): Likewise.
895         (kept_level_p): Likewise.
896         (innermost_scope_kind): Likewise.
897         (template_parm_scope_p): Likewise.
898         (push_binding): Likewise.
899         (push_local_binding): Likewise.
900         (add_decl_to_level): Likewise.  Make extern.
901         (push_class_binding): Move to name-lookup.c.
902         (resume_level): Likewise.  Rename to resume_scope.
903         (begin_scope): Move to name-lookup.c.
904         (indent): Likewise.
905         (binding_depth): Likewise.
906         (is_class_level): Likewise.
907         (cxx_scope_descriptor): Likewise.
908         (cxx_scope_debug): Likewise.
909         (namespace_scope_ht_size): Likewise.
910         (leave_scope): Likewise.
911         (pushlevel_class): Likewise.
912         (poplevel_class): Likewise.
913         (clear_identifier_class_values): Likewise.
914         (pushdecl_with_scope): Likewise.
915         (pushdecl_namespace_level): Likewise.
916         (pushdecl_class_level): Likewise.
917         (push_class_level_binding): Likewise.
918         (push_using_directive): Likewise.
919         (identifier_global_value): Likewise.
920         (keep_next_level_flag): Likewise.
921         (keep_next_level): Likewise.
922         (free_binding_level): Likewise.
923         (set_class_shadows): Likewise.
924         (maybe_push_cleanup_level): Likewise.
925         (cp_namespace_decls): Likewise.
926         (bt_print_entry): Likewise.
927         (print_binding_level): Likewise.
928         (print_other_binding_stack): Likewise.
929         (print_binding_stack): Likewise.
930         (push_namespace): Likewise.
931         (pop_namespace): Likewise.
932         (push_nested_namespace): Likewise.
933         (pop_nested_namespace): Likewise.
934         (cxx_saved_binding_make): Likewise.
935         (struct cxx_saved_binding_make): Likewise.
936         (store_bindings): Likewise.
937         (maybe_push_to_top_level): Likewise.
938         (push_to_top_level): Likewise.
939         (pop_from_top_level): Likewise.
940         (identifier_type_value): Likewise.
941         (set_identifier_type_value): Likewise.
942         (set_identifier_type_value_with_scope): Likewise.
943         (pop_everything): Likewise.
944         (pushtag): Likewise.
945         (follow_tag_typedef): Likewise.
946         (maybe_process_template_type_declaration): Likewise.
947         (pop_binding): Likewise.
948         * cp-tree.h: Move corresponding declarations to name-lookup.h
949         
950 2003-10-12  Steven Bosscher  <steven@gcc.gnu.org>
951
952         * cvt.c (ocp_convert): Move warning to C common code.
953
954 2003-10-09  Jason Merrill  <jason@redhat.com>
955
956         PR c++/6392
957         * tree.c (build_cplus_array_type): Handle all quals the same.
958         (cp_build_qualified_type_real): Look through arrays first.
959
960         * tree.c (build_cplus_new): Use build_decl to create a VAR_DECL.
961         (build_target_expr_with_type): Likewise.
962
963         * pt.c (instantiate_class_template): Sanity check that our
964         enclosing class has been instantiated.
965
966 2003-10-08  Giovanni Bajo  <giovannibajo@libero.it>
967
968         * cp_tree.h: Added TFF_NO_FUNCTION_ARGUMENTS.
969         * error.c (dump_function_decl): Use it to skip the dump of the
970         arguments.
971         (dump_expr): When dumping a declaration found within an
972         expression, always set TFF_NO_FUNCTION_ARGUMENTS
973         in the flags.
974
975 2003-10-08  Giovanni Bajo <giovannibajo@libero.it>
976
977         PR c++/11097
978         * pt.c (tsubst_decl): Substitute also the DECL_NAME node of
979         USING_DECL.
980
981 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
982
983         PR c++/10147
984         * call.c (initialize_reference): Tweak error message.
985         * cxx-pretty-print.h (cxx_pretty_printer_flags): Remove
986         pp_cxx_flag_qualified_id and pp_cxx_flag_global_scope.
987         * cxx-pretty-print.c (pp_cxx_id_expression): Always display
988         qualified entities using qualified names.
989         
990         PR c++/12337
991         * init.c (build_new_1): Make sure that the expression returned is
992         not an lvalue.
993
994         PR c++/12344, c++/12236, c++/8656
995         * decl.c (start_function): Do not ignore attributes embedded in a
996         function declarator.
997
998 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
999
1000         * Make-lang.in (c++.info): Remove.
1001         (c++.dvi): Remove.
1002         (c++.generated-manpages): Replace with ...
1003         (generated-manpages): ... this.
1004
1005 2003-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1006
1007         * decl.c (struct cp_binding_level): Move to name-lookup.h
1008         (current_binding_level): Likewise.
1009         (class_binding_level): Likewise.
1010         * cp-tree.h (enum scope_kind): Likewise.
1011
1012 2003-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1013
1014         * name-lookup.c (binding_entry_free): Nullify name and type
1015         fields. 
1016
1017 2003-10-02  Mark Mitchell  <mark@codesourcery.com>
1018
1019         PR c++/12486
1020         * typeck.c (finish_class_member_access_expr): Issue diagnostic
1021         on erroneous use of qualified name.
1022
1023 2003-09-30  Richard Henderson  <rth@redhat.com>
1024
1025         PR c++/12370
1026         * decl.c (duplicate_decls): Copy DECL_SAVED_INSNS too.
1027
1028 2003-09-30  Kelley Cook  <kelleycoook@wideopenwest.com>
1029
1030         * g++spec.c: Convert to ISO C90 prototypes.
1031         * parser.c: Likewise.
1032
1033 2003-09-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1034
1035         * decl.c (pop_binding): Don't mess with nullifying binding->scope
1036         here. 
1037         * name-lookup.c: Re-format.
1038         (cxx_binding_free): Nullify binding->scope.
1039
1040 2003-09-29  Jan Hubicka  <jh@suse.cz>
1041
1042         PR C++/12047
1043         * except.c (build_eh_type_type): Call mark_used on the type.
1044
1045 2003-09-28  Richard Henderson  <rth@redhat.com>
1046
1047         * typeck.c (c_expand_asm_operands): Take location_t, instead of
1048         individual file and line.
1049
1050 2003-09-28  Andreas Jaeger  <aj@suse.de>
1051
1052         * decl.c (cxx_builtin_type_decls): Convert to ISO C90 function
1053         definition.
1054         * init.c (push_base_cleanups): Likewise.
1055         * decl2.c (finish_file): Likewise.
1056         * mangle.c (init_mangle): Likewise.
1057         (dump_substitution_candidates): Likewise.
1058         * search.c: Likewise.
1059
1060 2003-09-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1061
1062         * name-lookup.h (get_global_value_if_present): New function.
1063         (is_typename_at_global_scope): Likewise.
1064         * except.c (do_begin_catch): Use get_global_value_if_present.
1065         (do_end_catch): Likewise.
1066         (do_allocate_exception): Likewise.
1067         (do_free_exception): Likewise.
1068         (build_throw): Likewise.
1069         * parser.c (cp_parser_member_declaration): Likewise.
1070         * rtti.c (throw_bad_cast): Likewise.
1071         (throw_bad_typeid): Likewise.
1072         * decl.c (check_tag_decl): Use is_typename_at_global_scope.
1073         (grokdeclarator): Likewise.
1074         * cp-tree.h (global_namespace): Move to name-lookup.h
1075         * call.c (call_builtin_trap): Tidy.
1076
1077 2003-09-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1078
1079         PR c++/11415
1080         * parser.c (cp_parser_nested_name_specifier_opt): Issue correct
1081         error message when parser->scope is global_namespace.
1082
1083 2003-09-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1084
1085         * cp-tree.h, name-lookup.h, decl.c, decl2.c: Remove reference to
1086         macros  BINDING_SCOPE, BINDING_VALUE and BINDING_TYPE.
1087
1088 2003-09-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1089
1090         * decl.c (pop_binding_level, suspend_binding_level,
1091         find_class_binding_level): Merge into leave_scope.  Remove.
1092         (leave_scope):  New function.
1093         (poplevel): Update.
1094         (poplevel_class): Likewise.
1095         (pop_namespace): Likewise.
1096
1097 2003-09-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1098
1099         PR c++/5655
1100         * parser.c (cp_parser_check_access_in_redeclaration): New function.
1101         (cp_parser_member_declaration): Use it.
1102         (cp_parser_template_declaration_after_export): Likewise.
1103
1104 2003-09-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1105
1106         * cp-tree.h (scope_kind): Add new enumerator.
1107         (keep_next_level): Change parameter type to bool.
1108         (begin_scope):  Change prototype.
1109         (pushlevel): Remove declaration.
1110         * decl.c (push_binding_level): Fold in begin_scope.  Remove.
1111         (struct cp_binding_level): Remove tag_tranparent field.  Make keep
1112         of bitsize one.
1113         (keep_next_level_flag): Make a bool.
1114         (cxx_scope_descriptor): Update scope names table
1115         (make_cxx_scope): Fold in begin_scope.  Remove..
1116         (namespace_scope_ht_size): New function.
1117         (begin_scope): Change prototype.  Return a scope.  Tidy.
1118         (kept_level_p): Update.
1119         (pushlevel): Remove.
1120         (maybe_push_cleanup_level): Simplify.
1121         (poplevel): Update for sk_cleanup and keep change.
1122         (print_binding_level): Likewise.
1123         (initial_push_namespace_scope): Fold in begin_scope.  Remove.
1124         (push_namespace): Update.
1125         (pushtag): Likewise.
1126         (lookup_tag): Likewise.
1127         (lookup_name_current_level): Likewise.
1128         (lookup_type_current_level): Likewise.
1129         (cxx_init_decl_processing): Likewise.
1130         (start_function): Likewise.
1131         (begin_function_body): Likewise.
1132         (start_method): Likewise.
1133         * pt.c (push_inline_template_parms_recursive): Likewise.
1134         (begin_template_parm_list): Likewise.
1135         (begin_specialization): Likewise.
1136         * semantics.c (do_pushlevel): Likewise.
1137         (begin_compound_stmt): Likewise.
1138         (begin_stmt_expr): Likewise.
1139
1140 2003-09-21  Richard Henderson  <rth@redhat.com>
1141
1142         * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
1143         method.c, optimize.c, pt.c, semantics.c, tree.c: Revert.
1144
1145 2003-09-21  Richard Henderson  <rth@redhat.com>
1146
1147         * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
1148         method.c, optimize.c, pt.c, semantics.c, tree.c: Update for
1149         DECL_SOURCE_LOCATION rename and change to const.
1150
1151 2003-09-20  Richard Henderson  <rth@redhat.com>
1152
1153         * decl.c, decl2.c, pt.c: Use %J in diagnostics.
1154
1155 2003-09-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1156
1157         PR c++/157
1158         * parser.c (cp_parser_direct_declarator): Clear
1159         parser->num_template_parameter_lists when parsing function
1160         parameters.
1161         (cp_parser_constructor_declarator_p): Likewise.
1162
1163 2003-09-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1164
1165         PR c++/495
1166         * pt.c (tsubst_friend_class): Only use innermost template
1167         arguments for the injected friend class template.
1168
1169 2003-09-19  Nathan Sidwell  <nathan@codesourcery.com>
1170
1171         PR c++/12332
1172         * pt.c (instantiate_class_template): Increment
1173         processing_template_decl around the tsubst of a template member
1174         function.
1175
1176 2003-09-19  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1177
1178         * decl.c (cxx_scope_descriptor): Fix thinko.
1179         (struct cp_binding_level): Adjust type of binding_depth field. 
1180
1181 2003-09-18  Danny Smith  <dannysmith@users.sourceforge.net>
1182
1183         PR c++/12320
1184         * call.c (type_passed_as): Check for incomplete type.
1185         (convert_for_arg_passing): Likewise.
1186
1187 2003-09-18  Nathan Sidwell  <nathan@codesourcery.com>
1188
1189         PR c++/9848
1190         * optimize.c (maybe_clone_body): Don't set MARK_USED on parameters
1191         here.
1192         * semantics.c (expand_body): Set it here on the remaining clones.
1193
1194 2003-09-18  Roger Sayle  <roger@eyesopen.com>
1195
1196         * lex.c (init_operators): Remove operator_name_info for FFS_EXPR.
1197         * class.c (instantiate_type): Remove FFS_EXPR case.
1198
1199 2003-09-18  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1200
1201         * ChangeLog: Fix recent commit.
1202
1203 2003-09-18  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1204
1205         * ChangeLog: Add PR number to patch for PR c++/12316.
1206
1207 2003-09-18  Gabriel Dos Reis <gdr@integrable-solutions.net>
1208
1209         * error.c (dump_type): Simplify.  Use pp_type_specifier_seq for
1210         "C" types. 
1211         * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Fix thinko.
1212
1213 2003-09-17  Richard Henderson  <rth@redhat.com>
1214
1215         * semantics.c (expand_body): Don't save/restore input_location.
1216
1217 2003-09-17  Mark Mitchell  <mark@codesourcery.com>
1218
1219         PR c++/12266
1220         * cp-tree.h (tsubst_flags_t): Add tf_conv.
1221         * class.c (standard_conversion): Pass tf_conv to
1222         instantiate_type.
1223         (resolve_address_of_overloaded_function): Do not call mark_used
1224         when just checking conversions.
1225
1226         PR debug/12066
1227         * cp-lang.c (LANG_HOOKS_BUILTIN_TYPE_DECLS): Define.
1228         * cp-tree.h (cxx_builtin_type_decls): Declare.
1229         * decl.c (builtin_type_decls): New variables.
1230         (cxx_builtin_type_decls): New function.
1231         (record_builtin_type): Add to builtin_type_decls.
1232
1233 2003-09-17  Richard Henderson  <rth@redhat.com>
1234
1235         PR c++/12316
1236         * semantics.c (expand_or_defer_fn): Inc/dec function_depth.
1237
1238 2003-09-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1239
1240         PR c++/7939
1241         * typeck.c (comptypes): Don't ICE when its first argument is
1242         error_mark_node.
1243         (compparms): Reverse the arguments of same_type_p.
1244
1245 2003-09-15  Nathan Sidwell  <nathan@codesourcery.com>
1246
1247         PR c++/12184
1248         * typeck.c (convert_arguments): Return error_mark_node for an
1249         incomplete parameter. Make error message more informative.
1250
1251 2003-09-12  Mark Mitchell  <mark@codesourcery.com>
1252
1253         PR c++/3907
1254         * class.c (maybe_note_name_used_in_class): Refine test for whether
1255         or not we are in a class scope.
1256
1257         * cp-tree.h (language_function): Remove x_expanding_p.
1258         (expanding_p): Remove.
1259         (doing_semantic_analysis_p): Remove.
1260         (scope_kind): Add sk_function_parms, sk_class,
1261         sk_namespace.
1262         (innermost_scope_kind): New method.
1263         * call.c (cxx_type_promotes_to): Use type_decays_to.
1264         * cp-lang.c (LANG_HOOKS_PUSHLEVEL): Redefine.
1265         (LANG_HOOKS_POPLEVEL): Likewise.
1266         * decl.c (cp_binding_level): Remove parm_flag, template_parms_p,
1267         template_spec_p, namespace_p, is_for_scope, is_try_scope, and
1268         is_catch_scope.  Add kind and explicit_spec_p.
1269         (cxx_scope_descriptor): Use a lookup table.
1270         (find_class_binding_level): Use "kind" field in binding_level, not
1271         the various flags.
1272         (pop_binding_level): Likewise.
1273         (innermost_nonclass_level): Likewise.
1274         (toplevel_bindings_p): Likewise.
1275         (namespace_bindings_p): Likewise.
1276         (template_parm_scope_p): Likewise.
1277         (innermost_scope_kind): New method.
1278         (current_tmpl_spec_kind): Use "kind" field in binding_level, not
1279         the various flags.
1280         (pushlevel): Remove check for doing_semantic_analysis_p.
1281         (begin_scope): Simplify.
1282         (add_decl_to_level): Use "kind" field in binding_level, not
1283         the various flags.
1284         (push_local_binding): Likewise.
1285         (pop_label): Remove check for doing_semantic_analysis_p.
1286         (poplevel): Use "kind" field in binding_level, not
1287         the various flags.
1288         (set_block): Remove check for doing_semantic_analysis_p.
1289         (pushlevel_class): Use "kind" field in binding_level, not
1290         the various flags. 
1291         (poplevel_class): Likewise.
1292         (initial_push_namespace_scope): Likewise.
1293         (maybe_push_to_top_level): Likewise.
1294         (set_identifier_type_value_with_scope): Likewise.
1295         (pop_everything): Likewise.
1296         (maybe_process_template_type_declaration): Likewise.
1297         (pushtag): Likewise.
1298         (pushdecl): Likewise.
1299         (pushdecl_with_scope): Likewise.
1300         (check_previous_goto_1): Likewise.
1301         (define_label): Likewise.
1302         (finish_case_label): Likewise.
1303         (lookup_tag): Likewise.
1304         (unqualified_namespace_lookup): Likewise.
1305         (lookup_name_real): Likewise.
1306         (lookup_name_current_level): Likewise.
1307         (lookup_type_current_level): Likewise.
1308         (record_builtin_type): Likewise.
1309         (cp_make_fname_decl): Likewise.
1310         (maybe_inject_for_scope_var): Likewise.
1311         (cp_finish_decl): Remove check for doing_semantic_analysis_p.
1312         (start_function): Use begin_scope, not pushlevel.
1313         (finish_function): Use "kind" field in binding_level, not
1314         the various flags.
1315         (start_method): Use begin_scope, not pushlevel.
1316         (make_label_decl): Do not check expanding_p.
1317         (save_function-data): Do not set expanding_p.
1318         (cxx_push_function_context): Do not clear expanding_p.
1319         * semantics.c (cxx_expand_function_start): Do not set expanding_p.
1320         
1321 2003-09-14  Mark Mitchell  <mark@codesourcery.com>
1322
1323         * class.c (layout_class_type): Make DECL_MODE match TYPE_MODE for
1324         an bit-field whose width exceeds that of its type.
1325
1326 2003-09-14  Geoffrey Keating  <geoffk@apple.com>
1327
1328         * rtti.c (get_tinfo_decl): Set TREE_PUBLIC for typeinfo decls.
1329
1330 2003-09-14  Kazu Hirata  <kazu@cs.umass.edu>
1331
1332         * ChangeLog: Follow spelling conventions.
1333         * parser.c: Likewise.
1334
1335 2003-09-13  Richard Henderson  <rth@redhat.com>
1336
1337         * decl2.c (finish_file): Check cgraph_assemble_pending_functions
1338         during relaxation loop.
1339
1340 2003-09-11  David Edelsohn  <edelsohn@gnu.org>
1341
1342         * decl2.c (var_finalized_p): Swap arms of conditional.
1343
1344 2003-09-10  Nathan Sidwell  <nathan@codesourcery.com>
1345
1346         PR c++/11788
1347         * typeck.c (build_address): If it is a function, mark it used.
1348         (build_unary_op): Do not lose object's side-effects when taking
1349         address of static member function.
1350         * class.c (resolve_address_of_overloaded_function): Use
1351         tsubst_flags_t parameter. Only expect overload sets. Adjust.
1352         (instantiate_type): Adjust flags passing. Do not lose object's
1353         side-effects when taking address of static member function.
1354
1355 2003-09-11  Richard Henderson  <rth@redhat.com>
1356
1357         * semantics.c (expand_or_defer_fn): Update for new
1358         cgraph_finalize_function argument.
1359
1360 2003-09-10  Richard Henderson  <rth@redhat.com>
1361
1362         * decl2.c (cxx_callgraph_analyze_expr): Mark argument unused.
1363
1364 2003-09-10  Jan Hubicka  <jh@suse.cz>
1365
1366         * decl2.c (var_finalized_p): New.
1367         (maybe_emit_vtables, write_out_vars, finish_file): Use it.
1368
1369 2003-09-10  Richard Henderson  <rth@redhat.com>
1370
1371         * decl2.c (cxx_callgraph_analyze_expr): New, from corpse of
1372         mark_member_pointers.
1373         (lower_function): Remove.
1374         * cp-tree.h: Update to match.
1375         * cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): New.
1376         (LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Remove.
1377
1378 2003-09-09  Richard Henderson  <rth@redhat.com>
1379
1380         * semantics.c (expand_or_defer_fn): Update call to 
1381         cgraph_finalize_function.
1382
1383         * semantics.c (expand_or_defer_fn): Use cgraph_finalize_function
1384         always.
1385
1386         * decl2.c (finish_file): Avoid out-of-bounds array reference
1387         during memmove.
1388
1389 2003-09-09  Richard Henderson  <rth@redhat.com>
1390
1391         * decl2.c (mark_member_pointers): Rename from
1392         mark_member_pointers_and_eh_handlers and don't check eh handlers.
1393
1394 2003-09-09  Christian Ehrhardt  <ehrhardt@mathematik.uni-ulm.de>
1395
1396         PR bootstrap/12168
1397         * method.c (use_thunk): Clear DECL_RTL of copied nodes.
1398
1399 2003-09-08  Mark Mitchell  <mark@codesourcery.com>
1400
1401         * cp-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to
1402         c_register_builtin_type.
1403
1404         PR c++/11786
1405         * decl2.c (add_function): Do not complain about seeing the same
1406         non-function twice.
1407         * semantics.c (perform_koenig_lookup): Improve documentation.
1408
1409         PR c++/5296
1410         * pt.c (try_one_overload): Add addr_p parameter.
1411         (resolve_overloaded_unification): Pass it.
1412
1413 2003-09-08  Richard Henderson  <rth@redhat.com>
1414
1415         * optimize.c (maybe_clone_body): Inc/dec function_depth.
1416
1417 2003-09-08  Richard Henderson  <rth@redhat.com>
1418
1419         * decl.c (finish_function): Clear current_function_decl.
1420         * decl2.c (mark_used): Don't push/pop gc context.
1421         * optimize.c (optimize_function): Likewise.
1422         * tree.c (cp_cannot_inline_tree_fn): Likewise.
1423         * pt.c (instantiate_decl): Inc/dec function_depth instead.
1424         * semantics.c (expand_body): Update for tree_rest_of_compilation
1425         nested argument.
1426
1427 2003-09-07  Gabriel Dos Reis  <gcc@integrable-solutions.net>
1428
1429         PR c++/11762
1430         * error.c (dump_decl): Handle namespace-alias-definition.
1431         * decl.c (warn_extern_redeclared_static): There is no point in
1432         checking changes in storage class specifier for a namespace
1433         declaration. 
1434         (duplicate_decls): Tidy diagnostic message.
1435         * cxx-pretty-print.c (pp_cxx_left_brace): New macro.
1436         (pp_cxx_right_brace): Likewise.
1437         (pp_cxx_original_namespace_definition): New function.
1438         (pp_cxx_namespace_alias_definition): Likewise.
1439         (pp_cxx_declaration): Use them.  Handle NAMESPACE_DECLs.
1440
1441 2003-09-07  Jan Hubicka  <jh@suse.cz>
1442
1443         * decl2.c (maybe_emit_vtables, write_out_vars, finish_file):
1444         Avoid re-emitting variables in unit-at-a-time mode.
1445
1446 2003-09-06  Mark Mitchell  <mark@codesourcery.com>
1447
1448         PR c++/11867
1449         * call.c (standard_conversion): Improve comments.
1450         (perform_direct_initialization): Make sure we return an expression
1451         of the correct type.
1452         * typeck.c (build_static_cast): Check for ambiguity and
1453         accessibility when performing conversions.
1454
1455 2003-09-06  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1456
1457         * cp-tree.h (add_binding): Remove declaration.
1458         * name-lookup.h (supplement_binding): Declare.
1459         * decl.c (add_binding): Move to name-lookup.c.
1460         (push_local_binding): Adjust.
1461         (push_class_binding): Likewise.
1462         (set_identifier_type_value_with_scope): Likewise.
1463         * name-lookup.c (supplement_binding): Rename from add_binding.
1464         Return a bool.  Improve documentation. 
1465         (set_namespace_binding): Adjust.
1466         * Make-lang.in (cp/name-lookup.o): Depend on toplev.h
1467
1468 2003-09-06  Nathan Sidwell  <nathan@codesourcery.com>
1469
1470         PR c++/11794
1471         * class.c (pushclass): Push dependent using decls for nested
1472         classes of templates too.
1473
1474 2003-09-06  Roger Sayle  <roger@eyesopen.com>
1475
1476         PR c++/11409
1477         * class.c (resolve_address_of_overloaded_function): When building
1478         list of matching non-template function decls, ignore anticipated
1479         declarations of undeclared or shadowed GCC builtins.
1480
1481 2003-09-06  Steven Bosscher  <steven@gcc.gnu.org>
1482
1483         PR c++/11595
1484         * decl.c (define_label): Remove unreachable timevar pop.
1485         Always return the decl, even if the definition is invalid.
1486
1487 2003-09-06  Nathan Sidwell  <nathan@codesourcery.com>
1488
1489         PR c++/12167
1490         * parser.c (cp_parser_late_parsing_default_args): Push & pop the
1491         unparsed functions queue.
1492
1493 2003-09-05  Mark Mitchell  <mark@codesourcery.com>
1494
1495         PR c++/12163
1496         * call.c (perform_direct_initialization): Correct logic for
1497         direct-initialization of a class type.
1498
1499         PR c++/12146
1500         * pt.c (lookup_template_function): Robustify.
1501
1502 2003-09-05  Nathan Sidwell  <nathan@codesourcery.com>
1503
1504         PR c++/11922
1505         * pt.c (tsubst_qualified_id): Make sure we get a non-type.
1506         (tsubst_expr, tsubst_copy_and_build): Pass false, not zero, as
1507         is_type_p to lookup_qualified_name.
1508
1509         * semantics.c (finish_call_expr): Refactor some code.
1510
1511         PR c++/12037
1512         * cp-tree.h (COMPOUND_EXPR_OVERLOADED): New.
1513         (build_min_non_dep): Declare.
1514         * tree.c (build_min): Propagate TREE_SIDE_EFFECTS.
1515         (build_min_non_dep): New.
1516         * cvt.c (convert_to_void): Don't explicitly copy
1517         TREE_SIDE_EFFECTS, TREE_NO_UNUSED_WARNING.
1518         * call.c (build_new_method_call): Use build_min_non_dep.
1519         * decl2.c (grok_array_decl): Likewise.
1520         (build_offset_ref_call_from_tree): Likewise.
1521         * typeck.c (finish_class_member_access_expr,
1522         build_x_indirect_ref, build_x_binary_op, build_x_unary_op,
1523         build_x_conditional_expr, build_x_compound_expr): Likewise.
1524         (build_static_cast, build_reinterpret_cast,
1525         build_const_cast): Propagate TREE_SIDE_EFFECTS inside a template.
1526         * typeck2.c (build_x_arrow): Use build_min_non_dep.
1527         (build_functional_cast): Propagate TREE_SIDE_EFFECTS inside a
1528         template.
1529         * rtti.c (build_dynamic_cast_1): Set DECL_IS_PURE.
1530         (build_dynamic_cast): Set TREE_SIDE_EFFECTS.
1531         * pt.c (build_non_dependent_expr): Check COMPOUND_EXPR_OVERLOADED.
1532
1533 2003-09-04  Richard Henderson  <rth@redhat.com>
1534
1535         * decl2.c (mark_member_pointers_and_eh_handlers): Update for
1536         change in cgraph_mark_needed_node arguments.
1537
1538 2003-09-02  Geoffrey Keating  <geoffk@apple.com>
1539
1540         PR 12161
1541         * decl2.c (mark_used): Use ggc_push_context/ggc_pop_context.
1542         * tree.c (cp_cannot_inline_tree_fn): Likewise.
1543
1544 2003-09-04  Nathan Sidwell  <nathan@codesourcery.com>
1545
1546         * cp-tree.h (finish_sizeof, finish_alignof): Remove.
1547         (expr_sizeof): Replace with ...
1548         (cxx_sizeof_or_alignof_expr): ... here.
1549         (cxx_sizeof_or_alignof_type): Make complain parameter a bool.
1550         * parser.c (cp_parser_unary_expression): Commonize alignof and
1551         sizeof handling.
1552         * pt.c (tsubst_copy_and_build): Adjust alignof and sizeof
1553         substitution.
1554         * semantics.c (finish_sizeof, finish_alignof): Remove.
1555         * typeck.c (cxx_sizeof_or_alignof_type): Complain parameter
1556         becomes bool. Set TREE_READONLY.
1557         (expr_sizeof): Replace with ...
1558         (cxx_sizeof_or_alignof_expr): ... here. Clear TREE_SIDE_EFFECTS.
1559
1560 2003-09-04  Mark Mitchell  <mark@codesourcery.com>
1561
1562         Remove cast-as-lvalue extension.
1563         * call.c (build_conditional_expr): Correct formatting.
1564         (convert_like_real): Use lvalue_p, not non_cast_lvalue_p.
1565         (initialize_real): Use real_lvalue_p, not real_non_cast_lvalue_p.
1566         * cp-tree.h (non_cast_lvalue_p): Remove.
1567         (real_non_cast_lvalue_p): Remove.
1568         (non_cast_lvalue_or_else): Remove.
1569         * tree.c (lvalue_p_1): Remove allow_cast_as_lvalue parameter.
1570         (real_lvalue_p): Adjust call to lvalue_p_1.
1571         (non_cast_lvalue_p): Remove.
1572         (non_cast_lvalue_or_else): Remove.
1573         (lvalue_p): Adjust call to lvalue_p_1.
1574         (lvalue_or_else): Simplify.
1575         * typeck.c (build_unary_op): Use lvalue_or_else, not
1576         non_cast_lvalue_or_else.
1577         (build_static_cast): Use real_lvalue_p, not real_non_cast_lvalue_p.
1578
1579 2003-09-03  DJ Delorie  <dj@redhat.com>
1580
1581         * decl.c (finish_function): Pass fndecl to aggregate_value_p.
1582
1583 2003-09-03  Mark Mitchell  <mark@codesourcery.com>
1584
1585         PR c++/12053
1586         * class.c (include_empty_classes): Correct logic for ABI version 1.
1587
1588 2003-09-03  Richard Henderson  <rth@redhat.com>
1589
1590         * optimize.c (optimize_function): Push/pop ggc context around
1591         the call to optimize_inline_calls.
1592
1593 2003-09-02  Scott Brumbaugh  <scottb.lists@verizon.net>
1594
1595         PR c++/11553
1596         * parser.c (cp_parser_decl_specifier_seq): Add check for a
1597         duplicate friend decl-specifier.
1598
1599 2003-09-02  Mark Mitchell  <mark@codesourcery.com>
1600
1601         PR c++/11847
1602         * pt.c (convert_nontype_argument): Correct representation of
1603         REFERENCE_TYPE expressions.
1604
1605         PR c++/11808
1606         * cp-tree.h (KOENIG_LOOKUP_P): New macro.
1607         (finish_call_expr): Change prototype.
1608         * parser.c (cp_parser_postfix_expression): Adjust call to
1609         finish_call_expr.
1610         * pt.c (tsubst_copy_and_build): Use KOENIG_LOOKUP_P.
1611         * semantics.c (finish_call_expr): Add koenig_p parameter.
1612
1613 2003-09-01  Mark Mitchell  <mark@codesourcery.com>
1614
1615         PR c++/12114
1616         * cp-tree.h (initialize_reference): Change prototype.
1617         * call.c (initialize_reference): Add cleanup parameter.
1618         * decl.c (grok_reference_init): Likewise.
1619         (check_initializer): Likewise.
1620         (cp_finish_decl): Insert a CLEANUP_STMT if necessary.
1621         (duplicate_decls): When replacing an anticipated builtin, do not
1622         honor TREE_NOTHROW.
1623         * typeck.c (convert_for_initialization): Correct call to
1624         initialize_reference.
1625
1626         PR c++/11972
1627         * pt.c (dependent_type_p_r): Pass only the innermost template
1628         arguments to any_dependent_template_arguments_p.
1629
1630 2003-09-01  Josef Zlomek  <zlomekj@suse.cz>
1631
1632         * error.c (dump_expr): Kill BIT_ANDTC_EXPR.
1633         * lex.c (init_operators): Kill BIT_ANDTC_EXPR.
1634         * pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR.
1635         * typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
1636         (tsubst_copy_and_build): Kill BIT_ANDTC_EXPR.
1637
1638 2003-08-29  Mark Mitchell  <mark@codesourcery.com>
1639
1640         PR c++/12093
1641         * pt.c (build_non_dependent_expr): Do not build a
1642         NON_DEPENDENT_EXPR for a STRING_CST.
1643
1644         PR c++/11928
1645         * search.c (add_conversions): Avoid adding two conversion
1646         operators for the same type.
1647
1648 2003-08-29  Mark Mitchell  <mark@codesourcery.com>
1649
1650         PR c++/6196
1651         * pt.c (tsubst_copy_and_build): Correct handling of
1652         address-of-label extension.
1653         * semantics.c (finish_goto_stmt): The address of a label must go
1654         through the lvalue-to-rvalue conversion.
1655
1656 2003-08-29  Richard Henderson  <rth@redhat.com>
1657             Jason Merrill <jason@redhat.com>
1658
1659         * cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New.
1660         (LANG_HOOKS_RTL_EXPAND_STMT): New.
1661         * cp-tree.h (cxx_expand_function_start): Declare.
1662         * decl.c (start_function): Use allocate_struct_function.
1663         Move stmts_are_full_exprs_p assertion from expand_body.
1664         Do not free_after_parsing or free_after_compilation.
1665         (cxx_push_function_context): Move code to set struct function
1666         data from genrtl_start_function.
1667         * optimize.c (optimize_function): Don't inc/dec function_depth.
1668         * semantics.c (expand_body): Use tree_rest_of_compilation.
1669         (cxx_expand_function_start): Rename from genrtl_start_function,
1670         omit bits done by tree_rest_of_compilation.
1671         (genrtl_finish_function): Remove.
1672         (clear_decl_rtl): Move to ../tree-optimize.c.
1673
1674 2003-08-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1675
1676         PR c++/11811
1677         * cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New
1678         function. 
1679         * cxx-pretty-print.h: Declare.
1680         * error.c (dump_template_parameter): Use it.
1681         (dump_type): Likewise.
1682
1683 2003-08-28  Mark Mitchell  <mark@codesourcery.com>
1684
1685         * init.c (decl_constant_value): Deal with COND_EXPR specially.
1686         * call.c (build_conditional_expr): Revert previous patch.
1687
1688         PR optimization/5079
1689         * call.c (build_conditional_expr): Use decl_constant_value to
1690         simplify the arguments.
1691
1692 2003-08-26  Dan Nicolaescu  <dann@ics.uci.edu>
1693
1694         * parser.c (struct cp_token): Use enum bitfields.
1695         (CP_TOKEN_BLOCK_NUM_TOKENS): Make sure cp_token_block fits in a
1696         512B allocation unit.
1697         (cp_parser_token_tree_map_node): Use enum bitfields.
1698
1699 2003-08-26  Nathan Sidwell  <nathan@codesourcery.com>
1700
1701         PR c++/11871
1702         * decl.c (push_class_level_binding): Correct old_decl value from
1703         my 2003-07-29 reorganization.
1704
1705         * call.c (build_call): Don't set TREE_SIDE_EFFECTS here.
1706         (build_new_method_call): Add goto finish.
1707         * semantics.c (simplify_aggr_init_exprs_r): Don't set
1708         TREE_SIDE_EFFECTS on a call.
1709
1710 2003-08-25  Richard Henderson  <rth@redhat.com>
1711
1712         * cxx-pretty-print.c (pp_cxx_class_name): Remove unused function.
1713
1714 2003-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1715
1716         * cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag.
1717         (cxx_pretty_printer): Adjust base type.
1718         (pp_cxx_function_specifier): Declare.
1719         * cxx-pretty-print.c (pp_cxx_whitespace): New macro.
1720         (pp_cxx_left_paren): Likewise.
1721         (pp_cxx_right_paren): Likewise.
1722         (pp_cxx_dot): Likewise.
1723         (pp_cxx_arrow): Likewise.
1724         (pp_cxx_semicolon): Likewise.
1725         (pp_cxx_identifier): Likewise.
1726         (pp_cxx_cv_qualifier_seq): Likewise.
1727         (pp_cxx_storage_class_specifier): Likewise.
1728         (pp_cxx_expression_list): Likewise.
1729         (pp_cxx_space_for_pointer_operator): Likewise.
1730         (pp_cxx_init_declarator): Likewise.
1731         (pp_cxx_call_argument_list): Likewise.
1732         (pp_cxx_nonconsecutive_character): Tidy.
1733         (pp_cxx_conversion_function_id): New function.
1734         (pp_cxx_template_id): Likewise.
1735         (pp_cxx_template_keyword_if_needed): Likewise.
1736         (pp_cxx_nested_name_specifier): Likewise.
1737         (pp_cxx_unqualified_id): Tidy
1738         (pp_cxx_qualified_id): Handle more nodes.
1739         (pp_cxx_primary_expression): Tidy.
1740         (pp_cxx_postfix_expression): Likewise.
1741         (pp_cxx_new_expression): Tidy.
1742         (pp_cxx_delete_expression): Likewise.
1743         (pp_cxx_cast_expression): New function.
1744         (pp_cxx_pm_expression): Tidy.
1745         (pp_cxx_conditional_expression): Likewise.
1746         (pp_cxx_assignment_operator): New function.
1747         (pp_cxx_assignment_expression): Tidy.
1748         (pp_cxx_expression): New function.
1749         (pp_cxx_function_specifier): Likewise.
1750         (pp_cxx_decl_specifier_seq): Likewise.
1751         (pp_cxx_simple_type_specifier): Tidy.
1752         (pp_cxx_type_specifier_seq): Likewise.
1753         (pp_cxx_ptr_operator): New function.
1754         (pp_cxx_implicit_parameter_type): Likewise.
1755         (pp_cxx_parameter_declaration): Tidy.
1756         (pp_cxx_parameter_declaration_clause): New function.
1757         (pp_cxx_exception_specification): Likewise.
1758         (pp_cxx_direct_declarator): Tidy.
1759         (pp_cxx_declarator): Likewise.
1760         (pp_cxx_ctor_initializer): New function.
1761         (pp_cxx_function_definition): Likewise.
1762         (pp_cxx_abstract_declarator): Tidy.
1763         (pp_cxx_direct_abstract_declarator): Likewise.
1764         (pp_cxx_type_id): Likewise.
1765         (pp_cxx_exception_declaration): New function.
1766         (pp_cxx_statement): Likewise.
1767         (pp_cxx_simple_declaration): Likewise.
1768         (pp_cxx_template_parameter_list): Likewise.
1769         (pp_cxx_template_parameter): Likewise.
1770         (pp_cxx_template_declaration): Likewise.
1771         (pp_cxx_explicit_specialization): Likewise.
1772         (pp_cxx_explicit_instantiation): Likewise.
1773         (pp_cxx_declaration): Tidy.
1774         (pp_cxx_pretty_printer_init): Initialize more fields.
1775
1776 2003-08-25  Mark Mitchell  <mark@codesourcery.com>
1777
1778         PR c++/8795
1779         * cp-tree.h (build_cplus_method_type): Remove.
1780         * call.c (standard_conversion): Use build_method_type_directly
1781         instead of build_cplus_method_type.
1782         * class.c (build_clone): Likewise.
1783         (adjust_clone_args): Likewise.
1784         * decl.c (build_ptrmem_type): Likewise.
1785         (grokdeclarator): Likewise.
1786         (check_function_type): Likewise.
1787         * decl2.c (grok_method_quals): Likewise.
1788         (maybe_retrofit_in_chrg): Likewise.
1789         * pt.c (copy_default_args_to_explicit_spec): Likewise.
1790         (tsubst_function_type): Likewise.
1791         (tsubst): Likewise.
1792         * tree.c (build_cplus_method_type): Remove.
1793         * typeck.c (merge_types): Use build_method_type_directly.
1794
1795 2003-08-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1796
1797         PR c++/3765
1798         * search.c (dfs_access_in_type): Fix typo in comment.
1799         (dfs_accessible_queue_p): Likewise.
1800         (dfs_accessible_p): Only terminate when a friend is found.
1801         (accessible_p): Return immediately if access_in_type allows
1802         access.
1803
1804 2003-08-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1805
1806         PR c++/641, c++/11876
1807         * friend.c (add_friend): Add complain parameter.
1808         (make_friend_class): Likewise.
1809         (do_friend): Adjust add_friend call.
1810         * decl.c (grokdeclarator): Adjust make_friend_class call.
1811         * parser.c (cp_parser_member_declaration): Likewise.
1812         (cp_parser_template_declaration_after_export): Likewise.
1813         * pt.c (instantiate_class_template): Adjust make_friend_class
1814         and add_friend call.
1815         * cp-tree.h (make_friend_class): Adjust declaration.
1816         (add_friend): Likewise.
1817
1818 2003-08-21  Jason Merrill  <jason@redhat.com>
1819
1820         PR c++/11283
1821         * call.c (build_conditional_expr): Ignore cv-qual differences for
1822         non-class types.
1823
1824 2003-08-21  Mark Mitchell  <mark@codesourcery.com>
1825
1826         PR c++/11551
1827         * parser.c (cp_parser_id_expression): Add declarator_p parameter.
1828         (cp_parser_primary_expression): Adjust call to
1829         cp_parser_id_expression.
1830         (cp_parser_unqualified_id): Complain about the use of
1831         typedef-names in a destructor declarator.
1832         (cp_parser_postfix_expression): Adjust call to
1833         cp_parser_id_expression.
1834         (cp_parser_type_parameter): Likewise.
1835         (cp_parser_template_argument): Likewise.
1836         (cp_parser_declarator_id): Likewise.
1837
1838         PR c++/11919
1839         * call.c (standard_conversion): Use same_type_p, not pointer
1840         equality, to compare types.
1841
1842         PR c++/10762
1843         * parser.c (cp_parser_using_declaration): Check for invalid uses
1844         of template-ids here...
1845         * decl2.c (do_class_using_decl): ... rather than here.
1846
1847 2003-08-20  Mark Mitchell  <mark@codesourcery.com>
1848
1849         PR c++/11834
1850         * pt.c (more_specialized): Bump processing_template_decl.
1851
1852 2003-08-21  Jason Merrill  <jason@redhat.com>
1853
1854         PR c++/11614
1855         * decl.c (grokdeclarator): Recognize a flexible array based on the
1856         type, not the form of the declarator.
1857
1858 2003-08-20  Jason Merrill  <jason@redhat.com>
1859
1860         * semantics.c (simplify_aggr_init_expr): Split out from
1861         simplify_aggr_init_exprs_r.  Convert slot address to match
1862         the return type.
1863         * cp-tree.h: Declare it.
1864         * tree.c (cp_copy_res_decl_for_inlining): Don't clobber the
1865         DECL_NAME of a user variable.
1866
1867 2003-08-20  Nathan Sidwell  <nathan@codesourcery.com>
1868
1869         PR c++/11945
1870         * pt.c (build_non_dependent_expr): Look inside COND_EXPR and
1871         COMPOUND_EXPR.
1872         * semantics.c (finish_expr_stmt): Always convert to void.
1873         * typeck.c (build_x_compound_exp): Always convert to void.
1874
1875 2003-08-19  Mark Mitchell  <mark@codesourcery.com>
1876
1877         PR c++/11684
1878         * cp-tree.h (grok_op_properties): Change prototype.
1879         * decl.c (grok_op_properties): Add complain parameter.
1880         (grokfndecl): Pass it.
1881         * pt.c (tsubst_decl): Adjust accordingly.
1882
1883         PR c++/10926
1884         * decl.c (start_method): Return immediately if push_template_decl
1885         does not like the declaration.
1886         * pt.c (push_template_decl_real): Disallow member template
1887         destructors.
1888
1889         PR c++/11036
1890         * cp-tree.h (add_binding): Add prototype.
1891         * class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate.
1892         (maybe_warn_about_overly_private_class): Use
1893         CLASSTYPE_DESTRUCTORS.
1894         (pushclass): Adjust call to set_identifier_type_value.
1895         * decl.c (add_binding): Give it external linkage.
1896         (push_local_binding): Adjust call to add_binding.
1897         (push_class_binding): Likewise.
1898         (set_identifier_type_value_with_scope): Change prototype.  Use
1899         add_binding for global bindings.
1900         (set_identifier_type_value): Adjust accordingly.
1901         (pushtag): Likewise.
1902         (pushdecl): Use set_identifier_type_value, not
1903         set_identifier_type_value_with_scope.
1904         (pushdecl_namespace_level): Adjust calls to
1905         SET_IDENTIFIER_TYPE_VALUE to pass a DECL.
1906         (pushdecl_class_level): Likewise.
1907         (lookup_tag): Use select_decl.
1908         (select_decl): Improve comment.
1909         (record_builtin_type): Do not call pushdecl.
1910         (cxx_init_decl_processing): Do not call xref_tag for bad_alloc.
1911         (cp_finish_decl): Adjust call to set_identifier_type_value.
1912         (check_elaborated_type_specifier): Improve checks for invalid uses
1913         of typedefs.
1914         (xref_tag): Adjust call to check_elaborated_type_specifier.
1915         * decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR.
1916         * name-lookup.c (set_namespace_binding): Use add_binding.
1917         * parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL,
1918         rather than an IDENTIFIER_NODE, to represent built-in types, if
1919         requested by the caller.
1920         (cp_parser_postfix_expression): Adjust call.
1921         (cp_parser_type_specifier): Likewise.
1922         (cp_parser_elaborated_type_specifier): Adjust call to
1923         check_elaborated_type_specifier.
1924         * typeck2.c (build_functional_cast): Do not perform name lookups.
1925
1926         PR c++/10717
1927         * decl.c (expand_static_init): Remove unnecessary code.
1928
1929 2003-08-19  Andrew Pinski  <pinskia@physics.uc.edu>
1930
1931         PR c++/10538, PR c/5582
1932         * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define.
1933
1934 2003-08-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1935
1936         PR c++/11174
1937         * init.c (build_offset_ref): Perform access checking for
1938         pointer to member correctly.
1939
1940 2003-08-19  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1941
1942         * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling.
1943
1944 2003-08-18  Nathan Sidwell  <nathan@codesourcery.com>
1945
1946         PR c++/11957
1947         * cp-tree.h (finish_stmt_expr): Add bool parameter.
1948         * init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't
1949         adjust the stmt_expr here.
1950         (build_vec_init): Use finish_stmt_expr_expr, convert result to
1951         array type.
1952         * parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr
1953         call.
1954         * pt.c (tsubst_copy): Likewise.
1955         * semantics.c (finish_stmt_expr): Add parameter.
1956
1957         * pt.c (instantiate_class_template): Push to class's scope before
1958         tsubsting base.
1959
1960 2003-08-17  Jan Hubicka  <jh@suse.cz>
1961
1962         PR C++/11702
1963         * semantics.c (finish_id_expression): Mark all functions as used.
1964
1965 2003-08-16  Nathan Sidwell  <nathan@codesourcery.com>
1966
1967         PR c++/11512
1968         * cvt.c (convert_to_void): Indicate which side of conditional has
1969         no effects, and rhs of comma operator. Test for no sideeffect
1970         expressions here and always build a convert expr.
1971         * init.c (expand_default_init): Convert the init to void.
1972         * typeck.c (build_x_compound_expr): Do not check for side effects
1973         here.
1974         (build_compound_expr): Do not convert lhs when building a
1975         template.
1976
1977 2003-08-15  Nathan Sidwell  <nathan@codesourcery.com>
1978
1979         * cp-tree.def (NON_DEPENDENT_EXPR): Add operand.
1980         * decl2.c (build_offset_ref_call_from_tree): Use
1981         build_non_dependent_expr.
1982         * error.c (dump_expr) <NON_DEPENDENT_EXPR case>: Dump the operand.
1983         * pt.c (build_non_dependent_expr): Set operand.
1984
1985 2003-08-14  Jan Hubicka  <jh@suse.cz>
1986
1987         * decl2.c (mark_member_pointers): Rename to...
1988         (mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos
1989         (lower_function): Update call.
1990         * except.c (eh_type_info): Break out from ...
1991         (build_eh_type): ... here; tinfo is already used.
1992         (finish_eh_spec_block): Mark tinfos as used.
1993         * semantics.c (finish_handler_params): Mark tinfo as used.
1994         * cp-tree.h (eh_type_info): Declare.
1995
1996 2003-08-15  Nathan Sidwell  <nathan@codesourcery.com>
1997
1998         * pt.c (instantiate_class_template): Set location before
1999         substuting bases.
2000
2001         * decl.c (make_typename_type): Use my_friendly_assert.
2002         * pt.c (tsubst_aggr_type): Rearrange context substitution.
2003
2004 2003-08-14  Jan Hubicka  <jh@suse.cz>
2005
2006         * method.c (use_thunk): Expand body directly.
2007
2008 2003-08-12  Mark Mitchell  <mark@codesourcery.com>
2009
2010         PR c++/11703
2011         * call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
2012         determine whether or not to promote types.
2013         (convert_for_arg_passing): Likewise.
2014         * decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
2015         templates.
2016         * pt.c (tsubst_decl): Do not expect it to be set.
2017
2018         PR c++/9512
2019         PR c++/10923
2020         * cp-tree.h (check_elaborated_type_specifier): Declare.
2021         (handle_class_head): Remove.
2022         (note_got_semicolon): Likewise.
2023         (note_list_got_semicolon): Likewise.
2024         (finish_class_definition): Likewise.
2025         * decl.c (check_elaborated_type_specifier): Make it public.
2026         Robustify.
2027         (handle_class_head): Remove.
2028         * parser.c (cp_parser_elaborated_type_specifier): Use
2029         check_elaborated_type_specifier.
2030         (cp_parser_class_specifier): Do not call finish_class_definition.
2031         (cp_parser_class_head): Or handle_class_head.  Check for
2032         over-qualified names.
2033         * semantics.c (finish_class_definition): Remove.
2034
2035         * parser.c (cp_parser_check_for_definition_in_return_type): New
2036         function.
2037         (cp_parser_simple_declaration): Adjust call to
2038         cp_parser_init_declarator.
2039         (cp_parser_decl_specifier_seq): Change type of
2040         declares_class_or_enum parameter.
2041         (cp_parser_explicit_instantiation): Adjust accordingly.
2042         (cp_parser_type_specifier): Change type of
2043         declares_class_or_enum parameter.
2044         (cp_parser_init_declarator): Add declares_class_or_enum
2045         parameter.
2046         (cp_parser_parameter_declaration): Adjust call to
2047         cp_parser_decl_specifier_seq.
2048         (cp_parser_function_definition): Likewise.
2049         (cp_parser_member_declaration): Likewise.
2050         (cp_parser_single_declaration): Likewise.
2051
2052         * cp-tree.h (lang_type_class): Remove has_call_overloaded,
2053         has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
2054         (TYPE_OVERLOADS_CALL_EXPR): Remove.
2055         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
2056         (TYPE_OVERLOADS_ARROW): Likewise.
2057         (CLASSTYPE_GOT_SEMICOLON): Likewise.
2058         * class.c (check_bases): Do not set them.
2059         (finish_struct_1): Likewise.
2060         * decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
2061         (build_ptrmemfunc_type): Likewise.
2062         (grok_op_properties): Do not set TYPE_OVERLOADS_*.
2063         (start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
2064         * decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
2065         * lex.c (note_got_semicolon): Remove.
2066         (note_list_got_semicolon): Likewise.
2067         * parser.c (cp_parser_simple_declaration): Do not call
2068         note_list_got_semicolon.
2069         * pt.c (list_eq): Remove.
2070         (lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
2071         (instantiate_class_template): Do not set TYPE_OVERLOADS*.
2072         (instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
2073         * ptree.c (cxx_print_type): Do not print them.
2074         * semantics.c (finish_member_class_template): Do not call
2075         note_list_got_semicolon.
2076
2077 2003-08-11  Aldy Hernandez  <aldyh@redhat.com>
2078
2079         * call.c (standard_conversion): Opaque pointers interconvert.
2080
2081         * testsuite/g++.dg/other/opaque-3.C: New.
2082
2083 2003-08-11  Mark Mitchell  <mark@codesourcery.com>
2084
2085         * typeck.c (merge_types): Handle cv-qualified pointer-to-member
2086         types correctly.
2087
2088 2003-08-10  Mark Mitchell  <mark@codesourcery.com>
2089
2090         PR c++/11789
2091         * cp-tree.h (get_vbase): Remove.
2092         (get_vbase_types): Remove.
2093         * init.c (expand_member_init): Correct logic for looking up base
2094         classes.
2095
2096 2003-08-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2097
2098         * error.c (dump_expr): Tidy.
2099         * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New.
2100         (pp_cxx_begin_template_argument_list): Likewise.
2101         (pp_cxx_end_template_argument_list): Likewise.
2102         (is_destructor_name): Likewise.
2103         (pp_cxx_unqualified_id): Likewise.
2104         (pp_cxx_qualified_id): Likewise.
2105         (pp_cxx_id_expression): Likewise.
2106         (pp_cxx_new_expression): Likewise.
2107         (pp_cxx_delete_expression): Likewise.
2108         (pp_cxx_pm_expression): Likewise.
2109         (pp_cxx_type_specifier): Rework.
2110         (pp_cxx_type_id): Likewise.
2111         (pp_cxx_primary_expression): Likewise.
2112         (pp_cxx_postfix_expression): Likewise.
2113         (pp_cxx_unary_expression): Likewise.
2114         (pp_cxx_multiplicative_expression): Likewise.
2115         (pp_cxx_conditional_expression): Likewise.
2116         (pp_cxx_assignment_expression): Likewise.
2117         (pp_cxx_pretty_printer_init): Tidy.
2118
2119 2003-08-10  Nathan Sidwell  <nathan@codesourcery.com>
2120
2121         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL
2122         NODE is always a TREE_VEC of nonzero size.
2123         (NUM_TMPL_ARGS): NODE is always a TREE_VEC.
2124         * decl2.c (arg_assoc): Template args will be a vec.
2125         * error.c (dump_decl) <TEMPLATE_ID_EXPR case>: Call
2126         dump_template_argument_list.
2127         (dump_template_parms): Args will be a vec.
2128         * parser.c (cp_parser_template_argument_list): Produce a
2129         vector, not a list.
2130         * pt.c (coerce_template_parms): Args are always vectors.
2131         (mangle_class_name_for_template): Likewise.
2132         (lookup_template_function): Likewise.
2133         (lookup_template_class): Likewise.
2134         (tsubst_template_args): Likewise.
2135         (tsubst_baselink): Use tsubst_template_args.
2136         (tsubst_qualified_id): Likewise.
2137         (tsubst_copy) <TEMPLATE_ID_EXPR case>: Likewise.
2138         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR case>: Likewise.
2139         (any_dependent_template_args_p):  Args are always vectors.
2140         * tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case.
2141
2142         PR c++/11670
2143         * call.c (convert_like_real): Add rvalue binding error message.
2144         * error.c (dump_expr) <NOP_EXPR case>: Detect when the no expr is
2145         really a cast.
2146
2147         PR c++/10530
2148         * pt.c (dependent_type_p_r): A dependent template-id is a class
2149         type with dependent template arguments, or a bound template
2150         template parameter.
2151         (type_dependent_expression_p): A template function decl cannot
2152         have a dependent context.
2153
2154 2003-08-07  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2155
2156         PR c++/5767
2157         * parser.c (cp_parser_class_name): Return immediately when scope
2158         is error_mark_node.
2159
2160 2003-08-07  Aldy Hernandez  <aldyh@redhat.com>
2161
2162         * cp/Make-lang.in (cp/call.o): Add dependency for target.h.
2163
2164         * cp/call.c (standard_conversion): Support opaque types.
2165         Include target.h.
2166         (strip_top_quals): Use cp_build_qualified_type instead of
2167         TYPE_MAIN_VARIANT.
2168
2169         * cp/typeck.c (convert_for_assignment): Support opaque types.
2170
2171         * testsuite/g++.dg/other/opaque-1.C: New.
2172
2173         * testsuite/g++.dg/other/opaque-2.C: New.
2174
2175 2003-08-06  Aldy Hernandez  <aldyh@redhat.com>
2176
2177         * decl.c (grokparms): Use cp_build_qualified_type instead
2178         TYPE_MAIN_VARIANT.
2179
2180 2003-08-05  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2181
2182         * cxx-pretty-print.h: New file.
2183         * cxx-pretty-print.c: Likewise.
2184         * error.c (scratch_pretty_printer): Change type.
2185         (init_error): Tidy.
2186         (dump_aggr_type): Likewise.
2187         (dump_global_iord): Likewise.
2188         (dump_expr): Likewise.
2189         (dump_char): Remove.
2190         * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
2191         (cxx_initialize_diagnostics): New function.
2192         * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o
2193         (CXX_PRETTY_PRINT_H): New variable.
2194         (cp/cxx-pretty-print.o): New rule.
2195         (cp/cp-lang.o): Update dependence.
2196         (cp/error.o): Likewise.
2197
2198 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
2199
2200         * cp-tree.h (struct lang_decl): Don't include c_lang_decl.
2201         (DECL_DECLARED_INLINE_P): Remove.
2202         * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
2203         if decl is a FUNCTION_DECL.  This never made sense, but now it is
2204         required to avoid a tree check failure.
2205         * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
2206         * optimize.c (maybe_clone_body): Likewise.
2207
2208 2003-08-04  Roger Sayle  <roger@eyesopen.com>
2209
2210         * decl.c (cxx_insert_default_attributes): Delete.
2211         * cp-tree.h (cxx_insert_default_attributes): Don't prototype.
2212         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define.
2213
2214 2003-08-03  Nathan Sidwell  <nathan@codesourcery.com>
2215
2216         PR c++/11704
2217         * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
2218         unknown type.
2219
2220         PR c++/11766
2221         * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
2222         member functions.
2223
2224 2003-08-02  Nathan Sidwell  <nathan@codesourcery.com>
2225
2226         PR c++/9447
2227         * cp-tree.def (USING_DECL): Document its type.
2228         * class.c (pushclass): If we're entering a template, push any
2229         dependent using decls it has.
2230         * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
2231         a dependent scope.
2232         * pt.c (tsubst_decl) <USING_DECL case>: Set type.
2233         (tsubst): Remove USING_DECL checks.
2234         (type_dependent_expression_p): Remove USING_DECL case.
2235         * semantics.c (finish_member_declaration): A USING_DECL's type
2236         indicates whether it is dependent.
2237
2238 2003-08-02  Nathan Sidwell  <nathan@codesourcery.com>
2239
2240         * cp-tree.h (pushclass): Remove unneeded parameter.
2241         * class.c (pushclass): Remove unneeded MODIFY parm. Adjust.
2242         (push_nested_class): Adjust pushclass call.
2243         * pt.c (instantiate_class_template): Likewise.
2244         * semantics.c (begin_class_definition): Likewise.
2245
2246 2003-08-01  Nathanael Nerode  <neroden@gcc.gnu.org>
2247
2248         * typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
2249
2250 2003-08-01  Mark Mitchell  <mark@codesourcery.com>
2251
2252         PR c++/11697
2253         * decl.c (decls_match): Don't ignore the types of template
2254         classes.
2255
2256         PR c++/11744
2257         * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic.
2258
2259 2003-08-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2260
2261         PR c++/8442, c++/8806
2262         * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
2263         preferred.
2264         (check_elaborated_type_specifier): Add allow_template_p
2265         parameter.  Check tag mismatch and class template.
2266         (xref_tag): Add template_header_p parameter.  Add assertion
2267         that name is an IDENTIFIER_NODE.  Remove implicit typename
2268         warning.  Simplify lookup process if globalize is true.
2269         (cxx_init_decl_processing): Adjust call to xref_tag.
2270         (xref_tag_from_type): Likewise.
2271         * decl2.c (handle_class_head): Likewise.
2272         * parser.c (cp_parser_elaborated_type_specifier,
2273         cp_parser_class_head): Likewise.
2274         * rtti.c (init_rtti_processing, build_dynamic_cast1,
2275         tinfo_base_init, emit_support_tinfos): Likewise.
2276         * class.c (is_base_of_enclosing_class): Remove.
2277         * pt.c (convert_template_argument): Don't accept RECORD_TYPE as
2278         template template argument.
2279         * cp-tree.h (xref_tag): Adjust declaration.
2280         (is_base_of_enclosing_class): Remove.
2281         * NEWS: Document template template argument change.
2282
2283 2003-08-01  Nathan Sidwell  <nathan@codesourcery.com>
2284
2285         * parser.c (cp_parser_init_declarator,
2286         cp_paser_member_declaration): Reformat.
2287         * pt.c (lookup_template_class, type_unification_real, unify,
2288         type_dependent_expression_p): Reformat.
2289
2290         PR c++/11295
2291         * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
2292         tf_stmt_expr_body.
2293         (finish_stmt_expr_expr): Declare.
2294         * parser.c (cp_parser_primary_expression): Tell
2295         cp_parser_compount_statement that it is a statement expression.
2296         (cp_parser_statement, cp_parser_labeled_statement,
2297         cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
2298         in_statement_expr_p parameter.
2299         (cp_parser_expression_statement): Likewise. Call
2300         finish_stmt_expr_expr for final expression of a statement
2301         expression.
2302         (cp_parser_for_init_statement,
2303         cp_parser_implicitly_scoped_statement,
2304         cp_parser_already_scoped_statement, cp_parser_function_definition,
2305         cp_parser_try_block, cp_parser_handled): Adjust.
2306         * pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
2307         (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
2308         (tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
2309         * semantics.c (finish_expr_stmt): Do not deal with statement
2310         expressions.
2311         (begin_stmt_expr): Clear last_expr_type.
2312         (finish_stmt_expr_expr): New.
2313         (finish_stmt_expr): Process the value expression.
2314
2315         * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
2316         compound expr inside the target's initializer.
2317
2318         PR c++/11525
2319         * parser.c (cp_parser_primary_expression): Do not set
2320         non-constant-p merely because it is a dependent scope.
2321
2322         PR c++/9447
2323         * decl2.c (do_class_using_decl): Set type to NULL_TREE.
2324         * semantics.c (finish_expr_stmt): Do not convert to void in a
2325         template.
2326
2327 2003-07-31  Nathan Sidwell  <nathan@codesourcery.com>
2328
2329         * pt.c (coerce_template_parms): Refactor.
2330         (fn_type_unification): Increment processing_template_decl when
2331         tsubsting an incomplete set of explicit args.
2332
2333         PR c++/11347
2334         * pt.c (instantiate_class_template): Increment
2335         processing_template_decl around the tsubst of a template member
2336         class.
2337         (tsubst_qualified_id): Assert we do not have a dependent scope.
2338
2339         * pt.c (coerce_template_template_parms, lookup_template_class,
2340         can_complete_type_without_circularity, instantiate_class_template,
2341         tsubst_decl, unify): Reformat.
2342
2343 2003-07-31  Jan Hubicka  <jh@suse.cz>
2344
2345         * decl2.c (maybe_make_one_only): Use mark_referenced.
2346         * method.c (use_thunk): Likewsie.
2347
2348 2003-07-30  Jan Hubicka  <jh@suse.cz>
2349
2350         * class.c (build_vtable_entry_ref): Kill.
2351         (build_vtbl_ref_1): Do not call build_vtable_entry_ref.
2352         (build_vfn_ref): Do not call build_vtable_entry_ref.
2353         * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
2354         * cp-tree.h (prepare_assemble_variable): Kill.
2355         * cp-decl.c (prepare_assemble_variable): Kill.
2356
2357 2003-07-29  Geoffrey Keating  <geoffk@apple.com>
2358
2359         * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
2360         of setting valid_pch by hand.
2361
2362 2003-07-29  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2363
2364         * decl.c (finish_enum): Initialize underlying_type.
2365
2366 2003-07-29  Nathan Sidwell  <nathan@codesourcery.com>
2367
2368         PR c++/9447
2369         * decl.c (add_binding): Add bval local variable.
2370         (push_class_level_binding): Likewise. Allow a USING_DECL to be
2371         pushed.
2372         * decl2.c (do_class_using_decl):  The type of a using decl is
2373         unknown.
2374         * parser.c (cp_parser_postfix_expression): Refactor unqualified-id
2375         function call lookup code.
2376         * pt.c (tsubst): A USING_DECL will have unknown type.
2377         (tsubst_copy_and_build): Allow a using decl.
2378         (type_dependent_expression_p): A USING_DECL will make it
2379         dependent.
2380         * semantics.c (finish_member_declaration): Push a dependent using
2381         declaration.
2382
2383 2003-07-28  Mark Mitchell  <mark@codesourcery.com>
2384
2385         PR c++/11530
2386         * parser.c (cp_parser_postfix_expression): Do not call mark_used.
2387         * semantics.c (finish_id_expression): Call mark_used for all
2388         declarations.
2389
2390 2003-07-28  Mark Mitchell  <mark@codesourcery.com>
2391
2392         PR c++/11667
2393         * call.c (standard_conversion): Allow all integral->enumeral
2394         conversions, after marking them as bad.
2395         * decl.c (finish_enum): Make sure that all enumerators are
2396         properly converted to the underlying type.
2397         (build_enumerator): Set DECL_CONTEXT for namespace-scope
2398         enumeration types.
2399         * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
2400         (tsubst_enum): Tidy.
2401
2402         * Make-lang.in (typeck.o): Depend on convert.h.
2403         (class.o): Likewise.
2404         (rtti.o): Likewise.
2405         * call.c: Include convert.h.
2406         (convert_arg_to_ellipsis): Use convert_to_real.
2407         * class.c: Include convert.h.
2408         (build_base_path): Use convert_to_integer.
2409         * rtti.c: Include convert.h.
2410         (build_headof): Use convert_to_integer.
2411         * typeck.c: Include convert.h.
2412         (decay_conversion): Use convert_to_integer.
2413         (build_unary_op): Use build_nop.
2414         (get_delta_difference): Use convert_to_integer.
2415         (build_ptrmemfunc): Avoid unnecessary conversions.
2416
2417 2003-07-28  Jan Hubicka  <jh@suse.cz>
2418
2419         * decl2.c (mark_member_pointers): Verify that member pointer points to
2420         the function.
2421
2422 2003-07-28  Nathan Sidwell  <nathan@codesourcery.com>
2423
2424         * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
2425         (finish_compound_stmt): Remove no scope arg.
2426         * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
2427         end_compound_stmt calls.
2428         (expand_static_init, begin_destructor_body, begin_function_body,
2429         finish_function_body): Likewise.
2430         * decl2.c (start_objects, finish_objects,
2431         start_static_storage_duration_function,
2432         finish_static_storage_duration_function): Likewise.
2433         * init.c (begin_init_stmts, finish_init_stmts,
2434         construct_virtual_base, build_vec_init): Likewise.
2435         * method.c (do_build_assign_ref, synthesize_method): Likewise.
2436         * parser.c (cp_parser_compound_statement,
2437         cp_parser_implicitly_scoped_statement,
2438         cp_parser_already_scoped_statement): Likewise.
2439         * pt.c (tsubst_expr): Likewise.
2440         * semantics.c (begin_compound_stmt): No scope arg is a bool.
2441         (finish_compound_stmt): Remove no scope arg.
2442
2443         * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
2444         always dyadic.
2445
2446 2003-07-27  Mark Mitchell  <mark@codesourcery.com>
2447
2448         * call.c (standard_conversion): Tweak handling of
2449         pointer-to-member types.
2450         * pt.c (tsubst): Correctly qualify pointers-to-data member types.
2451         * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
2452         pointer-to-data member types.
2453
2454 2003-07-27  Nathan Sidwell  <nathan@codesourcery.com>
2455
2456         * parser.c (cp_parser_type_parameter): Reformat.
2457         (cp_parser_parameter_declaration): Deprecate default args where
2458         not allowed.
2459
2460 2003-07-26  Nathan Sidwell  <nathan@codesourcery.com>
2461
2462         * cfns.h: Rebuilt.
2463
2464         * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
2465         (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
2466         * init.c (begin_init_stmts): Make static. Return is_global
2467         value. Always call begin_stmt_expr.
2468         (finish_init_stmts): Make static. Add is_global parm. Always
2469         building a stmt tree.
2470         (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
2471         (build_vec_init): Likewise. Always building a stmt tree.
2472         (expand_default_init): Always building a stmt tree.
2473         (get_temp_regvar): Likewise.
2474         * semantics.c (begin_global_stmt_expr,
2475         finish_global_stmt_expr): Remove.
2476
2477 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2478
2479         * cp-tree.h (build_compound_expr): Take LHS & RHS args.
2480         (build_x_compound_expr_from_list): Declare.
2481         * typeck.c (build_x_compound_expr_from_list): New.
2482         (build_x_compound_expr): Adjust.
2483         (build_compound_expr): Remove unreachable code. Take two
2484         parameters, adjust.
2485         * decl.c (grok_reference_init): Use
2486         build_x_compound_expr_from_list.
2487         (expand_static_init): Adjust build_compound_expr call.
2488         (cxx_maybe_build_cleanup): Likewise.
2489         * init.c (perform_member_init): Use
2490         build_x_compound_expr_from_list.
2491         (build_new_1): Likewise.
2492         (build_vec_delete): Adjust build_compound_expr calls.
2493         (build_vbase_delete): Likewise.
2494         * typeck2.c (store_init_value): Use
2495         build_x_compound_expr_from_list.
2496         (build_functional_cast): Likewise.
2497
2498 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2499
2500         * cp-tree.h (enum tsubst_flags_t): Add tf_user.
2501         * decl.c (make_typename_type): Pass it.
2502         * pt.c (lookup_template_class): Use it.
2503         (resolve_typename_type): Pass it.
2504         * semantics.c (finish_template_type): Pass it.
2505
2506 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2507
2508         PR c++/11617
2509         * cp-tree.h (qualified_name_lookup_error): Declare.
2510         * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
2511         errors.
2512         (tsubst_expr) <DECL_STMT case>: Likewise.
2513         (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
2514         * semantics.c (qualified_name_lookup_error): New, broken out of ...
2515         (finish_id_expression): ... here. Use it.
2516
2517 2003-07-25  Falk Hueffner  <falk.hueffner@student.uni-tuebingen.de>
2518
2519         * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
2520
2521 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2522
2523         PR c++/11596
2524         * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
2525         (tsubst_template_arg): New.
2526         (tsubst_template_arg_vector): Rename to ...
2527         (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
2528         tsubst_template_arg.
2529         (coerce_template_parms): Use tsubst_template_arg for default
2530         value.
2531         (tsubst_template_parms): Likewise.
2532         (tsubst_aggr_type): Adjust.
2533         (tsubst_decl): Likewise.
2534         (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
2535         (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
2536
2537 2003-07-25 Gabriel Dos Reis  <gdr@integrable-solutions.net>
2538
2539         * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
2540         * error.c: Use the new pretty-printer framework.
2541
2542 2003-07-24  Per Bothner  <pbothner@apple.com>
2543
2544         * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
2545         which causes errors messages to incorrectly mention included files.
2546
2547 2003-07-24  Mark Mitchell  <mark@codesourcery.com>
2548
2549         * cp-tree.h (convert_to_base_statically): Declare.
2550         * call.c (build_special_member_call): Convert INSTANCE to the base
2551         type.
2552         * class.c (convert_to_base_statically): New method.
2553         * init.c (construct_virtual_base): Use it.
2554         * method.c (do_build_assign_ref): Fix typo in comment.
2555
2556 2003-07-24  Jason Merrill  <jason@redhat.com>
2557
2558         * decl.c: Just set truthvalue_* to boolean_*.
2559
2560 2003-07-24  Nathan Sidwell  <nathan@codesourcery.com>
2561
2562         * decl.c (reshape_init): Remove unreachable code.
2563
2564 2003-07-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2565
2566         PR c++/11513
2567         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
2568
2569 2003-07-23  Mark Mitchell  <mark@codesourcery.com>
2570
2571         PR c++/11645
2572         * cp-tree.h (accessible_base_p): Declare.
2573         * call.c (build_over_call): Use it.
2574         * search.c (accessible_base_p): New function, split out from ...
2575         (lookup_base): ... here.
2576
2577         PR c++/11517
2578         * call.c (build_conditional_expr): Use perform_implicit_conversion
2579         and error_operand_p.  Robustify.
2580         * typeck.c (build_unary_op): Use perform_implicit_conversion.
2581
2582 2003-07-23  Nathan Sidwell  <nathan@codesourcery.com>
2583
2584         PR c++/10953
2585         * parser.c (cp_parser_nested_name_specifier): Reset scope on
2586         failure.
2587         (cp_parser_elaborated_type_specifier): Likewise.
2588
2589 2003-07-22  Mark Mitchell  <mark@codesourcery.com>
2590
2591         Eliminate use of POINTER_TYPE for pointers-to-members.
2592         * call.c (standard_conversion): Rework pointer-to-member handling.
2593         Add comments.
2594         (add_builtin_candidate): Likewise.
2595         (resolve_scoped_fn_name): Remove.
2596         (build_conditional_expr): Rework pointer-to-member handling.
2597         (compare_ics): Likewise.
2598         * class.c (check_field_decls): Use TYPE_PTR_P.
2599         * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
2600         handling.
2601         * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
2602         (TYPE_PTRMEM_P): Add comment.
2603         (TYPE_PTR_P): Simplify.
2604         (TYPE_PTROB_P): Correct definition.
2605         (TYPE_PTR_TO_MEMBER_P): New macro.
2606         (TYPE_PTRMEM_CLASS_TYPE): Adjust.
2607         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
2608         (resolved_scoped_fn_name): Remove declaration.
2609         (build_offset_ref): Change prototype.
2610         (resolve_offset_ref): Remove.
2611         (comp_target_types): Remove.
2612         * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
2613         handling.
2614         (convert_to_reference): Use can_convert.
2615         (ocp_convert): Improve error handling.  Rework pointer-to-member
2616         handling.
2617         (perform_qualification_conversions): Rework pointer-to-member
2618         handling.
2619         * decl.c (build_ptrmem_type): Handle functions too.
2620         (create_array_type_for_decl): Remove OFFSET_TYPE error message.
2621         (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
2622         (grokparms): Remove OFFSET_TYPE error message.
2623         * dump.c (cp_dump_tree): Rework pointer-to-member handling.
2624         * error.c (dump_type_prefix): Likewise.
2625         * expr.c (cplus_expand_constant): Use build_nop.
2626         * init.c (build_offset_ref): Add address_p parameter.  Fold in
2627         necessary bits from resolve_offset_ref.
2628         (resolve_offset_ref): Remove.
2629         * parser.c (cp_parser_postfix_expression): Remove special case
2630         code for OFFSET_TYPE.
2631         * pt.c (convert_nontype_argument): Rework pointer-to-member
2632         handling.
2633         (convert_template_argument): Likewise.
2634         (unify): Likewise.
2635         (invalid_nontype_parm_type_p): Likewise.
2636         (dependent_type_p_r): Likewise.
2637         * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
2638         (target_incomplete_p_): Rework pointer-to-member
2639         handling.
2640         (get_pseudo_ti_init): Likewise.
2641         (get_pseudo_ti_desc): Likewise.
2642         * semantics.c (finish_qualified_id_expr): Adjust call to
2643         build_offset_ref.  Remove use of resolve_offset_ref.
2644         * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
2645         * typeck.c (target_type): Use TYPE_PTRMEM_P.
2646         (type_unknown_p): Remove obsolete code about the time before
2647         non-dependent expressions were handled correctly.
2648         (qualify_type_recursive): Remove.
2649         (composite_pointer_type_r): New function.
2650         (composite_pointer_type): Use it.
2651         (merge_types): Remove dead comments.
2652         (comp_cv_target_types): Remove.
2653         (comp_target_types): Likewise.
2654         (comp_target_parms): Likewise.
2655         (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
2656         (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
2657         (build_binary_op): Do not use of comp_target_types.
2658         (pointer_diff): Remove OFFSET_TYPE case.
2659         (build_unary_op): Adjust pointer-to-member handling.
2660         (unary_complex_lvalue): Likewise.
2661         (check_for_casting_away_constness): Add description parameter.
2662         (build_static_cast): Pass it.
2663         (build_reinterpret_cast): Use check_for_casting_away_constness.
2664         (build_const_cast): Adjust pointer-to-member handling.
2665         (build_c_cast): Likewise.
2666         (convert_for_assignment): Remove OFFSET_TYPE error message.
2667         (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
2668         (comp_ptr_ttypes_reinterpret): Remove.
2669         (casts_away_constness_r): Adjust pointer-to-member handling.
2670         (casts_away_constness): Liekwise.
2671         (strip_all_pointer_quals): Remove.
2672         * typeck2.c (digest_init): Adjust pointer-to-member handling.
2673         (build_m_component_ref): Likewise.
2674
2675 2003-07-22  Wolfgang Bangerth  <bangerth@dealii.org>
2676
2677         * lex.c (unqualified_fn_lookup_error): Mention that the error
2678         message needs to be kept in synch with the manual.
2679
2680 2003-07-22  Nathan Sidwell  <nathan@codesourcery.com>
2681
2682         PR c++/11614
2683         * decl.c (grokdeclarator): An array member is only a flexible
2684         array member if the field itself is the array.
2685
2686 2003-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2687
2688         PR c++/10793
2689         * decl.c (xref_basetypes): Handle error_mark_node.
2690
2691 2003-07-22  Nathan Sidwell  <nathan@codesourcery.com>
2692
2693         * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
2694         * tree.c (lvalue_p_1): Set it.
2695         * class.c (check_field): Don't allow non-packed non-POD fields to
2696         be packed.
2697         * call.c (reference_binding): Need a temporary for all bitfield
2698         and packed fields.
2699         (convert_like_real): Check it is ok to make a temporary here.
2700
2701 2003-07-21  Nathan Sidwell  <nathan@codesourcery.com>
2702
2703         * cp-tree.h (hack_identifier): Remove.
2704         * method.c (hack_identifier): Remove.
2705         * semantics.c (finish_id_expression): Expand hack_identifier
2706         here. Simplify.
2707
2708 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2709
2710         * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
2711         semantics.c typeck.c: Remove unnecessary casts.
2712
2713 2003-07-18  Nathan Sidwell  <nathan@codesourcery.com>
2714
2715         * cp-tree.h (hack_identifier): Remove.
2716         * method.c (hack_identifier): Remove.
2717         * semantics.c (finish_id_expression): Expand hack_identifier
2718         here. Simplify.
2719
2720 2003-07-18  Nathan Sidwell  <nathan@codesourcery.com>
2721
2722         * cp-tree.h (finish_non_static_data_member): Add object param.
2723         * method.c (hack_identifier): Adjust.
2724         * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
2725         again for a FIELD_DECL.
2726         * semantics.c (finish_non_static_data_member): Add object
2727         parameter. Always save the DECL in the COMPONENT_REF.
2728         * call.c (resolve_scoped_fn_name): Adjust.
2729
2730 2003-07-17  Zack Weinberg  <zack@codesourcery.com>
2731
2732         * pt.c (get_bindings): Make definition consistent with
2733         forward declaration.
2734
2735 2003-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2736
2737         PR c++/7809
2738         * friend.c (add_friend): Check access for member functions
2739         and templates.
2740
2741 2003-07-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2742
2743         PR c++/10668
2744         * typeck.c (build_class_member_access_expr): Improve diagnostic.
2745
2746 2003-07-16  Mark Mitchell  <mark@codesourcery.com>
2747
2748         PR c++/11547
2749         * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
2750         macro.
2751         (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
2752         * decl.c (duplicate_decls): Merge
2753         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2754         * parser.c (cp_parser_postfix_expression): Adjust call to
2755         cp_parser_initializer_list and
2756         cp_parser_parenthesized_expression_list.
2757         (cp_parser_parenthesized_expression_list): Add non_constant_p.
2758         (cp_parser_new_placement): Adjust call to
2759         cp_parser_parenthesized_expression_list.
2760         (cp_parser_direct_new_declarator): Likewise.
2761         (cp_parser_conditional_expression): Remove.
2762         (cp_parser_constant_expression): Parse an assignment-expression,
2763         not a conditional-expression.
2764         (cp_parser_simple_declaration): Resolve expression/declaration
2765         ambiguity more quickly.
2766         (cp_parser_mem_initializer): Adjust call to
2767         cp_parser_parenthesized_expression_list.
2768         (cp_parser_init_declarator): Keep track of whether or not the
2769         initializer is a constant-expression.
2770         (cp_parser_initializer): Add non_constant_p parameter.
2771         (cp_parser_initializer_clause): Likewise.
2772         (cp_parser_initializer_list): Likewise.
2773         (cp_parser_attribute_list): Adjust call to
2774         cp_parser_parenthesized_expression_list.
2775         (cp_parser_functional_cast): Likewise.
2776         * pt.c (tsubst_decl): Copy
2777         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2778         (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
2779         * semantics.c (finish_id_expression): Use
2780         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2781
2782 2003-07-16  Neil Booth  <neil@daikokuya.co.uk>
2783
2784         * lang-options.h: Remove.
2785
2786 2003-07-16  Andrew Pinski  <pinskia@physics.uc.edu>
2787
2788         PR c/10962
2789         * class.c (field_decl_cmp): Remove.
2790         (resort_field_decl_cmp): Remove.
2791         (resort_sorted_fields): Remove.
2792         (add_fields_to_vec): Rename to ...
2793         (add_fields_to_record_type): this.
2794         (finish_struct_1): Change to be using
2795         sorted_fields_type's fields.
2796         * cp-tree.h (lang_decl): In lang_decl_u3
2797         change sorted_fields to be a pointer to
2798         sorted_fields_type.
2799         (resort_sorted_fields): Remove prototype.
2800         * search.c (lookup_field_1): Change to be using
2801         sorted_fields_type's fields.
2802
2803 2003-07-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2804
2805         PR c++/5421
2806         * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
2807         is a member of other class.
2808         * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
2809         is a specialization of function template.
2810
2811 2003-07-16  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2812
2813         PR c++/10903
2814         * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
2815         Improve.
2816
2817 2003-07-15  Mark Mitchell  <mark@codesourcery.com>
2818
2819         * cp-tree.def (LOOKUP_EXPR): Remove.
2820         * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
2821         (LOOKUP_EXPR_GLOBAL): Remove.
2822         (get_bindings): Remove.
2823         (is_aggr_type_2): Remove.
2824         * call.c (resolved_scoped_fn_name): Remove support for
2825         LOOKUP_EXPR.
2826         * decl.c (grokfndecl): Likewise.
2827         (grokdeclarator): Likewise.
2828         * error.c (dump_decl): Likewise.
2829         (dump_expr): Likewise.
2830         * friend.c (do_friend): Likewise.
2831         * init.c (build_offset_ref): Likewise.
2832         * lex.c (unqualified_fn_lookup_error): Use pedwarn.  Do not create
2833         LOOKUP_EXPRs
2834         * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
2835         * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
2836         test.
2837         * pt.c (get_bindings): Give it internal linkage.
2838         (check_explicit_specialization): Remove support for LOOKUP_EXPR.
2839         (lookup_template_function): Likewise.
2840         (for_each_tempalte_parm_r): Likewise.
2841         (tsubst_decl): Likewise.
2842         (tsubst_qualified_id): Handle template template parameters.
2843         (tsubst_copy): Remove support for LOOKUP_EXPR.
2844         (tsubst_copy_and_build): Likewise.
2845         (most_general_template): Likewise.
2846         (value_dependent_expression_p): Likewise.
2847         (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
2848         always dependent.
2849         * semantics.c (perform_koenig_lookup): Do not create
2850         IDENTIFIER_NODEs.
2851         (finish_fname): Likewise.
2852         (finish_id_expression): Likewise.
2853         * tree.c (is_aggr_type_2): Remove.
2854
2855 2003-07-16  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2856
2857         PR c++/11531
2858         * typeck.c (check_return_expr): Fix thinko in diagnostic.
2859
2860 2003-07-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2861
2862         PR c++/10108
2863         * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
2864         error_mark_node.
2865
2866 2003-07-14  Mark Mitchell  <mark@codesourcery.com>
2867
2868         PR c++/11509
2869         * pt.c (dependent_scope_ref_p): New function.
2870         (value_dependent_expression_p): Use it.
2871         (type_dependent_expression_p): Likewise.
2872
2873         * pt.c (tsubst_friend_function): Use reregister_specialization.
2874
2875         PR c++/7019
2876         * cp-tree.h (lookup_qualified_name): Adjust prototype.
2877         * decl.c (lookup_qualified_name): Add complain parameter.  Adjust
2878         call to is_aggr_type.
2879         * parser.c (cp_parser_lookup_name): Adjust call to
2880         lookup_qualified_name.
2881         * pt.c (tsubst_qualified_id): Likewise.
2882         (tsubst_copy_and_build): Likewise.
2883         * semantics.c (finish_qualified_id_expr): Deal with erroneous
2884         expressions.
2885
2886 2003-07-14  Gabriel Dos Reis <gdr@integrable-solutions.net>
2887
2888         PR c++/11510
2889         * call.c (op_error): Properly format  REALPART_EXPR and
2890         IMAGPART_EXPR.
2891         * error.c (dump_expr): Likewise.
2892
2893 2003-07-14  Gabriel Dos Reis <gdr@integrable-solutions.net>
2894
2895         * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
2896
2897 2003-07-14  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2898
2899         PR c++/5293
2900         * call.c (initialize_reference): Improve diagnostic.
2901
2902 2003-07-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2903
2904         PR c++/11154
2905         * pt.c (more_specialized_class): Add full_args parameter.
2906         (most_specialized_class): Adjust calls to more_specialized_class.
2907         * cp-tree.h (more_specialized_class): Adjust declaration.
2908
2909 2003-07-14  Dan Nicolaescu  <dann@ics.uci.edu>
2910
2911         * lex.c (enum tree_node_kind): Delete.
2912
2913 2003-07-13  Mark Mitchell  <mark@codesourcery.com>
2914
2915         PR c++/11503
2916         * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
2917         (SET_DECL_SELF_REFERENCE_P): Likewise.
2918         * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
2919         * pt.c (tsubst_decl): Copy it.
2920         * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
2921
2922         * pt.c (reregister_specialization): Fix thinko in previous change.
2923
2924         * cp-tree.h (cp_id_kind): New type.
2925         (unqualified_name_lookup_error): Change prototype.
2926         (unqualified_fn_lookup_error): New function.
2927         (do_identifier): Remove.
2928         (do_scoped_id): Likewise.
2929         (tsubst_copy_and_build): Change prototype.
2930         (reregister_specialization): New function.
2931         (perform_koenig_lookup): Likewise.
2932         (finish_id_expression): Likewise.
2933         * call.c (build_method_call): Adjust call to
2934         unqualified_name_lookup_error.
2935         * decl.c (duplicate_decls): Use reregister_specialization.
2936         * lex.c (is_global): Remove.
2937         (unqualified_name_lookup_error): Return a value.
2938         (do_identifier): Remove.
2939         (do_scoped_id): Likewise.
2940         (identifier_typedecl_value): Remove.
2941         (unqualified_fn_lookup_error): New function.
2942         * parser.c (cp_parser_id_kind): Remove.
2943         (cp_parser_non_constant_id_expression): Remove.
2944         (cp_parser_primary_expression): Use finish_id_expression.
2945         (cp_parser_class_or_namespace_name): Use cp_id_kind, not
2946         cp_parser_id_kind.
2947         (cp_parser_postfix_expression): Use perform_koenig_lookup.
2948         (cp_parser_template_argument): Use cp_id_kind.
2949         (cp_parser_fold_non_dependent_expr): Adjust call to
2950         tsubst_copy_and_build.
2951         * pt.c (unregister_specialization): Rename to ...
2952         (reregister_specialization): This.
2953         (tsubst_friend_function): Use it.
2954         (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
2955         (tsubst_qualified_id): Likewise.
2956         (tsubst_expr): Likewise.
2957         (tsubst_copy_and_build): Add function_p parameter.  Use
2958         finish_id_expression.  Introduce RECUR macro.
2959         (tsubst_non_call_postfix_expression): New function.
2960         (regenerate_decl_from_template): Use reregister_specialization.
2961         * semantics.c (perform_koenig_lookup): New function.
2962         (finish_id_expression): Likewise.
2963
2964 2003-07-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2965
2966         * pt.c (push_access_scope_real): Remove.
2967         (push_access_scope): Move code from push_access_scope_real.
2968         (pop_access_scope): Don't check for TEMPLATE_DECL.
2969         (instantiate_template): Defer access checking during template
2970         substitution.
2971         (regenerate_decl_from_template): Tidy.
2972
2973 2003-07-11  Nathanael Nerode  <neroden@gcc.gnu.org>
2974
2975         PR c++/11437
2976         * operators.def: Add definitions for __imag__, __real__.
2977
2978 2003-07-11  Nathan Sidwell  <nathan@codesourcery.com>
2979
2980         PR c++/11050
2981         * parser.c (cp_parser_expression_list): Rename to ...
2982         (cp_parser_parenthesized_expression_list): ... here. Add attribute
2983         parameter, parse the surounding parentheses.
2984         (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
2985         parameters. Return int.
2986         (cp_parser_skip_to_closing_parenthesis or comma): Remove.
2987         (cp_parser_postfix_expression): Adjust function call parsing.
2988         (cp_parser_new_placement): Adjust.
2989         (cp_parser_new_initializer): Likewise.
2990         (cp_parser_cast_expression): Likewise.
2991         (cp_parser_selection_statement): Likewise.
2992         (cp_parser_mem_initializer): Likewise.
2993         (cp_parser_asm_definition): Likewise.
2994         (cp_parser_init_declarator): Likewise.
2995         (cp_parser_declarator): Make
2996         cdtor_or_conv_p an int ptr.
2997         (cp_parser_direct_declarator): Likewise. Check for a parameter
2998         list on cdtors & conv functions.
2999         (cp_parser_initializer): Adjust.
3000         (cp_parser_member_declaration): Adjust.
3001         (cp_parser_attribute_list): Move code into
3002         cp_parser_parens_expression_list.
3003         (cp_parser_functional_cast): Adjust.
3004         * pt.c (type_dependent_expression_p): Erroneous expressions are
3005         non-dependent.
3006
3007 2003-07-11  Geoffrey Keating  <geoffk@apple.com>
3008
3009         * decl.c (cp_finish_decl): Handle 'used' attribute.
3010
3011         * cp-lang.c (c_reset_state): New dummy routine.
3012         * cp-tree.h (finish_file): Move prototype to c-common.h.
3013         * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
3014
3015 2003-07-11  Mark Mitchell  <mark@codesourcery.com>
3016
3017         PR c++/8327
3018         * pt.c (tsubst_qualified_id): Implement suggested resolution for
3019         Core Issue 2.
3020         (type_dependent_expression_p): Likewise.
3021
3022 2003-07-10  Mark Mitchell  <mark@codesourcery.com>
3023
3024         * typeck.c (build_binary_op): Do not warn about signed
3025         vs. unsigned comparisons in the bodies of templates.
3026
3027         PR c++/9411
3028         * parser.c (cp_parser_postfix_expression): Check dependency of
3029         functions.
3030
3031 2003-07-09  Mark Mitchell  <mark@codesourcery.com>
3032
3033         PR c++/10032
3034         * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
3035         still errors.
3036
3037         PR c++/10527
3038         * error.c (decl_to_string): Do not print default argument
3039         expressions.
3040
3041         * cp-tree.h (break_out_calls): Remove declaration.
3042         * tree.c (break_out_calls): Remove.
3043         * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
3044
3045 2003-07-09  Nathan Sidwell  <nathan@codesourcery.com>
3046
3047         PR c++ 9483
3048         * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
3049         * decl2.c (constructor_name_p): Avoid repeated constructor_name
3050         calls.
3051         * decl.c (grokdeclarator): Refactor ctor/dtor detection.
3052
3053 2003-07-09  Mark Mitchell  <mark@codesourcery.com>
3054
3055         * typeck.c (build_x_unary_op): Take note of the fact that
3056         PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
3057         trees.
3058
3059         * parser.c (cp_parser_primary_expression): Preserve the form of
3060         qualified expressions in templates, even if they are not
3061         dependent.
3062         * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
3063         (tsubst_qualified_id): Likewise.
3064         * search.c (accessible_p): Treat everything in the body of a
3065         template as accessible.
3066
3067 2003-07-08  Mark Mitchell  <mark@codesourcery.com>
3068
3069         * cp-tree.def (NON_DEPENDENT_EXPR): New node.
3070         * cp-tree.h (build_call_from_tree): Remove.
3071         (build_member_call): Likewise.
3072         (dependent_template_arg_p): Remove.
3073         (any_dependent_template_arguments_p): New function.
3074         (dependent_template_id_p): Likewise.
3075         (any_type_dependent_arguments_p): Likewise.
3076         (build_non_dependent_expr): Likewise.
3077         (build_non_dependent_args): Likewise.
3078         (build_x_compound_expr): Adjust prototype.
3079         * call.c (build_new_method_call): Handle non-dependent expressions
3080         correctly.
3081         * decl2.c (grok_array_decl): Likewise.
3082         (build_offset_ref_call_from_tree): Likewise.
3083         (build_call_from_tree): Remove.
3084         * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
3085         (dump_expr): Likewise.
3086         * init.c (build_member_call): Remove.
3087         * mangle.c (write_expression): Update handling for template-ids.
3088         * parser.c (cp_parser_primary_expression): Use
3089         any_dependent_template_arguments_p.  Update constant-expression
3090         handling.
3091         (cp_parser_postfix_expression): Use
3092         any_type_dependent_arguments_p.  Simplify call processing.
3093         (cp_parser_unary_expression): Simplify.
3094         (cp_parser_expression): Adjust for changes to
3095         build_x_compound_expr.
3096         (cp_parser_template_argument): Implement standard-conforming
3097         parsing of non-type template arguments.
3098         (cp_parser_direct_declarator): Use
3099         cp_parser_fold_non_dependent_expr.
3100         (cp_parser_fold_non_dependent_expr): New function.
3101         (cp_parser_next_token_ends_template_argument_p): Likewise.
3102         * pt.c (convert_template_argument): Do not call
3103         maybe_fold_nontype_arg.
3104         (tsubst_baselink): Likewise.
3105         (tsubst_copy_and_build): Share common code.  Make sizeof/alignof
3106         processing work correctly for non-dependent expressions.  Adjust
3107         handling of COMPOUND_EXPR.  Simplify call processing.
3108         (value_dependent_expression_p): Deal with functional casts and
3109         sizeof/alignof correctly.
3110         (type_dependent_expression_p): Handle overloaded functions.
3111         (any_type_dependent_arguments_p): New function.
3112         (any_dependent_template_arguments_p): Likewise.
3113         (dependent_template_p): Treat SCOPE_REFs as dependent.
3114         (dependent_template_id_p): Simplify.
3115         (build_non_dependent_expr): New function.
3116         (build_non_dependent_args): Likewise.
3117         * semantics.c (finish_stmt_expr): Don't make dependent
3118         statement-expresions have void type.
3119         (finish_call_expr): Handle non-dependent expressions
3120         correctly.
3121         * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
3122         * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
3123         type size_t, even in templates.
3124         (expr_sizeof): Likewise.
3125         (finish_class_member_access_expr): Handle non-dependent expressions
3126         correctly.
3127         (build_x_indirect_ref): Likewise.
3128         (build_x_binary_op): Likewise.
3129         (build_x_unary_op): Likewise.
3130         (build_x_conditional_expr): Likewise.
3131         (build_x_compound_expr): Likewise.
3132         * typeck2.c (build_x_arrow): Likewise.
3133
3134 2003-07-09  Jan Hubicka  <jh@suse.cz>
3135
3136         * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
3137         * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
3138         (start_function): Use DECL_ESTIMATED_INSNS.
3139         * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
3140
3141         * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
3142         unit-at-a-time
3143
3144 2003-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3145
3146         PR c++/11030
3147         * pt.c (instantiate_class_template): Don't call xref_tag to
3148         inject name when the friend class is a specialization.
3149
3150 2003-07-07  Mark Mitchell  <mark@codesourcery.com>
3151
3152         * cp-tree.h (build_scoped_method_call): Remove.
3153         (lookup_qualified_name): Remove parameter.
3154         (tsubst_copy_and_build): Declare.
3155         (finish_qualified_object_call_expr): Remove.
3156         (check_accessibility_of_qualified_id): New function.
3157         (finish_qualified_id_expr): Likewise.
3158         (non_reference): Likewise.
3159         (build_expr_from-tree): Remove.
3160         * call.c (non_reference): Remove.
3161         (build_scoped_method_call): Likewise.
3162         (build_method_call): Use error_operand_p.  Assert that we are not
3163         processing a template.
3164         (standard_conversion): Use non_reference.
3165         * class.c (build_vtbl_entry_ref): Likewise.
3166         (build_vtbl_ref_1): Likewise.
3167         * cvt.c (build_expr_type_conversion): Use non_reference.
3168         * decl.c (lookup_qualified_name): Remove flags parameter.
3169         (grok_op_properties): Use non_reference.
3170         * decl2.c (grok_array_decl): Likewise.
3171         (build_expr_from_tree): Remove.
3172         (build_offset_ref_call_from_tree): Update comment.
3173         * error.c (parm_to_string): Call reinit_global_formatting_buffer.
3174         * except.c (prepare_eh_types): Use non_reference.
3175         (can_convert_eh): Likewise.
3176         * init.c (build_dtor_call): Avoid using build_method_call.
3177         * mangle.c (write_template_param): Remove misleading comment.
3178         * method.c (locate_copy): Use non_reference.
3179         * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
3180         (cp_parser_primary_expression): Do not create SCOPE_REFs is
3181         non-dependent contexts.
3182         (cp_parser_postfix_expression): Use finish_qualified_id_expr.
3183         (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
3184         build_expr_from_tree.
3185         (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
3186         Use check_accessibility_of_qualified_id.
3187         * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
3188         build_expr_from_tree.
3189         (tsubst_baselink): New function.
3190         (tsubst_qualified_id): Likewise.
3191         (tsubst_copy): Use them.  Remove support for METHOD_CALL_EXPR.
3192         (tsubst_expr): Adjust call to lookup_qualified_name.
3193         (tsubst_copy_and_build): Handle SCOPE_REFs specially.  Adjust
3194         handling of CALL_EXPRs.
3195         (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
3196         * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
3197         * search.c (check_final_overrider): Likewise.
3198         * semantics.c (check_accessibility_of_qualified_id): New function.
3199         (finish_qualified_object_call_expr): Remove.
3200         * typeck.c (target_type): Use non_reference.
3201         (cxx_sizeof_or_alignof_type): Likewise.
3202         (dubious_conversion_warnings): Likewise.
3203         (convert_for_initialization): Likewise.
3204         (non_reference): New function.
3205
3206 2003-07-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3207
3208         * decl.c (print_binding_level, print_other_binding_stack,
3209         print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
3210         stdio calls.
3211         * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
3212
3213 2003-07-07  Andreas Jaeger  <aj@suse.de>
3214
3215         * friend.c: Convert to ISO C90 prototypes.
3216
3217         * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
3218         language.
3219         * cfns.h: Regenerate.
3220
3221         * typeck.c: Convert remaining prototypes to ISO C90.
3222         * search.c: Likewise.
3223
3224         * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
3225         * semantics.c (expand_or_defer_fn): Likewise
3226         * mangle.c (discriminator_for_string_literal): Likewise.
3227         * g++spec.c (lang_specific_driver): Likewise.
3228
3229         * search.c (lookup_base_r): Remove unused variable.
3230
3231 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
3232
3233         * semantics.c: (genrtl_try_block) Adjust emit_line_note
3234         calls.
3235
3236 2003-07-07  Andreas Jaeger  <aj@suse.de>
3237
3238         * search.c (lookup_base_r): Remove unused variable.
3239
3240 2003-07-06  Michael Chastain  <mec@shout.net>
3241
3242         PR debug/10055
3243         * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
3244         assigning to input_filename directly.
3245
3246 2003-07-06  Kazu Hirata  <kazu@cs.umass.edu>
3247
3248         * call.c: Fix comment formatting.
3249         * class.c: Likewise.
3250         * cp-tree.h: Likewise.
3251         * decl.c: Likewise.
3252         * decl2.c: Likewise.
3253         * error.c: Likewise.
3254         * method.c: Likewise.
3255         * name-lookup.c: Likewise.
3256         * parser.c: Likewise.
3257         * pt.c: Likewise.
3258         * rtti.c: Likewise.
3259         * search.c: Likewise.
3260         * typeck.c: Likewise.
3261
3262 2003-07-06  Mark Mitchell  <mark@codesourcery.com>
3263
3264         PR c++/11345
3265         * search.c (lookup_base_r): Remove is_non_public and
3266         within_current_scope parameters.  Remove other dead code.
3267         (lookup_base): Adjust call to lookup_base_r.
3268         (adjust_result_of_qualified_name_lookup): Improve comment.
3269         * semantics.c (finish_call_expr): Use maybe_dummy_object.
3270
3271 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
3272
3273         * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
3274         LANG_HOOKS_MISSING_ARGUMENT): Override.
3275
3276 2003-07-05  Mark Mitchell  <mark@codesourcery.com>
3277
3278         PR c++/11431
3279         * typeck.c (build_static_cast): Check for reference conversions
3280         earlier.
3281
3282 2003-07-04  Mark Mitchell  <mark@codesourcery.com>
3283
3284         * cp-tree.h (perform_integral_promotions): Declare.
3285         * call.c (build_addr_func): Use decay_conversion.
3286         (convert_arg_to_ellipsis): Likewise.  Remove misleading comment.
3287         (convert_for_arg_passing): Use perform_integral_promotions.
3288         * cvt.c (build_expr_type_conversion): Use decay_conversion.
3289         (type_promotes_to): Do not return a cv-qualified type.
3290         * decl.c (grok_reference_init): Fix formatting.
3291         (get_atexit_node): Use decay_conversion.
3292         (build_enumerator): Use perform_integral_promotions.
3293         * init.c (build_vec_init): Use decay_conversion.
3294         * semantics.c (finish_expr_stmt): Likewise.
3295         (finish_switch_cond): Use perform_integral_promotions.
3296         * typeck.c (default_conversion): Likewise.
3297         (perform_integral_promotions): New function.
3298         (build_indirect_ref): Use decay_conversion.
3299         (build_array_ref): Use perform_integral_promotions.
3300         (convert_arguments): Use decay_conversion.
3301         (build_unary_op): Use perform_integral_promotions.
3302         (build_c_cast): Use decay_conversion.
3303         (build_modify_expr): Likewise.
3304         (convert_for_initialization): Likewise.
3305         * typeck2.c (build_x_arrow): Likewise.
3306
3307 2003-07-04  Kazu Hirata  <kazu@cs.umass.edu>
3308
3309         * call.c: Fix comment typos.
3310         * class.c: Likewise.
3311         * cp-tree.h: Likewise.
3312         * cvt.c: Likewise.
3313         * decl2.c: Likewise.
3314         * decl.c: Likewise.
3315         * init.c: Likewise.
3316         * mangle.c: Likewise.
3317         * parser.c: Likewise.
3318         * pt.c: Likewise.
3319         * search.c: Likewise.
3320         * semantics.c: Likewise.
3321         * tree.c: Likewise.
3322         * typeck.c: Likewise.
3323
3324 2003-07-04  Zack Weinberg  <zack@codesourcery.com>
3325
3326         * parser.c (cp_lexer_read_token): No need to handle string
3327         constant concatenation.
3328
3329 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3330
3331         * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
3332         (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
3333         ATTRIBUTE_GCC_CXXDIAG.
3334
3335 2003-07-03  Mark Mitchell  <mark@codesourcery.com>
3336
3337         * call.c (build_addr_func): Handle bound pointers-to-members.
3338         (build_method_call): Do not call resolve_offset_ref.
3339         (implicit_conversion): Likewise.
3340         (resolve_scoped_fn_name): Use finish_non_static_data_member, not
3341         resolve_offset_ref.
3342         (resolve_args): Do not call resolve_offset_ref.
3343         (build_conditional_expr): Likewise.
3344         (build_new_method_call): Likewise.
3345         * cp-tree.def (OFFSET_REF): Update documentation.
3346         * cvt.c (cp_convert_to_pointer): Update handling of conversions from
3347         pointers to members to pointers.
3348         (ocp_convert): Do not call resolve_offset_ref.
3349         (convert_to_void): Likewise.
3350         (build_expr_type_conversion): Likewise.
3351         * decl2.c (delete_sanity): Likewise.
3352         * init.c (resolve_offset_ref): Simplify greatly.
3353         (build_vec_delete): Do not call resolve_offset_ref.
3354         * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
3355         if appropriate.
3356         (cp_parser_unary_expression): Use
3357         cp_parser_simple_cast_expression.
3358         (cp_parser_delete_expression): Likewise.
3359         (cp_parser_cast_expression): Likewise.
3360         (cp_parser_pm_expression): Use cp_parser_binary_op.
3361         (cp_parser_simple_cast_expression): New function.
3362         * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
3363         * semantics.c (finish_increment_expr): Likewise.
3364         (finish_typeof): Likewise.
3365         * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
3366         * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
3367         (decay_conversion): Do not call resolve_offset_ref.
3368         (finish_class_member_access_expr): Likewise.
3369         (convert_arguments): Likewise.
3370         (build_x_binary_op): Handle DOTSTAR_EXPR.
3371         (condition_conversion): Do not call resolve_offset_ref.
3372         (unary_complex_lvalue): Likewise.
3373         (build_static_cast): Likewise.
3374         (build_reinterpret_cast): Likewise.
3375         (build_const_cast): Likewise.
3376         (build_c_cast): Likewise.
3377         (build_modify_expr): Likewise.
3378         (convert_for_assignment): Likewise.
3379         (convert_for_initialization): Likewise.
3380         * typeck2.c (build_x_arrow): Likewise.
3381         (build_m_component_ref): Simplify.
3382
3383         * call.c (build_scoped_method_call): Use convert_to_void.
3384         (build_method_call): Likewise.
3385         * class.c (check_field_decls): Remove dead code.
3386         * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
3387         * decl2.c (grok_array_decl): Remove dead code.
3388         (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
3389         as pointer-to-member representation.
3390         * init.c (build_offset_ref): Tidy.
3391         (build_vec_delete_1): Use convert_to_void.
3392         * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
3393         as pointer-to-member representation.
3394
3395 2003-07-03  Nathan Sidwell  <nathan@codesourcery.com>
3396
3397         PR c++/9162
3398         * decl.c (grokdeclarator): Return friend decls, not
3399         void_type_node.
3400         * decl2.c (grokfield): Alter friend decl check.
3401         * parser.c (struct cp_parser): Document default_arg chain on
3402         unparsed_functions_queue.
3403         (cp_parser_save_default_args): New.
3404         (cp_parser_init_declarator, cp_parser_function_definition,
3405         cp_parser_member_declaration): Call it.
3406         (cp_parser_class_specifier): Remove unused variable. Alter
3407         processing of unparsed_functions_queue.
3408
3409 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3410
3411         * class.c (add_method, check_field_decl): Fix format specifier.
3412         * decl.c (duplicate_decls, pushdecl, check_goto,
3413         fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
3414         start_enum): Likewise.
3415         * decl2.c (ambiguous_decl): Likewise.
3416         * pt.c (redeclare_class_template): Likewise.
3417
3418 2003-07-02  Nathan Sidwell  <nathan@codesourcery.com>
3419
3420         PR c++/10219
3421         * pt.c (type_unification_real): Don't unify exprs of error type.
3422         * tree.c (error_type): Don't die on error_type.
3423
3424         PR c++/9779
3425         * decl2.c (arg_assoc_class): Don't die on NULL type.
3426         * typeck.c (type_unknown_p): Don't die on untyped expressions.
3427
3428 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
3429
3430         PR c++/6949
3431         * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
3432         classes.
3433
3434 2003-07-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3435
3436         * error.c (locate_error): %P takes an `int', not a `tree'.
3437
3438 2003-07-02  Jan Hubicka  <jh@suse.cz>
3439
3440         * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
3441         (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
3442         clear DECL_DEFER_OUTPUT once function is processed; avoid flags
3443         massaging.
3444
3445         * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
3446         (expand_or_defer_fn): Declare.
3447         (lower_function): Declare.
3448         * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
3449         * decl2.c: Include cgraph.h and varpool.h
3450         (maybe_emit_vtables):  Make explicit instantations as needed.
3451         (mark_member_pointers, lower_function): New functions.
3452         (finish_file): Do unit-at-a-time.
3453         * method.c (synthesize_method): Use expand_or_defer_fn.
3454         * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
3455         * parser.c (cp_parser_function_definition_after_decl): Use
3456         expand_or_defer_fn.
3457         * pt.c (instantiate_decl): Likewise.
3458         * semantics.c: Include cgraph.h
3459         (expand_or_defer_fn): Break out from ...
3460         (expand_body): ... here; deal with unit-at-a-time.
3461         * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
3462         LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
3463
3464 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
3465
3466         * call.c (resolve_scoped_fn_name): Return error_mark_node for
3467         erroneous cases.
3468
3469 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
3470
3471         PR c++/11149
3472         * call.c (resolve_scoped_fn_name): Check that the qualifying scope
3473         is a class type.
3474
3475 2003-07-01  Giovanni Bajo  <giovannibajo@libero.it>
3476
3477         PR c++/8046
3478         * error.c (dump_decl): Handle BIT_NOT_EXPR as
3479         pseudo destructor calls.
3480
3481 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
3482
3483         * cp-tree.h (define_label): Replace filename and lineno
3484         arguments with a location_t.
3485         * decl.c (pop_label): Adjust define_label call.
3486         (define_label): Replace filename and lineno arguments with a
3487         location_t.
3488         * semantics.c (finish_label): Adjust define_label call.
3489
3490 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
3491
3492         PR c++/9559
3493         * decl2.c (grokfield): Do not build NOP_EXPRs around the
3494         error_mark_node.
3495
3496 2003-06-30  Neil Booth  <neil@daikokuya.co.uk>
3497
3498         * Make-lang.in: Update.
3499         * cp-lang.c (c_language): Define.
3500         (LANG_HOOKS_INIT_OPTIONS): Use common hook.
3501         * cp-tree.h (cxx_init_options): Remove.
3502         * lex.c: Don't include diagnostic.h.
3503         (cxx_init_options): Remove.
3504
3505 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
3506
3507         PR c++/4933
3508         * error.c (dump_expr): Support correctly the COMPOUND_EXPR
3509         tree generated within a template. Use dump_expr to dump an
3510         expression sizeof.
3511
3512 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
3513
3514         * mangle.c (write_expression): Exit gracefully when trying to
3515         mangle a CALL_EXPR.
3516
3517 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
3518
3519         PR c++/10750
3520         * parser.c (cp_parser_primary_expression): A VAR_DECL with a
3521         (value- or type-) dependent expression as DECL_INITIAL is a
3522         valid constant-expression (at parser time).
3523
3524 2003-06-30  Giovanni Bajo <giovannibajo@libero.it>
3525
3526         PR c++/11106
3527         * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
3528         USING_DECL, instead of print_tree_identifier.
3529
3530 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3531
3532         * cp-tree.h (language_to_string): Adjust declaration.
3533         * dump.c (cp_dump_tree): Adjust usage.
3534         * error.c (dump_char): Use output_formatted_scalar. Tidy.
3535         (parm_to_string): Lose unused parameter.  Tidy.
3536         (expr_to_string): Likewise.
3537         (code_to_string): Likewise.
3538         (language_to_string): Likewise.
3539         (op_to_string): Likewise.
3540         (assop_to_string): Likewise.
3541         (digit_buffer): Remove.
3542         (dump_type): Format builtin vector type as __vector__.
3543
3544 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3545
3546         * error.c (print_integer): Remove.
3547         (dump_type_suffix): Adjust.
3548         (dump_expr): Likewise.
3549
3550 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
3551
3552         * error.c (print_instantiation_partial_context): Take a
3553         location_t.
3554         (print_instantiation_full_context): Adjust.
3555         (print_instantiation_context): Adjust.
3556
3557         * cp-tree.h (cp_line_of, cp_file_of): Remove.
3558         * error.c (cp_line_of, cp_file_of): Merge into ...
3559         (location_of): ... here. Make static, return a location_t.
3560         (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
3561
3562 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
3563
3564         PR c++/10784
3565         * call.c (joust): Move warn_conversion check outwards.
3566
3567 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
3568
3569         * decl.c (build_typename_type)
3570         * mangle.c (write_template_template_arg)
3571         * parser.c (cp_parser_scope_through_which_access_occurs)
3572         * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
3573         * repo.c (get_base_filename)
3574         * semantics.c (maybe_convert_cond):
3575         Mark the definition static, matching the forward declaration.
3576
3577 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
3578
3579         PR c++/10468
3580         * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
3581
3582 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
3583
3584         PR c++/10796
3585         * decl.c (finish_enum): Implement DR377.
3586
3587         * decl.c (cp_finish_decl): Don't make variables with reference
3588         type readonly while they are being initialized.
3589
3590 2003-06-26  Mark Mitchell  <mark@codesourcery.com>
3591
3592         PR c++/11332
3593         * typeck.c (build_static_cast): Avoid returning expressions with
3594         reference type.
3595
3596 2003-06-26  Nathan Sidwell  <nathan@codesourcery.com>
3597
3598         * call.c (build_op_delete_call): Use strip_array_call. Correct
3599         error message to say 'delete' or 'delete[]'.
3600
3601 2003-06-26  Giovanni Bajo  <giovannibajo@libero.it>
3602
3603         PR c++/8266
3604         * pt.c (check_explicit_specialization): When looking up a
3605         template function from an identifier outside class-scope, bind
3606         it to CP_DECL_CONTEXT.
3607
3608 2003-06-25  Mark Mitchell  <mark@codesourcery.com>
3609
3610         PR c++/10990
3611         * search.c (lookup_base_r): Rely on accessible_p, rather than
3612         trying to emulate that logic here.
3613
3614         PR c++/10931
3615         * call.c (convert_like): Pass issue_conversion_warnings.
3616         (convert_like_with_context): Likewise.
3617         (convert_like_real): Add issue_conversion_warnings parameter.
3618         (perform_direct_initialization_if_possible): New function.
3619         * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
3620         * typeck.c (check_for_casting_away_constness): New function.
3621         (build_static_cast): Rewrite.
3622
3623 2003-06-24  Nathan Sidwell  <nathan@codesourcery.com>
3624
3625         * call.c (enforce_access): Assert we get a binfo.
3626         (build_op_delete_call): Pass a binfo to
3627         perform_or_defer_access_check.
3628         * class.c (alter_access): Likewise.
3629         * decl.c (make_typename_type): Likewise.
3630         (make_unbound_class_template): Likewise.
3631         * lex.c (do_identifier): Likewise.
3632         * method.c (hack_identifier): Likewise.
3633         * parser.c (cp_parser_lookup_name): Likewise.
3634         * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
3635         test.
3636         * semantics.c (finish_non_static_data_member): Likewise.
3637         (perform_or_defer_access_check): Expect a binfo.
3638         * typeck.c (comptypes): Expect types.
3639
3640         * mangle.c (find_substitution): Don't pass a non-type to same_type_p
3641         * friend.c (make_friend_class): Likewise.
3642         * pt.c (check_default_tmpl_args): Likewise.
3643         (lookup_template_class): Likewise.
3644
3645 2003-06-24  Jan Hubicka  <jh@suse.cz>
3646
3647         * method.c (thunk_labelno): Move outside ifdef block to make garbage
3648         collector happy.
3649
3650 2003-06-24  Jan Hubicka  <jh@suse.cz>
3651
3652         * class.c (build_vtable): Make vtables.
3653         * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
3654         * decl2.c (output_vtable_inherit): Rename to ...
3655         (prepare_assemble_variable): ... this one; change interface.
3656         (maybe_emit_vtables): Do not call output_vtable_inherit.
3657         * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
3658         * cp-tree.h (prepare_assemble_variable): New.
3659
3660 2003-06-23  Andrew Pinski <pinskia@physics.uc.edu>
3661
3662         * method.c: add prototype for make_alias_for_thunk.
3663         (thunk_labelno, make_alias_for_thunk): only define
3664         if ASM_OUTPUT_DEF is defined.
3665
3666 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
3667
3668         * method.c (thunk_labelno): New variable.
3669         (make_alias_for_thunk): New function.
3670         (use_thunk): Use it if defined ASM_OUTPUT_DEF.  Put the thunk
3671         into the same section as the function it is calling.
3672         Include gt-cp-method.h.
3673         * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
3674         (cp/method.o): Depend on gt-cp-method.h.
3675         * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
3676
3677 2003-06-23  Jan Hubicka  <jh@suse.cz>
3678
3679         * decl.c (register_dtor_fn): Mark cleanup as used.
3680         * decl2.c (mark_vtable_entries): Skip nops.
3681         * rtti.c (get_tinfo_ptr): Mark tinfo as used.
3682         (build_dynamic_cast_1): Likewise.
3683         (tinfo_base_init): Likewise.
3684         (emit_tinfo_decl): Likewise.
3685
3686 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
3687
3688         * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
3689         to it.
3690
3691 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
3692
3693         PR c++/10784
3694         * call.c (joust): Warn about choosing conversion sequence only if
3695         -Wconversion.
3696
3697 2003-06-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3698
3699         PR c++/10864
3700         * call.c (op_error): Tidy.
3701         * error.c (dump_expr): Properly format 'T()' when T is an
3702         aggregate type.
3703
3704 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
3705
3706         PR c++/10915
3707         * decl.c (grok_op_properties): Warn possible confusing conversion
3708         only if -Wconversion.
3709
3710 2003-06-20  Mark Mitchell  <mark@codesourcery.com>
3711
3712         PR c++/10749
3713         * parser.c (cp_parser_class_head): See through dependent names
3714         when parsing a class-head.
3715
3716         PR c++/10845
3717         * pt.c (try_class_unification): Correct handling of member class
3718         templates.
3719
3720 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
3721
3722         * semantics.c (genrtl_finish_function): Adjust
3723         expand_function_end call.
3724
3725 2003-06-19  Mark Mitchell  <mark@codesourcery.com>
3726
3727         PR c++/10939
3728         * pt.c (tsubst_decl): Do not try to substitute into non-dependent
3729         functions.
3730         (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
3731
3732         PR c++/9649
3733         * cp-tree.h (pushdecl_class_level): Change prototype.
3734         (push_class_level_binding): Likewise.
3735         * decl.c (add_binding): Reject duplicate static data members.
3736         (pushdecl_class_level): Return a value indicating whether or not
3737         the binding was valid.
3738         (push_class_level_binding): Likewise.
3739         * semantics.c (finish_member_declaration): Don't keep invalid
3740         declarations.
3741
3742         PR c++/11041
3743         * call.c (initialize_reference): Do not use cp_finish_decl to emit
3744         temporary variables.
3745         * cp-tree.h (static_aggregates): Declare.
3746         (pushdecl_top_level_and_finish): Likewise.
3747         * decl.c (pushdecl_top_level_1): New function.
3748         (pushdecl_top_level): Use it.
3749         (pushdecl_top_level_and_finish): New function.
3750         (initialize_local_var): Remove redundant code.
3751         (cp_finish_decl): Remove support for RESULT_DECLs.  Don't check
3752         building_stmt_tree.
3753         * decl.h (static_aggregates): Remove.
3754         * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
3755         * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
3756         (tinfo_base_init): Likewise.
3757
3758 2003-06-19  Matt Austern  <austern@apple.com>
3759
3760         PR c++/11228
3761         * init.c (build_zero_init): Assert that number of array elements
3762         is an integer constant.
3763         (build_default_init) Don't use build_zero_init for arrays with
3764         variable number of elements.
3765
3766 2003-06-19  Andreas Jaeger  <aj@suse.de>
3767
3768         * cp-tree.h: Remove duplicated declarations.
3769
3770 2003-06-18  Nathanael Nerode  <neroden@gcc.gnu.org>
3771
3772         * pt.c: Convert to ISO C.
3773         * semantics.c: Convert to ISO C.
3774
3775 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
3776
3777         * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
3778         at_least_as_qualified_p, more_qualified_p): Return bool.
3779         * typeck.c: ANSIFY function definitions.
3780         (comp_array_types): Take redeclaration bool parameter.
3781         (comptypes): Rearrange STRICT handling.
3782         (at_least_as_qualified_p, more_qualified_p,
3783         comp_cv_qualification): Cache cv quals.
3784         (compparms): Rearrange loop.
3785
3786 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
3787
3788         * cp-tree.h (COMPARE_RELAXED): Rename to ...
3789         (COMPARE_DERIVED): ... here. Adjust comment.
3790         (resolve_typename_type_in_current_instantiation): Remove.
3791         (cp_tree_equal, comptypes): Return a bool.
3792         * cvt.c (convert_to_reference): Adjust comptypes call.
3793         * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
3794         (resolve_typename_type_in_current_instantiation): Remove.
3795         * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
3796         IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
3797         calls. Refactor code.
3798         * typeck.c (comp_array_types): Return bool. Lose callback.
3799         parameter. Adjust cp_tree_equal calls.
3800         (comptypes): Return bool. Adjust strict handling. Remove relaxed
3801         enumeration and java type handling. Deal with typename types here.
3802         Adjust recursive and cp_tree_equals calls. Adjust base and derived
3803         checking.
3804         (comp_target_types): Remove unreachable code. Adjust
3805         same_or_base_type_p calls.
3806         (ptr_reasonably_similar): Adjust base and derived check.
3807
3808         * typeck.c (maybe_warn_about_returning_address_of_local): Remove
3809         unused calculation.
3810         (check_return_expr): Adjust error messages.
3811         * cp-tree.def (SCOPE_REF): Correct comment.
3812
3813 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
3814
3815         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3816         string again.
3817
3818 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
3819
3820         * optimize.c (dump_function): Form complete flag name by
3821         prefixing 'fdump-' to string returned by dump_flag_name().
3822
3823 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
3824
3825         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3826         string.
3827
3828 2003-06-17  Jason Merrill  <jason@redhat.com>
3829
3830         PR c++/10929
3831         * decl.c (grokfndecl): Don't mark a function inline for
3832         -finline-functions if it isn't defined.
3833
3834 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
3835
3836         PR c++/10712
3837         * class.c (handle_using_decl): Robustify.
3838
3839         PR c++/11105
3840         * cp-tree.h (DECL_CONV_FN_TYPE): New method.
3841         * mangle.c (struct globals): Remove internal_mangling_p.
3842         (write_unqualified_name): Use DECL_CONV_FN_TYPE.
3843         (write_template_parm): Don't write out the level number.
3844         (conv_type_names): New variable.
3845         (hash_type): New function.
3846         (compare_type): Likewise.
3847         (mangle_conv_op_name_for_type): Don't try to mangle conversion
3848         operator names.
3849         * search.c (lookup_conversion_operator): New function.
3850         (lookup_fnfields_1): Use it.
3851
3852 2003-06-17  Andreas Jaeger  <aj@suse.de>
3853
3854         * except.c: Remove duplicate declaration of push_eh_cleanup.
3855
3856         * call.c: Remove extra declaration of inhibit_warnings.
3857
3858 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
3859
3860         2003-06-16  Jens-Michael Hoffmann  <jensmh@gmx.de>
3861         * mangle.c: Convert to ISO C.
3862
3863 2003-06-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3864
3865         * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
3866         macro.
3867
3868 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
3869
3870         * tree.c: Convert to ISO C.
3871
3872 2003-06-16  Kazu Hirata  <kazu@cs.umass.edu>
3873
3874         * cp-tree.h: Follow spelling conventions.
3875         * mangle.c: Likewise.
3876         * method.c: Likewise.
3877         * parser.c: Likewise.
3878
3879 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
3880
3881         * decl.c (start_function): Adjust init_function_start call.
3882         * method.c (use_thunk): Likewise.
3883         * semantics.c (genrtl_start_function): Likewise.
3884
3885 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
3886
3887         * Make-lang.in: Remove c-options.o.
3888
3889 2003-06-13  Nathanael Nerode  <neroden@gcc.gnu.org>
3890
3891         * lex.c: Convert to ISO C.
3892
3893         2003-05-19  Jens-Michael Hoffmann  <jensmh@gmx.de>
3894         * init.c: removes use of PARAMS macro.  Use ISO style function
3895         declarations.  (Not copyright-significant change.)
3896
3897         * rtti.c: Remove PARAMS.
3898
3899         * typeck2.c: Convert to ISO C.
3900
3901 2003-06-12  Mark Mitchell  <mark@codesourcery.com>
3902
3903         PR c++/10635
3904         * typeck.c (build_c_cast): Check that the destination type is
3905         complete.
3906
3907 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
3908
3909         PR c++/10432
3910         * cp-tree.h (finish_declarator): Remove.
3911         * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
3912         erroneous declarations.
3913         * semantics.c (finish_declarator): Remove.
3914
3915 2003-06-11  Roger Sayle  <roger@eyesopen.com>
3916
3917         * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
3918         global static constructor/destructor if it will be empty, i.e.
3919         either doesn't call any ctors/dtors or only calls pure or const
3920         ctors/dtors.
3921
3922 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
3923
3924         * mangle.c (tm_p.h): Include it.
3925         * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
3926
3927         PR c++/11131
3928         * tree.c (cp_cannot_inline_fn): Check for "inline" before
3929         instantiation.
3930
3931 2003-06-10  Jason Merrill  <jason@redhat.com>
3932
3933         PR c++/10968
3934         * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
3935
3936 2003-06-10  Andrew Pinski  <pinskia@physics.uc.edu>
3937
3938         * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
3939         (start_cleanup_cnt): New.
3940
3941 2003-06-10  Mark Mitchell  <mark@codesourcery.com>
3942
3943         PR c++/11131
3944         * cp-tree.h (template_for_substitution): Declare.
3945         * decl2.c (mark_used): Use it when figuring out whether or not a
3946         function is inline.
3947         * pt.c (template_for_substitution): Give it external linkage.
3948         * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
3949         possible.
3950
3951 2003-06-09  Zack Weinberg  <zack@codesourcery.com>
3952
3953         PR 8861
3954         * mangle.c (write_real_cst): New function.  Implement
3955         ABI-compliant mangling of floating-point literals when
3956         -fabi-version>=2; provide backward compatibility with 3.3 when
3957         -fabi-version=1 (with warning).  Clarify commentary.
3958         (write_template_arg_literal): Use write_real_cst.
3959
3960 2003-06-07  Andreas Jaeger  <aj@suse.de>
3961
3962         * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
3963
3964 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
3965
3966         * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
3967         (LANG_HOOKS_HANDLE_OPTION): Override.
3968         * cp-tree.h (cxx_init_options): Update.
3969         * lex.c (cxx_init_options): Update.
3970
3971 2003-06-05  Jan Hubicka  <jh@suse.cz>
3972
3973         * Make-lang.in:  Add support for stageprofile and stagefeedback
3974
3975 2003-06-04  J"orn Rennecke <joern.rennecke@superh.com>
3976
3977         * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
3978
3979 2003-06-04  Andreas Jaeger  <aj@suse.de>
3980
3981         * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
3982
3983 2003-06-03  Jason Merrill  <jason@redhat.com>
3984
3985         * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
3986
3987         * cp/decl.c (reshape_init): Handle vectors.
3988
3989         * testsuite/g++.dg/init/array10.C: New.
3990
3991 2003-06-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3992
3993         PR c++/10940
3994         * pt.c (check_explicit_specialization): Check for 'static'
3995         earlier.
3996
3997 2003-05-31  Diego Novillo  <dnovillo@redhat.com>
3998
3999         * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
4000         the operand of a CONSTRUCTOR node.
4001
4002 2003-05-31  Gabriel Dos Reis <gdr@integrable-solutions.net>
4003
4004         * decl.c (cp_binding_level::this_entity): Rename from this_class.
4005         (cxx_scope_descriptor): New function.
4006         (cxx_scope_debug): Likewise.
4007         (push_binding_level): Use it.
4008         (pop_binding_level): Likewise.
4009         (suspend_binding_level): Likewise.
4010         (resume_binding_level): Likewise.
4011         (pushlevel_class): Adjust use of this_class.
4012         (pushtag): Likewise.
4013         (lookup_name_real): Likewise.
4014         (global_scope_name): New variable.
4015         (initialize_predefined_identifiers): Initialize it.
4016         (push_namespace): Use it.
4017         (make_cxx_scope): New function.
4018         (pushlevel): Use it.
4019         (pushlevel_class): Likewise.
4020         (push_binding_level): Simplify.  Loose the last two arguments.
4021         (make_binding_level): Remove.
4022         (initial_push__namespace_scope): New function.
4023         (push_namespace): Use it.  Simplify.
4024         (cxx_init_decl_processing): Likewise.
4025         (declare_namespace_level): Remove.
4026
4027 2003-05-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4028
4029         PR c++/10956
4030         * pt.c (instantiate_decl): Don't use full template arguments if
4031         we are dealing with specializations.
4032
4033 2003-05-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4034
4035         * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
4036         (binding_depth): Unconditionally define.
4037         (is_class_level): Likewise.
4038         (indent): Likewise.  Take an indenting parameter.
4039         (push_binding_level): Remove conditional definittion.
4040         (pop_binding_level): Likewise.
4041         (suspend_binding_level): Likewise.
4042         (resume_binding_level): Likewise.
4043         (pushlevel): Likewise.
4044         (pushlevel_class): Likewise.
4045         (poplevel_class): Likewise.
4046         (pop_everything): Likewise.
4047
4048 2003-05-27  Gabriel Dos Reis <gdr@integrable-solutions.net>
4049
4050         * name-lookup.h (global_scope_p): New macro.
4051         * decl.c (pop_binding_level): Use it.  Don't refer directly to
4052         global_binding_level.
4053         (suspend_binding_level): Likewise.
4054         (global_bindings_p): Likewise.
4055         (print_other_binding_stack): Likewise.
4056         (print_binding_stack): Likewise.
4057         (maybe_push_to_top_level): Likewise.
4058         (pushdecl_namespace_level): Likewise.
4059         (cxx_init_decl_processing): Likewise.
4060         (start_decl): Likewise.
4061         (cp_finish_decl): Likewise.
4062         (start_function): Likewise.
4063         (global_binding_level): Remove.
4064
4065 2003-05-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4066
4067         * parser.c (cp_parser_explicit_instantiation): Restore old
4068         access before template instantiation.
4069
4070 2003-05-23  Geoffrey Keating  <geoffk@apple.com>
4071
4072         * lang-specs.h: Use -o to specify preprocessor's output file.
4073         Make -no-integrated-cpp work when building PCH files.
4074
4075 2003-05-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4076
4077         PR c++/10682
4078         * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
4079         check for implicitly created typedef to an enum.
4080
4081 2003-05-21  Jason Merrill  <jason@redhat.com>
4082
4083         * init.c (build_vec_delete): Copy the address into a temporary
4084         variable before calling build_vec_delete_1.
4085         * decl2.c (delete_sanity): Don't call stabilize_reference.
4086
4087 2003-05-21  Nathan Sidwell  <nathan@codesourcery.com>
4088
4089         * pt.c (register_specialization): Update the decl's location,
4090         if necessary.
4091         (check_explicit_specialization): Likewise.
4092
4093 2003-05-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4094
4095         * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
4096
4097 2003-05-21  Danny Smith  <dannysmith@users.sourceforge.net>
4098
4099         PR c++/9738
4100         * decl.c (duplicate_decls): Re-invoke make_decl_rtl
4101         if the old decl had instantiated DECL_RTL.
4102         (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
4103
4104 2003-05-19  Matt Austern  <austern@apple.com>
4105
4106         * lang-options.h: Document -Wno-invalid-offsetof
4107         * typeck.c (build_class_member_access_expr): Don't complain about
4108         (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
4109
4110 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
4111
4112         * name-lookup.c (free_binding_entry): fix where the GTY markers are.
4113         (binding_entry_make): Make entry->chain NULL after getting an entry.
4114         fix the spelling of chain in a comment.
4115         (binding_table_free): speed up by having temporary variable.
4116         (binding_table_new): set table->chain to be NULL after allocating
4117         a table.
4118         (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
4119         binding->previous to NULL after getting an binding for speed.
4120
4121 2003-05-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4122
4123         * cp-tree.h (struct lang_type_class): Replace data member tags
4124         with hash-table nested_udts.
4125         (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
4126         * class.c (unreverse_member_declarations): Don't touch
4127         CLASSTYPE_TAGS.
4128         (pushclass): Use cxx_remember_type_decls.
4129         * decl.c (struct cp_binding_level): Replace data member tags with
4130         hash-table type_decls.
4131         (pop_binding_level): Handle level->type_decls.
4132         (kept_level_p): Adjust.
4133         (poplevel): Remove unused local variable.
4134         (bt_print_entry): New function.
4135         (print_binding_level): Use it.
4136         (push_namespace): Build current_binding_level->type_decls.
4137         (maybe_process_template_type_declaration): Adjust.
4138         (pushtag): Likewise.
4139         (clear_anon_tags): Use binding_table_remove_anonymous_types.
4140         (gettags): Remove.
4141         (cxx_remember_type_decls):  Rename from storetags.  Adjust.
4142         (lookup_tag): Use binding_table_find_anon_type.  Tidy.
4143         (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
4144         (cxx_init_decl_processing): Build global_binding_level->type_decls.
4145         (store_parm_decls): Remove pointless code.
4146         * name-lookup.c (free_binding_entry): New variable.
4147         (ENTRY_INDEX): New macro.
4148         (struct binding_table_s): New datatype.
4149         (binding_entry_make): New function.
4150         (binding_entry_free): Likewise.
4151         (binding_table_construct): Likewise.
4152         (binding_table_free): Likewise.
4153         (binding_table_new): Likewise.
4154         (binding_table_expand): Likewise.
4155         (binding_table_insert): Likewise.
4156         (binding_table_find): Likewise.
4157         (binding_table_find_anon_type): Likewise.
4158         (binding_table_reverse_maybe_remap): Likewise.
4159         (binding_table_remove_anonymous_types): Likewise.
4160         (binding_table_foreach): Likewise.
4161         * name-lookup.h (binding_table): New type.
4162         (binding_entry): Likewise.
4163         (bt_foreach_proc): Likewise.
4164         (struct binding_entry_s): New datatype.
4165         (SCOPE_DEFAULT_HT_SIZE): New macro.
4166         (CLASS_SCOPE_HT_SIZE): Likewise.
4167         (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
4168         (NAMESPACE_STD_HT_SIZE): Likewise.
4169         (GLOBAL_SCOPE_HT_SIZE): Likewise.
4170         (binding_table_new): Declare.
4171         (binding_table_free): Likewise.
4172         (binding_table_insert): Likewise.
4173         (binding_table_find_anon_type): Likewise.
4174         (binding_table_reverse_maybe_remap): Likewise.
4175         (binding_table_remove_anonymous_types): Likewise.
4176         (binding_table_foreach): Likewise.
4177         (binding_table_find): Likewise.
4178         (cxx_remember_type_decls): Likewise.
4179         * pt.c (bt_instantiate_type_proc): New function.
4180         (do_type_instantiation): Use it.
4181         * search.c (lookup_field_r): Use binding_table_find.
4182
4183 2003-05-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4184
4185         * semantics.c (perform_deferred_access_checks): Don't discard
4186         checked access.
4187
4188 2003-05-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4189
4190         * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
4191         libiberty VA_ macros, always use stdarg.
4192         * rtti.c (create_pseudo_type_info): Likewise.
4193         * tree.c (build_min_nt, build_min): Likewise.
4194
4195 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4196
4197         * ptree.c (cxx_print_type, cxx_print_xnode): Use string
4198         concatentation on HOST_WIDE_INT_PRINT_* format specifier to
4199         collapse multiple function calls into one.
4200         * tree.c (debug_binfo): Likewise.
4201
4202 2003-05-15  Jason Merrill  <jason@redhat.com>
4203
4204         PR c++/5388
4205         * call.c (conditional_conversion): Don't consider implicit
4206         conversions if T2 is a base of T1.
4207         * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
4208         (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
4209
4210         * parser.c (cp_parser_primary_expression): Convert a static data
4211         member from reference.
4212
4213 2003-05-15  Mark Mitchell  <mark@codesourcery.com>
4214
4215         * call.c (build_op_delete_call): Avoid creating unnecessary types.
4216         * class.c (instantiate_type): Remove tests for tf_no_attributes.
4217         * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
4218         (COMPARE_NO_ATTRIBUTES): Remove.
4219         * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
4220
4221         PR c++/8385
4222         * semantics.c (finish_typeof): Refine type-dependency check.
4223
4224 2003-05-13  Jason Merrill  <jason@redhat.com>
4225
4226         * typeck.c (build_modify_expr): Don't always stabilize the lhs and
4227         rhs.  Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
4228
4229 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4230
4231         * method.c (synthesize_method): Call push/pop_deferring_access_checks.
4232
4233 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4234
4235         PR c++/10230, c++/10481
4236         * semantics.c (finish_non_static_data_member): Handle when the
4237         non-static member is not from a base of the current class type.
4238
4239 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4240
4241         PR c++/10552
4242         * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
4243         template and has dependent context.
4244
4245 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4246
4247         * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
4248
4249 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4250
4251         PR c++/9252
4252         * cp-tree.h (saved_scope): Remove check_access field.
4253         (tsubst_flags_t): Remove tf_parsing.
4254         * decl.c (maybe_push_to_top_level): Don't initialize
4255         scope_chain->check_access.
4256         (make_typename_type, make_unbound_class_template): Don't use
4257         tf_parsing.
4258         (register_dtor_fn): Use push/pop_deferring_access_checks
4259         instead of scope_chain->check_access.
4260         * method.c (use_thunk): Likewise.
4261         * parser.c (cp_parser_explicit_instantiation
4262         (cp_parser_constructor_declarator_p): Don't call
4263         push/pop_deferring_access_checks here.
4264         (cp_parser_template_argument, cp_parser_class_name): Don't use
4265         tf_parsing.
4266         (yyparse): Check flag_access_control.
4267         * pt.c (instantiate_class_template): Call
4268         push/pop_deferring_access_checks.
4269         * semantics.c (push_deferring_access_checks): Propagate
4270         dk_no_check.
4271         (perform_or_defer_access_check): Make sure basetype_path is
4272         a type before comparison.
4273         * call.c (build_op_delete_call, build_over_call): Use
4274         perform_or_defer_access_check.
4275         * class.c (alter_access): Likewise.
4276         * init.c (build_offset_ref): Likewise.
4277         * lex.c (do_identifier): Likewise.
4278         * method.c (hack_identifier): Likewise.
4279         * search.c (lookup_member): Likewise.
4280         * semantics.c (finish_non_static_data_member): Likewise.
4281         (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
4282         instead of flag_access_control.
4283
4284 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4285
4286         PR c++/9554
4287         * parser.c (cp_parser_class_name): Remove check_access parameter.
4288         All caller adjusted.  Update declaration.
4289         (cp_parser_lookup_name): Likewise.
4290         * semantics.c (push_deferring_access_checks): Change parameter type
4291         to enum deferring_kind.  All caller adjusted.
4292         (resume_deferring_access_checks): Adjust to use new enum.
4293         (stop_deferring_access_checks): Likewise.
4294         (perform_or_defer_access_check): Likewise.
4295         * cp-tree.h (deferring_kind): New enum.
4296         (deferred_access): Adjust field type.
4297         (push_deferring_access_checks): Update declaration.
4298
4299 2003-05-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4300
4301         PR c++/10555, c++/10576
4302         * pt.c (lookup_template_class): Handle class template with
4303         multiple levels of parameters when one of the levels contain
4304         errors.
4305
4306 2003-05-08  Jason Merrill  <jason@redhat.com>
4307
4308         * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
4309         expression.  Undo some of the recent reorg.
4310
4311 2003-05-07  Richard Henderson  <rth@redhat.com>
4312
4313         PR c++/10570
4314         * cfns.gperf: Comment out POSIX thread cancellation points,
4315         plus abort and raise.
4316         * cfns.h: Regenerate.
4317
4318 2003-05-07  Jason Merrill  <jason@redhat.com>
4319
4320         * call.c (build_conditional_expr): Don't assume that the folded
4321         expression has result_type.
4322
4323 2003-05-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4324
4325         * typeck.c (build_unary_op): Deal with const qualifier in
4326         invalid pointer-to-member earlier.
4327
4328 2003-05-05  Jason Merrill  <jason@redhat.com>
4329
4330         PR c++/9537
4331         * call.c (conditional_conversion): Build an RVALUE_CONV if
4332         we're just changing the cv-quals.
4333         (build_conditional_expr): Don't call convert to change
4334         cv-quals.
4335
4336 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4337
4338         PR c++/10496
4339         * typeck.c (build_unary_op): Don't output const qualifier when
4340         output invalid pointer-to-member diagnostics.
4341
4342 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4343
4344         * decl.c: Fix typos.
4345
4346 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4347
4348         PR c++/4494
4349         * decl.c (start_function): Use same_type_p to check return type
4350         of main.
4351
4352 2003-05-03  Zack Weinberg  <zack@codesourcery.com>
4353
4354         PR c/10604
4355         * cp/typeck.c (build_x_compound_expr): No need to check
4356         extra_warnings as well as warn_unused_value.
4357
4358 2003-05-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4359
4360         PR c++/9364, c++/10553, c++/10586
4361         * decl.c (make_typename_type): Don't crash on illegal code.
4362
4363 2003-05-03  Nathan Sidwell  <nathan@codesourcery.com>
4364
4365         * class.c (finish_struct): Use location_t and input_location
4366         directly.
4367         * decl.c (make_label_decl): Likewise.
4368         (use_label): Likewise.
4369         * decl2.c (warn_if_unknown_interface): Likewise.
4370         (start_static_initialization_or_destruction): Likewise.
4371         (generate_ctor_or_dtor_function): Likewise.
4372         (finish_file): Likewise.
4373         * error.c (print_instantiation_full_context): Likewise.
4374         * init.c (create_temporary_var): Likewise.
4375         * method.c (synthesize_method): Likewise.
4376         * parser.c (cp_token): Likewise.
4377         (cp_lexer_set_source_position_from_token): Likewise.
4378         (cp_lexer_get_preprocessor_token): Likewise.
4379         (cp_parser_statement): Likewise.
4380         * pt.c (tsubst_friend_function): Likewise.
4381         (instantiate_class_template): Likewise.
4382         (tsubst_decl): Likewise.
4383         (tsubst): Likewise.
4384         (instantiate_decl): Likewise.
4385         * semantics.c (begin_class_definition): Likewise.
4386         (expand_body): Likewise.
4387
4388 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
4389
4390         * class.c (finish_struct): Rename lineno to input_line.
4391         * decl.c (push_binding_level, pop_binding_level,
4392         suspend_binding_level, resume_binding_level, make_label_decl,
4393         use_label, start_function): Likewise.
4394         * decl2.c (warn_if_unknown_interface,
4395         start_static_initialization_or_destruction,
4396         generate_ctor_or_dtor_function, finish_file): Likewise.
4397         * error.c (cp_line_of, print_instantiation_full_context,
4398         print_instantiation_context): Likewise.
4399         * except.c (check_handlers_1, check_handlers): Likewise.
4400         * init.c (create_temporary_var): Likewise.
4401         * method.c (use_thunk, synthesize_method): Likewise.
4402         * parser.c (cp_lexer_set_source_position_from_token,
4403         cp_lexer_get_preprocessor_token): Likewise.
4404         * pt.c (push_tinst_level, pop_tinst_level,
4405         tsubst_friend_function, instantiate_class_template, tsubst_decl,
4406         tsubst, tsubst_expr, instantiate_decl): Likewise.
4407         * semantics.c (genrtl_try_block, finish_label_stmt,
4408         begin_class_definition, expand_body,
4409         genrtl_finish_function): Likewise.
4410         * tree.c (build_min_nt, build_min): Likewise.
4411
4412 2003-05-01  Mark Mitchell  <mark@codesourcery.com>
4413
4414         * decl2.c (comdat_linkage): Don't externalize explicit
4415         instantiations.
4416
4417 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4418
4419         PR c++/10554
4420         * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
4421         is not NULL.
4422
4423 2003-05-01  Steven Bosscher  <steven@gcc.gnu.org>
4424
4425         * cp-tree.h (struct lang_id2): Remove.  Move fields from here...
4426         (struct lang_identifier): ... to here.
4427         (LANG_ID_FIELD): Remove.
4428         (SET_LANG_ID): Remove.
4429         (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
4430         (SET_IDENTIFIER_LABEL_VALUE): Likewise.
4431         (IDENTIFIER_IMPLICIT_DECL): Likewise.
4432         (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
4433         (IDENTIFIER_ERROR_LOCUS): Likewise.
4434         (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
4435
4436 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4437
4438         PR c++/8772
4439         * pt.c (convert_template_argument): Correct diagnostic.
4440
4441 2003-04-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4442
4443         PR c++/9432, c++/9528
4444         * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
4445
4446 2003-04-30  Garbiel Dos Reis  <gcc@integrable-solutions.net>
4447
4448         * decl.c (check_previous_goto_1): Adjust prototype.
4449         (check_previous_goto): Adjust use.
4450         (check_switch_goto): Likewise.
4451         (use_label): Adjust.
4452         (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
4453         (struct named_label_use_list): Use location_t datatype.
4454
4455 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
4456
4457         PR c++/10551
4458         * pt.c (mark_decl_instantiated): Defer all explicit instantiations
4459         that have not yet been written out.
4460
4461 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
4462
4463         PR c++/10549
4464         * class.c (layout_class_type): Mark overlong bitfields as having
4465         the maximum size permitted by their type, after layout.
4466
4467         PR c++/10527
4468         * error.c (dump_expr): Correctly handling of NEW_EXPR.4
4469
4470 2003-04-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4471
4472         * call.c (build_operator_new_call): Fix typo.
4473         * lang-options.h: Likewise.
4474
4475 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
4476
4477         PR c++/10515
4478         * cp-tree.h (lookup_field_1): Declare it.
4479         * search.c (lookup_field_1): Make it public.
4480         * decl.c (reshape_init): Handle designated initializers.
4481
4482         * decl.c (maybe_commonize_var): Further tweak support for systems
4483         without weak symbols.
4484
4485 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
4486
4487         * decl.c (maybe_commonize_var): Fix thinko in last patch.
4488
4489 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
4490
4491         PR c++/10506
4492         * method.c (use_thunk): Decrement immediate_size_expand.
4493
4494         PR c++/10503
4495         * cp-tree.h (DECL_VAR_MARKED_P): New macro.
4496         (DECL_MAYBE_TEMPLATE): Remove.
4497         * class.c (fixed_type_or_null): Avoid infinite recursion.
4498
4499         * decl.c (maybe_commonize_var): Make the code match the comments.
4500         * pt.c (instantiate_decl): Move call to import_export_decl.
4501
4502 2003-04-26  Mark Mitchell  <mark@codesourcery.com>
4503
4504         * decl2.c (finish_file): Fix merge botch.
4505
4506 2003-04-25  Mark Mitchell  <mark@codesourcery.com>
4507
4508         * decl2.c (finish_file): Don't call import_export_decl for
4509         functions that are not defined.
4510         (handle_class_head): Robustify.
4511         * pt.c (instantiate_decl): Do not call cp_finish_decl for
4512         variables that are not defined.
4513
4514 2003-04-24  Sylvain Pion  <Sylvain.Pion@mpi-sb.mpg.de>
4515
4516         * call.c (print_z_candidates): Fix off by one error.
4517
4518 2003-04-24  Nathan Sidwell  <nathan@codesourcery.com>
4519
4520         PR c++/10337
4521         * call.c (joust): Don't warn about conversion ops that are exact
4522         or cv-conversions. Rearrange to avoid multiple type comparisons.
4523
4524 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
4525
4526         PR c++/10471
4527         * call.c (build_cxx_call): Robustify.
4528
4529 2003-04-23  Neil Booth  <neil@daikokuya.co.uk>
4530
4531         * Make-lang.in (lex.o): Remove mbchar.h.
4532         * lex.c (MULTIBYTE_CHARS): Lose.
4533         * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
4534         in c-lex.c.
4535
4536 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
4537
4538         PR c++/9847
4539         * cp-tree.h (duplicate_tag_error): Remove.
4540         * class.c (duplicate_tag_error): Remove.
4541         * semantics.c (begin_class_definition): Return immediately for a
4542         duplicate class definition.
4543
4544         PR c++/10451
4545         * decl.c (grokdeclarator): Correct logic for "mutable" errors.
4546
4547 2003-04-22  Mark Mitchell  <mark@codesourcery.com>
4548
4549         PR c++/10446
4550         * search.c (lookup_fnfields_1): Handle empty slots in the method
4551         vector.
4552
4553         PR c++/10428
4554         * decl.c (check_elaborated_type_specifier): New function, split
4555         out from ...
4556         (xref_tag): ... here.  Use the new function in more places.
4557
4558         * rtti.c (throw_bad_typeid): Use build_cxx_call.
4559
4560 2003-04-21  Mark Mitchell  <mark@codesourcery.com>
4561
4562         * call.c (build_over_call): Use build_cxx_call.
4563         (build_cxx_call): New method, split out of build_over_call.
4564         * cp-tree.h (language_function): Add can_throw.
4565         (build_cxx_call): Declare it.
4566         * decl.c (finish_function): If a function does not contain any
4567         calls to functions that can throw an exception, indicate that
4568         fact.
4569         * decl2.c (mark_used): Do not defer the instantiation of
4570         functions, if the current function does not throw.
4571         * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
4572         * pt.c (instantiate_decl): Make sure import_export_decl is called
4573         before emitting things.
4574         * rtti.c (throw_bad_cast): Use build_cxx_call.
4575         (build_dynamic_cast_1): Likewise.
4576         * typeck.c (build_function_call): Likewise.
4577
4578 2003-04-21  Nathan Sidwell  <nathan@codesourcery.com>
4579
4580         PR c++/9881
4581         * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
4582         expressions. Reverts my 2002-08-08 patch.
4583
4584         * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
4585         cheaper early exit.
4586
4587 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
4588
4589         * cp/decl2.c (start_static_storage_duration_function): Take count
4590         arg, don't check if it wraps round.
4591         (generate_ctor_or_dtor_function): Add locus arg, use it.
4592         (generate_ctor_and_dtor_functions_for_priority): Data arg is a
4593         locus.
4594         (finish_file): Set line numbers to past EOF for synthesized
4595         functions.
4596
4597 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
4598
4599         PR c++/10405
4600         * search.c (lookup_field_1): Final scan goes backwards for
4601         types, forwards for non-types.
4602
4603 2003-04-17  Roger Sayle  <roger@eyesopen.com>
4604
4605         PR c/10375
4606         * decl.c (duplicate_decls): Preserve "const", "noreturn" and
4607         "nothrow" function attributes.
4608
4609 2003-04-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4610
4611         PR c++/10347
4612         * pt.c (type_dependent_expression_p): Handle array new.
4613
4614 2003-04-15  Mark Mitchell  <mark@codesourcery.com>
4615
4616         PR c++/10381
4617         * parser.c (cp_parser_primary_expression): Reorganize logic for
4618         dealing with name lookup failures.
4619
4620 2003-04-15  Jason Merrill  <jason@redhat.com>
4621
4622         * decl2.c (mark_used): Don't instantiate anything if
4623         skip_evaluation.
4624
4625 2003-04-14  Ziemowit Laski  <zlaski@apple.com>
4626
4627         * tree.c (build_cplus_array_type_1): Do not call
4628         uses_template_parms() on a NULL index_type.
4629
4630 2003-04-13  Roger Sayle  <roger@eyesopen.com>
4631
4632         * decl.c (duplicate_decls): Preserve pure and malloc attributes.
4633
4634 2003-04-12  Mark Mitchell  <mark@codesourcery.com>
4635
4636         PR c++/10300
4637         * init.c (build_new_1): Reorganize.
4638
4639 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
4640
4641         * class.c (initialize_array)
4642         * decl.c (reshape_init)
4643         * decl2.c (build_expr_from_tree)
4644         * init.c (build_zero_init)
4645         * pt.c (tsubst_copy, tsubst_copy_and_build)
4646         * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
4647         (ptm_initializer, class_initializer, get_pseudo_ti_init)
4648         * semantics.c (finish_compound_literal)
4649         * typeck.c (build_ptrmemfunc1)
4650         * typeck2.c (store_init_value, process_init_constructor)
4651         (build_functional_cast): Use build_constructor.
4652
4653 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
4654
4655         * call.c (print_z_candidates): Use gcc_gettext_width, not
4656         strlen, to determine how much padding to use.
4657
4658 2003-04-10  Zack Weinberg  <zack@codesourcery.com>
4659
4660         * decl.c: Update all calls to shadow_warning.
4661
4662 2003-04-10  Mark Mitchell  <mark@codesourcery.com>
4663
4664         * class.c (layout_class_type): Correct handling for overlong
4665         bit-fields whose width is the same as an integer type.
4666
4667 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
4668
4669         * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
4670         * cp-lang.c (cp_tree_size): New function.
4671         (LANG_HOOKS_TREE_SIZE): Override.
4672
4673         * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
4674         tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
4675         (union lang_tree_node): Remove common and srcloc members.
4676         (build_srcloc_here): Don't prototype.
4677         * decl.c (cp_tree_node_structure): Kill SRCLOC case.
4678         * pt.c (pending_templates): Correct comment.
4679         * tree.c (build_srcloc, build_srcloc_here): Kill.
4680
4681 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
4682
4683         * call.c: Include intl.h.
4684         (print_z_candidate): Always use inform; get rid of errfn
4685         argument. Reorganize so that all the strings get picked up
4686         by xgettext.  Note obligation of caller to pass first argument
4687         through gettext.
4688         (print_z_candidates): Update to match.  Indent second and
4689         successive candidates by strlen() of translated message.
4690         (joust): Restructure ambiguous-conversion pedwarn so that
4691         translators see a complete sentence.  Update calls to
4692         print_z_candidate.
4693
4694         * Make-lang.in (cp/call.o): Update dependencies.
4695
4696 2003-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4697
4698         * decl.c (set_current_binding_level): Delete, revert last change.
4699         (current_binding_level): Modify to allow it as as lvalue.
4700
4701 2003-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4702
4703         * name-lookup.c (find_binding): Pass appropriate pointer type to
4704         POP_TIMEVAR_AND_RETURN.
4705
4706 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4707
4708         * Make-lang.in (cp-warn): Add $(STRICT_WARN).
4709         * cp-tree.h: Don't insist on having GNUC.
4710
4711 2003-04-03  Jason Merrill  <jason@redhat.com>
4712
4713         * cvt.c (ocp_convert): Only abort if we try to convert an object
4714         of TREE_ADDRESSABLE type.
4715
4716         * class.c (build_vtable): Set DECL_ALIGN here.
4717         (get_vtable_decl): Not here.
4718         (layout_vtable_decl): Or here.
4719         (create_vtable_ptr): Or here.
4720         (layout_class_type): Or here.
4721         (check_bitfield_decl): Don't mess with field alignment.
4722
4723 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4724
4725         * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
4726         DEF_ASSN_OPERATOR): Delete spurious semi-colon.
4727         * rtti.c (dfs_class_hint_mark): Likewise.
4728
4729         * decl.c (push_local_name, push_class_level_binding,
4730         maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
4731         functions returning void.
4732         * decl2.c (add_using_namespace): Likewise.
4733
4734         * decl.c (print_binding_level, print_other_binding_stack,
4735         print_binding_stack): Cast argument of %p specifier to void*.
4736         * ptree.c (cxx_print_decl): Likewise.
4737
4738         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
4739         VAR_FUNCTION_OR_PARM_DECL_CHECK,
4740         VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
4741         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
4742         LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
4743
4744         * decl.c (set_current_binding_level): New macro.  Use throughout
4745         when setting the current binding level.
4746
4747         * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
4748         in enum.
4749         * method.c (mangling_flags): Likewise.
4750
4751         * cp-tree.h (lang_type_header): Add __extension__ and use
4752         CHAR_BITFIELD for members.
4753
4754 2003-04-02  Geoffrey Keating  <geoffk@apple.com>
4755
4756         PR other/9274
4757         * mangle.c: Include gt-cp-mangle.h.
4758         (subst_identifiers): Mark with GTY.
4759         * config-lang.in (gtfiles): Add cp/mangle.c.
4760         * Make-lang.in: (gt-cp-mangle.h): New rule.
4761         (cp/mangle.o): Depends on gt-cp-mangle.h.
4762
4763 2003-04-01  Andrew Pinski  <pinskia@physics.uc.edu>
4764
4765         * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
4766         after \$(srcdir)/cp/name-lookup.h.
4767         * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
4768         of ggc_alloc.  Include gt-cp-name-lookup.h at the end of the file.
4769         * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
4770         (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
4771
4772 2003-03-31  Jason Merrill  <jason@redhat.com>
4773
4774         PR java/10145
4775         * class.c (check_field_decl): Don't set DECL_ALIGN.
4776
4777 2003-03-30  Mark Mitchell  <mark@codesourcery.com>
4778
4779         PR c++/7647
4780         * decl.c (grokdeclarator): Tidy, slightly.
4781         * search.c (lookup_field_1): Add want_type parameter.
4782         (lookup_field_r): Adjust call to lookup_field_1.
4783
4784 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4785
4786         * Make-lang.in (cp/name-lookup.o): Add more dependencies.
4787
4788 2003-03-30  Gabriel Dos Reis <gdr@integrable-solutions.net>
4789
4790         * cp-tree.h (binding_for_name: Move to name-lookup.h  Adjust
4791         prototype.
4792         (cxx_scope_find_binding_for_name): Likewise.
4793         * decl.c (find_binding: Move to name-lookup.c.
4794         (binding_for_name): Likewise.
4795         (cxx_scope_find_binding_for_name): Likewise.
4796         (BINDING_LEVEL):  Remove.
4797         (push_binding): Tidy.
4798         (push_class_binding): Likewise.
4799         (pop_binding): Likewise.
4800         (poplevel): Likewise.
4801         (poplevel_class): Likewise.
4802         (set_identifier_type_value_with_scope): Likewise.
4803         (push_overloaded_decl): Likewise.
4804         (lookup_tag): Likewise.
4805         (unqualified_namespace_lookup): Likewise.
4806         (lookup_name_current_level): Likewise.
4807         (maybe_inject_for_scope_var): Likewise.
4808         (namespace_binding): Move to name-lookup.c.
4809         (set_namespace_binding): Likewise.
4810         * decl2.c (lookup_using_namespace): Tidy.
4811         (qualified_lookup_using_namespace): Likewise.
4812         (do_toplevel_using_decl): Likewise.
4813         * name-lookup.c: Include "timevar.h"
4814         * name-lookup.h (cxx_scope):  Declare.
4815         (struct cxx_binding): Lose member "has_level".  Adjust "scope"
4816         member declaration.
4817         (BINDING_SCOPE): Adjust definition.
4818         (BINDING_HAS_LEVEL_P): Remove.
4819
4820 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4821
4822         * name-lookup.c: New file.
4823         * name-lookup.h: Likewise..
4824         * decl.c (push_binding): Adjust use cxx_binding_make.
4825         (free_bindings): Move to name-lookup.c
4826         (pop_binding): Use cxx_binding_free.
4827         (binding_for_name): Tidy.
4828         * cp-tree.h: Include "name-lookup.h"
4829         (cxx_binding_make): Move to name-lookup.h
4830         (cxx_binding_clear): Likewise.
4831         (struct cxx_binding): Likewise.
4832         (LOCAL_BINDING_P): Likewise.
4833         (INHERITED_VALUE_BINDING_P): Likewise.
4834         (BINDING_SCOPE): Likewise.
4835         (BINDING_HAS_LEVEL_P): Likewise.
4836         (BINDING_VALUE): Likewise.
4837         (BINDING_TYPE): Likewise.
4838         * config-lang.in (gtfiles): Add cp/name-lookup.h
4839         * Make-lang.in (cp/name-lookup.o): New rule.
4840         (CXX_OBJS): Add cp/name-lookup.o
4841         (CXX_TREE_H): Add cp/name-lookup.h
4842
4843 2003-03-28  Jason Merrill  <jason@redhat.com>
4844
4845         PR c++/10245
4846         * cvt.c (force_rvalue): New fn.
4847         * call.c (build_conditional_expr): Use it.
4848         * cp-tree.h: Declare it.
4849
4850 2003-03-28  Mike Stump  <mrs@apple.com>
4851
4852         * error.c (dump_expr): Add 0x to printed hex numbers to make
4853         output match source code better.
4854
4855 2003-03-28  Mark Mitchell  <mark@codesourcery.com>
4856
4857         PR c++/10218
4858         * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
4859         definitions.
4860
4861         * decl2.c (generate_ctor_or_dtor_function): Tolerate a
4862         non-existant ssdf_decls array.
4863         (finish_file): Call generator_ctor_or_dtor_function when there are
4864         static constructors or destructors and no other static
4865         initializations.
4866
4867 2003-03-28  Nathan Sidwell  <nathan@codesourcery.com>
4868
4869         PR c++/10047
4870         * decl2.c (finish_file): Don't warn about explicitly instantiated
4871         inline decls.
4872
4873 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
4874
4875         PR c++/10224
4876         * pt.c (lookup_template_class): Only check instantiated args if
4877         they do not contain template parameters.
4878
4879 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
4880
4881         PR c++/10158
4882         * parser.c (cp_parser_function_definition): Set
4883         DECL_INITIALIZED_IN_CLASS for members.
4884         * pt.c (instantiate_decl): Only reduce the template args for
4885         friends that are not defined in class.
4886
4887 2003-03-25  Jason Merrill  <jason@redhat.com>
4888
4889         * call.c (print_z_candidate): Change name of first arg to msgid.
4890         (joust): Add comment for translators.
4891
4892 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
4893
4894         PR c++/9898, PR c++/383, DR 322
4895         * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
4896         through reference types on both PARM and ARG.
4897
4898 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
4899
4900         PR c++/10119
4901         * error.c (dump_expr) <BASELINK>: Use dump_expr.
4902         * pt.c (maybe_fold_nontype_args): New function.
4903         (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
4904         <TEMPLATE_ID_EXPR>: Break out folding code, call it.
4905         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
4906         maybe_fold_nontype_args.
4907
4908 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
4909
4910         PR c++/10026
4911         * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
4912
4913 2003-03-23  Mark Mitchell  <mark@codesourcery.com>
4914
4915         PR c++/7086
4916         * typeck.c (cxx_mark_addressable):  Adjust call to
4917         gen_mem_addressof or put_var_into_stack.
4918
4919 2003-03-22  Nathan Sidwell  <nathan@codesourcery.com>
4920
4921         PR c++/9978, c++/9708
4922         * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
4923         * call.c (add_template_candidate_real): Adjust
4924         instantiate_template call.
4925         * class.c (resolve_address_of_overloaded_function): Likewise.
4926         * decl.c (build_enumerator): Set TREE_CONSTANT.
4927         * pt.c (check_instantiated_args): New.
4928         (push_inline_template_parms_recursive): Set TREE_CONSTANT,
4929         TREE_READONLY.
4930         (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
4931         (reduce_template_parm_level): Likewise.
4932         (process_template_parm): Likewise.
4933         (check_explicit_specialization): Adjust instantiate_template call.
4934         (convert_template_argument): Don't check non-type argument here.
4935         (lookup_template_class): Check them here.
4936         (tsubst_friend_function): Adjust instantiate_template call.
4937         (instantiate_template): Add tsubst_flags parameter, use it. Check
4938         instantiated args.
4939
4940 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
4941
4942         * decl.c: Update calls to shadow_warning.
4943
4944 2003-03-21  Nathan Sidwell  <nathan@codesourcery.com>
4945
4946         PR c++/9898
4947         * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
4948         (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
4949
4950 2003-03-20  Mark Mitchell  <mark@codesourcery.com>
4951
4952         * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
4953         friends.
4954         * cp/pt.c (instantiate_class_template): Fix formatting.
4955
4956 2003-03-14  Matt Austern  <austern@apple.com>
4957
4958         * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
4959         (unemitted_tinfo_decl_p): Remove.
4960         (emit_tinfo_decl): Change declaration to remove unused parameter.
4961         * decl2.c (finish_file): Change tinfo emission to loop through
4962         unemitted_tinfo_decls array instead of looping through all decls.
4963         * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
4964         unused second parameter.
4965         (init_rtti_processing): initialize unemitted_tinfo_decls varray.
4966         (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
4967         (emit_tinfo_decl): remove unused second parameter, add assertion
4968         that decl hasn't already been emitted.
4969
4970 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
4971
4972         * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
4973         type from 'int' to 'bool'. Replace 0 and 1 with true and false in
4974         return statements.
4975
4976 2003-03-19  Jason Merrill  <jason@redhat.com>
4977
4978         PR c++/8316, c++/9315, c++/10136
4979         * call.c (print_z_candidate): Split out from...
4980         (print_z_candidiates): ...here.
4981         (joust): Use it.
4982
4983 2003-03-17  Roger Sayle  <roger@eyesopen.com>
4984
4985         PR c++/10031
4986         * decl.c (duplicate_decls): Use the new type when prototyping
4987         anticipated decls, even when the types match.  This defines the
4988         exception list for the built-in function.
4989
4990 2003-03-17  Jason Merrill  <jason@redhat.com>
4991
4992         PR c++/10091
4993         * typeck.c (build_class_member_access_expr): Compare
4994         TYPE_MAIN_VARIANTs.
4995
4996 2003-03-17  Mark Mitchell  <mark@codesourcery.com>
4997
4998         PR c++/9639
4999         * parser.c (cp_parser_declarator_id): Clear parser->scope.
5000
5001 2003-03-16  Jason Merrill  <jason@redhat.com>
5002
5003         PR c++/9993
5004         * decl.c (finish_function): Only allow the NRVO to use variables
5005         declared at function scope.
5006
5007 2003-03-17  Andreas Jaeger  <aj@suse.de>
5008
5009         * Make-lang.in (cp/TAGS): Remove.
5010
5011 2003-03-16  Nathan Sidwell  <nathan@codesourcery.com>
5012
5013         PR c++/9629
5014         * cp-tree.h (struct language_function): Add in_base_initializer.
5015         (in_base_initializer): define it.
5016         (expand_member_init): Remove INIT param.
5017         * init.c (expand_member_init): Remove INIT param, return the member.
5018         (emit_mem_initializers): Set in_base_initializer.
5019         * class.c (build_base_path): Check in_base_initializer.
5020         * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
5021         * pt.c (tsubst_initializer_list): Likewise.
5022
5023 2003-03-16   Gabriel Dos Reis <gdr@integrable-solutions.net>
5024
5025         * decl.c (binding_for_name): Fix initialization thinko.
5026
5027 2003-03-15  Gabriel Dos Reis <gdr@integrable-solutions.net>
5028
5029         Compile-time improvement: 2/n.
5030         * cp-tree.h (struct cxx_binding): New datatype;
5031         (struct lang_identifier): Use it.
5032         (LOCAL_BINDING_P): Adjust definition.
5033         (INHERITED_VALUE_BINDING_P): Likewise.
5034         (BINDING_SCOPE): Likewise.
5035         (BINDING_HAS_LEVEL_P): Likewise.
5036         (BINDING_VALUE): Likewise.
5037         (BINDING_TYPE): Likewise.
5038         (IDENTIFIER_VALUE): Likewise.
5039         (struct tree_binding): Remove.
5040         (TS_CP_BINDING): Likewise.
5041         ((union lang_tree_node): Remove field "binding".
5042         (cxx_binding_clear): New macro.
5043         (binding_for_name): Adjust return type.
5044         (qualified_lookup_using_namespace): Adjust prototype.
5045         (lookup_using_namespace): Adjust prototype.
5046         (cxx_scope_find_binding_for_name): Declare.
5047         * cp-tree.def: Remove CPLUS_BINDING definition.
5048         * decl.c (push_binding): Adjust local variable type.
5049         (add_binding): Likewise.
5050         (push_class_binding): Likewise.
5051         (pop_binding): Likewise.
5052         (poplevel): Likewise.
5053         (poplevel_class): Likewise.
5054         (free_bindings):  Adjust type.
5055         (find_binding): Adjust return type, add a third parameter. Remove
5056         non-useful assertion now that we use static typing.
5057         (cxx_scope_find_binding_for_name): New function.
5058         (binding_for_name): Use it.  Adjust local variable type. Simplify.
5059         (namespace_binding):  Simplify.
5060         (set_namespace_binding): Likewise.
5061         (set_identifier_type_value_with_scope): Adjust local variable type.
5062         (lookup_tag): Don't type-abuse of local variable 'old'.
5063         (lookup_namespace_name): Likewise.  Allocate binding on stack.
5064         (select_decl): Adjust prototype.
5065         (unqualified_namespace_lookup):  Allocate binding on stack.
5066         Don't type-abuse of local variable 'val'.
5067         (lookup_name_real): Likewise.
5068         (maybe_inject_for_scope_var): Adjust local variable type.
5069         (cp_tree_node_structure): Remove CPLUS_BINDING case label.
5070         (namespace_binding): Adjust logic, simplify.
5071         (BINDING_LEVEL): Adjust definition.
5072         (push_class_level_binding): Adjust local variable type.
5073         (struct cxx_saved_binding): Adjust field 'binding' type.
5074         * decl2.c (ambiguous_decl): Adjust prototype.
5075         (lookup_using_namespace): Adjust local variable type.
5076         (qualified_lookup_using_namespace): Catch type error and correct
5077         ensueing logic error.
5078         (do_nonmember_using_decl): Adjust local variable type.  Allocate
5079         temporary cxx_binding on stack.
5080         (do_toplevel_using_decl): Adjust local variable type.
5081         * ptree.c (cxx_print_cxx_binding): New function.
5082         (cxx_print_identifier): Use it.
5083         (cxx_print_xnode): Delete CPLUS_BINDING case label.
5084
5085 2003-03-15  Roger Sayle  <roger@eyesopen.com>
5086
5087         * tree.c (count_functions): Fix whitespace.
5088
5089 2003-03-15  Neil Booth  <neil@daikokuya.co.uk>
5090
5091         * Make-lang.in: Update.
5092
5093 2003-03-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5094
5095         PR c++/6440
5096         * pt.c (maybe_process_partial_specialization): Handle
5097         member class template when enclosing class template is
5098         explicit specialized.
5099         (most_general_template): Stop looking when DECL is already
5100         specialized.
5101
5102 2003-03-13  Jason Merrill  <jason@redhat.com>
5103
5104         PR c++/9420
5105         * search.c (lookup_conversions): Call complete_type here.
5106         * call.c (implicit_conversion): Not here.
5107
5108 2003-03-13  Mark Mitchell  <mark@codesourcery.com>
5109
5110         * decl2.c (do_nonmember_using_decl): Correct handling of
5111         simultaneous type/non-type bindings.
5112
5113         * call.c (initialize_reference): Remove bogus assertion.
5114         * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
5115
5116 2003-03-12  Andrew Lewycky  <andrew@mxc.ca>
5117
5118         PR c++/7050
5119         * expr.c (cxx_expand_expr): Return const0_rtx for throw
5120         expressions.
5121
5122 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
5123
5124         PR c++/9474
5125         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
5126         to merge old and new declarations.
5127
5128 2003-03-12  Alexandre Oliva  <aoliva@redhat.com>
5129
5130         * g++.1: Remove.
5131         * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
5132         (cp/g++.1): Build it from scratch in the build tree.
5133         (c++.install-man): Depend on it.  Install it from the build tree.
5134         (c++.mostlyclean): Clean it.
5135
5136 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
5137
5138         PR c++/9474
5139         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
5140         to merge old and new declarations.
5141
5142         PR c++/9924
5143         * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
5144
5145 2003-03-11  Jason Merrill  <jason@redhat.com>
5146
5147         PR c++/9820
5148         * search.c (lookup_member): Fix handling of functions in a class
5149         being defined.
5150
5151 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
5152
5153         PR c++/8700
5154         * call.c (convert_class_to_reference): Adjust usage of
5155         splice_viable.
5156         (any_viable): Remove.
5157         (splice_viable): Combine with any_viable.
5158         (print_z_candidates): Avoid printing duplicates.
5159         (build_user_type_conversion_1): Adjust usage of splice_viable.
5160         (build_new_function_call): Likewise.
5161         (build_operator_new_call): Likewise.
5162         (build_object_call): Likewise.
5163         (build_conditional_expr): Likewise.
5164         (build_new_op): Likewise.
5165         (build_new_method_call): Likewise.
5166         (joust): Remove spurious comment.
5167         * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
5168         * decl2.c (arg_assoc_class): Simplify.
5169         * friend.c (add_friend): Likewise.
5170
5171 2003-03-11  Jason Merrill  <jason@redhat.com>
5172
5173         PR c++/8660
5174         * decl2.c (check_classfn): A member template only matches a
5175         member template.
5176
5177 2003-03-11  Neil Booth  <neil@daikokuya.co.uk>
5178
5179         * Make-lang.in (CXX_C_OBJS): Update.
5180         * lang-specs.h: Don't define __GNUG__ here.
5181
5182 2003-03-10  Mark Mitchell  <mark@codesourcery.com>
5183
5184         * call.c (perform_overload_resolution): New function.
5185         (build_new_function_call): Use it.
5186         (build_operator_new_call): Likewise.
5187         (add_candidates): Add explicit_targs and template_only parameters.
5188         (build_new_op): Adjust accordingly.
5189         * cp-tree.h (build_operator_new_call): New function.
5190         (build_function_call_real): Remove.
5191         (build_function_call_maybe): Likewise.
5192         * init.c (build_new_1): Use build_operator_new_call.
5193         * typeck.c (build_function_call_real): Rename to ...
5194         (build_function_call): ... this.
5195
5196 2003-03-10  Devang Patel  <dpatel@apple.com>
5197
5198         PR c++/9394
5199         * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
5200
5201 2003-03-10  Jason Merrill  <jason@redhat.com>
5202
5203         PR c++/9798
5204         * decl.c (push_using_directive): Push before recursing.
5205
5206         PR c++/9868, c++/9524
5207         * call.c (resolve_scoped_fn_name): Handle the case of a function
5208         pointer member.
5209
5210         * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
5211         argument in the pointer-to-member case.
5212
5213 2003-03-09  Mark Mitchell  <mark@codesourcery.com>
5214
5215         PR c++/9373
5216         * cp-lang.c (cxx_get_alias_set): Use alias set zero for
5217         pointers to member functions.
5218
5219         PR c++/8534
5220         * decl.c (build_ptrmemfunc_type): Do not allow default arguments
5221         in pointer-to-member-function types.
5222
5223 2003-03-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5224
5225         * expr.c (cplus_expand_constant): Use C90 prototype style.
5226         (cxx_expand_expr): Likewise.
5227
5228 2003-03-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5229
5230         PR c++/9970
5231         * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
5232         functions.
5233
5234 2003-03-08  Geoffrey Keating  <geoffk@apple.com>
5235
5236         * lang-specs.h (c++-header): Change .pch to .gch.
5237
5238 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
5239
5240         * cp-tree.h (cxx_init): Update prototype.
5241         * lex.c (cxx_init): Similarly.
5242
5243 2003-03-08  Mark Mitchell  <mark@codesourcery.com>
5244
5245         PR c++/9823
5246         * cp-tree.h (begin_mem_initializers): Remove.
5247         * parser.c (cp_parser_mem_initializer_list): Inline it here.
5248         Do not call finish_mem_initializers if not in a constructor.
5249         (cp_parser_class_head): Fix typo in error message.
5250         * semantics.c (begin_mem_initializers): Remove.
5251         * testsuite/g++.dg/parser/constructor1.C: New test.
5252
5253         PR c++/9809
5254         * call.c (add_function_candidate): Skip builtin fuctions that have
5255         not yet been declared.
5256
5257         PR c++/9982
5258         * init.c (build_new_1): Correct logic for determining whether or
5259         not to use an array cookie.
5260
5261         PR c++/9524
5262         * parser.c (cp_parser_postfix_expression): Call
5263         finish_non_static_data_member, even when processing_template_decl.
5264
5265         PR c++/9912
5266         * cp-tree.h (is_ancestor): New function.
5267         (handle_class_head): Change prototype.
5268         * decl2.c (is_namespace_ancestor): Rename to ...
5269         (namespace_anecestor): ... this.
5270         (set_decl_namespace): Adjust accordingly.
5271         (handle_class_head): Remove unnecessary parameters.
5272         * parser.c (cp_parser_class_head): Check that
5273         nested-name-specifiers are used appropriately.
5274
5275 2003-03-07  Mark Mitchell  <mark@codesourcery.com>
5276
5277         * call.c (reference_binding): Remove REF_IS_VAR parameter.
5278         (implicit_conversion): Adjust call to reference_binding.
5279         (make_temporary_var_for_ref_to_type): Add TYPE parameter.
5280         (initialize_reference): Adjust handling for references bound to
5281         rvalues.
5282         * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
5283         prototype.
5284         (real_non_cast_lvalue_p): New method.
5285         * cvt.c (build_up_reference): Adjust use of
5286         make_temporary_var_for_ref_to_temp.
5287         * tree.c (real_non_cast_lvalue_p): New method.
5288
5289 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5290
5291         * except.c (init_exception_processing): Use C90 prototype style.
5292         (cp_protect_cleanup_actions): Likewise.
5293         (prepare_eh_type): Likewise.
5294         (build_eh_type_type): Likewise.
5295         (build_exc_ptr): Likewise.
5296         (do_begin_catch): Likewise.
5297         (dtor_nothrow): Likewise.
5298         (do_end_catch): Likewise.
5299         (push_eh_cleanup): Likewise.
5300         (decl_is_java_type): Likewise.
5301         (choose_personality_routine): Likewise.
5302         (initialize_handler_parm): Likewise.
5303         (expand_start_catch_block): Likewise.
5304         (expand_end_catch_block): Likewise.
5305         (begin_eh_spec_block): Likewise.
5306         (finish_eh_spec_block): Likewise.
5307         (do_allocate_exception): Likewise.
5308         (do_free_exception): Likewise.
5309         (wrap_cleanups_r): Likewise.
5310         (stabilize_throw_expr): Likewise.
5311         (build_throw): Likewise.
5312         (complete_ptr_ref_or_void_ptr_p): Likewise.
5313         (is_admissible_throw_operand): Likewise.
5314         (nothrow_libfn_p): Likewise.
5315         (can_convert_eh): Likewise.
5316         (check_handlers_1): Likewise.
5317         (check_handlers): Likewise.
5318
5319 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
5320
5321         * call.c (merge_conversion_sequences): New function.
5322         (build_conv): Set ICS_USER_FLAG for USER_CONVs.
5323         (convert_class_to_reference): Correct handling of second
5324         standard conversion sequence in a user-defined conversion
5325         sequence.
5326         (build_user_type_conversion_1): Use merge_conversion_sequences.
5327         * cp-tree.def: Add comments for CONV nodes.
5328         * rtti.c (get_tinfo_decl): Use build_address/build_nop.
5329
5330 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5331
5332         * error.c (init_error): Use C90 prototype style.
5333         (dump_scope): Likewise.
5334         (dump_qualifiers): Likewise.
5335         (dump_template_argument): Likewise.
5336         (dump_template_argument_list): Likewise.
5337         (dump_template_parameter): Likewise.
5338         (dump_template_bindings): Likewise.
5339         (dump_type): Likewise.
5340         (dump_typename): Likewise.
5341         (class_key_or_enum): Likewise.
5342         (dump_aggr_type): Likewise.
5343         (dump_type_prefix): Likewise.
5344         (dump_type_suffix): Likewise.
5345         (dump_global_iord): Likewise.
5346         (dump_simple_decl): Likewise.
5347         (dump_decl): Likewise.
5348         (dump_template_decl): Likewise.
5349         (dump_function_decl): Likewise.
5350         (dump_parameters): Likewise.
5351         (dump_exception_spec): Likewise.
5352         (dump_function_name): Likewise.
5353         (dump_template_parms): Likewise.
5354         (dump_char): Likewise.
5355         (dump_expr_list): Likewise.
5356         (dump_expr): Likewise.
5357         (dump_binary_op): Likewise.
5358         (dump_unary_op): Likewise.
5359         (type_as_string): Likewise.
5360         (expr_as_string): Likewise.
5361         (decl_as_string): Likewise.
5362         (context_as_string): Likewise.
5363         (lang_decl_name): Likewise.
5364         (cp_file_of): Likewise.
5365         (cp_line_of): Likewise.
5366         (decl_to_string): Likewise.
5367         (expr_to_string): Likewise.
5368         (fndecl_to_string): Likewise.
5369         (code_to_string): Likewise.
5370         (language_to_string): Likewise.
5371         (parm_to_string): Likewise.
5372         (op_to_string): Likewise.
5373         (type_to_string): Likewise.
5374         (assop_to_string): Likewise.
5375         (args_to_string): Likewise.
5376         (cv_to_string): Likewise.
5377         (cxx_print_error_function): Likewise.
5378         (cp_diagnostic_starter): Likewise.
5379         (cp_diagnostic_finalizer): Likewise.
5380         (cp_print_error_function): Likewise.
5381         (function_category): Likewise.
5382         (print_instantiation_full_context): Likewise.
5383         (print_instantiation_partial_context): Likewise.
5384         (maybe_print_instantiation_context): Likewise.
5385         (print_instantiation_context): Likewise.
5386         (cp_printer): Likewise.
5387         (print_integer): Likewise.
5388         (print_non_consecutive_character): Likewise.
5389         (locate_error): Likewise.
5390
5391 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
5392
5393         PR c++/9965
5394         * call.c (reference_binding): Add ref_is_var parameter.
5395         (implicit_conversion): Adjust call to reference_binding.
5396         (initialize_reference): Likewise.
5397
5398         PR c++/9400
5399         * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
5400         PARM_DECLs.
5401
5402         PR c++/9791
5403         * class.c (get_basefndecls): Use lookup_fnfields_1.
5404
5405 2003-03-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5406
5407         PR c++/9188
5408         * parser.c (cp_parser_type_parameter): Remove redundant `expect'
5409         in error message.
5410         (cp_parser_single_declaration): Likewise.
5411
5412 2003-03-05  Jason Merrill  <jason@redhat.com>
5413
5414         PR c++/9440
5415         * call.c (build_conditional_expr): Use convert rather than an
5416         explicit NOP_EXPR.
5417
5418 2003-03-02  Matt Austern  <austern@apple.com>
5419
5420         * decl.c (cp_binding_level): Add static_decls varray member.
5421         (add_decl_to_level): Add static/inline namespace scope
5422         declarations to static_decls array.
5423         (wrapup_global_for_namespace): Pass static_decls only, instead of
5424         all decls, to wrapup_global_declarations/check_global_declarations.
5425         (push_namespace): Initialize static_decls for ordinary namespaces.
5426         (cxx_init_decl_processing): Initialize static_decls for global
5427         namespace.
5428
5429 2003-03-05  Mark Mitchell  <mark@codesourcery.com>
5430
5431         * class.c (end_of_class): Correct thinko.
5432
5433 2003-03-04  Nathanael Nerode  <neroden@gcc.gnu.org>
5434
5435         * config-lang.in: Replace ${libstdcxx_version} by its value.
5436
5437 2003-03-04  Gabriel Dos Reis <gdr@integrable-solutions.net>
5438
5439         * cp-tree.h (cxx_saved_binding): Declare.
5440         (struct saved_scope): Adjust type of field 'old_binding'.
5441         * decl.c (cxx_saved_binding_make): New macro.
5442         (struct cxx_saved_binding): Define.
5443         (store_bindings): Adjust prototype.  Use cxx_saved_binding to save
5444         C++ bindings.
5445         (maybe_push_to_top_level): Adjust local variable type.
5446         (pop_from_top_level): Likewise.
5447
5448 2003-03-04  Tom Tromey  <tromey@redhat.com>
5449
5450         * Make-lang.in (c++.tags): New target.
5451
5452 2003-03-04  Neil Booth  <neil@daikokuya.co.uk>
5453
5454         * Make-lang.in: Update.
5455
5456 2003-03-03  Jason Merrill  <jason@redhat.com>
5457
5458         * decl.c (finish_enum): Do set the type in a template. Simplify.
5459         * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
5460
5461 2003-03-03  Mark Mitchell  <mark@codesourcery.com>
5462
5463         PR c++/9878
5464         * call.c (convert_class_to_reference): Correct conversion
5465         sequences.
5466         (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
5467         (implicit_conversion): Adjust call to reference_binding.
5468         (add_candidate): Change type of candidates parameter.
5469         (add_function_candidate): Likewise.
5470         (add_conv_candidate): Likewise.
5471         (build_builtin_candidate): Likewise.
5472         (add_builtin_candidate): Likewise.
5473         (add_builtin_candidates): Likewise.
5474         (add_template_candidate_real): Likewise.
5475         (add_template_candidate): Likewise.
5476         (add_template_conv_candidate): Likewise.
5477         (build_user_type_conversion_1): Adjust accordingly.
5478         (build_object_call): Likewise.
5479         (build_conditional_expr): Likewise.
5480         (add_candidates): Likewise.
5481         (build_new_op): Likewise.
5482         (convert_like_real): Use USER_CONV_CAND.  Use build_nop.
5483         (build_new_method_call): Adjust calls to add_function_candidate.
5484         (make_temporary_var_for_ref_to_temp): New function.
5485         (initialize_reference): Add decl parameter.
5486         * class.c (build_rtti_vtbl_entries): Use build_address and
5487         build_nop.
5488         * cp-tree.h (initialize_reference): Change prototype.
5489         (make_temporary_var_for_ref_to_temp): New function.
5490         (build_type_conversion): Change prototype.
5491         (build_address): New function.
5492         (build_nop): Likewise.
5493         * cvt.c (cp_convert_to_pointer): Adjust call to
5494         build_type_conversion.  Avoid indicating redundant NOP_EXPRs.
5495         Use build_nop.
5496         (convert_to_pointer_force): Use build_nop.
5497         (build_up_reference): Use make_temporary_var_for_ref_to_temp.
5498         (convert_to_reference): Adjust call to build_type_conversion.
5499         (ocp_convert): Likewise.
5500         (build_type_conversion): Remove for_sure parameter.
5501         * decl.c (grok_reference_init): Use initialize_reference.
5502         * typeck.c (build_address): New function.
5503         (build_nop): Likewise.
5504         (build_unary_op): Use them.
5505         (build_ptrmemfunc): Tidy slightly.
5506         (convert_for_initialization): Adjust call to
5507         initialize_reference.
5508         * typeck2.c (store_init_value): Remove #if 0'd code.
5509
5510 2003-03-03  Jason Merrill  <jason@redhat.com>
5511
5512         * decl.c (start_function): Clear DECL_NUM_STMTS.
5513
5514         * class.c (get_vtable_decl): Use vtbl_type_node.
5515         (build_primary_vtable): Check for it.
5516
5517 2003-03-02  Aldy Hernandez  <aldyh@redhat.com>
5518
5519         * decl.c (check_initializer): Check for vector_opaque_p.
5520
5521 2003-03-02  Ashif Harji  <asharji@uwaterloo.ca>
5522
5523         * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
5524           invoke an external cpp during compilation.
5525
5526 2003-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5527
5528         * decl.c (duplicate_decls): Convert use of warning_with_decl() to
5529         that of warning().
5530         (start_decl): Likewise.
5531         (start_function): Likewise.
5532
5533 2003-03-01  Neil Booth  <neil@daikokuya.co.uk>
5534
5535         * Make-lang.in (CXX_C_OBJS): Update.
5536
5537 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
5538
5539         PR c++/9892
5540         * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
5541         instantiating it.
5542
5543 2003-02-28  Aldy Hernandez  <aldyh@redhat.com>
5544
5545         * parser.c (cp_parser_init_declarator): Revert opaque
5546         vector_opaque_p change.
5547         Do not include target.h.
5548
5549 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
5550
5551         PR c++/9879
5552         * cp-tree.h (build_zero_init): Add parameter.
5553         * decl.c (cp_finish_decl): Adjust call.
5554         * init.c (build_zero_init): Add nelts parameter.  Adjust recursive
5555         calls.
5556         (build_default_init): Add nelts parameter.  Adjust calls to
5557         build_zero_init.
5558         (build_new_1): Adjust call to build_default_init.
5559         * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
5560
5561 2003-02-26  Devang Patel  <dpatel@apple.com>
5562
5563         * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
5564         required.  Postpone enum setting for template decls.
5565         (build_enumerator): Delay copying value node until finish_enum
5566         (). Remove #if 0'ed code.
5567         * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
5568         (tsubst_copy): Add check for enum type.
5569
5570 2003-02-25  Mark Mitchell  <mark@codesourcery.com>
5571
5572         PR c++/9683
5573         * decl2.c (prune_vars_needing_no_initialization): Do not throw
5574         away initializations for DECL_EXTERNAL VAR_DECLs.
5575         (finish_file): Adjust accordingly.
5576         * pt.c (instantiate_decl): Do not defer VAR_DECLs.
5577
5578 2003-02-24 Gabriel Dos Reis  <gdr@integrable-solutions.net>
5579
5580         * decl.c (add_binding): Time TV_NAME_LOOKUP.
5581         (push_class_binding): Likewise.
5582         (set_namespace_binding): Likewise.
5583
5584 2003-02-24  Mark Mitchell  <mark@codesourcery.com>
5585
5586         PR c++/9836
5587         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
5588         specializations back to the main template.
5589         * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
5590         * pt.c (resolve_typename_type): Likewise.
5591
5592 2003-02-24  Jeffrey D. Oldham  <oldham@codesourcery.com>
5593
5594         PR c++/9778
5595         * pt.c (tsubst_copy_and_build): For a templated function inside a
5596         scope, process template arguments.
5597
5598 2003-02-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5599
5600         PR c++/9602
5601         * typeck2.c (abstract_virtuals_error): Don't check when
5602         TYPE is still template parameter dependent.
5603
5604 2003-02-23  Mark Mitchell  <mark@codesourcery.com>
5605
5606         PR c++/5333
5607         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
5608         * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
5609         * pt.c (instantiate_class_template): Don't try to instantiate
5610         dependent types.
5611         (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
5612
5613 2003-02-21  Mark Mitchell  <mark@codesourcery.com>
5614
5615         PR c++/9749
5616         * decl.c (grokdeclarator): Do not allow parameters with variably
5617         modified types.
5618
5619 2003-02-21  Nathan Sidwell  <nathan@codesourcery.com>
5620
5621         * search.c (grow_bfs_bases): Remove. Fold into ...
5622         (bfs_walk): ... here, fix fencepost error. Fix merge lossage
5623         in previous patch.
5624
5625 2003-02-20  Mark Mitchell  <mark@codesourcery.com>
5626
5627         PR c++/9729
5628         * mangle.c (mangle_conv_op_name_for_type): Issue an error message
5629         when the G++ 3.2 ABI prevents correct compilation.
5630
5631 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
5632
5633         Change base class access representation. Share virtual base
5634         binfos.
5635         * cp/call.c (build_special_member_call): Remove binfo_for_vbase
5636         call.
5637         * cp/class.c (build_base_path): Likewise.
5638         (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
5639         (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
5640         (make_new_vtable): Adjust.
5641         (force_canonical_binfo_r): Delete.
5642         (force_canonical_binfo): Delete.
5643         (mark_primary_virtual_base): Delete.
5644         (dfs_unshared_virtual_bases): Delete.
5645         (mark_primary_bases): Adjust.
5646         (maybe_warn_about_overly_private_class): Adjust.
5647         (dfs_base_derived_from): Delete.
5648         (base_derived_from): Follow the inheritance chain.
5649         (struct find_final_overrider_data): Add vpath member.
5650         (dfs_find_final_overrider): Adjust.
5651         (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
5652         (find_final_overrider): Adjust.
5653         (update_vtable_entry_for_fn): Adjust.
5654         (modify_all_vtables): Adjust.
5655         (walk_subobject_offsets): Adjust.
5656         (layout_nonempty_base_or_field): Adjust.
5657         (layout_empty_base): Remove last parameter. Adjust.
5658         (build_base_field): Adjust.
5659         (build_base_fields): Adjust.
5660         (propagate_binfo_offsets): Remove last parameter. Adjust.
5661         (dfs_set_offset_for_unshared_vbases): Delete.
5662         (layout_virtual_bases): Adjust.
5663         (finish_struct_1): Adjust.
5664         (init_class_processing): Don't init access nodes.
5665         (dfs_get_primary_binfo): Delete.
5666         (get_primary_binfo): Adjust.
5667         (dump_class_hierarchy_r): Remove most derived arg, add IGO
5668         parameter. Adjust.
5669         (dump_class_hierarchy): Adjust.
5670         (finish_vtbls): Adjust.
5671         (get_original_base): Delete.
5672         (build_vtt_inits): Adjust.
5673         (dfs_build_secondary_vptr_vtt_inits): Adjust.
5674         (dfs_ctor_vtable_bases_queue_p): Adjust.
5675         (build_ctor_vtbl_group): Adjust.
5676         (dfs_accumulate_vtbl_inits): Adjust.
5677         (build_vtbl_initializer): Adjust.
5678         (build_vbase_offset_vtbl_entries): Adjust.
5679         (add_vcall_offset_vtbl_entries_1): Adjust.
5680         * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
5681         (access_*_node): Remove.
5682         (CANONICAL_BINFO): Delete.
5683         (BINFO_UNSHARED_MARKED): Remove.
5684         (BINFO_MARKED): Set LANG_FLAG_0 directly.
5685         (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
5686         (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
5687         (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
5688         Delete.
5689         (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
5690         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
5691         (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
5692         Delete.
5693         (BINFO_DEPENDENT_BASE_P): New.
5694         (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
5695         index.
5696         (markedp, unmarkedp): Adjust.
5697         (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
5698         dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
5699         find_vbase_instance, binfo_for_vbase): Delete.
5700         (copied_binfo, original_binfo): Declare.
5701         (finish_base_specifier): Add virtual_p arg.
5702         (unshare_base_binfos): Delete.
5703         (copy_base_binfos): Declare.
5704         (reverse_path): Delete.
5705         * cp/decl.c (xref_basetypes): Access and virtuality passed
5706         differently. Don't copy direct base binfos here. Call
5707         copy_base_binfos.
5708         * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
5709         (initialize_vtbl_ptrs): Adjust.
5710         (expand_member_init): Adjust.
5711         * cp/parser.c (cp_parser_base_specifier): Adjust.
5712         * cp/pt.c (instantiate_class_template): Adjust.
5713         (get_template_base_recursive): Adjust.
5714         * cp/rtti.c (get_pseudo_ti_init): Adjust.
5715         (get_pseudo_ti_desc): Adjust.
5716         * cp/tree.c (unshare_base_binfos): Rename to ...
5717         (copy_base_binfos): ... here, reimplement.
5718         (make_binfo): Set BINFO_DEPENDENT_BASE_P.
5719         (reverse_path): Remove.
5720         * cp/typeck.c (get_delta_difference): Adjust error messages.
5721         * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
5722         * cp/search.c (lookup_base_r): Adjust.
5723         (dynamic_cast_base_recurse): Adjust.
5724         (canonical_binfo): Remove.
5725         (dfs_canonical_queue): Remove.
5726         (dfs_assert_unmarked_p): Remove.
5727         (assert_canonical_unmarked): Remove.
5728         (shared_marked_p, shared_unmarked_p): Remove.
5729         (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
5730         (dfs_access_in_type): Adjust.
5731         (access_in_type): Adjust.
5732         (dfs_accessible_queue_p): Adjust.
5733         (dfs_accessible_p): Adjust.
5734         (is_subobject_of_p_1, is_subobject_of_p): Remove.
5735         (struct lookup_field_info): Remove from_dep_base_p field.
5736         (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
5737         (lookup_field_r): Remove dependent base code.
5738         (lookup_member): Likewise.
5739         (dfs_walk, dfs_walk_real): Add access arg to queue fn.
5740         (dfs_unmarked_real_bases_queue_p): Remove.
5741         (dfs_marked_real_bases_queue_p): Remove.
5742         (dfs_skip_vbases): Remove.
5743         (dfs_get_pure_virtuals): Adjust.
5744         (markedp, unmarkedp): Adjust.
5745         (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
5746         (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
5747         (dfs_unmark): Adjust.
5748         (dfs_get_vbase_types):Remove.
5749         (dfs_build_inheritance_graph_order): Remove.
5750         (get_vbase_types): Remove
5751         (dfs_find_vbase_instance): Remove.
5752         (find_vbase_instance): Remove.
5753         (dfs_debug_unmarkedp): Adjust.
5754         (dependent_base_p): Remove.
5755         (dfs_push_type_decls): Adjust.
5756         (dfs_push_decls): Adjust.
5757         (dfs_no_overlap_yet): Adjust.
5758         (copied_binfo): New function.
5759         (original_binfo): New function.
5760         (binfo_for_vbase): Remove.
5761
5762 2003-02-18  Zack Weinberg  <zack@codesourcery.com>
5763
5764         * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
5765         (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
5766         vectors, for speed.
5767
5768 2003-02-18  Mark Mitchell  <mark@codesourcery.com>
5769
5770         PR c++/9704
5771         * class.c (layout_class_type): In the 3.2 ABI, take into account
5772         trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
5773
5774 2003-02-18  Matt Austern <austern@apple.com>
5775
5776         * cp/cp-lang.c: Change lang hooks so that final_write_globals does
5777         nothing for C++.
5778         * cp/decl.c (wrapup_globals_for_namespace): Remove special
5779         handling of global namespace.
5780
5781 2003-02-18  Geoffrey Keating  <geoffk@apple.com>
5782
5783         * cp-tree.h (rid_to_yy): Delete.
5784         (C_RID_YYCODE): Delete.
5785         (finish_file): Delete redundant declaration.
5786
5787 2003-02-18  Jason Merrill  <jason@redhat.com>
5788
5789         PR c++/9623
5790         * decl.c (reshape_init): Don't mess with initializer labels.
5791
5792         PR c++/9485
5793         * parser.c (cp_parser_postfix_expression): Set idk properly for
5794         object->scope::member.
5795
5796 2003-02-18  Ben Elliston  <bje@redhat.com>
5797
5798         PR other/7350
5799         * decl.c (duplicate_decls): Fix typo in comment.
5800
5801 2003-02-17  Michael Elizabeth Chastain <mec@shout.net>
5802
5803         PR debug/9717
5804         * class.c (build_base_field): Mark fields for base classes with
5805         DECL_IGNORED_P.
5806
5807 2003-02-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5808
5809         PR c++/9457
5810         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
5811         CONSTRUCTOR_ELTS only once.
5812
5813 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5814
5815         PR c++/9459
5816         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
5817         (dump_type_suffix): Likewise.
5818
5819 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
5820
5821         * search.c: ANSIfy function declarations and definitions.
5822         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
5823         * call.c (build_method_call, resolve_scoped_fn_name,
5824         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
5825         calls.
5826         * class.c (handle_using_decl): Likewise.
5827         * decl.c (make_typename_type, make_unmound_class_template,
5828         start_decl, compute_array_index_type): Likewise.
5829         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
5830         * init.c (expand_member_init, build_member_call): Likewise.
5831         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
5832         resolve_typename_type): Likewise.
5833         * typeck.c (lookup_destructor, finish_class_member_access_exprm
5834         build_prememfunc_access_expr): Likewise.
5835
5836 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
5837
5838         * decl2.c: Include "timevar.h".
5839         (namespace_ancestor): Time name lookup.
5840         (add_using_namespace): Likewise.
5841         (lookup_using_namespace): Likewise.
5842         (qualified_lookup_using_namespace): Likewise.
5843         (decl_namespace): Likewise.
5844         (lookup_arg_dependent): Likewise.
5845         * lex.c (do_identifier): Likewise.
5846         (do_scoped_id): Likewise.
5847         * pt.c (lookup_template_class): Likewise.
5848
5849 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
5850
5851         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
5852
5853 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5854
5855         * decl.c: Include "timevar.h".
5856         (poplevel): Time name lookup.
5857         (find_binding): Likewise.
5858         (push_namespace): Likewise.
5859         (pop_nested_namespace): Likewise.
5860         (store_bindings): Likewise.
5861         (maybe_push_to_top_level): Likewise.
5862         (pop_from_top_level): Likewise.
5863         (push_local_name): Likewise.
5864         (pushtag): Likewise.
5865         (pushdecl): Likewise.
5866         (pushdecl_with_scope): Likewise.
5867         (pushdecl_namespace_level): Likewise.
5868         (pushdecl_top_level): Likewise.
5869         (pushdecl_class_level): Likewise.
5870         (push_class_level_binding): Likewise.
5871         (push_using_decl): Likewise.
5872         (push_using_directive): Likewise.
5873         (push_overloaded_decl): Likewise.
5874         (lookup_label): Likewise.
5875         (define_label): Likewise.
5876         (lookup_tag): Likewise.
5877         (lookup_tag_reverse): Likewise.
5878         (lookup_namespace_name): Likewise.
5879         (select_decl): Likewise.
5880         (unqualified_namespace_lookup): Likewise.
5881         (lookup_name_real): Likewise.
5882         (lookup_name_current_level): Likewise.
5883         (lookup_type_current_level): Likewise.
5884         (maybe_inject_for_scope_var): Likewise.
5885         (xref_tag): Likewise.
5886
5887         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
5888
5889 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
5890
5891         * decl.c (build_enumerator):  Remove unneeded test.
5892
5893 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
5894
5895         * cp-tree.h (struct lang_type_header): Make all fields unsigned
5896         char.
5897
5898 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
5899
5900         PR c++/7129
5901         * call.c (z_candidate): Add args.
5902         (convert_class_to_reference): Set it.
5903         (implicit_conversion): Tidy.
5904         (add_candidate): Add args parameter.
5905         (add_function_candidate): Adjust call to add_candidate.
5906         (add_conv_candidate): Likewise.
5907         (build_builtin_candidate): Likewise.
5908         (build_user_type_conversion_1): Eliminate wasteful tree_cons
5909         usage.
5910         (build_new_function_call): Likewise.
5911         (build_object_call): Likewise.
5912         (add_candidates): New function.
5913         (build_new_op): Use it.
5914         (covert_like_real): Adjust call to build_over_call.
5915         (build_over_call): Remove args parameter.
5916         * operators.def: Add <?= and >?=.
5917
5918 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
5919
5920         * typeck.c (build_indirect_ref): Don't check flag_volatile.
5921
5922 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5923
5924         PR c++/8849
5925         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
5926
5927 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
5928
5929         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
5930         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
5931         (BINFO_LANG_ELTS): New #define.
5932         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
5933
5934 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
5935
5936         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
5937
5938 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
5939
5940         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
5941         for class types.
5942         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
5943         rather than TYPE_LANG_FLAG_0.
5944         (TYPE_BUILT_IN): Remove.
5945         (TYPE_DEPENDENT_P): New macro.
5946         (TYPE_DEPENDENT_P_VALID): Likewise.
5947         (lang_type_class): Add fields_readonly.
5948         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
5949         * pt.c (dependent_type_p_r): New function, split out from ...
5950         (dependent_type_p): ... here.  Memoize results.
5951         * search.c (dependent_base_p): Use dependent_type_p, not
5952         uses_template_parms.
5953         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
5954         for class types.
5955
5956 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
5957
5958         * call.c (build_field_call): Use build_new_op, not build_opfncall.
5959         (prep_operand): New function.
5960         (build_new_op): Use it.  Remove dead code.
5961         * class.c (pushclass): Change "modify" parameter type from int to
5962         bool.
5963         (currently_open_class): Use same_type_p, not pointer equality.
5964         (push_nested_class): Adjust calls to pushclass, remove modify
5965         parameter.
5966         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
5967         (pushclass): Change prototype.
5968         (push_nested_class): Likewise.
5969         (grokoptypename): Remove.
5970         (build_opfncall): Remove.
5971         (value_dependent_expression_p): Declare.
5972         (resolve_typename_type): Likewise.
5973         (resolve_typename_type_in_current_instantiation): Likewise.
5974         (enter_scope_of): Remove.
5975         (tsubst): Remove.
5976         (tsubst_expr): Likewise.
5977         (tsubst_copy): Likewise.
5978         (tsubst_copy_and_build): Likewise.
5979         * decl.c (warn_about_implicit_typename_lookup): Remove.
5980         (finish_case_label): Return error_mark_node for erroneous labels.
5981         (start_decl): Adjust calls to push_nested_class.
5982         (grokfndecl): Call push_scope/pop_scope around call to
5983         duplicate_decls.
5984         (grokdeclarator): Do not call tsubst.
5985         (start_function): Adjust calls to push_nested_class.
5986         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
5987         (check_classfn): Use push_scope/pop_scope around type comparisions.
5988         (grokoptypename): Remove.
5989         (push_sscope): Adjust call to push_nested_class.
5990         * error.c (dump_type): Show cv-qualification of typename types.
5991         * init.c (build_member_call): Use build_new_op, not
5992         build_opfncall.
5993         * method.c (build_opfncall): Remove.
5994         * parser.c (cp_parser): Add allow_non_constant_expression_p and
5995         non_constant_expression_p.
5996         (cp_parser_constant_expression): Adjust prototype.
5997         (cp_parser_resolve_typename_type): Remove.
5998         (cp_parser_non_constant_expression): New function.
5999         (cp_parser_non_constant_id_expression): Likewise.
6000         (cp_parser_new): Set allow_non_constant_expression_p and
6001         non_constant_expression_p.
6002         (cp_parser_primary_expression): Reject `this' and `va_arg' in
6003         constant-expressions.  Note that dependent names aren't really
6004         constant.
6005         (cp_parser_postfix_expression): Reject conversions to non-integral
6006         types in constant-expressions.  Neither are increments or
6007         decrements.
6008         (cp_parser_unary_expression): Reject increments and decrements in
6009         constant-expressions.
6010         (cp_parser_direct_new_declarator): Adjust call to
6011         cp_parser_constant_expression.
6012         (cp_parser_cast_expression): Reject conversions to non-integral
6013         types in constant-expressions.
6014         (cp_parser_assignment_expression): Rejects assignments in
6015         constant-expressions.
6016         (cp_parser_expression): Reject commas in constant-expressions.
6017         (cp_parser_labeled_statement): Adjust call to
6018         cp_parser_constant_expression.
6019         (cp_parser_direct_declarator): Simplify array bounds, even in
6020         templates, when they are non-dependent.  Use
6021         resolve_typename_type, not cp_parser_resolve_typename_type.
6022         (cp_parser_class_head): Use resolve_typename_type, not
6023         cp_parser_resolve_typename_type.
6024         (cp_parser_member_declaration): Adjust call to
6025         cp_parser_constant_expression.
6026         (cp_parser_constant_initializer): Likewise.
6027         (cp_parser_constructor_declarator): Use resolve_typename_type, not
6028         cp_parser_resolve_typename_type.
6029         (cp_parser_late_parsing_default_args): Adjust call to
6030         push_nested_class.
6031         * pt.c (tsubst): Give it internal linkage.
6032         (tsubst_expr): Likewise.
6033         (tsubst_copy): Likewise.
6034         (tsubst_copy_and_build): Likewise.
6035         (push_access_scope_real): Likewise.
6036         (tsubst_friend_class): Likewise.
6037         (instantiate_class_template): Adjust call to pushclass.
6038         (value_dependent_expression_p): Give it external linkage.
6039         Robustify.
6040         (resolve_typename_type): New function.
6041         * semantics.c (finish_call_expr): Use build_new_op, not
6042         build_opfncall.
6043         (begin_constructor_declarator): Remove.
6044         (begin_class_definition): Adjust call to pushclass.
6045         (enter_scope_of): Remove.
6046         * typeck.c (comptypes): Resolve typename types as appropriate.
6047         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
6048         (build_x_compound_expr): Likewise.
6049         (build_modify_expr): Likewise.
6050         (build_x_modify_expr): Likewise.
6051         * typeck2.c (build_x_arrow): Likewise.
6052
6053 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
6054
6055         * pt.c (last_pending_template) Declare GTY().
6056
6057 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6058
6059         PR c++/8591
6060         * parser.c (cp_parser_elaborated_type_specifier): Convert
6061         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
6062         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
6063
6064 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
6065
6066         PR c++/9437
6067         * pt.c (unify): Don't unify '*T' with 'U C::*'.
6068
6069         PR c++/3902
6070         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
6071         inside a declarator.
6072
6073 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
6074
6075         * class.c (update_vtable_entry_for_fn): Add index parameter.
6076         Generate vcall thunk for covariant overriding from a virtual
6077         primary base.
6078         (dfs_modify_vtables): Adjust.
6079
6080 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
6081
6082         PR c++/9403
6083         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
6084         template keyword.
6085         (cp_parser_base_specifier): Look for and consume a
6086         TEMPLATE keyword. Replace switch with array index.
6087
6088         PR c++/795
6089         * semantics.c (finish_non_static_data_member): Remember the
6090         field's type even in a template.
6091
6092         PR c++/9415
6093         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
6094         already scoped.
6095
6096         PR c++/8545
6097         * parser.c (cp_parser_cast_expression): Be more tentative.
6098
6099 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6100
6101         * cp-tree.h (flagged_type_tree_s): Remove.
6102         (check_for_new_type): Likewise.
6103         * typeck2.c (check_for_new_type): Likewise.
6104
6105 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
6106
6107         * dump.c: ANSIfy function declarations and definitions.
6108
6109         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
6110
6111 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
6112
6113         PR c++/9354
6114         * init.c (build_new): Set the type of the new-expression, even
6115         when processing_templte_decl.
6116
6117         PR c++/9216
6118         * parser.c (cp_parser_primary_expression): Improve error message
6119         for templates used in an expression context.
6120
6121         PR c++/8696
6122         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
6123         parse when encountering "typedef".
6124
6125 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
6126
6127         * class.c, parser.c: ANSIfy function definitions and declarations.
6128
6129 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
6130
6131         PR c++/9328
6132         * error.c (dump_decl): For an OVERLOAD, just print the name of the
6133         function; it doesn't make sense to try to print its type.
6134         * semantics.c (finish_typeof): Issue errors about invalid uses.
6135
6136         PR c++/9298
6137         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
6138         function.
6139         (cp_parser_expression_statement): Use it.
6140         (cp_parser_explicit_instantiation): Likewise.
6141         * pt.c (do_decl_instantiation): Improve error handling logic.
6142
6143 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
6144
6145         PR c++/9384
6146         * parser.c (cp_parser_using_declaration): Issue error messages
6147         about name resolution failures here.
6148
6149         PR c++/9388
6150         * class.c (currently_open_derived_class): Use dependent_type_p.
6151         * cp-tree.h (dependent_type_p): New function.
6152         (dependent_template_arg_p): Likewise.
6153         (dependent_template_p): Likewise.
6154         (type_dependent_expression_p): Likewise.
6155         * parser.c (cp_parser_dependent_type_p): Remove.
6156         (cp_parser_value_dependent_type_p): Likewise.
6157         (cp_parser_type_dependent_expression_p): Likewise.
6158         (cp_parser_dependent_template_arg_p): Likewise.
6159         (cp_parser_dependent_template_id_p): Likewise.
6160         (cp_parser_dependent_template_p): Likewise.
6161         (cp_parser_diagnose_invalid_type_name): Replace
6162         cp_parser_dependent_type_p with dependent_type_p, etc.
6163         (cp_parser_primary_expresion): Likewise.
6164         (cp_parser_nested_name_specifier_opt): Likewise.
6165         (cp_parser_postfix_expression): Likewise.
6166         (cp_parser_unary_expression): Likewise.
6167         (cp_parser_template_name): Likewise.
6168         (cp_parser_class_name): Likewise.
6169         (cp_parser_lookup_name): Likewise.
6170         * pt.c (dependent_type_p): New function.
6171         (value_dependent_expression_p): Likewise.
6172         (type_dependent_expression_p): Likewise.
6173         (dependent_template_arg_p): Likewise.
6174         (dependent_template_id_p): Likewise.
6175         (dependent_template_p): Likewise.
6176
6177         PR c++/9285
6178         PR c++/9294
6179         * parser.c (cp_parser_simple_declaration): Return quickly when
6180         encountering errors.
6181
6182 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6183
6184         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
6185
6186 2003-01-17  Jason Merrill  <jason@redhat.com>
6187
6188         PR c++/9167, c++/9358
6189         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
6190
6191 2003-01-17  Jason Merrill  <jason@redhat.com>
6192
6193         PR c++/9342
6194         * call.c (build_conditional_expr): Always do lvalue-rvalue
6195         conversion.
6196
6197 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
6198
6199         PR c++/9294
6200         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
6201         * cp-tree.h (BASELINK_BINFO): Adjust.
6202         (BASELINK_FUNCTIONS): Likewise.
6203         (BASELINK_ACCESS_BINFO): Likewise.
6204         (tree_baselink): New structure.
6205         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
6206         (lang_tree_node): Add baselink.
6207         * decl.c (cp_tree_node_structure): Add BASELINK case.
6208         * search.c (build_baselink): Adjust.
6209         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
6210         test from TREE_LIST case.
6211
6212         PR c++/9272
6213         * parser.c (cp_parser_constructor_declarator_p): Do not assume
6214         that a constructor cannot be declared outside of its own class.
6215
6216         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
6217         be resolved, neither can the qualified name.
6218
6219         * rtti.c (get_pseudo_ti_desc): Fix thinko.
6220
6221 2003-01-16  Jason Merrill  <jason@redhat.com>
6222
6223         PR c++/8564
6224         * init.c (build_vec_init): Re-add maxindex parm.
6225         (perform_member_init, build_aggr_init): Pass it.
6226         (build_new_1): Pass it. Use an incomplete array type for full_type.
6227         * typeck.c (build_modify_expr): Pass it.
6228         * cp-tree.h: Adjust.
6229
6230 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
6231
6232         * cp-tree.h (tsubst_copy_and_build): New declaration.
6233         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
6234         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
6235         (tsubst_copy_and_build): New function.
6236
6237 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
6238
6239         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
6240         (PARTIAL_INSTANTIATION_P): Remove.
6241         (IMPLICIT_TYPENAME_P): Likewise.
6242         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
6243         (build_typename_type): Remove declaration.
6244         (parmlist_is_exprlist): Likewise.
6245         * decl.c (build_typename_type): Make it static, remove third
6246         parameter.
6247         (push_class_binding): Don't do implicit typename stuff.
6248         (make_typename_type): Likewise.
6249         (lookup_name_real): Likewise.
6250         (grokdeclarator): Don't try to convert declarations into
6251         initializations.  Don't do implicit typename stuff.
6252         (parmlist_is_exprlist): Remove.
6253         (xref_basetypes): Simplify.
6254         * decl2.c (grokfield): Don't try to convert declarations into
6255         initializations.
6256         (build_anon_union_vars): Do this while processing templates, too.
6257         (finish_anon_union): Likewise.
6258         * error.c (dump_type): Remove implicit typename handling.
6259         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
6260         (cp_parser_primary_expression): Correct handling of names not
6261         found by unqualified name lookup in templates.
6262         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
6263         of types when possible.
6264         (cp_parser_simple_declaration): Complain intelligently about some
6265         invalid declarations.
6266         (cp_parser_member_declaration): Likewise.
6267         (cp_parser_constructor_declarator_p): Don't check when we're in a
6268         function scope.
6269         * pt.c (instantiate_class_template): Remove
6270         PARTIAL_INSTANTIATION_P gunk.
6271         * search.c (lookup_field_r): Don't build implicit typenames.
6272         (marked_pushdecls_p): Don't enter dependent base types.
6273         (unmarked_pushdecls_p): Likewise.
6274         * semantics.c (begin_class_definition): Remove implicit typename
6275         stuff.
6276
6277 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
6278
6279         PR c++/9212
6280         * parser.c (cp_parser_direct_declarator): If accepting either
6281         abstract or named, the name must be an unqualified-id.
6282
6283 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6284
6285         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
6286
6287 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6288
6289         * decl2.c (check_classfn): Fix uninitialized warning.
6290         (build_anon_union_vars): Likewise.
6291         * pt.c (tsubst_copy): Likewise.
6292
6293 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
6294
6295         Further conform g++'s __vmi_class_type_info to the C++ ABI
6296         specification.
6297         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
6298         the specification.
6299         (class_hint_flags): Likewise.
6300
6301 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6302
6303         * config-lang.in: Add semantics.c to gtfiles.
6304         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
6305         (saved_scope): Likewise.
6306         (type_lookups): Remove.
6307         (deferred_access): New structure.
6308         (type_access_control): Remove.
6309         (save_type_access_control): Likewise.
6310         (reset_type_access_control): Likewise.
6311         (decl_type_access_control): Likewise.
6312         (push_deferring_access_checks): Declare.
6313         (resume_deferring_access_checks): Likewise.
6314         (stop_deferring_access_checks): Likewise.
6315         (pop_deferring_access_checks): Likewise.
6316         (get_deferred_access_checks): Likewise.
6317         (pop_to_parent_deferring_access_checks): Likewise.
6318         (perform_deferred_access_checks): Likewise.
6319         (perform_or_defer_access_check): Likewise.
6320         * decl.c (make_typename_type): Use perform_or_defer_access_check.
6321         (make_unbound_class_template): Likewise.
6322         (grokdeclarator): Don't call decl_type_access_control.
6323         * parser.c (cp_parser_context): Remove deferred_access_checks
6324         and deferring_access_checks_p fields.
6325         (cp_parser_context_new): Adjust.
6326         (cp_parser): Remove access_checks_lists.
6327         (cp_parser_defer_access_check): Remove.
6328         (cp_parser_start_deferring_access_checks): Remove.
6329         (cp_parser_stop_deferring_access_checks): Remove.
6330         (cp_parser_perform_deferred_access_checks): Remove.
6331         (cp_parser_nested_name_specifier_opt): Use new deferred access
6332         functions.
6333         (cp_parser_simple_declaration): Likewise.
6334         (cp_parser_template_id): Likewise.
6335         (cp_parser_function_definition): Likewise.
6336         (cp_parser_class_specifier): Likewise.
6337         (cp_parser_lookup_name): Likewise.
6338         (cp_parser_single_declaration): Likewise.
6339         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
6340         (cp_parser_parse_tentatively): Likewise.
6341         (cp_parser_parse_definitely): Likewise.
6342         (yyparse): Likewise.
6343         (cp_parser_init_declarator): Remove access_checks parameter.
6344         Use new deferred access functions.
6345         (cp_parser_function_definition_from_specifiers_and_declarator):
6346         Likewise.
6347         (cp_parser_class_head): Remove deferring_access_checks_p and
6348         saved_access_checks parameters.  Use new deferred access functions.
6349         (cp_parser_member_specification_opt): Don't call
6350         reset_type_access_control.
6351         * search.c (type_access_control): Remove.
6352         * semantics.c: Include "gt-cp-semantics.h".
6353         (deferred_type_access_control): Remove.
6354         (deferred_access_stack): New variable.
6355         (deferred_access_free_list): Likewise.
6356         (push_deferring_access_checks): New function.
6357         (resume_deferring_access_checks): Likewise.
6358         (stop_deferring_access_checks): Likewise.
6359         (pop_deferring_access_checks): Likewise.
6360         (get_deferred_access_checks): Likewise.
6361         (pop_to_parent_deferring_access_checks): Likewise.
6362         (perform_deferred_access_checks): New function, adapted from
6363         cp_parser_perform_deferred_access_checks.
6364         (perform_or_defer_access_check): New function, adapted from
6365         cp_parser_defer_access_check.
6366         (current_type_lookups): Remove.
6367         (deferred_type_access_control): Likewise.
6368         (decl_type_access_control): Likewise.
6369         (save_type_access_control): Likewise.
6370         (reset_type_access_control): Likewise.
6371         (begin_function_definition): Adjust.
6372         (begin_class_definiton): Likewise.
6373
6374 2003-01-13  Jason Merrill  <jason@redhat.com>
6375
6376         PR c++/8748
6377         * class.c (build_base_path): Take the address before calling save_expr.
6378
6379         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
6380         all the ambiguous conversions are bad.
6381
6382         * class.c (maybe_warn_about_overly_private_class): Don't stop
6383         searching when we find a nonprivate method.
6384
6385         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
6386
6387 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
6388
6389         * cp-tree.h (get_arglist_len_in_bytes): Remove.
6390
6391         PR c++/9264
6392         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
6393         typeame types more robustly.
6394
6395 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
6396
6397         * parser.c:  Fix comment typos.
6398
6399 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
6400
6401         PR c++/9099
6402         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
6403         an object_type which is not a class type.
6404
6405 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
6406
6407         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
6408         (cp_parser_late_parsing_default_args): Likewise.
6409
6410 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
6411
6412         * cfns.gperf: ANSIfy function declarations.
6413         * cfns.h: Regenerate.
6414         * cp-tree.h: ANSIfy function declarations.
6415
6416 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
6417
6418         * cp-tree.h (reparse_absdcl_as_expr): Remove.
6419         (reparse_absdcl_as_casts): Likewise.
6420         (reparse_decl_as_expr): Likewise.
6421         (finish_decl_parsing): Likewise.
6422         * decl2.c (reparse_absdcl_as_expr): Remove.
6423         (reparse_absdcl_as_casts): Likewise.
6424         (repase_decl_as_expr): Likewise.
6425         (finish_decl_parsing): Likewise.
6426
6427         PR c++/9128
6428         PR c++/9153
6429         PR c++/9171
6430         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
6431         function.
6432         (cp_parser_nested_name_specifier_opt): Correct the
6433         check_dependency_p false.
6434         (cp_parser_postfix_expression): Fix formatting.
6435         (cp_parser_decl_specifier_seq): Avoid looking for constructor
6436         declarators when possible.
6437         (cp_parser_template_id): Avoid performing name-lookup when
6438         possible.
6439         (cp_parser_class_head): Do not count specializations when counting
6440         levels of templates.
6441         (cp_parser_constructor_declarator_p): Return immediately if
6442         there's no chance that the tokens form a constructor declarator.
6443         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
6444         expression with reference type.
6445         (get_tinfo_decl_dynamic): Do not return an expression with
6446         reference type.
6447         (build_typeid): Add comment.  Do not return an expression with
6448         reference type.
6449         * typeck.c (build_class_member_access_expr): Improve handling of
6450         conditionals and comma-expressions as objects.
6451
6452 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
6453
6454         * cfns.gperf: ANSIfy function declarations.
6455         * cfns.h: Regenerate.
6456         * cp-tree.h: ANSIfy function declarations.
6457         * parser.c: ANSIfy function declarations & definitions.
6458
6459         * decl.c (bad_specifiers): Fix parameter order error I introduced.
6460
6461 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
6462
6463         Merge from pch-branch:
6464
6465         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
6466
6467         Merge to tag pch-merge-20030102:
6468
6469         * semantics.c (finish_translation_unit): Don't call finish_file.
6470         * parser.c: Don't include ggc.h.
6471         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
6472         read first token here.  Don't allow PCH files after the first
6473         token is read.
6474         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
6475         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
6476         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
6477         (cp_parser_late_parsing_for_member): Don't duplicate call to
6478         cp_lexer_set_source_position_from_token.
6479         (cp_parser_late_parsing_default_args): Likewise.
6480         (yyparse): Call finish_file after clearing the_parser.
6481
6482         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
6483
6484         * Make-lang.in: Remove $(GGC_H) from all dependencies.
6485         (CXX_TREE_H): Add $(GGC_H).
6486         * class.c: Don't include ggc.h.
6487         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
6488         (method_name_cmp): Likewise.
6489         (resort_data): New variable.
6490         (resort_field_decl_cmp): New.
6491         (resort_method_name_cmp): New.
6492         (resort_sorted_fields): New.
6493         (resort_type_method_vec): New.
6494         (finish_struct_methods): Delete cast.
6495         (finish_struct_1): Delete cast.
6496         * cp-tree.h: Include ggc.h.
6497         (struct lang_type_class): Add reorder attribute to field `methods'.
6498         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
6499         (resort_sorted_fields): New prototype.
6500         (resort_type_method_vec): New prototype.
6501         * call.c: Don't include ggc.h.
6502         * decl.c: Likewise.
6503         * decl2.c: Likewise.
6504         * init.c: Likewise.
6505         * lex.c: Likewise.
6506         * method.c: Likewise.
6507         * optimize.c: Likewise.
6508         * parse.y: Likewise.
6509         * pt.c: Likewise.
6510         * repo.c: Likewise.
6511         * search.c: Likewise.
6512         * semantics.c: Likewise.
6513         * spew.c: Likewise.
6514         * tree.c: Likewise.
6515
6516         * lang-specs.h: Remove comment.
6517
6518         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
6519
6520         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
6521         (operator_name_info): Mark to be saved for PCH, specify size.
6522         (assignment_operator_name_info): Likewise.
6523
6524         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
6525
6526         * decl.c (anon_cnt): Mark to be saved for PCH.
6527
6528         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
6529
6530         * lex.c  (init_reswords): Delete now-untrue comment.
6531         Allocate ridpointers using GGC.
6532
6533         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
6534
6535         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
6536
6537         * g++spec.c (lang_specific_driver): Don't include standard
6538         libraries in `added'.
6539
6540         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
6541
6542         * decl2.c (finish_file): Call c_common_write_pch.
6543         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
6544
6545         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
6546
6547         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
6548         files when using g++.
6549         * lang-specs.h: Handle compiling C++ header files.
6550
6551 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
6552
6553         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
6554
6555 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6556
6557         * pt.c (push_access_scope_real): Call push_to_top_level for
6558         function in namespace scope.
6559         (pop_access_scope): Call pop_from_top_level for function in
6560         namespace scope.
6561
6562 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
6563
6564         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
6565
6566 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
6567
6568         * Make-lang.in (c++.install-common, c++.install-man,
6569         c++.uninstall): Prepend $(DESTDIR) to destination paths in
6570         all (un)installation commands.
6571         (c++.install-common): Rewrite $(LN) commands to support
6572         DESTDIR with "ln" as well as with "ln -s".
6573
6574 2003-01-08  Jason Merrill  <jason@redhat.com>
6575
6576         * parser.c (cp_parser_primary_expression): See through explicitly
6577         scoped ALIAS_DECLs, too.
6578
6579 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
6580
6581         * decl.c: Remove some #if 0 code.
6582
6583         * decl.c: ANSIfy function declarations.
6584
6585 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
6586
6587         * parser.c (cp_parser_asm_definition): Correct handling of omitted
6588         operands.
6589
6590 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6591
6592         PR c++/9030
6593         * decl.c (make_typename_type): Check access only when tf_error.
6594         (make_unbound_class_template): Likewise.
6595         * pt.c (saved_access_scope): New variable.
6596         (push_access_scope_real): New function.
6597         (push_access_scope): Likewise.
6598         (pop_access_scope): Likewise.
6599         (tsubst_default_argument): Use them.
6600         (instantiate_template): Likewise.
6601         (regenerate_decl_from_template): Likewise.
6602         (instantiate_decl): Likewise.
6603         (get_mostly_instantiated_function_type): Likewise.
6604
6605 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
6606
6607         * tree.c: Delete bogus #if 0 code.
6608
6609 2003-01-07  Andreas Schwab  <schwab@suse.de>
6610
6611         * class.c (layout_class_type): Don't use
6612         PCC_BITFIELD_TYPE_MATTERS if not defined.
6613
6614 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
6615
6616         PR c++/9165
6617         * decl2.c (build_cleanup): Mark the object as used.
6618
6619         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
6620         (hash_local_specialization): New function.
6621         (register_local_specialization): Revert 2003-01-05 change.
6622         (instantiate_decl): Use hash_local_specialization when creating
6623         the local_specializations table.
6624
6625         * decl2.c (mark_used): Do not synthesize thunks.
6626
6627         * class.c (layout_class_type): Correct handling of unnamed
6628         bitfields wider than their types.
6629
6630         PR c++/9189
6631         * parser.c (cp_parser): Remove default_arg_types.  Update
6632         documentation for unparsed_functions_queues.
6633         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
6634         parameter.
6635         (cp_parser_new): Don't set parser->default_arg_types.
6636         (cp_parser_function_definition): Adjust usage of
6637         unparsed_funtions_queues.
6638         (cp_parser_class_specifier): Don't mess with
6639         parser->default_arg_types.  Handle default argument processing in
6640         a separate phase from function body processing.
6641         (cp_parser_template_declaration_after_export): Adjust usage of
6642         unparsed_functions_queues.
6643         (cp_parser_late_parsing_for_member): Do not handle default
6644         arguments.
6645
6646 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
6647
6648         PR c++/9109
6649         * parser.c (cp_parser_declarator_kind): New enum.
6650         (cp_parser_declarator): Adjust.
6651         (cp_parser_direct_declarator): Adjust. Allow for either named or
6652         abstract declarator. Prefer abstract, if possible. Allow
6653         parenthesized function name.
6654         (cp_parser_condition): Adjust cp_parser_declarator call.
6655         (cp_parser_explicit_instantiation): Likewise.
6656         (cp_parser_init_declarator): Likewise.
6657         (cp_parser_type_id): Likewise.
6658         (cp_parser_function_definition): Likewise.
6659         (cp_parser_member_declaration): Likewise.
6660         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
6661         the tentative parsing.
6662         (cp_parser_exception_declaration): Likewise.
6663
6664 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
6665
6666         * parser.c (cp_parser_template_parameter): Adjust call to
6667         cp_parser_parameter_declaration.
6668         (cp_parser_parameter_declaration_list): Likewise.
6669         (cp_parser_parameter_declaration): Replace
6670         greater_than_is_operator_p with template_parm_p parameter.  Do not
6671         cache tokens for template default arguments.
6672
6673         * pt.c (retrieve_local_specialization): Use htab_find, not
6674         htab_find_with_hash.
6675         (register_local_specialization): Use htab_find_slot, not
6676         htab_find_slot_with_hash.
6677         (instantiate_decl): Pass a hash function to htab_create.
6678
6679 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6680
6681         * parser.c (cp_parser_binary_expression,
6682         cp_parser_multiplicative_expression,
6683         cp_parser_additive_expression, cp_parser_shift_expression,
6684         cp_parser_relational_expression, cp_parser_equality_expression,
6685         cp_parser_and_expression, cp_parser_exclusive_or_expression,
6686         cp_parser_inclusive_or_expression,
6687         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
6688         cp_parser_binary_expression): Const-ify.
6689
6690 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
6691
6692         * method.c (use_thunk): Disable access control while building the
6693         body of the thunk.
6694
6695 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
6696
6697         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
6698         front end.
6699
6700 2003-01-03  Matt Austern  <austern@apple.com>
6701
6702         * cp-tree.h (struct lang_type_class): add field for key method
6703         (cp_global_trees): rename dynamic_classes to keyed_classes
6704         (key_method): add definition
6705         * class.c (finish_struct_1): compute class's key method, and add
6706         the class to keyed_classes list if there is no key method.
6707         * decl.c (finish_function): add class to keyed_classes list if we
6708         see a definition of the class's key method.
6709         * pt.c (instantiate_class_template): add template specialization
6710         of a dynamic class to keyed_classes list.
6711         * decl2.c (key_method): remove
6712         (finish_file): iterate only through keyed_classes list when
6713         deciding whether to emit vtables, remove class from its list after
6714         we do the emission.
6715
6716 2003-01-02  Jason Merrill  <jason@redhat.com>
6717
6718         * call.c (build_conditional_expr): Stabilize lvalues properly.
6719         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
6720         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
6721         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
6722
6723         * call.c (convert_like_real): Call decl_constant_value for an
6724         IDENTITY_CONV even if there are no more conversions.
6725
6726         * cvt.c (build_up_reference): Don't push unnamed temps.
6727
6728         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
6729
6730         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
6731         for a backend struct.
6732
6733         * except.c (wrap_cleanups_r, build_throw): Make
6734         MUST_NOT_THROW_EXPRs void.
6735         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
6736
6737         * init.c (build_vec_delete_1): Pre-evaluate the base address.
6738
6739         * init.c (get_temp_regvar): Simplify logic.
6740
6741         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
6742         our replacement is a decl.
6743
6744         * decl.c (cp_make_fname_decl): Push the decls inside the
6745         outermost scope.
6746
6747 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
6748
6749         PR c++/45, c++/3784
6750         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
6751         the same too.
6752
6753 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
6754
6755         * parser.c (struct cp_parser): Add access_checks_lists field
6756         (cp_parser_simple_declaration): Use.
6757         (cp_parser_init_declarator): Likewise.
6758
6759 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
6760
6761         * parser.c (cp_parser_declaration): Accept the __extension__
6762         keyword before the declaration.
6763
6764         PR c++/2843
6765         * parser.c (cp_parser_parameter_declaration): Allow attributes to
6766         appear after the declarator.
6767
6768         * call.c (build_new_method_call): Fix typo in message format
6769         string.
6770
6771 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
6772
6773         * parser.c (cp_lexer_next_token_is): Declare it inline.
6774         (cp_lexer_set_source_position_from_token): Likewise.
6775         (cp_lexer_debugging_p): Likewise.
6776         (cp_parser_parsing_tentatively): Likewise.
6777         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
6778         to the cp_lexer_peek_token.
6779
6780         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
6781         expression.
6782
6783 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
6784
6785         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
6786         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
6787         cp/repo.c: Fix copyright years.
6788
6789 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
6790
6791         * lex.c: Remove superfluous include of cpplib.h.
6792         (CONSTRAINT): Define without conditions.
6793         (init_cp_pragma): Use c_register_pragma.
6794
6795 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
6796
6797         * .cvsignore: Remove.
6798
6799 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6800
6801         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
6802           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
6803           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
6804           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
6805           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
6806           copyright header.
6807         * lex.h: parse.y is dead, so don't mention it.  Also replace the
6808           copyright header with the default GNU copyright header.
6809
6810 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
6811
6812         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
6813         (lookup_name_namespace_only): Likewise.
6814         (begin_only_namespace_names): Likewise.
6815         (end_only_namespace_names): Likewise.
6816         * decl.c (only_namespace_names): Remove.
6817         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
6818         (lookup_name_real): Do not check only_namespace_names.
6819         (lookup_name_namespace_only): Remove.
6820         (begin_only_namespace_names): Likewise.
6821         (end_only_namespace_names): Likewise.
6822         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
6823         nested-name-specifiers more gracefully.
6824         (cp_parser_class_or_namespace_name): Avoid looking up namespace
6825         names when they cannot possibly appear.
6826         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
6827         (cp_parser_elaborated_type_specifier): Likewise.
6828         (cp_parser_namespace_name): Only look for namespace names.
6829         (cp_parser_lookup_name): Add is_namespace parameter.
6830         (cp_parser_lookup_name_simple): Adjust call to
6831         cp_parser_lookup_name.
6832
6833         * parser.c (cp_parser_dependent_type_p): Fix thinko.
6834
6835 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
6836
6837         * .cvsignore: Update.
6838
6839 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
6840
6841         * class.c (modify_vtable_entry): Remove unused variable.
6842         (get_vcall_index): Always expect a non-thunk.
6843         (update_vtable_entry_for_fn): Combine covariant adjustments, when
6844         overriding a thunk. Pass get_vcall_index a non-thunk.
6845
6846         * decl2.c (finish_file): Mark undefined inlines as extern.
6847
6848 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
6849
6850         * cp-tree.def (RETURN_INIT): Remove.
6851         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
6852         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
6853         (note_level_for_for): Remove.
6854         (note_level_for_try): Likewise.
6855         (note_level_for_catch): Likewise.
6856         (finish_named_return_value): Likewise.
6857         (do_pushlevel): Change prototype.
6858         (pending_lang_change): Remove.
6859         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
6860         sk_for.
6861         (note_level_for_for): Remove.
6862         (note_level_for_try): Likewise.
6863         (note_level_for_catch): Likewise.
6864         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
6865         * parser.c (cp_parser_context_free_list): Make it "deletable".
6866         (cp_parser_template_argument): Remove misleading comment.
6867         * pt.c (tsubst_expr): Remove RETURN_INIT code.
6868         * semantics.c (genrtl_named_return_value): Remove.
6869         (do_pushlevel): Take a scope kind as an argument.
6870         (begin_if_stmt): Adjust.
6871         (begin_while_stmt): Likewise.
6872         (begin_for_stmt): Likewise.
6873         (finish_for_init_stmt): Likewise.
6874         (begin_switch_stmt): Likewise.
6875         (begin_handler): Likewise.
6876         (begin_compound_stmt): Likewise.
6877         (finish_named_return_value): Remove.
6878         (cp_expand_stmt): Remove RETURN_INIT case.
6879         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
6880
6881 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
6882
6883         PR c++/9112
6884         * parser.c (cp_parser_direct_declarator): Handle erroneous
6885         parenthesized declarators correctly.
6886
6887 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6888
6889         * cp-tree.h (pending_lang_change): Declare.
6890
6891 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
6892
6893         * parser.c (cp_parser_context_free_list): New variable.
6894         (cp_parser_context_new): Use it.
6895         (cp_parser_error): Check return code from
6896         cp_parser_simulate_error.
6897         (cp_parser_simulate_error): Return a value.
6898         (cp_parser_id_expression): Optimize common case.
6899         (cp_parser_class_name): Likewise.
6900         (cp_parser_class_specifier): Adjust call to
6901         cp_parser_late_parsing_default_args.
6902         (cp_parser_lookup_name): Optimize common case.
6903         (cp_parser_late_parsing_for_member): Adjust call to
6904         cp_parser_late_parsing_default_args.
6905         (cp_parser_late_parsing_default_args): Add scope parameter.
6906         (cp_parser_require): Avoid creating the error message unless it's
6907         needed.
6908         (cp_parser_parse_definitely): Place free'd contexts on the free
6909         list.
6910
6911         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
6912
6913 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
6914
6915         * parser.c (cp_parser_parameter_declaration_clause): Treat system
6916         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
6917
6918 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
6919
6920         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
6921         GCC, not GNU CC.
6922
6923 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
6924
6925         * parse.y: Remove.
6926         * spew.c: Likewise.
6927         * Make-lang.in (gt-cp-spew.h): Remove.
6928         * cp-tree.h (do_pending_lang_change): Remove.
6929         (do_identifier): Change prototype.
6930         (finish_id_expr): Remove.
6931         * decl.c (lookup_name_real): Remove yylex variable.
6932         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
6933         * lex.c (init_cpp_parse): Remove.
6934         (reduce_cmp): Likewise.
6935         (token_cmp): Likewise.
6936         (yychar): Likewise.
6937         (lastiddecl): Likewise.
6938         (token_count): Likewise.
6939         (reduce_count): Likewise.
6940         (yyhook): Likewise.
6941         (print_parse_statistics): Likewise.
6942         (do_pending_lang_change): Likewise.
6943         (do_identifier): Remove parsing parameter.
6944         * lex.h (lastiddecl): Remove.
6945         (looking_for_typename): Remove.
6946         (looking_for_template): Likewise.
6947         (pending_lang_change): Likewise.
6948         (yylex): Likewise.
6949         * semantics.c (finish_id_expr): Remove.
6950
6951         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
6952         thread" correctly.
6953
6954 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
6955
6956         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
6957         end, not the C front end.
6958
6959 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
6960
6961         * cp-tree.h (THUNK_TARGET): New macro.
6962         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
6963         (finish_thunk): Remove offset parms.
6964         * class.c (find_final_overrider): Look through thunks.
6965         (get_vcall_index): Use THUNK_TARGET.
6966         (update_vtable_entry_for_fn): Look through thunks. Set covariant
6967         fixed offset here. Adjust finish_thunk call.
6968         (build_vtbl_initializer): Adjust finish_thunk calls.
6969         * mangle.c (mangle_call_offset): Remove superfluous if.
6970         (mangle_thunk): Adjust.
6971         * method.c (make_thunk): Adjust.
6972         (finish_thunk): Adjust.
6973         (thunk_adjust): Remove assert.
6974         (use_thunk): Use THUNK_TARGET
6975         * dump1.c (cp_dump_tree): Adjust thunk dumping.
6976
6977         PR c++/9054
6978         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
6979         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
6980
6981 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6982
6983         Remove traditional C constructs 4/n.
6984         * decl2.c (grok_method_quals, warn_if_unknown_interface,
6985         grok_x_components, cp_build_parm_decl, build_artificial_parm,
6986         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
6987         delete_sanity, check_member_template, check_java_method,
6988         check_classfn, finish_static_data_member_decl, grokfield,
6989         grokbitfield, grokoptypename, grok_function_init,
6990         cplus_decl_attributes, constructor_name, defer_fn,
6991         build_anon_union_vars, finish_anon_union, coerce_new_type,
6992         coerce_delete_type, comdat_linkage, maybe_make_one_only,
6993         key_method, import_export_vtable, import_export_class,
6994         output_vtable_inherit, import_export_decl, import_export_tinfo,
6995         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
6996         set_guard, start_objects, finish_objects,
6997         start_static_storage_duration_function,
6998         finish_static_storage_duration_function, get_priority_info,
6999         start_static_initialization_or_destruction,
7000         finish_static_initialization_or_destruction,
7001         do_static_initialization, do_static_destruction,
7002         prune_vars_needing_no_initialization, write_out_vars,
7003         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
7004         add_using_namespace, merge_functions, ambiguous_decl,
7005         lookup_using_namespace, lookup_using_namespace,
7006         qualified_lookup_using_namespace, set_decl_namespace,
7007         decl_namespace, current_decl_namespace, push_decl_namespace,
7008         pop_decl_namespace, push_scope, pop_scope, add_function,
7009         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
7010         lookup_arg_dependent, do_namespace_alias,
7011         validate_nonmember_using_decl, do_nonmember_using_decl,
7012         do_toplevel_using_decl, do_local_using_decl,
7013         do_class_using_decl, do_using_directive, check_default_args,
7014         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
7015         * parser.c (cp_parser_class_head): Use booleanss.
7016         * decl.c (walk_globals, walk_vtables): Likewise.
7017         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
7018         walk_globals): Change return type from 'int' to 'bool'.
7019         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
7020         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
7021         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
7022         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
7023         qualifier_flags, tinfo_base_init, generic_initializer,
7024         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
7025         dfs_class_hint_unmark, class_hint_flags, class_initializer,
7026         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
7027         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
7028         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
7029         * repo.c (repo_compile_flags, repo_template_declared,
7030         repo_template_defined, repo_class_defined, repo_get_id,
7031         repo_template_used, repo_vtable_used, repo_inline_used,
7032         repo_tinfo_used, repo_template_instantiated, extract_string,
7033         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
7034         finish_repo): Likewise.
7035         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
7036         cxx_print_xnode): Likewise..
7037         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
7038         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
7039         * cxxfilt.c (demangle_it, print_demangler_list, usage,
7040         standard_symbol_characters, hp_symbol_characters, main, fatal):
7041         Likewise.
7042         (strip_underscore):  Change type from 'int' to 'bool'.
7043         (main): Use boolean constants.
7044
7045 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7046
7047         Remove traditional C constructs 3/n.
7048         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
7049         build_up_reference, warn_ref_binding, convert_to_reference,
7050         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
7051         convert_to_void, convert, convert_force, build_type_conversion,
7052         build_expr_type_conversion, type_promotes_to,
7053         perform_qualification_conversions): Use C90 prototyping style.
7054         * decl2.c (grok_array_decl): Use boolean constant.
7055         (delete_sanity): Likewise.
7056         * typeck.c (build_unary_op): Likewise.
7057         * semantics.c (finish_switch_cond): Likewise.
7058         * parser.c (cp_parser_direct_new_declarator): Likewise.
7059         * init.c (build_new): Likewise.
7060
7061 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
7062
7063         * Make-lang.in (po-generated): Remove parse.c.
7064         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
7065         ($(srcdir)/cp/parse.h): Remove target.
7066         ($(srcdir)/cp/parse.c): Likewise.
7067         (gt-cp-parse.h): Likewise.
7068         (gt-cp-parser.h): New target.
7069         (c++.distclean): Do not remove parse.output.
7070         (c++.maintainer-clean): Do not remove parse.c or parse.h.
7071         (cp/spew.o): Remove target.
7072         (cp/lex.o): Adjust dependencies.
7073         (cp/pt.o): Likewise.
7074         (cp/parse.o): Likewise.
7075         (cp/TAGS): Do not mention parse.c.
7076         (cp/parser.o): New target.
7077         * NEWS: Mention the new parser.
7078         * call.c (build_scoped_method_call): Simplify.
7079         (build_method_call): Likewise.
7080         (build_new_function_call): Adjust calls to add_function_candidate
7081         and add_template_candidate.
7082         (build_new_op): Improve handling of erroroneous operands.
7083         (convert_default_arg): Remove circular argument processing.
7084         (name_as_c_string): New function.
7085         (build_new_method_call): Use it.
7086         (perform_implicit_conversion): Use error_operand_p.
7087         * class.c (finish_struct_anon): Use constructor_name_p.
7088         (check_field_decls): Likewise.
7089         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
7090         (resolve_address_of_overloaded_function): Likewise.
7091         (instantiate_type): Tweak pointer-to-member handling.
7092         (get_primary_binfo): Remove incorrect assertion.
7093         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
7094         * cp-tree.h (DEFARG_TOKENS): New macro.
7095         (default_arg): New structure.
7096         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
7097         (lang_tree_node): Add default_arg.
7098         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
7099         (type_info_ref_type): New macro.
7100         (saved_scope): Make processing_explicit_instantiation a boolean.
7101         (check_access): New field.
7102         (unparsed_text): Remove.
7103         (language_function): Remove unparsed_inlines.
7104         (error_operand_p): New macro.
7105         (lang_decl): Adjust pending_inline_info.
7106         (DEFARG_POINTER): Remove.
7107         (tag_types): Add typenames.
7108         (lookup_ualified_name): Declare.
7109         (lookup_name_real): Likewise.
7110         (shadow_tag): Adjust prototype.
7111         (get_scope_of_declarator): Declare it.
7112         (process_next_inline): Remove it.
7113         (check_for_missing_semicolon): Likewise.
7114         (maybe_get_template_decl_from_type_decl): Declare it.
7115         (finish_label_stmt): Adjust prototype.
7116         (finish_non_static_data_meber): Declare it.
7117         (finish_pseudo_destructor_call_expr): Rename to ...
7118         (finish_pseudo_destructor_expr): ... this.
7119         (finish_compound_literal): Declare it.
7120         (begin_inline_definitions): Remove it.
7121         (init_spew): Remove.
7122         (peekyylex): Likewise.
7123         (arbitrate_lookup): Likewise.
7124         (frob_opname): Likewise.
7125         (maybe_snarf_defarg): Likewise.
7126         (add_defarg_fn): Likewise.
7127         (do_pending_defargs): Likewise.
7128         (done_pending_defargs): Likewise.
7129         (unprocessed_defarg_fn): Likewise.
7130         (replace_defarg): Likewise.
7131         (end_input): Likewise.
7132         (get_overloaded_fn): Likewise.
7133         * cvt.c (convert_to_reference): Improve error handling.
7134         * decl.c (lookup_name_real): Do not declare it static.
7135         (maybe_push_to_top_level): Set check_access.
7136         (identifier_type_value): Adjust call to lookup_name_real.
7137         (lookup_qualified_name): New method.
7138         (lookup_name_real): Remove special-case parsing code.
7139         (lookup_name-nonclass): Adjust call to lookup_name_real.
7140         (lookup_name_namespace_only): Likewise.
7141         (lookup_name): Likewise.
7142         (check_tag_decl): Return the type declared.
7143         (shadow_tag): Likewise.
7144         (register_dtor_fn): Tweak check_access.
7145         (grokfndecl): Use constructor_name_p.
7146         (get_scope_of_declarator): New function.
7147         (grokdeclarator): Obscure tweaks for slightly different declarator
7148         representations.
7149         (start_method): Return error_mark_node to indicate failure.
7150         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
7151         * decl2.c (constructor_name_full): Simplify.
7152         (constructor_name): Use it.
7153         (build_expr_from_tree): Adjust for changes to do new parser.
7154         (push_scope): Improve robustness.
7155         (validate_nonmember_using_decl): Process declarations, not names.
7156         (do_class_using_decl): Likewise.
7157         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
7158         here.
7159         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
7160         * expr.c (cxx_expand_expr): Handle BASELINKs.
7161         * init.c (member_init_ok_or_else): Issue more errors.
7162         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
7163         * lex.c: Do not include parse.h.
7164         (yypring): Do not declare.
7165         (yylval): Likewise.
7166         (make_reference_declarator): Remove error-generating code.
7167         (rid_to_yy): Remove.
7168         (cxx_init): Do not call init_spew.
7169         (yypring): Remove.
7170         (check_for_missing_semicolon): Remove.
7171         * lex.h (got_scope): Remove.
7172         (got_object): Remove.
7173         * method.c (hack_identifier): Use finish_non_static_data_member.
7174         (implicitly_declare_fn): Adjust use of constructor_name.
7175         * parser.c: New file.
7176         * pt.c (parse.h): Do not include it.
7177         (maybe_get_template_decl_from_template): Do not declare it.
7178         (finish_member_template_decl): Tweak.
7179         (begin_explicit_instantiation): Adjust for
7180         processing_explicit_instantiation being boolean.
7181         (end_explicit_instantiation): Likewise.
7182         (maybe_process_partial_specialization): Tighten specialization
7183         test.
7184         (retrieve_local_specialization): Adjust ue of hash table.
7185         (eq_local_specializations): New function.
7186         (register_local_specialization): Likewise.
7187         (push_template_decl_real): Remove unnecessary test.
7188         (maybe_get_template_decl_from_type_decl): Don't make it static.
7189         (for_each_template_parm_r): Handle TYPEOF_TYPE.
7190         (tsubst_copy): Use retrieive_local_specialization to handle
7191         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
7192         Handle COMPONENT_REFs with pseudo-destructor-expressions.
7193         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
7194         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
7195         (unify): Tweak handling of CONST_DECLs.
7196         (regenerate_decl_from_template): Use push_nested_class.
7197         (template_for_substitution): New funciton.
7198         (instantiate_decl): Use it.  Register parameters as local
7199         specializations.
7200         * rtti.c (init_rtti_processing): Set type_info_ref_type.
7201         (build_typeid): Use it.
7202         (get_typeid): Likeise.
7203         * search.c (accessible_p): Use check_access, not
7204         flag_access_control.
7205         (adjust_result_of_qualified_name_lookup): Pay attention to the
7206         context_class.
7207         * semantics.c (finish_asm_stmt): Adjust error handling.
7208         (finish_label_stmt): Return the statement.
7209         (finish_non_static_data_member): New function.
7210         (finish_class_expr): Handle BASELINKs.
7211         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
7212         (finish_object_call_expr): Simplify handling during templates.
7213         (finish_pseudo_destructor_call_expr): Rename to ...
7214         (finish_pseudo_dtor_expr): ... this.
7215         (finish_compound_literal): New function.
7216         (begin_inline_definitions): Remove.
7217         (finish_sizeof): Remove special template handling.
7218         * spew.c: Do not include parse.h.
7219         * tree.c (get_overloaded_fn): Remove.
7220         * typeck.c (build_class_member_access_expr): Handle
7221         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
7222         (lookup_destructor): New function.
7223         (finish_class_member_access_expr): Use it.
7224         (convert_arguments): Simplify.
7225         (build_unary_op): Handle BASELINKs.
7226
7227 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
7228
7229         PR c++/4803
7230         * decl2.c (mark_used): Defer inline functions.
7231         (finish_file): Merge deferred_fns loops. Check all used
7232         inline functions have a definition.
7233         * method.c (make_thunk): Thunks are not inline.
7234
7235         PR c++/5116, c++/764
7236         * call.c (build_new_op): Make sure template class operands are
7237         instantiated.
7238
7239 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
7240
7241         PR C++/7964
7242         * cp-tree.h (resolve_scoped_fn_name): Prototype.
7243         * call.c (resolve_scoped_fn_name): New function. Deal with
7244         more template expansion. Broken out of ...
7245         * parse.y (parse_finish_call_expr): ... here. Call it.
7246         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
7247         resolve_scoped_fn_name and build_call_from_tree.
7248
7249         PR c++/9053
7250         * decl.c (duplicate_decls): Templates may be disambiguated by
7251         return type.
7252
7253         PR c++/8702
7254         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
7255         conversion operators on failure.
7256
7257 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7258
7259         Remove traditional C constructs 2/n.
7260         * call.c (tourney, build_field_call, equal_functions, joust,
7261         compare_ics, build_over_call, build_java_interface_fn_ref,
7262         convert_like_real, op_error, build_object_call, resolve_args,
7263         build_vfield_ref, check_dtor_name, build_scoped_method_call,
7264         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
7265         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
7266         standard_conversion, reference_related_p,
7267         reference_compatible_p, convert_class_to_reference,
7268         direct_reference_binding, reference_binding,
7269         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
7270         add_template_conv_candidate, any_viable, any_strictly_viable,
7271         build_this, splice_viable, print_z_candidates,
7272         build_user_type_conversion, build_new_function_call,
7273         conditional_conversion, build_conditional_expr, build_new_op,
7274         build_op_delete_call, enforce_access, call_builtin_trap,
7275         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
7276         convert_default_arg, type_passed_as, convert_for_arg_passing,
7277         in_charge_arg_for_name, is_properly_derived_from,
7278         maybe_handle_implicit_object, maybe_handle_ref_bind,
7279         source_type, add_warning, can_convert, can_convert_arg,
7280         perform_implicit_conversion, can_convert_arg_bad,
7281         initialize_reference, add_conv_candidate,
7282         add_template_candidate_real, add_template_candidate): Ansify.
7283
7284 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
7285
7286         PR c++/8572
7287         * cp-tree.h (grokoptypename): Add SCOPE parameter.
7288         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
7289         if in a template scope.
7290         * parse.y (unoperator): Return the scope.
7291         (operator_name): Adjust grokoptypename call.
7292
7293 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7294
7295         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
7296         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
7297         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
7298
7299 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
7300
7301         * ChangeLog: Fix a typo.
7302         * class.c: Fix comment typos.
7303         * cp-tree.h: Likewise.
7304
7305 2002-12-18  Jason Merrill  <jason@redhat.com>
7306
7307         Handle anonymous unions at the tree level.
7308         C++ ABI change: Mangle anonymous unions using the name of their
7309         first named field (by depth-first search).  Should not cause
7310         binary compatibility problems, though, as the compiler previously
7311         didn't emit anything for affected unions.
7312         * cp-tree.def (ALIAS_DECL): New tree code.
7313         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
7314         first field, not the largest.
7315         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
7316         push the decl, and write it out at namespace scope.
7317         * decl.c (lookup_name_real): See through an ALIAS_DECL.
7318         (pushdecl): Add namespace bindings for ALIAS_DECLs.
7319         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
7320         of a decl which doesn't have one.
7321         * typeck.c (build_class_member_access_expr): Don't recurse if
7322         we already have the type we want.
7323
7324 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7325
7326         PR c++/8099
7327         * friend.c (make_friend_class): Allow partial specialization
7328         when declaration is not a template friend.
7329
7330 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7331
7332         PR c++/3663
7333         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
7334         TREE_PROTECTED to created decl nodes.
7335
7336 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
7337
7338         * class.c (build_base_field): Do not set DECL_PACKED on the
7339         FIELD_DECL.
7340
7341 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7342
7343         * cp-tree.h (struct tree_srcloc): Use location_t.
7344         (SOURCE_LOCUS): New.
7345         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
7346
7347 2002-12-17  Jason Merrill  <jason@redhat.com>
7348
7349         * decl.c (finish_function): Also complain about no return in
7350         templates.
7351         * semantics.c (finish_return_stmt): Also call check_return_expr in
7352         templates.
7353         * typeck.c (check_return_expr): In a template, just remember that we
7354         saw a return.
7355
7356 2002-12-16  Jason Merrill  <jason@redhat.com>
7357
7358         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
7359         of the CALL_EXPR.
7360
7361         * semantics.c (do_pushlevel): Call pushlevel after adding the
7362         SCOPE_STMT.
7363         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
7364         * parse.y (function_body): Go back to using compstmt.
7365         * decl.c (pushdecl): Skip another level to get to the parms level.
7366
7367         * call.c (build_new_method_call): Use is_dummy_object to determine
7368         whether or not to evaluate the object parameter to a static member
7369         function.
7370
7371 2002-12-14  Jason Merrill  <jason@redhat.com>
7372
7373         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
7374         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
7375         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
7376         don't bother with an AGGR_INIT_EXPR.
7377         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
7378         just generate a new decl normally.  Take return slot parm.
7379         * cp-tree.h: Adjust prototype.
7380
7381 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7382
7383         PR C++/8031
7384         * cvt.c (convert_to_pointer_force): Don't try comparing against
7385         erronous type.
7386
7387 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
7388
7389         * cp-tree.h: Have the multiple-include guards around
7390         the entire file.
7391
7392 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
7393
7394         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
7395         for SPEW_DEBUG.
7396         (snarf_method): Same.
7397         (snarf_defarg): Same.
7398
7399 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
7400
7401         PR c++/8372
7402         * pt.c (tsubst_copy): Handle destructor names more correctly.
7403
7404 2002-12-10  Matt Austern   <austern@apple.com>
7405
7406         * cp-tree.h: get rid of needs_virtual_reinit bit.
7407
7408 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
7409
7410         * NEWS: Document removal of in-class initialization extension for
7411         static data members of non-arithmetic, non-enumeration type.
7412         * decl.c (check_static_variable_definition): Do not allow that
7413         extension.
7414         * decl2.c (grokfield): Do not call digest_init when processing
7415         templates.
7416
7417 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7418
7419         * error.c (dump_expr): Fix format specifier warning.
7420
7421 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
7422
7423         * class.c (finish_struct_1): Correct comment.
7424         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
7425
7426 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7427
7428         PR C++/8799
7429         * error.c (dump_expr): Don't ever try to dump a non-existent
7430         expression.
7431
7432 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
7433
7434         Implement covariant returns.
7435         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
7436         (struct lang_decl_flags): Add this_thunk_p flag.
7437         Rename vcall_offset to virtual_offset.
7438         (struct lang_decl): Rename delta to fixed_offset.
7439         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
7440         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
7441         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
7442         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
7443         (make_thunk): Add this_adjusting arg.
7444         (finish_thunk): Declare.
7445         (mangle_thunk): Add this_adjusting arg.
7446         * class.c (get_vcall_index): Use base function for lookup.
7447         (update_vtable_entry_for_fn): Generate covariant thunk.
7448         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
7449         (build_vtbl_initializer): Use base function for lookup.
7450         Finish covariant thunk here. Adjust thunk generation.
7451         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
7452         Adjust thunk dumping.
7453         * mangle.c (mangle_call_offset): New function.
7454         (mangle_thunk): Adjust for covariant thunks.
7455         * method.c (make_thunk): Adjust. Do not set name here.
7456         (finish_thunk): New function. Set name here.
7457         (use_thunk): Generate covariant thunks too.
7458         (thunk_adjust): New function.
7459         * search.c (covariant_return_p): Remove. Fold into ...
7460         (check_final_overrider): ... here. Simplify.
7461         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
7462
7463 2002-12-03  Jason Merrill  <jason@redhat.com>
7464
7465         PR c++/8674
7466         * call.c (build_over_call): Check specifically for TARGET_EXPR
7467         when eliding.
7468
7469         PR c++/8461, c++/8625
7470         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
7471         (cp_convert_parm_for_inlining): Remove.
7472         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
7473         Remove.
7474         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
7475         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
7476
7477         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
7478         an ambiguous conversion.
7479
7480 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
7481
7482         PR c++/8688
7483         * decl.c (reshape_init): Handle erroneous initializers.
7484
7485 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
7486
7487         PR c++/8720
7488         * spew.c (remove_last_token): Make sure that last_chunk is set
7489         correctly.
7490
7491         PR c++/8615
7492         * error.c (dump_expr): Handle character constants with
7493         TREE_OVERFLOW set.
7494
7495 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7496
7497         DR 180
7498         * decl.c (grokdeclarator): Require class-key for all friend class.
7499         Output the correct type and context in the error message.
7500
7501 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
7502
7503         PR c++/5919
7504         * pt.c (unify): Use variably_modified_type_p to test validity of
7505         template argument types.
7506
7507         PR c++/8727
7508         * cp-tree.h (lang_type_class): Add typeinfo_var.
7509         (CLASSTYPE_TYPEINFO_VAR): New macro.
7510         * rtti.c (get_tinfo_decl): Use it.
7511
7512         PR c++/8663
7513         * init.c (expand_member_init): Always get the main variant of a
7514         base class.
7515
7516 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
7517
7518         PR c++/8332
7519         PR c++/8493
7520         * decl.c (cxx_init_decl_processing): Use size_type_node, not
7521         c_size_type_node.
7522         * decl2.c (coerce_new_type): Likewise.
7523         * except.c (do_allocate_exception): Likewise.
7524
7525 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
7526
7527         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
7528         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
7529         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
7530         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
7531         typeck2.c: Include coretypes.h and tm.h.
7532         * Make-lang.in: Update dependencies.
7533
7534 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
7535
7536         PR c++/8227
7537         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
7538         (check_initializer): Validate the type of the initialized
7539         variable, even if the initializer is absent.
7540         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
7541
7542         PR c++/8214
7543         * typeck.c (convert_for_assignment): Do not use
7544         decl_constant_value on the operand.
7545
7546         PR c++/8511
7547         * pt.c (instantiate_decl): Handle template friends defined outside
7548         of the class correctly.
7549
7550 2002-11-29  Joe Buck <jbuck@synopsys.com>
7551
7552         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
7553         anonymous structs.
7554
7555 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
7556
7557         * class.c (walk_subobject_offsets): Recur on binfos as well as on
7558         types.
7559         (layout_nonempty_base_or_field): Pass it a binfo when processing a
7560         base class.
7561         (layout_empty_base): Likewise.
7562         (build_base_field): Likewise.
7563
7564 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
7565
7566         * class.c (build_base_field): Make sure we get the canonical base
7567         when descending through primary bases.
7568
7569 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
7570
7571         * decl.c (check_initializer): Don't error on initialisation of
7572         a scalar with a brace-enclosed expression.
7573
7574 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
7575
7576         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
7577         (template_parms_equal): Remove prototype.
7578         * typeck.c (buuld_indirect_ref): Reformat.
7579
7580 2002-11-25  Jason Merrill  <jason@redhat.com>
7581
7582         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
7583         and a DO_STMT.
7584
7585 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
7586
7587         * tree.c (cp_build_qualified_type_real): Correct handling of
7588         array types.
7589         * class.c (walk_subobject_offsets): Fix thinko.
7590         (build_base_field): Record offsets of empty bases in primary
7591         virtual bases.
7592         (layout_class_type): Record offsets of empty bases in fields.
7593
7594         * search.c (is_subobject_of_p_1): Fix thinko.
7595         (lookup_field_queue_p): Likewise.
7596
7597 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
7598
7599         * class.c (layout_class_type): Reuse tail padding when laying out
7600         virtual bases.
7601
7602 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
7603
7604         * rtti.c (qualifier_flags): Fix thinko.
7605
7606 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7607
7608         Remove traditional C constructs 1/n.
7609         * cp-tree.h (init_method, set_mangled_name_for_decl,
7610         build_opfncall, hack_identifier, make_thunk, use_thunk,
7611         synthesize_method, implicitly_declare_fn,
7612         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
7613         maybe_clone_body): Remove use of PARAMS.
7614
7615         * method.c (do_build_assign_ref, do_build_copy_constructor,
7616         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
7617         Likewise.
7618         (synthesize_method): Use 'bool' type and constants instead of
7619         'int'.
7620         (locate_copy): Likewise.
7621         (implicitly_declare_fn): Likewise.
7622
7623         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
7624         Remove old-style declaration.
7625         (maybe_clone_body): Use 'bool' type and constants.
7626
7627 2002-11-21  Glen Nakamura  <glen@imodulo.com>
7628
7629         PR c++/8342
7630         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
7631         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
7632         of the branches of a COND_EXPR.
7633
7634 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
7635
7636         * pt.c (for_each_template_parm): Free allocated memory.
7637         * search.c (is_subobject_of_p_1): New function.
7638         (is_subobject_of_p): Avoid walking virtual bases multiple times.
7639
7640 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
7641
7642         * g++spec.c (lang_specific_spec_functions): New.
7643
7644 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
7645
7646         * ChangeLog: Follow spelling conventions.
7647         * class.c: Likewise.
7648         * decl2.c: Likewise.
7649
7650 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
7651
7652         * search.c (dfs_push_decls): Do not try to reorder elements
7653         3..n of method_vec if method_vec has only two elements.
7654         Reverse order of two tests to avoid accessing unallocated
7655         memory.
7656
7657 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
7658
7659         * class.c (dfs_find_final_overrider): Adjust so that the most
7660         derived object is a binfo, rather than a class type.
7661         (find_final_overrider): Likewise.
7662         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
7663         (add_vcall_offset): Likewise.
7664
7665 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7666
7667         PR c++/8389
7668         * pt.c (instantiate_template): Push class scope for member
7669         functions.
7670         (get_mostly_instantiated_function_type): Likewise.  Don't call
7671         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
7672         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
7673         * mangle.c (write_encoding, write_unqualified_name): Adjust.
7674
7675 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
7676
7677         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
7678         vcall offfsets.  Split out ...
7679         (add_vcall_offset): ... new function.
7680
7681         PR c++/8338
7682         * pt.c (for_each_template_parm): Add htab parameter.
7683         (process_partial_specialization): Adjust call.
7684         (push_template_decl_real): Likewise.
7685         (pair_fn_data): Add visited.
7686         (for_each_template_parm_r): Avoid walking duplicates more than
7687         once.
7688         (uses_template_parms): Adjust call to for_each_template_parm.
7689
7690 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
7691
7692         * class.c (add_implicitly_declared_members): Put implicitly
7693         declared functions at the end of TYPE_METHODs when -fabi-version
7694         is at least 2.
7695
7696 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
7697
7698         * decl2.c (finish_file): Correct spelling.
7699
7700 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
7701
7702         * call.c (build_special_member_call): Do not try to lookup VTTs by
7703         name.
7704         * class.c (vtbl_init_data): Add generate_vcall_entries.
7705         (get_vtable_decl): Do not look up virtual tables by name.
7706         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
7707         (set_primary_base): Do not set CLASSTYPE_RTTI.
7708         (determine_primary_base): Likewise.
7709         (get_matching_virtual): Remove.
7710         (get_vcall_index): New function.
7711         (update_vtable_entry_for_fn): Do not try to use virtual thunks
7712         when they are not required.  Assign vcall indices at this point.
7713         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
7714         Do update dynamic_classes.
7715         (build_vtt): Do not add VTTs to the symbol table.
7716         (build_ctor_vtbl_group): Likewise.
7717         (build_vtbl_initializer): Simplify handling of vcall indices.
7718         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
7719         for the most derived class.
7720         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
7721         the vtable.
7722         * cp-tree.h (dynamic_classes): New macro.
7723         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
7724         (CLASSTYPE_RTTI): Remove.
7725         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
7726         (CLASSTYPE_VCALL_INDICES): New macro.
7727         (CLASSTYPE_VTABLES): Likewise.
7728         (BV_USE_VCALL_INDEX_P): Remove.
7729         (build_vtable_path): Remove.
7730         * decl2.c (finish_vtable_vardecl): Remove.
7731         (key_method): Remove #if 0'd code.
7732         (finish_vtable_vardecl): Rename to ...
7733         (maybe_emit_vtables): ... this.
7734         (finish_file): Use it.
7735         * search.c (look_for_overrides_here): Update comment.
7736
7737 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
7738
7739         PR c/7353 redux
7740         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
7741
7742 2002-10-30  Jason Merrill  <jason@redhat.com>
7743
7744         PR c++/8186
7745         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
7746         * call.c (convert_for_arg_passing): Set it.
7747         * except.c (stabilize_throw_expr): Recurse for such an arg.
7748
7749 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
7750
7751         * cp-tree.h (lang_decl_flags): Remove init_priority.
7752         (lang_decl): Add delta.
7753         (GLOBAL_INIT_PRIORITY): Remove.
7754         (THUNK_DELTA): Revise definition.
7755         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
7756         * dump.c (cp_dump_tree): Don't dump it.
7757
7758 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
7759
7760         PR c++/8160
7761         * typeck2.c (process_init_constructor): Call complete_array_type.
7762
7763         PR c++/8149
7764         * decl.c (make_typename_type): Issue errors about invalid results.
7765
7766 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7767
7768         Core issue 287, PR c++/7639
7769         * cp-tree.h (lang_type_class): Add decl_list field.
7770         (CLASSTYPE_DECL_LIST): New macro.
7771         (maybe_add_class_template_decl_list): Add declaration.
7772         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
7773         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
7774         (maybe_add_class_template_decl_list): New function.
7775         (add_implicitly_declared_members): Use it.
7776         * decl.c (maybe_process_template_type_declaration): Likewise.
7777         (pushtag): Likewise.
7778         * friend.c (add_friend): Likewise.
7779         (make_friend_class): Likewise.
7780         * semantics.c (finish_member_declaration): Likewise.
7781         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
7782         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
7783         to process members and friends in the order of declaration.
7784
7785 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
7786
7787         PR c++/8287
7788         * decl.c (finish_destructor_body): Create the label to jump to
7789         when returning from a destructor here.
7790         (finish_function_body): Rather than here.
7791
7792 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
7793
7794         PR c++/7266
7795         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
7796         SCOPE_REF is not null before dereferencing it.
7797
7798 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
7799
7800         * call.c (build_over_call): Use DECL_CONTEXT, not
7801         DECL_VIRTUAL_CONTEXT.
7802         * class.c (modify_vtable_entry): Don't mess with
7803         DECL_VIRTUAL_CONTEXT.
7804         (set_vindex): Remove.
7805         (set_primary_base): Remove vfuns_p parameter.
7806         (determine_primary_base): Likewise.
7807         (modify_all_vtables): Likewise.
7808         (layout_class_type): Likewise.  Adjust calls to other functions
7809         accordingly.
7810         (finish_struct_1): Adjust calls to modified functions.  Set
7811         DECL_VINDEX here.
7812         * cp-tree.h (lang_type_class): Remove vsize.
7813         (CLASSTYPE_VSIZE): Remove.
7814         (lang_decl): Remove thunks.
7815         (DECL_THUNKS): Adjust.
7816         (DECL_VIRTUAL_CONTEXT): Remove.
7817         (duplicate_decls): Don't copy it.
7818         * pt.c (build_template_decl): Don't set it.
7819         (tsubst_decl): Likewise.
7820         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
7821
7822         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
7823         (build_vtable_entry): Remove.
7824         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
7825         (lang_decl): Add thunks.
7826         (DECL_THUNKS): New macro.
7827         * decl.c (duplicate_decls): Copy it.
7828         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
7829         * semantics.c (emit_associated_thunks): Simplify.
7830
7831 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
7832
7833         PR c++/7228
7834         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
7835         lang_type structure exists before accessing field.
7836         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
7837         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
7838         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
7839         * class.c (check_field_decls): Use new macros.
7840         * typeck2.c (process_init_constructor): Remove redundant check for
7841         existence of lang_type structure.
7842
7843 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
7844
7845         * class.c (end_of_base): New method.
7846         (end_of_class): Use it.  Check indirect virtual bases.
7847
7848         * class.c (check_field_decls): Fix typo.
7849
7850 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
7851
7852         PR c++/8067
7853         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
7854         related variables.
7855
7856         PR c++/7679
7857         * spew.c (next_token): Do not return an endless stream of
7858         END_OF_SAVED_INPUT tokens.
7859         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
7860         the cached token stream.
7861         (snarf_defarg): Likewise.
7862
7863 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
7864
7865         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
7866         variably_modified_type_p.
7867         * cp-tree.h: Remove prototype of variably_modified_type_p.
7868         * tree.c (variably_modified_type_p): Remove; now implemented
7869         in language-independent code.
7870
7871 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
7872
7873         PR c++/6579
7874         * spew.c (snarf_parenthesized_expression): New function.
7875         (snarf_block): Use it.
7876
7877 2002-10-22  Richard Henderson  <rth@redhat.com>
7878
7879         * method.c (use_thunk): Always compute vcall_value; assert that
7880         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
7881         for vcall thunks as well.
7882
7883 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
7884
7885         * class.c (empty_base_at_nonzero_offset_p): New function.
7886         (layout_nonempty_base_or_field): Do not check for conflicts when
7887         laying out a virtual base using the GCC 3.2 ABI.
7888         (build_base_field): Correct checking for presence of empty classes
7889         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
7890
7891         * class.c (include_empty_classes): Use normalize_rli.
7892         (layout_class_type): Likewise.
7893
7894         * decl.c (reshape_init): Tweak handling of character arrays.
7895
7896         PR c++/8218
7897         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
7898         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
7899         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
7900         (check_field_decls): Likewise.
7901         (layout_class_type): Likewise.
7902         (finish_struct_1): Initialize it.
7903         (walk_subobject_offsets): Use it to prune searches.
7904
7905 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
7906
7907         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
7908         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
7909         TARGET_ASM_OUTPUT_MI_THUNK in comments.
7910
7911 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
7912
7913         * decl.c (start_decl): Point users of the old initialized-
7914         typedef extension at __typeof__.
7915
7916 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
7917
7918         * Make-lang.in (method.o): Depend on TARGET_H.
7919         * method.c (target.h): Include it.
7920         (use_thunk): Use target hooks.  Use vcall thunks, if available.
7921
7922 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
7923
7924         * class.c (base_derived_from): Make sure return value is a bool.
7925
7926 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
7927
7928         * class.c (find_final_overrider_data_s): Remove overriding_fn and
7929         overriding_base.
7930         (dfs_base_derived_from): New function.
7931         (base_derived_from): Likewise.
7932         (dfs_find_final_overrider): Use base_derived_from.
7933         (find_final_overrider): Adjust.
7934
7935 2002-10-18  Jason Merrill  <jason@redhat.com>
7936
7937         PR c++/8080
7938         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
7939         with condition decls in a template.
7940
7941 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
7942
7943         * class.c (add_method): Compare template parms too.
7944
7945 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
7946
7947         PR c++/7584
7948         * class.c (handle_using_decl): Allow the declaration used to be
7949         from an ambiguous base.
7950
7951         * pt.c (convert_template_argument): Revert this change:
7952                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
7953                 * pt.c (convert_template_argument): Do not fold non-type
7954                 template rguments when inside a template.
7955
7956         * init.c (expand_default_init): Handle brace-enclosed initializers
7957         correctly.
7958
7959 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
7960
7961         * mangle.c (write_expression): Correct handling of enumeration
7962         constants.
7963         (write_template_arg): Likewise.
7964         * pt.c (convert_template_argument): Do not fold non-type template
7965         arguments when inside a template.
7966
7967         PR c++/7478
7968         * cvt.c (convert_to_reference): Allow references as the incoming
7969         type.
7970
7971 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
7972
7973         PR c++/7524
7974         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
7975         build_qualified_type.
7976
7977 2002-10-15  Richard Henderson  <rth@redhat.com>
7978
7979         * error.c (dump_expr): Use real_to_decimal directly, and with
7980         the new arguments.
7981
7982 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
7983
7984         * decl.c (reshape_init): Fix typo.
7985
7986         * cp-tree.h (operator_name_info_t): Add arity.
7987         * lex.c (init_operators): Initialize it.
7988         * mangle.c (write_conversion_operator_name): New function.
7989         (write_unqualified_name): Use it.
7990         (write_template_args): Accept template arguments as a TREE_LIST.
7991         (write_expression): Adjust handling of qualified names to match
7992         specification.
7993
7994 2002-10-15  Jason Merrill  <jason@redhat.com>
7995
7996         * call.c (call_builtin_trap): New fn.
7997         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
7998         (build_call): Don't set current_function_returns_abnormally outside
7999         a function.
8000
8001 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
8002
8003         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
8004         clear CLASSTYPE_EMPTY_P.
8005         (build_base_field): Likewise.
8006         (build_base_fields): Likewise.
8007         (check_bases_and_members): Likewise.
8008         (create_vtbl_ptr): Likewise.
8009         (layout_class_type): Likewise.  Ensure that empty classes have
8010         size zero when used as base classes in the 3.2 ABI.
8011         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
8012         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
8013         parameter.
8014         (is_empty_class): Correct definition when using post-3.2 ABI.
8015         * cp-tree.h (lang_type_class): Add empty_p.
8016         (CLASSTYPE_EMPTY_P): New macro.
8017
8018 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
8019
8020         * init.c (build_delete): Do not apply save_expr for arrays.
8021         (build_vec_delete): Likewise.
8022
8023 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
8024
8025         * decl.c (layout_var_decl): Call layout_decl even for variables
8026         whose type is an array with unspecified bounds.
8027
8028         PR c++/7176
8029         * lex.c (do_identifier): Add another option for the parsing
8030         parameter.
8031         * parse.y (do_id): Use it.
8032
8033 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
8034
8035         PRs C++/6803, C++/7721 and C++/7803
8036         * decl.c (grokdeclarator): Gracefully handle template-name as
8037         decl-specifier.
8038
8039 2002-10-11  Jason Molenda  <jmolenda@apple.com>
8040
8041         * init.c (build_field_list): Provide uses_unions_p with a default
8042         value.
8043
8044 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
8045
8046         PR c++/5661
8047         * cp-tree.h (variably_modified_type_p): New function.
8048         (grokdeclarator) Tighten check for variably modified types as
8049         fields.
8050         * pt.c (convert_template_argument): Do not allow variably modified
8051         types as template arguments.
8052         * tree.c (variably_modified_type_p): New function.
8053
8054         * NEWS: Document removal of "new X = ..." extension.
8055         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
8056         brace-enclosed initializers.
8057         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
8058         (initialize_local_var): Remove declaration.
8059         (expand_static_init): Likewise.
8060         * decl.c (next_initializable_field): New function.
8061         (reshape_init): Likewise.
8062         (check_initializer): Use them.  Build dynamic initializer for
8063         aggregates here too.
8064         (initialize_local_var): Simplify, and incorporate cleanup
8065         insertion code as well.
8066         (destroy_local_var): Remove.
8067         (cp_finish_decl): Tidy.
8068         (expand_static_init): Fold checks for whether or not a variable
8069         needs initialization into this function.  Simplify.
8070         * decl2.c (do_static_initialization): Simplify.
8071         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
8072         be done for us automatically.
8073         (expand_default_init): Handle brace-enclosed initializers
8074         correctly.
8075         (expand_aggr_init_1): Remove RTL-generation code.
8076         (build_vec_init): Remove "new X = ..." support.
8077         * parse.y (new_initializer): Likewise.
8078         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
8079         brace-enclosed initializer.
8080         (create_pseudo_type_info): Likewise.
8081         * typeck2.c (store_init_value): Don't try to handle digest_init
8082         being called more than once.
8083         (digest_init): Tidy handling of brace-enclosed initializers.
8084
8085 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8086
8087         * decl.c (typename_hash): Use htab_hash_pointer.
8088
8089 2002-10-10  Jim Wilson  <wilson@redhat.com>
8090
8091         * decl.c (duplicate_decls): Don't call decl_attributes.
8092
8093 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
8094
8095         PR c/7353
8096         * decl.c (start_decl): Unconditionally issue error for
8097         'typedef foo = bar'.
8098         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
8099         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
8100
8101 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8102
8103         * decl2.c (prune_vtable_vardecl): Delete unused function.
8104
8105 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
8106
8107         PR c++/7754
8108         * decl2.c (finish_anon_union): Do not expand anonymous unions when
8109         procesing template functions.
8110         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
8111         type. Call layout_decl.
8112         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
8113
8114 2002-10-07  Richard Henderson  <rth@redhat.com>
8115
8116         * decl2.c, pt.c: Revert c++/7754 fix.
8117
8118 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8119
8120         PR c++/7804
8121         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
8122
8123 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
8124
8125         PR c++/7931
8126         * pt.c (for_each_template_parm_r): Handle BASELINKs.
8127
8128         PR c++/7754
8129         * decl2.c (finish_anon_union): Do not expand anonymous unions when
8130         procesing template functions.
8131         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
8132         type. Call layout_decl.
8133         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
8134
8135 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
8136
8137         PR c++/8006
8138         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
8139         template parameters.
8140         (globals): Add entity and need_abi_warning.
8141         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
8142         CLASSTYPE_TEMPLATE_INFO.
8143         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
8144         TYPE_TI_TEMPLATE.
8145         (write_prefix): Handle typename types correctly.
8146         (write_template_prefix): Handle template template parameters
8147         correctly.
8148         (start_mangling): Add entity parameter.
8149         (finish_mangling): Warn about names whose mangling will change.
8150         (mangle_decl_string): Adjust.
8151         (mangle_type_string): Likewise.
8152         (mangle_special_for_type): Likewise.
8153         (mangle_ctor_vtbl_for_type): Likewise.
8154         (mangle_thunk): Likewise.
8155         (mangle_guard_variable): Likewise.
8156         (mangle_ref_init_variable): Likewise.
8157
8158 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
8159
8160         PR c++/7188.
8161         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
8162         * cp-tree.h (emit_base_init): Rename to ....
8163         (emit_mem_initializers): ... this.
8164         (expand_member_init): Change prototype.
8165         * init.c (perform_member_init): Compute explicit, rather than
8166         requiring it as a parameter.
8167         (sort_member_init): Rename to ...
8168         (sort_mem_initializers): ... this.  Process bases and data members
8169         together.
8170         (sort_base_init): Remove.
8171         (emit_base_init): Rename to ...
8172         (emit_mem_initializers): ... this.
8173         (expand_aggr_vbase_init_1): Remove.
8174         (construct_virtual_bases): Rename to ...
8175         (construct_virtual_base): ... this.
8176         (expand_member_init): Rework handling of base initializers.
8177         * method.c (do_build_copy_constructor): Use
8178         finish_mem_initializers.
8179         * parse.y (member_init): Adjust calls to expand_member_init.
8180         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
8181         (tsubst_initializer_list): Use expand_member_init.
8182         * semantics.c (finish_mem_intiailizers): Simplify.
8183
8184 2002-10-02  Matt Austern  <austern@apple.com>
8185         * decl.c (walk_vtables_r): Fixed typo that caused result to
8186         never get a nonzero value.
8187
8188 2002-10-02  Roger Sayle  <roger@eyesopen.com>
8189
8190         PR optimization/6627
8191         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
8192         from here, and move it to tree.h.
8193         * decl.c (cxx_init_decl_processing): If storing the vbit
8194         in function pointers, ensure that force_align_functions_log
8195         is atleast one.
8196
8197 2002-10-02  Matt Austern  <austern@apple.com>
8198
8199         * class.c (check_field_decls): Changed warning about const member
8200         variables so that it doesn't get issued for a class aggregate.
8201
8202 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
8203
8204         * decl.c (cp_finish_decl): Make sure array types are laid out,
8205         even if the array bounds are unknown.
8206
8207 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
8208
8209         * class.c (build_vtbl_initializer): Change build_c_cast
8210         to build1.
8211
8212 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
8213
8214         * decl.c (cp_finish_decl): Make sure array types are laid out,
8215         even if the array bounds are unknown.
8216
8217         * decl.c (cp_finish_decl): Correct check for dynamic
8218         initialization of thread-local storage.
8219
8220 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
8221
8222         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
8223         overloaded.
8224
8225 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
8226
8227         * class.c (build_vtbl_initializer): Add cast.
8228         (add_vcall_offset_vtbl_entries_1):
8229         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
8230
8231 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
8232
8233         * class.c (walk_subobject_offsets): Correct the calculation of
8234         offsets for virtual bases.  Correct the counting of array
8235         elements.
8236         (layout_nonempty_base_or_field): Simplify.  Correct the
8237         calculation of offsets to be propagated through the binfo
8238         hierarchy.
8239         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
8240         Add the FIELD_DECL to TYPE_FIELDS.
8241         (build_base_fields): Adjust accordingly.
8242         (layout_virtual_bases): Use build_base_field.
8243         (end_of_class): Return a tree, not an integer.
8244         (warn_about_ambiguous_direct_bases): Rename to ...
8245         (warn_about_ambiguous_bases): ... this.
8246         (include_empty_classes): New function.
8247         (layout_class_type): Create an alternative version of the type to
8248         be used when as a base class type.  Do not call
8249         finish_record_layout until we are done laying out the class.
8250         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
8251         as_base.
8252         (CLASSTYPE_SIZE): Reimplement.
8253         (CLASSTYPE_SIZE_UNIT): Likewise.
8254         (CLASSTYPE_ALIGN): Likweise.
8255         (CLASSTYPE_USER_ALIGN): Likewise.
8256         (CLASSTYPE_AS_BASE): New macro.
8257         (DECL_INITIALIZED_P): Likewise.
8258         (extract_init): Remove prototype.
8259         (build_forced_zero_init): Rename to ...
8260         (build_zero_init): ... this.
8261         (force_store_init_value): Remove.
8262         * decl.c (obscure_complex_init): Remove.
8263         (duplicate_decls): Copy DECL_INITIALIZED_P.
8264         (check_initializer): Do not leave junk in DECL_INITIAL.
8265         (cp_finish_decl): Handle zero-initialization of entities with
8266         static storage duration.
8267         * expr.c (extract_init): Remove.
8268         * init.c (build_forced_zero_init): Remove.
8269         (build_zero_init): New function.
8270         (build_default_init): Use it.
8271         (build_field_list): Skip FIELD_DECLs for base subobjects.
8272         (push_base_cleanups): Likewise.
8273         * method.c (do_build_assign_ref): Likewise.
8274         (synthesize_exception_spec): Likewise.
8275         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
8276         (regenerate_decl_from_template): To not set DECL_INITIAL for a
8277         static data member whose initialization took place in its class.
8278         (instantiate_decl): Do not pass an initializer to cp_finish_decl
8279         in that situation.
8280         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
8281         (dfs_unuse_fields): Likewise.
8282         * tree.c (pod_type_p): Handle error_mark_node.
8283         (zero_init_p): Likewise.
8284         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
8285         subobjects.
8286         * typeck2.c (store_init_value): Remove #if 0'd code.
8287         (force_store_init_value): Remove.
8288         (process_init_constructor): Use build_zero_init.
8289
8290 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
8291
8292         PR c++/7788
8293         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
8294
8295 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
8296
8297         * cp-tree.h: Fix comment typos.
8298         * decl.c: Likewise.
8299         * pt.c: Likewise.
8300
8301 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
8302
8303         * cp/class.c (contains_empty_class_p): New method.
8304         (walk_subobject_offsets): Correct computation of field offset.
8305         (layout_empty_base): Correct placement of emtpy base classes.
8306         (layout_class_type): Warn about ABI changes.
8307
8308 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
8309
8310         * cp/class.c (layout_virtual_bases): Do not round the size of the
8311         type to a multiple of the alignment before laying out virtual bases.
8312         (layout_class_type): Correct handling of bit-fields that are wider
8313         than their type inside unions.  Round the size of the type to a
8314         even number of bytes when computing the size without virtual
8315         bases.
8316         * cp/cp-tree.h (abi_version_at_least): New macro.
8317
8318 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
8319
8320         * ChangeLog: Follow spelling conventions.
8321         * ChangeLog.2: Likewise.
8322         * call.c: Likewise.
8323         * class.c: Likewise.
8324         * cp-tree.h: Likewise.
8325         * cvt.c: Likewise.
8326         * decl.c: Likewise.
8327         * decl2.c: Likewise.
8328         * except.c: Likewise.
8329         * friend.c: Likewise.
8330         * g++spec.c: Likewise.
8331         * init.c: Likewise.
8332         * lex.c: Likewise.
8333         * mangle.c: Likewise.
8334         * method.c: Likewise.
8335         * operators.def: Likewise.
8336         * optimize.c: Likewise.
8337         * pt.c: Likewise.
8338         * rtti.c: Likewise.
8339         * search.c: Likewise.
8340         * semantics.c: Likewise.
8341         * spew.c: Likewise.
8342         * tree.c: Likewise.
8343         * typeck.c: Likewise.
8344
8345 2002-09-18  Devang Patel  <dpatel@apple.com>
8346
8347         * cp/cp-tree.h: New prototype for walk_vtabls().
8348         * cp/decl.c (walk_vtables_r): New function.
8349         (struct cp_binding_level): Add new members, namespaces,
8350         names_size and vtables.
8351         (add_decl_to_level): Add decl in namespaces or vtables
8352         chain, if conditions match.
8353         (walk_vtables): New function.
8354         (walk_namespaces_r): Travers separate namespace chain
8355         for namespace decls.
8356         (wrapup_globals_for_namespace): Use names_size instead
8357         of list_length().
8358         * cp/decl2.c (finish_file): Use walk_vtables() instead of
8359         walk_globals() to walk vtable decls.
8360
8361 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
8362
8363         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
8364         ICE with invalid pointers & references.
8365
8366 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
8367
8368         * Make-lang.in: Remove all references to the demangler.
8369         * cxxfilt.c: Moved to binutils.
8370
8371 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
8372
8373         PR c++/7718
8374         * pt.c (tsubst_decl): Remove assert.
8375
8376         Remove DR 295 implementation.
8377         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
8378         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
8379         about ignoring volatile qualifiers.
8380
8381         * search.c (lookup_member): Correct documentation.
8382
8383 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
8384
8385         * cp-tree.h (union lang_tree_node): Add chain_next option.
8386
8387 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
8388
8389         * parse.y (parse_finish_call_expr): Check lookup_member result.
8390
8391         PR c++/7015
8392         * semantic.c (finish_asm_stmt): Fix operand/output_operands
8393         thinko.
8394         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
8395
8396 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
8397
8398         PR c++/7919
8399         * call.c (build_over_call): Convert this pointer for fns found by
8400         using decls.
8401
8402 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
8403
8404         * ChangeLog: Follow spelling conventions.
8405         * ChangeLog.1: Likewise.
8406
8407 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
8408
8409         PR c++/7768
8410         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
8411
8412 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
8413
8414         * error.c: Fix comment formatting.
8415         * except.c: Likewise.
8416         * expr.c: Likewise.
8417         * friend.c: Likewise.
8418         * g++spec.c: Likewise.
8419         * init.c: Likewise.
8420         * lex.c: Likewise.
8421         * mangle.c: Likewise.
8422         * method.c: Likewise.
8423         * optimize.c: Likewise.
8424         * pt.c: Likewise.
8425         * rtti.c: Likewise.
8426         * search.c: Likewise.
8427         * semantics.c: Likewise.
8428         * spew.c: Likewise.
8429         * tree.c: Likewise.
8430         * typeck.c: Likewise.
8431         * typeck2.c: Likewise.
8432
8433 2002-09-13  Matt Austern  <austern@apple.com>
8434
8435         PR C++/7828
8436         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
8437         * cp/call.c: Change call-by-const-reference mechanism to use
8438         non_cast_lvalue_p when deciding whether the create a temporary.
8439         We need a temporary when passing, e.g. (long) x by const ref.
8440
8441 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
8442
8443         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
8444
8445 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
8446
8447         * decl.c: Fix comment formatting.
8448         * decl2.c: Likewise.
8449
8450 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
8451
8452         * call.c: Fix comment formatting.
8453         * class.c: Likewise.
8454         * cp-lang.c: Likewise.
8455         * cp-tree.h: Likewise.
8456         * cvt.c: Likewise.
8457
8458 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
8459
8460         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
8461         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
8462         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
8463         minor adjustments (use version_string, eliminate yet another
8464         duplicate of xmalloc)
8465
8466 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8467
8468         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
8469
8470 2002-09-05  Jason Merrill  <jason@redhat.com>
8471
8472         * typeck2.c (add_exception_specifier): Only pedwarn for an
8473         incomplete type.
8474         (require_complete_eh_spec_types): New fn.
8475         (cxx_incomplete_type_diagnostic): Also support pedwarning.
8476         * typeck.c (complete_type_or_diagnostic): Likewise.
8477         * call.c (build_call): Call require_complete_eh_spec_types.
8478         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
8479         on an incomplete type.
8480
8481 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
8482
8483         * decl.c (start_cleanup_fn): Clear interface_only before
8484         start_function, restore it afterwards.
8485
8486 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
8487
8488         * cp-tree.h (finish_builtin_type): Remove.
8489         * decl2.c (finish_builtin_type): Move to common code.
8490         * decl.c (build_ptrmemfunc_type): Adjust.
8491         * rtti.c (create_pseudo_type_info): Adjust.
8492         (create_tinfo_types): Adjust.
8493
8494 2002-08-31  Jason Merrill  <jason@redhat.com>
8495
8496         * cp-lang.c (cp_expr_size): Allow initialization from a
8497         CONSTRUCTOR.
8498
8499 2002-08-30  Richard Henderson  <rth@redhat.com>
8500
8501         PR opt/7515
8502         * tree.c: Include target.h.
8503         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
8504         don't bind locally.
8505         * Makefile.in (tree.o): Update.
8506
8507 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
8508
8509         * class.c (layout_virtual_bases): Warn about bugs in G++ that
8510         result in incorrect object layouts.
8511         (layout_class_type): Likewise.
8512
8513 2002-08-24  Matt Austern  <austern@apple.com>
8514
8515         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
8516         are allowable.
8517         (real_lvalue_p): Update caller.
8518         (lvalue_p): Ditto.
8519         (non_cast_lvalue_or_else): New.
8520         * tree.h: Declare it.
8521         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
8522
8523 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
8524
8525         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
8526         and COND_EXPR specially; fix error message output.
8527
8528 2002-08-22  Jason Merrill  <jason@redhat.com>
8529
8530         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
8531         * semantics.c (nullify_returns_r): Likewise.
8532
8533 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
8534
8535         Fix PR/7621
8536         * typeck.c (finish_class_member_access_expr): Diagnose cases where
8537         name lookup finds nothing.
8538
8539 2002-08-15  Jason Merrill  <jason@redhat.com>
8540
8541         * semantics.c (finish_then_clause): Remove redundant assignment.
8542         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
8543         extra binding level outside the if/switch statement.
8544         (finish_while_cond, finish_for_cond): Rewrite complex condition
8545         into the loop body.
8546
8547 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
8548
8549         * parse.y (sizeof, alignof, typeof): New non-terminals to
8550         increment skip_evaluation.  Replace terminals with them and
8551         decrement skip_evaluation at the end of rules using them.
8552         * decl2.c (mark_used): Don't assemble_external if
8553         skipping evaluation.
8554
8555 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
8556
8557         Fix PR/7504
8558         * parse.y (parse_finish_call_expr): Handle incomplete
8559         type used to name a scope.
8560
8561 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
8562
8563         PR c++/7598
8564         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
8565         regression caused by my 2002-08-08 patch.
8566
8567 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
8568
8569         * decl.c (pushdecl_class_level): Honor requests to bind names to
8570         OVERLOADs.
8571
8572 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8573
8574         * decl2.c (build_call_from_tree): Fix uninitialized variable.
8575         * parse.y (parse_finish_call_expr): Likewise.
8576         * repo.c (old_args, old_dir, old_main): Const-ify.
8577
8578 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
8579
8580         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
8581         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
8582         * optimize.c (maybe_clone_body): Likewise.
8583         * pt.c (tsubst_enum): Likewise.
8584         (lookup_template_class): Likewise.
8585         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
8586
8587 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
8588
8589         * lang-specs.h: Remove -ansi.
8590
8591 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
8592
8593         * tree.c (maybe_dummy_object): Replace // with /* */
8594
8595 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
8596
8597         * call.c (standard_conversion): Use build_ptrmem_type.
8598         * cp-tree.h (build_ptrmem_type): New function.
8599         (adjust_result_of_qualified_name_lookup): Likewise.
8600         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
8601         static data members.
8602         (build_ptrmem_type): New function.
8603         (grokdeclarator): Do not use build_offset_type when encountering a
8604         qualified name.
8605         * parse.y (parse_finish_call_expr): Use
8606         adjust_result_of_qualified_name_lookup.
8607         * search.c (adjust_result_of_qualified_name_lookup): New function.
8608         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
8609         accessing OFFSET_TYPEs directly.
8610
8611 2002-08-08  Mike Stump  <mrs@apple.com>
8612
8613         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
8614         (type_decays_to): Likewise.
8615         * class.c (find_final_overrider): Likewise.
8616         (maybe_note_name_used_in_class): Likewise.
8617         * decl.c (current_tmpl_spec_kind): Likewise.
8618         (add_binding): Likewise.
8619         (push_class_binding): Likewise.
8620         (duplicate_decls): Likewise.
8621         (layout_var_decl): Likewise.
8622         (grokfndecl): Likewise.
8623         (grokdeclarator): Likewise.
8624         (check_default_argument): Likewise.
8625         * decl2.c (handle_class_head): Likewise.
8626         * error.c (dump_template_decl): Likewise.
8627         * init.c (build_offset_ref): Likewise.
8628         * pt.c (check_specialization_scope): Likewise.
8629         (determine_specialization): Likewise.
8630         (check_explicit_specialization): Likewise.
8631         (maybe_check_template_type): Likewise.
8632         (process_partial_specialization): Likewise.
8633         (check_default_tmpl_args): Likewise.
8634         (push_template_decl_real): Likewise.
8635         (convert_template_argument): Likewise.
8636         (try_class_unification): Likewise.
8637         (get_bindings_real): Likewise.
8638         (do_decl_instantiation): Likewise.
8639         * semantics.c (begin_function_definition): Likewise.
8640         (finish_member_declaration): Likewise.
8641         (check_multiple_declarators): Likewise.
8642         * typeck.c (comp_array_types): Likewise.
8643         (comptypes): Likewise.
8644         (expr_sizeof): Likewise.
8645         (build_binary_op): Likewise.
8646         (dubious_conversion_warnings): Likewise.
8647         (check_return_expr): Likewise.
8648
8649 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
8650
8651         * typeck.c (build_class_member_access_expr): Do not return
8652         error_mark_node when no error has occurred.
8653
8654 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
8655
8656         * typeck.c (build_component_addr): Remove.
8657         (build_unary_op): Just check it's not a bitfield, and then build
8658         an ADDR_EXPR.
8659
8660 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
8661
8662         * class.c (convert_to_base): Correct check for error_mark_node.
8663         (create_vtable_ptr): Remove unused VFUNS_P parm.
8664
8665 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
8666
8667         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
8668
8669 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
8670
8671         Rework build_component_ref.
8672         * call.c (build_vfield_ref): Do not go through build_component_ref.
8673         (build_field_call): Use build_class_member_access_expr.
8674         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
8675         (build_object_call): Likewise.
8676         * class.c (convert_to_base): New function.
8677         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
8678         (instantiate_type): Handle BASELINKs.
8679         * cp-tree.def (BASELINK): New tree code.
8680         * cp-tree.h (BASELINK_P): Reimplement.
8681         (SET_BASELINK_P): Remove.
8682         (BASELINK_BINFO): Reimplement.
8683         (BASELINK_FUNCTIONS): Likewise.
8684         (BASELINK_ACCESS_BINFO): Likewise.
8685         (BASELINK_OPTYPE): Likewise.
8686         (convert_to_base): New function.
8687         (name_p): Likewise.
8688         (build_object_ref): Remove.
8689         (build_component_ref_1): Likewise.
8690         (build_component_ref): Likewise.
8691         (build_x_component_ref): Likewise.
8692         (build_class_member_access_expr): New function.
8693         (finish_class_member_access_expr): Likewise.
8694         (build_ptrmemfunc_access_expr): Likewise.
8695         * decl.c (grokdeclarator): Handle BASELINKs.
8696         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
8697         finish_class_member_access_expr.
8698         (arg_assoc): Handle BASELINKs.
8699         (do_class_using_decl): Likewise.
8700         * error.c (dump_decl): Likewise.
8701         (dump_expr): Use build_ptrmemfunc_access_expr.
8702         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
8703         destructors.
8704         (build_throw): Use BASELINK_FUNCTIONS.
8705         * init.c (perform_member_init): Use
8706         build_class_member_access_expr.
8707         (build_offset_ref): Handle BASELINKs.  Use
8708         build_class_member_access_expr.
8709         * method.c (hack_identifier): Likewise.
8710         * parse.y (do_id): Use BASELINK, not TREE_LIST.
8711         (primary): Remove uses of build_object_ref.
8712         * pt.c (lookup_template_function): Handle BASELINKs.
8713         (resolve_overloaded_unification): Likewise.
8714         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
8715         (lookup_field): Use BASELINK, not TREE_LIST.
8716         (lookup_fnfiels): Likewise.
8717         (setup_class_bindings): Likewise.
8718         * semantics.c (finish_object_call_expr): Do not use
8719         build_method_call when we already know what function is being
8720         called.
8721         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
8722         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
8723         TREE_CHAIN.
8724         (name_p): New function.
8725         * typeck.c (build_object_ref): Remove.
8726         (build_component_ref_1): Likewise.
8727         (build_x_component_ref): Likewise.
8728         (build_class_member_access_expr): New function.
8729         (finish_class_member_access_expr): Likewise.
8730         (build_ptrmemfunc_access_expr): Likewise.
8731         (get_member_function_from_ptrfunc): Use
8732         build_ptrmemfunc_access_expr.
8733         (build_binary_op): Likewise.
8734         (build_unary_op): Likewise.
8735         (build_ptrmemfunc): Likewise.
8736         (pfn_from_ptrmemfunc): Likewise.
8737         * typeck2.c (build_m_component_ref): Adjust comment.
8738
8739 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
8740
8741         * Make-lang.in (CXX_C_OBJS): Update.
8742         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
8743         * cp-tree.h (cxx_decode_option): Remove.
8744         * decl2.c (compare_options, lang_f_options, unsupported_options,
8745         cxx_decode_option): Remove.
8746
8747 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
8748
8749         * typeck.c (build_x_unary_op): Handle pointer-to-member.
8750
8751 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
8752
8753         * class.c: Don't include obstack.h.
8754         (popclass):
8755         * decl2.c: Delete bogus comment.
8756         * error.c: Don't include obstack.h.
8757         * except.c: Likewise.
8758         (dump_type): Correct comment.
8759         * method.c: Don't include obstack.h.
8760         * tree.c: Likewise.
8761
8762 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
8763
8764         Fix PR/2213
8765         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
8766         expressions to pointer-to-data-member of pointer-to-member-functions.
8767
8768 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
8769
8770         * cvt.c (ocp_convert): Delete obsolete code.
8771         * parse.y (permanent_obstack): Delete declaration.
8772         * pt.c (permanent_obstack): Delete declaration.
8773         * repo.c (permanent_obstack): Delete declaration.
8774         (open_repo_file): Use xmalloc instead of permanent_obstack.
8775         (init_repo): Use xstrdup instead of permanent_obstack.
8776
8777 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
8778
8779         * cp-tree.h (VF_DERIVED_VALUE): Remove.
8780         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
8781
8782 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
8783
8784         PR 7470.
8785         C++ ABI change - vfunc ordering.
8786         * class.c (add_virtual_function): Remove.
8787         (dfs_modify_all_vtables): Take list of all declared
8788         virtuals. Assign all that are not in primary base.
8789         (check_for_override): Adjust comments.
8790         (create_vtable_ptr): Take single list of virtuals. Build chain
8791         of declared virtuals here.
8792         (layout_class_type): Take single list of virtuals. Adjust.
8793         (finish_struct_1): Keep virtuals on single list. Adjust.
8794
8795 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
8796
8797         * init.c (build_member_call): Use build_new_method_call, not
8798         build_method_call.
8799
8800 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
8801
8802         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
8803
8804 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
8805
8806         * call.c (build_method_call): Issue a more helpful error message
8807         about ambiguous method names.
8808
8809 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
8810
8811         * tree.c (build_shared_int_cst): Make cache file scope, and
8812         GTY it.
8813
8814 2002-08-02  Jason Merrill  <jason@redhat.com>
8815
8816         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
8817         (cp_expr_size): New fn.
8818         * call.c (build_over_call): Lose empty class hackery.
8819         (convert_arg_to_ellipsis): Promote non-POD warning to error.
8820         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
8821
8822         * semantics.c (expand_body): Do tree optimization in the function
8823         context, too.
8824
8825 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
8826
8827         * cp-tree.h: Move all warning and flag declarations to c-common.h.
8828         * decl.c: Move all warning and flag variables to c-common.c.
8829         * decl2.c: Move all warning and flag variables to c-common.c.
8830         * lex.c (flag_digraphs): Remove.
8831         (warn_traditional): Now in c-common.c.
8832
8833 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
8834
8835         * call.c (build_field_call): Do not look up the field by name.
8836         (build_method_call): Simplify.
8837         (struct z_candidate): Add access_path and conversion_path.  Remove
8838         basetype_path.
8839         (convert_class_to_reference): Adjust use of
8840         add_function_candidate.
8841         (add_candidate): Add conversion_path argument.
8842         (add_function_candidate): Use it.
8843         (add_conv_dndidate): Likewise.
8844         (build_builtin_candidate): Likewise.
8845         (add_template_candidate_real): Add conversion_path argument.
8846         (add_template_conv_candidate): Likewise.
8847         (add_template_candidate): Likewise.
8848         (build_user_type_conversion_1): Use it.
8849         (build_new_function_call): Remove name lookup code.  Adjust use of
8850         add_template_candidate and add_function_candidate.
8851         (build_new_op): Likewise.
8852         (convert_like_real): Use build_special_member_call.
8853         (build_over_call): Use cand->conversion_path.
8854         (build_special_member_call): New method.
8855         (build_new_method_call): Remove name lookup code.
8856         * cp-tree.def (OFFSET_REF): Update documentation.
8857         (TEMPLATE_ID_EXPR): Likewise.
8858         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
8859         (BASELINK_OPTYPE): Likewise.
8860         (build_new_method_call): Adjust prototype.
8861         (build_special_member_call): New method.
8862         (build_baselink): New method.
8863         (build_offset_ref_call_from_tree): Likewise.
8864         (build_call_from_tree): Likewise.
8865         (finish_qualified_call_expr): Remove.
8866         (finish_call_expr): Adjust prototype.
8867         (build_x_function_call): Remove.
8868         * cvt.c (ocp_convert): Use build_special_member_call.
8869         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
8870         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
8871         CALL_EXPR.
8872         (build_offset_ref_call_from_tree): New function.
8873         (build_call_from_tree): Likewise.
8874         * init.c (expand_cleanup): Use build_special_member_call.
8875         (expand_default_init): Likewise.
8876         (build_member_call): Use finish_call_expr.
8877         (build_new_1): Use build_special_member_call.
8878         (push_base_cleanups): Likewise.
8879         * method.c (do_build_assign_ref): Likewise.
8880         * parse.y (template_id): Do not pass a COMPONENT_REF to
8881         lookup_template_function.
8882         (primary): Use parse_finish_call_epxr, not finish_call_expr.
8883         (parse_finish_call_expr): New function.
8884         * pt.c (lookup_template_function): Add assertions.
8885         * search.c (lookup_base): Allow T to be a binfo.
8886         (build_baselink): New function.
8887         (lookup_member): Use it.
8888         * semantics.c (finish_call_expr): Do not do name lookup.
8889         (finish_object_call_expr): Remove #if 0'd code.
8890         (finish_qualified_call_expr): Remove.
8891         * typeck.c (build_x_function_call): Remove.
8892         (build_static_case): Use build_special_member_call.
8893         * typeck2.c (build_functional_cast): Likewise.
8894
8895 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
8896
8897         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
8898
8899 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
8900
8901         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
8902
8903 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
8904
8905         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
8906         documentation.
8907
8908 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
8909
8910         * cp-tree.h: Comment typo fix.
8911
8912 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
8913
8914         * spew.c (space_for_token): Allocate zeroed memory for a new token
8915         chunk.
8916
8917 2002-07-27  Roger Sayle  <roger@eyesopen.com>
8918
8919         * decl.c (builtin_function_1): No need to explicitly mark
8920         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
8921
8922 2002-07-27  Roger Sayle  <roger@eyesopen.com>
8923
8924         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
8925
8926 2002-07-26  Jason Merrill  <jason@redhat.com>
8927
8928         * call.c (build_over_call): Likewise.
8929         (cp_convert_parm_for_inlining): New fn.
8930         (convert_for_arg_passing): New fn.
8931         (convert_default_arg, build_over_call): Use it.
8932         (type_passed_as): New fn.
8933         * pt.c (tsubst_decl): Use it.
8934         * decl2.c (cp_build_parm_decl): New fn.
8935         (build_artificial_parm): Use it.
8936         (start_static_storage_duration_function): Likewise.
8937         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
8938         (grokparms): Don't mess with DECL_ARG_TYPE.
8939         * typeck.c (convert_arguments): Use convert_for_arg_passing.
8940         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
8941         Define.
8942         * cp-tree.h: Declare new fns.
8943
8944 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
8945
8946         * cp-tree.h (flag_operator_names): Remove.
8947         * decl2.c (flag_operator_names): Remove.
8948         (lang_f_options): Remove operator-names.
8949         * lex.c (D_OPNAME): Remove.
8950         (reswords): Remove operator names.
8951         (rid_to_yy): Remove operator names.
8952         (init_reswords): No need to handle D_OPNAME.
8953         * spew.c (read_process_identifier): There are no operator
8954         names.
8955
8956 2002-07-26  Jason Merrill  <jason@redhat.com>
8957
8958         * dump.c (cp_dump_tree): Call c_dump_tree.
8959         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
8960
8961 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
8962
8963         * error.c (print_whitespace): Remove.
8964         * g++spec.c (LIBUNWIND): Move.
8965         * mangle.c (mangled_position, write_signed_number): Remove.
8966
8967 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
8968
8969         * decl2.c (cxx_decode_option): Similarly.
8970
8971 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
8972
8973         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
8974         (cxx_sizeof_or_alignof_type): Take a third argument.
8975         (cxx_sizeof): Adjust definition.
8976         (cxx_alignof): Likewise.
8977         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
8978         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
8979         complaining.
8980         (c_sizeof_nowarn): Remove definition.
8981         (build_unary_op): Use cxx_sizeof_nowarn.
8982
8983 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
8984
8985         * tree.c (cp_build_qualified_type_real): When copying
8986         pointer-to-method types, unshare the record that holds
8987         the cached pointer-to-member-function type.
8988
8989 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
8990
8991         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
8992
8993 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
8994
8995         Fix PR/7363:
8996         * typeck.c (cxx_sizeof_or_alignof_type): New function.
8997         (c_sizeof): Remove definition.
8998         (expr_sizeof): Use cxx_sizeof.
8999         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
9000         * decl.c (finish_destructor_body): Use cxx_sizeof.
9001         * semantics.c (finish_alignof): Likewise.
9002         (finish_alignof): Use cxx_alignof.
9003         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
9004         (cxx_sizeof_or_alignof_type): Declare.
9005         (my_friendly_assert): Move to ../c-common.h.
9006
9007 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
9008
9009         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
9010
9011 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9012
9013         PR c++/7347, c++/7348
9014         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
9015         * decl.c (make_typename_type): Use it.
9016         (make_unbound_class_template): Likewise.
9017         (lookup_name_real): Don't call type_access_control if scope is
9018         template parameter dependent.
9019         * parse.y (template_arg): Call make_unbound_class_template with
9020         tf_parsing set.
9021         (nest_name_specifier): Call make_typename_type with tf_parsing set.
9022         (typename_sub0): Likewise.
9023         (typename_sub1): Likewise.
9024         (instantiate_decl): Push class scope.
9025         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
9026         for both static variable and member function template.
9027         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
9028         and arguments.
9029         * search.c (type_access_control): Do type access for TEMPLATE_DECL
9030         too.
9031
9032 2002-07-20  Roger Sayle  <roger@eyesopen.com>
9033
9034         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
9035         test by using positive_option.  Make whitespace consistent.
9036
9037 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
9038
9039         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
9040         members with 'locus'.  Adjust use throughout.
9041         (struct feed):  Likewise.
9042         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
9043         Adjust use.
9044         (snarf_defarg): Use error(), not error_with_file_and_line().
9045
9046 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
9047
9048         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
9049         cpp_options is included.
9050
9051 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9052
9053         PR c++/2862, c++/2863
9054         * pt.c (determine_specialization): Compare the length of
9055         TYPE_ARG_TYPES.  Tidy.
9056
9057 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9058
9059         PR c++/3797
9060         * decl.c (duplicate_decls): Don't propagate inlining parameters from
9061         olddecl to newdecl when newdecl is a specialization of the
9062         instantiation olddecl.
9063
9064 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9065
9066         PR c++/4802, c++/5387
9067         * decl.c (make_typename_type): Use enforce_access.
9068
9069 2002-07-17  Scott Snyder <snyder@fnal.gov>
9070
9071         PR c++/7320
9072         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
9073
9074 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
9075
9076         * class.c (add_method): Correct handling of conversion operators.
9077
9078 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
9079
9080         PR c++/7224
9081         * class.c (add_method): Simplify.
9082
9083 2002-07-11  Jason Merrill  <jason@redhat.com>
9084
9085         PR c++/7279
9086         * tree.c (cp_copy_res_decl_for_inlining): Also copy
9087         TREE_ADDRESSABLE.
9088
9089 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
9090
9091         * pt.c (template_parm_this_level_p, push_template_decl_real):
9092         Pass depth as int pointer.
9093
9094 2002-07-11  Tim Josling  <tej@melbpc.org.au>
9095
9096         Remove front end hard coding from gengtype.c.
9097
9098         * config-lang.in (gtfiles): Add files needed for this front end.
9099
9100 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
9101
9102         * cp-tree.h (unqualified_name_lookup_error): Declare it.
9103         (begin_function_definition): Adjust prototype.
9104         * lex.c (unqualified_name_lookup_error): New function, split out
9105         from ...
9106         (do_identifier): ... here.
9107         * parse.y (parse_begin_function_definition): New function.
9108         (fn.def1): Use it.
9109         * semantics.c (begin_function_definition): Accept decl-specifiers
9110         and attributes as separate parameters.
9111
9112 2002-07-10  Jason Merrill  <jason@redhat.com>
9113
9114         PR c++/6255
9115         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
9116         modifying the old one.
9117
9118 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
9119
9120         * cp-tree.h (constructor_name_p): Declare it.
9121         (check_template_template_default_arg): Likewise.
9122         * class.c (handle_using_decl): Use constructor_name_p.
9123         * decl.c (grokdeclarator): Likewise.
9124         * decl2.c (constructor_name_p): Define it.
9125         * init.c (build_member_call): Use constructor_name_p.
9126         * parse.y (template_parm): Use check_template_template_default_arg.
9127         * pt.c (check_explicit_specialization): Use constructor_name_p.
9128         * semantics.c (check_template_template_default_arg): New function.
9129
9130 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9131
9132         * pt.c (can_complete_type_without_circularity): Add static to
9133         function definition.
9134
9135 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
9136
9137         * cp-tree.h (have_extern_spec): Declare it
9138         * decl.c (have_extern_spec): Define it.
9139         (start_decl): Eliminate use of used_extern_spec.
9140         (start_function): Likewise.
9141         * parse.y (have_extern_spec): Remove declaration.
9142         (used_extern_spec): Likewise.
9143         (frob_specs): Eliminate use of used_extern_spec.
9144         (.hush_warning): Likewise.
9145
9146 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
9147
9148         * Make-lang.in (cp/parse.o): Depend on decl.h.
9149         * cp-tree.h (do_decl_instantiation): Change prototype.
9150         * parse.y: Include decl.h.
9151         (parse_decl_instantiation): New function.
9152         (explicit_instantiation): Use it.
9153         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
9154         and DECLSPECS.
9155
9156 2002-07-07  Roger Sayle  <roger@eyesopen.com>
9157
9158         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
9159         constructor and destructor tests when passed a TEMPLATE_DECL.
9160
9161 2002-07-05  Jason Merrill  <jason@redhat.com>
9162
9163         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
9164         pointers.
9165
9166         PR optimization/7145
9167         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
9168
9169 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
9170
9171         Repair damage on weak-impared targets caused by my previous patch.
9172         * cp-tree.h (import_export_tinfo): Add parameter.
9173         * decl2.c (import_export_tinfo): Add parameter, post adjust
9174         DECL_COMDAT.
9175         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
9176         import_export_tinfo.
9177
9178 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9179
9180         PR c++/6944
9181         * init.c (build_aggr_init): Remove qualifiers of init before calling
9182         build_vec_init.
9183         (build_vec_init): Flatten multi-dimensional array during cleanup.
9184         (build_vec_delete_1): Abort if the type of each element is array.
9185
9186 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
9187
9188         * pt.c (instantiate_class_template): Fix typo.
9189
9190 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9191
9192         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
9193         by CVS conflict in my last patch.
9194
9195 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9196
9197         PR c++/6716
9198         * pt.c (can_complete_type_without_circularity): New function.
9199         (instantiate_class_template): Use it.
9200         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
9201         message due to incomplete fields.
9202
9203 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
9204
9205         PR c++/7112
9206         * mangle.c (write_expression): Add mangling for sizeof when
9207         applied to a type.
9208         * operators.def: Remove stale comment.
9209
9210 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
9211
9212         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
9213         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
9214         (tinfo_decl_type): Replace with ...
9215         (type_info_ptr_type): ... this.
9216         (import_export_tinfo): Declare.
9217         (tinfo_decl_p): Rename to ...
9218         (unemitted_tinfo_decl_p): ... this.
9219         * decl2.c (import_export_decl): Break out tinfo handling into ...
9220         (import_export_tinfo): ... here. New function.
9221         (finish_file): Adjust.
9222         * rtti.c (TINFO_REAL_NAME): New macro.
9223         (init_rtti_processing): Create the tinfo types.
9224         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
9225         (get_tinfo_decl): Adjust.
9226         (get_tinfo_ptr): New function.
9227         (get_type_id): Use it.
9228         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
9229         (ptr_initializer): Use get_tinfo_ptr.
9230         (ptm_initializer): Likewise.
9231         (synthesize_tinfo_var): Break into ...
9232         (get_pseudo_ti_init): ... this. Just create the initializer.
9233         (get_pseudo_ti_desc): .. and this.
9234         (create_real_tinfo_var): Remove.
9235         (create_pseudo_type_info): Don't create the vtable decl here.
9236         (get_vmi_pseudo_type_info): Remove.
9237         (create_tinfo_types): Adjust.
9238         (tinfo_decl_p): Rename to ...
9239         (unemitted_tinfo_decl_p): ... here. Adjust.
9240         (emit_tinfo_decl): Adjust. Create the initializer.
9241
9242 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
9243
9244         PR c++/6695
9245         * pt.c (tsubst_friend_class): Substitute into the context of the
9246         friend before using it.
9247
9248 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
9249
9250         * cp-tree.h (xref_tag): Change prototype.
9251         (handle_class_head): Likewise.
9252         (build_x_component_ref): Likewise.
9253         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
9254         (xref_tag): Take attributes as a separate parameter.
9255         (xref_tag_from_type): Adjust call to xref_tag.
9256         * decl2.c (build_expr_from_tree): Adjust call to
9257         build_x_component_ref.
9258         (handle_class_head): Take attributes as a separate parameter.
9259         * parse.y (parse_xref_tag): New function.
9260         (parse_handle_class_head): Likewise.
9261         (primary): Use parse_xref_tag.
9262         (class_head_decl): Use parse_handle_class_head.
9263         (class_head_defn): Likewise.
9264         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
9265         (build_dynamic_cast_1): Likewise.
9266         (create_pseudo_type_info): Likewise.
9267         (emit_support_tinfos): Likewise.
9268         * typeck.c (build_object_ref): Adjust call to
9269         build_x_component_ref.
9270         (build_x_component_ref): Remove protect parameter.
9271
9272 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
9273
9274         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
9275         * class.c (handle_using_decl): Likewise.
9276         (instantiate_type): Likewise.
9277         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
9278         (xref_basetypes): Change prototype.
9279         (begin_mem_initializers): New function.
9280         (get_overloaded_fn): Likewise.
9281         * decl.c (xref_basetypes): Simplify.
9282         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
9283         * init.c (build_offset_ref): Likewise.
9284         * parse.y (base_init): Use begin_mem_initializers().
9285         (structsp): Adjust call to xref_basetypes.
9286         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
9287         (instantiate_class_template): Adjust call to xref_basetypes.
9288         * semantics.c (begin_mem_initializers): New function.
9289         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
9290         (really_overloaded_fn): Likewise.
9291         (get_overloaded_fn): New function.'
9292         (get_first_fn): USe BASELINK_FUNCTIONS.
9293
9294 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
9295
9296         * cp-tree.h (SCALAR_TYPE_P): New macro.
9297         (check_for_out_of_scope_variable): New function.
9298         (at_class_scope_p): Likewise.
9299         (finish_fname): Likewise.
9300         * class.c (finish_struct): Use at_function_scope_p.
9301         * decl.c (check_for_out_of_scope_variable): New function, split
9302         out from do_identifier.
9303         (finish_enum): Use at_function_scope_p.
9304         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
9305         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
9306         (primary): Use at_function_scope_p.
9307         * search.c (at_class_scope_p): New function.
9308         * semantics.c (finish_fname): Likewise.
9309         (check_multiple_declarators): Use at_function_scope_p.
9310
9311 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
9312
9313         * parse.y (parse_scoped_id): New function.
9314         (primary): Use it.
9315         * cp-tree.h (do_scoped_id): Adjust declaration.
9316         * lex.c (do_scoped_id): Remove call to yylex.
9317         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
9318         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
9319         expanding it inline.
9320
9321 2002-06-23  Matt Thomas  <matt@3am-software.com>
9322
9323         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
9324         "#if VMS_TARGET".
9325
9326 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9327
9328         * mangle.c (integer_type_codes): Const-ify.
9329
9330 2002-06-20  Richard Henderson  <rth@redhat.com>
9331
9332         PR c++/6747
9333         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
9334         Call put_var_into_stack.
9335
9336 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9337
9338         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
9339         array size calculation.
9340
9341 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9342
9343         PR c++/6892
9344         * pt.c (tsubst_expr): Handle FILE_STMT.
9345
9346 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9347
9348         PR c++/6723
9349         * pt.c (lookup_template_class): Don't build complete argument of
9350         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
9351         argument.
9352
9353 2002-06-19  Akim Demaille  <akim@epita.fr>
9354
9355         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
9356         decl.h's TYPENAME.
9357         * spew.c, lex.c: Adjust.
9358         * parse.y (explicit_instantiation): Add empty action to override
9359         the default $$ = $1 where it introduces a type clash.
9360
9361 2002-06-14  Jason Merrill  <jason@redhat.com>
9362
9363         * semantics.c (begin_for_stmt): Push the 'for' scope before
9364         adding the FOR_STMT.
9365
9366         C++ ABI changes.
9367         * class.c (build_base_field): Set DECL_PACKED.
9368         (layout_class_type): Don't use tail padding of PODs.
9369         * mangle.c (write_unqualified_name): Fix template conversion op
9370         mangling.
9371
9372 2002-06-16  Richard Henderson  <rth@redhat.com>
9373
9374         PR opt/6793
9375         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
9376         after template instantiation.
9377
9378 2002-06-16  Richard Henderson  <rth@redhat.com>
9379
9380         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
9381
9382 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
9383
9384         * cp-tree.h (compiler_error): Remove declaration.
9385         * lex.c (compiler_error): Remove definition.
9386
9387 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
9388
9389         * g++spec.c (LIBUNWIND): New.
9390         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
9391
9392 2002-06-13  Jessica Han  <jessica@cup.hp.com>
9393
9394         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
9395         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
9396         (build_vbase_offset_vtbl_entries): Likewise.
9397         * rtti.c (build_headof): Likewise.
9398         (get_tinfo_decl_dynamic): Likewise.
9399         (create_pseudo_type_info): Likewise.
9400
9401 2002-06-12  Stan Shebs  <shebs@apple.com>
9402
9403         * mpw-config.in: Remove file, no longer used.
9404         * mpw-make.sed: Ditto.
9405
9406 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
9407
9408         * decl2.c: Update call to cpp_handle_option.
9409
9410 2002-06-07  H.J. Lu  (hjl@gnu.org)
9411
9412         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
9413
9414 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
9415
9416         * error.c (cp_error_at): Fix typo.
9417
9418 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
9419
9420         * error.c (cp_diagnostic_starter): Adjust call.
9421         (maybe_print_instantiation_context): Change prototype to take a
9422         'diagnostic_info *'.
9423         (print_instantiation_full_context): Likewise.
9424         (print_instantiation_partial_context): Likewise.
9425         (cp_diagnostic_starter): Likewise.
9426         (cp_diagnostic_finalizer): Likewise.
9427         (cp_print_error_function): Likewise.
9428         (cp_printer): Take a secondary parameter as a 'text_info *'.
9429         Remove output_state savings.  Adjust calls.
9430
9431 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
9432
9433         * pt.c (inline_parm_levels): Mark for GC.
9434
9435         * mangle.c (start_mangling): Allocate G.substitutions here...
9436         (init_mangle): ... rather than here.
9437         (finish_mangling): Clear the varray pointer when done with it.
9438         * spew.c (yylexstring): Don't use VARRAY_FREE.
9439         * search.c (bfs_walk): Don't use VARRAY_FREE.
9440         * decl2.c (pending_statics): Use gengtype to mark.
9441         (deferred_fns): Likewise.
9442         (ssdf_decls): Likewise.
9443         (init_decl2): Delete.
9444         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
9445         (cxx_init_decl_processing): Don't call init_decl2.
9446         (cxx_pop_function_context): Don't use VARRAY_FREE.
9447         * cp-tree.h (struct saved_scope): No need for special marking
9448         of varrays.
9449         (struct language_function): Likewise.
9450         (local_classes): Use gengtype to mark.
9451         (init_decl2): Delete prototype.
9452         * class.c (init_class_processing): Don't use
9453         ggc_add_tree_varray_root.
9454         (build_vtbl_initializer): Don't use VARRAY_FREE.
9455
9456         * decl.c (typename_compare): Don't use same_type_p.
9457
9458         * decl.c: Include hashtab.h instead of hash.h.
9459         (typename_hash): Update to use htab_h.
9460         (typename_compare): Likewise.
9461         (typename_htab): Use gengtype to mark.
9462         (build_typename_type): Update to use htab_h.
9463         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
9464
9465         * Make-lang.in (gt-cp-tree.h): New rule.
9466         (cp/tree.o): Depend on gt-cp-tree.h.
9467         * config-lang.in (gtfiles): Add cp/tree.c.
9468         * tree.c: Include gt-cp-tree.h.
9469         (list_hash_table): Use gengtype to mark.
9470         (init_tree): Use gengtype to mark trees.
9471
9472         * Make-lang.in (cp/decl.o): Add debug.h dependency.
9473         * call.c (struct z_candidate): Use gengtype.
9474         (USER_CONV_CAND): Use WRAPPER_ZC.
9475         (convert_class_to_reference): Use build_zc_wrapper.
9476         (build_type_conversion_1): Likewise.
9477         (build_over_call): Use WRAPPER_ZC.
9478         (add_warning): Use build_zc_wrapper.
9479         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
9480         * cp-tree.h (struct lang_identifier): Use gengtype.
9481         (struct template_parm_index_s): Likewise.
9482         (struct ptrmem_cst): Likewise.
9483         (struct tree_binding): Likewise.
9484         (struct tree_overload): Likewise.
9485         (struct tree_srcloc): Likewise.
9486         (struct tree_wrapper): Likewise.  Also modify to have a pointer
9487         to struct z_candidate rather than void.
9488         (enum cp_tree_node_structure_enum): New.
9489         (union lang_tree_node): New.
9490         (cxx_mark_tree): Delete prototype.
9491         (cp_tree_node_structure): New prototype.
9492         (build_ptr_wrapper): Delete prototype.
9493         (build_int_wrapper): Delete prototype.
9494         (build_zc_wrapper): New prototype.
9495         * decl.c: Include debug.h
9496         (cxx_mark_tree): Delete.
9497         (cp_tree_node_structure): New.
9498         * tree.c (build_ptr_wrapper): Delete.
9499         (build_int_wrapper): Delete.
9500         (build_zc_wrapper): New.
9501
9502         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
9503         Correct typo.  Patch from k_fukui@highway.ne.jp.
9504
9505         * semantics.c (current_stmt_tree): Update for change to
9506         struct language_function.
9507         (finish_mem_initializers): Likewise.
9508         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
9509         * cp-tree.h (struct language_function): Rename from
9510         cp_language_function.  Change all uses.
9511         (cp_function_chain): Don't need to cast.
9512
9513         * class.c (duplicate_tag_error): Reset discriminator.
9514         (check_bases_and_members): Update for data structure changes.
9515         * cp-tree.h (struct lang_id2): Use gengtype.
9516         (flagged_type_tree): Likewise.
9517         (SET_LANG_ID): Use GGC on struct lang_id2.
9518         (struct cp_language_function): Use gengtype.  Remove field
9519         'x_vcalls_possible_p'.
9520         (current_vcalls_possible_p): Delete.
9521         (struct lang_type_header): New.
9522         (struct lang_type_class): Rename from struct lang_type.  Include
9523         struct lang_type_header.
9524         (struct lang_type_ptrmem): New.
9525         (struct lang_type): New.
9526         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
9527         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
9528         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
9529         (struct lang_decl_flags): Use gengtype.  Add discriminators.
9530         (struct lang_decl): Use gengtype.  Add and use discriminators.
9531         Update the macros that reference moved fields.
9532         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
9533         (SET_DECL_THUNK_P): Set discriminator too.
9534         (clear_inline_text_obstack): Delete prototype.
9535         (finish_inline_definitions): Delete prototype.
9536         (mark_pending_inlines): Delete prototype.
9537         (lang_check_failed): New prototype.
9538         * decl.c (struct named_label_use_list): Use gengtype.
9539         (struct named_label_list): Likewise.
9540         (mark_binding_level): Delete.
9541         (mark_named_label_lists): Delete.
9542         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
9543         (cxx_init_decl_processing): Use generated marker routine.
9544         (begin_destructor_body): Delete dead set to
9545         current_vcalls_possible_p.
9546         (mark_lang_function): Delete.
9547         (mark_cp_function_context): Delete.
9548         (lang_mark_tree): Use generated marker routines.
9549         * decl2.c (start_objects): Set discriminator when setting
9550         GLOBAL_INIT_PRIORITY.
9551         * lex.c (retrofit_lang_decl): Set discriminators.
9552         (copy_lang_type): Update for changes to lang_type structure.
9553         (cp_make_lang_type): Set discriminator.
9554         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
9555         * search.c: Include ggc.h.
9556         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
9557         (finish_inline_definitions): Delete.
9558         * spew.c (struct token): Use gengtype.
9559         (struct token_chunk): New.
9560         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
9561         (struct feed): Use gengtype.
9562         (feed_obstack): Delete.
9563         (feed): Mark as GC root.
9564         (pending_inlines): Mark as GC root.
9565         (pending_inlines_tail): Likewise.
9566         (processing_these_inlines): Likewise.
9567         (token_obstack): Make static.
9568         (first_token): Likewise.
9569         (init_spew): Don't initialize deleted things; use gengtype for roots.
9570         (clear_inline_text_obstack): Delete.
9571         (feed_input): Use GC for struct feed.  Update for changes to
9572         struct unparsed_text.
9573         (mark_pending_inlines): Delete.
9574         (next_token): Rename from add_token.  Change all callers.  Update
9575         for changes to struct unparsed_text.
9576         (space_for_token): New.
9577         (remove_last_token): New.
9578         (alloc_unparsed_text): New.
9579         (snarf_block): Take an unparsed_text.  Update for changes to struct
9580         unparsed_text.
9581         (snarf_method): Update for changes to struct unparsed_text.
9582         (snarf_defarg): Update for changes to struct unparsed_text.
9583         * tree.c (lang_check_failed): New.
9584
9585         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
9586         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
9587         (cp/spew.o): Add dependency on gt-<filename>.h.
9588         (cp/decl2.o): Add dependency on gt-<filename>.h.
9589         (cp/call.o): Add dependency on gt-<filename>.h.
9590         (cp/pt.o): Add dependency on gt-<filename>.h.
9591         (cp/repo.o): Add dependency on gt-<filename>.h.
9592         (cp/parse.o): Add dependency on gt-<filename>.h.
9593         * call.c: Use gengtype for roots.
9594         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
9595         decl2.c parse.y pt.c repo.c spew.c.
9596         * cp-tree.h: Use gengtype for roots.
9597         (struct saved_scope): Use GGC, gengtype.
9598         (cp_parse_init): Delete prototype.
9599         (init_pt): Delete prototype.
9600         * decl.c: Use gengtype for roots.
9601         (mark_saved_scope): Delete.
9602         (cxx_init_decl_processing): Don't call deleted initilisation
9603         routines.
9604         (signed_size_zero_node): Delete, unused.
9605         * decl.h: Use gengtype for roots.
9606         * decl2.c: Use gengtype for roots.
9607         * lex.h: Use gengtype for roots.
9608         * parse.y: Use gengtype for roots.
9609         (cp_parse_init): Delete.
9610         * pt.c: Use gengtype for roots.
9611         (init_pt): Delete.
9612         * repo.c: Use gengtype for roots.
9613         * spew.c: Use gengtype for roots.
9614
9615         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
9616         (cp/decl.o): Add dependency on gtype-cp.h.
9617         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
9618         Include gtype-cp.h.  Allow for filename changes.
9619
9620         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
9621         (cp/decl.o): Add cp/gt-decl.h dependency.
9622         * config-lang.in (gtfiles): New.
9623         * tree.h: Rename struct binding_level to struct cp_binding_level.
9624         * decl.c: Rename struct binding_level to struct cp_binding_level.
9625         Include cp/gt-decl.h.
9626         (struct cp_binding_level): Use gengtype.
9627         (make_binding_level): Use GGC on struct cp_binding_level.
9628         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
9629         (cxx_init_decl_processing): Mark free_binding_level as
9630         deletable.
9631
9632         * decl.c (mark_cp_function_context): Update calling sequence.
9633
9634         * decl.c (start_function): Don't free 'struct
9635         cp_language_function'.
9636         (pop_cp_function_context): Likewise.
9637         (save_function_data): Allocate it using GC.
9638         * semantics.c (genrtl_start_function): Don't free 'struct
9639         cp_language_function'.
9640
9641 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
9642
9643         * lang-specs.h: Use cpp_debug_options.
9644
9645 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
9646
9647         * mangle.c, tree.c: Include real.h.
9648         * Make-lang.in: Update dependency lists.
9649
9650 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
9651
9652         * lex.c: Don't include c-lex.h.
9653         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
9654
9655 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
9656
9657         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
9658
9659 2002-05-22  Richard Henderson  <rth@redhat.com>
9660
9661         * decl.c (obscure_complex_init): Check for VAR_DECL
9662         before using DECL_THREAD_LOCAL.
9663
9664 2002-05-22  Richard Henderson  <rth@redhat.com>
9665
9666         * decl.c (check_tag_decl): Handle RID_THREAD.
9667         (obscure_complex_init): Reject run-time init of tls.
9668         (grokvardecl, grokdeclarator): Handle RID_THREAD.
9669         * lex.c (reswords): Add __thread.
9670         (rid_to_yy): Map RID_THREAD to SCSPEC.
9671
9672 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
9673
9674         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
9675         * cp-tree.h (cxx_post_options): Kill.
9676         * cp-lex.c (cxx_post_options): Kill.
9677
9678 2002-05-21  Richard Henderson  <rth@redhat.com>
9679
9680         * lex.c (rid_to_yy): Add RID_THREAD.
9681
9682 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
9683
9684         * init.c (build_vec_init): Test for trivial copy-assignment when
9685         copy-assigning arrays.
9686
9687 2002-05-20  Andreas Jaeger  <aj@suse.de>
9688
9689         * init.c (build_default_init): Remove unused variable.
9690
9691 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
9692
9693         * call.c (any_strictly_viable): New.
9694         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
9695
9696 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9697
9698         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
9699
9700 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9701
9702         PR c++/186, DR 259
9703         * pt.c (do_decl_instantiation): Don't complain explicit
9704         instantiation after explicit specialization.
9705         (do_type_instantiation): Likewise.
9706
9707 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
9708
9709         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
9710         renamed from...
9711         (complete_type_or_else): ... this.  Redefined as macro.
9712         (cxx_incomplete_type_diagnostic): Declare.
9713         (cxx_incomplete_type_error): Define as macro.
9714         * init.c (build_delete): Warn about incomplete types other than
9715         void, and use the built-in operator delete for them.
9716         * typeck.c (complete_type_or_diagnostic): Renamed from
9717         complete_type_or_else.  Added warn_only argument, passed to...
9718         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
9719         warnings or errors depending on new warn_only argument.  Renamed
9720         from...
9721         (cxx_incomplete_type_error): ... this.  New implementation in
9722         terms of cxx_incomplete_type_diagnostic.
9723
9724 2002-05-18  Jason Merrill  <jason@redhat.com>
9725
9726         PR c++/6611
9727         * decl2.c (import_export_decl): If we clear
9728         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
9729
9730 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9731
9732         PR c++/6620
9733         * pt.c (verify_class_unification): Don't check if PARM is template
9734         parameter dependent.  Simplify.
9735         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
9736         parameter dependent expression.
9737
9738 2002-05-14  Jason Merrill  <jason@redhat.com>
9739
9740         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
9741         Do set DECL_COMDAT.
9742         (synthesize_tinfo_var): Take the public decl.
9743         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
9744         (emit_tinfo_decl): Adjust.  Call import_export_decl.
9745         * decl2.c (import_export_decl): Simplify tinfo decl handling.
9746
9747 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
9748
9749         * cp-tree.h (struct lang_type): Added non_zero_init.
9750         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
9751         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
9752         * class.c (check_field_decls): Test non_zero_init.
9753         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
9754         zero-to-NULL conversions.
9755         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
9756         type that needs zero-initialization without zeros.
9757         (check_initializer_decl): Compute zero-initializer for types
9758         that require a non-trivial one.
9759         * init.c (build_forced_zero_init): New function.
9760         (build_default_init): Use it.
9761         * tree.c (zero_init_p): New function.
9762         * typeck2.c (force_store_init_value): New function.
9763         (process_init_constructor): Create non-trivial zero-initializers
9764         for array members and class fields.
9765
9766 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
9767
9768         * lang-specs.h: Remove redundant -lang-c++.
9769
9770 2002-05-13  Jason Merrill  <jason@redhat.com>
9771
9772         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
9773         (fixed_type_or_null): See through reference vars.
9774         (build_base_path): Vtable contents are constant.
9775         * typeck.c (get_member_function_from_ptrfunc): Likewise.
9776
9777 2002-05-12  Jason Merrill  <jason@redhat.com>
9778
9779         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
9780         structs are safe.
9781
9782 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
9783
9784         * cp-tree.h (flag_ansi): Remove.
9785         * decl2.c (flag_ansi): Remove.
9786         (cxx_decode_option): Set flag_iso and flag_undef.
9787
9788 2002-05-09  Jason Merrill  <jason@redhat.com>
9789
9790         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
9791         Use subtraction rather than a bitmask to get the index.
9792         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
9793
9794         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
9795
9796 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
9797
9798         * Make-lang.in (decl2.o): Update.
9799         * cp-tree.h (warn_multichar): Remove.
9800         * decl2.c: Include c-common.h.
9801         (warn_multichar): Remove.
9802
9803 2002-05-03  Jason Merrill  <jason@redhat.com>
9804
9805         * tree.c (build_cplus_array_type): Only const and volatile get
9806         special handling.
9807
9808         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
9809
9810 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
9811
9812         ABI change, returning simple classes from functions.
9813         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
9814         TYPE_HAS_TRIVIAL_INIT_REF is false or
9815         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
9816
9817 2002-04-30  Jason Merrill  <jason@redhat.com>
9818
9819         PR debug/6436
9820         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
9821         anonymous class with a typedef if there are attributes.
9822
9823 2002-04-29  Paul Eggert  <eggert@twinsun.com>
9824
9825         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
9826
9827 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
9828
9829         PR c++/6477
9830         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
9831         non-NULL first.
9832
9833 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
9834
9835         PR c++/6492
9836         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
9837         enter that scope before name lookup.
9838
9839         PR c++/6486
9840         * method.c (do_build_copy_constructor): Avoid building
9841         cv-qualified reference types.
9842
9843 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
9844
9845         PR c++/5719
9846         * decl.c (grok_op_properties): Assignment ops don't have to return
9847         by value. operator% should.
9848
9849 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
9850
9851         PR c/6343
9852         * decl.c (duplicate_decls): Call merge_weak.
9853
9854 2002-04-26  Richard Henderson  <rth@redhat.com>
9855
9856         * parse.y (malloced_yyss, malloced_yyvs): New.
9857         (yyoverflow): Re-add.  Set them.
9858         (free_parser_stacks): New.
9859
9860 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
9861
9862         PR c++/6497
9863         * method.c (do_build_assign_ref): Pass a derivation to
9864         build_method_call when calling base class assignment operators.
9865
9866 2002-04-26  Richard Henderson  <rth@redhat.com>
9867
9868         * parse.y (yyoverflow): Revert.
9869
9870 2002-04-26  Richard Henderson  <rth@redhat.com>
9871
9872         PR c/3581
9873         * parse.y (string): Remove.  Update all uses to use STRING
9874         instead, and not call combine_strings.
9875         * rtti.c (tinfo_name): Use fix_string_type.
9876         * semantics.c (finish_asm_stmt): Don't call combine_strings.
9877         * spew.c (yylexstring): New.
9878         (read_token): Use it.
9879
9880 2002-04-25  Richard Henderson  <rth@redhat.com>
9881
9882         PR c/2161
9883         * parse.y (yyoverflow): New.
9884
9885 2002-04-25  Jason Merrill  <jason@redhat.com>
9886
9887         PR c++/5607
9888         * search.c (check_final_overrider): No longer static.
9889         * class.c (update_vtable_entry_for_fn): Call it.
9890         * cp-tree.h: Adjust.
9891
9892 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
9893
9894         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
9895         * cp-tree.h (cxx_set_yydebug): Die.
9896         * lex.c (YYDEBUG): Get from c-lex.h.
9897         (cxx_set_yydebug): Remove.
9898         * parse.y: Include c-lex.h.
9899         (YYDEBUG): Get from c-lex.h.
9900
9901 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
9902
9903         PR c++/6438.
9904         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
9905         void.
9906
9907 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
9908
9909         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
9910         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
9911         Redefine.
9912         * cp-tree.h (cp_attribute_table): Rename.
9913         * decl.c (lang_attribute_table): Remove declaration.
9914         (cxx_init_decl_processing): Don't set it.
9915         * tree.c (cp_attribute_table): Rename.
9916
9917 2002-04-24  Jason Merrill  <jason@redhat.com>
9918
9919         PR c++/6331
9920         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
9921         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
9922         The pedwarn for array assignment is now unconditional.
9923         * tree.c (build_cplus_array_type_1): Still process simple array types
9924         normally in templates.
9925
9926         PR c++/6395
9927         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
9928         stuff for comdats.
9929
9930 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
9931
9932         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
9933         node with attributes.
9934
9935 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
9936
9937         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
9938         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
9939
9940 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
9941
9942         PR c++/6256:
9943         * pt.c (tsubst_friend_class): Handle templates with explicit
9944         nested names.
9945
9946         PR c++/6331:
9947         * typeck.c (merge_types): Remember the cv-qualification of pointer
9948         types when merging them.
9949
9950 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
9951
9952         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
9953         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
9954         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
9955         cxx_mark_function_context): New.
9956         * decl.c (push_cp_function_context, pop_cp_function_context,
9957         mark_cp_function_context): Rename for consistency.
9958         (cxx_init_decl_processing): Don't set old hooks.
9959
9960 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
9961
9962         * call.c (convert_type_from_ellipsis): Rename, update.
9963         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
9964         * cp-tree.h (convert_type_from_ellipsis): Rename.
9965         * decl.c (cxx_init_decl_processing): Don't set hook.
9966
9967 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
9968
9969         * call.c (build_new_method_call): Update.
9970         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
9971         * cp-tree.h (cxx_incomplete_type_error): New.
9972         * decl.c (grokdeclarator, grokparms): Update.
9973         * decl2.c (check_classfn): Update.
9974         * pt.c (tsubst): Update.
9975         * typeck.c (complete_type_or_else, expr_sizeof,
9976         decay_conversion): Update.
9977         * typeck2.c (incomplete_type_error): Rename.
9978         (add_exception_specifier): Update.
9979
9980 2002-04-18  Jason Merrill  <jason@redhat.com>
9981
9982         PR c++/5658
9983         * search.c (setup_class_bindings): A class template qualifies as a
9984         type binding.
9985
9986 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
9987
9988         PR c++/6316
9989         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
9990         before expanding.
9991
9992 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
9993
9994         * init.c (begin_init_stmts): Remove commented out code.
9995         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
9996         * semantics.c (begin_gobal_stmt_expr): Adjust call to
9997         expand_start_stmt_expr.
9998
9999 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
10000
10001         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
10002         dso_handle itself, to __cxa_atexit.
10003
10004 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
10005
10006         * error.c (cxx_print_error_function): Adjust call to macros.
10007
10008 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
10009
10010         * class.c (layout_virtual_bases): Do all dsize computation on trees.
10011
10012 2002-04-14  Jason Merrill  <jason@redhat.com>
10013
10014         * typeck.c (get_member_function_from_ptrfunc): Don't do
10015         gratuitious division and multiplication on
10016         ptrmemfunc_vbit_in_delta targets.
10017
10018 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
10019
10020         PR c++/5373.
10021         * semantics.c (finish_expr_stmt): Remember the type of the
10022         expression before any conversions are performed.
10023
10024 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
10025
10026         PR c++/5189.
10027         * call.c (add_template_candidate_real): Do not treat member
10028         templates as copy constructors.
10029
10030 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
10031
10032         * decl.c (duplicate_decls): Do not copy the RTL for a variable
10033         declaration if the old variable had an incomplete type and the new
10034         variable does not.
10035         (complete_vars): Do not call layout_decl for completed variables.
10036
10037 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
10038
10039         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
10040         with an explicit one.
10041         (follow_tag_typedef): New.
10042         (lookup_tag): Use it to extract the tag of an explicit typedef.
10043         (xref_tag): Likewise.
10044
10045 2002-04-11  Andrew Haley  <aph@redhat.com>
10046
10047         * typeck.c (type_after_usual_arithmetic_conversions):
10048         If two types have the same variant, return immediately.
10049         When two floating-point operands are the same precision:
10050           convert to float if one of the operands is float;
10051           if neither operand is one of the standard types, return the type
10052           of the first operand.
10053
10054 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
10055
10056         PR c++/5507
10057         * decl.c (make_typename_type): Remove implicit typenameness.
10058
10059 2002-04-09  Jason Merrill  <jason@redhat.com>
10060
10061         PR optimization/6189
10062         * semantics.c (genrtl_start_function): Don't free
10063         DECL_SAVED_FUNCTION_DATA for inline functions.
10064
10065         * init.c (build_member_call): For now, don't convert to
10066         intermediate base if it would cause an error.
10067
10068 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
10069
10070         * parse.y (namespace_qualifier, maybe_identifier,
10071         begin_explicit_instantiation, end_explicit_instantiation,
10072         apparent_template_type, .finish_template_type,
10073         do_id, maybe_init, defarg_again, component_decl_1):
10074         Add ending ';', in accordance with POSIX.
10075
10076 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
10077
10078         PR c++/5571
10079         * class.c (layout_class_type): Remember incomplete static
10080         variables.
10081         (finish_struct_1): Call complete_vars, not
10082         hack_incomplete_structures.
10083         * cp-tree.h (hack_incomplete_structures): Rename to ...
10084         (complete_vars): ... this.
10085         (struct saved_scope): Remove incomplete.
10086         (namespace_scope_incomplete): Remove.
10087         * decl.c (struct binding_level): Remove incomplete.
10088         (incomplete_vars): New variable.
10089         (mark_binding_level): Don't mark incomplete.
10090         (print_binding_level): Don't print it.
10091         (mark_saved_scope): Don't mark incomplete.
10092         (pushdecl): Use maybe_register_incopmlete_var.
10093         (cxx_init_decl_processing): Register incomplete_vars for GC.
10094         (start_decl_1): Clarify error message.
10095         (hack_incomplete_vars): Remove.
10096         (maybe_register_incomplete_var): New function.
10097         (complete_vars): Likewise.
10098
10099 2002-04-06  Jason Merrill  <jason@redhat.com>
10100
10101         PR c++/4934
10102         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
10103         set before checking it.
10104
10105         PR c++/525
10106         * init.c (build_member_call): Use build_scoped_ref.
10107         (resolve_offset_ref): Likewise.
10108         * call.c (build_scoped_method_call): Likewise.
10109         * tree.c (maybe_dummy_object): Kludge around current_class_type being
10110         wrong.
10111         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
10112         * cp-tree.h: Adjust.
10113
10114         * init.c (push_base_cleanups): Just use build_scoped_method_call.
10115
10116         PR c++/6179
10117         * method.c (implicitly_declare_fn): Pass unqualified type to
10118         synthesize_exception_spec.
10119
10120 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
10121
10122         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
10123         * cvt.c: Update comment.
10124         * init.c (expand_cleanup_for_base): Update.
10125         * semantics.c (finish_parenthesized_expr): Update.
10126         * typeck.c (cp_truthvalue_conversion): Update.
10127
10128 2002-04-04  Jason Merrill  <jason@redhat.com>
10129
10130         * semantics.c (finish_eh_cleanup): New fn.
10131         * cp-tree.h: Add prototype.
10132         * init.c (perform_member_init, expand_cleanup_for_base): Use
10133         finish_eh_cleanup.
10134         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
10135         * cp-tree.h: Remove references.
10136         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
10137         * dump.c (cp_dump_tree): Likewise.
10138         * pt.c (tsubst_expr): Likewise.
10139         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
10140         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
10141         * tree.c (cp_statement_code_p): Likewise.
10142
10143         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
10144
10145         PR c++/5636
10146         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
10147         cleanup for nrv.
10148
10149         PR c++/5104
10150         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
10151         specifiers.
10152         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
10153
10154 2002-04-03  Richard Henderson  <rth@redhat.com>
10155
10156         * cp-lang.c (cxx_warn_unused_global_decl): New.
10157         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
10158
10159 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
10160
10161         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
10162         * tree.c (init_tree): Don't set hook.
10163
10164 2002-04-03  Roger Sayle  <roger@eyesopen.com>
10165
10166         PR c++/5998:
10167         * decl.c (duplicate_decls): Don't mess with assembler names when
10168         redeclaring builtin functions as static.
10169
10170 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
10171
10172         * call.c (build_addr_func): Update.
10173         * class.c (resolve_address_of_overloaded_function): Update.
10174         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
10175         * cp-tree.h (cxx_mark_addressable): New.
10176         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
10177         * decl2.c (build_cleanup): Update.
10178         * except.c (build_throw): Update.
10179         * init.c (resolve_offset_ref): Update.
10180         * pt.c (convert_nontype_argument): Update.
10181         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
10182         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
10183         unary_complex_lvalue): Update.
10184         (mark_addressable): Rename.
10185
10186 2002-04-01  Roger Sayle  <roger@eyesopen.com>
10187
10188         PR c++/5998:
10189         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
10190         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
10191         but follow the SET_DECL_RTL idiom used elsewhere in the function.
10192
10193 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
10194
10195         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
10196         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
10197         * decl.c (grokdeclarator): Update.
10198         * mangle.c (write_integer_cst): Update.
10199         * typeck.c (build_binary_op): Update.
10200
10201 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
10202
10203         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
10204         * lex.c (cxx_init): Don't set hook.
10205
10206 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
10207
10208         * Make-lang.in (error.o): Update.
10209         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
10210         * cp-tree.h (struct diagnostic_context): Predeclare.
10211         (cxx_print_error_function): New.
10212         * error.c: Include langhooks-def.h.
10213         (lang_print_error_function): Rename.  Update.
10214         (init_error): Don't set hook.
10215
10216 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
10217
10218         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
10219         Redefine.
10220         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
10221         * decl.c (finish_enum): Similarly.
10222         * error.c (dump_type): Similarly.
10223         * lex.c (cxx_init): Similarly.
10224         * mangle.c (write_builtin_type): Similarly.
10225         * typeck.c (comptypes): Similarly.
10226
10227 2002-03-28  Roger Sayle  <roger@eyesopen.com>
10228
10229         PR c++/5998:
10230         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
10231         in the g++ front-end.
10232         (duplicate_decl): Allow redefinition of anticipated built-ins.
10233         Fix inlining problem by over-writing the old DECL_RTL.
10234         (lookup_namespace_name): Fail to find an identifier in the
10235         specified namespace if its still anticipated.
10236         (builtin_function_1): New function split out from builtin_function
10237         to create a builtin in the current namespace with given context.
10238         (builtin_function): Call builtin_function_1 to define the
10239         appropriate builtins in both the std and global namespaces.
10240         (select_decl): Don't test for anticipated decls here.
10241         (unqualified_namespace_lookup): Instead ignore them whilst
10242         searching through scopes and namespaces.
10243         * decl2.c (do_nonmember_using_decl): If a using declaration
10244         specifies an anticipated built-in function, mark it as no longer
10245         anticipated in that scope.
10246         (ambiguous_decl):  Avoid resolving to an anticipated decl.
10247         * lex.c (do_scoped_id): Fail to find an identifier in the global
10248         namespace if its still anticipated.
10249
10250 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
10251
10252         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
10253         * cp-tree.h (cp_make_lang_type): Rename.
10254         * lex.c (cp_make_lang_type): Rename.
10255         (make_aggr_type): Update.
10256         * tree.c (init_tree): Don't set make_lang_type_fn.
10257
10258 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
10259
10260         PR c++/6073
10261         * class.c (finish_struct_1): Update static field's DECL_MODE even
10262         if its type is a variant of t.
10263
10264 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
10265
10266         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
10267         * cp-tree.h (cxx_insert_default_attributes): New.
10268         * decl.c (insert_default_attributes): Rename.
10269
10270 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
10271
10272         PR c++/4884
10273         * call.c (build_op_delete_call): Allow for the fact the placement
10274         may be a COMPOUND_EXPR.
10275
10276 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
10277
10278         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
10279         * cp-tree.h (init_cplus_expand): Remove.
10280         (cxx_expand_expr): New.
10281         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
10282         fix prototype.
10283         (init_cplus_expand): Remove.
10284         * lex.c (cxx_init): Don't call init_cplus_expand.
10285
10286 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
10287
10288         PR c++/4884.
10289         * init.c (build_new_1): Allow for the fact the result of
10290         build_function_call may be a COMPOUND_EXPR.
10291
10292 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
10293
10294         PR c++/5682
10295         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
10296         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
10297         (dfs_skip_nonprimary_vbases_markedp): Remove.
10298         * search.c (get_shared_vbase_if_not_primary): Remove.
10299         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
10300         (dfs_skip_nonprimary_vbases_markedp): Remove.
10301         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
10302         (dfs_marked_real_bases_queue_p): Likewise.
10303
10304 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
10305
10306         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
10307         * cp-tree.h (cxx_mark_tree): New.
10308         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
10309
10310 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
10311
10312         * cp-tree.h (cxx_maybe_build_cleanup): New.
10313         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
10314         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
10315         * tree.c (build_target_expr): Update.
10316         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
10317
10318 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
10319
10320         * decl2.c (cxx_decode_option): Handle -E.
10321         * lang-specs.h (default_compilers): Preprocess with cc1plus.
10322         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
10323
10324 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
10325
10326         PR c++/6037
10327         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
10328
10329 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
10330
10331         * error.c (dump_type): Be careful about implicit typenames.
10332
10333 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
10334
10335         PR C++/3656
10336         * semantics.c (finish_base_specifier): Handle erronous base
10337         classes.
10338
10339 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
10340
10341         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
10342         REAL_IS_NOT_DOUBLE.
10343
10344 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
10345
10346         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
10347         an index into the vtable_entry array regardless of
10348         TARGET_PTRMEMFUNC_VBIT_LOCATION.
10349
10350 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
10351
10352         * tree.c (cp_cannot_inline_tree_fn): Same.
10353
10354 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
10355
10356         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
10357         insert_block, getdecls, global_bindings_p): New.
10358
10359 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
10360
10361         PR c++/4361
10362         * mangle.c (struct globals) Add internal_mangling_p member.
10363         (write_template_param): Do internal mangling, if needed.
10364         (mangle_conv_op_name_for_type): Request internal mangling.
10365
10366 2002-03-20  Jason Merrill  <jason@redhat.com>
10367
10368         PR c++/2136
10369         * init.c (build_delete): Check access for a member op delete here.
10370         * decl2.c (delete_sanity): Not here.
10371
10372 2002-03-19  Jason Merrill  <jason@redhat.com>
10373
10374         PR c++/5118
10375         * class.c (get_vfield_name): Use the constructor_name.
10376
10377 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
10378
10379         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
10380         * cp-tree.h (lang_printable_name): Rename.
10381         * error.c (lang_decl_name): Use new hook.
10382         * lex.c (cxx_init): Remove old hook.
10383         * pt.c (tsubst_decl): Use new hook.
10384         * tree.c (lang_printable_name): Rename.
10385
10386 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
10387
10388         PR c++/3882
10389         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
10390         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
10391         only after recording the declaration.
10392
10393 2002-03-18  Jason Merrill  <jason@redhat.com>
10394
10395         PR c++/2039
10396         * init.c (resolve_offset_ref): Hand off to build_component_ref.
10397
10398         PR c++/4222, c++/5995
10399         * call.c (build_over_call): Fix empty class logic.
10400
10401         PR c++/3870
10402         * cp-tree.h (struct saved_scope): Add last_parms field.
10403         * decl.c (maybe_push_to_top_level): Save last_function_parms.
10404         (pop_from_top_level): Restore it.
10405
10406         PR c++/4377
10407         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
10408         NON_LVALUE_EXPRs.
10409
10410         PR c++/4003
10411         * pt.c (tsubst_friend_function): Use decl_namespace_context.
10412
10413         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
10414         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
10415         type with a nontrivial destructor.
10416
10417 2002-03-17  Jason Merrill  <jason@redhat.com>
10418
10419         PR c++/4460
10420         * class.c (build_base_path): Virtual base layout is fixed in
10421         in-charge [cd]tors.
10422
10423 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
10424
10425         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
10426         * parse.y (yyparse): Remove macro.
10427
10428 2002-03-17  Jason Merrill  <jason@redhat.com>
10429
10430         PR c++/5757
10431         * init.c (build_new_1): Pass the right pointer to op delete.
10432
10433 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
10434
10435         PR c++/4361
10436         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
10437         conversion operators go.
10438         (struct lang_decl_flags): Add template_conv_p and unused
10439         bitfields.
10440         (DECL_TEMPLATE_CONV_FN_P): New macro.
10441         * call.c (build_user_type_conversion_1): Don't check second type
10442         conversion of overload set first.
10443         * class.c (add_method): Make sure templated conversion operators
10444         all end up on slot 2.
10445         * lex.c (do_identifier): A conversion operator token might be
10446         satisfied by a templated conversion operator.
10447         * pt.c (check_explicit_specialization): Use
10448         CLASSTYPE_FIRST_CONVERSION_SLOT.
10449         (template_parm_this_level_p): New function.
10450         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
10451         * search.c (lookup_fnfields_1): Template conversions will be on
10452         the first slot.
10453         * typeck.c (build_component_ref): Preserve the type of an
10454         conversion operator name on the overload type.
10455         (build_x_function_call): Retrieve the conversion operator name.
10456
10457 2002-03-15  Richard Henderson  <rth@redhat.com>
10458
10459         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
10460
10461 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
10462
10463         * cp-tree.h (CLEANUP_DECL): Remove.
10464         (CLEANUP_EXPR): Likewise.
10465         * decl.c (destroy_local_var): Simplify.
10466         (maybe_build_cleanup): Tidy.
10467         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
10468         * semantics.c (cp_expand_stmt): Likewise.
10469         * cp/tree.c (cp_statement_code_p): Likewise.
10470
10471 2002-03-15  Jason Merrill  <jason@redhat.com>
10472
10473         PR c++/5857
10474         * decl.c (duplicate_decls): Use merge_types instead of common_type.
10475         * typeck.c (common_type): Just hand off to
10476         type_after_usual_arithmetic_conversions and
10477         composite_pointer_type.
10478         (merge_types): New fn.
10479         (commonparms): Use it instead of common_type.
10480         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
10481         (composite_pointer_type): Also handle attributes.
10482         * cp-tree.h: Declare merge_types.
10483
10484         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
10485         variables.
10486         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
10487
10488 2002-03-14  Richard Henderson  <rth@redhat.com>
10489
10490         * decl.c: Include c-pragma.h.
10491         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
10492         * Make-lang.in: Update dependencies.
10493
10494 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
10495
10496         PR c++/5908
10497         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
10498         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
10499
10500 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
10501
10502         * mangle.c (write_builtin_type): Handle 128-bit integers even if
10503         they are not a standard integer type.
10504
10505 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
10506
10507         * cp-tree.h (init_init_processing): Remove declaration.
10508         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
10509         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
10510
10511 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10512
10513         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
10514         Define.
10515         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
10516         tree_code_length.
10517         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
10518         cplus_tree_code_name): Delete.
10519         (cxx_init): Don't call add_c_tree_codes, instead set
10520         lang_unsafe_for_reeval.  Don't try to copy into the various
10521         tree_code arrays.
10522
10523 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
10524
10525         PR c++/5659
10526         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
10527         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
10528         definitions.
10529
10530 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
10531
10532         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
10533         DR209 is now not a defect.
10534         * cp-tree.h (skip_type_access_control): Remove.
10535         * decl.c (grokdeclarator): Do type access control for friend
10536         declarations.
10537         * semantics.c (decl_type_access_control): Don't reset
10538         current_type_lookups.
10539         (save_type_access_control): Always save the lookups.
10540         (skip_type_access_control): Remove.
10541         (finish_class_definition): Don't change type_lookups.
10542
10543 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
10544
10545         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
10546         It is incorrect.
10547         * typeck.c (build_static_cast): Compare non-qualified types
10548         with pointer to member conversions.
10549
10550 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
10551             Daniel Berlin  <dan@dberlin.org>
10552
10553         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
10554         (cxx_get_alias_set): Use it.
10555
10556 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10557
10558         * cp-tree.h (stabilize_expr): Prototype.
10559
10560 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
10561
10562         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
10563         conditional return void.
10564
10565 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
10566
10567         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
10568         * cp-tree.h (cxx_unsave): New.
10569         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
10570         (init_tree): Update.
10571
10572 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10573
10574         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
10575         explicit sizeof/sizeof.
10576         * decl2.c (cxx_decode_option): Likewise.
10577         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
10578
10579 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
10580
10581         PR c++/775
10582         * decl.c (lookup_tag): Only reject enum/class mismatch, not
10583         class/union mismatch.
10584         * parse.y (check_class_key): New function.
10585         (structsp): Call it.
10586
10587 2002-03-01  Michael Matz  <matz@suse.de>
10588
10589         * typeck.c (cp_pointer_int_sum): Complete inner type which is
10590         used later by size_in_bytes().
10591
10592 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
10593
10594         * cp-tree.h:  Require __GNUC__ to be #defined.
10595         (build_init):  Add missing prototype.
10596
10597 2002-03-01  Jason Merrill  <jason@redhat.com>
10598
10599         * except.c: Don't include decl.h or obstack.h.  Do include
10600         tree-inline.h.
10601         (build_throw): Destroy temporaries from the thrown
10602         expression before calling __cxa_throw.  Construct a thrown
10603         temporary directly into the exception object.
10604         (stabilize_throw_expr): New function.
10605         (wrap_cleanups_r): New function.
10606         * tree.c (stabilize_expr): New function.
10607         * init.c (build_init): New function.
10608         * Make-lang.in (cp/except.o): Adjust .h deps.
10609
10610 2002-02-28  Jason Merrill  <jason@redhat.com>
10611
10612         * search.c (lookup_base_r): Don't clear is_non_public just because
10613         we found a friendly scope.
10614
10615         * decl.c (finish_function): Only warn about missing return
10616         statement with -Wreturn-type.
10617
10618 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
10619
10620         * class.c (build_clone): Update.
10621         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
10622         * cp-tree.h (cxx_dup_lang_specific_decl): New.
10623         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
10624         (copy_decl): Update.
10625         * method.c (make_thunk): Update.
10626
10627 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
10628
10629         * decl2.c: Delete traditional-mode-related code copied from
10630         the C front end but not used, or used only to permit the
10631         compiler to link.
10632
10633 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
10634
10635         PR c++/4093
10636         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
10637         to void.
10638
10639 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
10640
10641         PR other/5746
10642         * semantics.c (finish_switch_cond): Don't call get_unwidened
10643         if error_mark_node.
10644
10645 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
10646
10647         PR c++/2645, DR 295
10648         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
10649         tf_keep_type_decl.
10650         (make_typename_type): Use tsubst_flags_t.
10651         * decl.c (make_typename_type): Adjust. Return non-artificial
10652         TYPE_DECLs, if required.
10653         (grokdeclarator): Simplify CVR qualification handling. Allow bad
10654         qualifiers on typedef types.
10655         * decl2.c (handle_class_head): Adjust make_typename_type call.
10656         * parse.y (nested_name_specifier): Likewise.
10657         (typename_sub0): Likewise.
10658         (typename_sub1): Likewise.
10659         * pt.c (convert_template_argument): Adjust make_typename_type
10660         return value.
10661         (tsubst): Adjust cp_build_qualified_type_real calls.
10662         (check_cv_quals_for_unify): Cope with allowing bad qualifications
10663         on template type parms.
10664         (instantiate_decl): Recheck substitutions to give warnings on bad
10665         qualifications.
10666         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
10667
10668 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
10669
10670         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
10671
10672         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
10673         unless DECL_ALWAYS_INLINE.
10674
10675 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
10676
10677         * typeck.c (cp_pointer_int_sum): Renamed from
10678         pointer_int_sum, call pointer_int_sum.
10679
10680 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
10681
10682         * decl.c (duplicate_decls): Return 0 if issued error about
10683         redeclaration.
10684
10685 2002-02-19  Jason Merrill  <jason@redhat.com>
10686
10687         ABI change: Mangle `void (A::*)() const' as
10688         M1AKFvvE, not MK1AFvvE.
10689         * mangle.c (write_function_type): Write cv-quals for member
10690         function type here.
10691         (write_pointer_to_member_type): Not here.
10692
10693 2002-02-18  Jason Merrill  <jason@redhat.com>
10694
10695         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
10696         (do_decl_instantiation): Likewise.
10697
10698 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
10699
10700         PR c++/5685
10701         * decl.c (duplicate_decls): Make warning unconditional
10702         if duplicate default argument declarations are present.
10703
10704 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
10705
10706         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
10707         shortening.
10708
10709 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
10710
10711         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
10712         remove incorrect comment. Move #if 0'd code to common path. Use
10713         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
10714
10715 2002-02-13  Jason Merrill  <jason@redhat.com>
10716
10717         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
10718         (finish_function): Don't warn if current_function_returns_null.
10719
10720         * typeck2.c (digest_init): Do handle values of vector type.
10721
10722         * typeck2.c (digest_init, process_init_constructor): Treat vectors
10723         like arrays.
10724
10725 2002-02-11  Jason Merrill  <jason@redhat.com>
10726
10727         * parse.y (reserved_declspecs): Don't handle attributes.
10728         (reserved_typespecquals): Handle them here.
10729         * Make-lang.in (parse.c): Adjust expected conflicts.
10730
10731 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
10732
10733         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
10734         instead of compstmt.
10735         (compstmt_or_stmtexpr): Renamed from compstmt.
10736         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
10737
10738 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
10739
10740         Rename instantiate_type_flags to tsubst_flags_t & expand use.
10741         * cp-tree.h (instantiate_type_flags): Rename to ...
10742         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
10743         add tf_warning flag.
10744         (instantiate_type): Adjust prototype.
10745         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
10746         do_type_instantiation, cp_build_qualified_type_real): Likewise.
10747         cp_build_qualified_type: Adjust.
10748         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
10749         tf_*.
10750         * call.c (standard_conversion): Rename itf_* to tf_*.
10751         (reference_binding): Likewise.
10752         (convert_like_real): Likewise.
10753         * cvt.c (cp_convert_to_pointer): Likewise.
10754         (convert_to_reference): Likewise.
10755         * decl.c (lookup_namespace_name): Use tf_* flags.
10756         (make_typename_type): Likewise.
10757         (grokdeclarator): Likewise.
10758         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
10759         (coerce_template_template_parms, convert_template_argument,
10760         coerce_template_parms, maybe_get_template_decl_from_type_decl,
10761         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
10762         instantiate_class_template, tsubst_template_arg_vector,
10763         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
10764         tsubst_decl, tsubst_arg_types, tsubst_function_type,
10765         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
10766         instantiate_template, fn_type_unification,
10767         resolve_overloaded_unification, verify_class_unification,
10768         unify, get_bindings_real, do_type_instantiation,
10769         regenerate_decl_from_template, instantiate_decl,
10770         tsubst_initializer_list, tsubst_enum,
10771         get_mostly_instantiated_function_type,
10772         invalid_nontype_parm_type_p): Likewise.
10773         * tree.c (cp_build_qualified_type_real): Likewise.
10774         * typeck.c (build_binary_op): Rename itf_* to tf_*.
10775         (build_ptrmemfunc): Likewise.
10776         (convert_for_assignment): Likewise.
10777
10778 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
10779
10780         PR c++/109
10781         * decl.c (grokdeclarator): Allow friend declarations from
10782         dependent types.
10783         * decl2.c (handle_class_head): Don't push into template parm contexts.
10784         * pt.c (push_template_decl_real): Template parm contexts are never
10785         being defined.
10786
10787 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
10788
10789         * class.c: Include target.h.
10790         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
10791         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
10792         bit-field layout.
10793         * Make-lang.in: Adjust deps.
10794
10795 2002-02-05  Jason Merrill  <jason@redhat.com>
10796
10797         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
10798
10799 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
10800
10801         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
10802         (finish_switch_cond): Set SWITCH_TYPE.
10803
10804 2002-02-04  Richard Henderson  <rth@redhat.com>
10805
10806         * method.c (use_thunk): Always initialize the block tree.  Reindent.
10807         * semantics.c (expand_body): Emit thunks after function, not before.
10808
10809 2002-02-04  Jason Merrill  <jason@redhat.com>
10810
10811         * decl.c (start_function): Call cplus_decl_attributes immediately
10812         after grokdeclarator.
10813
10814         * decl.c (start_function): Combine DECL_RESULT handling code.
10815
10816 2002-02-03  Jason Merrill  <jason@redhat.com>
10817
10818         * xref.c: Remove.
10819         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
10820         (cp/xref.o): Remove dependencies.
10821         * class.c (finish_struct_1, check_methods): Don't call xref fns.
10822         (finish_struct_1): Likewise.
10823         * friend.c (make_friend_class): Likewise.
10824         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
10825         * spew.c (read_process_identifier): Likewise.
10826
10827 2002-02-01  Jason Merrill  <jason@redhat.com>
10828
10829         PR c++/4872
10830         * decl.c (finish_function): Warn about a non-void function with
10831         no return statement and no abnormal exit.
10832         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
10833         (current_function_returns_abnormally): New macro.
10834         * call.c (build_call): Set it.
10835
10836         * typeck.c (build_component_ref): Always complain about offsetof
10837         constructs on non-PODs.  Only make it an error for members of
10838         virtual bases.
10839
10840         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
10841         (dump_function_decl): Always dump parms.
10842
10843         * decl2.c (finish_static_data_member_decl): Complain about a local
10844         class with a static data member.
10845
10846         PR c++/4286
10847         * search.c (lookup_field_1): Don't xref a static data member
10848         just because we looked it up.
10849
10850 2002-01-31  Jason Merrill  <jason@redhat.com>
10851
10852         * Make-lang.in (parse.c): Handle .output file.
10853
10854         PR c++/3395
10855         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
10856         not TREE_TYPE.
10857         * semantics.c (finish_class_definition): Adjust.
10858
10859         Allow attributes in parms and casts.
10860         * parse.y (named_parm): Don't strip attrs.
10861         (declmods): Remove 'attributes' production.
10862         (nonempty_cv_qualifiers): Accept attributes.
10863         (ATTRIBUTE): Give precedence.
10864         * decl.c (groktypename): Handle attributes.
10865         (grokparms): Likewise.
10866
10867 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
10868
10869         * decl2.c (cxx_decode_option): Pass 0 as last argument to
10870         cpp_handle_option.
10871         * lang-specs.h: Use cpp_unique_options instead of cpp_options
10872         when used together with cc1_options.
10873
10874 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
10875
10876         PR c++/5132
10877         * typeck2.c (digest_init): Make sure non-array core type is
10878         instantiated.
10879         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
10880         constructor, rather than build a new one.
10881         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
10882         PURPOSE of constructor elts.
10883
10884 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
10885
10886         * Make-lang.in (parse.c): Adjust expected number of
10887         shift-reduce conflicts.
10888         (decl.o): Depend on diagnostic.h.
10889         * decl.c: Include diagnostic.h.
10890         (grokdeclarator): Check for null pointer.
10891         (finish_function): Don't abort when
10892         current_binding_level->parm_flag != 1, if errors have
10893         occurred; throw away the statement tree and extra binding
10894         levels, and continue.
10895         * lex.c (note_list_got_semicolon): Check for null pointer.
10896         * method.c (hack_identifier): Just return error_mark_node if
10897         value is error_mark_node.
10898         * parse.y (primary: TYPEID(type_id)): No need to use
10899         TYPE_MAIN_VARIANT here.
10900         (handler_seq): Accept an empty list of catch clauses and
10901         generate a fake handler block to avoid later crashes.
10902         (ansi_raise_identifier): Accept the error token too.
10903         * semantics.c (begin_class_definition,
10904         finish_class_definition): Check for error_mark_node.
10905
10906 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
10907
10908         * typeck2.c (friendly_abort): Delete definition.
10909         * cp-tree.h (friendly_abort): Don't prototype.
10910         (my_friendly_assert): Use fancy_abort.
10911
10912 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
10913
10914         * cp-tree.h (my_friendly_abort): Remove.
10915
10916 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
10917
10918         * spew.c (pending_inlines, pending_inlines_tail,
10919         processing_these_inlines): Make static.
10920         (mark_pending_inlines): Remove static.
10921         (begin_parsing_inclass_inline): If in function, save pi
10922         for GC to cp_function_chain->unparsed_inlines instead.
10923         (process_next_inline): Likewise.
10924         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
10925         (mark_pending_inlines): Add prototype.
10926         * decl.c (spew_debug): Remove unused extern.
10927         (mark_lang_function): Call mark_pending_inlines.
10928
10929 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
10930
10931         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
10932         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
10933         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
10934         Change my_fancy_abort() to abort().
10935
10936 2002-01-23  Jason Merrill  <jason@redhat.com>
10937
10938         PR c++/5453
10939         * class.c (fixed_type_or_null): Fix thinko.
10940
10941         PR c++/3331
10942         * init.c (resolve_offset_ref): Use build_indirect_ref.
10943
10944         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
10945
10946 2002-01-22  Jason Merrill  <jason@redhat.com>
10947
10948         * parse.y (function_body): Suppress the block for the outermost
10949         curly braces.
10950         * decl.c (pushdecl): Don't try to skip it.
10951         (begin_function_body): Keep the block we create, not the next one.
10952         * init.c (emit_base_init): Don't mess with keep_next_level.
10953
10954         * class.c (build_base_path): Tweak formatting.
10955
10956 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10957
10958         Fix regression introduced with patch for c++/775
10959         * parse.y (class_head_defn): Check for template specializations
10960         with a different class-key.
10961
10962 2002-01-17  Jason Merrill  <jason@redhat.com>
10963
10964         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
10965         (begin_function_body): Call them and keep_next_level.
10966         * init.c (emit_base_init): Call keep_next_level.
10967         * semantics.c (setup_vtbl_ptr): Lose.
10968         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
10969         (vtbls_set_up_p): Lose.
10970         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
10971         * method.c (do_build_copy_constructor): Likewise.
10972         (synthesize_method): Call finish_mem_initializers.
10973         * parse.y (nodecls): Likewise.
10974
10975         * error.c (dump_type_suffix): Print the exception specs before
10976         recursing.
10977         (dump_function_decl): Here, too.
10978
10979         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
10980
10981 2002-01-10  Ira Ruben   <ira@apple.com>
10982
10983         PR c++/907
10984         * decl.c (start_method): Handle attrlist.
10985
10986 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
10987
10988         * decl2.c (max_tinst_depth): Increase default limit to 500.
10989
10990 2002-01-10  Graham Stott  <grahams@redhat.com>
10991
10992         * spew.c (YYCHAR): Uppercase macro parameter and add
10993         parenthesis.
10994         (YYCODE): Likewise.
10995         (NAME): Uppercase macro parameter.
10996
10997 2002-01-09  Graham Stott  <grahams@redhat.com>
10998
10999         * decl.h (grokdeclarator): Wrap long line.
11000
11001         * semantics.c (FINISH_COND): Uppercase macro paramaters and
11002         add parenthesis.
11003
11004 2002-01-08  Graham Stott  <grahams@redhat.com>
11005
11006         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
11007         (PALLOC): Uppercase macro parameter and whitespace.
11008         (SALLOC): Uppercase macro parameter.
11009         (SFREE): Uppercase macros parameter, add parenthese and
11010         whitespace.
11011         (STREQL): Uppercase macro parameter and whitespace.
11012         (STRNEQ): Likewise.
11013         (STRLSS): Likewise.
11014         (STRLEQ): Likewise.
11015         (STRGTR): Likewise.
11016         (STRGEQ): Likewise.
11017
11018         * call.c (convert_like): Add parenthesis and wrap.
11019         (convert_like_with_context): Likewise.
11020         (ICS_RANK): Whitespace.
11021         (NEED_TEMPORARY_P): Remove parenthesis.
11022
11023         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
11024         whitespace.
11025         (VTT_MARKED_BINFO_P): Likewise.
11026
11027         * decl.c (BINDING_LEVEL): Add parenthesis.
11028         (DEF_OPERATOR): Likewise.
11029
11030         * mangle.c (MANGLE_TRACE): Add parenthesis.
11031         (MANGLE_TRACE_TREE): Likewise.
11032         (write_signed_number): Likewise.
11033         (write_unsigned_number): Likewise.
11034
11035         * pt.c (ccat): Uppercase macro parameter.
11036         (cat): Likewise
11037
11038         * search.c (SET_BINFO_ACCESS): Add parenthesis.
11039
11040 2002-01-07  Jason Merrill  <jason@redhat.com>
11041
11042         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
11043         to pedwarn.
11044
11045         PR c++/3536
11046         * method.c (make_thunk): If !flag_weak, give the thunk the
11047         function's linkage.
11048         (use_thunk): Here, too.
11049
11050 2002-01-07  Graham Stott  <grahams@redhat.com>
11051
11052         * error.c: Update copyright date.
11053         (print_scope_operator): Add parenthesis.
11054         (print_left_paren): Likewise.
11055         (print_right_paren): Likewise.
11056         (print_left_bracket): Likewise.
11057         (print_right_bracket): Likewise.
11058         (print_template_argument_list_start): Likewise.
11059         (print_template_argument_list_end): Likewise.
11060         (print_non_consecutive_character): Likewise.
11061         (print_tree_identifier): Likewise.
11062         (print_identifier): Likewise.
11063         (NEXT_CODE): Uppercase macro parameter.
11064         (ident_fndecl): Delete unused.
11065         (GLOBAL_THING): Likewise.
11066
11067 2002-01-06  Graham Stott  <grahams@redhat.com>
11068
11069         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
11070         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
11071         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
11072         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
11073         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
11074         (C_IS_RESERVED_WORD): Uppercase macro parameter.
11075         (C_RID_YYCODE) Likewise.
11076         (ptrmem_cst): Use rtx.
11077         (LOCAL_BINDING_P): Add whitespace.
11078         (INHERITED_VALUE_BINDING_P): Likewise.
11079         (BINDING_SCOPE): Wrap long line.
11080         (BINDING_HAS_LEVEL_P): Remove parenthesis.
11081         (BINDING_VALUE): Wrap long line.
11082         (BINDING_TYPE): Whitespace.
11083         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
11084         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
11085         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
11086         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
11087         (same_type_p): Uppercase macro parameters.
11088         (same_type_ignoring_top_level_qualifiers_p): Likewise.
11089         (OVL_FUNCTION): Wrap long line.
11090         (OVL_CHAIN): Whitespace.
11091         (OVL_CURRENT): Add parenthesis and whitespace.
11092         (OVL_NEXT): Whitespace.
11093         (OVL_USED): Likewise.
11094         (IDENTIFIER_TYPE_VALUE): Likewise.
11095         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
11096         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
11097         (LANG_ID_FIELD): Whitespace.
11098         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
11099         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
11100         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
11101         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
11102         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
11103         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
11104         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
11105         (IDENTIFIER_VIRTUAL_P): Likewise.
11106         (IDENTIFIER_OPNAME_P): Likewise.
11107         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
11108         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
11109         (C_SET_EXP_ORIGINAL_CODE): Likewise.
11110         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
11111         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
11112         (IS_AGGR_TYPE): Uppercase macro parameter.
11113         (CLASS_TYPE_P): Likewise.
11114         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
11115         (IS_AGGR_TYPE_2): Whitespace.
11116         (TAGGED_TYPE_P): Uppercase macro parameter.
11117         (TYPE_BUILT_IN): Whitespace.
11118         (TYPE_FOR_JAVA): Likewise.
11119         (FUNCTION_ARG_CHAIN): Remove parenthesis.
11120         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
11121         (FUNCTION_FIRST_USER_PARAM): Likewise.
11122         (PROMOTES_TO_AGGR_TYPE): Whitespace.
11123         (DERIVED_FROM_P): Add parenthesis and wrap.
11124         (UNIQUELY_DERIVED_FROM_P): Likewise.
11125         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
11126         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
11127         (CLASSTYPE_USE_TEMPLATE): Whitespace.
11128         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
11129         (TYPE_GETS_DELETE): Add parenthesis.
11130         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
11131         (TYPE_HAS_ASSIGN_REF): Likewise,
11132         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
11133         (TYPE_HAS_INIT_REF): Likewise.
11134         (TYPE_HAS_CONST_INIT_REF): Likewise.
11135         (TYPE_BEING_DEFINED): Likewise.
11136         (TYPE_LANG_SPECIFIC): Likewise.
11137         (CLASSTYPE_RTTI): Likewise.
11138         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
11139         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
11140         (TYPE_OVERLOADS_ARROW): Likewise.
11141         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
11142         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
11143         (CLASSTYPE_METHOD_VEC): Likewise.
11144         (CLASSTYPE_MARKED_N): Likewise.
11145         (CLASSTYPE_MARKED): Likewise.
11146         (CLASSTYPE_MARKED2): Likewise.
11147         (CLASSTYPE_MARKED3): Likewise.
11148         (CLASSTYPE_MARKED4): Likewise.
11149         (CLASSTYPE_MARKED5): Likewise.
11150         (CLASSTYPE_MARKED6): Likewise.
11151         (SET_CLASSTYPE_MARKED): Whitespace.
11152         (CLEAR_CLASSTYPE_MARKED): Likewise.
11153         (SET_CLASSTYPE_MARKED2): Likewise.
11154         (CLEAR_CLASSTYPE_MARKED2): Likewise.
11155         (SET_CLASSTYPE_MARKED3): Likewise.
11156         (CLEAR_CLASSTYPE_MARKED3): Likewise.
11157         (SET_CLASSTYPE_MARKED4): Likewise.
11158         (CLEAR_CLASSTYPE_MARKED4): Likewise.
11159         (SET_CLASSTYPE_MARKED5): Likewise.
11160         (CLEAR_CLASSTYPE_MARKED5): Likewise.
11161         (SET_CLASSTYPE_MARKED6): Likewise.
11162         (CLEAR_CLASSTYPE_MARKED6): Likewise.
11163         (CLASSTYPE_TAGS): Likewise.
11164         (CLASSTYPE_VSIZE): Likewise.
11165         (CLASSTYPE_VBASECLASSES): Likewise.
11166         (CANONICAL_BINFO): Add parenthesis.
11167         (CLASSTYPE_SIZE(NODE): Likewise.
11168         (CLASSTYPE_SIZE_UNIT): Likewise.
11169         (CLASSTYPE_ALIGN(NODE): Likewise.
11170         (CLASSTYPE_USER_ALIGN): Likewise.
11171         (TYPE_JAVA_INTERFACE): Likewise.
11172         (CLASSTYPE_PURE_VIRTUALS): Likewise.
11173         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
11174         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
11175         (CLASSTYPE_HAS_MUTABLE): Likewise.
11176         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
11177         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
11178         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
11179         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
11180         (CLASSTYPE_INTERFACE_ONLY): Likewise.
11181         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
11182         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
11183         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
11184         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
11185         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
11186         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
11187         (BINFO_UNSHARED_MARKED): Whitespace.
11188         (BINFO_MARKED): Whitespace and wrap.
11189         (SET_BINFO_MARKED): Likewise.
11190         (CLEAR_BINFO_MARKED): Likewise.
11191         (BINFO_VTABLE_PATH_MARKED): Likewise.
11192         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
11193         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
11194         (BINFO_SUBVTT_INDEX): Remove parenthesis.
11195         (BINFO_VPTR_INDEX): Likewise.
11196         (BINFO_PRIMARY_BASE_OF): Likewise,
11197         (CLASSTYPE_VFIELDS): Whitespace.
11198         (VF_DERIVED_VALUE): Wrap long line.
11199         (NAMESPACE_LEVEL): Whitespace.
11200         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
11201         (DEFARG_POINTER): Whitespace.
11202         (DECL_NEEDED_P): Remove parenthesis.
11203         (DECL_LANGUAGE): Whitespace.
11204         (SET_DECL_LANGUAGE): Add parenthesis.
11205         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
11206         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
11207         (DECL_IN_AGGR_P): Whitespace.
11208         (DECL_FRIEND_P): Likewise.
11209         (DECL_BEFRIENDING_CLASSES): Likewise.
11210         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
11211         (DECL_NONCONVERTING_P): Whitespace.
11212         (DECL_PURE_VIRTUAL_P): Likewise.
11213         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
11214         (DECL_PENDING_INLINE_INFO): Whitespace.
11215         (DECL_SORTED_FIELDS): Likewise.
11216         (DECL_DEFERRED_FN): Likewise.
11217         (DECL_TEMPLATE_INFO): Likewise.
11218         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
11219         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
11220         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
11221         (TMPL_ARGS_LEVEL): Likewise.
11222         (SET_TMPL_ARGS_LEVEL): Likewise.
11223         (INNERMOST_TEMPLATE_PARMS): Whitespace.
11224         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
11225         (INTEGRAL_CODE_P(CODE): Add parenthesis.
11226         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
11227         (TYPE_HAS_CONSTRUCTOR): Whitespace.
11228         (TREE_HAS_CONSTRUCTOR): Likewise.
11229         (TYPE_HAS_DESTRUCTOR): Likewise.
11230         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
11231         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
11232         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
11233         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
11234         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
11235         (TYPE_PTRMEMFUNC_P): Likewise.
11236         (TYPE_PTRMEMFUNC_FLAG): Likewise.
11237         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
11238         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
11239         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
11240         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
11241         (DECL_ACCESS): Whitespace.
11242         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
11243         (DECL_GLOBAL_DTOR_P): Likewise.
11244         (GLOBAL_INIT_PRIORITY): Likewise.
11245         (DECL_TEMPLATE_PARMS): Likewise.
11246         (DECL_TEMPLATE_RESULT): Likewise.
11247         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
11248         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
11249         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
11250         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
11251         (PRIMARY_TEMPLATE_P): Add parenthesis.
11252         (DECL_USE_TEMPLATE): Whitespace.
11253         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
11254         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
11255         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
11256         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
11257         (CALL_DECLARATOR_PARMS): Remove parenthesis.
11258         (CALL_DECLARATOR_QUALS): Likewise.
11259         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
11260         (TEMP_NAME_P): Wrap.
11261         (VFIELD_NAME_P): Likewise.
11262         (B_SET): Uppercase macro parameters and add parenthesis.
11263         (B_CLR): Likewise.
11264         (B_TST): Likewise.
11265         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
11266         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
11267         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
11268         (same_or_base_type_p): Likewise.
11269         (cp_deprecated): Likewise.
11270
11271 2002-01-05  Richard Henderson  <rth@redhat.com>
11272
11273         * semantics.c (expand_body): Revert last change.
11274
11275 2002-01-04  Jason Merrill  <jason@redhat.com>
11276
11277         PR c++/4122
11278         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
11279         lost primary.
11280
11281         * class.c (build_vtbl_initializer): Check for a lost primary
11282         before calculating the vtable entry to throw away.
11283
11284 2002-01-02  Jason Merrill  <jason@redhat.com>
11285
11286         * semantics.c (expand_body): Call outlining_inline_function when
11287         emitting an inline function out of line.
11288
11289 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
11290
11291         PR c++/5116, c++/764 reversion
11292         * call.c (build_new_op): Revert the instantiations. They are
11293         incorrect.
11294
11295 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
11296
11297         PR c++/5089
11298         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
11299
11300 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
11301
11302         PR c++/3716
11303         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
11304         (tsubst, case POINTER_TYPE): Handle pmfs here.
11305         (tsubst, case OFFSET_TYPE): Check it is not an offset to
11306         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
11307
11308 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
11309
11310         PR c++/35
11311         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
11312         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
11313         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
11314         PARM_DECL.
11315         (tsubst_template_parms): Break up loop statements.
11316         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
11317         parm PARM_DECLs don't get promoted.
11318
11319 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
11320
11321         PR c++/5123
11322         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
11323         (build_x_function_call): Cope with a COMPONENT_REF containing a
11324         TEMPLATE_ID_EXPR.
11325
11326 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
11327
11328         PR c++/5213
11329         * pt.c (convert_template_argument): Be more careful determining
11330         when RECORD_TYPE templates are or are not templates.
11331
11332 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
11333
11334         PR c++/775
11335         * cp-tree.h (handle_class_head): Adjust prototype.
11336         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
11337         parameters. Use for all class heads.
11338         * parse.y (named_class_head_sans_basetype, named_class_head,
11339         named_complex_class_head_sans_basetype,
11340         named_class_head_sans_basetype_defn,
11341         unnamed_class_head): Remove.
11342         (class_head, class_head_apparent_template): Recognize class heads
11343         (class_head_decl, class_head_defn): New reductions. Process class
11344         heads.
11345         (structsp): Adjust class definition and class declaration
11346         reductions.
11347         (maybe_base_class_list): Give diagnostic on empty list.
11348
11349 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
11350
11351         PR c++/4379
11352         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
11353         single non-static member.
11354         (unary_complex_lvalue): If it cannot be a pointer to member, don't
11355         make it so. Check it is not pointer to reference.
11356
11357 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
11358
11359         PR c++/5132
11360         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
11361         are processing a template decl.
11362
11363 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
11364
11365         PR c++/5116, c++/764
11366         * call.c (build_new_op): Make sure template class operands are
11367         instantiated. Simplify arglist construction.
11368
11369 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
11370
11371         * call.c (build_user_type_conversion_1): Use my_friendly_assert
11372         rather than if ... abort.
11373         * cvt.c (convert_to_reference): Likewise.
11374         * semantics.c (setup_vtbl_ptr): Likewise.
11375         * pt.c (lookup_template_class): Comment typo.
11376
11377 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
11378
11379         PR c++/5125
11380         * pt.c (push_template_decl_real): Make sure DECL has
11381         DECL_LANG_SPECIFIC.
11382
11383 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
11384
11385         PR c++/335
11386         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
11387         for non-reference fields.
11388         * typeck.c (require_complete_type): Use resolve_offset_ref).
11389
11390 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
11391
11392         PR c++/196
11393         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
11394
11395 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
11396
11397         PR c++/160
11398         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
11399         up. Don't stabilize_references when initializing a reference.
11400
11401 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11402
11403         * decl2.c (lang_f_options): Const-ify.
11404
11405 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
11406
11407         * config-lang.in (diff_excludes): Remove.
11408
11409 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
11410
11411         PR c++/90
11412         * typeck.c (build_function_call_real): Use original function
11413         expression for errors.
11414
11415 2001-12-18  Jason Merrill  <jason@redhat.com>
11416
11417         PR c++/3242
11418         * class.c (add_method): Do compare 'this' quals when trying to match a
11419         used function.  Don't defer to another used function.
11420
11421 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
11422
11423         * pt.c (instantiate_clone): Remove, fold into ...
11424         (instantiate_template): ... here. Simplify by removing mutual
11425         recursion.
11426         * typeck2.c (build_m_component_ref): Don't cv qualify the function
11427         pointed to by a pointer to function.
11428         * class.c (delete_duplicate_fields_1): Typo.
11429
11430 2001-12-18  Jason Merrill  <jason@redhat.com>
11431
11432         C++ ABI change: destroy value arguments in caller.
11433         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
11434         create an extra binding level for the parameters.
11435         * decl.c (store_parm_decls): Don't do parameter cleanups.
11436
11437 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
11438
11439         * call.c (build_new_method_call): Use '%#V'.
11440         * error.c (cv_to_string): Use V parameter to determine padding.
11441
11442 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
11443
11444         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
11445         spellings in messages.
11446
11447 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
11448
11449         * cp-tree.h: Delete #defines for cp_error, cp_warning,
11450         cp_pedwarn, and cp_compiler_error.
11451         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
11452         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
11453         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
11454         typeck2.c: Change calls to the above macros to use their
11455         language-independent equivalents: error, warning, pedwarn, and
11456         internal_error respectively.
11457
11458 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
11459
11460         * decl2.c (finish_file): Remove back_end_hook.
11461
11462 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
11463
11464         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
11465         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
11466         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
11467
11468 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
11469
11470         * lang-options.h: Use American spelling in messages.
11471
11472 2001-12-13  Jason Merrill  <jason@redhat.com>
11473
11474         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
11475
11476         Use cleanups to run base and member destructors.
11477         * init.c (push_base_cleanups): New function, split out from...
11478         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
11479         * decl.c (finish_destructor_body): Move vbase destruction code to
11480         push_base_cleanups.
11481         (begin_function_body, finish_function_body): New fns.
11482         (finish_function): Move [cd]tor handling and call_poplevel to
11483         finish_function_body.
11484         (pushdecl): Skip the new level.
11485         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
11486         (setup_vtbl_ptr): Call push_base_cleanups.
11487         * method.c (synthesize_method): Call {begin,end}_function_body.
11488         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
11489         * cp-tree.h: Declare new fns.
11490         * parse.y (function_body, .begin_function_body): New nonterminals.
11491         (fndef, pending_inline, function_try_block): Use function_body.
11492         (ctor_initializer_opt, function_try_block): No longer has a value.
11493         (base_init): Remove .set_base_init token.
11494         (.set_base_init, compstmt_or_error): Remove.
11495         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
11496
11497         * optimize.c (maybe_clone_body): Fix parameter updating.
11498
11499 2001-12-12  Jason Merrill  <jason@redhat.com>
11500
11501         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
11502         * semantics.c (genrtl_start_function): Don't pass
11503         parms_have_cleanups or push an extra binding level.
11504         (genrtl_finish_function): Lose cleanup_label cruft.
11505
11506         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
11507         (ctor_label): Remove.
11508         * semantics.c (finish_return_stmt): Lose ctor_label support.
11509         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
11510         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
11511         dtor_label.
11512
11513         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
11514         check for [cd]tors.
11515         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
11516
11517         * decl.c (finish_function): Check VMS_TARGET, not VMS.
11518
11519         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
11520         (end_cleanup_fn): And poplevel.
11521
11522         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
11523         if we're in a template.
11524
11525 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
11526
11527         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
11528         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
11529         THIS_NAME_P): Delete.
11530         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
11531         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
11532         with internal naming scheme.
11533         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
11534
11535 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
11536
11537         * decl.c (grokdeclarator): Deprecated implicit typename use.
11538
11539 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
11540
11541         PR g++/51
11542         * parse.y (frob_specs): Indicate it is a language linkage which
11543         contained the extern.
11544         * decl.c (grokdeclarator): Allow extern language linkage with
11545         other specifiers.
11546
11547 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
11548
11549         PR g++/72
11550         * decl.c (add_binding): Don't reject duplicate typedefs involving
11551         template parameters.
11552
11553 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
11554
11555         * parse.y, semantics.c: Similarly.
11556
11557 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
11558
11559         PR g++/87
11560         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
11561         (copy_args_p): Rename to ...
11562         (copy_fn_p): ... here.
11563         (grok_special_member_properties): New function.
11564         (grok_op_properties): Lose VIRTUALP parameter.
11565         (copy_assignment_arg_p): Remove.
11566         * call.c (build_over_call): Use copy_fn_p.
11567         * decl.c (grokfndecl): Reformat. Adjust call to
11568         grok_op_properties.
11569         (copy_args_p): Rename to ...
11570         (copy_fn_p): ... here. Reject template functions. Check for pass
11571         by value.
11572         (grok_special_member_properties): Remember special functions.
11573         (grok_ctor_properties): Don't remember them here, just check.
11574         (grok_op_properties): Likewise.
11575         (start_method): Call grok_special_member_properties.
11576         * decl2.c (grokfield): Likewise.
11577         (copy_assignment_arg_p): Remove.
11578         (grok_function_init): Don't remember abstract assignment here.
11579         * pt.c (instantiate_class_template): Call
11580         grok_special_member_properties.
11581         (tsubst_decl): Adjust grok_op_properties call.
11582
11583 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
11584
11585         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
11586         RID_TYPES_COMPATIBLE_P.
11587
11588 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
11589
11590         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
11591         call to build_aggr_init.
11592         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
11593
11594 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
11595
11596         * parse.y: Replace uses of the string non-terminal with STRING.
11597         Don't perform string concatentaion here.
11598         (string): Remove non-terminal.
11599         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
11600
11601 2001-12-05  Jason Merrill  <jason@redhat.com>
11602
11603         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
11604         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
11605         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
11606         * pt.c (push_tinst_level): No longer static.
11607         * cp-tree.h: Declare them.
11608
11609         * init.c (resolve_offset_ref): Don't check access for the base
11610         conversion to access a FIELD_DECL.
11611
11612         * cp-tree.h (TYPE_REFFN_P): New macro.
11613         * decl.c (bad_specifiers): Check it, too.
11614
11615         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
11616         on the __*_type_info type if we haven't seen a definition.
11617
11618 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
11619
11620         * decl.c: Include c-common.h.
11621         (shadow_warning): Move to c-common.c.
11622
11623 2001-12-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11624
11625         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
11626
11627 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
11628
11629         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
11630
11631 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
11632
11633         PR g++/164
11634         * init.c (sort_base_init): Allow binfos to be directly specified.
11635         * method.c (do_build_copy_constructor): Explicitly convert to the
11636         base instance.
11637         (do_build_assign_ref): Likewise.
11638
11639 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
11640
11641         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
11642         declaration and initialization.
11643
11644 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
11645
11646         * typeck2.c: Remove leading capital from diagnostic messages, as
11647         per GNU coding standards.
11648
11649 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
11650
11651         PR c++/3394
11652         * decl.c (xref_basetypes): Handle attributes between
11653         'class' and name.
11654
11655 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
11656
11657         PR g++/3381
11658         * parse.y (named_complex_class_head_sans_basetype): Add new
11659         reduction.
11660         * Make-lang.in (parse.c): Adjust expected conflict count.
11661
11662 2001-12-03  Jason Merrill  <jason@redhat.com>
11663
11664         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
11665         immediate binfos for our virtual bases.
11666
11667 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
11668
11669         * call.c (build_java_interface_fn_ref): Similarly.
11670         * except.c (is_admissible_throw_operand): Similarly.
11671         * init.c (build_java_class_ref): Similarly.
11672         * xref.c (open_xref_file): Similarly.
11673
11674 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
11675
11676         * class.c (finish_struct): Remove trailing periods from messages.
11677         * decl.c (check_tag_decl): Similarly.
11678         * lex.c (cxx_set_yydebug): Similarly.
11679         * typeck2.c (friendly_abort): Similarly.
11680
11681 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
11682
11683         PR c++/3048
11684         * cp-tree.h (ovl_member): Remove.
11685         * decl2.c (merge_functions): Handle extern "C" functions
11686         specially.
11687         * tree.c (ovl_member): Remove.
11688
11689 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
11690
11691         PR c++/4842
11692         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
11693         FUNCTION_DECL, as input.
11694         (mark_overriders): Remove.
11695         (warn_hidden): Rework for the new ABI.
11696
11697 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
11698
11699         PR c++/3471
11700         * call.c (convert_like_real): Do not build additional temporaries
11701         for rvalues of class type.
11702
11703 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
11704
11705         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
11706         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
11707         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
11708         (DERIVED_FROM_P): Likewise.
11709         (enum base_access): Renumber, add ba_quiet bit mask.
11710         (get_binfo): Remove.
11711         (get_base_distance): Remove.
11712         (binfo_value): Remove.
11713         (ACCESSIBLY_DERIVED_FROM_P): Remove.
11714         * call.c (standard_conversion): Use lookup_base.
11715         * class.c (strictly_overrides): Likewise.
11716         (layout_virtual_bases): Likewise.
11717         (warn_about_ambiguous_direct_bases): Likewise.
11718         (is_base_of_enclosing_class): Likewise.
11719         (add_vcall_offset_vtbl_entries_1): Likewise.
11720         * cvt.c (build_up_reference): Adjust comment.
11721         * init.c (build_member_call): Reformat.
11722         * search.c (get_binfo): Remove.
11723         (get_base_distance_recursive): Remove.
11724         (get_base_distance): Remove.
11725         (lookup_base_r): Tweak.
11726         (lookup_base): Add ba_quiet control. Complete the types here.
11727         (covariant_return_p): Use lookup_base.
11728         * tree.c (binfo_value): Remove.
11729         (maybe_dummy_object): Use lookup_base.
11730         * typeck.c (build_static_cast): Use lookup_base.
11731         (get_delta_difference): Likewise.
11732         * typeck2.c (binfo_or_else): Use lookup_base.
11733         (build_scoped_ref): Add back error_mark_check.
11734         (build_m_component_ref): Use lookup_base.
11735
11736 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
11737
11738         * Make-lang.in (c++.generated-manpages): New dummy target.
11739
11740 2001-11-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11741
11742         * Make-lang.in (cp-lang.o): Depends on c-common.h.
11743         * cp-lang.c (c-common.h): Include.
11744         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
11745         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
11746         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
11747
11748 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
11749
11750         * decl2.c (c_language): Move to c-common.c.
11751         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
11752         functions.
11753         (cxx_init): Update.
11754
11755 2001-11-26  Jason Merrill  <jason@redhat.com>
11756
11757         * call.c (joust): Remove COND_EXPR hack.
11758
11759 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
11760
11761         * search.c (lookup_base_r): Declare bk in variable declaration
11762         space.
11763
11764 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
11765
11766         PR g++/3145
11767         * class.c (build_vbase_pointer): Remove.
11768         (build_vbase_path): Remove.
11769         (build_base_path): New function.
11770         * cp-tree.h (base_access, base_kind): New enumerations.
11771         (build_base_path): Declare.
11772         (convert_pointer_to_real): Remove.
11773         (convert_pointer_to): Remove.
11774         (lookup_base): Declare.
11775         (convert_pointer_to_vbase): Remove.
11776         * call.c (build_scoped_method_call): Use lookup_base &
11777         build_base_path instead of convert_pointer_to_real,
11778         get_base_distance & get_binfo.
11779         (build_over_call): Likewise.
11780         * cvt.c (cp_convert_to_pointer): Likewise.
11781         (convert_to_pointer_force): Likewise.
11782         (build_up_reference): Likewise.
11783         (convert_pointer_to_real): Remove.
11784         (convert_pointer_to): Remove.
11785         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
11786         instead of convert_pointer_to_vbase & build_vbase_path.
11787         (emit_base_init): Use build_base_path instead of
11788         convert_pointer_to_real.
11789         (expand_virtual_init): Lose unrequired conversions.
11790         (resolve_offset_ref): Use lookup_base and build_base_path
11791         instead of convert_pointer_to.
11792         * rtti.c (build_dynamic_cast_1): Use lookup_base &
11793         build_base_path instead of get_base_distance & build_vbase_path.
11794         * search.c (get_vbase_1): Remove.
11795         (get_vbase): Remove.
11796         (convert_pointer_to_vbase): Remove.
11797         (lookup_base_r): New function.
11798         (lookup_base): New function.
11799         * typeck.c (require_complete_type): Use lookup_base &
11800         build_base_path instead of convert_pointer_to.
11801         (build_component_ref): Likewise.
11802         (build_x_function_call): Likewise.
11803         (get_member_function_from_ptrfunc): Likewise.
11804         (build_component_addr): Likewise.
11805         * typeck2.c (build_scoped_ref): Likewise.
11806
11807 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
11808
11809         * cp-tree.h (CP_TYPE_QUALS): Removed.
11810         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
11811         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
11812         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
11813         * dump.c (cp_dump_tree): Use void* dump_info argument to match
11814         lang-hooks prototype.
11815         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
11816         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
11817         CP_TYPE_QUALS changed to cp_type_quals.
11818         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
11819         (CXX_C_OBJS): Remove c-dump.o.
11820
11821 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
11822
11823         PR c++/3637
11824         * pt.c (lookup_template_class): Ensure that all specializations
11825         are registered on the list corresponding to the most general
11826         template.
11827
11828 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
11829
11830         * call.c (non_reference): Add documentation.
11831         (convert_class_to_reference): Do not strip reference types
11832         from conversion operators.
11833         (maybe_handle_ref_bind): Simplify.
11834         (compare_ics): Correct handling of references.
11835
11836 2001-11-19  John Wilkinson <johnw@research.att.com>
11837
11838         * dump.c (dump_op): New function.
11839         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
11840         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
11841         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
11842
11843 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
11844
11845         PR4629
11846         * semantics.c (finish_sizeof): Make sure that expression created
11847         while processing a template do not have a type.
11848         (finish_alignof): Likewise.
11849         * typeck.c (c_sizeof): Likewise.
11850         (expr_sizeof): Likewise.
11851
11852 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
11853
11854         * lex.c (cxx_finish): Call c_common_finish.
11855         (finish_parse): Remove.
11856
11857 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11858
11859         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
11860         when displaying error message about missing array bounds.
11861
11862 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11863
11864         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
11865         CONST_CAST_EXPR.
11866         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
11867
11868 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
11869
11870         * cp-tree.h (print_class_statistics): Restore.
11871
11872 2001-11-15  Jason Merrill  <jason@redhat.com>
11873
11874         * method.c (use_thunk): Don't emit debugging information for thunks.
11875
11876         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
11877         * decl.c (make_typename_type): Handle getting a class template.
11878         * search.c (lookup_field_r): A class template is good enough for
11879         want_type.
11880
11881         * call.c (convert_like_real): Only use cp_convert for the bad part.
11882         (standard_conversion): Also allow bad int->enum.
11883         * typeck.c (ptr_reasonably_similar): Also allow functions to
11884         interconvert.  Pointers to same-size integers are reasonably
11885         similar.
11886
11887         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
11888         give it void type.
11889
11890 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
11891
11892         PR g++/3154
11893         * init.c (sort_base_init): Remove unreachable code.
11894         (expand_member_init): Adjust comment to reflect reality. Simplify
11895         and remove unreachable code.
11896
11897 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
11898
11899         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
11900         (cxx_init): Update prototype.
11901         * decl.c (init_decl_processing): Rename.  Move null node init
11902         to its creation time.
11903         * lex.c (cxx_init_options): Update.
11904         (cxx_init): Combine with old init_parse; also call
11905         cxx_init_decl_processing.
11906
11907 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
11908
11909         * decl.c (check_initializer): Try to complete the type of an
11910         array element before checking whether it's complete.  Don't
11911         complain about arrays with complete element types but an
11912         unknown size.
11913         (cp_finish_decl): Build the hierarchical constructor before
11914         calling maybe_deduce_size_from_array_init.
11915
11916 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
11917
11918         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
11919
11920 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
11921
11922         PR g++/4206
11923         * parse.y (already_scoped_stmt): Remove.
11924         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
11925
11926 2001-11-12  H.J. Lu <hjl@gnu.org>
11927
11928         * cvt.c (ocp_convert): Don't warn the address of a weak
11929         function is always `true'.
11930
11931 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
11932
11933         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
11934         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
11935         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
11936         * cp-tree.h (print_class_statistics): Remove.
11937         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
11938         cxx_print_identifier, cxx_set_yydebug): New.
11939         * lex.c (set_yydebug): Rename c_set_yydebug.
11940         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
11941         lang_print_xnode): Rename.
11942         * tree.c (print_lang_statistics): Rename.
11943
11944 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11945
11946         * class.c (dump_array): Fix format specifier warning.
11947
11948 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
11949
11950         * cp-lang.c (LANG_HOOKS_NAME): Override.
11951         (struct lang_hooks): Constify.
11952         * lex.c (cxx_init_options): Update.
11953         (lang_identify): Remove.
11954         * parse.y (language_string): Remove.
11955
11956 2001-11-08  Andreas Franck  <afranck@gmx.de>
11957
11958         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
11959         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
11960         suggested by autoconf.
11961         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
11962         (c++.install-common): Use the transformed target alias names.
11963
11964 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
11965
11966         * Make-lang.in: Update.
11967         * cp-lang.c: Include langhooks-def.h.
11968
11969 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11970
11971         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
11972
11973 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11974
11975         * lex.c (copy_lang_type): Add static prototype.
11976
11977 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11978
11979         * pt.c (unify): Handle SCOPE_REF.
11980
11981 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
11982
11983         * tree.c (cp_copy_res_decl_for_inlining): Adjust
11984         DECL_ABSTRACT_ORIGIN for the return variable.
11985
11986 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
11987
11988         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
11989
11990 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
11991
11992         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
11993         semantics.c, spew.c: Fix spelling errors.
11994
11995 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11996
11997         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
11998
11999 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
12000
12001         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
12002         pop_everything.
12003
12004 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12005
12006         * cp-lang.c (cxx_get_alias_set): New function.
12007         Point LANG_HOOKS_GET_ALIAS_SET to it.
12008
12009 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12010
12011         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
12012         * cp-tree.h (make_unbound_class_template): Prototype new function.
12013         * decl.c (make_unbound_class_template): New function.
12014         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
12015         * error.c (dump_type): Likewise.
12016         * mangle.c (write_type): Likewise.
12017         * parse.y (template_parm): Likewise.
12018         (template_argument): Use make_unbound_class_template.
12019         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
12020         (tsubst): Likewise.
12021         (tsubst_copy): Likewise.
12022         (unify): Likewise.
12023         * tree.c (walk_tree): Likewise.
12024         * typeck.c (comptypes): Likewise.
12025
12026 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12027
12028         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
12029         extra calls into fewer ones.
12030
12031 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
12032
12033         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
12034         Warn when merging inline with attribute noinline.
12035         (start_decl, start_function): Warn if inline and attribute
12036         noinline appear in the same declaration.
12037
12038 2001-10-16  H.J. Lu <hjl@gnu.org>
12039
12040         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
12041         for tree checking disabled.
12042
12043 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
12044
12045         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
12046         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
12047
12048 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
12049
12050         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
12051         (unify): Only handle MINUS_EXPR specially if the above flag is set
12052         and the subtracted constant is 1.  Clear the flag on recursive calls.
12053         Set it when unifying the maximum value in an INTEGER_TYPE's range.
12054
12055 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
12056
12057         * decl.c (bad_specifiers): Don't allow exception specifications
12058         on any typedefs.
12059
12060 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
12061
12062         * cp/lex.c (init_cp_pragma): Similarly.
12063
12064 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12065
12066         * pt.c (lookup_template_class): Build complete template arguments
12067         for BOUND_TEMPLATE_TEMPLATE_PARM.
12068
12069 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12070
12071         * cp-tree.h (TYPE_BINFO): Update comment.
12072         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
12073         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
12074         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
12075         (copy_type): Prototype new function.
12076         * lex.c (copy_lang_decl): Gather tree node statistics.
12077         (copy_lang_type): New function.
12078         (copy_type): Likewise.
12079         (cp_make_lang_type): Create lang_type for
12080         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
12081         and BOUND_TEMPLATE_TEMPLATE_PARM.
12082         * pt.c (tsubst): Use copy_type instead of copy_node.
12083         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
12084
12085 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12086
12087         * pt.c (determine_specialization): Ignore functions without
12088         DECL_TEMPLATE_INFO.
12089
12090 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
12091
12092         PR g++/4476
12093         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
12094
12095 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
12096
12097         * typeck2.c (store_init_value): Don't re-digest a bracketed
12098         initializer.
12099
12100         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
12101         ANON_AGGR_TYPE_P.
12102
12103 2001-10-11  Richard Henderson  <rth@redhat.com>
12104
12105         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
12106         of an asm statement.
12107         (build_vtbl_ref_1): Split out from build_vtbl_ref.
12108         (build_vfn_ref): Use it to handle vtable descriptors before
12109         calling build_vtable_entry_ref.
12110         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
12111
12112 2001-10-10  Richard Henderson  <rth@redhat.com>
12113
12114         * parse.y (asm_operand): Allow named operands.
12115         * semantics.c (finish_asm_stmt): Tweek for changed location
12116         of the operand constraint.
12117
12118 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
12119
12120         * call.c (standard_conversion): Add bad conversion between
12121         integers and pointers.
12122         (convert_like_real): Don't use convert_for_initialization for bad
12123         conversions; complain here and use cp_convert.
12124         (build_over_call): Don't handle bad conversions specially.
12125         (perform_implicit_conversion): Allow bad conversions.
12126         (can_convert_arg_bad): New fn.
12127         * cp-tree.h: Declare it.
12128         * typeck.c (convert_for_assignment): Use it.
12129         (ptr_reasonably_similar): Any target type is similar to void.
12130
12131 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
12132
12133         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
12134         (cp/cp-lang.o): New rule.
12135         * cp-tree.h: Declare hooks.
12136         * tree.c: Make hooks non-static.
12137         (init_tree): Don't initialize hooks here.
12138         * lex.c: Likewise.  Move definition of lang_hooks to...
12139         * cp-lang.c: ... new file.
12140
12141 2001-10-08  Richard Henderson  <rth@redhat.com>
12142
12143         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
12144         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
12145
12146 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12147
12148         * class.c (build_vtable_entry_ref): Const-ify.
12149         * decl.c (predefined_identifier,
12150         initialize_predefined_identifiers): Likewise.
12151         * init.c (build_new_1): Likewise.
12152         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
12153         Likewise.
12154
12155 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
12156
12157         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
12158         (INSNS_PER_STMT): Likewise.
12159         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
12160         (copy_body, initialize_inlined_parameters): Likewise.
12161         (declare_return_variable, inlinable_function_p): Likewise.
12162         (expand_call_inline, expand_calls_inline): Likewise.
12163         (optimize_inline_calls, clone_body): Likewise.
12164         * tree.c (walk_tree): Moved to ../tree-inline.c.
12165         (walk_tree_without_duplicates): Likewise.
12166         (copy_tree_r, remap_save_expr): Likewise.
12167
12168 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
12169
12170         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
12171         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
12172         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
12173         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
12174         (flag_inline_trees): Moved declaration to ../tree-inline.h.
12175         (walk_tree): Moved declaration to ../tree-inline.h.
12176         (walk_tree_without_duplicates, copy_tree_r): Likewise.
12177         (remap_save_expr): Likewise.
12178         * decl.c: Include tree-inline.h.
12179         (lang_mark_tree): Don't mark inlined_fns.
12180         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
12181         * optimize.c: Include tree-inline.h.
12182         (optimize_inline_calls): Move declaration to ../tree.h, as
12183         non-static.
12184         (remap_decl): Use language-independent constructs and hooks.
12185         (remap_block, copy_body_r, declare_return_variable): Likewise.
12186         (inlinable_function_p): Likewise.  Don't test for
12187         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
12188         no longer language-specific.
12189         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
12190         call of dump_function to...
12191         (optimize_function): Here...
12192         (clone_body): New function, extracted from...
12193         (maybe_clone_body): ... here.  Build decl_map locally and pass
12194         it on to clone_body.
12195         * pt.c, semantics.c: Include tree-inline.h.
12196         * tree.c: Likewise.
12197         (cp_walk_subtrees): New language-specific hook for tree inlining.
12198         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
12199         cp_is_overload_p, cp_auto_var_in_fn_p,
12200         cp_copy_res_decl_for_inlining): Likewise.
12201         (walk_tree): Move language-specific constructs into...
12202         (cp_walk_subtrees): this new function.
12203         (copy_tree_r): Use language-independent constructs and hooks.
12204         (init_tree): Initialize tree inlining hooks.
12205         (remap_save_expr): Adjust prototype so that the declaration
12206         does not require the definition of splay_tree.
12207
12208 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
12209
12210         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
12211         to build the declaration instead of the declaration itself.
12212
12213 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
12214
12215         * decl2.c (cxx_decode_option): Add 'else'.
12216
12217         * spew.c (end_input): No longer static.
12218         * cp-tree.h: Declare it.
12219         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
12220
12221 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
12222
12223         * call.c (build_over_call), typeck.c (build_function_call_real):
12224         Pass type attributes to check_function_format rather than name or
12225         assembler name.  Don't require there to be a name or assembler
12226         name to check formats.
12227
12228 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
12229
12230         * decl.c (init_decl_processing): Don't call
12231         init_function_format_info.  Initialize lang_attribute_table
12232         earlier.
12233         (builtin_function): Call decl_attributes.
12234         (insert_default_attributes): New.
12235
12236 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
12237
12238         * decl.c (grokdeclarator): Copy array typedef handling from C
12239         frontend.
12240
12241         * decl.c (grokdeclarator): Copy too-large array handling from C
12242         frontend.
12243
12244 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
12245
12246         * config-lang.in (target_libs): Added target-gperf, so that we
12247         don't try to build it if C++ is disabled.
12248
12249 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
12250
12251         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
12252         (cp/errfn.o): Delete rule.
12253         (cp/error.o): Depend on flags.h.
12254         * errfn.c: Delete file.
12255         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
12256         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
12257         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
12258         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
12259         internal_error respectively.  Make cp_deprecated into a macro.
12260         Don't define cp_printer typedef or declare cp_printers.
12261         * error.c: Include flags.h.
12262         Delete: struct tree_formatting_info, print_function_argument_list,
12263         print_declaration, print_expression, print_function_declaration,
12264         print_function_parameter, print_type_id, print_cv_qualifier_seq,
12265         print_type_specifier_seq, print_simple_type_specifier,
12266         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
12267         print_parameter_declaration_clause, print_exception_specification,
12268         print_nested_name_specifier, and definition of cp_printers.
12269         (locate_error): New function.
12270         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
12271         rewritten in terms of locate_error and diagnostic.c.
12272         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
12273         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
12274         (init_error): Adjust to match.
12275
12276 2001-09-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12277
12278         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
12279
12280 2001-09-21  Richard Henderson  <rth@redhat.com>
12281
12282         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
12283         (build_vtbl_initializer): Likewise.
12284         (build_vfn_ref): New.
12285         * cp-tree.h: Declare it.
12286         * call.c (build_over_call): Use it.
12287         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
12288         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
12289
12290 2001-09-21  J"orn Rennecke <amylaar@redhat.com>
12291
12292         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
12293
12294 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
12295
12296         Table-driven attributes.
12297         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
12298         * decl2.c (cplus_decl_attributes): Only take one attributes
12299         parameter.
12300         * cp-tree.c (cplus_decl_attributes): Update prototype.
12301         * class.c (finish_struct), decl.c (start_decl, start_function),
12302         decl2.c (grokfield), friend.c (do_friend), parse.y
12303         (parse_bitfield): Update calls to cplus_decl_attributes.
12304         * decl.c (grokdeclarator): Take a pointer to a single ordinary
12305         attribute list.
12306         * decl.h (grokdeclarator): Update prototype.
12307         * decl2.c (grokfield): Take a single ordinary attribute list.
12308         * friend.c (do_friend): Likewise.
12309         * decl.c (shadow_tag, groktypename, start_decl,
12310         start_handler_parms, grokdeclarator, grokparms, start_function,
12311         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
12312         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
12313         (process_template_parm, do_decl_instantiation): Pass single
12314         ordinary attribute lists around.
12315         * decl.c (grokdeclarator): Correct handling of nested attributes.
12316         Revert the patch
12317         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
12318                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
12319                 not the left.
12320         .
12321         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
12322         (cp_attribute_table): Declare.
12323         * decl.c (valid_lang_attribute): Don't define.
12324         (lang_attribute_table): Define.
12325         (init_decl_processing): Initialize lang_attribute_table instead of
12326         valid_lang_attribute.
12327         * tree.c (cp_valid_lang_attribute): Remove.
12328         (handle_java_interface_attribute, handle_com_interface_attribute,
12329         handle_init_priority_attribute): New functions.
12330         (cp_attribute_table): New array.
12331         * decl2.c (import_export_class): Don't use
12332         targetm.valid_type_attribute.
12333
12334 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
12335
12336         * Make-lang.in (cp/error.o): Depend on real.h
12337         * error.c: #include "real.h"
12338
12339 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12340
12341         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
12342         xmalloc/strcpy/strcat.
12343
12344 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12345
12346         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
12347         Const-ification.
12348         * pt.c (tsubst_decl): Likewise.
12349
12350 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12351
12352         * decl2.c (lang_f_options): Const-ification.
12353         * lex.c (cplus_tree_code_name): Likewise.
12354         * spew.c (yyerror): Likewise.
12355
12356 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
12357
12358         PR c++/3986
12359         * class.c (force_canonical_binfo_r): Check & move an indirect
12360         primary base first.
12361         (force_canonical_binfo): Check that it's not already
12362         canonical.
12363         (mark_primary_virtual_base): Remove BINFO parameter.
12364         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
12365
12366 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
12367
12368         Remove TYPE_NONCOPIED_PARTS.
12369         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
12370         CLASSTYPE_PURE_VIRTUALS.
12371         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
12372         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
12373         (layout_class_type): Don't call fixup_inline_methods here ...
12374         (finish_struct_1): ... call it here.
12375
12376 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
12377
12378         * decl.c (duplicate_decls): Remove code deadling with
12379         DECL_SAVED_INSNS.
12380         * decl2.c (finish_file): Likewise.
12381         * pt.c (instantiate_decl): Likewise.
12382         * semantics.c (expand_body): Don't defer local functions if
12383         they wouldn't be deferred for some other reason.  Don't
12384         generate RTL for functions that will not be emitted.
12385         (genrtl_start_function): Remove code deadling with
12386         DECL_SAVED_INSNS.
12387         (genrtl_finish_function): Likewise.
12388
12389 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
12390
12391         PR c++/4203
12392         * call.c (build_over_call): Do not optimize any empty base
12393         construction.
12394
12395 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12396
12397         * error.c (dump_template_decl): Output template parameters
12398         together with their specifiers.
12399         Output `class' prefix for template template parameter.
12400         (dump_decl): Fix formatting.
12401
12402 2001-08-30  Kurt Garloff  <garloff@suse.de>
12403
12404         * optimize.c (inlinable_function_p): Allow only smaller single
12405         functions. Halve inline limit after reaching recursive limit.
12406
12407 2001-08-30  Joern Rennecke <amylaar@redhat.com>
12408             Jason Merrill  <jason_merrill@redhat.com>
12409
12410         * class.c (build_vtable_entry_ref): Subtract in char*, not
12411         ptrdiff_t.
12412
12413 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
12414
12415         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
12416         (build_cplus_array_type): Use cp_build_qualified_type, not
12417         TYPE_MAIN_VARIANT, to get an unqualified version.
12418
12419         * decl2.c (grok_alignof): Lose.
12420         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
12421         * typeck.c (c_alignof): Lose.
12422         * semantics.c (finish_sizeof, finish_alignof): New.
12423         * parse.y: Use them.
12424         * cp-tree.h: Declare them.
12425
12426 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
12427
12428         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
12429         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
12430         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
12431
12432 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
12433
12434         * typeck2.c (add_exception_specifier): Only require complete type if
12435         not in processing template declaration.
12436
12437 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12438
12439         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
12440         GNU_xref_start_scope and GNU_xref_end_scope.
12441
12442         * tree.c (TYPE_HASH): Moved to ../tree.h.
12443
12444 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
12445
12446         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
12447         on COMPOUND_EXPRs.
12448
12449 2001-08-14  Richard Henderson  <rth@redhat.com>
12450
12451         * class.c, cp-tree.h (build_vfn_ref): Remove.
12452         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
12453
12454 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
12455
12456         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
12457         empty class assignment as having side-effects to avoid
12458         spurious warnings.
12459
12460 2001-08-13  Zack Weinberg  <zackw@panix.com>
12461
12462         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
12463         * except.c: Include libfuncs.h.
12464
12465 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
12466
12467         * decl.c (grokdeclarator): Clarify diagnostic message.
12468
12469 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12470
12471         * decl2.c (do_nonmember_using_decl): Replace using directive
12472         with using declaration in the error message.
12473
12474 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12475
12476         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
12477         criterion to avoid rebuilding expression tree instead of
12478         processing_template_decl.
12479
12480 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
12481
12482         Support named return value optimization for inlines, too.
12483         * decl.c (finish_function): Nullify returns here.
12484         * semantics.c (genrtl_start_function): Not here.
12485         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
12486         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
12487         Also nullify the CLEANUP_STMT for the nrv.
12488         * cp-tree.h: Declare it.
12489         * optimize.c (declare_return_variable): Replace the nrv with the
12490         return variable.
12491         * typeck.c (check_return_expr): Be more flexible on alignment check.
12492         Ignore cv-quals when checking for a matching type.
12493
12494 2001-08-09  Richard Henderson  <rth@redhat.com>
12495
12496         * decl2.c (finish_objects): Use target hooks instead of
12497         assemble_constructor and assemble_destructor.
12498
12499 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
12500
12501         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
12502
12503 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
12504
12505         PR c++/3820
12506         Stop using TYPE_NONCOPIED_PARTS.
12507         * call.c (build_over_call): Be careful when copy constructing
12508         or assigning to an empty class.
12509         * class.c (check_bases_and_members): It has a
12510         COMPLEX_ASSIGN_REF if it has a vptr.
12511         (layout_class_type): Don't add empty class padding to
12512         TYPE_NONCOPIED_PARTS.
12513         (finish_struct_1): Don't add the VFIELD either.
12514         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
12515         initialization.
12516
12517 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
12518
12519         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
12520
12521 2001-08-06  Richard Henderson  <rth@redhat.com>
12522
12523         * decl2.c (finish_objects): Pass a symbol_ref and priority to
12524         assemble_{constructor,destructor}.  Remove priority handling.
12525
12526 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
12527
12528         Don't allow template-id in using-declaration.
12529         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
12530         (do_class_using_decl): Likewise.
12531
12532 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
12533
12534         * cp/spew.c (read_token): No need to pop buffers.
12535
12536 2001-08-02  Stan Shebs  <shebs@apple.com>
12537
12538         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
12539         (fnaddr_from_vtable_entry): Remove decl.
12540         * method.c (use_thunk): Update comment.
12541
12542 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
12543
12544         * repo.c (get_base_filename): Change return value to const char
12545         pointer.
12546
12547 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
12548
12549         Kill -fhonor-std.
12550         * NEWS: Document.
12551         * cp-tree.h (flag_honor_std): Remove.
12552         (CPTI_FAKE_STD): Remove.
12553         (std_node): Remove comment about it being NULL.
12554         (fake_std_node): Remove.
12555         * decl.c (in_fake_std): Remove.
12556         (walk_namespaces_r): Remove fake_std_node check.
12557         (push_namespace): Remove in_fake_std code.
12558         (pop_namespace): Likewise.
12559         (lookup_name_real): Remove fake_std_node check.
12560         (init_decl_processing): Always create std_node. Always add
12561         std:: things there.
12562         (builtin_function): Always put non '_' fns in std.
12563         * decl2.c (flag_honor_std): Remove.
12564         (lang_f_options): Remove honor-std.
12565         (unsupported_options): Add honor-std.
12566         (set_decl_namespace): Remove fake_std_node check.
12567         (validate_nonmember_using_decl): Likewise.
12568         (do_using_directive): Likewise.
12569         (handle_class_head): Likewise.
12570         * dump.c (cp_dump_tree): Likewise.
12571         * except.c (init_exception_processing): Adjust.
12572         * init.c (build_member_call): Remove fake_std_node check.
12573         (build_offset_ref): Likewise.
12574         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
12575         * rtti.c (init_rtti_processing): Adjust.
12576
12577 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
12578
12579         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
12580         operand while calling cp_tree_equal.
12581
12582 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
12583
12584         The 3.0 ABI no longer has vbase pointer fields.
12585         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
12586         FORMAT_VBASE_NAME): Remove.
12587         * method.c (do_build_copy_constructor): Adjust.
12588         (do_build_assign_ref): Adjust.
12589         * search.c (lookup_field_r): Adjust.
12590         * typeck.c (build_component_ref): Adjust.
12591
12592         The 3.0 ABI always has a vtable pointer at the start of every
12593         polymorphic class.
12594         * rtti.c (build_headof_sub): Remove.
12595         (build_headof): Adjust.
12596         (get_tinfo_decl_dynamic): No need to check flag_rtti
12597         here. Adjust.
12598         (create_real_tinfo_var): Explain why we need a hidden name.
12599
12600 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
12601
12602         PR c++/3631
12603         * class.c (update_vtable_entry_for_fn): The fixed adjustment
12604         of a virtual thunk should be from declaring base.
12605
12606 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
12607
12608         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
12609         the shared virtual base, so preserving inheritance graph order.
12610
12611 2001-07-30  Andreas Jaeger  <aj@suse.de>
12612
12613         * decl2.c: Remove unused var global_temp_name_counter.
12614
12615 2001-07-28  Richard Henderson  <rth@redhat.com>
12616
12617         * method.c (pending_inlines): Remove.
12618
12619 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
12620
12621         * class.c (mark_primary_virtual_base): Don't adjust base
12622         offsets here.
12623         (dfs_unshared_virtual_bases): Adjust them here.
12624         (mark_primary_bases): Explain why we adjust at the end.
12625
12626 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
12627
12628         * class.c (finish_struct_1): When copying the primary base's
12629         VFIELD, make sure we find it is at offset zero.
12630
12631 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12632
12633         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
12634         tsubst_expr for default template arguments.
12635
12636 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
12637
12638         PR c++/3621
12639         * spew.c (yylex): Only copy the token's lineno, if it is
12640         nonzero.
12641
12642 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
12643
12644         PR c++/3624
12645         * call.c (resolve_args): Simplify, call
12646         convert_from_reference.
12647         (build_new_op): Resolve and convert from reference ARG1
12648         earlier. Adjust ARG2 & ARG3 resolve and conversion.
12649
12650 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
12651
12652         * decl.c (last_function_parm_tags): Remove.
12653         (current_function_parm_tags): Remove.
12654         (init_decl_processing): Adjust.
12655         (start_function): Adjust.
12656         (store_parm_decls): Adjust.
12657
12658         PR c++/3152
12659         * decl.c (grokdeclarator): Detect when a function typedef is
12660         declaring a function, and create last_function_parms correctly.
12661
12662 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
12663
12664         * call.c (joust): Only prefer a non-builtin candidate to a builtin
12665         one if they have the same signature.
12666
12667         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
12668         it rather than toplevel_bindings_p.  Give it a mangled name if static.
12669         (convert_to_reference): Adjust.
12670         * decl2.c (get_temp_name): Lose.
12671         * mangle.c (mangle_ref_init_variable): New fn.
12672         (mangle_guard_variable): Strip the ref-init header.
12673         * cp-tree.h: Adjust.
12674         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
12675         initializer.
12676         (grok_reference_init): Always use DECL_INITIAL.
12677
12678 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
12679
12680         PR c++/3416
12681         * call.c (build_conditional_expr): Recheck args after
12682         conversions.
12683         * cp-tree.h (build_conditional_expr): Move to correct file.
12684         * typeck.c (decay_conversion): Diagnose any unknown types
12685         reaching here.
12686         (build_binary_op): Don't do initial decay or default
12687         conversions on overloaded functions.
12688         (build_static_cast): Don't do a decay conversion here.
12689
12690 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
12691
12692         PR c++/3543
12693         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
12694         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
12695
12696 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
12697
12698         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
12699         (create_vtbl_ptr): ... here.
12700
12701 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
12702
12703         * class.c (build_vbase_offset_vbtl_entries): Look for
12704         non-primary base of which we are a sub vtable.
12705
12706 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
12707
12708         * semantics.c (finish_this_expr):  Remove unused code.
12709
12710 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
12711
12712         Simplify rtti, now we've only one ABI.
12713         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
12714         CPTI_TINFO_VAR_ID.
12715         (tinfo_decl_id, tinfo_var_id): Remove.
12716         (get_typeid_1): Remove.
12717         * rtti.c
12718         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
12719         (typeid_ok_p): New function.
12720         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
12721         (get_tinfo_decl): Remove old abi documentation.
12722         (tinfo_from_decl): Remove.
12723         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
12724         (get_typeid_1): Remove.
12725         (get_base_offset): Remove.
12726         (synthesize_tinfo_var): Absorb get_base_offset.
12727         (create_real_tinfo_var): Don't use tinfo_decl_id.
12728
12729 2001-07-23  Graham Stott  <grahams@redhat.com>
12730
12731         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
12732         variable has_two_argument_delete_p.
12733
12734 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
12735
12736         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
12737         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
12738         (CPTI_INDEX_IDENTIFIER): Remove.
12739         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
12740         (delta2_identifier): Remove.
12741         (index_identifier): Remove.
12742         (pfn_or_delta2_identifier): Remove.
12743         (flag_vtable_thunks): Remove.
12744         (VTABLE_DELTA2_NAME): Remove.
12745         (VTABLE_INDEX_NAME): Remove.
12746         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
12747         (vfunc_ptr_type_node): Adjust.
12748         (VTABLE_NAME_PREFIX): Adjust.
12749         (build_vfn_ref): Lose first parameter.
12750         (fixup_all_virtual_upcast_offsets): Remove.
12751         * decl.c (initialize_predefined_identifiers): Remove
12752         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
12753         (init_decl_processing): Remove no-vtable-thunk code.
12754         * decl2.c (flag_vtable_thunks): Remove.
12755         (mark_vtable_entries): Remove no-vtable-thunk code.
12756         * error.c (dump_decl): Remove no-vtable-thunk code.
12757         (dump_expr): Adjust ptr to member function code.
12758         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
12759         code.
12760         * rtti.c (build_headof): Remove no-vtable-thunk code.
12761         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
12762         * search.c (get_base_distance): Remove expand_upcast_fixups case.
12763         (virtual_context) Remove.
12764         (expand_upcast_fixups): Remove.
12765         (fixup_virtual_upcast_offsets): Remove.
12766         (fixup_all_virtual_upcast_offsets): Remove.
12767         * typeck.c (get_member_function_from_ptrfunc): Remove
12768         no-vtable-thunk code.
12769         * call.c (build_over_call): Adjust call to build_vfn_ref.
12770         * class.c (build_vfn_ref): Lose first parameter. Remove
12771         no-vtable-thunk code.
12772         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
12773         (build_vtable_entry): Remove no-vtable-thunk code.
12774
12775 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
12776
12777         Remove old-abi remnants. Remove comments about old abi
12778         behavior. Remove references to 'new-abi' in comments.
12779         * cp-tree.h: Adjust comments.
12780         (vbase_offsets_in_vtable_p): Delete.
12781         (vcall_offsets_in_vtable_p): Delete.
12782         (vptrs_present_everywhere_p): Delete.
12783         (all_overridden_vfuns_in_vtables_p): Delete.
12784         (merge_primary_and_secondary_vtables_p): Delete.
12785         (TYPE_CONTAINS_VPTR_P): Adjust.
12786         (VTT_NAME_PREFIX): Remove.
12787         (CTOR_VTBL_NAME_PREFIX): Remove.
12788         (init_vbase_pointers): Remove.
12789         * class.c: Adjust coments.
12790         (build_vbase_pointer_fields): Delete.
12791         (build_vbase_pointer): Remove old-abi code.
12792         (build_secondary_vtable): Likewise.
12793         (modify_all_vtables): Likewise.
12794         (create_vtable_ptr): Likewise.
12795         (layout_class_type): Likewise.
12796         (finish_struct_1): Likewise.
12797         (finish_vtbls): Likewise.
12798         (dfs_finish_vtbls): Delete.
12799         (build_vbase_offset_vtbl_entries): Remove old-abi code.
12800         * cvt.c: Adjust comments.
12801         * decl.c: Adjust comments.
12802         * decl2.c: Adjust comments.
12803         * init.c: Adjust comments.
12804         (construct_virtual_bases): Remove old-abi code.
12805         * lang-specs.h: Remove -fno-new-abi.
12806         * mangle.c: Adjust comments.
12807         * rtti.c: Adjust comments.
12808         (get_base_offset): Remove old-abi-code.
12809         * search.c: Adjust comments.
12810         (dfs_init_vbase_pointers): Remove.
12811         (dfs_vtable_path_unmark): Remove.
12812         (init_vbase_pointers): Remove.
12813         * semantics.c: Adjust comments.
12814         (emit_associated_thunks): Remove old-abi code.
12815         * typeck.c: Adjust comments.
12816
12817 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
12818
12819         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
12820         params.h.
12821
12822 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
12823
12824         * class.c (finish_struct_anon): Forbid nested classes.
12825
12826 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
12827
12828         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
12829         * optimize.c: Include debug.h.
12830         (maybe_clone_body): Use debug hook.
12831         * semantics.c: Include debug.h.
12832         (expand_body): Use debug hook.
12833
12834 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
12835
12836         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
12837
12838 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
12839
12840         * class.c (type_requires_array_cookie): New function.
12841         (check_methods): Don't try to figure out whether the type needs a
12842         cookie here.
12843         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
12844         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
12845         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
12846         * pt.c (instantiate_class_template): Don't set
12847         TYPE_VEC_DELETE_TAKES_SIZE.
12848         * NEWS: Document ABI changes from GCC 3.0.
12849
12850 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
12851             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
12852
12853         * NEWS (Changes in GCC 3.0): Fix typo.
12854
12855 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
12856
12857         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
12858         which attributes are to be attached, and a flags argument.  Update
12859         call to decl_attributes.
12860         (grokfield): Update call to decl_attributes.
12861         * class.c (finish_struct): Update call to cplus_decl_attributes.
12862         * cp-tree.h (cplus_decl_attributes): Update prototype.
12863         * decl.c (start_decl, grokdeclarator, start_function): Update
12864         calls to decl_attributes and cplus_decl_attributes.
12865         * friend.c (do_friend): Update call to cplus_decl_attributes.
12866         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
12867
12868 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
12869
12870         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
12871         for `register' variables with an asm-specification.
12872
12873 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
12874
12875         * semantics.c (finish_asm_stmt): Mark the output operands
12876         to an asm addressable, if necessary.
12877
12878 2001-07-11  Ben Elliston  <bje@redhat.com>
12879
12880         * Revert this change -- there is a subtle bug.
12881
12882         PR c++/80
12883         * decl.c (finish_enum): New "attributes" argument; pass it to
12884         cplus_decl_attributes.  Use a narrower type if the enum is packed.
12885         * cp-tree.h (finish_enum): Adjust prototype.
12886         * parse.y (enum_head): New non-terminal.
12887         (structsp): Use it. Enums now may be preceded or followed by
12888         optional attributes -- pass their chained tree to finish_enum().
12889         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
12890
12891 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
12892
12893         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
12894         variables.
12895
12896 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
12897
12898         * semantics.c (cp_expand_stmt): Fix for null
12899         current_function_return_value.
12900
12901 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
12902
12903         * call.c (build_op_delete_call): Initialize fn.
12904         (convert_like_real): Delete conditional.
12905         (joust): Initialize *w and *l.
12906         * class.c: Add prototype for binfo_ctor_vtable.
12907         (get_primary_binfo): Initialize result.
12908         * init.c (build_java_class_ref): Initialize name.
12909
12910 2001-07-09  Erik Rozendaal  <dlr@acm.org>
12911
12912         * typeck.c (unary_complex_lvalue): Do not duplicate the
12913         argument to modify, pre-, or post-increment when used as an
12914         lvalue and when the argument has side-effects.
12915
12916 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
12917
12918         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
12919         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
12920         cplus_decl_attributes even if attrs is NULL.
12921         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
12922
12923 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
12924
12925         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
12926         calls to decl_attributes.
12927
12928 2001-07-06  Ira Ruben   <ira@apple.com>
12929
12930         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
12931         be DECL_TEMPLATE_RESULT.
12932
12933 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12934
12935         * cp-tree.h (copy_template_template_parm): Rename to ...
12936         (bind_template_template_parm): ... here.
12937         * tree.c (copy_template_template_parm): Rename to ...
12938         (bind_template_template_parm): ... here.  Remove the case when
12939         NEWARGS is NULL_TREE.
12940         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
12941         BOUND_TEMPLATE_TEMPLATE_PARM.
12942         * pt.c (lookup_template_class): Adjust.
12943
12944 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
12945
12946         * cvt.c (convert_lvalue): New fn.
12947         * cp-tree.h: Declare it.
12948         * method.c (do_build_assign_ref): Use it.
12949         (do_build_copy_constructor): Convert parm to base types
12950         before calling base constructors.
12951
12952         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
12953         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
12954         optimize.
12955         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
12956
12957 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
12958
12959         * optimize.c (optimize_inline_calls): New function, broken out
12960         of ...
12961         (optimize_function): ... here. Call it. Don't inline if it is
12962         a thunk.
12963         (dump_function): Print name of dump flag causing this dump.
12964         * semantics.c (expand_body): Move thunk inline check to
12965         optimize_function.
12966
12967 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
12968
12969         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
12970         (comptypes): Use target.comp_type_attributes.
12971
12972 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
12973
12974         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
12975
12976 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
12977
12978         * error.c (lang_print_error_function): Add a `diagnostic_context *'
12979         parameter. Tweak.
12980
12981 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
12982
12983         * decl2.c (import_export_class): Update.
12984
12985 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
12986
12987         * error.c (init_error): Adjust settings.
12988
12989 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
12990
12991         * error.c (init_error): Adjust settings.
12992
12993 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
12994
12995         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
12996         return pointers to data members by reference rather than by value.
12997
12998 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
12999
13000         Implement the Named Return Value optimization.
13001         * cp-tree.h (struct cp_language_function): Add x_return_value.
13002         (current_function_return_value): Now a macro.
13003         * decl.c: Don't define it.
13004         (define_label, finish_case_label): Don't clear it.
13005         (init_decl_processing): Don't register it with GC.
13006         * semantics.c (genrtl_finish_function): Don't check it for
13007         no_return_label.  Copy the RTL from the return value to
13008         current_function_return_value and walk, calling...
13009         (nullify_returns_r): ...this new fn.
13010         * typeck.c (check_return_expr): Set current_function_return_value.
13011
13012 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
13013
13014         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
13015         sharing a ctor vtable with.  Merge code for cases 1 and 2.
13016         (binfo_ctor_vtable): New fn.
13017         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
13018
13019 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
13020
13021         * class.c (dfs_find_final_overrider): Fix logic.
13022
13023         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
13024         virtual thunk instead of non-virtual.
13025         (get_matching_virtual): Uncomment.
13026
13027         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
13028         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
13029         PARM, not ARG.
13030
13031 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
13032
13033         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
13034         we've not emerged from the hierarchy of RTTI_BINFO on reaching
13035         a non-virtual base.
13036
13037 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
13038
13039         * NEWS: Update release number.
13040
13041 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
13042
13043         PR c++/3130, c++/3131, c++/3132
13044         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
13045         * class.c (force_canonical_binfo_r): Move
13046         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
13047         virtual bases unless they're primary and what they're primary
13048         too has been moved.
13049         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
13050         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
13051         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
13052         derived binfo.
13053         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
13054         (layout_nonempty_base_or_field): Add most derived type
13055         parameter. Adjust.
13056         (layout_empty_base): Likewise.
13057         (build_base_field): Likewise.
13058         (build_base_fields): Likewise.
13059         (propagate_binfo_offsets): Add most derived type
13060         parameter. Skip non canonical virtual bases too.
13061         (dfs_set_offset_for_unshared_vbases): Don't skip primary
13062         bases. Do skip canonical bases.
13063         (layout_virtual_bases): Adjust.
13064         (layout_class_type): Adjust.
13065         (dfs_get_primary_binfo): Build list of virtual primary base
13066         candidates.
13067         (get_primary_binfo): Check that the shared virtual primary
13068         base candidate was found first.
13069         (accumulate_vtbl_inits): Don't do anything for non-vptr
13070         containing binfos. For case 1 primary virtual bases, keep
13071         checking that we've not emerged from the hierarchy of RTTI_BINFO.
13072
13073 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
13074
13075         PR c++/3089
13076         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
13077         hierarchy looking for primary bases for a ctor
13078         vtable. Recursively call oneself, if we meet our primary via
13079         this route and haven't met it yet via inheritance graph order.
13080
13081 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
13082
13083         * lang-options.h: Emit documentation for -fno-honor-std, not
13084         -fhonor-std.
13085
13086 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
13087
13088         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
13089         Don't clobber delta.
13090         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
13091
13092 2001-06-10  Mark Mitchell <mark@codesourcery.com>
13093             Gabriel Dos Reis  <gdr@codesourcery.com>
13094
13095         * Make-lang.in (cp/call.o): Depend on diagnostic.h
13096         (cp/typeck.o): Depend on diagnostic.h
13097         (cp/typeck2.o): Depend on diagnostic.h
13098         (cp/repo.o): Depend on dignostic.h
13099         * typeck.c: #include diagnostic.h
13100         (convert_for_initialization): Remove extern declaration for
13101         warningcount and errorcount.
13102
13103         * call.c: #include diagnostic.h
13104         (convert_like_real): Remove extern declaration for warnincount and
13105         errorcount.
13106
13107         * repo.c: #include diagnostic.h
13108         * typeck2.c: #include diagnostic.h
13109
13110 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
13111
13112         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
13113         in previous change.
13114
13115 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
13116
13117         PR c++/2929
13118         * friend.c (do_friend): Use push_decl_namespace for classes at
13119         namespace scope.
13120
13121 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
13122             Jason Merrill <jason_merrill@redhat.com>
13123
13124         PR c++/3061
13125         * class.c (build_secondary_vtable): Use assert, rather than an error
13126         message.
13127         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
13128         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
13129         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
13130         Don't set BINFO_VTABLE for a primary virtual base.
13131
13132 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
13133
13134         * decl.c (duplicate_decls): Update source position information
13135         when a template function is defined.
13136
13137 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
13138
13139         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
13140
13141 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
13142
13143         PR c++/2914
13144         * decl.c (pushtag): Don't push into a complete type's scope.
13145
13146 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
13147
13148         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
13149         (struct lang_decl_flags): Lose generate_with_vtable_p.
13150         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
13151         * class.c (copy_virtuals): Adjust.
13152         * decl2.c (mark_vtable_entries): Adjust.
13153         * method.c (make_thunk, build_vtable_entry): Adjust.
13154         * class.c (update_vtable_entry_for_fn): Only look as far as the
13155         first defining class.
13156         (build_vtbl_initializer): Put nothing in the slot for a function only
13157         defined in a lost primary virtual base.
13158         (add_vcall_offset_vtbl_entries_1): Use the same code for
13159         the lost primary case and the normal case.
13160         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
13161         (get_vfield_offset, get_derived_offset): Lose.
13162         (dfs_find_final_overrider): Use look_for_overrides_here.
13163         (get_matching_virtual): New fn.
13164         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
13165         not BV_VCALL_INDEX.
13166         * search.c (look_for_overrides_here): Split out from...
13167         (look_for_overrides_r): Here.
13168
13169         * class.c (find_final_overrider): Return error_mark_node on error.
13170
13171         * decl2.c (key_method): #if 0 accidental change.
13172
13173 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
13174
13175         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
13176         (build_over_call): Likewise.
13177         * decl.c (grokparms): Likewise.
13178         * pt.c (tsubst_decl): Likewise.
13179         * typeck.c (convert_arguments): Likewise.
13180
13181 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
13182
13183         * semantics.c (begin_class_definition): Robustify.
13184
13185         * pt.c (instantiate_decl): Tell the repository code about the
13186         clones, not the cloned functions.
13187         * repo.c (repo_template_used): Explicitly instantiate the cloned
13188         function, not the clones.
13189
13190 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
13191
13192         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
13193         ICS_BAD_FLAG on created conversion.
13194         (compare_ics): Break out rank.
13195
13196 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
13197
13198         * decl.c (xref_tag): Remove extraneous %s on dependent name
13199         lookup warning.
13200
13201 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
13202
13203         * class.c (layout_vtable_decl): Fix off by one error on
13204         build_index_type.
13205         (build_vtt): Likewise.
13206         (build_ctor_vtbl_group): Likewise.
13207
13208 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
13209
13210         * class.c (maybe_indent_hierarchy): New function.
13211         (dump_class_hierarchy_r): Add flags. Dump extra binfo
13212         information, if enabled. Use maybe_indent_hierarchy. Adjust
13213         output format.
13214         (dump_class_hierarchy): Adjust prototype. Adjust output format.
13215         (dump_array, dump_vtable, dump_vtt): New functions.
13216         (finish_struct_1): Adjust hierarchy dumping.
13217         (initialize_vtable): Call dump_vtable.
13218         (build_vtt): Call dump_vtt.
13219         (build_ctor_vtbl_group): Call dump_vtable.
13220         * decl2.c (flag_dump_class_layout): Remove.
13221         (cxx_decode_option): Remove dump translation unit
13222         and dump class hierarchy check. Call dump_switch_p.
13223         (finish_file): Adjust dumping.
13224         (dump.c): Only dump base classes if not TDF_SLIM.
13225         Only dump namespace members if not TDF_SLIM.
13226         * optimize.c (dump_function): New function.
13227         (optimize_function): Call dump_function.
13228         * semantics.c (expand_body): Use dump_enabled_p.
13229
13230 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
13231
13232         PR g++/2936
13233         Part missed from first commit
13234         * decl2.c (finish_anon_union): Copy context.
13235
13236 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
13237
13238         PR g++/2936
13239         * optimize.c (remap_decl): Remap anonymous aggregate members too.
13240
13241 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
13242
13243         PR g++/2823
13244         * semantics.c (expand_body): Don't optimize thunks.
13245
13246 2001-05-25  Sam TH  <sam@uchicago.edu>
13247
13248         * cp-tree.h lex.h: Fix header include guards.
13249
13250 2001-05-25  Mark Mitchell <mark@codesourcery.com>
13251
13252         * decl.c (init_decl_processing): Tweak.
13253
13254 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
13255
13256         * decl.c (duplicate_decls): Tidy.
13257         (init_decl_processing): Always set flag_no_builtin.
13258
13259 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
13260
13261         PR c++/2184
13262         * decl2.c (do_local_using_decl): Push the decls, even in a
13263         template.
13264
13265 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
13266
13267         * optimize.c (initialize_inlined_parameters): Don't set
13268         TREE_READONLY for a VAR_DECL taking the place of an inlined
13269         PARM_DECL.
13270
13271 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
13272
13273         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
13274         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
13275         attribute.
13276
13277 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
13278
13279         * parse.y: Refer to compound literals as such, not as
13280         constructor-expressions.
13281
13282 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
13283
13284         * call.c (build_op_delete_call): Ignore exception-specifications
13285         when looking for matching delete operators.
13286         * init.c (build_new_1): Compute whether or not the allocation
13287         function used is a placement allocation function or not, and
13288         communicate this information to build_op_delete_call.
13289
13290 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
13291
13292         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
13293         (build_vtbl_ref): Adjust.
13294         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
13295         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
13296         Re-add vtable-gc.
13297         (unsupported_options): Correspondingly.
13298
13299         * decl2.c (maybe_make_one_only): Check flag_weak, not
13300         supports_one_only().
13301
13302         * cp-tree.def (START_CATCH_STMT): Lose.
13303         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
13304         * tree.c (cp_statement_code_p): Don't case it.
13305         * semantics.c (cp_expand_stmt): Likewise.
13306         * cp-tree.h (START_CATCH_TYPE): Lose.
13307         (HANDLER_TYPE): New.
13308         * except.c (expand_start_catch_block): Don't start any blocks.
13309         Return the type.
13310         (expand_end_catch_block): Don't end any blocks.
13311         * parse.y (handler): Don't pass anything from finish_handler_parms
13312         to finish_handler.
13313         * pt.c (tsubst_expr): Likewise.
13314         * semantics.c (begin_handler): Call note_level_for_catch here.
13315         (finish_handler_parms): Don't return anything.
13316         (genrtl_catch_block, begin_catch_block): Lose.
13317         (genrtl_handler): Call expand_start_catch here.
13318
13319 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
13320
13321         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
13322         (get_vtable_decl, build_vtt): Not here.
13323
13324 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
13325
13326         PR c++/2781
13327         * optimize.c (update_cloned_parm): Copy addressability and other
13328         flags.
13329
13330 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13331
13332         * pt.c (determine_specialization): Ignore artificial functions.
13333
13334 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
13335
13336         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
13337         (C_RID_CODE): Remove.
13338         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
13339         (init_parse): Don't do it here.
13340
13341 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
13342
13343         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
13344         function declaration to avoid stripping the symbol's attributes.
13345
13346 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
13347
13348         * decl.c (pushdecl): Adjust error string.
13349         (xref_tag): Adjust friend class injection warning. Remove the
13350         inherited name from the class shadowed scope.
13351
13352 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
13353
13354         * except.c (cp_protect_cleanup_actions): New function.
13355         (init_exception_processing): Don't set protect_cleanup_actions
13356         here.  Do set lang_protect_cleanup_actions.
13357
13358 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
13359
13360         * spew.c (read_token): Call yyerror on all unexpected tokens.
13361
13362 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
13363
13364         * init.c (member_init_ok_or_else): Take a tree rather than
13365         string for name.
13366         (expand_member_init): Adjust.
13367
13368 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
13369
13370         * decl.c (duplicate_decls): Suppress warning about duplicate
13371         decls if the first decl is a friend.
13372
13373 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
13374
13375         * except.c (choose_personality_routine): Export.  Add
13376         explanatory comment.  Take an enum languages, not a boolean.
13377         (initialize_handler_parm): Adjust to match.
13378         * cp-tree.h: Prototype choose_personality_routine.
13379         * lex.c (handle_pragma_java_exceptions): New function.
13380         (init_cp_pragma): Register #pragma GCC java_exceptions.
13381
13382 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
13383
13384         * method.c (build_mangled_C99_name): Remove unused prototype.
13385
13386 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
13387
13388         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
13389         * typeck.c (get_member_function_from_ptrfunc,
13390         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
13391         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
13392
13393         Reverted Geoff Keating's 2001-05-03's patch.
13394
13395 2001-05-11  Ira Ruben   <ira@apple.com>
13396
13397         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
13398
13399 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
13400
13401         * cp-tree.h (finish_label_expr, lookup_label): Delete.
13402         * parse.y: Update for '&&'; don't issue warning here.
13403         * semantics.c (finish_label_expr): Delete.
13404
13405 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
13406
13407         * splay-tree.h (splay_tree_max): New function.
13408         (splay_tree_min): Likewise.
13409
13410 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
13411
13412         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
13413         (pfn_vflag_identifier): Define.
13414         Update comment about layout of pointer functions.
13415         (build_ptrmemfunc1): Update prototype.
13416         (expand_ptrmemfunc_cst): Update prototype.
13417         * decl.c (initialize_predefined_identifiers): Initialize
13418         pfn_vflag_identifier.
13419         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
13420         an extra field to the type.
13421         * expr.c (cplus_expand_constant): Pass 'flag' between
13422         expand_ptrmemfunc_cst and build_ptrmemfunc1.
13423         * typeck.c (get_member_function_from_ptrfunc): When
13424         FUNCTION_BOUNDARY < 16, look at additional field to determine
13425         if a pointer-to-member is a real pointer or a vtable offset.
13426         (build_ptrmemfunc1): Add new parameter to contain extra field.
13427         (build_ptrmemfunc): Pass the extra field around.
13428         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
13429         (pfn_from_ptrmemfunc): Ignore the extra field.
13430
13431 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
13432
13433         * cp-tree.h (flag_inline_trees): Update documentation.
13434         * decl.c (init_decl_processing): Adjust handling of
13435         flag_inline_functions and flag_inline_trees to support -O3.
13436         (grokfndecl): Set DECL_INLINE on all functions if that's what
13437         the user requested.
13438         (save_function_data): Clear DECL_INLINE in
13439         current_function_cannot_inline is non-NULL.
13440         * decl2.c (flag_inline_trees): Update documentation.
13441
13442 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
13443
13444         * dump.c (cp_dump_tree, USING_STMT case): New case.
13445         * tree.c (cp_statement_code_p): Add USING_STMT.
13446         * decl2.c (do_using_directive): Add the using directive statement.
13447
13448         * tree.c (walk_tree): Reformat an if block.
13449
13450 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
13451
13452         * decl.c (compute_array_index_type): Don't try to do anything with
13453         the indices when processing a template.
13454
13455 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13456
13457         * call.c: NULL_PTR -> NULL.
13458         * class.c: Likewise.
13459         * cvt.c: Likewise.
13460         * decl.c: Likewise.
13461         * decl2.c: Likewise.
13462         * except.c: Likewise.
13463         * init.c: Likewise.
13464         * rtti.c: Likewise.
13465         * search.c: Likewise.
13466         * tree.c: Likewise.
13467         * typeck.c: Likewise.
13468         * typeck2.c: Likewise.
13469
13470 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
13471
13472         * decl2.c (do_using_directive): Revert previous patch.
13473
13474 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
13475
13476         * cp-tree.def (USING_STMT): New statement node.
13477         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
13478         * decl2.c (do_using_directive): Add USING_STMT to statement
13479         tree. Don't emit errors when processing template decl.
13480         * pt.c (tsubst_expr, USING_STMT case): New case.
13481         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
13482
13483 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
13484
13485         * call.c (build_new_op): Convert args from reference here.
13486         (build_conditional_expr): Don't convert here.
13487
13488 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
13489
13490         * spew.c (last_token_id): New static variable.
13491         (read_token): Set it here.
13492         (yyerror): Use it here.
13493
13494 2001-04-30  Richard Henderson  <rth@redhat.com>
13495
13496         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
13497         * decl.c: Likewise.
13498
13499 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
13500
13501         * gxxint.texi: Remove.
13502         * Make-lang.in: Remove all traces of gxxint.texi.
13503
13504 2001-04-30  Mark P Mitchell  <mark@codesourcery.com>
13505
13506         * decl2.c (start_static_initialization_or_destruction): Correct
13507         logic to handle the -fno-use-cxa-atexit case.
13508
13509 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
13510
13511         * optimize.c (update_cloned_parm): New function.
13512         (maybe_clone_body): Use it.  Update the `this' parameter too.
13513
13514 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
13515
13516         * decl2.c (unsupported_options): Add new-abi.
13517         * lang-options.h: Remove no longer supported options.
13518
13519 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
13520
13521         * except.c (can_convert_eh): Don't check template parms,
13522         typename types etc.
13523
13524 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
13525
13526         * optimize.c (maybe_clone_body): Copy parameter names and locations.
13527
13528 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
13529
13530         * cp-tree.h (adjust_clone_args): Prototype new function.
13531         * class.c (adjust_clone_args): New function.
13532         * decl.c (start_function): Call it for in charge ctors.
13533
13534 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
13535
13536         * method.c (use_thunk): Make sure that thunks really are emitted
13537         when requested.
13538
13539 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
13540
13541         * mangle.c (write_chars): New macro.
13542         (hwint_to_ascii): New function
13543         (write_number): Use it.
13544         (write_integer_cst): Deal with really big numbers.
13545
13546 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
13547
13548         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
13549         the clone.
13550
13551 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
13552
13553         * decl.c (grokdeclarator): Set context of namespace scope
13554         TYPE_DECLS.
13555
13556 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
13557
13558         * cp/optimize.c: Include hashtab.h.
13559         (struct inline_data): Add tree_pruner.
13560         (expand_call_inline, expand_calls_inline): Use it when calling
13561         walk_tree.
13562         (optimize_function): Initialize and free tree_pruner.
13563
13564 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
13565
13566         Lazy __FUNCTION__ generation.
13567         * cp-tree.def (FUNCTION_NAME): Remove.
13568         * cp-tree.h (function_name_declared_p): Remove.
13569         (cp_fname_init): Prototype.
13570         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
13571         don't call declare_function_name. Call start_fname_decls.
13572         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
13573         clobber the line number.
13574         (cp_fname_init): New function.
13575         (start_function): Call start_fname_decls.
13576         (finish_function): Call finish_fname_decls.
13577         * lex.c (reswords): Add slots for __FUNCTION__ et al.
13578         (rid_to_yy): Add mappings for __FUNCTION__ et al.
13579         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
13580         * parse.y (VAR_FUNC_NAME): New token.
13581         (primary): Add VAR_FUNC_NAME.
13582         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
13583         generation.
13584         (tsubst, FUNCTION_NAME case): Remove.
13585         (tsubst_copy, FUNCTION_NAME case): Remove.
13586         (tsubst_expr, DECL_STMT case): Be careful with a
13587         DECL_PRETTY_FUNCTION_P.
13588         (instantiate_decl): Remove function_name_declared_p.
13589         * semantics.c (begin_compound_statement): Don't call
13590         declare_function_name here.
13591         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
13592         (finish_translation_unit): Call finish_fname_decls.
13593         (expand_body): Remove function_name_declared_p.
13594         * typeck2.c (digest_init): Allow any ERROR_MARK.
13595
13596 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
13597
13598         * pt.c (tsubst_decl): Use VOID_TYPE_P.
13599         * semantics.c: Fix some typos.
13600
13601 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
13602
13603         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
13604
13605 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13606
13607         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
13608
13609 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
13610
13611         * except.c (build_throw): Wrap the initialization of the exception
13612         object in a MUST_NOT_THROW_EXPR.
13613         (do_free_exception): #if 0.
13614
13615 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
13616
13617         * cp-tree.h (finish_enum): Change prototype.
13618         * decl.c (finish_enum): Reorganize.
13619         * parse.y (structsp): Adjust calls to finish_enum.
13620
13621 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
13622
13623         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
13624         't' case.
13625
13626 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
13627
13628         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
13629         (layout_empty_base): Return at end flag.
13630         (build_base_field): Likewise.
13631         (build_base_fields): Likewise.
13632         (layout_virtual_bases): Don't add 1 to eoc value.
13633         (end_of_class): Use full size for empty bases.
13634         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
13635         empty bases. Don't add 1 to eoc value. Only add trailing padding
13636         if we're an empty class with no empty bases.
13637         (dump_class_hierarchy): Dump size and alignment.
13638
13639 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
13640
13641         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
13642         ICS_BAD_FLAG.
13643
13644 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
13645
13646         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
13647         is found, look first if name does not match the structure name.
13648
13649 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
13650
13651         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
13652         set.
13653         (SET_DECL_LANGUAGE): New macro.
13654         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
13655         (pushdecl): Likewise.
13656         (build_library_fn_1): Likewise.
13657         (build_cp_library_fn): Likewise.
13658         (grokfndecl): Likewise.
13659         (grokvardecl): Mark `extern "C"' variables as having C linkage.
13660         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
13661         * lex.c (retrofit_lang_decl): Likewise.
13662         * mangle.c (mangle_decl_string): Don't mangle the names of
13663         variables declared with C language linkage.
13664         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
13665
13666 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
13667
13668         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
13669         flag_access_control from uninitialized storage.
13670
13671 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
13672
13673         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
13674         * mangle.c (write_pointer_to_member_type): Fix mangling of
13675         pointers to cv-qualified member function types.
13676
13677         * init.c (build_delete): Create a SAVE_EXPR for the address if
13678         we're going to use it more than once.
13679
13680 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
13681
13682         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
13683         (expand_ptremfunc_cst): Change prototype.
13684         (delta2_from_ptrmemfunc): Remove.
13685         * expr.c (cplus_expand_constant): Adjust call to
13686         expand_ptrmemfunc_cst.
13687         * typeck.c (build_ptrmemfunc1): Simplify.
13688         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
13689         results in a constant.
13690         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
13691         (delta2_from_ptrmemfunc): Remove.
13692         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
13693
13694 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
13695
13696         * cp-tree.h (decl_namespace_list): New macro.
13697         (struct saved_scope): Add decl_ns_list.
13698         * decl.c (mark_saved_scope): Mark it.
13699         * decl2.c: Lose static decl_namespace_list.
13700         (init_decl2): Don't save it.
13701
13702 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13703
13704         * cp-tree.h (warn_return_type, yylex): Delete redundant
13705         declarations.
13706
13707         * decl.c (current_class_depth, global_namespace): Likewise.
13708
13709         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
13710
13711         * repo.c (flag_use_repository): Likewise.
13712
13713 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13714
13715         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
13716         set_block, pushdecl, getdecls, gettags, init_decl_processing,
13717         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
13718         lvalue_or_else, print_lang_statistics, comp_target_types,
13719         unsigned_type, signed_type, signed_or_unsigned_type,
13720         build_function_call, mark_addressable, incomplete_type_error):
13721         Delete redundant declarations.
13722
13723 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
13724
13725         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
13726         (TYPE_ANONYMOUS_P): New macro.
13727         (TAGGED_TYPE_P): New macro.
13728         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
13729         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
13730         * tree.c (no_linkage_helper): Likewise.
13731         * semantics.c (begin_class_definition): Likewise.
13732         * pt.c (convert_template_argument): Likewise.
13733         * lex.c (check_for_missing_semicolon): Likewise.
13734
13735 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
13736
13737         * class.c (dfs_unshared_virtual_bases): New function.
13738         (mark_primary_bases): Call it.
13739         (check_bases): Ignore virtual bases when determining
13740         nearly-emptiness.
13741
13742 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
13743
13744         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
13745
13746 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
13747
13748         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
13749         cloned function to the clone.
13750
13751 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13752
13753         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
13754
13755         * semantics.c: Include expr.h.
13756
13757 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
13758
13759         * method.c (implicitly_declare_fn): Commonize code for copy ctor
13760         and assignment op. Set TREE_USED for parameter.
13761
13762 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
13763
13764         * class.c (find_final_overrider_data): Add `candidates'.
13765         (dfs_find_final_overrider): Don't issue error messages
13766         prematurely.
13767         (find_final_overrider): Issue error messages here.
13768         (build_base_field): Don't warn about amgibuous direct bases here.
13769         (warn_about_ambiguous_direct_bases): New function.
13770         (layout_class_type): Use it.
13771
13772 2001-04-10  Richard Henderson  <rth@redhat.com>
13773
13774         * typeck.c (build_array_ref): Push the array reference inside
13775         COMPOUND_EXPR and COND_EXPR.
13776
13777 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
13778
13779         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
13780         * decl.c (duplicate_decls): Adjust accordingly.
13781         (maybe_commonize_var): Likewise.
13782         (grokfndecl): Likewise.
13783         (start_function): Likewise.
13784         (start_method): Likewise.
13785         * decl2.c (key_method): Likewise.
13786         (import_export_decl): Likewise.
13787         * method.c (implicitly_declare_fn): Likewise.
13788         * optimize.c (maybe_clone_body): Likewise.
13789
13790 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
13791
13792         * lang-specs.h: Add __DEPRECATED.
13793
13794 2001-04-05  J"orn Rennecke <amylaar@redhat.com>
13795
13796         * search.c (get_dynamic_cast_base_type): When building a new
13797         constant, set its type to ssizetype.
13798
13799 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
13800
13801         * optimize.c (expand_call_inline): Only add newly inlined statements
13802         into inlined_stmts.
13803
13804 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
13805
13806         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
13807         (OPERATOR_FORMAT): Likewise.
13808         (OPERATOR_TYPENAME_FORMAT): Likewise.
13809         * operators.def: Remove old name-mangling information.
13810         * decl.c (grok_op_properties): Adjust accordingly.
13811         * lex.c (init_operators): Likewise.
13812         * rtti.c (get_tinfo_decl): Issue error messages about types that
13813         have variable size.
13814
13815 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
13816
13817         * decl2.c (import_export_decl): Don't call import_export_class
13818         when processing an inline member function.
13819         * semantics.c (expand_body): Call import_export_decl before
13820         emitting inline functions.
13821
13822 2001-03-28  Richard Henderson  <rth@redhat.com>
13823
13824         IA-64 ABI Exception Handling:
13825         * cp-tree.def (EH_SPEC_BLOCK): New.
13826         (MUST_NOT_THROW_EXPR): New.
13827         * cp-tree.h: Update changed function declarations.
13828         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
13829         (CPTI_CALL_UNEXPECTED): New.
13830         (struct cp_language_function): Rename x_eh_spec_try_block
13831         to x_eh_spec_block.
13832         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
13833         * decl.c (current_binding_level): If no current function
13834         bindings, revert to scope_chain.
13835         (initialize_predefined_identifiers): Remove __cp_push_exception.
13836         (store_parm_decls): Use begin_eh_spec_block.
13837         (finish_function): Use finish_eh_spec_block.
13838         (mark_lang_function): Update for name changes.
13839         * decl2.c (finish_file): No mark_all_runtime_matches.
13840         * dump.c (cp_dump_tree): Handle new tree codes.
13841         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
13842         * except.c (catch_language_init, catch_language): Remove.
13843         (init_exception_processing): Don't set language code.
13844         Initialize call_unexpected_node, protect_cleanup_actions,
13845         eh_personality_libfunc, lang_eh_runtime_type.
13846         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
13847         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
13848         (prepare_eh_type): Split out type canonicalizations ...
13849         (build_eh_type_type): ... from here.
13850         (build_eh_type_type_ref): Remove.
13851         (mark_all_runtime_matches): Remove.
13852         (build_exc_ptr): New.
13853         (do_begin_catch, do_end_catch): New.
13854         (do_pop_exception): Remove.
13855         (build_terminate_handler): Remove.
13856         (choose_personality_routine): Split out language choice from ...
13857         (initialize_handler_parm): ... here.
13858         Use MUST_NOT_THROW_EXPR.
13859         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
13860         exception object handling.
13861         (expand_start_eh_spec, expand_end_eh_spec): Remove.
13862         (expand_exception_blocks, alloc_eh_object): Remove.
13863         (begin_eh_spec_block, finish_eh_spec_block): New.
13864         (do_allocate_exception, do_free_exception): New.
13865         (expand_throw): Merge into ...
13866         (build_throw): ... here.  Update for abi.
13867         * expr.c (cplus_expand_expr): No expand_internal_throw.
13868         Handle MUST_NOT_THROW_EXPR.
13869         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
13870         * semantics.c (*) Update for except.h name changes.
13871         (genrtl_try_block): No protect_with_terminate.
13872         (genrtl_eh_spec_block): New.
13873         (genrtl_handler): Don't emit the goto here.
13874         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
13875         (genrtl_finish_function): Don't expand_exception_blocks.
13876         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
13877
13878 2001-03-28  Richard Henderson  <rth@redhat.com>
13879
13880         * decl.c (struct named_label_list): Rename eh_region to
13881         in_try_scope, add in_catch_scope.
13882         (struct binding_level): Rename eh_region to is_try_scope,
13883         add is_catch_scope.
13884         (note_level_for_try): Rename from note_level_for_eh.
13885         (note_level_for_catch): New.
13886         (poplevel): Copy both is_try_scope and is_catch_scope to
13887         the named_label_list struct.
13888         (check_previous_goto_1): Don't check for catch block via
13889         DECL_ARTIFICIAL; use in_try_scope instead.
13890         (check_goto): Likewise.
13891         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
13892         * except.c (expand_start_catch_block): Call note_level_for_catch.
13893         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
13894
13895 2001-03-27  Richard Henderson  <rth@redhat.com>
13896
13897         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
13898         exceptions_via_longjmp.
13899
13900 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
13901
13902         * pt.c (check_default_tmpl_args):  Make error messages clearer.
13903
13904 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
13905
13906         * error.c:  Also undefine 'A' macro used for cp_printers definition.
13907
13908 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13909
13910         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
13911
13912 2001-03-26  Mike Yang <yang@research.att.com>
13913             Mark Mitchell  <mark@codesourcery.com>
13914
13915         * dump.c (dump_access): New function.
13916         (cp_dump_tree): Use it.  Dump basetype information for class
13917         types.
13918
13919 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
13920
13921         * Makefile.in (optimize.o): Depend on params.h.
13922         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
13923         (init_decl_processing): Set flag_no_inline when doing
13924         inlining-on-trees.
13925         * optimize.c: Include params.h.
13926         (struct inline_data): Improve documentation of FNS.  Add
13927         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
13928         (INSNS_PER_STMT): New macro.
13929         (remap_block): Use CLONING_P.
13930         (inlinable_function_p): Don't inline big functions.
13931         (expand_call_inline): Keep track of how much inlining we've done.
13932         (optimize_function): Set FIRST_INLINED_FN.
13933         (maybe_clone_body): Set CLONING_P.
13934         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
13935         tree nodes.
13936         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
13937         rest_of_compilation.  Clear DECL_RTL for local variables
13938         afterwards.
13939         (clear_decl_rtl): New function.
13940
13941 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
13942
13943         Implement DR 209
13944         * cp-tree.h (skip_type_access_control,
13945         reset_type_access_control): Prototype.
13946         * decl.c (grokdeclarator): Access of friends is not checked.
13947         * parse.y (component_decl_list): Reset type access control.
13948         * semantics.c (decl_type_access_control): Clear
13949         current_type_lookups.
13950         (save_type_access_control): Don't save if not deferring.
13951         (skip_type_access_control, reset_type_access_control): New
13952         functions.
13953         (begin_class_definition): Do type access control for basetypes.
13954         Start deferred access control.
13955         (finish_class_definition): Resume immediate access control if
13956         this is a local class.
13957
13958 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13959
13960         * class.c (add_method): Use memcpy/memmove, not bcopy.
13961
13962         * decl.c (duplicate_decls): Likewise.
13963
13964 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
13965
13966         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
13967         not `_'.
13968
13969 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
13970
13971         * decl.c (local_names): Define.
13972         (push_local_name): New.
13973         (grok_reference_init): Return init if initializing static reference
13974         variable with non-constant instead of emitting it.
13975         Move expand_static_init call to cp_finish_decl.
13976         (layout_var_decl): Call push_local_name.
13977         (maybe_commonize_var): Allow inlining functions even if they have
13978         static local variables, use comdat_linkage for them if flag_weak.
13979         (check_initializer): Call obscure_complex_init if
13980         grok_reference_init returned nonzero.
13981         (save_function_data): Clear x_local_names.
13982         (pop_cp_function_context): Free x_local_names.
13983         (mark_inlined_fns): Remove.
13984         (mark_lang_function): Mark x_local_names.
13985         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
13986         Mark inlined_fns as tree, remove call to mark_inlined_fns.
13987         * class.c (alter_access): Ensure DECL_ACCESS is never set if
13988         DECL_DISCRIMINATOR_P.
13989         * cp-tree.h (cp_language_function): Add x_local_names.
13990         (lang_decl_flags): Add discriminator into u2.
13991         (lang_decl_inlined_fns): Remove.
13992         (lang_decl): inlined_fns is now a TREE_VEC.
13993         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
13994         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
13995         TREE_VEC, not a custom structure.
13996         (optimize_function): Likewise.
13997         * mangle.c (discriminator_for_local_entity): Discriminate among
13998         VAR_DECL local entities.
13999         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
14000         is not valid.
14001
14002 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
14003
14004         Add support for Java interface method calls.
14005         * cp-tree.h (struct lang_type): Add java_interface flag.
14006         (TYPE_JAVA_INTERFACE): New macro.
14007         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
14008         by setting TYPE_JAVA_INTERFACE.
14009         * call.c (java_iface_lookup_fn): New static.
14010         (build_over_call): If calling a method declared in a
14011         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
14012         expression which resolves the function address.
14013         (build_java_interface_fn_ref): New function.
14014
14015 2001-03-22  Richard Henderson  <rth@redhat.com>
14016
14017         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
14018         * except.c: Don't include it.
14019
14020 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
14021             based on an idea from Joe Buck <jbuck@synopsys.com>
14022
14023         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
14024         New nonterminals.
14025         (data_def, component_decl): Add reductions to bad_decl.
14026
14027 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
14028
14029         * method.c (do_build_assign_ref): Don't use build_modify_expr for
14030         anonymous aggregates, since they don't have assignment operator
14031         method.
14032         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
14033         assignment operators for anonymous structure fields.
14034
14035 2001-03-21  Jason Merrill  <jason@redhat.com>
14036
14037         * pt.c (instantiate_decl): Abort if we see a member constant
14038         instantiation that doesn't already have its initializer.
14039         Downgrade explicit instantiation without definition to pedwarn.
14040
14041         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
14042         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
14043         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
14044
14045         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
14046         (pending_vtables): Remove.
14047         * decl2.c (pending_vtables): Remove.
14048         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
14049         CLASSTYPE_VTABLE_NEEDS_WRITING.
14050         (import_export_class): Likewise.
14051         (init_decl2): Don't mark pending_vtables.
14052         * lex.c (handle_pragma_vtable): Just sorry.
14053         * pt.c (instantiate_class_template): Don't mess with
14054         CLASSTYPE_VTABLE_NEEDS_WRITING.
14055         (mark_class_instantiated): Likewise.
14056         * ptree.c (print_lang_type): Don't print it.
14057         * semantics.c (begin_class_definition): Don't set it.
14058
14059         * pt.c (template_tail): Replace with last_pending_template.
14060         (maybe_templates, maybe_template_tail): Remove.
14061         (add_pending_template): Adjust.
14062         (instantiate_pending_templates): Adjust.
14063
14064         * cp-tree.h (struct saved_scope): Remove lang_stack field.
14065         (current_lang_stack): Remove.
14066         * decl.c (maybe_push_to_top_level): Don't initialize it.
14067         (duplicate_decls): Use current_lang_depth.
14068         (xref_basetypes): Likewise.
14069         * class.c (current_lang_depth): New fn.
14070         (push_lang_context): Use more varray functionality.
14071         (pop_lang_context): Likewise.
14072
14073         * error.c (GLOBAL_THING): Always use '__'.
14074
14075 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
14076
14077         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
14078
14079         * mangle.c (mangle_decl_string): Mangle the names of overloaded
14080         operators, even when they have `extern "C"' linkage.
14081
14082 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
14083
14084         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
14085         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
14086         where it's not necessary.
14087         (add_method): Remove optimization involving comparison of
14088         DECL_ASSEMBLER_NAME.
14089         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
14090         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
14091         where it's not necessary.
14092         (check_methods): Likewise.
14093         (build_clone): Likewise.
14094         (built_vtt): Likewise.
14095         * cp-tree.h (DECL_NEEDED_P): Likewise.
14096         * decl.c (pushtag): Likewise.
14097         (duplicate_decls): Likewise.
14098         (pushdecl): Likewise.
14099         (builtin_function): Likewise.
14100         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
14101         (build_cp_library_fn): Likewise.
14102         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
14103         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
14104         where it's not necessary.
14105         (make_rtl_for_nonlocal_decl): Likewise.
14106         (cp_finish_decl): Likewise.
14107         (grokfndecl): Likewise.
14108         (grokvardecl): Likewise.
14109         (grokdeclarator): Likewise.
14110         (start_function): Likewise.
14111         (cp_missing_return_ok_p): Likewise.
14112         * decl2.c (grokclassfn): Likewise.
14113         (check_classfn): Likewise.
14114         (finish_static_data_member_decl): Likewise.
14115         (grokfield): Likewise.
14116         * error.c (GLOBAL_IORD_P): Remove.
14117         (dump_global_iord): Improve output.
14118         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
14119         * except.c (nothrow_libfn_p): Summarily reject any function not in
14120         namespace-scope.
14121         * init.c (build_java_class_ref): Don't explicitly set
14122         DECL_ASSEMBLER_NAME after calling mangle_decl.
14123         * mangle.c (mangle_decl_string): Handle extern "C" functions.
14124         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
14125         * method.c (set_mangled_name_for_decl): Don't explicitly set
14126         DECL_ASSEMBLER_NAME after calling mangle_decl.
14127         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
14128         IDENTIFIER_GLOBAL_VALUE for the thunk.
14129         * pt.c (set_mangled_name_for_template_decl): Remove.
14130         (check_explicit_specialization): Don't use it.
14131         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
14132         (tsubst_friend_function): Likewise.
14133         (tsubst_decl): Likewise.
14134         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
14135         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
14136         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
14137         where it's not necessary.
14138         (tinfo_base_init): Likewise.
14139         (create_real_tinfo_var): Likewise.
14140         * search.c (looup_field_1): Likewise.
14141         * semantics.c (finish_named_return_value): Likewise.
14142         * tree.c (init_tree): Set lang_set_decl_assembler_name.
14143
14144 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
14145
14146         Correct semantics restrictions checking in throw-expression.
14147         * except.c (is_admissible_throw_operand): New function.
14148         (build_throw): Use it.
14149
14150 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
14151
14152         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
14153         and its ilk.
14154
14155 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
14156
14157         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
14158         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
14159         * decl.c (duplicate_decls): Likewise.
14160         (builtin_function): Likewise.
14161         (build_library_fn): Likewise.
14162         (build_cp_library_fn): Likewise.
14163         (check_initializer): Likewise.
14164         (cp_finish_decl): Likewise.
14165         * decl2.c (grokfield): Likewise.
14166         (grok_function_init): Remove #if 0'd code.
14167         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
14168         * friend.c (do_friend): Likewise.
14169         * init.c (get_temp_regvar): Likewise.
14170         * method.c (make_thunk): Likewise.
14171         * pt.c (tsubst_friend_function): Likewise.
14172         (tsubst_decl): Likewise.
14173         (regenerate_decl_from_template): Likewise.
14174         * semantics.c (genrtl_named_return_value): Likewise.
14175         (expand_body): Likewise.
14176         (genrtl_finish_function): Likewise.
14177         * tree.c (cp_tree_equal): Likewise.
14178
14179 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
14180
14181         * call.c (convert_like_real): Add extra semantics to INNER
14182         parameter. Don't convert to temporary if a user conversion
14183         gives us an lvalue that we're about to bind to a reference.
14184         Set INNER to indicate pending reference binding on recursive
14185         calls.
14186
14187 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
14188
14189         * cp/lex.c: Delete duplicate pending_lang_change.
14190
14191 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
14192
14193         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
14194         Similarly.
14195         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
14196         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
14197
14198 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
14199
14200         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
14201
14202 2001-03-08  Stan Shebs  <shebs@apple.com>
14203
14204         * cp-tree.h (set_identifier_local_value): Remove unused decl.
14205
14206 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
14207
14208         * spew.c: Remove references to CPP_OSTRING.
14209
14210 2001-03-06  Andrew Haley  <aph@redhat.com>
14211
14212         * typeck.c (convert_arguments): Check that we have an fndecl.
14213
14214 2001-03-05  Andrew Haley  <aph@redhat.com>
14215
14216         * typeck.c (convert_arguments): Don't do ellipsis conversion for
14217         __built_in_constant_p.
14218
14219 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
14220
14221         * typeck.c (build_static_cast): Allow enum to enum conversions
14222         as per DR 128.
14223
14224 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
14225
14226         * class.c (check_field_decls): Pointers to member do not a
14227         non-pod struct make, as per DR 148.
14228
14229 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
14230
14231         * call.c (joust): cp_pedwarn when using gnu extension concerning
14232         worst conversion sequences.
14233
14234 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
14235
14236         * decl.c: Replace all uses of 'boolean' with 'bool'.
14237
14238 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
14239
14240         * lang-specs.h: Add zero initializer for cpp_spec field to
14241         all array elements that need one.  Don't put an #ifdef inside
14242         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
14243         use it.
14244
14245 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
14246
14247         Implement using decls inside template functions.
14248         * decl2.c (validate_nonmember_using_decl): Don't special case
14249         fake_std_node in the global namespace. Don't reject early when
14250         processing a template.
14251         (do_local_using_decl): Add to statement tree. Don't do further
14252         processing when building a template.
14253         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
14254
14255 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
14256
14257         * decl2.c (do_nonmember_using_decl): Don't complain if we find
14258         same function. Do complain about ambiguating extern "C"
14259         declarations.
14260
14261 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
14262
14263         Remove floating point and complex type template constant parms.
14264         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
14265         COMPLEX_TYPE extensions.
14266         (invalid_nontype_parm_type_p): Likewise.
14267
14268 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
14269
14270         * except.c (call_eh_info): Revert "match_function"'s type.
14271
14272 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
14273
14274         Fix ctor vtable vcall offsets.
14275         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
14276         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
14277         (get_matching_base): Remove.
14278         (get_original_base): New function.
14279         (build_vtbl_initializer): Initialize vid.rtti_binfo.
14280         Use a virtual thunk for a ctor vtable with an index
14281         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
14282         primary base within a constructor vtable. Only set
14283         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
14284         when primary base has been lost.
14285         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
14286
14287 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
14288
14289         * call.c (joust): Ensure more_specialized()'s argument length
14290         parameter has correct value for constructors.
14291
14292 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
14293
14294         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
14295
14296         * decl.c (mark_inlined_fns): Prototype.
14297
14298 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
14299
14300         * spew.c (yylex): Correct handling of friends.
14301
14302 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
14303
14304         * mangle.c (write_encoding): Pass write_function_type the
14305         FUNCTION_DECL for the function being encoded.
14306         (write_function_type): Pass it along to write_bare_function_type.
14307         (write_bare_function_type): Pass it along to write_method_parms.
14308         (write_method_parms): Don't mangle the compiler-generated
14309         parameters to a constructor or destructor.
14310
14311 2001-02-22  Andreas Jaeger  <aj@suse.de>
14312
14313         * optimize.c: Include toplev.h for
14314         note_deferral_of_defined_inline_function prototype.
14315
14316 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
14317
14318         * cp-tree.h (struct lang_decl_inlined_fns): New.
14319         (struct lang_decls): Add inlined_fns.
14320         (DECL_INLINED_FNS): New macro.
14321         * optimize.c (struct inline_data): Add inlined_fns.
14322         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
14323         (inlinable_function_p): Likewise, fix typo in comment,
14324         function is not inlinable if it already inlined function currently
14325         being optimized.
14326         (expand_call_inline): Add fn to inlined_fns if necessary.
14327         (optimize_function): Initialize inlined_fns.
14328         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
14329         * decl.c (mark_inlined_fns): New function.
14330         (lang_mark_tree): Call it.
14331
14332 2001-02-21  Jason Merrill  <jason@redhat.com>
14333
14334         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
14335         (DECL_UNINLINABLE): Move to middle-end.
14336
14337         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
14338         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
14339         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
14340         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
14341         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
14342
14343         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
14344         second parm of op=.
14345
14346 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
14347
14348         * decl2.c (set_decl_namespace): Allow explicit instantiations in
14349         any namespace.
14350
14351 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14352
14353         * optimize.c (expand_call_inline): Don't walk subtrees of type
14354         nodes.
14355
14356 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
14357
14358         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
14359         for a destructor.
14360
14361 2001-02-18  Jason Merrill  <jason@redhat.com>
14362
14363         Do put the VTT parameter in DECL_ARGUMENTS.
14364         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
14365         (current_vtt_parm): New macro.
14366         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
14367         (DECL_HAS_VTT_PARM_P): New macro.
14368         (DECL_VTT_PARM): Remove.
14369         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
14370         * decl.c (duplicate_decls): Only copy the operator code if
14371         appropriate.
14372         (start_function): Set current_vtt_parm.
14373         (lang_mark_tree): Don't mark vtt_parm.
14374         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
14375         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
14376         * class.c (build_clone): Maybe remove the VTT parm.
14377         * optimize.c (maybe_clone_body): Set up the VTT parm.
14378         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
14379         * call.c (build_over_call): Just allow the VTT arg.
14380         * method.c (make_thunk): Don't set DECL_VTT_PARM.
14381         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
14382         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
14383         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
14384         * error.c (dump_function_decl): Likewise.
14385         * call.c (build_user_type_conversion_1, convert_like_real): Abort
14386         if we try to call a constructor with in-charge or VTT parms.
14387         * method.c (skip_artificial_parms_for): New fn.
14388         * call.c (add_function_candidate, build_over_call): Call it.
14389         * call.c (build_new_method_call): Use current_vtt_parm.
14390         * init.c (expand_virtual_init): Likewise.
14391         * class.c (same_signature_p): No longer static.
14392         * cp-tree.h: Declare it.
14393         * search.c (look_for_overrides_r): Use it.
14394
14395 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
14396
14397         * cp-tree.h (new_abi_rtti_p): Remove.
14398         (name_mangling_version): Likewise.
14399         (flag_do_squangling): Likewise.
14400         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
14401         * decl.c (grokfndecl): Likewise.
14402         * decl2.c (name_mangling_version): Remove.
14403         (flag_do_squangling): Likewise.
14404         (lang_f_options): Remove `squangle'.
14405         (unsupported_options): Add `squangle'.
14406         (cxx_decode_option): Issue a warning about uses of
14407         -fname-mangling-version.
14408         (finish_file): Remove old ABI support.
14409         * pt.c (check_explicit_specialization): Likewise.
14410         (tsubst_decl): Likewise.
14411         * rtti.c (init_rtti_processing): Likewise.
14412         (build_headof): Likewise.
14413         (get_tinfo_decl_dynamic): Likewise.
14414         (tinfo_from_decl): Likewise.
14415         (build_dynamic_cast_1): Likewise.
14416         (synthesize_tinfo_var): Likewise.
14417         * init.c (build_new): Allow enumeration types for the array-bounds
14418         in a direct-new-declarator.
14419
14420         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
14421
14422         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
14423         TREE_PROTECTED from the template being specialized.
14424
14425 2001-02-17  Jason Merrill  <jason@redhat.com>
14426
14427         * decl2.c (build_artificial_parm): Set TREE_READONLY.
14428
14429         * decl.c (bad_specifiers): Allow throw specs on things with
14430         pointer-to-function or -member-function type.
14431         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
14432         a pmf.
14433
14434 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
14435
14436         * call.c (check_dtor_name): Handle template names correctly.
14437
14438 2001-02-16  Jason Merrill  <jason@redhat.com>
14439
14440         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
14441         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
14442         * optimize.c (maybe_clone_body): Don't substitute it.
14443         * call.c (build_new_method_call): Check in_chrg instead.
14444         * init.c (expand_virtual_init): Likewise.
14445
14446 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
14447
14448         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
14449         class-type introduces at least a type-name.
14450
14451 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
14452
14453         * call.c (convert_like_real): Create a temporary for non-lvalue.
14454
14455 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
14456
14457         * cp-tree.h: Fix typos in comments.
14458
14459 2001-02-16  Jason Merrill  <jason@redhat.com>
14460
14461         * optimize.c (remap_block): If we're compiling a clone, pass the
14462         new block to insert_block.
14463
14464 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
14465
14466         * semantics.c (finish_asm_stmt): Robustify.
14467
14468 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
14469
14470         * pt.c (push_template_decl_real): Don't remangle the name of a
14471         class template.
14472
14473 2001-02-15  Jim Meyering  <meyering@lucent.com>
14474
14475         * Make-lang.in (c++.install-common): Depend on installdirs.
14476         (c++.install-info): Likewise.
14477         (c++.install-man): Likewise.
14478
14479 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
14480
14481         * typeck2.c (build_m_component_ref): Robustify.
14482
14483 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
14484
14485         * friend.c (do_friend): Don't take the nested [template] class
14486         into account when deciding whether to warn about the friend
14487         function not referring to a template function.
14488
14489 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
14490
14491         * typeck.c (build_unary_op): Clarify error message.
14492
14493 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
14494
14495         * parse.y (component_constructor_declarator): allow optional
14496         parentheses around constructor class name.
14497
14498 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
14499
14500         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
14501         section.
14502         * init.c (emit_base_init): Remove incorrect comment about
14503         virtual bases.
14504         * method.c (make_thunk): Fix comment alignment.
14505
14506 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
14507
14508         Kill remnants of this is variable.
14509         * cp-tree.h (flag_this_is_variable): Remove.
14510         * decl2.c (flag_this_is_variable): Remove.
14511         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
14512         (build_vbase_path): The path is non-static, even in a cdtor.
14513         (resolves_to_fixed_type_p): Add additional return value.
14514         * search.c (init_vbase_pointers): Adjust.
14515         * tree.c (lvalue_p_1): Adjust.
14516         * typeck.c (mark_addressable): Adjust.
14517
14518 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
14519
14520         * pt.c (unify): Don't check cv quals of array types.
14521
14522 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
14523
14524         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
14525         check whether we already have the type.
14526
14527 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
14528
14529         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
14530         * call.c (build_op_delete_call): Simplify to remove duplicate
14531         code.
14532         * class.c (clone_function_decl): Don't build the deleting variant
14533         of a non-virtual destructor.
14534         * decl.c (finish_destructor_body): Don't call delete if this is a
14535         non-virtual destructor.
14536         * init.c (build_delete): Explicitly call `operator delete' when
14537         deleting an object with a non-virtual destructor.
14538
14539 2001-02-13  Jason Merrill  <jason@redhat.com>
14540
14541         * lang-specs.h: Add more __EXCEPTIONS.
14542
14543 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
14544
14545         * typeck2.c (process_init_constructor): Check
14546         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
14547
14548 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
14549
14550         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
14551         Remove spurious information in comment. Allow further
14552         adjustments of REFERENCE_TYPE args.
14553
14554 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
14555
14556         * errfn.c (cp_deprecated): Tweak diagnostic text.
14557         * parse.y (new_initializer): Deprecate initializer lists
14558         extension.
14559
14560 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
14561
14562         Remove old ABI support.
14563
14564 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
14565
14566         * decl2.c (flag_vtable_thunks): Always set it to 1.
14567         (flag_new_abi): Likewise.
14568         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
14569
14570         * Makefile.in (g++spec.o): Fix typo.
14571
14572 2001-02-09  Jason Merrill  <jason@redhat.com>
14573
14574         * lang-specs.h: Restore definition of __EXCEPTIONS.
14575
14576 2001-02-08  Jason Merrill  <jason@redhat.com>
14577
14578         * search.c (shared_member_p): New function.
14579         (lookup_field_r): Use it.
14580         * cp-tree.h (SHARED_MEMBER_P): Remove.
14581
14582         * method.c (process_overload_item): Handle template-dependent array
14583         bounds.
14584         * pt.c (type_unification_real): If we end up with undeduced nontype
14585         parms, try again.
14586
14587         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
14588         types.
14589
14590         * typeck2.c (friendly_abort): Don't say anything if we have
14591         earlier errors or sorries.
14592
14593         * decl.c (check_tag_decl): Notice attempts to redefine bool and
14594         wchar_t.  Ignore if in_system_header.
14595
14596         * decl.c (maybe_push_cleanup_level): New fn...
14597         (start_decl_1): ...split out from here.
14598         * cvt.c (build_up_reference): Use it.
14599         * cp-tree.h: Declare it.
14600
14601 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
14602
14603         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
14604         spec.
14605
14606 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
14607
14608         * pt.c (lookup_template_class): Make sure it's a primary
14609         template or template_template_parm when called from the parser.
14610         (instantiate_template_class): Add assertion.
14611
14612 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
14613
14614         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
14615         from error_mark_node.
14616
14617 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
14618
14619         Fix specification and implementation bugs in V3 ABI
14620         construction vtables.
14621         * cp-tree.h (flag_dump_class_layout): New flag.
14622         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
14623         (BINFO_LOST_PRIMARY_P): New flag.
14624         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
14625         (BINFO_PRIMARY_MARKED_P): Rename to ...
14626         (BINFO_PRIMARY_P): ... here.
14627         (binfo_via_virtual): New prototype.
14628         * decl2.c (flag_dump_class_layout): New flag.
14629         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
14630         use `=' as a file name separator.
14631         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
14632         bases.
14633         (build_vtbl_address): If this is a virtual primary base, then
14634         get the vtbl of what it is ultimately primary for.
14635         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
14636         for BINFO_PRIMARY_P.
14637         (dfs_skip_nonprimary_vbases_markedp): Likewise.
14638         (get_shared_vbase_if_not_primary): Likewise.
14639         (dfs_get_pure_virtuals): Likewise.
14640         (expand_upcast_fixups): Likewise.
14641         (fixup_virtual_upcast_offsets): Likewise.
14642         (dfs_find_vbase_instance): Likewise.
14643         (find_vbase_instance): Likewise.
14644         (binfo_from_vbase): Adjust comment to reflect reality.
14645         (binfo_via_virtual): New function.
14646         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
14647         for binfo walking during VTT construction.
14648         (dfs_mark_primary_bases): Remove.
14649         (force_canonical_binfo_r): New function.
14650         (force_canonical_binfo): New function.
14651         (mark_primary_virtual_base): New function.
14652         (mark_primary_bases): Walk in inheritance graph order, use
14653         mark_primary_virtual_base.
14654         (determine_primary_base): Use some more intermediate variables.
14655         (dfs_find_final_overrider): Don't check for overriding along a
14656         virtual path.
14657         (dfs_modify_vtables): Walk into primary virtual bases too.
14658         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
14659         (build_base_fields): Likewise.
14660         (dfs_set_offset_for_unshared_vbases): Likewise.
14661         (layout_virtual_bases): Likewise.
14662         (end_of_class): Likewise.
14663         (finish_struct_1): Call dump_class_hierarchy, if requested.
14664         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
14665         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
14666         (dump_class_hierarchy): Add file parameter. Append to file, if
14667         required.
14668         (finish_vtbls): Adjust accumulate_vtbl_inits call.
14669         Use canonical base for virtual bases.
14670         (build_vtt): Add more comments. Adjust build_vtt_inits call.
14671         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
14672         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
14673         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
14674         virtual VTTs.
14675         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
14676         from DATA.  We want virtual primary bases and all bases via virtual.
14677         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
14678         virtual base when not a construction vtable.
14679         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
14680         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
14681         Use canonical bases when processing virtual bases.
14682         (accumulate_vtbl_inits): We're interested in any base via a
14683         virtual path.
14684         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
14685         within a construction vtable, determine what is being overridden.
14686         (build_vtbl_initializer): Add more comments
14687         (add_vcall_offset_vtbl_entries_1): Adjust comment.
14688         (build_rtti_vtbl_entries): Check if the base has lost its
14689         primary.
14690
14691 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
14692
14693         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
14694
14695 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14696
14697         * decl.c (pushdecl): Call abort instead of fatal.
14698         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
14699         * init.c (build_new_1): Likewise.
14700         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
14701         * decl.c (build_typename_type): hash_table_init now returns void.
14702         decl.c (init_decl_processing): Make an error non-fatal.
14703
14704 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
14705
14706         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
14707         Document.
14708         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
14709         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
14710         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
14711         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
14712         * decl.c (maybe_commonize_var): Use the new name-mangling where
14713         appropriate.
14714         * decl2.c (comdat_linkage): Enhance comments.  Make all
14715         compiler-generated things static, if COMDAT is not available.
14716         (get_tinfo_decl): Do not make typeinfo objects that belong in the
14717         library COMDAT.
14718         (tinfo_base_init): Use the correct mangled name for typeinfo
14719         strings, and push them into the global scope.
14720         (typeinfo_in_lib_p): New function.
14721         (synthesize_tinfo_var): Use it.
14722         (create_real_tinfo_var): Likewise.
14723
14724 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
14725
14726         * decl.c (push_class_binding): Use context_for_name_lookup instead
14727         of CP_DECL_CONTEXT.
14728         * search.c (context_for_name_lookup): Remove static.  Check for NULL
14729         context in the loop.
14730         * cp-tree.h (context_for_name_lookup): Add prototype.
14731
14732 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
14733
14734         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
14735         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
14736         Remove.
14737         * call.c (convert_class_to_reference, build_user_type_conversion_1,
14738         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
14739
14740 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
14741
14742         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
14743         of macros used when compiling g++spec.c.
14744         * g++spec.c (lang_specific_driver): Link with the shared
14745         libgcc by default.
14746
14747 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
14748
14749         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
14750         make_reference_declarator, make_call_declarator), method.c
14751         (implicitly_declare_fn), parse.y (namespace_using_decl,
14752         notype_unqualified_id, expr_or_declarator, new_type_id,
14753         after_type_declarator, direct_after_type_declarator,
14754         notype_declarator, complex_notype_declarator,
14755         complex_direct_notype_declarator, qualified_id,
14756         notype_qualified_id, overqualified_id, direct_new_declarator,
14757         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
14758         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
14759         instead of build_parse_node.
14760
14761 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14762
14763         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
14764         (minus_one_node): Moved to top level gcc directory.  Renamed
14765         to integer_minus_one_node.
14766
14767         * init.c (init_init_processing): Don't set minus_one_node.
14768         (build_vec_init): Use integer_minus_one_node.
14769
14770         * rtti.c (get_tinfo_decl_dynamic): Likewise.
14771
14772 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
14773
14774         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
14775         identical and they would be replaced with constant, remove
14776         MODIFY_EXPR from the tree.
14777
14778 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14779
14780         * Make-lang.in: Remove all dependencies on defaults.h.
14781         * call.c: Don't include defaults.h.
14782         * decl.c: Likewise.
14783         * decl2.c: Likewise.
14784         * except.c: Likewise.
14785         * pt.c: Likewise.
14786         * rtti.c: Likewise.
14787         * tree.c: Likewise.
14788         * typeck.c: Likewise.
14789
14790 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
14791
14792         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
14793         operators even in "C" linkage.
14794         * method.c (set_mangled_name_for_decl): Likewise.
14795         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
14796         overloaded operators in "C" linkage.
14797
14798 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
14799
14800         * pt.c (tsubst_decl): Remove IN_DECL parameter.
14801         (tsubst_arg_types): Check parameter is not void.
14802         (tsubst): Adjust tsubst_decl call.
14803
14804 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
14805
14806         * call.c (add_builtin_candidate): Quote std properly, from
14807         previous change.
14808
14809 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14810
14811         * pt.c (check_explicit_specialization): Clone constructors and
14812         destructors.
14813
14814 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
14815
14816         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
14817         indicates anything special about template depth. Make sure we
14818         only count the user visible template classes.
14819
14820 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
14821
14822         * call.c (build_conv): Typo in comment.
14823         (add_builtin_candidate): Add more explanation.
14824         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
14825         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
14826         when we have enumeral types.
14827         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
14828         candidates for relops and eqops.
14829         (joust): Simplify control flow. Allow a non-template user
14830         function to hide a builtin.
14831
14832 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
14833
14834         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
14835         (more_specialized): Add deduction parameter.
14836         * call.c (joust): Adjust more_specialized call.
14837         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
14838         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
14839         (get_bindings_order): Remove.
14840         (get_bindings_real): Add DEDUCE parameter.
14841         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
14842         REFERENCE_TYPE jig for DEDUCE_ORDER.
14843         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
14844         maybe_adjust_types_for_deduction.
14845         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
14846         directly.
14847         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
14848         (check_cv_quals_for_unify): Use new unify qualifier flags.
14849         (unify): Clear new unify qualifier flags.
14850         (get_bindings_real): Add DEDUCE parameter.
14851         (get_bindings): Adjust call to get_bindings_real.
14852         (get_bindings_overload): Likewise.
14853         (most_specialized_instantiation): Adjust call to
14854         more_specialized.
14855
14856 2001-01-19  Jason Merrill  <jason@redhat.com>
14857
14858         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
14859
14860         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
14861         -fnew-abi.
14862
14863 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
14864
14865         * decl2.c (arg_assoc_class): Fix double iteration logic.
14866
14867 2001-01-19  Jason Merrill  <jason@redhat.com>
14868
14869         * init.c (build_delete): Always call convert_force to strip cv-quals.
14870
14871         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
14872         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
14873         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
14874
14875 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
14876
14877         * search.c (get_vbase_1): Count only virtual bases.
14878
14879 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
14880
14881         * class.c (duplicate_tag_error): Robustify flag clearing.
14882
14883 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
14884
14885         * cp-tree.h (lookup_template_class): Add complain parm.
14886         * decl.c (lookup_namespace_name): Adjust call to
14887         lookup_template_class.
14888         (make_typename_type): Likewise.
14889         * semantics.c (finish_template_type): Likewise.
14890         * pt.c (lookup_template_class): Add complain parm. Adjust.
14891         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
14892         (tsubst): Likewise.
14893
14894 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
14895
14896         * pt.c (copy_default_args_to_explicit_spec): Preserve
14897         object's CV quals. Reorganize.
14898
14899 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
14900
14901         * typeck.c (build_modify_expr): Say `initialization' for
14902         INIT_EXPRs.
14903         * init.c (build_default_init): Convert to enumeral type, if
14904         needed.
14905
14906 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
14907
14908         * parse.y (nomods_initdcl0): Properly set things up for
14909         initdcl0_innards.
14910
14911 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
14912
14913         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
14914         (type_unification_real): Set it.
14915         (unify): Use it.
14916
14917 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
14918
14919         * decl.c (finish_destructor_body): Convert to vbase pointer here.
14920
14921 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
14922
14923         * semantics.c (begin_class_definition): Check we're not inside a
14924         template parm list.
14925
14926 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
14927
14928         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
14929         BASELINK_P.
14930
14931 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14932
14933         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
14934         * call.c (build_over_call): Add comment.
14935
14936 2001-01-16 Daniel Berlin <dberlin@redhat.com>
14937
14938         * cvt.c (ocp_convert): Handle vector type conversion
14939         * typeck2.c (digest_init): Handle vector type initializations
14940
14941 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
14942
14943         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
14944           was given.
14945
14946 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
14947
14948         * pt.c (check_nontype_parm): Rename to ...
14949         (invalid_nontype_parm_type_p): ... here.
14950         (process_template_parm): Adjust.
14951         (convert_template_argument): Adjust.
14952
14953 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
14954
14955         * pt.c (check_nontype_parm): New function.
14956         (process_template_parm): Use it.
14957         (convert_template_argument): Use it.
14958         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
14959         member.
14960
14961 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
14962
14963         * tree.c: Add defaults.h
14964         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
14965         * Make-lang.in (cp/tree.o): Add defaults.h.
14966
14967 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
14968
14969         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
14970
14971 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
14972
14973         * g++.1: Change to be ".so man1/gcc.1".
14974
14975 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
14976
14977         * Make-lang.in (c++.info, c++.install-info): Build and install g++
14978         internals info.
14979         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
14980         ($(srcdir)/cp/g++int.info): New target.
14981         * gxxint.texi: Add info directory entry.  Use @@ in email address.
14982         * .cvsignore: Update.
14983
14984 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
14985
14986         * typeck.c (build_c_cast): Do template processing earlier.
14987         Always pedwarn on array casts.
14988
14989 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
14990
14991         * friend.c (make_friend_class): Make sure a templated class is
14992         actually a template.
14993
14994 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14995
14996         * decl2.c (get_guard): Set linkage from guarded decl.
14997
14998 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14999
15000         * call.c (convert_default_arg): Check for unprocessed
15001         DEFAULT_ARG.
15002         * cp-tree.h (replace_defarg): Move to spew.c.
15003         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
15004         spew.c, which is where they really are.
15005         (done_pending_defargs): Declare.
15006         (unprocessed_defarg_fn): Declare.
15007         * decl.c (replace_defarg): Move to spew.c
15008         * parse.y (structsp): Call done_pending_defargs.
15009         * spew.c (defarg_fns): Rearrange list structure.
15010         (defarg_fnsdone): New static variable.
15011         (defarg_depfns): New static variable.
15012         (init_spew): Adjust.
15013         (add_defarg_fn): Store the type in TREE_TYPE.
15014         (do_pending_defargs): Detect and deal with ordering constraints
15015         and circularity.
15016         (done_pending_defargs): New function.
15017         (unprocessed_defarg_fn): New function.
15018         (replace_defarg): Moved from decl.c. Robustify. Don't save
15019         if circularity detected.
15020
15021 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
15022
15023         * pt.c (unify): Check array has a domain, before checking
15024         whether it is variable sized.
15025
15026 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
15027
15028         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
15029         parameters with pointers to arrays of unknown bound.
15030
15031 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
15032
15033         * parse.y (template_parm_header, template_spec_header): New
15034         reductions. Split out from ...
15035         (template_header): ... here. Use them.
15036         (template_template_parm): Use template_parm_header.
15037         * semantics.c (finish_template_template_parm): Add assert.
15038
15039 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
15040
15041         * mangle.c (write_builtin_type): Fix thinko.
15042
15043         * pt.c (copy_default_args_to_explicit_spec_1): New function.
15044         (copy_default_args_to_explicit_spec): Likewise.
15045         (check_explicit_specialization): Use it.
15046
15047         * class.c (finish_struct_1):  Remove last argument in call to
15048         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
15049         * decl.c (builtin_function): Likewise.
15050         (build_cp_library_fn): Likewise.
15051         (check_initializer): Likewise.
15052         (make_rtl_for_nonlocal_decl): Likewise.
15053         (cp_finish_decl): Likewise.
15054         (start_function): Likewise.
15055         * decl2.c (finish_anon_union): Likewise.
15056         * friend.c (do_friend): Likewise.
15057         * init.c (build_java_class_ref): Likewise.
15058         * method.c (make_thunk): Likewise.
15059         * pt.c (tsubst_friend_function): Likewise.
15060         * semantics.c (expand_body): Likewise.
15061
15062 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
15063
15064         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
15065         looking at DECL_CLONED_FUNCTION for non-functions.
15066
15067 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
15068
15069         * error.c (dump_template_parameter): Use parm to determine how
15070         to print default value.
15071
15072 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
15073
15074         * class.c (duplicate_tag_error): Clear more flags.
15075
15076 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
15077
15078         * call.c (build_new_method_call): Use binfo_for_vbase.
15079
15080 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
15081
15082         * cp-tree.h (flag_cond_mismatch): Don't declare.
15083         * decl2.c (flag_cond_mismatch): Don't define.
15084         (lang_f_options): Remove cond-mismatch.
15085         (unsupported_options): Add cond-mismatch.
15086
15087 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
15088
15089         * class.c (handle_using_decl): Reject using of constructor name
15090         of sourcing class. Allow injecting of a method with same name as
15091         nested class. Fixup error messages.
15092
15093 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
15094
15095         * decl2.c (lang_decode_option): Handle -Wformat=2.
15096
15097 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
15098
15099         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
15100         initialized_in_class.
15101         (DECL_DEFINED_IN_CLASS_P): Rename to ...
15102         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
15103         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
15104         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
15105         * pt.c (check_default_tmpl_args): Adjust for
15106         DECL_INITIALIZED_IN_CLASS_P.
15107         (instantiate_class_template): Likewise.
15108         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
15109
15110         * class.c (finish_struct): Constify saved_filename.
15111
15112 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
15113
15114         * class.c (duplicate_tag_error): Adjust diagnostic.
15115         (finish_struct): Locally set location to start of struct.
15116         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
15117
15118 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
15119
15120         * decl.c (struct binding_level): Adjust class_shadowed comments
15121         to reflect reality.
15122         (push_class_level_binding): Adjust comments to reflect reality.
15123         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
15124         Don't set TREE_VALUE on the class_shadowed list.
15125
15126 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15127
15128         * decl2.c (acceptable_java_type): Allow references too.
15129         * init.c (build_java_class_ref): When using the new ABI, search
15130         `class$' and have it mangled with `mangle_decl.'
15131         * mangle.c (write_java_integer_type_codes): New function.
15132         (write_builtin_type): Detect and mangle Java integer and real
15133         types.
15134
15135 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
15136
15137         * decl2.c (grokfield): Don't accept `asm' specifiers for
15138         non-static data members.
15139
15140 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15141
15142         * expr.c (cplus_expand_expr): Don't reset `target'.
15143
15144 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
15145
15146         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
15147
15148 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
15149
15150         * parse.y (template_datadef): Check for error_mark_node.
15151
15152 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
15153
15154         * cp-tree.def (DEFAULT_ARG): Make `x' class.
15155
15156 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
15157
15158         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
15159         (record_builtin_type): Make non-static.
15160         (flag_short_double): Don't declare.
15161         (init_decl_processing): Remove the creation of many tree nodes now
15162         in c_common_nodes_and_builtins.
15163         (build_void_list_node): New function.
15164         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
15165         * cp-tree.h (flag_short_wchar): Don't declare.
15166
15167 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
15168
15169         * call.c (build_conv): Don't use build1 for USER_CONV.
15170         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
15171
15172 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
15173
15174         * lex.c (lang_init): Call c_common_lang_init.
15175
15176 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
15177
15178         * search.c (lookup_fnfields_here): Remove.
15179         (look_for_overrides_r): Use lookup_fnfields_1.
15180         Ignore functions from using declarations.
15181
15182 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
15183
15184         Implement exceptions specifiers for implicit member functions.
15185         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
15186         * method.c (synthesize_exception_spec): New function.
15187         (locate_dtor, locate_ctor, locate_copy): New functions.
15188         (implicitly_declare_fn): Generate the exception spec too.
15189         * search.c (check_final_overrider): Check artificial functions
15190         too.
15191         * typeck2.c (merge_exception_specifiers): New function.
15192
15193 2001-01-03  Jason Merrill  <jason@redhat.com>
15194
15195         * init.c (build_default_init): New fn.
15196         (perform_member_init): Split out from here.
15197         (build_new_1): Use it.  Simplify initialization logic.
15198         (build_vec_init): Take an array, rather than a pointer and maxindex.
15199         Speed up simple initializations.  Don't clean up if we're assigning.
15200         * cp-tree.h: Adjust.
15201         * decl2.c (do_static_initialization): Remove TREE_VEC case.
15202         * parse.y (new_initializer): Return void_zero_node for ().
15203         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
15204         * typeck2.c (digest_init): Only complain about user-written
15205         CONSTRUCTORs.
15206
15207 2000-12-22  Mike Stump  <mrs@wrs.com>
15208
15209         * decl2.c: (max_tinst_depth): Increase to 50.
15210
15211 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
15212
15213         * class.c (invalidate_class_lookup_cache): Zero the
15214         previous_class_values.
15215         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
15216         TREE_INT_CST_HIGH.
15217         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
15218         * decl.c (free_bindings): New variable.
15219         (push_binding): Don't create a new binding if we have one on the
15220         free list.
15221         (pop_binding): Put old bindings on the free list.
15222         (init_decl_processing): Use size_int, not build_int_2.
15223         Register free_bindings as a GC root.
15224         (cp_make_fname_decl): Use size_int, not build_int_2.
15225         (push_inline_template_parms_recursive): Likewise.
15226         (end_template_parm_list): Likewise.
15227         (for_each_template_parm): Do not use walk_tree_without_duplicates.
15228         (tsubst_template_parms): Use size_int, not build_int_2.
15229         (tsubst): Likewise.
15230         * rtti.c (get_vmi_pseudo_type_info): Likewise.
15231
15232 2001-01-02  Richard Henderson  <rth@redhat.com>
15233
15234         * parse.y (asm): Set ASM_INPUT_P.
15235
15236 2001-01-02  Jason Merrill  <jason@redhat.com>
15237
15238         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
15239         for v3 ABI.
15240
15241         * typeck.c (cp_truthvalue_conversion): New fn.
15242         * cvt.c (ocp_convert): Use it.
15243
15244         * cp-tree.h: Lose c-common.c decls.
15245
15246         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
15247         * cvt.c (convert_to_void): Use type_unknown_p.
15248
15249         * typeck.c (strip_all_pointer_quals): Also strip quals from
15250         pointer-to-member types.
15251
15252         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
15253         parse.y as C.
15254
15255         * call.c (build_new_method_call): Do evaluate the object parameter
15256         when accessing a static member.
15257         * typeck.c (build_component_ref): Likewise.
15258
15259 2001-01-02  Andreas Jaeger  <aj@suse.de>
15260
15261         * decl.c (cp_missing_noreturn_ok_p): New.
15262         (init_decl_processing): Set lang_missing_noreturn_ok_p.
15263
15264 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
15265
15266         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
15267
15268 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
15269
15270         * class.c (pushclass): Remove #if 0'd code.
15271         * cp-tree.h (overload_template_name): Remove.
15272         * decl.c (store_bindings): Simplify.
15273         (pop_from_top_level): Likewise.
15274         * pt.c (overload_template_name): Remove.
15275         (instantiate_decl): Don't call push_to_top_level if it's not
15276         needed.
15277
15278 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
15279
15280         * pt.c (register_local_specialization): Don't return a value.
15281         (lookup_template_class): Use move-to-front heuristic when looking
15282         up template instantiations.
15283         (instantiate_decl): Only push_to_top_level when we're actually
15284         going to instantiate the template.
15285
15286 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
15287
15288         * search.c (binfo_for_vtable): Return least derived class, not
15289         most.  Handle secondary vtables.
15290
15291 2000-12-22  Jason Merrill  <jason@redhat.com>
15292
15293         * pt.c (more_specialized): Don't optimize len==0.
15294         (fn_type_unification): If we're adding the return type, increase len.
15295
15296         * typeck.c (build_binary_op): Fix pmf comparison logic.
15297
15298         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
15299         DECL_STATIC_FUNCTION_P.
15300
15301         * semantics.c (genrtl_finish_function): Don't try to jump to
15302         return_label unless it exists.
15303
15304         In partial ordering for a call, ignore parms for which we don't have
15305         a real argument.
15306         * call.c (joust): Pass len to more_specialized.
15307         (add_template_candidate_real): Strip 'this', pass len.
15308         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
15309         (get_bindings_order): New fn.  Pass len down.
15310         (get_bindings_real): Strip 'this', pass len.
15311         (fn_type_unification): Likewise.
15312         (type_unification_real): Succeed after checking 'len' args.
15313         (most_specialized_instantiation): Lose explicit_args parm.
15314         * class.c (resolve_address_of_overloaded_function): Strip 'this',
15315         pass len.
15316
15317 2000-12-21  Jason Merrill  <jason@redhat.com>
15318
15319         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
15320         DECL_TEMPLATE_RESULT.
15321
15322         * search.c (lookup_field_r): Call lookup_fnfields_1, not
15323         lookup_fnfields_here.
15324
15325         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
15326
15327         * call.c (build_object_call): Also allow conversions that return
15328         reference to pointer to function.
15329         (add_conv_candidate): Handle totype being ref to ptr to fn.
15330         (build_field_call): Also allow members of type reference to function.
15331         Lose support for calling pointer to METHOD_TYPE fields.
15332
15333         * error.c (dump_expr): Handle *_CAST_EXPR.
15334
15335         * typeck2.c (build_scoped_ref): Always convert to the naming class.
15336
15337         * tree.c (break_out_cleanups): Lose.
15338         * cp-tree.h: Remove prototype.
15339         * typeck.c (build_component_ref): Don't break_out_cleanups.
15340         (build_compound_expr): Likewise.
15341         * semantics.c (finish_expr_stmt): Likewise.
15342
15343 2000-12-20  Richard Henderson  <rth@redhat.com>
15344
15345         * cp-tree.h: Update declarations.
15346         * decl.c (finish_case_label): Return the new stmt node.
15347         * semantics.c (finish_goto_stmt): Likewise.
15348         (finish_expr_stmt, finish_return_stmt): Likewise.
15349         (finish_break_stmt, finish_continue_stmt): Likewise.
15350         (finish_asm_stmt): Likewise.
15351         * parse.y (already_scoped_stmt): Set STMT_LINENO.
15352         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
15353         (simple_if, simple_stmt): Return the new stmt node.
15354         (save_lineno): New.
15355
15356 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
15357
15358         * cp-tree.h: Don't declare warn_long_long.
15359
15360 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
15361
15362         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
15363         IS_AGGR_TYPE.
15364
15365 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
15366
15367         * pt.c (unify): Handle when both ARG and PARM are
15368         BOUND_TEMPLATE_TEMPLATE_PARM.
15369
15370 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
15371
15372         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
15373         DECL_TEMPLATE_PARM_P.
15374
15375 2000-12-15  Jason Merrill  <jason@redhat.com>
15376
15377         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
15378
15379         * init.c (build_new_1): Don't strip quals from type.
15380
15381         * decl.c (pushdecl): Don't check for linkage on a non-decl.
15382
15383         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
15384
15385         * call.c (build_new_function_call): Lose space before paren in
15386         error message.
15387         (build_new_method_call): Likewise.
15388
15389         * typeck2.c (build_m_component_ref): Propagate quals from datum.
15390
15391 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
15392
15393         * pt.c (check_explicit_specialization): Propagate default
15394         function arguments to explicit specializations.
15395
15396 2000-12-13  DJ Delorie  <dj@redhat.com>
15397
15398         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
15399         and <? operators.
15400
15401 2000-12-08  Jason Merrill  <jason@redhat.com>
15402
15403         * error.c (dump_function_name): Don't let the user see __comp_ctor.
15404
15405         Clean up copy-initialization in overloading code.
15406         * call.c (build_user_type_conversion_1): Die if we are asked to
15407         convert to the same or a base type.
15408         (implicit_conversion): Avoid doing so.  Lose reference binding code.
15409         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
15410         direct-initialization.  Also do direct-init part of copy-init.
15411         (build_user_type_conversion): Don't provide context to convert_like.
15412         * cvt.c (ocp_convert): build_user_type_conversion will now provide
15413         the constructor call for copy-init.
15414
15415         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
15416         instantiation of a member template.
15417         (do_decl_instantiation): Not here.
15418
15419 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
15420
15421         * class.c (check_field_decls): Don't special case anonymous
15422         fields in error messages.
15423         (note_name_declared_in_class): Use %D on diagnostic.
15424
15425         * tree.c (pod_type_p): Use strip_array_types.
15426         (cp_valid_lang_attribute): Likewise.
15427         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
15428         multiple evaluations.
15429         (cp_has_mutable_p): Use strip_array_types.
15430
15431 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
15432
15433         * cp-tree.h (sufficient_parms_p): Declare new function.
15434         * call.c (sufficient_parms_p): New function, broken out of ...
15435         (add_function_candidate): ... here. Use it.
15436         (add_conv_candidate): Use it.
15437         * decl.c (grok_ctor_properties): Use it.
15438
15439 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
15440
15441         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
15442
15443 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
15444
15445         * decl2.c (lang_decode_option): Handle -Wformat-security.
15446
15447 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
15448
15449         * pt.c (verify_class_unification): New function.
15450         (get_class_bindings): Use it.
15451         (try_class_unification): Tidy.
15452         (unify): Handle when argument of a template-id is not
15453         template parameter dependent.
15454         (template_args_equal): Handle when TREE_CODE's do not match.
15455
15456 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
15457
15458         * lang-specs.h (c++): When invoking the stand-alone preprocessor
15459         for -save-temps, pass all relevant -Defines to it, and then don't
15460         pass them to cc1plus.
15461
15462 2000-12-05  Will Cohen  <wcohen@redhat.com>
15463
15464         * decl.c (finish_case_label): Cleared
15465         more_cleanups_ok in surrounding function scopes.
15466         (define_label): Likewise.
15467
15468 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
15469
15470         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
15471         (get_matching_virtual): Remove.
15472         (look_for_overrides): Declare new function.
15473         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
15474         DECL_VINDEX here.
15475         * class.c (check_for_override): Move base class iteration code
15476         to look_for_overrides.
15477         * search.c (next_baselink): Remove.
15478         (get_virtuals_named_this): Remove.
15479         (get_virtual_destructor): Remove.
15480         (tree_has_any_destructors_p): Remove.
15481         (struct gvnt_info): Remove.
15482         (check_final_overrider): Remove `virtual' from error messages.
15483         (get_matching_virtuals): Remove. Move functionality to ...
15484         (look_for_overrides): ... here, and ...
15485         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
15486         to be overriding.
15487
15488 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
15489
15490         * typeck.c (get_delta_difference): If via a virtual base,
15491         return zero.
15492         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
15493         adjustment.
15494
15495 2000-12-04  Richard Henderson  <rth@redhat.com>
15496
15497         * error.c (dump_tree): Use output_add_string not OB_PUTS.
15498
15499 2000-12-04  Jason Merrill  <jason@redhat.com>
15500
15501         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
15502         (write_builtin_type): Pass intSI_type_node and the like through
15503         type_for_mode.
15504         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
15505         Pass intSI_type_node and the like through type_for_mode.
15506         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
15507         * pt.c (tsubst, unify): Likewise.
15508         * tree.c (walk_tree): Likewise.
15509         * error.c (dump_type): Likewise.
15510         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
15511
15512         * Make-lang.in: Tweak top comment for emacs.
15513         (cp/TAGS): Restore.
15514
15515         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
15516
15517         * class.c (clone_function_decl): Robustify.
15518
15519 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
15520
15521         * decl.c (store_bindings): Only search in the non modified
15522         old_bindings for duplicates.
15523
15524 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
15525
15526         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
15527         TYPE_POLYMORPHIC_P.
15528
15529         * typeck.c (build_static_cast): Remove unused variable.
15530
15531 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
15532
15533         * pt.c: Fix typo in comment.
15534
15535 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
15536
15537         * decl2.c (warn_format): Remove definition.
15538         (lang_decode_option): Handle -Wformat-nonliteral,
15539         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
15540
15541 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
15542
15543         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
15544         (init_decl_processing): Don't create string_type_node,
15545         const_string_type_node, wint_type_node, intmax_type_node,
15546         uintmax_type_node, default_function_type, ptrdiff_type_node and
15547         unsigned_ptrdiff_type_node.  Adjust position of call to
15548         c_common_nodes_and_builtins.
15549         (identifier_global_value): New function.
15550
15551 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
15552
15553         * call.c (standard_conversion): Reject pointer to member
15554         conversions from ambiguous, inaccessible or virtual bases.
15555         * typeck.c (build_static_cast): Don't check pointers to members
15556         specially.
15557
15558 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
15559
15560         * method.c (do_build_copy_constructor): Preserve cv
15561         qualifications when accessing source object members.
15562         (do_build_assign_ref): Likewise. Remove separate diagnostics for
15563         unnamed fields.
15564
15565 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
15566
15567         * method.c (do_build_assign_ref): Construct appropriately
15568         CV-qualified base reference. Don't allow const casts in base
15569         conversion.
15570
15571 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
15572
15573         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
15574         incomplete return type.
15575
15576 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
15577
15578         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
15579         * semantics.c (finish_base_specifier): Accept a _TYPE not a
15580         _DECL.
15581
15582 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
15583
15584         * spew.c (yyerror): Cope if yylval.ttype is NULL.
15585
15586 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
15587
15588         * decl.c (grokdeclarator): Diagnose undefined template contexts.
15589
15590 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
15591
15592         * decl.c (grokdeclarator): Do type access control on friend
15593         class.
15594
15595 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
15596
15597         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
15598         bison parser ickiness.
15599         * pt.c (tsubst_friend_function): Enter namespace scope when
15600         tsubsting the function name.
15601         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
15602
15603 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
15604
15605         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
15606         * cvt.c (cp_convert_to_pointer): Add force parameter.
15607         Allow conversions via virtual base if forced.
15608         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
15609         (ocp_convert): Likewise.
15610         * search.c (binfo_from_vbase): Return the virtual base's binfo.
15611         * typeck.c (get_delta_difference): Adjust handling of virtual
15612         bases.
15613
15614 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
15615
15616         * tree.c (struct list_hash): Remove.
15617         (list_hash_table): Make it be an htab.
15618         (struct list_proxy): New type.
15619         (list_hash_eq): New function.
15620         (list_hash_pieces): Renamed from ...
15621         (list_hash): ... this.
15622         (list_hash_lookup): Remove.
15623         (list_hash_add): Remove.
15624         (hash_tree_cons): Use the generic hashtable.
15625         (mark_list_hash): Remove.
15626         (init_tree): Create the hashtable.
15627
15628 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
15629
15630         * method.c (build_mangled_C9x_name): Rename to
15631         build_mangled_C99_name.  Change C9X references in comments to
15632         refer to C99.
15633
15634 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
15635
15636         * parse.y (unary_expr): Move VA_ARG from here ...
15637         (primary): ... to here.
15638
15639 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
15640
15641         * semantics.c (finish_id_expr): If type is error_mark, return
15642         error_mark.
15643
15644 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
15645
15646         * pt.c (lookup_template_class): Simplify loop exit constructs.
15647         Cope when there is no partial instantiation of a template
15648         template member.
15649
15650 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
15651
15652         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
15653
15654 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
15655
15656         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
15657         prefix.
15658
15659         * pt.c (do_decl_instantiate): Explicitly clone constructors and
15660         destructors that haven't already been cloned.
15661
15662 2000-11-20  Richard Henderson  <rth@redhat.com>
15663
15664         * parse.y (yyparse_1): Rename the parser entry point.
15665
15666 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
15667
15668         * mangle.c (write_name): Use <unscoped-name> for names directly in
15669         function scope.
15670         (write_unscoped_name): Accept names directly in function scope.
15671
15672 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
15673
15674         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
15675         * parse.y (extdef): Add EXPORT reduction.
15676         * spew.c (yylex): Don't skip export here.
15677
15678 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
15679
15680         * decl.c (init_decl_processing): Correct name of pure virtual
15681         function under the new ABI.
15682         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
15683         (throw_bad_typeid): Likewise for bad typeid function.
15684
15685 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
15686
15687         * decl.c (grokparms): Don't even function types of `void' type,
15688         either.
15689         * mangle.c (write_type): Don't crash when confronted with the
15690         error_mark_node.
15691
15692         * decl.c (grokparms): Don't create parameters of `void' type.
15693
15694 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
15695
15696         * lex.c (mark_impl_file_chain): Delete.
15697         (init_parse): Remove call to ggc_add_string_root.  No need to
15698         ggc_strdup a string constant.  Do not add impl_file_chain to GC
15699         roots.
15700         (handle_pragma_implementation): No need to ggc_strdup main_filename.
15701
15702 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
15703
15704         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
15705
15706 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
15707
15708         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
15709         * decl.c (grokdeclarator): Don't reject void parms here.
15710         (require_complete_types_for_parms): Simplify, use
15711         complete_type_or_else.
15712         (grokparms): Remove bitrot. Remove funcdef parm.
15713         Deal with ellipsis parm lists here.
15714         * semantics.c (finish_parmlist): Don't append void_list_node
15715         here. Set PARMLIST_ELLIPSIS_P.
15716
15717 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
15718
15719         * typeck2.c (incomplete_type_error): Reorganize to avoid
15720         excessive diagnostics.
15721
15722 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
15723
15724         * lex.c (struct impl_files, internal_filename): Constify a char *.
15725
15726 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
15727
15728         * mangle.c (write_special_name_constructor): Don't generate
15729         assembler junk when confronted with an old-style constructor.
15730         (write_special_name_destructor): Likewise.
15731         (mangle_decl_string): Do it here instead.
15732
15733 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
15734
15735         * call.c (op_error): Make error messages clearer.
15736
15737 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
15738
15739         * decl.c (wrapup_globals_for_namespace): Don't mark things
15740         TREE_ASM_WRITTEN when they're not.
15741
15742 2000-11-15  Jason Merrill  <jason@redhat.com>
15743
15744         * typeck2.c (friendly_abort): Uncount the error before handing
15745         off to fancy_abort.
15746
15747 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
15748
15749         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
15750
15751 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
15752
15753         * class.c (build_vtbl_initializer): Fix typo in comment.
15754         * typeck.c (expr_sizeof): Don't crash on errors.
15755
15756 2000-11-14  Jim Wilson  <wilson@redhat.com>
15757
15758         * lang-specs.h: Add %2 after %(cc1_options).
15759
15760 2000-11-14  Richard Henderson  <rth@redhat.com>
15761
15762         * typeck.c (c_sizeof): Be strict about casting result value
15763         back to c_size_type_node.
15764         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
15765
15766 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
15767
15768         * typeck.c (build_unary_op): Use boolean_increment from
15769         c-common.c, moving the relevant code there.
15770
15771 2000-11-11  Jason Merrill  <jason@redhat.com>
15772
15773         * typeck.c (mark_addressable): Don't call put_var_into_stack.
15774
15775         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
15776         in inlines.
15777
15778 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15779
15780         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
15781         * lex.c (copy_lang_decl): Likewise.
15782
15783 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
15784
15785         * dump.c (cp_dump_tree): Don't dump function bodies here.
15786
15787         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
15788         (dump.o): Update dependency list.
15789         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
15790         (flag_dump_translation_unit): Likewise.
15791         (CP_TYPE_QUALS): Adjust definition.
15792         (DECL_C_BIT_FIELD): Remove.
15793         (SET_DECL_C_BIT_FIELD): Likewise.
15794         (CLEAR_DECL_C_BIT_FIELD): Likewise.
15795         (add_maybe_template): Likewise.
15796         (strip_array_types): Likewise.
15797         (dump_node_to_file): Likewise.
15798         (cp_dump_tree): New function.
15799         * decl.c (init_decl_processing): Set lang_dump_tree.
15800         * decl2.c (flag_dump_translation_unit): Remove.
15801         * dump.c: Move most of it to ../c-dump.c.
15802         (cp_dump_tree): New function.
15803         * pt.c (add_maybe_template): Remove.
15804         * typeck.c (strip_array_types): Likewise.
15805
15806 2000-11-07  Eric Christopher  <echristo@redhat.com>
15807
15808         * decl.c (init_decl_processing): Change definition of
15809         __wchar_t to wchar_t.  Remove artificial declaration of
15810         wchar_t.
15811         * lex.c: Change instances of __wchar_t to wchar_t.
15812
15813 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
15814
15815         * lex.c (do_identifier): Don't lookup_name for operators.
15816         * parse.y (operator): Save looking_for_typename.
15817         (unoperator): Restore it.
15818         * spew.c (frob_opname): Use nth_token for lookahead.
15819
15820 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
15821
15822         * decl.c (grok_op_properties): Always use coerce_new_type and
15823         coerce_delete_type.
15824         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
15825         exception specification. Tidy up.
15826         (coerce_delete_type): Preserve exception specification. Tidy up.
15827
15828 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
15829
15830         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
15831         (push_binding_level), error.c (cp_tree_printer), pt.c
15832         (process_partial_specialization, tsubst_template_arg_vector),
15833         search.c (lookup_member): Use memset () instead of bzero ().
15834
15835 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
15836
15837         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
15838
15839 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
15840
15841         * Make-lang.in (c++.distdir): Remove.
15842
15843 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
15844
15845         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
15846         declarations from different namespaces to be combined.
15847
15848 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
15849
15850         * decl.c: Include tm_p.h.
15851
15852 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
15853
15854         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
15855
15856 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
15857
15858         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
15859         (build_overload_value), repo.c (open_repo_file), xref.c
15860         (open_xref_file): Use strchr () and strrchr () instead of index ()
15861         and rindex ().
15862
15863 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
15864
15865         * call.c (build_over_call): Call fold on the CALL_EXPR.
15866
15867 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
15868
15869         * error.c (dump_template_decl): Separate template hearders with
15870         space not comma.
15871
15872 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
15873
15874         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
15875         TS_* flags with corresponding TFF_*.  Adjust prototypes of
15876         functions (which used to take a tree_string_flags) to take an int.
15877
15878         * cp-tree.h (enum tree_string_flags): Remove
15879         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
15880         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
15881         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
15882         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
15883         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
15884         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
15885         (type_as_string, decl_as_string, expr_as_string,
15886         context_as_string): Adjust prototype.
15887
15888         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
15889         instead of TS_PLAIN.
15890
15891         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
15892         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
15893         plain `0'.
15894
15895 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
15896
15897         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
15898         (linkage_kind): New enumeration.
15899         (decl_linkage): New function.
15900         * decl2.c (comdat_linkage): Extend comment.
15901         * error.c (dump_function_decl): Print the arguments used to
15902         instantiate a template, even when not printing the type of the
15903         function.
15904         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
15905         not TREE_PUBLIC, to test for external linkage.
15906         * tree.c (decl_linkage): New function.
15907
15908 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
15909
15910         * pt.c (instantiate_decl): Always instantiate static data members
15911         initialized in-class.
15912
15913 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
15914
15915         * Make-lang.in: Move all build rules here from Makefile.in,
15916         adapt to new context.  Wrap all rules that change the current
15917         directory in parentheses.  Expunge all references to $(P).
15918         When one command depends on another and they're run all at
15919         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
15920         all object-file generation rules.  Delete obsolete variables.
15921
15922         * Makefile.in: Delete.
15923         * config-lang.in: Delete outputs= line.
15924
15925 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
15926
15927         * error.c (dump_function_decl): Print no space between
15928         `ptr-operator' the `type-specifier' of the return type.
15929         (dump_type_prefix): Make sure we put space at the appropriate
15930         place.
15931
15932 2000-10-23  Jason Merrill  <jason@redhat.com>
15933
15934         * call.c (equal_functions): Also call decls_match for extern "C" fns.
15935
15936 2000-10-22  Jason Merrill  <jason@redhat.com>
15937
15938         * call.c (build_conditional_expr): Use ocp_convert to force
15939         rvalue conversion.
15940
15941 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
15942
15943         * call.c (standard_conversion): Use RVALUE_CONVs for all
15944         expressions that satisfy lvalue_p, not just those that satisfy
15945         real_lvalue_p.
15946
15947         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
15948
15949         * typeck.c (c_sizeof): Return an expression of `size_t' type,
15950         not one with TYPE_IS_SIZETYPE set.
15951         (dubious_conversion_warnings): Remove special-case code.
15952
15953 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
15954
15955         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
15956         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
15957         (dump_type_prefix): Print vector-of-int as 'int vector'.
15958         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
15959         * tree.c (walk_tree): Handle VECTOR_TYPE.
15960
15961         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
15962
15963 2000-10-21  Jason Merrill  <jason@redhat.com>
15964
15965         * parse.y (operator): Set got_object from got_scope.
15966         Set looking_for_typename.
15967         * decl.c (lookup_name_real): Clear val after setting from_obj.
15968         Reorganize diagnostic.
15969
15970 2000-10-20  Jason Merrill  <jason@redhat.com>
15971
15972         * tree.c (walk_tree): Don't walk into default args.
15973
15974         * error.c (dump_expr): Use host_integerp.
15975
15976 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
15977
15978         * typeck2.c (abstract_virtuals_error): Use "because" instead of
15979         "since" in error message.
15980
15981 2000-10-20  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15982
15983         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
15984
15985 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
15986
15987         * decl.c (revert_static_member_fn): Fixed typo.
15988
15989 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
15990
15991         * class.c (subobject_offset_fn): New type.
15992         (dfs_record_base_offsets): Remove.
15993         (record_base_offsets): Likewise.
15994         (dfs_search_base_offsets): Likewise.
15995         (record_subobject_offset): New function.
15996         (check_subobject_offset): Likewise.
15997         (walk_subobject_offsets): Likewise.
15998         (record_subobject_offsets): Likewise.
15999         (layout_conflict_p): Reimplement.
16000         (layout_nonempty_base_or_field): Correct handling of type
16001         conflicts during layout.
16002         (layout_empty_base): Likewise.
16003         (build_base_field): Adjust to handle new representation of empty
16004         base offset table.
16005         (build_base_fields): Likewise.
16006         (layout_virtual_bases): Likewise.
16007         (splay_tree_compare_integer_csts): New function.
16008         (layout_class_type): Use a splay_tree, rather than a varray, to
16009         represent the offsets of empty bases.
16010
16011         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
16012         * decl.c (select_decl): Don't return declarations that are
16013         DECL_ANTICIPATED.
16014
16015 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
16016
16017         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
16018         (fake_std_node): New macro.
16019         * decl.c (in_std): Rename to ...
16020         (in_fake_std): ... this.
16021         (flag_no_builtin): Remove.
16022         (flag_no_nonansi_builtin): Likewise.
16023         (walk_namespaces_r): Use fake_std_node.
16024         (push_namespace): Use std_identifier.
16025         (pop_namespace): Use in_fake_std.
16026         (lookup_name_real): Use fake_std_node.
16027         (init_decl_processing): When -fhonor-std, create the `std'
16028         namespace.  Don't create a dummy fake_std_node in that case.
16029         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
16030         (builtin_function): Put builtins whose names don't begin
16031         with `_' in the std namespace.
16032         * decl2.c (flag_no_builtin): Remove.
16033         (flag_no_nonansi_builtin): Likewise.
16034         (set_decl_namespace): Use fake_std_node.
16035         (validate_nonmember_using_decl): Likewise.
16036         (do_using_directive): Likewise.
16037         (handle_class_head): Likewise.
16038         * dump.c (dequeue_and_dump): Likewise.
16039         * except.c (init_exception_processing): Use std_identifier.
16040         * init.c (build_member_call): Use fake_std_node.
16041         * rtti.c (init_rtti_processing): Use std_identifier.
16042
16043 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
16044
16045         * cp-tree.h (back_end_hook): Remove declaration.
16046         * decl2.c (back_end_hook): Remove definition.
16047
16048         * dump.c (dequeue_and_dump): Dump TREE_USED.
16049
16050 2000-10-17  Brad Lucier <lucier@math.purdue.edu>
16051
16052         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
16053
16054 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
16055
16056         * decl.c (WINT_TYPE): Define.
16057         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
16058         c_size_type_node, signed_size_type_node and wint_type_node.
16059
16060 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
16061
16062         * decl2.c (warn_missing_format_attribute): New variable.
16063         (lang_decode_option): Decode -Wmissing-format-attribute.
16064
16065 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
16066
16067         * typeck.c (qualify_type): Remove.
16068         (composite_pointer_type): Fix handling of conversions to `cv void*'.
16069
16070 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16071
16072         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
16073
16074 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16075
16076         * Makefile.in (parse.c, parse.h): Create atomically.
16077
16078 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
16079
16080         * class.c (current_obstack): Remove.
16081         * decl.c (ggc_p): Remove.
16082         (start_decl): Don't use decl_tree_cons.
16083         (grokdeclarator): Don't use build_decl_list.
16084         (start_function): Don't use decl_tree_cons.
16085         (finish_function): Don't mess with obstacks.
16086         * decl2.c (grok_x_components): Don't use build_decl_list.
16087         * lex.c (make_call_declarator): Don't call decl_tree_cons.
16088         (implicitly_declare_fn): Don't call build_decl_list.
16089         * parse.y (frob_specs): Don't call build_decl_list or
16090         decl_tree_cons.
16091         (expr_or_declarator_intern): Don't call decl_tree_cons.
16092         (primary): Don't call build_decl_list.
16093         (fcast_or_absdcl): Likewise.
16094         (typed_declspecs): Don't call decl_tree_cons.
16095         (reserved_declspecs): Don't call build_decl_list.
16096         (declmods): Likewise.
16097         (reserved_typespecquals): Likewise.
16098         (aggr): Likewise.
16099         (new_type_id): Likewise.
16100         (cv_qualifiers): Likewise.
16101         (after_type_declarator_intern): Likewise.
16102         (notype_declarator_intern): Likewise.
16103         (absdcl_intern): Likewise.
16104         (named_parm): Likewise.
16105         * pt.c (most_specialized_class): Likewise.
16106         * repo.c (temporary_obstack): Make it a structure, not a pointer.
16107         (init_repo): Initialize it.
16108         * search.c (current_obstack): Remove.
16109         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
16110
16111 2000-10-09  Richard Henderson  <rth@cygnus.com>
16112
16113         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
16114         (c++ language support bits for libgcc): Remove.
16115         (c++.clean): Remove cplib2.txt cleanup.
16116         * config-lang.in (headers, lib2funcs): Remove.
16117
16118         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
16119         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
16120         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
16121         * inc/new.h, inc/typeinfo: Remove files.
16122
16123 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
16124
16125         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
16126         defined.
16127         (init_decl_processing): Initialize intmax_type_node and
16128         uintmax_type_node.
16129
16130 2000-10-06  Richard Henderson  <rth@cygnus.com>
16131
16132         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
16133         (original_result_rtx): Remove.
16134         * decl.c (save_function_data): Don't clear x_result_rtx.
16135         (mark_lang_function): Don't mark it either.
16136         * expr.c (fixup_result_decl): Remove.
16137         * semantics.c (genrtl_named_return_value): Frob the return decl
16138         before calling emit_local_var.
16139         (genrtl_finish_function): Don't call fixup_result_decl.
16140         Always emit the jump to return_label.
16141
16142 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
16143
16144         * pt.c (lookup_template_class): Set current access for enum.
16145         (tsubst_enum): Set file & line for enum decl.
16146
16147         * spew.c (yylex): Remove unused variable.
16148
16149 2000-10-05  Richard Henderson  <rth@cygnus.com>
16150
16151         * semantics.c (genrtl_finish_function): Don't init or check
16152         can_reach_end; remove noreturn and return value checks.
16153
16154 2000-10-05  Tom Tromey  <tromey@cygnus.com>
16155
16156         * init.c (build_java_class_ref): Use `build_static_name' with a
16157         suffix, not a prefix, to build the class object's name.
16158
16159 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
16160
16161         * cp-tree.h (access_kind): Fix comment typo.
16162         * decl2.c (grokfield): Fix diagnostic typo.
16163         * semantics.c (finish_template_type): Fix comment typo.
16164         (finish_qualified_object_call_expr): Likewise.
16165
16166 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
16167
16168         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
16169         tsubsting fails.
16170
16171 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
16172
16173         * spew.c (frob_id): New static function.
16174         (frob_opname): Use it.
16175         (yylex): Use it.
16176
16177 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
16178
16179         * decl.c (lang_mark_false_label_stack): Remove.
16180         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
16181
16182 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
16183
16184         * gxxint.texi: Use @email for formatting email addresses.
16185
16186 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
16187
16188         * error.c: Remove direct obstack manipulation.  Replace with
16189         output_buffer-based formatting.  Adjust calls to removed macros.
16190         (obstack_chunk_alloc, obstack_chunk_free): Remove.
16191         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
16192         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
16193
16194 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
16195
16196         * ir.texi: Move to ../c-tree.texi.
16197
16198 2000-09-20  Jason Merrill  <jason@redhat.com>
16199
16200         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
16201
16202 2000-09-21  Andreas Jaeger  <aj@suse.de>
16203
16204         * errfn.c: Move declaration of cp_printer and cp_printers to ...
16205         * cp-tree.h: ... here.
16206
16207         * error.c: Remove declaration of cp_printer.
16208
16209 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
16210
16211         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
16212
16213 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
16214
16215         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
16216         users.
16217
16218 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
16219
16220         * decl.c (start_function): Robustify.
16221
16222 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16223
16224         * cp-tree.h (check_function_format): Accept a `status' parameter.
16225
16226         * call.c, typeck.c: Updates calls to `check_function_format'.
16227
16228 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
16229
16230         * decl2.c (handle_class_head): Always push some scope even
16231         in the error case.
16232
16233 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
16234
16235         * cp-tree.h (struct cp_language_function): Remove
16236         x_scope_stmt_stack and name_declared.
16237         (current_scope_stmt_stack): Remove.
16238         (function_name_declared_p): New macro.
16239         (struct lang_decl_flags): Use c_lang_decl as a base class.
16240         (context): Remove.
16241         (struct lang_decl): Replace saved_tree with context.
16242         (DECL_FRIEND_CONTEXT): Adjust accordingly.
16243         (SET_DECL_FRIEND_CONTEXT): Likewise.
16244         (DECL_VIRTUAL_CONTEXT): Likewise.
16245         (DECL_SAVED_TREE): Remove.
16246         (C_DECLARED_LABEL_FLAG): Likewise.
16247         (cplus_expand_expr_stmt): Don't declare.
16248         (add_decl_stmt): Likewise.
16249         (add_scope_stmt): Likewise.
16250         * decl.c (mark_stmt_tree): Remove.
16251         (case_compare): Likewise.
16252         (finish_case_label): Use c_add_case_label.
16253         (init_decl_processing): Set more language-specific hooks.
16254         (build_enumerator): Fix typo in comment.
16255         (cplus_expand_expr_stmt): Remove.
16256         (mark_lang_function): Use mark_c_language_function.
16257         (lang_mark_tree): Use c_mark_lang_decl.
16258         * decl2.c: Change order of inclusion.
16259         * except.c: Likewise.
16260         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
16261         back on c_expand_expr.
16262         * friend.c: Include expr.h.
16263         * init.c: Change order of inclusion.
16264         * Makefile.in: Update dependencies.
16265         * lex.h (free_lang_decl_chain): Remove.
16266         * optimize.c (maybe_clone_body): Use function_name_declared_p.
16267         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
16268         it doesn't exist.
16269         (instantiate_decl): Use function_name_declared_p.
16270         * semantics.c (lang_expand_expr_stmt): Remove.
16271         (set_current_function_name_declared): Likewise.
16272         (current_function_name_declared): Likewise.
16273         (begin_compound_stmt): Use function_name_declared_p.
16274         (add_decl_stmt): Remove.
16275         (setup_vtbl_ptr): Use function_name_declared_p.
16276         (add_scope_stmt): Remove.
16277         (current_scope_stmt_stack): New function.
16278         (cp_expand_stmt): Don't handle SCOPE_STMTs.
16279         (expand_body): Use function_name_declared_p.
16280         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
16281         * typeck.c: Change order of includes.
16282         (convert_sequence): Remove.
16283
16284 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
16285
16286         * lex.c (reswords): Add _Complex.
16287
16288 2000-09-14  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16289
16290         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
16291
16292 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
16293
16294         * init.c (begin_init_stmts): Don't use // comments.
16295
16296 2000-09-12  Jason Merrill  <jason@redhat.com>
16297
16298         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
16299         all non-extern arrays.
16300
16301         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
16302         typenames, too.  Downgrade complaint to pedwarn.
16303         (xref_tag): Warn about surprising behavior of 'friend struct T'.
16304         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
16305         'class This::Inherited'.
16306
16307 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
16308
16309         * decl.c (finish_case_label): Given the LABEL_DECL a
16310         DECL_CONTEXT.
16311
16312 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
16313
16314         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
16315         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
16316         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
16317         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
16318         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
16319         New macros.
16320         (sorry_for_unsupported_tree, print_scope_operator,
16321         print_left_paren, print_right_paren, print_left_bracket,
16322         print_right_bracket, print_whitespace): Likewise.
16323         (aggr_variety): Rename to class_key_or_enum.
16324         (print_type): Rename to print_type_id.
16325         (print_type_specifier_seq, print_simple_type_specifier,
16326         print_elaborated_type_specifier,
16327         print_rest_of_abstract_declarator,
16328         print_parameter_declaration_clause, print_exception_specification,
16329         print_nested_name_specifier, print_template_id,
16330         typedef_original_name,  print_template_argument_list_start,
16331         print_template_argument_list_end): New functions.
16332
16333 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
16334
16335         * ir.texi: Add more documentation.
16336
16337 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
16338
16339         * cp-tree.h (struct saved_scope): Remove x_function_parms.
16340         (current_function_parms): Don't define.
16341         (struct cp_language_function): Remove parms_stored.
16342         (current_function_just_assigned_this): Don't define.
16343         (current_function_parms_stored): Likewise.
16344         (static_ctors): Declare.
16345         (static_dtors): Likewise.
16346         (SF_EXPAND): Don't define.
16347         (expand_start_early_try_stmts): Remove declaration.
16348         (store_parm_decls): Likewise.
16349         * decl.c (static_ctors): Don't declare.
16350         (static_dtors): Likewise.
16351         (struct binding_level): Remove this_block.
16352         (poplevel): Remove dead code.
16353         (set_block): Likewise.
16354         (mark_binding_level): Don't mark this_block.
16355         (mark_saved_scope): Don't mark x_function_parms.
16356         (init_decl_processing): Don't add current_function_parms as a GC
16357         root.
16358         (check_function_type): Change prototype.
16359         (start_function): Remove RTL-generation code.
16360         (expand_start_early_try_stmts): Remove.
16361         (store_parm_decls): Give it internal linkage.  Remove
16362         RTL-generation code.
16363         (finish_function): Remove RTL-generation code.
16364         * decl2.c (static_ctors): Fix formatting.
16365         (static_dtors): Likewise.
16366         * method.c (use_thunk): Don't call store_parm_decls.
16367         (synthesize_method): Likewise.
16368         * optimize.c (maybe_clone_body): Likewise.
16369         * parse.y (fn.def2): Likewise.
16370         (.set_base_init): Likewise.
16371         (nodecls): Likewise.
16372         * pt.c (instantiate_decl): Likewise.
16373         * rtti.c (synthesize_tinfo_fn): Likewise.
16374         * semantics.c (genrtl_try_block): Simplify.
16375         (expand_body): Use genrtl_start_function and
16376         genrtl_finish_function.
16377         (genrtl_start_function): New function.
16378         (genrtl_finish_function): Likewise.
16379
16380 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
16381
16382         * error.c (cp_tree_printer, case 'P'): Append break.
16383
16384 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
16385
16386         * cp-tree.h (frob_opname): Declare.
16387         * parse.y (saved_scopes): New static variable.
16388         (cp_parse_init): Adjust.
16389         (do_id): If lastiddecl is NULL, do do_identifier.
16390         (operator): Save scope information.
16391         (unoperator): New reduction. Restore scope information.
16392         (operator_name): Append unoperator. Call frob_opname.
16393         * spew.c (frob_opname): Define.
16394
16395 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
16396
16397         * decl.c, rtti.c: Include defaults.h if not already included.
16398         Don't define the *_TYPE_SIZE macros.
16399
16400 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
16401
16402         * cp-tree.h (push_switch): Change prototype.
16403         (check_cp_case_value): Remove declaration.
16404         (decl_constant_value): Likewise.
16405         * decl.c (struct cp_switch): Add switch_stmt and cases.
16406         (case_compare): New function.
16407         (push_switch): Set switch_stmt.  Initialize cases.
16408         (pop_switch): Clean up cases.
16409         (define_case_label): Rename to ...
16410         (finish_case_label): ... this.  Do semantic analysis for case
16411         labels here.
16412         (start_function): Correct comment.
16413         * decl2.c (check_cp_case_value): Remove.
16414         * expr.c (do_case): Remove.
16415         * pt.c (tsubst_expr): Adjust call to finish_case_label.
16416         * semantics.c (genrtl_do_poplevel): Remove declaration.
16417         (RECHAIN_STMTS): Remove.
16418         (finish_break_stmt): Use build_break_stmt.
16419         (finish_continue_stmt): Use build_continue_stmt.
16420         (finish_switch_cond): Adjust condition here, rater than in
16421         c_expand_start_case.
16422         (finish_case_label): Remove.
16423         * typeck.c (c_expand_return): Remove.
16424         (c_expand_start_case): Likewise.
16425
16426 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
16427
16428         * ir.texi: Document type nodes.
16429
16430 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
16431
16432         * cp-tree.h (init_cp_semantics): Declare.
16433         (genrtl_try_block): Don't declare.
16434         (genrtl_handler): Likewise.
16435         (genrtl_catch_block): Likewise.
16436         (genrtl_ctor_stmt): Likewise.
16437         (genrtl_subobject): Likewise.
16438         (genrtl_do_poplevel): Likewise.
16439         (genrtl_named_return_value): Likewise.
16440         * lex.c (init_parse): Call init_cp_semantics.
16441         * semantics.c (genrtl_try_block): Give it internal linkage.
16442         (genrtl_handler): Likewise.
16443         (genrtl_catch_block): Likewise.
16444         (genrtl_ctor_stmt): Likewise.
16445         (genrtl_subobject): Likewise.
16446         (genrtl_do_poplevel): Likewise.
16447         (genrtl_named_return_value): Likewise.
16448         (lang_expand_stmt): Rename to ...
16449         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
16450         (init_cp_semantics): Define.
16451
16452         * decl.c (initialize_local_var): Remove RTL-generating code.
16453         * semantics.c (genrtl_try_block): Fix formatting.
16454
16455         Move statement-tree facilities from C++ to C front-end.
16456         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
16457         (void_zero_node): Remove.
16458         (stmt_tree): Likewise.
16459         (scope_chain): Adjust.
16460         (language_function): Rename to cp_language_function.
16461         (cp_function_chain): Adjust.
16462         (current_stmt_tree): Remove.
16463         (last_tree): Likewise.
16464         (last_expr_type): Likewise.
16465         (struct lang_decl): Adjust.
16466         (STMT_IS_FULL_EXPR_P): Remove.
16467         (add_tree): Remove.
16468         (begin_stmt_tree): Likewise.
16469         (finish_stmt_tree): Likewise.
16470         (walk_tree_fn): Likewise.
16471         (walk_stmt_tree): Likewise.
16472         * class.c (finish_struct): Replace use of add_tree with add_stmt.
16473         * decl.c (mark_stmt_tree): Adjust type.
16474         (init_decl_processing): Don't build void_zero_node.
16475         (initialize_local_var): Adjust usage of current_stmt_tree.
16476         (finish_enum): Use add_stmt, not add_tree.
16477         (save_function_data): Adjust use of language_function.
16478         (finish_constructor_body): Use add_stmt, not add_tree.
16479         (finish_destructor_body): Likewise.
16480         (push_cp_function_context): Adjust use of language_function.
16481         (pop_cp_function_context): Likewise.
16482         (mark_lang_function): Likewise.
16483         (mark_cp_function_context): Likewise.
16484         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
16485         (build_vec_init): Likewise.
16486         * semantics.c (SET_LAST_STMT): Remove.
16487         (RECHAIN_STMTS): Don't use it.
16488         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
16489         (current_stmt_tree): Define.
16490         (add_tree): Remove.
16491         (finish_goto_stmt): Use add_stmt, not add_tree.
16492         (finish_expr_stmt): Likewise.
16493         (begin_if_stmt): Likewise.
16494         (finish_then_clause): Likewise.
16495         (begin_while_stmt): Likewise.
16496         (begin_do_stmt): Likewise.
16497         (finish_return_stmt): Likewise.
16498         (begin_for_stmt): Likewise.
16499         (finish_break_stmt): Likewise.
16500         (finish_continue_stmt): Likewise.
16501         (begin_switch_stmt): Likewise.
16502         (finish_case_label): Likewise.
16503         (begin_try_block): Likewise.
16504         (begin_function_try_block): Likewise.
16505         (begin_handler): Likewise.
16506         (begin_catch_block): Likewise.
16507         (begin_compound_stmt): Likewise.
16508         (begin_asm_stmt): Likewise.
16509         (finish_asm_stmt): Likewise.
16510         (finish_label_stmt): Likewise.
16511         (add_decl_stmt): Likewise.
16512         (finish_subobject): Likewise.
16513         (finish_decl_cleanup): Likewise.
16514         (finish_named_return_value): Likewise.
16515         (setup_vtbl_ptr): Likewise.
16516         (add_scope_stmt): Likewise.
16517         (finish_stmt_expr): Likewise.
16518         (prune_unused_decls): Remove.
16519         (begin_stmt_tree): Likewise.
16520         (finish_stmt_tree): Likewise.
16521         (prep_stmt): Adjust use of current_stmt_tree.
16522         (lang_expand_stmt): Likewise.
16523         * tree.c (statement_code_p): Remove.
16524         (cp_statement_code_p): New function.
16525         (walk_stmt_tree): Remove.
16526         (init_tree): Set lang_statement_code_p.
16527
16528 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
16529
16530         Integrated preprocessor.
16531
16532         * Make-lang.in, Makefile.in: Remove all references to input.c,
16533         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
16534         * gxx.gperf, hash.h, input.c: Delete.
16535         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
16536         initialized properly.
16537
16538         * class.c (fixup_pending_inline): Take a tree, not a
16539         struct pending_inline *.  All callers changed.
16540         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
16541         RID_PROTECTED entries in ridpointers[] array here.
16542         * decl.c (duplicate_decls): Do not refer to struct
16543         pending_inline.
16544         (record_builtin_type, init_decl_processing): Use RID_MAX not
16545         CP_RID_MAX.
16546         (grokdeclarator): Use C_IS_RESERVED_WORD.
16547         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
16548         cpplib.
16549         (grok_x_components): Do not inspect pending_inlines chain.
16550
16551         * cp-tree.h (struct lang_identifier): Add rid_code entry.
16552         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
16553         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
16554         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
16555         TIME_IDENTIFIER_FILEINFO): Kill.
16556         Update prototypes.
16557         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
16558         single 32-bit word.
16559         * parse.y: Call do_pending_inlines unconditionally.
16560         reinit_parse_for_method is now snarf_method.  fn.defpen is no
16561         longer necessary.  Remove unnecessary <itype> annotation on
16562         SCOPE.  Do not refer to end_of_file or struct pending_inline.
16563         * semantics.c (begin_inline_definitions): Call
16564         do_pending_inlines unconditionally.
16565
16566         * lex.c: Remove all code now shared with C front end.
16567         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
16568         into the get_identifier table.  Rewrite pragma handling to
16569         work with the registry.  Move code to save tokens for later
16570         processing to spew.c.
16571
16572         * spew.c: Rewrite everything in terms of token streams instead
16573         of text.  Move routines here from lex.c / input.c as
16574         appropriate.  GC-mark trees hanging off the pending inlines
16575         chain.
16576
16577 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
16578
16579         * NEWS: Mention that the named return value extension has been
16580         deprecated.
16581         * cp-tree.h (original_result_rtx): Define.
16582         (TREE_REFERENCE_EXPR): Remove.
16583         (DECL_VPARENT): Likewise.
16584         (pushdecl_nonclass_level): Likewise.
16585         (store_return_init): Likewise.
16586         (reinit_lang_specific): Likewise.
16587         (genrtl_named_return_value): Change prototype.
16588         * decl.c (original_result_rtx): Remove.
16589         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
16590         Do not generate RTL for local variables here.
16591         (store_return_init): Remove.
16592         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
16593         store_return_init.
16594         (finish_named_return_value): Adjust accordingly.  Warn that this
16595         extension is deprecated.
16596         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
16597
16598 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
16599
16600         * pt.c (type_unification_real): Replace switch with if.
16601         (unify): Tsubst non-type parms before comparing.
16602
16603 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
16604
16605         * error.c (dump_typename): New function, broken out of ...
16606         (dump_type): ... here. Use it.
16607         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
16608
16609 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
16610
16611         * init.c (build_offset_ref): Deal with namespace scoped
16612         TEMPLATE_ID_EXPRs.
16613
16614 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
16615
16616         * class.c (resolve_address_of_overloaded_function): Add
16617         explanation message.
16618         * decl.c (define_case_label): Reformat explanation.
16619         * decl2.c (finish_static_data_member_decl): Likewise.
16620         (grokfield): Likewise.
16621         * friend.c (do_friend): Likewise.
16622
16623 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
16624
16625         * tree.c (walk_tree): Expose tail recursion.
16626         (walk_stmt_tree): New function.
16627         * cp-tree.h: Prototype walk_stmt_tree.
16628         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
16629         the BLOCKs directly.  If a BLOCK has no variables after
16630         pruning, discard it.
16631         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
16632         restore the line number.
16633
16634 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
16635
16636         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
16637         (pt.o): Remove dependency on HTAB_H.
16638         * cp-tree.h: Include hashtab.h.
16639         (walk_tree): Change prototype.
16640         (walk_tree_without_duplicates): New function.
16641         * decl.c (check_default_argument): Use it.
16642         * optimize.c (remap_decl): Adjust calls to walk_tree.
16643         (copy_body): Likewise.
16644         (expand_calls_inline): Likewise.
16645         (calls_setjmp_p): Use walk_tree_without_duplicates.
16646         * pt.c: Don't include hashtab.h.
16647         (for_each_template_parm): Use walk_tree_without_duplicates.
16648         * semantics.c (finish-stmt_tree): Likewise.
16649         (expand_body): Likewise.
16650         * tree.c (walk_tree): Add additional parameter.
16651         (walk_tree_without_duplicates): New function.
16652         (count_trees): Use it.
16653         (verify_stmt_tree): Adjust call to walk_tree.
16654         (find_tree): Use walk_tree_without_duplicates.
16655         (no_linkage_check): Likewise.
16656         (break_out_target_exprs): Adjust call to walk_tree.
16657         (cp_unsave): Likewise.
16658
16659 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
16660
16661         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
16662         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
16663         * cp-tree.h (TYPE_BINFO): Adjust comment.
16664         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
16665         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
16666         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
16667         (TYPE_TEMPLATE_INFO): Likewise.
16668         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
16669         * class.c (push_nested_class): Likewise.
16670         * decl.c (lookup_name_real): Likewise.
16671         (grokdeclarator): Likewise.
16672         (grok_op_properties): Likewise.
16673         (xref_tag): Likewise.
16674         (xref_basetypes): Likewise.
16675         * decl2.c (constructor_name_full): Likewise.
16676         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
16677         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
16678         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
16679         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16680         (dump_type_suffix): Likewise.
16681         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
16682         instead.
16683         (get_aggr_from_typedef): Likewise.
16684         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
16685         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16686         (write_template_parm): Likewise.
16687         (write_template_template_parm): Check tree code instead of
16688         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16689         * method.c (build_overload_nested_name): Add
16690         BOUND_TEMPLATE_TEMPLATE_PARM.
16691         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
16692         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16693         * pt.c (convert_template_argument): Check tree code instead of
16694         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16695         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
16696         (for_each_template_parm): Adjust comment.
16697         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
16698         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16699         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
16700         template_args_equal to compare template template parameter cases.
16701         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16702         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
16703         instead.
16704         * tree.c (copy_template_template_parm): Decide whether to create
16705         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
16706         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16707         (copy_tree_r): Likewise.
16708         * typeck.c (comptypes): Likewise.  Check tree code instead of
16709         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16710
16711 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
16712
16713         * decl.c (finish_function): Move the code for handling functions
16714         marked with the constructor and destructor attributes inside the
16715         expand_p block.
16716
16717 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
16718
16719         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
16720
16721 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
16722
16723         * pt.c (lookup_template_class): Remove abort.
16724         * tree.c (get_type_decl): Allow error_mark_node.
16725
16726 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
16727
16728         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
16729         TEMPLATE_ID_EXPRs.
16730
16731 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
16732
16733         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
16734         new ABI mangling.
16735
16736 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
16737
16738         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
16739         union tag mismatch error reporting.
16740
16741 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
16742
16743         * call.c (build_scoped_method_call): Check it is not a namespace.
16744
16745 2000-08-30  Jason Merrill  <jason@redhat.com>
16746
16747         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
16748
16749         * tree.c (bot_manip): Check TREE_CONSTANT rather than
16750         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
16751         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
16752
16753         * decl.c (start_function): Always call make_function_rtl.
16754
16755 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
16756
16757         * semantics.c (prune_unused_decls): New function.
16758         (finish_stmt_tree): Call it via walk_tree.
16759
16760 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
16761
16762         * class.c (build_secondary_vtable): Constify a char *.
16763         * decl.c (init_decl_processing): Initialize function_id_node,
16764         pretty_function_id_node, and func_id_node.
16765         * input.c (struct input_source): Constify 'str'.
16766         (feed_input): Constify first argument.
16767         * mangle.c (write_identifier): Constify argument.
16768         * pt.c (mangle_class_name_for_template): Constify argument.
16769
16770 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
16771
16772         * typeck.c (mark_addressable): Remove code that pokes around in
16773         RTL.
16774
16775 2000-08-28  Jason Merrill  <jason@redhat.com>
16776
16777         * lex.c (file_name_nondirectory): Move to toplev.c.
16778
16779         * cp-tree.h (LOCAL_CLASS_P): New macro.
16780         * class.c (finish_struct_1): Use it.
16781
16782 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
16783
16784         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
16785         (write_encoding): Pass another argument to write_name.
16786         (write_name): Add ignore_local_scope parameter.  Fix handling of
16787         local names.
16788         (write_nested_name): Use write_unqualified_name.
16789         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
16790         (write_template_prefix): Use write_unqualified_name.
16791         (write_component): Remove.
16792         (write_local_name): Add parameter.  Use direct local entity to
16793         discriminator calculation.
16794         (write_class_enum_type): Pass another argument to write_name.
16795         (write_template_template_arg): Likewise.
16796         (make_guard_variable): Likewise.
16797
16798 2000-08-27  Jason Merrill  <jason@redhat.com>
16799
16800         * decl.c (pushdecl): Matching decls for local externs are found in
16801         the current level.  Propagate linkage information from previous
16802         declarations.
16803
16804 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
16805
16806         * ir.texi (Expressions): Fix typo.
16807
16808 2000-08-25  Greg McGary  <greg@mcgary.org>
16809
16810         * tree.c (init_tree): Use ARRAY_SIZE.
16811
16812 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
16813
16814         * error.c (cp_tree_printer): Rework.
16815
16816 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
16817
16818         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
16819         dyn-string.o.
16820         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
16821         (cp-demangle.o): Remove target.
16822         (dyn-string.o): Likewise.
16823
16824         * decl.c (grokfndecl): Require that `main' return an `int'.
16825         * mangle.c (write_encoding): Don't mangle return types for
16826         conversion functions.
16827
16828 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
16829
16830         * error.c (tree_formatting_info): New data type.
16831         (tree_being_formatted): New macro.
16832         (tree_formatting_flags): Likewise.
16833         (put_whitespace): Likewise.
16834         (print_tree_identifier): Likewise.
16835         (print_identifier): Likewise.
16836         (cp_tree_printer, print_function_argument_list, print_declaration,
16837         print_expression, print_function_declaration,
16838         print_function_parameter, print_type, print_cv_qualifier): New
16839         functions.
16840         (init_error): Initialize lang_printer.
16841
16842 2000-08-24  Jason Merrill  <jason@redhat.com>
16843
16844         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
16845         adjustment necessary.
16846
16847 2000-08-24  Greg McGary  <greg@mcgary.org>
16848
16849         * cp-tree.h (MAIN_NAME_P): Remove macro.
16850
16851 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
16852
16853         * error.c (print_instantiation_context): Don't forget to flush the
16854         buffer.
16855
16856 2000-08-23  Jason Merrill  <jason@redhat.com>
16857
16858         * typeck.c (build_ptrmemfunc): Save the input pmf.
16859
16860         * method.c (process_modifiers): Use same_type_p.
16861
16862 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
16863
16864         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
16865         * mangle.c (write_function_type): Change prototype.
16866         (write_encoding): Don't mangle return types for
16867         constructors or destructors.
16868         (write_type): Adjust call to write_function_type.
16869         * pt.c (instantiate_template): Instantiate alternate entry points
16870         when instantiating the main function.
16871
16872 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
16873
16874         * error.c (cp_print_error_function): Don't use embedded '\n' in
16875         output_printf.
16876
16877 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
16878
16879         * decl.c (init_decl_processing): Remove bogus initialization.
16880         * error.c (lang_print_error_function): Restore here.
16881         (init_error): Initialize print_error_function.
16882
16883 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
16884
16885         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
16886
16887 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
16888
16889         * Makefile.in (error.o): Depends on diagnostic.h
16890
16891         * cp-tree.h (problematic_instantiation_changed,
16892         record_last_problematic_instantiation, current_instantiation,
16893         print_instantiation_context): Declare.
16894         (maybe_print_template_context): Remove.
16895
16896         * decl.c (init_decl_processing): Set print_error_function to NULL.
16897         (lang_print_error_function): Remove, since we're using a new
16898         machinery.
16899
16900         * error.c: #include diagnostic.h
16901         (function_category): New function.
16902         (cp_diagnostic_starter): Likewise.
16903         (cp_diagnostic_finalizer): Likewise.
16904         (cp_print_error_function): Likewise.
16905         (maybe_print_instantiation_context): Likewise.
16906         (print_instantiation_full_context): Likewise.
16907         (print_instantiation_partial_context): Likewise.
16908         (print_instantiation_context): Define.
16909         (init_error): Initialize diagnostic pager and finalizer.
16910
16911         * pt.c (problematic_instantiation_changed): Define.
16912         (record_last_problematic_instantiation): Likewise.
16913         (current_instantiation): Likewise.
16914         (maybe_print_template_context): Remove.
16915         (print_template_context): Likewise.
16916         (current_tinst_level): Make static to reflect Brendan Kehoe's
16917         change of 1995-04-13.
16918         (push_tinst_level): Call print_instantiation_context.
16919
16920 2000-08-21  Nix  <nix@esperi.demon.co.uk>
16921
16922         * lang-specs.h: Do not process -o or run the assembler if
16923         -fsyntax-only.
16924
16925 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
16926
16927         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
16928         variables.
16929         * decl2.c (lang_decode_option): Disable gettext attributes for
16930         -ansi.
16931
16932 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
16933
16934         * lex.c (lang_init_options): Default diagnostic message maximum
16935         length to 80, when line-wrapping.
16936
16937 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
16938
16939         * class.c (build_vtbl_initializer): Clear the entire
16940         vtbl_init_data.  Start keeping track of the functions for which we
16941         have created vcall offsets here.
16942         (dfs_build_vcall_offset_vtbl_entries): Remove.
16943         (build_vcall_offset_vtbl_entries): Reimplement.
16944         (add_vcall_offset_vtbl_entries_r): New function.
16945         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
16946         computing when vcall offsets are necessary.
16947
16948 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16949
16950         * decl.c (member_function_or_else): Use cp_error ... %T.
16951         (grokdeclarator): Likewise.
16952         (start_method): Likewise.
16953         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
16954
16955 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16956
16957         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
16958         TYPE_DECLs.
16959
16960 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16961
16962         * cp-tree.h (PTRMEM_OK_P): New macro.
16963         (itf_ptrmem_ok): New enumeration value.
16964         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
16965         argument. Diagnose implicit pointer to member.
16966         (instantiate_type): Don't diagnose implicit pointer to member
16967         here. Pass itf_ptrmem_ok if ok. Adjust calls to
16968         resolve_address_of_overloaded_function.
16969         * init.c (build_offset_ref): Set PTRMEM_OK_P.
16970         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
16971         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
16972         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
16973         (build_unary_op): Deal with single non-static member in
16974         microsoft-land.
16975
16976 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16977
16978         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
16979
16980 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16981
16982         * cp-tree.h (enum_name_string): Remove prototype.
16983         (report_case_error): Remove prototype.
16984         * cp/typeck2.c (enum_name_string): Remove.
16985         (report_case_error): Remove.
16986         * error.c (dump_expr): Deal with enum values directly.
16987         Correctly negate integer constant.
16988
16989 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16990
16991         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
16992         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
16993         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
16994         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
16995         (__cxa_vec_new): Use __cxa_vec_new2.
16996         (__cxa_vec_delete): Use __cxa_vec_delete2.
16997
16998 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16999
17000         * vec.cc (__cxa_vec_new): Set "C" linkage.
17001         (__cxa_vec_ctor): Likewise.
17002         (__cxa_vec_cctor): Likewise.
17003         (__cxa_vec_dtor): Likewise.
17004         (__cxa_vec_delete): Likewise.
17005         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
17006         (__cxa_vec_ctor): Likewise.
17007         (__cxa_vec_cctor): Likewise.
17008         (__cxa_vec_dtor): Likewise.
17009         (__cxa_vec_delete): Likewise.
17010
17011 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
17012
17013         * class.c (instantiate_type): Reinstate local variable
17014         deleted in previous change.
17015
17016         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
17017         itf_no_attributes.
17018
17019 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
17020
17021         * cp-tree.h (instantiate_type_flags): New enumeration.
17022         (instantiate_type): Change parameter.
17023         * class.c (instantiate_type): Adjust prototype. Adjust.
17024         * call.c (standard_conversion): Adjust instantiate_type call.
17025         (reference_binding): Likewise.
17026         (build_op_delete_call): Likewise.
17027         (convert_like_real): Likewise.
17028         * cvt.c (cp_convert_to_pointer): Likewise.
17029         (convert_to_reference): Likewise.
17030         * pt.c (convert_nontype_argument): Likewise.
17031         * typeck.c (build_binary_op): Likewise.
17032         (build_ptrmemfunc): Likewise.
17033         (convert_for_assignment): Likewise.
17034
17035 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
17036
17037         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
17038         (current_aggr): Define.
17039         * decl.c (grokdeclarator): Make sure a friend class is an
17040         elaborated type specifier.
17041         * parse.y (current_aggr): Remove static definition.
17042         (cp_parse_init): Adjust.
17043         (structsp): Clear and restore current_aggr.
17044         (component_decl_list): Clear current_aggr.
17045
17046         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
17047         aggregate tag on the typename's context.
17048
17049         * pt.c (tsubst_friend_class): Return error_mark_node, if
17050         parms becomes NULL.
17051         (instantiate_class_template): Ignore error_mark_node friend types.
17052
17053 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
17054
17055         * cvt.c (warn_ref_binding): New static function, broken out of ...
17056         (convert_to_reference): ... here. Use it.
17057
17058 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
17059
17060         * parse.y (template_arg): Add rule for template qualified with
17061         global scope.
17062
17063 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
17064
17065         * decl2.c (add_function): Reorganize.
17066         (arg_assoc): Do not consider function template decls.
17067
17068 2000-08-11  Jason Merrill  <jason@redhat.com>
17069
17070         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
17071         looking inside.
17072
17073 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
17074
17075         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
17076         (lookup_nested_tag): Likewise.
17077
17078         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
17079         can be produced.
17080
17081 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
17082
17083         * parse.y (named_complex_class_head_sans_basetype): Remove
17084         always true if.
17085
17086 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
17087
17088         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
17089         explicit TEMPLATE_ID_EXPR args.
17090         (build_expr_from_tree, case CALL_EXPR): Likewise.
17091
17092 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
17093
17094         * decl.c (check_tag_decl): Diagnose typename's which don't
17095         declare anything.
17096
17097 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
17098
17099         * init.c (build_aggr_init): Reject bogus array initializers
17100         early.
17101
17102 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
17103
17104         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
17105         runtime.
17106         * cp/tinfo.cc (__dynamic_cast): Likewise.
17107         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
17108
17109 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
17110
17111         * cvt.c (convert_to_pointer_force): Fix error message when
17112         attempting to cast from ambiguous base.
17113
17114 2000-08-08  Jason Merrill  <jason@redhat.com>
17115
17116         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
17117         (tsubst_template_arg_vector): Likewise.
17118
17119         * decl2.c (build_anon_union_vars): Choose the largest field; don't
17120         assume that one will be as large as the union.
17121
17122 2000-08-07  Kazu Hirata  <kazu@hxi.com>
17123
17124         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
17125         * decl.c (pop_labels): Likewise.
17126
17127 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
17128
17129         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
17130         specifications.
17131         (__pointer_to_member_type_info): Likewise.
17132         (__base_class_info): Likewise.
17133         (__class_type_info): Likewise.
17134         (__si_class_type_info): Likewise.
17135         (__vmi_class_type_info): Likewise.
17136         * tinfo.cc (__si_class_type_info::__do_find_public_src):
17137         Changed member names to match specifications.
17138         (__vmi_class_type_info::__do_find_public_src): Likewise.
17139         (__si_class_type_info::__do_dyncast): Likewise.
17140         (__vmi_class_type_info::__do_dyncast): Likewise.
17141         (__si_class_type_info::__do_upcast): Likewise.
17142         (__vmi_class_type_info::__do_upcast): Likewise.
17143         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
17144         (__pbase_type_info::__pointer_catch): Likewise.
17145         (__pointer_type_info::__pointer_catch): Likewise.
17146         (__pointer_to_member_type_info::__pointer_catch): Likewise.
17147
17148 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
17149
17150         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
17151         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
17152         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
17153
17154 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
17155
17156         * cp-tree.h (add_method): Change prototype.
17157         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
17158         Don't double the size of the method vector in the error case.
17159         (handle_using_decl): Adjust call to add_method.
17160         (add_implicitly_declared_members): Likewise.
17161         (clone_function_decl): Likewise.
17162         * decl2.c (check_classfn): Likewise.
17163         * semantics.c (finish_member_declaration): Likewise.
17164
17165 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
17166
17167         * decl.c (flag_isoc94): New variable.
17168
17169 2000-08-02  Jason Merrill  <jason@redhat.com>
17170
17171         * pt.c (do_type_instantiation): Add complain parm; don't complain
17172         if called recursively.
17173         * cp-tree.h, parse.y: Adjust.
17174
17175 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
17176
17177         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
17178         -Wno-strict-prototypes.
17179
17180         * g++spec.c: Adjust type of second argument to
17181         lang_specific_driver, and update code as necessary.
17182
17183         * cp-tree.h: Don't prototype min_precision here.
17184         (my_friendly_assert): Cast expression to void.
17185         * semantics.c (do_poplevel): Initialize scope_stmts.
17186
17187 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
17188
17189         * cp-tree.h (DECL_NEEDED_P): Tweak.
17190
17191 2000-07-28  Jason Merrill  <jason@redhat.com>
17192
17193         * lang-specs.h: Use %i in rule for .ii files.
17194
17195 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
17196
17197         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
17198
17199 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
17200
17201         Allow indirect primary bases.
17202         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
17203         primary_base.
17204         (CLASSTYPE_VFIELD_PARENT): Remove.
17205         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
17206         (BINFO_PRIMARY_BINFO): Remove.
17207         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
17208         (BINFO_VBASE_PRIMARY_P): Likewise.
17209         (BINFO_PRIMARY_BASE_OF): New macro.
17210         (BINFO_INDIRECT_PRIMARY_P): Likewise.
17211         (get_primary_binfo): New function.
17212         * decl.c (lang_mark_tree): Make lang_type::primary_base.
17213         * class.c (vcall_offset_data_s): Rename to ...
17214         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
17215         and add ctor_vtbl_p.
17216         (get_derived_offset): Use get_primary_binfo.
17217         (dfs_mark_primary_bases): Adjust handling of virtual primary
17218         bases.
17219         (mark_primary_bases): Likewise.
17220         (set_primary_base): Take a binfo, not an integer, as a
17221         representation of the primary base.
17222         (indirect_primary_base_p): Remove.
17223         (determine_primary_base): Adjust for indirect primary bases.
17224         (dfs_find_final_overrider): Fix typo in coment.
17225         (update_vtable_entry_for_fn): Use get_primary_binfo.
17226         (layout_nonempty_base_or_field): Tweak.
17227         (build_base_fields): Adjust for new primary base semantics.
17228         (dfs_propagate_binfo_offsets): Remove.
17229         (propagate_binfo_offsets): Rewrite.
17230         (dfs_set_offset_for_shared_vbases): Remove.
17231         (layout_virtual_bases): Don't use it.
17232         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
17233         ABI.
17234         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
17235         CLASSTYPE_VFIELD_PARENT.
17236         (dfs_get_primary_binfo): New function.
17237         (get_primary_binfo): Likewise.
17238         (dump_class_hierarchy_r): Tweak printing of primary bases.
17239         (build_vtbl_initializer): Fix typo in comments.  Use
17240         vtbl_init_data.
17241         (build_vcall_and_vbase_vtbl_entries): Likewise.
17242         (build_vbaes_offset_vtbl_entries): Likewise.
17243         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
17244         BV_VCALL_INDEX to handle indirect primary bases.
17245         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
17246         (build_rtti_vtbl_entries): Likewise.
17247         * search.c (get_shared_vbase_if_not_primary): Tweak.
17248         (find_vbase_instance): Likewise.
17249         (binfo_for_vtable): Simplify.
17250         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
17251         (make_binfo): Make it have 11 entries.
17252
17253 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
17254
17255         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
17256         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
17257         ascertaining primaryness.
17258         (G): Remove template_args.
17259         (decl_is_template_id): New function.
17260         (write_encoding): Use decl_is_template_id.
17261         (write_name): Likewise.  Handle type_decls.  Get main variant of
17262         type decls.
17263         (write_nested_name): Likewise.
17264         (write_prefix): Likewise.
17265         (write_template_prefix): Likewise.
17266         (write_special_name_constructor): Remove defunct production from
17267         comment.
17268         (write_bare_function_type): Remove comment about absent parameter.
17269         (write_template_template_arg): Add missing grammar production to
17270         comment.
17271
17272 2000-07-27  Jason Merrill  <jason@redhat.com>
17273
17274         * decl.c (duplicate_decls): If common_type produces a non-typedef
17275         type for a typedef, just use the old type.
17276
17277 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
17278
17279         * cp-tree.h (function_depth): Declare.
17280         (verify_stmt_tree): Likewise.
17281         (find_tree): Likewise.
17282         * decl.c (function_depth): Give it external linkage.
17283         * optimize.c (optimize_function): Increment and decrement it.
17284         * tree.c (verify_stmt_tree_r): New function.
17285         (verify_stmt_tree): Likewise.
17286         (find_tree_r): Likewise.
17287         (find_tree): Likewise.
17288
17289 2000-07-27  Jason Merrill  <jason@redhat.com>
17290
17291         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
17292         TYPE_PTRMEMFUNC_P.
17293         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
17294
17295 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
17296
17297         * decl.c (start_cleanup_fn): Mark the function as `inline'.
17298         * decl2.c (get_guard): Call cp_finish_decl, not
17299         rest_of_decl_compilation, for local guards.
17300         * lex.c (do_identifier): Remove unused variable.
17301
17302 2000-07-26      Marc Espie <espie@cvs.openbsd.org>
17303
17304         * parse.y:  Add missing ';'.
17305
17306 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
17307
17308         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
17309         of `extern "C++"'.
17310
17311 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
17312
17313         Kill strict_prototype. Backwards compatibility only for
17314         non NO_IMPLICIT_EXTERN_C systems.
17315         * cp-tree.h (flag_strict_prototype): Remove.
17316         (strict_prototype): Remove.
17317         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
17318         * decl.c (maybe_push_to_top_level): Adjust.
17319         (pop_from_top_level): Adjust.
17320         (decls_match): Only allow sloppy parm matching for ancient
17321         system headers.
17322         (init_decl_processing): Adjust.
17323         (grokdeclarator): Adjust.
17324         * decl2.c (flag_strict_prototype): Remove.
17325         (strict_prototype): Remove.
17326         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
17327         (lang_f_options): Remove "strict-prototype".
17328         (unsupported-options): Add "strict-prototype".
17329         * lex.c (do_identifier): Adjust.
17330         (do_scoped_id): Adjust.
17331         * parse.y (empty_parms): Adjust.
17332         * class.c (push_lang_context): Adjust.
17333         (pop_lang_context): Adjust.
17334         * typeck.c (comp_target_parms): Adjust.
17335
17336 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
17337
17338         * decl.c (poplevel): Deal with anonymous variables at for scope.
17339         (maybe_inject_for_scope_var): Likewise.
17340
17341 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
17342
17343         * decl.c: Remove all signal handling code, now done in toplev.c.
17344
17345 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
17346
17347         * decl.c (make_rtl_for_nonlocal_decl): Rework.
17348
17349         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
17350         correctly.
17351
17352 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
17353
17354         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
17355         Define my_friendly_assert and my_friendly_abort as macros
17356         which may call friendly_abort.  Prototype friendly abort, not
17357         my_friendly_abort or my_friendly_assert.
17358         * decl.c (signal_catch): Report the signal caught in the error
17359         message.  Call fatal directly.
17360         * typeck2.c (ack, my_friendly_assert): Delete.
17361         (my_friendly_abort): Rename to friendly_abort.  Expect file,
17362         line, and function parameters.  Report the abort code, then
17363         call fancy_abort.  Do not mask an abort if errors have
17364         already occurred.
17365
17366 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
17367
17368         * typeck.c (comp_target_parms): Remove obsolete parameter.
17369         (comp_target_types): Adjust.
17370
17371 2000-07-17  Jason Merrill  <jason@redhat.com>
17372
17373         * typeck.c (mark_addressable): Never set TREE_USED.
17374         * call.c (build_call): Don't abort on calls to library functions
17375         that have been declared normally.
17376
17377         * typeck.c (build_binary_op): Fix grammar in warning.
17378
17379         * exception.cc (__eh_free): Fix prototype.
17380
17381         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
17382
17383         * decl.c (pushdecl): Handle seeing an OVERLOAD in
17384         IDENTIFIER_NAMESPACE_VALUE.
17385
17386 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
17387
17388         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
17389         * method.c (use_thunk): Correct handling of vcall offsets.
17390
17391 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
17392
17393         * .cvsignore: parse.h and parse.c have no cp- prefix.
17394
17395 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
17396
17397         * .cvsignore: New file.
17398
17399 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
17400
17401         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
17402
17403 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
17404
17405         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
17406         * parse.c: Remove.
17407         * parse.h: Likewise.
17408
17409 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
17410
17411         * class.c (layout_class_type): Add pointers to virtual bases after
17412         base classes under the old ABI.
17413
17414 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
17415
17416         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
17417         (finish_continue_stmt): Likewise.
17418         (begin_for_stmt): Remove call to note_level_for_for.
17419         (finish_goto_stmt): Change call from build_min_nt
17420         to build_stmt.
17421         (finish_expr_stmt): Likewise.
17422         (begin_if_stmt): Likewise.
17423         (begin_while_stmt): Likewise.
17424         (finish_while_stmt): Likewise.
17425         (finish_return_stmt): Likewise.
17426         (begin_for_stmt): Likewise.
17427         (finish_for_stmt): Likewise.
17428         (finish_break_stmt): Likewise.
17429         (begin_switch_stmt): Likewise.
17430         (finish_case_label): Likewise.
17431         (genrtl_try_block): Likewise.
17432         (begin_try_block): Likewise.
17433         (begin_handler): Likewise.
17434         (begin_compound_stmt): Likewise.
17435         (finish_asm_stmt): Likewise.
17436         (finish_label_stmt): Likewise.
17437         (add_decl_stmt): Likewise.
17438         (finish_subobject): Likewise.
17439         (finish_decl_cleanup): Likewise.
17440         (finish_named_return_value): Likewise.
17441         (setup_vtbl_ptr): Likewise.
17442         (add_scope_stmt): Likewise.
17443         * decl.c (finish_constructor_body): Likewise.
17444         (finish_destructor_body): Likewise.
17445         * optimize.c (copy_body_r): Likewise.
17446         (initialize_inlined_parameters): Likewise.
17447         (declare_return_variable): Likewise.
17448         (expand_call_inline): Likewise.
17449
17450 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
17451
17452         * semantics.c (expand_body): Sync interface information
17453         at the end of function body expansion.
17454
17455 2000-07-09  Jason Merrill  <jason@redhat.com>
17456
17457         * init.c (build_new_1): Bail early if the call to new fails.
17458
17459         * decl.c (compute_array_index_type): Check specifically for
17460         an INTEGER_CST, not just TREE_CONSTANT.
17461
17462         * decl.c (duplicate_decls): Don't call duplicate_decls on
17463         the DECL_TEMPLATE_RESULT.
17464         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
17465         codes.
17466
17467         * error.c (dump_template_bindings): Don't crash if we had an
17468         invalid argument list.
17469
17470         * typeck.c (c_expand_start_case): Do narrowing here.
17471         * semantics.c (finish_switch_cond): Not here.
17472
17473 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
17474
17475         * parse.y (asm_clobbers): Do string concatenation.
17476
17477 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
17478
17479         * decl.c (pushtag): Don't put local classes in template functions
17480         on the local_classes list.
17481
17482 2000-07-04  Scott Snyder  <snyder@fnal.gov>
17483
17484         * decl2.c (get_guard): Add missing return for old ABI local
17485         variable case.
17486
17487 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
17488
17489         * cp-tree.h (char_type_p): New function.
17490         * decl.c (init_decl_processing): Don't initialize
17491         signed_wchar_type_node or unsigned_wchar_type_node.
17492         (complete_array_type): Handle brace-enclosed string-constants.
17493         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
17494         * tree.c (char_type_p): New function.
17495         * typeck2.c (digest_init): Use char_type_p.
17496
17497 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
17498
17499         * pt.c (tsubst): Don't layout type, if it's error_mark.
17500
17501 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
17502
17503         * pt.c (instantiate_pending_templates): Reset template level.
17504
17505 2000-07-05  Jason Merrill  <jason@redhat.com>
17506
17507         * call.c (joust): Don't complain about `operator char *()' beating
17508         `operator const char *() const'.
17509
17510 2000-07-04  scott snyder  <snyder@fnal.gov>
17511             Jason Merrill  <jason@redhat.com>
17512
17513         * repo.c (repo_get_id): Handle the case where a class with virtual
17514         bases has a null TYPE_BINFO_VTABLE.
17515
17516 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
17517             Jason Merrill  <jason@redhat.com>
17518
17519         * parse.y (member_init): Just pass in the type.
17520         * init.c (expand_member_init): Handle getting a type.
17521
17522 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17523             Jason Merrill  <jason@redhat.com>
17524
17525         * decl.c (finish_function): Warn if a function has no return
17526         statement.
17527         Suggested by Andrew Koenig.
17528         * typeck.c (check_return_expr): Do set current_function_returns_value
17529         if we got an error_mark_node.
17530
17531 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
17532
17533         * decl2.c (push_decl_namespace): Push the original namespace.
17534
17535 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
17536
17537         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
17538         * semantics.c (begin_class_definition): Clear it.
17539
17540 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
17541
17542         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
17543         (genrtl_expr_stmt): Likewise.
17544         (genrtl_decl_stmt): Likewise.
17545         (genrtl_if_stmt): Likewise.
17546         (genrtl_while_stmt): Likewise.
17547         (genrtl_do_stmt): Likewise.
17548         (genrtl_return_stmt): Likewise.
17549         (genrtl_for_stmt): Likewise.
17550         (genrtl_break_stmt): Likewise.
17551         (genrtl_continue_stmt): Likewise.
17552         (genrtl_scope_stmt): Likewise.
17553         (genrtl_switch_stmt): Likewise.
17554         (genrtl_case_label): Likewise.
17555         (genrtl_begin_compound_stmt): Likewise.
17556         (genrtl_finish_compound_stmt): Likewise.
17557         (genrtl_compound_stmt): Likewise.
17558         (genrtl_asm_stmt): Likewise.
17559
17560         * init.c (begin_init_stmts): Remove call to
17561         genrtl_begin_compound_stmt.
17562         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
17563
17564         * semantics.c (lang_expand_stmt): Changed call to
17565         genrtl_compound_stmt to ignore return value.
17566
17567 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
17568
17569         * mangle.c (canonicalize_for_substitution): Return the canonical
17570         variant of a type.
17571
17572         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
17573         TYPE_DECL.
17574         * typeck.c (commonparms): Remove obstack manipulations.
17575
17576 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
17577
17578         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
17579
17580         * Makefile.in (OBJS): Added ../c-semantics.o.
17581         (OBJDEPS): Likewise.
17582
17583         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
17584         ../c-common.h.
17585         (struct stmt_tree): Added comment.
17586         (current_function_name_declared): Removed.
17587         (stmts_are_full_exprs_p): Likewise.
17588         (genrtl_do_pushlevel): Likewise.
17589         (genrtl_clear_out_block): Likewise.
17590         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
17591         (DECL_ANON_UNION_ELEMS): Likewise.
17592         (emit_local_var): Likewise.
17593         (make_rtl_for_local_static): Likewise.
17594         (do_case): Likewise.
17595         (expand_stmt): Likewise.
17596         (genrtl_decl_cleanup): Likewise.
17597         (c_expand_asm_operands): Likewise.
17598         (c_expand_return): Likewise.
17599         (c_expand_start_case): Likewise.
17600
17601         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
17602         (emit_local_var): Likewise.
17603         (initialize_local_var): Change reference to
17604         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
17605         Change reference to stmts_are_full_exprs_p to
17606         current_stmt_tree->stmts_are_full_exprs_p.
17607         (push_cp_function_context): Likewise.
17608
17609         * expect.c (expand_throw): Change reference to
17610         stmts_are_full_exprs_p.
17611
17612         * init.c (build_aggr_init): Change reference to
17613         stmts_are_full_exprs_p.
17614         (build_vec_init): Likewise.
17615
17616         * optimize.c (maybe_clone_body): Change reference to
17617         current_function_name_declared to
17618         cp_function_chain->name_declared.
17619
17620         * pt.c (instantiate_decl): Change reference to
17621         current_function_name_declared to
17622         cp_function_chain->name_declared.
17623
17624         * semantics.c (expand_cond): Moved declaration to c-common.h.
17625         (genrtl_do_pushlevel): Moved to c-semantics.c.
17626         (genrtl_clear_out_block): Likewise.
17627         (genrtl_goto_stmt): Likewise.
17628         (genrtl_expr_stmt): Likewise.
17629         (genrtl_decl_stmt): Likewise.
17630         (gerntl_if_stmt): Likewise.
17631         (genrtl_while_stmt): Likewise.
17632         (genrtl_do_stmt): Likewise.
17633         (genrtl_return_stmt): Likewise.
17634         (genrtl_for_stmt): Likewise.
17635         (genrtl_break_stmt): Likewise.
17636         (genrtl_continue_stmt): Likewise.
17637         (genrtl_scope_stmt): Likewise.
17638         (genrtl_switch_stmt): Likewise.
17639         (genrtl_case_label): Likewise.
17640         (genrtl_begin_compound_stmt): Likewise.
17641         (genrtl_finish_compound_stmt): Likewise.
17642         (genrtl_compound_stmt): Likewise.
17643         (genrtl_asm_stmt): Likewise.
17644         (genrtl_decl_cleanup): Likewise.
17645         (expand_cond): Likewise.
17646         (expand_stmt): Renamed to ...
17647         (lang_expand_stmt): ... this.
17648         (lang_expand_expr_stmt): Initialize.
17649         (set_current_function_name_declared): Likewise.
17650         (stmts_are_full_exprs_p): Likewise.
17651         (current_function_name_declared): Likewise.
17652         (anon_aggr_type_p): Likewise.
17653         (do_poplevel): Change reference to
17654         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
17655         Change reference to stmts_are_full_exprs_p to
17656         current_stmt_tree->stmts_are_full_exprs_p.
17657         (add_tree): Likewise.
17658         (finish_expr_stmt): Likewise.
17659         (prep_stmt): Likewise.
17660         (lang_expand_stmt): Likewise.
17661         (begin_compound_stmt): Change reference to
17662         current_function_name_declared to
17663         cp_function_chain->name_declared and call to
17664         current_function_name_declared().
17665         (setup_vtbl_ptr): Likewise.
17666         (genrtl_do_poplevel): Removed.
17667
17668 2000-06-30  Jason Merrill  <jason@redhat.com>
17669
17670         * init.c (init_init_processing): Go back to aligning like
17671         double_type_node for old ABI.
17672         (get_cookie_size): Make cookie larger if we get a type that needs
17673         more alignment.
17674         (build_vec_delete): Call it.
17675
17676         * typeck.c (qualify_type_recursive): New fn.
17677         (composite_pointer_type): Use it.
17678         (build_binary_op): Use composite_pointer_type.
17679
17680 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
17681             Jason Merrill  <jason@redhat.com>
17682
17683         * typeck.c (check_return_expr): Don't complain about returning
17684         NULL from operator new if -fcheck-new.
17685         * cp-tree.h: Declare flag_check_new here.
17686         * init.c: Not here.
17687
17688 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
17689
17690         * mangle.c (find_substitution): Use same_type_p.
17691         (write_encoding): Don't check for substitutions.
17692
17693 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
17694
17695         * parse.y (expr_no_comma_rangle): New non-terminal.
17696         (template_parm): Use it for default parameter case.
17697         (template_arg): Use it.
17698         (expr_no_commas): Remove commented out undefined extensions.
17699         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
17700         * parse.h, parse.c: Rebuilt.
17701
17702 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
17703
17704         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
17705         (finish_asm_stmt): Do it here, instead.
17706
17707         * cp-tree.h (ridpointers): Don't declare.
17708         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
17709         (record_builtin_java_type): Likewise.
17710         (init_decl_processing): Likewise.
17711         * lex.c: Move inclusion of lex.h.
17712         (ridpointers): Don't define.
17713         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
17714         RID_MAX.
17715         * lex.h (enum rid): Rename to ...
17716         (enum cp_rid): ... this.
17717         (ridpointers): Don't declare.
17718         * parse.y: Move inclusion of lex.h.
17719         * parse.c: Regenerated.
17720         * spew.c: Move inclusion of lex.h.
17721
17722         * cp-tree.h (struct language_function): Remove temp_name_counter.
17723         (temp_name_counter): Remove.
17724         (get_temp_name): Change prototype.
17725         (get_guard): New function.
17726         (get_guard_cond): Likewise.
17727         (set_guard): Likewise.
17728         * cvt.c (build_up_reference): Adjust call to get_temp_name.
17729         * decl.c (expand_static_init): Use get_guard and friends to
17730         implement guard variables.
17731         * decl2.c (get_temp_name): Assume that the variables created are
17732         always static.
17733         (get_sentry): Rename to ...
17734         (get_guard): ... this.  Implement new ABI guard variables.
17735         (get_guard_bits): New function.
17736         (get_guard_cond): Likewise.
17737         (set_guard): Likewise.
17738         (start_static_initialization_or_destruction): Use them.
17739         (do_static_initialization): Replace sentry with guard throughout.
17740         (do_static_destruction): Likewise.
17741         * init.c (create_temporary_var): Add comment.
17742
17743 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
17744
17745         * mangle.c (find_substitution): Use same_type_p.
17746         (write_encoding): Don't check for substitutions.
17747
17748 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
17749
17750         * parse.y (expr_no_comma_rangle): New non-terminal.
17751         (template_parm): Use it for default parameter case.
17752         (template_arg): Use it.
17753         (expr_no_commas): Remove commented out undefined extensions.
17754         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
17755         * parse.h, parse.c: Rebuilt.
17756
17757 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
17758
17759         * cp-tree.h (flag_const_strings): Remove.
17760         (warn_parentheses): Likewise.
17761         (warn_format): Likewise.
17762         (common_type): Likewise.
17763         (default_conversion): Likewise.
17764         (build_binary_op): Likewise.
17765         (cp_build_binary_op): New macro.
17766         * call.c (build_new_op): Use cp_build_binary_op instead of
17767         build_binary_op.
17768         * class.c (build_vtable_entry_ref): Likewise.
17769         * decl.c (expand_static_init): Likewise.
17770         (compute_array_index_type): Likewise.
17771         (build_enumerator): Likewise.
17772         * decl2.c (delete_sanity): Likewise.
17773         (start_static_initialization_or_destruction): Likewise.
17774         * error.c (dump_type_suffix): Likewise.
17775         * init.c (resolve_offset_ref): Likewise.
17776         (build_new): Likewise.
17777         (build_new_1): Likewise.
17778         (build_vec_delete_1): Likewise.
17779         (build_vec_init): Likewise.
17780         (build_delete): Likewise.
17781         * rtti.c (synthesize_tinfo_fn): Likewise.
17782         (synthesize_tinfo_var): Likewise.
17783         * search.c (expand_upcast_fixups): Likewise.
17784         (fixup_all_virtual_upcast_offsets): Likewise.
17785         * typeck.c (build_array_ref): Likewise.
17786         (get_member_function_from_ptrfunc): Likewise.
17787         (build_binary_op): Add parameter.
17788         (pointer_int_sum): Use cp_build_binary_op.
17789         (pointer_diff): Likewise.
17790         (build_modify_expr): Likewise.
17791         (get_delta_difference): Likewise.
17792         (build_ptrmemfunc): Likewise.
17793
17794 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
17795
17796         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
17797         * decl.c (create_implicit_typedef): Adjust.
17798         * decl2.c (build_artificial_parm): Adjust.
17799         * method.c (implicitly_declare_fn): Adjust.
17800         * pt.c (push_inline_template_parms_recursive): Adjust.
17801         (process_template_parm): Adjust.
17802         (overloaded_template_name): Adjust.
17803         * semantics.c (finish_template_template_parm): Adjust.
17804
17805 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
17806
17807         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
17808         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
17809         where to emit thunks.
17810         (build_vtt): Adjust call to build_vtt_inits.
17811         (build_vtt_inits): Add parameter to indicate whether or not
17812         sub-VTTs for virtual bases should be included.  Adjust handling of
17813         construction vtables.
17814         (get_matching_base): New function.
17815         (dfs_build_vtt_inits): Rename to ...
17816         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
17817         construction vtables.
17818         (dfs_fixup_binfo_vtbls): Likewise.
17819         (build_ctor_vtbl_groups): Build construction vtables for virtual
17820         bases, too.
17821         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
17822         to build construction vtbls.
17823         (dfs_accumulate_vtbl_inits): Adjust handling of
17824         construction vtables.
17825
17826         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
17827         types correctly.
17828
17829 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
17830
17831         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
17832
17833 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
17834
17835         * search.c (hides): Remove.
17836         (is_subobject_of_p): Add most_derived parameter. Use
17837         CANONICAL_BINFO.
17838         (lookup_field_queue_p): Adjust.
17839         (lookup_field_r): Adjust.
17840
17841 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
17842
17843         * decl2.c (handle_class_head): Bash typedefs to the type's main
17844         decl.
17845
17846 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
17847
17848         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
17849         (begin_global_stmt_expr): ... this.
17850         (genrtl_finish_stmt_expr): Rename to ...
17851         (finish_global_stmt_expr): ... this.
17852         * init.c (begin_init_stmts): Adjust calls.
17853         (finish_init_stmts): Likewise.
17854         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
17855         (begin_global_stmt_expr): ... this.
17856         (genrtl_finish_stmt_expr): Rename to ...
17857         (finish_global_stmt_expr): ... this.
17858
17859 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
17860
17861         * search.c (lookup_member): Fix typo in comment.
17862
17863 2000-06-24  Jason Merrill  <jason@redhat.com>
17864
17865         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
17866         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
17867
17868 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17869
17870         * parse.y (complex_direct_notype_declarator): Support global_scope.
17871         * Makefile.in: Adjust conflict count.
17872
17873 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
17874
17875         * parse.y (template_arg): Convert TEMPLATE_DECL
17876         that is a template template parameter to
17877         TEMPLATE_TEMPLATE_PARM here.
17878
17879         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
17880         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
17881         (copy_template_template_parm): Adjust prototype.
17882         * decl.c (grokdeclarator): Remove dead code.
17883         * pt.c (process_template_parm): Tidy.
17884         (lookup_template_class): Construct nodes in
17885         copy_template_template_parm.
17886         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
17887         lookup_template_class.  Use TYPE_TI_TEMPLATE.
17888         * tree.c (copy_template_template_parm): Add NEWARGS
17889         parameter.
17890         (mapcar): Adjust call to copy_template_template_parm.
17891         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
17892         * method.c (build_template_template_parm_names): Change error
17893         code to avoid compilation warning.
17894
17895         * gxxint.texi: Document template template parameter
17896         name mangling.
17897
17898 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
17899
17900         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
17901         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
17902         (cp-demangle.o): New rule.
17903         (dyn-string.o): Likewise.
17904         * inc/cxxabi.h (__cxa_demangle): New declaration.
17905
17906 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
17907
17908         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
17909         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
17910         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
17911         a tree, not an int.
17912         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
17913         (make_thunk): Change prototype.
17914         (emit_thunk): Rename to use_thunk.
17915         (mangle_thunk): Change prototype.
17916         * class.c (get_derived_offset): Simplify.
17917         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
17918         BV_GENERATE_THUNK_WITH_VTABLE_P.
17919         (build_primary_vtable): Simplify.
17920         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
17921         (dfs_find_base): Remove.
17922         (update_vtable_entry_for_fn): Correct bug in finding the base
17923         where a virtual function was first declared.  Figure out whether
17924         or not to emit a vcall-thunk with the vtables in which it appears.
17925         Correct logic for deciding whether to use an ordinary thunk, or a
17926         vcall thunk.
17927         (finish_struct_1): Remove unnecssary code.
17928         (build_vtbl_initializer): Use ssize_int for the running counter of
17929         negative indices.
17930         (build_vtbl_initializer): Only use vcall thunks where necessary.
17931         Mark thunks as needing to be emitted with their vtables, or not.
17932         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
17933         indices.  Use size_binop.
17934         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
17935         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
17936         size_binop.
17937         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
17938         (build_vtable_entry): Mark thunks as needing to be emitted with
17939         their vtables, or not.
17940         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
17941         * decl2.c (mark_vtable_entries): Use use_thunk instead of
17942         emit_thunk.
17943         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
17944         information.
17945         * error.c (dump_expr): Use BV_FN.
17946         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
17947         not an int.
17948         * method.c (make_thunk): Likewise.
17949         (emit_thunk): Rename to use_thunk.  Allow callers to decide
17950         whether or not to actually emit the thunk.  Adjust for changes in
17951         representation of vcall offsets.
17952         * search.c (dfs_get_pure_virtuals): Use BV_FN.
17953         * semantics.c (emit_associated_thunks): New function.
17954         (expand_body): Use it.
17955         * ir.texi: Adjust descriptions of thunks.
17956
17957 2000-06-22  Jason Merrill  <jason@redhat.com>
17958
17959         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
17960         (tsubst_friend_function): Copy it here.
17961
17962         * decl.c (grok_op_properties): Fix typo.
17963
17964         * decl2.c (delete_sanity): Clarify warning, avoid failure on
17965         deleting void*.
17966
17967         * pt.c (check_explicit_specialization): Clarify error.
17968
17969         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
17970         an old OVERLOAD when we're declaring a non-function.
17971         (pushdecl, destroy_local_var): Check for error_mark_node.
17972         (warn_extern_redeclared_static): Also bail early if
17973         we're a CONST_DECL.
17974         (push_overloaded_decl): Ignore an old error_mark_node.
17975
17976 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
17977
17978         * call.c (build_x_va_arg): Check if in a template decl.
17979         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
17980
17981 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17982
17983         * class.c (push_lang_context): TYPE_NAME gets you to the Java
17984         types DECLs.
17985         * decl.c (check_goto): Computed gotos assumed OK.
17986
17987 2000-06-20  Jason Merrill  <jason@redhat.com>
17988
17989         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
17990         for which we don't need to look for instantiations.
17991
17992 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
17993
17994         * parse.y (program): Always call finish_translation_unit.
17995         * parse.c, parse.h: Rebuilt.
17996
17997 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
17998
17999         * method.c: Don't include hard-reg-set.h.
18000
18001 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
18002
18003         * rtti.c (get_base_offset): Cope when vbase field is in a base.
18004
18005 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
18006
18007         * call.c (build_conditional_expr): Use VOID_TYPE_P.
18008         * cvt.c (cp_convert_to_pointer): Likewise.
18009         (convert_to_void): Likewise.
18010         * error.c (dump_expr): Likewise.
18011         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
18012         * init.c (build_delete): Likewise.
18013         * method.c (emit_thunk): Likewise.
18014         * optmize.c (declare_return_variable): Likewise.
18015         * rtti.c (get_tinfo_decl_dynamic): Likewise.
18016         (get_typeid): Likewise.
18017         (build_dynamic_cast_1): Likewise.
18018         * typeck.c (composite_pointer_type): Likewise.
18019         (common_type): Likewise.
18020         (build_indirect_ref): Likewise.
18021         (build_binary_op): Likewise.
18022         (build_x_compound_expr): Likewise.
18023         (check_return_expr): Likewise.
18024         * typeck2.c (add_exception_specifier): Likewise.
18025
18026         * mangle.c (write_method_parms): Use direct comparison for end
18027         of parmlist.
18028
18029 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
18030
18031         * cp-tree.h (genrtl_try_block): Declare function.
18032         (genrtl_handler): Likewise.
18033         (genrtl_catch_block): Likewise.
18034         (genrtl_ctor_stmt): Likewise.
18035         (genrtl_subobject): Likewise.
18036         (genrtl_decl_cleanup): Likewise.
18037         (genrtl_do_poplevel): Likewise.
18038         (genrtl_do_pushlevel): Likewise.
18039         (genrtl_clear_out_block): Likewise.
18040         (genrtl_goto_stmt): Likewise.
18041         (genrtl_expr_stmt): Likewise.
18042         (genrtl_decl_stmt): Likewise.
18043         (genrtl_if_stmt): Likewise.
18044         (genrtl_while_stmt): Likewise.
18045         (genrtl_do_stmt): Likewise.
18046         (genrtl_return_stmt): Likewise.
18047         (genrtl_for_stmt): Likewise.
18048         (genrtl_break_stmt): Likewise.
18049         (genrtl_continue_stmt): Likewise.
18050         (genrtl_scope_stmt): Likewise.
18051         (genrtl_switch_stmt): Likewise.
18052         (genrtl_case_label): Likewise.
18053         (genrtl_begin_compound_stmt): Likewise.
18054         (genrtl_finish_compound_stmt): Likewise.
18055         (genrtl_compound_stmt): Likewise.
18056         (genrtl_asm_stmt): Likewise.
18057         (genrtl_named_return_value): Likewise.
18058         (genrtl_begin_stmt_expr): Likewise.
18059         (genrtl_finish_stmt_expr): Likewise.
18060         (finish_for_stmt): Removed first argument.
18061         (finish_switch_stmt): Likewise.
18062
18063         * semantics.c (genrtl_try_block): Define function.
18064         (genrtl_handler): Likewise.
18065         (genrtl_catch_block): Likewise.
18066         (genrtl_ctor_stmt): Likewise.
18067         (genrtl_subobject): Likewise.
18068         (genrtl_decl_cleanup): Likewise.
18069         (genrtl_do_poplevel): Likewise.
18070         (genrtl_do_pushlevel): Likewise.
18071         (genrtl_clear_out_block): Likewise.
18072         (genrtl_goto_stmt): Likewise.
18073         (genrtl_expr_stmt): Likewise.
18074         (genrtl_decl_stmt): Likewise.
18075         (genrtl_if_stmt): Likewise.
18076         (genrtl_while_stmt): Likewise.
18077         (genrtl_do_stmt): Likewise.
18078         (genrtl_return_stmt): Likewise.
18079         (genrtl_for_stmt): Likewise.
18080         (genrtl_break_stmt): Likewise.
18081         (genrtl_continue_stmt): Likewise.
18082         (genrtl_scope_stmt): Likewise.
18083         (genrtl_switch_stmt): Likewise.
18084         (genrtl_case_label): Likewise.
18085         (genrtl_begin_compound_stmt): Likewise.
18086         (genrtl_finish_compound_stmt): Likewise.
18087         (genrtl_compound_stmt): Likewise.
18088         (genrtl_asm_stmt): Likewise.
18089         (genrtl_named_return_value): Likewise.
18090         (genrtl_begin_stmt_expr): Likewise.
18091         (genrtl_finish_stmt_expr): Likewise.
18092         (finish_for_stmt): Removed first argument and generate rtl
18093         specific code.
18094         (finish_switch_stmt): Likewise.
18095         (do_poplevel): Removed generate rtl specific code.
18096         (do_pushlevel): Likewise.
18097         (add_tree): Likewise.
18098         (finish_goto_stmt): Likewise.
18099         (finish_expr_stmt): Likewise.
18100         (begin_if_stmt): Likewise.
18101         (finish_if_stmt_cond): Likewise.
18102         (finish_then_clause): Likewise.
18103         (begin_else_clause): Likewise.
18104         (finish_else_clause): Likewise.
18105         (finish_if_stmt): Likewise.
18106         (clear_out_block): Likewise.
18107         (begin_while_stmt): Likewise.
18108         (finish_while_stmt_cond): Likewise.
18109         (finish_while_stmt): Likewise.
18110         (begin_do_stmt): Likewise.
18111         (finish_do_body): Likewise.
18112         (finish_do_stmt): Likewise.
18113         (finish_return_stmt): Likewise.
18114         (begin_for_stmt): Likewise.
18115         (finish_for_init_stmt): Likewise.
18116         (finish_for_cond): Likewise.
18117         (finish_for_expr): Likewise.
18118         (finish_break_stmt): Likewise.
18119         (finish_continue_stmt): Likewise.
18120         (begin_switch_stmt): Likewise.
18121         (finish_switch_cond): Likewise.
18122         (finish_case_label): Likewise.
18123         (begin_try_block): Likewise.
18124         (begin_function_try_block): Likewise.
18125         (finish_try_block): Likewise.
18126         (finish_cleanup_try_block): Likewise.
18127         (finish_cleanup): Likewise.
18128         (finish_function_try_block): Likewise.
18129         (finish_handler_sequence): Likewise.
18130         (finish_function_handler_sequence): Likewise.
18131         (begin_handler): Likewise.
18132         (finish_handler_parms): Likewise.
18133         (begin_catch_block): Likewise.
18134         (finish_handler): Likewise.
18135         (begin_compound_stmt): Likewise.
18136         (finish_compound_stmt): Likewise.
18137         (finish_asm_stmt): Likewise.
18138         (finish_label_stmt): Likewise.
18139         (finish_label_decl): Likewise.
18140         (finish_subobject): Likewise.
18141         (finish_decl_cleanup): Likewise.
18142         (finish_named_return_value): Likewise.
18143         (begin_stmt_expr): Likewise.
18144         (finish_stmt_expr): Likewise.
18145
18146         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
18147         to call genrtl_expr_stmt when appropriate.
18148
18149         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
18150         begin_compound_expr to call genrtl_begin_stmt_expr and
18151         genrtl_begin_compound_expr when appropriate.
18152         (finish_init_stmts): Changed calls to finish_compound_expr and
18153         finish_stmt_expr to call genrtl_finish_compound_expr and
18154         genrtl_finish_stmt_expr when appropriate.
18155         (expand_default_init): Changed call to finish_expr_stmt to call
18156         genrtl_expr_stmt when appropriate.
18157         (build_vec_init): Likewise.
18158
18159         * parse.y (simple_stmt): Removed first argument from call to
18160         finish_for_stmt. Removed first argument from call to
18161         finish_switch_stmt.
18162
18163         * parse.c: Regenerated.
18164
18165         * pt.c (tsubst_expr): Removed first argument from call to
18166         finish_for_stmt. Removed first argument from call to
18167         finish_switch_stmt.
18168
18169 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
18170
18171         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
18172         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
18173
18174         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
18175         (cplus_tree_code_length[]): Likewise.
18176         (cplus_tree_code_name[]): Likewise.
18177         (init_parse): Added call to add_c_tree_codes. Changed
18178         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
18179
18180 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
18181
18182         * cp-tree.h (finish_mem_initializers): Declare.
18183         (count_trees): Likewise.
18184         * parse.y (base_init): Use finish_mem_initializers.
18185         * semantics.c (finish_mem_initializers): New function.
18186
18187         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
18188         the number of trees.
18189         (n_trees): Remove.
18190         (count_trees): Don't use it.
18191
18192 2000-06-15  Jason Merrill  <jason@redhat.com>
18193
18194         * tree.c (count_trees): New debugging function.
18195
18196         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
18197         * init.c (build_member_call): Pull out the name of a DECL.
18198
18199         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
18200         * semantics.c (expand_body): Push to TV_INTEGRATION here.
18201         * optimize.c (optimize_function): Not here.
18202         * pt.c (instantiate_decl): Push to TV_PARSE.
18203
18204 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
18205
18206         * cp-tree.h (struct language_function): Remove x_base_init_list
18207         and x_member_init_list.
18208         (current_base_init_list): Remove.
18209         (current_member_init_list): Likewise.
18210         (setup_vtbl_ptr): Change prototype.
18211         (emit_base_init): Likewise.
18212         (expand_member_init): Likewise.
18213         (reinit_parse_for_function): Remove.
18214         * decl.c (save_function_data): Don't clear x_base_init_list and
18215         x_member_init_list.
18216         (mark_language_function): Don't mark them.
18217         * init.c (perform_member_init): Tweak comment.
18218         (sort_member_init): Take the list of initializers as an argument.
18219         (sort_base_init): Likewise.
18220         (emit_base_init): Likewise.
18221         (expand_member_init): Return the initializer.  Don't use global
18222         variables.
18223         * lex.c (reinit_parse_for_function): Remove.
18224         * method.c (build_template_parm_names): Correct substitution.
18225         (do_build_copy_constructor): Don't use current_member_init_list
18226         and current_base_init_list.
18227         (synthesize_method): Likewise.
18228         * parse.y (base_init): Split mem-initializers into
18229         base-initializers and field-initializers.
18230         (member_init_list): Build up the list here.
18231         (member_init): Return the initializer.
18232         (fn.depfn): Don't use reinit_parse_for_function.
18233         * parse.c: Regenerated.
18234         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
18235         ERROR_MARK.
18236         (tsubst_expr): Don't use current_member_init_list
18237         and current_base_init_list.
18238         (tsubst_expr_values): Rename to ...
18239         (tsubst_initializer_list): ... this.  Use convert_from_reference.
18240         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
18241         and current_base_init_list.
18242         (begin_function_definition): Don't call reinit_parse_for_function.
18243
18244         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
18245
18246         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
18247         correctly.
18248
18249         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
18250
18251 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
18252
18253         * cp-tree.h (IF_COND): Move to c-common.h.
18254         (THEN_CLAUSE): Likewise.
18255         (ELSE_CLAUSE): Likewise.
18256         (WHILE_COND): Likewise.
18257         (WHILE_BODY): Likewise.
18258         (DO_COND): Likewise.
18259         (DO_BODY): Likewise.
18260         (RETURN_EXPR): Likewise.
18261         (EXPR_STMT_EXPR): Likewise.
18262         (FOR_INIT_STMT): Likewise.
18263         (FOR_COND): Likewise.
18264         (FOR_EXPR): Likewise.
18265         (FOR_BODY): Likewise.
18266         (SWITCH_COND): Likewise.
18267         (SWITCH_BODY): Likewise.
18268         (CASE_LOW): Likewise.
18269         (CASE_HIGH): Likewise.
18270         (GOTO_DESTINATION): Likewise.
18271         (COMPOUND_BODY): Likewise.
18272         (ASM_CV_QUAL): Likewise.
18273         (ASM_STRING): Likewise.
18274         (ASM_OUTPUTS): Likewise.
18275         (ASM_INPUTS): Likewise.
18276         (ASM_CLOBBERS): Likewise.
18277         (DECL_STMT_DECL): Likewise.
18278         (STMT_EXPR_STMT): Likewise.
18279         (LABEL_STMT_LABEL): Likewise.
18280         (SCOPE_BEGIN_P): Likewise.
18281         (SCOPE_END_P): Likewise.
18282         (SCOPE_STMT_BLOCK): Likewise.
18283         (SCOPE_NULLIFIED_P): Likewise.
18284         (SCOPE_NO_CLEANUPS_P): Likewise.
18285         (SCOPE_PARTIAL_P): Likewise.
18286         (ASM_VOLATILE_P): Likewise.
18287         (STMT_LINENO): Likewise.
18288         (STMT_LINENO_FOR_FN_P): Likewise.
18289
18290         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
18291         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
18292         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
18293         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
18294         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
18295
18296         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
18297
18298         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
18299         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
18300
18301         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
18302         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
18303         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
18304
18305 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
18306
18307         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
18308         * class.c (dfs_find_final_overrider): Set it appropriately.
18309         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
18310         avoid unneeded secondary vptrs.
18311
18312 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
18313
18314         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
18315         (check_bitfield_decl, check_field_decl): Likewise.
18316         (build_vtbl_or_vbase_field, build_base_field): Likewise.
18317         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
18318         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
18319         (xfer_tag, finish_enum): Likewise.
18320         * decl2.c (finish_builtin_type): Likewise.
18321         * init.c (init_init_processing): Likewise.
18322         * pt.c (instantiate_class_template): Likewise.
18323         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
18324         * cp-tree.h (struct lang_type): Add user_align member.
18325         (CLASSTYPE_USER_ALIGN): Define.
18326
18327 2000-06-13  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
18328
18329         * Make-lang.in (c++.install-common): Install g++-cross in
18330         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
18331         $(target_alias)-g++ and $(target_alias)-c++.
18332
18333 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
18334
18335         * class.c (vcall_offset_data_s): Add last_init and fns.
18336         (overrides): Rename to same_signature_p.
18337         (dfs_find_final_overrider): Adjust accordingly.
18338         (mark_overriders): Likewise.
18339         (warn_hidden): Likewise.
18340         (build_vtbl_initializer): Reorganize machinery for building things
18341         at negative offsets.
18342         (build_vcall_and_vbase_vtbl_entries): Likewise.
18343         (build_vbase_offset_vtbl_entries): Likewise.
18344         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
18345         offset entries.  Do not create two entries for functions with the
18346         same signature.
18347         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
18348         (build_rtti_vtbl_entries): Reorganize machinery for building things
18349         at negative offsets.
18350
18351         * optimize.c (expand_call_inline): Don't recurse into the code
18352         used to initialize the parameters more than once.
18353
18354 2000-06-11  Mark Mitchell <mark@codesourcery.com>
18355
18356         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
18357         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
18358         (find_substitution): Only use the `Sa' substitution for
18359         std::allocator, not instantiations of it.
18360         (write_template_prefix): Move comment.  Only use a TREE_LIST to
18361         represent substitutions for a member template.
18362         (write_array_type): Mangle array dimensions correctly.
18363         * optimize.c (maybe_clone_body): Copy more information from the
18364         cloned function.
18365         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
18366         on the regenerated declaration.
18367
18368 2000-06-11  Chip Salzenberg  <chip@valinux.com>
18369             Mark Mitchell <mark@codesourcery.com>
18370
18371         * class.c (build_vtable): Clarify comment.
18372         (build_ctor_vtbl_group): Pass the most derived type to
18373         build_vtable.
18374
18375 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18376
18377         * decl2.c (compare_options): Don't needlessly cast away const-ness.
18378
18379 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
18380
18381         * decl.c (add_binding): Handle duplicate declarations of external
18382         variables.
18383
18384 2000-06-09  Chip Salzenberg  <chip@valinux.com>
18385             Mark Mitchell <mark@codesourcery.com>
18386
18387         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
18388         argument.
18389         (write_signed_number): New macro.
18390         (write_unsigned_number): Likewise.
18391         (write_source_name): Use them.
18392         (write_number): Handle signed and unsigned values.
18393         (write_integer_cst): Use tree_int_cst_sgn, and use
18394         write_unsigned_number or write_signed_number as appropriate.
18395         (write_discriminator): Use write_unsigned_number or
18396         write_signed_number as appropriate.
18397         (write_template_arg_literal): Likewise.
18398         (write_array_type): Use tree_low_cst.
18399         (write_template_parm):  Use write_unsigned_number or
18400         write_signed_number as appropriate.
18401         (write_substitution): Adjust call to write_number.
18402         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
18403         (write_expression): Handle non-type template arguments of
18404         reference type correctly.
18405         (mangle_thunk): Use write_signed_number.
18406
18407 2000-06-09  Chip Salzenberg  <chip@valinux.com>
18408
18409         * mangle.c (find_substition): Don't mangle objects with typename
18410         substitutions (e.g. "cin" as "Si").
18411
18412 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
18413
18414         * call.c (add_candidate): Use ggc_alloc_cleared.
18415         * decl.c (lookup_label): Likewise.
18416         * lex.c (retrofit_lang_decl): Likewise.
18417
18418 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
18419
18420         * semantics.c (expand_body): Push to TV_EXPAND.
18421         * optimize.c (optimize_function): Push to TV_INTEGRATION.
18422         * decl.c (start_function): Always call announce_function.
18423
18424         * tinfo2.cc: Just declare abort.
18425
18426 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
18427
18428         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
18429         whenever @ is a symbolic name.
18430
18431 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
18432
18433         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
18434
18435 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
18436
18437         * decl.c (pushdecl): Look up functions by DECL_NAME, not
18438         DECL_ASSEMBLER_NAME.
18439
18440 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
18441
18442         * decl2.c (c_language): Define.
18443
18444 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
18445
18446         * lex.c (lang_init_options): Tweak.
18447
18448         * decl2.c: Remove #inclusion of diagnostic.h
18449         (lang_decode_option): Move diagnostic formatting options to
18450         toplevel.
18451
18452         * lang-options.h: Remove documentation for diagnostic options.
18453
18454         * Makefile.in (lex.o): Depends upon diagnostic.h
18455
18456 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
18457
18458         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
18459         the same DECL_RESULT, it's not a redefinition.
18460         * pt.c (tsubst_decl): Remove code to handle illegal
18461         specializations.
18462
18463 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
18464
18465         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
18466
18467 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
18468
18469         * search.c (maybe_suppress_debug_info): Don't check
18470         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
18471
18472         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
18473         here if extern_p.
18474
18475         Remember instantiation context in deferred instantiations.
18476         * cp-tree.h (struct tinst_level): Remove.
18477         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
18478         * pt.c (current_tinst_level): Now a tree.
18479         (print_template_context, push_tinst_level, pop_tinst_level,
18480         tinst_for_decl): Adjust.
18481         (reopen_tinst_level): New fn.
18482         (init_pt): Register current_tinst_level as a root.
18483         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
18484         of the pending templates list.
18485         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
18486         * lex.c (extract_interface_info): Adjust.
18487         * decl2.c (warn_if_unknown_interface): Adjust.
18488
18489 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
18490
18491         * class.c (indirect_primary_base_p): New function.
18492         (determine_primary_base): Use it.
18493
18494 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
18495
18496         Update new-abi dynamic cast algorithm.
18497         * tinfo.cc (__class_type_info::__dyncast_result): Add
18498         whole_details. Adjust constructor.
18499         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
18500         Avoid unnecessary searching.
18501         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
18502
18503 2000-06-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18504
18505         * decl.c (init_decl_processing): Don't call record_component_aliases.
18506         * tree.c (build_cplus_array_type_1): Likewise.
18507
18508 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
18509
18510         * ir.texi: Correct typo.
18511         * mangle.c (write_expression): Handle non-type template arguments
18512         with reference type.
18513         * method.c (build_overload_value): Likewise.
18514         * pt.c (convert_nontype_argument): Explicitly represent conversion
18515         to a reference with an ADDR_EXPR.
18516         (unify): Always unify arguments in left-to-right order.
18517
18518 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
18519             Mark Mitchell  <mark@codesourcery.com>
18520
18521         * Make-lang.in (CXX_SRCS): Add mangle.c.
18522         * Makefile.in (CXX_OBJS): Add mangle.o.
18523         (mangle.o): New rule.
18524
18525         * class.c (local_classes): New variable.
18526         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
18527         (get_vtt_name): Use mangle_vtt_name for new ABI.
18528         (init_class_processing): Initialize local_classes.
18529         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
18530         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
18531         (std_identifier): New macro.
18532         (DECL_VOLATILE_MEMFUNC_P): New macro.
18533         (DECL_NAMESPACE_STD_P): Likewise.
18534         (local_classes): Declare.
18535         (get_mostly_instantiated_function_type): Declare.
18536         (init_mangle): Declare.
18537         (mangle_decl): Likewise.
18538         (mangle_type_string): Likewise.
18539         (mangle_type): Likewise.
18540         (mangle_typeinfo_for_type): Likewise.
18541         (mangle_typeinfo_string_for_type): Likewise.
18542         (mangle_vtbl_for_type): Likewise.
18543         (mangle_vtt_for_type): Likewise.
18544         (mangle_ctor_vtbl_for_type): Likewise.
18545         (mangle_thunk): Likewise.
18546         (mangle_conv_op_name_for_type): Likewise.
18547         (mangle_guard_variable): Likewise.
18548         * decl.c (pushtag): Keep track of local classes.
18549         (initialize_predefined_identifiers): Initialize std_identifier.
18550         (init_decl_processing): Use std_identifier.
18551         (start_decl): Don't treat instantiations as specializations.
18552         (grokdeclarator): Likewise.
18553         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
18554         name for fully-instantiated templates.
18555         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
18556         destructors with the new ABI.
18557         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
18558         (grokfield): Use mangle_type for new ABI.
18559         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
18560         (get_sentry): Use mangle_guard_variable for new ABI.
18561         (start_static_initialization_or_destruction): Likewise.
18562         * expr.c (extract_aggr_init): Remove.
18563         (extract_scalar_init): Likewise.
18564         (extract_init): Remove #if 0'd code.
18565         * mangle.c: New function.
18566         * method.c (build_mangled_name): Assert not flag_new_abi.
18567         (build_static_name): Likewise.
18568         (build_decl_overload_real): Likewise.
18569         (build_typename_overload): Likewise.
18570         (build_overload_with_type): Likewise.
18571         (build_overload_name): Likewise.
18572         (get_ctor_vtbl_name): Likewise.
18573         (start_squangling): Likewise.
18574         (get_id_2): Likewise.
18575         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
18576         (init_method): Call init_mangle for new ABI.
18577         (make_thunk): Call mangle_thunk for new ABI.
18578         * operators.def: Correct new ABI manglings for the `%' operator.
18579         Add `::' operator.
18580         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
18581         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
18582         (lookup_template_class): Call mangle_decl for new ABI.
18583         (get_mostly_instantiated_function_type): New function.
18584         (set_mangled_name_for_template_decl): Use it.
18585         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
18586         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
18587         conversion op names.
18588         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
18589         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
18590         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
18591         mangle_typeinfo_string_for_type.
18592
18593 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
18594
18595         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
18596         (INNERMOST_TEMPLATE_ARGS): New macro.
18597         (innermost_args): Remove.
18598         (get_innermost_template_args): New function.
18599         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
18600         * error.c (dump_function_decl): Be caution when using
18601         most_general_template.
18602         * method.c (build_template_parm_names):  Use
18603         INNERMOST_TEMPLATE_ARGS.
18604         * pt.c (add_to_template_args): Tidy comment
18605         (get_innermost_template_args): New function.
18606         (check_explicit_specialization): Clear DECL_INITIAL for a new
18607         specialization.
18608         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
18609         Tidy.
18610         (push_template_decl): Always register specializations of the most
18611         general template.
18612         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
18613         (coerce_template_parms): Likewise.
18614         (lookup_template_class): Likewise.
18615         (innermost_args): Remove.
18616         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
18617         (tsubst_decl): Handle tricky specializations.  Use
18618         get_innermost_template_args.
18619         (instantiate_template): Simplify handling of partial
18620         instantiations.
18621         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
18622         (most_general_template): Reimplement, in a more straightforward
18623         manner.
18624         (regenerate_decl_from_template): Tweak formatting.  Use
18625         TMPL_ARGS_DEPTH for clarity.
18626         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
18627
18628         * dump.c (dequeue_and_dump): Dump information about thunks.
18629
18630 2000-06-01  Richard Henderson  <rth@cygnus.com>
18631
18632         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
18633
18634 2000-06-01  Richard Henderson  <rth@cygnus.com>
18635
18636         * decl2.c (unsupported_options): Fix typo, make const.
18637         (lang_decode_option): Fix bsearch argument order.
18638
18639 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
18640
18641         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
18642         on FIELD_DECLs.
18643
18644 2000-05-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18645
18646         * cp-tree.h (c_get_alias_set): Deleted.
18647         * Makefile.in (decl.o): Include ../expr.h.
18648         * decl.c (expr.h): Include.
18649         (init_decl_processing): Call record_component_aliases for arrays.
18650         (grokdeclarator): Likewise.
18651         Set TREE_ADDRESSABLE for fields that aren't bitfields.
18652         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
18653
18654 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
18655
18656         Remove guiding declaration support.
18657         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
18658         (flag_guiding_decls): Remove.
18659         * call.c (build_user_type_conversion_1): Remove support for
18660         guiding decls.
18661         (build_new_function_call): Likewise.
18662         (build_new_op): Likewise.
18663         (build_new_method_call): Likewise.
18664         * decl.c (start_function): Likewise.
18665         * friend.c (is_friend): Likewise.
18666         (do_friend): Likewise.
18667         * decl2.c ((flag_dump_translation_unit): Make it const.
18668         (flag_guiding_decls): Remove.
18669         (unsupported_options): New variable
18670         (compare_options): New function.
18671         (lang_decode_option): Use them.
18672
18673         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
18674
18675         * method.c (mangle_expression): Adjust test for legal expression
18676         operators.
18677
18678         * pt.c (instantiate_decl): Save and restore the local
18679         specializations list.
18680
18681 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
18682
18683         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
18684
18685 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
18686
18687         * call.c (add_template_candidate_real): Handle member template
18688         constructors for classes with virtual bases.
18689         (build_user_type_conversion_1): Use in_charge_arg_for_name.
18690         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
18691
18692         * ir.texi: Update thunk documentation.
18693
18694         * call.c (joust): Fix handling of overloaded builtin operators.
18695
18696 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
18697
18698         * cp-tree.h (DECL_ANTICIPATED): New macro.
18699         Document new use of DECL_LANG_FLAG_7.
18700         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
18701         in the user namespace.
18702         * lex.c (do_identifier): If the identifier's declaration has
18703         DECL_ANTICIPATED on, it has not yet been declared.  But do not
18704         replace it with an ordinary implicit declaration.
18705
18706         * tinfo2.cc: Include stdlib.h.
18707
18708 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
18709
18710         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
18711         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
18712         CLASSTYPE_ALIGN.
18713
18714 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
18715
18716         * decl2.c (lang_decode_option): Use skip_leading_substring instead
18717         of plain strncmp.
18718
18719 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
18720
18721         * operators.def (<?): Duplicated, should have been...
18722         (>?): this.  Fixed.
18723
18724 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
18725             Mark Mitchell  <mark@codesourcery.com>
18726
18727         * cp-tree.h (ansi_opname): Make it a macro.
18728         (ansi_assopname): Likewise.
18729         (struct lang_decl_flags): Add assignment_operator_p.
18730         (struct lang_decl): Add operator_code.
18731         (DECL_VTT_PARM): Adjust.
18732         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
18733         overloaded operator.
18734         (SET_OVERLOADED_OPERATOR_CODE): New macro.
18735         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
18736         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
18737         (opname_tab): Remove.
18738         (assignop_tab): Likewise.
18739         (operator_name_info_t): New type.
18740         (operator_name_info): New variable.
18741         (assignment_operator_name_info): Likewise.
18742         (build_cp_library_fn): Remove declaration.
18743         (push_cp_library_fn): Likewise.
18744         (operator_name_string): Likewise.
18745         (build_decl_overload): Likewise.
18746         * call.c (print_z_candidates): Simplify.
18747         (build_object_call): Adjust usage of ansi_opname.  Use
18748         DECL_OVERLOADED_OPERATOR_P.
18749         (op_error): Adjust operator name lookup.
18750         (build_conditional_expr): Adjust usage of ansi_opname.
18751         (build_new_op): Likewise.
18752         (build_op_delete_call): Likewise.
18753         (build_over_call): Likewise.
18754         (joust): Use DECL_OVERLOADED_OPERATOR_P.
18755         * decl.c (duplicate_decls): Copy operator_code.
18756         (init_decl_processing): Adjust parameters to push_cp_library_fn.
18757         (builtin_function): Adjust parameters to build_library_fn_1.
18758         (build_library_fn_1): Accept an overloaded operator code.
18759         (build_library_fn): Pass ERROR_MARK.
18760         (build_cp_library_fn): Accept an overloaded operator code.
18761         (push_cp_library_fn): Likewise.
18762         (grokfndecl): Tweak.
18763         (grokdeclarator): Simplify code to compute names of overloaded
18764         operators.  Adjust use of ansi_opname.
18765         (ambi_op_p): Work on tree_codes, not identifiers.
18766         (unary_op_p): Likewise.
18767         (grok_op_properties): Likewise.
18768         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
18769         (lang_mark_tree): Don't try to mark the operator_code.
18770         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
18771         * error.c (dump_decl): Remove special handling for operator
18772         names.
18773         (dump_function_name): Likewise.
18774         (dump_expr): Adjust name lookup of operators.
18775         (op_to_string): Simplify.
18776         (assop_to_string): Likewise.
18777         * init.c (build_new_1): Adjust use of ansi_opname.
18778         * lex.c (opname_tab): Remove.
18779         (assignop_tab): Likewise.
18780         (ansi_opname): Likewise.
18781         (ansi_assopname): Likewise.
18782         (operator_name_string): Likewise.
18783         (reinit_lang_specific): Likewise.
18784         (operator_name_info): New variable.
18785         (assignment_operator_name_info): Likewise.
18786         (init_operators): New function.
18787         (init_parse): Use it.
18788         (do_identifier): Adjust use of ansi_opname.
18789         * method.c (mangle_expression): Don't use ansi_opname for
18790         mangling.
18791         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
18792         (build_decl_overload): Remove.
18793         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
18794         (do_build_assign_ref): Adjust use of ansi_opname.
18795         (synthesize_method): Likewise.
18796         (implicitly_declare_fn): Likewise.
18797         * operators.def: New file.
18798         * parse.y (operator): Adjust use of ansi_opname.
18799         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
18800         (set_mangled_name_for_template_decl): Don't play games with
18801         current_namespace.
18802         (special_function_p): Adjust use of ansi_opname.
18803         * typeck.c (check_return_expr): Likewise.
18804         * Make-lang.in (cc1plus): Depend on operators.def.
18805         * Makefile.in (lex.o): Likewise.
18806         (decl.o): Likewise.
18807
18808 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
18809
18810         * Make-lang.in (cplib2.ready): Eradicate.
18811
18812 2000-05-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18813
18814         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
18815         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
18816         (built_min, cp_tree_equal): Likewise.
18817
18818 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
18819
18820         * class.c (layout_nonempty_base_or_field): Replace
18821         `record_layout_info' with `record_layout_info_s'.
18822
18823 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
18824
18825         Fix goto checking.
18826         * cp-tree.h (struct language_function): x_named_labels is now
18827         a struct named_label_list*.
18828         * decl.c (struct named_label_use_list): Renamed from...
18829         (struct named_label_list): ...this.  New struct.
18830         (push_binding_level): Don't set eh_region.
18831         (note_level_for_eh): New fn.
18832         (pop_label): Take label and old value directly.
18833         (pop_labels): Adjust for new named_labels format.
18834         (lookup_label): Likewise.
18835         (poplevel): Note characteristics of a binding level containing a
18836         named label.  Mess with named label lists earlier.
18837         (mark_named_label_lists): New fn.
18838         (mark_lang_function): Call it.
18839         (use_label): New fn, split out from...
18840         (make_label_decl): ...here.  Don't call it.
18841         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
18842         check_previous_gotos): New fns, split out from...
18843         (define_label): ...here.
18844         (check_switch_goto): New fn.
18845         (define_case_label): Call it.
18846         (check_goto): New fn.
18847         * semantics.c (finish_goto_stmt): Call it and use_label.
18848         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
18849         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
18850
18851 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
18852
18853         * class.c (build_vtable_entry_ref): Correct usage of
18854         get_vtbl_decl_for_binfo.
18855
18856         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
18857         * method.c (implicitly_declare_fn): Not here.
18858
18859 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
18860
18861         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
18862         (CPTI_PTMD_DESC_TYPE): ... here.
18863         (ptmd_desc_type_node): Rename to ...
18864         (ptm_desc_type_node): ... here.
18865         * decl.c: Likewise.
18866         * rtti.c (ptmd_initializer): Rename to ...
18867         (ptm_initializer): ... here.
18868         (sythesize_tinfo_var): Adjust. Deal with pointer to member
18869         function.
18870         (create_tinfo_types): Adjust.
18871
18872 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
18873
18874         Finish implementation of VTTs.
18875         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
18876         CPTI_VTT_PARM_IDENTIFIER.
18877         (vtt_parm_identifier): New macro.
18878         (vtt_parm_type): Likewise.
18879         (BINFO_SUBVTT_INDEX): Likewise.
18880         (BINFO_VPTR_INDEX): Likewise.
18881         (struct lang_decl): Add vtt_parm.
18882         (DECL_VTT_PARM): New macro.
18883         (DECL_USE_VTT_PARM): Likewise.
18884         (DECL_NEEDS_VTT_PARM_P): Likewise.
18885         (get_vtt_name): Declare.
18886         (build_artificial_parm): Likewise.
18887         (fixup_all_virtual_upcast_offsets): Likewise.
18888         (expand_indirect_vtbls_init): Remove.
18889         * call.c (build_new_method_call): Pass the vtt to subobject
18890         constructors and destructors.
18891         * class.c (get_vtt_name): Give it external linkage.
18892         (build_clone): Handle the magic VTT parameters for clones.
18893         (clone_function_decl): Fix typo in comment.
18894         (build_vtt): Keep track of the indices in the VTTs where various
18895         entities are stored.
18896         (build_vtt_inits): Likewise.
18897         (dfs_build_vtt_inits): Likewise.
18898         (build_ctor_vtbl_group): Tweak type of construction vtables.
18899         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
18900         primary bases, when building construction vtables.
18901         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
18902         (initialize_predefined_identifiers): Add vtt_parm_identifier.
18903         (init_decl_processing): Initialize vtt_parm_type.
18904         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
18905         (lang_mark_tree): Make vtt_parm.
18906         * decl2.c (build_artificial_parm): New function.
18907         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
18908         (grokclassfn): Use build_artificial_parm.
18909         * init.c (initialize_vtbl_ptrs): Call
18910         fixup_all_virtual_upcast_offsets directly.
18911         (perform_member_init): Use the complete subobject destructor for
18912         member cleanups.
18913         (build_vtbl_address): New function.
18914         (expand_virtual_init): Handle VTTs.
18915         * optimize (maybe_clone_body): Likewise.
18916         * search.c (fixup_all_virtual_upcast_offsets): Give it external
18917         linkage.
18918         (expand_indirect_vtbls_init): Remove.
18919         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
18920         * tree.c (make_binfo): Make them bigger.
18921
18922 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
18923
18924         * inc/cxxabi.h (__pbase_type_info): Define, based on
18925         __pointer_type_info.
18926         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
18927         (__pointer_to_member_type_info): Likewise.
18928         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
18929         (__pointer_to_member_type_info::__is_pointer_p): Remove.
18930         (__pointer_type_info::__do_catch): Rename to ...
18931         (__pbase_type_info::__do_catch): ... here. Adjust.
18932         (__pbase_type_info::__pointer_catch): Implement.
18933         (__pointer_type_info::__pointer_catch): Adjust.
18934         (__pointer_to_member_type_info::__pointer_catch): Adjust.
18935
18936 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
18937
18938         * tinfo.h (__user_type_info::contained_virtual_p): New
18939         predicate.
18940         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
18941         shaped hierarchy.
18942         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
18943         diamond shaped hierarchy. Add early out for mixed diamond and
18944         duplicate shaped hierarchy.
18945
18946 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
18947
18948         * cp-tree.h (build_delete): Change prototype.
18949         (build_vec_delete): Likewise.
18950         * call.c (build_scoped_method_call): Use special_function_kind
18951         values to indicate the kind of destruction to be done.
18952         (build_method_call): Likewise.
18953         * decl.c (finish_destructor_body): Likewise.
18954         (maybe_build_cleanup_1): Likewise.  Rename to ...
18955         (maybe_build_cleanup): ... this.
18956         * decl2.c (delete_sanity): Use special_function_kind
18957         values to indicate the kind of destruction to be done.
18958         (build_cleanup): Likewise.
18959         * init.c (perform_member_init): Likewise.
18960         (build_vec_delete_1): Likewise.
18961         (build_dtor_call): Simplify.
18962         (build_delete): Use special_function_kind
18963         values to indicate the kind of destruction to be done.
18964         (build_vbase_delete): Likewise.
18965         (build_vec_delete): Likewise.
18966
18967         * init.c (sort_member_init): Fix typo in error message generation
18968         code.
18969
18970 2000-05-15  Donald Lindsay  <dlindsay@cygnus.com>
18971
18972         * semantics.c (begin_class_definition): make the packed
18973         attribute be sensitive to the "-fpack-struct" command line flag
18974
18975 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
18976
18977         Update new-abi upcast algorithm.
18978         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
18979         prototype and meaning of return value.
18980         (__si_class_type_info::__do_upcast): Likewise.
18981         (__vmi_class_type_info::__do_upcast): Likewise.
18982         * tinfo.cc (__class_type_info::__upcast_result): Replace
18983         whole2dst with part2dst. Adjust ctor.
18984         (__class_type_info::__do_upcast): Adjust call of worker function.
18985         (__class_type_info::__do_upcast): Adjust.
18986         (__si_class_type_info::__do_upcast): Adjust. Use parent's
18987         __do_upcast.
18988         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
18989         virtual base in diamond hierarchy bug.
18990
18991 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
18992
18993         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
18994         and bitfield to tinfo_fn_p.
18995         (DECL_TINFO_FN_P): Adjust.
18996         (SET_DECL_TINFO_FN_P): Likewise.
18997         (DECL_MUTABLE_P): Likewise.
18998         (DECL_C_BIT_FIELD): Likewise.
18999         (SET_DECL_C_BIT_FIELD): Likewise.
19000         (CLEAR_DECL_C_BIT_FIELD): Likewise.
19001         (DECL_UNINLINABLE): Likewise.
19002         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
19003         (handle_using_decl): Remove assertion.
19004         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
19005         to build FIELD_DECLs.
19006         (build_base_field): Likewise.
19007         (layout_class_type): Likewise.
19008         * decl.c (init_decl_processing): Likewise.
19009         (build_ptrmemfunc_type): Likewise.
19010         (grokdeclarator): Likewise.
19011         * decl2.c (grok_x_components): Likewise.
19012         * except.c (call_eh_info): Likewise.
19013         * init.c (init_init_processing): Likewise.
19014         * rtti.c (expand_class_desc): Likewise.
19015         (create_pseudo_type_info): Likewise.
19016         (get_vmi_pseudo_type_info): Likewise.
19017         (create_tinfo_types): Likewise.
19018         * ptree.c (print_lang_decl): Adjust.
19019         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
19020         before checking DECL_MUTABLE_P.
19021
19022         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
19023         parameters for template functions.
19024         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
19025         destructors as well as constructors.
19026
19027 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
19028
19029         * class.c (build_ctor_vtbl_group): Set inits.
19030         * optimize.c (maybe_clone_body): Set DECL_INLINE and
19031         DECL_THIS_INLINE appropriately for clones.
19032
19033         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
19034         (DECL_CONV_FN_P): Simplify.
19035         (DECL_OPERATOR): Remove.
19036         (language_to_string): Declare.
19037         * decl.c (duplicate_decls): Fix typo in comment.
19038         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
19039         (grok_op_properties): Use DECL_CONV_FN_P instead of
19040         IDENTIFIER_TYPENAME_P.
19041         * dump.c (dequeue_and_dump): Dump the language linkage of
19042         declarations.
19043         * error.c (language_to_string): Give it external linkage.
19044         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
19045         (implicitly_declare_fn): Set DECL_LANGUAGE.
19046         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
19047         IDENTIFIER_TYPENAME_P.
19048         (tsubst_decl): Likewise.
19049         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
19050         * semantics.c (finish_member_declaration): Don't mark members of
19051         classes declared in an extern "C" region as extern "C".
19052
19053 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19054
19055         * decl2.c (qualified_lookup_using_namespace): Look through
19056         namespace aliases.
19057
19058         * decl.c (push_using_decl): Return the old decl on namespace level.
19059
19060 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
19061
19062         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
19063         (VTT_NAME_PREFIX): New macro.
19064         (CTOR_VTBL_NAME_PREFIX): Likewise.
19065         (get_ctor_vtbl_name): New function.
19066         * class.c (get_vtable_name): Simplify.
19067         (get_vtt_name): New function.
19068         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
19069         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
19070         when a virtual base becomes primary.
19071         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
19072         VTTs.
19073         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
19074         additional parameters.
19075         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
19076         (initialize_array): New function.
19077         (build_vtt): Likewise.
19078         (build_vtt_inits): Likewise.
19079         (dfs_build_vtt_inits): Likewise.
19080         (dfs_fixup_binfo_vtbls): Likewise.
19081         (build_ctor_vtbl_group): Likewise.
19082         (initialize_vtable): Use initialize_array.
19083         (accumulate_vtbl_inits): Reimplement to handle construction
19084         vtables.
19085         (dfs_accumulate_vtbl_inits): Likewise.
19086         (bulid_vtbl_initializer): Adjust parameter name.
19087         * method.c (build_typename_overload): Remove #if 0'd code.
19088         (get_ctor_vtbl_name): New function.
19089         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
19090         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
19091
19092         * cp-tree.h (struct lang_type): Remove search_slot.
19093         (CLASSTYPE_SEARCH_SLOT): Remove.
19094         (emit_base_init): Change prototype.
19095         (initialize_vtbl_ptrs): Likewise.
19096         (expand_indirect_vtbls_init): Likewise.
19097         (clear_search_slots): Remove.
19098         * decl.c (lang_mark_tree): Don't mark search_slot.
19099         * init.c (initialize_vtbl_ptrs): Simplify.
19100         (emit_base_init): Likewise.
19101         * search.c (struct vbase_info): Document decl_ptr.
19102         (convert_pointer_to_single_level): Remove.
19103         (dfs_find_vbases): Remove.
19104         (dfs_init_base_pointers): Simplify.
19105         (dfs_clear_vbase_slots): Remove.
19106         (dfs_vtable_path_unmark): New function.
19107         (init_vbase_pointers): Simplify.
19108         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
19109         (expand_indirect_vtbls_init): Simplify.  Don't call
19110         mark_all_temps_used.
19111         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
19112         initialize_vtbl_ptrs.
19113
19114 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
19115
19116         * except.c: Add static prototypes.
19117
19118 2000-05-20  H.J. Lu  <hjl@gnu.org>
19119
19120         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
19121
19122 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
19123
19124         Don't create a separate copy of virtual bases for the
19125         CLASSTYPE_VBASECLASSES list.
19126         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
19127         (BINFO_FOR_VBASE): Remove.
19128         (CANONICAL_BINFO): Adjust.
19129         (binfo_for_vbase): New function.
19130         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
19131         instead of BINFO_FOR_VBASE.
19132         (build_vbase_pointer): Likewise.
19133         (build_secondary_vtable): Likewise.
19134         (dfs_mark_primary_bases): Likewise.
19135         (mark_primary_bases): Likewise.
19136         (layout_nonempty_base_or_field): Likewise.
19137         (dfs_set_offset_for_shared_vbases): Likewise.
19138         (dfs_set_offset_for_unshared_vbases): Likewise.
19139         (layout_virtual_bases): Likewise.  Adjust for changes to the
19140         CLASSTYPE_VBASECLASSES list.
19141         (dump_class_hierarchy_r): Use binfo_for_vbase
19142         instead of BINFO_FOR_VBASE.
19143         (dump_class_hierarchy): Likewise.
19144         (finish_vtbls): Likewise.
19145         (build_vtbl_initializer): Adjust for changes to the
19146         CLASSTYPE_VBASECLASSES list.
19147         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
19148         * decl.c (finish_destructor_body): Adjust for changes to the
19149         CLASSTYPE_VBASECLASSES list.
19150         * init.c (sort_base_init): Use binfo_for_vbase.
19151         (construct_virtual_bases): Adjust for changes to the
19152         CLASSTYPE_VBASECLASSES list.
19153         (expand_member_init): Use binfo_for_vbase.
19154         (build_vbase_delete):  Adjust for changes to the
19155         CLASSTYPE_VBASECLASSES list.
19156         * method.c (do_build_copy_constructor): Likewise.
19157         * rtti.c (get_base_offset): Use binfo_for_vbase.
19158         (expand_class_desc): Remove #if 0'd code.
19159         * search.c (struct vbase_info): Remove vbase_types.
19160         (get_base_distance):  Use binfo_for_vbase.
19161         (lookup_field_queue_p): Use CANONICAL_BINFO.
19162         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
19163         (get_pure_virtuals): Adjust for changes to the
19164         CLASSTYPE_VBASECLASSES list.
19165         (dfs_find_vbases): Use binfo_for_vbase.
19166         (dfs_init_vbase_pointers): Likewise.
19167         (init_vbase_pointers): Don't initialize vi.vbase_types.
19168         (virtual_context): Use binfo_for_vbase.
19169         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
19170         CLASSTYPE_VBASECLASSES list.
19171         (expand_indirect_vtbls_init): Simplify.
19172         (dfs_get_vbase_types): Don't replicate virtual bases.
19173         (find_vbase_instance): Use binfo_for_vbase.
19174         (binfo_for_vbase): New function.
19175         * typeck.c (get_delta_difference): Use binfo_for_vbase.
19176
19177 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
19178
19179         * decl2.c (finish_anon_union): Generalize error messages to handle
19180         anonymous structures.
19181         * init.c (perform_member_init): Remove `name' parameter.
19182         (build_field_list): New function.
19183         (sort_member_init): Handle anonymous union initialization order
19184         correctly.  Check for multiple initializations of the same union.
19185         (emit_base_init): Don't look up fields by name here.
19186         (expand_member_init): Record the result of name lookup for future
19187         reference.
19188         * typeck.c (build_component_ref): Fix formatting.
19189
19190 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
19191
19192         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
19193         * typeck.c (build_x_compound_expr): Replace warn_unused with
19194         warn_unused_value.
19195
19196         * decl2.c (lang_decode_option): Update -Wall unused flags by
19197         calling set_Wunused.
19198
19199 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
19200
19201         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
19202         * init.c (dfs_vtable_path_unmark): Remove.
19203         * search.c (marked_new_vtable_p): Likewise.
19204         (unmarked_new_vtable_p): Likewise.
19205         (dfs_search_slot_nonempty_p): Likewise.
19206         (dfs_mark): Likewise.
19207         (dfs_vtable_path_unmark): Likewise.
19208         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
19209         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
19210         (dfs_init_vbase_pointers): Remove special-case new ABI code.
19211         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
19212         (init_vbase_pointers): Simplify.
19213         (expand_indirect_vtbls_init): Likewise.
19214
19215         * class.c (copy_virtuals): New function.
19216         (build_primary_table): Use it.
19217         (build_secondary_vtable): Likewise.
19218         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
19219         indicate that no vcall offset is required.
19220         (add_virtual_function): Likewise.
19221         (modify_all_vtables): Likewise.
19222         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
19223         (dfs_accumulate_vtbl_inits): Likewise.
19224         (build_vtbl_initializer): Make changes to handle construction
19225         vtables.
19226         (dfs_build_vcall_offset_vtbl_entries): Likewise.
19227         (build_rtti_vtbl_entries): Likewise.
19228         (build_vtable_entries): Handle a NULL vcall_index.
19229
19230 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
19231
19232         * decl2.c (lang_decode_option): Fix thinko.
19233
19234 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
19235
19236         * except.c (check_handlers): New fn.
19237         * cp-tree.h: Declare it.
19238         * semantics.c (finish_handler_sequence): Call it.
19239         (finish_function_handler_sequence): Likewise.
19240         (finish_handler_parms): Set TREE_TYPE on the handler.
19241         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
19242         * search.c (get_base_distance_recursive): If protect>1, ignore
19243         special access.
19244         (get_base_distance): Don't reduce watch_access.
19245
19246 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
19247
19248         * lex.c: #include diagnostic.h.
19249         (lang_init_options): Set default prefixing rules.
19250
19251         * lang-options.h: Add -fdiagnostics-show-location=.
19252
19253         * decl2.c: #include diagnostic.h.
19254         (lang_decode_option): Handle -fdiagnostics-show-location=.
19255
19256 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
19257
19258         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
19259         * vec.cc: Revert my 2000-05-07 change.
19260
19261 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
19262
19263         * class.c (check_field_decls): Complain about non-static data
19264         members with same name as class in class with constructor.
19265
19266 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
19267
19268         * decl.c (grokdeclarator): Allow non-static data members with
19269         same name as class.
19270
19271 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
19272
19273         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
19274         and pending_inline.filename.  Update prototypes.
19275         * decl.c (define_label): Constify filename parameter.
19276         * decl2.c (warn_if_unknown_interface): Constify local char *.
19277         * input.c Constify input_source.filename. Don't declare
19278         input_filename or lineno.  Constify filename parameter to feed_input.
19279         * lex.c (init_parse): Constify parameter and return value.
19280         (cp_pragma_interface, cp_pragma_implementation): Constify
19281         filename argument.
19282         (reinit_parse_for_method, reinit_parse_for_block,
19283         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
19284         Constify local char *.
19285         * pt.c: Don't declare lineno or input_filename.
19286         (print_template_context, tsubst_friend_function, tsubst_decl,
19287         tsubst, instantiate_decl): Constify local char *.
19288         * semantics.c (expand_body): Constify local char *.
19289         * tree.c (build_srcloc): Constify filename parameter.
19290         * typeck.c (c_expand_asm_operands): Constify filename
19291         parameter.
19292
19293 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
19294
19295         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
19296         offsetof expansion.
19297
19298 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
19299
19300         * inc/cxxabi.h:  Fix typos in comment.
19301         (__base_class_info::__offset): Use a static_cast.
19302
19303 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
19304
19305         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
19306         of std::size_t and std::ptrdiff_t respectively.
19307         * tinfo.cc: Likewise.
19308         * vec.cc: Likewise.
19309
19310 2000-05-06  Richard Henderson  <rth@cygnus.com>
19311
19312         * typeck.c (build_c_cast): Don't warn integer->pointer size
19313         mismatch for constants.
19314
19315 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
19316
19317         * rtti.c (ptmd_initializer): Set non-public, if class is
19318         incomplete.
19319
19320         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
19321         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
19322         __cxa_vec_delete): Likewise.
19323         * tinfo.cc (__dynamic_cast): Likewise.
19324         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
19325         __cxa_vec_delete): Likewise.
19326
19327 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
19328
19329         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
19330         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
19331         (lang_decl_flags): Add vcall_offset.
19332         (THUNK_VCALL_OFFSET): Use it.
19333         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
19334         * method.c (make_thunk): Create the lang_decl here, not in
19335         emit_thunk.
19336         (emit_thunk): Make generic thunks into ordinary functions once
19337         they have been fed to expand_body.
19338         * semantics.c (expand_body): Set current_function_is_thunk here.
19339
19340 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19341
19342         * class.c (update_vtable_entry_for_fn): Prototype.
19343
19344         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
19345         and `tmpl'.
19346
19347         * search.c (dfs_build_inheritance_graph_order): Prototype.
19348
19349 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
19350
19351         * cp-tree.h (special_function_kind): Add various kinds of
19352         destructors.
19353         (special_function_p): New function.
19354         * class.c (overrides): Don't let one kind of destructor override
19355         another.
19356         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
19357         whether or not to instantiate a template.
19358         * tree.c (special_function_p): Define.
19359
19360 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
19361
19362         * cp-tree.def (THUNK_DECL): Remove.
19363         * cp-tree.h (DECL_THUNK_P): New macro.
19364         (DECL_NON_THUNK_FUNCTION_P): Likewise.
19365         (DECL_EXTERN_C_FUNCTION_P): Likewise.
19366         (SET_DECL_THUNK_P): Likewise.
19367         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
19368         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
19369         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
19370         * decl.c (decls_match): Use DECL_EXTERN_C_P.
19371         (duplicate_decls): Likewise.
19372         (pushdecl): Likewise.  Adjust thunk handling.
19373         (grokfndecl): Use DECL_EXTERN_C_P.
19374         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
19375         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
19376         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
19377         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
19378         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
19379         DECL_NO_STATIC_CHAIN.
19380         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
19381         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
19382         * search.c (covariant_return_p): Remove THUNK_DECL handling.
19383         * ir.texi: Update.
19384
19385 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
19386
19387         * tree.c (walk_tree): Set lineno.
19388
19389 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
19390
19391         * exception.cc: Update license notice.
19392         * new.cc: Likewise.
19393         * new1.cc: Likewise.
19394         * new2.cc: Likewise.
19395         * tinfo.cc: Likewise.
19396         * tinfo2.cc: Likewise.
19397         * vec.cc: Likewise.
19398         * inc/cxxabi.h: Likewise.
19399         * inc/exception: Likewise.
19400         * inc/new: Likewise.
19401         * inc/new.h: Likewise.
19402         * inc/typeinfo: Likewise.
19403
19404 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
19405
19406         * tree.c (build_target_expr_with_type): If we already have a
19407         TARGET_EXPR, just return it.
19408
19409         * optimize.c (initialize_inlined_parameters): Don't generate an
19410         EXPR_STMT if we can just use DECL_INITIAL.
19411         * decl.c (emit_local_var): Only make the initialization a
19412         full-expression if stmts_are_full_exprs_p.
19413
19414 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
19415
19416         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
19417         macro.
19418         * call.c (standard_conversion): Use it.
19419         (direct_reference_binding): Likewise.
19420         (build_over_call): Likewise.
19421         (is_properly_derived_from): Likewise.
19422         (compare_ics): Likewise.
19423         * class.c (resolves_to_fixed_type_p): Likewise.
19424         * optimize.c (declare_return_variable): Likewise.
19425         * pt.c (is_specialization_of): Likewise.
19426         (unify): Likewise.
19427         * typeck.c (comp_target_parms): Likeiwse.
19428         (build_static_cast): Likewise.
19429         (build_reinterpret_cast): Likewise.
19430         (build_const_cast): Likewise.
19431         (comp_ptr_ttypes_real): Likewise.
19432         (comp_ptr_ttypes_const): Likewise.
19433         * typeck2.c (process_init_constructor): Likewise.
19434
19435 2000-04-30  Scott Snyder <snyder@fnal.gov>
19436
19437         * decl.c (finish_destructor_body): Use the base destructor when
19438         destroying virtual bases.
19439
19440 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
19441
19442         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
19443         STMT_EXPRs.
19444         * optimize.c (struct inline_data): Add target_exprs field.
19445         (declare_return_variable): When a function returns an aggregate,
19446         use the variable declared in the TARGET_EXPR as the remapped
19447         DECL_RESULT.
19448         (expand_call_inline): Update the pending target_exprs stack.
19449         (optimize_function): Initialize the stack.
19450
19451         * decl2.c (finish_file): Fix typo in comment.
19452
19453         * method.c (emit_thunk): Don't try to return a `void' value.
19454
19455         * optimize.c (initialize_inlined_parameters): If the parameter is
19456         addressable, we need to make a new VAR_DECL, even if the
19457         initializer is constant.
19458
19459 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
19460
19461         * decl.c (grok_op_properties): Add an extra check of argtypes.
19462
19463 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
19464
19465         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
19466         variables.
19467         (initialize_inlined_parameters): Try to avoid creating new
19468         VAR_DECLs.
19469
19470 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
19471
19472         * lex.c (my_get_run_time): Remove.
19473         (init_filename_times): Use get_run_time instead of my_get_run_time.
19474         (check_newline): Likewise.
19475         (dump_time_statistics): Likewise.
19476         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
19477         of computing elapsed time explicitly.
19478
19479 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
19480
19481         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
19482         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
19483         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
19484         before calling decl_constant_value.
19485         * class.c (check_bitfield_decl): Likewise.
19486         * cvt.c (ocp_convert): Likewise.
19487         (convert): Likewise.
19488         * decl.c (compute_array_index_type): Likewise.
19489         (build_enumerator): Likewise.
19490         * decl2.c (check_cp_case_value): Likewise.
19491         * pt.c (convert_nontype_argument): Likewise.
19492         (tsubst): Likewise.
19493         * typeck.c (decay_conversion): Likewise.
19494         (build_compound_expr): Likewise.
19495         (build_reinterpret_cast): Likewise.
19496         (build_c_cast): Likewise.
19497         (convert_for_assignment): Likewise.
19498
19499 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
19500
19501         * decl.c (finish_function): Don't play games with DECL_INLINE.
19502
19503 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
19504
19505         * ir.texi: Correct typo.
19506
19507 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19508
19509         * decl.c (grokdeclarator): Reject VLAs as members.
19510
19511 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
19512
19513         * call.c (standard_conversion): Accept conversion between
19514         COMPLEX_TYPEs.
19515
19516         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
19517
19518 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
19519
19520         * decl2.c (finish_file): Remove double setup for accounting
19521         compile time.
19522
19523 2000-04-24  Robert Lipe <robertlipe@usa.net>
19524
19525         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
19526
19527 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
19528
19529         * new.cc (set_new_handler): Needs to be in std::.
19530
19531 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
19532
19533         * cp-tree.h (lang_decl): Remove pretty_function_p.
19534         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
19535         language-specific node.
19536         * decl.c (cp_make_fname_decl): Use build_decl, not
19537         build_lang_decl, to build the variables.
19538         (grokvardecl): Don't call build_lang_decl for local variables in
19539         templates.
19540         (grokdeclarator): Don't call build_lang_decl for local type
19541         declarations in templates.
19542         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
19543         zero'd memory, rather than calling memset.
19544         * pt.c: Include hashtab.h.
19545         (local_specializations): New variable.
19546         (retrieve_local_specialization): Use it.
19547         (register_local_specialization): Likewise.
19548         (tsubst_decl): Don't assume local variables have
19549         DECL_LANG_SPECIFIC.
19550         (instantiate_decl): Set up local_specializations.
19551         * Makefile.in (HTAB_H): New variable.
19552
19553 2000-04-23  Richard Henderson  <rth@cygnus.com>
19554
19555         * typeck.c (c_expand_asm_operands): Restore the original
19556         contents of the output list.
19557
19558 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
19559
19560         * ir.texi:  Document complex number representation.
19561
19562 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
19563
19564         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
19565         (target_incomplete_p): New function.
19566         (tinfo_base_init): Create comdat NTBS name variable.
19567         (ptr_initializer): Add non_public parameter. Calculate it.
19568         (ptmd_initializer): Likewise.
19569         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
19570         (create_real_tinfo_var): Add non_public parameter. Use it.
19571         Push proxy into global namespace.
19572         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
19573         New enumeration.
19574         * inc/typeinfo (type_info::before, type_info::operator==):
19575         Compare __name addresses.
19576
19577         * tinfo2.cc: Remove new-abi builtins comment.
19578
19579 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
19580
19581         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
19582
19583         * call.c (joust): Exit early if we get the same function, too.
19584
19585         * decl2.c (key_method): Return NULL_TREE for template classes.
19586         (import_export_class): Don't need to check for template classes.
19587
19588 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
19589
19590         * lex.c: Remove references to cccp.c.
19591
19592 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
19593
19594         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
19595         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
19596         (DECL_DESTRUCTOR_P): Use destructor_attr.
19597         (DECL_CONST_MEMFUNC_P): Reimplement.
19598         (DECL_VOLATILE_MEMFUNC_P): Remove.
19599         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
19600         (overrides): Use DECL_DESTRUCTOR_P.
19601         (check_for_override): Likewise.
19602         * decl.c (start_function): Likewise.
19603         * decl2.c (grokfclassfn): Likewise.
19604         (check_classfn): Likewise.
19605         (grok_function_init): Likewise.
19606
19607 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
19608
19609         * decl2.c (grokfield): Issue error on illegal data member
19610         declaration.
19611
19612 2000-04-17  Mark P Mitchell  <mark@codesourcery.com>
19613
19614         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
19615
19616 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
19617
19618         * class.c (build_vtable_entry): Don't build thunks for type-info
19619         functions.
19620
19621 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
19622
19623         * decl.c (decls_match): Allow a redeclaration of a builtin to
19624         specify args while the builtin did not.
19625
19626 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
19627
19628         * cp-tree.def (THUNK_DECL): Add to documentation.
19629         * cp-tree.h (flag_huge_objects): Declare.
19630         * class.c (modify_vtable_entry): Tidy.
19631         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
19632         Calculate delta appropriately for the new ABI.
19633         (dfs_modify_vtables): Use it.
19634         (modify_all_vtables): Fix thinko in code to add overriding copies
19635         of functions to primary vtables.
19636         (build_clone): Fix typo in comment.
19637         (clone_function_decl): Correct order of destructors in vtable.
19638         (build_vbase_offset_vtbl_entries): Adjust comment.
19639         (dfs_vcall_offset_queue_p): Remove.
19640         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
19641         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
19642         (build_vtable_entry): Correct check for pure virtual functions.
19643         Don't declare flag_huge_objects.
19644         * decl.c (flag_huge_objects): Remove declaration.
19645         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
19646         Use int_size_in_bytes.
19647         (emit_thunk): Handle vcall offset thunks.
19648
19649 2000-04-15  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19650
19651         * decl2.c (parse_time, varconst_time): Delete declarations.
19652         (finish_file): Delete LINENO declaration.
19653         START_TIME and THIS_TIME now long.
19654
19655 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
19656
19657         * class.c (build_base_field): Reformat comment.
19658
19659         * inc/cxxabi.h (stddef.h): Comment inclusion.
19660         (__base_class_info::__offset): Comment shift.
19661
19662 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
19663
19664         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
19665         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
19666         (cp_push_exception_identifier): New macro.
19667         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
19668         (DECL_BASE_DESTRUCTOR_P): Likewise.
19669         (DECL_DELETING_DESTRUCTOR_P): Likewise.
19670         (get_vtbl_decl_for_binfo): Fix formatting.
19671         (in_charge_arg_for_name): New macro.
19672         (maybe_build_cleanup_and_delete): Remove declaration.
19673         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
19674         (in_charge_arg_for_name): New function.
19675         (build_new_method_call): Use it.  Handle cloned destructors.
19676         (build_clone): Don't make the base constructor virtual.
19677         Automatically defer generated functions.
19678         (clone_function_decl): Handle destructors, too.
19679         (clone_constructors_and_destructors): Likewise.
19680         (create_vtable_ptr): Don't create a vtable entry for a cloned
19681         function.
19682         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
19683         (initialize_predefined_identifiers): Update appropriately.
19684         (finish_destructor_body): Simplify.
19685         (maybe_build_cleanup_and_delete): Remove.
19686         * except.c (expand_throw): Handle new-ABI destructors.
19687         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
19688         (build_dtor_call): New function.
19689         (build_delete): Use it.  Simplify.
19690         * optimize.c (maybe_clone_body): Handle destructors.
19691         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
19692
19693         * exception.cc (cleanup_fn): New typedef.
19694         (CALL_CLEANUP): New macro.
19695         (cp_eh_info): Use them.
19696         (__cp_push_exception): Likewise.
19697         (__cp_pop_exception): Likewise.
19698
19699 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
19700
19701         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
19702         (complete_dtor_identifier): New macro.
19703         (CLASSTYPE_FIRST_CONVERSION): Remove.
19704         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
19705         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
19706         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
19707         (CLASSTYPE_CONSTRUCTORS): Likewise.
19708         (CLASSTYPE_DESTRUCTORS): Likewise.
19709         (lang_decl): Add cloned_function.
19710         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
19711         (DECL_BASE_CONSTRUCTOR_P): Likewise.
19712         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
19713         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
19714         (DECL_CLONED_FUNCTION_P): Likewise.
19715         (DECL_CLONED_FUNCTION): Likewise.
19716         (clone_function_decl): Declare.
19717         (maybe_clone_body): Likewise.
19718         * call.c (build_user_type_conversion_1): Call complete object
19719         constructors in the new ABI.
19720         (build_new_method_call): Don't add in-charge parameters under the
19721         new ABI.
19722         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
19723         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
19724         CLASSTYPE_DESTRUCTOR_SLOT.
19725         (build_clone): New function.
19726         (clone_function_decl): Likewise.
19727         (clone_constructors_and_destructors): Likewise.
19728         (check_bases_and_members): Use it.
19729         * decl.c (iniitialize_predefined_identifiers): Initialize
19730         complete_dtor_identifier.
19731         (finish_function): Don't add extra code to a clone.
19732         (lang_mark_tree): Mark cloned_function.
19733         * decl2.c (mark_used): Don't bother trying to instantiate things
19734         we synthesized.
19735         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
19736         * method.c (set_mangled_name_for_decl): Don't treat clones as
19737         constructors.
19738         (synthesize_method): Sythesize cloned functions, not the clones.
19739         * optimize.c (inline_data): Update comment on ret_label.
19740         (remap_block): Don't assume DECL_INITIAL exists.
19741         (copy_body_r): Allow ret_label to be NULL.
19742         (maybe_clone_body): Define.
19743         * pt.c (tsubst_decl): Handle clones.
19744         (instantiate_clone): New function.
19745         (instantiate_template): Use it.
19746         (set_mangled_name_for_template_decl): Don't treat clones as
19747         constructors.
19748         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
19749         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
19750         * semantics.c (expand_body): Clone function bodies as necessary.
19751
19752         * optimize.c (remap_decl): Avoid sharing structure for arrays
19753         whose size is only known at run-time.
19754         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
19755
19756         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
19757         to has_in_charge_parm_p.
19758         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
19759         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
19760         (DECL_COPY_CONSTRUCTOR_P): New macro.
19761         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
19762         (build_user_type_conversion_1): Likewise.
19763         (convert_like_real): Likewise.
19764         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
19765         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
19766         (copy_args_p): Likewise.
19767         (grok_ctor_properties): Likewise.
19768         (start_function): Likewise.
19769         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
19770         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
19771         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
19772         * method.c (do_build_copy_constructor): Use
19773         DECL_HAS_IN_CHARGE_PARM_P.
19774         (synthesize_method): Likewise.
19775         * pt.c (instantiate_template): Remove goto.
19776         * tree.c (build_cplus_method_type): Remove mention of obstacks in
19777         comment.
19778
19779         * cp-tre.h (finish_function): Change prototype.
19780         * decl.c (end_cleanup_fn): Adjust caller.
19781         (finish_function): Take only one parameter.
19782         * decl2.c (finish_objects): Adjust caller.
19783         (finish_static_storage_duration_function): Likewise.
19784         * method.c (emit_thunk): Likewise.
19785         * parse.y: Likewise.
19786         * parse.c: Regenerated.
19787         * pt.c (instantiate_decl): Likewise.
19788         * rtti.c (synthesize_tinfo_fn): Likewise.
19789         * semantics.c (expand_body): Likewise.
19790
19791         * cp-tree.h (copy_decl): New function.
19792         * class.c (finish_struct_1): Use it.
19793         * lex.c (copy_decl): Define it.
19794         * pt.c (tsubst_decl): Likewise.
19795         * tree.c (copy_template_template_parm): Likewise.
19796
19797         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
19798         has_nonpublic_assign_ref.
19799         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
19800         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
19801         * class.c (finish_struct_methods): Don't set
19802         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
19803         (interface_only): Don't declare.
19804         (interface_unknown): Likewise.
19805
19806 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19807
19808         * tree.h (HAVE_TEMPLATES): Remove definition.
19809         * lang-options.h (-fthis-is-variable): Remove documentation.
19810
19811 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
19812
19813         * class.c (instantiate_type): Handle object-relative template-id.
19814
19815         * semantics.c (finish_expr_stmt): Call convert_to_void here.
19816         * decl.c (cplus_expand_expr_stmt): Not here.
19817
19818         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
19819         Initialize exprtype earlier.
19820
19821         * parse.y (fn.def1): Check for defining types in return types.
19822
19823         * decl.c (check_tag_decl): Notice extra fundamental types.
19824         Diagnose empty decls in classes, too.
19825
19826         * decl.c (grokdeclarator): Don't override an anonymous name if no
19827         declarator was given.
19828
19829         * cvt.c (convert_to_void): Call resolve_offset_ref.
19830
19831         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
19832
19833         * decl2.c (decl_namespace): Handle getting a type.
19834
19835         * typeck.c (build_c_cast): Re-enable warning for cast between
19836         pointer and integer of different size.
19837
19838 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
19839
19840         * inc/cxxabi.h (__pointer_type_info): Add restrict and
19841         incomplete flags.
19842         (__pointer_type_info::__pointer_catch): New virtual function.
19843         (__pointer_to_member_type_info): Derive from
19844         __pointer_type_info. Adjust.
19845         (__pointer_to_member_type_info::__do_catch): Remove.
19846         (__pointer_to_member_type_info::__is_pointer_p): Declare.
19847         (__pointer_to_member_type_info::__pointer_catch): Declare.
19848         * rtti.c (qualifier_flags): Add restrict flag.
19849         (ptmd_initializer): Reorder members.
19850         (create_tinfo_types): Expand comments. Reorder
19851         ptmd_desc_type_node members.
19852         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
19853         Implement.
19854         (__pointer_type_info::__do_catch): Move specific code into
19855         __pointer_catch. Call it.
19856         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
19857         specific catch checking. Fix void conversion check.
19858         (__pointer_to_member_type_info::__do_catch): Remove.
19859         (__pointer_to_member_type_info::__pointer_catch): Implement.
19860
19861 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19862
19863         * lex.c (init_parse): Remove traces of classof and headof.
19864         * decl2.c (flag_operator_names): Default to 1.
19865         (lang_decode_option): Do not set it for -ansi.
19866
19867 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
19868
19869         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
19870         (DECL_MAIN_VARIANT): Remove.
19871         * decl.c (duplicate_decls): Don't set it.
19872         (start_function): Likewise.
19873         (lang_mark_tree): Don't mark it.
19874         * decl2.c (defer_fn): Don't use it.
19875         * lex.c (retrofit_lang_decl): Don't set it.
19876         * pt.c (tsubst_decl): Likewise.
19877         * ptree.c (print_lang_decl): Don't print it.
19878         * typeck.c (mark_addressable): Don't use it.
19879
19880 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
19881
19882         * vec.cc: Include <new> and <exception>.
19883         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
19884         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
19885         terminate.
19886         (__cxa_vec_delete): Catch dtor exceptions.
19887
19888 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
19889
19890         Prepend __ to implementation defined names.
19891         * inc/typeinfo (type_info): Rename _name to __name.
19892         (type_info::type_info): Rename parameter.
19893         (type_info::operator==, type_info::operator!=,
19894         type_info::before): Likewise.
19895         (type_info::is_pointer_p, type_info::is_function_p,
19896         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
19897         parameters.
19898         * inc/cxxabi.h
19899         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
19900         (__pointer_type_info::__pointer_type_info): Likewise.
19901         (__pointer_type_info::is_pointer_p,
19902         __pointer_type_info::do_catch): Prepend __. Rename parameters.
19903         (__array_type_info::__array_type_info): Rename parameters.
19904         (__function_type_info::__function_type_info): Likewise.
19905         (__function_type_info::is_function_p): Prepend __.
19906         (__enum_type_info::__enum_type_info): Rename parameters.
19907         (__pointer_to_member_type_info::__pointer_to_member_type_info):
19908         Likewise.
19909         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
19910         parameters.
19911         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
19912         (__class_type_info::__class_type_info): Rename parameters.
19913         (__class_type_info::sub_kind): Prepend __. Adjust member names.
19914         (__class_type_info::upcast_result,
19915         __class_type_info::dyncast_result): Prepend __. Move definition
19916         into tinfo.cc.
19917         (__class_type_info::do_upcast, __class_type_info::do_catch,
19918         __class_type_info::find_public_src,
19919         __class_type_info::do_dyncast,
19920         __class_type_info::do_find_public_src): Prepend __. Rename
19921         parameters.
19922         (__si_class_type_info::__si_class_type_info): Rename parameters.
19923         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
19924         __si_class_type_info::do_find_public_src): Prepent __. Rename
19925         parameters.
19926         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
19927         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
19928         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
19929         parameters.
19930         (__dynamic_cast): Rename parameters.
19931         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
19932         type_info::do_catch, type_info::do_upcast): Prepend __.
19933         (contained_p, public_p, virtual_p, contained_public_p,
19934         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
19935         (__class_type_info::do_catch,
19936         __class_type_info::do_upcast): Prepend __. Adjust.
19937         (__class_type_info::__upcast_result,
19938         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
19939         Adjust.
19940         (__class_type_info::find_public_src): Prepend __. Adjust.
19941         (__class_type_info::do_find_public_src,
19942         __si_class_type_info::do_find_public_src,
19943         __vmi_class_type_info::do_find_public_src): Likewise.
19944         (__class_type_info::do_dyncast,
19945         __si_class_type_info::do_dyncast,
19946         __vmi_class_type_info::do_dyncast): Likewise.
19947         (__class_type_info::do_upcast,
19948         __si_class_type_info::do_upcast,
19949         __vmi_class_type_info::do_upcast): Likewise.
19950         (__dynamic_cast): Adjust.
19951         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
19952         (__function_type_info::is_function_p): Likewise.
19953         (__pointer_type_info::do_catch): Likewise. Adjust.
19954         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
19955         (__throw_type_match_rtti_2): Adjust.
19956         (__is_pointer): Adjust.
19957
19958 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
19959
19960         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
19961         (complete_ctor_identifier): New macro.
19962         (special_function_kind): Add sfk_copy_constructor and
19963         sfk_assignment_operator.
19964         (LOOKUP_HAS_IN_CHARGE): Remove.
19965         (cons_up_default_function): Rename to ...
19966         (implicitly_declare_fn): ... this.
19967         * call.c (build_new_method_call): Add in-charge parameters for
19968         constructors here.
19969         * class.c (add_implicitly_declared_members): Change parameter name
19970         from cant_have_assignment to cant_have_const_assignment.
19971         Replace calls to cons_up_default_function to implicitly_declare_fn.
19972         * cvt.c (ocp_convert): Use complete_ctor_identifier.
19973         * decl.c (initialize_predefined_identifiers): Initialize it.
19974         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
19975         complex expression.
19976         * init.c (expand_default_init): Don't calculate the in-charge
19977         parameter here.
19978         (build_new_1): Likewise.
19979         * lex.c (cons_up_default_function): Move to method.c.
19980         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
19981         (implicitly_declare_fn): New function.
19982         * typeck.c (build_static_cast): Use complete_ctor_identifier.
19983         (build_modify_expr): Likewise.
19984         * typeck2.c (build_functional_cast): Likewise.
19985
19986         Under the new ABI, constructors don't return `this'.
19987         * cp-tree.h (warn_reorder): Declare.
19988         (special_function_kind): New enum.
19989         (global_base_init_list): Remove declaration.
19990         (emit_base_init): Don't return a value.
19991         (check_base_init): Don't declare.
19992         (is_aggr_typedef): Likewise.
19993         * decl.c (check_special_function_return_type): New function.
19994         (return_types): Remove.
19995         (grokdeclarator): Use check_special_function_return_type.
19996         (start_function): Don't initialize ctor_label under the new ABI.
19997         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
19998         * init.c (begin_init_stmts): Move to top of file.
19999         (finish_init_stmts): Likewise.
20000         (warn_reorder): Don't declare.
20001         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
20002         value.
20003         (check_base_init): Remove.
20004         (is_aggr_typedef): Likewise.
20005         (build_new_1): Don't use the return value of a constructor.
20006         * semantics.c (setup_vtbl_ptr): Don't use the return value
20007         of emit_base_init.
20008         * typeck.c (check_return_expr): Don't magically convert return
20009         statements into `return this' in constructors under the new ABI.
20010
20011         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
20012         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
20013         (base_ctor_identifier): New macro.
20014         (base_dtor_identifier): Likewise.
20015         (deleting_dtor_identifier): Likewise.
20016         * decl.c: Don't include obstack.h.
20017         (obstack_chunk_alloc): Don't define.
20018         (obstack_chunk_free): Likewise.
20019         (struct predefined_identifier): New type.
20020         (initialize_predefined_identifiers): New function.
20021         (init_decl_processing): Use it.
20022         (debug_temp_inits): Remove.
20023         (start_method): Don't call preserve_data.
20024         (hack_incomplete_structures): Update comment.
20025         * init.c (init_init_processing): Don't initialize
20026         nelts_identifier.
20027         (build_offset_rf): Remove dead code.
20028         (build_delete): Use CLASSTYPE_N_BASECLASSES.
20029         * search.c (init_search_processing): Don't initialize
20030         vptr_identifier.
20031
20032 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20033
20034         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
20035         some sign_compare warnings.
20036
20037 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
20038
20039         Rename abi::__vmi_class_type_info members.
20040         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
20041         base_list, detail_masks members to vmi_flags, vmi_base_count,
20042         vmi_bases and vmi_flags_masks respectively.
20043         (__vmi_class_type_info::vmi_flags_masks): Rename
20044         details_unknown_mask to flags_unknown_mask.
20045         * tinfo.cc (__class_type_info::do_upcast): Adjust.
20046         (__vmi_class_type_info::do_find_public_src): Adjust.
20047         (__vmi_class_type_info::do_dyncast): Adjust.
20048         (__vmi_class_type_info::do_upcast): Adjust.
20049
20050 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
20051
20052         * tinfo.cc (convert_to_base): New function.
20053         (get_vbase_offset): Remove. Move into convert_to_base.
20054         (__vmi_class_type_info::do_find_public_src): Adjust.
20055         (__vmi_class_type_info::do_dyncast): Adjust.
20056         (__vmi_class_type_info::do_upcast): Adjust.
20057
20058 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
20059
20060         * tinfo.cc (operator=): Use __builtin_strcmp.
20061         * tinfo2.cc (before): Likewise.
20062
20063 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
20064
20065         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
20066         (DECL_SAVED_INLINE): Rename to ...
20067         (DECL_DEFERRED_FN): ... this.
20068         (in_function_p): Remove declaration.
20069         (mark_inline_for_output): Rename to ...
20070         (defer_fn): ... this.
20071         * decl.c (finish_function): Adjust call to mark_inline_for_output.
20072         (in_function_p): Remove definition.
20073         * decl2.c (saved_inlines): Rename to ...
20074         (deferred_fns): ... this.
20075         (saved_inlines_used): Rename to ...
20076         (deferred_fns_used): ... this.
20077         (mark_inline_for_output): Rename to ...
20078         (defer_fn): ... this.
20079         (finish_file): Adjust accordingly.
20080         (init_decl2): Likewise.
20081         * lex.c (cons_up_default_function): Likewise.
20082         * pt.c (mark_decl_instantiated): Likewise.
20083         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
20084         circumstances.
20085         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
20086         * semantics.c (expand_body): Defer more functions.
20087
20088 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
20089
20090         * vec.cc: New file.
20091         * Make-lang.in (CXX_LIB2FUNCS): Add it.
20092         (vec.o): Build it.
20093         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
20094         __cxa_vec_delete): Declare.
20095
20096 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
20097
20098         * rtti.c (dfs_class_hint_mark): New static function.
20099         (dfs_class_hint_unmark): New static function.
20100         (class_hint_flags): Use them.
20101
20102 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
20103
20104         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
20105
20106 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
20107
20108         * cp-tree.h (instantiate_decl): Change prototype.
20109         * decl2.c (mark_used): Adjust call.
20110         * optimize.c (inlinable_function_p): Adjust handling of templates.
20111         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
20112         (do_type_instantiation): Likewise.
20113         (instantiate_decl): Defer more templates.
20114         (instantiate_pending_templates): Adjust logic to handle inline
20115         friend functions.
20116
20117         * Makefile.in (GGC_H): New variable.  Use it throughout in place
20118         of ggc.h.
20119
20120         * call.c: Don't include obstack.h.  Include ggc.h.
20121         (obstack_chunk_alloc): Don't define.
20122         (obstack_chunk_free): Likewise.
20123         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
20124         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
20125         (pop_switch): Free it.
20126
20127         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
20128
20129         * dump.c (dequeue_and_dump): Don't try to print the bit_position
20130         if we don't have a DECL_FIELD_OFFSET.
20131
20132 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
20133
20134         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
20135         special_function_p.
20136
20137 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20138
20139         * cfns.gperf (hash, libc_name_p): Prototype.
20140
20141         * rtti.c (build_dynamic_cast_1): Constification.
20142
20143         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
20144
20145         * semantics.c (deferred_type_access_control): Prototype.
20146
20147 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
20148
20149         Correct many new ABI issues regarding vbase and vcall offset
20150         layout.
20151         * cp-tree.h (BINFO_VTABLE): Document.
20152         (struct lang_type): Tweak formatting.
20153         (BINFO_PRIMARY_BINFO): Add to documentation.
20154         (CLASSTYPE_VSIZE): Fix typo in comment.
20155         (CLASSTYPE_VBASECLASSES): Update documentation.
20156         (BINFO_VBASE_MARKED): Remove.
20157         (SET_BINFO_VBASE_MARKED): Likewise.
20158         (CLEAR_BINFO_VBASE_MARKED): Likewise.
20159         (BINFO_FIELDS_MARKED): Remove.
20160         (SET_BINFO_FIELDS_MARKED): Likewise.
20161         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
20162         (enum access_kind): New enumeration.
20163         (num_extra_vtbl_entries): Remove declaration.
20164         (size_extra_vtbl_entries): Likewise.
20165         (get_vtbl_decl_for_binfo): New function.
20166         (dfs_vbase_unmark): Remove declaration.
20167         (mark_primary_bases): Likewise.
20168         * class.c (SAME_FN): Remove.
20169         (struct vcall_offset_data_s): Move definition.
20170         (build_vbase_pointer): Use `build', not `build_binary_op', to
20171         access the vbase pointer under the new ABI.
20172         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
20173         (build_primary_vtable): Likewise.
20174         (dfs_mark_primary_bases): Move here from search.c.
20175         (mark_primary_bases): Likewise.
20176         (determine_primary_bases): Under the new ABI, don't make a base
20177         class a primary base just because we don't yet have any virtual
20178         functions.
20179         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
20180         (num_vfun_entries): Remove.
20181         (dfs_count_virtuals): Likewise.
20182         (num_extra_vtbl_entries): Likewise.
20183         (size_extra_vtbl_entries): Likewise.
20184         (layout_virtual_bases): Iterate in inheritance graph order under
20185         the new ABI.
20186         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
20187         indicate that a vfield is present.
20188         (init_class_processing): Initialize access_public_node, etc., from
20189         ak_public, etc.
20190         (get_vtbl_decl_for_binfo): New function.
20191         (dump_class_hierarchy_r): Likewise.
20192         (dump_class_hierarchy): Use it.
20193         (finish_vtbls): Build the vtbls in inheritance graph order.
20194         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
20195         (initialize_vtable): Use get_vtbl_decl_for_binfo.
20196         (accumulate_vtbl_inits): Add comments explaining why a pre-order
20197         walk is required.
20198         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
20199         where the vptr points, even for primary vtables.
20200         (build_vtbl_initializer): Adjust handling of vbase and vcall
20201         offsets.
20202         (build_vcall_and_vbase_vtable_entries): New function.
20203         (dfs_build_vbase_offset_vtbl_entries): Remove.
20204         (build_vbase_offset_vtbl_entries): Reimplement.
20205         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
20206         were already handled in a primary base class vtable.
20207         (build_vcall_offset_vtbl_entries): Adjust.
20208         (build_rtti_vtbl_entries): Adjust.
20209         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
20210         * init.c (expand_virtual_init): Simplify.
20211         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
20212         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
20213         * search.c (BINFO_ACCESS): New macro.
20214         (SET_BINFO_ACCESS): Likewise.
20215         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
20216         (access_in_type): Likewise.
20217         (dfs_accessible_p): Likewise.
20218         (protected_accessible_p): Likewise.
20219         (lookup_fnfields_1): Adjust documentation.
20220         (dfs_mark_primary_bases): Move to class.c
20221         (mark_primary_bases): Likewise.
20222         (dfs_vbase_unmark): Remove.
20223         (virtual_context): Use BINFO_FOR_VBASE.
20224         (dfs_get_vbase_types): Simplify.
20225         (dfs_build_inheritance_graph_order): New function.
20226         (get_vbase_types): Use it.
20227         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
20228
20229         * tinfo.cc (get_vbase_offset): New function.
20230         (__vmi_class_type_info::do_find_public_src): Use it.
20231         (__vmi_class_type_info::do_dyncast): Likewise.
20232         (__vmi_class_type_info::do_upcast): Likewise.
20233
20234 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
20235
20236         * lang-specs.h: Pass -fno-show-column to the preprocessor.
20237
20238 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
20239
20240         * rtti.c (class_hint_flags): Rename flags.
20241         (class_initializer): Remove flags.
20242         (synthesize_tinfo_var): Combine offset and flags. Add flags
20243         for __vmi_class_type_info.
20244         (create_tinfo_types): Remove flags from __class_type_info and
20245         __si_class_type_info. Merge flags and offset from
20246         base_class_type_info.
20247         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
20248         (__base_class_info::is_virtual_p): Adjust.
20249         (__base_class_info::is_public_p): Adjust.
20250         (__base_class_info::offset): New accessor.
20251         (__class_type_info::details): Remove member.
20252         (__class_type_info::__class_type_info): Lose details.
20253         (__class_type_info::detail_masks): Remove.
20254         (__si_class_type_info::__si_class_type_info): Lose details.
20255         (__vmi_class_type_info::details): New member.
20256         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
20257         (__vmi_class_type_info::detail_masks): New member.
20258         * tinfo.cc (__class_type_info::do_upcast): Initialize result
20259         with unknown_details_mask.
20260         (__vmi_class_type_info::do_find_public_src): Adjust
20261         (__vmi_class_type_info::do_dyncast): Adjust.
20262         (__vmi_class_type_info::do_upcast): Set result details, if
20263         needed. Adjust.
20264         (__dynamic_cast): Temporarily #if out optimization.
20265
20266 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
20267
20268         * rtti.c (get_tinfo_decl): Mark used.
20269         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
20270         mark as dealt with, if we output it.
20271
20272 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
20273
20274         * class.c: Reorganize to put virtual function table initialization
20275         machinery at the end of the file.
20276
20277 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
20278
20279         * class.c (finish_struct): Use bitsize_zero_node.
20280         * pt.c (instantiate_class_template): Likewise.
20281
20282 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
20283
20284         Put RTTI entries at negative offsets in new ABI.
20285         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
20286         vbase offset at index -3, not -1.
20287         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
20288         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
20289         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
20290         (build_rtti_vtbl_entries): New function.
20291         (set_rtti_entry): Remove.
20292         (build_primary_vtable): Don't use it.
20293         (build_secondary_vtable): Likewise.
20294         (start_vtable): Remove.
20295         (first_vfun_index): New function.
20296         (set_vindex): Likewise.
20297         (add_virtual_function): Don't call start_vtable.  Do call
20298         set_vindex.
20299         (set_primary_base): Rename parameter.
20300         (determine_primary_base): Likewise.
20301         (num_vfun_entries): Don't use skip_rtti_stuff.
20302         (num_extra_vtbl_entries): Include RTTI information.
20303         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
20304         (skip_rtti_stuff): Remove.
20305         (dfs_modify_vtables): Don't use it.
20306         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
20307         (layout_nonempty_base_or_field): Update size handling.
20308         (create_vtable_ptr): Tweak.
20309         (layout_class_type): Adjust parameter names.
20310         (finish_struct_1): Simplify.
20311         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
20312         (skip_rtti_stuff): Remove.
20313         (first_vfun_index): New function.
20314         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
20315         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
20316         (marked_vtable_pathp): Declare.
20317         (unmarked_vtable_pathp): Likewise.
20318         * error.c (dump_expr): Use first_vfun_index to calculate vtable
20319         offsets.
20320         * rtti.c (build_headof): Look for RTTI at negative offsets.
20321         (get_tinfo_decl_dynamic): Likewise.
20322         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
20323         here.
20324         (create_pseudo_type_info): Do it here instead.  Adjust so that
20325         vptr points at first virtual function.
20326         * search.c (marked_vtable_pathp): Make it global.
20327         (unmarked_vtable_pathp): Likewise.
20328         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
20329         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
20330         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
20331         (get_pure_virtuals): Likewise.
20332         (expand_upcast_fixups): Likewise.
20333         * tree.c (debug_binfo): Likewise.
20334         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
20335         negative offset.
20336
20337 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20338
20339         * class.c (check_field_decl): Fix typo.
20340         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
20341         (check_methods): Likewise.
20342         (check_field_decls): Likewise.
20343         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
20344         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
20345         Use DECL_RESULT_FLD, not DECL_RESULT.
20346         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
20347         * lex.c (identifier_type): Likewise.
20348         * pt.c (determine_specialization, lookup_template_class): Likewise.
20349         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
20350         (resolve_overloaded_unification, more_specialized): Likewise.
20351         * semantics.c (finish_member_declaration): Likewise.
20352         * typeck.c (build_x_function_call): Likewise.
20353
20354 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
20355
20356         * class.c (layout_empty_base): Handle empty bases with non-byte
20357         alignment.
20358         (build_base_field): Likewise.
20359         (layout_virtual_bases): Likewise.
20360
20361         * class.c (finish_struct_1): Fix typo in this change:
20362
20363         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20364
20365 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
20366
20367         * decl.c (grokdeclarator): Count partial specializations when
20368         keeping track of how many template classes have been seen.
20369
20370         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
20371
20372 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20373
20374         * class.c (build_vbase_pointer_fields): layout_field now place_field.
20375         (get_vfield_offset): Use byte_position.
20376         (set_rtti_entry): Set OFFSET to ssizetype zero.
20377         (get_binfo_offset_as_int): Deleted.
20378         (dfs_record_base_offsets): Use tree_low_cst.
20379         (dfs_search_base_offsets): Likewise.
20380         (layout_nonempty_base_or_field): Reflect changes in RLI format
20381         and call byte_position.
20382         (layout_empty_base): Convert offset to ssizetype.
20383         (build_base_field): use rli_size_unit_so_far.
20384         (dfs_propagate_binfo_offsets): Do computation in proper type.
20385         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
20386         (layout_class_type): Reflect changes in RLI names and fields.
20387         (finish_struct_1): Set DECL_FIELD_OFFSET.
20388         * dump.c (dequeue_and_dump): Call bit_position.
20389         * expr.c (cplus_expand_constant): Use byte_position.
20390         * rtti.c (expand_class_desc): Use bitsize_one_node.
20391         * typeck.c (build_component_addr): Use byte_position and don't
20392         special case for zero offset.
20393
20394 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
20395
20396         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
20397
20398         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
20399         tinfo object.
20400         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
20401         vtable.
20402
20403 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
20404
20405         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
20406         DECL_P macros.
20407         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
20408         make_typename_type, check_initializer, cp_finish_decl,
20409         xref_tag): Likewise.
20410         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
20411         decl_namespace, arg_assoc_template_arg, arg_assoc,
20412         validate_nonmember_using_decl, do_class_using_decl): Likewise.
20413         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
20414         args_to_string): Likewise.
20415         * friend.c (is_friend): Likewise.
20416         * lex.c (note_got_semicolon, note_list_got_semicolon,
20417         is_global): Likewise.
20418         * method.c (build_overload_nested_name, build_overload_value,
20419         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
20420         * parse.y (typename_sub, typename_sub1): Likewise.
20421         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
20422         process_partial_specialization, convert_template_argument,
20423         template_args_equal, add_pending_template, lookup_template_class,
20424         for_each_template_parm_r, maybe_fold_nontype_arg,
20425         tsubst, instantiate_template, type_unification_real, unify,
20426         instantiate_pending_templates, set_mangled_name_for_template_decl):
20427         Likewise.
20428         * repo.c (repo_get_id, repo_template_used): Likewise.
20429         * search.c (lookup_field_1): Likewise.
20430         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
20431         * xref.c (classname): Likewise.
20432
20433 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
20434
20435         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
20436         (CANONICAL_BINFO): New macro.
20437         (BINFO_NEW_VTABLE_MARKED): Use it.
20438         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
20439         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
20440         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
20441         not TREE_TYPE.
20442         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20443         (build_secondary_vtable): Likewise.
20444         (dfs_finish_vtbls): Likewise.
20445         (dfs_accumulate_vtbl_inits): Likewise.
20446         (accumulate_vtbl_inits): New function.
20447         (finish_vtbls): Make sure that virtual bases come after
20448         non-virtual bases in the vtable group.
20449         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
20450         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20451         * search.c (struct vbase_info): Move definition.
20452         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20453         (unmarked_new_vtable_p): Likewise.
20454         (dfs_mark_vtable_path): Remove.
20455         (dfs_mark_new_vtable): Remove.
20456         (dfs_unmark_new_vtable): Likewise.
20457         (dfs_clear_search_slot): Likewise.
20458         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
20459         (dfs_clear_vbase_slots): Likewise.
20460         (init_vbase_pointers): LIkewise.
20461
20462 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
20463
20464         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
20465         SIZETYPE to a non-SIZETYPE.
20466
20467 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
20468
20469         * class.c (layout_virtual_bases): Adjust names in conditionally
20470         compiled code.
20471
20472         * class.c (record_base_offsets): New function.
20473         (layout_conflict_p): Likewise.
20474         (layout_nonempty_base_or_field): Use it.
20475         (layout_empty_base): New function.
20476         (build_base_field): Use it.
20477         (build_base_fields): Update comment.
20478         (layout_virtual_bases): Fold in a little code form
20479         layout_basetypes.  Use layout_empty_base.
20480         (layout_basetypes): Remove.
20481         (end_of_class): New function.
20482         (layout_class_type): Use it.  Adjust.
20483
20484         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
20485         (fntype_p): Remove.
20486         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
20487         comment.
20488         (dfs_skip_nonprimary_vbases_markedp): Likewise.
20489         * typeck.c (fntype_p): Remove.
20490
20491         * cp-tree.h (TI_SPEC_INFO): Remove.
20492         (CLASSTYPE_TI_SPEC_INFO): Likewise.
20493         * pt.c (process_partial_specialization): Likewise.
20494
20495         * class.c (build_base_field): Fix thinko in computation of binfo
20496         offsets.
20497
20498         * tree.c (mark_local_for_remap_p): Mark variables declared in
20499         TARGET_EXPRs as well.
20500
20501 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
20502
20503         * typeck.c (require_complete_type, complete_type,
20504         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
20505         build_array_ref, convert_arguments, pointer_diff,
20506         build_x_unary_op, build_unary_op, build_c_cast,
20507         build_modify_expr): Use COMPLETE_TYPE_P etc.
20508         * call.c (is_complete, convert_like_real,
20509         build_new_method_call): Likewise.
20510         * class.c (build_vbase_pointer_fields, check_bases,
20511         build_base_field, finish_struct_1, pushclass): Likewise.
20512         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
20513         * decl.c (maybe_process_template_type_declaration, pushtag,
20514         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
20515         layout_var_decl, check_initializer, cp_finish_decl,
20516         grokdeclarator, require_complete_types_for_parms,
20517         grok_op_properties, xref_tag, xref_basetypes,
20518         check_function_type): Likewise.
20519         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
20520         * friend.c (do_friend): Likewise.
20521         * init.c (build_offset_ref): Likewise.
20522         * parse.y (structsp): Likewise.
20523         * pt.c (maybe_process_partial_specialization,
20524         tsubst_friend_function, instantiate_class_template, tsubst,
20525         do_type_instantiation, instantiate_pending_templates): Likewise.
20526         * repo.c (repo_get_id): Likewise.
20527         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
20528         synthesize_tinfo_var, emit_support_tinfos): Likewise.
20529         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
20530         * semantics.c (begin_class_definition): Likewise.
20531         * tree.c (build_cplus_method_type): Likewise.
20532         * typeck2.c (digest_init, build_functional_cast,
20533         add_exception_specifier): Likewise.
20534         * parse.h, parse.c: Regenerated.
20535
20536 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
20537
20538         * inc/cxxabi.h: New header file. Define new-abi entry points.
20539         (__pointer_type_info::target): Rename member to ...
20540         (__pointer_type_info::type): ... here.
20541         (__base_class_info::type): Rename member to ...
20542         (__base_class_info::base): ... here.
20543         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
20544         * cp-tree.h (CPTI_ABI): New global tree enumeration.
20545         (abi_node): New global tree node.
20546         * decl.c (abi_node): Document.
20547         (init_decl_processing): Initialize abi_node.
20548         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
20549         (get_vmi_pseudo_type_info): Likewise.
20550         (create_tinfo_types): Likewise.
20551         (emit_support_tinfos): Likewise.
20552         * tinfo.h (cxxabi.h): Include for new-abi.
20553         Move rtti class definitions to new header file.
20554         * tinfo.cc (abi): Use the namespace.
20555         (std): Move new abi rtti classes from here ...
20556         (__cxxabiv1): ... to here.
20557         * tinfo2.cc (cxxabi.h): Include for new-abi.
20558         Move rtti class definitions to new header file.
20559         (std): Move new abi rtti classes from here ...
20560         (__cxxabiv1): ... to here.
20561         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
20562         namespace.
20563
20564 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
20565             Jason Merrill  <jason@casey.cygnus.com>
20566
20567         * method.c (build_overload_int): Use host_integerp.
20568
20569 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
20570
20571         * init.c (build_offset_ref): Handle the case of a templated member
20572         function.
20573
20574 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
20575
20576         * except.c (expand_exception_blocks): Clear catch_clauses_last.
20577
20578 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
20579
20580         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
20581         * class.c (check_bitfield_decl): Turn illegal bitfields into
20582         non-bitfields.
20583         (dfs_propagate_binfo_offsets): Adjust for new size_binop
20584         semantics.
20585         (dfs_offset_for_unshared_vbases): Likewise.
20586         * cvt.c (cp_convert_to_pointer): Convert NULL to a
20587         pointer-to-member correctly under the new ABI.
20588         * expr.c (cplus_expand_constant): Don't use cp_convert when
20589         turning an offset into a pointer-to-member.
20590         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
20591         when dereferencing them under the new ABI.
20592         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
20593         of pointers-to-members under the new ABI.
20594
20595         * class.c (check_bitfield_decl): Remove restriction on really long
20596         bitfields.
20597         (layout_class_type): Implement new ABI handling of bitfields
20598         longer than their types.
20599
20600 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
20601
20602         * parse.y (extdefs): Call ggc_collect.
20603         * parse.c: Regenerated.
20604
20605 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
20606
20607         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
20608         (note_name_declared_in_class): Use OVL_CURRENT to get at a
20609         potential overload.
20610
20611 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20612
20613         * class.c (build_vbase_path): Use integer_zerop.
20614         (build_vtable_entry): Use tree_low_cst.
20615         (get_vfield_offset): Use bit_position.
20616         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
20617         Use tree_low_cst.
20618         (check_bitfield_decl): Set DECL_SIZE using convert.
20619         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
20620         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
20621         Use tree_low_cst.
20622         (finish_struct_1): Use bit_position.
20623         (dump_class_hierarchy): Use tree_low_cst.
20624         * cp-tree.h (min_precision): Add declaration.
20625         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
20626         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
20627         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
20628         * expr.c (cplus_expand_constant): Use bit_position.
20629         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
20630         * rtti.c (get_base_offset): Use bit_position.
20631         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
20632         host_integerp, and tree_low_cst.
20633         (pointer_int_sum): Use integer_zerop.
20634         (build_component_addr): Use bit_position.
20635
20636 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
20637
20638         * typeck.c (require_complete_type): Don't assume size_zero_node.
20639         (complete_type_or_else): Likewise.
20640
20641 2000-03-16  Steven Grady <grady@digitaldeck.com>
20642             Jason Merrill  <jason@casey.cygnus.com>
20643
20644         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
20645
20646 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
20647
20648         * decl2.c (grokfield): Bail out if type is error_mark_node.
20649
20650 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
20651
20652         * tinfo2.cc (__ptr_to_member_data): Rename to ...
20653         (__pointer_to_member_data): ... here. Adjust.
20654         * rtti.c (create_tinfo_types): Adjust.
20655
20656 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
20657
20658         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
20659         * decl.c (ref_desc_type_node): Undocument.
20660         * rtti.c (ptr_ref_initializer): Rename to ...
20661         (ptr_initializer): ... here. Adjust comments.
20662         (ptmd_initializer): Fix comment thinko.
20663         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
20664         (create_tinfo_types): Remove ref_desc_type_node init.
20665         * tinfo2.cc (__reference_type_info): Remove.
20666
20667 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
20668
20669         * decl.c (cp_finish_decl): Remove obsolete comment.
20670
20671         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
20672
20673 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
20674
20675         * cp-tree.h: Tweak documentation.
20676         * class.c (build_vbase_pointer_fields): Layout the fields, too.
20677         (avoid_overlap): Remove.
20678         (get_binfo_offset_as_int): New function.
20679         (dfs_serach_base_offsets): Likewise.
20680         (layout_nonempty_base_or_field): Likewise.
20681         (build_base_field): Layout fields here.  Avoid placing two objects
20682         of the same type at the same address, under the new ABI.
20683         (build_base_fields): Adjust accordingly.
20684         (create_vtable_ptr): Return the new field, but don't attach it to
20685         TYPE_FIELDS.
20686         (remove_base_field): Remove.
20687         (remove_base_fields): Remove.
20688         (layout_basetypes): Adjust accordingly.
20689         (layout_class_type): Call layout_field for each field, rather than
20690         just making a wholesale call to layout_type.
20691
20692 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
20693
20694         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
20695
20696 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
20697
20698         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
20699
20700         * except.c (dtor_nothrow): New fn.
20701         (do_pop_exception): Use it.  Take type parm.
20702         (push_eh_cleanup): Take type parm.
20703         (expand_start_catch_block): Pass it.
20704         (build_eh_type_type_ref): Accept null type.
20705
20706 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
20707
20708         * cp-tree.h (revert_static_member_fn): Change prototype.
20709         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
20710         (grok_op_properties): Likewise.
20711         (start_function): Likewise.
20712         (revert_static_member_fn): Simplify.
20713         * pt.c (check_explicit_specialization): Adjust call to
20714         revert_static_member_fn.
20715
20716 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
20717
20718         * cp-tree.h (scope_kind): New type.
20719         (tmpl_spec_kind): Likewise.
20720         (declare_pseudo_global_level): Remove.
20721         (pseudo_global_level_p): Rename to template_parm_scope_p.
20722         (pushlevel): Remove declaration.
20723         (begin_scope): New function.
20724         (finish_scope): Likewise.
20725         (current_tmpl_spec_kind): Likewise.
20726         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
20727         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
20728         Add template_spec_p.
20729         (toplevel_bindings_p): Adjust.
20730         (declare_pseudo_global_level): Remove.
20731         (pseudo_global_level_p): Rename to template_parm_scope_p.
20732         (current_tmpl_spec_kind): New function.
20733         (begin_scope): Likewise.
20734         (finish_scope): Likewise.
20735         (maybe_push_to_top_level): Adjust.
20736         (maybe_process_template_type_declaration): Likewise.
20737         (pushtag): Likewise.
20738         (pushdecl_nonclass_level): Likewise.
20739         (lookup_tag): Likewise.
20740         (grokfndecl): Handle member template specializations.  Share
20741         constructor and non-constructor code.
20742         * decl2.c (check_classfn): Handle member template specializations.
20743         * pt.c (begin_template_parm_list): Use begin_scope.
20744         (begin_specialization): Likewise.
20745         (end_specialization): Likewise.
20746         (check_explicit_specialization): Use current_tmpl_spec_kind.
20747         Handle member template specializations.
20748         (end_template_decl): Use finish_scope.  Remove call to
20749         get_pending_sizes.
20750         (push_template_decl_real): Remove bogus error message.
20751         (tsubst_decl): Fix typo in code contained in comment.
20752         (instantiate_template): Handle member template specializations.
20753         (most_general_template): Likewise.
20754
20755 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
20756
20757         * lex.c (whitespace_cr): Compress consecutive calls to warning().
20758         (do_identifier): Ditto for error().
20759
20760         * pt.c (convert_nontype_argument): Ditto for cp_error().
20761         (convert_template_argument): Ditto for cp_pedwarn().
20762
20763 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
20764
20765         * exception.cc (__check_null_eh_spec): New fn.
20766         * except.c (expand_end_eh_spec): Call it if the spec is throw().
20767
20768 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
20769
20770         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
20771         * except.c (expand_end_eh_spec): Add the return type.
20772         * rtti.c (throw_bad_cast): Add the parmtypes.
20773         (throw_bad_typeid): Likewise.
20774
20775         * semantics.c (expand_stmt): Only leave out rtl for unused
20776         artificials, and set DECL_IGNORED_P on them as well.
20777         * decl.c (wrapup_globals_for_namespace): Likewise.
20778
20779 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
20780
20781         * decl.c (maybe_commonize_var): Skip all artificial decls.
20782         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
20783
20784 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
20785
20786         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
20787         * cp-tree.h: Declare flag_enforce_eh_specs.
20788         * decl.c (store_parm_decls, finish_function): Check it.
20789
20790         C library functions don't throw.
20791         * Makefile.in (cfns.h): New target.
20792         (except.o): Depend on it.
20793         * Make-lang.in (cc1plus): Depend on cfns.gperf.
20794         * cfns.gperf: New file.
20795         * cfns.h: Generated.
20796         * except.c: Include it.
20797         (nothrow_libfn_p): New fn.
20798         * decl.c (grokfndecl): Use it.
20799         * cp-tree.h: Declare it.
20800
20801         * decl.c (push_overloaded_decl_1, auto_function,
20802         define_function): Lose.
20803         (build_library_fn_1): New static fn.
20804         (builtin_function): Use it.
20805         (get_atexit_node): Use build_library_fn_ptr.
20806         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
20807         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
20808         push_void_library_fn, push_throw_library_fn): New fns.
20809         * cp-tree.h: Declare them.
20810         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
20811         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
20812         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
20813         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
20814         * rtti.c (build_runtime_decl): Lose.
20815         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
20816         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
20817         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
20818
20819         * call.c (build_call): Remove result_type parm.
20820         Call mark_used on unused artificial fns.
20821         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
20822
20823 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
20824
20825         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
20826         appropriate.
20827         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
20828         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
20829         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
20830         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
20831         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
20832         expand_generic_desc): Likewise.
20833
20834 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
20835
20836         * exception.cc (__cp_pop_exception): Cleanup the original object.
20837
20838 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
20839
20840         * decl.c (grok_op_properties): Merge conversion to void warning
20841         with other silly op warnings.
20842
20843 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
20844
20845         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
20846         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
20847
20848 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
20849
20850         * decl.c (cp_make_fname_decl): New function.
20851         (wrapup_globals_for_namespace): Don't emit unused static vars.
20852         (init_decl_processing): Remove comment about use of
20853         array_domain_type. Set make_fname_decl.
20854         (cp_finish_decl): Remove __FUNCTION__ nadgering.
20855         * semantics.c (begin_compound_stmt): Remove
20856         current_function_name_declared flagging.
20857         (expand_stmt): Don't emit unused local statics.
20858         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
20859         specially.
20860
20861 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
20862
20863         * typeck.c (convert_for_assignment): Don't look at array
20864         initializer.
20865         * call.c (convert_like_real): Likewise.
20866
20867 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
20868
20869         Add initial support for '\uNNNN' specifier.
20870         * lex.c (read_ucs): New fn.
20871         (readescape, skip_white_space): Call it.
20872         (is_extended_char, is_extended_char_1): New fns.
20873         (utf8_extend_token): New fn, #if 0'd out.
20874         (real_yylex): Treat extended chars like letters.
20875
20876         * search.c (note_debug_info_needed): Walk the bases even if we
20877         weren't deferring the type itself.
20878
20879 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20880
20881         * decl2.c (finish_objects): Constify a char*.
20882
20883         * method.c (emit_thunk): Likewise.
20884
20885 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
20886
20887         * typeck.c (dubious_conversion_warnings): Look through
20888         REFERENCE_TYPE.
20889
20890 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20891
20892         * class.c (dfs_modify_vtables): I is now unsigned.
20893         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
20894         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
20895         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
20896         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
20897         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
20898         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
20899         Call integer_all_onesp.
20900         * typeck2.c (process_init_constructor): Use compare_tree_int.
20901
20902         * lang-specs.h (as): Don't call if -syntax-only.
20903
20904 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
20905
20906         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
20907         RTL_EXPR_HAS_NO_SCOPE after all.
20908
20909 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
20910
20911         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
20912         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
20913         RTL_EXPR_HAS_NO_SCOPE.
20914
20915         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
20916         later.
20917
20918         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
20919
20920 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
20921
20922         * call.c (convert_like): Macrofy.
20923         (convert_like_with_context): New macro.
20924         (convert_like_real): Renamed from convert_like.  Add calling
20925         context parameters, for diagnostics. Add recursive flag.  Call
20926         dubious_conversion_warnings for outer conversion.
20927         (build_user_type_conversion): Use convert_like_with_context.
20928         (build_over_call): Likewise. Don't warn about dubious
20929         conversions here. Adjust convert_default_arg calls.
20930         (convert_default_arg): Add context parameters for diagnostics.
20931         Pass through to convert_like_with_context.
20932         * cp-tree.h (convert_default_arg): Add context parameters.
20933         (dubious_conversion_warnings): Prototype new function.
20934         * typeck.c (convert_arguments): Adjust convert_default_arg call.
20935         (dubious_conversion_warnings): New function, broken
20936         out of convert_for_assignment.
20937         (convert_for_assignment): Adjust.
20938
20939 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
20940
20941         * decl2.c (key_method): Break out from...
20942         (import_export_vtable, import_export_class): ...here.
20943
20944         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
20945         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
20946
20947         * search.c (note_debug_info_needed, dfs_debug_mark,
20948         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
20949         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
20950
20951 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
20952
20953         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
20954         typos.
20955
20956 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
20957
20958         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
20959         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
20960         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
20961         (lang_type): Split gets_new into has_new and has_array_new.
20962         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20963         (TYPE_GETS_NEW): Split into ...
20964         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
20965         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
20966         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
20967         (build_op_new_call): Don't declare.
20968         (build_new_1): Likewise.
20969         * call.c (build_op_new_call): Remove.
20970         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
20971         instead of TYPE_NEEDS_DESTRUCTOR.
20972         (finish_struct_bits): Likewise.
20973         (add_implicitly_declared_members): Likewise.
20974         (check_field_decl): Likewise.
20975         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
20976         correctly under the new ABI.
20977         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
20978         instead of TYPE_NEEDS_DESTRUCTOR.
20979         (initialize_local_var): Likewise.
20980         (destroy_local_var): Likewise.
20981         (cp_finish_decl): Likewise.
20982         (register_dtor_fn): Likewise.
20983         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
20984         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
20985         TYPE_VEC_DELETE_TAKES_SIZE here.
20986         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
20987         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
20988         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20989         (finish_destructor_body): Likewise.
20990         (maybe_build_cleanup_1): Likewise.
20991         * decl2.c (do_static_destruction): Likewise.
20992         * init.c (build_new_1): Make it static.
20993         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20994         (expand_cleanup_for_base): Likewise.
20995         (get_cookie_size): New function.
20996         (build_new_1): Handle array-new cookies correctly under the new
20997         ABI.
20998         (build_vec_delete_1): Likewise.
20999         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
21000         (build_delete): Likewise.
21001         (build_vec_delete): Handle array-new cookies correctly under the new
21002         ABI.
21003         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
21004         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
21005         TYPE_HAS_ARRAY_NEW_OPERATOR.
21006         * ptree.c (print_lang_type): Check them.
21007         * search.c (context_for_name_lookup): Fix typo in comment.
21008         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
21009         * tree.c (break_out_cleanups): Likewise.
21010         (build_cplus_array_test_1): Likewise.
21011         (cp_build_qualified_type_real): Likewise.
21012         * typeck.c (complete_type): Likewise.
21013
21014         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
21015         the command-line, not the end.
21016
21017 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
21018
21019         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
21020
21021 2000-03-02  Tom Tromey  <tromey@cygnus.com>
21022
21023         * cp-tree.h (build_java_class_ref): Declare.
21024         * init.c (build_java_class_ref): No longer static.
21025         * except.c (expand_throw): Generate a Java-style `throw' if the
21026         thrown object is a "Java" object.
21027         (initialize_handler_parm): Generate a Java-style lookup of
21028         exception info if the caught object is a "Java" object.
21029         (catch_language, catch_language_init): New globals.
21030         (decl_is_java_type): New function.
21031         (expand_start_catch_block): Don't call push_eh_info() or
21032         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
21033         class reference to build_catch_block.
21034
21035 2000-03-02  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
21036
21037         * typeck.c (comptypes): Treat sizetype like its language equivalent.
21038
21039 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
21040
21041         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
21042         to merge reference/pointer code and fix incorrect warnings.
21043
21044 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
21045
21046         * search.c (protected_accessible_p): Use context_for_name_lookup.
21047
21048         * init.c (construct_virtual_bases): Fix thinko.
21049         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
21050
21051 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
21052
21053         * decl.c (current_function_decl): Move to toplev.c.
21054
21055 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
21056
21057         * pt.c (fn_type_unification): Unify return type, whenever
21058         provided.
21059         (get_bindings_real): Only pass return type when necessary.
21060         Remove explicit return type check.
21061         * class.c (resolve_address_of_overloaded_function): Pass desired
21062         return type to fn_type_unification.
21063
21064 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
21065
21066         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
21067         DECL_FIELD_SIZE.
21068         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
21069         DECL_FIELD_SIZE.
21070         * rtti.c (expand_class_desc): Likewise.
21071         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
21072         (THUNK_VCALL_OFFSET): Likewise.
21073         (THUNK_DELTA): Reflect changes in ../tree.h.
21074
21075 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
21076
21077         * search.c (protected_accessible_p): Also allow the access if
21078         the member is public in DERIVED.  Lose TYPE parm.
21079         (friend_accessible_p): Lose TYPE parm.
21080         (accessible_p): Adjust.
21081
21082 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
21083
21084         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
21085         on things that are not sizes; ssize_binop deleted.
21086         Call size_diffop when appropriate.
21087         (dfs_build_vcall_offset_vtbl_entries): Likewise.
21088         (build_primary_vtable, build_secondary_vtable): Likewise.
21089         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
21090         Variable I is HOST_WIDE_INT.
21091         (get_vfield_offset): Pass proper types to size_binop.
21092         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
21093         (finish_struct_1): Likewise.
21094         (skip_rtti_stuff): Arg N is now pointer to signed.
21095         (layout_class_type): Use size_zero_node.
21096         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
21097         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
21098         * decl.c (complete_arry_type): Pass proper types to size_binop.
21099         (xref_basetypes): BINFO_OFFSET is sizetype.
21100         * error.c (dump_expr): Don't use size_binop non-sizes.
21101         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
21102         * init.c (construct_virtual_bases): Fix type error.
21103         (build_vec_delete_1): Pass proper type to size_binop and don't
21104         fold result.
21105         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
21106         * rtti.c (get_base_offset): Pass proper type to size_binop.
21107         * search.c (dfs_find_vbases): Fix type error.
21108         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
21109         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
21110         * tree.c (debug_binfo): Variable N is signed.
21111         Use HOST_WIDE_INT_PRINT_DEC.
21112         * typeck.c (comptypes): sizetype is same as equivalent integer type.
21113         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
21114         size_one_node and size_zero_node.
21115         (c_alignof): Use size_one_node.
21116         (build_component_addr): Pass proper types to size_binop.
21117         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
21118
21119 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
21120
21121         Implement class scope using-declarations for functions.
21122         * class.c (handle_using_decl): Call add_method for used functions.
21123         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
21124         (add_method): Used functions are hidden by local functions.
21125         (check_bases_and_members): Handle using-decls before finalizing
21126         CLASSTYPE_METHOD_VEC.
21127         * call.c (add_function_candidate): Add ctype parm; if nonzero,
21128         override the type of 'this' accordingly.
21129         (add_template_candidate, add_template_candidate_real): Add ctype parm.
21130         (convert_class_to_reference, build_user_type_conversion_1,
21131         build_new_function_call, build_object_call, build_new_op,
21132         build_new_method_call): Pass ctype parm.
21133
21134         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
21135         the baselink.
21136         * call.c (convert_class_to_reference, build_user_type_conversion_1,
21137         build_new_function_call, build_object_call, build_new_op,
21138         build_new_method_call, build_op_delete_call): Don't get basetype_path
21139         from a baselink.
21140         * typeck.c (build_component_ref): Likewise.
21141         * init.c (build_offset_ref): Likewise.
21142         (resolve_offset_ref): Don't call enforce_access.
21143         Call build_scoped_ref.
21144         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
21145         would cause an error or if -pedantic.
21146         * class.c (alter_access): Lose binfo parm.
21147
21148 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
21149
21150         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
21151         types.
21152
21153 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
21154
21155         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
21156         pseudo_type_info creation into the std namespace
21157
21158 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
21159
21160         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
21161         (import_export_class): Remove declaration.
21162         * decl2.c (import_export_class): Make it static.
21163         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
21164         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
21165         EXPR_WITH_FILE_LOCATION.
21166         * lex.c (check_newline): Tweak filename/lineno setting.
21167         * semantics.c (begin_while_stmt): Fix typo in comment.
21168
21169 2000-02-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
21170
21171         * lang-options.h (-fmessage-length=): Add missing option.
21172
21173         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
21174
21175 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
21176
21177         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
21178
21179 2000-02-25  Jim Wilson  <wilson@cygnus.com>
21180
21181         * optimize.c (expand_call_inline): Emit the return label before
21182         evaluating the return value.
21183
21184 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
21185
21186         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
21187         than duplicating functionality here.
21188         * optimize.c: Include input.h.
21189         (expand_call_inline): Use push_srcloc and pop_srcloc.
21190         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
21191         * parse.c: Regenerated.
21192         * Makefile.in (lex.o): Depend on input.h.
21193         (optimize.o): Likewise.
21194
21195 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
21196
21197         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
21198         function type, rather than ICE.
21199
21200 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
21201
21202         * decl.c (grokdeclarator): Call decl_type_access_control.
21203         * parse.y (parse_end_decl): Don't call decl_type_access_control if
21204         decl is null.
21205
21206 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
21207
21208         * decl.c (decls_match): Remove obsolete static member nadgering.
21209
21210 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
21211
21212         * decl.c (grokdeclarator): Change ANSI to ISO.
21213         * lex.c (consume_string, readescape, do_identifier): Likewise.
21214         (parse_float, real_yylex): Likewise.
21215         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
21216         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
21217         new_type_id, maybe_label_decls, simple_stmt,
21218         for.init.statement): Likewise.
21219         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
21220         * semantics.c (finish_named_return_value): Likewise.
21221         * parse.c: Regenerate.
21222
21223 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
21224
21225         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
21226         (CPTI_CLASS_STAR_TYPE): Remove.
21227         (vtable_index_type): Likewise.
21228         (class_star_type_node): Remove.
21229         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
21230         (build_binary_op_nodefault): Remove.
21231         * call.c (build_new_op): Use build_binary_op instead of
21232         build_binary_op_nodefault.
21233         * decl.c (init_decl_processing): Remove class_star_type_node
21234         initialization.  Make delta_type_node ptrdiff_type_node under the
21235         new ABI.  Initialize vtable_index_type.
21236         (build_ptrmemfunc_type): Build different structures for the new
21237         ABI.
21238         (build_enumerator): Use build_binary_op instead of
21239         build_binary_op_nodefault.
21240         * method.c (build_overload_value): Mangle pointers-to-members
21241         appropriately under the new ABI.
21242         * typeck.c (build_array_ref): Use build_binary_op instead of
21243         build_binary_op_nodefault.
21244         (get_member_function_from_ptrfunc): Adjust for the new ABI.
21245         (build_binary_op_nodefault): Rename to ...
21246         (build_binary_op): ... this.  Remove old version.  Adjust for
21247         pointer-to-member comparisons under the new ABI.
21248         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
21249         (build_ptrmemfunc): Adjust for the new ABI.
21250         (expand_ptrmemfunc_cst): Likewise.
21251         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
21252         (pfn_from_ptrmemfunc): Adjust for the new ABI.
21253
21254 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
21255
21256         * call.c (build_object_call): Compress consecutive calls to
21257         cp_error.
21258         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
21259         (build_op_delete_call): Adjust message formatting.
21260
21261         * class.c (check_bases): Compress consecutive calls to
21262         cp_pedwarn.
21263         (finish_struct_anon): Say 'ISO C++'.
21264
21265         * decl.c (start_decl): Same here.
21266         (grok_reference_init): Likewise.
21267         (grokfndecl): Correct message formatting.
21268         (grokfndecl): Improve diagnostic.
21269         (check_static_variable_definition): Likewise. Say 'ISO C++'
21270         (compute_array_index_type): Say 'ISO C++'
21271         (create_array_type_for_decl): Compress consecutive calls to
21272         cp_error.
21273         (grokdeclarator): Say 'ISO C++'
21274         (grok_op_properties): Likewise.
21275
21276         * decl2.c (delete_sanity): Clairify diagnostic.
21277         (check_member_template): Same here.
21278         (grok_function_init): Use consistent terminology.
21279
21280         * expr.c (do_case): Say 'ISO C++'
21281
21282         * friend.c (do_friend): Compress consecutive calls to warning.
21283
21284 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
21285
21286         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
21287         * class.c (build_secondary_vtable): Reorganize.  Don't create a
21288         new vtable under the new ABI.
21289         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
21290         computing the size.
21291         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
21292         the initializing elements.
21293         (initialize_vtable): New function.
21294         (dfs_finish_vtbls): Use it.
21295         (dfs_accumulate_vtbl_inits): New function.
21296         (finish_vtbls): Merge primary and secondary vtables under the new
21297         ABI.
21298         (finish_struct_1): Remove redundant call to layout_vtable_decl.
21299         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
21300         aren't VAR_DECLs.
21301
21302         * class.c (build_vtable): New function, split out from ...
21303         (get_vtable_decl): ... here, and ...
21304         (build_secondary_vtable): ... here.
21305
21306         * pt.c (tsubst_decl): Fix formatting.
21307
21308 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
21309
21310         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
21311         (avoid_overlap, build_base_field): Likewise.
21312         (build_base_field, build_base_fields, is_empty_class):
21313         Test DECL_SIZE with integer_zero.
21314         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
21315         * cp-tree.h (struct lang_type): New field size_unit.
21316         (CLASSTYPE_SIZE_UNIT): New macro.
21317         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
21318         (cp_finish_decl): Delete -Wlarger-than processing.
21319         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
21320         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
21321         * tree.c (make_binfo): binfo vector is one entry longer.
21322         (walk_tree): Walk DECL_SIZE_UNIT.
21323
21324 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
21325
21326         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
21327         comment.
21328         (build_vtable_entry): Don't assume all vtable entries are
21329         functions.
21330         (build_vtbl_initializer): Adjust accordingly.
21331         (get_vtable_decl): Fix formatting.
21332
21333 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
21334
21335         * semantics.c (deferred_type_access_control): Walk the entire
21336         type_lookups list.
21337         (save_type_access_control): Rename from
21338         initial_deferred_type_access_control.  Just remember the value.
21339         (decl_type_access_control): New fn.
21340         (begin_function_definition): Use deferred_type_access_control, after
21341         we've started the function.  Set type_lookups to error_mark_node.
21342         * parse.y (frob_specs, fn.def1): Adjust.
21343         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
21344         (parse_end_decl, parse_bitfield0, parse_method): New fns.
21345         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
21346         (after_type_component_declarator0): Likewise.
21347         (after_type_component_declarator): Likewise.
21348         (notype_component_declarator): Likewise.
21349         * cp-tree.h: Adjust.
21350
21351         * decl.c (redeclaration_error_message): Allow redeclaration of
21352         namespace-scope decls.
21353
21354 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
21355
21356         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
21357
21358 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
21359
21360         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
21361         * decl2.c (grokclassfn): Likewise.
21362
21363         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
21364
21365         * decl2.c (lang_decode_option): Don't set default message length
21366         here.
21367         * lex.c (lang_init_options): Set it here.
21368
21369 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
21370
21371         Make DECL_CONTEXT mean the class in which a member function was
21372         declared, even for a virtual function.
21373         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
21374         (DECL_FRIEND_CONTEXT): New macro.
21375         (DECL_REAL_CONTEXT): Remove.
21376         (SET_DECL_FRIEND_CONTEXT): Likewise.
21377         (DECL_VIRTUAL_CONTEXT): Adjust.
21378         (DECL_CLASS_SCOPE_P): Use TYPE_P.
21379         (add_friends): Remove.
21380         (hack_decl_function_context): Likewise.
21381         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
21382         CP_DECL_CONTEXT.
21383         (build_over_call): Fix indentation.  Use DECL_CONTEXT
21384         instead of DECL_CLASS_CONTEXT.
21385         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
21386         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
21387         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21388         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
21389         (build_base_field): Likewise.
21390         (finish_struct_1): Likewise.
21391         (build_self_reference): Likewise.
21392         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
21393         DECL_REAL_CONTEXT.
21394         (pushtag): Use decl_function_context, not
21395         hack_decl_function_context.
21396         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
21397         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
21398         (pushdecl): Remove bogus code.
21399         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
21400         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
21401         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21402         Use decl_function_context, nothack_decl_function_context.
21403         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
21404         (grokdeclarator): Likewise.  Use decl_function_context, not
21405         hack_decl_function_context.
21406         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
21407         (start_function): Use DECL_FRIEND_CONTEXT, not
21408         DECL_CLASS_CONTEXT.  Use decl_function_context, not
21409         hack_decl_function_context.
21410         (finish_function): Use decl_function_context, not
21411         hack_decl_function_context.
21412         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
21413         DECL_CLASS_CONTEXT.
21414         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
21415         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
21416         (grokfield): Likewise.
21417         (finish_builtin_type): Likewise.
21418         (finish_vtable_vardec): Use decl_function_context, not
21419         hack_decl_function_context.
21420         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21421         (start_static_initialization_or_destruction): Likewise.
21422         (finish_static_initialization_or_destruction): Likewise.
21423         (mark_used): Adjust logic for deciding when to synthesize methods.
21424         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
21425         DECL_REAL_CONTEXT.
21426         * error.c (dump_function_decl): Use DECL_CONTEXT, not
21427         DECL_CLASS_CONTEXT.
21428         * friend.c (is_friend): Likewise.
21429         (add_friends): Remove.
21430         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
21431         * lex.c (begin_definition_of_inclass_inline): Use
21432         decl_function_context, not hack_decl_function_context.
21433         (process_next_inline): Likewise.
21434         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
21435         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
21436         DECL_CLASSS_CONTEXT.
21437         (hack_identifier): Likewise.
21438         (synthesize_method):  Use decl_function_context, not
21439         hack_decl_function_context.
21440         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
21441         DECL_REAL_CONTEXT.
21442         (is_member_template): Use decl_function_context, not
21443         hack_decl_function_context.  Use DECL_CONTEXT, not
21444         DECL_CLASS_CONTEXT.
21445         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
21446         DECL_CLASS_CONTEXT.
21447         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
21448         DECL_REAL_CONTEXT.
21449         (push_template_decl_real): Likewise.
21450         (instantiate_class_template): Don't call add_friends.
21451         (tsubst_default_argument): Use DECL_CONTEXT, not
21452         DECL_REAL_CONTEXT.
21453         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
21454         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21455         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
21456         DECL_CLASS_CONTEXT.
21457         * repo.c (repo_inline_used): Likewise.
21458         * search.c (current_scope): Adjust for new _CONTEXT macros.
21459         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
21460         DECL_REAL_CONTEXT.
21461         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21462         (lookup_fnfields_here):Likewise.
21463         (check_final_overrider): Likewise.
21464         (init_vbase_pointers): Likewise.
21465         (virtual_context): Likewise.
21466         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
21467         (expand_body): Use decl_function_context, not
21468         hack_decl_function_context.
21469         * tree.c (hack_decl_function_context): Remove.
21470         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
21471         DECL_CLASS_CONTEXT.
21472         * typeck2.c (error_not_base_type): Likewise.
21473
21474 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
21475
21476         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
21477
21478 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21479
21480         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
21481
21482 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
21483
21484         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
21485
21486 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
21487
21488         * decl2.c (lang_decode_option): Enable automatic line wrapping.
21489
21490 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
21491
21492         * parse.y (frob_specs): Split out...
21493         (parse_decl): From here.
21494         (fn.def2): Call initial_deferred_type_access_control.
21495         (after_type_component_declarator0): Call frob_specs.
21496         (notype_component_declarator0): Likewise.
21497         * search.c (friend_accessible_p): Nested classes are friends of their
21498         enclosing classes.
21499
21500 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
21501
21502         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
21503         used to create an implicit temporary.
21504
21505         * class.c (dfs_modify_vtables): Tweak calculation of functions to
21506         override.
21507
21508 2000-02-08  Nathan Sidwell  <nathan@acm.org>
21509
21510         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
21511         strip array element qualifiers too.
21512
21513 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
21514
21515         * decl.c (store_parm_decls): Don't build cleanups for parameters
21516         while processing_template_decl.
21517
21518 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
21519
21520         * cp-tree.h (struct saved_scope): Add incomplete field.
21521         (namespace_scope_incomplete): New macro.
21522         * decl.c (pushdecl): Use it.
21523         (hack_incomplete_structures): Use it.  See through artificial
21524         binding levels.
21525         (mark_saved_scope): Mark it.
21526
21527         Implement access control for nested types.
21528         * search.c (type_access_control): New fn.
21529         (accessible_p): Now we do perform access control for types.
21530         * semantics.c (deferred_type_access_control): New fn.
21531         (initial_deferred_type_access_control): New fn.
21532         (begin_function_definition): Call it.  Add lookups parm.
21533         * decl.c (struct binding_level): Add this_class field.
21534         (pushlevel_class): Set it.
21535         (mark_binding_level): Mark it.
21536         (lookup_name_real): Use it.  Call type_access_control.
21537         (mark_saved_scope): Mark lookups field.
21538         * cp-tree.h (flagged_type_tree): Add lookups field.
21539         (struct saved_scope): Add lookups field.
21540         (type_lookups): New macro.
21541         * parse.y (declmods): Now <ftype>.
21542         (parse_decl): Add lookups parm.  Call
21543         initial_deferred_type_access_control.
21544         (lang_extdef): Clear type_lookups.
21545         (typed_declspecs, declmods, typespec): Set lookups field.
21546         (initdcl): Call deferred_type_access_control.
21547         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
21548         component_decl_1, named_parm): Adjust.
21549         * friend.c (is_friend): Nested classes are friends of their
21550         enclosing classes.
21551
21552         * class.c (currently_open_derived_class): New fn.
21553         * method.c (hack_identifier): Use it.
21554
21555         * lex.c (do_identifier): Remove obsolete code.
21556
21557         * parse.y (typed_typespecs): Propagate new_type_flag properly.
21558
21559 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
21560
21561         * tinfo.h: Remove apostrophes from C++ comment (xgettext
21562         thinks this file is plain C).
21563
21564 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21565
21566         * Makefile.in (call.o): Depend on $(EXPR_H).
21567
21568         * call.c: Include "expr.h".
21569
21570         * class.c (dump_class_hierarchy): Add prototype.
21571
21572         * search.c (dfs_get_pure_virtuals): Likewise.
21573
21574 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
21575
21576         * parse.y (simple_stmt): Allow :: token in asm parameter list.
21577         * parse.c: Rebuilt.
21578
21579 2000-01-31  Jim Wilson  <wilson@cygnus.com>
21580
21581         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
21582         Store it in DECL_FCONTEXT.
21583         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
21584
21585 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
21586
21587         * tinfo.h (old abi): #include "tconfig.h".
21588         * tinfo.cc (convert_to_base): Move into old abi section.
21589
21590 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
21591
21592         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
21593         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
21594         (BINFO_PRIMARY_BINFO): New macro.
21595         (BF_DELTA): Rename to ...
21596         (BV_DELTA): ... this.
21597         (BF_VCALL_INDEX): Rename to ...
21598         (BV_VCALL_INDEX): ... this.
21599         (BF_FN): Rename to ...
21600         (BV_FN): ... this.
21601         * class.c (build_vbase_path): Adjust for changes to reverse_path.
21602         (set_rtti_entry): Rename BF_ macros to BV_ variants.
21603         (modify_vtable_entry): Simplify.
21604         (add_virtual_function): Rename BF_ macros to BV_ variants.
21605         (build_vtable_initializer): Likewise.
21606         (get_class_offset_1): Remove.
21607         (dfs_get_class_offset): Likewise.
21608         (get_class_offset): Likewise.
21609         (dfs_find_final_overrider): New function.
21610         (find_final_overrider): Likewise.
21611         (modify_one_vtable): Remove.
21612         (dfs_find_base): New function.
21613         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
21614         find_final_overrider.
21615         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
21616         virtuals.
21617         (dfs_fixup_vtable_deltas): Remove.
21618         (override_one_vtable): Remove.
21619         (merge_overrides): Likewise.
21620         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
21621         unreal chilren of virtual bases.
21622         (finish_struct_1): Don't use merge_overrides.  Don't use
21623         dfs_fixup_vtable_deltas.
21624         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
21625         BINFOs.
21626
21627 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
21628             Jason Merrill  <jason@yorick.cygnus.com>
21629
21630         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
21631
21632 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
21633
21634         * exception.cc (__throw_bad_typeid): Add missing std::.
21635
21636 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21637
21638         * cp-tree.h (make_thunk): PROTO -> PARAMS.
21639
21640 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
21641
21642         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
21643
21644         Runtime support for new-abi rtti.
21645         * inc/typeinfo (type_info::operator!=): Define in class.
21646         (type_info::before, type_info::name, type_info::operator==,
21647         type_info::operator!=): Define new ABI implementations.
21648         (type_info::is_pointer_p, type_info::is_function_p): Declare
21649         new virtual functions.
21650         (type_info::do_catch, type_info::do_upcast): Likewise.
21651
21652         * tinfo.h (__base_class_info): Define new class.
21653         (__class_type_info): Likewise.
21654         (__si_class_type_info): Likewise.
21655         (__vmi_class_type_info): Likewise.
21656         (__dynamic_cast): Prototype.
21657
21658         * tinfo.cc: Conditionalize old and new rtti mechanisms.
21659         (type_info::is_pointer_p): Define new function.
21660         (type_info::is_function_p): Likewise.
21661         (type_info::do_catch): Likewise.
21662         (type_info::do_upcast): Likewise.
21663         (vtable_prefix): New structure for vtable access.
21664         (adjust_pointer): Define new template function.
21665         (contained_p, public_p, virtual_p, contained_public_p,
21666         contained_nonpublic_p, contained_nonvirtual_p): Define new
21667         functions.
21668         (nonvirtual_base_type): New local variable.
21669         (__class_type_info::~__class_type_info): Define.
21670         (__si_class_type_info::~__si_class_type_info): Likewise.
21671         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
21672         (__class_type_info::do_catch): Define new function.
21673         (__class_type_info::do_upcast): Likewise.
21674         (__class_type_info::find_public_src): Likewise.
21675         (__class_type_info::do_find_public_src): Likewise.
21676         (__si_class_type_info::do_find_public_src): Likewise.
21677         (__vmi_class_type_info::do_find_public_src): Likewise.
21678         (__class_type_info::do_dyncast): Likewise.
21679         (__si_class_type_info::do_dyncast): Likewise.
21680         (__vmi_class_type_info::do_dyncast): Likewise.
21681         (__class_type_info::do_upcast): Likewise.
21682         (__si_class_type_info::do_upcast): Likewise.
21683         (__vmi_class_type_info::do_upcast): Likewise.
21684         (__dynamic_cast): Likewise.
21685
21686         * tinfo2.cc (__fundamental_type_info): Define new class.
21687         (__pointer_type_info): Likewise.
21688         (__reference_type_info): Likewise.
21689         (__array_type_info): Likewise.
21690         (__function_type_info): Likewise.
21691         (__enum_type_info): Likewise.
21692         (__ptr_to_member_type_info): Likewise.
21693         (__fundamental_type_info::~__fundamental_type_info): Define.
21694         (__pointer_type_info::~__pointer_type_info): Likewise.
21695         (__reference_type_info::~__reference_type_info): Likewise.
21696         (__array_type_info::~__array_type_info): Likewise.
21697         (__function_type_info::~__function_type_info): Likewise.
21698         (__enum_type_info::~__enum_type_info): Likewise.
21699         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
21700         (__pointer_type_info::do_catch): Define new function.
21701         (__ptr_to_member_type_info::do_catch): Define new function.
21702
21703         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
21704         (__is_pointer): Likewise.
21705
21706         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
21707
21708 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
21709
21710         * cp/class.c (build_vtable): Rename to build_primary_vtable.
21711         (prepare_fresh_vtable): Rename to build_secondary_vtable.
21712         (make_new_vtable): New function.
21713         (modify_vtable_entry): Handle generation of new vtables correctly.
21714         (modify_one_vtable): Remove unused parameter.
21715         (dfs_fixup_vtable_deltas): Likewise.
21716         (override_one_vtable): Use build_secondary_vtable.
21717         (finish_struct_1): Use build_primary_vtable and
21718         build_secondary_vtable.
21719
21720 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
21721
21722         * cp/decl.c: Adjust variable names, comments, help strings.
21723
21724 2000-01-29  Nathan Sidwell  <nathan@acm.org>
21725
21726         * new2.cc (operator delete[]): Use operator delete, don't assume
21727         implementation.
21728
21729 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
21730
21731         * class.c (build_vtbl_initializer): Add argument to
21732         build_vtable_entry call.
21733
21734 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
21735
21736         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
21737         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
21738         (BF_DELTA): New macro.
21739         (BF_VCALL_INDEX): Likewise.
21740         (BF_FN): Likewise.
21741         (THUNK_VCALL_OFFSET): Likewise.
21742         (make_thunk): Change prototype.
21743         * class.c (build_vtable_entry): Integrate
21744         build_vtable_entry_for_fn.  Handle vcall indices.
21745         (build_vtable_entry_for_fn): Remove.
21746         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
21747         BF_VCALL_INDEX, BF_FN.
21748         (modify_vtable_entry): Integrate common code from
21749         modify_one_vtable and dfs_fixup_vtable_deltas.
21750         (add_virtual_function): Set BF_VCALL_INDEX.
21751         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
21752         and BF_FN.
21753         (modify_one_vtable): Simplify.
21754         (dfs_fixup_vtable_deltas): Likewise.
21755         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
21756         * method.c (make_thunk): Handle vcall indices.
21757
21758 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
21759
21760         Compiler side new abi rtti (not enabled).
21761         * cp-tree.h (new_abi_rtti_p): New macro.
21762         (emit_support_tinfos): Prototype new function.
21763         (tinfo_decl_p): Likewise.
21764         (emit_tinfo_decl): Likwise.
21765         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
21766         macros.
21767         (doing_runtime): New local static.
21768         (init_rtti_processing): Add new-abi initializer.
21769         (get_tinfo_decl): Add new-abi logic.
21770         (tinfo_from_decl): Likewise.
21771         (build_dynamic_cast_1): Likewise.
21772         (qualifier_flags): New static function.
21773         (tinfo_base_init): Likewise.
21774         (generic_initializer): Likewise.
21775         (ptr_ref_initializer): Likewise.
21776         (ptmd_initializer): Likewise.
21777         (class_hint_flags): Likewise.
21778         (class_initializer): Likewise.
21779         (synthesize_tinfo_var): Likewise.
21780         (create_real_tinfo_var): Likewise.
21781         (create_pseudo_type_info): Likewise.
21782         (get_vmi_pseudo_type_info): Likewise.
21783         (create_tinfo_types): Likewise.
21784         (emit_support_tinfos): New global function.
21785         (tinfo_decl_p): New global predicate.
21786         (emit_tinfo_decl): New global function.
21787         * class.c (set_rtti_entry): Generalize for old and new rtti.
21788         (build_vtbl_initializer): Likewise.
21789         * decl2.c (finish_file): Likewise.
21790
21791 2000-01-27  Jim Wilson  <wilson@cygnus.com>
21792
21793         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
21794         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
21795
21796 2000-01-27  Mike Stump  <mrs@wrs.com>
21797
21798         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
21799         for scopes.
21800
21801 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
21802
21803         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
21804
21805 2000-01-26  J"orn Rennecke <amylaar@cygnus.co.uk>
21806
21807         * optimize.c (calls_setjmp_r): Supply new argument
21808         to special_function_p.
21809
21810 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21811
21812         * call.c: PROTO -> PARAMS.
21813         * class.c: Likewise.
21814         * cp-tree.h: Likewise.
21815         * cvt.c: Likewise.
21816         * decl.c: Likewise.
21817         * decl.h: Likewise.
21818         * decl2.c: Likewise.
21819         * dump.c: Likewise.
21820         * errfn.c: Likewise.
21821         * error.c: Likewise.
21822         * except.c: Likewise.
21823         * expr.c: Likewise.
21824         * init.c: Likewise.
21825         * input.c: Likewise.
21826         * lex.c: Likewise.
21827         * lex.h: Likewise.
21828         * method.c: Likewise.
21829         * optimize.c: Likewise.
21830         * parse.y: Likewise.
21831         * pt.c: Likewise.
21832         * repo.c: Likewise.
21833         * rtti.c: Likewise.
21834         * search.c: Likewise.
21835         * semantics.c: Likewise.
21836         * spew.c: Likewise.
21837         * tree.c: Likewise.
21838         * typeck.c: Likewise.
21839         * typeck2.c: Likewise.
21840         * xref.c: Likewise.
21841
21842 2000-01-25  Richard Henderson  <rth@cygnus.com>
21843
21844         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
21845
21846 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
21847
21848         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
21849         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
21850         (struct vcall_offset_data_s): New type.
21851         (dfs_vcall_offset_queue_p): New function.
21852         (dfs_build_vcall_offset_vtbl_entries): Likewise.
21853         (build_vcall_offset_vtbl_entries): Likewise.
21854         (layout_vtable_decl): Likewise.
21855         (num_vfun_entries): Likewise.
21856         (num_extra_vtbl_entries): Add the entries for vcall offsets.
21857         (build_vtbl_initializer): Likewise.
21858         (dfs_finish_vtabls): Use layout_vtable_decl.
21859         (modify_one_vtables): Always duplicate vtables under the new ABI.
21860         (finish_struct_1): Use layout_vtable_decl.
21861
21862 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21863
21864         * decl.c (member_function_or_else): Change third arg from a format
21865         specifier to an `enum overload_flags'.  Callers changed.
21866
21867 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
21868
21869         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
21870         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
21871         build_const_cast, get_delta_difference, check_return_expr): Avoid
21872         ANSI string concatenation usage.
21873
21874 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
21875
21876         * class.c (layout_class_type): Put the fields required to make a
21877         class non-empty at the end, not the beginning, of the TYPE_FIELDs
21878         list.
21879
21880 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
21881
21882         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
21883         template.
21884
21885         * decl2.c (mark_used): Do instantiate inlines that have been
21886         explicitly instantiated.
21887
21888 2000-01-24  Richard Henderson  <rth@cygnus.com>
21889
21890         * call.c (build_over_call): Use expand_tree_builtin.
21891         * typeck.c (build_function_call_real): Likewise.
21892         (build_binary_op_nodefault): Handle unordered compares.
21893
21894 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
21895
21896         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
21897         cp_tree_index values.
21898         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
21899         New global node #defines for them.
21900         * rtti.c (call_void_fn): Replace with ...
21901         (build_runtime_decl): ... new static function.
21902         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
21903         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
21904         (build_dynamic_cast_1): Always produce correctly typed result.
21905         Explicitly produce type_info addresses. Use dynamic_cast_node.
21906         * exception.cc (__throw_bad_cast): Return `void *'.
21907         (__throw_bad_typeid): Return `const type_info &'.
21908
21909 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
21910
21911         * cp-tree.h (get_vtable_decl): Prototype new function.
21912         * class.c (get_vtable_decl): New function. Broken out from ...
21913         (build_vtable): ... here. Use it.
21914         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
21915         by get_vtable_decl.
21916
21917 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
21918
21919         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
21920         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
21921         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
21922         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
21923         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
21924         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
21925         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
21926         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
21927         (CPTI_TINFO_VAR_ID): New enumeration.
21928         (__tp_desc_type_node, __access_mode_type_node,
21929         __bltn_desc_type_node, __user_desc_type_node,
21930         __class_desc_type_node, __ptr_desc_type_node,
21931         __attr_desc_type_node, __func_desc_type_node,
21932         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
21933         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
21934         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
21935         enum_desc_type_node, class_desc_type_node,
21936         si_class_desc_type_node, vmi_class_desc_type_node,
21937         ptmd_desc_type_node, base_desc_type_node): New #defines.
21938         (tinfo_fn_id, tinfo_fn_type): Rename to ...
21939         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
21940         (tinfo_var_id): New enumeration.
21941         (DECL_TINFO_FN_P): Augment comment.
21942         * decl.c (cp_global_trees): Adjust documentation.
21943         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
21944         tinfo_decl_type and tinfo_var_id.
21945         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
21946         (build_typeid): Remove unused variable.
21947         (get_tinfo_var): Use tinfo_var_id.
21948         (tinfo_name): New static function.
21949         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
21950         (tinfo_from_decl): Likewise.
21951         (get_base_offset): New static function, broken out of
21952         expand_class_desc.
21953         (expand_si_desc): Use tinfo_name.
21954         (expand_class_desc): Likewise. Lose local static variable.
21955         Use base_desc_type_node. Use get_base_offset.
21956         (expand_ptr_desc): Use tinfo_name.
21957         (expand_attr_desc): Likewise.
21958         (expand_generic_desc): Likewise.
21959
21960         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
21961         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
21962
21963 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
21964
21965         * cp-tree.h (__eprintf): Remove declaration.
21966         * tree.c (__eprintf): Remove definition.
21967
21968 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
21969             Mark Mitchell  <mark@codesourcery.com>
21970
21971         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
21972         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
21973
21974 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
21975
21976         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
21977
21978 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
21979
21980         * cp-tree.h (register_dtor_fn): New function.
21981         * decl.c (destroy_local_static): Rename to ...
21982         (register_dtor_fn): ... this.  Give it external linkage.
21983         (expand_static_init): Use it.
21984         * decl2.c (do_static_initialization): Likewise, if using
21985         __cxa_atexit.
21986         (do_static_destruction): Check that __cxa_atexit is not in use.
21987         (finish_file): Don't call do_static_destruction if using
21988         __cxa_atexit.
21989
21990         * typeck.c (convert_arguments): Restore two-message error
21991         reporting.
21992
21993 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
21994
21995         Remap dynamic cast hint values to be consistent across ABIs.
21996         * search.c (dynamic_cast_base_recurse): Remap generated value.
21997         (get_dynamic_cast_base_type): Adjust documentation.
21998         * tinfo.h (__user_type_info::dyncast): Likewise.
21999         (__user_type_info::find_public_subobj): Remap BOFF meaning.
22000         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
22001         (__class_type_info::do_dyncast): Likewise.
22002         (__class_type_info::do_find_public_subobj): Likewise.
22003         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
22004
22005 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
22006
22007         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
22008
22009         * typeck2.c (incomplete_type_error): Restore previous
22010         cp_error and cp_error_at call sequence.
22011
22012 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
22013
22014         * class.c (dump_class_hierarchy): Make format agree with argument;
22015         cast pointer to unsigned long and print with %lx.
22016
22017 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
22018
22019         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
22020
22021         * typeck.c (composite_pointer_type, common_type,
22022         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
22023         build_function_call_real, convert_arguments,
22024         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
22025         build_unary_op, mark_addressable, build_compound_expr,
22026         build_static_cast, build_reinterpret_cast, build_const_cast,
22027         build_c_cast, build_modify_expr, get_delta_difference,
22028         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
22029         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
22030         into a single one.
22031         * typeck2.c (readonly_error, abstract_virtuals_error,
22032         process_init_constructor, check_for_new_type): Likewise.
22033
22034 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
22035
22036         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
22037         VAR_DECLs.
22038
22039 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
22040
22041         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
22042         (build_x_typeid): Likewise.
22043         (get_tinfo_fn): Likewise.
22044         (get_tinfo_fn_unused): Rename to ...
22045         (get_tinfo_decl): ... here.
22046         * rtti.c (build_headof): Replace logic error with assertion.
22047         (get_tinfo_fn_dynamic): Rename to ...
22048         (get_tinfo_decl_dynamic): ... here. Make static. Use
22049         complete_type_or_else.
22050         (build_x_typeid): Move into ...
22051         (build_typeid): ... here. Adjust call to
22052         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
22053         throw_bad_typeid expression.
22054         (get_tinfo_fn_unused): Rename to ...
22055         (get_tinfo_decl): ... here. Adjust comment.
22056         (get_tinfo_fn): Delete.
22057         (tinfo_from_decl): New static function.
22058         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
22059         (get_typeid): Use complete_type_or_else.
22060         (build_dynamic_cast_1): Adjust calls to
22061         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
22062         * parse.y (primary): Adjust call to build_typeid.
22063         * except.c (build_eh_type_type_ref): Adjust call to
22064         get_tinfo_decl. Mark as used.
22065         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
22066         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
22067         * parse.c: Regenerated.
22068
22069 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
22070
22071         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
22072         calling convention.
22073         (resolves_to_fixed_type_p): Document calling convention.
22074         * rtti.c (build_x_typeid): Initialize NONNULL.
22075
22076         * cp-tree.h (build_shared_int_cst): New function.
22077         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
22078         * class.c (modify_vtable_entry): Likewise.
22079         (add_virtual_function): Split out code to generated shared
22080         INTEGER_CSTs to build_share_int_cst.
22081         (modify_all_vtables): Handle all the overridden functions here.
22082         Add overridden functions from non-primary virtual bases to the
22083         primary vtable.
22084         (finish_struct_1): Adjust call to modify_all_vtables.  Add
22085         overridden functions from non-primary bases to the vtable.
22086         * tree.c (build_shared_int_cst): New function.
22087
22088         * cp-tree.h (scratchalloc): Remove.
22089         (build_scratch_list): Likewise.
22090         * call.c (convert_class_to_reference): Replace build_scratch_list
22091         and build_expr_list with build_tree_list.
22092         (add_candidate): Replace scratchalloc with expralloc.  Note memory
22093         leak.
22094         (build_user_type_conversion_1):  Replace build_scratch_list
22095         and build_expr_list with build_tree_list.
22096         (build_new_op): Likewise.
22097         (build_op_delete_call): Likewise.
22098         (convert_like): Likewise.
22099         * cvt.c (ocp_convert): Likewise.
22100         * decl.c (start_decl): Likewise.
22101         (start_function): Likewise.
22102         (finish_destructor_body): Likewise.
22103         (maybe_build_cleanup_1): Likewise.
22104         * decl2.c (reparse_decl_as_expr): Likewise.
22105         * init.c (perform_member_init): Likewise.
22106         (expand_cleanup_for_base): Likewise.
22107         (build_builtin_delete_call): Likewise.
22108         (build_new_1): Likewise.
22109         (build_delete): Likewise.
22110         * method.c (do_build_assign_ref): Likewise.
22111         * parse.y (already_scoped_stmt): Likewise.
22112         (nontrivial_exprlist): Likewise.
22113         (net_initializer): Likewise.
22114         (initlist): Likewise.
22115         * parse.c: Regenerated.
22116         * rtti.c (build_x_typeid): Likewise.
22117         (build_dynamic_cast_1): Likewise.
22118         * typeck.c (build_x_compound_expr): Likewise.
22119         (build_static_cast): Likewise.
22120         (build_modify_expr): Likewise.
22121
22122         * cp-tree.h (DECL_VINDEX): Add documentation.
22123         * class.c (build_vtable_entry): Likewise.
22124         (start_vtable): Add comment.
22125         (add_virtual_function): Replace pending_hard_virtuals with
22126         overridden_virtuals and pending_virtuals with new_virtuals.
22127         Replace redundant assignments with assertions.
22128         (check_for_override): Add comment.
22129         (check_bases_and_members): Replace pending_hard_virtuals with
22130         overridden_virtuals and pending_virtuals with new_virtuals.
22131         (create_vtbl_ptr): Likewise.
22132         (layout_class_type): Likewise.
22133         (finish_struct_1): Likewise.  Add comments.
22134
22135 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
22136
22137         * class.c (finish_struct_1): Replace redundant code with
22138         assertions.
22139
22140         * cp-tree.h (flag_new_abi): Move.
22141         (flag_use_cxa_atexit): Likewise.
22142         (flag_honor_std): Likewise.
22143         (flag_rtti): Likewise.
22144         (vbase_offsets_in_vtable_p): Define.
22145         (vptrs_present_everywhere_p): Likewise.
22146         (TYPE_CONTAINS_VPTR_P): Likewise.
22147         (dfs_walk_real): Declare.
22148         * class.c (build_vbase_pointer_fields): Check
22149         vbase_offsets_in_vtable_p.
22150         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
22151         BINFO_VPTR_FIELD.
22152         (build_vbase_offset_vtbl_entries): Simplify.
22153         (build_vbase_offset_vtbl_entries): Adjust.
22154         (build_vbase_pointer): Add ability to look up vbase offsets in
22155         vtable.
22156         (start_vtable): New function.
22157         (add_virtual_function): Use it.
22158         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
22159         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
22160         (build_vtbl_initializer): Take the type of the complete object as
22161         input.  Use it to correctly calculate vbase offsets.
22162         (dfs_finish_vtbls): Pass the complete type to
22163         build_vtbl_initializer.
22164         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
22165         (create_vtable_ptr): Create a vtable even if there are no
22166         new virtual functions, under the new ABI.
22167         (finish_struct_1): Likewise.
22168         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
22169         * decl.c (exapnd_static_init): Remove call to
22170         preserve_initializer.
22171         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
22172         vtables.
22173         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
22174         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
22175         (construct_virtual_bases): Don't initialize virtual base pointers
22176         under the new ABI.
22177         (build_aggr_init): Clean up comment.
22178         (expand_aggr_init_1): Likewise.
22179         * rtti.c (expand_class_desc): Store the virtual function table
22180         index where the vbase offset lives in the offset field.
22181         * search.c (dfs_walk_real): Make it global.
22182         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
22183         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
22184
22185         * tinfo.h (USItype): Make it signed under the new ABI.
22186         * tinfo.cc (convert_to_base): New function.  Encapsulate base
22187         conversion logic here.
22188         (__class_type_info::do_upcast): Use it.
22189         (__class_type_info::do_dyncast): Likewise.
22190         (__class_type_info::do_find_public_subobj): Likewise.
22191
22192         * init.c (construct_virtual_bases): Don't look up the addresses of
22193         virtual bases at run-time.
22194
22195         * class.c (build_vbase_pointer): Relocate.
22196         (build_vbase_pointer_fields): Likewise.
22197         (dfs_build_vbase_offset_vtbl_entries): Likewise.
22198         (build_vbase_offset_vtbl_entries): Likewise.
22199
22200         * decl.c (init_decl_processing): Complain if -fnew-abi
22201         -fno-vtable-thunks is used.
22202
22203         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
22204         flag_new_abi.
22205
22206 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
22207
22208         * cp-tree.h (num_extra_vtbl_entries): New function.
22209         (size_extra_vtbl_entries): Likewise.
22210         (dfs_vtable_path_unmark): Likewise.
22211         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
22212         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
22213         * class.c (num_extra_vtbl_entries): New function.
22214         (size_extra_vtbl_entries): Likewise.
22215         (dfs_build_vbase_offset_vtbl_entries): New function.
22216         (build_vbase_offset_vtbl_entries): Likewise.
22217         (build_vtbl_initializer): Use it.
22218         (finish_struct_1): Adjust vtable sizes (using
22219         num_extra_vtbl_entries).
22220         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
22221         THUNK_DECL is non-NULL before expanding it.
22222         * init.c (expand_virtual_init): Adjust the vtable pointer by
22223         size_extra_vtbl_entries before storing it.
22224         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
22225         Handle TREE_LIST parameters here, not in the dfs_* functions.
22226         (dfs_unmarked_real_bases_queue_p): Adjust.
22227         (dfs_marked_real_bases_queue_p): Likewise.
22228         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
22229         (dfs_vtable_path_marked_real_bases_queue_p): New function.
22230         (dfs_vtable_path_unmark): Likewise.
22231
22232 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
22233
22234         * optimize.c (copy_body_r): Clear the operand three of a
22235         TARGET_EXPR when copying it.
22236
22237 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
22238
22239         * method.c (build_decl_overload_real): Check whether we are in ::
22240         before returning __builtin_new/delete.
22241
22242 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
22243
22244         * pt.c (tsubst_friend_function): Improve comment.
22245         (instantiate_decl): Avoid crashing when a "nested" function is
22246         instantiated from the top level.
22247
22248         * dump.c (dqeueue_and_dump): Dump
22249         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
22250
22251 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
22252
22253         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
22254
22255 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
22256
22257         * g++spec.c (lang_specific_driver): Add -fnew-abi if
22258         ENABLE_NEW_GXX_ABI defined.
22259         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
22260         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
22261         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
22262
22263 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
22264
22265         * decl.c (start_cleanup_fn): Call pushdecl.
22266
22267         * call.c (convert_class_to_reference): Fix typos.
22268         (build_conditional_expr): Handle errors gracefully.
22269         * class.c (push_nested_class): Likewise.
22270         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
22271         (DECL_THIS_EXTERN): Use it.
22272         (DECL_THIS_STATIC): Likewise.
22273         * cvt.c (convert_to_void): Handle errors gracefully.
22274         (build_expr_type_conversion): Likewise.
22275         * decl.c (maybe_push_decl): Likewise.
22276         (start_decl_1): Likewise.
22277         (require_complete_types_for_parms): Likewise.
22278         * parse.y (structsp): Likewise.
22279         (base_class): Likewise.
22280         * parse.c: Regenerated.
22281         * pt.c (finish_member_template_decl): Likewise.
22282         * typeck.c (decay_conversion): Likewise.
22283
22284         * cp-tree.h (dfs_skip_vbases): New function.
22285         (find_vbase_instance): Likewise.
22286         * class.c (determine_primary_base): Allow a nearly empty base to
22287         serve as a primary base class under the new ABI.
22288         (get_class_offset_1): Rename to ...
22289         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
22290         messages here.
22291         (get_class_offset): Use it.  Issue error messages here.
22292         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
22293         find the right copies of virtual bases.
22294         (fixup_vtable_deltas1): Rename to ...
22295         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
22296         bases as primary bases.
22297         (fixup_vtable_deltas): Remove.
22298         (override_one_vtable): Handle virtual bases as primary bases.
22299         (merge_overrides): Likewise.
22300         (finish_struct_1): Likewise.
22301         (dump_class_hierarchy): Dump primary-ness of bases as well.
22302         * search.c (mark_primary_bases): Use a pre-order traversal to
22303         handle primary virtual bases.
22304         (dfs_skip_vbases): New fiunction.
22305         (expand_upcast_fixups): Adjust to handle primary virtual bases.
22306         (fixup_virtual_upcast_offsets): Likewise.
22307         (fixup_all_virtual_upcast_offsets): Likewise.
22308         (dfs_find_vbase_instances): New function.
22309         (find_vbase_instance): Likewise.
22310
22311 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
22312
22313         * lex.c (DIR_SEPARATOR): Delete macro.
22314
22315 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
22316
22317        * decl2.c (lang_decode_option): Handle automatic line wrapping
22318        option.
22319
22320 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
22321
22322         * friend.c (do_friend): Don't resolve scopes when processing
22323         template declarations, even if the qualifying scope doesn't
22324         involve template parameters.
22325
22326 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
22327
22328         * class.c (dfs_modify_vtables_queue_p): Remove.
22329         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
22330         and dfs_marked_real_bases_queue_p instead of
22331         dfs_modify_vtables_queue_p.
22332
22333         * class.c (build_vbase_path): Simplify.
22334         (dfs_propagate_binfo_offsets): New function.
22335         (propagate_binfo_offsets): Use it.
22336         (remove_base_field): Simplify.
22337         (dfs_set_offset_for_vbases): Remove.
22338         (dfs_set_offset_for_shared_vbases): New function.
22339         (dfs_set_offset_for_unshared_vbases): Likewise.
22340         (layout_virtual_bases): Use them.
22341         (layout_basetypes): Don't call propagate_binfo_offsets.
22342         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
22343         for the vbases.
22344
22345         * class.c (build_base_field): New function, split out from ...
22346         (build_base_fields): ... here.  Use it.  Allocate primary bases
22347         first, under the new ABI.
22348         (get_vtable_entry): Remove.
22349         (remove_base_field): New function, split out from ...
22350         (remove_base_fields): ... here.  Adjust since primary bases come
22351         first under the new ABI.
22352
22353         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
22354         (initialize_vtbl_ptrs): New function.
22355         (expand_indirect_vtbls_init): Change prototype.
22356         (convert_pointer_to_vbase): Declare.
22357         * init.c (expand_direct_vtbls_init): Remove.
22358         (dfs_initialize_vtbl_ptrs): New function.
22359         (initialize_vtbl_ptrs): Likewise.
22360         (emit_base_init): Use initialize_vtbl_ptrs.
22361         * search.c (convert_pointer_to_vbase): Make it global.
22362         (expand_indirect_vtbls_init): Remove vtable initialization code.
22363         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
22364
22365         * class.c (dfs_finish_vtbls): New function.
22366         (finish_vtbls): Use it.
22367         (dump_class_hierarchy): New function.
22368
22369         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
22370         (BINFO_VBASE_PRIMARY_P): New macro.
22371         (BINFO_VIRTUALS): Add to documentation.
22372         (SET_BINFO_PRIMARY_MARKED_P): Remove.
22373         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
22374         (dfs_mark_primary_bases_queue_p): Likewise.
22375         (dfs_unmarked_real_bases_queue_p): New function.
22376         (dfs_marked_real_bases_queue_p): Likewise.
22377         * search.c (dfs_mark_primary_bases): Adjust.
22378         (mark_primary_bases): Likewise.
22379         (get_shared_vbase_if_not_primary): New function.
22380         (dfs_unmarked_real_bases_queue_p): Likewise.
22381         (dfs_marked_real_bases_queue_p): Likewise.
22382         (dfs_get_pure_virtuals): Simplify.
22383         (get_pure_virtuals): Likewise.
22384
22385 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
22386
22387         * lex.c: Include tm_p.h.
22388
22389 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
22390
22391         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
22392
22393 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
22394
22395         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
22396         * pt.c (instantiate_decl): Defer comdat templates that might not be
22397         needed.
22398
22399         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
22400         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
22401         (finish_file): Likewise.
22402
22403         * decl2.c (import_export_class): Undo 12/14 change.
22404
22405         * error.c (dump_decl): operator new, not operatornew.
22406
22407         * class.c (field_decl_cmp): A nontype is "greater" than a type.
22408         * search.c (lookup_field_1): Look for the last field with the
22409         desired name.
22410
22411 2000-01-05  Nathan Sidwell  <nathan@acm.org>
22412
22413         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
22414         FUNCTION_DECL.
22415
22416 2000-01-05  Nathan Sidwell  <nathan@acm.org>
22417
22418         * typeck.c (build_static_cast): Don't strip target qualifiers
22419         when casting from a class.
22420
22421 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
22422
22423         * class.c (warn_hidden): Initialize variable `fndecl'.
22424
22425 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
22426
22427         * decl.c (flag_isoc9x): New variable to be able to use code in
22428         c-common.c.  For now always zero.
22429
22430 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
22431
22432         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
22433         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
22434         or unshare_base_binfos for virtual bases here.
22435         * search.c (dfs_get_vbase_types): Do it here.
22436         (get_vbase_types): Adjust.
22437
22438 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
22439
22440         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
22441         (BINFO_PRIMARY_MARKED_P): Use flag 5.
22442         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
22443         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
22444         (unmark_primary_bases): Remove declaration.
22445         (unmarkedp): Declare.
22446         (dfs_vbase_unmark): Likewise.
22447         * class.c (determine_primary_base): Return immediately if there
22448         are no base classes.  Call mark_primary_bases here.
22449         (modify_all_direct_vtables): Remove.
22450         (modify_all_indirect_vtables): Remove.
22451         (dfs_modify_vtables_queue_p): New function.
22452         (dfs_modify_vtables): New function.
22453         (modify_all_vtables): Use them.
22454         (build_base_fields): Build FIELD_DECLs for primary virtual base
22455         classes.
22456         (create_vtable_ptr): Don't call determine_primary_base here.
22457         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
22458         (dfs_set_offset_for_vbases): ... this.
22459         (layout_virtual_bases): Use it.
22460         (layout_class_type): Call determine_primary_base here.
22461         * search.c (unmarkedp): Make it global.
22462         (shared_marked_p): Simplify.
22463         (shared_unmarked_p): Likewise.
22464         (dfs_primary_bases_queue_p): Remove.
22465         (dfs_unmark_primary_bases): Likewise.
22466         (unmark_primary_bases): Likewise.
22467         (mark_primary_bases): Simplify.
22468         (get_pure_virtuals): Don't call mark_primary_bases here.
22469         (dfs_vbase_unmark): New function.
22470         (get_vbase_types): Simplify.
22471
22472         * class.c (struct base_info): Remove.
22473         (determine_primary_base): Take has_virtual_p rather than a
22474         base_info as input.  Don't calculate max_has_virtual.
22475         (finish_struct_bits): Remove max_has_virtual argument.
22476         (create_vtable_ptr): Remove max_has_virtual_p argument.
22477         (layout_virtual_bases): Remove max argument.
22478         (layout_basetypes): Likewise.
22479         (layout_class_type): Remove max_has_virtual_p argument.
22480         (finish_struct_1): Remove max_has_virtual.
22481
22482         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
22483         (layout_basetypes): Remove.
22484         * class.c (propagate_binfo_offsets): Moved here from tree.c.
22485         Update to handle primary virtual bases.
22486         (remove_base_fields): New function, split out from
22487         layout_basetypes.
22488         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
22489         (layout_virtual_bases): New function, split out from
22490         layout_basetypes.  Update to handle primary virtual bases.
22491         (layout_basetypes): Moved here from tree.c.  Use
22492         remove_base_fields and layout_virtual_bases.
22493         * search.c (dfs_mark_primary_bases_queue_p): New function.
22494         (mark_primary_bases): Use it.
22495         * tree.c (CEIL): Remove.
22496         (propagate_binfo_offsets): Remove.
22497         (layout_basetypes): Remove.
22498
22499 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
22500
22501         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
22502         (BINFO_PRIMARY_MARKED_P): New macro.
22503         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
22504         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
22505         (mark_primary_bases): New function.
22506         (unmark_primary_bases): Likewise.
22507         * search.c (get_abstract_virtuals_1): Remove.
22508         (dfs_mark_primary_bases): New function.
22509         (mark_primary_bases): Likewise.
22510         (dfs_unmark_primary_bases): Likewise.
22511         (unmark_primary_bases): Likewise.
22512         (dfs_get_pure_virtuals): Likewise.
22513
22514 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
22515
22516         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
22517         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
22518         (modify_one_vtable): Adjust.
22519         (fixup_vtable_deltas1): Likewise.
22520         (override_one_vtable): Likewise.
22521         * search.c (get_abstract_virtuals_1): Likewise.
22522         (get_pure_virtuals): Likewise.
22523         (expand_upcast_fixups): Likewise.
22524         * tree.c (debug_binfo): Likewise.
22525
22526         * class.c (build_vtable): Don't return a value.  Don't rebuild
22527         vtables for bases that have already been handled.
22528         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
22529         already been handled.
22530         (modify_one_vtable): Adjust accordingly.
22531         (fixup_vtable_deltas1): Likewise.
22532         (finish_struct_1): Likewise.
22533
22534 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
22535
22536         * call.c (build_new_method_call): Also check destructors.