afd820fb222444e670cf93a18f474dcd40db5452
[gcc.git] / gcc / cp / ChangeLog
1 2004-08-27 Richard Henderson <rth@redhat.com>
2
3 * cp-tree.def (OFFSETOF_EXPR): New.
4 * parser.c (cp_parser_builtin_offsetof): Either built an
5 OFFSETOF_EXPR, or call fold_offsetof immediately.
6 * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
7
8 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
9
10 * call.c (validate_conversion_obstack): Replace
11 my_friendly_assert with gcc_assert or gcc_unreachable.
12 (direct_reference_binding, merge_conversion_sequences,
13 build_user_type_conversion_1, perform_overload_resolution,
14 build_op_delete_call, enforce_access, call_builtin_trap,
15 build_over_call, build_special_member_call, build_new_method_call,
16 initialize_reference): Likewise.
17 * class.c (build_base_path, build_primary_vtable, alter_access,
18 check_bases, update_vtable_entry_for_fn, layout_empty_base,
19 clone_function_decl, adjust_clone_args,
20 type_requires_array_cookie, include_empty_classes,
21 finish_struct_1, resolve_address_of_overloaded_function,
22 instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
23 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
24 accumulate_vtbl_inits, build_vtbl_initializer,
25 build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
26 * cvt.c (build_up_reference, convert_to_reference): Likewise.
27 * decl.c (poplevel, duplicate_decls, make_typename_type,
28 cxx_init_decl_processing, reshape_init, check_initializer,
29 make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
30 expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
31 grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
32 xref_basetypes, start_preparsed_function, save_function_data,
33 finish_function, finish_method, maybe_register_incomplete_var,
34 complete_vars): Likewise.
35 * decl2.c (grok_array_decl, check_member_template,
36 check_classfn, finish_static_data_member_decl, coerce_new_type,
37 coerce_delete_type, import_export_class, decl_needed_p,
38 determine_visibility, import_export_decl, build_cleanup,
39 start_static_initialization_or_destructi, do_static_destruction,
40 prune_vars_needing_no_initialization,
41 build_offset_ref_call_from_tree): Likewise.
42 * error.c (dump_decl, dump_expr): Likewise.
43 * init.c (finish_init_stmts, build_zero_init,
44 expand_virtual_init, expand_default_init, expand_aggr_init_1,
45 build_offset_ref, build_new_1, build_delete, build_vbase_delete):
46 Likewise.
47 * mangle.c (write_method_parms, write_template_args,
48 write_expression, write_template_arg): Likewise.
49 * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
50 * name-lookup.c (pop_binding, begin_scope, leave_scope,
51 resume_scope, push_using_decl, validate_nonmember_using_decl,
52 is_ancestor, poplevel_class, set_inherited_value_binding_p,
53 push_class_level_binding, do_class_using_decl, push_namespace,
54 pop_namespace, add_using_namespace, ambiguous_decl,
55 lookup_namespace_name, lookup_type_current_level,
56 maybe_process_template_type_declaration): Likewise.
57 * parser.c (cp_lexer_peek_nth_token,
58 cp_parser_parse_and_diagnose_invalid_typ,
59 cp_parser_translation_unit, cp_parser_template_id,
60 cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
61 * pt.c (push_access_scope, finish_member_template_decl,
62 push_inline_template_parms_recursive, add_outermost_template_args,
63 get_innermost_template_args, begin_explicit_instantiation,
64 end_explicit_instantiation, retrieve_specialization,
65 is_specialization_of, is_specialization_of_friend,
66 register_specialization, check_explicit_specialization,
67 comp_template_parms, process_template_parm,
68 process_partial_specialization, convert_nontype_argument,
69 coerce_template_template_parms, coerce_template_parms,
70 mangle_class_name_for_template, lookup_template_function,
71 lookup_template_class, instantiate_class_template, tsubst_decl,
72 tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
73 instantiate_template, fn_type_unification, type_unification_real,
74 get_template_base, regenerate_decl_from_template,
75 template_for_substitution, instantiate_decl,
76 get_mostly_instantiated_function_type, dependent_scope_ref_p,
77 value_dependent_expression_p, resolve_typename_type): Likewise.
78 * repo.c (repo_emit_p): Likewise.
79 * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
80 create_tinfo_types, emit_tinfo_decl): Likewise.
81 * search.c (lookup_base_r, lookup_base, lookup_field_1,
82 dfs_access_in_type, build_baselink, lookup_member,
83 adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
84 * semantics.c (perform_or_defer_access_check,
85 finish_non_static_data_member, finish_stmt_expr_expr,
86 finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
87 finish_template_template_parm, finish_member_declaration,
88 emit_associated_thunks): Likewise.
89 * tree.c (build_target_expr_with_type, force_target_expr,
90 copy_binfo, get_first_fn, cp_tree_equal): Likewise.
91 * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
92 cxx_sizeof_or_alignof_type, perform_integral_promotions,
93 build_class_member_access_expr, finish_class_member_access_expr,
94 build_ptrmemfunc_access_expr, build_unary_op,
95 unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
96 build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
97 * typeck2.c (complete_type_check_abstract,
98 abstract_virtuals_error, process_init_constructor,
99 add_exception_specifier): Likewise.
100
101 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
102
103 * class.c (build_vtbl_initializer): Use ssize_int.
104 * decl.c (complete_array_type): Likewise.
105 * method.c (finish_thunk): Likewise.
106 * search.c (get_dynamic_base_type): Likewise.
107
108 2004-08-26 Richard Henderson <rth@redhat.com>
109
110 * cp-tree.h (DECL_FIELD_IS_BASE): New.
111 * class.c (build_base_field): Set it.
112 (build_simple_base_path): Use it.
113 (fixed_type_or_null): Don't consider base fields definitive.
114
115 2004-08-25 Roger Sayle <roger@eyesopen.com>
116
117 PR middle-end/16693
118 PR tree-optimization/16372
119 * decl.c (finish_enum): Make the precision of the enumerated type
120 the same width as the underlying integer type.
121
122 2004-08-25 Mark Mitchell <mark@codesourcery.com>
123
124 PR c++/17155
125 * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
126 functions.
127
128 * mangle.c (get_identifier_nocopy): Add cast.
129
130 * cp-tree.h (mangle_type): Remove.
131 * mangle.c (globals): GTY it.
132 (mangle_obstack): New variable.
133 (name_obstack): Likewise.
134 (name_base): Likewise.
135 (write_char): Adjust accordingly.
136 (write_chars): Likewise.
137 (write_string): Likewise.
138 (start_mangling): Initialize G.substitutions only one. Add
139 ident_p parameter.
140 (finish_mangling): Use VARRAY_CLEAR to reclaim
141 storage in G.substitutions. Use obstack_finish.
142 (init_mangle): Adjust for changes to variable names above.
143 Initialize G.substitutions.
144 (mangle_decl_string): Adjust call to start_mangling.
145 (get_identifier_nocopy): New function.
146 (mangle_decl): Use it.
147 (mangle_type_string): Adjust call to start_mangling.
148 (mangle_special_for_type): Likewise.
149 (mangle_vtt_for_type): Likewise.
150 (mangle_ctor_vtbl_for_type): Likewise.
151 (mangle_thunk): Likewise.
152 (mangle_guard_variable): Likewise.
153 (mangle_ref_init_variable): Likewise.
154
155 2004-08-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
156
157 PR c++/14428
158 * pt.c (redeclare_class_template): Check the type of non-type and
159 template template parameter.
160
161 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
162
163
164 * call.c (convert_class_to_reference): Adjust build_int_cst calls.
165 (build_user_type_conversion_1, convert_like_real,
166 build_java_interface_fn_ref, build_special_member_call): Likewise.
167 * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
168 * cp-gimplify.c (cp_gimplify_expr): Likewise.
169 * cvt.c (cp_convert_to_pointer): Likewise.
170 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
171 * decl2.c (start_static_initialization_or_destruction,
172 generate_ctor_or_dtor_function): Likewise.
173 * except.c (build_throw): Likewise.
174 * mangle.c (write_integer_cst): Likewise.
175 * method.c (finish_thunk): Likewise.
176 * rtti.c (build_headof, get_tinfo_decl_dynamic,
177 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
178 get_pseudo_ti_init): Likewise.
179 * search.c (get_dynamic_cast_base_type): Likewise.
180
181 2004-08-25 Zack Weinberg <zack@codesourcery.com>
182
183 * class.c, search.c: Remove references to DWARF_DEBUG.
184
185 2004-08-25 Adam Nemet <anemet@lnxw.com>
186
187 * repo.c (extract_string): Reset backquote after one character.
188 (get_base_filename): Fix indentation.
189 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
190
191 * decl.c (cxx_init_decl_processing): Adjust
192 build_common_tree_nodes call.
193
194 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
195
196 PR c++/16889
197 * (is_subobject_of_p): Resurrect & optimize.
198 (lookup_field_r): Use it.
199
200 2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
201
202 PR c++/16706
203 * search.c (friend_accessible_p): Increment processing_template_decl
204 when deal with TEMPLATE_DECL of SCOPE.
205
206 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
207
208 PR c++/17149
209 * semantics.c (check_accessibility_of_qualified_id): Defer check
210 if qualifying_type is a template parameter.
211
212 2004-08-23 Mark Mitchell <mark@codesourcery.com>
213
214 PR c++/17163
215 * pt.c (instantiate_decl): Do not try to apply
216 DECL_DECLARED_INLINED_P to a VAR_DECL.
217
218 * search.c (build_baselink): Fix typo in comment.
219
220 2004-08-22 Andrew Pinski <apinski@apple.com>
221
222 Revert:
223 2004-08-22 Andrew Pinski <apinski@apple.com>
224 PR c++/14029
225 * typeck.c (build_unary_op): Use &a.b if the folded lowered
226 expression is not constant.
227
228 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
229
230 * name-lookup.c (pushdecl): Rename build_type_copy call.
231 * tree.c (cp_build_qualified_type_real,
232 build_exception_variant, handle_java_interface_attribute): Likewise.
233
234 2004-08-22 Andrew Pinski <apinski@apple.com>
235
236 PR c++/14029
237 * typeck.c (build_unary_op): Use &a.b if the folded lowered
238 expression is not constant.
239
240 2004-08-20 Mark Mitchell <mark@codesourcery.com>
241
242 PR c++/17121
243 * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
244
245 2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
246
247 PR c++/17120
248 * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
249 MODOP_EXPR.
250
251 2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
252
253 * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
254 before calling comp_template_args.
255
256 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
257
258 * class.c (build_vtbl_initializer): Use build_int_cst for
259 negative size types.
260 * decl.c (complete_array_type): Likewise.
261 * method.c (finish_thunk): Likewise.
262
263 2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
264
265 * tree.c: Remove unused mark_local_for_remap_r.
266
267 2004-08-19 Eric Christopher <echristo@redhat.com>
268
269 * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
270 * tree.c (cxx_unsave_expr_now): Delete.
271 (cp_unsave_r): Ditto.
272
273 2004-08-19 Mark Mitchell <mark@codesourcery.com>
274
275 PR c++/15890
276 * pt.c (push_template_decl_real): Disallow template allocation
277 functions with fewer than two parameters.
278
279 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
280
281 * cp-tree.h (build_shared_int_cst): Remove.
282 * tree.c (shared_int_cache): Remove.
283 (build_shared_int_cst): Remove.
284 * class.c (finish_struct_1): Use build_int_cst.
285
286 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
287
288 * decl.c (finish_enum): Do not copy value node early, copy
289 later.
290 * lex.c (cxx_init): Force null_node to be unique.
291
292 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
293
294 PR c++/17041
295 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
296 from input for MODOP_EXPR.
297
298 2004-08-18 Mark Mitchell <mark@codesourcery.com>
299
300 * pt.c (dependent_template_p): Fix typo in commment.
301
302 PR c++/17068
303 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
304 dependent.
305
306 2004-08-17 Mark Mitchell <mark@codesourcery.com>
307
308 PR c++/16246
309 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
310 arguments have the same type as the corresponding parameter.
311
312 PR c++/16215
313 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
314 is set use it for diagnostic purposes.
315 (cp_parser_pseudo_destructor_name): Remove special-case error
316 message.
317
318 PR c++/15871
319 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
320
321 PR c++/16965
322 * cp-tree.h (qualified_name_lookup_error): Add parameter.
323 * name-lookup.c (do_class_using_decl): Restrict set of entities
324 passed to cp_emit_debug_info_for_using more carefully.
325 (lookup_qualified_name): Allow lookup_member to return sets of
326 ambiguous entries.
327 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
328 (cp_parser_primary_expression): Handle ambiguous lookups.
329 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
330 (cp_parser_template_argument): Likewise.
331 (cp_parser_elaborate_type_specifier): Likewise.
332 (cp_parser_namespace_name): Likewise.
333 (cp_parser_class_name): Likewise.
334 (cp_parser_lookup_name_simple): Likewise.
335 * pt.c (tsubst_qualified_id): Handle ambiguous results.
336 (tsubst_expr): Likewise.
337 * semantics.c (qualified_name_lookup_error): Add decl paramter.
338 For ambiguous lookups, print candidates.
339
340 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
341
342 PR c++/6749
343 * pt.c (instantiate_pending_templates): Add int parameter. Don't
344 return anything.
345 * cp-tree.h (instantiate_pending_templates): Adjust prototype.
346 * decl2.c (finish_file): Adjust call to
347 instantiate_pending_templates.
348
349 2004-08-15 Roger Sayle <roger@eyesopen.com>
350
351 * call.c (build_vfield_ref, build_call, build_conditional_expr,
352 convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
353 build_java_interface_fn_ref, build_special_member_call,
354 build_new_method_call, initialize_reference): Replace calls to
355 build with calls to buildN.
356 * class.c (build_base_path, convert_to_base_statically,
357 build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
358 build_vtbl_initializer): Likewise.
359 * cp-gimplify.c (genericize_try_block, genericize_catch_block,
360 gimplify_if_stmt, cp_genericize_r): Likewise.
361 * cvt.c (convert_to_void): Likewise.
362 * decl.c (check_initializer, finish_constructor_body,
363 finish_destructor_body): Likewise.
364 * error.c (dump_expr): Likewise.
365 * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
366 Likewise.
367 * init.c (perform_member_init, expand_virtual_init,
368 expand_cleanup_for_base, build_init, expand_default_init,
369 build_offset_ref, decl_constant_value, build_new, build_new_1,
370 build_vec_delete_1, build_vec_init, build_delete,
371 push_base_cleanups, build_vec_delete): Likewise.
372 * mangle.c (write_integer_cst): Likewise.
373 * method.c (thunk_adjust, do_build_copy_constructor,
374 do_build_assign_ref): Likewise.
375 * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
376 unify, build_non_dependent_expr): Likewise.
377 * rtti.c (build_headof, build_typeid, ifnonnull,
378 build_dyanmic_cast_1, tinfo_base_init): Likewise.
379 * semantics.c (begin_compound_stmt, finish_call_expr,
380 finish_pseudo_destructor_expr, finish_id_expression,
381 simplify_aggr_init_expr, finalize_nrv_r): Likewise.
382 * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
383 array_type_nelts_total, stabilize_call): Likewise.
384 * typeck.c (decay_conversion, build_class_member_access_expr,
385 lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
386 get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
387 build_x_unary_op, build_unary_op, unary_complex_lvalue,
388 build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
389 check_return_expr): Likewise.
390 * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
391 split_nonconstant_init, store_init_value, build_m_component_ref):
392 Likewise.
393
394 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
395
396 * call.c (convert_class_to_reference,
397 build_user_type_conversion_1, convert_like_real,
398 build_java_interface_fn_ref, build_special_member_call): Use
399 build_int_cst.
400 * class.c (build_vtbl_initializer): Likewise.
401 * cp-gimplify.c (cp_gimplify_expr): Likewise.
402 * cvt.c (cp_convert_to_pointer): Likewise.
403 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
404 * decl2.c (start_static_initialization_or_destruction,
405 generate_ctor_or_dtor_function): Likewise.
406 * except.c (build_throw): Likewise.
407 * lex.c (cxx_init): Likewise.
408 * mangle.c (write_integer_cst): Likewise.
409 * rtti.c (build_headof, get_tinfo_decl_dynamic,
410 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
411 get_pseudo_ti_init): Likewise.
412 * search.c (get_dynamic_cast_base_type): Likewise.
413 * tree.c (build_shared_int_cst): Likewise.
414
415 2004-08-12 Mark Mitchell <mark@codesourcery.com>
416
417 PR c++/16273
418 * class.c (count_depth_data): New type.
419 (dfs_depth_post): New function.
420 (dfs_depth_q): Likewise.
421 (find_final_overrider_data_s): Change type of vpath.
422 Add vpath_list.
423 (dfs_find_final_overrider_1): New function.
424 (dfs_find_final_overrider): Use it.
425 (dfs_find_final_overrider_q): Adjust use of vpath.
426 (dfs_find_final_overrider_post): Likewise.
427 (find_final_overrider): Use dfs_depth. Allocate and deallocate
428 vpath_list.
429
430 2004-08-12 Jan Beulich <jbeulich@novell.com>
431
432 * parser.c (cp_parser_asm_definition): Properly consume scope operator
433 tokens preceding the clobbers. Don't check for scope operator
434 following inputs. Simplify inputs handling to match that now used for
435 clobbers.
436
437 2004-08-11 Mark Mitchell <mark@codesourcery.com>
438
439 PR c++/16698
440 * except.c (build_throw): Allocate cleanup_type and the function
441 for __cxa_throw separately.
442
443 PR c++/16853
444 * call.c (standard_conversion): Do not accept conversions between
445 pointers to members if the class types are unrelated.
446
447 PR c++/16618
448 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
449 char &" instead of just "char &".
450
451 PR c++/16870
452 * pt.c (tsubst): Just return the unknown_type_node.
453
454 2004-08-11 Mark Mitchell <mark@codesourcery.com>
455
456 PR c++/16964
457 * parser.c (cp_parser_class_specifier): Robustify.
458
459 PR c++/16904
460 * pt.c (tsubst_copy_and_build): Complain about invalid
461 qualification.
462
463 PR c++/16929
464 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
465 current_class_ref while tsubsting.
466
467 2004-08-10 Mark Mitchell <mark@codesourcery.com>
468
469 PR c++/16971
470 * parser.c (cp_parser_init_declarator): Robustify.
471
472 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
473
474 * typeck2.c (process_init_constructor): Guard the missing field warning
475 with warn_missing_field_initializers rather than extra_warnings.
476
477 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
478
479 * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
480
481 2004-08-05 Mark Mitchell <mark@codesourcery.com>
482
483 * decl.c (start_preparsed_function): Move determine_visibility
484 call.
485 * decl2.c (determine_visibility): Incorporate dllexport testing.
486
487 2004-08-05 Geoffrey Keating <geoffk@apple.com>
488
489 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
490 means that libstdc++ is needed.
491
492 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
493
494 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
495
496 2004-08-04 Geoffrey Keating <geoffk@apple.com>
497
498 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
499 than passing it as a parameter to rest_of_decl_compilation.
500 * decl2.c (grokfield): Use set_user_assembler_name.
501
502 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
503
504 * decl.c (complete_array_type): Don't gratuitously copy
505 maxindex. Its type is always set.
506
507 2004-08-04 Paul Brook <paul@codesourcery.com>
508
509 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
510 * cp-tree.h (struct language_function): Rename x_dtor_label to
511 x_cdtor_label.
512 (dtor_label): Rename ...
513 (cdtor_label): ... to this.
514 * decl.c (begin_constructor_body): Remove.
515 (check_special_function_return_type): Maybe change the return type.
516 (grokdeclarator): Pass the class type.
517 (start_preparsed_function): Constructors may need a return label.
518 (finish_constructor_body, finish_destructor_body): Set the return
519 value.
520 (begin_function_body): Don't call begin_constructor_body.
521 (finish_function): Don't warn for constructors or destructors.
522 (implicitly_declare_fn): Maybe change the return type.
523 * optimize.c: Include target.h.
524 (maybe_clone_body): Remap the function result.
525 * semantics.c: Include target.h.
526 (finish_return_stmt): Maybe jump to return label for constructors.
527
528 2004-08-03 Mark Mitchell <mark@codesourcery.com>
529
530 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
531 (check_field_decls): Or here.
532 (check_methods): Or here.
533 (initialize_array): Don't mess with DECL_CONTEXT.
534 * cp-tree.h (start_decl): Adjust prototype.
535 (determine_visibility): New function.
536 * decl.c (duplicate_decls): Remove checks for hidden "operator
537 new".
538 (build_library_fn_1): Give all library functions default
539 visibility.
540 (start_decl): Add pop_scope_p parameter. Tidy.
541 (cp_finish_decl): Do not pop scopes here. Call
542 determine_visibility for variable definitions.
543 (start_preparsed_function): Call determine_visibility.
544 * decl2.c (determine_visibility): New function.
545 * method.c (use_thunk): Fix formatting.
546 * parser.c (cp_parser_condition): Adjust calls to start_decl.
547 (cp_parser_init_declarator): Likewise.
548 * pt.c (instantiate_decl): Always call pop_nested_class.
549 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
550 (tinfo_base_init): Likewise.
551
552 2004-08-02 Mark Mitchell <mark@codesourcery.com>
553
554 PR c++/16707
555 * name-lookup.c (validate_nonmember_using_decl): Robustify.
556
557 2004-08-01 Mark Mitchell <mark@codesourcery.com>
558
559 PR c++/16224
560 * name-lookup.c (decl_namespace): Remove.
561 (current_decl_namespace): Use decl_namespace_context instead of
562 decl_namespace.
563 (push_decl_namespace): Likewise.
564 (arg_assoc_class): Likewise.
565 (arg_assoc_type): Likewise.
566 * pt.c (check_specialization_namespace): New function.
567 (maybe_process_partial_specialization): Use it.
568 (register_specialization): Likewise.
569
570 PR c++/16489
571 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
572 * call.c (null_ptr_cst_p): Handle variables with constant
573 initializers.
574 * pt.c (convert_nontype_argument): Use
575 DECL_INTEGRAL_CONSTANT_VAR_P.
576 * semantics.c (finish_id_expression): Likewise.
577
578 PR c++/16529
579 * decl.c (duplicate_decls): Reject duplicate namespace
580 declarations.
581
582 PR c++/16810
583 * typeck.c (build_ptrmemfunc): Loosen assertion.
584
585 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
586
587 * call.c (z_candidate::template_decl): Rename from template.
588 (add_template_candidate_real): Adjust member reference.
589 (joust): Likewise.
590
591 2004-07-29 Mark Mitchell <mark@codesourcery.com>
592
593 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
594 (lang_decl_flags): Narrow the width of "languages". Add
595 repo_available_p.
596 (DECL_NEEDED_P): Remove.
597 (FOR_EACH_CLONE): New macro.
598 (DECL_REPO_AVAILABLE_P): Likewise.
599 (DECL_TINFO_P): Likewise.
600 (set_linkage_according_to_type): Declare.
601 (import_export_vtable): Remove.
602 (import_export_tinfo): Likewise.
603 (mark_needed): New function.
604 (decl_needed_p): Likewise.
605 (note_vauge_linkage_fn): Likewise.
606 (init_repo): Change prototype.
607 (repo_template_used): Remove.
608 (repo_template_instantiated): Likewise.
609 (repo_emit_p): New function.
610 (repo_export_class_p): Likewise.
611 (no_linkage_check): Change prototype.
612 * class.c (set_linkage_according_to_type): New function.
613 (build_vtable): Use it. Do not call import_export_vtable. Set
614 DECL_IGNORED_P if appropriate.
615 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
616 (make_rtL_for_nonlocal_decls): Check for template instantiations
617 explicitly.
618 (grokfndecl): Adjust call to no_linkage_check.
619 (set_linkage_for_static_data_member): New function.
620 (grokvardecl): Use it. Adjust call to no_linkage_check.
621 (grokdeclarator): Use set_linkage_for_static_data_member.
622 * decl2.c (note_vague_linkage_fn): New function.
623 (note_vague_linkage_var): Likewise.
624 (finish_static_data_member_decl): Use it.
625 (import_export_vtable): Remove.
626 (import_export_class): Use repo_export_class_p.
627 (var_finalized_p): Simplify.
628 (maybe_emit_vtables): Simplify.
629 (mark_needed): New function.
630 (decl_needed_p): Likewise.
631 (import_export_decl): Add documentation and consistency checks.
632 Use repo_emit_p. Handle virtual tables and RTTI information
633 here.
634 (import_export_tinfo): Remove.
635 (write_out_vars): Call import_export_decl.
636 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
637 whenever one is.
638 (finish_file): Use decl_needed_p. Do not call import_export_decl
639 for undefined static data members. Do not warn about undefined
640 inlines when using a repository.
641 (mark_used): Use note_vague_linkage_fn. Always defer template
642 instantiations.
643 * lex.c (cxx_init): Adjust call to init_repo. Always set
644 flag_unit_at_a-time.
645 * method.c (synthesize_method): Remove unncessary
646 import_export_decl call.
647 (implicitly_declare_fn): Use set_linkage_according_to_type.
648 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
649 * pt.c (instantiate_class_template): Don't redundantly add classes
650 to keyed_classes. Don't call repo_template_used.
651 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
652 templates with internal linkage.
653 (check_instantiated_args): Adjust call to no_linkage_check.
654 (instantiate_template): Use FOR_EACH_CLONE.
655 (mark_definable): New function.
656 (mark_decl_instantiated): Use it.
657 (do_decl_instantiation): Adjust tests for explicit instantiation
658 after "extern template".
659 (instantiate_class_member): Do not use repo_template_instantiated.
660 (do_type_instantiation): Simplify.
661 (instantiate_decl): Use mark_definable. Check repo_emit_p.
662 Simplify.
663 * repo.c (repo_get_id): Remove.
664 (original_repo): Remove.
665 (IDENTIFIER_REPO_USED): Remove.
666 (IDENTIFIER_REPO_CHOSEN): Remove.
667 Remove all #if 0'd code.
668 (repo_template_used): Remove.
669 (repo_template_instantiated): Remove.
670 (temporary_obstack_initialized_p): New variable.
671 (init_repo): Register with lang_post_pch_load. Avoid creating
672 identifiers unnecessarily. Don't use original_repo. Close the
673 file here.
674 (reopen_repo_file_for_write): Not here.
675 (finish_repo): Always write out a new repository file.
676 (repo_emit_p): New function.
677 (repo_export_class_p): Likewise.
678 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
679 (involves_incomplete_p): New function.
680 (tinfo_base_init): Use it.
681 (ptr_initializer): Remove non_public_ptr parameter.
682 (ptm_initializer): Likewise.
683 (get_pseudo_ti_init): Likewise.
684 (unemitted_tinfo_decl_p): Remove.
685 (emit_tinfo_decl): Use import_export_decl.
686 * semantics.c (expand_body): Move updates of static_ctors and
687 static_dtors to ...
688 (expand_or_defer_fn): ... here.
689 * tree.c (no_linkage_check): Add relaxed_p parameter.
690
691 2004-07-28 Eric Christopher <echristo@redhat.com>
692
693 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
694
695 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
696
697 * cp-tree.h (struct tree_pair_s): New.
698 (typedef tree_pair_p): New.
699 (DEF_VEC_O(tree_pair_s)): New.
700 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
701 (CLASSTYPE_VCALL_INDICES): Update documentation.
702 * class.c (get_vcall_index): Adjust.
703 (add_vcall_offset): Adjust.
704
705 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
706
707 * pt.c, typeck.c: Remove spurious carriage returns.
708
709 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
710
711 PR c++/14429
712 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
713 when the type of ARG is not dependent.
714
715 2004-07-26 Geoffrey Keating <geoffk@apple.com>
716
717 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
718 (lang_specific_driver): If the C++ or math library options don't
719 start with '-l', don't count them as added libraries.
720
721 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
722
723 * decl.c (xref_basetypes): Adjust base access vector creation.
724 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
725 access accesses.
726 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
727
728 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
729 Brian Ryner <bryner@brianryner.com>
730
731 PR c++/15000
732 PR c++/9283
733 * class.c (check_field_decls): Apply hidden visibility if
734 -fvisibility-inlines-hidden and inlined unless otherwise specified
735 (build_vtable): Set vtable visibility to class visibility.
736 (check_field_decls): Default static member visibility to class
737 visibility.
738 (check_methods): Default method visibility to class visibility.
739 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
740 CLASSTYPE_VISIBILITY_SPECIFIED macro.
741 * decl.c (duplicate_decls): New logic for merging definition decls
742 with declaration decls. Added ignore & warning when non default
743 applied to global operator new or delete.
744 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
745 wherever VISIBILITY was changed
746 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
747 visibility.
748 (tinfo_base_init): Set typeinfo name visibility to class visibility.
749
750 2004-07-25 Bernardo Innocenti <bernie@develer.com>
751
752 * decl.c: Rename all identifiers named `class' to `cl'.
753 * cp-tree.h: Likewise.
754
755 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
756
757 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
758 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
759 * name-lookup.c (binding_entry_make): Use GGC_NEW.
760 (binding_table_construct): Use GGC_CNEWVEC.
761 (binding_table_new): Use GGC_NEW.
762 (cxx_binding_make): Likewise.
763 (begin_scope): Likewise.
764 (push_to_top_level): Use GCC_CNEW.
765 * parser.c (cp_token_cache_new): Likewise.
766 (cp_token_cache_push_token): Likewise.
767 (cp_lexer_new_main): Likewise.
768 (cp_lexer_new_from_tokens): Likewise.
769 (cp_parser_context_new): Likewise.
770 (cp_parser_new): Likewise.
771 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
772 * lex.c (cxx_make_type): Use GGC_CNEW.
773 (retrofit_lang_decl): Use GGC_NEWVAR.
774 (cxx_dup_lang_specific_decl): Likewise.
775 (copy_lang_type): Likewise.
776 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
777 (save_function_data): Likewise.
778 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
779 (cxx_push_function_context): Likewise.
780
781 2004-07-25 Richard Henderson <rth@redhat.com>
782
783 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
784 DECL_IGNORED_P on RESULT_DECL.
785 * semantics.c (finalize_nrv): Copy them too.
786
787 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
788
789 * search.c (lookup_conversion_operator): Avoid two loops.
790 (add_conversions): Remove.
791 (check_hidden_convs, split_conversions,
792 lookup_conversions_r): New.
793 (lookup_conversions): Use lookup_conversions_r.
794
795 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
796
797 * pt.c (get_template_base): Check type is completable.
798
799 2004-07-21 Eric Christopher <echristo@redhat.com>
800
801 * decl.c (poplevel): Inline unused variable checking.
802 Change formatting.
803
804 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
805
806 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
807 integer vectors.
808
809 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
810
811 PR c++/14497
812 * pt.c (check_explicit_specialization): Remove extension to accept
813 specializations without template headers. Fall-through to normal
814 processing.
815
816 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
817
818 PR c++/509
819 * pt.c (determine_specialization): New parameter template_count.
820 Disambiguate between member templates and member functions counting
821 the template headers.
822 (check_explicit_specialization): Update caller.
823 (tsubst_friend_function): Likewise.
824
825 2004-07-20 Steven Bosscher <stevenb@suse.de>
826
827 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
828 * cp-tree.h (tinst_level_t): New tree type.
829 (union lang_tree_node): Handle it.
830 (TINST_LOCATION): New accessor macro.
831 (make_tinst_level): New prototype.
832 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
833 * decl.c (cp_tree_node_structure): Likewise.
834 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
835 (print_instantiation_partial_context): Likewise.
836 * pt.c (pop_tinst_level): Likewise.
837 (push_tinst_level): Use make_tinst_level.
838 * tree.c (make_tinst_level): New function.
839 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
840
841 2004-07-20 Mark Mitchell <mark@codesourcery.com>
842
843 * parser.c (cp_parser_simple_type_specifier): Fix typo.
844
845 PR c++/16637
846 * parser.c (cp_parser_simple_type_specifier): Do not record usage
847 of globally-qualified names.
848
849 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
850
851 PR c++/16175
852 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
853 cv qualifier.
854
855 2004-07-19 Mark Mitchell <mark@codesourcery.com>
856
857 PR c++/16623
858 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
859 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
860 * class.c (add_implicitly_declared_members): Use
861 CLASSTYPE_LAZY_ASSIGNMENT_OP.
862 * method.c (lazily_declare_fn): Clear
863 CLASSTYPE_LAZY_ASSIGNMENT_OP.
864 * search.c (lookup_fnfields_1): Check it.
865
866 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
867
868 * cp-tree.h (vec_binfo_member): Remove.
869 * tree.c (vec_binfo_member): Remove.
870
871 * cp-tree.h (struct lang_type_class): Remove vfields field.
872 (CLASSTYPE_VFIELDS): Remove.
873 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
874 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
875 handling.
876 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
877 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
878 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
879
880 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
881
882 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
883 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
884 Moved to common.
885 (BINFO_LANG_SLOTS): Remove.
886 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
887 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
888 * class.c (check_bases): Adjust BINFO accessors.
889 (determine_primary_base, finish_struct_bits,
890 maybe_warn_about_overly_private_class, warn_hidden,
891 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
892 warn_about_ambiguous_bases, get_vfield_name,
893 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
894 add_vcall_offset_vtbl_entries_r): Likewise.
895 * dump.c (cp_dump_tree): Likewise.
896 * init.c (sort_mem_initializers, expand_member_init, build_delete,
897 push_base_cleanups): Likewise.
898 * method.c (do_build_copy_constructor, do_build_assign_ref,
899 synthesize_exception_spec): Likewise.
900 name-lookup.c (arg_assoc_class): Likewise.
901 * pt.c (instantiate_class_template,
902 get_template_base_recursive): Likewise.
903 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
904 * typeck2.c (process_init_constructor): Likewise.
905 * search.c (lookup_base_r, dynamic_cast_base_recurse,
906 dfs_access_in_type, dfs_walk_real, look_for_overrides,
907 types_overlap_p, copied_binfo, original_binfo): Likewise.
908 (binfo_for_vtable): Remove
909
910 2004-07-20 Steven Bosscher <stevenb@suse.de>
911
912 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
913 thunk_alias, and the access and virtual_offset fields.
914 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
915 * decl.c (finish_case_label): Update c_add_case_node call.
916
917 2004-07-19 Mark Mitchell <mark@codesourcery.com>
918
919 Revert patch for PR c++/16623.
920
921 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
922
923 * except.c: Remove two spurious carriage returns.
924
925 2004-07-19 Mark Mitchell <mark@codesourcery.com>
926
927 PR c++/16623
928 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
929 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
930 * class.c (add_implicitly_declared_members): Use
931 CLASSTYPE_LAZY_ASSIGNMENT_OP.
932 * method.c (lazily_declare_fn): Clear
933 CLASSTYPE_LAZY_ASSIGNMENT_OP.
934 * search.c (lookup_fnfields_1): Check it.
935
936 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
937
938 * class.c (add_method): Delay adding the slot until the end.
939 (determine_primary_base): Adjust VEC_iterate invokation.
940 (resort_type_method_vec, finish_struct_methods, warn_hidden,
941 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
942 build_vtbl_initializer): Likewise.
943 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
944 build_vbase_delete): Likewise.
945 * method.c (do_build_copy_constructor): Likewise.
946 * name-lookup.c (new_class_binding, print_binding_level,
947 poplevel_class, store_class_bindings, push_to_top_level,
948 pop_from_top_level): Likewise.
949 * pt.c (check_explicit_specialization): Likewise.
950 * search.c (lookup_conversion_operator, lookup_fnfields_1,
951 get_pure_virtuals, add_conversions, dfs_check_overlap,
952 binfo_for_vbase): Likewise.
953
954 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
955
956 PR c++/12170
957 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
958 innermost set of template arguments during deduction. Simplify.
959
960 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
961
962 * typeck.c (build_modify_expr, build_x_modify_expr): Set
963 TREE_NO_WARNING on assignments with an operator other than '='.
964
965 2004-07-10 Steven Bosscher <stevenb@suse.de>
966 Joseph S. Myers <jsm@polyomino.org.uk>
967
968 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
969 * decl2.c (grokfield): Don't check current_class_depth via
970 unused TREE_COMPLEXITY.
971 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
972 to avoid the missing parentheses warning.
973 Don't set C_SET_EXP_ORIGINAL_CODE.
974
975 2004-07-18 Mark Mitchell <mark@codesourcery.com>
976
977 * tree.c (no_linkage_helper): Remove.
978 (no_linkage_check): Don't use walk_tree_without_duplicates.
979
980 * mangle.c (write_expression): Issue a sorry for zero-operand
981 functional casts.
982
983 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
984
985 PR c++/13092
986 * init.c (build_offset_ref): Build SCOPE_REF with non-null
987 TREE_TYPE for non-dependent names.
988 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
989 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
990 unknown_type_node as its TREE_TYPE.
991 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
992 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
993 (dump_expr) <SCOPE_REF case>: Likewise.
994
995 2004-07-17 Jason Merrill <jason@redhat.com>
996
997 PR c++/16115
998 * call.c (type_passed_as): Make the invisible reference type
999 __restrict.
1000 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
1001 cp_genericize_r. Handle invisible reference lowering.
1002 (is_invisiref_parm): New fn.
1003 (cp_genericize): Adjust the types of invisible reference parms.
1004 Don't repeat the walk for clones.
1005 * decl.c (store_parm_decls): Don't generate any code for clones.
1006
1007 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
1008
1009 * cp-tree.h (builtin_function): Declare.
1010
1011 2004-07-16 Mark Mitchell <mark@codesourcery.com>
1012
1013 * class.c (finish_struct_methods): Remove unncessary code.
1014 (add_implicitly_declared_members): Create declarations for default
1015 constructors and copy constructors lazily.
1016 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
1017 lazy_copy_ctor.
1018 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
1019 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
1020 * decl2.c (check_classfn): Robustify.
1021 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
1022 (locate_ctor): Handle lazy default constructors.
1023 (locate_copy): Handle lazy copy constructors.
1024 (implicitly_declare_fn): Make sure we're looking at the
1025 TYPE_MAIN_VARIANT for a class before creating functions. Don't
1026 set TYPE_HAS_CONSTRUCTOR.
1027 (lazily_declare_fn): New function.
1028 * name-lookup.c (constructor_name_full): Simplify.
1029 * search.c (lookup_fnfields_1): Lazily create methods, as
1030 necessary.
1031 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
1032
1033 2004-07-16 Steven Bosscher <stevenb@suse.de>
1034
1035 * cp-tree.h (struct lang_type): Don't have three GTY options on a
1036 single bit GTY desc.
1037
1038 2004-07-16 Richard Henderson <rth@redhat.com>
1039
1040 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
1041 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
1042 * tree.c (cp_copy_res_decl_for_inlining): Remove.
1043
1044 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
1045
1046 * class.c (finish_struct_bits): Use for loop.
1047 (propagate_binfo_offsets): Do primary binfo outside of loop.
1048
1049 PR c++/16583
1050 * dump.c (cp_dump_tree): Don't dump the bases if there's no
1051 binfo.
1052
1053 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
1054
1055 2004-07-15 Mark Mitchell <mark@codesourcery.com>
1056
1057 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
1058 has_abstract_assign_ref. Make methods a VEC(tree) *.
1059 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
1060 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
1061 (CLASSTYPE_DESTRUCTORS): Likewise.
1062 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
1063 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
1064 (add_method): Change prototoype.
1065 * class.c (add_method): Remove error_p parameter. Adjust for
1066 changes to CLASSTYPE_METHOD_VEC.
1067 (handle_using_decl): Adjust call to add_method.
1068 (maybe_warn_about_overly_private_class): Adjust for
1069 changes to CLASSTYPE_METHOD_VEC.
1070 (resort_type_method_vec): Likewise.
1071 (finish_struct_methods): Likewise.
1072 (check_for_override): Likewise.
1073 (warn_hidden): Likewise.
1074 (add_implicitly_declared_members): Defer creation of assignment
1075 operators. Adjust call to add_method.
1076 (clone_function_decl): Adjust call to add_method.
1077 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
1078 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
1079 * decl.c (grok_special_member_properties): Don't set
1080 TYPE_HAS_ABSTRACT_ASSIGN_REF.
1081 * decl2.c (check_classfn): Adjust for
1082 changes to CLASSTYPE_METHOD_VEC.
1083 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
1084 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
1085 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
1086 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
1087 cp_finish_decl.
1088 * pt.c (check_explicit_specialization): Adjust for
1089 changes to CLASSTYPE_METHOD_VEC.
1090 (instantiate_class_template): Do not set
1091 TYPE_HAS_ABSTRACT_ASSIGN_REF.
1092 * ptree.c (cxx_print_type): Don't try to print
1093 CLASSTYPE_METHOD_VEC.
1094 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
1095 * search.c (lookup_field_r): Adjust for
1096 changes to CLASSTYPE_METHOD_VEC.
1097 (lookup_fnfields): Likewise.
1098 (lookup_conversion_operator): Likewise.
1099 (lookup_fnfields_1): Likewise. Create assignment operators
1100 lazily.
1101 (look_for_overrides_here): Adjust for
1102 changes to CLASSTYPE_METHOD_VEC.
1103 (add_conversions): Likewise.
1104 * semantics.c (finish_member_declaration): Adjust call to add_method.
1105
1106 2004-07-15 Jason Merrill <jason@redhat.com>
1107
1108 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
1109 references and pointers are compatible.
1110
1111 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
1112
1113 * decl.c (xref_basetypes): Refactor.
1114 * tree.c (copy_base_binfos): Replace with ...
1115 (copy_binfo): ... this. Deep copy the given binfo, (not the just
1116 bases of the given base).
1117 * cp-tree.h (copy_base_binfo): Remove.
1118 (copy_binfo): Declare.
1119
1120 2004-07-15 Mark Mitchell <mark@codesourcery.com>
1121
1122 * name-lookup.c (set_inherited_value_binding_p): Add class_type
1123 parameter.
1124 (get_class_binding): Adjust.
1125 (push_class_level_binding): Don't use set_inherited_value_binding_p.
1126
1127 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
1128
1129 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
1130 * decl.c (xref_basetypes): Set it here.
1131
1132 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
1133 Don't check for incomplete base.
1134 (get_vfield_name): Simplify while loop.
1135 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
1136
1137 2004-07-14 Mark Mitchell <mark@codesourcery.com>
1138
1139 * lex.c (cxx_make_type): Remove call to get_pointer_type.
1140
1141 * cp-tree.h (IDENTIFIER_VALUE): Remove.
1142 (BINFO_PUSHDECLS_MARKED): Likewise.
1143 (maybe_inject_for_scope_var): Likewise.
1144 (push_class_decls): Likewise.
1145 * name-lookup.h (push_class_binding): Remove.
1146 (innermost_non_namespace_value): New function.
1147 (outer_binding): Likewise.
1148 * class.c (add_method): Push bindings before adding to
1149 TYPE_METHODS.
1150 (restore_class_cache): Do not restore class_shadowed.
1151 (pushclass): Do not add USING_DECLs. Do not call
1152 push_class_decls.
1153 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
1154 * decl.c (pushdecl): Use outer_binding.
1155 (poplevel): Set the scope for an out-of-scope for-loop declaration
1156 appropriately.
1157 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
1158 * name-lookup.c (new_class_binding): New function.
1159 (push_binding): Use it.
1160 (pushdecl): Use innermost_non_namespace_value.
1161 (maybe_inject_for_scope_var): Remove.
1162 (push_class_binding): Remove.
1163 (set_inherited_value_binding_p): New function.
1164 (get_class_binding): New function.
1165 (push_class_level_binding): Assert that the current_class_type is
1166 being defined.
1167 (outer_binding): New function.
1168 (innermost_non_namespace_value): Likewise.
1169 (lookup_name_real): Use outer_binding.
1170 (lookup_name_current_level): Ignore out-of-scope variables.
1171 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
1172 (lookup_template_class): Likewise.
1173 * search.c (dfs_push_type_decls): Remove.
1174 (dfs_push_decls): Likewise.
1175 (setup_class_bindings): Likewise.
1176 (lookup_field_1): Handle USING_DECLs from dependent scopes.
1177 (marked_pushdecls_p): Remove.
1178 (unmarked_pushdecls_p): Remove.
1179 (marked_identifiers): Remove.
1180 (setup_class_bindings): Remove.
1181 (dfs_push_type_decls): Remove.
1182 (dfs_push_decls): Remove.
1183 (push_class_decls): Remove.
1184
1185 2004-07-13 Mark Mitchell <mark@codesourcery.com>
1186
1187 PR c++/16518
1188 PR c++/16337
1189 * decl.c (grokvardecl): Make declspecs parameter const.
1190 (grokdeclarator): Likewise. Adjust accordingly.
1191 * decl.h (grokdeclarator): Adjust declaration.
1192 * parser.c (cp_parser_init_declarator): Do not clear
1193 decl_specifiers->attributes.
1194
1195 * cp-tree.h (lang_identifier): Remove class_value.
1196 (IDENTIFIER_CLASS_VALUE): Remove.
1197 (pop_class_decls): Likewise.
1198 (init_search_processing): Likewise.
1199 * class.c (handle_using_decl): Use lookup_member, not
1200 IDENTIFIER_CLASS_VALUE.
1201 (restore_class_cache): New function, split out from ...
1202 (pushclass): ... here. Do not call clear_identifier_class_values.
1203 (invalidate_class_lookup_cache): Do not clear
1204 IDENTIFIER_CLASS_VALUE.
1205 (popclass): Do not call pop_class_decls.
1206 (maybe_note_name_used_in_class): Do not save names looked up after
1207 the class is complete. Use lookup_member, not
1208 IDENTIFIER_CLASS_VALUE.
1209 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
1210 * decl.c (cxx_init_decl_processing): Do not call
1211 init_search_processing.
1212 * method.c (do_build_copy_constructor): Remove unnecessary code.
1213 (do_build_assign_ref): Likewise.
1214 * name-lookup.c (pushdecl): Use lookup_member, not
1215 IDENTIFIER_CLASS_VALUE.
1216 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
1217 type_shadowed list.
1218 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
1219 (push_class_binding): Do not set it.
1220 (clear_identifier_class_values): Remove.
1221 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
1222 (store_binding): Do not save it.
1223 (pop_from_top_level): Do not restore it.
1224 * name-lookup.h (cxx_saved_binding): Remove class_value.
1225 (clear_identifier_class_values): Remove.
1226 * ptree.c (cxx_print_identifier): Do not print
1227 IDENTIFIER_CLASS_VALUE.
1228 * search.c (search_obstack): Remove.
1229 (push_stack_level): Remove.
1230 (pop_stack_level): Remove.
1231 (search_level): Remove.
1232 (search_stack): Remove.
1233 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
1234 (setup_class_bindings): Use IDENTIFIER_MARKED, not
1235 IDENTIFIER_CLASS_VALUE.
1236 (marked_identifiers): New variable.
1237 (push_class_decls): Clear IDENTIFIER_MARKED.
1238 (pop_class_decls): Don't call pop_search_level.
1239 (init_search_processing): Remove.
1240
1241 2004-07-12 Mark Mitchell <mark@codesourcery.com>
1242
1243 * cp-tree.h (get_aggr_typedef): Remove.
1244 * init.c (get_aggr_typedef): Likewise.
1245
1246 * name-lookup.c (push_class_level_binding): Simplify.
1247
1248 2004-07-12 Andrew Pinski <apinski@apple.com>
1249
1250 PR c++/16475
1251 Revert:
1252 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
1253 PR c++/16276
1254 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
1255 is not public.
1256
1257 2004-07-12 Eric Christopher <echristo@redhat.com>
1258
1259 * parser.c (cp_parser_class_head): Remove unused variable.
1260
1261 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1262
1263 * decl.c (grok_op_properties): Reject [de-]allocation functions
1264 declared in a namespace, or declared as static.
1265
1266 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
1267
1268 * cp-tree.h (make_binfo): Remove.
1269 * decl.c (xref_basetypes): Use make_tree_binfo directly.
1270 * tree.h (copy_base_binfos): Likewise.
1271 (make_binfo): Remove.
1272
1273 * call.c (build_user_type_conversion_1, build_new_op,
1274 check_constructor_callable, build_temp,
1275 perform_direct_initialization_of_possible): Pass type directly to
1276 lookup_fnfields & build_special_member_call.
1277 (build_special_member_call): Accept a type, and complete it.
1278 * class.c (finish_stuct_bits): Copy the BINFOs here.
1279 * cvt.c (ocp_convert): Pass type directly to
1280 build_special_member_call.
1281 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
1282 (xref_basetypes): Allocate the binfo here. Adjust.
1283 * init.c (build_init, build_new_1): Pass type directly to
1284 build_special_member_call.
1285 * lex.c (cxx_make_type): Do not allocate binfo here.
1286 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
1287 * parser.c (cp_parser_class_head): Always call xref_basetypes.
1288 * pt.c (instantiate_class_template): Likewise. Inhibit access
1289 checking for template friends.
1290 * ptree.c (cxx_print_type): Adjust record printing.
1291 * search.c (lookup_base): When taking a type, complete it before
1292 looking for a binfo.
1293 (lookup_member): Delay completing a type.
1294 (push_class_decls): Don't walk an incomplete type.
1295 (lookup_conversions): Likewise.
1296 * semantics.c (finish_stmt_expr_expr): Pass type directly to
1297 build_special_member_call.
1298 * tree.c (copy_base_binfos): Adjust.
1299 (make_binfo): Likewise.
1300 * typeck.c (build_modify_expr): Pass type directly to
1301 build_special_member_call.
1302 * typeck2.c (process_init_constructor): Check a binfo exists.
1303 (build_m_component_ref): Allow accessing an incomplete type.
1304 (build_functional_cast): Pass type directly to
1305 build_special_member_call.
1306
1307 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1308
1309 PR c++/2204
1310 * config-lang.in (gtfiles): Add typeck2.c.
1311 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
1312 gt-cp-typeck2.h.
1313 * cp-tree.h: Declare complete_type_check_abstract.
1314 * typeck2.c (pat_calc_hash, pat_compare,
1315 complete_type_check_abstract): New functions.
1316 (abstract_virtuals_error): If the type is abstract, register the
1317 declaration within abstract_pending_vars for further checks.
1318 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
1319 * decl.c (cp_finish_decl): Do not strip array types.
1320 (create_array_type_for_decl): Check for abstractness of the element
1321 type.
1322 (complete_vars): Call complete_type_check_abstract.
1323 * class.c (finish_struct): Prepare a list of virtual functions for
1324 template types, and call complete_vars on it to check for abstractness.
1325
1326 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
1327
1328 PR tree-optimization/14107
1329 * decl.c (finish_function): Remove temporary band-aid.
1330
1331 2004-07-11 Mark Mitchell <mark@codesourcery.com>
1332
1333 * call.c (build_operator_new_call): Avoid using push_to_top_level.
1334 (build_new_op): Adjust call to lookup_function_nonclass.
1335 * name-lookup.c (identifier_type_value): Adjust call to
1336 lookup_name_real.
1337 (lookup_name_real): Add block_p parameter.
1338 (lookup_name_nonclass): Adjust call to lookup_name_real.
1339 (lookup_function_nonclass): Likewise.
1340 (lookup_name): Likewise.
1341 * name-lookup.h (lookup_name_real): Change prototype.
1342 (lookup_name_nonclass): Likewise.
1343 * parser.c (cp_parser_lookup_name): Likewise.
1344
1345 * cp-tree.h (saved_scope): Make old_bindings a vector.
1346 (unuse_fields): Remove.
1347 * name-lookup.h (cxx_saved_binding): Define it.
1348 * class.c (pushclass): Don't use unuse_fields.
1349 * name-lookup.c (cxx_saved_binding_make): Remove.
1350 (store_binding): Add new bindings to a vector, using an
1351 accumulator style, rather than adding them to a list.
1352 (store_bindings): Adjust accordingly.
1353 (store_class_bindings): Likewise.
1354 (push_to_top_level): Likewise.
1355 (pop_from_top_level): Likewise.
1356 * optimize.c (maybe_clone_body): Must push_to_top_level and
1357 pop_from_top_level calls outside of loop.
1358 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
1359 calls here from cp_parser_late_parsing_default_args.
1360 (cp_parser_save_default_args): Record the class type in which the
1361 function is declared.
1362 (cp_parser_late_parsing_default_args): Do not call
1363 push_nested_class/pop_nested_class.
1364 * search.c (dfs_unuse_fields): Remove.
1365 (unuse_fields): Remove.
1366
1367 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
1368
1369 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
1370 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
1371 * cp-tree.h (poplevel): Declare.
1372 (set_block): Remove.
1373 * decl.c (set_block): Remove.
1374
1375 2004-07-10 Mike Stump <mrs@apple.com>
1376
1377 * decl2.c (import_export_class): Never export/import vtables
1378 with inline key functions.
1379
1380 2004-07-09 Steven Bosscher <stevenb@suse.de>
1381
1382 * typeck.c (c_expand_asm_operands): Remove.
1383
1384 2004-07-09 Mike Stump <mrs@apple.com>
1385
1386 * typeck.c (build_class_member_access_expr): Skip null deref
1387 warning when we don't dereference it.
1388
1389 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1390
1391 PR c++/8211
1392 PR c++/16165
1393 * class.c (check_field_decls): Improve -Weffc++ warning: do not
1394 warn for pointers to functions/members, or for classes without
1395 destructors.
1396
1397 2004-07-08 Mark Mitchell <mark@codesourcery.com>
1398
1399 * name-lookup.h (struct cp_binding_level): Update documentation
1400 for class_shadowed.
1401
1402 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1403
1404 PR c++/16169
1405 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
1406 returning CALL_EXPR, and non-reference return type.
1407
1408 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
1409
1410 * name-lookup.c (push_binding): Use VEC_reserve.
1411
1412 2004-07-08 Richard Henderson <rth@redhat.com>
1413
1414 * cp-tree.h (expand_eh_spec_block): Remove.
1415
1416 2004-07-07 Mark Mitchell <mark@codesourcery.com>
1417
1418 * cp-tree.h (saved_scope): Remove x_previous_class_type and
1419 x_previous_class_values; add x_previous_class_level.
1420 (previous_class_type): Remove.
1421 (previous_class_values): Remove.
1422 (previous_class_level): New macro.
1423 * class.c (pushclass): Restore the identifier cache more
1424 expeditiously.
1425 (invalidate_class_lookup_cache): Use vector for class_shadowed and
1426 previous_class_values.
1427 * decl.c (poplevel): Likewise.
1428 * name-lookup.c (cxx_binding_init): New function.
1429 (cxx_binding_make): Use it.
1430 (push_binding): For a binding in a class level, use a vector of
1431 cp_class_binding nodes.
1432 (push_binding_level): New function.
1433 (begin_scope): Use it.
1434 (leave_scope): Do not put class binding levels on the free list.
1435 (print_binding_level): Adjust for the fact that class_shadowed is
1436 a vector.
1437 (poplevel_class): Likewise.
1438 (clear_identifier_class_values): Likewise.
1439 (push_class_level_binding): Likewise.
1440 (set_class_shadows): Remove.
1441 (store_binding): New function.
1442 (store_class_bindings): New function.
1443 (push_to_top_level): Use store_class_bindings as appropriate.
1444 (pop_from_top_level): Use previous_class_level, not
1445 previous_class_type.
1446 * name-lookup.h (cp_class_binding): New type.
1447 (cp_binding_level): Use a vector object for class_shadowed.
1448 (push_binding_level): Declare.
1449 (set_class_shadows): Remove.
1450
1451 2004-07-07 Andrew Pinski <apinski@apple.com>
1452
1453 * class.c (instantiate_type): BUFFER_REF is dead.
1454 * lex.c (init_operators): IN_EXPR is dead.
1455
1456 2004-07-07 Jason Merrill <jason@redhat.com>
1457
1458 PR c++/16334
1459 * call.c (build_new_op): Give overload warnings for built-in
1460 candidates.
1461
1462 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
1463
1464 PR c++/16276
1465 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
1466 is not public.
1467
1468 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
1469
1470 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
1471 * class.c (build_primary_vtable, check_bases,
1472 determine_primary_base, finish_struct_bits,
1473 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
1474 get_basefndecls, warn_hidden, walk_subobject_offsets,
1475 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
1476 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
1477 finish_struct_1, get_vfield_name, contains_empty_class_p,
1478 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
1479 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
1480 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
1481 BINFO macros.
1482 * decl.c (xref_basetypes): Likewise.
1483 * dump.c (cp_dump_tree): Likewise.
1484 * error.c (dump_expr): Likewise.
1485 * init.c (sort_mem_initializers, expand_member_init,
1486 push_base_cleanups): Likewise.
1487 * method.c (do_build_copy_constructor, do_build_assign_reg,
1488 synthesize_exception_spec): Likewise.
1489 * name-lookup.c (arg_assoc_class): Likewise.
1490 * pt.c (instantiate_class_template, tsubst,
1491 get_template_base_recursive): Likewise.
1492 * ptree.c (cxx_print_type): Likewise.
1493 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
1494 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1495 dfs_access_in_type, access_in_type, lookup_field_queue_p,
1496 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
1497 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
1498 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
1499 binfo_for_vtable, copied_binfo, original_binfo): Likewise
1500 * tree.c (copy_base_binfos, make_binfo): Likewise.
1501 * typeck.c (commmon_base_type): Likewise
1502 * typeck2.c (process_init_constructor): Likewise
1503
1504 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
1505
1506 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
1507
1508 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1509
1510 PR c++/3671
1511 * pt.c (convert_nontype_argument): Disallow conversions between
1512 different enumeration types.
1513
1514 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
1515
1516 * cp-tree.h (BINFO_MARKED): Remove.
1517 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
1518 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
1519 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
1520 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
1521 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
1522 (mark_primary_bases, determine_primary_base, base_derived_from,
1523 dfs_find_final_overrider, dfs_find_final_overrider_q,
1524 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
1525 dfs_modify_vtables, walk_subobject_offsets,
1526 layout_nonempty_base_or_field, build_base_field,
1527 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
1528 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
1529 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
1530 build_ctor_vtbl_group, accumulate_vtble_inits,
1531 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
1532 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
1533 add_vcall_offset_vtbl_entries_1): Likewise.
1534 * decl.c (xref_basetypes): Incomming virtual base indicated by
1535 TREE_TYPE. Adjust.
1536 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
1537 * init.c (finish_init_stmts, sort_mem_initializers,
1538 emit_mem_initializers, build_vtble_address, expand_member_init,
1539 push_base_cleanups): Likewise.
1540 * method.c (do_build_copy_constructor): Likewise.
1541 * pt.c (instantiate_class_template,
1542 get_template_base_recursive): Likewise.
1543 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
1544 get_pseudo_ti_desc): Likewise.
1545 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1546 binfo_from_vbase, binfo_via_virtual, copied_binfo,
1547 original_binfo): Likewise.
1548 * semantics.c (finish_base_specifier): Virtualness is indicated
1549 by TREE_TYPE.
1550 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
1551
1552 2004-07-06 Mark Mitchell <mark@codesourcery.com>
1553
1554 Revert:
1555 2004-06-24 Jason Merrill <jason@redhat.com>
1556 PR c++/16115
1557 * decl.c (grokparms): Give the PARM_DECL reference type if the
1558 parameter is passed by invisible reference.
1559
1560 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1561
1562 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
1563 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
1564 * pt.c (check_instantiated_args, unify): Likewise.
1565
1566 2004-07-05 Phil Edwards <phil@codesourcery.com>
1567
1568 * Make-lang.in (check-c++, lang_checks): Add some comments.
1569
1570 2004-07-05 Zack Weinberg <zack@codesourcery.com>
1571
1572 * cp-mudflap.c: Delete file.
1573 * Makefile.in: Remove all references to cp-mudflap.o.
1574
1575 2004-07-05 Zack Weinberg <zack@codesourcery.com>
1576
1577 * decl.c (cxx_init_decl_processing): Call
1578 build_common_tree_nodes before creating the global NAMESPACE_DECL.
1579
1580 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1581
1582 PR c++/2518
1583 * call.c (build_operator_new_call): Look only at global scope.
1584
1585 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
1586
1587 * call.c (enforce_access): Expect TREE_BINFO.
1588 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
1589 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
1590 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
1591 Adjust.
1592 (BINFO_LANG_ELTS): Remove.
1593 (BINFO_LANG_SLOTS): New.
1594 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
1595 (CLASSTYPE_TEMPLATE_INFO): Adjust.
1596 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
1597 * search.c (lookup_member): Check TREE_BINFO.
1598 * semantics.c (perform_or_defer_access_check): Likewise.
1599 (check_accessibility_of_qualified_id): Check
1600 deferred_access_no_check.
1601 * tree.c (make_binfo): Use make_tree_binfo.
1602
1603 2004-07-04 Mark Mitchell <mark@codesourcery.com>
1604
1605 * method.c (implicitly_declare_fn): Set linkage of generated
1606 functions.
1607
1608 2004-07-04 Richard Henderson <rth@redhat.com>
1609
1610 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
1611
1612 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
1613
1614 PR c++/3761
1615 * name-lookup.c (push_class_level_binding): Don't pass a
1616 TREE_LIST of ambiguous names to check_template_shadow as it
1617 only handles declarations. Instead, pull the declaration
1618 out and pass that.
1619
1620 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1621
1622 PR c++/14971
1623 * pt.c (check_explicit_specialization): Clarify error message.
1624
1625 2004-07-02 Richard Henderson <rth@redhat.com>
1626
1627 * tree.c (cp_unsave_r): Update remap_save_expr call.
1628
1629 2004-07-02 Mark Mitchell <mark@codesourcery.com>
1630
1631 PR c++/16240
1632 * mangle.c (write_template_arg): Correct mangling.
1633
1634 PR c++/16297
1635 * decl.c (grokdeclarator): Robustify.
1636
1637 2004-07-01 Richard Henderson <rth@redhat.com>
1638
1639 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
1640 * method.c (synthesize_method): Don't clear_last_expr.
1641 * name-lookup.c (maybe_push_cleanup_level): Likewise.
1642
1643 2004-07-01 Nick Clifton <nickc@redhat.com>
1644
1645 * decl2.c (import_export_class): Invoke the
1646 import_export_class field in the gcc_target structure if it is not
1647 empty.
1648
1649 2004-06-30 Richard Henderson (rth@redhat.com>
1650
1651 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
1652 * method.c (use_thunk): Likewise.
1653
1654 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
1655
1656 * call.c (build_over_call), typeck.c (build_function_call): Call
1657 check_function_arguments instead of check_function_format.
1658
1659 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
1660
1661 * call.c (build_over_call), typeck.c (build_function_call): Update
1662 calls to check_function_format.
1663
1664 2004-06-30 Richard Henderson <rth@redhat.com>
1665
1666 * call.c (build_over_call): Use __builtin_memcpy for copying
1667 CLASS_AS_BASE rather than funny casting.
1668
1669 2004-06-30 Richard Henderson <rth@redhat.com>
1670
1671 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
1672 TYPE_SIZE_UNIT of full_type.
1673
1674 2004-06-30 Per Bothner <per@bothner.com>
1675
1676 Conditionally compile support for --enable-mapped_location.
1677 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
1678 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
1679 adjustments - which I don't understand.
1680 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
1681 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
1682 (print_instantiation_partial_context): Use expand_location.
1683 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
1684 * name-lookup.c: Likewise.
1685 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
1686 * name-lookup.c: Use input_line macro.
1687 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
1688 (cp_parser_statement): Rename locaal variable statement_locus to
1689 statement_location and use SET_EXPR_LOCATION macro.
1690 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
1691 * tree.c (cp_walk_subtrees): Likewise.
1692
1693 2004-06-29 Per Bothner <per@bothner.com>
1694
1695 * tree.c (build_min_nt, build_min, build_min_non_dep):
1696 Don't set TREE_COMPLEXITY from input_line.
1697
1698 2004-06-29 Paul Brook <paul@codesourcery.com>
1699
1700 * init.c: Include target.h.
1701 (get_cookie_size): Remove and replace with target hook.
1702 Update callers.
1703 (build_new_1): Store the element size in the cookie.
1704
1705 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
1706
1707 PR c++/16260
1708 * parser.c (cp_parser_template_declaration_after_export): Disable
1709 access checks here ...
1710 (cp_parser_class_specifier): ... not here.
1711
1712 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1713
1714 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
1715 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
1716 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
1717 TREE_CHECK macro.
1718
1719 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1720
1721 * cp-tree.h (struct deferred_access): Move to ...
1722 * semantics.c (struct deferred_access): ... here. Adjust.
1723 (deferred_access_stack): Make a VEC(deferred_access),
1724 (deferred_access_free_list): Remove.
1725 (deferred_access_no_check): New.
1726 (push_deferring_access_checks, resume_deferring_access_checks,
1727 stop_deferring_access_checks, pop_deferring_access_checks,
1728 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
1729 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
1730
1731 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1732
1733 PR c++/16174
1734 * call.c (build_temp): Declare.
1735 (check_constructor_callable): New.
1736 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
1737 CONSTRUCTOR_CALLABLE.
1738 (convert_like_real, initialize_reference): Use
1739 check_constructor_callable.
1740 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
1741 (LOOKUP_*): Renumber.
1742
1743 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1744
1745 * friend.c (add_friend): Only perform access checks when context
1746 is a class.
1747 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
1748 * parser.c (cp_parser_class_specifier): Disable access checks here
1749 when parsing the body of a templated class.
1750 * semantics.c (perform_or_defer_access_checks): Reorder to allow
1751 NULL binfos when not checking access.
1752
1753 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1754
1755 Use vector API for vbase list.
1756 * cp-tree.h: Include vec.h
1757 (DEF_VEC_P (tree)): New type.
1758 (struct lang_type_class): Change vbase's member type.
1759 (binfo_for_vbase): Declare.
1760 * class.c (determine_primary_base, base_derived_from,
1761 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
1762 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
1763 build_vtbl_initializer): Adjust.
1764 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
1765 vbases.
1766 * init.c (sort_mem_initializers, expand_member_init,
1767 push_base_cleanups): Adjust.
1768 * method.c (do_build_copy_constructor): Adjust.
1769 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
1770 (binfo_for_vbase): New.
1771 * tree.c (copy_base_binfos): Adjust.
1772
1773 2004-06-28 Mark Mitchell <mark@codesourcery.com>
1774
1775 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
1776
1777 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1778
1779 PR c++/14123
1780 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
1781 paranthesis in case of pointers to array members.
1782 * error.c (dump_type_prefix): Likewise.
1783 (dump_type_suffix): Maybe issue a whitespace when printing
1784 ARRAY_TYPE.
1785
1786 2004-06-27 Mark Mitchell <mark@codesourcery.com>
1787
1788 PR c++/16193
1789 * parser.c (cp_parser_set_decl_spec_type): Refine test for
1790 redefinition of built-in types.
1791
1792 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1793
1794 * error.c (pp_template_argument_list_start): Remove.
1795 (pp_template_argument_list_end): Likewise.
1796 (pp_separate_with_comma): Use pp_cxx_separate_with.
1797 (reinit_global_formatting_buffer): Remove.
1798 (pp_non_consecutive_character): Likewise.
1799 (dump_scope): Use pp_cxx_colon_colon.
1800 (dump_template_parameter): Use pp_cxx_identifier,
1801 pp_cxx_tree_identifier and pp_cxx_whitespace.
1802 (dump_templat_bindings): Replace use of pp_string with sequence
1803 of pp_cxx_whitespace and pp_equal.
1804 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
1805 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
1806 padding here.
1807 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
1808 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
1809 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
1810 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
1811 pp_cxx_right_bracket, pp_cxx_identifier throughout,
1812 (dump_decl): Likewise.
1813 (dump_template_decl): Likewise.
1814 (dump_function_decl): Likewise. Set padding as appropriate.
1815 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
1816 pp_cxx_right_paren.
1817 (dump_exception_spec): Likewise.
1818 (dump_function_name): Use pp_cxx_tree_identifier and
1819 pp_cxx_identifier.
1820 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
1821 pp_cxx_end_template_argument_list.
1822 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
1823 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
1824 pp_cxx_whitespace throughout.
1825 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
1826 pp_cxx_right_paren.
1827 (dump_unary_op): Likewise.
1828 (reinit_cxx_pp): New function.
1829 (type_as_string); Use it.
1830 (expr_as_string): Likewise.
1831 (decl_as_string); Likewise.
1832 (context_as_string): Likewise.
1833 (lang_decl_name): Likewise.
1834 (decl_to_string): Likewise.
1835 (expr_to_string): Likewise.
1836 (parm_to_string): Likewise.
1837 (type_to_string): Likewise.
1838 (args_to_string): Likewise.
1839 (cv_to_string): Likewise.
1840
1841 2004-06-26 Mark Mitchell <mark@codesourcery.com>
1842
1843 * cp-tree.h (cp_cv_quals): New type.
1844 (cp_declarator): Use it instead of "tree" as appropriate.
1845 (grok_method_quals): Adjust prototype.
1846 (grokclassfn): Likewise.
1847 (do_friend): Likewise.
1848 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
1849 (grokdeclarator): Likewise.
1850 * decl2.c (grok_method_quals): Likewise.
1851 (grokclassfn): Likewise.
1852 * friend.c (do_friend): Likewise.
1853 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
1854 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
1855 (make_pointer_declarator): Likewise.
1856 (make_reference_declarator): Likewise.
1857 (make_ptrmem_declarator): Likewise.
1858 (cp_parser_ptr_operator): Likewise.
1859 (cp_parser_cv_qualifier_seq_opt): Likewise.
1860 (cp_parser_cv_qualifier_opt): Remove.
1861 (cp_parser_new_declarator_opt): Adjust call to
1862 cp_parser_ptr_operator.
1863 (cp_parser_conversion_declaration_opt): Likewise.
1864 (cp_parser_declarator): Use cp_cv_quals, not tree.
1865 (cp_parser_direct_declarator): Likewise.
1866
1867 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1868
1869 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
1870 Rename DECL_STMT to DECL_EXPR.
1871 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
1872 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
1873 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
1874
1875 2004-06-26 Jan Hubicka <jh@suse.cz>
1876
1877 PR C++/14865
1878 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
1879 reachability analysis.
1880
1881 2004-06-25 Mark Mitchell <mark@codesourcery.com>
1882
1883 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
1884 2004-06-23 change.
1885
1886 2004-06-25 Paul Brook <paul@codesourcery.com>
1887
1888 * decl2.c (get_guard): Call targetm.cxx.guard_type.
1889 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
1890
1891 2004-06-24 Mark Mitchell <mark@codesourcery.com>
1892
1893 * decl.c (grokdeclarator): Restore error messages about __thread.
1894 * parser.c (cp_parser_decl_specifier_seq): Likewise.
1895
1896 2004-06-24 Jason Merrill <jason@redhat.com>
1897
1898 PR c++/16115
1899 * decl.c (grokparms): Give the PARM_DECL reference type if the
1900 parameter is passed by invisible reference.
1901
1902 2004-06-24 Andreas Schwab <schwab@suse.de>
1903
1904 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
1905
1906 2004-06-23 Mark Mitchell <mark@codesourcery.com>
1907
1908 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
1909 (cp/decl.o): Likewise.
1910 (cp/decl2.o): Likewise.
1911 (cp/pt.o): Likewise.
1912 (cp/semantics.o): Likewise.
1913 * config-lang.in (gtfiles): Do not reference cp/lex.h.
1914 * class.c: Do not include lex.h.
1915 (add_implicitly_declared_members): Do not use
1916 adding_implicit_members.
1917 (check_bases_and_members): Do not talk about grok_x_components.
1918 * cp/cp-tree.h (adding_implicit_members): Remove.
1919 (cp_storage_class): New type.
1920 (cp_decl_spec): Likewise.
1921 (cp_decl_specifier_seq): Likewise.
1922 (cp_parameter_declarator): Use it for the decl_specifiers field.
1923 (check_tag_decl): Adjust prototype.
1924 (shadow_tag): Likewise.
1925 (groktypename): Likewise.
1926 (start_decl): Likewise.
1927 (start_function): Likewise.
1928 (start_method): Likewise.
1929 (grok_x_components): Remove.
1930 (grokfield): Adjust prototype.
1931 (grokbitfield): Likewise.
1932 (finish_member_class_template): Remove.
1933 * decl.c: Do not include lex.h.
1934 (adding_implicit_members): Do not define.
1935 (check_tag_decl): Do not use trees to represent decl-specifiers.
1936 (shadow_tag): Likewise.
1937 (groktypename): Likewise.
1938 (start_decl): Likewise.
1939 (grokvardecl): Likewise.
1940 (grokdeclarator): Likewise.
1941 (grokparms): Likewise.
1942 (start_function): Likewise.
1943 (start_method): Likewise.
1944 * decl.h (grokdeclarator): Adjust prototype.
1945 * decl2.c: Do not include lex.h.
1946 (grok_x_components): Remove.
1947 (grokfield): Do not use trees to represent decl-specifiers.
1948 (grokbitfield): Likewise.
1949 * lex.c: Do not include lex.h.
1950 * lex.h: Remove.
1951 * parser.c: Include target.h.
1952 (clear_decl_specs): New function.
1953 (cp_parser_translation_unit): Do not use trees to represent
1954 decl-specifiers.
1955 (cp_parser_postfix_expression): Likewise.
1956 (cp_parser_new_type_id): Likewise.
1957 (cp_parser_condition): Likewise.
1958 (cp_parser_simple_declaration): Likewise.
1959 (cp_parser_decl_specifier_seq): Likewise.
1960 (cp_parser_function_specifier_opt): Likewise.
1961 (cp_parser_conversion_type_id): Likewise.
1962 (cp_parser_template_parameter): Likewise.
1963 (cp_parser_explicit_instantiation): Likewise.
1964 (cp_parser_type_specifier): Likewise.
1965 (cp_parser_simple_type_specifier): Likewise.
1966 (cp_parser_init_declarator): Likewise.
1967 (cp_parser_type_id): Likewise.
1968 (cp_parser_type_specifier_seq): Likewise.
1969 (cp_parser_parameter_declaration): Likewise.
1970 (cp_parser_member_declaration): Likewise.
1971 (cp_parser_exception_declaration): Likewise.
1972 (cp_parser_function_definition_from_specifiers_and_declarator):
1973 Likewise.
1974 (cp_parser_single_declaration): Likewise.
1975 (cp_parser_save_member_function_body): Likewise.
1976 (cp_parser_friend_p): Likewise.
1977 (cp_parser_set_storage_class): New function.
1978 (cp_parser_set_decl_spec_type): Likewise.
1979 * pt.c: Do not include lex.h.
1980 * semantics.c: Likewise.
1981 (finish_member_class_template): Remove.
1982
1983 2004-06-23 Roger Sayle <roger@eyesopen.com>
1984
1985 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
1986 longer take both "args" and "convert_args" as arguments.
1987 (build_op_delete_call): Update call to build_cxx_call.
1988 (build_over_call): Likewise, update call to build_cxx_call.
1989 * cp-tree.h (build_cxx_call): Update funtion prototype.
1990 * typeck.c (build_function_call): Don't call expand_tree_builtin.
1991 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
1992 (throw_bad_typeid): Likewise.
1993 (build_dynamic_cast_1): Likewise.
1994
1995 2004-06-22 Richard Henderson <rth@redhat.com>
1996
1997 * class.c (build_vfn_ref): Take a pointer not object. Build
1998 an OBJ_TYPE_REF.
1999 (cp_fold_obj_type_ref): New.
2000 * call.c (build_over_call): Update build_vfn_ref call.
2001 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
2002 * cp-tree.h (cp_fold_obj_type_ref): Declare.
2003
2004 2004-06-21 Jason Merrill <jason@redhat.com>
2005
2006 PR c++/16112
2007 * cp-gimplify.c (cp_gimplify_init_expr): Look through
2008 CLEANUP_POINT_EXPR.
2009
2010 2004-06-21 Mark Mitchell <mark@codesourcery.com>
2011
2012 * cp-tree.def (NEW_EXPR): Add a fourth slot.
2013 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
2014 (TREE_PARMLIST): Likewise.
2015 (CALL_DECLARATOR_PARMS): Likewise.
2016 (CALL_DECLARATOR_QUALS): Likewise.
2017 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
2018 (cp_declarator_kind): New type.
2019 (cp_parameter_declarator): Likewise.
2020 (cp_declarator): Likewise.
2021 (cp_error_declarator): Likewise.
2022 (no_parameters): Likewise.
2023 (groktypename): Change prototype.
2024 (start_decl): Likewise.
2025 (start_handler_parms): Likewise.
2026 (get_scope_of_declarator): Likewise.
2027 (start_function): Likewise.
2028 (start_preparsed_function): New function.
2029 (start_function): Change prototype.
2030 (start_method): Likewise.
2031 (grokfield): Likewise.
2032 (grokbitfield): Likewise.
2033 (build_new): Likewise.
2034 (make_pointer_declarator): Remove.
2035 (make_reference_declarator): Likewise.
2036 (make_call_declarator): Likewise.
2037 (set_quals_and_spec): Likewise.
2038 (process_template_parm): Change prototype.
2039 (begin_function_definition): Remove.
2040 (finish_parmlist): Remove.
2041 * decl.c (groktypename): Do not use trees to represent
2042 declarators.
2043 (start_decl): Likewise.
2044 (start_handler_parms): Remove.
2045 (get_scope_of_declarator): Reimplement.
2046 (grokdeclarator): Do not use trees to represent declarators.
2047 (grokparms): Likewise.
2048 (start_function): Likewise.
2049 (start_method): Likewise.
2050 (build_void_list_mode): Do not use TREE_PARMLIST.
2051 * decl.h (grokdeclarator): Change prototype.
2052 * decl2.c (grok_method_quals): Robustify.
2053 (grok_x_components): Do not use trees to represent declarators.
2054 (grokfield): Likewise.
2055 (grokbitfield): Likewise.
2056 (start_objects): Build FUNCTION_DECLs, not declarators.
2057 (start_static_storage_duration_function): Likewise.
2058 * init.c (build_new): Simplify.
2059 * lex.c (make_pointer_declarator): Remove.
2060 (make_reference_declarator): Likewise.
2061 (make_call_declarator): Likewise.
2062 (set_quals_and_spec): Likewise.
2063 * method.c (use_thunk): Use start_preparsed_function.
2064 (synthesize_method): Likewise.
2065 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
2066 * optimize.c (maybe_clone_body): Use start_preparsed_function.
2067 * parser.c (cp_error_declarator): New variable.
2068 (declarator_obstack): Likewise.
2069 (alloc_declarator): New function.
2070 (make_declarator): Likewise.
2071 (make_id_declarator): Likewise.
2072 (make_pointer_declarator): Likewise.
2073 (make_reference_declarator): Likewise.
2074 (make_ptrmem_declarator): Likewise.
2075 (make_call_declarator): Likewise.
2076 (make_array_declarator): Likewise.
2077 (no_parameters): New variable.
2078 (make_parameter_declarator): Likewise.
2079 (cp_parser_check_for_definition_in_return_type): Do not use trees
2080 to represent declarators.
2081 (cp_parser_translation_unit): Likewise.
2082 (cp_parser_new_expression): Likewise.
2083 (cp_parser_new_type_id): Likewise.
2084 (cp_parser_new_declarator_opt): Likewise.
2085 (cp_parser_direct_new_declarator): Likewise.
2086 (cp_parser_condition): Likewise.
2087 (cp_parser_declaration_statement): Likewise.
2088 (cp_parser_declaration): Likewise.
2089 (cp_parser_conversion_type_id): Likewise.
2090 (cp_parser_conversion_declarator_opt): Likewise.
2091 (cp_parser_template_parameter_list): Likewise.
2092 (cp_parser_template_parameter): Likewise.
2093 (cp_parser_explicit_instantiation): Likewise.
2094 (cp_parser_init_declarator): Likewise.
2095 (cp_parser_declarator): Likewise.
2096 (cp_parser_direct_declarator): Likewise.
2097 (cp_parser_type_id): Likewise.
2098 (cp_parser_parameter_declaration_clause): Likewise.
2099 (cp_parser_parameter_declaration_list): Likewise.
2100 (cp_parser_parameter_declaration): Likewise.
2101 (cp_parser_member_declaration): Likewise.
2102 (cp_parser_exception_declaration): Likewise.
2103 (cp_parser_check_declarator_template_parameters): Likewise.
2104 (cp_parser_function_definition_from_specifiers_and_declarator):
2105 Likewise.
2106 (cp_parser_save_member_function_body): Likewise.
2107 * pt.c (process_template_parm): Add is_non_type parameter.
2108 (convert_template_argument): Adjust call to groktypename.
2109 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
2110 (tsubst): Do not expect declarators.
2111 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
2112 argument.
2113 (instantiate_decl): Use start_preparsed_function.
2114 * semantics.c (begin_function_definition): Remove.
2115 (finish_parmlist): Remove.
2116 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
2117 declarators.
2118
2119 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2120
2121 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
2122 (build_new_method_call): Likewise.
2123 * decl.c (local_variable_p_walkfn): Don't walk into types.
2124 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
2125 (build_anon_union_vars): Add new operand for COMPONENT_REF.
2126 * init.c (buld_new): Add new operand for ARRAY_REF.
2127 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
2128 (do_build_assign_ref): Likewise.
2129 * parser.c (cp_parser_direct_new_declarator): Add new operands
2130 for ARRAY_REF.
2131 (cp_parser_direct_declarator): Likewise.
2132 * pt.c (tsubst): Likewise.
2133 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
2134 for COMPONENT_REF.
2135 * semantics.c (finish_non_static_data_member): Add new operand
2136 for COMPONENT_REF.
2137 * typeck.c (build_class_member_access_expr): Likewise.
2138 (build_class_member_access_expr, finish_class_member_access_expr):
2139 Likewise.
2140 (build_ptrmemfunc_access_expr): Likewise.
2141 (build_array_ref): Add new operands for ARRAY_REF.
2142 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
2143 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
2144
2145 2004-06-21 Richard Henderson <rth@redhat.com>
2146
2147 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
2148 * parser.c (cp_parser_jump_statement): Update commentary.
2149 * pt.c (tsubst_expr): Use RETURN_EXPR.
2150 * semantics.c (finish_return_stmt): Likewise.
2151 (finalize_nrv_r): Likewise.
2152 * typeck.c, typeck2.c: Update file start commentary.
2153
2154 2004-06-21 Richard Henderson <rth@redhat.com>
2155
2156 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
2157
2158 2004-06-20 Richard Henderson <rth@redhat.com>
2159
2160 * cp-tree.h (add_decl_stmt): Declare.
2161 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
2162 * semantics.c (maybe_cleanup_point_expr): New.
2163 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
2164 finish_for_expr, finish_switch_cond): Use it.
2165 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
2166
2167 2004-06-20 Richard Henderson <rth@redhat.com>
2168
2169 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
2170 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
2171 (cp_gimplify_expr): Call it.
2172 (gimplify_cleanup_stmt): Move from c-gimplify.c.
2173 (cp_genericize): New.
2174 * decl.c (finish_function): Call it.
2175 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
2176 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
2177 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
2178 (cp_genericize): Declare.
2179 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
2180 * dump.c (cp_dump_tree): Likewise.
2181 * semantics.c (push_cleanup): Move from c-semantics.c.
2182
2183 2004-06-20 Zack Weinberg <zack@codesourcery.com>
2184
2185 * cp-lang.c (has_c_linkage): Implement.
2186
2187 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
2188 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
2189 (builtin_function_1): Don't call make_decl_rtl.
2190 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
2191 (grokvardecl): Don't call mangle_decl.
2192 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
2193 DECL_ASSEMBLER_NAME.
2194 * method.c (set_mangled_name_for_decl): Delete.
2195 * name-lookup.c (pushdecl): When a local extern shadows a
2196 file-scope declaration of the same object, give both DECLs the
2197 same DECL_UID.
2198 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
2199 on DECL_ASSEMBLER_NAME.
2200
2201 2004-06-19 Richard Henderson <rth@redhat.com>
2202
2203 * cp-gimplify.c: Remove unnecessary prototypes.
2204 (cp_gimplify_stmt): Merge into ...
2205 (cp_gimplify_expr): ... here. Move to end of file. Handle
2206 stmts_are_full_exprs_p frobbing.
2207 * cp-tree.h (cp_gimplify_stmt): Remove.
2208 * pt.c (tsubst_expr): Merge prep_stmt and unify.
2209 * tree.c (init_tree): Don't set lang_gimplify_stmt.
2210
2211 2004-06-18 Richard Henderson <rth@redhat.com>
2212
2213 PR c++/16034
2214 * semantics.c (begin_cond): New.
2215 (finish_cond): Rewrite to handle template DECL_STMTs specially.
2216 Assume that non-template decls go land before the conditional.
2217 (simplify_loop_decl_cond): Likewise.
2218 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
2219 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
2220 begin_switch_stmt, finish_switch_cond): Update to match.
2221
2222 2004-06-17 Jason Merrill <jason@redhat.com>
2223
2224 PR c++/16015
2225 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
2226 (finish_stmt_expr_expr): Update type after conversions.
2227 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
2228 Handle void initializer.
2229 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
2230
2231 2004-06-17 Geoffrey Keating <geoffk@apple.com>
2232
2233 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
2234 * cp-tree.h (defer_fn): Delete.
2235 * decl2.c (defer_fn): Delete.
2236 (finish_file): Simplify deferred_fns loops; check that
2237 only used inline functions get into deferred_fns.
2238 (mark_used): Inline previous contents of defer_fn.
2239
2240 2004-06-16 Richard Henderson <rth@redhat.com>
2241
2242 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
2243 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
2244 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
2245 of CTOR_INITIALIZER ...
2246 (pp_cxx_statement): ... here.
2247 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
2248 (finish_function): Use alloc_stmt_list to zap entire function.
2249 * parser.c (cp_parser_compound_statement): Update commentary.
2250 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
2251 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
2252 (finish_stmt_expr): Don't look through COMPOUND_STMT.
2253
2254 2004-06-16 Geoffrey Keating <geoffk@apple.com>
2255
2256 * pt.c (mark_decl_instantiated): Don't call defer_fn.
2257
2258 2004-06-16 Richard Henderson <rth@redhat.com>
2259
2260 * parser.c (cp_parser_labeled_statement): Update commentary.
2261 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
2262 * tree.c (mark_local_for_remap_r): Likewise.
2263
2264 2004-06-16 Richard Henderson <rth@redhat.com>
2265
2266 * parser.c (cp_parser_asm_definition): Update commentary.
2267 * pt.c (tsubst_expr): Use ASM_EXPR.
2268 * semantics.c (finish_asm_stmt): Likewise.
2269
2270 2004-06-16 Richard Henderson <rth@redhat.com>
2271
2272 * decl.c (finish_destructor_body): Use LABEL_EXPR.
2273 * parser.c (cp_parser_statement): Update commentary.
2274 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
2275 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
2276 * tree.c (mark_local_for_remap_r): Likewise.
2277
2278 2004-06-16 Richard Henderson <rth@redhat.com>
2279
2280 PR c++/16012
2281 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
2282 statement in FOR_INIT_STMT for templates.
2283
2284 2004-06-15 Richard Henderson <rth@redhat.com>
2285
2286 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
2287 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
2288 (genericize_try_block): Use gimplify_stmt.
2289 (genericize_catch_block, genericize_eh_spec_block): Likewise.
2290 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
2291 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
2292 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
2293 (cp_tree_chain_matters_p): Remove.
2294 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
2295 (COMPOUND_STMT_BODY_BLOCK): New.
2296 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
2297 (EXPR_STMT_STMT_EXPR_RESULT): New.
2298 (building_stmt_tree): Check cur_stmt_list.
2299 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
2300 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
2301 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
2302 (cp_finish_decl): Use push_cleanup.
2303 (start_function, finish_function): Use statement lists.
2304 (finish_stmt): Do nothing.
2305 * except.c (begin_eh_spec_block): Use statement lists.
2306 (check_handlers_1, check_handlers): Likewise.
2307 * init.c (construct_virtual_base): Don't add extra compound stmts.
2308 (build_vec_init): Likewise.
2309 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
2310 * name-lookup.h (struct cp_binding_level): Add statement_list.
2311 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
2312 (cp_parser_labeled_statement, cp_parser_expression_statement,
2313 cp_parser_statement_seq_opt): Likewise.
2314 (cp_parser_compound_statement): Likewise. Take bool for try block.
2315 (cp_parser_selection_statement): Tidy if processing.
2316 (cp_parser_already_scoped_statement): Rewrite to do what it says.
2317 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
2318 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
2319 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
2320 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
2321 (finish_cond): New, rewritten from FINISH_COND.
2322 (simplify_loop_decl_cond): New.
2323 (finish_expr_stmt): Avoid nested EXPR_STMTs.
2324 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
2325 begin_else_clause, finish_else_clause, finish_if_stmt,
2326 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
2327 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
2328 finish_for_cond, finish_for_stmt, begin_switch_stmt,
2329 finish_switch_cond, finish_switch_stmt, begin_try_block,
2330 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
2331 finish_handler_sequence, finish_function_handler_sequence,
2332 begin_handler, finish_handler_parms, finish_handler,
2333 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
2334 using statement lists.
2335 (begin_compound_stmt): Replace has_no_scope argument with flags.
2336 Update all callers. Use statement lists.
2337 (finish_compound_stmt): Likewise.
2338 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
2339 (current_scope_stmt_stack): Remove.
2340 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
2341 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
2342 Rewrite with statement lists.
2343
2344 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
2345
2346 * parser.c: Change all assignments of c_lex_string_translate
2347 to true and false to 1 and 0.
2348 (cp_lexer_read_token): Convert type of the translated string.
2349 (cp_parser_skip_to_closing_parentheses): Preserve original
2350 value of c_lex_string_translate, and set it to -1 while
2351 running.
2352 (cp_parser_cache_group): Likewise.
2353 (cp_parser_cache_group_1): Renamed.
2354 (cp_parser_asm_operand_list): Remove redundant setting of
2355 c_lex_string_translate.
2356 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
2357 Handle chained strings.
2358
2359 2004-06-12 Andrew Pinski <apinski@apple.com>
2360
2361 PR c++/14639
2362 Revert:
2363 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
2364
2365 * cp-tree.h: Fix typo.
2366
2367 * cp-tree.h: Include cgraph.h
2368 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
2369 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
2370
2371 2004-06-12 Jason Merrill <jason@redhat.com>
2372
2373 PR tree-optimization/14107
2374 * decl.c (finish_function): Warn about no return in all functions.
2375
2376 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
2377
2378 * cp-tree.h (struct language_function): Remove cannot_inline.
2379 * decl.c (save_function_data): cannot_inline is no more.
2380 (cxx_push_function_context): Likewise.
2381 * decl2.c (start_objects, start_static_storage_duration_function):
2382 Reset DECL_INLINE, set DECL_UNINLINABLE.
2383
2384 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2385
2386 PR c++/15967
2387 * search.c (lookup_field): Propagate the ambiguity list.
2388 (lookup_fnfields): Likewise.
2389
2390 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2391
2392 PR c++/15947
2393 * parser.c (cp_parser_template_name): Ctors/dtors never need a
2394 template keyword to disambiguate.
2395
2396 2004-06-14 Mark Mitchell <mark@codesourcery.com>
2397
2398 PR c++/15096
2399 * decl.c (grokdeclarator): Ignore pointer-to-members when
2400 computing template depth.
2401
2402 PR c++/14930
2403 * name-lookup.c (pushtag): Do not try to put class declarations in
2404 explicit specialization scopes.
2405
2406 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
2407
2408 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
2409
2410 2004-06-11 Mark Mitchell <mark@codesourcery.com>
2411
2412 PR c++/15862
2413 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
2414 bindings for undeclared built-ins.
2415
2416 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2417
2418 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
2419 appear at the correct location.
2420
2421 2004-06-10 Jason Merrill <jason@redhat.com>
2422
2423 PR c++/15875
2424 Revert:
2425 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2426 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2427 TREE_TYPE for non-dependent names.
2428 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2429 unknown_type_node as its TREE_TYPE.
2430 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2431 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2432 (dump_expr) <SCOPE_REF case>: Likewise.
2433
2434 2004-06-10 Mark Mitchell <mark@codesourcery.com>
2435
2436 PR c++/15227
2437 * parser.c (cp_parser_direct_declarator): Robustify.
2438
2439 PR c++/15877
2440 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
2441 constants in non-dependent contexts.
2442
2443 PR c++/14211
2444 PR c++/15076
2445 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
2446 necessary.
2447
2448 2004-06-10 Jakub Jelinek <jakub@redhat.com>
2449
2450 PR c++/14791
2451 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
2452 specially.
2453
2454 2004-06-09 Mark Mitchell <mark@codesourcery.com>
2455
2456 Revert:
2457 PR c++/15815
2458 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2459 * lex.c (handle_pragma_interface): Deprecate.
2460 (handle_pragma_implementation): Likewise.
2461
2462 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
2463
2464 * g++spec.c (lang_specific_driver): Remove check for -lm
2465 and -lmath when check it see if it was the math library.
2466
2467 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2468
2469 PR c++/7841
2470 * parser.c (cp_parser_direct_declarator): Reject constructor named
2471 as qualified template-id.
2472
2473 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2474
2475 PR c++/15815
2476 * lex.c (handle_pragma_interface): Deprecate.
2477 (handle_pragma_implementation): Likewise.
2478
2479 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2480
2481 PR c++/15766
2482 * parser.c (cp_parser_iteration_statement): Fix typo in error
2483 message.
2484
2485 PR c++/14777
2486 * pt.c (tsubst_default_argument): Do not defer access checks
2487 while substituting into the default argument.
2488
2489 PR c++/15554
2490 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
2491 constant in a non-dependent context.
2492
2493 PR c++/15057
2494 * except.c (build_throw): Ensure that temp_expr has been
2495 initialized.
2496
2497 2004-06-06 Roger Sayle <roger@eyesopen.com>
2498
2499 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
2500
2501 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2502
2503 PR c++/15503
2504 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
2505 'typename', and accept 'template'.
2506
2507 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
2508 Jan Hubicka <jh@suse.cz>
2509
2510 PR c++/14639
2511 * method.c (use_think): Do not mark thunk as referenced.
2512
2513 2004-06-03 Matt Austern <austern@apple.com>
2514
2515 PR c++/15428
2516 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
2517 is nonzero, and if we see a noninline definition of a key method,
2518 make the vtables nonweak.
2519
2520 2004-06-02 Matt Austern <austern@apple.com>
2521
2522 * cp-tree.h (instantiate_decl): new boolean parameter,
2523 undefined_ok. Current behavior is equivalent to its being 0.
2524 * decl2.c (mark_used): Add new argument when calling instantiate_decl
2525 * pt.c (mark_decl_instantiated): Unconditionally make
2526 instantiations explicit unconditionally
2527 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
2528 since mark_decl_instantiated now does it.
2529 (instantiate_class_member): New. Instantiate a member of an
2530 explicitly instantiated class template.
2531 (do_type_instantiation): Explicitly instantiate members of an
2532 explicitly instantiated class template.
2533 (instantiate_decl): if undefined_ok is nonzero, and if we're
2534 trying to explicitly instantiated a template with no definition,
2535 change it to an implicit instantiation.
2536 (instantiate_pending_templates): Add new argument to instantiate_decl.
2537 * tree.c (cp_cannot_inline_tree_fn): Likewise.
2538
2539 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
2540
2541 * cp-tree.h: Fix typo.
2542
2543 * cp-tree.h: Include cgraph.h
2544 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
2545 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
2546
2547 2004-06-01 Jason Merrill <jason@redhat.com>
2548
2549 PR c++/15142
2550 * call.c (call_builtin_trap): Remove type parm.
2551 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
2552 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
2553
2554 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2555
2556 PR c++/13092
2557 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2558 TREE_TYPE for non-dependent names.
2559 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2560 unknown_type_node as its TREE_TYPE.
2561 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2562 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2563 (dump_expr) <SCOPE_REF case>: Likewise.
2564
2565 2004-06-01 Richard Henderson <rth@redhat.com>
2566 Andrew Pinski <pinskia@physics.uc.edu>
2567
2568 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
2569 * parser.c (struct cp_parser): Remove in_offsetof.
2570 (cp_parser_new): Don't set it.
2571 (cp_parser_unary_expression): Don't check it.
2572 (cp_parser_postfix_open_square_expression): Split out from ...
2573 (cp_parser_postfix_expression): ... here.
2574 (cp_parser_postfix_dot_deref_expression): Likewise.
2575 (cp_parser_builtin_offsetof): New.
2576 (cp_parser_primary_expression): Use it.
2577
2578 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2579
2580 PR c++/14932
2581 * parser.c (cp_parser_postfix_expression): Allow subscript
2582 operator in offsetof.
2583
2584 2004-05-31 Mark Mitchell <mark@codesourcery.com>
2585
2586 PR c++/15701
2587 * friend.c (add_friend): Do not try to perform access checks for
2588 functions from dependent classes.
2589
2590 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2591
2592 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
2593 (pp_cxx_begin_template_argument_list): Turn into a function.
2594 (pp_cxx_end_template_argument_list): Likewise.
2595 (pp_cxx_separate_with): Define.
2596 (pp_cxx_unqualified_id): Tidy.
2597 (pp_cxx_primary_expression): Likewise.
2598 (pp_cxx_postfix_expression): Likewise.
2599 (pp_cxx_expression): Likewise.
2600 (pp_cxx_simple_type_specifier): Likewise.
2601 (pp_cxx_type_specifier_seq): Likewise.
2602 (pp_cxx_parameter_declaration_clause): Likewise.
2603 (pp_cxx_exception_specification): Likewise.
2604 (pp_cxx_direct_declarator): Likewise.
2605 (pp_cxx_type_id): Likewise.
2606 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
2607 cxx-pretty-print.c.
2608 (pp_cxx_left_paren): Likewise.
2609 (pp_cxx_right_paren): Likewise.
2610 (pp_cxx_left_brace): Likewise.
2611 (pp_cxx_right_brace): Likewise.
2612 (pp_cxx_left_bracket): Likewise.
2613 (pp_cxx_right_bracket): Likewise.
2614 (pp_cxx_dot): Likewise.
2615 (pp_cxx_identifier): Likewise.
2616 (pp_cxx_tree_identifier): Likewise.
2617 (pp_cxx_ampersand): New macro.
2618 (pp_cxx_star): Likewise.
2619 (pp_cxx_arrow): Likewise.
2620 (pp_cxx_semicolon): Likewise.
2621 (pp_cxx_complement): Likewise.
2622 (pp_cxx_begin_template_argument_list): Declaree.
2623 (pp_cxx_end_template_argument_list): Likewise.
2624 (pp_cxx_colon_colon): likewise.
2625
2626 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
2627
2628 * parser.c (cp_parser_simple_type_specifier): Explicitly test
2629 against NULL_TREE.
2630
2631 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
2632
2633 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
2634 typeck.c: Fix comment formatting.
2635
2636 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
2637
2638 * cp-lang.c (cp_expand_decl): Remove.
2639 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
2640
2641 2004-05-30 Andreas Jaeger <aj@suse.de>
2642
2643 * lang-specs.h: Add missing initializers for .ii.
2644
2645 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
2646
2647 * decl.c (cp_make_fname_decl): Free return value from
2648 fname_as_string.
2649
2650 2004-05-28 Mark Mitchell <mark@codesourcery.com>
2651
2652 PR c++/15083
2653 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
2654 even in a templat.e
2655 * init.c (build_new): Likewise.
2656
2657 PR c++/15640
2658 * name-lookup.c (arg_assoc): Robustify.
2659
2660 PR c++/15471
2661 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
2662 when determining the scope to use for a pointer to member.
2663 (lookup_anon_field): Give it external linkage.
2664 * cp-tree.h (lookup_anon_field): Declare it.
2665 * expr.c (cplus_expand_constant): Use it.
2666
2667 2004-05-28 Mark Mitchell <mark@codesourcery.com>
2668
2669 PR c++/14668
2670 * parser.c (cp_parser_simple_type_specifier): Call
2671 maybe_note_name_used_in_class.
2672
2673 2004-05-28 Tom Marshall <tmarshall@real.com>
2674
2675 PR c++/15214
2676 * class.c (finish_struct_1): Warn only if the dtor is non-private or
2677 the class has friends.
2678
2679 2004-05-27 Adam Nemet <anemet@lnxw.com>
2680
2681 PR c++/12883
2682 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
2683 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
2684
2685 2004-05-24 Geoffrey Keating <geoffk@apple.com>
2686
2687 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
2688 if it might be needed.
2689 * pt.c (mark_decl_instantiated): Only call defer_fn if
2690 the function actually needs processing in finish_file.
2691 * decl2.c (finish_file): Add check that elements in
2692 deferred_fns_used are really needed there. Remove unnecessary
2693 test of DECL_SAVED_TREE.
2694
2695 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
2696
2697 * Make-lang.in: No need to specify $(LIBCPP).
2698
2699 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2700
2701 PR c++/15044
2702 * parser.c (cp_parser_class_head): Robustify.
2703
2704 PR c++/15317
2705 * parser.c (cp_parser_decl_specifier_seq): Correct error in
2706 comment.
2707 (cp_parser_constructor_declarator_p): Treat attributes
2708 as decl-specifiers.
2709
2710 PR c++/15329
2711 * typeck.c (build_unary_op): Do not attempt to resolve casts to
2712 base classes in templates.
2713
2714 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2715
2716 PR c++/15165
2717 * pt.c (instantiate_template): Robustify.
2718
2719 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2720
2721 PR c++/15025
2722 * decl.c (xref_tag): Issue errors about redeclaring template
2723 classes as non-template classes.
2724
2725 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2726
2727 PR c++/14821
2728 * name-lookup.c (supplement_binding): Allow redefinitions of
2729 namespace aliases.
2730
2731 PR c++/14883
2732 * parser.c (cp_parser_template_argument): Robustify.
2733
2734 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2735
2736 * class.c (alter_access): Use %E format specifier to print an
2737 identifier node. Avoid looking at the IDENTIFIER_POINTER.
2738 (push_lang_context): Likewise.
2739 * decl.c (lookup_label): Likewise.
2740 (grokdeclarator): Likewise.
2741 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
2742 * pt.c (do_type_instantiation): Likewise.
2743 * tree.c (handle_java_interface_attribute): Likewise.
2744 (handle_com_interface_attribute): Likewise.
2745 (handle_init_priority_attribute): Likewise.
2746
2747 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2748
2749 PR c++/15285
2750 PR c++/15299
2751 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
2752 recognized as overloaded functions.
2753
2754 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2755
2756 PR c++/15507
2757 * class.c (layout_nonempty_base_or_field): Do not try to avoid
2758 layout conflicts for unions.
2759
2760 PR c++/15542
2761 * typeck.c (build_x_unary_op): Instantiate template class
2762 specializations before looking for "operator &".
2763
2764 PR c++/15427
2765 * typeck.c (complete_type): Layout non-dependent array types, even
2766 in templates.
2767
2768 PR c++/15287
2769 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
2770 template.
2771
2772 2004-05-22 Roger Sayle <roger@eyesopen.com>
2773
2774 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
2775 returning when TREE_TYPE is error_mark_node.
2776 * typeck.c (require_complete_type): Return error_mark_node if
2777 value's type is an error_mark_node.
2778
2779 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
2780
2781 * optimize.c (calls_setjmp_r): Remove.
2782 (calls_setjmp_p): Remove.
2783 * cp-tree.c (calls_setjmp_p): Remove.
2784 * decl.c (finish_function): Do not call calls_setjmp_p.
2785
2786 2004-05-18 Zack Weinberg <zack@codesourcery.com>
2787
2788 * decl.c (cp_finish_decl): Use mark_decl_referenced.
2789 * decl2.c (maybe_make_one_only): Likewise.
2790 * method.c (use_thunk): Likewise.
2791
2792 2004-05-18 Jason Merrill <jason@redhat.com>
2793
2794 * class.c (build_base_path): Tidy a bit.
2795
2796 2004-05-14 Geoffrey Keating <geoffk@apple.com>
2797
2798 * name-lookup.c (struct scope_binding): New.
2799 (EMPTY_SCOPE_BINDING): New.
2800 (lookup_using_namespace): Take a scope_binding instead of a
2801 cxx_binding.
2802 (qualified_lookup_using_namespace): Likewise.
2803 (cxx_binding_clear): Delete.
2804 (do_nonmember_using_decl): Use a scope_binding instead of a
2805 cxx_binding.
2806 (lookup_tag): Don't call select_decl.
2807 (ambiguous_decl): Don't return anything (and change callers to match).
2808 Take a scope_binding as the second parameter.
2809 (lookup_namespace_name): Use a scope_binding instead of a
2810 cxx_binding.
2811 (unqualified_namespace_lookup): Likewise.
2812 (lookup_qualified_name): Likewise.
2813 (select_decl): Take a scope_binding instead of a cxx_binding.
2814 Use macros rather than hand-coding tests for type-ness.
2815
2816 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2817
2818 * cp-gimplify.c: Rename from cp-simplify.c.
2819 * Make-lang.in, optimize.c: Update.
2820
2821 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2822
2823 Merge from tree-ssa-20020619-branch. See
2824 ChangeLog.tree-ssa for details.
2825
2826 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
2827 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
2828 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
2829 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
2830 Merged.
2831 * cp-mudflap.c: New file.
2832 * cp-simplify.c:: New file.
2833
2834 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2835
2836 PR c++/14389
2837 * decl2.c (check_classfn): For member templates, compare also the
2838 template parameters to match the declaration.
2839 * cp-tree.h: Adjust declaration of check_classfn.
2840 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
2841 * friend.c (do_friend): Likewise.
2842 * pt.c (tsubst_friend_function): Likewise.
2843
2844 2004-05-01 Zack Weinberg <zack@codesourcery.com>
2845
2846 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
2847 Instead, dig into the representation type to find the array bound.
2848
2849 2004-04-30 Jason Merrill <jason@redhat.com>
2850
2851 Refer to base members using COMPONENT_REFs where possible.
2852 * class.c (build_simple_base_path): New fn.
2853 (build_base_path): Use it for non-virtual base references.
2854 (layout_class_type): Change base fields to their real type
2855 after layout is done.
2856 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
2857 * cp-lang.c (cxx_get_alias_set): Use it.
2858
2859 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
2860
2861 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
2862 comment typos.
2863
2864 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2865
2866 PR c++/15064
2867 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
2868 used in integral constant expressions.
2869
2870 2004-04-22 Mark Mitchell <mark@codesourcery.com>
2871
2872 * init.c (build_aggr_init): Fix accidental use of C99 construct in
2873 previous change.
2874
2875 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
2876 braced initializer.
2877 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
2878 * decl.c (reshape_init): Use it.
2879 * init.c (perform_member_init): Remove redundant condition.
2880 (build_aggr_init): Adjust to handle brace-enclosed initializers
2881 correctly.
2882 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2883
2884 * parser.c (cp_parser_initializer_clause): Do not set
2885 TREE_HAS_CONSTRUCTOR on the initializer.
2886 * rtti.c (tinfo_base_init): Likewise.
2887 (generic_initializer): Likewise.
2888 (ptr_initializer): Likewise.
2889 (ptm_initializer): Likewise.
2890 (class_initializer): Likewise.
2891 (get_pseudo_ti_init): Likewise.
2892 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2893
2894 2004-04-22 Alan Modra <amodra@bigpond.net.au>
2895
2896 * name-lookup.c (anonymous_namespace_name): Make static.
2897
2898 2004-04-19 Roger Sayle <roger@eyesopen.com>
2899
2900 PR middle-end/14531
2901 * class.c (build_base_path): Call fold whilst building the NULL
2902 pointer check expression trees.
2903
2904 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
2905
2906 * init.c (build_new_1): Don't use type size argument for Java
2907 _Jv_AllocObject call.
2908
2909 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
2910
2911 * method.c (make_alias_for_thunk): Remove preprocessor guard on
2912 declaration and definition.
2913
2914 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
2915
2916 PR c++/14808
2917 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
2918 than ASM_OUTPUT_DEF.
2919
2920 2004-04-08 Jakub Jelinek <jakub@redhat.com>
2921
2922 * decl2.c (mark_used): Don't segfault if cfun != NULL but
2923 current_function_decl == NULL.
2924
2925 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
2926
2927 PR c++/3518
2928 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
2929 level.
2930
2931 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2932
2933 * init.c (decl_constant_value): Don't look at DECL_INITIAL
2934 of PARM_DECL.
2935 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
2936 or TREE_SIDE_EFFECTS of a type.
2937
2938 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
2939
2940 PR c++/14007
2941 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
2942 cv-qualifier unification.
2943 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
2944
2945 2004-04-02 Jan Hubicka <jh@suse.cz>
2946
2947 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
2948 * cp-tree.h (cp_update_decl_after_saving): Declare.
2949 * tree.c (cp_update_decl_after_saving): Define.
2950
2951 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2952
2953 PR c++/14803
2954 * typeck.c (get_delta_difference): Call fold before returning the
2955 value.
2956
2957 2004-04-01 Richard Henderson <rth@redhat.com>
2958
2959 PR c++/14804
2960 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
2961 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
2962
2963 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2964
2965 PR c++/14810
2966 * name-lookup.c (maybe_push_cleanup_level): Robustify.
2967
2968 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2969
2970 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
2971
2972 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2973
2974 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
2975 * class.c (check_bitfield_decl): Likewise.
2976 * cvt.c (type_promotes_to): Likewise.
2977 * decl.c (finish_enum): Likewise.
2978 * mangle.c (write_builtin_type): Likewise.
2979 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
2980 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
2981 (build_binary_op): Likewise.
2982
2983 2004-03-31 Jan Hubicka <jh@suse.cz>
2984
2985 * tree.h (optimize_function): Kill prototype.
2986 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
2987 * semantics.c (expand_body): Kill.
2988
2989 2004-03-30 Mark Mitchell <mark@codesourcery.com>
2990
2991 PR c++/14724
2992 * decl.c (start_decl_1): Do not decide whether or not to create a
2993 new cleanup level until after the type has been completed.
2994
2995 PR c++/14763
2996 * pt.c (tsubst_default_argument): Clear current_function_decl.
2997
2998 2004-03-30 Zack Weinberg <zack@codesourcery.com>
2999
3000 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
3001
3002 2004-03-29 Zack Weinberg <zack@codesourcery.com>
3003
3004 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
3005 is null, just print the literal name and return.
3006
3007 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
3008
3009 * cxx-pretty-print.c: Fix comment typos.
3010
3011 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
3012
3013 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
3014 Update copyright.
3015
3016 2004-03-23 Ziemowit Laski <zlaski@apple.com>
3017
3018 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
3019 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
3020 target hook.
3021
3022 2004-03-23 Zack Weinberg <zack@codesourcery.com>
3023
3024 PR 12267, 12391, 12560, 13129, 14114, 14133
3025 * cp-lang.c (c_reset_state): Delete.
3026 (push_file_scope, pop_file_scope): New stubs.
3027 * parser.c (c_parse_file): Call sorry() here if called more than once.
3028
3029 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3030
3031 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
3032 for INTEGER_CST.
3033
3034 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3035
3036 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
3037
3038 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3039
3040 * error.c (enum pad): Remove.
3041 (dump_qualifiers): Likewise.
3042 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
3043 (dump_aggr_type): Likewise.
3044 (dump_type_suffix): Likewise.
3045 (dump_simple_decl): Likewise.
3046 (dump_function_decl): Likewise.
3047 (cv_to_string): Likewise.
3048 (dump_type_prefix): Likewise. Adjust return void.
3049 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
3050 cxx_pretty_print.h.
3051 (pp_cxx_template_keyword_if_needed): Document.
3052 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
3053 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
3054 MUST_NOT_THROW_EXPR.
3055
3056 2004-03-21 Mark Mitchell <mark@codesourcery.com>
3057
3058 PR c++/14616
3059 * decl.c (cp_finish_decl): Compute the size of arrays declared in
3060 templates, if their type is non-dependent.
3061
3062 2004-03-19 Mark Mitchell <mark@codesourcery.com>
3063
3064 * call.c (build_op_delete_call): Do not forget the placement
3065 arguments when iterating through mutiple delete operators.
3066
3067 * cp-tree.h (svaed_scope): Remove last_parms.
3068 (NEW_DELETE_OPNAME_P): New macro.
3069 (last_function_parms): Remove.
3070 (do_friend): Adjust prototype.
3071 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
3072 using last_function_parms.
3073 (grokfndecl): Take the PARM_DECLs as an argument, rather than
3074 using last_function_parms.
3075 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
3076 for class-specific operator new and operator delete.
3077 (grok_op_properties): Do not look for allocation functions with
3078 METHOD_TYPEs.
3079 (start_function): Use DECL_ARGUMENTS instead of
3080 last_function_parms.
3081 * decl.h (last_function_parms): Do not declare.
3082 * decl2.c (grokclassfn): Do not use last_function_parms.
3083 * friend.c (do_friend): Remove parmdecls parameter.
3084 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
3085 (pop_from_top_level): Do not restore it.
3086 * pt.c (check_explicit_specialization): Do not adjust
3087 last_function_parms.
3088
3089 * name-lookup.c (do_local_using_decl): Create a local binding for
3090 types brought in via using declarations.
3091
3092 * name-lookup.c (lookup_arg_dependent): Handle block-scope
3093 function declarations correctly.
3094
3095 * semantics.c (finish_id_expression): Correct handling of
3096 conversion operators to dependent types.
3097
3098 * typeck.c (lookup_destructor): Allow the use of destructors from
3099 base classes.
3100
3101 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3102
3103 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
3104 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
3105 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
3106 the field is named TEMPLATE_TYPE_PARM_INDEX.
3107
3108 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3109
3110 PR c++/14545
3111 * parser.c (cp_parser_functional_cast): A cast to anything
3112 but integral or enumaration type is not an integral constant
3113 expression.
3114 * pt.c (value_dependent_expression_p): Handle cast expressions
3115 without operands (such as "int()").
3116
3117 2004-03-18 Mark Mitchell <mark@codesourcery.com>
3118
3119 * semantics.c (finish_pseudo_destructor_expr): Allow differing
3120 cv-qualification between the type named by the
3121 pseudo-destructor-name and the object-type.
3122
3123 * search.c (accessible_base_p): Handle non-proper bases.
3124
3125 * name-lookup.c (do_nonmember_using_decl): If a using declaration
3126 refers to a single overloaded function, set the type of the
3127 function.
3128 * tree.c (lvalue_type): Simplify.
3129 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
3130 unknown type.
3131 (build_unary_op): Handle OVERLOADs with known types.
3132
3133 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
3134 function templates.
3135
3136 * parser.c (cp_parser_postfix_expression): Handle the use of
3137 "typename" in non-dependent contexts. Convert appropriately when
3138 when using a qualified name after "->" or ".".
3139
3140 * call.c (conditional_conversion): Honor the requirement that some
3141 conversions refer to the original object.
3142
3143 2004-03-18 Mark Mitchell <mark@codesourcery.com>
3144
3145 * call.c (build_conditional_expr): Do not call force_rvalue for
3146 operands of void_type when the conditional expression itself has
3147 void type.
3148 * name-lookup.c (pushdecl): Don't consider a declaration of a
3149 function named "main" to be an overload of a type named "main".
3150 * parser.c (cp_parser_template_name): Perform name lookup when the
3151 template name is proceeded by "template" if the qualifying scope
3152 is non-dependent.
3153 * typeck.c (composite_pointer_type_r): Correctly handle
3154 pointer-to-member types.
3155 (build_const_cast): Likewise.
3156
3157 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3158
3159 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
3160 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
3161 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
3162 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
3163 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
3164 (TYPEOF_TYPE_EXPR): New macro.
3165 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
3166 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
3167 * pt.c (tsubst): Likewise.
3168 * semantics.c (finish_typeof): Likewise.
3169 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
3170 and TEMPLATE_TYPE_PARM.
3171 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
3172 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
3173
3174 2004-03-16 Mark Mitchell <mark@codesourcery.com>
3175
3176 PR c++/14586
3177 * cp-tree.h (build_new_op): Change prototype.
3178 (build_x_binary_op): Likewise.
3179 * call.c (build_new_op): Add overloaded_p parameter.
3180 * decl2.c (grok_array_decl): Adjust call to build_new_op.
3181 * parser.c (cp_parser_binary_expression): Note that uses of
3182 overloaded operators prevents an expression from being considered
3183 an integral constant.
3184 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
3185 build_x_binary_op.
3186 * semantics.c (finish_call_expr): Likewise.
3187 * typeck.c (rationalize_conditional_expr): Likewise.
3188 (build_x_indirect_ref): Likewise.
3189 (build_x_binary_op): Likewise.
3190 (build_x_unary_op): Likewise.
3191 (build_x_compound_expr): Likewise.
3192 (build_modify_expr): Likewise.
3193 * typeck2.c (build_x_arrow): Likewise.
3194
3195 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
3196
3197 * cp-lang.c, ptree.c: Update copyright.
3198
3199 2004-03-13 Mark Mitchell <mark@codesourcery.com>
3200
3201 PR c++/14550
3202 * parser.c (cp_parser_non_integral_constant_expression): Encode
3203 more of the idiom that surrounded calls to this function within
3204 the function itself
3205 (cp_parser_primary_expression): Adjust accordingly.
3206 (cp_parser_postfix_expression): Likewise.
3207 (cp_parser_unary_expression): Likewise.
3208 (cp_parser_cast_expression): Likewise.
3209 (cp_parser_assignment_expression): Likewise.
3210 (cp_parser_expression): Likewise.
3211 (cp_parser_new_expression): Note that new-expressions are not
3212 allowed in integral constant expressions.
3213 (cp_parser_delete_expression): Likewise.
3214
3215 2004-03-12 Matt Austern <austern@apple.com>
3216
3217 * decl2.c (maybe_make_one_only): Look at
3218 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
3219 to make an explicit instantiation weak.
3220 * method.c (use_thunk): Make sure we call comdat_linkage
3221 when appropriate.
3222 * pt.c (do_type_instantiation): On systems where weak symbols
3223 don't go in a static archive's TOC, explicit instantiation of a
3224 class must imply *explicit* instantiation of its memeber.
3225
3226 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
3227
3228 * call.c, cp-tree.h, pt.c: Fix comment typos.
3229
3230 2004-03-10 Mark Mitchell <mark@codesourcery.com>
3231
3232 PR c++/14510
3233 * decl.c (xref_tag): Disregard non-type declarations when
3234 looking up a tagged type.
3235
3236 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
3237
3238 PR c++/14397
3239 * call.c (convert_like_real): Build a const qualified temporary,
3240 when testing ctor access.
3241
3242 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3243
3244 * call.c (initialize_reference): Fix typo.
3245
3246 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3247
3248 PR c++/14409
3249 * pt.c (determine_specialization): For member templates, match also
3250 constness.
3251
3252 PR c++/14448
3253 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
3254 non-dependent.
3255 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
3256
3257 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3258
3259 PR c++/14230
3260 * call.c (initialize_reference): Handle initializers that are
3261 class-member access expressions applies to rvalues.
3262
3263 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3264
3265 PR c++/14432
3266 * name-lookup.c (supplement_binding): Ignore functions that are
3267 marked DECL_ANTICIPATED.
3268
3269 2004-03-08 Mark Mitchell <mark@codesourcery.com>
3270
3271 PR c++/14401
3272 * class.c (check_field_decls): Complain about non-static data
3273 members of reference type in unions. Propagate
3274 CLASSTYPE_REF_FIELDS_NEED_INIT and
3275 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
3276 data members.
3277 * init.c (perform_member_init): Complain about mbmers with const
3278 type that are not explicitly initialized.
3279
3280 2004-03-08 Mark Mitchell <mark@codesourcery.com>
3281
3282 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
3283 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
3284 (lang_identifier): Remove implicit_decl and error_locus.
3285 (IDENTIFIER_IMPLICIT_DECL): Remove.
3286 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
3287 (IDENTIFIER_ERROR_LOCUS): Likewise.
3288 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
3289 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
3290 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
3291 (implicitly_declare): Remove.
3292 * decl.c (warn_extern_redeclared_static): Remove check of
3293 IDENTIFIER_IMPLICIT_DECL.
3294 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
3295 (implicitly_declare): Remove.
3296 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
3297 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
3298 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
3299 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
3300 in the innermost scope, rather than at namespace scope.
3301 * name-lookup.c (push_local_binding): Give it external linkage.
3302 (pushdecl): Remove dead code.
3303 * name-lookup.h (push_local_binding): Declare it.
3304 * ptree.c (cxx_print_identifier): Don't print
3305 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
3306 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
3307 not IDENTIFIER_ERROR_LOCUS.
3308 * typeck.c (build_function_call): Remove dead code.
3309
3310 2004-03-08 Jason Merrill <jason@redhat.com>
3311
3312 PR c++/13170
3313 * decl.c (xref_tag): Remove attribute handling.
3314 * cp-tree.h: Adjust prototype.
3315 * decl.c, parser.c, rtti.c: Adjust callers.
3316 * parser.c (cp_parser_class_head): Pass back attributes in the
3317 class head.
3318 (cp_parser_class_specifier): Adjust.
3319
3320 2004-03-08 Matt Austern <austern@apple.com>
3321
3322 PR debug/14079
3323 * name-lookup.c (add_decl_to_level): Add extern variables, as well
3324 as static, to static_decls array.
3325
3326 2004-03-05 Jason Merrill <jason@redhat.com>
3327
3328 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
3329
3330 2004-03-04 Geoffrey Keating <geoffk@apple.com>
3331
3332 * decl.c (grokfndecl): Update old incorrect comment.
3333 (grokvardecl): Diagnose C++ variables of type with no linkage.
3334
3335 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3336
3337 PR c++/14369
3338 * pt.c (build_non_dependent_expr): Do not create a
3339 NON_DEPENDENT_EXPR for a THROW_EXPR.
3340
3341 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
3342
3343 PR c++/14369
3344 * error.c (dump_expr): Handle THROW_EXPR.
3345
3346 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3347
3348 PR c++/14360
3349 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
3350 lookup if ordinary name-lookup finds a non-function.
3351 * pt.c (tsubst_copy_and_build): Likewise.
3352
3353 PR c++/14361
3354 * parser.c (cp_parser_late_parsing_default_args): Check that there
3355 are no extra tokens after the end of the default-argument
3356 expression.
3357
3358 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3359
3360 PR c++/14324
3361 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
3362 having C++ linkage for name-mangling purposes.
3363
3364 PR c++/14260
3365 * parser.c (cp_parser_direct_declarator): Recognize constructor
3366 declarators that use a template-id to name the class being
3367 constructed.
3368
3369 PR c++/14337
3370 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
3371 (tsubst_expr): Do not call tsubst_copy, even when
3372 processing_template_decl.
3373
3374 2004-03-01 Jeff Law <law@redhat.com>
3375
3376 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
3377 the proper type.
3378
3379 2004-02-29 Mark Mitchell <mark@codesourcery.com>
3380
3381 PR c++/14138
3382 * name-lookup.h (push_scope): Change prototype.
3383 * name-lookup.c (push_scope): Do not reenter the current class
3384 scope.
3385 * decl.c (grokfndecl): Check return code from push_scope before
3386 calling pop_scope.
3387 * decl2.c (check_classfn): Likewise.
3388 * parser.c (cp_parser_conversion_function_id): Likewise.
3389 (cp_parser_init_declarator): Likewise.
3390 (cp_parser_direct_declarator): Likewise.
3391 (cp_parser_class_specifier): Likewise.
3392 (cp_parser_class_head): Likewise.
3393 (cp_parser_lookup_name): Likewise.
3394 (cp_parser_constructor_declarator_p): Likewise.
3395 * pt.c (instantiate_class_template): Likewise.
3396 (resolve_typename_type): Likewise.
3397
3398 2004-02-29 Mark Mitchell <mark@codesourcery.com>
3399
3400 PR c++/14267
3401 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
3402 extension.
3403
3404 PR debug/12103
3405 * class.c (update_vtable_entry_for_fn): Do not go through
3406 covariance machinery if the type returned by an overrider is the
3407 same as the original.
3408
3409 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
3410
3411 * call.c: Fix a comment typo.
3412
3413 2004-02-27 Ziemowit Laski <zlaski@apple.com>
3414
3415 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
3416
3417 2004-02-26 Mark Mitchell <mark@codesourcery.com>
3418
3419 PR c++/14278
3420 * parser.c (cp_parser_parameter_declaration_list): Commit
3421 to fewer tentative parses.
3422
3423 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3424
3425 PR c++/14284
3426 * pt.c (dependent_type_p_r): A template template parameter is a
3427 dependent type.
3428
3429 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3430
3431 PR c++/14246
3432 * mangle.c (write_template_arg_literal): Don't rely on identity for
3433 boolean constants.
3434
3435 2004-02-24 Jason Merrill <jason@redhat.com>
3436
3437 * tree.c (build_exception_variant): Use check_qualified_type.
3438
3439 2004-02-23 Zack Weinberg <zack@codesourcery.com>
3440 Kazu Hirata <kazu@cs.umass.edu>
3441
3442 * decl.c (cxx_init_decl_processing): Don't check
3443 flag_writable_strings.
3444
3445 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
3446
3447 PR c++/14156
3448 * typeck.c (maybe_warn_about_returning_address_of_location):
3449 Change check for VAR_DECL to use DECL_P instead.
3450
3451 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3452
3453 PR c++/14250
3454 * cvt.c (build_expr_type_conversion): Type must be complete before
3455 looking up for conversions.
3456
3457 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3458
3459 PR c++/14143
3460 * name-lookup.c (arg_assoc_class): Don't look into template
3461 arguments if it is not a primary template.
3462
3463 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3464
3465 PR c++/12007
3466 * method.c (use_thunk): Always clone function argument tree.
3467
3468 2004-02-20 Mark Mitchell <mark@codesourcery.com>
3469
3470 PR c++/14199
3471 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
3472
3473 PR c++/14173
3474 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
3475 for all type variants.
3476
3477 2004-02-19 Mark Mitchell <mark@codesourcery.com>
3478
3479 PR c++/13927
3480 * decl.c (duplicate_decls): Return error_mark_node for invalid
3481 redeclarations.
3482 * name-lookup.c (push_namespace): Ignore the return value from
3483 pushdecl.
3484 * pt.c (push_template_decl_real): Robustify.
3485
3486 PR c++/14186
3487 * name-lookup.c (push_class_level_binding): Do not complain about
3488 adding a binding for a member whose name is the same as the
3489 enclosing class if the member is located in a base class of the
3490 current class.
3491
3492 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3493
3494 PR c++/14181
3495 * parser.c (cp_parser_new_expression): Parse an ill-formed
3496 direct-new-declarator after a parenthesized type-id to emit good
3497 diagnostic.
3498
3499 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
3500
3501 * cp-tree.def, cvt.c: Update copyright.
3502
3503 2004-02-17 Mark Mitchell <mark@codesourcery.com>
3504
3505 PR c++/11326
3506 * cp-tree.h (abi_version_at_least): Remove.
3507 * mangle.c: Include flags.h.
3508
3509 2004-02-15 Mark Mitchell <mark@codesourcery.com>
3510
3511 PR c++/13971
3512 * call.c (build_conditional_expr): Handle conversions between
3513 class types which result in differently cv-qualified type
3514 variants.
3515
3516 PR c++/14086
3517 * class.c (delete_duplicate_fields_1): Remove.
3518 (delete_duplicate_fields): Likewise.
3519 (finish_struct_anon): Remove check for members with the same name
3520 as their enclosing class.
3521 (check_field_decls): Do not call duplicate_fields.
3522 * decl.c (grokdeclarator): Remove check for static data members
3523 with the same name as their enclosing class.
3524 * name-lookup.c (push_class_level_binding): Check for members with
3525 the same name as their enclosing class.
3526
3527 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
3528
3529 PR c++/14085
3530 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
3531
3532 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3533
3534 PR c++/13635
3535 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
3536 has full set of arguments.
3537
3538 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3539
3540 PR c++/13927
3541 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
3542
3543 2004-02-13 Mark Mitchell <mark@codesourcery.com>
3544
3545 PR c++/14122
3546 * cp-tree.h (delete_sanity): Change prototype.
3547 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
3548 Remove dead code. Adjust code to warn about deleting an array.
3549 * typekc.c (decay_conversion): Use build_address and build_nop.
3550
3551 PR c++/14108
3552 * search.c (accessible_p): Do not check access in thunks.
3553
3554 PR c++/14083
3555 * call.c (build_conditional_expr): Call force_rvalue on the
3556 non-void operand in the case that one result is a throw-expression
3557 and the other is not.
3558
3559 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
3560
3561 PR c++/9851
3562 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
3563 the type name and look ahead for ::~, and bail out early with a
3564 better error message if the parse is going to fail.
3565
3566 2004-02-12 Mark Mitchell <mark@codesourcery.com>
3567
3568 * call.c (conversion_kind): New type.
3569 (conversion_rank): Likewise.
3570 (conversion): Likewise.
3571 (CONVERSION_RANK): New macro.
3572 (conversion_obstack): New variable.
3573 (obstack_initialized): Likewise.
3574 (z_candidate): Change type of convs and second_conv.
3575 (candidate_warning): New type.
3576 (IDENTITY_RANK): Remove.
3577 (EXACT_RANK): Likewise.
3578 (PROMO_RANK): Likewise.
3579 (STD_RANK): Likewise.
3580 (PBOOL_RANK): Likewise.
3581 (USER_RANK): Likewise.
3582 (ELLIPSIS_RANK): Likewise.
3583 (BAD_RANK): Likewise.
3584 (ICS_RANK): Likewise.
3585 (ICS_STD_RANK): Likewise.
3586 (ICS_USER_FLAG): Likewise.
3587 (ICS_ELLIPSIS_FLAG): Likewise.
3588 (ICS_THIS_FLAG): Likewise.
3589 (ICS_BAD_FLAG): Likewise.
3590 (NEED_TEMPORARY_P): Likewise.
3591 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
3592 (USER_CONV_CAND): Likewise.
3593 (USER_CONV_FN): Likewise.
3594 (conversion_obstack_alloc): New function.
3595 (alloc_conversion): Likewise.
3596 (validate_conversion_obstack): Likewise.
3597 (alloc_conversions): Likewise.
3598 (build_conv): Adjust to deal with new conversion data structures.
3599 (build_identity_conv): New function.
3600 (build_ambiguous_conv): Likewise.
3601 (standard_conversion): Adjust to deal with new conversion data
3602 structures.
3603 (convert_class_to_reference): Likewise.
3604 (direct_reference_binding): Likewise.
3605 (reference_binding): Likewise.
3606 (implicit_conversion): Likewise.
3607 (add_candidate): Likewise.
3608 (add_function_candidate): Likewise.
3609 (add_conv_candidate): Likewise.
3610 (build_builtin_candidate): Likewise.
3611 (print_z_candidate): Likewise.
3612 (merge_conversion_sequences): Likewise.
3613 (build_user_type_conversion_1): Likewise.
3614 (build_user_type_conversion): Likewise.
3615 (build_new_function_call): Likewise.
3616 (build_object_call): Likewise.
3617 (conditional_conversion): Likewise.
3618 (build_conditional_expr): Likewise.
3619 (build_new_op): Likewise.
3620 (build_op_delete_call): Likewise.
3621 (convert_like_real): Likewise.
3622 (build_over_call): Likewise.
3623 (build_new_method_call): Likewise.
3624 (is_subseq): Likewise.
3625 (maybe_handle_implicit_object): Likewise.
3626 (maybe_handle_ref_bind): Likewise.
3627 (compare_ics): Likewise.
3628 (source_type): Likewise.
3629 (add_warning): Likewise.
3630 (joust): Likewise.
3631 (can_convert_arg): Likewise.
3632 (can_convert_arg_bad): Likewise.
3633 (perform_implicit_conversion): Likewise.
3634 (perform_direct_initialization_if_possible): Likewise.
3635 (initialize_reference): Likewise.
3636 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
3637 * cp-tree.def (WRAPPER): Likewise.
3638 (IDENTITY_CONV): Remove.
3639 (LVALUE_CONV): Likewise.
3640 (QUAL_CONV): Likewise.
3641 (STD_CONV): Likewise.
3642 (PTR_CONV): Likewise.
3643 (PMEM_CONV): Likewise.
3644 (BASE_CONV): Likewise.
3645 (REF_BIND): Likewise.
3646 (USER_CONV): Likewise.
3647 (AMBIG_CONV): Likewise.
3648 (RVALUE_CONV): Likewise.
3649 * cp-tree.h (tree_wrapper): Remove.
3650 (WRAPPER_ZC): Remove.
3651 (lang_tree_node): Remove wrapper.
3652 (LOOKUP_SPECULATIVELY): Remove.
3653 (build_op_delete_call): Adjust prototype.
3654 (validate_conversion_obstack): Declare.
3655 (build_zc_wrapper): Remove.
3656 * cvt.c (convert_to_reference): Remove dead code.
3657 (ocp_convert): Likewise.
3658 * decl.c (redeclaration_error_message): Correct handling of
3659 templates.
3660 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
3661 (cp_tree_node_structure): Remove WRAPPER case.
3662 * decl2.c (finish_file): Call validate_conversion_obstack.
3663 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
3664 (build_op_delete_call): Likewise.
3665 (build_x_delete): Likewise.
3666 (build_delete): Adjust call to build_op_delete_call.
3667 * pt.c (tsubst_friend_declaration): Adjust code to determine
3668 whether or not a friend template is a definition.
3669 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
3670 * tree.c (build_zc_wrapper): Remove.
3671
3672 2004-02-12 Zack Weinberg <zack@codesourcery.com>
3673
3674 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
3675 * cp-tree.h: Don't declare cxx_builtin_type_decls.
3676 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
3677 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
3678
3679 2004-02-10 Mark Mitchell <mark@codesourcery.com>
3680
3681 * typeck.c (lookup_destructor): Fix typo in error message.
3682
3683 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
3684
3685 * call.c, parser.c, tree.c: Fix comment typos.
3686
3687 2004-02-07 Zack Weinberg <zack@codesourcery.com>
3688
3689 Bug 13856
3690 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
3691 * decl.c (duplicate_decls, start_function): Likewise.
3692
3693 2004-02-07 Zack Weinberg <zack@codesourcery.com>
3694
3695 * name-lookup.c (pushdecl): Issue shadow warnings directly.
3696 * parser.c (free_parser_stacks): Delete.
3697
3698 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
3699
3700 * rtti.c: Update copyright.
3701
3702 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3703
3704 PR c++/14033
3705 * decl.c (require_complete_types_for_parms): Do not insert
3706 error_mark_node in the parameter list.
3707
3708 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3709
3710 PR c++/14028
3711 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
3712 error when terminator can not be found.
3713
3714 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
3715
3716 Make-lang.in (po-generated): Delete.
3717
3718 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
3719
3720 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
3721 targetm.calls.promote_prototypes.
3722
3723 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3724
3725 PR middle-end/13750
3726 Revert:
3727 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3728 PR pch/13361
3729 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3730 (handle_pragma_implementation): Likewise.
3731
3732 2004-02-05 Mark Mitchell <mark@codesourcery.com>
3733
3734 PR c++/13714
3735 * typeck.c (lookup_destructor): Tweak error message.
3736
3737 2004-02-05 Jan Hubicka <jh@suse.cz>
3738
3739 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
3740 functions.
3741
3742 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3743
3744 PR c++/14008
3745 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
3746 code, only emits the diagnostic now. Added lookup of the identifier
3747 and support for qualified ids.
3748 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
3749 Parse an (invalid) type name as id-expression within a declarator.
3750 (cp_parser_simple_declaration): Use it.
3751 (cp_parser_member_declaration): Likewise.
3752 (cp_parser_make_typename_type): New function. Handle errors through
3753 cp_parser_diagnose_invalid_typename.
3754 (cp_parser_elaborated_type_specifier): Use it.
3755
3756 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3757
3758 PR c++/13932
3759 * call.c (convert_like_real): Use "converting" rather than
3760 "argument" as the descriptive keyword to
3761 dubious_conversion_warnings.
3762 * typeck.c (convert_for_assignment): Do not call
3763 dubious_conversion_warnings.
3764
3765 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3766
3767 PR c++/13086
3768 * init.c (build_delete): Emit a more informative error message in
3769 case of an incomplete type, and on the correct source line.
3770
3771 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
3772
3773 * error.c, search.c: Update copyright.
3774
3775 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3776
3777 PR c++/9941
3778 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
3779 linkage for the typeinfo name string.
3780
3781 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3782
3783 PR c++/13969
3784 * cp-tree.h (fold_non_dependent_expr): New function.
3785 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
3786 (cp_parser_template_argument): Use fold_non_dependent_expr.
3787 (cp_parser_direct_declarator): Likewise.
3788 * pt.c (fold_non_dependent_expr): New function.
3789 (convert_nontype_argument): Use it.
3790 (tsubst_qualified_id): Simplify.
3791 (tsubst_copy_and_build): Likewise.
3792
3793 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3794
3795 * decl.c (cxx_push_function_context): Do not set
3796 current_function_is_thunk.
3797 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
3798 actual function.
3799
3800 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3801
3802 PR c++/13997
3803 * pt.c (more_specialized_class): Increase processing_template_decl
3804 while partial ordering.
3805
3806 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3807
3808 PR c++/13925
3809 * decl.c (start_function): Do not call pushdecl for any
3810 instantiation or specialization of a primary template.
3811
3812 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3813
3814 PR c++/13950
3815 * parser.c (cp_parser_class_name): Robustify.
3816
3817 PR c++/13970
3818 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
3819
3820 PR c++/14002
3821 * semantics.c (finish_id_expression): Do not return an
3822 IDENTIFIER_NODE when lookup finds a PARM_DECL.
3823
3824 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3825
3826 PR c++/13978
3827 * pt.c (build_non_dependent_expr): Do not build
3828 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
3829
3830 PR c++/13968
3831 * semantics.c (finish_id_expression): Do not return an
3832 IDENTIFIER_NODE when lookup finds a VAR_DECL.
3833
3834 PR c++/13975
3835 * parser.c (cp_parser_simple_declaration): When skipping to the
3836 end of the statement swallow the terminating semicolon.
3837
3838 2004-02-02 Mark Mitchell <mark@codesourcery.com>
3839
3840 PR c++/13113
3841 * init.c (build_offset_ref): Improve error recovery for invalid
3842 uses of non-static member functions.
3843
3844 PR c++/13854
3845 * cp-tree.h (cp_build_type_attribute_variant): New function.
3846 * class.c (build_clone): Use cp_build_type_attribute_variant.
3847 * decl.c (duplicate_decls): Likewise.
3848 * pt.c (copy_default_args_to_explicit_spec): Likewise.
3849 (tsubst_function_type): Likewise.
3850 * tree.c (build_exception_variant): Check attributes before
3851 concluding that two types are the same.
3852 (cp_build_type-attribute_variant): New method.
3853 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
3854
3855 PR c++/13907
3856 * call.c (convert_class_to_reference): Keep better track of
3857 pedantically invalid user-defined conversions.
3858
3859 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3860
3861 PR c++/13957
3862 * pt.c (tsubst_qualified_id): Improved error message when a type
3863 is expected but not found.
3864
3865 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
3866
3867 * class.c: Fix comment typos.
3868 * decl.c: Likewise.
3869 * error.c: Likewise.
3870 * parser.c: Likewise.
3871 * pt.c: Likewise.
3872 * search.c: Likewise.
3873 * typeck.c: Likewise.
3874
3875 2004-01-30 Richard Henderson <rth@redhat.com>
3876
3877 PR c++/13693
3878 * method.c (use_thunk): Don't force_target_expr for void thunks.
3879 * tree.c (build_target_expr_with_type): Assert non-void type.
3880 (force_target_expr): Likewise.
3881
3882 2004-01-30 Michael Matz <matz@suse.de>
3883
3884 * parser.c (cp_parser_labeled_statement): Accept case ranges.
3885
3886 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3887
3888 DR206
3889 PR c++/13813
3890 * decl.c (grokdeclarator): Check immediatly type completeness for
3891 non-dependent types.
3892
3893 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3894
3895 PR c++/13683
3896 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
3897 a sizeof expression.block
3898
3899 2004-01-29 Mark Mitchell <mark@codesourcery.com>
3900
3901 PR c++/13883
3902 * mangle.c (write_encoding): Correct encoding of member template
3903 constructors.
3904
3905 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3906
3907 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
3908 template name as it was `<::' (digraph typo).
3909 (cp_parser_nth_token_starts_template_argument_list_p): New function.
3910 (cp_parser_id_expression): Use it.
3911 (cp_parser_nested_name_specifier_opt): Likewise.
3912 (cp_parser_template_name): Likewise.
3913 (cp_parser_class_name): Likewise.
3914 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
3915
3916 2004-01-28 Mark Mitchell <mark@codesourcery.com>
3917
3918 PR c++/13791
3919 * typeck.c (merge_types): Do not merge attributes into
3920 TYPENAME_TYPEs.
3921
3922 PR c++/13736
3923 * parser.c (cp_parser_direct_declarator): Do not prevent
3924 backtracking inside a parenthesized declarator.
3925 (cp_parser_parameter_declaration): Fix typo in comment.
3926
3927 2004-01-28 Jan Hubicka <jh@suse.cz>
3928
3929 * semantics.c (expand_body) Do emit_associated_thunks before
3930 expansion.
3931
3932 2004-01-27 Devang Patel <dpatel@apple.com>
3933
3934 * name-lookup.c: Include "debug.h"
3935 (do_namespace_alias): Invoke debug_hooks to emit debug info
3936 for namespace alias.
3937 (do_local_using_decl): Invoke debug_hooks to emit debug info
3938 for using decl.
3939 (do_class_using_decl): Same.
3940 (do_toplevel_using_decl): Same.
3941 (do_using_directive): Same.
3942 (cp_emit_debug_info_for_using): New function.
3943 * Make-lang.in (cp/parser.o): Depend on debug.h
3944 (cp/name-lookup.o): Same.
3945
3946 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3947
3948 * cp-tree.h (language_function, lang_type_header): Use
3949 BOOL_BITFIELD.
3950 * name-lookup.h (cp_binding_level): Likewise.
3951
3952 2004-01-26 Mark Mitchell <mark@codesourcery.com>
3953
3954 PR c++/13663
3955 * semantics.c (finish_for_expr): Check for unresolved overloaded
3956 functions.
3957
3958 * class.c (add_method): Just check processing_template_decl to
3959 determine whether or not we are within a template.
3960 * decl2.c (maybe_retrofit_in_chrg): Likewise.
3961 * init.c (decl_constant_value): Check the type of the declaration,
3962 not TREE_READONLY.
3963 * name-lookup.c (maybe_push_to_top_level): Rename to ...
3964 (push_to_top_level): ... this.
3965 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
3966 * pt.c (push_template_decl_real): Reorder condition for speed.
3967 (convert_template_argument): Use dependency-checking functions in
3968 place of uses_template_parms.
3969 (lookup_template_class): Avoid calling uses_template_parms more
3970 than once.
3971 (uses_template_parms): Reimplement, using dependency-checking
3972 functions.
3973 (instantiate_class_template): Use push_to_top_level, not
3974 maybe_push_to_top_level.
3975 (type_unification_real): Simplify.
3976 (type_dependent_expression_p): Handle OFFSET_REFs and
3977 TEMPLATE_DECLs.
3978 (any_dependent_template_arguments_p): Handle multiple levels of
3979 template argument.
3980 * semantics.c (expand_or_defer_fn): Do not check
3981 uses_template_parms for template instantiations.
3982 * typeck.c (comptypes): Avoid calling cp_type_quals.
3983
3984 2004-01-25 Mark Mitchell <mark@codesourcery.com>
3985
3986 PR c++/13833
3987 * call.c (build_over_call): Do not convert arguments when
3988 processing a template.
3989 * pt.c (build_non_dependent_expr): Do not build a
3990 NON_DEPENDENT_EXPR for arithmetic constants.
3991
3992 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3993
3994 PR c++/13810
3995 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
3996 returns a TYPE_DECL. no further lookup is required.
3997 * semantics.c (check_template_template_default_arg): A TYPE_DECL
3998 is invalid. Rework to give better diagnostics.
3999
4000 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4001
4002 PR c++/13797
4003 * pt.c (instantiate_class_template): Add an error_mark_node
4004 check.
4005 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
4006
4007 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
4008
4009 PR c++/13701
4010 * decl.c (finish_function): Move the call to
4011 finish_fname_decls below the call to
4012 finish_eh_spec_block.
4013
4014 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
4015
4016 * optimize.c, typeck2.c: Update copyright.
4017
4018 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
4019
4020 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
4021 init.c, mangle.c, typeck.c: Update copyright.
4022
4023 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
4024
4025 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
4026
4027 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
4028
4029 * Make-lang.in: Replace $(docdir) with doc.
4030 (c++.info, c++.srcinfo): Dummy entry.
4031 (c++.man, c++.srcman): New rules.
4032 (c++.install-man): Revamp rule.
4033
4034 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
4035
4036 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
4037 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
4038 immediate $(shell) instead of deferred backquote.
4039
4040 2004-01-19 Mark Mitchell <mark@codesourcery.com>
4041
4042 PR c++/13651
4043 * parser.c (cp_parser_postfix_expression): When encountering
4044 incomplete type on left-hand side of "->" or ".", treat the entire
4045 expression as erroneous.
4046
4047 PR c++/13592
4048 * call.c (build_field_call): Remove.
4049 (n_build_method_call): Likewise.
4050 (build_method_call): Likewise.
4051 (build_new_method_call): Do not call build_field_call.
4052 * class.c (n_build_method_call): Remove.
4053 (print_class_statistics): Do not print it.
4054 * cp-tree.h (build_method_call): Remove declaration.
4055 (finish_object_call_expr): Likewise.
4056 (build_new_1): Do not use build_method_call.
4057 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
4058 when the function appearing on the right-hand-side of "." or "->"
4059 is not actually a function.
4060 * pt.c (tsubst_copy_and_build): Likewise.
4061 * semantics.c (finish_object_call_expr): Remove.
4062
4063 2004-01-18 Mark Mitchell <mark@codesourcery.com>
4064
4065 PR c++/13710
4066 * pt.c (tsubst): Use finish_typeof.
4067
4068 2004-01-18 Jason Merrill <jason@redhat.com>
4069
4070 PR c++/11725
4071 * except.c (build_throw): In a template, set
4072 current_function_returns_abnormally.
4073
4074 2004-01-17 Fred Fish <fnf@intrinsity.com>
4075
4076 PR c++/11895
4077 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
4078 except don't call array_type_nelts() with a VECTOR_TYPE.
4079
4080 2004-01-16 Jan Hubicka <jh@suse.cz>
4081
4082 * mangle.c (write_mangled_name): Remove inline modifier.
4083
4084 2004-01-16 Mark Mitchell <mark@codesourcery.com>
4085
4086 PR c++/13574
4087 * decl.c (compute_array_index_type): Fix grammar in comment.
4088 * init.c (build_zero_init): Handle zero-sized arrays correctly.
4089
4090 PR c++/13178
4091 * call.c (name_as_c_string): Print conversion operator names
4092 correctly.
4093
4094 PR c++/13478
4095 * call.c (initialize_reference): Pass -1 for inner parameter to
4096 convert_like_real.
4097
4098 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4099
4100 PR c++/13407
4101 * parser.c (cp_parser_base_specifier): Check for an invalid
4102 keyword `typename' and emit an user-friendly error message.
4103
4104 2004-01-15 Geoffrey Keating <geoffk@apple.com>
4105
4106 PR pch/13361
4107 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
4108 (handle_pragma_implementation): Likewise.
4109
4110 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4111
4112 PR c++/9259
4113 * typeck.c (build_class_member_access_expr): Allow to access members
4114 of the currently open class.
4115 (finish_class_member_access_expr): Likewise.
4116
4117 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
4118
4119 PR c++/13659
4120 * name-lookup.c (validate_nonmember_using_decl): Take scope and
4121 name by value, instead of computing them.
4122 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
4123 arguments. Pass them to validate_nonmember_using_decl.
4124 * name-lookup.h (do_local_using_decl): Adjust.
4125 (do_toplevel_using_decl): Likewise.
4126 * parser.c (cp_parser_using_declaration): Likewise.
4127 * pt.c (tsubst_expr): Likewise.
4128
4129 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
4130
4131 PR c++/13594
4132 PR c++/13658
4133 * name-lookup.c (qualified_lookup_using_namespace): Search
4134 strongly-associated namespaces first, and only then try other
4135 namespaces.
4136
4137 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
4138
4139 * Make-lang.in (c++.srcextra): Dummy entry.
4140
4141 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4142
4143 PR c++/8856
4144 * parser.c (cp_parser_template_name): Don't try to parse a
4145 conversion-function-id, as it cannot be a template-name.
4146 (cp_parser_simple_type_specifier): Check for invalid template-ids
4147 even after a built-in type.
4148
4149 2004-01-14 Jan Hubicka <jh@suse.cz>
4150
4151 PR c++/12850
4152 * pt.c (instantiate_decl): Do not increase function_depth.
4153
4154 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
4155
4156 PR c++/9021
4157 PR c++/11005
4158 * parser.c (cp_parser_elaborated_type_specifier): Warn about
4159 attributes and discard.
4160 * decl.c (xref_tag): Don't overwite existing attributes with
4161 NULL_TREE.
4162
4163 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4164
4165 PR c++/12335
4166 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
4167 is no destructor while looking up a BIT_NOT_EXPR.
4168
4169 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
4170
4171 * cxxfilt.c: Remove unused file.
4172
4173 2004-01-14 Jan Hubicka <jh@suse.cz>
4174
4175 Partial fix to PR c++/12850
4176 * decl2.c (mark_used): Do not proactively instantiate templates
4177 when compiling in unit-at-a-time or not optimizing.
4178 * optimize.c (maybe_clone_body): Do not increase function depth.
4179
4180 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4181
4182 PR c++/13474
4183 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
4184
4185 2004-01-12 Steven Bosscher <stevenb@suse.de>
4186
4187 PR c++/13558
4188 * parser.c (cp_parser_member_declaration): Any non-type is also
4189 not a class or a function.
4190
4191 2004-01-12 Jason Merrill <jason@redhat.com>
4192
4193 PR c++/12815
4194 * class.c (build_base_path): Do not mark vtable references as
4195 TREE_CONSTANT.
4196 (build_vtbl_ref_1): Likewise.
4197
4198 2004-01-12 Richard Henderson <rth@redhat.com>
4199
4200 PR opt/10776
4201 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
4202 (store_init_value): Use it.
4203 * decl.c (check_initializer): Expect full initialization code
4204 from store_init_value.
4205 * init.c (expand_aggr_init_1): Likewise.
4206 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
4207
4208 2004-01-12 Mark Mitchell <mark@codesourcery.com>
4209
4210 * class.c (layout_class_type): For non-POD class types, also copy
4211 the DECL_SIZE and DECL_MODE of fields to the base class type.
4212
4213 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4214
4215 PR c++/13289
4216 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
4217 calling regenerate_decl_from_template.
4218
4219 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
4220
4221 PR c++/4100
4222 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
4223 decl-specifier occurring along with a class definition.
4224
4225 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
4226
4227 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
4228 clauses to comments describing declares_class_or_enum.
4229 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
4230 false.
4231
4232 2004-01-12 Jan Hubicka <jh@suse.cz>
4233
4234 * pt.c (for_each_template_parm): Do not check for duplicates.
4235 (for_each_template_parm): Use walk_tree duplicate checking code.
4236
4237 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
4238
4239 PR c++/3478
4240 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
4241 is error_mark_node, don't add any more decl_specs.
4242 (cp_parser_init_declarator): After committing to a declaration, if
4243 the decl_specifiers start with error_mark_node, issue an error and
4244 change the type to "int".
4245
4246 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
4247
4248 PR bootstrap/7817
4249 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
4250
4251 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4252
4253 DR 337
4254 PR c++/9256
4255 * pt.c (tsubst): Substitution must fail if we are attempting to
4256 create an array with element type that is an abstract class type.
4257 * decl.c (cp_finish_decl): Strip pointers and array types recursively
4258 before calling abstract_virtuals_error.
4259
4260 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
4261
4262 * name-lookup.c (qualified_lookup_using_namespace): Consider
4263 strong using directives even if we've already found a binding.
4264
4265 2004-01-09 Mark Mitchell <mark@codesourcery.com>
4266
4267 * cp-tree.h (cxx_expand_expr): Change prototype.
4268 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
4269
4270 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4271
4272 PR c++/12573
4273 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
4274 looking into them recursively. They can be there because of the
4275 new __offsetof__ extension.
4276
4277 2004-01-07 Zack Weinberg <zack@codesourcery.com>
4278
4279 * parser.c (cp_parser_save_member_function_body): Mark the
4280 definition static.
4281
4282 2004-01-05 Mark Mitchell <mark@codesourcery.com>
4283
4284 PR c++/13057
4285 * class.c (build_clone): Copy type attributes from the original
4286 function to the clone.
4287
4288 PR c++/12815
4289 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
4290 references as constant.
4291
4292 PR c++/12132
4293 * parser.c (cp_parser_explicit_instantiation): Improve error
4294 recovery.
4295 (cp_parser_require): Improve indication of the error location.
4296
4297 PR c++/13451
4298 * parser.c (cp_parser_class_head): Reorder logic to check for
4299 invalid qualification.
4300
4301 2004-01-04 Mark Mitchell <mark@codesourcery.com>
4302
4303 PR c++/13157
4304 * name-lookup.c (lookup_using_namespace): Remove spacesp
4305 parameter.
4306 (unqualified_namespace_lookup): Likewise.
4307 (lookup_qualified_name): Adjust accordingly.
4308 (lookup_name_real): Likewise.
4309 (lookup_arg_dependent): Do not eliminate the namespace of the
4310 functions found by unqualified name lookup unless that is the
4311 current namespace.
4312
4313 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
4314
4315 * semantics.c (push_deferring_access_checks): Fix format.
4316 (resume_deferring_access_checks): Likewise.
4317 (stop_deferring_access_checks): Likewise.
4318 (pop_deferring_access_checks): Likewise.
4319 (get_deferred_access_checks): Likewise.
4320 (pop_to_parent_deferring_access_checks): Likewise.
4321 (perform_deferred_access_checks): Likewise.
4322 (perform_or_defer_access_check): Likewise.
4323
4324 2004-01-04 Richard Henderson <rth@redhat.com>
4325
4326 * call.c (build_over_call): Don't create a save_expr of an
4327 aggregate, but rather its address.
4328
4329 2004-01-04 Mark Mitchell <mark@codesourcery.com>
4330
4331 PR c++/13529
4332 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
4333 an offsetof expression.
4334
4335 * parser.c (cp_parser_parameter_declaration): Fix comment.
4336
4337 PR c++/12226
4338 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
4339 (reference_binding): Set it when appropriate.
4340 (build_temp): New function, split out from ...
4341 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
4342 (initialize_reference): Likewise.
4343
4344 PR c++/13536
4345 * parser.c (cp_parser): Add in_type_id_in_expr_p.
4346 (cp_parser_new): Initialize it.
4347 (cp_parser_postfix_expression): Set it.
4348 (cp_parser_sizeof_operand): Likewise.
4349 (cp_parser_parameteR_declaration): Do not commit early to tenative
4350 parsers when in_type_id_in_expr_p is set.
4351
4352 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4353
4354 PR c++/13094
4355 * parser.c (cp_parser_template_argument): Don't call
4356 make_unbound_class_template directly.
4357 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
4358 UNBOUND_CLASS_TEMPLATE tree node.
4359
4360 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
4361
4362 PR target/12729
4363 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
4364
4365 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4366
4367 PR c++/13520
4368 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
4369 (DECL_FUNCTION_TEMPLATE_P): Use it.
4370 (DECL_CLASS_TEMPLATE_P): Likewise.
4371 * parser.c (cp_parser_lookup_name): Add is_template parameter.
4372 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
4373 (cp_parser_template_name): Likewise.
4374 (cp_parser_elaborated_type_specifier): Likewise.
4375 (cp_parser_namespace_name): Likewise.
4376 (cp_parser_class_name): Likewise.
4377 (cp_parser_lookup_name_simple): Likewise.
4378
4379 See ChangeLog.3 for earlier changes.