OSDN Git Service

cp:
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2005-06-08  Nathan Sidwell  <nathan@codesourcery.com>
2
3         PR c++/19497
4         * cp-tree.def (USING_DECL): Update documentation.
5         * cp-tree.h (DECL_DEPENDENT_P): New.
6         (USING_DECL_DECLS, USING_DECL_SCOPE): New.
7         * class.c (handle_using_decl): Move most of the processing to ...
8         * name-lookup.c (do_class_using_decl): ... here.  Make stricter.
9         (push_using_decl): Use USING_DECL_SCOPE.
10         (cp_emit_debug_info_for_using): Make extern.
11         * cxx-pretty-print.c (pp_cxx_statement) <USING_DECL case>: Adjust.
12         * name-lookup.h (cp_emit_debug_info_for_using): Declare.
13         * pt.c (tsubst_decl) <USING_DECL case>: Use do_class_using_decl
14         when tsubsting.
15         (tsubst_expr): Use USING_DECL_SCOPE.
16         * search.c (lookup_field_1): Use DECL_DEPENDENT_P.
17         * semantics.c (finish_member_declaration): Likewise.
18
19 2005-06-08  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
20
21         PR c++/19894
22         * pt.c (tsubst): Reject pointer-to-member of type void.
23
24         PR c++/20563
25         * parser.c (cp_parser_label_declaration): Deal with invalid/missing
26         identifiers.
27
28 2005-06-07  Nathan Sidwell  <nathan@codesourcery.com>
29
30         * cp-tree.def (DEFAULT_ARG): Adjust documentation.
31         * cp-tree.h (DEFARG_INSTANTIATIONS): New.
32         (struct tree_default_arg): Add instantiations member.
33         * parser.c (cp_parser_late_parsing_default_args): Adjust to use a
34         VEC.
35         * pt.c (tsubst_arg_types): Likewise.
36
37         * parser.c (cp_parser_late_parsing_default_args): Fix overeager
38         assert in previous patch.
39
40 2005-06-06  Jakub Jelinek  <jakub@redhat.com>
41
42         * error.c (locate_error): Use gmsgid instead of msgid for argument
43         name.
44         (cp_error_at, cp_warning_at, cp_pedwarn_at): Likewise.
45
46 2005-06-06  Nathan Sidwell  <nathan@codesourcery.com>
47
48         PR 21903
49         * cp-tree.def (DEFAULT_ARG): Document TREE_CHAIN use.
50         * parser.c (cp_parser_late_parsing_default_args): Propagate parsed
51         argument to any early instantiations.
52         * pt.c (tsubst_arg_types): Chain early instantiation of default arg.
53
54         PR c++/20637
55         * cp-tree.h (add_method): Add using_decl parameter.
56         * class.c (add_method): Add using_decl parameter.  Adjust error
57         messages.
58         (handle_using_decl): Pass the using decl to add_method.
59         (clone_function_decl): Adjust add_member calls.
60         * decl2.c (check_classfn): Likewise.
61         * method.c (lazily_declare_fn): Likewise.
62         * semantics.c (finish_member_declaration): Likewise.
63
64         * method.c (synthesize_method): Use inform, not warning.
65
66 2005-06-06  Hans-Peter Nilsson  <hp@axis.se>
67
68         * config-lang.in (target_libs): Remove target-gperf.
69
70 2005-06-05  Mark Mitchell  <mark@codesourcery.com>
71
72         PR c++/21619
73         * cp-tree.h (DECL_IS_BUILTIN_CONSTANT_P): New macro.
74         * parser.c (cp_parser_postfix_expression): Allow non-constant
75         expressions as arguments to __builtin_constant_p.
76         * tree.c (builtin_valid_in_constant_expr_p): Use
77         DECL_IS_BUILTIN_CONSTANT_P. 
78
79 2005-06-03  Mark Mitchell  <mark@codesourcery.com>
80
81         PR c++/21853
82         * typeck.c (casts_away_constness_r): Do not drop cv-qualifiers on
83         the pointed-to type for a pointer-to-member.
84
85         PR c++/21336
86         * cp-tree.h (grok_op_properties): Remove friendp parameter.
87         * decl.c (grokfndecl): Adjust call.
88         (grok_op_properties): Determine the class of which the function is
89         a member by looking at its DECL_CONTEXT, not current_class_type.
90         * pt.c (tsubst_decl): Adjust call to grok_op_properties.
91
92 2005-06-02  Nathan Sidwell  <nathan@codesourcery.com>
93
94         * method.c (synthesize_method): Add addtional arg to warning call.
95
96         PR c++/21280
97         * Make-lang.in (method.o): Add diagnostic.h
98         * decl.c (start_preparsed_function): Use decl's location for file
99         info.
100         * decl2.c (cp_finish_file): Set input_location before synthesizing
101         a function.
102         (mark_used): When deferring a synthesized function, save current
103         location.  Do not set function's location when actually
104         synthesizing it.
105         * method.c: #include diagnostic.h.
106         (synthesize_method): Set the functions source location.  Show
107         needed location if errors are emitted.
108
109         * decl.c (start_decl): Simplify specialization handling. Remove
110         unneeded CLASSTYPE_TEMPLATE_INSTANTIATION check.
111         * mangle.c (discriminator_for_local_entity): Use VEC_index.
112
113         PR c++/20350
114         * decl.c (duplicate_decls): Copy all of DECL_USE_TEMPLATE.
115
116         PR c++/21151
117         * name-lookup.c (pushtag): Push local class even in a template.
118
119 2005-05-31  Nathan Sidwell  <nathan@codesourcery.com>
120
121         PR c++/21165
122         * init.c (integral_constant_value): Check the type of the
123         initializer, not the decl.
124
125 2005-05-30  Mark Mitchell  <mark@codesourcery.com>
126
127         PR c++/21784
128         * name-lookup.c (do_nonmember_using_decl): Ignore builtin
129         functions, even when the used name is not a function.
130
131 2005-05-30  Kazu Hirata  <kazu@cs.umass.edu>
132
133         * operators.def, optimize.c: Update copyright.
134
135 2005-05-28  Mark Mitchell  <mark@codesourcery.com>
136
137         PR c++/21210
138         * call.c (standard_conversion): Permit conversions to complex
139         types if conversion to the corresponding scalar type would be
140         permitted.
141
142         PR c++/21340
143         * method.c (implicitly_declare_fn): Clear processing_template_decl
144         when generating implicit declaration.
145
146 2005-05-27  Mark Mitchell  <mark@codesourcery.com>
147
148         PR c++/21614
149         * typeck.c (get_member_function_from_ptrfunc): Do not attempt
150         conversions to base classes of incomplete types.
151
152 2005-05-27  Ian Lance Taylor  <ian@airs.com>
153
154         * semantics.c (add_stmt): Add C++ frontend specific version.
155         * cp-tree.h (STMT_IS_FULL_EXPR_P): Define.
156         (stmts_are_full_exprs_p): Declare.
157
158 2005-05-27  Roger Sayle  <roger@eyesopen.com>
159             Giovanni Bajo  <giovannibajo@gcc.gnu.org>
160
161         * cp-tree.def (UNARY_PLUS_EXPR): New C++ unary tree code.
162         * parser.c (cp_parser_unary_expression): Use UNARY_PLUS_EXPR instead
163         of CONVERT_EXPR.
164         (cp_parser_unary_expression): Likewise.
165         * typeck.c (build_unary_op): Likewise.
166         * call.c (add_builtin_candidate, build_new_op): Likewise.
167         * error.c (dump_expr): Likewise.
168         * pt.c (tsubst_copy, tsubst_copy_and_build): Likewise.
169         * decl.c (ambi_op_p, grok_op_properties): Likewise.
170         * dump.c (dump_op): Likewise.
171         * lex.c (init_operators): Likewise.
172         * operators.def ("+"): Likewise.
173         * cp-gimplify.c (cp_gimplify_expr): Handle UNARY_PLUS_EXPR like a
174         conversion, if the result and argument types differ.
175         * tree.c (fold_if_not_in_template): Fold UNARY_PLUS_EXPR much
176         like a NOP_EXPR when !processing_template_decl.
177
178         * cxx-pretty-print.c (pp_cxx_cast_expression): Prototype.
179         (pp_cxx_unary_expression): Handle new UNARY_PLUS_EXPR tree code.
180
181 2005-05-27  Nathan Sidwell  <nathan@codesourcery.com>
182
183         PR c++/21455
184         * typeck.c (get_delta_difference): Cope with incomplete but equal
185         classes.  Reorder if.
186
187         PR c++/21681
188         * parser.c (cp_parser_late_parsing_for_member): Disable access
189         checking for template functions.
190
191 2005-05-26  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
192
193         PR c++/21768
194         * pt.c (redeclare_class_template): Change error message according
195         to coding conventions.
196
197 2005-05-26  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
198
199         * call.c (build_op_delete_call): Fix quoting in error message.
200
201 2005-05-25  Richard Henderson  <rth@redhat.com>
202
203         PR libgcj/21692
204         * cp-tree.h (make_alias_for): Declare.
205         * decl2.c (build_java_method_aliases): New.
206         (cp_finish_file): Call it.
207         * method.c (make_alias_for): Split out from ...
208         (make_alias_for_thunk): ... here.
209
210 2005-05-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
211
212         PR c++/21686
213         * semantics.c (finish_id_expression): Fix quoting in error message.
214
215 2005-05-25  DJ Delorie  <dj@redhat.com>
216
217         * decl.c (duplicate_decls): Move warning control from if() to
218         warning(OPT_*).
219         * name-lookup.c (parse_using_directive): Likewise.
220         * parser.c (cp_parser_elaborated_type_specifier): Likewise.
221         (cp_parser_init_declarator): Likewise.
222         * tree.c (handle_com_interface_attribute): Likewise.
223
224 2005-05-24  Ziemowit Laski  <zlaski@apple.com>
225
226         * class.c (layout_class_type): Do not issue C++ ABI warnings
227         for ObjC structs.
228         * decl.c (objc_mark_locals_volatile): Streamline by calling
229         objc_volatilize_decl().
230         * parser.c (cp_parser_objc_message_expression): Allow simple
231         type specifiers (instead of merely type names) as message
232         receivers.
233         * pt.c (template_args_equal): Do not call objc_comptypes().
234         * typeck.c (composite_pointer_type): If both pointers are
235         ObjC-esque, arbitrarily choose the first; do not call
236         objc_comptypes().
237         (comptypes): Do not call objc_comptypes().
238         (convert_for_assignment): Call objc_compare_types().
239         (comp_ptr_ttypes_real): Call objc_type_quals_match() before
240         concluding that types do not match.
241
242 2005-05-24  Andrew Pinski  <pinskia@physics.uc.edu>
243
244         PR C++/21645
245         * optimize.c (update_cloned_parm): Copy the TYPE also from the
246         original one.
247
248 2005-05-19  Jakub Jelinek  <jakub@redhat.com>
249
250         PR c++/21495
251         * decl.c (grokdeclarator): Fix "storage class specified for"
252         error reporting.
253
254 2005-05-19  Kazu Hirata  <kazu@cs.umass.edu>
255
256         * parser.c: Fix comment typos.
257
258 2005-05-18  Geoffrey Keating  <geoffk@apple.com>
259
260         * Make-lang.in (cc1plus-dummy): New.
261         (cc1plus-checksum.c): New.
262         (cc1plus-checksum.o): New.
263         (cc1plus): Add cc1plus-checksum.o.
264
265 2005-05-17  H.J. Lu  <hongjiu.lu@intel.com>
266
267         PR C++/19664
268         * decl2.c (determine_visibility): Don't set visibility to
269         hidden if it has been set explicitly by user.
270
271 2005-05-17  Ziemowit Laski  <zlaski@apple.com>
272             Mike Stump  <mrs@apple.com>
273
274         Yet more Objective-C++...
275         
276         * cp-objcp-common.h (cxx_get_alias_set): Move from
277         here...
278         (cxx_warn_unused_global_decl): Likewise.
279         (cp_expr_size): Likewise.
280         (cp_tree_size): Likewise.
281         (cp_var_mod_type_p): Likewise.
282         (cxx_initialize_diagnostics): Likewise.
283         (cxx_types_compatible_p): Likewise.
284         * cp-tree.h: to here.
285         (do_poplevel): Add.
286         * lex.c (D_OBJC): Add.
287         (init_reswords): Add.
288         * Make-lang.in (cp/pt.o): Add cp/cp-objcp-common.h.
289         * parser.c: Add c-common.h include.
290         * pt.c: Add c-common.h and cp-objcp-common.h includes.
291         (template_args_equal): Use objc_comptypes as well.
292         (tsubst_copy_and_build): Use objcp_tsubst_copy_and_build as well.
293         * semantics.c (do_poplevel): Remove static.
294
295         * decl.c (objc_mark_locals_volatile): Don't change decls that are
296         already ok.
297         * decl2.c (generate_ctor_or_dtor_function): Add code to initialize
298         Objective C++ early enough.
299         * lex.c (struct resword reswords): Add Objective-C++ support.
300         * parser.c (cp_lexer_get_preprocessor_token): Add Objective-C++.
301         (cp_parser_objc_message_receiver): Add.
302         (cp_parser_objc_message_args): Likewise.
303         (cp_parser_objc_message_expression): Likewise.
304         (cp_parser_objc_encode_expression): Likewise.
305         (cp_parser_objc_defs_expression): Likewise.
306         (cp_parser_objc_protocol_expression): Likewise.
307         (cp_parser_objc_selector_expression): Likewise.
308         (cp_parser_objc_expression): Likewise.
309         (cp_parser_objc_visibility_spec): Likewise.
310         (cp_parser_objc_method_type): Likewise.
311         (cp_parser_objc_protocol_qualifiers): Likewise.
312         (cp_parser_objc_typename): Likewise.
313         (cp_parser_objc_selector_p): Likewise.
314         (cp_parser_objc_selector): Likewise.
315         (cp_parser_objc_method_keyword_params): Likewise.
316         (cp_parser_objc_method_tail_params_opt): Likewise.
317         (cp_parser_objc_interstitial_code): Likewise.
318         (cp_parser_objc_method_signature): Likewise.
319         (cp_parser_objc_method_prototype_list): Likewise.
320         (cp_parser_objc_method_definition_list): Likewise.
321         (cp_parser_objc_class_ivars): Likewise.
322         (cp_parser_objc_identifier_list): Likewise.
323         (cp_parser_objc_alias_declaration): Likewise.
324         (cp_parser_objc_class_declaration): Likewise.
325         (cp_parser_objc_protocol_declaration): Likewise.
326         (cp_parser_objc_protocol_refs_opt): Likewise.
327         (cp_parser_objc_superclass_or_category): Likewise.
328         (cp_parser_objc_class_interface): Likewise.
329         (cp_parser_objc_class_implementation): Likewise.
330         (cp_parser_objc_end_implementation): Likewise.
331         (cp_parser_objc_declaration): Likewise.
332         (cp_parser_objc_try_catch_finally_statement): Likewise.
333         (cp_parser_objc_synchronized_statement): Likewise.
334         (cp_parser_objc_throw_statement): Likewise.
335         (cp_parser_objc_statement): Likewise.
336         (cp_parser_primary_expression): Add Objective-C++.
337         (cp_parser_statement): Likewise.
338         (cp_parser_declaration): Likewise.
339         (cp_parser_simple_type_specifier): Likewise.
340         (cp_parser_type_name): Likewise.
341         (cp_parser_parameter_declaration_list): Likewise.
342         (cp_parser_member_declaration) Likewise.
343         * tree.c: Include debug.h.
344         * typeck.c (composite_pointer_type): Add Objective-C++ support.
345         (finish_class_member_access_expr): Likewise.
346         (build_function_call): Allow objc to rewrite FUNCTION_DECLs.
347         (build_modify_expr): Allow objc to generate write barriers.
348
349         * Make-lang.in (cp/tree.o): Add debug.h.
350         * tree.c (lvalue_p_1, case CONST_DECL): Add.
351
352 2005-05-18  Jan Hubicka  <jh@suse.cz>
353
354         * method.c: Include tree-pass.h
355         (use_thunk): Lower body before expanding.
356
357 2005-05-17  Jakub Jelinek  <jakub@redhat.com>
358
359         PR c++/21454
360         * decl.c (maybe_deduce_size_from_array_init): Call
361         cp_apply_type_quals_to_decl after completing array type.
362
363 2005-05-16  Richard Henderson  <rth@redhat.com>
364
365         * decl.c (build_library_fn_1): Move setting TREE_NOTHROW ...
366         (build_library_fn): ... here.
367
368 2005-05-12  Ian Lance Taylor  <ian@airs.com>
369
370         * cp-tree.h (cp_stmt_codes): Don't define.
371         (statement_code_p): Declare.
372         (STATEMENT_CODE_P): Define.
373         * lex.c (statement_code_p): Define.
374         (cxx_init): Use actual codes in stmt_codes initializer, not
375         cp_stmt_codes macro.  Initialize statement_code_p directly, rather
376         than using INIT_STATEMENT_CODES.
377
378 2005-05-09  Mark Mitchell  <mark@codesourcery.com>
379
380         * typeck.c (build_unary_op): Do not resort to address arithmetic
381         when taking the address of a COMPONENT_REF.
382         
383 2005-05-08  Kazu Hirata  <kazu@cs.umass.edu>
384
385         * class.c (vtbl_init_data_s): Change the type of fns to
386         VEC(tree,gc)*.
387         (build_vtbl_initializer, add_vcall_offset, add_vcall_offset):
388         Use VEC instead of VARRAY.
389
390 2005-05-07  Richard Sandiford  <rsandifo@redhat.com>
391
392         * mangle.c: Remove a reference to the MIPS -mint64 option.
393
394 2005-05-07  Kazu Hirata  <kazu@cs.umass.edu>
395
396         * decl.c (wrapup_globals_for_namespace): Use VEC instead of
397         VARRAY.
398         * name-lookup.c (add_decl_to_level, begin_scope): Likewise.
399         * name-lookup.h (cp_binding_level): Change the type of
400         static_decls to VEC(tree,gc)*.
401
402         * mangle.c (globals): Change the type of substitutions to
403         VEC(tree,gc)*.
404         (dump_substitution_candidates, add_substitution,
405         find_substitution, finish_mangling, init_mangle): Use VEC
406         instead of VARRAY.
407
408 2005-05-06  Kazu Hirata  <kazu@cs.umass.edu>
409
410         * decl2.c (spew_debug): Remove.
411
412         * decl2.c (ssdf_decls, start_static_storage_duration_function,
413         generate_ctor_or_dtor_function): Use VEC instead of VARRAY.
414
415         * decl2.c (pending_statics, note_vague_linkage_var,
416         cp_finish_file): Use VEC instead of VARRAY.
417         (pending_statics_used): Remove.
418
419 2005-05-05  Kazu Hirata  <kazu@cs.umass.edu>
420
421         * decl2.c (deferred_fns, note_vague_linkage_fn,
422         cp_finish_file): Use VEC instead of VARRAY.
423
424 2005-05-05  Mark Mitchell  <mark@codesourcery.com>
425
426         PR c++/21352
427         * pt.c (build_non_dependent_expr): Use is_overloaded_fn.
428
429 2005-05-05  Kazu Hirata  <kazu@cs.umass.edu>
430
431         * pt.c: Fix a comment typo.
432
433 2005-05-04  Kazu Hirata  <kazu@cs.umass.edu>
434
435         * cp-tree.h (language_function): Change the type of
436         x_local_names to VEC.
437         * decl.c (push_local_name): Adjust uses of local_names.
438
439 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
440
441         * friend.c, lex.c, mangle.c, repo.c: Update copyright.
442
443 2005-05-02  Kazu Hirata  <kazu@cs.umass.edu>
444
445         * class.c (local_classes, init_class_processing): Use VEC
446         instead of VARRAY.
447         * cp-tree.h (local_classes): Likewise.
448         * mangle.c (discriminator_for_local_entity): Likewise.
449         * name-lookup.c (pushtag): Likewise.
450
451         * class.c (current_lang_depth, push_lang_context,
452         pop_lang_context): Use VEC instead of VARRAY.
453         * cp-tree.h (saved_scope): Use VEC for lang_base instead of
454         VARRAY.
455         * name-lookup.c (push_to_top_level): Use VEC instead of
456         VARRAY.
457
458 2005-05-02  Paolo Bonzini  <bonzini@gnu.org>
459
460         * semantics.c (finish_call_expr): Call resolve_overloaded_builtin
461         for BUILT_IN_MD built-ins.
462
463 2005-05-02  Michael Matz  <matz@suse.de>
464
465         PR c++/19542
466         * cp-tree.h (cp_tree_index): Remove CPTI_NULL, to be defined in C
467         common frontend.
468         (null_node): Remove.
469         * lex.c (cxx_init): Move null_node initialisation to C common frontend.
470
471 2005-04-25  Ian Lance Taylor  <ian@airs.com>
472
473         * cp-tree.def: Add EXPR_STMT.
474         * cp-tree.h (cp_stmt_codes): Add EXPR_STMT.
475         (EXPR_STMT_EXPR): Define.
476         * cp-gimplify.c: Include "flags.h".
477         (gimplify_expr_stmt): New static function.
478         (cp_gimplify_expr): Handle EXPR_STMT.
479         * cxx-pretty-print.c (pp_cxx_statement): Use pp_cxx_expression
480         rather than pp_expression.
481         (pp_cxx_statement): Handle EXPR_STMT.
482         * dump.c (cp_dump_tree): Handle EXPR_STMT.
483         * lex.c (cxx_init): Don't use c_common_stmt_codes in stmt_codes
484         initializer.
485
486 2005-04-25  Andrew Pinski  <pinskia@physics.uc.edu>
487
488         PR C++/21188
489         * rtti.c (ifnonnull): Cast the zero comparison operand
490         to the correct type.
491
492 2005-04-24  Jakub Jelinek  <jakub@redhat.com>
493
494         PR middle-end/20991
495         * class.c: Include cgraph.h.
496         (cp_fold_obj_type_ref): Set node->local.vtable_method.
497         * Make-lang.in (cgraph.o): Depend on $(CGRAPH_H).
498
499 2005-04-12  Markus F.X.J. Oberhumer  <markus@oberhumer.com>
500
501         * mangle.c (write_builtin_type): Handle integer types which are
502         not one of the shared integer type nodes and emit a "vendor
503         extended builtin type" with an encoding in the form of "u5int96".
504
505 2005-04-24  Ian Lance Taylor  <ian@airs.com>
506
507         * cp-tree.def (USING_STMT): Change class to tcc_statement.
508         (TRY_BLOCK, EH_SPEC_BLOCK, HANDLER, CLEANUP_STMT): Likewise.
509         (IF_STMT, FOR_STMT, WHILE_STMT, DO_STMT): Likewise.
510         (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
511
512 2005-04-23  DJ Delorie  <dj@redhat.com>
513
514         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, friend.c,
515         init.c, lex.c, mangle.c, method.c, name-lookup.c, parser.c,
516         repo.c, rtti.c, tree.c, typeck.c, typeck2.c: Adjust warning()
517         callers.
518
519 2005-04-22  Per Bothner  <per@bothner.com>
520
521         * decl.c (make_rtl_for_nonlocal_decl): Don't try get_fileinfo if
522         input_filename is NULL, as it is for (say) __PRETTY_FUNCTION__.
523
524 2005-04-22  Alexandre Oliva  <aoliva@redhat.com>
525
526         PR c++/21087
527         * name-lookup.c (push_overloaded_decl): Do not overload with
528         non-duplicate anticipated built-in.
529
530 2005-04-21  Kazu Hirata  <kazu@cs.umass.edu>
531
532         * cp-tree.h (THROW_NAME, AUTO_VTABLE_NAME, AUTO_TEMP_FORMAT,
533         VTABLE_BASE, VTABLE_NAME_PREFIX, STATIC_NAME_FORMAT): Remove.
534
535 2005-04-21  Nathan Sidwell  <nathan@codesourcery.com>
536
537         * cp-tree.h: Adjust for new VEC API.
538         Define VEC(tree_pair_s,gc).
539         (struct save_scope): Adjust.
540         (struct lang_type_class): Adjust.
541         (unemitted_tinfo_decls): Adjust.
542         * class.c (add_method, resort_type_method_vec,
543         finish_struct_methods, struct find_final_overrider_data,
544         dfs_find_final_overrider_pre, find_final_overrider,
545         get_vcall_index, warn_hidden, walk_subobject_offsets,
546         check_methods, fixup_inline_methods, end_of_class,
547         warn_about_ambiguous_bases, finish_struct, build_vtbl_initializer,
548         add_vcall_offset): Adjust.
549         * decl.c (xref_basetypes, finish_method): Adjust.
550         * decl2.c (check_classfn): Adjust.
551         * init.c (sort_mem_initializers, push_base_cleanups): Adjust.
552         * method.c (do_build_copy_constructor): Adjust.
553         * name-lookup.c (new_class_binding, store_binding, 
554         store_bindings, store_class_bindings): Adjust.
555         * name-lookup.h: Define VEC(cxx_saved_binding,gc),
556         VEC(cp_class_binding,gc).
557         (struct cp_binding_level): Adjust.
558         * parser.c: Define VEC(cp_token_position,heap).
559         (struct cp_lexer): Adjust.
560         (cp_lexer_new_main, cp_lexer_new_from_tokens, cp_lexer_destroy,
561         cp_lexer_save_tokens): Adjust.
562         * pt.c (retrieve_specialization,
563         check_explicit_specialization): Adjust.
564         * rtti.c (unemitted_tinfo_decls): Adjust.
565         (init_rtti_processing, get_tinfo_decl, get_pseudo_ti_init,
566         get_pseudo_ti_desc): Adjust.
567         * search.c (dfs_access_in_type, lookup_conversion_operator,
568         lookup_fnfields_1, dfs_walk_once, dfs_walk_once_accessible,
569         dfs_get_pure_virtuals, lookup_conversions_r, binfo_for_vbase): Adjust.
570         * semantics.c: Define VEC(deferred_access,gc).
571         (push_deferring_access_checks): Adjust.
572         * typeck2.c (abstract_virtuals_error): Adjust.
573
574 2005-04-20  Ian Lance Taylor  <ian@airs.com>
575
576         * cp-tree.def: Add STMT_EXPR.
577         * cp-tree.h (STMT_EXPR_NO_SCOPE): Define.
578         (STMT_EXPR_STMT): Define.
579         * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
580         STMT_EXPR.
581         (pp_cxx_expression): Likewise.
582         (pp_cxx_statement): Call pp_cxx_statement, not pp_statement.
583         * dump.c (cp_dump_tree): Handle STMT_EXPR.
584
585 2005-04-18  Kazu Hirata  <kazu@cs.umass.edu>
586
587         * decl.c (expand_static_init): Call build2 and build3 instead
588         of build.
589
590         * cp-tree.h (VPTR_NAME, VPTR_NAME_P): Remove.
591
592 2005-04-17  Ian Lance Taylor  <ian@airs.com>
593
594         * cp-tree.def: Add SIZEOF_EXPR, ARROW_EXPR and ALIGNOF_EXPR.
595         * cxx-pretty-print.c (pp_cxx_postfix_expression): Handle
596         ARROW_EXPR.
597         (pp_cxx_unary_expression): Handle SIZEOF_EXPR and ALIGNOF_EXPR.
598         (pp_cxx_expression): Handle ARROW_EXPR, SIZEOF_EXPR, and
599         ALIGNOF_EXPR.
600         * typeck.c (cxx_sizeof_or_alignof_type): Update call to
601         c_sizeof_or_alignof_type for change in parameter type.
602
603 2005-04-16  Mark Mitchell  <mark@codesourcery.com>
604
605         PR c++/21025
606         * typeck.c (cxx_sizeof_or_alignof_type): Check whether the type to
607         which sizeof/alignof is dependent, rather than just whether we are
608         processing_template_decl.
609         
610 2005-04-17  Kazu Hirata  <kazu@cs.umass.edu>
611
612         * cp-tree.h (LOOKUP_GLOBAL): Remove.
613         (LOOKUP_ONLYCONVERTING, DIRECT_BIND, LOOKUP_NO_CONVERSION,
614         LOOKUP_DESTRUCTOR, LOOKUP_NO_TEMP_BIND, LOOKUP_PREFER_TYPES,
615         LOOKUP_PREFER_NAMESPACES, LOOKUP_CONSTRUCTOR_CALLABLE): Adjust
616         their values.
617
618 2005-04-15  Richard Henderson  <rth@redhat.com>
619
620         PR middle-end/14311
621         * semantics.c (finish_call_expr): Call resolve_overloaded_builtin.
622
623 2005-04-15  Kazu Hirata  <kazu@cs.umass.edu>
624
625         * cp-tree.h (lang_type_class): Remove redefined.  Move
626         java_interface into where redefined was.  Increment the width
627         of dummy.
628         (TYPE_REDEFINED): Remove.
629
630 2005-04-14  Kazu Hirata  <kazu@cs.umass.edu>
631
632         * cp-tree.h (SET_TMPL_ARG, ENUM_TI_TEMPLATE, ENUM_TI_ARGS,
633         CLASSTYPE_TEMPLATE_LEVEL): Remove.
634
635 2005-04-11  Mark Mitchell  <mark@codesourcery.com>
636
637         * decl2.c (determine_visibility): Don't use export_class_data.
638         (import_export_decl): Honor TARGET_CXX_CLASS_DATA_ALWAYS_WEAK and
639         TARGET_CXX_DETERMINE_CLASS_DATA_VISIBILITY. 
640
641 2005-04-09  Kazu Hirata  <kazu@cs.umass.edu>
642
643         * cp-tree.h (cxx_alignof): Remove.
644
645         * cp-tree.h (DECL_ARRAY_DELETE_OPERATOR_P): Remove.
646
647         * cp-tree.h (EXCEPTION_CLEANUP_NAME, B_SET, B_CLR, B_TST,
648         CONV_STATIC_CAST): Remove.
649
650         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Remove.
651
652         * cp-tree.h (VF_BINFO_VALUE, VF_BASETYPE_VALUE): Remove.
653
654         * cp-tree.h (cp_deprecated): Remove.
655
656 2005-04-08  Ian Lance Taylor  <ian@airs.com>
657
658         * cp-tree.def: Define FOR_STMT, WHILE_STMT, DO_STMT, BREAK_STMT,
659         CONTINUE_STMT, SWITCH_STMT.
660         * cp-tree.h (cp_stmt_codes): Add FOR_STMT, WHILE_STMT, DO_STMT,
661         BREAK_STMT, CONTINUE_STMT, SWITCH_STMT.
662         (WHILE_COND, WHILE_BODY): Define.
663         (DO_COND, DO_BODY): Define.
664         (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY): Define.
665         (SWITCH_STMT_COND, SWITCH_STMT_BODY, SWITCH_STMT_TYPE): Define.
666         * cp-gimplify.c (enum bc_t): Define.
667         (struct cp_gimplify_ctx, ctxp): Define.
668         (push_context, pop_context): New static functions.
669         (begin_bc_block, finish_bc_block): New static functions.
670         (build_bc_goto): New static function.
671         (gimplify_cp_loop, gimplify_for_stmt): New static functions.
672         (gimplify_while_stmt, gimplify_do_stmt): Likewise.
673         (gimplify_switch_stmt): Likewise.
674         (cp_gimplify_expr): Handle FOR_STMT, WHILE_STMT, DO_STMT,
675         SWITCH_STMT, CONTINUE_STMT, BREAK_STMT.
676         (cp_genericize): Call push_context and pop_context.
677         * semantics.c (finish_break_stmt): Just call build_stmt
678         (BREAK_STMT) rather than build_break_stmt.
679         (finish_continue_stmt): Corresponding change.
680         * decl.c (pop_switch): Update call to c_do_switch_warnings for new
681         parameters.
682         * cxx-pretty-print.c (pp_cxx_statement): Handle SWITCH_STMT,
683         WHILE_STMT, DO_STMT, FOR_STMT, BREAK_STMT, CONTINUE_STMT.
684         * dump.c (cp_dump_tree): Likewise.
685
686 2005-04-08  Mark Mitchell  <mark@codesourcery.com>
687
688         PR c++/20905
689         * parser.c (cp_parser_type_specifier_seq): Add is_condition
690         parameter.
691         (cp_parser_new_type_id): Pass it.
692         (cp_parser_condition): Likewise.
693         (cp_parser_conversion_type_id): Likewise.
694         (cp_parser_type_id): Likewise.
695         (cp_parser_type_specifier_seq): In a condition, do not allow
696         invalid type-specifier combinations.
697         (cp_parser_exception_declaration): Adjust call to
698         cp_parser_type_specifier_seq. 
699
700         * cp-tree.def (TINST_LEVEL): Document TINST_IN_SYSTEM_HEADER_P.
701         * cp-tree.h (struct tinst_level): Add in_system_header_p.
702         (TINST_IN_SYSTEM_HEADER_P): New macro.
703         (make_tinst_level): Remove.
704         * pt.c (lookup_template_class): Preserve DECL_IN_SYSTEM_HEADER on
705         the instantiated class.
706         (push_tinst_level): Do not use make_tinst_level.  Set
707         TINST_IN_SYSTEM_HEADER_P.
708         (pop_tinst_level): Likewise.
709         (instantiate_class_template): Set in_system_header.
710         (instantiate_pending_templates): Likewise.
711         * tree.c (make_tinst_level): Remove.
712
713 2005-04-06  Joseph S. Myers  <joseph@codesourcery.com>
714
715         * decl.c (start_decl): Apply pending #pragma weak regardless of
716         scope.
717
718 2005-04-06  Mark Mitchell  <mark@codesourcery.com>
719
720         PR c++/20212
721         * pt.c (regenerate_decl_from_template): Copy attributes for
722         parameters from the pattern to the instantiation.
723
724 2005-04-05  Mark Mitchell  <mark@codesourcery.com>
725
726         PR c++/20734
727         * cp-tree.def (OFFSET_REF): Correct comments.
728         * init.c (build_offset_ref): Remove misleading comment.
729         * typeck.c (build_unary_op): Handle pointer-to-member creation
730         here, rather than ...
731         (unary_complex_lvalue): ... here.
732
733 2005-04-06  Jason Merrill  <jason@redhat.com>
734
735         PR c++/19312
736         * tree.c (stabilize_init): Don't bother trying to stabilize
737         something with no side-effects.
738
739 2005-04-05  Mark Mitchell  <mark@codesourcery.com>
740
741         PR c++/20763
742         * decl.c (grokdeclarator): Correct attribute handling.
743
744 2005-04-05  Mark Mitchell  <mark@codesourcery.com>
745
746         PR c++/19159
747         * decl2.c (import_export_decl): Use non-COMDAT external linkage
748         for virtual tables, typeinfo, etc. that will be emitted in only
749         one translation unit on systems without weak symbols.
750
751 2005-04-04  Mark Mitchell  <mark@codesourcery.com>
752
753         PR c++/20679
754         * parser.c (cp_parser_template_name): Fix thinko.
755
756 2005-04-04  Nathan Sidwell  <nathan@codesourcery.com>
757
758         PR c++/20746
759         * method.c (use_thunk): Protect covariant pointer return
760         adjustments from NULL pointers.
761
762 2005-04-04  Jan Hubicka  <jh@suse.cz>
763
764         * decl2.c (finish_objects): Revert my previous patch.
765         (cp_finish_file): Likewise.
766
767 2005-04-03  Kazu Hirata  <kazu@cs.umass.edu>
768
769         * pt.c: Fix comment typos.
770
771 2005-04-03  Nathan Sidwell  <nathan@codesourcery.com>
772
773         PR c++/20723
774         * pt.c (more_specialized_fn): Member functions are unordered wrt
775         non-members.  Conversion operators are unordered wrt other
776         functions.
777
778 2005-04-01  Nathan Sidwell  <nathan@codesourcery.com>
779
780         * call.c (add_template_candidates_real): Remove length parameter
781         from fn_type_unification call.
782         * class.c (resolve_address_of_overloaded_function): Likewise
783         * cp-tree.h (fn_type_unification): Remove length parameter.
784         * pt.c (get_bindings_overload): Remove.
785         (get_bindings_real): Rename to ...
786         (get_bindings): ... here.  Remove length and strict
787         parameters. Change return type flag to boolean.  Remove original
788         forwarding function.
789         (determine_specialization): Adjust get_bindings call.
790         (fn_type_unification): Remove length parameter.  Adjust.
791         (type_unification_real): Remove length parameter.  Adjust.
792         (resolve_overloaded_unification): Adjust get_bindings call.
793         (try_one_overload): Simplify confusing cascaded if control flow.
794         (unify): Remove length paramter from type_unification_real call.
795         (most_specialized_instantiation): Adjust get_bindings calls.
796         (most_specialized): Likewise.
797
798 2005-03-31  Nathan Sidwell  <nathan@codesourcery.com>
799
800         PR c++/19203, implement DR 214
801         * call.c (joust): Use more_specialized_fn.
802         * cp-tree.h (DEDUCE_ORDER): Remove.
803         (more_specialized): Replace with ...
804         (more_specialized_fn): ... this.
805         * pt.c (maybe_adjust_types_for_deduction): Remove DEDUCE_ORDER
806         case.
807         (type_unification_real): Remove DEDUCE_ORDER case.
808         (more_specialized): Replace with ...
809         (more_specialized_fn): ... this.  Implement DR 214.
810         (most_specialized_instantiation): Use get_bindings_real directly.
811
812 2005-03-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
813
814         PR c++/18644
815         * call.c (build_new_op): Remove check for -Wsynth.
816
817 2005-03-31  Jan Hubicka  <jh@suse.cz>
818
819         * decl2.c (finish_objects): Mark ctor as needed.
820         (cp_finish_file): Output variables only in nonunit-at-a-time.
821
822 2005-03-29  Richard Henderson  <rth@redhat.com>
823
824         PR c/20519
825         * decl.c (cp_complete_array_type): Rename from complete_array_type.
826         Use the new complete_array_type in c-common.c.  Update all callers.
827         * cp-tree.h (cp_complete_array_type): Update to match.
828
829 2005-03-24  Geoffrey Keating  <geoffk@apple.com>
830
831         * typeck.c (build_static_cast_1): Allow scalar_cast between
832         any integral, floating, or enumeration type.
833
834 2005-03-24  Steven Bosscher  <stevenb@suse.de>
835
836         * typeck.c (comptypes): First determine if the types are compatible
837         from a target-independent point of view.  Check target attributes
838         last.
839
840         * class.c (build_base_path):
841         (build_vbase_offset_vtbl_entries):
842         (add_vcall_offset): Replace fold (buildN (...)) with fold_buildN.
843         * error.c (dump_expr): Likewise.
844         * init.c (build_zero_init, expand_cleanup_for_base,
845         build_vec_delete_1): Likewise.
846         * mangle.c (write_integer_cst): Likewise.
847         * method.c (thunk_adjust): Likewise.
848         * pt.c (convert_nontype_argument, tsubst, unify): Likewise.
849         * tree.c (cxx_print_statistics, array_type_nelts_total): Likewise.
850         * typeck.c (build_ptrmemfunc_access_expr,
851         (get_member_function_from_ptrfunc): Likewise.
852
853 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
854
855         * cp-objcp-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
856
857 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
858
859         * cp-tree.h (perform_integral_promotions): Remove.
860         (default_conversion): Add.
861
862 2005-03-22  Mark Mitchell  <mark@codesourcery.com>
863
864         * parser.c (cp_parser_warn_min_max): New function.
865         (cp_parser_binary_expression): Use it.
866         (cp_parser_assignment_operator_opt): Likewise.
867         (cp_parser_operator): Likewise.
868
869 2005-03-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
870
871         PR c++/19980
872         * decl.c (start_preparsed_function): Robustify.
873
874 2005-03-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
875
876         PR c++/20499
877         * parser.c (cp_parser_class_head): Return NULL_TREE when
878         encountering a redefinition.
879
880 2005-03-22  Nathan Sidwell  <nathan@codesourcery.com>
881
882         PR c++/20465
883         PR c++/20381
884         * typeck.c (build_ptrmemfunc): Allow OFFSET_REF when processing a
885         template.
886
887 2005-03-21  Paolo Carlini  <pcarlini@suse.de>
888
889         PR c++/20461
890         PR c++/20536
891         * init.c (emit_mem_initializers): Don't crash on undefined
892         types.
893
894 2005-03-21  Paolo Carlini  <pcarlini@suse.de>
895
896         PR c++/20147
897         * semantics.c (finish_stmt_expr_expr): Return immediately
898         if error_operand_p (expr).
899
900 2005-03-21  Joseph S. Myers  <joseph@codesourcery.com>
901
902         * cp-tree.h (lvalue_or_else, lvalue_p): New.
903         * typeck.c (lvalue_or_else): New.  Call lvalue_error.
904
905 2005-03-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
906
907         PR c++/20240
908         * decl.c (decls_match): Compare context of VAR_DECL.
909
910 2005-03-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
911
912         PR c++/20333
913         * parser.c (cp_parser_postfix_expression) <case RID_TYPENAME>:
914         Check the return value of cp_parser_nested_name_specifier.
915
916 2005-03-18  Dale Johannesen <dalej@apple.com>
917
918         * cp/tree.c (cp_tree_equal):  Handle SSA_NAME.
919
920 2005-03-18  Paolo Carlini  <pcarlini@suse.de>
921
922         PR c++/20463
923         * parser.c (cp_parser_diagnose_invalid_type_name):
924         Check TYPE_BINFO (current_class_type) before attempting
925         to emit inform messages.
926
927 2005-03-17  Paolo Carlini  <pcarlini@suse.de>
928
929         PR c++/19966
930         * cp-tree.h (grok_op_properties): Change return type to void.
931         * decl.c (grok_op_properties): Return early - don't check the
932         arity - in case of a static member or an operator that cannot
933         be non-member; tidy a bit.
934
935 2005-03-17  Nathan Sidwell  <nathan@codesourcery.com>
936
937         PR c++/20186
938         * pt.c (contains_dependent_cast_p): Remove.
939         (fold_non_dependent_expr): Don't use it.
940         (value_dependent_expression_p): Use a switch statement.
941         reference_exprs can be dependent.
942
943 2005-03-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
944
945         PR c++/4403
946         PR c++/9783, DR433
947         * name-lookup.c (pushtag): Skip template parameter scope when
948         scope is ts_global.  Don't push tag into template parameter
949         scope.
950         * pt.c (instantiate_class_template): Reorder friend class
951         template substitution to handle non-dependent friend class
952         that hasn't been previously declared.
953
954 2005-03-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
955
956         Friend class name lookup 5/n
957         PR c++/1016
958         * cp-tree.h (pushtag): Adjust declaration.
959         * decl.c (lookup_and_check_tag): Call lookup_type_scope if
960         lookup_name fails.
961         (xref_tag): Adjust call to pushtag.  Make hidden class visible.
962         (start_enum): Adjust call to pushtag.
963         * name-lookup.c (ambiguous_decl): Ignore hidden names.
964         (qualify_lookup): Change return type to bool.
965         (hidden_name_p): New function.
966         (lookup_namespace_name, unqualified_namespace_lookup,
967         lookup_name_real): Use it.
968         (lookup_type_scope): Update comments.
969         (maybe_process_template_type_declaration): Change parameter name
970         from globalize to is_friend.
971         (pushtag): Change globalize parameter of type int to tag_scope.
972         Hide name if introduced by friend declaration.
973         * name-lookup.h (hidden_name_p): Add declaration.
974         * parser.c (cp_parser_lookup_name): Don't deal with hidden name
975         here.
976         * pt.c (push_template_decl_real): Make hidden class template
977         visible.
978         (lookup_template_class, instantiate_class_template): Adjust call
979         to pushtag.
980         * semantics.c (begin_class_definition): Likewise.
981         * rtti.c (init_rtti_processing, build_dynamic_cast_1, 
982         tinfo_base_init, emit_support_tinfos): Use ts_current instead of
983         ts_global.
984
985 2005-03-13  Mark Mitchell  <mark@codesourcery.com>
986
987         PR c++/20157
988         * pt.c (determine_specialization): Reject non-specializations. 
989
990 2005-03-11  Per Bothner  <per@bothner.com>
991
992         * cp-tree.h (struct cp_declarator): New id_loc field.
993         * cp/parser.c (cp_lexer_get_preprocessor_token): Set cp_token's
994         location using c_lex_with_flags, instead of input_location.
995         (cp_parser_direct_declarator): Set declarator's id_loc from
996         cp_token's id_loc.
997
998 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
999
1000         PR c++/18384, c++/18327
1001         * decl.c (reshape_init_array): Use UHWI type for max_index_cst
1002         and index.  Convert max_index to size_type_node if it isn't
1003         host_integerp (, 1).
1004
1005 2005-03-09  Mark Mitchell  <mark@codesourcery.com>
1006
1007         PR c++/20208
1008         * pt.c (tsubst_decl): Apply array-to-pointer and
1009         function-to-pointer conversions to function arguments.
1010         (regenerate_decl_from_template): Likewise.
1011
1012 2005-03-09  Paolo Carlini  <pcarlini@suse.de>
1013
1014         PR c++/16859    
1015         * decl.c (complete_array_type): In pedantic mode, return
1016         3 for an empty initializer list as the initializer for an
1017         array of unknown bound (8.5.1/4).
1018         (maybe_deduce_size_from_array_init): Fix final test to use
1019         the above.
1020
1021 2005-03-08  Nathan Sidwell  <nathan@codesourcery.com>
1022
1023         PR c++/20186
1024         * pt.c (contains_dependent_cast_p): New.
1025         (fold_non_dependent_expr): Call it.
1026
1027 2005-03-08  Mark Mitchell  <mark@codesourcery.com>
1028
1029         PR c++/20142
1030         * cp-tree.h (target_type): Remove.
1031         * decl.c (layout_var_decl): Remove #if 0'd code.
1032         (cp_finish_decl): Remove dead code.
1033         * init.c (build_vec_init): When determining whether or not the
1034         element type has an asignment operator, look through all array
1035         dimensions. 
1036         * typeck.c (target_type): Remove.
1037
1038 2005-03-07  Mark Mitchell  <mark@codesourcery.com>
1039
1040         * class.c (finish_struct_1): Do not warn about non-virtual
1041         destructors in Java classes.
1042
1043 2005-03-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1044
1045         PR c++/19311
1046         * init.c (build_offset_ref): Don't build non-dependent SCOPE_REF.
1047         * pt.c (build_non_dependent_expr): Don't build NON_DEPENDENT_EXPR
1048         for OFFSET_TYPE.
1049         * typeck.c (build_x_unary_op): Don't build non-dependent SCOPE_REF.
1050         Also set PTRMEM_OK_P for NON_DEPENDENT_EXPR.
1051         (build_unary_op): Handle building ADDR_EXPR of OFFSET_REF inside
1052         template.
1053
1054 2005-03-02  Alexandre Oliva  <aoliva@redhat.com>
1055
1056         * name-lookup.c (push_overloaded_decl): Don't error if the new
1057         decl matches the old one.
1058         * decl.c (redeclaration_error_message): Likewise.
1059
1060 2005-03-01  Per Bothner  <per@bothner.com>
1061
1062         * decl.c (finish_function): Use SET_EXPR_LOCATION instead of
1063         unavailable annotate_with_file_line, if USE_MAPPED_LOCATION.
1064
1065 2005-03-01  Nathan Sidwell  <nathan@codesourcery.com>
1066
1067         PR c++/20232
1068         * class.c (update_vtable_entry_for_fn): Don't crash on invalid
1069         covariancy. 
1070
1071         * cp-tree.g (THUNK_TARGET): Expand comment.
1072         * method.c (use_thunk): Make sure we also use the target, if that
1073         is a thunk.
1074
1075 2005-02-27  Jakub Jelinek  <jakub@redhat.com>
1076
1077         PR c++/20206
1078         * decl.c (cxx_comdat_group): Put thunks for
1079         TARGET_USE_LOCAL_THUNK_ALIAS_P (function) functions into the same
1080         comdat group as the thunk target.
1081
1082 2005-02-24  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1083
1084         * call.c, class.c, cp-tree.h, decl2.c, error.c, init.c, mangle.c,
1085         parser.c: Fix comment typo(s).
1086
1087 2005-02-24  Jakub Jelinek  <jakub@redhat.com>
1088
1089         PR c++/20175
1090         * decl.c (reshape_init): Don't warn about missing braces if STRING_CST
1091         initializes a char/wchar_t array.
1092
1093 2005-02-23  Mark Mitchell  <mark@codesourcery.com>
1094
1095         PR c++/19878
1096         * decl.c (grokvardecl): Set DECL_INTERFACE_KNOWN for declarations
1097         with internal linkage.
1098
1099 2005-02-23  Alexandre Oliva  <aoliva@redhat.com>
1100
1101         * decl.c (grokvardecl): Don't exempt anonymous types from having
1102         linkage for variables that have linkage other than "C".
1103
1104 2005-02-23  Kazu Hirata  <kazu@cs.umass.edu>
1105
1106         * cp-objcp-common.h, error.c: Update copyright.
1107
1108 2005-02-22  Mark Mitchell  <mark@codesourcery.com>
1109
1110         PR c++/20073
1111         * decl.c (start_decl_1): Don't clear TREE_READONLY.
1112         (cp_finish_decl): Likewise.
1113         (complete_vars): Call cp_apply_type_quals_to_decl.
1114         * typeck.c (cp_apply_type_quals): Avoid setting TREE_READONLY in
1115         cases where that's not valid.
1116
1117         PR c++/19991
1118         * init.c (integral_constant_value): Iterate if the value of a decl
1119         is itself a constant.
1120
1121         PR c++/20152
1122         * parser.c (cp_parser_class_head): Check for redefintions here.
1123         * semantics.c (begin_class_definition): Not here.
1124         
1125         PR c++/20153
1126         * decl2.c (build_anon_union_vars): Add type parameter.
1127         (finish_anon_union): Pass it.
1128
1129         PR c++/20148
1130         * error.c (dump_expr): Do not print the body of a BIND_EXPR.
1131         Handle STATEMENT_LIST.
1132
1133         PR c++/19883
1134         * parser.c (cp_parser_direct_declarator): Always complain about
1135         non-constant array bounds when in a function scope.
1136         * semantics.c (finish_id_expression): Do not mark dependent names
1137         as non-constant. 
1138
1139 2005-02-21  Douglas Gregor  <dgregor@cs.indiana.edu>
1140         
1141         PR c++/19076
1142         PR c++/6628
1143         * cp-tree.h (cp_apply_type_quals_to_decl): Declared.
1144         * decl.c (grokdeclarator): Pedwarn about qualifying a function
1145         type. 
1146         Add qualifiers when declaring a typedef of a function type.
1147         Member function pointers pick up the qualifiers of the typedef
1148         used to declare them.
1149         Don't complain about creating cv-qualified function types.
1150         Complain about qualified function typedefs that are used to
1151         declare non-static member functions or free functions.
1152         Use cp_apply_type_quals_to_decl.
1153         (start_preparsed_function): Use cp_apply_type_quals_to_decl.
1154         (grokclassfn): Use cp_apply_type_quals_to_decl.
1155         * error.c (dump_type_suffix): Print qualifiers for function
1156         types. 
1157         * pt.c (tsubst_decl): Use cp_apply_type_quals_to_decl.
1158         (tsubst): When substituting a function type into a member
1159         pointer type, pass along the qualifiers.
1160         (unify): Unify member pointers to member function pointers.
1161         * tree.c (cp_build_qualified_type_real): Function types may be
1162         qualified. This includes restrict qualifiers.
1163         * typeck.c (cp_apply_type_quals_to_decl): New function to replace
1164         use of c_apply_type_quals_to_decl. Drops qualifiers that are being
1165         added to function types.
1166
1167 2005-02-20  Zack Weinberg  <zack@codesourcery.com>
1168
1169         PR 18785
1170         * cp-objcp-common.h (LANG_HOOKS_TO_TARGET_CHARSET): Set to
1171         c_common_to_target_charset.  Delete bogus comment.
1172
1173 2005-02-18  Richard Henderson  <rth@redhat.com>
1174
1175         PR libstdc++/10606
1176         * except.c (do_get_exception_ptr): New.
1177         (expand_start_catch_block): Use it.
1178
1179 2005-02-19  Jakub Jelinek  <jakub@redhat.com>
1180
1181         * decl.c (start_decl_1): Only check TYPE_NEEDS_CONSTRUCTING
1182         if type is not error_mark_node.
1183
1184 2005-01-20  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1185
1186         PR c++/19508
1187         * decl2.c (grokfield): Do not apply attributes to template parameters
1188         as they are ignored by tsubst anyway.
1189
1190 2005-02-18  Jakub Jelinek  <jakub@redhat.com>
1191
1192         PR c++/19813
1193         * decl.c (start_decl_1): Clear TREE_READONLY flag if
1194         its type has TYPE_NEEDS_CONSTRUCTING.
1195         (complete_vars): Likewise.
1196
1197 2005-02-17  Alexandre Oliva  <aoliva@redhat.com>
1198
1199         PR c++/20028
1200         * class.c (finish_struct): Initialize TYPE_SIZE_UNIT of a
1201         template along with TYPE_SIZE.
1202
1203         PR c++/20022
1204         * semantics.c (perform_deferred_access_checks): Use
1205         get_deferred_access_checks to get the top of the stack.
1206
1207 2005-02-15  Alexandre Oliva  <aoliva@redhat.com>
1208
1209         PR c++/17788
1210         * class.c (add_implicitly_declared_members, check_field_decl)
1211         (check_field_decls, check_bases): Remove arguments, tests and
1212         assignments of cant_have_default_ctor-related variables.
1213
1214 2005-02-15  Alexandre Oliva  <aoliva@redhat.com>
1215
1216         * decl2.c (mark_used): Set the source location of the used decl to
1217         the current input location here...
1218         * method.c (synthesize_method): ... not here.  Set input_location
1219         from the decl instead.
1220
1221 2005-02-14  Nathan Sidwell  <nathan@codesourcery.com>
1222
1223         PR c++/19608
1224         * parser.c (cp_parser_late_parsing_for_member): Use
1225         current_function_decl as scope to push to and from.
1226
1227         PR c++/19884
1228         * pt.c (check_explicit_specialization): Make sure namespace
1229         binding lookup found an overloaded function.
1230         (lookup_template_function): Just assert FNS is an overloaded
1231         function.
1232
1233         PR c++/19895
1234         * decl.c (grokdeclarator): Check for error mark node in ptrmem
1235         construction.
1236
1237 2005-02-14  Alexandre Oliva  <aoliva@redhat.com>
1238
1239         PR c++/17816
1240         * decl.c (redeclaration_error_message): Report redefinition of
1241         pure virtual function.
1242
1243 2005-02-14  Nathan Sidwell  <nathan@codesourcery.com>
1244
1245         PR c++/19891
1246         * class.c (build_simple_base_path): Build the component_ref
1247         directly.
1248         (update_vtable_entry_for_fn): Walk the covariant's binfo chain
1249         rather than using lookup_base.
1250         * search.c (dfs_walk_once): Add non-recursive assert check.
1251         * typeck.c (build_class_member_access_expr): It is possible for
1252         the member type to be both const and volatile.
1253
1254 2005-02-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1255
1256         PR c++/14479
1257         PR c++/19487
1258         * pt.c (maybe_check_template_type): Remove.
1259         * cp-tree.h (maybe_check_template_type): Remove prototype.
1260         * name-lookup.c (maybe_process_template_type_declaration): Don't
1261         use maybe_check_template_type.
1262
1263 2005-02-11  Richard Henderson  <rth@redhat.com>
1264
1265         PR c++/19632
1266         * pt.c (get_mostly_instantiated_function_type): Save and restore
1267         flag_access_control instead of push/pop_access_scope.
1268
1269 2005-02-10  Mark Mitchell  <mark@codesourcery.com>
1270
1271         PR c++/19755
1272         * decl.c (reshape_init): Issue warnings about missing braces.
1273
1274 2005-02-11  Kazu Hirata  <kazu@cs.umass.edu>
1275
1276         * cp-tree.def, except.c, ptree.c: Update copyright.
1277
1278 2005-02-09  Mark Mitchell  <mark@codesourcery.com>
1279
1280         PR c++/19811
1281         * call.c (build_op_delete_call): Check COMPLETE_TYPE_P before
1282         attempting name lookup.
1283
1284         * parser.c (cp_parser_unqualified_id): Initialize type_decl.
1285
1286         PR c++/19787
1287         * call.c (initialize_reference): Robustify.
1288
1289         PR ++/19732
1290         * decl.c (grokdeclarator): Check for invalid use of destructor
1291         names.
1292
1293         PR c++/19762
1294         * parser.c (cp_parser_unqualified_id): Avoid creating destructor
1295         names with invalid types.
1296
1297         PR c++/19826
1298         * parser.c (cp_parser_direct_declarator): Allow type-dependent
1299         expressions as array bounds.
1300
1301         PR c++/19739
1302         * parser.c (cp_parser_attributes_list): Allow empty lists.
1303
1304 2005-02-08  Mark Mitchell  <mark@codesourcery.com>
1305
1306         PR c++/19733
1307         * class.c (add_method): Don't set TYPE_HAS_DESTRUCTOR.
1308         (check_bases): Give warnings about a base class with a
1309         non-virtual destructor, even if it is implicit.
1310         (finish_struct_bits): Don't copy TYPE_HAS_DESTRUCTOR.
1311         (maybe_warn_about_overly_private_class): Don't use
1312         TYPE_HAS_DESTRUCTOR.
1313         (finish_struct_methods): Don't set TYPE_HAS_DESTRUCTOR.
1314         (check_for_override): Give it external linkage.
1315         (add_implicitly_declared_members): Generate destructors lazily.
1316         (check_field_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
1317         TYPE_HAS_DESTRUCTOR.
1318         (check_bases_and_members): Call check_methods before
1319         check_field_decls.
1320         (check_bases_and_members): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
1321         TYPE_HAS_DESTRUCTOR.
1322         (finish_struct_1): Do not use TYPE_HAS_DESTRUCTOR.
1323         * cp-tree.def (PSEUDO_DTOR_EXPR): Document.
1324         * cp-tree.h (TYPE_HAS_DESTRUCTOR): Remove.
1325         (lang_type_class): Add lazy_destructor.
1326         (CLASSTYPE_LAZY_DESTRUCTOR): New macro.
1327         (CLASSTYPE_DESTRUCTORS): Robustify.
1328         (TYPE_HAS_DESTRUCTOR): Remove.
1329         (check_for_override): Declare.
1330         (build_vbase_delete): Remove.
1331         * cvt.c (convert_to_void): Issue errors about pseudo-destructor
1332         expressions.
1333         * decl.c (cxx_maybe_build_cleanup): Remove dead code.
1334         * except.c (dtor_nothrow): Lazily create destructors if necessary.
1335         (build_throw): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
1336         * init.c (build_delete): Lazily create destructors, if necessary.
1337         (build_vbase_delete): Remove.
1338         * method.c (locate_dtor): Simplify.
1339         (implicitly_declare_fn): Add support for destructors.
1340         * parser.c (cp_parser_lookup_name): Lazily create destructors, if
1341         necessary.
1342         * pt.c (check_explicit_specialization): Don't use
1343         TYPE_HAS_DESTRUCTOR.
1344         (instantiate_class_template): Likewise.
1345         * ptree.c (cxx_print_type): Don't print TYPE_HAS_DESTRUCTOR.
1346         * rtti.c (emit_support_tinfos): Robustify.
1347         * search.c (lookup_fnfields_1): Lazily create destructors.
1348         * typeck.c (build_class_member_access_expr): Remove
1349         PSEUDO_DTOR_EXPR handling.
1350         (lookup_destructor): Likewise.
1351
1352 2005-02-08  Kazu Hirata  <kazu@cs.umass.edu>
1353
1354         * cxx-pretty-print.c, cxx-pretty-print.h, decl.h: Update
1355         copyright.
1356
1357 2005-02-07  Mark Mitchell  <mark@codesourcery.com>
1358
1359         * parser.c (cp_lexer_start_debugging): Avoid arithmetic operations
1360         on boolean variables.
1361         (cp_lexer_stop_debugging): Likewise.
1362
1363 2005-02-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1364
1365         PR c++/17401
1366         * parser.c (cp_parser_pure_specifier): Emit a specific error
1367         message with an invalid pure specifier.
1368         * decl2.c (grok_function_init): Remove.
1369         (grokfield): An initializer for a method is a always a pure
1370         specifier.
1371
1372 2005-02-02  Matt Austern  <austern@apple.com>
1373
1374         PR c++/19628
1375         * cp-tree.h (builtin_valid_in_constant_expr_p): Declare.
1376         * parser.c (cp_parser_postfix_expression): Accept function call in
1377         constant expression if builtin_valid_in_constant_expr_p is true
1378         for that function.
1379         * pt.c (value_dependent_expression_p): Handle CALL_EXPRs properly.
1380         * semantics.c (finish_id_expression): Accept function call in constant
1381         expression if builtin_valid_in_constant_expr_p is true for that
1382         function.
1383         * tree.c (builtin_valid_in_constant_expr_p): New.
1384
1385 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1386
1387         PR c++/17413
1388         * pt.c (check_instantiated_args): Improve error message.
1389         Fix logic when to print its second part.
1390
1391 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1392
1393         * cp-tree.h (complete_type_or_else): Remove macro.
1394         (complete_type_or_diagnostic): Rename to complete_type_or_else
1395         and remove last argument.
1396         * typeck.c (complete_type_or_diagnostic): Rename to
1397         complete_type_or_else and remove last argument.
1398
1399 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1400
1401         * cp-tree.h (commonparms): Remove prototype.
1402         (convert_arguments): Likewise.
1403         (PFN_FROM_PTRMEMFUNC): Remove.
1404         * typeck.c (commonparms): Make static.
1405         (convert_arguments): Add prototype. Make static.
1406         (PFN_FROM_PTRMEMFUNC): Replace by pfn_from_ptrmemfunc.
1407
1408 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
1409
1410         * parser.c (cp_parser_primary_expression): Don't complain about
1411         floating-point literals in integral constant expressions when
1412         !pedantic.
1413
1414 2005-02-01  Alexandre Oliva  <aoliva@redhat.com>
1415
1416         * parser.c (cp_parser_template_id): Revert comment patch too.
1417
1418         PR c++/18757
1419         PR c++/19366
1420         PR c++/19499
1421         * parser.c (cp_parser_template_id): Revert 2004-12-09's patch.
1422         Issue an error when creating the template id.
1423         * pt.c (fn_type_unification): Return early if the explicit
1424         template arg list is an error_mark_node.
1425
1426 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
1427
1428         * decl.c (build_enumerator): Do not issue duplicate error messages
1429         about invalid enumeration constants.
1430         * parser.c (cp_parser_non_integral_constant_expression): Always
1431         set parser->non_integral_constant_expression_p.
1432         (cp_parser_primary_expression): Add cast_p parameter.  Issue
1433         errors about invalid uses of floating-point literals in
1434         cast-expressions.
1435         (cp_parser_postfix_expression): Add cast_p parameter.
1436         (cp_parser_open_square_expression): Pass it.
1437         (cp_parser_parenthesized_expression_list): Add cast_p parameter.
1438         (cp_parser_unary_expression): Likewise.
1439         (cp_parser_new_placement): Pass it.
1440         (cp_parser_direct_new_declarator): Likewise.
1441         (cp_parser_new_initializer): Likewise.
1442         (cp_parser_cast_expression): Add cast_p parameter.
1443         (cp_parser_binary_expression): Likewise.
1444         (cp_parser_question_colon_clause): Likewise.
1445         (cp_parser_assignment_expression): Likewise.
1446         (cp_parser_expression): Likewise.
1447         (cp_parser_constant_expression): If an integral constant
1448         expression is invalid, return error_mark_node.
1449         (cp_parser_expression_statement): Pass cast_p.
1450         (cp_parser_condition): Likewise.
1451         (cp_parser_iteration_statement): Likewise.
1452         (cp_parser_jump_statement): Likewise.
1453         (cp_parser_mem_initializer): Likewise.
1454         (cp_parser_template_argument): Likewise.
1455         (cp_parser_parameter_declaration): Likewise.
1456         (cp_parser_initializer): Likewise.
1457         (cp_parser_throw_expression): Likewise.
1458         (cp_parser_attribute_list): Likewise.
1459         (cp_parser_simple_cast_expression): Likewise.
1460         (cp_parser_functional_cast): Likewise.
1461         (cp_parser_late_parsing_default_args): Likewise.
1462         (cp_parser_sizeof_operand): Save/restore
1463         non_integral_constant_expression_p.
1464
1465 2005-01-31  Mike Stump  <mrs@apple.com>
1466
1467         * parser.c (cp_lexer_new_main): Get the first token, first, before
1468         doing anything.
1469
1470 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
1471
1472         * decl.c (start_decl): Add missing parentheses.
1473
1474 2005-01-30  Mark Mitchell  <mark@codesourcery.com>
1475
1476         PR c++/19555
1477         * cp-tree.h (DECL_USE_TEMPLATE): Expand documentation.
1478         * decl.c (duplicate_decls): Do not discard
1479         DECL_IMPLICIT_INSTANTIATION when merging declarations.
1480         (start_decl): Do not SET_DECL_TEMPLATE_SPECIALIZATION for
1481         variables that do not have DECL_USE_TEMPLATE.
1482
1483         PR c++/19395
1484         * decl.c (grokdeclarator): Refactor code so that qualified names
1485         are never allowed as the declarator in a typedef.
1486
1487         PR c++/19367
1488         * name-lookup.c (do_nonmember_using_decl): Avoid overloading
1489         builtin declarations.
1490
1491         PR c++/19457
1492         * call.c (convert_like_real): Inline call to
1493         dubious_conversion_warnings here.
1494         * cp-tree.h (dubious_conversion_warnings): Remove.
1495         * semantics.c (finish_unary_op_expr): Copy INTEGER_CSTs before
1496         setting TREE_NEGATED_INT.
1497         * typeck.c (dubious_conversion_warnings): Remove.
1498
1499         PR c++/19349
1500         * name-lookup.c (pushdecl_namespace_level): Avoid accessing free'd
1501         memory.
1502
1503 2005-01-28  Mark Mitchell  <mark@codesourcery.com>
1504
1505         PR c++/19253
1506         * parser.c (cp_parser_diagnose_invalid_type_name): Commit to
1507         tentative parses.
1508
1509         PR c++/19667
1510         * pt.c (redeclare_class_template): Robustify.
1511
1512 2005-01-27  Steven Bosscher  <stevenb@suse.de>
1513
1514         * decl.c (finish_case_label): Use SWITCH_STMT accessor macros
1515         instead of SWITCH_EXPR ones.
1516         * pt.c (tsubst_expr): Likewise.
1517         * semantics.c (begin_switch_stmt, finish_switch_cond,
1518         finish_switch_stmt): Likewise.
1519
1520 2005-01-26  J"orn Rennecke <joern.rennecke@st.com>
1521
1522         PR c++/18370
1523         * parser.c (cp_parser_initializer_clause): Initialize *non_constant_p.
1524
1525 2005-01-25  Andrew Pinski  <pinskia@physics.uc.edu>
1526
1527         * class.c (abort_fndecl_addr): New variable.
1528         (build_vtbl_initializer): If we have a pure virtual function
1529         share the abort function's address.
1530         Include gt-cp-class.h at the end.
1531         * config-lang.in (gtfiles): Add cp/class.c.
1532
1533 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1534
1535         * cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static.
1536         (pp_cxx_function_definition): Make static.
1537         * cxx-pretty-print.h (pp_cxx_statement): Remove prototype.
1538         (pp_cxx_function_definition): Likewise.
1539
1540 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1541
1542         * name-lookup.c (print_binding_level): Make static.
1543         (constructor_name_full): Make static inline.
1544         (current_decl_namespace): Make static.
1545         * name-lookup.h (constructor_name_full): Remove prototype.
1546         (print_binding_level): Likewise.
1547         (current_decl_namespace): Likewise.
1548
1549 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1550
1551         * decl.h (debug_bindings_indentation): Remove.
1552
1553 2005-01-23  Kazu Hirata  <kazu@cs.umass.edu>
1554
1555         * typeck.c: Fix a comment typo.
1556
1557 2005-01-21  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1558
1559         PR c++/19208
1560         * pt.c (fold_decl_constant_value): Always call fold_non_dependent_expr
1561         at least once.
1562         (tsubst): Use fold_decl_constant_value in place of a bare call to
1563         integral_constant_value.
1564
1565 2005-01-20  Kazu Hirata  <kazu@cs.umass.edu>
1566
1567         * typeck.c (more_qualified_p): Remove.
1568         * cp-tree.h: Remove the corresponding prototype.
1569
1570 2005-01-19  Matt Austern  <austern@apple.com>
1571
1572         * typeck.c (comptypes): Handle return code from objc_comptypes
1573         correctly.
1574
1575 2005-01-19  Kazu Hirata  <kazu@cs.umass.edu>
1576
1577         * cp-tree.h, name-lookup.h: Remove unused prototypes.
1578
1579 2005-01-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1580
1581         PR c++/19375
1582         * semantics.c (finish_id_expression): Disable access checking for
1583         already lookuped FIELD_DECL.
1584
1585 2005-01-18  Kazu Hirata  <kazu@cs.umass.edu>
1586
1587         * decl.c (delete_block): Remove.
1588         * cp-tree.h: Remove the corresponding prototype.
1589
1590         * decl.c (vtable_decl_p, vtype_decl_p, walk_globals_data,
1591         walk_vtables_r, walk_vtables, walk_globals_r, walk_globals):
1592         Remove.
1593         * cp-tree.h: Remove the corresponding prototypes.
1594
1595         * tree.c (count_functions, bound_pmf_p, cp_is_overload_p,
1596         cp_update_decl_after_saving, name_p): Remove.
1597         * cp-tree.h: Remove the corresponding prototypes.
1598
1599 2005-01-18  Andrew Pinski  <pinskia@physics.uc.edu>
1600
1601         PR c/19472
1602         * semantics.c (finish_asm_stmt): Strip nops off
1603         input memory operands.
1604
1605 2005-01-18  Kazu Hirata  <kazu@cs.umass.edu>
1606
1607         * Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c,
1608         typeck2.c: Update copyright.
1609
1610 2005-01-16  Kazu Hirata  <kazu@cs.umass.edu>
1611
1612         * class.c (get_enclosing_class): Remove.
1613         * cp-tree.h: Remove the corresponding prototypes.
1614
1615         * cvt.c (convert_lvalue): Remove.
1616         * cp-tree.h: Remove the corresponding prototype.
1617
1618         * pt.c (tinst_for_decl): Remove.
1619         * cp-tree.h: Remove the corresponding prototypes.
1620
1621         * tree.c (hash_chainon): Remove.
1622         * cp-tree.h: Remove the corresponding prototypes.
1623
1624 2005-01-15  Jakub Jelinek  <jakub@redhat.com>
1625
1626         PR c++/19263
1627         * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
1628         of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
1629
1630 2005-01-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1631
1632         * Make-lang.in (cp-warn): Don't append $(WERROR).
1633
1634 2005-01-10  Kazu Hirata  <kazu@cs.umass.edu>
1635
1636         * cp-tree.h: Fix a comment typo.
1637
1638 2005-01-07  Nathan Sidwell  <nathan@codesourcery.com>
1639
1640         PR c++/19298
1641         * pt.c (tsubst_qualified_id): Call convert_from_reference.
1642
1643 2005-01-06  Mark Mitchell  <mark@codesourcery.com>
1644
1645         PR c++/19244
1646         * class.c (add_implicitly_declared_members): Remove dead code.
1647         * decl.c (grokfndecl): Add sfk parameter.  Use it do set
1648         DECL_CONSTRUCTOR_P.
1649         (grokdeclarator): Adjust calls to grokfndecl.
1650         * method.c (implicitly_declare_fn): Improve documentation.
1651         * parser.c (cp_parser_direct_declarator): Do not consider a
1652         function to be a constructor if the containing class was
1653         originally anonymous.
1654
1655 2005-01-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1656
1657         PR c++/17154
1658         * search.c (lookup_field_1): Handle using declaration in
1659         class template partial specialization.
1660
1661 2005-01-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1662
1663         PR c++/19258
1664         * pt.c (push_access_scope): Handle friend defined in class.
1665         (pop_access_scope): Likewise.
1666
1667 2005-01-06  Nathan Sidwell  <nathan@codesourcery.com>
1668
1669         PR c++/19270
1670         * pt.c (tsubst_copy) <ARRAY_REF case>: Handle separately.
1671         (tsubst_copy_and_build) <ARRAY_REF case>: Remove obsolete
1672         array-new handling code.  Use build_x_binary_op.
1673
1674 2005-01-05  Nathan Sidwell  <nathan@codesourcery.com>
1675
1676         PR c++/19030
1677         * cp-tree.h (start_decl): Take pointer to pushed scope, not bool.
1678         * name-lookup.h (push_scope): Return pushed scope, not flag.
1679         * name-lookup.c (push_scope): Return scope that should be popped,
1680         not a flag.
1681         * decl.c (start_decl): Adjust.
1682         (grokfndecl): Adjust scope push and pop.
1683         * decl2.c (check_classfn): Likewise.
1684         * parser.c (cp_parser_condition, cp_parser_conversion_function_id,
1685         cp_parser_init_declarator, cp_parser_direct_declarator,
1686         cp_parser_class_specifier, cp_parser_class_head,
1687         cp_parser_lookup_name,
1688         cp_parser_constructor_declarator_p): Likewise.
1689         * pt.c (instantiate_class_template,
1690         resolve_typename_type): Likewise.
1691
1692 2005-01-03  Volker Reichelt  <reichelt@igpm.rwth-aaachen.de>
1693
1694         PR c++/14136
1695         * parser.c (cp_parser_unqualified_id): Do not issue error message
1696         for typedef-name as destructor declarator when performing an
1697         uncommitted tentative parse.
1698
1699 2005-01-01  Steven Bosscher  <stevenb@suse.de>
1700
1701         PR middle-end/17544
1702         * decl.c (finish_function): Fix comment.  Annotate the compiler
1703         generated return with the current file name and line 0.
1704
1705 2004-12-31  Richard Henderson  <rth@redhat.com>
1706
1707         PR middle-end/17799
1708         * call.c (make_temporary_var_for_ref_to_temp): Set DECL_IGNORED_P.
1709         * class.c (build_vtable): Don't conditionallize setting it
1710         based on DWARF2_DEBUG.
1711         (layout_class_type): Set DECL_IGNORED_P.
1712         * decl2.c (get_guard): Likewise.
1713         * rtti.c (get_tinfo_decl, build_lang_decl): Likewise.
1714         * tree.c (build_local_temp): Likewise.
1715
1716 2004-12-30  Mark Mitchell  <mark@codesourcery.com>
1717
1718         * cp-tree.h (cp_declarator): Split "name" field into
1719         qualifying_scope and unqualified_name.
1720         * decl.c (get_scope_of_declarator): Adjust accordingly.
1721         (grokdeclarator): Likewise.
1722         * decl2.c (grokfield): Likewise, and adjust call to
1723         do_class_using_decl.
1724         * name-lookup.c (do_class_using_decl): Split "decl" into
1725         "scope" and "name".  Remove unnecessary code.
1726         * name-lookup.h (do_class_using_decl): Adjust declaration.
1727         * parser.c (make_id_declarator): Split "id" into qualifying_scope
1728         and unqualified_name.
1729         (cp_parser_using_declaration): Adjust call to do_class_using_decl.
1730         (cp_parser_direct_declarator): Adjust to handle the fact that
1731         cp_parser_declarator_id no longer returns a SCOPE_REF.
1732         (cp_parser_direct_declarator): Likewise.
1733         (cp_parser_declarator_id): Do not create a SCOPE_REF for qualified
1734         names.
1735         (cp_parser_member_declaration): Adjust call to make_id_declarator.
1736         (cp_parser_check_declarator_template_parameters): Do not expect a
1737         SCOPE_REF.
1738
1739         * decl.c (duplicate_decls): Call ggc_free on declarations we will
1740         not be needing any longer.
1741
1742         PR c++/19190
1743         * cvt.c (convert_to_void): Do not use STRIP_NOPs.
1744
1745 2004-12-28  Richard Henderson  <rth@redhat.com>
1746
1747         PR inline-asm/15740
1748         * semantics.c (finish_asm_stmt): Resolve asm names.  Validate input
1749         constraints.  Mark memory inputs addressable.
1750
1751 2004-12-27  Jason Merrill  <jason@redhat.com>
1752
1753         * decl.c (expand_static_init): Don't use shortcut if
1754         targetm.relaxed_ordering.
1755
1756 2004-12-27  Mark Mitchell  <mark@codesourcery.com>
1757
1758         PR c++/19149
1759         * decl.c (check_tag_decl): Robustify.
1760
1761 2004-12-23  Mark Mitchell  <mark@codesourcery.com>
1762
1763         PR c++/17595
1764         * parser.c (cp_parser_error): Issue better messages about
1765         #pragma in locations where it is not permitted.
1766
1767         PR c++/17413
1768         * pt.c (check_instantiated_args): Remove bogus SFINAE code.
1769
1770         * cvt.c (convert_to_void): Fix typo in comment.
1771
1772 2004-12-23  Alexandre Oliva  <aoliva@redhat.com>
1773
1774         PR c++/18962
1775         * pt.c (check_explicit_specialization): Use the argument list from
1776         the definition in a template function specialization definition.
1777
1778 2004-12-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1779
1780         PR c++/18733
1781         * pt.c (check_explicit_specialization): Use special logic to validate
1782         befriended specializations.
1783
1784 2004-12-22  Mark Mitchell  <mark@codesourcery.com>
1785
1786         * rtti.c (emit_support_tinfos): Avoid using C99 semantics.
1787
1788         PR c++/18464
1789         * call.c (build_this): In templates, do not bother with
1790         build_unary_op.
1791         * typeck.c (unary_complex_lvalue): In a template, always refuse
1792         simplifications.
1793
1794         PR c++/18492
1795         * cp-gimplify.c (cp_genericize): Relax assertion.
1796
1797         PR c++/11224
1798         * cvt.c (convert_to_void): Warn about unused values.
1799
1800         PR c++/18257
1801         * rtti.c (emit_support_tinfos): On systems without weak symbols,
1802         emit the runtime library type-info objects as non-COMDAT.
1803
1804 2004-12-21  Mark Mitchell  <mark@codesourcery.com>
1805
1806         PR c++/18378
1807         * call.c (convert_like_real): Do not permit the use of a copy
1808         constructor to copy a packed field.
1809
1810         PR c++/19063
1811         * decl.c (grokdeclarator): Return error_mark_node, not
1812         void_type_node, to indicate errors.
1813         * parser.c (cp_parser_template_parameter_list): Robustify.
1814         (cp_parser_template_parameter): Likewise.
1815
1816         PR c++/19034
1817         * tree.c (cp_tree_equal): Handle OVERLOAD.
1818
1819 2004-12-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1820
1821         * decl.c (define_label): Use POP_TIMEVAR_AND_RETURN.
1822         * name-lookup.c (pushdecl_class_level): Likewise.
1823
1824 2004-12-21  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1825
1826         * name-lookup.c (pushtag): Add missing POP_TIMEVAR_AND_RETURN.
1827
1828 2004-12-21  Andrew Pinski  <pinskia@physics.uc.edu>
1829
1830         PR c++/18984
1831         * cp-gimplify.c (cp_genericize_r): Don't insert first but instead
1832         check to see if contains the pointer.  Insert the statement before
1833         returning.
1834
1835 2004-12-21  Nathan Sidwell  <nathan@codesourcery.com>
1836
1837         PR c++/14075
1838         * decl.c (check_initializer): Check string initializer of array is
1839         not parenthesized.
1840         * cp-tree.h (PAREN_STRING_LITERAL_P): New.
1841         * semantics.c (finish_parenthesized_expr): Mark a STRING_CST.
1842         * error.c (dump_expr): <STRING_CST case> Add parens, if needed.
1843
1844         * cp-tree.def (TEMPLATE_TYPE_PARM,
1845         BOUND_TEMPLATE_TEMPLATE_PARM, TYPE_OF_TYPE, TYPENAME_TYPE): Reorder
1846         for better code efficiency.
1847         * cp-tree.h (CLASS_TYPE_P): Short circuit IS_AGGR_TYPE check.
1848         (CAN_HAVE_FULL_LANG_DECL_P): Reorder for better optimization.
1849         (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P,
1850         INTEGRAL_OR_ENUMERATION_TYPE_P, SCALAR_TYPE_P,
1851         CP_AGGREGATE_TYPE_P, TYPE_PTROB_P, TYPE_REF_OBJ_P,
1852         TYPE_PTROBV_P): Likewise.
1853
1854         PR c++/18975
1855         * method.c (do_build_copy_constructor): Refactor. Don't const
1856         qualify a mutable field.
1857         (do_build_assign_ref): Likewise.
1858
1859 2004-12-20  Matt Austern <austern@apple.com>
1860
1861         PR c++/19044
1862         * decl.c (make_rtl_for_nonlocal_decl): Use
1863         set_builtin_user_assembler_name.
1864
1865 2004-12-19  Mark Mitchell  <mark@codesourcery.com>
1866
1867         * cp-tree.h (note_decl_for_pch): New function.
1868         * class.c (build_clone): Call note_decl_for_pch.
1869         * semantics.c (finish_member_declaration): Likewise.
1870         (note_decl_for_pch): New function.
1871
1872 2004-12-17  Steven Bosscher  <stevenb@suse.de>
1873
1874         * init.c (build_zero_init): max_index is the number of
1875         elements, minus 1.
1876
1877 2004-12-17  Nathan Sidwell  <nathan@codesourcery.com>
1878
1879         PR c++/18721
1880         * class.c (add_method): Do not push conversion operators into a
1881         binding level.
1882
1883         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE_TYPE): Reformat.
1884         * error.c (dump_decl): <TYPE_DECL case> Remove extraneous braces.
1885
1886 2004-12-16  Nathan Sidwell  <nathan@codesourcery.com>
1887
1888         PR c++/18905
1889         * cp-tree.h (integral_constant_value): Declare.
1890         * call.c (null_ptr_cst_p): Use integral_constant_value, not
1891         decl_constant_value.
1892         (convert_like_real): Likewise.
1893         * class.c (check_bitfield_decl): Likewise.
1894         * cvt.c (ocp_convert): Likewise.
1895         (convert): Remove unnecessary decl_constant_value call.
1896         * decl.c (compute_array_index_type): Use integral_constant_value,
1897         not decl_constant_value.
1898         (build_enumerator): Likewise.
1899         * decl2.c (grokfield): Likewise.
1900         * init.c (decl_constant_value): Simplify.
1901         (integral_constant_value): New.
1902         * pt.c (fold_decl_constant_value): Use integral_constant_value,
1903         remove subsequent check.
1904         (tsubst): Use integral_constant_value, not decl_constant_value.
1905         (tsubst_copy, unify): Likewise.
1906         * typeck.c (decay_conversion): Likewise.
1907         (build_compound_expr): Remove unnecessary decl_constant_value
1908         calls.
1909         (build_static_cast_1, build_reinterpret_cast_1):
1910         (convert_for_assignment): Remove comment about not calling
1911         decl_constant_value.
1912
1913 2004-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1914
1915         PR c++/18825
1916         * pt.c (instantiate_class_template): Set input_location for
1917         friend function.
1918         (tsubst_friend_function): Don't set input_location here.
1919         Make sure the context is complete if necessary.
1920
1921 2004-12-15  Nathan Sidwell  <nathan@codesourcery.com>
1922
1923         PR c++/18981
1924         * parser.c (cp_parser_lookup_name): Remove unneeded TYPENAME_TYPE
1925         flag setting.
1926
1927 2004-12-14  Mark Mitchell  <mark@codesourcery.com>
1928
1929         PR c++/18738
1930         * decl.c (make_typename_type): Do not handle namespace-scoped
1931         names here.
1932         (tag_name): Handle typename_type.
1933         (check_elaborated_type_specifier): Handle typenames.
1934         * parser.c (cp_parser_diagnose_invalid_type_name): Improve
1935         comment.
1936         (cp_parser_elaborated_type_specifier): Use
1937         cp_parser_diagnose_invalid_type_name.
1938
1939 2004-12-14  Andrew Pinski  <pinskia@physics.uc.edu>
1940
1941         PR c++/18965
1942         * init.c (build_zero_init): If the max_index is 0, there is no
1943         need to create a RANGE_EXPR.
1944
1945 2004-12-14  Mark Mitchell  <mark@codesourcery.com>
1946
1947         PR c++/18793
1948         * cp-objcp-common.c (cp_expr_size): Loosen assertion.
1949
1950 2004-12-14  Nathan Sidwell  <nathan@codesourcery.com>
1951
1952         PR c++/18949
1953         * pt.c (tsubst_copy_and_build): <INDIRECT_REF case> Check that a
1954         REFERENCE_REF_P is dereferencing a reference type.
1955         * typeck.c (build_static_cast): Convert from reference even in a
1956         template.
1957         (build_reinterpret_cast, build_const_cast, build_c_cast): Likewise.
1958
1959 2004-12-14  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1960
1961         * parser.c (cp_parser_uncommitted_to_tentative_parse_p): New function.
1962         (cp_parser_name_lookup_error): Use it.
1963         (cp_parser_check_for_invalid_template_id): Likewise.
1964         (cp_parser_skip_to_closing_parenthesis): Likewise.
1965         (cp_parser_nested_name_specifier_opt): Likewise.
1966         (cp_parser_simple_declaration, cp_parser_template_id): Likewise.
1967         (cp_parser_parameter_declaration_list): Likewise.
1968         (cp_parser_parameter_declaration): Likewise.
1969         (cp_parser_template_name): Let cp_parser_simulate_error perform
1970         the checking.
1971         (cp_parser_committed_to_tentative_parse): Remove.
1972
1973 2004-12-13  Andrew Pinski  <pinskia@physics.uc.edu>
1974
1975         PR c++/18968
1976         * class.c (build_base_path): Convert the zero constant to the correct
1977         type when comparing.
1978
1979 2004-12-13  Mark Mitchell  <mark@codesourcery.com>
1980
1981         PR c++/18925
1982         * class.c (layout_class_type): Determine the visibility of static
1983         data members.
1984
1985 2004-12-12  Roger Sayle  <roger@eyesopen.com>
1986
1987         PR middle-end/12454
1988         * cp-gimplify.c (gimplify_if_stmt): Optimize the case where the
1989         condition is a constant and the unexecuted clause is empty.
1990
1991 2004-12-10  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1992
1993         PR c++/18731
1994         * parser.c (cp_parser_class_head): Reject typedef-name in class head.
1995
1996 2004-12-09  Matt Austern  <austern@apple.com>
1997
1998         PR c++/18514
1999         * name-lookup.c (do_nonmember_using_decl): A real function
2000         declaration takes precedence over an anticipated declaration.
2001
2002 2004-12-09  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2003
2004         * parser.c (cp_parser_member_declaration): Fix comment typo.
2005
2006 2004-12-09  Alexandre Oliva  <aoliva@redhat.com>
2007
2008         PR c++/18757
2009         * parser.c (cp_parser_template_id): Don't create a CPP_TEMPLATE_ID
2010         if parsing failed.
2011
2012 2004-12-09  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2013
2014         PR c++/18073
2015         * typeck.c (build_reinterpret_cast_1): Allow cast from vector type.
2016
2017 2004-12-09  Nathan Sidwell  <nathan@codesourcery.com>
2018
2019         PR c++/16681
2020         * init.c (build_zero_init): Build a RANGE_EXPR for an array
2021         initializer.
2022
2023 2004-12-08  Kelley Cook  <kcook@gcc.gnu.org>
2024
2025         * typeck.c: Remove DOS line endings.
2026
2027 2004-12-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2028
2029         PR c++/18100
2030         * decl.c (lookup_and_check_tag): Diagnose nested class with
2031         the same name as enclosing class.
2032
2033 2004-12-08  Nathan Sidwell  <nathan@codesourcery.com>
2034
2035         PR c++/18803
2036         * cp-tree.h (REFERENCE_REF_P): New.
2037         (CPTI_TYPE_INFO_TYPE): Rename to ...
2038         (CPTI_CONST_TYPE_INFO_TYPE): ... here.
2039         (CPTI_TYPE_INFO_REF_TYPE): Remove.
2040         (type_info_type_node): Rename to ...
2041         (const_type_info_type_node): ... here.
2042         (type_info_ref_type): Remove.
2043         * call.c (build_user_type_conversion): Reformat.
2044         (resolve_args): Do not convert_from_reference.
2045         (build_object_call): Call convert_from_reference.
2046         (prep_operand): Do not convert_from_reference.
2047         (build_new_method_call): Likewise.
2048         * class.c (build_vfield_ref): Likewise.
2049         * cvt.c (convert_to_reference): Likewise.
2050         (convert_from_reference): Build INDIRECT_REF here, not with
2051         build_indirect_ref.
2052         (convert_force): Do not convert_from_reference.
2053         (build_expr_type_conversion): Likewise.
2054         * decl.c (grok_reference_init): Likewise.
2055         * decl2.c (delete_sanity): Likewise.
2056         * except.c (initialize_handler_parm): Use POINTER_TYPE_P.
2057         * init.c (build_dtor_call): Do not convert_from_reference.
2058         * parser.c (cp_parser_template_argument): Unwrap indirected
2059         reference. Allow TEMPLATE_PARM_INDEX as an object parm.
2060         * pt.c (tsubst_copy_and_build) <case INDIRECT_REF>: Use
2061         convert_from_reference, if indicated.
2062         <case CALL_EXPR>: Do not convert_from_reference.
2063         <case PARM_DECL, VAR_DECL>: Convert_from_reference if needed.
2064         (tsubst_initializer_list): Do not convert_from_reference.
2065         * rtti.c (init_rtti_processing): Adjust node creation.
2066         (throw_bad_typeid): Use const_type_info_type_node.
2067         Do not convert_from_reference.
2068         (typeid_ok_p): Use const_type_info_type_node.
2069         (build_typeid, get_typeid): Always return type_info typed node.
2070         (build_dynamic_cast_1): Dont convert_from_reference. Refactor.
2071         * semantics.c (finish_stmt_expr_expr): Do not
2072         convert_from_reference.
2073         (finish_id_expression): Convert_from_reference as appropriate.
2074         * typeck.c (decay_conversion): Do not convert_from_reference.
2075         (finish_class_member_access_expr): Likewise.
2076         (build_indirect_ref): Use POINTER_TYPE_P.
2077         (convert_arguments): Do not convert_from_reference.
2078         (build_modify_expr): Likewise.
2079         (convert_for_initialization): Likewise.
2080         * typeck2.c (build_x_arrow): Likewise.
2081
2082 2004-12-07  Ziemowit Laski  <zlaski@apple.com>
2083
2084         * cp-tree.h (struct lang_type_class): Rename 'objc_protocols'
2085         field to 'objc_info'.
2086
2087 2004-12-07  Kazu Hirata  <kazu@cs.umass.edu>
2088
2089         * pt.c: Replace a use of first_rtl_op with TREE_CODE_LENGTH.
2090
2091 2004-12-07  Roger Sayle  <roger@eyesopen.com>
2092
2093         * name-lookup.c (leave_scope): We only need to update
2094         class_binding_level when leaving a class scope.
2095
2096 2004-12-06  Ziemowit Laski  <zlaski@apple.com>
2097
2098         * cp-tree.h (struct lang_type_class): Add 'objc_protocols' field.
2099
2100 2004-12-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2101
2102         PR c++/17011, c++/17971
2103         * pt.c (tsubst_copy) <FIELD_DECL case>: Check and diagnose
2104         invalid field.
2105         (tsubst_copy_and_build) <COMPONENT_REF case>: Check
2106         error_mark_node after member substitution.
2107         * semantics.c (finish_id_expression): Call
2108         finish_non_static_data_member for non-dependent FIELD_DECL.
2109
2110 2004-12-03  Nathan Sidwell  <nathan@codesourcery.com>
2111
2112         PR c++/18782
2113         * decl.c (grokdeclarator): Make sure class in pointer to member is
2114         not a namespace.
2115
2116 2004-12-02  Nathan Sidwell  <nathan@codesourcery.com>
2117
2118         PR c++/18318
2119         * parser.c (cp_parser_new_type_id): Move array size expression
2120         checks from here ...
2121         * init.c (build_new): ... to here.
2122
2123 2004-12-02  Nathan Sidwell  <nathan@codesourcery.com>
2124
2125         PR c++/18758
2126         * parser.c (cp_parser_class_head): Return NULL_TREE when
2127         push_template_decl fails.  Update comment.
2128
2129 2004-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2130
2131         PR c++/15664, c++/18276
2132         * pt.c (tsubst_decl) <TEMPLATE_DECL case>: Reorganize.  Correctly
2133         tsubst TEMPLATE_DECL that is a TEMPLATE_TEMPLATE_PARM.
2134
2135 2004-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2136
2137         PR c++/18123
2138         * parser.c (cp_parser_type_specifier): Catch template declaration
2139         of enum.
2140
2141 2004-12-01  Matt Austern  <austern@apple.com>
2142
2143         * name-lookup.c (namespace_binding): Omit alias check for global
2144         namespace.
2145
2146 2004-12-01  Nathan Sidwell  <nathan@codesourcery.com>
2147
2148         PR c++/18729
2149         * parser.c (cp_parser_class_name): Check decl's type is not
2150         error_mark_node.
2151
2152         PR c++/17431
2153         * call.c (standard_conversion): Add FLAGS parameter. Do not allow
2154         derived to base conversion when checking constructor
2155         accessibility.
2156         (implicit_conversion): Pass FLAGS to standard_conversion.
2157         (check_constructir_callable): Disallow conversion functions.
2158
2159 2004-11-30  Kazu Hirata  <kazu@cs.umass.edu>
2160
2161         * parser.c: Fix comment typos.
2162
2163 2004-11-27  Mark Mitchell  <mark@codesourcery.com>
2164
2165         PR c++/18368
2166         * parser.c (cp_parser_check_for_definition_in_return_type): Take
2167         the defined type as a parameter, and inform the user about the
2168         possibility of a missing semicolon.
2169         (cp_parser_explicit_instantiation): Adjust call to
2170         cp_parser_check_for_definition_in_return_type.
2171         (cp_parser_init_declarator): Likewise.
2172         (cp_parser_member_declaration): Likewise.
2173
2174         PR c++/18674
2175         * cp-tree.def (TYPENAME_TYPE): Remove discussion of implicit
2176         typename from comments.
2177         * cp-tree.h (TYPENAME_IS_ENUM_P): New macro.
2178         (TYPENAME_IS_CLASS_P): Likewise.
2179         (make_typename_type): Change prototype.
2180         * decl.c (struct_typename_info): New type.
2181         (typename_compare): Expect the second argument to be a
2182         typename_info, not a tree.
2183         (build_typename_type): Add tag_type parameter.  Do not create a
2184         new type until necessary.
2185         (make_typename_type): Add tag_type parameter.
2186         * error.c (TYPENAME_TYPE): Print tags other than "typename" if
2187         appropriate.
2188         * friend.c (make_friend_class): Adjust call to make_typename_type.
2189         * parser.c (cp_parser_make_typename_type): Likewise.
2190         (cp_parser_primary_expression): Adjust call to
2191         cp_parser_lookup_name.
2192         (cp_parser_unqualified_id): Adjust calls to cp_parser_class_name.
2193         (cp_parser_class_or_namespace_name): Likewise.
2194         (cp_parser_postfix_expression): Adjust calls to
2195         make_typename_type.
2196         (cp_parser_mem_initializer_id): Adjust calls to
2197         cp_parser_class_name.
2198         (cp_parser_type_parameter): Adjust calls to cp_parser_lookup_name.
2199         (cp_parser_template_name): Likewise.
2200         (cp_parser_template_argument): Likewise.
2201         (cp_parser_type_name): Adjust call to cp_parser_class_name.
2202         (cp_parser_elaborated_type_specifier): Adjust calls to
2203         make_typename_type and cp_parser_lookup_name.
2204         (cp_parser_namespace_name): Likewise.
2205         (cp_parser_class_name): Replace type_p parameter with tag_type.
2206         Adjust calls to make_typename_type and cp_parser_lookup_name.
2207         (cp_parser_class_head): Adjust calls to cp_parser_class_name.
2208         (cp_parser_base_specifier): Likewise.
2209         (cp_parser_lookup_name): Replace is_type parameter with tag_type.
2210         Adjust calls to make_typename_type and lookup_qualified_name.
2211         (cp_parser_lookup_name_simple): Adjust call to
2212         cp_parser_lookup_name.
2213         (cp_parser_constructor_declarator_p): Adjust call to
2214         cp_parser_class_name.
2215         * pt.c (convert_template_argument): Adjust all to
2216         make_typename_type.
2217         (tsubst_decl): Do not pre-substitute the type of the declaration.
2218         (tsubst): Hand off declarations more quickly.  Adjust call to
2219         make_typename_type.
2220
2221         PR c++/18512
2222         * parser.c (cp_parser_postfix_dot_deref_expression): Robustify.
2223
2224 2004-11-29  Daniel Jacobowitz  <dan@codesourcery.com>
2225
2226         PR c/7544
2227         * Make-lang.in (cp/decl2.o): Update dependencies.
2228         * decl2.c (finish_file): Call maybe_apply_pending_pragma_weaks.
2229
2230 2004-11-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2231
2232         PR c++/18652
2233         * name-lookup.c (pushtag): Change return type to tree.
2234         * cp-tree.h (pushtag): Adjust declaration.
2235         * decl.c (xref_tag, start_enum): Use return value of pushtag.
2236         * pt.c (push_template_decl_real): Return immediately if
2237         pushdecl_namespace_level returns error_mark_node.
2238
2239 2004-11-27  Kazu Hirata  <kazu@cs.umass.edu>
2240
2241         * pt.c: Fix a comment typo.
2242
2243 2004-11-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2244
2245         Friend class name lookup 4/n
2246         * class.c (pushclass): Don't call cxx_remember_type_decls.
2247         * cp-tree.h (clear_anon_tags): Remove declaration.
2248         * decl.c (grokdeclarator): Don't call lookup_tag_reverse.
2249         * name-lookup.c (binding_entry_free, binding_table_free): Comment
2250         out functions.
2251         (binding_table_find_anon_type, binding_table_reverse_maybe_remap,
2252         binding_table_remove_anonymous_types, cxx_remember_type_decls,
2253         bt_print_entry, clear_anon_tags, follow_tag_typedef, lookup_tag,
2254         lookup_tag_reverse): Remove
2255         (begin_scope, leave_scope, kept_level_p, print_binding_level):
2256         Don't use type_decls field in cp_binding_level.
2257         (maybe_process_template_type_declaration, pushtag): Set
2258         CLASSTYPE_NESTED_UTDS directly.
2259         * name-lookup.h (binding_table_remove_anonymous_types,
2260         cxx_remember_type_decls, lookup_tag, lookup_tag_reverse): Remove
2261         declaration.
2262         (cp_binding_level): Remove type_decls field.
2263
2264 2004-11-26  Kazu Hirata  <kazu@cs.umass.edu>
2265
2266         * typeck.c: Fix a comment typo.
2267
2268 2004-11-25  Mark Mitchell  <mark@codesourcery.com>
2269
2270         PR c++/18445
2271         * class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with
2272         unknown_type as non matching.  Tidy up.
2273         * pt.c (build_non_dependent_expr): Do not build a
2274         NON_DEPENDENT_EXPR for a VAR_DECL.
2275
2276         PR c++/18001
2277         * cp-tree.h (lvalue_or_else): Remove declaration.
2278         * tree.c (lvalue_or_else): Remove.
2279         * typeck.c (build_unary_op): Adjust call to lvalue_or_else.
2280         (build_modify_expr): Likewise.
2281
2282         PR c++/18625
2283         * decl.c (duplicate_decls): Return error_mark_node on error, as
2284         specified.
2285
2286         PR c++/18466
2287         * decl.c (grokvardecl): Keep track of whether or not a there was
2288         explicit qualification.
2289         * name-lookup.c (set_decl_namespace): Complain about explicit
2290         qualification of a name within its own namespace.
2291
2292         PR c++/18545
2293         * typeck.c (check_return_expr): Robustify.
2294
2295 2004-11-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2296
2297         Friend class name lookup 3/n, PR c++/3332
2298         * name-lookup.c (push_inner_scope, pop_inner_scope): New functions.
2299         (lookup_type_scope): Don't deal with name from user declaration
2300         specially.
2301         * name-lookup.h (push_inner_scope, pop_inner_scope): Add declarations.
2302         * parser.c (cp_parser_class_specifier): Use push_inner_scope and
2303         pop_inner_scope.
2304
2305 2004-11-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2306
2307         Friend class name lookup 2/n, PR c++/14513, c++/15410
2308         * name-lookup.c (lookup_name_real): Simplify.
2309         (lookup_type_scope): Add SCOPE parameter.  Handle friend class
2310         lookup.
2311         * name-lookup.h (tag_scope): New enum type.
2312         (lookup_type_scope): Adjust declaration.
2313         * decl.c (lookup_and_check_tag, xref_tag, xref_tag_from_type):
2314         Change bool parameter GLOBALIZED to TAG_SCOPE parameter SCOPE.
2315         (start_enum): Likewise.  Add assertion test that NAME is
2316         IDENTIFIER_NODE.  Use anonymous name for dummy ENUMERAL_TYPE in
2317         case of error.
2318         * cp-tree.h (xref_tag, xref_tag_from_type): Adjust declarations.
2319         * parser.c (cp_parser_elaborated_type_specifier,
2320         cp_parser_class_head): Adjust call to xref_tag.
2321         * pt.c (lookup_template_class, instantiate_class_template):
2322         Likewise.
2323         * rtti.c (init_rtti_processing, build_dynamic_cast_1,
2324         tinfo_base_init, emit_support_tinfos): Likewise.
2325
2326 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
2327
2328         * g++spec.c, lex.c: Avoid ` as left quote in diagnostics.
2329
2330 2004-11-24  Mark Mitchell  <mark@codesourcery.com>
2331
2332         PR c++/17473
2333         * name-lookup.c (supplement_binding): Do not allow typedefs to be
2334         redefined in class scope.
2335
2336         PR c++/18285
2337         * parser.c (cp_parser_set_decl_type_spec): Do not try to allow
2338         redefinitions of builtin types other that "bool" or "wchar_t".
2339
2340 2004-11-24  Steven Bosscher  <stevenb@suse.de>
2341
2342         * decl.c (cxx_init_decl_processing): Don't clear
2343         flag_inline_functions.
2344
2345 2004-11-24  Mark Mitchell  <mark@codesourcery.com>
2346
2347         * pt.c (tsubst_function_type): Do not permit function types which
2348         return arrays or functions.
2349
2350         PR c++/18586
2351         * parser.c (cp_parser_init_declarator): Do not pop scope twice.
2352
2353         PR c++/18530
2354         * cp-tree.h (CTOR_NAME): Remove.
2355         (DTOR_NAME): Remove.
2356         * decl.c (initialize_predefined_identifiers): Add spaces to the
2357         end of constructor and destructor names.
2358
2359 2004-11-24  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2360
2361         PR c++/8929
2362         * decl.c (start_decl): Check for invalid specialization headers.
2363
2364 2004-11-24  Paolo Bonzini  <bonzini@gnu.org>
2365
2366         PR c++/16882
2367
2368         * call.c (standard_conversion): Move check for conversions between
2369         vector pointers...
2370         * typeck.c (ptr_reasonably_similar): ... here.
2371
2372 2004-11-23  Ben Elliston  <bje@au.ibm.com>
2373
2374         * cp-tree.h (context_as_string): Remove extern.
2375         * error.c (context_as_string): Remove.
2376
2377         * cp-tree.h (cp_type_qual_from_rid): Remove extern.
2378         * lex.c (cp_type_qual_from_rid): Remove.
2379
2380         * cp-tree.h (do_poplevel): Remove extern.
2381         (check_multiple_declarators): Likewise.
2382         * semantics.c (do_poplevel): Make static.
2383         (check_multiple_declarators): Remove.
2384
2385         * cp-tree.h (check_final_overrider): Remove extern.
2386         * search.c (check_final_overrider): Make static.
2387
2388         * cp-tree.h (build_artificial_parm): Remove extern.
2389         * decl2.c (build_artificial_parm): Make static.
2390
2391 2004-11-22  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2392
2393         PR c++/18354
2394         * typeck.c (build_unary_op) <CONVERT_EXPR, NEGATE_EXPR>: Unify code.
2395         Make sure the result is always a rvalue.
2396
2397 2004-11-16  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2398
2399         * decl.c (start_preparsed_function): Call check_function_type even
2400         in templates.
2401         (require_complete_types_for_parms): Skip dependent types.
2402         (check_function_type): Likewise.
2403
2404 2004-11-16  Steven Bosscher  <stevenb@suse.de>
2405
2406         * Make-lang.in (cp/decl.o, cp/search.o): Don't depend on stack.h.
2407         * search.c: Don't include it.
2408
2409 2004-11-15  Andrew Pinski  <pinskia@physics.uc.edu>
2410
2411         * cp-gimplify.c: Include pointer-set.h
2412         (cp_genericize_r): Use pointer_sets instead of a hashtable.
2413         Also instert the new statement for CLEANUP_STMT.
2414         (cp_genericize): Use pointer_sets instead of a hashtable.
2415         * Make-lang.in (cp-gimplify.o): Depend on pointer-set.h.
2416
2417 2004-11-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2418
2419         Friend class name lookup 1/n, PR c++/18471
2420         * decl.c (lookup_and_check_tag): New function.
2421         (xref_tag, start_enum): Use it.
2422         (check_elaborated_type_specifier): Move TEMPLATE_TYPE_PARM check
2423         before !DECL_IMPLICIT_TYPEDEF_P.  Also display previously declared
2424         location.
2425         * name-lookup.c (lookup_name_current_level): Rename to ...
2426         (lookup_name_innermost_nonclass_level): ... this.
2427         (lookup_type_scope): New function.
2428         * name-lookup.h (lookup_name_current_level): Rename to ...
2429         (lookup_name_innermost_nonclass_level): ... this.
2430         (lookup_type_scope): Add declaration.
2431
2432 2004-11-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2433
2434         PR c++/17344
2435         * pt.c (coerce_template_parms): Only emit error message about
2436         invalid template argument when TF_ERROR.
2437
2438 2004-11-12  Mark Mitchell  <mark@codesourcery.com>
2439
2440         PR c++/18389
2441         * decl.c (start_decl): Make sure to set *pop_scope_p.  Return
2442         error_mark_node to indicate errors.
2443
2444         PR c++/18429
2445         * parser.c (cp_parser_direct_declarator): Disallow non-constant
2446         array bounds when not inside a function.
2447
2448         PR c++/18436
2449         * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an
2450         unqualified name resolves to a member function.
2451
2452         PR c++/18407
2453         * pt.c (tsubst_copy_and_build): Handle qualified names used from a
2454         derived class correctly.
2455
2456         * decl2.c (import_export_decl): Fix typo in comment.
2457         * tree.c (pod_type_p): Likewise.
2458
2459 2004-11-10  Andrew Pinski  <pinskia@physics.uc.edu>
2460
2461         * typeck.c (cxx_mark_addressable): Add braces around the first if.
2462
2463 2004-11-10  Adam Nemet  <anemet@lnxw.com>
2464
2465         PR middle-end/18160
2466         * typeck.c (cxx_mark_addressable): Issue an error if address of an
2467         explicit register variable is requested.
2468
2469 2004-11-10  Nathan Sidwell  <nathan@codesourcery.com>
2470
2471         PR c++/18143
2472         * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK): New.
2473         (struct lang_decl_flags): Add thunk_p flag.
2474         (struct lang_decl): Remove separate fixed_offset. Place
2475         cloned_function and fixed_offset into union.
2476         (DECL_CLONED_FUNCTION_P, DECL_CLONED_FUNCTION): Adjust.
2477         (DECL_THUNK_P, SET_DECL_THUNK_P): Adjust.
2478         (THUNK_FIXED_OFFSET): Adjust.
2479         * method.c (make_thunk): Adjust.
2480
2481 2004-11-09  Mark Mitchell  <mark@codesourcery.com>
2482
2483         PR c++/18369
2484         * init.c (build_new_1): Handle parenthesized type-ids that name an
2485         array type.  Tidy.
2486
2487 2004-11-09  Joseph S. Myers  <joseph@codesourcery.com>
2488
2489         * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
2490         pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
2491         quoting in diagnostics.
2492         * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
2493         quoting in printf format.
2494         * decl.c (duplicate_decls, start_decl): Use %qD instead of
2495         unquoted %D.
2496
2497 2004-11-08  Kazu Hirata  <kazu@cs.umass.edu>
2498
2499         * class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c,
2500         search.c, typeck2.c: Fix comment formatting.
2501
2502 2004-11-04  Ulrich Weigand  <uweigand@de.ibm.com>
2503
2504         PR tree-optimization/18184
2505         * cp-objcp-common.c (cxx_types_compatible_p): Do not treat pointers
2506         of different modes or alias-all flags as equivalent.
2507         * typeck.c (comptypes): Likewise.
2508
2509 2004-11-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2510
2511         DR 49, 100
2512         * cp-tree.h (TYPE_REF_OBJ_P): New macro.
2513         (TYPE_PTR_P, TYPE_PTROB_P, TYPE_PTROBV_P, TYPE_PTRFN_P,
2514         TYPE_REFFN_P): Document.
2515         (fold_decl_constant_value): New prototype.
2516         * pt.c (convert_nontype_argument_function): Rewrite and extract
2517         parts into...
2518         (fold_decl_constant_value, convert_nontype_argument_function): New.
2519         (lookup_template_class): Add comment about useless double call.
2520         * mangle.c (write_expression): Strip conversions before lowering
2521         pointer to members.
2522         * cvt.c (ocp_convert): Check LOOKUP_COMPLAIN for a pedwarn. Disallow
2523         enum to enum conversion.
2524
2525 2004-11-02  Mark Mitchell  <mark@codesourcery.com>
2526
2527         PR c++/18124
2528         * parser.c (cp_parser_type_parameter): Robustify.
2529
2530         PR c++/18155
2531         * parser.c (cp_parser_single_declaration): Disallow template
2532         typedefs.
2533
2534         PR c++/18177
2535         * typeck.c (build_const_cast): Use error_operand_p.
2536
2537 2004-11-02  Ziemowit Laski  <zlaski@apple.com>
2538
2539         * cp-lang.c (cxx_types_compatible_p): Remove prototype and definition.
2540         (LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h.
2541         * cp-objcp-common.c (cxx_types_compatible_p): Moved definition here
2542         from cp-lang.c.
2543         * cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here
2544         from cp-lang.c.
2545         (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c.
2546
2547 2004-11-01  Nathan Sidwell  <nathan@codesourcery.com>
2548
2549         PR c++/18064
2550         * search.c (check_final_overrider): Deprecate gnu covariant extension.
2551
2552 2004-10-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2553
2554         Convert diagnostics to use quoting flag q 9/n
2555         * typeck.c (build_x_unary_op, convert_member_func_to_ptr,
2556         get_delta_difference):  Use new quotation style.
2557         * repo.c (reopen_repo_file_for_write): Likewise.
2558         * pt.c (do_type_instantiation): Likewise.
2559         * parser.c (cp_parser_diagnose_invalid_type_name):
2560         * name-lookup.c (push_overloaded_decl, set_decl_namespace):
2561         * error.c (cp_print_error_function,
2562         print_instantiation_full_context): Likewise.
2563         * decl.c (define_label, grok_reference_init,
2564         maybe_deduce_size_from_array_init, revert_static_member_fn):
2565         * decl2.c (check_classfn): Likewise.
2566         * class.c (add_method, check_field_decls, layout_class_type,
2567         resolve_address_of_overloaded_function): Likewise.
2568         * call.c (build_x_va_arg, build_over_call): Likewise.
2569
2570 2004-10-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2571
2572         Convert diagnostics to use quoting flag q 8/n
2573         * cvt.c (cp_convert_to_pointer, warn_ref_binding,
2574         convert_to_reference, ocp_convert, convert_to_void
2575         cp_convert_to_pointer): Use new quotation style.
2576
2577 2004-10-31  Mark Mitchell  <mark@codesourcery.com>
2578
2579         PR c++/15172
2580         * typeck2.c (store_init_value): Use split_nonconstant_init even
2581         for types that require construction.
2582
2583 1004-10-28  Matt Austern  <austern@apple.com>
2584
2585         PR c++/17542
2586         * cp-tree.h (class_key_or_enum_as_string): Declare.
2587         * error.c (class_key_or_enum): Rename to class_key_or_enum_as_string
2588         and remove static qualifier.
2589         * decl.c (shadow_tag): Warn about ignored attributes in class/struct/
2590         union/enum declaration.
2591
2592 2004-10-29  Kazu Hirata  <kazu@cs.umass.edu>
2593
2594         * pt.c: Fix a comment typo.
2595
2596 2004-10-28  Nathan Sidwell  <nathan@codesourcery.com>
2597
2598         * typeck.c (composite_pointer_type): Remove comment about DR 195.
2599         (build_reinterpret_cast_1): Revert DR195 patch. Only emit a
2600         warning when being pedantic.
2601         (build_reinterpet_cast, build_c_cast): Adjust.
2602
2603 2004-10-29  Mark Mitchell  <mark@codesourcery.com>
2604
2605         PR c++/17695
2606         * decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they
2607         appear in a constructor/destructor that will be cloned.
2608
2609 1004-10-28  Matt Austern  <austern@apple.com>
2610
2611         PR c++/14124
2612         * decl.c (finish_enum): Handle packed attribute.
2613         * parser.c (cp_parser_enum_specifier): Process trailing attributes.
2614
2615 2004-10-28  Mark Mitchell  <mark@codesourcery.com>
2616
2617         PR c++/17132
2618         * pt.c (instantiate_class_template): Increment
2619         processing_template_decl when substituting into a member class
2620         template.
2621
2622 2004-10-27  Mark Mitchell  <mark@codesourcery.com>
2623
2624         PR c++/17435
2625         * call.c (convert_like_real): Fix formatting.
2626         (initialize_reference): When binding a temporary to a base class,
2627         ensure that the nominal copy made is to the derived class, not the
2628         base class.
2629
2630         PR c++/18140
2631         * parser.c (cp_parser_next_token_ends_template_argument_p): Do not
2632         include ">>".
2633
2634 2004-10-27  Andrew Pinski  <pinskia@physics.uc.edu>
2635
2636         * decl.c (bad_specifiers): Move the q after the %.
2637
2638 2004-10-27  Andrew Pinski  <pinskia@physics.uc.edu>
2639
2640         * parser.c (cp_parser_diagnose_invalid_type_name): Move the q after
2641         the %.
2642
2643 2004-10-26  Mark Mitchell  <mark@codesourcery.com>
2644
2645         * name-lookup.c (do_namespace_alias): Use FROB_CONTEXT.
2646         * search.c (current_scope): Fix prototype.
2647
2648         PR c++/18093
2649         * search.c (current_scope): Return the innermost non-block scope,
2650         not the innermost non-block, non-namespace scope.
2651         (at_namespace_scope_p): Adjust accordingly.
2652         (dfs_accessible_post): Do not pass namespaces to is_friend.
2653         (dfs_walk_once_accessible_r): Likewise.
2654         * decl.c (grokvardecl): Adjust call to current_scope.
2655         (build_enumerator): Likewise.
2656         * parser.c (cp_parser_using_declaration): Likewise.
2657         (cp_parser_direct_declarator): Use at_namespace_scope_p instead of
2658         current_scope.
2659         (cp_parser_class_head): Adjust call to current_scope.
2660         * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
2661         alias.
2662
2663         PR c++/18020
2664         * pt.c (tusbst_copy_and_build): Resolve enumeration constants to
2665         their underlying values.
2666
2667         PR c++/18161
2668         * typeck.c (build_binary_op): Honor build_type, even when in a
2669         template.
2670
2671 2004-10-26  Nathan Sidwell  <nathan@codesourcery.com>
2672
2673         * parser.c (cp_lexer_get_preprocessor_token): Remove unneeded
2674         padding token checking.
2675
2676 2004-10-25  Andrew Pinski  <pinskia@physics.uc.edu>
2677
2678         PR c++/18121
2679         * decl.c (grokdeclarator) <case cdk_array>: Remove the call
2680         layout_type as it is already done by create_array_type_for_decl.
2681
2682 2004-10-22  Nathan Sidwell  <nathan@codesourcery.com>
2683
2684         PR c++/18095
2685         * parser.c (eof_token): Make const, correctly initialize rid and
2686         location fields.
2687         (struct cp_lexer): Replace buffer_end pointer with buffer_length
2688         count. Adjust.
2689         (cp_lexer_new_main): Directly grow lexer's buffer here.  Don't
2690         zero it out.
2691         (cp_lexer_new_from_tokens): Adjust.
2692         (cp_lexer_grow_buffer): Remove.
2693         (cp_lexer_peek_nth_token, cp_lexer_consume_token,
2694         cp_lexer_purge_token): Add const casts.
2695
2696 2004-10-21  Mark Mitchell  <mark@codesourcery.com>
2697
2698         PR c++/18073
2699         PR c++/10841
2700         * cp-tree.h (convert_to_base): Change prototype.
2701         (build_ptrmemfunc): Likewise.
2702         (convert_ptrmem): New function.
2703         * call.c (struct conversion): Adjust documentation for base_p.
2704         (standard_conversion): Set base_p for ck_pmem conversions as
2705         appropriate.
2706         (convert_like_real): Use convert_to_base for ck_pmem and ck_ptr
2707         conversions.
2708         * class.c (convert_to_base): Handle both pointers and objects.
2709         Add nonnull parameter.
2710         (build_vfield_ref): Adjust call to convert_to_base.
2711         * cvt.c (cp_convert_to_pointer): Adjust call to build_ptrmemfunc.
2712         (convert_force): Likewise.
2713         * typeck.c (build_unary_op): Likewise.
2714         (convert_ptrmem): New function.
2715         (build_static_cast_1): Use it.
2716         (build_reinterpret_cast): Allow conversions to vector types.
2717         (get_delta_difference): Add c_cast_p parameter.
2718         (build_ptrmemfunc): Likewise.  Adjust calls to
2719         get_delta_difference.
2720
2721 2004-10-21  Andrew Pinski  <pinskia@physics.uc.edu>
2722
2723         PR c++/13560
2724         * error.c (cp_error_at): Output the context as it might be
2725         different file as the other location.
2726
2727 2004-10-21  Kazu Hirata  <kazu@cs.umass.edu>
2728
2729         * typeck.c: Fix a comment typo.
2730
2731 2004-10-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2732
2733         PR c++/13495
2734         * decl.c (make_unbound_class_template): Add PARM_LIST parameter.
2735         * cp-tree.h (make_unbound_class_template): Adjust prototype.
2736         * parser.c (cp_parser_lookup_name): Adjust call to
2737         make_unbound_class_template.
2738         (cp_parser_single_declaration): Handle member class of class
2739         template as template friend parsing correctly.
2740         * friend.c (is_friend): Call is_specialization_of_friend for
2741         template friend class.
2742         (make_friend_class): Handle member class of class template as
2743         template friend.
2744         * pt.c (is_specialization_of_friend): Likewise.
2745         (instantiate_class_template): Likewise.
2746         (tsubst): Adjust call to make_unbound_class_template.
2747
2748 2004-10-20  Nathan Sidwell  <nathan@codesourcery.com>
2749
2750         * typeck.c (composite_pointer_type): Add comment about DR 195
2751         (build_reinterpret_cast_1): Add for_reinterpret_cast_p parameter.
2752         Allow function pointer conversions that DR195 suggests.
2753         (build_reinterpret_cast, build_c_cast): Update
2754         build_reinterpret_cast_1 calls.
2755
2756 2004-10-20  Kazu Hirata  <kazu@cs.umass.edu>
2757
2758         * call.c, typeck.c: Fix comment typos.
2759
2760 2004-10-20  Nathan Sidwell  <nathan@codesourcery.com>
2761
2762         * parser.c (cp_token_position): New typedef. Define VEC thereof.
2763         (struct cp_lexer): Allow buffer and buffer_end to be NULL. Make
2764         next_token and last_token cp_token_position. Make saved_tokens a
2765         VEC(cp_token_position).
2766         (eof_token): New static variable.
2767         (CP_SAVED_TOKENS_SIZE): Rename to ...
2768         (CP_SAVED_TOKEN_STACK): ... here.
2769         (cp_lexer_new_main): Adjust main lexer creation and buffer
2770         filling.
2771         (cp_lexer_new_from_tokens): Do not copy the tokens, merely point
2772         to the parent buffer.  Do not append eof token.
2773         (cp_lexer_destroy): Only free buffer if non-NULL. Free token
2774         stack.
2775         (cp_lexer_next_token, cp_lexer_prev_token): Remove.
2776         (cp_lexer_token_position, cp_lexer_token_at): New.
2777         (cp_lexer_saving_tokens): Adjust. Make inline.
2778         (cp_lexer_advance_token, cp_lexer_token_difference): Remove.
2779         (cp_lexer_peek_token_emit_debug_info): Fold into ...
2780         (cp_lexer_peek_token): ... here.
2781         (cp_lexer_peek_nth_token): Don't peek past EOF.
2782         (cp_lexer_consume_token): Set next_token to eof_token, if reaching
2783         EOF.
2784         (cp_lexer_purge_token): Adjust eof setting.
2785         (cp_lexer_purge_tokens_after): Likewise.
2786         (cp_lexer_save_tokens): Push next_token directly.
2787         (cp_lexer_commit_tokens): Adjust.
2788         (cp_lexer_rollback_tokens): Pop next_token directly.
2789         (cp_parser_check_for_invalid_template_id): Adjust token purging.
2790         (cp_parser_translation_unit): Do not consume the EOF.
2791         (cp_parser_nested_name_specifier_opt): Adjust token purging.
2792         (cp_parser_template_id, cp_parser_template_name): Likewise.
2793
2794 2004-10-19  Mark Mitchell  <mark@codesourcery.com>
2795
2796         PR c++/14035
2797         * call.c (struct conversion): Add base_p.
2798         (convert_like): Add c_cast_p argument.
2799         (convert_like_with_conversion): Likewise.
2800         (build_conv): Clear base_p.
2801         (standard_conversion): Set it, for derived-to-base conversions.
2802         (convert_like_real): Add c_cast_p parameter.  Handle pointer
2803         conversions directly rather than relying on ocp_convert.
2804         (perform_direct_initialization_if_possible): Add c_cast_p
2805         parameter.
2806         * cp-tree.h (perform_direct_initialization_if_possible): Change
2807         prototype.
2808         (convert_member_func_to_ptr): New function.
2809         * typeck.c (check_for_casting_away_constness): Add diag_fn
2810         parameter.
2811         (build_static_cast_1): New function, split out from ...
2812         (build_static_cast): ... here.  Use build_static_cast_1.
2813         (build_reinterpret_cast_1): New function, split out from ...
2814         (build_reinterpret_cast): ... here.  Use build_reinterpret_cast_1.
2815         (build_const_cast_1): New function, split out from ...
2816         (build_const_cast): ... here.  Use build_const_cast_1.
2817         (build_c_cast): Rewrite to use build_const_cast_1,
2818         build_static_cast_1, and build_reinterpret_cast_1.
2819         (convert_member_func_to_ptr): New function.
2820
2821 2004-10-19  Paolo Bonzini  <bonzini@gnu.org>
2822
2823         PR c++/18047
2824         * parser.c (enum cp_parser_prec): Give relational expressions
2825         a higher precedence than equality expressions.
2826
2827 2004-10-15  Nathan Sidwell  <nathan@codesourcery.com>
2828
2829         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call.
2830         (ACCESSIBLY_UNIQUELY_DERIVED_P): Remove.
2831         (PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call.
2832         (enum base_access): Reorganize.
2833         (accessible_base_p, accessible_p): Add consider_local_p parameter.
2834         * call.c (standard_conversion): Update comment about
2835         DERIVED_FROM_P.
2836         (enforce_access): Adjust accessible_p call.
2837         (build_over_call): Adjust accessible_base_p call.
2838         * class.c (convert_to_base): Adjust lookup_base call.
2839         (build_vtbl_ref_1): Likewise.
2840         (warn_about_ambiguous_bases): Likewise. Add early exit.
2841         * cvt.c (convert_to_pointer_force) Adjust lookup_base call.
2842         * search.c (accessible_base_p): Add consider_local_p parameter.
2843         (lookup_base): Pass consider_local_p to accessible_base_p call.
2844         (friend_accessible_p): Check whether scope is a class member.
2845         Remove unnecessary class template check.
2846         (accessible_p): Add consider_local_p parameter. Use it.
2847         (adjust_result_of_qualified_name_lookup): Adjust lookup_base call.
2848         * tree.c (maybe_dummy_object): Likewise.
2849         * typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P.
2850         (build_class_member_access_expr): Adjust lookup_base call.
2851         * typeck2.c (binfo_or_else): Likewise.
2852         * rtti.c (build_dynamic_cast_1): Access can consider friendship
2853         and current scope.
2854
2855 2004-10-17  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2856
2857         PR c++/17743
2858         * decl2.c (grokfield): Apply attributes also to TYPE_DECLs.
2859
2860 2004-10-16  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2861
2862         PR c++/10479
2863         * parser.c (cp_parser_parenthesized_expression_list): Fold
2864         non-dependent expressions in attribute lists.
2865
2866 2004-10-15  Mark Mitchell  <mark@codesourcery.com>
2867
2868         PR c++/17042
2869         * decl.c (declare_global_var): Use the return value from pushdecl.
2870
2871         PR c++/14667
2872         * parser.c (cp_parser_simple_declaration): Do not diagnose invalid
2873         type names if we have already found a valid type.
2874         (cp_parser_member_declaration): Likewise.
2875
2876         PR c++/17916
2877         * parser.c (cp_parser_member_specification_opt): Handle
2878         CPP_PRAGMA.
2879
2880 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
2881
2882         * dump.c, g++spec.c, repo.c: Update copyright.
2883
2884 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
2885
2886         * decl.c: Fix a comment typo.
2887
2888 2004-10-13  Andrew Pinski  <pinskia@physics.uc.edu>
2889
2890         PR c++/16301
2891         * name-lookup.c (parse_using_directive): If we have a
2892         error_mark_node, do not set the decl namespace associations
2893         on it.
2894
2895 2004-10-14  Mark Mitchell  <mark@codesourcery.com>
2896
2897         PR c++/17976
2898         * decl.c (cp_finish_decl): Do not call expand_static_init more
2899         than once for a single variable.
2900
2901 2004-10-14  Matt Austern  <austern@apple.com>
2902
2903         * Make-lang.in (pt.o): depends on pointer-set.h
2904         * cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now.
2905         * pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t
2906         (for_each_template_parm): Convert from htab_t to pointer_set_t.
2907         * tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now.
2908
2909 2004-10-13  Andrew Pinski  <pinskia@physics.uc.edu>
2910
2911         PR c++/17661
2912         * semantics.c (finish_for_expr): Convert expression to void
2913         so that we don't create temporaries for a?b:c.
2914
2915 2004-10-13  Kazu Hirata  <kazu@cs.umass.edu>
2916
2917         * search.c: Fix a comment typo.
2918
2919 2004-10-12  Nathan Sidwell  <nathan@codesourcery.com>
2920
2921         * class.c (dfs_modify_vtables): Simplify condition. Return
2922         dfs_skip_bases as appropriate.
2923         (modify_all_vtables): Walk in pre-order.
2924         * search.c (dfs_walk_all, dfs_walk_once_r,
2925         dfs_walk_once_accessible_r): Assert post order function never
2926         returns dfs_skip_bases.
2927
2928         * search.c (struct lookup_base_data_s): New.
2929         (lookup_base_r): Replace with ...
2930         (dfs_lookup_base): ... this.
2931         (lookup_base): Use dfs_walk_all.
2932
2933 2004-10-12  Kazu Hirata  <kazu@cs.umass.edu>
2934
2935         * search.c: Fix comment typos.
2936
2937 2004-10-11  Mark Mitchell  <mark@codesourcery.com>
2938
2939         PR c++/15786
2940         * parser.c (cp_parser_declarator): Add member_p parameter.
2941         (cp_parser_condition): Adjust calls to cp_parser_declarator.
2942         (cp_parser_explicit_instantiation): Likewise.
2943         (cp_parser_init_declarator): Likewise.
2944         (cp_parser_direct_declarator): Add member_p parameter.  Do not
2945         parse tentatively when parsing the parameters to a member.
2946         (cp_parser_type_id): Adjust calls to cp_parser_declarator.
2947         (cp_parser_parameter_declaration): Likewise.
2948         (cp_parser_member_declaration): Likewise.
2949         (cp_parser_exception_declaration): Likewise.
2950
2951         PR c++/17936
2952         * cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment.
2953         * pt.c (optimize_specialization_lookup_p): Do not optimize lookups
2954         for members of partial or explicit specializations.
2955
2956         PR c++/17929
2957         * decl2.c (finish_anon_union): Robustify.
2958
2959 2004-10-11  Nathan Sidwell  <nathan@codesourcery.com>
2960
2961         * cp-tree.h (get_dynamic_cast_base_type): Rename to ...
2962         (dcast_base_hint): ... here.
2963         * rtti.c (build_dynamic_cast_1): Use dcast_base_hint.
2964         * search.c (struct dcast_data_s): New.
2965         (dynamic_cast_base_recurse): Remove. Replace with ...
2966         (dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New.
2967         (get_dynamic_cast_base_type): Rename to ...
2968         (dcast_base_hint): ... here.  Use dfs_walk_once_accessible.
2969         (accessible_r): Remove.
2970         (dfs_accessible_post): New, broken out of accessible_r.
2971         (accessible_p): Use dfs_walk_once_accessible.
2972         (dfs_walk_once_accessible_r): New. From accessible_r.
2973         (dfs_walk_once_accessible): New. From acessible_p.
2974
2975         * cp-tree.h (SAME_BINFO_TYPE_P): New.
2976         * class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare
2977         binfo types.
2978         (convert_to_base_statically, determine_primary_bases,
2979         update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits,
2980         dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
2981         accumulate_vtbl_inits, dfs_accumulate_vtbl_inits,
2982         build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise.
2983         * init.c (expand_member_init): Likewise.
2984         * search.c (lookup_base_r, dynamic_cast_base_recurse,
2985         binfo_via_virtual, copied_binfo, binfo_for_vbase,
2986         original_binfo): Likewise.
2987         * tree.c (copy_binfo): Likewise.
2988
2989 2004-10-11  Kazu Hirata  <kazu@cs.umass.edu>
2990
2991         * semantics.c: Fix comment typos.
2992
2993 2004-10-10  Andrew Pinski  <pinskia@physics.uc.edu>
2994
2995         PR c++/17554
2996         part of c++/17657
2997         middle-end/17703
2998         * semantics.c (maybe_cleanup_point_expr): Call
2999         fold_build_cleanup_point_expr.
3000         (maybe_cleanup_point_expr_void): New function.
3001         (add_decl_expr): Call maybe_cleanup_point_expr_void.
3002         (finish_expr_stmt): Likewise.
3003         (finish_return_stmt): Likewise.
3004         (finish_for_expr): Likewise.
3005         (finish_asm_stmt): Likewise.
3006         * typeck.c (condition_conversion): Call
3007         fold_build_cleanup_point_expr.
3008
3009 2004-10-10  Andrew Pinski  <pinskia@physics.uc.edu>
3010
3011         PR c++/17907
3012         * semantics.c (add_decl_expr): If the decl has a size which
3013         has side effects then the decl expression needs a cleanup point.
3014
3015 2004-10-10  Mark Mitchell  <mark@codesourcery.com>
3016
3017         PR c++/17393
3018         * decl.c (grokdeclarator): Robustify error-recovery on invalid
3019         declarations.
3020
3021 2004-10-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3022
3023         Convert diagnostics to use quoting flag q 7/n
3024         * typeck.c (composite_pointer_type_r, composite_pointer_type,
3025         cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr,
3026         string_conv_p, build_class_member_access_expr,
3027         build_class_member_access_expr, lookup_destructor,
3028         finish_class_member_access_expr, build_indirect_ref,
3029         get_member_function_from_ptrfunc, build_function_call,
3030         convert_arguments, build_binary_op, pointer_diff, build_unary_op,
3031         check_for_casting_away_constness, build_static_cast,
3032         build_reinterpret_cast, build_const_cast, build_c_cast,
3033         build_modify_expr, get_delta_difference, build_ptrmemfunc,
3034         dubious_conversion_warnings, convert_for_assignment,
3035         convert_for_initialization,
3036         maybe_warn_about_returning_address_of_local, check_return_expr):
3037         Use quoting marks.
3038
3039         * typeck2.c (error_not_base_type, readonly_error,
3040         abstract_virtuals_error, cxx_incomplete_type_diagnostic,
3041         store_init_value, digest_init, build_x_arrow,
3042         build_m_component_ref, require_complete_eh_spec_types): Likewise.
3043
3044         * tree.c (cp_build_qualified_type_real,
3045         handle_java_interface_attribute, handle_init_priority_attribute):
3046         Likewise.
3047
3048         * semantics.c (finish_asm_stmt, finish_non_static_data_member,
3049         finish_pseudo_destructor_expr,
3050         check_template_template_default_arg, begin_class_definition,
3051         finish_base_specifier, qualified_name_lookup_error,
3052         finish_id_expression, finish_typeof): Likewise.
3053
3054         * search.c (lookup_base, check_final_overrider,
3055         look_for_overrides_r): Likewise.
3056
3057         * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise.
3058
3059 2004-10-09  Mark Mitchell  <mark@codesourcery.com>
3060
3061         PR c++/17867
3062         * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a
3063         constructor.
3064
3065         PR c++/17670
3066         * init.c (build_new): Correct comments.
3067         * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in
3068         the non-array case.
3069
3070         PR c++/17821
3071         * parser.c (cp_parser_postfix_dot_deref_expression): If the
3072         pseduo-destructor-name production does not work, fall back to the
3073         ordinary production.
3074
3075         PR c++/17826
3076         * tree.c (cp_tree_equal): Handle a BASELINK.
3077
3078         PR c++/17524
3079         * cp-tree.h (check_var_type): New function.
3080         * decl.c (check_var_type): New function, split out from ...
3081         (grokdeclarator): ... here.
3082         * pt.c (tsubst_decl): Use check_var_type.
3083
3084         PR c++/17685
3085         * decl.c (grokdeclarator): Disallow declarations of operators as
3086         non-functions.
3087
3088 2004-10-08  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3089
3090         PR c++/17868
3091         * error.c (dump_expr): Add missing case for RDIV_EXPR.
3092
3093 2004-10-08  Kazu Hirata  <kazu@cs.umass.edu>
3094
3095         * pt.c, search.c: Fix comment typos.
3096
3097 2004-10-08  Nathan Sidwell  <nathan@codesourcery.com>
3098
3099         * cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp,
3100         unmarkedp): Remove.
3101         (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New.
3102         * class.c (struct find_final_overrider_data): Remove most_derived,
3103         vpath_list and vpath fields.  Add path field.
3104         (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust.
3105         (dfs_find_final_overrider): Rename to ...
3106         (dfs_find_final_overrider_pre): ... here. Adjust.
3107         (dfs_find_final_overrider_post): Adjust.
3108         (dfs_find_final_overrider_q): Fold into
3109         dfs_find_final_overrider_pre.
3110         (find_final_overrider): Adjust dfs searching.
3111         (dfs_modify_vtables): Don't mark binfo here.
3112         (modify_all_vtables): Use dfs_walk_once.
3113         (build_vtt_inits): Likwise. Use dfs_walk_all.
3114         (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here.
3115         Return dfs_skip_bases as appropriate.
3116         (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate.
3117         * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as
3118         appropriate. Don't mark binfo here.
3119         (initialize_vtbl_ptrs): Use dfs_walk_once.
3120         * search.c (struct vbase_info): Remove unused struct.
3121         (access_in_type): Use dfs_walk_once.
3122         (dfs_access_in_type): Don't mark binfo here.
3123         (dfs_accessible_queue_p, dfs_accessible_p) Remove.
3124         Fold into ...
3125         (accessible_r): ... here. New. Specialize dfs_walk_once.
3126         (accessible_p): Use accessible_r.
3127         (lookup_field_queue_p): Remove. Fold into ...
3128         (lookup_field_r): ... here. Adjust.
3129         (lookup_member): Use dfs_walk_all.
3130         (dfs_walk_real, dfs_walk): Replace with ...
3131         (dfs_walk_all, dfs_walk_once): ... these.
3132         (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once.
3133         (dfs_unmark, unmarkedp, markedp): Remove.
3134         (dfs_get_pure_virtuals): Don't mark binfo here.
3135         (get_pure_virtuals): Use dfs_walk_once.
3136         (dfs_debug_unmarked_p): Remove. Fold into ...
3137         (dfs_debug_mark): ... here.
3138         (note_debug_info_needed): Use dfs_walk_all.
3139
3140 2004-10-07  Andrew Pinski  <pinskia@physics.uc.edu>
3141
3142         * pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the
3143         CLEANUP_POINT_EXPR to get the asm expression.
3144
3145 2004-10-07  Mark Mitchell  <mark@codesourcery.com>
3146
3147         * cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag.
3148         (DECL_MEMBER_TEMPLATE_P): New macro.
3149         (is_member_template): Remove.
3150         (class_method_index_for_fn): New function.
3151         * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P.
3152         * class.c (finish_struct_methods): Remove out-of-date comment.
3153         * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P.
3154         * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and
3155         class_method_index_for_fn.
3156         * pt.c (is_member_template): Remove.
3157         (is_member_template_class): Likewise.
3158         (optimize_specialization_lookup_p): New function.
3159         (retrieve_specialization): Optimize lookups for members that are
3160         not member templates.
3161         (register_specialization): Adjust accordingly.
3162         (build_template_decl): Add member_template_p parameter.  Set
3163         DECL_MEMBER_TEMPLATE_P.
3164         (process_partial_specialization): Adjust call to
3165         retrieve_specialization.
3166         (push_template_decl_real): Determine whether the template is a
3167         member template.
3168         (lookup_template_class): Use retrieve_specialization.
3169         (tsubst_decl): Adjust call to retrieve_specialization.
3170         (tsubst_exception_specification): New function.
3171         (tsubst): Use it.
3172         (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P.
3173         (instantiate_template): Adjust call to retrieve_specialization.
3174         (regenerate_decl_from_template): Do not actually generate a new
3175         DECL.
3176         (instantiate_decl): Adjust call to retrieve_specialization.
3177         (class_method_index_for_fn): New method.
3178
3179 2004-10-07  Andrew Pinski  <pinskia@physics.uc.edu>
3180
3181         * parser.c (cp_parser_asm_definition): Look passed the
3182         CLEANUP_POINT_EXPR to get the asm expression.
3183
3184 2004-10-06  Andrew Pinski  <pinskia@physics.uc.edu>
3185
3186         PR c++/17368
3187         * semantics.c (finish_asm_stmt): Asm expressions need cleanup
3188         also.
3189
3190 2004-10-05  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3191
3192         Convert diagnostics to use quoting flag q 6/n
3193         * pt.c (finish_member_template_decl, check_specialization_scope,
3194         maybe_process_partial_specialization, determine_specialization,
3195         check_explicit_specialization, maybe_check_template_type,
3196         process_partial_specialization, check_default_tmpl_args,
3197         push_template_decl_real, redeclare_class_template,
3198         convert_nontype_argument, coerce_template_parms,
3199         lookup_template_class, push_tinst_level,
3200         instantiate_class_template, tsubst_arg_types,
3201         tsubst_function_type, tsubst, tsubst_qualified_id,
3202         tsubst_copy_and_build, check_instantiated_args,
3203         do_decl_instantiation, do_type_instantiation,
3204         invalid_nontype_parm_type_p, check_specialization_namespace,
3205         convert_template_argument, determine_specialization,
3206         check_template_shadow, tsubst_decl
3207         instantiate_pending_templates): Use quoting marks.
3208
3209 2004-10-05  Nathan Sidwell  <nathan@codesourcery.com>
3210
3211         PR c++/17829
3212         * parser.c (cp_parser_postfix_expression): Inhibit Koenig when
3213         unqualified lookup finds a member function.
3214
3215 2004-10-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3216
3217         Convert diagnostics to use quoting flag q 5/n
3218         * parser.c (cp_parser_name_lookup_error,
3219         cp_parser_diagnose_invalid_type_name,
3220         cp_parser_primary_expression, cp_parser_unqualified_id,
3221         cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement,
3222         cp_parser_jump_statement, cp_parser_simple_declaration,
3223         cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id,
3224         cp_parser_type_parameter, cp_parser_template_id,
3225         cp_parser_template_name, cp_parser_direct_declarator,
3226         cp_parser_parameter_declaration_list, cp_parser_class_head,
3227         cp_parser_base_specifier, cp_parser_lookup_name,
3228         cp_parser_late_parsing_default_args,
3229         cp_parser_optional_template_keyword
3230         cp_parser_elaborated_type_specifier, cp_parser_check_class_key,
3231         cp_parser_check_access_in_redeclaration): Use quoting marks.
3232
3233         * name-lookup.c (supplement_binding, pushdecl,
3234         check_for_out_of_scope_variable, validate_nonmember_using_decl,
3235         do_nonmember_using_decl, lookup_tag, set_decl_namespace,
3236         push_namespace, do_namespace_alias, do_using_directive,
3237         ambiguous_decl, lookup_namespace_name, add_function): Likewise.
3238
3239         * method.c (use_thunk): Likewise.
3240
3241         * lex.c (unqualified_name_lookup_error,
3242         unqualified_fn_lookup_error): Likewise.
3243
3244 2004-10-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3245
3246         Convert diagnostics to use quoting flag q 4/n
3247         * except.c (decl_is_java_type, build_throw,
3248         is_admissible_throw_operand, check_handlers_1, check_handlers):
3249         Use quoting formats.
3250         * friend.c (add_friend, make_friend_class, do_friend): Likewise.
3251         * init.c (sort_mem_initializers, emit_mem_initializers,
3252         member_init_ok_or_else, expand_member_init, is_aggr_type,
3253         build_offset_ref, build_java_class_ref): Likewise.
3254
3255 2004-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3256
3257         Convert diagnostics to use quoting flag q 3/n
3258         * decl.c (pop_label, duplicate_decls, redeclaration_error_message,
3259         redeclaration_error_message, lookup_label, check_goto,
3260         make_typename_type, make_unbound_class_template,
3261         fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1,
3262         grok_reference_init, layout_var_decl, maybe_commonize_var,
3263         check_for_uninitialized_const_var, reshape_init_array,
3264         reshape_init, check_initializer, cp_finish_decl,
3265         member_function_or_else, bad_specifiers, grokfndecl, grokvardecl,
3266         check_static_variable_definition, compute_array_index_type,
3267         create_array_type_for_decl, check_special_function_return_type,
3268         grokdeclarator, check_default_argument, grokparms,
3269         grok_ctor_properties, grok_op_properties,
3270         check_elaborated_type_specifier, xref_tag, finish_enum,
3271         build_enumerator, check_function_type, start_preparsed_function,
3272         store_parm_decls): Use quoting formats.
3273         * decl2.c (grok_array_decl, delete_sanity, check_member_template,
3274         check_java_method, check_classfn, finish_static_data_member_decl,
3275         grokfield, grokbitfield, grok_function_init,
3276         build_anon_union_vars, coerce_new_type, coerce_delete_type,
3277         check_default_args): Likewise.
3278         * parser.c (cp_parser_decl_specifier_seq): Likewise.
3279
3280 2004-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3281
3282         Convert diagnostics to use quoting flag q 2/n
3283         * class.c (build_base_path, add_method, alter_access,
3284         handle_using_decl, check_bases,
3285         maybe_warn_about_overly_private_class, find_final_overrider,
3286         warn_hidden, finish_struct_anon, add_implicitly_declared_members,
3287         check_bitfield_decl, check_field_decls, layout_empty_base,
3288         build_base_field, check_methods, layout_virtual_bases,
3289         warn_about_ambiguous_bases, layout_class_type, finish_struct_1,
3290         resolve_address_of_overloaded_function, instantiate_type,
3291         note_name_declared_in_class): Use format flag "q" for quoting.
3292
3293 2004-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3294
3295         Convert diagnostics to use quoting flag q 1/n
3296         * error.c (locate_error): Ignore quoting flag q.
3297         * call.c (build_user_type_conversion_1, build_operator_new_call,
3298         build_object_call, op_error, build_conditional_expr,
3299         build_new_op, build_op_delete_call, enforce_access,
3300         convert_like_real, convert_arg_to_ellipsis, build_x_va_arg,
3301         convert_default_arg, build_over_call, build_new_method_call,
3302         joust, perform_implicit_conversion, initialize_reference): Use the
3303         quoting flag q.
3304
3305 2004-10-03  Andrew Pinski  <pinskia@physics.uc.edu>
3306
3307         PR c++/17797
3308         * typeck.c (build_reinterpret_cast): Return if the inner type
3309         is error_mark_node.
3310
3311 2004-10-01  Jan Hubicka  <jh@suse.cz>
3312
3313         * semantics.c (expand_body): Update call of tree_rest_of_compilation.
3314
3315 2004-09-30  Nathan Sidwell  <nathan@codesourcery.com>
3316
3317         * cp-tree.h (struct lang_decl): Shrink by reordering fields and
3318         turning operator_code and fixed_offset into bitfields.
3319
3320 2004-09-29  Joseph S. Myers  <jsm@polyomino.org.uk>
3321
3322         * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
3323
3324 2004-09-29  Jason Merrill  <jason@redhat.com>
3325
3326         PR tree-optimization/17697
3327         * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
3328
3329 2004-09-28  Jason Merrill  <jason@redhat.com>
3330
3331         PR middle-end/17525
3332         * class.c (build_base_field): Set TYPE_MODE.
3333
3334 2004-09-28  Roger Sayle  <roger@eyesopen.com>
3335
3336         PR driver/17537
3337         * g++spec.c (lang_specific_driver): Unrecognized libraries, other
3338         than -lc and -lm, may require linking against libstc++.
3339
3340 2004-09-28  Kazu Hirata  <kazu@cs.umass.edu>
3341
3342         * tree.c: Fix a comment typo.
3343
3344 2004-09-28  Nathan Sidwell  <nathan@codesourcery.com>
3345
3346         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove.
3347         (struct secondary_vptr_vtt_init_data_s): New.
3348         (build_vtt_inits): Adjust dfs_walkers.
3349         (dfs_build_secondary_vptr_vtt_inits): Caller data is a
3350         secondary_vptr_vtt_init_data_s structure. Adjust.
3351         (dfs_ctor_vtable_bases_queue_p): Remove.
3352         (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify.
3353
3354         * pt.c (struct get_template_base_data_s): Remove.
3355         (get_template_base_r): Fold into get_template_base.
3356         (get_template_base): Walk base binfos directly in inheritance
3357         graph order.
3358
3359 2004-09-27  Mark Mitchell  <mark@codesourcery.com>
3360
3361         PR c++/17642
3362         * cp-tree.h (fold_if_not_in_template): New function.
3363         * call.c (build_conditional_expr): Use fold_if_not_in_template.
3364         (build_cxx_call): Likewise.
3365         * cvt.c (convert_to_complex): Likewise.
3366         (ocp_convert): Likewise.
3367         (convert): Likewise.
3368         (convert_force): Likewise.
3369         * decl.c (compute_array_index_type): Clear
3370         processing_template_decl while folding array bounds.
3371         * pt.c (convert_nontype_argument): Clear
3372         processing_template_decl while processing non-type argument
3373         initialization.
3374         * tree.c (fold_if_not_in_template): New function.
3375         * typeck.c (build_class_member_access_expr): Use
3376         fold_if_not_in_template.
3377         (build_array_ref): Likewise.
3378         (build_binary_op): Likewise.  Do not try to optimize computations
3379         when processing templates.
3380         (cp_pointer_int_sum): Use fold_if_not_in_template.
3381         (pointer_diff): Likewise.
3382         (build_unary_op): Likewise.
3383         (build_reinterpret_cast): Likewise.
3384         (get_delta_difference): Likewise.
3385         (expand_ptrmemfunc_cst): Likewise.
3386         (dubious_conversion_warnings): Likewise.
3387
3388 2004-09-27  Matt Austern  <austern@apple.com>
3389
3390         * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c
3391         (cp_lexer_get_preprocessor_token): Set implicit_extern_c for
3392         tokens that come from headers that are implicitly extern "C".
3393         (struct cp_parser): new one-bit field, implicit_extern_c.
3394         (cp_parser_new): Set parser's implicit_extern_c to false.
3395         (cp_parser_translation_unit): Pop lang context if we were in a
3396         header that was implicitly extern "C".
3397         (cp_parser_declaration_seq_opt): Push/pop lang context as
3398         required by the token's and parser's implicit_extern_c.
3399
3400 2004-09-27  Mark Mitchell  <mark@codesourcery.com>
3401
3402         PR c++/17585
3403         * cp-tree.h (shared_member_p): Declare.
3404         * search.c (shared_member_p): Give it external linkage.
3405         * semantics.c (finish_qualified_id_expr): Use it.
3406         (finish_id_expression): Likewise.
3407
3408         PR c++/17585
3409         * semantics.c (finish_id_expression): Do not add "this->" to
3410         static member functions.
3411
3412 2004-09-27  Nathan Sidwell  <nathan@codesourcery.com>
3413
3414         PR c++/17681
3415         * error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
3416
3417         * class.c (struct count_depth_data): Remove.
3418         (dfs_depth_post, dfs_depth_q): Remove.
3419         (find_final_overrider): Use number of vbase classes as depth
3420         bound.
3421
3422         * cp-tree.h (types_overlap_p): Remove.
3423         * search.c (struct overlap_info): Remove.
3424         (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove.
3425
3426         * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove.
3427         (get_template_base_recursive): Remove. Replace with ...
3428         (get_template_base_r): ... this.
3429         (struct get_template_base_data_s): New.
3430         (get_template_base): Use get_template_base_r via dfs_walk.  Always
3431         return NULL on failure.
3432         (unify): Remove error_mark_node check from get_template_base result.
3433
3434 2004-09-24  Paolo Bonzini  <bonzini@gnu.org>
3435
3436         * parser.c (cp_parser_expression_stack): Clarify why it is
3437         an array of NUM_PREC_VALUES elements.
3438         (cp_parser_binary_expression): Clarify why we do not need to
3439         handle stack overflow.
3440
3441 2004-09-24  Nathan Sidwell  <nathan@codesourcery.com>
3442
3443         PR c++/16889
3444         * search.c (lookup_field_queue_p): Correct check for hidden base.
3445
3446         * search.c (bfs_walk): Remove.
3447         (lookup_member): Use dfs_walk_real.
3448         (dfs_walk_real): Move and adjust documentation from bfs_walk.
3449
3450 2004-09-23  Zack Weinberg  <zack@codesourcery.com>
3451
3452         * decl.c (grokfndecl): If ::main is found not to return int,
3453         correct it after issuing a diagnostic.
3454         (grokdeclarator): If the incoming type was error_mark_node, do
3455         not complain about declaring something with no type.
3456         (start_function): Change check for ::main not returning int to
3457         an assertion, as grokfndecl now catches this when the user did it.
3458         * init.c (perform_member_init, sort_mem_initializers)
3459         (emit_mem_initializers): Make most diagnostics be issued on
3460         the line of current_function_decl, not whatever the current
3461         input line is.
3462         * parser.c (cp_lexer_peek_token_emit_debug_info): Surround
3463         definition and declaration with #ifdef ENABLE_CHECKING.
3464         Avoid unnecessary use of fprintf.
3465         (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
3466         definitions to avoid warnings.
3467         (cp_lexer_new_main): Add assertion that first token is not a
3468         padding token.
3469         (cp_lexer_new_from_token_array): Fold into ...
3470         (cp_lexer_new_from_tokens): ... here.  Add assertion that
3471         first token is not a padding token.
3472         (cp_lexer_set_source_position_from_token): Move nearer to callers.
3473         Remove unused lexer argument.
3474         (cp_lexer_peek_token): Just print debugging report (if enabled)
3475         and return lexer->next_token.
3476         (cp_lexer_skip_purged_tokens): Delete.
3477         (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
3478         inline, simplify bodies.
3479         (cp_lexer_peek_nth_token): Add debugging report a la
3480         cp_lexer_peek_token.
3481         (cp_lexer_consume_token): Correct commentary.  Advance over
3482         purged tokens here.  Set current source position here, from
3483         token to be returned.  Avoid unnecessary use of fprintf.
3484         (cp_lexer_purge_token): Advance next_token pointer over this and
3485         subsequent purged tokens.
3486         (cp_parser_error): Adjust source position to that of the
3487         peeked token.
3488         (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
3489         (cp_parser_string_literal): Remove some excessive cleverness.
3490         (cp_parser_enum_specifier): Call start_enum before consuming
3491         the opening brace.
3492         (cp_parser_member_declaration): Make the "extra semicolon"
3493         diagnostic consistently-worded with the other place this is
3494         diagnosed.  Explicitly set the diagnostic location to the
3495         location of the offending semicolon.
3496         (cp_parser_enclosed_template_argument_list): Use %</%> quoting
3497         in diagnostics.  Do not use cp_parser_require.  Set location
3498         of diagnostics about improper use of '>>' to location of
3499         offending token.
3500         (cp_parser_late_parsing_for_member):
3501         Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
3502         (cp_parser_late_parsing_default_args): Likewise.  Manually
3503         move some logic outside the loop.
3504
3505 2004-09-23  Andrew Pinski  <pinskia@physics.uc.edu>
3506
3507         PR c++/17618
3508         * cvt.c (cp_convert_to_pointer): Return early when the type is
3509         an error_mark_node.
3510
3511 2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
3512
3513         PR c++/13989
3514         PR c++/9844
3515         * decl.c (grokfndecl): Add new argument "attrlist", use it
3516         to call cplus_decl_attributes.
3517         (start_function): Remove call to cplus_decl_attributes.
3518         * cvt.c (ocp_convert): Add support to use type conversion
3519         function to vector type.
3520         * parser.c (cp_parser_conversion_type_id): Add attributes, if any,
3521         to the parsed type.
3522
3523 2004-09-23  Paolo Bonzini  <bonzini@gnu.org>
3524
3525         PR c++/17596
3526
3527         * parser.c (cp_parser_token_tree_map_node,
3528         cp_parser_pm_expression, cp_parser_additive_expression,
3529         cp_parser_multiplicative_expression, cp_parser_shift_expression,
3530         cp_parser_relational_expression, cp_parser_equality_expression,
3531         cp_parser_and_expression, cp_parser_exclusive_or_expression,
3532         cp_parser_inclusive_or_expression,
3533         cp_parser_logical_and_expression,
3534         cp_parser_logical_or_expression): Removed.
3535         (enum cp_parser_prec, struct cp_parser_token_tree_map_node,
3536         binops, binops_by_token): New.
3537         (cp_parser_assignment_expression): Use cp_parser_binary_expression.
3538         (cp_parser_new): Initialize binops_by_token.
3539         (cp_parser_binary_expression): Rewritten.
3540         (N_CP_TTYPES): New.
3541
3542 2004-09-23  Kazu Hirata  <kazu@cs.umass.edu>
3543
3544         * parser.c: Fix a comment typo.
3545
3546 2004-09-23  Nathan Sidwell  <nathan@codesourcery.com>
3547
3548         PR c++/17620
3549         * decl.c (xref_basetypes): Look through typedefs before checking
3550         for duplicate base.
3551
3552 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
3553
3554         * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
3555         * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
3556         * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
3557         (init_rtti_processing): Initialize it to something realistic.
3558         (get_tinfo_decl): Adjust pushing the new decl.
3559
3560         * cp-tree.h (struct lang_type_class): Remove marked flags, add
3561         diamond_shaped and repeated_base flags.  Reorder to keep 8-bit blocks.
3562         (TYPE_MARKED_P): New.
3563         (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New.
3564         (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
3565         CLEAR_CLASSTYPE_MARKED_N): Remove.
3566         (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*,
3567         CLEAR_CLASSTYPE_MARKED_*): Remove.
3568         * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond
3569         shaped and repeated base properties.
3570         * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET.
3571         * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark,
3572         class_hint_flags): Remove.
3573         (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and
3574         CLASSTYPE_DIAMOND_SHAPED_P.
3575
3576 2004-09-21  Ziemowit Laski  <zlaski@apple.com>
3577
3578         * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from
3579         cp-objcp-common.h.
3580         (objcp_tsubst_copy_and_build): Reformat function signature.
3581         * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise.
3582         (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c.
3583
3584 2004-09-21  Zack Weinberg  <zack@codesourcery.com>
3585
3586         * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):
3587         Don't handle CPP_PRAGMA tokens specially.
3588         (cp_lexer_handle_pragma): Use cp_lexer_consume_token.  Don't
3589         purge the token; do clear token->value after processing.  Add
3590         assertion at beginning that token->value is nonzero.
3591         (cp_parser_statement, cp_parser_declaration_seq_opt): Handle
3592         CPP_PRAGMA as a full statement or declaration in its own right.
3593
3594 2004-09-21  Matt Austern  <austern@apple.com>
3595
3596         PR c++/15049
3597         * decl.c (grokvardecl): Accept declarations of global variables
3598         using anonymous types.
3599
3600 2004-09-21  Roger Sayle  <roger@eyesopen.com>
3601
3602         PR c++/7503
3603         * tree.c (lvalue_p_1):  Disallow MIN_EXPR and MAX_EXPR as lvalues
3604         if either operand has side-effects.
3605         * typeck.c (rationalize_conditional_expr): Assert that neither
3606         operand of MIN_EXPR or MAX_EXPR has side-effects.
3607         (build_modify_expr):  Add support for MIN_EXPR and MAX_EXPR.
3608         Check that the "lhs" is a valid lvalue, i.e. that neither operand
3609         of a MIN_EXPR or MAX_EXPR has a side-effect.
3610
3611 2004-09-21  Nathan Sidwell  <nathan@codesourcery.com>
3612
3613         * cp-tree.h (struct lang_type_header): Remove
3614         uses_multiple_inheritance field.
3615         (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
3616         (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
3617         (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
3618         (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
3619         (TYPE_CONTAINS_VPTR_P): Likewise.
3620         * call.c (add_template_candidate_real): Use
3621         CLASSTYPE_VBASECLASSES.
3622         (build_special_member_call): Likewise.
3623         * class.c (finish_struct_bits): Remove
3624         TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
3625         bookkeeping.
3626         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
3627         (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
3628         bookkeeping.
3629         (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
3630         (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
3631         Likewise.
3632         * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
3633         TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
3634         bookkeeping.
3635         (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
3636         * decl2.c (maybe_retrofit_in_chrg): Likewise.
3637         * init.c (expand_member, push_base_cleanups): Likewise.
3638         * pt.c (instantiate_class_template): Remove
3639         TYPE_USES_MULTIPLE_INHERITANCE,
3640         TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
3641         bookkeeping.
3642         * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
3643         check.
3644         * typeck2.c (process_init_constructor): Replace some sorrys with
3645         asserts.
3646
3647 2004-09-21  Andreas Tobler  <a.tobler@schweiz.ch>
3648
3649         * decl.c (reshape_init_array): Initialize max_index_cst to fix
3650         bootstrap failure.
3651
3652 2004-09-20  Mark Mitchell  <mark@codesourcery.com>
3653
3654         PR c++/17530
3655         * pt.c (tsubst): Fix parentheses to accomodate emacs.
3656         (tsubst_baselink): If we get a single function, mark it as used.
3657
3658 2004-09-20  Matt Austern <austern@apple.com>
3659             Zack Weinberg  <zack@codesourcery.com>
3660
3661         * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
3662         Apply lbasename to input_filename before passing to get_fileinfo.
3663         * semantics.c (begin_class_definition): Likewise.
3664         * lex.c (handle_pragma_interface): Apply get_fileinfo to the
3665         correct filename.  Rename variables to be less confusing.
3666         (handle_pragma_implementation): Likewise.  Disable "appears
3667         after file is included" diagnostic.
3668
3669         * parser.c (struct cp_token): Add in_system_header fiag.
3670         (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
3671         (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
3672         (CPP_NONE, cp_lexer_read_token): Delete.
3673         (struct cp_lexer): Remove first_token, string_tokens,
3674         main_lexer_p fields.  Clarify comments.
3675         (struct cp_token_cache): Now just a pair of pointers.
3676         (CP_LEXER_BUFFER_SIZE): New #define.
3677         (CPP_PURGED): New fake token type.
3678         (cp_lexer_new_from_token_array, cp_lexer_destroy)
3679         (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
3680         (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
3681         New functions.
3682         (cp_lexer_new_from_tokens): Now a simple wrapper around
3683         cp_lexer_new_from_token_array.
3684         (cp_lexer_set_source_position_from_token): Also update
3685         in_system_header.
3686         (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
3687         Don't wrap round.
3688         (cp_lexer_token_difference): Dont handle wrapping round.
3689         (cp_lexer_new_main): Enable pragma deferral and raw strings,
3690         read the entire translation unit through c_lex_with_flags into
3691         this lexer's buffer, then turn raw strings back off again.
3692         (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
3693         (cp_lexer_get_preprocessor_token): No need to handle not being
3694         the main lexer.  Set token->in_system_header too.
3695         (cp_lexer_peek_token): Skip purged tokens.  Feed pragma tokens
3696         to cp_lexer_handle_pragma.  No need to call cp_lexer_read_token.
3697         (cp_lexer_peek_nth_token): Likewise.
3698         (cp_lexer_purge_token): Mark the token PURGED, don't shift all
3699         the other tokens down.
3700         (cp_lexer_purge_tokens_after): Likewise.
3701         (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
3702         about there being no tokens.
3703         (cp_lexer_print_token): Revise to give useful information on
3704         all tokens.
3705         (struct cp_parser): Add field translate_strings_p.
3706         (cp_parser_new): Initialize it.
3707         (cp_parser_translation_unit): Destroy the lexer when done.
3708         (cp_parser_parameter_declaration): Restructure saving of
3709         default arguments.
3710         (cp_parser_save_member_function_body): Likewise.
3711         (cp_parser_check_for_invalid_template_id)
3712         (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
3713         Adjust calls to cp_lexer_advance_token.
3714         (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
3715         No need to fiddle c_lex_string_translate.
3716         (cp_parser_primary_expression, cp_parser_linkage_specification)
3717         (cp_parser_asm_definition, cp_parser_asm_specification_opt)
3718         (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
3719         Use cp_parser_string_literal.
3720         (cp_parser_attribute_list): Save and restore
3721         parser->translate_strings_p, not c_lex_string_translate.
3722         (cp_parser_cache_group): Delete.
3723         (cp_parser_cache_group_1): Rename cp_parser_cache_group.  Do
3724         not take a cache argument.
3725
3726 2004-09-20  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3727
3728         PR c++/14179
3729         * decl.c (reshape_init): Extract array handling into...
3730         (reshape_init_array): New function. Use integers instead of trees
3731         for indices. Handle out-of-range designated initializers.
3732
3733 2004-09-20  Steven Bosscher  <stevenb@suse.de>
3734
3735         * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
3736         to null_node.
3737
3738 2004-09-19  Mark Mitchell  <mark@codesourcery.com>
3739
3740         * decl2.c (determine_visibility): Allow class visibility
3741         directives to override targetm.cxx.export_class_data.
3742
3743 2004-09-18  Kazu Hirata  <kazu@cs.umass.edu>
3744
3745         * call.c, semantics.c: Follow spelling conventions.
3746         * class.c: Fix a comment typo.
3747
3748 2004-09-16  Geoffrey Keating  <geoffk@apple.com>
3749
3750         PR pch/13361
3751         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3752         (handle_pragma_implementation): Likewise.
3753
3754 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
3755             Zack Weinberg  <zack@codesourcery.com>
3756
3757         * cp-tree.def: Use tree_code_class enumeration constants
3758         instead of code letters.
3759         * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
3760         * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
3761         Update for new tree-class enumeration constants.
3762
3763 2004-09-16  Mark Mitchell  <mark@codesourcery.com>
3764
3765         PR c++/16002
3766         * parser.c (cp_parser_simple_declaration): Commit to tentative
3767         parses after seeing a decl-specifier.
3768         (cp_parser_simple_declaration): Eliminate spurious message.
3769         (cp_parser_init_declarator): Adjust error message.
3770
3771         PR c++/16029
3772         * lex.c (unqualified_name_lookup_error): Mark the dummy
3773         declaration as used.
3774
3775         PR c++/17501
3776         * parser.c (cp_parser_nested_name_specifier): Do not resolve
3777         typename types if the user explicitly said "typename".
3778
3779 2004-09-16  Andrew MacLeod  <amacleod@redhat.com>
3780
3781         * error.c (dump_decl): Make sure there is lang_specific info before
3782         checking for DTOR and CTOR decls.
3783
3784 2004-09-16  Nathan Sidwell  <nathan@codesourcery.com>
3785
3786         * class.c (copy_virtuals): Remove.
3787         (build_primary_vtable): Use copy_list directly.
3788         (build_secondary_vtable): Likewise.
3789         (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
3790         (create_vtable_ptr): Likewise.
3791
3792 2004-09-16  Kazu Hirata  <kazu@cs.umass.edu>
3793
3794         * search.c: Follow spelling conventions.
3795
3796 2004-09-16  Nathan Sidwell  <nathan@codesourcery.com>
3797
3798         * cp-tree.h (struct lang_type_class): Make pure_virtuals a
3799         VEC(tree).
3800         (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
3801         comments.
3802         * call.c (build_new_method_call): Don't confirm a pure virtual is
3803         in CLASSTYPE_PURE_VIRTUALS.  Reorder checks. Make it a warning.
3804         * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
3805         (fixup_inline_methods, finish_struct): Likewise.
3806         * decl.c (finish_method): Likewise.
3807         * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
3808         CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
3809         * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
3810         vector to avoid repeating the list in error messages.
3811
3812 2004-09-15  Mark Mitchell  <mark@codesourcery.com>
3813
3814         * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
3815         * cp-tree.h (cxx_comdat_group): Declare.
3816         * decl.c (cxx_comdat_group): New function.
3817
3818 2004-09-15  Nathan Sidwell  <nathan@codesourcery.com>
3819
3820         * search.c (get_pure_virtuals): Remove unused variables.
3821
3822         * cp-tree.h (struct lang_decl_flags): Remove
3823         needs_final_overrider.
3824         (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
3825         * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
3826         * class.c (finish_struct_bits): Correct comment about
3827         CLASSTYPE_PURE_VIRTUALS.
3828         * search.c (get_pure_virtuals): Remove useless loop.
3829
3830 2004-09-14  Mark Mitchell  <mark@codesourcery.com>
3831
3832         PR c++/17324
3833         * mangle.c (partially_mangled_name): New variable.
3834         (partially_mangled_name_len): Likewise.
3835         (save_partially_mangled_name): New function.
3836         (restore_partially_mangled_name): Likewise.
3837         (write_encoding): Save and restore partially mangled names around
3838         calls to get_mostly_instantiated_function_type.
3839         (write_unqualified_name): Likewise.
3840
3841 2004-09-14  Nathan Sidwell  <nathan@codesourcery.com>
3842
3843         * pt.c (unify): Replace gcc_unreachable with gcc_assert.
3844
3845 2004-09-13  Mark Mitchell  <mark@codesourcery.com>
3846
3847         PR c++/16162
3848         * parser.c (cp_parser_id_expression): Correct value for
3849         is_declarator.
3850         (cp_parser_nested_name_specifier_opt): Look through typenames as
3851         necessary.
3852         (cp_parser_template_name): Honor check_dependency_p.
3853
3854         PR c++/16716
3855         * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
3856         Robustify.
3857
3858         PR c++/17327
3859         * pt.c (unify): Add ENUMERAL_TYPE case.  Replace sorry with
3860         gcc_unreacable.
3861
3862 2004-09-12  Richard Henderson  <rth@redhat.com>
3863
3864         PR c++/16254
3865         * semantics.c (maybe_cleanup_point_expr): Don't call fold.
3866         * typeck.c (condition_conversion): Likewise.
3867
3868 2004-09-11  Richard Henderson  <rth@redhat.com>
3869
3870         PR c++/17404
3871         * pt.c (cur_stmt_expr): Move from tsubst_expr.
3872         (tsubst_expr) <case STMT_EXPR>: Move ...
3873         (tsubst_copy_and_build): ... here.
3874
3875 2004-09-10  Zack Weinberg  <zack@codesourcery.com>
3876
3877         * cp-tree.h (interface_only, interface_unknown): Delete declarations;
3878         comment explaining them moved to c-common.h.
3879         * lex.c (interface_only, interface_unknown, extract_interface_info):
3880         Delete definitions.
3881         (cxx_finish): Don't reset interface_unknown.
3882         (handle_pragma_interface): Don't set interface_only and
3883         interface_unknown; just the like-named fields in finfo.
3884         (handle_pragma_implementation): Adjust comment.
3885         * decl2.c (cp_finish_file): Don't reset interface_only and
3886         interface_unknown.
3887         * method.c (synthesize_method): Don't reset interface_unknown or
3888         call extract_interface_info.
3889         * pt.c (pop_tinst_level): Don't call extract_interface_info.
3890         * decl.c (start_cleanup_fn): Don't save or restore interface_only
3891         and interface_unknown.
3892         (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
3893         and use the result instead of the interface_only/interface_unknown
3894         globals.
3895         (start_preparsed_function): Likewise.
3896         * lex.c (cxx_make_type): Likewise.
3897         * semantics.c (begin_class_definition): Likewise.
3898         (expand_body): Don't call extract_interface_info.
3899
3900 2004-09-10  Ziemowit Laski  <zlaski@apple.com>
3901
3902         * decl.c (objc_mark_locals_volatile): Make description of
3903         routine more descriptive; only mark VAR_DECLs at each
3904         binding level.
3905
3906 2004-09-10  Richard Henderson  <rth@redhat.com>
3907
3908         PR c++/17386
3909         * call.c (build_vfield_ref): Move...
3910         * class.c (build_vfield_ref): ... here.  Convert datum to the
3911         primary base containing the vptr.
3912         (make_new_vtable): Simplify build_primary_vtable arguments.
3913         (finish_struct_1): Do not duplicate TYPE_VFIELD.
3914         * typeck.c (build_class_member_access_expr): Don't warn for
3915         null object access to base fields.
3916
3917 2004-09-10  Ziemowit Laski  <zlaski@apple.com>
3918
3919         * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
3920         New functions, to be called from ObjC++.
3921
3922 2004-09-10  Kazu Hirata  <kazu@cs.umass.edu>
3923
3924         * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
3925         name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
3926         comment typos.
3927
3928 2004-09-09  Ziemowit Laski  <zlaski@apple.com>
3929
3930         * typeck.c (build_c_cast): Preserve the cast if casting
3931         to and from an Objective-C type.
3932
3933 2004-09-09  Ziemowit Laski  <zlaski@apple.com>
3934
3935         * Make-lang.in (cp/typeck.o): Depend on c-common.h.
3936         * typeck.c: Include c-common.h.
3937         (comptypes): For RECORD_TYPEs, call objc_comptypes() and
3938         return the result if nonnegative.
3939
3940 2004-09-09  Zack Weinberg  <zack@codesourcery.com>
3941
3942         * decl2.c (import_export_class)
3943         * lex.c (handle_pragma_interface):
3944         Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
3945
3946 2004-09-08  Ziemowit Laski  <zlaski@apple.com>
3947
3948         * Make-lang.in (cp/semantics.o): Depend on c-common.h.
3949         * semantics.c: Include c-common.h.
3950         (finish_compound_stmt): Call objc_clear_super_receiver().
3951
3952 2004-09-08  Ziemowit Laski  <zlaski@apple.com>
3953
3954         * cp-tree.h (do_poplevel): New prototype.
3955         * semantics.c (do_poplevel): Make externally visible.
3956
3957 2004-09-08  Nathan Sidwell  <nathan@codesourcery.com>
3958
3959         * cp-tree.h (tree_pair_s): Define a GC'd vector.
3960         * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
3961         * semantics.c (deferred_access): Likewise.
3962
3963 2004-09-06  Daniel Jacobowitz  <dan@debian.org>
3964
3965         * semantics.c (expand_body): Assert that we are not nested.
3966
3967 2004-09-06  Zack Weinberg  <zack@codesourcery.com>
3968
3969         * decl.c (build_enumerator): Use add_double and int_fits_type_p
3970         instead of cp_build_binary_op, to avoid creating short-lived trees.
3971         * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
3972         lookahead instead of backtracking.  Move some code to avoid a
3973         conditional branch.
3974         (cp_parser_enum_specifier): Avoid duplication of effort with caller.
3975         Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
3976         (cp_parser_enumerator_list, cp_parser_enumerator_definition):
3977         Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
3978
3979 2004-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3980
3981         * decl.c (grok_declarator): Remove a redundant semicolon.
3982
3983         * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
3984         Correct comments describing function parameters.
3985
3986 2004-09-03  Matt Austern  <austern@apple.com>
3987         Compile speed improvement.
3988         * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
3989         Otherwise define a stub macro that expands to nothing.
3990         (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set.  Otherwise
3991         define a stub macro that expands to 0.
3992         (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
3993         (cp_lexer_stop_debugging): Likewise.
3994         (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set.  Otherwise
3995         define a stub macro that expands to NULL.
3996         (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
3997         (cp_lexer_new_from_tokens): Likewise.
3998
3999 2004-09-03  Jan Hubicka  <jh@suse.cz>
4000
4001         * decl.c (finish_function): Clean out pointers we no longer need.
4002
4003 2004-09-03  Jan Beulich  <jbeulich@novell.com>
4004
4005         * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
4006         than "-lm".
4007
4008 2004-09-02  Paul Brook  <paul@codesourcery.com>
4009
4010         * decl2.c (determine_visibility): Only check data visibility
4011         for VAR_DECLS.
4012
4013 2004-08-31  Mark Mitchell  <mark@codesourcery.com>
4014
4015         * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
4016         * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
4017         * decl2.c (determine_visibility): Honor
4018         TARGET_CXX_EXPORT_CLASS_DATA.
4019
4020         * class.c (key_method): Rename to ...
4021         (determine_key_method): ... this.
4022         (finish_struct_1): Adjust accordingly.
4023         * cp-tree.h (key_method): Declare.
4024         * decl2.c (maybe_emit_vtables): Determine the key method here if
4025         it has not already been done.
4026
4027 2004-08-31  Ziemowit Laski  <zlaski@apple.com>
4028
4029         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
4030         (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
4031         (cp/cp-decl.c): Do not depend on gtype-cp.h.
4032         (cp/cp-objcp-common.o): New target.
4033         * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
4034         (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
4035         cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
4036         prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
4037         respectively.
4038         (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
4039         LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
4040         LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
4041         LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
4042         LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
4043         LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
4044         LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
4045         LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
4046         LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
4047         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
4048         LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
4049         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
4050         LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
4051         LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
4052         LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
4053         LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
4054         LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
4055         LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
4056         LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
4057         LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
4058         LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
4059         LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
4060         LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
4061         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
4062         LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
4063         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
4064         LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
4065         LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
4066         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
4067         LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
4068         LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
4069         hooks to cp-objcp-common.h.
4070         (finish_file): New function.
4071         * cp-objcp-common.c: New file.
4072         * cp-objcp-common.h: New file.
4073         * cp-tree.h (cp_finish_file): New prototype.
4074         * decl.c: Do not include gtype-cp.h.
4075         * decl2.c (finish_file): Rename to cp_finish_file.
4076
4077 2004-08-31  Richard Henderson  <rth@redhat.com>
4078
4079         PR c++/17221
4080         * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
4081         (tsubst_copy_and_build): ... here.
4082
4083 2004-08-30  Mark Mitchell  <mark@codesourcery.com>
4084
4085         * cp-tree.h (initialize_artificial_var): Declare.
4086         * decl.c (initialize_artifical_var): New function.
4087         * class.c (initialize_array): Remove.
4088         (initialize_vtable): Use initialize_artificial_var.
4089         (build_vtt): Likewise.
4090         (build_ctor_vtbl_group): Likewise.
4091
4092 2004-08-30  Richard Henderson  <rth@redhat.com>
4093
4094         * class.c (build_base_path): Use build_address directly.
4095         * typeck.c (build_unary_op): Don't lower &a.b to pointer
4096         arithmetic directly.
4097         * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
4098         means !initializer_constant_valid_p.
4099
4100 2004-08-30  Richard Henderson  <rth@redhat.com>
4101
4102         * class.c (fixed_type_or_null): Use get_base_address before
4103         assuming an ADDR_EXPR is non-null.
4104
4105 2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
4106
4107         * name-lookup.c (pop_binding, pushdecl,
4108         set_identifier_type_value_with_scope, push_overloaded_decl,
4109         arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
4110         * parser.c (cp_parser_diagnose_invalid_type_name,
4111         cp_parser_postfix_expression, cp_parser_unary_expression,
4112         cp_parser_check_declarator_template_para): Likewise.
4113         * pt.c (push_inline_template_parms_recursive,
4114         check_explicit_specialization, convert_nontype_argument,
4115         coerce_template_template_parms, uses_template_parms,
4116         instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
4117         tsubst_expr, instantiate_template,
4118         maybe_adjust_types_for_deduction, type_unification_real,
4119         resolve_overloaded_unification, template_decl_level,
4120         type_dependent_expression_p): Likewise.
4121         * search.c (lookup_base_r): Likewise.
4122         * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
4123         * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
4124         verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
4125         * typeck.c (common_type, get_member_function_from_ptrfunc,
4126         build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
4127         * typeck2.c (cxx_incomplete_type_diagnostic,
4128         split_nonconstant_init_1, store_init_value,
4129         process_init_constructor): Likewise.
4130
4131 2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
4132
4133         * call.c (check_dtor_name): Replace abort with gcc_assert or
4134         gcc_unreachable.
4135         (build_call, add_builtin_candidate, build_new_op,
4136         convert_like_real, build_over_call, in_charge_arg_for_name,
4137         source_type, joust): Likewise.
4138         * class.c (build_simple_base_path, get_vcall_index,
4139         finish_struct_1, instantiate_type, get_enclosing_class,
4140         add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
4141         * cp-gimplify.c (cp_genericize): Likewise.
4142         * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
4143         * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
4144         * decl.c (poplevel, make_unbound_class_template, reshape_init,
4145         check_special_function_return_type, grokdeclarator,
4146         grok_op_properties, tag_name, xref_tag, start_preparsed_function,
4147         finish_function): Likewise.
4148         * decl2.c (grokfield, maybe_emit_vtables):Likewise.
4149         * error.c (dump_global_iord, dump_decl, dump_template_decl,
4150         language_to_string): Likewise.
4151         * except.c (choose_personality_routine): Likewise.
4152         * friend.c (do_friend): Likewise.
4153         * g++spec.c (lang_specific_driver): Likewise.
4154         * init.c (build_zero_init, expand_default_init, build_new_1,
4155         build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
4156         * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
4157         * mangle.c (add_substitution, write_unscoped_name,
4158         write_template_prefix, write_identifier,
4159         write_special_name_destructor, write_type, write_builtin_type,
4160         write_expression, write_template_param,
4161         write_java_integer_type_codes): Likewise.
4162         * method.c (implicitly_declare_fn): Likewise.
4163
4164 2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
4165
4166         * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
4167         (BINFO_INDIRECT_PRIMARY_P): Remove.
4168         * class.c (determine_primary_base): Rename to ...
4169         (determine_primary_bases): ... here.  Set all primary bases.
4170         (set_primary_base): Remove.
4171         (mark_primary_bases): Remove.
4172         (build_simple_base_path, walk_subobject_offsets,
4173         propagate_binfo_offsets, end_of_class): Adjust.
4174         (layout_class_type): Rename determine_primary_base call.
4175         (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
4176         to type_as_string.
4177         (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
4178         build_rtti_vtbl_entries): Adjust.
4179         * init.c (build_vtbl_address): Adjust.
4180
4181         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
4182
4183 2004-08-28  Ziemowit Laski  <zlaski@apple.com>
4184
4185         * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
4186         CXX_AND_OBJCXX_OBJS.
4187         (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
4188         separately on the link line.
4189
4190 2004-08-28  Jason Merrill  <jason@redhat.com>
4191
4192         * decl.c (expand_static_init): Avoid bogus warnings.
4193
4194 2004-08-27  Jason Merrill  <jason@redhat.com>
4195
4196         PR c++/16851
4197         * tree.c (stabilize_init): See through a COMPOUND_EXPR.
4198
4199         PR c++/13684
4200         * decl.c (expand_static_init): Use thread-safety API.
4201         (register_dtor_fn): Return the call, don't expand it.
4202         * tree.c (add_stmt_to_compound): New fn.
4203         (stabilize_call): Use it.
4204
4205 2004-08-27  Richard Henderson  <rth@redhat.com>
4206
4207         * cp-tree.def (OFFSETOF_EXPR): New.
4208         * parser.c (cp_parser_builtin_offsetof): Either built an
4209         OFFSETOF_EXPR, or call fold_offsetof immediately.
4210         * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
4211
4212 2004-08-27  Nathan Sidwell  <nathan@codesourcery.com>
4213
4214         * call.c (validate_conversion_obstack): Replace
4215         my_friendly_assert with gcc_assert or gcc_unreachable.
4216         (direct_reference_binding, merge_conversion_sequences,
4217         build_user_type_conversion_1, perform_overload_resolution,
4218         build_op_delete_call, enforce_access, call_builtin_trap,
4219         build_over_call, build_special_member_call, build_new_method_call,
4220         initialize_reference): Likewise.
4221         * class.c (build_base_path, build_primary_vtable, alter_access,
4222         check_bases, update_vtable_entry_for_fn, layout_empty_base,
4223         clone_function_decl, adjust_clone_args,
4224         type_requires_array_cookie, include_empty_classes,
4225         finish_struct_1, resolve_address_of_overloaded_function,
4226         instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
4227         dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
4228         accumulate_vtbl_inits, build_vtbl_initializer,
4229         build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
4230         * cvt.c (build_up_reference, convert_to_reference): Likewise.
4231         * decl.c (poplevel, duplicate_decls, make_typename_type,
4232         cxx_init_decl_processing, reshape_init, check_initializer,
4233         make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
4234         expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
4235         grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
4236         xref_basetypes, start_preparsed_function, save_function_data,
4237         finish_function, finish_method, maybe_register_incomplete_var,
4238         complete_vars): Likewise.
4239         * decl2.c (grok_array_decl, check_member_template,
4240         check_classfn, finish_static_data_member_decl, coerce_new_type,
4241         coerce_delete_type, import_export_class, decl_needed_p,
4242         determine_visibility, import_export_decl, build_cleanup,
4243         start_static_initialization_or_destructi, do_static_destruction,
4244         prune_vars_needing_no_initialization,
4245         build_offset_ref_call_from_tree): Likewise.
4246         * error.c (dump_decl, dump_expr): Likewise.
4247         * init.c (finish_init_stmts, build_zero_init,
4248         expand_virtual_init, expand_default_init, expand_aggr_init_1,
4249         build_offset_ref, build_new_1, build_delete, build_vbase_delete):
4250         Likewise.
4251         * mangle.c (write_method_parms, write_template_args,
4252         write_expression, write_template_arg): Likewise.
4253         * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
4254         * name-lookup.c (pop_binding, begin_scope, leave_scope,
4255         resume_scope, push_using_decl, validate_nonmember_using_decl,
4256         is_ancestor, poplevel_class, set_inherited_value_binding_p,
4257         push_class_level_binding, do_class_using_decl, push_namespace,
4258         pop_namespace, add_using_namespace, ambiguous_decl,
4259         lookup_namespace_name, lookup_type_current_level,
4260         maybe_process_template_type_declaration): Likewise.
4261         * parser.c (cp_lexer_peek_nth_token,
4262         cp_parser_parse_and_diagnose_invalid_typ,
4263         cp_parser_translation_unit, cp_parser_template_id,
4264         cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
4265         * pt.c (push_access_scope, finish_member_template_decl,
4266         push_inline_template_parms_recursive, add_outermost_template_args,
4267         get_innermost_template_args, begin_explicit_instantiation,
4268         end_explicit_instantiation, retrieve_specialization,
4269         is_specialization_of, is_specialization_of_friend,
4270         register_specialization, check_explicit_specialization,
4271         comp_template_parms, process_template_parm,
4272         process_partial_specialization, convert_nontype_argument,
4273         coerce_template_template_parms, coerce_template_parms,
4274         mangle_class_name_for_template, lookup_template_function,
4275         lookup_template_class, instantiate_class_template, tsubst_decl,
4276         tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
4277         instantiate_template, fn_type_unification, type_unification_real,
4278         get_template_base, regenerate_decl_from_template,
4279         template_for_substitution, instantiate_decl,
4280         get_mostly_instantiated_function_type, dependent_scope_ref_p,
4281         value_dependent_expression_p, resolve_typename_type): Likewise.
4282         * repo.c (repo_emit_p): Likewise.
4283         * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
4284         create_tinfo_types, emit_tinfo_decl): Likewise.
4285         * search.c (lookup_base_r, lookup_base, lookup_field_1,
4286         dfs_access_in_type, build_baselink, lookup_member,
4287         adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
4288         * semantics.c (perform_or_defer_access_check,
4289         finish_non_static_data_member, finish_stmt_expr_expr,
4290         finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
4291         finish_template_template_parm, finish_member_declaration,
4292         emit_associated_thunks): Likewise.
4293         * tree.c (build_target_expr_with_type, force_target_expr,
4294         copy_binfo, get_first_fn, cp_tree_equal): Likewise.
4295         * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
4296         cxx_sizeof_or_alignof_type, perform_integral_promotions,
4297         build_class_member_access_expr, finish_class_member_access_expr,
4298         build_ptrmemfunc_access_expr, build_unary_op,
4299         unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
4300         build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
4301         * typeck2.c (complete_type_check_abstract,
4302         abstract_virtuals_error, process_init_constructor,
4303         add_exception_specifier): Likewise.
4304
4305 2004-08-27  Nathan Sidwell  <nathan@codesourcery.com>
4306
4307         * class.c (build_vtbl_initializer): Use ssize_int.
4308         * decl.c (complete_array_type): Likewise.
4309         * method.c (finish_thunk): Likewise.
4310         * search.c (get_dynamic_base_type): Likewise.
4311
4312 2004-08-26  Richard Henderson  <rth@redhat.com>
4313
4314         * cp-tree.h (DECL_FIELD_IS_BASE): New.
4315         * class.c (build_base_field): Set it.
4316         (build_simple_base_path): Use it.
4317         (fixed_type_or_null): Don't consider base fields definitive.
4318
4319 2004-08-25  Roger Sayle  <roger@eyesopen.com>
4320
4321         PR middle-end/16693
4322         PR tree-optimization/16372
4323         * decl.c (finish_enum): Make the precision of the enumerated type
4324         the same width as the underlying integer type.
4325
4326 2004-08-25  Mark Mitchell  <mark@codesourcery.com>
4327
4328         PR c++/17155
4329         * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
4330         functions.
4331
4332         * mangle.c (get_identifier_nocopy): Add cast.
4333
4334         * cp-tree.h (mangle_type): Remove.
4335         * mangle.c (globals): GTY it.
4336         (mangle_obstack): New variable.
4337         (name_obstack): Likewise.
4338         (name_base): Likewise.
4339         (write_char): Adjust accordingly.
4340         (write_chars): Likewise.
4341         (write_string): Likewise.
4342         (start_mangling): Initialize G.substitutions only one.  Add
4343         ident_p parameter.
4344         (finish_mangling): Use VARRAY_CLEAR to reclaim
4345         storage in G.substitutions.  Use obstack_finish.
4346         (init_mangle): Adjust for changes to variable names above.
4347         Initialize G.substitutions.
4348         (mangle_decl_string): Adjust call to start_mangling.
4349         (get_identifier_nocopy): New function.
4350         (mangle_decl): Use it.
4351         (mangle_type_string): Adjust call to start_mangling.
4352         (mangle_special_for_type): Likewise.
4353         (mangle_vtt_for_type): Likewise.
4354         (mangle_ctor_vtbl_for_type): Likewise.
4355         (mangle_thunk): Likewise.
4356         (mangle_guard_variable): Likewise.
4357         (mangle_ref_init_variable): Likewise.
4358
4359 2004-08-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4360
4361         PR c++/14428
4362         * pt.c (redeclare_class_template): Check the type of non-type and
4363         template template parameter.
4364
4365 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
4366
4367         * call.c (convert_class_to_reference): Adjust build_int_cst calls.
4368         (build_user_type_conversion_1, convert_like_real,
4369         build_java_interface_fn_ref, build_special_member_call): Likewise.
4370         * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
4371         * cp-gimplify.c (cp_gimplify_expr): Likewise.
4372         * cvt.c (cp_convert_to_pointer): Likewise.
4373         * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
4374         * decl2.c (start_static_initialization_or_destruction,
4375         generate_ctor_or_dtor_function): Likewise.
4376         * except.c (build_throw): Likewise.
4377         * mangle.c (write_integer_cst): Likewise.
4378         * method.c (finish_thunk): Likewise.
4379         * rtti.c (build_headof, get_tinfo_decl_dynamic,
4380         build_dynamic_cast_1, ptr_initializer, ptm_initializer,
4381         get_pseudo_ti_init): Likewise.
4382         * search.c (get_dynamic_cast_base_type): Likewise.
4383
4384 2004-08-25  Zack Weinberg  <zack@codesourcery.com>
4385
4386         * class.c, search.c: Remove references to DWARF_DEBUG.
4387
4388 2004-08-25  Adam Nemet  <anemet@lnxw.com>
4389
4390         * repo.c (extract_string): Reset backquote after one character.
4391         (get_base_filename): Fix indentation.
4392
4393 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
4394
4395         * decl.c (cxx_init_decl_processing): Adjust
4396         build_common_tree_nodes call.
4397
4398 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
4399
4400         PR c++/16889
4401         * (is_subobject_of_p): Resurrect & optimize.
4402         (lookup_field_r): Use it.
4403
4404 2004-08-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4405
4406         PR c++/16706
4407         * search.c (friend_accessible_p): Increment processing_template_decl
4408         when deal with TEMPLATE_DECL of SCOPE.
4409
4410 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
4411
4412         PR c++/17149
4413         * semantics.c (check_accessibility_of_qualified_id): Defer check
4414         if qualifying_type is a template parameter.
4415
4416 2004-08-23  Mark Mitchell  <mark@codesourcery.com>
4417
4418         PR c++/17163
4419         * pt.c (instantiate_decl): Do not try to apply
4420         DECL_DECLARED_INLINED_P to a VAR_DECL.
4421
4422         * search.c (build_baselink): Fix typo in comment.
4423
4424 2004-08-22 Andrew Pinski  <apinski@apple.com>
4425
4426         Revert:
4427         2004-08-22  Andrew Pinski  <apinski@apple.com>
4428         PR c++/14029
4429         * typeck.c (build_unary_op): Use &a.b if the folded lowered
4430         expression is not constant.
4431
4432 2004-08-23  Nathan Sidwell  <nathan@codesourcery.com>
4433
4434         * name-lookup.c (pushdecl): Rename build_type_copy call.
4435         * tree.c (cp_build_qualified_type_real,
4436         build_exception_variant, handle_java_interface_attribute): Likewise.
4437
4438 2004-08-22  Andrew Pinski  <apinski@apple.com>
4439
4440         PR c++/14029
4441         * typeck.c (build_unary_op): Use &a.b if the folded lowered
4442         expression is not constant.
4443
4444 2004-08-20  Mark Mitchell  <mark@codesourcery.com>
4445
4446         PR c++/17121
4447         * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
4448
4449 2004-08-21  Joseph S. Myers  <jsm@polyomino.org.uk>
4450
4451         PR c++/17120
4452         * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
4453         MODOP_EXPR.
4454
4455 2004-08-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4456
4457         * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
4458         before calling comp_template_args.
4459
4460 2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>
4461
4462         * class.c (build_vtbl_initializer): Use build_int_cst for
4463         negative size types.
4464         * decl.c (complete_array_type): Likewise.
4465         * method.c (finish_thunk): Likewise.
4466
4467 2004-08-20  Andreas Tobler  <a.tobler@schweiz.ch>
4468
4469         * tree.c: Remove unused mark_local_for_remap_r.
4470
4471 2004-08-19  Eric Christopher  <echristo@redhat.com>
4472
4473         * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
4474         * tree.c (cxx_unsave_expr_now): Delete.
4475         (cp_unsave_r): Ditto.
4476
4477 2004-08-19  Mark Mitchell  <mark@codesourcery.com>
4478
4479         PR c++/15890
4480         * pt.c (push_template_decl_real): Disallow template allocation
4481         functions with fewer than two parameters.
4482
4483 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
4484
4485         * cp-tree.h (build_shared_int_cst): Remove.
4486         * tree.c (shared_int_cache): Remove.
4487         (build_shared_int_cst): Remove.
4488         * class.c (finish_struct_1): Use build_int_cst.
4489
4490 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
4491
4492         * decl.c (finish_enum): Do not copy value node early, copy
4493         later.
4494         * lex.c (cxx_init): Force null_node to be unique.
4495
4496 2004-08-19  Joseph S. Myers  <jsm@polyomino.org.uk>
4497
4498         PR c++/17041
4499         * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
4500         from input for MODOP_EXPR.
4501
4502 2004-08-18  Mark Mitchell  <mark@codesourcery.com>
4503
4504         * pt.c (dependent_template_p): Fix typo in commment.
4505
4506         PR c++/17068
4507         * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
4508         dependent.
4509
4510 2004-08-17  Mark Mitchell  <mark@codesourcery.com>
4511
4512         PR c++/16246
4513         * pt.c (unify): Tidy ARRAY_TYPE handling.  Make sure that non-type
4514         arguments have the same type as the corresponding parameter.
4515
4516         PR c++/16215
4517         * parser.c (cp_parser_name_lookup_error): If parser->object_scope
4518         is set use it for diagnostic purposes.
4519         (cp_parser_pseudo_destructor_name): Remove special-case error
4520         message.
4521
4522         PR c++/15871
4523         * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
4524
4525         PR c++/16965
4526         * cp-tree.h (qualified_name_lookup_error): Add parameter.
4527         * name-lookup.c (do_class_using_decl): Restrict set of entities
4528         passed to cp_emit_debug_info_for_using more carefully.
4529         (lookup_qualified_name): Allow lookup_member to return sets of
4530         ambiguous entries.
4531         * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
4532         (cp_parser_primary_expression): Handle ambiguous lookups.
4533         (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
4534         (cp_parser_template_argument): Likewise.
4535         (cp_parser_elaborate_type_specifier): Likewise.
4536         (cp_parser_namespace_name): Likewise.
4537         (cp_parser_class_name): Likewise.
4538         (cp_parser_lookup_name_simple): Likewise.
4539         * pt.c (tsubst_qualified_id): Handle ambiguous results.
4540         (tsubst_expr): Likewise.
4541         * semantics.c (qualified_name_lookup_error): Add decl paramter.
4542         For ambiguous lookups, print candidates.
4543
4544 2004-08-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4545
4546         PR c++/6749
4547         * pt.c (instantiate_pending_templates): Add int parameter.  Don't
4548         return anything.
4549         * cp-tree.h (instantiate_pending_templates): Adjust prototype.
4550         * decl2.c (finish_file): Adjust call to
4551         instantiate_pending_templates.
4552
4553 2004-08-15  Roger Sayle  <roger@eyesopen.com>
4554
4555         * call.c (build_vfield_ref, build_call, build_conditional_expr,
4556         convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
4557         build_java_interface_fn_ref, build_special_member_call,
4558         build_new_method_call, initialize_reference): Replace calls to
4559         build with calls to buildN.
4560         * class.c (build_base_path, convert_to_base_statically,
4561         build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
4562         build_vtbl_initializer): Likewise.
4563         * cp-gimplify.c (genericize_try_block, genericize_catch_block,
4564         gimplify_if_stmt, cp_genericize_r): Likewise.
4565         * cvt.c (convert_to_void): Likewise.
4566         * decl.c (check_initializer, finish_constructor_body,
4567         finish_destructor_body): Likewise.
4568         * error.c (dump_expr): Likewise.
4569         * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
4570         Likewise.
4571         * init.c (perform_member_init, expand_virtual_init,
4572         expand_cleanup_for_base, build_init, expand_default_init,
4573         build_offset_ref, decl_constant_value, build_new, build_new_1,
4574         build_vec_delete_1, build_vec_init, build_delete,
4575         push_base_cleanups, build_vec_delete): Likewise.
4576         * mangle.c (write_integer_cst): Likewise.
4577         * method.c (thunk_adjust, do_build_copy_constructor,
4578         do_build_assign_ref): Likewise.
4579         * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
4580         unify, build_non_dependent_expr): Likewise.
4581         * rtti.c (build_headof, build_typeid, ifnonnull,
4582         build_dyanmic_cast_1, tinfo_base_init): Likewise.
4583         * semantics.c (begin_compound_stmt, finish_call_expr,
4584         finish_pseudo_destructor_expr, finish_id_expression,
4585         simplify_aggr_init_expr, finalize_nrv_r): Likewise.
4586         * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
4587         array_type_nelts_total, stabilize_call): Likewise.
4588         * typeck.c (decay_conversion, build_class_member_access_expr,
4589         lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
4590         get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
4591         build_x_unary_op, build_unary_op, unary_complex_lvalue,
4592         build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
4593         check_return_expr): Likewise.
4594         * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
4595         split_nonconstant_init, store_init_value, build_m_component_ref):
4596         Likewise.
4597
4598 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
4599
4600         * call.c (convert_class_to_reference,
4601         build_user_type_conversion_1, convert_like_real,
4602         build_java_interface_fn_ref, build_special_member_call): Use
4603         build_int_cst.
4604         * class.c (build_vtbl_initializer): Likewise.
4605         * cp-gimplify.c (cp_gimplify_expr): Likewise.
4606         * cvt.c (cp_convert_to_pointer): Likewise.
4607         * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
4608         * decl2.c (start_static_initialization_or_destruction,
4609         generate_ctor_or_dtor_function): Likewise.
4610         * except.c (build_throw): Likewise.
4611         * lex.c (cxx_init): Likewise.
4612         * mangle.c (write_integer_cst): Likewise.
4613         * rtti.c (build_headof, get_tinfo_decl_dynamic,
4614         build_dynamic_cast_1, ptr_initializer, ptm_initializer,
4615         get_pseudo_ti_init): Likewise.
4616         * search.c (get_dynamic_cast_base_type): Likewise.
4617         * tree.c (build_shared_int_cst): Likewise.
4618
4619 2004-08-12  Mark Mitchell  <mark@codesourcery.com>
4620
4621         PR c++/16273
4622         * class.c (count_depth_data): New type.
4623         (dfs_depth_post): New function.
4624         (dfs_depth_q): Likewise.
4625         (find_final_overrider_data_s): Change type of vpath.
4626         Add vpath_list.
4627         (dfs_find_final_overrider_1): New function.
4628         (dfs_find_final_overrider): Use it.
4629         (dfs_find_final_overrider_q): Adjust use of vpath.
4630         (dfs_find_final_overrider_post): Likewise.
4631         (find_final_overrider): Use dfs_depth.  Allocate and deallocate
4632         vpath_list.
4633
4634 2004-08-12 Jan Beulich <jbeulich@novell.com>
4635
4636         * parser.c (cp_parser_asm_definition): Properly consume scope operator
4637         tokens preceding the clobbers. Don't check for scope operator
4638         following inputs. Simplify inputs handling to match that now used for
4639         clobbers.
4640
4641 2004-08-11  Mark Mitchell  <mark@codesourcery.com>
4642
4643         PR c++/16698
4644         * except.c (build_throw): Allocate cleanup_type and the function
4645         for __cxa_throw separately.
4646
4647         PR c++/16853
4648         * call.c (standard_conversion): Do not accept conversions between
4649         pointers to members if the class types are unrelated.
4650
4651         PR c++/16618
4652         * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
4653         char &" instead of just "char &".
4654
4655         PR c++/16870
4656         * pt.c (tsubst): Just return the unknown_type_node.
4657
4658 2004-08-11  Mark Mitchell  <mark@codesourcery.com>
4659
4660         PR c++/16964
4661         * parser.c (cp_parser_class_specifier): Robustify.
4662
4663         PR c++/16904
4664         * pt.c (tsubst_copy_and_build): Complain about invalid
4665         qualification.
4666
4667         PR c++/16929
4668         * pt.c (tsubst_default_argument): Clear out current_class_ptr and
4669         current_class_ref while tsubsting.
4670
4671 2004-08-10  Mark Mitchell  <mark@codesourcery.com>
4672
4673         PR c++/16971
4674         * parser.c (cp_parser_init_declarator): Robustify.
4675
4676 2004-08-06  Richard Sandiford  <rsandifo@redhat.com>
4677
4678         * typeck2.c (process_init_constructor): Guard the missing field warning
4679         with warn_missing_field_initializers rather than extra_warnings.
4680
4681 2004-08-06  Paolo Bonzini  <bonzini@gnu.org>
4682
4683         * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
4684
4685 2004-08-05  Mark Mitchell  <mark@codesourcery.com>
4686
4687         * decl.c (start_preparsed_function): Move determine_visibility
4688         call.
4689         * decl2.c (determine_visibility): Incorporate dllexport testing.
4690
4691 2004-08-05  Geoffrey Keating  <geoffk@apple.com>
4692
4693         * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
4694         means that libstdc++ is needed.
4695
4696 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
4697
4698         * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
4699
4700 2004-08-04  Geoffrey Keating  <geoffk@apple.com>
4701
4702         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
4703         than passing it as a parameter to rest_of_decl_compilation.
4704         * decl2.c (grokfield): Use set_user_assembler_name.
4705
4706 2004-08-04  Nathan Sidwell  <nathan@codesourcery.com>
4707
4708         * decl.c (complete_array_type): Don't gratuitously copy
4709         maxindex. Its type is always set.
4710
4711 2004-08-04  Paul Brook  <paul@codesourcery.com>
4712
4713         * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
4714         * cp-tree.h (struct language_function): Rename x_dtor_label to
4715         x_cdtor_label.
4716         (dtor_label): Rename ...
4717         (cdtor_label): ... to this.
4718         * decl.c (begin_constructor_body): Remove.
4719         (check_special_function_return_type): Maybe change the return type.
4720         (grokdeclarator): Pass the class type.
4721         (start_preparsed_function): Constructors may need a return label.
4722         (finish_constructor_body, finish_destructor_body): Set the return
4723         value.
4724         (begin_function_body): Don't call begin_constructor_body.
4725         (finish_function): Don't warn for constructors or destructors.
4726         (implicitly_declare_fn): Maybe change the return type.
4727         * optimize.c: Include target.h.
4728         (maybe_clone_body): Remap the function result.
4729         * semantics.c: Include target.h.
4730         (finish_return_stmt): Maybe jump to return label for constructors.
4731
4732 2004-08-03  Mark Mitchell  <mark@codesourcery.com>
4733
4734         * class.c (build_vtable): Do not set DECL_VISIBILITY here.
4735         (check_field_decls): Or here.
4736         (check_methods): Or here.
4737         (initialize_array): Don't mess with DECL_CONTEXT.
4738         * cp-tree.h (start_decl): Adjust prototype.
4739         (determine_visibility): New function.
4740         * decl.c (duplicate_decls): Remove checks for hidden "operator
4741         new".
4742         (build_library_fn_1): Give all library functions default
4743         visibility.
4744         (start_decl): Add pop_scope_p parameter.  Tidy.
4745         (cp_finish_decl): Do not pop scopes here.  Call
4746         determine_visibility for variable definitions.
4747         (start_preparsed_function): Call determine_visibility.
4748         * decl2.c (determine_visibility): New function.
4749         * method.c (use_thunk): Fix formatting.
4750         * parser.c (cp_parser_condition): Adjust calls to start_decl.
4751         (cp_parser_init_declarator): Likewise.
4752         * pt.c (instantiate_decl): Always call pop_nested_class.
4753         * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
4754         (tinfo_base_init): Likewise.
4755
4756 2004-08-02  Mark Mitchell  <mark@codesourcery.com>
4757
4758         PR c++/16707
4759         * name-lookup.c (validate_nonmember_using_decl): Robustify.
4760
4761 2004-08-01  Mark Mitchell  <mark@codesourcery.com>
4762
4763         PR c++/16224
4764         * name-lookup.c (decl_namespace): Remove.
4765         (current_decl_namespace): Use decl_namespace_context instead of
4766         decl_namespace.
4767         (push_decl_namespace): Likewise.
4768         (arg_assoc_class): Likewise.
4769         (arg_assoc_type): Likewise.
4770         * pt.c (check_specialization_namespace): New function.
4771         (maybe_process_partial_specialization): Use it.
4772         (register_specialization): Likewise.
4773
4774         PR c++/16489
4775         * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
4776         * call.c (null_ptr_cst_p): Handle variables with constant
4777         initializers.
4778         * pt.c (convert_nontype_argument): Use
4779         DECL_INTEGRAL_CONSTANT_VAR_P.
4780         * semantics.c (finish_id_expression): Likewise.
4781
4782         PR c++/16529
4783         * decl.c (duplicate_decls): Reject duplicate namespace
4784         declarations.
4785
4786         PR c++/16810
4787         * typeck.c (build_ptrmemfunc): Loosen assertion.
4788
4789 2004-08-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4790
4791         * call.c (z_candidate::template_decl): Rename from template.
4792         (add_template_candidate_real): Adjust member reference.
4793         (joust): Likewise.
4794
4795 2004-07-29  Mark Mitchell  <mark@codesourcery.com>
4796
4797         * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
4798         (lang_decl_flags): Narrow the width of "languages".  Add
4799         repo_available_p.
4800         (DECL_NEEDED_P): Remove.
4801         (FOR_EACH_CLONE): New macro.
4802         (DECL_REPO_AVAILABLE_P): Likewise.
4803         (DECL_TINFO_P): Likewise.
4804         (set_linkage_according_to_type): Declare.
4805         (import_export_vtable): Remove.
4806         (import_export_tinfo): Likewise.
4807         (mark_needed): New function.
4808         (decl_needed_p): Likewise.
4809         (note_vauge_linkage_fn): Likewise.
4810         (init_repo): Change prototype.
4811         (repo_template_used): Remove.
4812         (repo_template_instantiated): Likewise.
4813         (repo_emit_p): New function.
4814         (repo_export_class_p): Likewise.
4815         (no_linkage_check): Change prototype.
4816         * class.c (set_linkage_according_to_type): New function.
4817         (build_vtable): Use it.  Do not call import_export_vtable.  Set
4818         DECL_IGNORED_P if appropriate.
4819         * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
4820         (make_rtL_for_nonlocal_decls): Check for template instantiations
4821         explicitly.
4822         (grokfndecl): Adjust call to no_linkage_check.
4823         (set_linkage_for_static_data_member): New function.
4824         (grokvardecl): Use it.  Adjust call to no_linkage_check.
4825         (grokdeclarator): Use set_linkage_for_static_data_member.
4826         * decl2.c (note_vague_linkage_fn): New function.
4827         (note_vague_linkage_var): Likewise.
4828         (finish_static_data_member_decl): Use it.
4829         (import_export_vtable): Remove.
4830         (import_export_class): Use repo_export_class_p.
4831         (var_finalized_p): Simplify.
4832         (maybe_emit_vtables): Simplify.
4833         (mark_needed): New function.
4834         (decl_needed_p): Likewise.
4835         (import_export_decl): Add documentation and consistency checks.
4836         Use repo_emit_p.  Handle virtual tables and RTTI information
4837         here.
4838         (import_export_tinfo): Remove.
4839         (write_out_vars): Call import_export_decl.
4840         (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
4841         whenever one is.
4842         (finish_file): Use decl_needed_p.  Do not call import_export_decl
4843         for undefined static data members.  Do not warn about undefined
4844         inlines when using a repository.
4845         (mark_used): Use note_vague_linkage_fn.  Always defer template
4846         instantiations.
4847         * lex.c (cxx_init): Adjust call to init_repo.  Always set
4848         flag_unit_at_a-time.
4849         * method.c (synthesize_method): Remove unncessary
4850         import_export_decl call.
4851         (implicitly_declare_fn): Use set_linkage_according_to_type.
4852         * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
4853         * pt.c (instantiate_class_template): Don't redundantly add classes
4854         to keyed_classes.  Don't call repo_template_used.
4855         (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
4856         templates with internal linkage.
4857         (check_instantiated_args): Adjust call to no_linkage_check.
4858         (instantiate_template): Use FOR_EACH_CLONE.
4859         (mark_definable): New function.
4860         (mark_decl_instantiated): Use it.
4861         (do_decl_instantiation): Adjust tests for explicit instantiation
4862         after "extern template".
4863         (instantiate_class_member): Do not use repo_template_instantiated.
4864         (do_type_instantiation): Simplify.
4865         (instantiate_decl): Use mark_definable.  Check repo_emit_p.
4866         Simplify.
4867         * repo.c (repo_get_id): Remove.
4868         (original_repo): Remove.
4869         (IDENTIFIER_REPO_USED): Remove.
4870         (IDENTIFIER_REPO_CHOSEN): Remove.
4871         Remove all #if 0'd code.
4872         (repo_template_used): Remove.
4873         (repo_template_instantiated): Remove.
4874         (temporary_obstack_initialized_p): New variable.
4875         (init_repo): Register with lang_post_pch_load.  Avoid creating
4876         identifiers unnecessarily.  Don't use original_repo.  Close the
4877         file here.
4878         (reopen_repo_file_for_write): Not here.
4879         (finish_repo): Always write out a new repository file.
4880         (repo_emit_p): New function.
4881         (repo_export_class_p): Likewise.
4882         * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
4883         (involves_incomplete_p): New function.
4884         (tinfo_base_init): Use it.
4885         (ptr_initializer): Remove non_public_ptr parameter.
4886         (ptm_initializer): Likewise.
4887         (get_pseudo_ti_init): Likewise.
4888         (unemitted_tinfo_decl_p): Remove.
4889         (emit_tinfo_decl): Use import_export_decl.
4890         * semantics.c (expand_body): Move updates of static_ctors and
4891         static_dtors to ...
4892         (expand_or_defer_fn): ... here.
4893         * tree.c (no_linkage_check): Add relaxed_p parameter.
4894
4895 2004-07-28  Eric Christopher  <echristo@redhat.com>
4896
4897         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
4898
4899 2004-07-28  Nathan Sidwell  <nathan@codesourcery.com>
4900
4901         * cp-tree.h (struct tree_pair_s): New.
4902         (typedef tree_pair_p): New.
4903         (DEF_VEC_O(tree_pair_s)): New.
4904         (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
4905         (CLASSTYPE_VCALL_INDICES): Update documentation.
4906         * class.c (get_vcall_index): Adjust.
4907         (add_vcall_offset): Adjust.
4908
4909 2004-07-27  Kelley Cook  <kcook@gcc.gnu.org>
4910
4911         * pt.c, typeck.c: Remove spurious carriage returns.
4912
4913 2004-07-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4914
4915         PR c++/14429
4916         * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
4917         when the type of ARG is not dependent.
4918
4919 2004-07-26  Geoffrey Keating  <geoffk@apple.com>
4920
4921         * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
4922         (lang_specific_driver): If the C++ or math library options don't
4923         start with '-l', don't count them as added libraries.
4924
4925 2004-07-26  Nathan Sidwell  <nathan@codesourcery.com>
4926
4927         * decl.c (xref_basetypes): Adjust base access vector creation.
4928         * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
4929         access accesses.
4930         * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
4931
4932 2004-07-26  Niall Douglas  <s_fsfeurope2@nedprod.com>
4933             Brian Ryner  <bryner@brianryner.com>
4934
4935         PR c++/15000
4936         PR c++/9283
4937         * class.c (check_field_decls): Apply hidden visibility if
4938         -fvisibility-inlines-hidden and inlined unless otherwise specified
4939         (build_vtable): Set vtable visibility to class visibility.
4940         (check_field_decls): Default static member visibility to class
4941         visibility.
4942         (check_methods): Default method visibility to class visibility.
4943         * cp-tree.h: Added CLASSTYPE_VISIBILITY and
4944         CLASSTYPE_VISIBILITY_SPECIFIED macro.
4945         * decl.c (duplicate_decls): New logic for merging definition decls
4946         with declaration decls. Added ignore & warning when non default
4947         applied to global operator new or delete.
4948         * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
4949         wherever VISIBILITY was changed
4950         * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
4951         visibility.
4952         (tinfo_base_init): Set typeinfo name visibility to class visibility.
4953
4954 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
4955
4956         * decl.c: Rename all identifiers named `class' to `cl'.
4957         * cp-tree.h: Likewise.
4958
4959 2004-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4960
4961         * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
4962         * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
4963         * name-lookup.c (binding_entry_make): Use GGC_NEW.
4964         (binding_table_construct): Use GGC_CNEWVEC.
4965         (binding_table_new): Use GGC_NEW.
4966         (cxx_binding_make): Likewise.
4967         (begin_scope): Likewise.
4968         (push_to_top_level): Use GCC_CNEW.
4969         * parser.c (cp_token_cache_new): Likewise.
4970         (cp_token_cache_push_token): Likewise.
4971         (cp_lexer_new_main): Likewise.
4972         (cp_lexer_new_from_tokens): Likewise.
4973         (cp_parser_context_new): Likewise.
4974         (cp_parser_new): Likewise.
4975         (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
4976         * lex.c (cxx_make_type): Use GGC_CNEW.
4977         (retrofit_lang_decl): Use GGC_NEWVAR.
4978         (cxx_dup_lang_specific_decl): Likewise.
4979         (copy_lang_type): Likewise.
4980         * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
4981         (save_function_data): Likewise.
4982         (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
4983         (cxx_push_function_context): Likewise.
4984
4985 2004-07-25  Richard Henderson  <rth@redhat.com>
4986
4987         * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
4988         DECL_IGNORED_P on RESULT_DECL.
4989         * semantics.c (finalize_nrv): Copy them too.
4990
4991 2004-07-23  Nathan Sidwell  <nathan@codesourcery.com>
4992
4993         * search.c (lookup_conversion_operator): Avoid two loops.
4994         (add_conversions): Remove.
4995         (check_hidden_convs, split_conversions,
4996         lookup_conversions_r):  New.
4997         (lookup_conversions): Use lookup_conversions_r.
4998
4999 2004-07-22  Nathan Sidwell  <nathan@codesourcery.com>
5000
5001         * pt.c (get_template_base): Check type is completable.
5002
5003 2004-07-21  Eric Christopher  <echristo@redhat.com>
5004
5005         * decl.c (poplevel): Inline unused variable checking.
5006         Change formatting.
5007
5008 2004-07-21  Paolo Bonzini  <bonzini@gnu.org>
5009
5010         * typeck.c (build_binary_op): Do not use RDIV_EXPR for
5011         integer vectors.
5012
5013 2004-07-21  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5014
5015         PR c++/14497
5016         * pt.c (check_explicit_specialization): Remove extension to accept
5017         specializations without template headers. Fall-through to normal
5018         processing.
5019
5020 2004-07-21  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5021
5022         PR c++/509
5023         * pt.c (determine_specialization): New parameter template_count.
5024         Disambiguate between member templates and member functions counting
5025         the template headers.
5026         (check_explicit_specialization): Update caller.
5027         (tsubst_friend_function): Likewise.
5028
5029 2004-07-20  Steven Bosscher  <stevenb@suse.de>
5030
5031         * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
5032         * cp-tree.h (tinst_level_t): New tree type.
5033         (union lang_tree_node): Handle it.
5034         (TINST_LOCATION): New accessor macro.
5035         (make_tinst_level): New prototype.
5036         * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
5037         * decl.c (cp_tree_node_structure): Likewise.
5038         * error.c (print_instantiation_full_context): Use TINST_LOCATION.
5039         (print_instantiation_partial_context): Likewise.
5040         * pt.c (pop_tinst_level): Likewise.
5041          (push_tinst_level): Use make_tinst_level.
5042         * tree.c (make_tinst_level): New function.
5043         (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
5044
5045 2004-07-20  Mark Mitchell  <mark@codesourcery.com>
5046
5047         * parser.c (cp_parser_simple_type_specifier): Fix typo.
5048
5049         PR c++/16637
5050         * parser.c (cp_parser_simple_type_specifier): Do not record usage
5051         of globally-qualified names.
5052
5053 2004-07-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5054
5055         PR c++/16175
5056         * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
5057         cv qualifier.
5058
5059 2004-07-19  Mark Mitchell  <mark@codesourcery.com>
5060
5061         PR c++/16623
5062         * cp-tree.h (lang_type_class): Add lazy_assignment_op.
5063         (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
5064         * class.c (add_implicitly_declared_members): Use
5065         CLASSTYPE_LAZY_ASSIGNMENT_OP.
5066         * method.c (lazily_declare_fn): Clear
5067         CLASSTYPE_LAZY_ASSIGNMENT_OP.
5068         * search.c (lookup_fnfields_1): Check it.
5069
5070 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
5071
5072         * cp-tree.h (vec_binfo_member): Remove.
5073         * tree.c (vec_binfo_member): Remove.
5074
5075         * cp-tree.h (struct lang_type_class): Remove vfields field.
5076         (CLASSTYPE_VFIELDS): Remove.
5077         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
5078         * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
5079         handling.
5080         (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
5081         (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
5082         * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
5083
5084 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
5085
5086         * cp-tree.h (DEF_VEC_P(tree)): Remove here.
5087         (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
5088         Moved to common.
5089         (BINFO_LANG_SLOTS): Remove.
5090         * tree.c (copy_binfo): Adjust BINFO creation and accessors.
5091         * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
5092         * class.c (check_bases): Adjust BINFO accessors.
5093         (determine_primary_base, finish_struct_bits,
5094         maybe_warn_about_overly_private_class, warn_hidden,
5095         walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
5096         warn_about_ambiguous_bases, get_vfield_name,
5097         dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
5098         add_vcall_offset_vtbl_entries_r): Likewise.
5099         * dump.c (cp_dump_tree): Likewise.
5100         * init.c (sort_mem_initializers, expand_member_init, build_delete,
5101         push_base_cleanups): Likewise.
5102         * method.c (do_build_copy_constructor, do_build_assign_ref,
5103         synthesize_exception_spec): Likewise.
5104         name-lookup.c (arg_assoc_class): Likewise.
5105         * pt.c (instantiate_class_template,
5106         get_template_base_recursive): Likewise.
5107         * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
5108         * typeck2.c (process_init_constructor): Likewise.
5109         * search.c (lookup_base_r, dynamic_cast_base_recurse,
5110         dfs_access_in_type, dfs_walk_real, look_for_overrides,
5111         types_overlap_p, copied_binfo, original_binfo): Likewise.
5112         (binfo_for_vtable): Remove
5113
5114 2004-07-20  Steven Bosscher  <stevenb@suse.de>
5115
5116         * cp-tree.h (struct lang_decl_flags): Unify the template_info and
5117         thunk_alias, and the access and virtual_offset fields.
5118         (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
5119         * decl.c (finish_case_label): Update c_add_case_node call.
5120
5121 2004-07-19  Mark Mitchell  <mark@codesourcery.com>
5122
5123         Revert patch for PR c++/16623.
5124
5125 2004-07-19  Kelley Cook  <kcook@gcc.gnu.org>
5126
5127         * except.c: Remove two spurious carriage returns.
5128
5129 2004-07-19  Mark Mitchell  <mark@codesourcery.com>
5130
5131         PR c++/16623
5132         * cp-tree.h (lang_type_class): Add lazy_assignment_op.
5133         (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
5134         * class.c (add_implicitly_declared_members): Use
5135         CLASSTYPE_LAZY_ASSIGNMENT_OP.
5136         * method.c (lazily_declare_fn): Clear
5137         CLASSTYPE_LAZY_ASSIGNMENT_OP.
5138         * search.c (lookup_fnfields_1): Check it.
5139
5140 2004-07-19  Nathan Sidwell  <nathan@codesourcery.com>
5141
5142         * class.c (add_method): Delay adding the slot until the end.
5143         (determine_primary_base): Adjust VEC_iterate invokation.
5144         (resort_type_method_vec, finish_struct_methods, warn_hidden,
5145         walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
5146         build_vtbl_initializer): Likewise.
5147         * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
5148         build_vbase_delete): Likewise.
5149         * method.c (do_build_copy_constructor): Likewise.
5150         * name-lookup.c (new_class_binding, print_binding_level,
5151         poplevel_class, store_class_bindings, push_to_top_level,
5152         pop_from_top_level): Likewise.
5153         * pt.c (check_explicit_specialization): Likewise.
5154         * search.c (lookup_conversion_operator, lookup_fnfields_1,
5155         get_pure_virtuals, add_conversions, dfs_check_overlap,
5156         binfo_for_vbase): Likewise.
5157
5158 2004-07-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5159
5160         PR c++/12170
5161         * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
5162         innermost set of template arguments during deduction.  Simplify.
5163
5164 2004-07-19  Joseph S. Myers  <jsm@polyomino.org.uk>
5165
5166         * typeck.c (build_modify_expr, build_x_modify_expr): Set
5167         TREE_NO_WARNING on assignments with an operator other than '='.
5168
5169 2004-07-10  Steven Bosscher  <stevenb@suse.de>
5170             Joseph S. Myers  <jsm@polyomino.org.uk>
5171
5172         * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
5173         * decl2.c (grokfield): Don't check current_class_depth via
5174         unused TREE_COMPLEXITY.
5175         * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
5176         to avoid the missing parentheses warning.
5177         Don't set C_SET_EXP_ORIGINAL_CODE.
5178
5179 2004-07-18  Mark Mitchell  <mark@codesourcery.com>
5180
5181         * tree.c (no_linkage_helper): Remove.
5182         (no_linkage_check): Don't use walk_tree_without_duplicates.
5183
5184         * mangle.c (write_expression): Issue a sorry for zero-operand
5185         functional casts.
5186
5187 2004-07-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5188
5189         PR c++/13092
5190         * init.c (build_offset_ref): Build SCOPE_REF with non-null
5191         TREE_TYPE for non-dependent names.
5192         * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
5193         * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
5194         unknown_type_node as its TREE_TYPE.
5195         * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
5196         * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
5197         (dump_expr) <SCOPE_REF case>: Likewise.
5198
5199 2004-07-17  Jason Merrill  <jason@redhat.com>
5200
5201         PR c++/16115
5202         * call.c (type_passed_as): Make the invisible reference type
5203         __restrict.
5204         * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
5205         cp_genericize_r.  Handle invisible reference lowering.
5206         (is_invisiref_parm): New fn.
5207         (cp_genericize): Adjust the types of invisible reference parms.
5208         Don't repeat the walk for clones.
5209         * decl.c (store_parm_decls): Don't generate any code for clones.
5210
5211 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
5212
5213         * cp-tree.h (builtin_function): Declare.
5214
5215 2004-07-16  Mark Mitchell  <mark@codesourcery.com>
5216
5217         * class.c (finish_struct_methods): Remove unncessary code.
5218         (add_implicitly_declared_members): Create declarations for default
5219         constructors and copy constructors lazily.
5220         * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
5221         lazy_copy_ctor.
5222         (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
5223         (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
5224         * decl2.c (check_classfn): Robustify.
5225         (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
5226         (locate_ctor): Handle lazy default constructors.
5227         (locate_copy): Handle lazy copy constructors.
5228         (implicitly_declare_fn): Make sure we're looking at the
5229         TYPE_MAIN_VARIANT for a class before creating functions.  Don't
5230         set TYPE_HAS_CONSTRUCTOR.
5231         (lazily_declare_fn): New function.
5232         * name-lookup.c (constructor_name_full): Simplify.
5233         * search.c (lookup_fnfields_1): Lazily create methods, as
5234         necessary.
5235         (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
5236
5237 2004-07-16  Steven Bosscher  <stevenb@suse.de>
5238
5239         * cp-tree.h (struct lang_type): Don't have three GTY options on a
5240         single bit GTY desc.
5241
5242 2004-07-16  Richard Henderson  <rth@redhat.com>
5243
5244         * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
5245         * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
5246         * tree.c (cp_copy_res_decl_for_inlining): Remove.
5247
5248 2004-07-16  Nathan Sidwell  <nathan@codesourcery.com>
5249
5250         * class.c (finish_struct_bits): Use for loop.
5251         (propagate_binfo_offsets): Do primary binfo outside of loop.
5252
5253         PR c++/16583
5254         * dump.c (cp_dump_tree): Don't dump the bases if there's no
5255         binfo.
5256
5257         * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
5258
5259 2004-07-15  Mark Mitchell  <mark@codesourcery.com>
5260
5261         * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
5262         has_abstract_assign_ref.  Make methods a VEC(tree) *.
5263         (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
5264         (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
5265         (CLASSTYPE_DESTRUCTORS): Likewise.
5266         (TYPE_HAS_REAL_ASSIGN_REF): Remove.
5267         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
5268         (add_method): Change prototoype.
5269         * class.c (add_method): Remove error_p parameter.  Adjust for
5270         changes to CLASSTYPE_METHOD_VEC.
5271         (handle_using_decl): Adjust call to add_method.
5272         (maybe_warn_about_overly_private_class): Adjust for
5273         changes to CLASSTYPE_METHOD_VEC.
5274         (resort_type_method_vec): Likewise.
5275         (finish_struct_methods): Likewise.
5276         (check_for_override): Likewise.
5277         (warn_hidden): Likewise.
5278         (add_implicitly_declared_members): Defer creation of assignment
5279         operators.  Adjust call to add_method.
5280         (clone_function_decl): Adjust call to add_method.
5281         (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
5282         (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
5283         * decl.c (grok_special_member_properties): Don't set
5284         TYPE_HAS_ABSTRACT_ASSIGN_REF.
5285         * decl2.c (check_classfn): Adjust for
5286         changes to CLASSTYPE_METHOD_VEC.
5287         * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
5288         (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
5289         (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
5290         (implicitly_declare_fn): Set DECL_SOURCE_LOCATION.  Do not call
5291         cp_finish_decl.
5292         * pt.c (check_explicit_specialization): Adjust for
5293         changes to CLASSTYPE_METHOD_VEC.
5294         (instantiate_class_template): Do not set
5295         TYPE_HAS_ABSTRACT_ASSIGN_REF.
5296         * ptree.c (cxx_print_type): Don't try to print
5297         CLASSTYPE_METHOD_VEC.
5298         * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
5299         * search.c (lookup_field_r): Adjust for
5300         changes to CLASSTYPE_METHOD_VEC.
5301         (lookup_fnfields): Likewise.
5302         (lookup_conversion_operator): Likewise.
5303         (lookup_fnfields_1): Likewise.  Create assignment operators
5304         lazily.
5305         (look_for_overrides_here): Adjust for
5306         changes to CLASSTYPE_METHOD_VEC.
5307         (add_conversions): Likewise.
5308         * semantics.c (finish_member_declaration): Adjust call to add_method.
5309
5310 2004-07-15  Jason Merrill  <jason@redhat.com>
5311
5312         * cp-lang.c (cxx_types_compatible_p): To the middle-end,
5313         references and pointers are compatible.
5314
5315 2004-07-15  Nathan Sidwell  <nathan@codesourcery.com>
5316
5317         * decl.c (xref_basetypes): Refactor.
5318         * tree.c (copy_base_binfos): Replace with ...
5319         (copy_binfo): ... this. Deep copy the given binfo, (not the just
5320         bases of the given base).
5321         * cp-tree.h (copy_base_binfo): Remove.
5322         (copy_binfo): Declare.
5323
5324 2004-07-15  Mark Mitchell  <mark@codesourcery.com>
5325
5326         * name-lookup.c (set_inherited_value_binding_p): Add class_type
5327         parameter.
5328         (get_class_binding): Adjust.
5329         (push_class_level_binding): Don't use set_inherited_value_binding_p.
5330
5331 2004-07-15  Nathan Sidwell  <nathan@codesourcery.com>
5332
5333         * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
5334         * decl.c (xref_basetypes): Set it here.
5335
5336         * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
5337         Don't check for incomplete base.
5338         (get_vfield_name): Simplify while loop.
5339         * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
5340
5341 2004-07-14  Mark Mitchell  <mark@codesourcery.com>
5342
5343         * lex.c (cxx_make_type): Remove call to get_pointer_type.
5344
5345         * cp-tree.h (IDENTIFIER_VALUE): Remove.
5346         (BINFO_PUSHDECLS_MARKED): Likewise.
5347         (maybe_inject_for_scope_var): Likewise.
5348         (push_class_decls): Likewise.
5349         * name-lookup.h (push_class_binding): Remove.
5350         (innermost_non_namespace_value): New function.
5351         (outer_binding): Likewise.
5352         * class.c (add_method): Push bindings before adding to
5353         TYPE_METHODS.
5354         (restore_class_cache): Do not restore class_shadowed.
5355         (pushclass): Do not add USING_DECLs.  Do not call
5356         push_class_decls.
5357         * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
5358         * decl.c (pushdecl): Use outer_binding.
5359         (poplevel): Set the scope for an out-of-scope for-loop declaration
5360         appropriately.
5361         (cp_finish_decl): Don't call maybe_inject_for_scope_var.
5362         * name-lookup.c (new_class_binding): New function.
5363         (push_binding): Use it.
5364         (pushdecl): Use innermost_non_namespace_value.
5365         (maybe_inject_for_scope_var): Remove.
5366         (push_class_binding): Remove.
5367         (set_inherited_value_binding_p): New function.
5368         (get_class_binding): New function.
5369         (push_class_level_binding): Assert that the current_class_type is
5370         being defined.
5371         (outer_binding): New function.
5372         (innermost_non_namespace_value): Likewise.
5373         (lookup_name_real): Use outer_binding.
5374         (lookup_name_current_level): Ignore out-of-scope variables.
5375         * pt.c (check_template_shadow): Use innermost_non_namespace_value.
5376         (lookup_template_class): Likewise.
5377         * search.c (dfs_push_type_decls): Remove.
5378         (dfs_push_decls): Likewise.
5379         (setup_class_bindings): Likewise.
5380         (lookup_field_1): Handle USING_DECLs from dependent scopes.
5381         (marked_pushdecls_p): Remove.
5382         (unmarked_pushdecls_p): Remove.
5383         (marked_identifiers): Remove.
5384         (setup_class_bindings): Remove.
5385         (dfs_push_type_decls): Remove.
5386         (dfs_push_decls): Remove.
5387         (push_class_decls): Remove.
5388
5389 2004-07-13  Mark Mitchell  <mark@codesourcery.com>
5390
5391         PR c++/16518
5392         PR c++/16337
5393         * decl.c (grokvardecl): Make declspecs parameter const.
5394         (grokdeclarator): Likewise.  Adjust accordingly.
5395         * decl.h (grokdeclarator): Adjust declaration.
5396         * parser.c (cp_parser_init_declarator): Do not clear
5397         decl_specifiers->attributes.
5398
5399         * cp-tree.h (lang_identifier): Remove class_value.
5400         (IDENTIFIER_CLASS_VALUE): Remove.
5401         (pop_class_decls): Likewise.
5402         (init_search_processing): Likewise.
5403         * class.c (handle_using_decl): Use lookup_member, not
5404         IDENTIFIER_CLASS_VALUE.
5405         (restore_class_cache): New function, split out from ...
5406         (pushclass): ... here.  Do not call clear_identifier_class_values.
5407         (invalidate_class_lookup_cache): Do not clear
5408         IDENTIFIER_CLASS_VALUE.
5409         (popclass): Do not call pop_class_decls.
5410         (maybe_note_name_used_in_class): Do not save names looked up after
5411         the class is complete.  Use lookup_member, not
5412         IDENTIFIER_CLASS_VALUE.
5413         * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
5414         * decl.c (cxx_init_decl_processing): Do not call
5415         init_search_processing.
5416         * method.c (do_build_copy_constructor): Remove unnecessary code.
5417         (do_build_assign_ref): Likewise.
5418         * name-lookup.c (pushdecl): Use lookup_member, not
5419         IDENTIFIER_CLASS_VALUE.
5420         (set_identifier_type_value_with_scope): Set TREE_TYPE on the
5421         type_shadowed list.
5422         (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
5423         (push_class_binding): Do not set it.
5424         (clear_identifier_class_values): Remove.
5425         (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
5426         (store_binding): Do not save it.
5427         (pop_from_top_level): Do not restore it.
5428         * name-lookup.h (cxx_saved_binding): Remove class_value.
5429         (clear_identifier_class_values): Remove.
5430         * ptree.c (cxx_print_identifier): Do not print
5431         IDENTIFIER_CLASS_VALUE.
5432         * search.c (search_obstack): Remove.
5433         (push_stack_level): Remove.
5434         (pop_stack_level): Remove.
5435         (search_level): Remove.
5436         (search_stack): Remove.
5437         (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
5438         (setup_class_bindings): Use IDENTIFIER_MARKED, not
5439         IDENTIFIER_CLASS_VALUE.
5440         (marked_identifiers): New variable.
5441         (push_class_decls): Clear IDENTIFIER_MARKED.
5442         (pop_class_decls): Don't call pop_search_level.
5443         (init_search_processing): Remove.
5444
5445 2004-07-12  Mark Mitchell  <mark@codesourcery.com>
5446
5447         * cp-tree.h (get_aggr_typedef): Remove.
5448         * init.c (get_aggr_typedef): Likewise.
5449
5450         * name-lookup.c (push_class_level_binding): Simplify.
5451
5452 2004-07-12  Andrew Pinski  <apinski@apple.com>
5453
5454         PR c++/16475
5455         Revert:
5456         2004-07-07  H.J. Lu  <hongjiu.lu@intel.com>
5457                 PR c++/16276
5458                 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
5459                 is not public.
5460
5461 2004-07-12  Eric Christopher  <echristo@redhat.com>
5462
5463         * parser.c (cp_parser_class_head): Remove unused variable.
5464
5465 2004-07-12  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5466
5467         * decl.c (grok_op_properties): Reject [de-]allocation functions
5468         declared in a namespace, or declared as static.
5469
5470 2004-07-12  Nathan Sidwell  <nathan@codesourcery.com>
5471
5472         * cp-tree.h (make_binfo): Remove.
5473         * decl.c (xref_basetypes): Use make_tree_binfo directly.
5474         * tree.h (copy_base_binfos): Likewise.
5475         (make_binfo): Remove.
5476
5477         * call.c (build_user_type_conversion_1, build_new_op,
5478         check_constructor_callable, build_temp,
5479         perform_direct_initialization_of_possible): Pass type directly to
5480         lookup_fnfields & build_special_member_call.
5481         (build_special_member_call): Accept a type, and complete it.
5482         * class.c (finish_stuct_bits): Copy the BINFOs here.
5483         * cvt.c (ocp_convert): Pass type directly to
5484         build_special_member_call.
5485         * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
5486         (xref_basetypes): Allocate the binfo here. Adjust.
5487         * init.c (build_init, build_new_1): Pass type directly to
5488         build_special_member_call.
5489         * lex.c (cxx_make_type): Do not allocate binfo here.
5490         * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
5491         * parser.c (cp_parser_class_head): Always call xref_basetypes.
5492         * pt.c (instantiate_class_template): Likewise. Inhibit access
5493         checking for template friends.
5494         * ptree.c (cxx_print_type): Adjust record printing.
5495         * search.c (lookup_base): When taking a type, complete it before
5496         looking for a binfo.
5497         (lookup_member): Delay completing a type.
5498         (push_class_decls): Don't walk an incomplete type.
5499         (lookup_conversions): Likewise.
5500         * semantics.c (finish_stmt_expr_expr): Pass type directly to
5501         build_special_member_call.
5502         * tree.c (copy_base_binfos): Adjust.
5503         (make_binfo): Likewise.
5504         * typeck.c (build_modify_expr): Pass type directly to
5505         build_special_member_call.
5506         * typeck2.c (process_init_constructor): Check a binfo exists.
5507         (build_m_component_ref): Allow accessing an incomplete type.
5508         (build_functional_cast): Pass type directly to
5509         build_special_member_call.
5510
5511 2004-07-12  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5512
5513         PR c++/2204
5514         * config-lang.in (gtfiles): Add typeck2.c.
5515         * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
5516         gt-cp-typeck2.h.
5517         * cp-tree.h: Declare complete_type_check_abstract.
5518         * typeck2.c (pat_calc_hash, pat_compare,
5519         complete_type_check_abstract): New functions.
5520         (abstract_virtuals_error): If the type is abstract, register the
5521         declaration within abstract_pending_vars for further checks.
5522         Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
5523         * decl.c (cp_finish_decl): Do not strip array types.
5524         (create_array_type_for_decl): Check for abstractness of the element
5525         type.
5526         (complete_vars): Call complete_type_check_abstract.
5527         * class.c (finish_struct): Prepare a list of virtual functions for
5528         template types, and call complete_vars on it to check for abstractness.
5529
5530 2004-07-12  Paolo Bonzini  <bonzini@gnu.org>
5531
5532         PR tree-optimization/14107
5533         * decl.c (finish_function): Remove temporary band-aid.
5534
5535 2004-07-11  Mark Mitchell  <mark@codesourcery.com>
5536
5537         * call.c (build_operator_new_call): Avoid using push_to_top_level.
5538         (build_new_op): Adjust call to lookup_function_nonclass.
5539         * name-lookup.c (identifier_type_value): Adjust call to
5540         lookup_name_real.
5541         (lookup_name_real): Add block_p parameter.
5542         (lookup_name_nonclass): Adjust call to lookup_name_real.
5543         (lookup_function_nonclass): Likewise.
5544         (lookup_name): Likewise.
5545         * name-lookup.h (lookup_name_real): Change prototype.
5546         (lookup_name_nonclass): Likewise.
5547         * parser.c (cp_parser_lookup_name): Likewise.
5548
5549         * cp-tree.h (saved_scope): Make old_bindings a vector.
5550         (unuse_fields): Remove.
5551         * name-lookup.h (cxx_saved_binding): Define it.
5552         * class.c (pushclass): Don't use unuse_fields.
5553         * name-lookup.c (cxx_saved_binding_make): Remove.
5554         (store_binding): Add new bindings to a vector, using an
5555         accumulator style, rather than adding them to a list.
5556         (store_bindings): Adjust accordingly.
5557         (store_class_bindings): Likewise.
5558         (push_to_top_level): Likewise.
5559         (pop_from_top_level): Likewise.
5560         * optimize.c (maybe_clone_body): Must push_to_top_level and
5561         pop_from_top_level calls outside of loop.
5562         * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
5563         calls here from cp_parser_late_parsing_default_args.
5564         (cp_parser_save_default_args): Record the class type in which the
5565         function is declared.
5566         (cp_parser_late_parsing_default_args): Do not call
5567         push_nested_class/pop_nested_class.
5568         * search.c (dfs_unuse_fields): Remove.
5569         (unuse_fields): Remove.
5570
5571 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
5572
5573         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
5574         LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
5575         * cp-tree.h (poplevel): Declare.
5576         (set_block): Remove.
5577         * decl.c (set_block): Remove.
5578
5579 2004-07-10  Mike Stump  <mrs@apple.com>
5580
5581         * decl2.c (import_export_class): Never export/import vtables
5582         with inline key functions.
5583
5584 2004-07-09  Steven Bosscher  <stevenb@suse.de>
5585
5586         * typeck.c (c_expand_asm_operands): Remove.
5587
5588 2004-07-09  Mike Stump  <mrs@apple.com>
5589
5590         * typeck.c (build_class_member_access_expr): Skip null deref
5591         warning when we don't dereference it.
5592
5593 2004-07-09  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5594
5595         PR c++/8211
5596         PR c++/16165
5597         * class.c (check_field_decls): Improve -Weffc++ warning: do not
5598         warn for pointers to functions/members, or for classes without
5599         destructors.
5600
5601 2004-07-08  Mark Mitchell  <mark@codesourcery.com>
5602
5603         * name-lookup.h (struct cp_binding_level): Update documentation
5604         for class_shadowed.
5605
5606 2004-07-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5607
5608         PR c++/16169
5609         * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
5610         returning CALL_EXPR, and non-reference return type.
5611
5612 2004-07-08  Nathan Sidwell  <nathan@codesourcery.com>
5613
5614         * name-lookup.c (push_binding): Use VEC_reserve.
5615
5616 2004-07-08  Richard Henderson  <rth@redhat.com>
5617
5618         * cp-tree.h (expand_eh_spec_block): Remove.
5619
5620 2004-07-07  Mark Mitchell  <mark@codesourcery.com>
5621
5622         * cp-tree.h (saved_scope): Remove x_previous_class_type and
5623         x_previous_class_values; add x_previous_class_level.
5624         (previous_class_type): Remove.
5625         (previous_class_values): Remove.
5626         (previous_class_level): New macro.
5627         * class.c (pushclass): Restore the identifier cache more
5628         expeditiously.
5629         (invalidate_class_lookup_cache): Use vector for class_shadowed and
5630         previous_class_values.
5631         * decl.c (poplevel): Likewise.
5632         * name-lookup.c (cxx_binding_init): New function.
5633         (cxx_binding_make): Use it.
5634         (push_binding): For a binding in a class level, use a vector of
5635         cp_class_binding nodes.
5636         (push_binding_level): New function.
5637         (begin_scope): Use it.
5638         (leave_scope): Do not put class binding levels on the free list.
5639         (print_binding_level): Adjust for the fact that class_shadowed is
5640         a vector.
5641         (poplevel_class): Likewise.
5642         (clear_identifier_class_values): Likewise.
5643         (push_class_level_binding): Likewise.
5644         (set_class_shadows): Remove.
5645         (store_binding): New function.
5646         (store_class_bindings): New function.
5647         (push_to_top_level): Use store_class_bindings as appropriate.
5648         (pop_from_top_level): Use previous_class_level, not
5649         previous_class_type.
5650         * name-lookup.h (cp_class_binding): New type.
5651         (cp_binding_level): Use a vector object for class_shadowed.
5652         (push_binding_level): Declare.
5653         (set_class_shadows): Remove.
5654
5655 2004-07-07  Andrew Pinski  <apinski@apple.com>
5656
5657         * class.c (instantiate_type): BUFFER_REF is dead.
5658         * lex.c (init_operators): IN_EXPR is dead.
5659
5660 2004-07-07  Jason Merrill  <jason@redhat.com>
5661
5662         PR c++/16334
5663         * call.c (build_new_op): Give overload warnings for built-in
5664         candidates.
5665
5666 2004-07-07  H.J. Lu  <hongjiu.lu@intel.com>
5667
5668         PR c++/16276
5669         * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
5670         is not public.
5671
5672 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
5673
5674         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
5675         * class.c (build_primary_vtable, check_bases,
5676         determine_primary_base, finish_struct_bits,
5677         maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
5678         get_basefndecls, warn_hidden, walk_subobject_offsets,
5679         build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
5680         layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
5681         finish_struct_1, get_vfield_name, contains_empty_class_p,
5682         dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
5683         dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
5684         add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
5685         BINFO macros.
5686         * decl.c (xref_basetypes): Likewise.
5687         * dump.c (cp_dump_tree): Likewise.
5688         * error.c (dump_expr): Likewise.
5689         * init.c (sort_mem_initializers, expand_member_init,
5690         push_base_cleanups): Likewise.
5691         * method.c (do_build_copy_constructor, do_build_assign_reg,
5692         synthesize_exception_spec): Likewise.
5693         * name-lookup.c (arg_assoc_class): Likewise.
5694         * pt.c (instantiate_class_template, tsubst,
5695         get_template_base_recursive): Likewise.
5696         * ptree.c (cxx_print_type): Likewise.
5697         * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
5698         * search.c (lookup_base_r, dynamic_cast_base_recurse,
5699         dfs_access_in_type, access_in_type, lookup_field_queue_p,
5700         bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
5701         marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
5702         dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
5703         binfo_for_vtable, copied_binfo, original_binfo): Likewise
5704         * tree.c (copy_base_binfos, make_binfo): Likewise.
5705         * typeck.c (commmon_base_type): Likewise
5706         * typeck2.c (process_init_constructor): Likewise
5707
5708 2004-07-06  Joseph S. Myers  <jsm@polyomino.org.uk>
5709
5710         * decl.c (check_tag_decl): Name redeclared type in diagnostic.
5711
5712 2004-07-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5713
5714         PR c++/3671
5715         * pt.c (convert_nontype_argument): Disallow conversions between
5716         different enumeration types.
5717
5718 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
5719
5720         * cp-tree.h (BINFO_MARKED): Remove.
5721         (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
5722         BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
5723         BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
5724         (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
5725         * class.c (build_base_path): Use BINFO_VIRTUAL_P.
5726         (mark_primary_bases, determine_primary_base, base_derived_from,
5727         dfs_find_final_overrider, dfs_find_final_overrider_q,
5728         dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
5729         dfs_modify_vtables, walk_subobject_offsets,
5730         layout_nonempty_base_or_field, build_base_field,
5731         build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
5732         end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
5733         finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
5734         build_ctor_vtbl_group, accumulate_vtble_inits,
5735         dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
5736         build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
5737         add_vcall_offset_vtbl_entries_1): Likewise.
5738         * decl.c (xref_basetypes): Incomming virtual base indicated by
5739         TREE_TYPE. Adjust.
5740         * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
5741         * init.c (finish_init_stmts, sort_mem_initializers,
5742         emit_mem_initializers, build_vtble_address, expand_member_init,
5743         push_base_cleanups): Likewise.
5744         * method.c (do_build_copy_constructor): Likewise.
5745         * pt.c (instantiate_class_template,
5746         get_template_base_recursive): Likewise.
5747         * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
5748         get_pseudo_ti_desc): Likewise.
5749         * search.c (lookup_base_r, dynamic_cast_base_recurse,
5750         binfo_from_vbase, binfo_via_virtual, copied_binfo,
5751         original_binfo): Likewise.
5752         * semantics.c (finish_base_specifier): Virtualness is indicated
5753         by TREE_TYPE.
5754         * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
5755
5756 2004-07-06  Mark Mitchell  <mark@codesourcery.com>
5757
5758         Revert:
5759         2004-06-24  Jason Merrill  <jason@redhat.com>
5760         PR c++/16115
5761         * decl.c (grokparms): Give the PARM_DECL reference type if the
5762         parameter is passed by invisible reference.
5763
5764 2004-07-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5765
5766         * cp-lang.c (cp_var_mod_type_p): Add extra arg.
5767         * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
5768         * pt.c (check_instantiated_args, unify): Likewise.
5769
5770 2004-07-05  Phil Edwards  <phil@codesourcery.com>
5771
5772         * Make-lang.in (check-c++, lang_checks):  Add some comments.
5773
5774 2004-07-05  Zack Weinberg  <zack@codesourcery.com>
5775
5776         * cp-mudflap.c: Delete file.
5777         * Makefile.in: Remove all references to cp-mudflap.o.
5778
5779 2004-07-05  Zack Weinberg  <zack@codesourcery.com>
5780
5781         * decl.c (cxx_init_decl_processing): Call
5782         build_common_tree_nodes before creating the global NAMESPACE_DECL.
5783
5784 2004-07-05  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5785
5786         PR c++/2518
5787         * call.c (build_operator_new_call): Look only at global scope.
5788
5789 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
5790
5791         * call.c (enforce_access): Expect TREE_BINFO.
5792         * class.c (binfo_ctor_vtable): Check TREE_BINFO.
5793         * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
5794         (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
5795         Adjust.
5796         (BINFO_LANG_ELTS): Remove.
5797         (BINFO_LANG_SLOTS): New.
5798         (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
5799         (CLASSTYPE_TEMPLATE_INFO): Adjust.
5800         * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
5801         * search.c (lookup_member): Check TREE_BINFO.
5802         * semantics.c (perform_or_defer_access_check): Likewise.
5803         (check_accessibility_of_qualified_id): Check
5804         deferred_access_no_check.
5805         * tree.c (make_binfo): Use make_tree_binfo.
5806
5807 2004-07-04  Mark Mitchell  <mark@codesourcery.com>
5808
5809         * method.c (implicitly_declare_fn): Set linkage of generated
5810         functions.
5811
5812 2004-07-04  Richard Henderson  <rth@redhat.com>
5813
5814         * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
5815
5816 2004-07-03  Scott Brumbaugh  <scottb.lists@verizon.net>
5817
5818         PR c++/3761
5819         * name-lookup.c (push_class_level_binding): Don't pass a
5820         TREE_LIST of ambiguous names to check_template_shadow as it
5821         only handles declarations. Instead, pull the declaration
5822         out and pass that.
5823
5824 2004-07-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5825
5826         PR c++/14971
5827         * pt.c (check_explicit_specialization): Clarify error message.
5828
5829 2004-07-02  Richard Henderson  <rth@redhat.com>
5830
5831         * tree.c (cp_unsave_r): Update remap_save_expr call.
5832
5833 2004-07-02  Mark Mitchell  <mark@codesourcery.com>
5834
5835         PR c++/16240
5836         * mangle.c (write_template_arg): Correct mangling.
5837
5838         PR c++/16297
5839         * decl.c (grokdeclarator): Robustify.
5840
5841 2004-07-01  Richard Henderson  <rth@redhat.com>
5842
5843         * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
5844         * method.c (synthesize_method): Don't clear_last_expr.
5845         * name-lookup.c (maybe_push_cleanup_level): Likewise.
5846
5847 2004-07-01  Nick Clifton  <nickc@redhat.com>
5848
5849         * decl2.c (import_export_class): Invoke the
5850         import_export_class field in the gcc_target structure if it is not
5851         empty.
5852
5853 2004-06-30  Richard Henderson  (rth@redhat.com>
5854
5855         * decl.c (start_preparsed_function): Don't set immediate_size_expand.
5856         * method.c (use_thunk): Likewise.
5857
5858 2004-06-30  Joseph S. Myers  <jsm@polyomino.org.uk>
5859
5860         * call.c (build_over_call), typeck.c (build_function_call): Call
5861         check_function_arguments instead of check_function_format.
5862
5863 2004-06-30  Joseph S. Myers  <jsm@polyomino.org.uk>
5864
5865         * call.c (build_over_call), typeck.c (build_function_call): Update
5866         calls to check_function_format.
5867
5868 2004-06-30  Richard Henderson  <rth@redhat.com>
5869
5870         * call.c (build_over_call): Use __builtin_memcpy for copying
5871         CLASS_AS_BASE rather than funny casting.
5872
5873 2004-06-30  Richard Henderson  <rth@redhat.com>
5874
5875         * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
5876         TYPE_SIZE_UNIT of full_type.
5877
5878 2004-06-30  Per Bothner  <per@bothner.com>
5879
5880         Conditionally compile support for --enable-mapped_location.
5881         * decl.c (pop_label):  Handle (imperfectly) USE_MAPPED_LOCATION case.
5882         * decl2.c:  If USE_MAPPED_LOCATION, don't do some line number
5883         adjustments - which I don't understand.
5884         * error.c (dump_decl):  Rename "<interrnal>" to "<built-in>".
5885         * error.c:  Use LOCATION_FILE and EXPR_LOCATION macros.
5886         (print_instantiation_partial_context):  Use expand_location.
5887         * decl.c (duplicate_decl):  Use new DECL_IS_BUILTIN macro.
5888         * name-lookup.c:  Likewise.
5889         * lex.c (cxx_init):  Likewise.  Also use BUILTINS_LOCATION.
5890         * name-lookup.c:  Use input_line macro.
5891         * parser.c (cp_lexer_get_preprocessor_token):  Use UNKNOWN_LOCATION.
5892         (cp_parser_statement):  Rename locaal variable statement_locus to
5893         statement_location and use SET_EXPR_LOCATION macro.
5894         * pt.c:  Handle USE_MAPPED_LOCATION case.  Use new macros.
5895         * tree.c (cp_walk_subtrees):  Likewise.
5896
5897 2004-06-29  Per Bothner  <per@bothner.com>
5898
5899         * tree.c (build_min_nt, build_min, build_min_non_dep):
5900         Don't set TREE_COMPLEXITY from input_line.
5901
5902 2004-06-29  Paul Brook  <paul@codesourcery.com>
5903
5904         * init.c: Include target.h.
5905         (get_cookie_size): Remove and replace with target hook.
5906         Update callers.
5907         (build_new_1): Store the element size in the cookie.
5908
5909 2004-06-29  Nathan Sidwell  <nathan@codesourcery.com>
5910
5911         PR c++/16260
5912         * parser.c (cp_parser_template_declaration_after_export): Disable
5913         access checks here ...
5914         (cp_parser_class_specifier): ... not here.
5915
5916 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
5917
5918         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
5919         VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
5920         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
5921         TREE_CHECK macro.
5922
5923 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
5924
5925         * cp-tree.h (struct deferred_access): Move to ...
5926         * semantics.c (struct deferred_access): ... here. Adjust.
5927         (deferred_access_stack): Make a VEC(deferred_access),
5928         (deferred_access_free_list): Remove.
5929         (deferred_access_no_check): New.
5930         (push_deferring_access_checks, resume_deferring_access_checks,
5931         stop_deferring_access_checks, pop_deferring_access_checks,
5932         get_deferred_access_checks, pop_to_parent_deferring_access_checks,
5933         perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
5934
5935 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
5936
5937         PR c++/16174
5938         * call.c (build_temp): Declare.
5939         (check_constructor_callable): New.
5940         (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
5941         CONSTRUCTOR_CALLABLE.
5942         (convert_like_real, initialize_reference): Use
5943         check_constructor_callable.
5944         * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
5945         (LOOKUP_*): Renumber.
5946
5947 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
5948
5949         * friend.c (add_friend): Only perform access checks when context
5950         is a class.
5951         * lex.c (cxx_make_type): Only create a binfo for aggregate types.
5952         * parser.c (cp_parser_class_specifier): Disable access checks here
5953         when parsing the body of a templated class.
5954         * semantics.c (perform_or_defer_access_checks): Reorder to allow
5955         NULL binfos when not checking access.
5956
5957 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
5958
5959         Use vector API for vbase list.
5960         * cp-tree.h: Include vec.h
5961         (DEF_VEC_P (tree)): New type.
5962         (struct lang_type_class): Change vbase's member type.
5963         (binfo_for_vbase): Declare.
5964         * class.c (determine_primary_base, base_derived_from,
5965         update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
5966         warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
5967         build_vtbl_initializer): Adjust.
5968         * decl.c (xref_basetypes): Adjust, accumulate upper bound of
5969         vbases.
5970         * init.c (sort_mem_initializers, expand_member_init,
5971         push_base_cleanups): Adjust.
5972         * method.c (do_build_copy_constructor): Adjust.
5973         * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
5974         (binfo_for_vbase): New.
5975         * tree.c (copy_base_binfos): Adjust.
5976
5977 2004-06-28  Mark Mitchell  <mark@codesourcery.com>
5978
5979         * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
5980
5981 2004-06-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5982
5983         PR c++/14123
5984         * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
5985         paranthesis in case of pointers to array members.
5986         * error.c (dump_type_prefix): Likewise.
5987         (dump_type_suffix): Maybe issue a whitespace when printing
5988         ARRAY_TYPE.
5989
5990 2004-06-27  Mark Mitchell  <mark@codesourcery.com>
5991
5992         PR c++/16193
5993         * parser.c (cp_parser_set_decl_spec_type): Refine test for
5994         redefinition of built-in types.
5995
5996 2004-06-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5997
5998         * error.c (pp_template_argument_list_start): Remove.
5999         (pp_template_argument_list_end): Likewise.
6000         (pp_separate_with_comma): Use pp_cxx_separate_with.
6001         (reinit_global_formatting_buffer): Remove.
6002         (pp_non_consecutive_character): Likewise.
6003         (dump_scope): Use pp_cxx_colon_colon.
6004         (dump_template_parameter): Use pp_cxx_identifier,
6005         pp_cxx_tree_identifier and pp_cxx_whitespace.
6006         (dump_templat_bindings): Replace use of pp_string with sequence
6007         of pp_cxx_whitespace and pp_equal.
6008         (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
6009         pp_cxx_colon_colon, pp_cxx_whitespace throughout.  Don't set
6010         padding here.
6011         (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
6012         (dump_type_prefix): Don't set padding.  Use pp_cxx_whitespace,
6013         pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
6014         (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
6015         pp_cxx_right_bracket, pp_cxx_identifier throughout,
6016         (dump_decl): Likewise.
6017         (dump_template_decl): Likewise.
6018         (dump_function_decl): Likewise.  Set padding as appropriate.
6019         (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
6020         pp_cxx_right_paren.
6021         (dump_exception_spec): Likewise.
6022         (dump_function_name): Use pp_cxx_tree_identifier and
6023         pp_cxx_identifier.
6024         (dump_template_parms): Use pp_cxx_begin_template_argument_list and
6025         pp_cxx_end_template_argument_list.
6026         (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
6027         pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
6028         pp_cxx_whitespace throughout.
6029         (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
6030         pp_cxx_right_paren.
6031         (dump_unary_op): Likewise.
6032         (reinit_cxx_pp): New function.
6033         (type_as_string); Use it.
6034         (expr_as_string): Likewise.
6035         (decl_as_string); Likewise.
6036         (context_as_string): Likewise.
6037         (lang_decl_name): Likewise.
6038         (decl_to_string): Likewise.
6039         (expr_to_string): Likewise.
6040         (parm_to_string): Likewise.
6041         (type_to_string): Likewise.
6042         (args_to_string): Likewise.
6043         (cv_to_string): Likewise.
6044
6045 2004-06-26  Mark Mitchell  <mark@codesourcery.com>
6046
6047         * cp-tree.h (cp_cv_quals): New type.
6048         (cp_declarator): Use it instead of "tree" as appropriate.
6049         (grok_method_quals): Adjust prototype.
6050         (grokclassfn): Likewise.
6051         (do_friend): Likewise.
6052         * decl.c (grokfndecl): Use cp_cv_quals, not tree.
6053         (grokdeclarator): Likewise.
6054         * decl2.c (grok_method_quals): Likewise.
6055         (grokclassfn): Likewise.
6056         * friend.c (do_friend): Likewise.
6057         * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
6058         * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
6059         (make_pointer_declarator): Likewise.
6060         (make_reference_declarator): Likewise.
6061         (make_ptrmem_declarator): Likewise.
6062         (cp_parser_ptr_operator): Likewise.
6063         (cp_parser_cv_qualifier_seq_opt): Likewise.
6064         (cp_parser_cv_qualifier_opt): Remove.
6065         (cp_parser_new_declarator_opt): Adjust call to
6066         cp_parser_ptr_operator.
6067         (cp_parser_conversion_declaration_opt): Likewise.
6068         (cp_parser_declarator): Use cp_cv_quals, not tree.
6069         (cp_parser_direct_declarator): Likewise.
6070
6071 2004-06-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6072
6073         * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
6074         Rename DECL_STMT to DECL_EXPR.
6075         * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
6076         * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
6077         * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
6078
6079 2004-06-26  Jan Hubicka  <jh@suse.cz>
6080
6081         PR C++/14865
6082         * decl2.c (maybe_emit_vtables):  Always import_export_vtable for the
6083         reachability analysis.
6084
6085 2004-06-25  Mark Mitchell  <mark@codesourcery.com>
6086
6087         * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
6088         2004-06-23 change.
6089
6090 2004-06-25  Paul Brook  <paul@codesourcery.com>
6091
6092         * decl2.c (get_guard): Call targetm.cxx.guard_type.
6093         (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
6094
6095 2004-06-24  Mark Mitchell  <mark@codesourcery.com>
6096
6097         * decl.c (grokdeclarator): Restore error messages about __thread.
6098         * parser.c (cp_parser_decl_specifier_seq): Likewise.
6099
6100 2004-06-24  Jason Merrill  <jason@redhat.com>
6101
6102         PR c++/16115
6103         * decl.c (grokparms): Give the PARM_DECL reference type if the
6104         parameter is passed by invisible reference.
6105
6106 2004-06-24  Andreas Schwab  <schwab@suse.de>
6107
6108         * cp-tree.h (enum cp_storage_class): Remove trailing comma.
6109
6110 2004-06-23  Mark Mitchell  <mark@codesourcery.com>
6111
6112         * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
6113         (cp/decl.o): Likewise.
6114         (cp/decl2.o): Likewise.
6115         (cp/pt.o): Likewise.
6116         (cp/semantics.o): Likewise.
6117         * config-lang.in (gtfiles): Do not reference cp/lex.h.
6118         * class.c: Do not include lex.h.
6119         (add_implicitly_declared_members): Do not use
6120         adding_implicit_members.
6121         (check_bases_and_members): Do not talk about grok_x_components.
6122         * cp/cp-tree.h (adding_implicit_members): Remove.
6123         (cp_storage_class): New type.
6124         (cp_decl_spec): Likewise.
6125         (cp_decl_specifier_seq): Likewise.
6126         (cp_parameter_declarator): Use it for the decl_specifiers field.
6127         (check_tag_decl): Adjust prototype.
6128         (shadow_tag): Likewise.
6129         (groktypename): Likewise.
6130         (start_decl): Likewise.
6131         (start_function): Likewise.
6132         (start_method): Likewise.
6133         (grok_x_components): Remove.
6134         (grokfield): Adjust prototype.
6135         (grokbitfield): Likewise.
6136         (finish_member_class_template): Remove.
6137         * decl.c: Do not include lex.h.
6138         (adding_implicit_members): Do not define.
6139         (check_tag_decl): Do not use trees to represent decl-specifiers.
6140         (shadow_tag): Likewise.
6141         (groktypename): Likewise.
6142         (start_decl): Likewise.
6143         (grokvardecl): Likewise.
6144         (grokdeclarator): Likewise.
6145         (grokparms): Likewise.
6146         (start_function): Likewise.
6147         (start_method): Likewise.
6148         * decl.h (grokdeclarator): Adjust prototype.
6149         * decl2.c: Do not include lex.h.
6150         (grok_x_components): Remove.
6151         (grokfield): Do not use trees to represent decl-specifiers.
6152         (grokbitfield): Likewise.
6153         * lex.c: Do not include lex.h.
6154         * lex.h: Remove.
6155         * parser.c: Include target.h.
6156         (clear_decl_specs): New function.
6157         (cp_parser_translation_unit): Do not use trees to represent
6158         decl-specifiers.
6159         (cp_parser_postfix_expression): Likewise.
6160         (cp_parser_new_type_id): Likewise.
6161         (cp_parser_condition): Likewise.
6162         (cp_parser_simple_declaration): Likewise.
6163         (cp_parser_decl_specifier_seq): Likewise.
6164         (cp_parser_function_specifier_opt): Likewise.
6165         (cp_parser_conversion_type_id): Likewise.
6166         (cp_parser_template_parameter): Likewise.
6167         (cp_parser_explicit_instantiation): Likewise.
6168         (cp_parser_type_specifier): Likewise.
6169         (cp_parser_simple_type_specifier): Likewise.
6170         (cp_parser_init_declarator): Likewise.
6171         (cp_parser_type_id): Likewise.
6172         (cp_parser_type_specifier_seq): Likewise.
6173         (cp_parser_parameter_declaration): Likewise.
6174         (cp_parser_member_declaration): Likewise.
6175         (cp_parser_exception_declaration): Likewise.
6176         (cp_parser_function_definition_from_specifiers_and_declarator):
6177         Likewise.
6178         (cp_parser_single_declaration): Likewise.
6179         (cp_parser_save_member_function_body): Likewise.
6180         (cp_parser_friend_p): Likewise.
6181         (cp_parser_set_storage_class): New function.
6182         (cp_parser_set_decl_spec_type): Likewise.
6183         * pt.c: Do not include lex.h.
6184         * semantics.c: Likewise.
6185         (finish_member_class_template): Remove.
6186
6187 2004-06-23  Roger Sayle  <roger@eyesopen.com>
6188
6189         * call.c (build_cxx_call): Don't call expand_tree_builtin.  No
6190         longer take both "args" and "convert_args" as arguments.
6191         (build_op_delete_call): Update call to build_cxx_call.
6192         (build_over_call): Likewise, update call to build_cxx_call.
6193         * cp-tree.h (build_cxx_call): Update funtion prototype.
6194         * typeck.c (build_function_call): Don't call expand_tree_builtin.
6195         * rtti.c (throw_bad_cast): Update call to build_cxx_call.
6196         (throw_bad_typeid): Likewise.
6197         (build_dynamic_cast_1): Likewise.
6198
6199 2004-06-22  Richard Henderson  <rth@redhat.com>
6200
6201         * class.c (build_vfn_ref): Take a pointer not object.  Build
6202         an OBJ_TYPE_REF.
6203         (cp_fold_obj_type_ref): New.
6204         * call.c (build_over_call): Update build_vfn_ref call.
6205         * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
6206         * cp-tree.h (cp_fold_obj_type_ref): Declare.
6207
6208 2004-06-21  Jason Merrill  <jason@redhat.com>
6209
6210         PR c++/16112
6211         * cp-gimplify.c (cp_gimplify_init_expr): Look through
6212         CLEANUP_POINT_EXPR.
6213
6214 2004-06-21  Mark Mitchell  <mark@codesourcery.com>
6215
6216         * cp-tree.def (NEW_EXPR): Add a fourth slot.
6217         * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
6218         (TREE_PARMLIST): Likewise.
6219         (CALL_DECLARATOR_PARMS): Likewise.
6220         (CALL_DECLARATOR_QUALS): Likewise.
6221         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
6222         (cp_declarator_kind): New type.
6223         (cp_parameter_declarator): Likewise.
6224         (cp_declarator): Likewise.
6225         (cp_error_declarator): Likewise.
6226         (no_parameters): Likewise.
6227         (groktypename): Change prototype.
6228         (start_decl): Likewise.
6229         (start_handler_parms): Likewise.
6230         (get_scope_of_declarator): Likewise.
6231         (start_function): Likewise.
6232         (start_preparsed_function): New function.
6233         (start_function): Change prototype.
6234         (start_method): Likewise.
6235         (grokfield): Likewise.
6236         (grokbitfield): Likewise.
6237         (build_new): Likewise.
6238         (make_pointer_declarator): Remove.
6239         (make_reference_declarator): Likewise.
6240         (make_call_declarator): Likewise.
6241         (set_quals_and_spec): Likewise.
6242         (process_template_parm): Change prototype.
6243         (begin_function_definition): Remove.
6244         (finish_parmlist): Remove.
6245         * decl.c (groktypename): Do not use trees to represent
6246         declarators.
6247         (start_decl): Likewise.
6248         (start_handler_parms): Remove.
6249         (get_scope_of_declarator): Reimplement.
6250         (grokdeclarator): Do not use trees to represent declarators.
6251         (grokparms): Likewise.
6252         (start_function): Likewise.
6253         (start_method): Likewise.
6254         (build_void_list_mode): Do not use TREE_PARMLIST.
6255         * decl.h (grokdeclarator): Change prototype.
6256         * decl2.c (grok_method_quals): Robustify.
6257         (grok_x_components): Do not use trees to represent declarators.
6258         (grokfield): Likewise.
6259         (grokbitfield): Likewise.
6260         (start_objects): Build FUNCTION_DECLs, not declarators.
6261         (start_static_storage_duration_function): Likewise.
6262         * init.c (build_new): Simplify.
6263         * lex.c (make_pointer_declarator): Remove.
6264         (make_reference_declarator): Likewise.
6265         (make_call_declarator): Likewise.
6266         (set_quals_and_spec): Likewise.
6267         * method.c (use_thunk): Use start_preparsed_function.
6268         (synthesize_method): Likewise.
6269         (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
6270         * optimize.c (maybe_clone_body): Use start_preparsed_function.
6271         * parser.c (cp_error_declarator): New variable.
6272         (declarator_obstack): Likewise.
6273         (alloc_declarator): New function.
6274         (make_declarator): Likewise.
6275         (make_id_declarator): Likewise.
6276         (make_pointer_declarator): Likewise.
6277         (make_reference_declarator): Likewise.
6278         (make_ptrmem_declarator): Likewise.
6279         (make_call_declarator): Likewise.
6280         (make_array_declarator): Likewise.
6281         (no_parameters): New variable.
6282         (make_parameter_declarator): Likewise.
6283         (cp_parser_check_for_definition_in_return_type): Do not use trees
6284         to represent declarators.
6285         (cp_parser_translation_unit): Likewise.
6286         (cp_parser_new_expression): Likewise.
6287         (cp_parser_new_type_id): Likewise.
6288         (cp_parser_new_declarator_opt): Likewise.
6289         (cp_parser_direct_new_declarator): Likewise.
6290         (cp_parser_condition): Likewise.
6291         (cp_parser_declaration_statement): Likewise.
6292         (cp_parser_declaration): Likewise.
6293         (cp_parser_conversion_type_id): Likewise.
6294         (cp_parser_conversion_declarator_opt): Likewise.
6295         (cp_parser_template_parameter_list): Likewise.
6296         (cp_parser_template_parameter): Likewise.
6297         (cp_parser_explicit_instantiation): Likewise.
6298         (cp_parser_init_declarator): Likewise.
6299         (cp_parser_declarator): Likewise.
6300         (cp_parser_direct_declarator): Likewise.
6301         (cp_parser_type_id): Likewise.
6302         (cp_parser_parameter_declaration_clause): Likewise.
6303         (cp_parser_parameter_declaration_list): Likewise.
6304         (cp_parser_parameter_declaration): Likewise.
6305         (cp_parser_member_declaration): Likewise.
6306         (cp_parser_exception_declaration): Likewise.
6307         (cp_parser_check_declarator_template_parameters): Likewise.
6308         (cp_parser_function_definition_from_specifiers_and_declarator):
6309         Likewise.
6310         (cp_parser_save_member_function_body): Likewise.
6311         * pt.c (process_template_parm): Add is_non_type parameter.
6312         (convert_template_argument): Adjust call to groktypename.
6313         (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
6314         (tsubst): Do not expect declarators.
6315         (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
6316         argument.
6317         (instantiate_decl): Use start_preparsed_function.
6318         * semantics.c (begin_function_definition): Remove.
6319         (finish_parmlist): Remove.
6320         * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
6321         declarators.
6322
6323 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6324
6325         * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
6326         (build_new_method_call): Likewise.
6327         * decl.c (local_variable_p_walkfn): Don't walk into types.
6328         * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
6329         (build_anon_union_vars): Add new operand for COMPONENT_REF.
6330         * init.c (buld_new): Add new operand for ARRAY_REF.
6331         * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
6332         (do_build_assign_ref): Likewise.
6333         * parser.c (cp_parser_direct_new_declarator): Add new operands
6334         for ARRAY_REF.
6335         (cp_parser_direct_declarator): Likewise.
6336         * pt.c (tsubst): Likewise.
6337         (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
6338         for COMPONENT_REF.
6339         * semantics.c (finish_non_static_data_member): Add new operand
6340         for COMPONENT_REF.
6341         * typeck.c (build_class_member_access_expr): Likewise.
6342         (build_class_member_access_expr, finish_class_member_access_expr):
6343         Likewise.
6344         (build_ptrmemfunc_access_expr): Likewise.
6345         (build_array_ref): Add new operands for ARRAY_REF.
6346         * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
6347         * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
6348
6349 2004-06-21  Richard Henderson  <rth@redhat.com>
6350
6351         * dump.c (cp_dump_tree): Don't use dump_next_stmt.
6352         * parser.c (cp_parser_jump_statement): Update commentary.
6353         * pt.c (tsubst_expr): Use RETURN_EXPR.
6354         * semantics.c (finish_return_stmt): Likewise.
6355         (finalize_nrv_r): Likewise.
6356         * typeck.c, typeck2.c: Update file start commentary.
6357
6358 2004-06-21  Richard Henderson  <rth@redhat.com>
6359
6360         * semantics.c (finish_expr_stmt): Call verify_sequence_points.
6361
6362 2004-06-20  Richard Henderson  <rth@redhat.com>
6363
6364         * cp-tree.h (add_decl_stmt): Declare.
6365         * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
6366         * semantics.c (maybe_cleanup_point_expr): New.
6367         (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
6368         finish_for_expr, finish_switch_cond): Use it.
6369         (finalize_nrv_r): Don't build an EXPR_STMT.  Don't frob TREE_CHAIN.
6370
6371 2004-06-20  Richard Henderson  <rth@redhat.com>
6372
6373         * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
6374         * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
6375         (cp_gimplify_expr): Call it.
6376         (gimplify_cleanup_stmt): Move from c-gimplify.c.
6377         (cp_genericize): New.
6378         * decl.c (finish_function): Call it.
6379         * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
6380         (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
6381         (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
6382         (cp_genericize): Declare.
6383         * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
6384         * dump.c (cp_dump_tree): Likewise.
6385         * semantics.c (push_cleanup): Move from c-semantics.c.
6386
6387 2004-06-20  Zack Weinberg  <zack@codesourcery.com>
6388
6389         * cp-lang.c (has_c_linkage): Implement.
6390
6391         * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
6392         * decl.c (duplicate_decls): Use COPY_DECL_RTL.
6393         (builtin_function_1): Don't call make_decl_rtl.
6394         (build_cp_library_fn): Don't call set_mangled_name_for_decl.
6395         (grokvardecl): Don't call mangle_decl.
6396         * except.c (nothrow_libfn_p): Look at DECL_NAME, not
6397         DECL_ASSEMBLER_NAME.
6398         * method.c (set_mangled_name_for_decl): Delete.
6399         * name-lookup.c (pushdecl): When a local extern shadows a
6400         file-scope declaration of the same object, give both DECLs the
6401         same DECL_UID.
6402         * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
6403         on DECL_ASSEMBLER_NAME.
6404
6405 2004-06-19  Richard Henderson  <rth@redhat.com>
6406
6407         * cp-gimplify.c: Remove unnecessary prototypes.
6408         (cp_gimplify_stmt): Merge into ...
6409         (cp_gimplify_expr): ... here.  Move to end of file.  Handle
6410         stmts_are_full_exprs_p frobbing.
6411         * cp-tree.h (cp_gimplify_stmt): Remove.
6412         * pt.c (tsubst_expr): Merge prep_stmt and unify.
6413         * tree.c (init_tree): Don't set lang_gimplify_stmt.
6414
6415 2004-06-18  Richard Henderson  <rth@redhat.com>
6416
6417         PR c++/16034
6418         * semantics.c (begin_cond): New.
6419         (finish_cond): Rewrite to handle template DECL_STMTs specially.
6420         Assume that non-template decls go land before the conditional.
6421         (simplify_loop_decl_cond): Likewise.
6422         (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
6423         finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
6424         begin_switch_stmt, finish_switch_cond): Update to match.
6425
6426 2004-06-17  Jason Merrill  <jason@redhat.com>
6427
6428         PR c++/16015
6429         * semantics.c (simplify_aggr_init_expr): Don't return the slot.
6430         (finish_stmt_expr_expr): Update type after conversions.
6431         (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
6432         Handle void initializer.
6433         * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
6434
6435 2004-06-17  Geoffrey Keating  <geoffk@apple.com>
6436
6437         * class.c (build_clone): Don't call defer_fn, let mark_used do it.
6438         * cp-tree.h (defer_fn): Delete.
6439         * decl2.c (defer_fn): Delete.
6440         (finish_file): Simplify deferred_fns loops; check that
6441         only used inline functions get into deferred_fns.
6442         (mark_used): Inline previous contents of defer_fn.
6443
6444 2004-06-16  Richard Henderson  <rth@redhat.com>
6445
6446         * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
6447         (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
6448         * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
6449         of CTOR_INITIALIZER ...
6450         (pp_cxx_statement): ... here.
6451         * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
6452         (finish_function): Use alloc_stmt_list to zap entire function.
6453         * parser.c (cp_parser_compound_statement): Update commentary.
6454         * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
6455         * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
6456         (finish_stmt_expr): Don't look through COMPOUND_STMT.
6457
6458 2004-06-16  Geoffrey Keating  <geoffk@apple.com>
6459
6460         * pt.c (mark_decl_instantiated): Don't call defer_fn.
6461
6462 2004-06-16  Richard Henderson  <rth@redhat.com>
6463
6464         * parser.c (cp_parser_labeled_statement): Update commentary.
6465         * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
6466         * tree.c (mark_local_for_remap_r): Likewise.
6467
6468 2004-06-16  Richard Henderson  <rth@redhat.com>
6469
6470         * parser.c (cp_parser_asm_definition): Update commentary.
6471         * pt.c (tsubst_expr): Use ASM_EXPR.
6472         * semantics.c (finish_asm_stmt): Likewise.
6473
6474 2004-06-16  Richard Henderson  <rth@redhat.com>
6475
6476         * decl.c (finish_destructor_body): Use LABEL_EXPR.
6477         * parser.c (cp_parser_statement): Update commentary.
6478         * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
6479         * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
6480         * tree.c (mark_local_for_remap_r): Likewise.
6481
6482 2004-06-16  Richard Henderson  <rth@redhat.com>
6483
6484         PR c++/16012
6485         * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
6486         statement in FOR_INIT_STMT for templates.
6487
6488 2004-06-15  Richard Henderson  <rth@redhat.com>
6489
6490         * call.c (initialize_reference): Don't build CLEANUP_STMT here.
6491         * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
6492         (genericize_try_block): Use gimplify_stmt.
6493         (genericize_catch_block, genericize_eh_spec_block): Likewise.
6494         (cp_gimplify_init_expr): Remove STMT_EXPR special case.
6495         (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
6496         * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
6497         (cp_tree_chain_matters_p): Remove.
6498         * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
6499         (COMPOUND_STMT_BODY_BLOCK): New.
6500         (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
6501         (EXPR_STMT_STMT_EXPR_RESULT): New.
6502         (building_stmt_tree): Check cur_stmt_list.
6503         (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
6504         (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
6505         * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
6506         (cp_finish_decl): Use push_cleanup.
6507         (start_function, finish_function): Use statement lists.
6508         (finish_stmt): Do nothing.
6509         * except.c (begin_eh_spec_block): Use statement lists.
6510         (check_handlers_1, check_handlers): Likewise.
6511         * init.c (construct_virtual_base): Don't add extra compound stmts.
6512         (build_vec_init): Likewise.
6513         * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
6514         * name-lookup.h (struct cp_binding_level): Add statement_list.
6515         * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
6516         (cp_parser_labeled_statement, cp_parser_expression_statement,
6517         cp_parser_statement_seq_opt): Likewise.
6518         (cp_parser_compound_statement): Likewise.  Take bool for try block.
6519         (cp_parser_selection_statement): Tidy if processing.
6520         (cp_parser_already_scoped_statement): Rewrite to do what it says.
6521         * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
6522         (tsubst_expr): Rewrite STMT_EXPR processing.  Handle STATEMENT_LIST.
6523         Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
6524         * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
6525         (finish_cond): New, rewritten from FINISH_COND.
6526         (simplify_loop_decl_cond): New.
6527         (finish_expr_stmt): Avoid nested EXPR_STMTs.
6528         (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
6529         begin_else_clause, finish_else_clause, finish_if_stmt,
6530         begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
6531         begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
6532         finish_for_cond, finish_for_stmt, begin_switch_stmt,
6533         finish_switch_cond, finish_switch_stmt, begin_try_block,
6534         finish_try_block, finish_cleanup_try_block, finish_function_try_block,
6535         finish_handler_sequence, finish_function_handler_sequence,
6536         begin_handler, finish_handler_parms, finish_handler,
6537         begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
6538         using statement lists.
6539         (begin_compound_stmt): Replace has_no_scope argument with flags.
6540         Update all callers.  Use statement lists.
6541         (finish_compound_stmt): Likewise.
6542         (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
6543         (current_scope_stmt_stack): Remove.
6544         (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
6545         * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
6546         Rewrite with statement lists.
6547
6548 2004-06-15  Alexandre Oliva  <aoliva@redhat.com>
6549
6550         * parser.c: Change all assignments of c_lex_string_translate
6551         to true and false to 1 and 0.
6552         (cp_lexer_read_token): Convert type of the translated string.
6553         (cp_parser_skip_to_closing_parentheses): Preserve original
6554         value of c_lex_string_translate, and set it to -1 while
6555         running.
6556         (cp_parser_cache_group): Likewise.
6557         (cp_parser_cache_group_1): Renamed.
6558         (cp_parser_asm_operand_list): Remove redundant setting of
6559         c_lex_string_translate.
6560         (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
6561         Handle chained strings.
6562
6563 2004-06-12  Andrew Pinski  <apinski@apple.com>
6564
6565         PR c++/14639
6566         Revert:
6567         2004-06-02  Andrew Pinski  <pinskia@physics.uc.edu>
6568
6569                 * cp-tree.h: Fix typo.
6570
6571                 * cp-tree.h: Include cgraph.h
6572                 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
6573                 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
6574
6575 2004-06-12  Jason Merrill  <jason@redhat.com>
6576
6577         PR tree-optimization/14107
6578         * decl.c (finish_function): Warn about no return in all functions.
6579
6580 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
6581
6582         * cp-tree.h (struct language_function): Remove cannot_inline.
6583         * decl.c (save_function_data): cannot_inline is no more.
6584         (cxx_push_function_context): Likewise.
6585         * decl2.c (start_objects, start_static_storage_duration_function):
6586         Reset DECL_INLINE, set DECL_UNINLINABLE.
6587
6588 2004-06-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6589
6590         PR c++/15967
6591         * search.c (lookup_field): Propagate the ambiguity list.
6592         (lookup_fnfields): Likewise.
6593
6594 2004-06-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6595
6596         PR c++/15947
6597         * parser.c (cp_parser_template_name): Ctors/dtors never need a
6598         template keyword to disambiguate.
6599
6600 2004-06-14  Mark Mitchell  <mark@codesourcery.com>
6601
6602         PR c++/15096
6603         * decl.c (grokdeclarator): Ignore pointer-to-members when
6604         computing template depth.
6605
6606         PR c++/14930
6607         * name-lookup.c (pushtag): Do not try to put class declarations in
6608         explicit specialization scopes.
6609
6610 2004-06-11  Andrew Pinski  <pinskia@physics.uc.edu>
6611
6612         * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
6613
6614 2004-06-11  Mark Mitchell  <mark@codesourcery.com>
6615
6616         PR c++/15862
6617         * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
6618         bindings for undeclared built-ins.
6619
6620 2004-06-11  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6621
6622         * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
6623         appear at the correct location.
6624
6625 2004-06-10  Jason Merrill  <jason@redhat.com>
6626
6627         PR c++/15875
6628         Revert:
6629         2004-06-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6630         * init.c (build_offset_ref): Build SCOPE_REF with non-null
6631         TREE_TYPE for non-dependent names.
6632         * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
6633         unknown_type_node as its TREE_TYPE.
6634         * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
6635         * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
6636         (dump_expr) <SCOPE_REF case>: Likewise.
6637
6638 2004-06-10  Mark Mitchell  <mark@codesourcery.com>
6639
6640         PR c++/15227
6641         * parser.c (cp_parser_direct_declarator): Robustify.
6642
6643         PR c++/15877
6644         * pt.c (tsubst_copy): Use decl_constant_value on enumeration
6645         constants in non-dependent contexts.
6646
6647         PR c++/14211
6648         PR c++/15076
6649         * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
6650         necessary.
6651
6652 2004-06-10  Jakub Jelinek  <jakub@redhat.com>
6653
6654         PR c++/14791
6655         * decl.c (duplicate_decls): Handle fileptr_type_node arguments
6656         specially.
6657
6658 2004-06-09  Mark Mitchell  <mark@codesourcery.com>
6659
6660         Revert:
6661         PR c++/15815
6662         2004-06-07  Mark Mitchell  <mark@codesourcery.com>
6663         * lex.c (handle_pragma_interface): Deprecate.
6664         (handle_pragma_implementation): Likewise.
6665
6666 2004-06-09  Andrew Pinski  <pinskia@physics.uc.edu>
6667
6668         * g++spec.c (lang_specific_driver): Remove check for -lm
6669         and -lmath when check it see if it was the math library.
6670
6671 2004-06-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6672
6673         PR c++/7841
6674         * parser.c (cp_parser_direct_declarator): Reject constructor named
6675         as qualified template-id.
6676
6677 2004-06-07  Mark Mitchell  <mark@codesourcery.com>
6678
6679         PR c++/15815
6680         * lex.c (handle_pragma_interface): Deprecate.
6681         (handle_pragma_implementation): Likewise.
6682
6683 2004-06-07  Mark Mitchell  <mark@codesourcery.com>
6684
6685         PR c++/15766
6686         * parser.c (cp_parser_iteration_statement): Fix typo in error
6687         message.
6688
6689         PR c++/14777
6690         * pt.c (tsubst_default_argument): Do not defer access checks
6691         while substituting into the default argument.
6692
6693         PR c++/15554
6694         * pt.c (tsubst_copy): Do not try to substitute for an enumeration
6695         constant in a non-dependent context.
6696
6697         PR c++/15057
6698         * except.c (build_throw): Ensure that temp_expr has been
6699         initialized.
6700
6701 2004-06-06  Roger Sayle  <roger@eyesopen.com>
6702
6703         * cp/cp-tree.h (lvalue_or_else): Add function prototype.
6704
6705 2004-06-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6706
6707         PR c++/15503
6708         * parser.c (cp_parser_mem_initializer_id): Gracefully reject
6709         'typename', and accept 'template'.
6710
6711 2004-06-03  Andrew Pinski  <pinskia@physics.uc.edu>
6712             Jan Hubicka  <jh@suse.cz>
6713
6714         PR c++/14639
6715         * method.c (use_think): Do not mark thunk as referenced.
6716
6717 2004-06-03  Matt Austern  <austern@apple.com>
6718
6719         PR c++/15428
6720         * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
6721         is nonzero, and if we see a noninline definition of a key method,
6722         make the vtables nonweak.
6723
6724 2004-06-02  Matt Austern  <austern@apple.com>
6725
6726         * cp-tree.h (instantiate_decl): new boolean parameter,
6727         undefined_ok. Current behavior is equivalent to its being 0.
6728         * decl2.c (mark_used): Add new argument when calling instantiate_decl
6729         * pt.c (mark_decl_instantiated): Unconditionally make
6730         instantiations explicit unconditionally
6731         (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
6732         since mark_decl_instantiated now does it.
6733         (instantiate_class_member): New.  Instantiate a member of an
6734         explicitly instantiated class template.
6735         (do_type_instantiation): Explicitly instantiate members of an
6736         explicitly instantiated class template.
6737         (instantiate_decl): if undefined_ok is nonzero, and if we're
6738         trying to explicitly instantiated a template with no definition,
6739         change it to an implicit instantiation.
6740         (instantiate_pending_templates): Add new argument to instantiate_decl.
6741         * tree.c (cp_cannot_inline_tree_fn): Likewise.
6742
6743 2004-06-02  Andrew Pinski  <pinskia@physics.uc.edu>
6744
6745         * cp-tree.h: Fix typo.
6746
6747         * cp-tree.h: Include cgraph.h
6748         (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
6749         TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
6750
6751 2004-06-01  Jason Merrill  <jason@redhat.com>
6752
6753         PR c++/15142
6754         * call.c (call_builtin_trap): Remove type parm.
6755         (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
6756         (build_x_va_arg): Dereference a null pointer for a non-POD argument.
6757
6758 2004-06-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6759
6760         PR c++/13092
6761         * init.c (build_offset_ref): Build SCOPE_REF with non-null
6762         TREE_TYPE for non-dependent names.
6763         * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
6764         unknown_type_node as its TREE_TYPE.
6765         * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
6766         * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
6767         (dump_expr) <SCOPE_REF case>: Likewise.
6768
6769 2004-06-01  Richard Henderson  <rth@redhat.com>
6770             Andrew Pinski  <pinskia@physics.uc.edu>
6771
6772         * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
6773         * parser.c (struct cp_parser): Remove in_offsetof.
6774         (cp_parser_new): Don't set it.
6775         (cp_parser_unary_expression): Don't check it.
6776         (cp_parser_postfix_open_square_expression): Split out from ...
6777         (cp_parser_postfix_expression): ... here.
6778         (cp_parser_postfix_dot_deref_expression): Likewise.
6779         (cp_parser_builtin_offsetof): New.
6780         (cp_parser_primary_expression): Use it.
6781
6782 2004-06-01  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6783
6784         PR c++/14932
6785         * parser.c (cp_parser_postfix_expression): Allow subscript
6786         operator in offsetof.
6787
6788 2004-05-31  Mark Mitchell  <mark@codesourcery.com>
6789
6790         PR c++/15701
6791         * friend.c (add_friend): Do not try to perform access checks for
6792         functions from dependent classes.
6793
6794 2004-05-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6795
6796         * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
6797         (pp_cxx_begin_template_argument_list): Turn into a function.
6798         (pp_cxx_end_template_argument_list): Likewise.
6799         (pp_cxx_separate_with): Define.
6800         (pp_cxx_unqualified_id): Tidy.
6801         (pp_cxx_primary_expression): Likewise.
6802         (pp_cxx_postfix_expression): Likewise.
6803         (pp_cxx_expression): Likewise.
6804         (pp_cxx_simple_type_specifier): Likewise.
6805         (pp_cxx_type_specifier_seq): Likewise.
6806         (pp_cxx_parameter_declaration_clause): Likewise.
6807         (pp_cxx_exception_specification): Likewise.
6808         (pp_cxx_direct_declarator): Likewise.
6809         (pp_cxx_type_id): Likewise.
6810         * cxx-pretty-print.h (pp_cxx_whitespace): Export from
6811         cxx-pretty-print.c.
6812         (pp_cxx_left_paren): Likewise.
6813         (pp_cxx_right_paren): Likewise.
6814         (pp_cxx_left_brace): Likewise.
6815         (pp_cxx_right_brace): Likewise.
6816         (pp_cxx_left_bracket): Likewise.
6817         (pp_cxx_right_bracket): Likewise.
6818         (pp_cxx_dot): Likewise.
6819         (pp_cxx_identifier): Likewise.
6820         (pp_cxx_tree_identifier): Likewise.
6821         (pp_cxx_ampersand): New macro.
6822         (pp_cxx_star): Likewise.
6823         (pp_cxx_arrow): Likewise.
6824         (pp_cxx_semicolon): Likewise.
6825         (pp_cxx_complement): Likewise.
6826         (pp_cxx_begin_template_argument_list): Declaree.
6827         (pp_cxx_end_template_argument_list): Likewise.
6828         (pp_cxx_colon_colon): likewise.
6829
6830 2004-05-31  Eric Botcazou  <ebotcazou@libertysurf.fr>
6831
6832         * parser.c (cp_parser_simple_type_specifier): Explicitly test
6833         against NULL_TREE.
6834
6835 2004-05-31  Kazu Hirata  <kazu@cs.umass.edu>
6836
6837         * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
6838         typeck.c: Fix comment formatting.
6839
6840 2004-05-30  Andrew Pinski  <pinskia@physics.uc.edu>
6841
6842         * cp-lang.c (cp_expand_decl): Remove.
6843         (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
6844
6845 2004-05-30  Andreas Jaeger  <aj@suse.de>
6846
6847         * lang-specs.h: Add missing initializers for .ii.
6848
6849 2004-05-28  Aldy Hernandez  <aldyh@redhat.com>
6850
6851         * decl.c (cp_make_fname_decl): Free return value from
6852         fname_as_string.
6853
6854 2004-05-28  Mark Mitchell  <mark@codesourcery.com>
6855
6856         PR c++/15083
6857         * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
6858         even in a templat.e
6859         * init.c (build_new): Likewise.
6860
6861         PR c++/15640
6862         * name-lookup.c (arg_assoc): Robustify.
6863
6864         PR c++/15471
6865         * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
6866         when determining the scope to use for a pointer to member.
6867         (lookup_anon_field): Give it external linkage.
6868         * cp-tree.h (lookup_anon_field): Declare it.
6869         * expr.c (cplus_expand_constant): Use it.
6870
6871 2004-05-28  Mark Mitchell  <mark@codesourcery.com>
6872
6873         PR c++/14668
6874         * parser.c (cp_parser_simple_type_specifier): Call
6875         maybe_note_name_used_in_class.
6876
6877 2004-05-28  Tom Marshall  <tmarshall@real.com>
6878
6879         PR c++/15214
6880         * class.c (finish_struct_1): Warn only if the dtor is non-private or
6881         the class has friends.
6882
6883 2004-05-27  Adam Nemet  <anemet@lnxw.com>
6884
6885         PR c++/12883
6886         * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
6887         TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
6888
6889 2004-05-24  Geoffrey Keating  <geoffk@apple.com>
6890
6891         * method.c (implicitly_declare_fn): Don't call defer_fn; abort
6892         if it might be needed.
6893         * pt.c (mark_decl_instantiated): Only call defer_fn if
6894         the function actually needs processing in finish_file.
6895         * decl2.c (finish_file): Add check that elements in
6896         deferred_fns_used are really needed there.  Remove unnecessary
6897         test of DECL_SAVED_TREE.
6898
6899 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
6900
6901         * Make-lang.in: No need to specify $(LIBCPP).
6902
6903 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
6904
6905         PR c++/15044
6906         * parser.c (cp_parser_class_head): Robustify.
6907
6908         PR c++/15317
6909         * parser.c (cp_parser_decl_specifier_seq): Correct error in
6910         comment.
6911         (cp_parser_constructor_declarator_p): Treat attributes
6912         as decl-specifiers.
6913
6914         PR c++/15329
6915         * typeck.c (build_unary_op): Do not attempt to resolve casts to
6916         base classes in templates.
6917
6918 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
6919
6920         PR c++/15165
6921         * pt.c (instantiate_template): Robustify.
6922
6923 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
6924
6925         PR c++/15025
6926         * decl.c (xref_tag): Issue errors about redeclaring template
6927         classes as non-template classes.
6928
6929 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
6930
6931         PR c++/14821
6932         * name-lookup.c (supplement_binding): Allow redefinitions of
6933         namespace aliases.
6934
6935         PR c++/14883
6936         * parser.c (cp_parser_template_argument): Robustify.
6937
6938 2004-05-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6939
6940         * class.c (alter_access): Use %E format specifier to print an
6941         identifier node.  Avoid looking at the IDENTIFIER_POINTER.
6942         (push_lang_context): Likewise.
6943         * decl.c (lookup_label): Likewise.
6944         (grokdeclarator): Likewise.
6945         * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
6946         * pt.c (do_type_instantiation): Likewise.
6947         * tree.c (handle_java_interface_attribute): Likewise.
6948         (handle_com_interface_attribute): Likewise.
6949         (handle_init_priority_attribute): Likewise.
6950
6951 2004-05-22  Mark Mitchell  <mark@codesourcery.com>
6952
6953         PR c++/15285
6954         PR c++/15299
6955         * pt.c (build_non_dependent_expr): Expand the set of tree nodes
6956         recognized as overloaded functions.
6957
6958 2004-05-22  Mark Mitchell  <mark@codesourcery.com>
6959
6960         PR c++/15507
6961         * class.c (layout_nonempty_base_or_field): Do not try to avoid
6962         layout conflicts for unions.
6963
6964         PR c++/15542
6965         * typeck.c (build_x_unary_op): Instantiate template class
6966         specializations before looking for "operator &".
6967
6968         PR c++/15427
6969         * typeck.c (complete_type): Layout non-dependent array types, even
6970         in templates.
6971
6972         PR c++/15287
6973         * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
6974         template.
6975
6976 2004-05-22  Roger Sayle  <roger@eyesopen.com>
6977
6978         * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
6979         returning when TREE_TYPE is error_mark_node.
6980         * typeck.c (require_complete_type): Return error_mark_node if
6981         value's type is an error_mark_node.
6982
6983 2004-05-20  Andrew Pinski  <pinskia@physics.uc.edu>
6984
6985         * optimize.c (calls_setjmp_r): Remove.
6986         (calls_setjmp_p): Remove.
6987         * cp-tree.c (calls_setjmp_p): Remove.
6988         * decl.c (finish_function): Do not call calls_setjmp_p.
6989
6990 2004-05-18  Zack Weinberg  <zack@codesourcery.com>
6991
6992         * decl.c (cp_finish_decl): Use mark_decl_referenced.
6993         * decl2.c (maybe_make_one_only): Likewise.
6994         * method.c (use_thunk): Likewise.
6995
6996 2004-05-18  Jason Merrill  <jason@redhat.com>
6997
6998         * class.c (build_base_path): Tidy a bit.
6999
7000 2004-05-14  Geoffrey Keating  <geoffk@apple.com>
7001
7002         * name-lookup.c (struct scope_binding): New.
7003         (EMPTY_SCOPE_BINDING): New.
7004         (lookup_using_namespace): Take a scope_binding instead of a
7005         cxx_binding.
7006         (qualified_lookup_using_namespace): Likewise.
7007         (cxx_binding_clear): Delete.
7008         (do_nonmember_using_decl): Use a scope_binding instead of a
7009         cxx_binding.
7010         (lookup_tag): Don't call select_decl.
7011         (ambiguous_decl): Don't return anything (and change callers to match).
7012         Take a scope_binding as the second parameter.
7013         (lookup_namespace_name): Use a scope_binding instead of a
7014         cxx_binding.
7015         (unqualified_namespace_lookup): Likewise.
7016         (lookup_qualified_name): Likewise.
7017         (select_decl): Take a scope_binding instead of a cxx_binding.
7018         Use macros rather than hand-coding tests for type-ness.
7019
7020 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
7021
7022         * cp-gimplify.c: Rename from cp-simplify.c.
7023         * Make-lang.in, optimize.c: Update.
7024
7025 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
7026
7027         Merge from tree-ssa-20020619-branch.  See
7028         ChangeLog.tree-ssa for details.
7029
7030         * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
7031         cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
7032         expr.c, init.c, name-lookup.h, optimize.c, parser.c,
7033         pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
7034         Merged.
7035         * cp-mudflap.c: New file.
7036         * cp-simplify.c:: New file.
7037
7038 2004-05-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7039
7040         PR c++/14389
7041         * decl2.c (check_classfn): For member templates, compare also the
7042         template parameters to match the declaration.
7043         * cp-tree.h: Adjust declaration of check_classfn.
7044         * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
7045         * friend.c (do_friend): Likewise.
7046         * pt.c (tsubst_friend_function): Likewise.
7047
7048 2004-05-01  Zack Weinberg  <zack@codesourcery.com>
7049
7050         * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
7051         Instead, dig into the representation type to find the array bound.
7052
7053 2004-04-30  Jason Merrill  <jason@redhat.com>
7054
7055         Refer to base members using COMPONENT_REFs where possible.
7056         * class.c (build_simple_base_path): New fn.
7057         (build_base_path): Use it for non-virtual base references.
7058         (layout_class_type): Change base fields to their real type
7059         after layout is done.
7060         * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
7061         * cp-lang.c (cxx_get_alias_set): Use it.
7062
7063 2004-04-30  Kazu Hirata  <kazu@cs.umass.edu>
7064
7065         * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
7066         comment typos.
7067
7068 2004-04-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7069
7070         PR c++/15064
7071         * parser.c (cp_parser_postfix_expression): typeid operator cannot be
7072         used in integral constant expressions.
7073
7074 2004-04-22  Mark Mitchell  <mark@codesourcery.com>
7075
7076         * init.c (build_aggr_init): Fix accidental use of C99 construct in
7077         previous change.
7078
7079         * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
7080         braced initializer.
7081         * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
7082         * decl.c (reshape_init): Use it.
7083         * init.c (perform_member_init): Remove redundant condition.
7084         (build_aggr_init): Adjust to handle brace-enclosed initializers
7085         correctly.
7086         (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
7087
7088         * parser.c (cp_parser_initializer_clause): Do not set
7089         TREE_HAS_CONSTRUCTOR on the initializer.
7090         * rtti.c (tinfo_base_init): Likewise.
7091         (generic_initializer): Likewise.
7092         (ptr_initializer): Likewise.
7093         (ptm_initializer): Likewise.
7094         (class_initializer): Likewise.
7095         (get_pseudo_ti_init): Likewise.
7096         * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
7097
7098 2004-04-22  Alan Modra  <amodra@bigpond.net.au>
7099
7100         * name-lookup.c (anonymous_namespace_name): Make static.
7101
7102 2004-04-19  Roger Sayle  <roger@eyesopen.com>
7103
7104         PR middle-end/14531
7105         * class.c (build_base_path): Call fold whilst building the NULL
7106         pointer check expression trees.
7107
7108 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
7109
7110         * init.c (build_new_1): Don't use type size argument for Java
7111         _Jv_AllocObject call.
7112
7113 2004-04-09  Danny Smith  <dannysmith@users.sourceforge.net>
7114
7115         * method.c (make_alias_for_thunk): Remove preprocessor guard on
7116         declaration and definition.
7117
7118 2004-04-08  Danny Smith  <dannysmith@users.sourceforge.net>
7119
7120         PR c++/14808
7121         * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
7122         than ASM_OUTPUT_DEF.
7123
7124 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
7125
7126         * decl2.c (mark_used): Don't segfault if cfun != NULL but
7127         current_function_decl == NULL.
7128
7129 2004-04-05  Nathan Sidwell  <nathan@codesourcery.com>
7130
7131         PR c++/3518
7132         * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
7133         level.
7134
7135 2004-04-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7136
7137         * init.c (decl_constant_value): Don't look at DECL_INITIAL
7138         of PARM_DECL.
7139         * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
7140         or TREE_SIDE_EFFECTS of a type.
7141
7142 2004-04-02  Nathan Sidwell  <nathan@codesourcery.com>
7143
7144         PR c++/14007
7145         * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
7146         cv-qualifier unification.
7147         * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
7148
7149 2004-04-02  Jan Hubicka  <jh@suse.cz>
7150
7151         * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
7152         * cp-tree.h (cp_update_decl_after_saving): Declare.
7153         * tree.c (cp_update_decl_after_saving): Define.
7154
7155 2004-04-01  Mark Mitchell  <mark@codesourcery.com>
7156
7157         PR c++/14803
7158         * typeck.c (get_delta_difference): Call fold before returning the
7159         value.
7160
7161 2004-04-01  Richard Henderson  <rth@redhat.com>
7162
7163         PR c++/14804
7164         * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
7165         * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
7166
7167 2004-04-01  Mark Mitchell  <mark@codesourcery.com>
7168
7169         PR c++/14810
7170         * name-lookup.c (maybe_push_cleanup_level): Robustify.
7171
7172 2004-04-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7173
7174         * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
7175
7176 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7177
7178         * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
7179         * class.c (check_bitfield_decl): Likewise.
7180         * cvt.c (type_promotes_to): Likewise.
7181         * decl.c (finish_enum): Likewise.
7182         * mangle.c (write_builtin_type): Likewise.
7183         * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
7184         * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
7185         (build_binary_op): Likewise.
7186
7187 2004-03-31  Jan Hubicka  <jh@suse.cz>
7188
7189         * tree.h (optimize_function): Kill prototype.
7190         * optimize.c (dump_function, optimize_function, dump_finction): Kill.
7191         * semantics.c (expand_body): Kill.
7192
7193 2004-03-30  Mark Mitchell  <mark@codesourcery.com>
7194
7195         PR c++/14724
7196         * decl.c (start_decl_1): Do not decide whether or not to create a
7197         new cleanup level until after the type has been completed.
7198
7199         PR c++/14763
7200         * pt.c (tsubst_default_argument): Clear current_function_decl.
7201
7202 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
7203
7204         * name-lookup.c, parser.c: Use new shorter form of GTY markers.
7205
7206 2004-03-29  Zack Weinberg  <zack@codesourcery.com>
7207
7208         * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
7209         is null, just print the literal name and return.
7210
7211 2004-03-25  Kazu Hirata  <kazu@cs.umass.edu>
7212
7213         * cxx-pretty-print.c: Fix comment typos.
7214
7215 2004-03-24  Kazu Hirata  <kazu@cs.umass.edu>
7216
7217         * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
7218         Update copyright.
7219
7220 2004-03-23  Ziemowit Laski  <zlaski@apple.com>
7221
7222         * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
7223         * mangle.c (write_type): Add call to 'mangle_fundamental_type'
7224         target hook.
7225
7226 2004-03-23  Zack Weinberg  <zack@codesourcery.com>
7227
7228         PR 12267, 12391, 12560, 13129, 14114, 14133
7229         * cp-lang.c (c_reset_state): Delete.
7230         (push_file_scope, pop_file_scope): New stubs.
7231         * parser.c (c_parse_file): Call sorry() here if called more than once.
7232
7233 2004-03-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7234
7235         * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
7236         for INTEGER_CST.
7237
7238 2004-03-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7239
7240         * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
7241
7242 2004-03-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7243
7244         * error.c (enum pad): Remove.
7245         (dump_qualifiers): Likewise.
7246         (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
7247         (dump_aggr_type): Likewise.
7248         (dump_type_suffix): Likewise.
7249         (dump_simple_decl): Likewise.
7250         (dump_function_decl): Likewise.
7251         (cv_to_string): Likewise.
7252         (dump_type_prefix): Likewise.  Adjust return void.
7253         * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
7254         cxx_pretty_print.h.
7255         (pp_cxx_template_keyword_if_needed): Document.
7256         (pp_cxx_qualified_id): Document case FUNCTION_DECL.  Tidy.
7257         (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
7258         MUST_NOT_THROW_EXPR.
7259
7260 2004-03-21  Mark Mitchell  <mark@codesourcery.com>
7261
7262         PR c++/14616
7263         * decl.c (cp_finish_decl): Compute the size of arrays declared in
7264         templates, if their type is non-dependent.
7265
7266 2004-03-19  Mark Mitchell  <mark@codesourcery.com>
7267
7268         * call.c (build_op_delete_call): Do not forget the placement
7269         arguments when iterating through mutiple delete operators.
7270
7271         * cp-tree.h (svaed_scope): Remove last_parms.
7272         (NEW_DELETE_OPNAME_P): New macro.
7273         (last_function_parms): Remove.
7274         (do_friend): Adjust prototype.
7275         * decl.c (grokparms): Return the PARM_DECLs directly, rather than
7276         using last_function_parms.
7277         (grokfndecl): Take the PARM_DECLs as an argument, rather than
7278         using last_function_parms.
7279         (grokdeclarator): Adjust accordingly.  Do not form METHOD_TYPEs
7280         for class-specific operator new and operator delete.
7281         (grok_op_properties): Do not look for allocation functions with
7282         METHOD_TYPEs.
7283         (start_function): Use DECL_ARGUMENTS instead of
7284         last_function_parms.
7285         * decl.h (last_function_parms): Do not declare.
7286         * decl2.c (grokclassfn): Do not use last_function_parms.
7287         * friend.c (do_friend): Remove parmdecls parameter.
7288         * name-lookup.c (push_to_top_level): Do not save last_function_parms.
7289         (pop_from_top_level): Do not restore it.
7290         * pt.c (check_explicit_specialization): Do not adjust
7291         last_function_parms.
7292
7293         * name-lookup.c (do_local_using_decl): Create a local binding for
7294         types brought in via using declarations.
7295
7296         * name-lookup.c (lookup_arg_dependent): Handle block-scope
7297         function declarations correctly.
7298
7299         * semantics.c (finish_id_expression): Correct handling of
7300         conversion operators to dependent types.
7301
7302         * typeck.c (lookup_destructor): Allow the use of destructors from
7303         base classes.
7304
7305 2004-03-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7306
7307         * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
7308         TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
7309         * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
7310         the field is named TEMPLATE_TYPE_PARM_INDEX.
7311
7312 2004-03-19  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7313
7314         PR c++/14545
7315         * parser.c (cp_parser_functional_cast): A cast to anything
7316         but integral or enumaration type is not an integral constant
7317         expression.
7318         * pt.c (value_dependent_expression_p): Handle cast expressions
7319         without operands (such as "int()").
7320
7321 2004-03-18  Mark Mitchell  <mark@codesourcery.com>
7322
7323         * semantics.c (finish_pseudo_destructor_expr): Allow differing
7324         cv-qualification between the type named by the
7325         pseudo-destructor-name and the object-type.
7326
7327         * search.c (accessible_base_p): Handle non-proper bases.
7328
7329         * name-lookup.c (do_nonmember_using_decl): If a using declaration
7330         refers to a single overloaded function, set the type of the
7331         function.
7332         * tree.c (lvalue_type): Simplify.
7333         * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
7334         unknown type.
7335         (build_unary_op): Handle OVERLOADs with known types.
7336
7337         * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
7338         function templates.
7339
7340         * parser.c (cp_parser_postfix_expression): Handle the use of
7341         "typename" in non-dependent contexts.  Convert appropriately when
7342         when using a qualified name after "->" or ".".
7343
7344         * call.c (conditional_conversion): Honor the requirement that some
7345         conversions refer to the original object.
7346
7347 2004-03-18  Mark Mitchell  <mark@codesourcery.com>
7348
7349         * call.c (build_conditional_expr): Do not call force_rvalue for
7350         operands of void_type when the conditional expression itself has
7351         void type.
7352         * name-lookup.c (pushdecl): Don't consider a declaration of a
7353         function named "main" to be an overload of a type named "main".
7354         * parser.c (cp_parser_template_name): Perform name lookup when the
7355         template name is proceeded by "template" if the qualifying scope
7356         is non-dependent.
7357         * typeck.c (composite_pointer_type_r): Correctly handle
7358         pointer-to-member types.
7359         (build_const_cast): Likewise.
7360
7361 2004-03-18  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7362
7363         * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
7364         * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
7365         (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
7366         (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
7367         (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
7368         (TYPEOF_TYPE_EXPR): New macro.
7369         * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
7370         * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
7371         * pt.c (tsubst): Likewise.
7372         * semantics.c (finish_typeof): Likewise.
7373         * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
7374         and TEMPLATE_TYPE_PARM.
7375         * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
7376         (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
7377
7378 2004-03-16  Mark Mitchell  <mark@codesourcery.com>
7379
7380         PR c++/14586
7381         * cp-tree.h (build_new_op): Change prototype.
7382         (build_x_binary_op): Likewise.
7383         * call.c (build_new_op): Add overloaded_p parameter.
7384         * decl2.c (grok_array_decl): Adjust call to build_new_op.
7385         * parser.c (cp_parser_binary_expression): Note that uses of
7386         overloaded operators prevents an expression from being considered
7387         an integral constant.
7388         * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
7389         build_x_binary_op.
7390         * semantics.c (finish_call_expr): Likewise.
7391         * typeck.c (rationalize_conditional_expr): Likewise.
7392         (build_x_indirect_ref): Likewise.
7393         (build_x_binary_op): Likewise.
7394         (build_x_unary_op): Likewise.
7395         (build_x_compound_expr): Likewise.
7396         (build_modify_expr): Likewise.
7397         * typeck2.c (build_x_arrow): Likewise.
7398
7399 2004-03-15  Kazu Hirata  <kazu@cs.umass.edu>
7400
7401         * cp-lang.c, ptree.c: Update copyright.
7402
7403 2004-03-13  Mark Mitchell  <mark@codesourcery.com>
7404
7405         PR c++/14550
7406         * parser.c (cp_parser_non_integral_constant_expression): Encode
7407         more of the idiom that surrounded calls to this function within
7408         the function itself
7409         (cp_parser_primary_expression): Adjust accordingly.
7410         (cp_parser_postfix_expression): Likewise.
7411         (cp_parser_unary_expression): Likewise.
7412         (cp_parser_cast_expression): Likewise.
7413         (cp_parser_assignment_expression): Likewise.
7414         (cp_parser_expression): Likewise.
7415         (cp_parser_new_expression): Note that new-expressions are not
7416         allowed in integral constant expressions.
7417         (cp_parser_delete_expression): Likewise.
7418
7419 2004-03-12  Matt Austern  <austern@apple.com>
7420
7421         * decl2.c (maybe_make_one_only): Look at
7422         TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
7423         to make an explicit instantiation weak.
7424         * method.c (use_thunk): Make sure we call comdat_linkage
7425         when appropriate.
7426         * pt.c (do_type_instantiation): On systems where weak symbols
7427         don't go in a static archive's TOC, explicit instantiation of a
7428         class must imply *explicit* instantiation of its memeber.
7429
7430 2004-03-11  Kazu Hirata  <kazu@cs.umass.edu>
7431
7432         * call.c, cp-tree.h, pt.c: Fix comment typos.
7433
7434 2004-03-10  Mark Mitchell  <mark@codesourcery.com>
7435
7436         PR c++/14510
7437         * decl.c (xref_tag): Disregard non-type declarations when
7438         looking up a tagged type.
7439
7440 2004-03-09  Nathan Sidwell  <nathan@codesourcery.com>
7441
7442         PR c++/14397
7443         * call.c (convert_like_real): Build a const qualified temporary,
7444         when testing ctor access.
7445
7446 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
7447
7448         * call.c (initialize_reference): Fix typo.
7449
7450 2004-03-09  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7451
7452         PR c++/14409
7453         * pt.c (determine_specialization): For member templates, match also
7454         constness.
7455
7456         PR c++/14448
7457         * parser.c (cp_parser_initializer_clause): Fold initializer if it is
7458         non-dependent.
7459         * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
7460
7461 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
7462
7463         PR c++/14230
7464         * call.c (initialize_reference): Handle initializers that are
7465         class-member access expressions applies to rvalues.
7466
7467 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
7468
7469         PR c++/14432
7470         * name-lookup.c (supplement_binding): Ignore functions that are
7471         marked DECL_ANTICIPATED.
7472
7473 2004-03-08  Mark Mitchell  <mark@codesourcery.com>
7474
7475         PR c++/14401
7476         * class.c (check_field_decls): Complain about non-static data
7477         members of reference type in unions.  Propagate
7478         CLASSTYPE_REF_FIELDS_NEED_INIT and
7479         CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
7480         data members.
7481         * init.c (perform_member_init): Complain about mbmers with const
7482         type that are not explicitly initialized.
7483
7484 2004-03-08  Mark Mitchell  <mark@codesourcery.com>
7485
7486         * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
7487         * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
7488         (lang_identifier): Remove implicit_decl and error_locus.
7489         (IDENTIFIER_IMPLICIT_DECL): Remove.
7490         (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
7491         (IDENTIFIER_ERROR_LOCUS): Likewise.
7492         (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
7493         (TYPE_ASSEMBLER_NAME_STRING): Likewise.
7494         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
7495         (implicitly_declare): Remove.
7496         * decl.c (warn_extern_redeclared_static): Remove check of
7497         IDENTIFIER_IMPLICIT_DECL.
7498         (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
7499         (implicitly_declare): Remove.
7500         (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
7501         (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
7502         (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
7503         * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
7504         in the innermost scope, rather than at namespace scope.
7505         * name-lookup.c (push_local_binding): Give it external linkage.
7506         (pushdecl): Remove dead code.
7507         * name-lookup.h (push_local_binding): Declare it.
7508         * ptree.c (cxx_print_identifier): Don't print
7509         IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
7510         * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
7511         not IDENTIFIER_ERROR_LOCUS.
7512         * typeck.c (build_function_call): Remove dead code.
7513
7514 2004-03-08  Jason Merrill  <jason@redhat.com>
7515
7516         PR c++/13170
7517         * decl.c (xref_tag): Remove attribute handling.
7518         * cp-tree.h: Adjust prototype.
7519         * decl.c, parser.c, rtti.c: Adjust callers.
7520         * parser.c (cp_parser_class_head): Pass back attributes in the
7521         class head.
7522         (cp_parser_class_specifier): Adjust.
7523
7524 2004-03-08  Matt Austern  <austern@apple.com>
7525
7526         PR debug/14079
7527         * name-lookup.c (add_decl_to_level): Add extern variables, as well
7528         as static, to static_decls array.
7529
7530 2004-03-05  Jason Merrill  <jason@redhat.com>
7531
7532         * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
7533
7534 2004-03-04  Geoffrey Keating  <geoffk@apple.com>
7535
7536         * decl.c (grokfndecl): Update old incorrect comment.
7537         (grokvardecl): Diagnose C++ variables of type with no linkage.
7538
7539 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
7540
7541         PR c++/14369
7542         * pt.c (build_non_dependent_expr): Do not create a
7543         NON_DEPENDENT_EXPR for a THROW_EXPR.
7544
7545 2004-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7546
7547         PR c++/14369
7548         * error.c (dump_expr): Handle THROW_EXPR.
7549
7550 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
7551
7552         PR c++/14360
7553         * parser.c (cp_parser_postfix_expression): Do not perform Koenig
7554         lookup if ordinary name-lookup finds a non-function.
7555         * pt.c (tsubst_copy_and_build): Likewise.
7556
7557         PR c++/14361
7558         * parser.c (cp_parser_late_parsing_default_args): Check that there
7559         are no extra tokens after the end of the default-argument
7560         expression.
7561
7562 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
7563
7564         PR c++/14324
7565         * lex.c (retrofit_lang_decl): Treat entities with no linkage as
7566         having C++ linkage for name-mangling purposes.
7567
7568         PR c++/14260
7569         * parser.c (cp_parser_direct_declarator): Recognize constructor
7570         declarators that use a template-id to name the class being
7571         constructed.
7572
7573         PR c++/14337
7574         * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
7575         (tsubst_expr): Do not call tsubst_copy, even when
7576         processing_template_decl.
7577
7578 2004-03-01  Jeff Law  <law@redhat.com>
7579
7580         * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
7581         the proper type.
7582
7583 2004-02-29  Mark Mitchell  <mark@codesourcery.com>
7584
7585         PR c++/14138
7586         * name-lookup.h (push_scope): Change prototype.
7587         * name-lookup.c (push_scope): Do not reenter the current class
7588         scope.
7589         * decl.c (grokfndecl): Check return code from push_scope before
7590         calling pop_scope.
7591         * decl2.c (check_classfn): Likewise.
7592         * parser.c (cp_parser_conversion_function_id): Likewise.
7593         (cp_parser_init_declarator): Likewise.
7594         (cp_parser_direct_declarator): Likewise.
7595         (cp_parser_class_specifier): Likewise.
7596         (cp_parser_class_head): Likewise.
7597         (cp_parser_lookup_name): Likewise.
7598         (cp_parser_constructor_declarator_p): Likewise.
7599         * pt.c (instantiate_class_template): Likewise.
7600         (resolve_typename_type): Likewise.
7601
7602 2004-02-29  Mark Mitchell  <mark@codesourcery.com>
7603
7604         PR c++/14267
7605         * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
7606         extension.
7607
7608         PR debug/12103
7609         * class.c (update_vtable_entry_for_fn): Do not go through
7610         covariance machinery if the type returned by an overrider is the
7611         same as the original.
7612
7613 2004-02-29  Kazu Hirata  <kazu@cs.umass.edu>
7614
7615         * call.c: Fix a comment typo.
7616
7617 2004-02-27  Ziemowit Laski  <zlaski@apple.com>
7618
7619         * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
7620
7621 2004-02-26  Mark Mitchell  <mark@codesourcery.com>
7622
7623         PR c++/14278
7624         * parser.c (cp_parser_parameter_declaration_list): Commit
7625         to fewer tentative parses.
7626
7627 2004-02-26  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7628
7629         PR c++/14284
7630         * pt.c (dependent_type_p_r): A template template parameter is a
7631         dependent type.
7632
7633 2004-02-26  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7634
7635         PR c++/14246
7636         * mangle.c (write_template_arg_literal): Don't rely on identity for
7637         boolean constants.
7638
7639 2004-02-24  Jason Merrill  <jason@redhat.com>
7640
7641         * tree.c (build_exception_variant): Use check_qualified_type.
7642
7643 2004-02-23  Zack Weinberg  <zack@codesourcery.com>
7644             Kazu Hirata  <kazu@cs.umass.edu>
7645
7646         * decl.c (cxx_init_decl_processing): Don't check
7647         flag_writable_strings.
7648
7649 2004-02-23  Andrew Pinski  <pinskia@physics.uc.edu>
7650
7651         PR c++/14156
7652         * typeck.c (maybe_warn_about_returning_address_of_location):
7653         Change check for VAR_DECL to use DECL_P instead.
7654
7655 2004-02-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7656
7657         PR c++/14250
7658         * cvt.c (build_expr_type_conversion): Type must be complete before
7659         looking up for conversions.
7660
7661 2004-02-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7662
7663         PR c++/14143
7664         * name-lookup.c (arg_assoc_class): Don't look into template
7665         arguments if it is not a primary template.
7666
7667 2004-02-20  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
7668
7669         PR c++/12007
7670         * method.c (use_thunk): Always clone function argument tree.
7671
7672 2004-02-20  Mark Mitchell  <mark@codesourcery.com>
7673
7674         PR c++/14199
7675         * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
7676
7677         PR c++/14173
7678         * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
7679         for all type variants.
7680
7681 2004-02-19  Mark Mitchell  <mark@codesourcery.com>
7682
7683         PR c++/13927
7684         * decl.c (duplicate_decls): Return error_mark_node for invalid
7685         redeclarations.
7686         * name-lookup.c (push_namespace): Ignore the return value from
7687         pushdecl.
7688         * pt.c (push_template_decl_real): Robustify.
7689
7690         PR c++/14186
7691         * name-lookup.c (push_class_level_binding): Do not complain about
7692         adding a binding for a member whose name is the same as the
7693         enclosing class if the member is located in a base class of the
7694         current class.
7695
7696 2004-02-19  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7697
7698         PR c++/14181
7699         * parser.c (cp_parser_new_expression): Parse an ill-formed
7700         direct-new-declarator after a parenthesized type-id to emit good
7701         diagnostic.
7702
7703 2004-02-18  Kazu Hirata  <kazu@cs.umass.edu>
7704
7705         * cp-tree.def, cvt.c: Update copyright.
7706
7707 2004-02-17  Mark Mitchell  <mark@codesourcery.com>
7708
7709         PR c++/11326
7710         * cp-tree.h (abi_version_at_least): Remove.
7711         * mangle.c: Include flags.h.
7712
7713 2004-02-15  Mark Mitchell  <mark@codesourcery.com>
7714
7715         PR c++/13971
7716         * call.c (build_conditional_expr): Handle conversions between
7717         class types which result in differently cv-qualified type
7718         variants.
7719
7720         PR c++/14086
7721         * class.c (delete_duplicate_fields_1): Remove.
7722         (delete_duplicate_fields): Likewise.
7723         (finish_struct_anon): Remove check for members with the same name
7724         as their enclosing class.
7725         (check_field_decls): Do not call duplicate_fields.
7726         * decl.c (grokdeclarator): Remove check for static data members
7727         with the same name as their enclosing class.
7728         * name-lookup.c (push_class_level_binding): Check for members with
7729         the same name as their enclosing class.
7730
7731 2004-02-15  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7732
7733         PR c++/14085
7734         * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
7735
7736 2004-02-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7737
7738         PR c++/13635
7739         * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
7740         has full set of arguments.
7741
7742 2004-02-13  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7743
7744         PR c++/13927
7745         * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
7746
7747 2004-02-13  Mark Mitchell  <mark@codesourcery.com>
7748
7749         PR c++/14122
7750         * cp-tree.h (delete_sanity): Change prototype.
7751         * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
7752         Remove dead code.  Adjust code to warn about deleting an array.
7753         * typekc.c (decay_conversion): Use build_address and build_nop.
7754
7755         PR c++/14108
7756         * search.c (accessible_p): Do not check access in thunks.
7757
7758         PR c++/14083
7759         * call.c (build_conditional_expr): Call force_rvalue on the
7760         non-void operand in the case that one result is a throw-expression
7761         and the other is not.
7762
7763 2004-02-13  Ian Lance Taylor  <ian@wasabisystems.com>
7764
7765         PR c++/9851
7766         * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
7767         the type name and look ahead for ::~, and bail out early with a
7768         better error message if the parse is going to fail.
7769
7770 2004-02-12  Mark Mitchell  <mark@codesourcery.com>
7771
7772         * call.c (conversion_kind): New type.
7773         (conversion_rank): Likewise.
7774         (conversion): Likewise.
7775         (CONVERSION_RANK): New macro.
7776         (conversion_obstack): New variable.
7777         (obstack_initialized): Likewise.
7778         (z_candidate): Change type of convs and second_conv.
7779         (candidate_warning): New type.
7780         (IDENTITY_RANK): Remove.
7781         (EXACT_RANK): Likewise.
7782         (PROMO_RANK): Likewise.
7783         (STD_RANK): Likewise.
7784         (PBOOL_RANK): Likewise.
7785         (USER_RANK): Likewise.
7786         (ELLIPSIS_RANK): Likewise.
7787         (BAD_RANK): Likewise.
7788         (ICS_RANK): Likewise.
7789         (ICS_STD_RANK): Likewise.
7790         (ICS_USER_FLAG): Likewise.
7791         (ICS_ELLIPSIS_FLAG): Likewise.
7792         (ICS_THIS_FLAG): Likewise.
7793         (ICS_BAD_FLAG): Likewise.
7794         (NEED_TEMPORARY_P): Likewise.
7795         (CHECK_COPY_CONSTRUCTOR_P): Likewise.
7796         (USER_CONV_CAND): Likewise.
7797         (USER_CONV_FN): Likewise.
7798         (conversion_obstack_alloc): New function.
7799         (alloc_conversion): Likewise.
7800         (validate_conversion_obstack): Likewise.
7801         (alloc_conversions): Likewise.
7802         (build_conv): Adjust to deal with new conversion data structures.
7803         (build_identity_conv): New function.
7804         (build_ambiguous_conv): Likewise.
7805         (standard_conversion): Adjust to deal with new conversion data
7806         structures.
7807         (convert_class_to_reference): Likewise.
7808         (direct_reference_binding): Likewise.
7809         (reference_binding): Likewise.
7810         (implicit_conversion): Likewise.
7811         (add_candidate): Likewise.
7812         (add_function_candidate): Likewise.
7813         (add_conv_candidate): Likewise.
7814         (build_builtin_candidate): Likewise.
7815         (print_z_candidate): Likewise.
7816         (merge_conversion_sequences): Likewise.
7817         (build_user_type_conversion_1): Likewise.
7818         (build_user_type_conversion): Likewise.
7819         (build_new_function_call): Likewise.
7820         (build_object_call): Likewise.
7821         (conditional_conversion): Likewise.
7822         (build_conditional_expr): Likewise.
7823         (build_new_op): Likewise.
7824         (build_op_delete_call): Likewise.
7825         (convert_like_real): Likewise.
7826         (build_over_call): Likewise.
7827         (build_new_method_call): Likewise.
7828         (is_subseq): Likewise.
7829         (maybe_handle_implicit_object): Likewise.
7830         (maybe_handle_ref_bind): Likewise.
7831         (compare_ics): Likewise.
7832         (source_type): Likewise.
7833         (add_warning): Likewise.
7834         (joust): Likewise.
7835         (can_convert_arg): Likewise.
7836         (can_convert_arg_bad): Likewise.
7837         (perform_implicit_conversion): Likewise.
7838         (perform_direct_initialization_if_possible): Likewise.
7839         (initialize_reference): Likewise.
7840         * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
7841         * cp-tree.def (WRAPPER): Likewise.
7842         (IDENTITY_CONV): Remove.
7843         (LVALUE_CONV): Likewise.
7844         (QUAL_CONV): Likewise.
7845         (STD_CONV): Likewise.
7846         (PTR_CONV): Likewise.
7847         (PMEM_CONV): Likewise.
7848         (BASE_CONV): Likewise.
7849         (REF_BIND): Likewise.
7850         (USER_CONV): Likewise.
7851         (AMBIG_CONV): Likewise.
7852         (RVALUE_CONV): Likewise.
7853         * cp-tree.h (tree_wrapper): Remove.
7854         (WRAPPER_ZC): Remove.
7855         (lang_tree_node): Remove wrapper.
7856         (LOOKUP_SPECULATIVELY): Remove.
7857         (build_op_delete_call): Adjust prototype.
7858         (validate_conversion_obstack): Declare.
7859         (build_zc_wrapper): Remove.
7860         * cvt.c (convert_to_reference): Remove dead code.
7861         (ocp_convert): Likewise.
7862         * decl.c (redeclaration_error_message): Correct handling of
7863         templates.
7864         (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
7865         (cp_tree_node_structure): Remove WRAPPER case.
7866         * decl2.c (finish_file): Call validate_conversion_obstack.
7867         * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
7868         (build_op_delete_call): Likewise.
7869         (build_x_delete): Likewise.
7870         (build_delete): Adjust call to build_op_delete_call.
7871         * pt.c (tsubst_friend_declaration): Adjust code to determine
7872         whether or not a friend template is a definition.
7873         (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
7874         * tree.c (build_zc_wrapper): Remove.
7875
7876 2004-02-12  Zack Weinberg  <zack@codesourcery.com>
7877
7878         * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
7879         * cp-tree.h: Don't declare cxx_builtin_type_decls.
7880         * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
7881         (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
7882
7883 2004-02-10  Mark Mitchell  <mark@codesourcery.com>
7884
7885         * typeck.c (lookup_destructor): Fix typo in error message.
7886
7887 2004-02-09  Kazu Hirata  <kazu@cs.umass.edu>
7888
7889         * call.c, parser.c, tree.c: Fix comment typos.
7890
7891 2004-02-07  Zack Weinberg  <zack@codesourcery.com>
7892
7893         Bug 13856
7894         * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
7895         * decl.c (duplicate_decls, start_function): Likewise.
7896
7897 2004-02-07  Zack Weinberg  <zack@codesourcery.com>
7898
7899         * name-lookup.c (pushdecl): Issue shadow warnings directly.
7900         * parser.c (free_parser_stacks): Delete.
7901
7902 2004-02-07  Kazu Hirata  <kazu@cs.umass.edu>
7903
7904         * rtti.c: Update copyright.
7905
7906 2004-02-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7907
7908         PR c++/14033
7909         * decl.c (require_complete_types_for_parms): Do not insert
7910         error_mark_node in the parameter list.
7911
7912 2004-02-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7913
7914         PR c++/14028
7915         * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
7916         error when terminator can not be found.
7917
7918 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
7919
7920         Make-lang.in (po-generated):  Delete.
7921
7922 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
7923
7924         * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
7925         targetm.calls.promote_prototypes.
7926
7927 2004-02-05  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
7928
7929         PR middle-end/13750
7930         Revert:
7931         2004-01-15  Geoffrey Keating  <geoffk@apple.com>
7932         PR pch/13361
7933         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
7934         (handle_pragma_implementation): Likewise.
7935
7936 2004-02-05  Mark Mitchell  <mark@codesourcery.com>
7937
7938         PR c++/13714
7939         * typeck.c (lookup_destructor): Tweak error message.
7940
7941 2004-02-05  Jan Hubicka  <jh@suse.cz>
7942
7943         * tree.c (cp_cannot_inline_tree_fn):  Allow inlining of comdat
7944         functions.
7945
7946 2004-02-05  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7947
7948         PR c++/14008
7949         * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
7950         code, only emits the diagnostic now. Added lookup of the identifier
7951         and support for qualified ids.
7952         (cp_parser_parse_and_diagnose_invalid_type_name): New function.
7953         Parse an (invalid) type name as id-expression within a declarator.
7954         (cp_parser_simple_declaration): Use it.
7955         (cp_parser_member_declaration): Likewise.
7956         (cp_parser_make_typename_type): New function. Handle errors through
7957         cp_parser_diagnose_invalid_typename.
7958         (cp_parser_elaborated_type_specifier): Use it.
7959
7960 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
7961
7962         PR c++/13932
7963         * call.c (convert_like_real): Use "converting" rather than
7964         "argument" as the descriptive keyword to
7965         dubious_conversion_warnings.
7966         * typeck.c (convert_for_assignment): Do not call
7967         dubious_conversion_warnings.
7968
7969 2004-02-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7970
7971         PR c++/13086
7972         * init.c (build_delete): Emit a more informative error message in
7973         case of an incomplete type, and on the correct source line.
7974
7975 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
7976
7977         * error.c, search.c: Update copyright.
7978
7979 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
7980
7981         PR c++/9941
7982         * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
7983         linkage for the typeinfo name string.
7984
7985 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
7986
7987         PR c++/13969
7988         * cp-tree.h (fold_non_dependent_expr): New function.
7989         * parser.c (cp_parser_fold_non_dependent_expr): Remove.
7990         (cp_parser_template_argument): Use fold_non_dependent_expr.
7991         (cp_parser_direct_declarator): Likewise.
7992         * pt.c (fold_non_dependent_expr): New function.
7993         (convert_nontype_argument): Use it.
7994         (tsubst_qualified_id): Simplify.
7995         (tsubst_copy_and_build): Likewise.
7996
7997 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
7998
7999         * decl.c (cxx_push_function_context): Do not set
8000         current_function_is_thunk.
8001         * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
8002         actual function.
8003
8004 2004-02-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
8005
8006         PR c++/13997
8007         * pt.c (more_specialized_class): Increase processing_template_decl
8008         while partial ordering.
8009
8010 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
8011
8012         PR c++/13925
8013         * decl.c (start_function): Do not call pushdecl for any
8014         instantiation or specialization of a primary template.
8015
8016 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
8017
8018         PR c++/13950
8019         * parser.c (cp_parser_class_name): Robustify.
8020
8021         PR c++/13970
8022         * parser.c (cp_parser_cache_group): Do not consume the EOF token.
8023
8024         PR c++/14002
8025         * semantics.c (finish_id_expression): Do not return an
8026         IDENTIFIER_NODE when lookup finds a PARM_DECL.
8027
8028 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
8029
8030         PR c++/13978
8031         * pt.c (build_non_dependent_expr): Do not build
8032         NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
8033
8034         PR c++/13968
8035         * semantics.c (finish_id_expression): Do not return an
8036         IDENTIFIER_NODE when lookup finds a VAR_DECL.
8037
8038         PR c++/13975
8039         * parser.c (cp_parser_simple_declaration): When skipping to the
8040         end of the statement swallow the terminating semicolon.
8041
8042 2004-02-02  Mark Mitchell  <mark@codesourcery.com>
8043
8044         PR c++/13113
8045         * init.c (build_offset_ref): Improve error recovery for invalid
8046         uses of non-static member functions.
8047
8048         PR c++/13854
8049         * cp-tree.h (cp_build_type_attribute_variant): New function.
8050         * class.c (build_clone): Use cp_build_type_attribute_variant.
8051         * decl.c (duplicate_decls): Likewise.
8052         * pt.c (copy_default_args_to_explicit_spec): Likewise.
8053         (tsubst_function_type): Likewise.
8054         * tree.c (build_exception_variant): Check attributes before
8055         concluding that two types are the same.
8056         (cp_build_type-attribute_variant): New method.
8057         * typeck.c (merge_types): Use cp_build_type_attribute_variant.
8058
8059         PR c++/13907
8060         * call.c (convert_class_to_reference): Keep better track of
8061         pedantically invalid user-defined conversions.
8062
8063 2004-02-01  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
8064
8065         PR c++/13957
8066         * pt.c (tsubst_qualified_id): Improved error message when a type
8067         is expected but not found.
8068
8069 2004-01-31  Kazu Hirata  <kazu@cs.umass.edu>
8070
8071         * class.c: Fix comment typos.
8072         * decl.c: Likewise.
8073         * error.c: Likewise.
8074         * parser.c: Likewise.
8075         * pt.c: Likewise.
8076         * search.c: Likewise.
8077         * typeck.c: Likewise.
8078
8079 2004-01-30  Richard Henderson  <rth@redhat.com>
8080
8081         PR c++/13693
8082         * method.c (use_thunk): Don't force_target_expr for void thunks.
8083         * tree.c (build_target_expr_with_type): Assert non-void type.
8084         (force_target_expr): Likewise.
8085
8086 2004-01-30  Michael Matz  <matz@suse.de>
8087
8088         * parser.c (cp_parser_labeled_statement): Accept case ranges.
8089
8090 2004-01-30  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
8091
8092         DR206
8093         PR c++/13813
8094         * decl.c (grokdeclarator): Check immediatly type completeness for
8095         non-dependent types.
8096
8097 2004-01-30  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
8098
8099         PR c++/13683
8100         * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
8101         a sizeof expression.block
8102
8103 2004-01-29  Mark Mitchell  <mark@codesourcery.com>
8104
8105         PR c++/13883
8106         * mangle.c (write_encoding): Correct encoding of member template
8107         constructors.
8108
8109 2004-01-28  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
8110
8111         * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
8112         template name as it was `<::' (digraph typo).
8113         (cp_parser_nth_token_starts_template_argument_list_p): New function.
8114         (cp_parser_id_expression): Use it.
8115         (cp_parser_nested_name_specifier_opt): Likewise.
8116         (cp_parser_template_name): Likewise.
8117         (cp_parser_class_name): Likewise.
8118         (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
8119
8120 2004-01-28  Mark Mitchell  <mark@codesourcery.com>
8121
8122         PR c++/13791
8123         * typeck.c (merge_types): Do not merge attributes into
8124         TYPENAME_TYPEs.
8125
8126         PR c++/13736
8127         * parser.c (cp_parser_direct_declarator): Do not prevent
8128         backtracking inside a parenthesized declarator.
8129         (cp_parser_parameter_declaration): Fix typo in comment.
8130
8131 2004-01-28  Jan Hubicka  <jh@suse.cz>
8132
8133         * semantics.c (expand_body)  Do emit_associated_thunks before
8134         expansion.
8135
8136 2004-01-27  Devang Patel  <dpatel@apple.com>
8137
8138         * name-lookup.c: Include "debug.h"
8139         (do_namespace_alias): Invoke debug_hooks to emit debug info
8140         for namespace alias.
8141         (do_local_using_decl): Invoke debug_hooks to emit debug info
8142         for using decl.
8143         (do_class_using_decl): Same.
8144         (do_toplevel_using_decl): Same.
8145         (do_using_directive): Same.
8146         (cp_emit_debug_info_for_using): New function.
8147         * Make-lang.in (cp/parser.o): Depend on debug.h
8148         (cp/name-lookup.o): Same.
8149
8150 2004-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8151
8152         * cp-tree.h (language_function, lang_type_header): Use
8153         BOOL_BITFIELD.
8154         * name-lookup.h (cp_binding_level): Likewise.
8155
8156 2004-01-26  Mark Mitchell  <mark@codesourcery.com>
8157
8158         PR c++/13663
8159         * semantics.c (finish_for_expr): Check for unresolved overloaded
8160         functions.
8161
8162         * class.c (add_method): Just check processing_template_decl to
8163         determine whether or not we are within a template.
8164         * decl2.c (maybe_retrofit_in_chrg): Likewise.
8165         * init.c (decl_constant_value): Check the type of the declaration,
8166         not TREE_READONLY.
8167         * name-lookup.c (maybe_push_to_top_level): Rename to ...
8168         (push_to_top_level): ... this.
8169         * name-lookup.h (maybe_push_to_top_level): Do not declare it.
8170         * pt.c (push_template_decl_real): Reorder condition for speed.
8171         (convert_template_argument): Use dependency-checking functions in
8172         place of uses_template_parms.
8173         (lookup_template_class): Avoid calling uses_template_parms more
8174         than once.
8175         (uses_template_parms): Reimplement, using dependency-checking
8176         functions.
8177         (instantiate_class_template): Use push_to_top_level, not
8178         maybe_push_to_top_level.
8179         (type_unification_real): Simplify.
8180         (type_dependent_expression_p): Handle OFFSET_REFs and
8181         TEMPLATE_DECLs.
8182         (any_dependent_template_arguments_p): Handle multiple levels of
8183         template argument.
8184         * semantics.c (expand_or_defer_fn): Do not check
8185         uses_template_parms for template instantiations.
8186         * typeck.c (comptypes): Avoid calling cp_type_quals.
8187
8188 2004-01-25  Mark Mitchell  <mark@codesourcery.com>
8189
8190         PR c++/13833
8191         * call.c (build_over_call): Do not convert arguments when
8192         processing a template.
8193         * pt.c (build_non_dependent_expr): Do not build a
8194         NON_DEPENDENT_EXPR for arithmetic constants.
8195
8196 2004-01-25  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
8197
8198         PR c++/13810
8199         * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
8200         returns a TYPE_DECL. no further lookup is required.
8201         * semantics.c (check_template_template_default_arg): A TYPE_DECL
8202         is invalid. Rework to give better diagnostics.
8203
8204 2004-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8205
8206         PR c++/13797
8207         * pt.c (instantiate_class_template): Add an error_mark_node
8208         check.
8209         (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
8210
8211 2004-01-23  Andrew Pinski  <pinskia@physics.uc.edu>
8212
8213         PR c++/13701
8214         * decl.c (finish_function): Move the call to
8215         finish_fname_decls below the call to
8216         finish_eh_spec_block.
8217
8218 2004-01-21  Kazu Hirata  <kazu@cs.umass.edu>
8219
8220         * optimize.c, typeck2.c: Update copyright.
8221
8222 2004-01-21  Kazu Hirata  <kazu@cs.umass.edu>
8223
8224         * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
8225         init.c, mangle.c, typeck.c: Update copyright.
8226
8227 2004-01-21  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
8228
8229         * parser.c (cp_parser_class_specifier): Prevent garbage collection.
8230
8231 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
8232
8233         * Make-lang.in: Replace $(docdir) with doc.
8234         (c++.info, c++.srcinfo): Dummy entry.
8235         (c++.man, c++.srcman): New rules.
8236         (c++.install-man): Revamp rule.
8237
8238 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
8239
8240         * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
8241         CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
8242         immediate $(shell) instead of deferred backquote.
8243
8244 2004-01-19  Mark Mitchell  <mark@codesourcery.com>
8245
8246         PR c++/13651
8247         * parser.c (cp_parser_postfix_expression): When encountering
8248         incomplete type on left-hand side of "->" or ".", treat the entire
8249         expression as erroneous.
8250
8251         PR c++/13592
8252         * call.c (build_field_call): Remove.
8253         (n_build_method_call): Likewise.
8254         (build_method_call): Likewise.
8255         (build_new_method_call): Do not call build_field_call.
8256         * class.c (n_build_method_call): Remove.
8257         (print_class_statistics): Do not print it.
8258         * cp-tree.h (build_method_call): Remove declaration.
8259         (finish_object_call_expr): Likewise.
8260         (build_new_1): Do not use build_method_call.
8261         * parser.c (cp_parser_postfix_expression): Use finish_call_expr
8262         when the function appearing on the right-hand-side of "." or "->"
8263         is not actually a function.
8264         * pt.c (tsubst_copy_and_build): Likewise.
8265         * semantics.c (finish_object_call_expr): Remove.
8266
8267 2004-01-18  Mark Mitchell  <mark@codesourcery.com>
8268
8269         PR c++/13710
8270         * pt.c (tsubst): Use finish_typeof.
8271
8272 2004-01-18  Jason Merrill  <jason@redhat.com>
8273
8274         PR c++/11725
8275         * except.c (build_throw): In a template, set
8276         current_function_returns_abnormally.
8277
8278 2004-01-17  Fred Fish  <fnf@intrinsity.com>
8279
8280         PR c++/11895
8281         * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
8282         except don't call array_type_nelts() with a VECTOR_TYPE.
8283
8284 2004-01-16  Jan Hubicka  <jh@suse.cz>
8285
8286         * mangle.c (write_mangled_name): Remove inline modifier.
8287
8288 2004-01-16  Mark Mitchell  <mark@codesourcery.com>
8289
8290         PR c++/13574
8291         * decl.c (compute_array_index_type): Fix grammar in comment.
8292         * init.c (build_zero_init): Handle zero-sized arrays correctly.
8293
8294         PR c++/13178
8295         * call.c (name_as_c_string): Print conversion operator names
8296         correctly.
8297
8298         PR c++/13478
8299         * call.c (initialize_reference): Pass -1 for inner parameter to
8300         convert_like_real.
8301
8302 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
8303
8304         PR c++/13407
8305         * parser.c (cp_parser_base_specifier): Check for an invalid
8306         keyword `typename' and emit an user-friendly error message.
8307
8308 2004-01-15  Geoffrey Keating  <geoffk@apple.com>
8309
8310         PR pch/13361
8311         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
8312         (handle_pragma_implementation): Likewise.
8313
8314 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
8315
8316         PR c++/9259
8317         * typeck.c (build_class_member_access_expr): Allow to access members
8318         of the currently open class.
8319         (finish_class_member_access_expr): Likewise.
8320
8321 2004-01-15  Alexandre Oliva  <aoliva@redhat.com>
8322
8323         PR c++/13659
8324         * name-lookup.c (validate_nonmember_using_decl): Take scope and
8325         name by value, instead of computing them.
8326         (do_local_using_decl, do_toplevel_using_decl): Add scope and name
8327         arguments.  Pass them to validate_nonmember_using_decl.
8328         * name-lookup.h (do_local_using_decl): Adjust.
8329         (do_toplevel_using_decl): Likewise.
8330         * parser.c (cp_parser_using_declaration): Likewise.
8331         * pt.c (tsubst_expr): Likewise.
8332
8333 2004-01-15  Alexandre Oliva  <aoliva@redhat.com>
8334
8335         PR c++/13594
8336         PR c++/13658
8337         * name-lookup.c (qualified_lookup_using_namespace): Search
8338         strongly-associated namespaces first, and only then try other
8339         namespaces.
8340
8341 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
8342
8343         * Make-lang.in (c++.srcextra): Dummy entry.
8344
8345 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
8346
8347         PR c++/8856
8348         * parser.c (cp_parser_template_name): Don't try to parse a
8349         conversion-function-id, as it cannot be a template-name.
8350         (cp_parser_simple_type_specifier): Check for invalid template-ids
8351         even after a built-in type.
8352
8353 2004-01-14  Jan Hubicka  <jh@suse.cz>
8354
8355         PR c++/12850
8356         * pt.c (instantiate_decl):  Do not increase function_depth.
8357
8358 2004-01-14  Danny Smith  <dannysmith@users,sourceforge.net>
8359
8360         PR c++/9021
8361         PR c++/11005
8362         * parser.c (cp_parser_elaborated_type_specifier): Warn about
8363         attributes and discard.
8364         * decl.c (xref_tag): Don't overwite existing attributes with
8365         NULL_TREE.
8366
8367 2004-01-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
8368
8369         PR c++/12335
8370         * parser.c (cp_parser_lookup_name): Return error_mark_node if there
8371         is no destructor while looking up a BIT_NOT_EXPR.
8372
8373 2004-01-13  Ian Lance Taylor  <ian@wasabisystems.com>
8374
8375         * cxxfilt.c: Remove unused file.
8376
8377 2004-01-14  Jan Hubicka  <jh@suse.cz>
8378
8379         Partial fix to PR c++/12850
8380         * decl2.c (mark_used): Do not proactively instantiate templates
8381         when compiling in unit-at-a-time or not optimizing.
8382         * optimize.c (maybe_clone_body): Do not increase function depth.
8383
8384 2004-01-13  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
8385
8386         PR c++/13474
8387         * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
8388
8389 2004-01-12  Steven Bosscher  <stevenb@suse.de>
8390
8391         PR c++/13558
8392         * parser.c (cp_parser_member_declaration): Any non-type is also
8393         not a class or a function.
8394
8395 2004-01-12  Jason Merrill  <jason@redhat.com>
8396
8397         PR c++/12815
8398         * class.c (build_base_path): Do not mark vtable references as
8399         TREE_CONSTANT.
8400         (build_vtbl_ref_1): Likewise.
8401
8402 2004-01-12  Richard Henderson  <rth@redhat.com>
8403
8404         PR opt/10776
8405         * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
8406         (store_init_value): Use it.
8407         * decl.c (check_initializer): Expect full initialization code
8408         from store_init_value.
8409         * init.c (expand_aggr_init_1): Likewise.
8410         * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
8411
8412 2004-01-12  Mark Mitchell  <mark@codesourcery.com>
8413
8414         * class.c (layout_class_type): For non-POD class types, also copy
8415         the DECL_SIZE and DECL_MODE of fields to the base class type.
8416
8417 2004-01-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8418
8419         PR c++/13289
8420         * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
8421         calling regenerate_decl_from_template.
8422
8423 2004-01-12  Scott Brumbaugh  <scottb.lists@verizon.net>
8424
8425         PR c++/4100
8426         * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
8427         decl-specifier occurring along with a class definition.
8428
8429 2004-01-12  Ian Lance Taylor  <ian@wasabisystems.com>
8430
8431         * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
8432         clauses to comments describing declares_class_or_enum.
8433         (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
8434         false.
8435
8436 2004-01-12  Jan Hubicka  <jh@suse.cz>
8437
8438         * pt.c (for_each_template_parm): Do not check for duplicates.
8439         (for_each_template_parm): Use walk_tree duplicate checking code.
8440
8441 2004-01-11  Ian Lance Taylor  <ian@wasabisystems.com>
8442
8443         PR c++/3478
8444         * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
8445         is error_mark_node, don't add any more decl_specs.
8446         (cp_parser_init_declarator): After committing to a declaration, if
8447         the decl_specifiers start with error_mark_node, issue an error and
8448         change the type to "int".
8449
8450 2004-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
8451
8452         PR bootstrap/7817
8453         * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
8454
8455 2004-01-10  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
8456
8457         DR 337
8458         PR c++/9256
8459         * pt.c (tsubst): Substitution must fail if we are attempting to
8460         create an array with element type that is an abstract class type.
8461         * decl.c (cp_finish_decl): Strip pointers and array types recursively
8462         before calling abstract_virtuals_error.
8463
8464 2004-01-09  Alexandre Oliva  <aoliva@redhat.com>
8465
8466         * name-lookup.c (qualified_lookup_using_namespace): Consider
8467         strong using directives even if we've already found a binding.
8468
8469 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
8470
8471         * cp-tree.h (cxx_expand_expr): Change prototype.
8472         * expr.c (cxx_expand_expr): Add alt_rtl parameter.
8473
8474 2004-01-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
8475
8476         PR c++/12573
8477         * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
8478         looking into them recursively. They can be there because of the
8479         new __offsetof__ extension.
8480
8481 2004-01-07  Zack Weinberg  <zack@codesourcery.com>
8482
8483         * parser.c (cp_parser_save_member_function_body): Mark the
8484         definition static.
8485
8486 2004-01-05  Mark Mitchell  <mark@codesourcery.com>
8487
8488         PR c++/13057
8489         * class.c (build_clone): Copy type attributes from the original
8490         function to the clone.
8491
8492         PR c++/12815
8493         * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
8494         references as constant.
8495
8496         PR c++/12132
8497         * parser.c (cp_parser_explicit_instantiation): Improve error
8498         recovery.
8499         (cp_parser_require): Improve indication of the error location.
8500
8501         PR c++/13451
8502         * parser.c (cp_parser_class_head): Reorder logic to check for
8503         invalid qualification.
8504
8505 2004-01-04  Mark Mitchell  <mark@codesourcery.com>
8506
8507         PR c++/13157
8508         * name-lookup.c (lookup_using_namespace): Remove spacesp
8509         parameter.
8510         (unqualified_namespace_lookup): Likewise.
8511         (lookup_qualified_name): Adjust accordingly.
8512         (lookup_name_real): Likewise.
8513         (lookup_arg_dependent): Do not eliminate the namespace of the
8514         functions found by unqualified name lookup unless that is the
8515         current namespace.
8516
8517 2004-01-04  Andrew Pinski  <pinskia@physics.uc.edu>
8518
8519         * semantics.c (push_deferring_access_checks): Fix format.
8520         (resume_deferring_access_checks): Likewise.
8521         (stop_deferring_access_checks): Likewise.
8522         (pop_deferring_access_checks): Likewise.
8523         (get_deferred_access_checks): Likewise.
8524         (pop_to_parent_deferring_access_checks): Likewise.
8525         (perform_deferred_access_checks): Likewise.
8526         (perform_or_defer_access_check): Likewise.
8527
8528 2004-01-04  Richard Henderson  <rth@redhat.com>
8529
8530         * call.c (build_over_call): Don't create a save_expr of an
8531         aggregate, but rather its address.
8532
8533 2004-01-04  Mark Mitchell  <mark@codesourcery.com>
8534
8535         PR c++/13529
8536         * parser.c (cp_parser_postfix_expression): Allow "." to appear in
8537         an offsetof expression.
8538
8539         * parser.c (cp_parser_parameter_declaration): Fix comment.
8540
8541         PR c++/12226
8542         * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
8543         (reference_binding): Set it when appropriate.
8544         (build_temp): New function, split out from ...
8545         (convert_like_real): ... here.  Honor CHECK_COPY_CONSTRUCTOR_P.
8546         (initialize_reference): Likewise.
8547
8548         PR c++/13536
8549         * parser.c (cp_parser): Add in_type_id_in_expr_p.
8550         (cp_parser_new): Initialize it.
8551         (cp_parser_postfix_expression): Set it.
8552         (cp_parser_sizeof_operand): Likewise.
8553         (cp_parser_parameteR_declaration): Do not commit early to tenative
8554         parsers when in_type_id_in_expr_p is set.
8555
8556 2004-01-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8557
8558         PR c++/13094
8559         * parser.c (cp_parser_template_argument): Don't call
8560         make_unbound_class_template directly.
8561         (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
8562         UNBOUND_CLASS_TEMPLATE tree node.
8563
8564 2004-01-02  Richard Sandiford  <rsandifo@redhat.com>
8565
8566         PR target/12729
8567         * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
8568
8569 2004-01-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8570
8571         PR c++/13520
8572         * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
8573         (DECL_FUNCTION_TEMPLATE_P): Use it.
8574         (DECL_CLASS_TEMPLATE_P): Likewise.
8575         * parser.c (cp_parser_lookup_name): Add is_template parameter.
8576         (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
8577         (cp_parser_template_name): Likewise.
8578         (cp_parser_elaborated_type_specifier): Likewise.
8579         (cp_parser_namespace_name): Likewise.
8580         (cp_parser_class_name): Likewise.
8581         (cp_parser_lookup_name_simple): Likewise.
8582
8583 See ChangeLog.3 for earlier changes.