OSDN Git Service

* error.c (dump_expr): Add 0x to printed hex numbers to make
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2003-03-28  Mike Stump  <mrs@apple.com>
2
3         * error.c (dump_expr): Add 0x to printed hex numbers to make
4         output match source code better.
5
6 2003-03-28  Mark Mitchell  <mark@codesourcery.com>
7
8         PR c++/10218
9         * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
10         definitions.
11
12         * decl2.c (generate_ctor_or_dtor_function): Tolerate a
13         non-existant ssdf_decls array.
14         (finish_file): Call generator_ctor_or_dtor_function when there are
15         static constructors or destructors and no other static
16         initializations.
17
18 2003-03-28  Nathan Sidwell  <nathan@codesourcery.com>
19
20         PR c++/10047
21         * decl2.c (finish_file): Don't warn about explicitly instantiated
22         inline decls.
23
24 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
25
26         PR c++/10224
27         * pt.c (lookup_template_class): Only check instantiated args if
28         they do not contain template parameters.
29
30 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
31
32         PR c++/10158
33         * parser.c (cp_parser_function_definition): Set
34         DECL_INITIALIZED_IN_CLASS for members.
35         * pt.c (instantiate_decl): Only reduce the template args for
36         friends that are not defined in class.
37
38 2003-03-25  Jason Merrill  <jason@redhat.com>
39
40         * call.c (print_z_candidate): Change name of first arg to msgid.
41         (joust): Add comment for translators.
42
43 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
44         
45         PR c++/9898, PR c++/383, DR 322
46         * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
47         through reference types on both PARM and ARG.
48
49 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
50
51         PR c++/10119
52         * error.c (dump_expr) <BASELINK>: Use dump_expr.
53         * pt.c (maybe_fold_nontype_args): New function.
54         (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
55         <TEMPLATE_ID_EXPR>: Break out folding code, call it.
56         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
57         maybe_fold_nontype_args.
58
59 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
60
61         PR c++/10026
62         * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
63
64 2003-03-23  Mark Mitchell  <mark@codesourcery.com>
65
66         PR c++/7086
67         * typeck.c (cxx_mark_addressable):  Adjust call to
68         gen_mem_addressof or put_var_into_stack.
69
70 2003-03-22  Nathan Sidwell  <nathan@codesourcery.com>
71
72         PR c++/9978, c++/9708
73         * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
74         * call.c (add_template_candidate_real): Adjust
75         instantiate_template call.
76         * class.c (resolve_address_of_overloaded_function): Likewise.
77         * decl.c (build_enumerator): Set TREE_CONSTANT.
78         * pt.c (check_instantiated_args): New.
79         (push_inline_template_parms_recursive): Set TREE_CONSTANT,
80         TREE_READONLY.
81         (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
82         (reduce_template_parm_level): Likewise.
83         (process_template_parm): Likewise.
84         (check_explicit_specialization): Adjust instantiate_template call.
85         (convert_template_argument): Don't check non-type argument here.
86         (lookup_template_class): Check them here.
87         (tsubst_friend_function): Adjust instantiate_template call.
88         (instantiate_template): Add tsubst_flags parameter, use it. Check
89         instantiated args.
90
91 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
92
93         * decl.c: Update calls to shadow_warning.
94
95 2003-03-21  Nathan Sidwell  <nathan@codesourcery.com>
96
97         PR c++/9898
98         * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
99         (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
100
101 2003-03-20  Mark Mitchell  <mark@codesourcery.com>
102
103         * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
104         friends.
105         * cp/pt.c (instantiate_class_template): Fix formatting.
106
107 2003-03-14  Matt Austern  <austern@apple.com>
108
109         * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
110         (unemitted_tinfo_decl_p): Remove.
111         (emit_tinfo_decl): Change declaration to remove unused parameter.
112         * decl2.c (finish_file): Change tinfo emission to loop through
113         unemitted_tinfo_decls array instead of looping through all decls.
114         * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
115         unused second parameter.
116         (init_rtti_processing): initialize unemitted_tinfo_decls varray.
117         (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
118         (emit_tinfo_decl): remove unused second parameter, add assertion
119         that decl hasn't already been emitted.
120
121 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
122
123         * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
124         type from 'int' to 'bool'. Replace 0 and 1 with true and false in
125         return statements.
126
127 2003-03-19  Jason Merrill  <jason@redhat.com>
128
129         PR c++/8316, c++/9315, c++/10136
130         * call.c (print_z_candidate): Split out from...
131         (print_z_candidiates): ...here.
132         (joust): Use it.
133
134 2003-03-17  Roger Sayle  <roger@eyesopen.com>
135
136         PR c++/10031
137         * decl.c (duplicate_decls): Use the new type when prototyping
138         anticipated decls, even when the types match.  This defines the
139         exception list for the built-in function.
140
141 2003-03-17  Jason Merrill  <jason@redhat.com>
142
143         PR c++/10091
144         * typeck.c (build_class_member_access_expr): Compare
145         TYPE_MAIN_VARIANTs.
146
147 2003-03-17  Mark Mitchell  <mark@codesourcery.com>
148
149         PR c++/9639
150         * parser.c (cp_parser_declarator_id): Clear parser->scope.
151
152 2003-03-16  Jason Merrill  <jason@redhat.com>
153
154         PR c++/9993
155         * decl.c (finish_function): Only allow the NRVO to use variables
156         declared at function scope.
157
158 2003-03-17  Andreas Jaeger  <aj@suse.de>
159
160         * Make-lang.in (cp/TAGS): Remove.
161
162 2003-03-16  Nathan Sidwell  <nathan@codesourcery.com>
163
164         PR c++/9629
165         * cp-tree.h (struct language_function): Add in_base_initializer.
166         (in_base_initializer): define it.
167         (expand_member_init): Remove INIT param.
168         * init.c (expand_member_init): Remove INIT param, return the member.
169         (emit_mem_initializers): Set in_base_initializer.
170         * class.c (build_base_path): Check in_base_initializer.
171         * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
172         * pt.c (tsubst_initializer_list): Likewise.
173
174 2003-03-16   Gabriel Dos Reis <gdr@integrable-solutions.net>
175
176         * decl.c (binding_for_name): Fix initialization thinko.
177
178 2003-03-15  Gabriel Dos Reis <gdr@integrable-solutions.net>
179
180         Compile-time improvement: 2/n.
181         * cp-tree.h (struct cxx_binding): New datatype;
182         (struct lang_identifier): Use it.
183         (LOCAL_BINDING_P): Adjust definition.
184         (INHERITED_VALUE_BINDING_P): Likewise.
185         (BINDING_SCOPE): Likewise.
186         (BINDING_HAS_LEVEL_P): Likewise.
187         (BINDING_VALUE): Likewise.
188         (BINDING_TYPE): Likewise.
189         (IDENTIFIER_VALUE): Likewise.
190         (struct tree_binding): Remove.
191         (TS_CP_BINDING): Likewise.
192         ((union lang_tree_node): Remove field "binding".
193         (cxx_binding_clear): New macro.
194         (binding_for_name): Adjust return type.
195         (qualified_lookup_using_namespace): Adjust prototype.
196         (lookup_using_namespace): Adjust prototype.
197         (cxx_scope_find_binding_for_name): Declare.
198         * cp-tree.def: Remove CPLUS_BINDING definition.
199         * decl.c (push_binding): Adjust local variable type.
200         (add_binding): Likewise.
201         (push_class_binding): Likewise.
202         (pop_binding): Likewise.
203         (poplevel): Likewise.
204         (poplevel_class): Likewise.
205         (free_bindings):  Adjust type.
206         (find_binding): Adjust return type, add a third parameter. Remove
207         non-useful assertion now that we use static typing.
208         (cxx_scope_find_binding_for_name): New function.
209         (binding_for_name): Use it.  Adjust local variable type. Simplify.
210         (namespace_binding):  Simplify.
211         (set_namespace_binding): Likewise.
212         (set_identifier_type_value_with_scope): Adjust local variable type.
213         (lookup_tag): Don't type-abuse of local variable 'old'.
214         (lookup_namespace_name): Likewise.  Allocate binding on stack.
215         (select_decl): Adjust prototype.
216         (unqualified_namespace_lookup):  Allocate binding on stack.
217         Don't type-abuse of local variable 'val'.
218         (lookup_name_real): Likewise.
219         (maybe_inject_for_scope_var): Adjust local variable type.
220         (cp_tree_node_structure): Remove CPLUS_BINDING case label.
221         (namespace_binding): Adjust logic, simplify.
222         (BINDING_LEVEL): Adjust definition.
223         (push_class_level_binding): Adjust local variable type.
224         (struct cxx_saved_binding): Adjust field 'binding' type.
225         * decl2.c (ambiguous_decl): Adjust prototype.
226         (lookup_using_namespace): Adjust local variable type.
227         (qualified_lookup_using_namespace): Catch type error and correct
228         ensueing logic error.
229         (do_nonmember_using_decl): Adjust local variable type.  Allocate
230         temporary cxx_binding on stack.
231         (do_toplevel_using_decl): Adjust local variable type.
232         * ptree.c (cxx_print_cxx_binding): New function.
233         (cxx_print_identifier): Use it.
234         (cxx_print_xnode): Delete CPLUS_BINDING case label.
235
236 2003-03-15  Roger Sayle  <roger@eyesopen.com>
237
238         * tree.c (count_functions): Fix whitespace.
239
240 2003-03-15  Neil Booth  <neil@daikokuya.co.uk>
241
242         * Make-lang.in: Update.
243
244 2003-03-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
245
246         PR c++/6440
247         * pt.c (maybe_process_partial_specialization): Handle
248         member class template when enclosing class template is
249         explicit specialized.
250         (most_general_template): Stop looking when DECL is already
251         specialized.
252
253 2003-03-13  Jason Merrill  <jason@redhat.com>
254
255         PR c++/9420
256         * search.c (lookup_conversions): Call complete_type here.
257         * call.c (implicit_conversion): Not here.
258
259 2003-03-13  Mark Mitchell  <mark@codesourcery.com>
260
261         * decl2.c (do_nonmember_using_decl): Correct handling of
262         simultaneous type/non-type bindings.
263
264         * call.c (initialize_reference): Remove bogus assertion.
265         * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
266
267 2003-03-12  Andrew Lewycky  <andrew@mxc.ca>
268
269         PR c++/7050
270         * expr.c (cxx_expand_expr): Return const0_rtx for throw
271         expressions.
272
273 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
274
275         PR c++/9474
276         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
277         to merge old and new declarations.
278
279 2003-03-12  Alexandre Oliva  <aoliva@redhat.com>
280
281         * g++.1: Remove.
282         * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
283         (cp/g++.1): Build it from scratch in the build tree.
284         (c++.install-man): Depend on it.  Install it from the build tree.
285         (c++.mostlyclean): Clean it.
286
287 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
288
289         PR c++/9474
290         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
291         to merge old and new declarations.
292
293         PR c++/9924
294         * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
295
296 2003-03-11  Jason Merrill  <jason@redhat.com>
297
298         PR c++/9820
299         * search.c (lookup_member): Fix handling of functions in a class
300         being defined.
301
302 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
303
304         PR c++/8700
305         * call.c (convert_class_to_reference): Adjust usage of
306         splice_viable.
307         (any_viable): Remove.
308         (splice_viable): Combine with any_viable.
309         (print_z_candidates): Avoid printing duplicates.
310         (build_user_type_conversion_1): Adjust usage of splice_viable.
311         (build_new_function_call): Likewise.
312         (build_operator_new_call): Likewise.
313         (build_object_call): Likewise.
314         (build_conditional_expr): Likewise.
315         (build_new_op): Likewise.
316         (build_new_method_call): Likewise.
317         (joust): Remove spurious comment.
318         * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
319         * decl2.c (arg_assoc_class): Simplify.
320         * friend.c (add_friend): Likewise.
321
322 2003-03-11  Jason Merrill  <jason@redhat.com>
323
324         PR c++/8660
325         * decl2.c (check_classfn): A member template only matches a
326         member template.
327
328 2003-03-11  Neil Booth  <neil@daikokuya.co.uk>
329
330         * Make-lang.in (CXX_C_OBJS): Update.
331         * lang-specs.h: Don't define __GNUG__ here.
332
333 2003-03-10  Mark Mitchell  <mark@codesourcery.com>
334
335         * call.c (perform_overload_resolution): New function.
336         (build_new_function_call): Use it.
337         (build_operator_new_call): Likewise.
338         (add_candidates): Add explicit_targs and template_only parameters.
339         (build_new_op): Adjust accordingly.
340         * cp-tree.h (build_operator_new_call): New function.
341         (build_function_call_real): Remove.
342         (build_function_call_maybe): Likewise.
343         * init.c (build_new_1): Use build_operator_new_call.
344         * typeck.c (build_function_call_real): Rename to ...
345         (build_function_call): ... this.
346
347 2003-03-10  Devang Patel  <dpatel@apple.com>
348
349         PR c++/9394
350         * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
351
352 2003-03-10  Jason Merrill  <jason@redhat.com>
353
354         PR c++/9798
355         * decl.c (push_using_directive): Push before recursing.
356
357         PR c++/9868, c++/9524
358         * call.c (resolve_scoped_fn_name): Handle the case of a function
359         pointer member.
360
361         * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
362         argument in the pointer-to-member case.
363
364 2003-03-09  Mark Mitchell  <mark@codesourcery.com>
365
366         PR c++/9373
367         * cp-lang.c (cxx_get_alias_set): Use alias set zero for
368         pointers to member functions.
369
370         PR c++/8534
371         * decl.c (build_ptrmemfunc_type): Do not allow default arugments
372         in pointer-to-member-function types.
373
374 2003-03-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
375
376         * expr.c (cplus_expand_constant): Use C90 prototype style.
377         (cxx_expand_expr): Likewise.
378
379 2003-03-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
380
381         PR c++/9970
382         * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
383         functions.
384
385 2003-03-08  Geoffrey Keating  <geoffk@apple.com>
386
387         * lang-specs.h (c++-header): Change .pch to .gch.
388
389 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
390
391         * cp-tree.h (cxx_init): Update prototype.
392         * lex.c (cxx_init): Similarly.
393
394 2003-03-08  Mark Mitchell  <mark@codesourcery.com>
395
396         PR c++/9823
397         * cp-tree.h (begin_mem_initializers): Remove.
398         * parser.c (cp_parser_mem_initializer_list): Inline it here.
399         Do not call finish_mem_initializers if not in a constructor.
400         (cp_parser_class_head): Fix typo in error message.
401         * semantics.c (begin_mem_initializers): Remove.
402         * testsuite/g++.dg/parser/constructor1.C: New test.
403
404         PR c++/9809
405         * call.c (add_function_candidate): Skip builtin fuctions that have
406         not yet been declared.
407
408         PR c++/9982
409         * init.c (build_new_1): Correct logic for determining whether or
410         not to use an array cookie.
411
412         PR c++/9524
413         * parser.c (cp_parser_postfix_expression): Call
414         finish_non_static_data_member, even when processing_template_decl.
415
416         PR c++/9912
417         * cp-tree.h (is_ancestor): New function.
418         (handle_class_head): Change prototype.
419         * decl2.c (is_namespace_ancestor): Rename to ...
420         (namespace_anecestor): ... this.
421         (set_decl_namespace): Adjust accordingly.
422         (handle_class_head): Remove unncessary parameters.
423         * parser.c (cp_parser_class_head): Check that
424         nested-name-specifiers are used appropriately.
425
426 2003-03-07  Mark Mitchell  <mark@codesourcery.com>
427
428         * call.c (reference_binding): Remove REF_IS_VAR parameter.
429         (implicit_conversion): Adjust call to reference_binding.
430         (make_temporary_var_for_ref_to_type): Add TYPE parameter.
431         (initialize_reference): Adjust handling for references bound to
432         rvalues.
433         * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
434         prototype.
435         (real_non_cast_lvalue_p): New method.
436         * cvt.c (build_up_reference): Adjust use of
437         make_temporary_var_for_ref_to_temp.
438         * tree.c (real_non_cast_lvalue_p): New method.
439
440 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
441
442         * except.c (init_exception_processing): Use C90 prototype style.
443         (cp_protect_cleanup_actions): Likewise.
444         (prepare_eh_type): Likewise.
445         (build_eh_type_type): Likewise.
446         (build_exc_ptr): Likewise.
447         (do_begin_catch): Likewise.
448         (dtor_nothrow): Likewise.
449         (do_end_catch): Likewise.
450         (push_eh_cleanup): Likewise.
451         (decl_is_java_type): Likewise.
452         (choose_personality_routine): Likewise.
453         (initialize_handler_parm): Likewise.
454         (expand_start_catch_block): Likewise.
455         (expand_end_catch_block): Likewise.
456         (begin_eh_spec_block): Likewise.
457         (finish_eh_spec_block): Likewise.
458         (do_allocate_exception): Likewise.
459         (do_free_exception): Likewise.
460         (wrap_cleanups_r): Likewise.
461         (stabilize_throw_expr): Likewise.
462         (build_throw): Likewise.
463         (complete_ptr_ref_or_void_ptr_p): Likewise.
464         (is_admissible_throw_operand): Likewise.
465         (nothrow_libfn_p): Likewise.
466         (can_convert_eh): Likewise.
467         (check_handlers_1): Likewise.
468         (check_handlers): Likewise.
469
470 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
471
472         * call.c (merge_conversion_sequences): New function.
473         (build_conv): Set ICS_USER_FLAG for USER_CONVs.
474         (convert_class_to_reference): Correct handling of second
475         standard conversion sequence in a user-defined conversion
476         sequence.
477         (build_user_type_conversion_1): Use merge_conversion_sequences.
478         * cp-tree.def: Add comments for CONV nodes.
479         * rtti.c (get_tinfo_decl): Use build_address/build_nop.
480
481 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
482
483         * error.c (init_error): Use C90 prototype style.
484         (dump_scope): Likewise.
485         (dump_qualifiers): Likewise.
486         (dump_template_argument): Likewise.
487         (dump_template_argument_list): Likewise.
488         (dump_template_parameter): Likewise.
489         (dump_template_bindings): Likewise.
490         (dump_type): Likewise.
491         (dump_typename): Likewise.
492         (class_key_or_enum): Likewise.
493         (dump_aggr_type): Likewise.
494         (dump_type_prefix): Likewise.
495         (dump_type_suffix): Likewise.
496         (dump_global_iord): Likewise.
497         (dump_simple_decl): Likewise.
498         (dump_decl): Likewise.
499         (dump_template_decl): Likewise.
500         (dump_function_decl): Likewise.
501         (dump_parameters): Likewise.
502         (dump_exception_spec): Likewise.
503         (dump_function_name): Likewise.
504         (dump_template_parms): Likewise.
505         (dump_char): Likewise.
506         (dump_expr_list): Likewise.
507         (dump_expr): Likewise.
508         (dump_binary_op): Likewise.
509         (dump_unary_op): Likewise.
510         (type_as_string): Likewise.
511         (expr_as_string): Likewise.
512         (decl_as_string): Likewise.
513         (context_as_string): Likewise.
514         (lang_decl_name): Likewise.
515         (cp_file_of): Likewise.
516         (cp_line_of): Likewise.
517         (decl_to_string): Likewise.
518         (expr_to_string): Likewise.
519         (fndecl_to_string): Likewise.
520         (code_to_string): Likewise.
521         (language_to_string): Likewise.
522         (parm_to_string): Likewise.
523         (op_to_string): Likewise.
524         (type_to_string): Likewise.
525         (assop_to_string): Likewise.
526         (args_to_string): Likewise.
527         (cv_to_string): Likewise.
528         (cxx_print_error_function): Likewise.
529         (cp_diagnostic_starter): Likewise.
530         (cp_diagnostic_finalizer): Likewise.
531         (cp_print_error_function): Likewise.
532         (function_category): Likewise.
533         (print_instantiation_full_context): Likewise.
534         (print_instantiation_partial_context): Likewise.
535         (maybe_print_instantiation_context): Likewise.
536         (print_instantiation_context): Likewise.
537         (cp_printer): Likewise.
538         (print_integer): Likewise.
539         (print_non_consecutive_character): Likewise.
540         (locate_error): Likewise.
541
542 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
543
544         PR c++/9965
545         * call.c (reference_binding): Add ref_is_var parameter.
546         (implicit_conversion): Adjust call to reference_binding.
547         (initialize_reference): Likewise.
548
549         PR c++/9400
550         * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
551         PARM_DECLs.
552
553         PR c++/9791
554         * class.c (get_basefndecls): Use lookup_fnfields_1.
555
556 2003-03-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
557
558         PR c++/9188
559         * parser.c (cp_parser_type_parameter): Remove redundant `expect'
560         in error message.
561         (cp_parser_single_declaration): Likewise.
562
563 2003-03-05  Jason Merrill  <jason@redhat.com>
564
565         PR c++/9440
566         * call.c (build_conditional_expr): Use convert rather than an
567         explicit NOP_EXPR.
568
569 2003-03-02  Matt Austern  <austern@apple.com>
570
571         * decl.c (cp_binding_level): Add static_decls varray member.
572         (add_decl_to_level): Add static/inline namespace scope
573         declarations to static_decls array.
574         (wrapup_global_for_namespace): Pass static_decls only, instead of
575         all decls, to wrapup_global_declarations/check_global_declarations.
576         (push_namespace): Initialize static_decls for ordinary namespaces.
577         (cxx_init_decl_processing): Initialize static_decls for global
578         namespace.
579
580 2003-03-05  Mark Mitchell  <mark@codesourcery.com>
581
582         * class.c (end_of_class): Correct thinko.
583
584 2003-03-04  Nathanael Nerode  <neroden@gcc.gnu.org>
585
586         * config-lang.in: Replace ${libstdcxx_version} by its value.
587
588 2003-03-04  Gabriel Dos Reis <gdr@integrable-solutions.net>
589
590         * cp-tree.h (cxx_saved_binding): Declare.
591         (struct saved_scope): Adjust type of field 'old_binding'.
592         * decl.c (cxx_saved_binding_make): New macro.
593         (struct cxx_saved_binding): Define.
594         (store_bindings): Adjust prototype.  Use cxx_saved_binding to save
595         C++ bindings.
596         (maybe_push_to_top_level): Adjust local variable type.
597         (pop_from_top_level): Likewise.
598
599 2003-03-04  Tom Tromey  <tromey@redhat.com>
600
601         * Make-lang.in (c++.tags): New target.
602
603 2003-03-04  Neil Booth  <neil@daikokuya.co.uk>
604
605         * Make-lang.in: Update.
606
607 2003-03-03  Jason Merrill  <jason@redhat.com>
608
609         * decl.c (finish_enum): Do set the type in a template. Simplify.
610         * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
611
612 2003-03-03  Mark Mitchell  <mark@codesourcery.com>
613
614         PR c++/9878
615         * call.c (convert_class_to_reference): Correct conversion
616         sequences.
617         (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
618         (implicit_conversion): Adjust call to reference_binding.
619         (add_candidate): Change type of candidates parameter.
620         (add_function_candidate): Likewise.
621         (add_conv_candidate): Likewise.
622         (build_builtin_candidate): Likewise.
623         (add_builtin_candidate): Likewise.
624         (add_builtin_candidates): Likewise.
625         (add_template_candidate_real): Likewise.
626         (add_template_candidate): Likewise.
627         (add_template_conv_candidate): Likewise.
628         (build_user_type_conversion_1): Adjust accordingly.
629         (build_object_call): Likewise.
630         (build_conditional_expr): Likewise.
631         (add_candidates): Likewise.
632         (build_new_op): Likewise.
633         (convert_like_real): Use USER_CONV_CAND.  Use build_nop.
634         (build_new_method_call): Adjust calls to add_function_candidate.
635         (make_temporary_var_for_ref_to_temp): New function.
636         (initialize_reference): Add decl parameter.
637         * class.c (build_rtti_vtbl_entries): Use build_address and
638         build_nop.
639         * cp-tree.h (initialize_reference): Change prototype.
640         (make_temporary_var_for_ref_to_temp): New function.
641         (build_type_conversion): Change prototype.
642         (build_address): New function.
643         (build_nop): Likewise.
644         * cvt.c (cp_convert_to_pointer): Adjust call to
645         build_type_conversion.  Avoid indicating redundant NOP_EXPRs.
646         Use build_nop.
647         (convert_to_pointer_force): Use build_nop.
648         (build_up_reference): Use make_temporary_var_for_ref_to_temp.
649         (convert_to_reference): Adjust call to build_type_conversion.
650         (ocp_convert): Likewise.
651         (build_type_conversion): Remove for_sure parameter.
652         * decl.c (grok_reference_init): Use initialize_reference.
653         * typeck.c (build_address): New function.
654         (build_nop): Likewise.
655         (build_unary_op): Use them.
656         (build_ptrmemfunc): Tidy slightly.
657         (convert_for_initialization): Adjust call to
658         initialize_reference.
659         * typeck2.c (store_init_value): Remove #if 0'd code.
660
661 2003-03-03  Jason Merrill  <jason@redhat.com>
662
663         * decl.c (start_function): Clear DECL_NUM_STMTS.
664
665         * class.c (get_vtable_decl): Use vtbl_type_node.
666         (build_primary_vtable): Check for it.
667
668 2003-03-02  Aldy Hernandez  <aldyh@redhat.com>
669
670         * decl.c (check_initializer): Check for vector_opaque_p.
671
672 2003-03-02  Ashif Harji  <asharji@uwaterloo.ca>
673
674         * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
675           invoke an external cpp during compilation.
676
677 2003-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
678
679         * decl.c (duplicate_decls): Convert use of warning_with_decl() to
680         that of warning().
681         (start_decl): Likewise.
682         (start_function): Likewise.
683
684 2003-03-01  Neil Booth  <neil@daikokuya.co.uk>
685
686         * Make-lang.in (CXX_C_OBJS): Update.
687
688 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
689
690         PR c++/9892
691         * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
692         instantiating it.
693
694 2003-02-28  Aldy Hernandez  <aldyh@redhat.com>
695
696         * parser.c (cp_parser_init_declarator): Revert opaque
697         vector_opaque_p change.
698         Do not include target.h.
699
700 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
701
702         PR c++/9879
703         * cp-tree.h (build_zero_init): Add parameter.
704         * decl.c (cp_finish_decl): Adjust call.
705         * init.c (build_zero_init): Add nelts parameter.  Adjust recursive
706         calls.
707         (build_default_init): Add nelts parameter.  Adjust calls to
708         build_zero_init.
709         (build_new_1): Adjust call to build_default_init.
710         * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
711
712 2003-02-26  Devang Patel  <dpatel@apple.com>
713
714         * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
715         required.  Postpone enum setting for template decls.
716         (build_enumerator): Delay copying value node until finish_enum
717         (). Remove #if 0'ed code.
718         * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
719         (tsubst_copy): Add check for enum type.
720
721 2003-02-25  Mark Mitchell  <mark@codesourcery.com>
722
723         PR c++/9683
724         * decl2.c (prune_vars_needing_no_initialization): Do not throw
725         away initializations for DECL_EXTERNAL VAR_DECLs.
726         (finish_file): Adjust accordingly.
727         * pt.c (instantiate_decl): Do not defer VAR_DECLs.
728
729 2003-02-24 Gabriel Dos Reis  <gdr@integrable-solutions.net>
730
731         * decl.c (add_binding): Time TV_NAME_LOOKUP.
732         (push_class_binding): Likewise.
733         (set_namespace_binding): Likewise.
734
735 2003-02-24  Mark Mitchell  <mark@codesourcery.com>
736
737         PR c++/9836
738         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
739         specializations back to the main template.
740         * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
741         * pt.c (resolve_typename_type): Likewise.
742
743 2003-02-24  Jeffrey D. Oldham  <oldham@codesourcery.com>
744
745         PR c++/9778
746         * pt.c (tsubst_copy_and_build): For a templated function inside a
747         scope, process template arguments.
748
749 2003-02-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
750
751         PR c++/9602
752         * typeck2.c (abstract_virtuals_error): Don't check when
753         TYPE is still template parameter dependent.
754
755 2003-02-23  Mark Mitchell  <mark@codesourcery.com>
756
757         PR c++/5333
758         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
759         * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
760         * pt.c (instantiate_class_template): Don't try to instantiate
761         dependent types.
762         (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
763
764 2003-02-21  Mark Mitchell  <mark@codesourcery.com>
765
766         PR c++/9749
767         * decl.c (grokdeclarator): Do not allow parameters with variably
768         modified types.
769
770 2003-02-21  Nathan Sidwell  <nathan@codesourcery.com>
771
772         * search.c (grow_bfs_bases): Remove. Fold into ...
773         (bfs_walk): ... here, fix fencepost error. Fix merge lossage
774         in previous patch.
775
776 2003-02-20  Mark Mitchell  <mark@codesourcery.com>
777
778         PR c++/9729
779         * mangle.c (mangle_conv_op_name_for_type): Issue an error message
780         when the G++ 3.2 ABI prevents correct compilation.
781
782 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
783
784         Change base class access representation. Share virtual base
785         binfos.
786         * cp/call.c (build_special_member_call): Remove binfo_for_vbase
787         call.
788         * cp/class.c (build_base_path): Likewise.
789         (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
790         (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
791         (make_new_vtable): Adjust.
792         (force_canonical_binfo_r): Delete.
793         (force_canonical_binfo): Delete.
794         (mark_primary_virtual_base): Delete.
795         (dfs_unshared_virtual_bases): Delete.
796         (mark_primary_bases): Adjust.
797         (maybe_warn_about_overly_private_class): Adjust.
798         (dfs_base_derived_from): Delete.
799         (base_derived_from): Follow the inheritance chain.
800         (struct find_final_overrider_data): Add vpath member.
801         (dfs_find_final_overrider): Adjust.
802         (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
803         (find_final_overrider): Adjust.
804         (update_vtable_entry_for_fn): Adjust.
805         (modify_all_vtables): Adjust.
806         (walk_subobject_offsets): Adjust.
807         (layout_nonempty_base_or_field): Adjust.
808         (layout_empty_base): Remove last parameter. Adjust.
809         (build_base_field): Adjust.
810         (build_base_fields): Adjust.
811         (propagate_binfo_offsets): Remove last parameter. Adjust.
812         (dfs_set_offset_for_unshared_vbases): Delete.
813         (layout_virtual_bases): Adjust.
814         (finish_struct_1): Adjust.
815         (init_class_processing): Don't init access nodes.
816         (dfs_get_primary_binfo): Delete.
817         (get_primary_binfo): Adjust.
818         (dump_class_hierarchy_r): Remove most derived arg, add IGO
819         parameter. Adjust.
820         (dump_class_hierarchy): Adjust.
821         (finish_vtbls): Adjust.
822         (get_original_base): Delete.
823         (build_vtt_inits): Adjust.
824         (dfs_build_secondary_vptr_vtt_inits): Adjust.
825         (dfs_ctor_vtable_bases_queue_p): Adjust.
826         (build_ctor_vtbl_group): Adjust.
827         (dfs_accumulate_vtbl_inits): Adjust.
828         (build_vtbl_initializer): Adjust.
829         (build_vbase_offset_vtbl_entries): Adjust.
830         (add_vcall_offset_vtbl_entries_1): Adjust.
831         * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
832         (access_*_node): Remove.
833         (CANONICAL_BINFO): Delete.
834         (BINFO_UNSHARED_MARKED): Remove.
835         (BINFO_MARKED): Set LANG_FLAG_0 directly.
836         (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
837         (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
838         (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
839         Delete.
840         (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
841         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
842         (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
843         Delete.
844         (BINFO_DEPENDENT_BASE_P): New.
845         (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
846         index.
847         (markedp, unmarkedp): Adjust.
848         (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
849         dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
850         find_vbase_instance, binfo_for_vbase): Delete.
851         (copied_binfo, original_binfo): Declare.
852         (finish_base_specifier): Add virtual_p arg.
853         (unshare_base_binfos): Delete.
854         (copy_base_binfos): Declare.
855         (reverse_path): Delete.
856         * cp/decl.c (xref_basetypes): Access and virtuality passed
857         differently. Don't copy direct base binfos here. Call
858         copy_base_binfos.
859         * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
860         (initialize_vtbl_ptrs): Adjust.
861         (expand_member_init): Adjust.
862         * cp/parser.c (cp_parser_base_specifier): Adjust.
863         * cp/pt.c (instantiate_class_template): Adjust.
864         (get_template_base_recursive): Adjust.
865         * cp/rtti.c (get_pseudo_ti_init): Adjust.
866         (get_pseudo_ti_desc): Adjust.
867         * cp/tree.c (unshare_base_binfos): Rename to ...
868         (copy_base_binfos): ... here, reimplement.
869         (make_binfo): Set BINFO_DEPENDENT_BASE_P.
870         (reverse_path): Remove.
871         * cp/typeck.c (get_delta_difference): Adjust error messages.
872         * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
873         * cp/search.c (lookup_base_r): Adjust.
874         (dynamic_cast_base_recurse): Adjust.
875         (canonical_binfo): Remove.
876         (dfs_canonical_queue): Remove.
877         (dfs_assert_unmarked_p): Remove.
878         (assert_canonical_unmarked): Remove.
879         (shared_marked_p, shared_unmarked_p): Remove.
880         (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
881         (dfs_access_in_type): Adjust.
882         (access_in_type): Adjust.
883         (dfs_accessible_queue_p): Adjust.
884         (dfs_accessible_p): Adjust.
885         (is_subobject_of_p_1, is_subobject_of_p): Remove.
886         (struct lookup_field_info): Remove from_dep_base_p field.
887         (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
888         (lookup_field_r): Remove dependent base code.
889         (lookup_member): Likewise.
890         (dfs_walk, dfs_walk_real): Add access arg to queue fn.
891         (dfs_unmarked_real_bases_queue_p): Remove.
892         (dfs_marked_real_bases_queue_p): Remove.
893         (dfs_skip_vbases): Remove.
894         (dfs_get_pure_virtuals): Adjust.
895         (markedp, unmarkedp): Adjust.
896         (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
897         (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
898         (dfs_unmark): Adjust.
899         (dfs_get_vbase_types):Remove.
900         (dfs_build_inheritance_graph_order): Remove.
901         (get_vbase_types): Remove
902         (dfs_find_vbase_instance): Remove.
903         (find_vbase_instance): Remove.
904         (dfs_debug_unmarkedp): Adjust.
905         (dependent_base_p): Remove.
906         (dfs_push_type_decls): Adjust.
907         (dfs_push_decls): Adjust.
908         (dfs_no_overlap_yet): Adjust.
909         (copied_binfo): New function.
910         (original_binfo): New function.
911         (binfo_for_vbase): Remove.
912
913 2003-02-18  Zack Weinberg  <zack@codesourcery.com>
914
915         * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
916         (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
917         vectors, for speed.
918
919 2003-02-18  Mark Mitchell  <mark@codesourcery.com>
920
921         PR c++/9704
922         * class.c (layout_class_type): In the 3.2 ABI, take into account
923         trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
924
925 2003-02-18  Matt Austern <austern@apple.com>
926
927         * cp/cp-lang.c: Change lang hooks so that final_write_globals does
928         nothing for C++.
929         * cp/decl.c (wrapup_globals_for_namespace): Remove special
930         handling of global namespace.
931
932 2003-02-18  Geoffrey Keating  <geoffk@apple.com>
933
934         * cp-tree.h (rid_to_yy): Delete.
935         (C_RID_YYCODE): Delete.
936         (finish_file): Delete redundant declaration.
937
938 2003-02-18  Jason Merrill  <jason@redhat.com>
939
940         PR c++/9623
941         * decl.c (reshape_init): Don't mess with initializer labels.
942
943         PR c++/9485
944         * parser.c (cp_parser_postfix_expression): Set idk properly for
945         object->scope::member.
946
947 2003-02-18  Ben Elliston  <bje@redhat.com>
948
949         PR other/7350
950         * decl.c (duplicate_decls): Fix typo in comment.
951
952 2003-02-17  Michael Elizabeth Chastain <mec@shout.net>
953
954         PR debug/9717
955         * class.c (build_base_field): Mark fields for base classes with
956         DECL_IGNORED_P.
957
958 2003-02-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
959
960         PR c++/9457
961         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
962         CONSTRUCTOR_ELTS only once.
963
964 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
965
966         PR c++/9459
967         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
968         (dump_type_suffix): Likewise.
969
970 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
971
972         * search.c: ANSIfy function declarations and definitions.
973         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
974         * call.c (build_method_call, resolve_scoped_fn_name,
975         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
976         calls.
977         * class.c (handle_using_decl): Likewise.
978         * decl.c (make_typename_type, make_unmound_class_template,
979         start_decl, compute_array_index_type): Likewise.
980         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
981         * init.c (expand_member_init, build_member_call): Likewise.
982         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
983         resolve_typename_type): Likewise.
984         * typeck.c (lookup_destructor, finish_class_member_access_exprm
985         build_prememfunc_access_expr): Likewise.
986
987 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
988
989         * decl2.c: Include "timevar.h".
990         (namespace_ancestor): Time name lookup.
991         (add_using_namespace): Likewise.
992         (lookup_using_namespace): Likewise.
993         (qualified_lookup_using_namespace): Likewise.
994         (decl_namespace): Likewise.
995         (lookup_arg_dependent): Likewise.
996         * lex.c (do_identifier): Likewise.
997         (do_scoped_id): Likewise.
998         * pt.c (lookup_template_class): Likewise.
999
1000 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
1001
1002         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
1003
1004 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1005
1006         * decl.c: Include "timevar.h".
1007         (poplevel): Time name lookup.
1008         (find_binding): Likewise.
1009         (push_namespace): Likewise.
1010         (pop_nested_namespace): Likewise.
1011         (store_bindings): Likewise.
1012         (maybe_push_to_top_level): Likewise.
1013         (pop_from_top_level): Likewise.
1014         (push_local_name): Likewise.
1015         (pushtag): Likewise.
1016         (pushdecl): Likewise.
1017         (pushdecl_with_scope): Likewise.
1018         (pushdecl_namespace_level): Likewise.
1019         (pushdecl_top_level): Likewise.
1020         (pushdecl_class_level): Likewise.
1021         (push_class_level_binding): Likewise.
1022         (push_using_decl): Likewise.
1023         (push_using_directive): Likewise.
1024         (push_overloaded_decl): Likewise.
1025         (lookup_label): Likewise.
1026         (define_label): Likewise.
1027         (lookup_tag): Likewise.
1028         (lookup_tag_reverse): Likewise.
1029         (lookup_namespace_name): Likewise.
1030         (select_decl): Likewise.
1031         (unqualified_namespace_lookup): Likewise.
1032         (lookup_name_real): Likewise.
1033         (lookup_name_current_level): Likewise.
1034         (lookup_type_current_level): Likewise.
1035         (maybe_inject_for_scope_var): Likewise.
1036         (xref_tag): Likewise.
1037
1038         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
1039
1040 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
1041
1042         * decl.c (build_enumerator):  Remove unneeded test.
1043
1044 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
1045
1046         * cp-tree.h (struct lang_type_header): Make all fields unsigned
1047         char.
1048
1049 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
1050
1051         PR c++/7129
1052         * call.c (z_candidate): Add args.
1053         (convert_class_to_reference): Set it.
1054         (implicit_conversion): Tidy.
1055         (add_candidate): Add args parameter.
1056         (add_function_candidate): Adjust call to add_candidate.
1057         (add_conv_candidate): Likewise.
1058         (build_builtin_candidate): Likewise.
1059         (build_user_type_conversion_1): Eliminate wasteful tree_cons
1060         usage.
1061         (build_new_function_call): Likewise.
1062         (build_object_call): Likewise.
1063         (add_candidates): New function.
1064         (build_new_op): Use it.
1065         (covert_like_real): Adjust call to build_over_call.
1066         (build_over_call): Remove args parameter.
1067         * operators.def: Add <?= and >?=.
1068
1069 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
1070
1071         * typeck.c (build_indirect_ref): Don't check flag_volatile.
1072
1073 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1074
1075         PR c++/8849
1076         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
1077
1078 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
1079
1080         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
1081         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
1082         (BINFO_LANG_ELTS): New #define.
1083         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
1084
1085 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
1086
1087         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
1088
1089 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
1090
1091         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
1092         for class types.
1093         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
1094         rather than TYPE_LANG_FLAG_0.
1095         (TYPE_BUILT_IN): Remove.
1096         (TYPE_DEPENDENT_P): New macro.
1097         (TYPE_DEPENDENT_P_VALID): Likewise.
1098         (lang_type_class): Add fields_readonly.
1099         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
1100         * pt.c (dependent_type_p_r): New function, split out from ...
1101         (dependent_type_p): ... here.  Memoize results.
1102         * search.c (dependent_base_p): Use dependent_type_p, not
1103         uses_template_parms.
1104         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
1105         for class types.
1106
1107 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
1108
1109         * call.c (build_field_call): Use build_new_op, not build_opfncall.
1110         (prep_operand): New function.
1111         (build_new_op): Use it.  Remove dead code.
1112         * class.c (pushclass): Change "modify" parameter type from int to
1113         bool.
1114         (currently_open_class): Use same_type_p, not pointer equality.
1115         (push_nested_class): Adjust calls to pushclass, remove modify
1116         parameter.
1117         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
1118         (pushclass): Change prototype.
1119         (push_nested_class): Likewise.
1120         (grokoptypename): Remove.
1121         (build_opfncall): Remove.
1122         (value_dependent_expression_p): Declare.
1123         (resolve_typename_type): Likewise.
1124         (resolve_typename_type_in_current_instantiation): Likewise.
1125         (enter_scope_of): Remove.
1126         (tsubst): Remove.
1127         (tsubst_expr): Likewise.
1128         (tsubst_copy): Likewise.
1129         (tsubst_copy_and_build): Likewise.
1130         * decl.c (warn_about_implicit_typename_lookup): Remove.
1131         (finish_case_label): Return error_mark_node for erroneous labels.
1132         (start_decl): Adjust calls to push_nested_class.
1133         (grokfndecl): Call push_scope/pop_scope around call to
1134         duplicate_decls.
1135         (grokdeclarator): Do not call tsubst.
1136         (start_function): Adjust calls to push_nested_class.
1137         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
1138         (check_classfn): Use push_scope/pop_scope around type comparisions.
1139         (grokoptypename): Remove.
1140         (push_sscope): Adjust call to push_nested_class.
1141         * error.c (dump_type): Show cv-qualification of typename types.
1142         * init.c (build_member_call): Use build_new_op, not
1143         build_opfncall.
1144         * method.c (build_opfncall): Remove.
1145         * parser.c (cp_parser): Add allow_non_constant_expression_p and
1146         non_constant_expression_p.
1147         (cp_parser_constant_expression): Adjust prototype.
1148         (cp_parser_resolve_typename_type): Remove.
1149         (cp_parser_non_constant_expression): New function.
1150         (cp_parser_non_constant_id_expression): Likewise.
1151         (cp_parser_new): Set allow_non_constant_expression_p and
1152         non_constant_expression_p.
1153         (cp_parser_primary_expression): Reject `this' and `va_arg' in
1154         constant-expressions.  Note that dependent names aren't really
1155         constant.
1156         (cp_parser_postfix_expression): Reject conversions to non-integral
1157         types in constant-expressions.  Neither are increments or
1158         decrements.
1159         (cp_parser_unary_expression): Reject increments and decrements in
1160         constant-expressions.
1161         (cp_parser_direct_new_declarator): Adjust call to
1162         cp_parser_constant_expression.
1163         (cp_parser_cast_expression): Reject conversions to non-integral
1164         types in constant-expressions.
1165         (cp_parser_assignment_expression): Rejects assignments in
1166         constant-expressions.
1167         (cp_parser_expression): Reject commas in constant-expressions.
1168         (cp_parser_labeled_statement): Adjust call to
1169         cp_parser_constant_expression.
1170         (cp_parser_direct_declarator): Simplify array bounds, even in
1171         templates, when they are non-dependent.  Use
1172         resolve_typename_type, not cp_parser_resolve_typename_type.
1173         (cp_parser_class_head): Use resolve_typename_type, not
1174         cp_parser_resolve_typename_type.
1175         (cp_parser_member_declaration): Adjust call to
1176         cp_parser_constant_expression.
1177         (cp_parser_constant_initializer): Likewise.
1178         (cp_parser_constructor_declarator): Use resolve_typename_type, not
1179         cp_parser_resolve_typename_type.
1180         (cp_parser_late_parsing_default_args): Adjust call to
1181         push_nested_class.
1182         * pt.c (tsubst): Give it internal linkage.
1183         (tsubst_expr): Likewise.
1184         (tsubst_copy): Likewise.
1185         (tsubst_copy_and_build): Likewise.
1186         (push_access_scope_real): Likewise.
1187         (tsubst_friend_class): Likewise.
1188         (instantiate_class_template): Adjust call to pushclass.
1189         (value_dependent_expression_p): Give it external linkage.
1190         Robustify.
1191         (resolve_typename_type): New function.
1192         * semantics.c (finish_call_expr): Use build_new_op, not
1193         build_opfncall.
1194         (begin_constructor_declarator): Remove.
1195         (begin_class_definition): Adjust call to pushclass.
1196         (enter_scope_of): Remove.
1197         * typeck.c (comptypes): Resolve typename types as appropriate.
1198         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
1199         (build_x_compound_expr): Likewise.
1200         (build_modify_expr): Likewise.
1201         (build_x_modify_expr): Likewise.
1202         * typeck2.c (build_x_arrow): Likewise.
1203
1204 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
1205
1206         * pt.c (last_pending_template) Declare GTY().
1207
1208 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1209
1210         PR c++/8591
1211         * parser.c (cp_parser_elaborated_type_specifier): Convert
1212         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
1213         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
1214
1215 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
1216
1217         PR c++/9437
1218         * pt.c (unify): Don't unify '*T' with 'U C::*'.
1219
1220         PR c++/3902
1221         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
1222         inside a declarator.
1223
1224 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
1225
1226         * class.c (update_vtable_entry_for_fn): Add index parameter.
1227         Generate vcall thunk for covariant overriding from a virtual
1228         primary base.
1229         (dfs_modify_vtables): Adjust.
1230
1231 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
1232
1233         PR c++/9403
1234         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
1235         template keyword.
1236         (cp_parser_base_specifier): Look for and consume a
1237         TEMPLATE keyword. Replace switch with array index.
1238
1239         PR c++/795
1240         * semantics.c (finish_non_static_data_member): Remember the
1241         field's type even in a template.
1242
1243         PR c++/9415
1244         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
1245         already scoped.
1246
1247         PR c++/8545
1248         * parser.c (cp_parser_cast_expression): Be more tentative.
1249
1250 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1251
1252         * cp-tree.h (flagged_type_tree_s): Remove.
1253         (check_for_new_type): Likewise.
1254         * typeck2.c (check_for_new_type): Likewise.
1255
1256 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
1257
1258         * dump.c: ANSIfy function declarations and definitions.
1259
1260         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
1261
1262 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
1263
1264         PR c++/9354
1265         * init.c (build_new): Set the type of the new-expression, even
1266         when processing_templte_decl.
1267
1268         PR c++/9216
1269         * parser.c (cp_parser_primary_expression): Improve error message
1270         for templates used in an expression context.
1271
1272         PR c++/8696
1273         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
1274         parse when encountering "typedef".
1275
1276 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
1277
1278         * class.c, parser.c: ANSIfy function definitions and declarations.
1279
1280 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
1281
1282         PR c++/9328
1283         * error.c (dump_decl): For an OVERLOAD, just print the name of the
1284         function; it doesn't make sense to try to print its type.
1285         * semantics.c (finish_typeof): Issue errors about invalid uses.
1286
1287         PR c++/9298
1288         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
1289         function.
1290         (cp_parser_expression_statement): Use it.
1291         (cp_parser_explicit_instantiation): Likewise.
1292         * pt.c (do_decl_instantiation): Improve error handling logic.
1293
1294 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
1295
1296         PR c++/9384
1297         * parser.c (cp_parser_using_declaration): Issue error messages
1298         about name resolution failures here.
1299
1300         PR c++/9388
1301         * class.c (currently_open_derived_class): Use dependent_type_p.
1302         * cp-tree.h (dependent_type_p): New function.
1303         (dependent_template_arg_p): Likewise.
1304         (dependent_template_p): Likewise.
1305         (type_dependent_expression_p): Likewise.
1306         * parser.c (cp_parser_dependent_type_p): Remove.
1307         (cp_parser_value_dependent_type_p): Likewise.
1308         (cp_parser_type_dependent_expression_p): Likewise.
1309         (cp_parser_dependent_template_arg_p): Likewise.
1310         (cp_parser_dependent_template_id_p): Likewise.
1311         (cp_parser_dependent_template_p): Likewise.
1312         (cp_parser_diagnose_invalid_type_name): Replace
1313         cp_parser_dependent_type_p with dependent_type_p, etc.
1314         (cp_parser_primary_expresion): Likewise.
1315         (cp_parser_nested_name_specifier_opt): Likewise.
1316         (cp_parser_postfix_expression): Likewise.
1317         (cp_parser_unary_expression): Likewise.
1318         (cp_parser_template_name): Likewise.
1319         (cp_parser_class_name): Likewise.
1320         (cp_parser_lookup_name): Likewise.
1321         * pt.c (dependent_type_p): New function.
1322         (value_dependent_expression_p): Likewise.
1323         (type_dependent_expression_p): Likewise.
1324         (dependent_template_arg_p): Likewise.
1325         (dependent_template_id_p): Likewise.
1326         (dependent_template_p): Likewise.
1327
1328         PR c++/9285
1329         PR c++/9294
1330         * parser.c (cp_parser_simple_declaration): Return quickly when
1331         encountering errors.
1332
1333 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1334
1335         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
1336
1337 2003-01-17  Jason Merrill  <jason@redhat.com>
1338
1339         PR c++/9167, c++/9358
1340         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
1341
1342 2003-01-17  Jason Merrill  <jason@redhat.com>
1343
1344         PR c++/9342
1345         * call.c (build_conditional_expr): Always do lvalue-rvalue
1346         conversion.
1347
1348 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
1349
1350         PR c++/9294
1351         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
1352         * cp-tree.h (BASELINK_BINFO): Adjust.
1353         (BASELINK_FUNCTIONS): Likewise.
1354         (BASELINK_ACCESS_BINFO): Likewise.
1355         (tree_baselink): New structure.
1356         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
1357         (lang_tree_node): Add baselink.
1358         * decl.c (cp_tree_node_structure): Add BASELINK case.
1359         * search.c (build_baselink): Adjust.
1360         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
1361         test from TREE_LIST case.
1362
1363         PR c++/9272
1364         * parser.c (cp_parser_constructor_declarator_p): Do not assume
1365         that a constructor cannot be declared outside of its own class.
1366
1367         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
1368         be resolved, neither can the qualified name.
1369
1370         * rtti.c (get_pseudo_ti_desc): Fix thinko.
1371
1372 2003-01-16  Jason Merrill  <jason@redhat.com>
1373
1374         PR c++/8564
1375         * init.c (build_vec_init): Re-add maxindex parm.
1376         (perform_member_init, build_aggr_init): Pass it.
1377         (build_new_1): Pass it. Use an incomplete array type for full_type.
1378         * typeck.c (build_modify_expr): Pass it.
1379         * cp-tree.h: Adjust.
1380
1381 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
1382
1383         * cp-tree.h (tsubst_copy_and_build): New declaration.
1384         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
1385         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
1386         (tsubst_copy_and_build): New function.
1387
1388 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
1389
1390         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
1391         (PARTIAL_INSTANTIATION_P): Remove.
1392         (IMPLICIT_TYPENAME_P): Likewise.
1393         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
1394         (build_typename_type): Remove declaration.
1395         (parmlist_is_exprlist): Likewise.
1396         * decl.c (build_typename_type): Make it static, remove third
1397         parameter.
1398         (push_class_binding): Don't do implicit typename stuff.
1399         (make_typename_type): Likewise.
1400         (lookup_name_real): Likewise.
1401         (grokdeclarator): Don't try to convert declarations into
1402         initializations.  Don't do implicit typename stuff.
1403         (parmlist_is_exprlist): Remove.
1404         (xref_basetypes): Simplify.
1405         * decl2.c (grokfield): Don't try to convert declarations into
1406         initializations.
1407         (build_anon_union_vars): Do this while processing templates, too.
1408         (finish_anon_union): Likewise.
1409         * error.c (dump_type): Remove implicit typename handling.
1410         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
1411         (cp_parser_primary_expression): Correct handling of names not
1412         found by unqualified name lookup in templates.
1413         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
1414         of types when possible.
1415         (cp_parser_simple_declaration): Complain intelligently about some
1416         invalid declarations.
1417         (cp_parser_member_declaration): Likewise.
1418         (cp_parser_constructor_declarator_p): Don't check when we're in a
1419         function scope.
1420         * pt.c (instantiate_class_template): Remove
1421         PARTIAL_INSTANTIATION_P gunk.
1422         * search.c (lookup_field_r): Don't build implicit typenames.
1423         (marked_pushdecls_p): Don't enter dependent base types.
1424         (unmarked_pushdecls_p): Likewise.
1425         * semantics.c (begin_class_definition): Remove implicit typename
1426         stuff.
1427
1428 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
1429
1430         PR c++/9212
1431         * parser.c (cp_parser_direct_declarator): If accepting either
1432         abstract or named, the name must be an unqualified-id.
1433
1434 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1435
1436         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
1437
1438 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1439
1440         * decl2.c (check_classfn): Fix uninitialized warning.
1441         (build_anon_union_vars): Likewise.
1442         * pt.c (tsubst_copy): Likewise.
1443
1444 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
1445
1446         Further conform g++'s __vmi_class_type_info to the C++ ABI
1447         specification.
1448         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
1449         the specification.
1450         (class_hint_flags): Likewise.
1451
1452 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1453
1454         * config-lang.in: Add semantics.c to gtfiles.
1455         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
1456         (saved_scope): Likewise.
1457         (type_lookups): Remove.
1458         (deferred_access): New structure.
1459         (type_access_control): Remove.
1460         (save_type_access_control): Likewise.
1461         (reset_type_access_control): Likewise.
1462         (decl_type_access_control): Likewise.
1463         (push_deferring_access_checks): Declare.
1464         (resume_deferring_access_checks): Likewise.
1465         (stop_deferring_access_checks): Likewise.
1466         (pop_deferring_access_checks): Likewise.
1467         (get_deferred_access_checks): Likewise.
1468         (pop_to_parent_deferring_access_checks): Likewise.
1469         (perform_deferred_access_checks): Likewise.
1470         (perform_or_defer_access_check): Likewise.
1471         * decl.c (make_typename_type): Use perform_or_defer_access_check.
1472         (make_unbound_class_template): Likewise.
1473         (grokdeclarator): Don't call decl_type_access_control.
1474         * parser.c (cp_parser_context): Remove deferred_access_checks
1475         and deferring_access_checks_p fields.
1476         (cp_parser_context_new): Adjust.
1477         (cp_parser): Remove access_checks_lists.
1478         (cp_parser_defer_access_check): Remove.
1479         (cp_parser_start_deferring_access_checks): Remove.
1480         (cp_parser_stop_deferring_access_checks): Remove.
1481         (cp_parser_perform_deferred_access_checks): Remove.
1482         (cp_parser_nested_name_specifier_opt): Use new deferred access
1483         functions.
1484         (cp_parser_simple_declaration): Likewise.
1485         (cp_parser_template_id): Likewise.
1486         (cp_parser_function_definition): Likewise.
1487         (cp_parser_class_specifier): Likewise.
1488         (cp_parser_lookup_name): Likewise.
1489         (cp_parser_single_declaration): Likewise.
1490         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
1491         (cp_parser_parse_tentatively): Likewise.
1492         (cp_parser_parse_definitely): Likewise.
1493         (yyparse): Likewise.
1494         (cp_parser_init_declarator): Remove access_checks parameter.
1495         Use new deferred access functions.
1496         (cp_parser_function_definition_from_specifiers_and_declarator):
1497         Likewise.
1498         (cp_parser_class_head): Remove deferring_access_checks_p and
1499         saved_access_checks parameters.  Use new deferred access functions.
1500         (cp_parser_member_specification_opt): Don't call
1501         reset_type_access_control.
1502         * search.c (type_access_control): Remove.
1503         * semantics.c: Include "gt-cp-semantics.h".
1504         (deferred_type_access_control): Remove.
1505         (deferred_access_stack): New variable.
1506         (deferred_access_free_list): Likewise.
1507         (push_deferring_access_checks): New function.
1508         (resume_deferring_access_checks): Likewise.
1509         (stop_deferring_access_checks): Likewise.
1510         (pop_deferring_access_checks): Likewise.
1511         (get_deferred_access_checks): Likewise.
1512         (pop_to_parent_deferring_access_checks): Likewise.
1513         (perform_deferred_access_checks): New function, adapted from
1514         cp_parser_perform_deferred_access_checks.
1515         (perform_or_defer_access_check): New function, adapted from
1516         cp_parser_defer_access_check.
1517         (current_type_lookups): Remove.
1518         (deferred_type_access_control): Likewise.
1519         (decl_type_access_control): Likewise.
1520         (save_type_access_control): Likewise.
1521         (reset_type_access_control): Likewise.
1522         (begin_function_definition): Adjust.
1523         (begin_class_definiton): Likewise.
1524
1525 2003-01-13  Jason Merrill  <jason@redhat.com>
1526
1527         PR c++/8748
1528         * class.c (build_base_path): Take the address before calling save_expr.
1529
1530         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
1531         all the ambiguous conversions are bad.
1532
1533         * class.c (maybe_warn_about_overly_private_class): Don't stop
1534         searching when we find a nonprivate method.
1535
1536         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
1537
1538 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
1539
1540         * cp-tree.h (get_arglist_len_in_bytes): Remove.
1541
1542         PR c++/9264
1543         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
1544         typeame types more robustly.
1545
1546 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
1547
1548         * parser.c:  Fix comment typos.
1549
1550 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
1551
1552         PR c++/9099
1553         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
1554         an object_type which is not a class type.
1555
1556 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
1557
1558         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
1559         (cp_parser_late_parsing_default_args): Likewise.
1560
1561 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
1562
1563         * cfns.gperf: ANSIfy function declarations.
1564         * cfns.h: Regenerate.
1565         * cp-tree.h: ANSIfy function declarations.
1566
1567 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
1568
1569         * cp-tree.h (reparse_absdcl_as_expr): Remove.
1570         (reparse_absdcl_as_casts): Likewise.
1571         (reparse_decl_as_expr): Likewise.
1572         (finish_decl_parsing): Likewise.
1573         * decl2.c (reparse_absdcl_as_expr): Remove.
1574         (reparse_absdcl_as_casts): Likewise.
1575         (repase_decl_as_expr): Likewise.
1576         (finish_decl_parsing): Likewise.
1577
1578         PR c++/9128
1579         PR c++/9153
1580         PR c++/9171
1581         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
1582         function.
1583         (cp_parser_nested_name_specifier_opt): Correct the
1584         check_dependency_p false.
1585         (cp_parser_postfix_expression): Fix formatting.
1586         (cp_parser_decl_specifier_seq): Avoid looking for constructor
1587         declarators when possible.
1588         (cp_parser_template_id): Avoid performing name-lookup when
1589         possible.
1590         (cp_parser_class_head): Do not count specializations when counting
1591         levels of templates.
1592         (cp_parser_constructor_declarator_p): Return immediately if
1593         there's no chance that the tokens form a constructor declarator.
1594         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
1595         expression with reference type.
1596         (get_tinfo_decl_dynamic): Do not return an expression with
1597         reference type.
1598         (build_typeid): Add comment.  Do not return an expression with
1599         reference type.
1600         * typeck.c (build_class_member_access_expr): Improve handling of
1601         conditionals and comma-expressions as objects.
1602
1603 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
1604
1605         * cfns.gperf: ANSIfy function declarations.
1606         * cfns.h: Regenerate.
1607         * cp-tree.h: ANSIfy function declarations.
1608         * parser.c: ANSIfy function declarations & definitions.
1609
1610         * decl.c (bad_specifiers): Fix parameter order error I introduced.
1611
1612 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
1613
1614         Merge from pch-branch:
1615
1616         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
1617
1618         Merge to tag pch-merge-20030102:
1619
1620         * semantics.c (finish_translation_unit): Don't call finish_file.
1621         * parser.c: Don't include ggc.h.
1622         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
1623         read first token here.  Don't allow PCH files after the first
1624         token is read.
1625         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
1626         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
1627         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
1628         (cp_parser_late_parsing_for_member): Don't duplicate call to
1629         cp_lexer_set_source_position_from_token.
1630         (cp_parser_late_parsing_default_args): Likewise.
1631         (yyparse): Call finish_file after clearing the_parser.
1632
1633         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
1634
1635         * Make-lang.in: Remove $(GGC_H) from all dependencies.
1636         (CXX_TREE_H): Add $(GGC_H).
1637         * class.c: Don't include ggc.h.
1638         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
1639         (method_name_cmp): Likewise.
1640         (resort_data): New variable.
1641         (resort_field_decl_cmp): New.
1642         (resort_method_name_cmp): New.
1643         (resort_sorted_fields): New.
1644         (resort_type_method_vec): New.
1645         (finish_struct_methods): Delete cast.
1646         (finish_struct_1): Delete cast.
1647         * cp-tree.h: Include ggc.h.
1648         (struct lang_type_class): Add reorder attribute to field `methods'.
1649         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
1650         (resort_sorted_fields): New prototype.
1651         (resort_type_method_vec): New prototype.
1652         * call.c: Don't include ggc.h.
1653         * decl.c: Likewise.
1654         * decl2.c: Likewise.
1655         * init.c: Likewise.
1656         * lex.c: Likewise.
1657         * method.c: Likewise.
1658         * optimize.c: Likewise.
1659         * parse.y: Likewise.
1660         * pt.c: Likewise.
1661         * repo.c: Likewise.
1662         * search.c: Likewise.
1663         * semantics.c: Likewise.
1664         * spew.c: Likewise.
1665         * tree.c: Likewise.
1666
1667         * lang-specs.h: Remove comment.
1668
1669         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
1670
1671         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
1672         (operator_name_info): Mark to be saved for PCH, specify size.
1673         (assignment_operator_name_info): Likewise.
1674
1675         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
1676
1677         * decl.c (anon_cnt): Mark to be saved for PCH.
1678
1679         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
1680
1681         * lex.c  (init_reswords): Delete now-untrue comment.
1682         Allocate ridpointers using GGC.
1683
1684         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
1685
1686         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
1687
1688         * g++spec.c (lang_specific_driver): Don't include standard
1689         libraries in `added'.
1690
1691         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
1692
1693         * decl2.c (finish_file): Call c_common_write_pch.
1694         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
1695
1696         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
1697
1698         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
1699         files when using g++.
1700         * lang-specs.h: Handle compiling C++ header files.
1701
1702 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
1703
1704         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
1705
1706 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1707
1708         * pt.c (push_access_scope_real): Call push_to_top_level for
1709         function in namespace scope.
1710         (pop_access_scope): Call pop_from_top_level for function in
1711         namespace scope.
1712
1713 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
1714
1715         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
1716
1717 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
1718
1719         * Make-lang.in (c++.install-common, c++.install-man,
1720         c++.uninstall): Prepend $(DESTDIR) to destination paths in
1721         all (un)installation commands.
1722         (c++.install-common): Rewrite $(LN) commands to support
1723         DESTDIR with "ln" as well as with "ln -s".
1724
1725 2003-01-08  Jason Merrill  <jason@redhat.com>
1726
1727         * parser.c (cp_parser_primary_expression): See through explicitly
1728         scoped ALIAS_DECLs, too.
1729
1730 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
1731
1732         * decl.c: Remove some #if 0 code.
1733
1734         * decl.c: ANSIfy function declarations.
1735
1736 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
1737
1738         * parser.c (cp_parser_asm_definition): Correct handling of omitted
1739         operands.
1740
1741 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1742
1743         PR c++/9030
1744         * decl.c (make_typename_type): Check access only when tf_error.
1745         (make_unbound_class_template): Likewise.
1746         * pt.c (saved_access_scope): New variable.
1747         (push_access_scope_real): New function.
1748         (push_access_scope): Likewise.
1749         (pop_access_scope): Likewise.
1750         (tsubst_default_argument): Use them.
1751         (instantiate_template): Likewise.
1752         (regenerate_decl_from_template): Likewise.
1753         (instantiate_decl): Likewise.
1754         (get_mostly_instantiated_function_type): Likewise.
1755
1756 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
1757
1758         * tree.c: Delete bogus #if 0 code.
1759
1760 2003-01-07  Andreas Schwab  <schwab@suse.de>
1761
1762         * class.c (layout_class_type): Don't use
1763         PCC_BITFIELD_TYPE_MATTERS if not defined.
1764
1765 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
1766
1767         PR c++/9165
1768         * decl2.c (build_cleanup): Mark the object as used.
1769
1770         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
1771         (hash_local_specialization): New function.
1772         (register_local_specialization): Revert 2003-01-05 change.
1773         (instantiate_decl): Use hash_local_specialization when creating
1774         the local_specializations table.
1775
1776         * decl2.c (mark_used): Do not synthesize thunks.
1777
1778         * class.c (layout_class_type): Correct handling of unnamed
1779         bitfields wider than their types.
1780
1781         PR c++/9189
1782         * parser.c (cp_parser): Remove default_arg_types.  Update
1783         documentation for unparsed_functions_queues.
1784         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
1785         parameter.
1786         (cp_parser_new): Don't set parser->default_arg_types.
1787         (cp_parser_function_definition): Adjust usage of
1788         unparsed_funtions_queues.
1789         (cp_parser_class_specifier): Don't mess with
1790         parser->default_arg_types.  Handle default argument processing in
1791         a separate phase from function body processing.
1792         (cp_parser_template_declaration_after_export): Adjust usage of
1793         unparsed_functions_queues.
1794         (cp_parser_late_parsing_for_member): Do not handle default
1795         arguments.
1796
1797 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
1798
1799         PR c++/9109
1800         * parser.c (cp_parser_declarator_kind): New enum.
1801         (cp_parser_declarator): Adjust.
1802         (cp_parser_direct_declarator): Adjust. Allow for either named or
1803         abstract declarator. Prefer abstract, if possible. Allow
1804         parenthesized function name.
1805         (cp_parser_condition): Adjust cp_parser_declarator call.
1806         (cp_parser_explicit_instantiation): Likewise.
1807         (cp_parser_init_declarator): Likewise.
1808         (cp_parser_type_id): Likewise.
1809         (cp_parser_function_definition): Likewise.
1810         (cp_parser_member_declaration): Likewise.
1811         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
1812         the tentative parsing.
1813         (cp_parser_exception_declaration): Likewise.
1814
1815 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
1816
1817         * parser.c (cp_parser_template_parameter): Adjust call to
1818         cp_parser_parameter_declaration.
1819         (cp_parser_parameter_declaration_list): Likewise.
1820         (cp_parser_parameter_declaration): Replace
1821         greater_than_is_operator_p with template_parm_p parameter.  Do not
1822         cache tokens for template default arguments.
1823
1824         * pt.c (retrieve_local_specialization): Use htab_find, not
1825         htab_find_with_hash.
1826         (register_local_specialization): Use htab_find_slot, not
1827         htab_find_slot_with_hash.
1828         (instantiate_decl): Pass a hash function to htab_create.
1829
1830 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1831
1832         * parser.c (cp_parser_binary_expression,
1833         cp_parser_multiplicative_expression,
1834         cp_parser_additive_expression, cp_parser_shift_expression,
1835         cp_parser_relational_expression, cp_parser_equality_expression,
1836         cp_parser_and_expression, cp_parser_exclusive_or_expression,
1837         cp_parser_inclusive_or_expression,
1838         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
1839         cp_parser_binary_expression): Const-ify.
1840
1841 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
1842
1843         * method.c (use_thunk): Disable access control while building the
1844         body of the thunk.
1845
1846 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
1847
1848         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
1849         front end.
1850
1851 2003-01-03  Matt Austern  <austern@apple.com>
1852
1853         * cp-tree.h (struct lang_type_class): add field for key method
1854         (cp_global_trees): rename dynamic_classes to keyed_classes
1855         (key_method): add definition
1856         * class.c (finish_struct_1): compute class's key method, and add
1857         the class to keyed_classes list if there is no key method.
1858         * decl.c (finish_function): add class to keyed_classes list if we
1859         see a definition of the class's key method.
1860         * pt.c (instantiate_class_template): add template specialization
1861         of a dynamic class to keyed_classes list.
1862         * decl2.c (key_method): remove
1863         (finish_file): iterate only through keyed_classes list when
1864         deciding whether to emit vtables, remove class from its list after
1865         we do the emission.
1866
1867 2003-01-02  Jason Merrill  <jason@redhat.com>
1868
1869         * call.c (build_conditional_expr): Stabilize lvalues properly.
1870         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
1871         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
1872         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
1873
1874         * call.c (convert_like_real): Call decl_constant_value for an
1875         IDENTITY_CONV even if there are no more conversions.
1876
1877         * cvt.c (build_up_reference): Don't push unnamed temps.
1878
1879         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
1880
1881         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
1882         for a backend struct.
1883
1884         * except.c (wrap_cleanups_r, build_throw): Make
1885         MUST_NOT_THROW_EXPRs void.
1886         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
1887
1888         * init.c (build_vec_delete_1): Pre-evaluate the base address.
1889
1890         * init.c (get_temp_regvar): Simplify logic.
1891
1892         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
1893         our replacement is a decl.
1894
1895         * decl.c (cp_make_fname_decl): Push the decls inside the
1896         outermost scope.
1897
1898 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
1899
1900         PR c++/45, c++/3784
1901         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
1902         the same too.
1903
1904 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
1905
1906         * parser.c (struct cp_parser): Add access_checks_lists field
1907         (cp_parser_simple_declaration): Use.
1908         (cp_parser_init_declarator): Likewise.
1909
1910 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
1911
1912         * parser.c (cp_parser_declaration): Accept the __extension__
1913         keyword before the declaration.
1914
1915         PR c++/2843
1916         * parser.c (cp_parser_parameter_declaration): Allow attributes to
1917         appear after the declarator.
1918
1919         * call.c (build_new_method_call): Fix typo in message format
1920         string.
1921
1922 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
1923
1924         * parser.c (cp_lexer_next_token_is): Declare it inline.
1925         (cp_lexer_set_source_position_from_token): Likewise.
1926         (cp_lexer_debugging_p): Likewise.
1927         (cp_parser_parsing_tentatively): Likewise.
1928         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
1929         to the cp_lexer_peek_token.
1930
1931         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
1932         expression.
1933
1934 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
1935
1936         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
1937         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
1938         cp/repo.c: Fix copyright years.
1939
1940 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
1941
1942         * lex.c: Remove superfluous include of cpplib.h.
1943         (CONSTRAINT): Define without conditions.
1944         (init_cp_pragma): Use c_register_pragma.
1945
1946 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
1947
1948         * .cvsignore: Remove.
1949
1950 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
1951
1952         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
1953           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
1954           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
1955           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
1956           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
1957           copyright header.
1958         * lex.h: parse.y is dead, so don't mention it.  Also replace the
1959           copyright header with the default GNU copyright header.
1960
1961 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
1962
1963         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
1964         (lookup_name_namespace_only): Likewise.
1965         (begin_only_namespace_names): Likewise.
1966         (end_only_namespace_names): Likewise.
1967         * decl.c (only_namespace_names): Remove.
1968         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
1969         (lookup_name_real): Do not check only_namespace_names.
1970         (lookup_name_namespace_only): Remove.
1971         (begin_only_namespace_names): Likewise.
1972         (end_only_namespace_names): Likewise.
1973         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
1974         nested-name-specifiers more gracefully.
1975         (cp_parser_class_or_namespace_name): Avoid looking up namespace
1976         names when they cannot possibly appear.
1977         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
1978         (cp_parser_elaborated_type_specifier): Likewise.
1979         (cp_parser_namespace_name): Only look for namespace names.
1980         (cp_parser_lookup_name): Add is_namespace parameter.
1981         (cp_parser_lookup_name_simple): Adjust call to
1982         cp_parser_lookup_name.
1983
1984         * parser.c (cp_parser_dependent_type_p): Fix thinko.
1985
1986 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
1987
1988         * .cvsignore: Update.
1989
1990 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
1991
1992         * class.c (modify_vtable_entry): Remove unused variable.
1993         (get_vcall_index): Always expect a non-thunk.
1994         (update_vtable_entry_for_fn): Combine covariant adjustments, when
1995         overriding a thunk. Pass get_vcall_index a non-thunk.
1996
1997         * decl2.c (finish_file): Mark undefined inlines as extern.
1998
1999 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
2000
2001         * cp-tree.def (RETURN_INIT): Remove.
2002         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
2003         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
2004         (note_level_for_for): Remove.
2005         (note_level_for_try): Likewise.
2006         (note_level_for_catch): Likewise.
2007         (finish_named_return_value): Likewise.
2008         (do_pushlevel): Change prototype.
2009         (pending_lang_change): Remove.
2010         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
2011         sk_for.
2012         (note_level_for_for): Remove.
2013         (note_level_for_try): Likewise.
2014         (note_level_for_catch): Likewise.
2015         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
2016         * parser.c (cp_parser_context_free_list): Make it "deletable".
2017         (cp_parser_template_argument): Remove misleading comment.
2018         * pt.c (tsubst_expr): Remove RETURN_INIT code.
2019         * semantics.c (genrtl_named_return_value): Remove.
2020         (do_pushlevel): Take a scope kind as an argument.
2021         (begin_if_stmt): Adjust.
2022         (begin_while_stmt): Likewise.
2023         (begin_for_stmt): Likewise.
2024         (finish_for_init_stmt): Likewise.
2025         (begin_switch_stmt): Likewise.
2026         (begin_handler): Likewise.
2027         (begin_compound_stmt): Likewise.
2028         (finish_named_return_value): Remove.
2029         (cp_expand_stmt): Remove RETURN_INIT case.
2030         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
2031
2032 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
2033
2034         PR c++/9112
2035         * parser.c (cp_parser_direct_declarator): Handle erroneous
2036         parenthesized declarators correctly.
2037
2038 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2039
2040         * cp-tree.h (pending_lang_change): Declare.
2041
2042 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
2043
2044         * parser.c (cp_parser_context_free_list): New variable.
2045         (cp_parser_context_new): Use it.
2046         (cp_parser_error): Check return code from
2047         cp_parser_simulate_error.
2048         (cp_parser_simulate_error): Return a value.
2049         (cp_parser_id_expression): Optimize common case.
2050         (cp_parser_class_name): Likewise.
2051         (cp_parser_class_specifier): Adjust call to
2052         cp_parser_late_parsing_default_args.
2053         (cp_parser_lookup_name): Optimize common case.
2054         (cp_parser_late_parsing_for_member): Adjust call to
2055         cp_parser_late_parsing_default_args.
2056         (cp_parser_late_parsing_default_args): Add scope parameter.
2057         (cp_parser_require): Avoid creating the error message unless it's
2058         needed.
2059         (cp_parser_parse_definitely): Place free'd contexts on the free
2060         list.
2061
2062         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
2063
2064 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
2065
2066         * parser.c (cp_parser_parameter_declaration_clause): Treat system
2067         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
2068
2069 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
2070
2071         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
2072         GCC, not GNU CC.
2073
2074 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
2075
2076         * parse.y: Remove.
2077         * spew.c: Likewise.
2078         * Make-lang.in (gt-cp-spew.h): Remove.
2079         * cp-tree.h (do_pending_lang_change): Remove.
2080         (do_identifier): Change prototype.
2081         (finish_id_expr): Remove.
2082         * decl.c (lookup_name_real): Remove yylex variable.
2083         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
2084         * lex.c (init_cpp_parse): Remove.
2085         (reduce_cmp): Likewise.
2086         (token_cmp): Likewise.
2087         (yychar): Likewise.
2088         (lastiddecl): Likewise.
2089         (token_count): Likewise.
2090         (reduce_count): Likewise.
2091         (yyhook): Likewise.
2092         (print_parse_statistics): Likewise.
2093         (do_pending_lang_change): Likewise.
2094         (do_identifier): Remove parsing parameter.
2095         * lex.h (lastiddecl): Remove.
2096         (looking_for_typename): Remove.
2097         (looking_for_template): Likewise.
2098         (pending_lang_change): Likewise.
2099         (yylex): Likewise.
2100         * semantics.c (finish_id_expr): Remove.
2101
2102         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
2103         thread" correctly.
2104
2105 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
2106
2107         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
2108         end, not the C front end.
2109
2110 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
2111
2112         * cp-tree.h (THUNK_TARGET): New macro.
2113         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
2114         (finish_thunk): Remove offset parms.
2115         * class.c (find_final_overrider): Look through thunks.
2116         (get_vcall_index): Use THUNK_TARGET.
2117         (update_vtable_entry_for_fn): Look through thunks. Set covariant
2118         fixed offset here. Adjust finish_thunk call.
2119         (build_vtbl_initializer): Adjust finish_thunk calls.
2120         * mangle.c (mangle_call_offset): Remove superfluous if.
2121         (mangle_thunk): Adjust.
2122         * method.c (make_thunk): Adjust.
2123         (finish_thunk): Adjust.
2124         (thunk_adjust): Remove assert.
2125         (use_thunk): Use THUNK_TARGET
2126         * dump1.c (cp_dump_tree): Adjust thunk dumping.
2127
2128         PR c++/9054
2129         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
2130         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
2131
2132 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2133
2134         Remove traditional C constructs 4/n.
2135         * decl2.c (grok_method_quals, warn_if_unknown_interface,
2136         grok_x_components, cp_build_parm_decl, build_artificial_parm,
2137         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
2138         delete_sanity, check_member_template, check_java_method,
2139         check_classfn, finish_static_data_member_decl, grokfield,
2140         grokbitfield, grokoptypename, grok_function_init,
2141         cplus_decl_attributes, constructor_name, defer_fn,
2142         build_anon_union_vars, finish_anon_union, coerce_new_type,
2143         coerce_delete_type, comdat_linkage, maybe_make_one_only,
2144         key_method, import_export_vtable, import_export_class,
2145         output_vtable_inherit, import_export_decl, import_export_tinfo,
2146         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
2147         set_guard, start_objects, finish_objects,
2148         start_static_storage_duration_function,
2149         finish_static_storage_duration_function, get_priority_info,
2150         start_static_initialization_or_destruction,
2151         finish_static_initialization_or_destruction,
2152         do_static_initialization, do_static_destruction,
2153         prune_vars_needing_no_initialization, write_out_vars,
2154         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
2155         add_using_namespace, merge_functions, ambiguous_decl,
2156         lookup_using_namespace, lookup_using_namespace,
2157         qualified_lookup_using_namespace, set_decl_namespace,
2158         decl_namespace, current_decl_namespace, push_decl_namespace,
2159         pop_decl_namespace, push_scope, pop_scope, add_function,
2160         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
2161         lookup_arg_dependent, do_namespace_alias,
2162         validate_nonmember_using_decl, do_nonmember_using_decl,
2163         do_toplevel_using_decl, do_local_using_decl,
2164         do_class_using_decl, do_using_directive, check_default_args,
2165         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
2166         * parser.c (cp_parser_class_head): Use booleanss.
2167         * decl.c (walk_globals, walk_vtables): Likewise.
2168         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
2169         walk_globals): Change return type from 'int' to 'bool'.
2170         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
2171         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
2172         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
2173         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
2174         qualifier_flags, tinfo_base_init, generic_initializer,
2175         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
2176         dfs_class_hint_unmark, class_hint_flags, class_initializer,
2177         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
2178         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
2179         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
2180         * repo.c (repo_compile_flags, repo_template_declared,
2181         repo_template_defined, repo_class_defined, repo_get_id,
2182         repo_template_used, repo_vtable_used, repo_inline_used,
2183         repo_tinfo_used, repo_template_instantiated, extract_string,
2184         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
2185         finish_repo): Likewise.
2186         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
2187         cxx_print_xnode): Likewise..
2188         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
2189         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
2190         * cxxfilt.c (demangle_it, print_demangler_list, usage,
2191         standard_symbol_characters, hp_symbol_characters, main, fatal):
2192         Likewise.
2193         (strip_underscore):  Change type from 'int' to 'bool'.
2194         (main): Use boolean constants.
2195
2196 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2197
2198         Remove traditional C constructs 3/n.
2199         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
2200         build_up_reference, warn_ref_binding, convert_to_reference,
2201         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
2202         convert_to_void, convert, convert_force, build_type_conversion,
2203         build_expr_type_conversion, type_promotes_to,
2204         perform_qualification_conversions): Use C90 prototyping style.
2205         * decl2.c (grok_array_decl): Use boolean constant.
2206         (delete_sanity): Likewise.
2207         * typeck.c (build_unary_op): Likewise.
2208         * semantics.c (finish_switch_cond): Likewise.
2209         * parser.c (cp_parser_direct_new_declarator): Likewise.
2210         * init.c (build_new): Likewise.
2211
2212 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
2213
2214         * Make-lang.in (po-generated): Remove parse.c.
2215         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
2216         ($(srcdir)/cp/parse.h): Remove target.
2217         ($(srcdir)/cp/parse.c): Likewise.
2218         (gt-cp-parse.h): Likewise.
2219         (gt-cp-parser.h): New target.
2220         (c++.distclean): Do not remove parse.output.
2221         (c++.maintainer-clean): Do not remove parse.c or parse.h.
2222         (cp/spew.o): Remove target.
2223         (cp/lex.o): Adjust dependencies.
2224         (cp/pt.o): Likewise.
2225         (cp/parse.o): Likewise.
2226         (cp/TAGS): Do not mention parse.c.
2227         (cp/parser.o): New target.
2228         * NEWS: Mention the new parser.
2229         * call.c (build_scoped_method_call): Simplify.
2230         (build_method_call): Likewise.
2231         (build_new_function_call): Adjust calls to add_function_candidate
2232         and add_template_candidate.
2233         (build_new_op): Improve handling of erroroneous operands.
2234         (convert_default_arg): Remove circular argument processing.
2235         (name_as_c_string): New function.
2236         (build_new_method_call): Use it.
2237         (perform_implicit_conversion): Use error_operand_p.
2238         * class.c (finish_struct_anon): Use constructor_name_p.
2239         (check_field_decls): Likewise.
2240         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
2241         (resolve_address_of_overloaded_function): Likewise.
2242         (instantiate_type): Tweak pointer-to-member handling.
2243         (get_primary_binfo): Remove incorrect assertion.
2244         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
2245         * cp-tree.h (DEFARG_TOKENS): New macro.
2246         (default_arg): New structure.
2247         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
2248         (lang_tree_node): Add default_arg.
2249         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
2250         (type_info_ref_type): New macro.
2251         (saved_scope): Make processing_explicit_instantiation a boolean.
2252         (check_access): New field.
2253         (unparsed_text): Remove.
2254         (language_function): Remove unparsed_inlines.
2255         (error_operand_p): New macro.
2256         (lang_decl): Adjust pending_inline_info.
2257         (DEFARG_POINTER): Remove.
2258         (tag_types): Add typenames.
2259         (lookup_ualified_name): Declare.
2260         (lookup_name_real): Likewise.
2261         (shadow_tag): Adjust prototype.
2262         (get_scope_of_declarator): Declare it.
2263         (process_next_inline): Remove it.
2264         (check_for_missing_semicolon): Likewise.
2265         (maybe_get_template_decl_from_type_decl): Declare it.
2266         (finish_label_stmt): Adjust prototype.
2267         (finish_non_static_data_meber): Declare it.
2268         (finish_pseudo_destructor_call_expr): Rename to ...
2269         (finish_pseudo_destructor_expr): ... this.
2270         (finish_compound_literal): Declare it.
2271         (begin_inline_definitions): Remove it.
2272         (init_spew): Remove.
2273         (peekyylex): Likewise.
2274         (arbitrate_lookup): Likewise.
2275         (frob_opname): Likewise.
2276         (maybe_snarf_defarg): Likewise.
2277         (add_defarg_fn): Likewise.
2278         (do_pending_defargs): Likewise.
2279         (done_pending_defargs): Likewise.
2280         (unprocessed_defarg_fn): Likewise.
2281         (replace_defarg): Likewise.
2282         (end_input): Likewise.
2283         (get_overloaded_fn): Likewise.
2284         * cvt.c (convert_to_reference): Improve error handling.
2285         * decl.c (lookup_name_real): Do not declare it static.
2286         (maybe_push_to_top_level): Set check_access.
2287         (identifier_type_value): Adjust call to lookup_name_real.
2288         (lookup_qualified_name): New method.
2289         (lookup_name_real): Remove special-case parsing code.
2290         (lookup_name-nonclass): Adjust call to lookup_name_real.
2291         (lookup_name_namespace_only): Likewise.
2292         (lookup_name): Likewise.
2293         (check_tag_decl): Return the type declared.
2294         (shadow_tag): Likewise.
2295         (register_dtor_fn): Tweak check_access.
2296         (grokfndecl): Use constructor_name_p.
2297         (get_scope_of_declarator): New function.
2298         (grokdeclarator): Obscure tweaks for slightly different declarator
2299         representations.
2300         (start_method): Return error_mark_node to indicate failure.
2301         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
2302         * decl2.c (constructor_name_full): Simplify.
2303         (constructor_name): Use it.
2304         (build_expr_from_tree): Adjust for changes to do new parser.
2305         (push_scope): Improve robustness.
2306         (validate_nonmember_using_decl): Process declarations, not names.
2307         (do_class_using_decl): Likewise.
2308         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
2309         here.
2310         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
2311         * expr.c (cxx_expand_expr): Handle BASELINKs.
2312         * init.c (member_init_ok_or_else): Issue more errors.
2313         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
2314         * lex.c: Do not include parse.h.
2315         (yypring): Do not declare.
2316         (yylval): Likewise.
2317         (make_reference_declarator): Remove error-generating code.
2318         (rid_to_yy): Remove.
2319         (cxx_init): Do not call init_spew.
2320         (yypring): Remove.
2321         (check_for_missing_semicolon): Remove.
2322         * lex.h (got_scope): Remove.
2323         (got_object): Remove.
2324         * method.c (hack_identifier): Use finish_non_static_data_member.
2325         (implicitly_declare_fn): Adjust use of constructor_name.
2326         * parser.c: New file.
2327         * pt.c (parse.h): Do not include it.
2328         (maybe_get_template_decl_from_template): Do not declare it.
2329         (finish_member_template_decl): Tweak.
2330         (begin_explicit_instantiation): Adjust for
2331         processing_explicit_instantiation being boolean.
2332         (end_explicit_instantiation): Likewise.
2333         (maybe_process_partial_specialization): Tighten specialization
2334         test.
2335         (retrieve_local_specialization): Adjust ue of hash table.
2336         (eq_local_specializations): New function.
2337         (register_local_specialization): Likewise.
2338         (push_template_decl_real): Remove unnecessary test.
2339         (maybe_get_template_decl_from_type_decl): Don't make it static.
2340         (for_each_template_parm_r): Handle TYPEOF_TYPE.
2341         (tsubst_copy): Use retrieive_local_specialization to handle
2342         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
2343         Handle COMPONENT_REFs with pseudo-destructor-expressions.
2344         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
2345         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
2346         (unify): Tweak handling of CONST_DECLs.
2347         (regenerate_decl_from_template): Use push_nested_class.
2348         (template_for_substitution): New funciton.
2349         (instantiate_decl): Use it.  Register parameters as local
2350         specializations.
2351         * rtti.c (init_rtti_processing): Set type_info_ref_type.
2352         (build_typeid): Use it.
2353         (get_typeid): Likeise.
2354         * search.c (accessible_p): Use check_access, not
2355         flag_access_control.
2356         (adjust_result_of_qualified_name_lookup): Pay attention to the
2357         context_class.
2358         * semantics.c (finish_asm_stmt): Adjust error handling.
2359         (finish_label_stmt): Return the statement.
2360         (finish_non_static_data_member): New function.
2361         (finish_class_expr): Handle BASELINKs.
2362         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
2363         (finish_object_call_expr): Simplify handling during templates.
2364         (finish_pseudo_destructor_call_expr): Rename to ...
2365         (finish_pseudo_dtor_expr): ... this.
2366         (finish_compound_literal): New function.
2367         (begin_inline_definitions): Remove.
2368         (finish_sizeof): Remove special template handling.
2369         * spew.c: Do not include parse.h.
2370         * tree.c (get_overloaded_fn): Remove.
2371         * typeck.c (build_class_member_access_expr): Handle
2372         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
2373         (lookup_destructor): New function.
2374         (finish_class_member_access_expr): Use it.
2375         (convert_arguments): Simplify.
2376         (build_unary_op): Handle BASELINKs.
2377
2378 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
2379
2380         PR c++/4803
2381         * decl2.c (mark_used): Defer inline functions.
2382         (finish_file): Merge deferred_fns loops. Check all used
2383         inline functions have a definition.
2384         * method.c (make_thunk): Thunks are not inline.
2385
2386         PR c++/5116, c++/764
2387         * call.c (build_new_op): Make sure template class operands are
2388         instantiated.
2389
2390 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
2391
2392         PR C++/7964
2393         * cp-tree.h (resolve_scoped_fn_name): Prototype.
2394         * call.c (resolve_scoped_fn_name): New function. Deal with
2395         more template expansion. Broken out of ...
2396         * parse.y (parse_finish_call_expr): ... here. Call it.
2397         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
2398         resolve_scoped_fn_name and build_call_from_tree.
2399
2400         PR c++/9053
2401         * decl.c (duplicate_decls): Templates may be disambiguated by
2402         return type.
2403
2404         PR c++/8702
2405         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
2406         conversion operators on failure.
2407
2408 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2409
2410         Remove traditional C constructs 2/n.
2411         * call.c (tourney, build_field_call, equal_functions, joust,
2412         compare_ics, build_over_call, build_java_interface_fn_ref,
2413         convert_like_real, op_error, build_object_call, resolve_args,
2414         build_vfield_ref, check_dtor_name, build_scoped_method_call,
2415         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
2416         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
2417         standard_conversion, reference_related_p,
2418         reference_compatible_p, convert_class_to_reference,
2419         direct_reference_binding, reference_binding,
2420         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
2421         add_template_conv_candidate, any_viable, any_strictly_viable,
2422         build_this, splice_viable, print_z_candidates,
2423         build_user_type_conversion, build_new_function_call,
2424         conditional_conversion, build_conditional_expr, build_new_op,
2425         build_op_delete_call, enforce_access, call_builtin_trap,
2426         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
2427         convert_default_arg, type_passed_as, convert_for_arg_passing,
2428         in_charge_arg_for_name, is_properly_derived_from,
2429         maybe_handle_implicit_object, maybe_handle_ref_bind,
2430         source_type, add_warning, can_convert, can_convert_arg,
2431         perform_implicit_conversion, can_convert_arg_bad,
2432         initialize_reference, add_conv_candidate,
2433         add_template_candidate_real, add_template_candidate): Ansify.
2434
2435 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
2436
2437         PR c++/8572
2438         * cp-tree.h (grokoptypename): Add SCOPE parameter.
2439         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
2440         if in a template scope.
2441         * parse.y (unoperator): Return the scope.
2442         (operator_name): Adjust grokoptypename call.
2443
2444 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2445
2446         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
2447         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
2448         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
2449
2450 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
2451
2452         * ChangeLog: Fix a typo.
2453         * class.c: Fix comment typos.
2454         * cp-tree.h: Likewise.
2455
2456 2002-12-18  Jason Merrill  <jason@redhat.com>
2457
2458         Handle anonymous unions at the tree level.
2459         C++ ABI change: Mangle anonymous unions using the name of their
2460         first named field (by depth-first search).  Should not cause
2461         binary compatibility problems, though, as the compiler previously
2462         didn't emit anything for affected unions.
2463         * cp-tree.def (ALIAS_DECL): New tree code.
2464         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
2465         first field, not the largest.
2466         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
2467         push the decl, and write it out at namespace scope.
2468         * decl.c (lookup_name_real): See through an ALIAS_DECL.
2469         (pushdecl): Add namespace bindings for ALIAS_DECLs.
2470         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
2471         of a decl which doesn't have one.
2472         * typeck.c (build_class_member_access_expr): Don't recurse if
2473         we already have the type we want.
2474
2475 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2476
2477         PR c++/8099
2478         * friend.c (make_friend_class): Allow partial specialization
2479         when declaration is not a template friend.
2480
2481 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2482
2483         PR c++/3663
2484         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
2485         TREE_PROTECTED to created decl nodes.
2486
2487 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
2488
2489         * class.c (build_base_field): Do not set DECL_PACKED on the
2490         FIELD_DECL.
2491
2492 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2493
2494         * cp-tree.h (struct tree_srcloc): Use location_t.
2495         (SOURCE_LOCUS): New.
2496         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
2497
2498 2002-12-17  Jason Merrill  <jason@redhat.com>
2499
2500         * decl.c (finish_function): Also complain about no return in
2501         templates.
2502         * semantics.c (finish_return_stmt): Also call check_return_expr in
2503         templates.
2504         * typeck.c (check_return_expr): In a template, just remember that we
2505         saw a return.
2506
2507 2002-12-16  Jason Merrill  <jason@redhat.com>
2508
2509         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
2510         of the CALL_EXPR.
2511
2512         * semantics.c (do_pushlevel): Call pushlevel after adding the
2513         SCOPE_STMT.
2514         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
2515         * parse.y (function_body): Go back to using compstmt.
2516         * decl.c (pushdecl): Skip another level to get to the parms level.
2517
2518         * call.c (build_new_method_call): Use is_dummy_object to determine
2519         whether or not to evaluate the object parameter to a static member
2520         function.
2521
2522 2002-12-14  Jason Merrill  <jason@redhat.com>
2523
2524         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
2525         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
2526         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
2527         don't bother with an AGGR_INIT_EXPR.
2528         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
2529         just generate a new decl normally.  Take return slot parm.
2530         * cp-tree.h: Adjust prototype.
2531
2532 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2533
2534         PR C++/8031
2535         * cvt.c (convert_to_pointer_force): Don't try comparing against
2536         erronous type.
2537
2538 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
2539
2540         * cp-tree.h: Have the multiple-include guards around
2541         the entire file.
2542
2543 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
2544
2545         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
2546         for SPEW_DEBUG.
2547         (snarf_method): Same.
2548         (snarf_defarg): Same.
2549
2550 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
2551
2552         PR c++/8372
2553         * pt.c (tsubst_copy): Handle destructor names more correctly.
2554
2555 2002-12-10  Matt Austern   <austern@apple.com>
2556
2557         * cp-tree.h: get rid of needs_virtual_reinit bit.
2558
2559 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
2560
2561         * NEWS: Document removal of in-class initialization extension for
2562         static data members of non-arithmetic, non-enumeration type.
2563         * decl.c (check_static_variable_definition): Do not allow that
2564         extension.
2565         * decl2.c (grokfield): Do not call digest_init when processing
2566         templates.
2567
2568 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2569
2570         * error.c (dump_expr): Fix format specifier warning.
2571
2572 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
2573
2574         * class.c (finish_struct_1): Correct comment.
2575         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
2576
2577 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2578
2579         PR C++/8799
2580         * error.c (dump_expr): Don't ever try to dump a non-existent
2581         expression.
2582
2583 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
2584
2585         Implement covariant returns.
2586         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
2587         (struct lang_decl_flags): Add this_thunk_p flag.
2588         Rename vcall_offset to virtual_offset.
2589         (struct lang_decl): Rename delta to fixed_offset.
2590         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
2591         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
2592         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
2593         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
2594         (make_thunk): Add this_adjusting arg.
2595         (finish_thunk): Declare.
2596         (mangle_thunk): Add this_adjusting arg.
2597         * class.c (get_vcall_index): Use base function for lookup.
2598         (update_vtable_entry_for_fn): Generate covariant thunk.
2599         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
2600         (build_vtbl_initializer): Use base function for lookup.
2601         Finish covariant thunk here. Adjust thunk generation.
2602         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
2603         Adjust thunk dumping.
2604         * mangle.c (mangle_call_offset): New function.
2605         (mangle_thunk): Adjust for covariant thunks.
2606         * method.c (make_thunk): Adjust. Do not set name here.
2607         (finish_thunk): New function. Set name here.
2608         (use_thunk): Generate covariant thunks too.
2609         (thunk_adjust): New function.
2610         * search.c (covariant_return_p): Remove. Fold into ...
2611         (check_final_overrider): ... here. Simplify.
2612         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
2613
2614 2002-12-03  Jason Merrill  <jason@redhat.com>
2615
2616         PR c++/8674
2617         * call.c (build_over_call): Check specifically for TARGET_EXPR
2618         when eliding.
2619
2620         PR c++/8461, c++/8625
2621         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
2622         (cp_convert_parm_for_inlining): Remove.
2623         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
2624         Remove.
2625         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
2626         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
2627
2628         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
2629         an ambiguous conversion.
2630
2631 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
2632
2633         PR c++/8688
2634         * decl.c (reshape_init): Handle erroneous initializers.
2635
2636 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
2637
2638         PR c++/8720
2639         * spew.c (remove_last_token): Make sure that last_chunk is set
2640         correctly.
2641
2642         PR c++/8615
2643         * error.c (dump_expr): Handle character constants with
2644         TREE_OVERFLOW set.
2645
2646 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2647
2648         DR 180
2649         * decl.c (grokdeclarator): Require class-key for all friend class.
2650         Output the correct type and context in the error message.
2651
2652 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
2653
2654         PR c++/5919
2655         * pt.c (unify): Use variably_modified_type_p to test validity of
2656         template argument types.
2657
2658         PR c++/8727
2659         * cp-tree.h (lang_type_class): Add typeinfo_var.
2660         (CLASSTYPE_TYPEINFO_VAR): New macro.
2661         * rtti.c (get_tinfo_decl): Use it.
2662
2663         PR c++/8663
2664         * init.c (expand_member_init): Always get the main variant of a
2665         base class.
2666
2667 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
2668
2669         PR c++/8332
2670         PR c++/8493
2671         * decl.c (cxx_init_decl_processing): Use size_type_node, not
2672         c_size_type_node.
2673         * decl2.c (coerce_new_type): Likewise.
2674         * except.c (do_allocate_exception): Likewise.
2675
2676 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
2677
2678         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
2679         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
2680         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
2681         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
2682         typeck2.c: Include coretypes.h and tm.h.
2683         * Make-lang.in: Update dependencies.
2684
2685 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
2686
2687         PR c++/8227
2688         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
2689         (check_initializer): Validate the type of the initialized
2690         variable, even if the initializer is absent.
2691         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
2692
2693         PR c++/8214
2694         * typeck.c (convert_for_assignment): Do not use
2695         decl_constant_value on the operand.
2696
2697         PR c++/8511
2698         * pt.c (instantiate_decl): Handle template friends defined outside
2699         of the class correctly.
2700
2701 2002-11-29  Joe Buck <jbuck@synopsys.com>
2702
2703         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
2704         anonymous structs.
2705
2706 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
2707
2708         * class.c (walk_subobject_offsets): Recur on binfos as well as on
2709         types.
2710         (layout_nonempty_base_or_field): Pass it a binfo when processing a
2711         base class.
2712         (layout_empty_base): Likewise.
2713         (build_base_field): Likewise.
2714
2715 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
2716
2717         * class.c (build_base_field): Make sure we get the canonical base
2718         when descending through primary bases.
2719
2720 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
2721
2722         * decl.c (check_initializer): Don't error on initialisation of
2723         a scalar with a brace-enclosed expression.
2724
2725 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
2726
2727         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
2728         (template_parms_equal): Remove prototype.
2729         * typeck.c (buuld_indirect_ref): Reformat.
2730
2731 2002-11-25  Jason Merrill  <jason@redhat.com>
2732
2733         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
2734         and a DO_STMT.
2735
2736 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
2737
2738         * tree.c (cp_build_qualified_type_real): Correct handling of
2739         array types.
2740         * class.c (walk_subobject_offsets): Fix thinko.
2741         (build_base_field): Record offsets of empty bases in primary
2742         virtual bases.
2743         (layout_class_type): Record offsets of empty bases in fields.
2744
2745         * search.c (is_subobject_of_p_1): Fix thinko.
2746         (lookup_field_queue_p): Likewise.
2747
2748 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
2749
2750         * class.c (layout_class_type): Reuse tail padding when laying out
2751         virtual bases.
2752
2753 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
2754
2755         * rtti.c (qualifier_flags): Fix thinko.
2756
2757 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2758
2759         Remove traditional C constructs 1/n.
2760         * cp-tree.h (init_method, set_mangled_name_for_decl,
2761         build_opfncall, hack_identifier, make_thunk, use_thunk,
2762         synthesize_method, implicitly_declare_fn,
2763         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
2764         maybe_clone_body): Remove use of PARAMS.
2765
2766         * method.c (do_build_assign_ref, do_build_copy_constructor,
2767         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
2768         Likewise.
2769         (synthesize_method): Use 'bool' type and constants instead of
2770         'int'.
2771         (locate_copy): Likewise.
2772         (implicitly_declare_fn): Likewise.
2773
2774         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
2775         Remove old-style declaration.
2776         (maybe_clone_body): Use 'bool' type and constants.
2777
2778 2002-11-21  Glen Nakamura  <glen@imodulo.com>
2779
2780         PR c++/8342
2781         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
2782         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
2783         of the branches of a COND_EXPR.
2784
2785 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
2786
2787         * pt.c (for_each_template_parm): Free allocated memory.
2788         * search.c (is_subobject_of_p_1): New function.
2789         (is_subobject_of_p): Avoid walking virtual bases multiple times.
2790
2791 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
2792
2793         * g++spec.c (lang_specific_spec_functions): New.
2794
2795 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
2796
2797         * ChangeLog: Follow spelling conventions.
2798         * class.c: Likewise.
2799         * decl2.c: Likewise.
2800
2801 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
2802
2803         * search.c (dfs_push_decls): Do not try to reorder elements
2804         3..n of method_vec if method_vec has only two elements.
2805         Reverse order of two tests to avoid accessing unallocated
2806         memory.
2807
2808 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
2809
2810         * class.c (dfs_find_final_overrider): Adjust so that the most
2811         derived object is a binfo, rather than a class type.
2812         (find_final_overrider): Likewise.
2813         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
2814         (add_vcall_offset): Likewise.
2815
2816 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2817
2818         PR c++/8389
2819         * pt.c (instantiate_template): Push class scope for member
2820         functions.
2821         (get_mostly_instantiated_function_type): Likewise.  Don't call
2822         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
2823         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
2824         * mangle.c (write_encoding, write_unqualified_name): Adjust.
2825
2826 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
2827
2828         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
2829         vcall offfsets.  Split out ...
2830         (add_vcall_offset): ... new function.
2831
2832         PR c++/8338
2833         * pt.c (for_each_template_parm): Add htab parameter.
2834         (process_partial_specialization): Adjust call.
2835         (push_template_decl_real): Likewise.
2836         (pair_fn_data): Add visited.
2837         (for_each_template_parm_r): Avoid walking duplicates more than
2838         once.
2839         (uses_template_parms): Adjust call to for_each_template_parm.
2840
2841 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
2842
2843         * class.c (add_implicitly_declared_members): Put implicitly
2844         declared functions at the end of TYPE_METHODs when -fabi-version
2845         is at least 2.
2846
2847 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
2848
2849         * decl2.c (finish_file): Correct spelling.
2850
2851 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
2852
2853         * call.c (build_special_member_call): Do not try to lookup VTTs by
2854         name.
2855         * class.c (vtbl_init_data): Add generate_vcall_entries.
2856         (get_vtable_decl): Do not look up virtual tables by name.
2857         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
2858         (set_primary_base): Do not set CLASSTYPE_RTTI.
2859         (determine_primary_base): Likewise.
2860         (get_matching_virtual): Remove.
2861         (get_vcall_index): New function.
2862         (update_vtable_entry_for_fn): Do not try to use virtual thunks
2863         when they are not required.  Assign vcall indices at this point.
2864         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
2865         Do update dynamic_classes.
2866         (build_vtt): Do not add VTTs to the symbol table.
2867         (build_ctor_vtbl_group): Likewise.
2868         (build_vtbl_initializer): Simplify handling of vcall indices.
2869         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
2870         for the most derived class.
2871         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
2872         the vtable.
2873         * cp-tree.h (dynamic_classes): New macro.
2874         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
2875         (CLASSTYPE_RTTI): Remove.
2876         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
2877         (CLASSTYPE_VCALL_INDICES): New macro.
2878         (CLASSTYPE_VTABLES): Likewise.
2879         (BV_USE_VCALL_INDEX_P): Remove.
2880         (build_vtable_path): Remove.
2881         * decl2.c (finish_vtable_vardecl): Remove.
2882         (key_method): Remove #if 0'd code.
2883         (finish_vtable_vardecl): Rename to ...
2884         (maybe_emit_vtables): ... this.
2885         (finish_file): Use it.
2886         * search.c (look_for_overrides_here): Update comment.
2887
2888 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
2889
2890         PR c/7353 redux
2891         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
2892
2893 2002-10-30  Jason Merrill  <jason@redhat.com>
2894
2895         PR c++/8186
2896         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
2897         * call.c (convert_for_arg_passing): Set it.
2898         * except.c (stabilize_throw_expr): Recurse for such an arg.
2899
2900 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
2901
2902         * cp-tree.h (lang_decl_flags): Remove init_priority.
2903         (lang_decl): Add delta.
2904         (GLOBAL_INIT_PRIORITY): Remove.
2905         (THUNK_DELTA): Revise definition.
2906         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
2907         * dump.c (cp_dump_tree): Don't dump it.
2908
2909 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
2910
2911         PR c++/8160
2912         * typeck2.c (process_init_constructor): Call complete_array_type.
2913
2914         PR c++/8149
2915         * decl.c (make_typename_type): Issue errors about invalid results.
2916
2917 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2918
2919         Core issue 287, PR c++/7639
2920         * cp-tree.h (lang_type_class): Add decl_list field.
2921         (CLASSTYPE_DECL_LIST): New macro.
2922         (maybe_add_class_template_decl_list): Add declaration.
2923         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
2924         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
2925         (maybe_add_class_template_decl_list): New function.
2926         (add_implicitly_declared_members): Use it.
2927         * decl.c (maybe_process_template_type_declaration): Likewise.
2928         (pushtag): Likewise.
2929         * friend.c (add_friend): Likewise.
2930         (make_friend_class): Likewise.
2931         * semantics.c (finish_member_declaration): Likewise.
2932         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
2933         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
2934         to process members and friends in the order of declaration.
2935
2936 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
2937
2938         PR c++/8287
2939         * decl.c (finish_destructor_body): Create the label to jump to
2940         when returning from a destructor here.
2941         (finish_function_body): Rather than here.
2942
2943 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
2944
2945         PR c++/7266
2946         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
2947         SCOPE_REF is not null before dereferencing it.
2948
2949 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
2950
2951         * call.c (build_over_call): Use DECL_CONTEXT, not
2952         DECL_VIRTUAL_CONTEXT.
2953         * class.c (modify_vtable_entry): Don't mess with
2954         DECL_VIRTUAL_CONTEXT.
2955         (set_vindex): Remove.
2956         (set_primary_base): Remove vfuns_p parameter.
2957         (determine_primary_base): Likewise.
2958         (modify_all_vtables): Likewise.
2959         (layout_class_type): Likewise.  Adjust calls to other functions
2960         accordingly.
2961         (finish_struct_1): Adjust calls to modified functions.  Set
2962         DECL_VINDEX here.
2963         * cp-tree.h (lang_type_class): Remove vsize.
2964         (CLASSTYPE_VSIZE): Remove.
2965         (lang_decl): Remove thunks.
2966         (DECL_THUNKS): Adjust.
2967         (DECL_VIRTUAL_CONTEXT): Remove.
2968         (duplicate_decls): Don't copy it.
2969         * pt.c (build_template_decl): Don't set it.
2970         (tsubst_decl): Likewise.
2971         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
2972
2973         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
2974         (build_vtable_entry): Remove.
2975         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
2976         (lang_decl): Add thunks.
2977         (DECL_THUNKS): New macro.
2978         * decl.c (duplicate_decls): Copy it.
2979         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
2980         * semantics.c (emit_associated_thunks): Simplify.
2981
2982 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
2983
2984         PR c++/7228
2985         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
2986         lang_type structure exists before accessing field.
2987         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
2988         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
2989         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
2990         * class.c (check_field_decls): Use new macros.
2991         * typeck2.c (process_init_constructor): Remove redundant check for
2992         existence of lang_type structure.
2993
2994 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
2995
2996         * class.c (end_of_base): New method.
2997         (end_of_class): Use it.  Check indirect virtual bases.
2998
2999         * class.c (check_field_decls): Fix typo.
3000
3001 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
3002
3003         PR c++/8067
3004         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
3005         related variables.
3006
3007         PR c++/7679
3008         * spew.c (next_token): Do not return an endless stream of
3009         END_OF_SAVED_INPUT tokens.
3010         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
3011         the cached token stream.
3012         (snarf_defarg): Likewise.
3013
3014 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
3015
3016         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
3017         variably_modified_type_p.
3018         * cp-tree.h: Remove prototype of variably_modified_type_p.
3019         * tree.c (variably_modified_type_p): Remove; now implemented
3020         in language-independent code.
3021
3022 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
3023
3024         PR c++/6579
3025         * spew.c (snarf_parenthesized_expression): New function.
3026         (snarf_block): Use it.
3027
3028 2002-10-22  Richard Henderson  <rth@redhat.com>
3029
3030         * method.c (use_thunk): Always compute vcall_value; assert that
3031         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
3032         for vcall thunks as well.
3033
3034 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
3035
3036         * class.c (empty_base_at_nonzero_offset_p): New function.
3037         (layout_nonempty_base_or_field): Do not check for conflicts when
3038         laying out a virtual base using the GCC 3.2 ABI.
3039         (build_base_field): Correct checking for presence of empty classes
3040         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
3041
3042         * class.c (include_empty_classes): Use normalize_rli.
3043         (layout_class_type): Likewise.
3044
3045         * decl.c (reshape_init): Tweak handling of character arrays.
3046
3047         PR c++/8218
3048         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
3049         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
3050         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
3051         (check_field_decls): Likewise.
3052         (layout_class_type): Likewise.
3053         (finish_struct_1): Initialize it.
3054         (walk_subobject_offsets): Use it to prune searches.
3055
3056 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
3057
3058         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
3059         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
3060         TARGET_ASM_OUTPUT_MI_THUNK in comments.
3061
3062 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
3063
3064         * decl.c (start_decl): Point users of the old initialized-
3065         typedef extension at __typeof__.
3066
3067 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
3068
3069         * Make-lang.in (method.o): Depend on TARGET_H.
3070         * method.c (target.h): Include it.
3071         (use_thunk): Use target hooks.  Use vcall thunks, if available.
3072
3073 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
3074
3075         * class.c (base_derived_from): Make sure return value is a bool.
3076
3077 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
3078
3079         * class.c (find_final_overrider_data_s): Remove overriding_fn and
3080         overriding_base.
3081         (dfs_base_derived_from): New function.
3082         (base_derived_from): Likewise.
3083         (dfs_find_final_overrider): Use base_derived_from.
3084         (find_final_overrider): Adjust.
3085
3086 2002-10-18  Jason Merrill  <jason@redhat.com>
3087
3088         PR c++/8080
3089         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
3090         with condition decls in a template.
3091
3092 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
3093
3094         * class.c (add_method): Compare template parms too.
3095
3096 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
3097
3098         PR c++/7584
3099         * class.c (handle_using_decl): Allow the declaration used to be
3100         from an ambiguous base.
3101
3102         * pt.c (convert_template_argument): Revert this change:
3103                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
3104                 * pt.c (convert_template_argument): Do not fold non-type
3105                 template rguments when inside a template.
3106
3107         * init.c (expand_default_init): Handle brace-enclosed initializers
3108         correctly.
3109
3110 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
3111
3112         * mangle.c (write_expression): Correct handling of enumeration
3113         constants.
3114         (write_template_arg): Likewise.
3115         * pt.c (convert_template_argument): Do not fold non-type template
3116         arguments when inside a template.
3117
3118         PR c++/7478
3119         * cvt.c (convert_to_reference): Allow references as the incoming
3120         type.
3121
3122 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
3123
3124         PR c++/7524
3125         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
3126         build_qualified_type.
3127
3128 2002-10-15  Richard Henderson  <rth@redhat.com>
3129
3130         * error.c (dump_expr): Use real_to_decimal directly, and with
3131         the new arguments.
3132
3133 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
3134
3135         * decl.c (reshape_init): Fix typo.
3136
3137         * cp-tree.h (operator_name_info_t): Add arity.
3138         * lex.c (init_operators): Initialize it.
3139         * mangle.c (write_conversion_operator_name): New function.
3140         (write_unqualified_name): Use it.
3141         (write_template_args): Accept template arguments as a TREE_LIST.
3142         (write_expression): Adjust handling of qualified names to match
3143         specification.
3144
3145 2002-10-15  Jason Merrill  <jason@redhat.com>
3146
3147         * call.c (call_builtin_trap): New fn.
3148         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
3149         (build_call): Don't set current_function_returns_abnormally outside
3150         a function.
3151
3152 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
3153
3154         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
3155         clear CLASSTYPE_EMPTY_P.
3156         (build_base_field): Likewise.
3157         (build_base_fields): Likewise.
3158         (check_bases_and_members): Likewise.
3159         (create_vtbl_ptr): Likewise.
3160         (layout_class_type): Likewise.  Ensure that empty classes have
3161         size zero when used as base classes in the 3.2 ABI.
3162         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
3163         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
3164         parameter.
3165         (is_empty_class): Correct definition when using post-3.2 ABI.
3166         * cp-tree.h (lang_type_class): Add empty_p.
3167         (CLASSTYPE_EMPTY_P): New macro.
3168
3169 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
3170
3171         * init.c (build_delete): Do not apply save_expr for arrays.
3172         (build_vec_delete): Likewise.
3173
3174 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
3175
3176         * decl.c (layout_var_decl): Call layout_decl even for variables
3177         whose type is an array with unspecified bounds.
3178
3179         PR c++/7176
3180         * lex.c (do_identifier): Add another option for the parsing
3181         parameter.
3182         * parse.y (do_id): Use it.
3183
3184 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3185
3186         PRs C++/6803, C++/7721 and C++/7803
3187         * decl.c (grokdeclarator): Gracefully handle template-name as
3188         decl-specifier.
3189
3190 2002-10-11  Jason Molenda  <jmolenda@apple.com>
3191
3192         * init.c (build_field_list): Provide uses_unions_p with a default
3193         value.
3194
3195 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
3196
3197         PR c++/5661
3198         * cp-tree.h (variably_modified_type_p): New function.
3199         (grokdeclarator) Tighten check for variably modified types as
3200         fields.
3201         * pt.c (convert_template_argument): Do not allow variably modified
3202         types as template arguments.
3203         * tree.c (variably_modified_type_p): New function.
3204
3205         * NEWS: Document removal of "new X = ..." extension.
3206         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
3207         brace-enclosed initializers.
3208         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
3209         (initialize_local_var): Remove declaration.
3210         (expand_static_init): Likewise.
3211         * decl.c (next_initializable_field): New function.
3212         (reshape_init): Likewise.
3213         (check_initializer): Use them.  Build dynamic initializer for
3214         aggregates here too.
3215         (initialize_local_var): Simplify, and incorporate cleanup
3216         insertion code as well.
3217         (destroy_local_var): Remove.
3218         (cp_finish_decl): Tidy.
3219         (expand_static_init): Fold checks for whether or not a variable
3220         needs initialization into this function.  Simplify.
3221         * decl2.c (do_static_initialization): Simplify.
3222         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
3223         be done for us automatically.
3224         (expand_default_init): Handle brace-enclosed initializers
3225         correctly.
3226         (expand_aggr_init_1): Remove RTL-generation code.
3227         (build_vec_init): Remove "new X = ..." support.
3228         * parse.y (new_initializer): Likewise.
3229         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
3230         brace-enclosed initializer.
3231         (create_pseudo_type_info): Likewise.
3232         * typeck2.c (store_init_value): Don't try to handle digest_init
3233         being called more than once.
3234         (digest_init): Tidy handling of brace-enclosed initializers.
3235
3236 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3237
3238         * decl.c (typename_hash): Use htab_hash_pointer.
3239
3240 2002-10-10  Jim Wilson  <wilson@redhat.com>
3241
3242         * decl.c (duplicate_decls): Don't call decl_attributes.
3243
3244 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
3245
3246         PR c/7353
3247         * decl.c (start_decl): Unconditionally issue error for
3248         'typedef foo = bar'.
3249         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
3250         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
3251
3252 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3253
3254         * decl2.c (prune_vtable_vardecl): Delete unused function.
3255
3256 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
3257
3258         PR c++/7754
3259         * decl2.c (finish_anon_union): Do not expand anonymous unions when
3260         procesing template functions.
3261         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
3262         type. Call layout_decl.
3263         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
3264
3265 2002-10-07  Richard Henderson  <rth@redhat.com>
3266
3267         * decl2.c, pt.c: Revert c++/7754 fix.
3268
3269 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3270
3271         PR c++/7804
3272         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
3273
3274 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
3275
3276         PR c++/7931
3277         * pt.c (for_each_template_parm_r): Handle BASELINKs.
3278
3279         PR c++/7754
3280         * decl2.c (finish_anon_union): Do not expand anonymous unions when
3281         procesing template functions.
3282         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
3283         type. Call layout_decl.
3284         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
3285
3286 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
3287
3288         PR c++/8006
3289         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
3290         template parameters.
3291         (globals): Add entity and need_abi_warning.
3292         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
3293         CLASSTYPE_TEMPLATE_INFO.
3294         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
3295         TYPE_TI_TEMPLATE.
3296         (write_prefix): Handle typename types correctly.
3297         (write_template_prefix): Handle template template parameters
3298         correctly.
3299         (start_mangling): Add entity parameter.
3300         (finish_mangling): Warn about names whose mangling will change.
3301         (mangle_decl_string): Adjust.
3302         (mangle_type_string): Likewise.
3303         (mangle_special_for_type): Likewise.
3304         (mangle_ctor_vtbl_for_type): Likewise.
3305         (mangle_thunk): Likewise.
3306         (mangle_guard_variable): Likewise.
3307         (mangle_ref_init_variable): Likewise.
3308
3309 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
3310
3311         PR c++/7188.
3312         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
3313         * cp-tree.h (emit_base_init): Rename to ....
3314         (emit_mem_initializers): ... this.
3315         (expand_member_init): Change prototype.
3316         * init.c (perform_member_init): Compute explicit, rather than
3317         requiring it as a parameter.
3318         (sort_member_init): Rename to ...
3319         (sort_mem_initializers): ... this.  Process bases and data members
3320         together.
3321         (sort_base_init): Remove.
3322         (emit_base_init): Rename to ...
3323         (emit_mem_initializers): ... this.
3324         (expand_aggr_vbase_init_1): Remove.
3325         (construct_virtual_bases): Rename to ...
3326         (construct_virtual_base): ... this.
3327         (expand_member_init): Rework handling of base initializers.
3328         * method.c (do_build_copy_constructor): Use
3329         finish_mem_initializers.
3330         * parse.y (member_init): Adjust calls to expand_member_init.
3331         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
3332         (tsubst_initializer_list): Use expand_member_init.
3333         * semantics.c (finish_mem_intiailizers): Simplify.
3334
3335 2002-10-02  Matt Austern  <austern@apple.com>
3336         * decl.c (walk_vtables_r): Fixed typo that caused result to
3337         never get a nonzero value.
3338
3339 2002-10-02  Roger Sayle  <roger@eyesopen.com>
3340
3341         PR optimization/6627
3342         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
3343         from here, and move it to tree.h.
3344         * decl.c (cxx_init_decl_processing): If storing the vbit
3345         in function pointers, ensure that force_align_functions_log
3346         is atleast one.
3347
3348 2002-10-02  Matt Austern  <austern@apple.com>
3349
3350         * class.c (check_field_decls): Changed warning about const member
3351         variables so that it doesn't get issued for a class aggregate.
3352
3353 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
3354
3355         * decl.c (cp_finish_decl): Make sure array types are laid out,
3356         even if the array bounds are unknown.
3357
3358 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
3359
3360         * class.c (build_vtbl_initializer): Change build_c_cast
3361         to build1.
3362
3363 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
3364
3365         * decl.c (cp_finish_decl): Make sure array types are laid out,
3366         even if the array bounds are unknown.
3367
3368         * decl.c (cp_finish_decl): Correct check for dynamic
3369         initialization of thread-local storage.
3370
3371 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
3372
3373         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
3374         overloaded.
3375
3376 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
3377
3378         * class.c (build_vtbl_initializer): Add cast.
3379         (add_vcall_offset_vtbl_entries_1):
3380         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
3381
3382 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
3383
3384         * class.c (walk_subobject_offsets): Correct the calculation of
3385         offsets for virtual bases.  Correct the counting of array
3386         elements.
3387         (layout_nonempty_base_or_field): Simplify.  Correct the
3388         calculation of offsets to be propagated through the binfo
3389         hierarchy.
3390         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
3391         Add the FIELD_DECL to TYPE_FIELDS.
3392         (build_base_fields): Adjust accordingly.
3393         (layout_virtual_bases): Use build_base_field.
3394         (end_of_class): Return a tree, not an integer.
3395         (warn_about_ambiguous_direct_bases): Rename to ...
3396         (warn_about_ambiguous_bases): ... this.
3397         (include_empty_classes): New function.
3398         (layout_class_type): Create an alternative version of the type to
3399         be used when as a base class type.  Do not call
3400         finish_record_layout until we are done laying out the class.
3401         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
3402         as_base.
3403         (CLASSTYPE_SIZE): Reimplement.
3404         (CLASSTYPE_SIZE_UNIT): Likewise.
3405         (CLASSTYPE_ALIGN): Likweise.
3406         (CLASSTYPE_USER_ALIGN): Likewise.
3407         (CLASSTYPE_AS_BASE): New macro.
3408         (DECL_INITIALIZED_P): Likewise.
3409         (extract_init): Remove prototype.
3410         (build_forced_zero_init): Rename to ...
3411         (build_zero_init): ... this.
3412         (force_store_init_value): Remove.
3413         * decl.c (obscure_complex_init): Remove.
3414         (duplicate_decls): Copy DECL_INITIALIZED_P.
3415         (check_initializer): Do not leave junk in DECL_INITIAL.
3416         (cp_finish_decl): Handle zero-initialization of entities with
3417         static storage duration.
3418         * expr.c (extract_init): Remove.
3419         * init.c (build_forced_zero_init): Remove.
3420         (build_zero_init): New function.
3421         (build_default_init): Use it.
3422         (build_field_list): Skip FIELD_DECLs for base subobjects.
3423         (push_base_cleanups): Likewise.
3424         * method.c (do_build_assign_ref): Likewise.
3425         (synthesize_exception_spec): Likewise.
3426         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
3427         (regenerate_decl_from_template): To not set DECL_INITIAL for a
3428         static data member whose initialization took place in its class.
3429         (instantiate_decl): Do not pass an initializer to cp_finish_decl
3430         in that situation.
3431         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.