* name-lookup.c (push_class_level_binding): Simplify.
[gcc.git] / gcc / cp / ChangeLog
1 2004-07-12 Mark Mitchell <mark@codesourcery.com>
2
3 * name-lookup.c (push_class_level_binding): Simplify.
4
5 2004-07-12 Andrew Pinski <apinski@apple.com>
6
7 PR c++/16475
8 Revert:
9 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
10 PR c++/16276
11 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
12 is not public.
13
14 2004-07-12 Eric Christopher <echristo@redhat.com>
15
16 * parser.c (cp_parser_class_head): Remove unused variable.
17
18 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
19
20 * decl.c (grok_op_properties): Reject [de-]allocation functions
21 declared in a namespace, or declared as static.
22
23 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
24
25 * cp-tree.h (make_binfo): Remove.
26 * decl.c (xref_basetypes): Use make_tree_binfo directly.
27 * tree.h (copy_base_binfos): Likewise.
28 (make_binfo): Remove.
29
30 * call.c (build_user_type_conversion_1, build_new_op,
31 check_constructor_callable, build_temp,
32 perform_direct_initialization_of_possible): Pass type directly to
33 lookup_fnfields & build_special_member_call.
34 (build_special_member_call): Accept a type, and complete it.
35 * class.c (finish_stuct_bits): Copy the BINFOs here.
36 * cvt.c (ocp_convert): Pass type directly to
37 build_special_member_call.
38 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
39 (xref_basetypes): Allocate the binfo here. Adjust.
40 * init.c (build_init, build_new_1): Pass type directly to
41 build_special_member_call.
42 * lex.c (cxx_make_type): Do not allocate binfo here.
43 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
44 * parser.c (cp_parser_class_head): Always call xref_basetypes.
45 * pt.c (instantiate_class_template): Likewise. Inhibit access
46 checking for template friends.
47 * ptree.c (cxx_print_type): Adjust record printing.
48 * search.c (lookup_base): When taking a type, complete it before
49 looking for a binfo.
50 (lookup_member): Delay completing a type.
51 (push_class_decls): Don't walk an incomplete type.
52 (lookup_conversions): Likewise.
53 * semantics.c (finish_stmt_expr_expr): Pass type directly to
54 build_special_member_call.
55 * tree.c (copy_base_binfos): Adjust.
56 (make_binfo): Likewise.
57 * typeck.c (build_modify_expr): Pass type directly to
58 build_special_member_call.
59 * typeck2.c (process_init_constructor): Check a binfo exists.
60 (build_m_component_ref): Allow accessing an incomplete type.
61 (build_functional_cast): Pass type directly to
62 build_special_member_call.
63
64 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
65
66 PR c++/2204
67 * config-lang.in (gtfiles): Add typeck2.c.
68 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
69 gt-cp-typeck2.h.
70 * cp-tree.h: Declare complete_type_check_abstract.
71 * typeck2.c (pat_calc_hash, pat_compare,
72 complete_type_check_abstract): New functions.
73 (abstract_virtuals_error): If the type is abstract, register the
74 declaration within abstract_pending_vars for further checks.
75 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
76 * decl.c (cp_finish_decl): Do not strip array types.
77 (create_array_type_for_decl): Check for abstractness of the element
78 type.
79 (complete_vars): Call complete_type_check_abstract.
80 * class.c (finish_struct): Prepare a list of virtual functions for
81 template types, and call complete_vars on it to check for abstractness.
82
83 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
84
85 PR tree-optimization/14107
86 * decl.c (finish_function): Remove temporary band-aid.
87
88 2004-07-11 Mark Mitchell <mark@codesourcery.com>
89
90 * call.c (build_operator_new_call): Avoid using push_to_top_level.
91 (build_new_op): Adjust call to lookup_function_nonclass.
92 * name-lookup.c (identifier_type_value): Adjust call to
93 lookup_name_real.
94 (lookup_name_real): Add block_p parameter.
95 (lookup_name_nonclass): Adjust call to lookup_name_real.
96 (lookup_function_nonclass): Likewise.
97 (lookup_name): Likewise.
98 * name-lookup.h (lookup_name_real): Change prototype.
99 (lookup_name_nonclass): Likewise.
100 * parser.c (cp_parser_lookup_name): Likewise.
101
102 * cp-tree.h (saved_scope): Make old_bindings a vector.
103 (unuse_fields): Remove.
104 * name-lookup.h (cxx_saved_binding): Define it.
105 * class.c (pushclass): Don't use unuse_fields.
106 * name-lookup.c (cxx_saved_binding_make): Remove.
107 (store_binding): Add new bindings to a vector, using an
108 accumulator style, rather than adding them to a list.
109 (store_bindings): Adjust accordingly.
110 (store_class_bindings): Likewise.
111 (push_to_top_level): Likewise.
112 (pop_from_top_level): Likewise.
113 * optimize.c (maybe_clone_body): Must push_to_top_level and
114 pop_from_top_level calls outside of loop.
115 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
116 calls here from cp_parser_late_parsing_default_args.
117 (cp_parser_save_default_args): Record the class type in which the
118 function is declared.
119 (cp_parser_late_parsing_default_args): Do not call
120 push_nested_class/pop_nested_class.
121 * search.c (dfs_unuse_fields): Remove.
122 (unuse_fields): Remove.
123
124 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
125
126 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
127 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
128 * cp-tree.h (poplevel): Declare.
129 (set_block): Remove.
130 * decl.c (set_block): Remove.
131
132 2004-07-10 Mike Stump <mrs@apple.com>
133
134 * decl2.c (import_export_class): Never export/import vtables
135 with inline key functions.
136
137 2004-07-09 Steven Bosscher <stevenb@suse.de>
138
139 * typeck.c (c_expand_asm_operands): Remove.
140
141 2004-07-09 Mike Stump <mrs@apple.com>
142
143 * typeck.c (build_class_member_access_expr): Skip null deref
144 warning when we don't dereference it.
145
146 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
147
148 PR c++/8211
149 PR c++/16165
150 * class.c (check_field_decls): Improve -Weffc++ warning: do not
151 warn for pointers to functions/members, or for classes without
152 destructors.
153
154 2004-07-08 Mark Mitchell <mark@codesourcery.com>
155
156 * name-lookup.h (struct cp_binding_level): Update documentation
157 for class_shadowed.
158
159 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
160
161 PR c++/16169
162 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
163 returning CALL_EXPR, and non-reference return type.
164
165 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
166
167 * name-lookup.c (push_binding): Use VEC_reserve.
168
169 2004-07-08 Richard Henderson <rth@redhat.com>
170
171 * cp-tree.h (expand_eh_spec_block): Remove.
172
173 2004-07-07 Mark Mitchell <mark@codesourcery.com>
174
175 * cp-tree.h (saved_scope): Remove x_previous_class_type and
176 x_previous_class_values; add x_previous_class_level.
177 (previous_class_type): Remove.
178 (previous_class_values): Remove.
179 (previous_class_level): New macro.
180 * class.c (pushclass): Restore the identifier cache more
181 expeditiously.
182 (invalidate_class_lookup_cache): Use vector for class_shadowed and
183 previous_class_values.
184 * decl.c (poplevel): Likewise.
185 * name-lookup.c (cxx_binding_init): New function.
186 (cxx_binding_make): Use it.
187 (push_binding): For a binding in a class level, use a vector of
188 cp_class_binding nodes.
189 (push_binding_level): New function.
190 (begin_scope): Use it.
191 (leave_scope): Do not put class binding levels on the free list.
192 (print_binding_level): Adjust for the fact that class_shadowed is
193 a vector.
194 (poplevel_class): Likewise.
195 (clear_identifier_class_values): Likewise.
196 (push_class_level_binding): Likewise.
197 (set_class_shadows): Remove.
198 (store_binding): New function.
199 (store_class_bindings): New function.
200 (push_to_top_level): Use store_class_bindings as appropriate.
201 (pop_from_top_level): Use previous_class_level, not
202 previous_class_type.
203 * name-lookup.h (cp_class_binding): New type.
204 (cp_binding_level): Use a vector object for class_shadowed.
205 (push_binding_level): Declare.
206 (set_class_shadows): Remove.
207
208 2004-07-07 Andrew Pinski <apinski@apple.com>
209
210 * class.c (instantiate_type): BUFFER_REF is dead.
211 * lex.c (init_operators): IN_EXPR is dead.
212
213 2004-07-07 Jason Merrill <jason@redhat.com>
214
215 PR c++/16334
216 * call.c (build_new_op): Give overload warnings for built-in
217 candidates.
218
219 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
220
221 PR c++/16276
222 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
223 is not public.
224
225 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
226
227 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
228 * class.c (build_primary_vtable, check_bases,
229 determine_primary_base, finish_struct_bits,
230 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
231 get_basefndecls, warn_hidden, walk_subobject_offsets,
232 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
233 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
234 finish_struct_1, get_vfield_name, contains_empty_class_p,
235 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
236 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
237 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
238 BINFO macros.
239 * decl.c (xref_basetypes): Likewise.
240 * dump.c (cp_dump_tree): Likewise.
241 * error.c (dump_expr): Likewise.
242 * init.c (sort_mem_initializers, expand_member_init,
243 push_base_cleanups): Likewise.
244 * method.c (do_build_copy_constructor, do_build_assign_reg,
245 synthesize_exception_spec): Likewise.
246 * name-lookup.c (arg_assoc_class):
247 * pt.c (instantiate_class_template, tsubst,
248 get_template_base_recursive):
249 * ptree.c (cxx_print_type):
250 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
251 * search.c (lookup_base_r, dynamic_cast_base_recurse,
252 dfs_access_in_type, access_in_type, lookup_field_queue_p,
253 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
254 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
255 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
256 binfo_for_vtable, copied_binfo, original_binfo): Likewise
257 * tree.c (copy_base_binfos, make_binfo): Likewise.
258 * typeck.c (commmon_base_type): Likewise
259 * typeck2.c (process_init_constructor): Likewise
260
261 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
262
263 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
264
265 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
266
267 PR c++/3671
268 * pt.c (convert_nontype_argument): Disallow conversions between
269 different enumeration types.
270
271 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
272
273 * cp-tree.h (BINFO_MARKED): Remove.
274 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
275 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
276 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
277 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
278 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
279 (mark_primary_bases, determine_primary_base, base_derived_from,
280 dfs_find_final_overrider, dfs_find_final_overrider_q,
281 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
282 dfs_modify_vtables, walk_subobject_offsets,
283 layout_nonempty_base_or_field, build_base_field,
284 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
285 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
286 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
287 build_ctor_vtbl_group, accumulate_vtble_inits,
288 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
289 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
290 add_vcall_offset_vtbl_entries_1): Likewise.
291 * decl.c (xref_basetypes): Incomming virtual base indicated by
292 TREE_TYPE. Adjust.
293 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
294 * init.c (finish_init_stmts, sort_mem_initializers,
295 emit_mem_initializers, build_vtble_address, expand_member_init,
296 push_base_cleanups): Likewise.
297 * method.c (do_build_copy_constructor): Likewise.
298 * pt.c (instantiate_class_template,
299 get_template_base_recursive): Likewise.
300 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
301 get_pseudo_ti_desc): Likewise.
302 * search.c (lookup_base_r, dynamic_cast_base_recurse,
303 binfo_from_vbase, binfo_via_virtual, copied_binfo,
304 original_binfo): Likewise.
305 * semantics.c (finish_base_specifier): Virtualness is indicated
306 by TREE_TYPE.
307 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
308
309 2004-07-06 Mark Mitchell <mark@codesourcery.com>
310
311 Revert:
312 2004-06-24 Jason Merrill <jason@redhat.com>
313 PR c++/16115
314 * decl.c (grokparms): Give the PARM_DECL reference type if the
315 parameter is passed by invisible reference.
316
317 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
318
319 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
320 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
321 * pt.c (check_instantiated_args, unify): Likewise.
322
323 2004-07-05 Phil Edwards <phil@codesourcery.com>
324
325 * Make-lang.in (check-c++, lang_checks): Add some comments.
326
327 2004-07-05 Zack Weinberg <zack@codesourcery.com>
328
329 * cp-mudflap.c: Delete file.
330 * Makefile.in: Remove all references to cp-mudflap.o.
331
332 2004-07-05 Zack Weinberg <zack@codesourcery.com>
333
334 * decl.c (cxx_init_decl_processing): Call
335 build_common_tree_nodes before creating the global NAMESPACE_DECL.
336
337 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
338
339 PR c++/2518
340 * call.c (build_operator_new_call): Look only at global scope.
341
342 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
343
344 * call.c (enforce_access): Expect TREE_BINFO.
345 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
346 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
347 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
348 Adjust.
349 (BINFO_LANG_ELTS): Remove.
350 (BINFO_LANG_SLOTS): New.
351 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
352 (CLASSTYPE_TEMPLATE_INFO): Adjust.
353 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
354 * search.c (lookup_member): Check TREE_BINFO.
355 * semantics.c (perform_or_defer_access_check): Likewise.
356 (check_accessibility_of_qualified_id): Check
357 deferred_access_no_check.
358 * tree.c (make_binfo): Use make_tree_binfo.
359
360 2004-07-04 Mark Mitchell <mark@codesourcery.com>
361
362 * method.c (implicitly_declare_fn): Set linkage of generated
363 functions.
364
365 2004-07-04 Richard Henderson <rth@redhat.com>
366
367 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
368
369 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
370
371 PR c++/3761
372 * name-lookup.c (push_class_level_binding): Don't pass a
373 TREE_LIST of ambiguous names to check_template_shadow as it
374 only handles declarations. Instead, pull the declaration
375 out and pass that.
376
377 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
378
379 PR c++/14971
380 * pt.c (check_explicit_specialization): Clarify error message.
381
382 2004-07-02 Richard Henderson <rth@redhat.com>
383
384 * tree.c (cp_unsave_r): Update remap_save_expr call.
385
386 2004-07-02 Mark Mitchell <mark@codesourcery.com>
387
388 PR c++/16240
389 * mangle.c (write_template_arg): Correct mangling.
390
391 PR c++/16297
392 * decl.c (grokdeclarator): Robustify.
393
394 2004-07-01 Richard Henderson <rth@redhat.com>
395
396 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
397 * method.c (synthesize_method): Don't clear_last_expr.
398 * name-lookup.c (maybe_push_cleanup_level): Likewise.
399
400 2004-07-01 Nick Clifton <nickc@redhat.com>
401
402 * decl2.c (import_export_class): Invoke the
403 import_export_class field in the gcc_target structure if it is not
404 empty.
405
406 2004-06-30 Richard Henderson (rth@redhat.com>
407
408 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
409 * method.c (use_thunk): Likewise.
410
411 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
412
413 * call.c (build_over_call), typeck.c (build_function_call): Call
414 check_function_arguments instead of check_function_format.
415
416 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
417
418 * call.c (build_over_call), typeck.c (build_function_call): Update
419 calls to check_function_format.
420
421 2004-06-30 Richard Henderson <rth@redhat.com>
422
423 * call.c (build_over_call): Use __builtin_memcpy for copying
424 CLASS_AS_BASE rather than funny casting.
425
426 2004-06-30 Richard Henderson <rth@redhat.com>
427
428 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
429 TYPE_SIZE_UNIT of full_type.
430
431 2004-06-30 Per Bothner <per@bothner.com>
432
433 Conditionally compile support for --enable-mapped_location.
434 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
435 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
436 adjustments - which I don't understand.
437 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
438 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
439 (print_instantiation_partial_context): Use expand_location.
440 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
441 * name-lookup.c: Likewise.
442 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
443 * name-lookup.c: Use input_line macro.
444 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
445 (cp_parser_statement): Rename locaal variable statement_locus to
446 statement_location and use SET_EXPR_LOCATION macro.
447 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
448 * tree.c (cp_walk_subtrees): Likewise.
449
450 2004-06-29 Per Bothner <per@bothner.com>
451
452 * tree.c (build_min_nt, build_min, build_min_non_dep):
453 Don't set TREE_COMPLEXITY from input_line.
454
455 2004-06-29 Paul Brook <paul@codesourcery.com>
456
457 * init.c: Include target.h.
458 (get_cookie_size): Remove and replace with target hook.
459 Update callers.
460 (build_new_1): Store the element size in the cookie.
461
462 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
463
464 PR c++/16260
465 * parser.c (cp_parser_template_declaration_after_export): Disable
466 access checks here ...
467 (cp_parser_class_specifier): ... not here.
468
469 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
470
471 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
472 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
473 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
474 TREE_CHECK macro.
475
476 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
477
478 * cp-tree.h (struct deferred_access): Move to ...
479 * semantics.c (struct deferred_access): ... here. Adjust.
480 (deferred_access_stack): Make a VEC(deferred_access),
481 (deferred_access_free_list): Remove.
482 (deferred_access_no_check): New.
483 (push_deferring_access_checks, resume_deferring_access_checks,
484 stop_deferring_access_checks, pop_deferring_access_checks,
485 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
486 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
487
488 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
489
490 PR c++/16174
491 * call.c (build_temp): Declare.
492 (check_constructor_callable): New.
493 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
494 CONSTRUCTOR_CALLABLE.
495 (convert_like_real, initialize_reference): Use
496 check_constructor_callable.
497 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
498 (LOOKUP_*): Renumber.
499
500 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
501
502 * friend.c (add_friend): Only perform access checks when context
503 is a class.
504 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
505 * parser.c (cp_parser_class_specifier): Disable access checks here
506 when parsing the body of a templated class.
507 * semantics.c (perform_or_defer_access_checks): Reorder to allow
508 NULL binfos when not checking access.
509
510 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
511
512 Use vector API for vbase list.
513 * cp-tree.h: Include vec.h
514 (DEF_VEC_P (tree)): New type.
515 (struct lang_type_class): Change vbase's member type.
516 (binfo_for_vbase): Declare.
517 * class.c (determine_primary_base, base_derived_from,
518 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
519 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
520 build_vtbl_initializer): Adjust.
521 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
522 vbases.
523 * init.c (sort_mem_initializers, expand_member_init,
524 push_base_cleanups): Adjust.
525 * method.c (do_build_copy_constructor): Adjust.
526 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
527 (binfo_for_vbase): New.
528 * tree.c (copy_base_binfos): Adjust.
529
530 2004-06-28 Mark Mitchell <mark@codesourcery.com>
531
532 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
533
534 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
535
536 PR c++/14123
537 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
538 paranthesis in case of pointers to array members.
539 * error.c (dump_type_prefix): Likewise.
540 (dump_type_suffix): Maybe issue a whitespace when printing
541 ARRAY_TYPE.
542
543 2004-06-27 Mark Mitchell <mark@codesourcery.com>
544
545 PR c++/16193
546 * parser.c (cp_parser_set_decl_spec_type): Refine test for
547 redefinition of built-in types.
548
549 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
550
551 * error.c (pp_template_argument_list_start): Remove.
552 (pp_template_argument_list_end): Likewise.
553 (pp_separate_with_comma): Use pp_cxx_separate_with.
554 (reinit_global_formatting_buffer): Remove.
555 (pp_non_consecutive_character): Likewise.
556 (dump_scope): Use pp_cxx_colon_colon.
557 (dump_template_parameter): Use pp_cxx_identifier,
558 pp_cxx_tree_identifier and pp_cxx_whitespace.
559 (dump_templat_bindings): Replace use of pp_string with sequence
560 of pp_cxx_whitespace and pp_equal.
561 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
562 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
563 padding here.
564 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
565 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
566 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
567 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
568 pp_cxx_right_bracket, pp_cxx_identifier throughout,
569 (dump_decl): Likewise.
570 (dump_template_decl): Likewise.
571 (dump_function_decl): Likewise. Set padding as appropriate.
572 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
573 pp_cxx_right_paren.
574 (dump_exception_spec): Likewise.
575 (dump_function_name): Use pp_cxx_tree_identifier and
576 pp_cxx_identifier.
577 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
578 pp_cxx_end_template_argument_list.
579 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
580 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
581 pp_cxx_whitespace throughout.
582 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
583 pp_cxx_right_paren.
584 (dump_unary_op): Likewise.
585 (reinit_cxx_pp): New function.
586 (type_as_string); Use it.
587 (expr_as_string): Likewise.
588 (decl_as_string); Likewise.
589 (context_as_string): Likewise.
590 (lang_decl_name): Likewise.
591 (decl_to_string): Likewise.
592 (expr_to_string): Likewise.
593 (parm_to_string): Likewise.
594 (type_to_string): Likewise.
595 (args_to_string): Likewise.
596 (cv_to_string): Likewise.
597
598 2004-06-26 Mark Mitchell <mark@codesourcery.com>
599
600 * cp-tree.h (cp_cv_quals): New type.
601 (cp_declarator): Use it instead of "tree" as appropriate.
602 (grok_method_quals): Adjust prototype.
603 (grokclassfn): Likewise.
604 (do_friend): Likewise.
605 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
606 (grokdeclarator): Likewise.
607 * decl2.c (grok_method_quals): Likewise.
608 (grokclassfn): Likewise.
609 * friend.c (do_friend): Likewise.
610 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
611 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
612 (make_pointer_declarator): Likewise.
613 (make_reference_declarator): Likewise.
614 (make_ptrmem_declarator): Likewise.
615 (cp_parser_ptr_operator): Likewise.
616 (cp_parser_cv_qualifier_seq_opt): Likewise.
617 (cp_parser_cv_qualifier_opt): Remove.
618 (cp_parser_new_declarator_opt): Adjust call to
619 cp_parser_ptr_operator.
620 (cp_parser_conversion_declaration_opt): Likewise.
621 (cp_parser_declarator): Use cp_cv_quals, not tree.
622 (cp_parser_direct_declarator): Likewise.
623
624 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
625
626 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
627 Rename DECL_STMT to DECL_EXPR.
628 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
629 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
630 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
631
632 2004-06-26 Jan Hubicka <jh@suse.cz>
633
634 PR C++/14865
635 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
636 reachability analysis.
637
638 2004-06-25 Mark Mitchell <mark@codesourcery.com>
639
640 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
641 2004-06-23 change.
642
643 2004-06-25 Paul Brook <paul@codesourcery.com>
644
645 * decl2.c (get_guard): Call targetm.cxx.guard_type.
646 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
647
648 2004-06-24 Mark Mitchell <mark@codesourcery.com>
649
650 * decl.c (grokdeclarator): Restore error messages about __thread.
651 * parser.c (cp_parser_decl_specifier_seq): Likewise.
652
653 2004-06-24 Jason Merrill <jason@redhat.com>
654
655 PR c++/16115
656 * decl.c (grokparms): Give the PARM_DECL reference type if the
657 parameter is passed by invisible reference.
658
659 2004-06-24 Andreas Schwab <schwab@suse.de>
660
661 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
662
663 2004-06-23 Mark Mitchell <mark@codesourcery.com>
664
665 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
666 (cp/decl.o): Likewise.
667 (cp/decl2.o): Likewise.
668 (cp/pt.o): Likewise.
669 (cp/semantics.o): Likewise.
670 * config-lang.in (gtfiles): Do not reference cp/lex.h.
671 * class.c: Do not include lex.h.
672 (add_implicitly_declared_members): Do not use
673 adding_implicit_members.
674 (check_bases_and_members): Do not talk about grok_x_components.
675 * cp/cp-tree.h (adding_implicit_members): Remove.
676 (cp_storage_class): New type.
677 (cp_decl_spec): Likewise.
678 (cp_decl_specifier_seq): Likewise.
679 (cp_parameter_declarator): Use it for the decl_specifiers field.
680 (check_tag_decl): Adjust prototype.
681 (shadow_tag): Likewise.
682 (groktypename): Likewise.
683 (start_decl): Likewise.
684 (start_function): Likewise.
685 (start_method): Likewise.
686 (grok_x_components): Remove.
687 (grokfield): Adjust prototype.
688 (grokbitfield): Likewise.
689 (finish_member_class_template): Remove.
690 * decl.c: Do not include lex.h.
691 (adding_implicit_members): Do not define.
692 (check_tag_decl): Do not use trees to represent decl-specifiers.
693 (shadow_tag): Likewise.
694 (groktypename): Likewise.
695 (start_decl): Likewise.
696 (grokvardecl): Likewise.
697 (grokdeclarator): Likewise.
698 (grokparms): Likewise.
699 (start_function): Likewise.
700 (start_method): Likewise.
701 * decl.h (grokdeclarator): Adjust prototype.
702 * decl2.c: Do not include lex.h.
703 (grok_x_components): Remove.
704 (grokfield): Do not use trees to represent decl-specifiers.
705 (grokbitfield): Likewise.
706 * lex.c: Do not include lex.h.
707 * lex.h: Remove.
708 * parser.c: Include target.h.
709 (clear_decl_specs): New function.
710 (cp_parser_translation_unit): Do not use trees to represent
711 decl-specifiers.
712 (cp_parser_postfix_expression): Likewise.
713 (cp_parser_new_type_id): Likewise.
714 (cp_parser_condition): Likewise.
715 (cp_parser_simple_declaration): Likewise.
716 (cp_parser_decl_specifier_seq): Likewise.
717 (cp_parser_function_specifier_opt): Likewise.
718 (cp_parser_conversion_type_id): Likewise.
719 (cp_parser_template_parameter): Likewise.
720 (cp_parser_explicit_instantiation): Likewise.
721 (cp_parser_type_specifier): Likewise.
722 (cp_parser_simple_type_specifier): Likewise.
723 (cp_parser_init_declarator): Likewise.
724 (cp_parser_type_id): Likewise.
725 (cp_parser_type_specifier_seq): Likewise.
726 (cp_parser_parameter_declaration): Likewise.
727 (cp_parser_member_declaration): Likewise.
728 (cp_parser_exception_declaration): Likewise.
729 (cp_parser_function_definition_from_specifiers_and_declarator):
730 Likewise.
731 (cp_parser_single_declaration): Likewise.
732 (cp_parser_save_member_function_body): Likewise.
733 (cp_parser_friend_p): Likewise.
734 (cp_parser_set_storage_class): New function.
735 (cp_parser_set_decl_spec_type): Likewise.
736 * pt.c: Do not include lex.h.
737 * semantics.c: Likewise.
738 (finish_member_class_template): Remove.
739
740 2004-06-23 Roger Sayle <roger@eyesopen.com>
741
742 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
743 longer take both "args" and "convert_args" as arguments.
744 (build_op_delete_call): Update call to build_cxx_call.
745 (build_over_call): Likewise, update call to build_cxx_call.
746 * cp-tree.h (build_cxx_call): Update funtion prototype.
747 * typeck.c (build_function_call): Don't call expand_tree_builtin.
748 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
749 (throw_bad_typeid): Likewise.
750 (build_dynamic_cast_1): Likewise.
751
752 2004-06-22 Richard Henderson <rth@redhat.com>
753
754 * class.c (build_vfn_ref): Take a pointer not object. Build
755 an OBJ_TYPE_REF.
756 (cp_fold_obj_type_ref): New.
757 * call.c (build_over_call): Update build_vfn_ref call.
758 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
759 * cp-tree.h (cp_fold_obj_type_ref): Declare.
760
761 2004-06-21 Jason Merrill <jason@redhat.com>
762
763 PR c++/16112
764 * cp-gimplify.c (cp_gimplify_init_expr): Look through
765 CLEANUP_POINT_EXPR.
766
767 2004-06-21 Mark Mitchell <mark@codesourcery.com>
768
769 * cp-tree.def (NEW_EXPR): Add a fourth slot.
770 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
771 (TREE_PARMLIST): Likewise.
772 (CALL_DECLARATOR_PARMS): Likewise.
773 (CALL_DECLARATOR_QUALS): Likewise.
774 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
775 (cp_declarator_kind): New type.
776 (cp_parameter_declarator): Likewise.
777 (cp_declarator): Likewise.
778 (cp_error_declarator): Likewise.
779 (no_parameters): Likewise.
780 (groktypename): Change prototype.
781 (start_decl): Likewise.
782 (start_handler_parms): Likewise.
783 (get_scope_of_declarator): Likewise.
784 (start_function): Likewise.
785 (start_preparsed_function): New function.
786 (start_function): Change prototype.
787 (start_method): Likewise.
788 (grokfield): Likewise.
789 (grokbitfield): Likewise.
790 (build_new): Likewise.
791 (make_pointer_declarator): Remove.
792 (make_reference_declarator): Likewise.
793 (make_call_declarator): Likewise.
794 (set_quals_and_spec): Likewise.
795 (process_template_parm): Change prototype.
796 (begin_function_definition): Remove.
797 (finish_parmlist): Remove.
798 * decl.c (groktypename): Do not use trees to represent
799 declarators.
800 (start_decl): Likewise.
801 (start_handler_parms): Remove.
802 (get_scope_of_declarator): Reimplement.
803 (grokdeclarator): Do not use trees to represent declarators.
804 (grokparms): Likewise.
805 (start_function): Likewise.
806 (start_method): Likewise.
807 (build_void_list_mode): Do not use TREE_PARMLIST.
808 * decl.h (grokdeclarator): Change prototype.
809 * decl2.c (grok_method_quals): Robustify.
810 (grok_x_components): Do not use trees to represent declarators.
811 (grokfield): Likewise.
812 (grokbitfield): Likewise.
813 (start_objects): Build FUNCTION_DECLs, not declarators.
814 (start_static_storage_duration_function): Likewise.
815 * init.c (build_new): Simplify.
816 * lex.c (make_pointer_declarator): Remove.
817 (make_reference_declarator): Likewise.
818 (make_call_declarator): Likewise.
819 (set_quals_and_spec): Likewise.
820 * method.c (use_thunk): Use start_preparsed_function.
821 (synthesize_method): Likewise.
822 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
823 * optimize.c (maybe_clone_body): Use start_preparsed_function.
824 * parser.c (cp_error_declarator): New variable.
825 (declarator_obstack): Likewise.
826 (alloc_declarator): New function.
827 (make_declarator): Likewise.
828 (make_id_declarator): Likewise.
829 (make_pointer_declarator): Likewise.
830 (make_reference_declarator): Likewise.
831 (make_ptrmem_declarator): Likewise.
832 (make_call_declarator): Likewise.
833 (make_array_declarator): Likewise.
834 (no_parameters): New variable.
835 (make_parameter_declarator): Likewise.
836 (cp_parser_check_for_definition_in_return_type): Do not use trees
837 to represent declarators.
838 (cp_parser_translation_unit): Likewise.
839 (cp_parser_new_expression): Likewise.
840 (cp_parser_new_type_id): Likewise.
841 (cp_parser_new_declarator_opt): Likewise.
842 (cp_parser_direct_new_declarator): Likewise.
843 (cp_parser_condition): Likewise.
844 (cp_parser_declaration_statement): Likewise.
845 (cp_parser_declaration): Likewise.
846 (cp_parser_conversion_type_id): Likewise.
847 (cp_parser_conversion_declarator_opt): Likewise.
848 (cp_parser_template_parameter_list): Likewise.
849 (cp_parser_template_parameter): Likewise.
850 (cp_parser_explicit_instantiation): Likewise.
851 (cp_parser_init_declarator): Likewise.
852 (cp_parser_declarator): Likewise.
853 (cp_parser_direct_declarator): Likewise.
854 (cp_parser_type_id): Likewise.
855 (cp_parser_parameter_declaration_clause): Likewise.
856 (cp_parser_parameter_declaration_list): Likewise.
857 (cp_parser_parameter_declaration): Likewise.
858 (cp_parser_member_declaration): Likewise.
859 (cp_parser_exception_declaration): Likewise.
860 (cp_parser_check_declarator_template_parameters): Likewise.
861 (cp_parser_function_definition_from_specifiers_and_declarator):
862 Likewise.
863 (cp_parser_save_member_function_body): Likewise.
864 * pt.c (process_template_parm): Add is_non_type parameter.
865 (convert_template_argument): Adjust call to groktypename.
866 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
867 (tsubst): Do not expect declarators.
868 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
869 argument.
870 (instantiate_decl): Use start_preparsed_function.
871 * semantics.c (begin_function_definition): Remove.
872 (finish_parmlist): Remove.
873 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
874 declarators.
875
876 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
877
878 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
879 (build_new_method_call): Likewise.
880 * decl.c (local_variable_p_walkfn): Don't walk into types.
881 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
882 (build_anon_union_vars): Add new operand for COMPONENT_REF.
883 * init.c (buld_new): Add new operand for ARRAY_REF.
884 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
885 (do_build_assign_ref): Likewise.
886 * parser.c (cp_parser_direct_new_declarator): Add new operands
887 for ARRAY_REF.
888 (cp_parser_direct_declarator): Likewise.
889 * pt.c (tsubst): Likewise.
890 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
891 for COMPONENT_REF.
892 * semantics.c (finish_non_static_data_member): Add new operand
893 for COMPONENT_REF.
894 * typeck.c (build_class_member_access_expr): Likewise.
895 (build_class_member_access_expr, finish_class_member_access_expr):
896 Likewise.
897 (build_ptrmemfunc_access_expr): Likewise.
898 (build_array_ref): Add new operands for ARRAY_REF.
899 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
900 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
901
902 2004-06-21 Richard Henderson <rth@redhat.com>
903
904 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
905 * parser.c (cp_parser_jump_statement): Update commentary.
906 * pt.c (tsubst_expr): Use RETURN_EXPR.
907 * semantics.c (finish_return_stmt): Likewise.
908 (finalize_nrv_r): Likewise.
909 * typeck.c, typeck2.c: Update file start commentary.
910
911 2004-06-21 Richard Henderson <rth@redhat.com>
912
913 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
914
915 2004-06-20 Richard Henderson <rth@redhat.com>
916
917 * cp-tree.h (add_decl_stmt): Declare.
918 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
919 * semantics.c (maybe_cleanup_point_expr): New.
920 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
921 finish_for_expr, finish_switch_cond): Use it.
922 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
923
924 2004-06-20 Richard Henderson <rth@redhat.com>
925
926 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
927 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
928 (cp_gimplify_expr): Call it.
929 (gimplify_cleanup_stmt): Move from c-gimplify.c.
930 (cp_genericize): New.
931 * decl.c (finish_function): Call it.
932 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
933 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
934 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
935 (cp_genericize): Declare.
936 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
937 * dump.c (cp_dump_tree): Likewise.
938 * semantics.c (push_cleanup): Move from c-semantics.c.
939
940 2004-06-20 Zack Weinberg <zack@codesourcery.com>
941
942 * cp-lang.c (has_c_linkage): Implement.
943
944 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
945 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
946 (builtin_function_1): Don't call make_decl_rtl.
947 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
948 (grokvardecl): Don't call mangle_decl.
949 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
950 DECL_ASSEMBLER_NAME.
951 * method.c (set_mangled_name_for_decl): Delete.
952 * name-lookup.c (pushdecl): When a local extern shadows a
953 file-scope declaration of the same object, give both DECLs the
954 same DECL_UID.
955 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
956 on DECL_ASSEMBLER_NAME.
957
958 2004-06-19 Richard Henderson <rth@redhat.com>
959
960 * cp-gimplify.c: Remove unnecessary prototypes.
961 (cp_gimplify_stmt): Merge into ...
962 (cp_gimplify_expr): ... here. Move to end of file. Handle
963 stmts_are_full_exprs_p frobbing.
964 * cp-tree.h (cp_gimplify_stmt): Remove.
965 * pt.c (tsubst_expr): Merge prep_stmt and unify.
966 * tree.c (init_tree): Don't set lang_gimplify_stmt.
967
968 2004-06-18 Richard Henderson <rth@redhat.com>
969
970 PR c++/16034
971 * semantics.c (begin_cond): New.
972 (finish_cond): Rewrite to handle template DECL_STMTs specially.
973 Assume that non-template decls go land before the conditional.
974 (simplify_loop_decl_cond): Likewise.
975 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
976 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
977 begin_switch_stmt, finish_switch_cond): Update to match.
978
979 2004-06-17 Jason Merrill <jason@redhat.com>
980
981 PR c++/16015
982 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
983 (finish_stmt_expr_expr): Update type after conversions.
984 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
985 Handle void initializer.
986 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
987
988 2004-06-17 Geoffrey Keating <geoffk@apple.com>
989
990 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
991 * cp-tree.h (defer_fn): Delete.
992 * decl2.c (defer_fn): Delete.
993 (finish_file): Simplify deferred_fns loops; check that
994 only used inline functions get into deferred_fns.
995 (mark_used): Inline previous contents of defer_fn.
996
997 2004-06-16 Richard Henderson <rth@redhat.com>
998
999 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
1000 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
1001 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
1002 of CTOR_INITIALIZER ...
1003 (pp_cxx_statement): ... here.
1004 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
1005 (finish_function): Use alloc_stmt_list to zap entire function.
1006 * parser.c (cp_parser_compound_statement): Update commentary.
1007 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
1008 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
1009 (finish_stmt_expr): Don't look through COMPOUND_STMT.
1010
1011 2004-06-16 Geoffrey Keating <geoffk@apple.com>
1012
1013 * pt.c (mark_decl_instantiated): Don't call defer_fn.
1014
1015 2004-06-16 Richard Henderson <rth@redhat.com>
1016
1017 * parser.c (cp_parser_labeled_statement): Update commentary.
1018 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
1019 * tree.c (mark_local_for_remap_r): Likewise.
1020
1021 2004-06-16 Richard Henderson <rth@redhat.com>
1022
1023 * parser.c (cp_parser_asm_definition): Update commentary.
1024 * pt.c (tsubst_expr): Use ASM_EXPR.
1025 * semantics.c (finish_asm_stmt): Likewise.
1026
1027 2004-06-16 Richard Henderson <rth@redhat.com>
1028
1029 * decl.c (finish_destructor_body): Use LABEL_EXPR.
1030 * parser.c (cp_parser_statement): Update commentary.
1031 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
1032 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
1033 * tree.c (mark_local_for_remap_r): Likewise.
1034
1035 2004-06-16 Richard Henderson <rth@redhat.com>
1036
1037 PR c++/16012
1038 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
1039 statement in FOR_INIT_STMT for templates.
1040
1041 2004-06-15 Richard Henderson <rth@redhat.com>
1042
1043 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
1044 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
1045 (genericize_try_block): Use gimplify_stmt.
1046 (genericize_catch_block, genericize_eh_spec_block): Likewise.
1047 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
1048 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
1049 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
1050 (cp_tree_chain_matters_p): Remove.
1051 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
1052 (COMPOUND_STMT_BODY_BLOCK): New.
1053 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
1054 (EXPR_STMT_STMT_EXPR_RESULT): New.
1055 (building_stmt_tree): Check cur_stmt_list.
1056 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
1057 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
1058 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
1059 (cp_finish_decl): Use push_cleanup.
1060 (start_function, finish_function): Use statement lists.
1061 (finish_stmt): Do nothing.
1062 * except.c (begin_eh_spec_block): Use statement lists.
1063 (check_handlers_1, check_handlers): Likewise.
1064 * init.c (construct_virtual_base): Don't add extra compound stmts.
1065 (build_vec_init): Likewise.
1066 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
1067 * name-lookup.h (struct cp_binding_level): Add statement_list.
1068 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
1069 (cp_parser_labeled_statement, cp_parser_expression_statement,
1070 cp_parser_statement_seq_opt): Likewise.
1071 (cp_parser_compound_statement): Likewise. Take bool for try block.
1072 (cp_parser_selection_statement): Tidy if processing.
1073 (cp_parser_already_scoped_statement): Rewrite to do what it says.
1074 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
1075 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
1076 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
1077 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
1078 (finish_cond): New, rewritten from FINISH_COND.
1079 (simplify_loop_decl_cond): New.
1080 (finish_expr_stmt): Avoid nested EXPR_STMTs.
1081 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
1082 begin_else_clause, finish_else_clause, finish_if_stmt,
1083 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
1084 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
1085 finish_for_cond, finish_for_stmt, begin_switch_stmt,
1086 finish_switch_cond, finish_switch_stmt, begin_try_block,
1087 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
1088 finish_handler_sequence, finish_function_handler_sequence,
1089 begin_handler, finish_handler_parms, finish_handler,
1090 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
1091 using statement lists.
1092 (begin_compound_stmt): Replace has_no_scope argument with flags.
1093 Update all callers. Use statement lists.
1094 (finish_compound_stmt): Likewise.
1095 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
1096 (current_scope_stmt_stack): Remove.
1097 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
1098 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
1099 Rewrite with statement lists.
1100
1101 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
1102
1103 * parser.c: Change all assignments of c_lex_string_translate
1104 to true and false to 1 and 0.
1105 (cp_lexer_read_token): Convert type of the translated string.
1106 (cp_parser_skip_to_closing_parentheses): Preserve original
1107 value of c_lex_string_translate, and set it to -1 while
1108 running.
1109 (cp_parser_cache_group): Likewise.
1110 (cp_parser_cache_group_1): Renamed.
1111 (cp_parser_asm_operand_list): Remove redundant setting of
1112 c_lex_string_translate.
1113 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
1114 Handle chained strings.
1115
1116 2004-06-12 Andrew Pinski <apinski@apple.com>
1117
1118 PR c++/14639
1119 Revert:
1120 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
1121
1122 * cp-tree.h: Fix typo.
1123
1124 * cp-tree.h: Include cgraph.h
1125 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1126 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1127
1128 2004-06-12 Jason Merrill <jason@redhat.com>
1129
1130 PR tree-optimization/14107
1131 * decl.c (finish_function): Warn about no return in all functions.
1132
1133 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
1134
1135 * cp-tree.h (struct language_function): Remove cannot_inline.
1136 * decl.c (save_function_data): cannot_inline is no more.
1137 (cxx_push_function_context): Likewise.
1138 * decl2.c (start_objects, start_static_storage_duration_function):
1139 Reset DECL_INLINE, set DECL_UNINLINABLE.
1140
1141 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1142
1143 PR c++/15967
1144 * search.c (lookup_field): Propagate the ambiguity list.
1145 (lookup_fnfields): Likewise.
1146
1147 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1148
1149 PR c++/15947
1150 * parser.c (cp_parser_template_name): Ctors/dtors never need a
1151 template keyword to disambiguate.
1152
1153 2004-06-14 Mark Mitchell <mark@codesourcery.com>
1154
1155 PR c++/15096
1156 * decl.c (grokdeclarator): Ignore pointer-to-members when
1157 computing template depth.
1158
1159 PR c++/14930
1160 * name-lookup.c (pushtag): Do not try to put class declarations in
1161 explicit specialization scopes.
1162
1163 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
1164
1165 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
1166
1167 2004-06-11 Mark Mitchell <mark@codesourcery.com>
1168
1169 PR c++/15862
1170 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
1171 bindings for undeclared built-ins.
1172
1173 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1174
1175 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
1176 appear at the correct location.
1177
1178 2004-06-10 Jason Merrill <jason@redhat.com>
1179
1180 PR c++/15875
1181 Revert:
1182 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1183 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1184 TREE_TYPE for non-dependent names.
1185 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1186 unknown_type_node as its TREE_TYPE.
1187 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1188 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1189 (dump_expr) <SCOPE_REF case>: Likewise.
1190
1191 2004-06-10 Mark Mitchell <mark@codesourcery.com>
1192
1193 PR c++/15227
1194 * parser.c (cp_parser_direct_declarator): Robustify.
1195
1196 PR c++/15877
1197 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
1198 constants in non-dependent contexts.
1199
1200 PR c++/14211
1201 PR c++/15076
1202 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
1203 necessary.
1204
1205 2004-06-10 Jakub Jelinek <jakub@redhat.com>
1206
1207 PR c++/14791
1208 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
1209 specially.
1210
1211 2004-06-09 Mark Mitchell <mark@codesourcery.com>
1212
1213 Revert:
1214 PR c++/15815
1215 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1216 * lex.c (handle_pragma_interface): Deprecate.
1217 (handle_pragma_implementation): Likewise.
1218
1219 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
1220
1221 * g++spec.c (lang_specific_driver): Remove check for -lm
1222 and -lmath when check it see if it was the math library.
1223
1224 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1225
1226 PR c++/7841
1227 * parser.c (cp_parser_direct_declarator): Reject constructor named
1228 as qualified template-id.
1229
1230 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1231
1232 PR c++/15815
1233 * lex.c (handle_pragma_interface): Deprecate.
1234 (handle_pragma_implementation): Likewise.
1235
1236 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1237
1238 PR c++/15766
1239 * parser.c (cp_parser_iteration_statement): Fix typo in error
1240 message.
1241
1242 PR c++/14777
1243 * pt.c (tsubst_default_argument): Do not defer access checks
1244 while substituting into the default argument.
1245
1246 PR c++/15554
1247 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
1248 constant in a non-dependent context.
1249
1250 PR c++/15057
1251 * except.c (build_throw): Ensure that temp_expr has been
1252 initialized.
1253
1254 2004-06-06 Roger Sayle <roger@eyesopen.com>
1255
1256 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
1257
1258 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1259
1260 PR c++/15503
1261 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
1262 'typename', and accept 'template'.
1263
1264 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
1265 Jan Hubicka <jh@suse.cz>
1266
1267 PR c++/14639
1268 * method.c (use_think): Do not mark thunk as referenced.
1269
1270 2004-06-03 Matt Austern <austern@apple.com>
1271
1272 PR c++/15428
1273 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
1274 is nonzero, and if we see a noninline definition of a key method,
1275 make the vtables nonweak.
1276
1277 2004-06-02 Matt Austern <austern@apple.com>
1278
1279 * cp-tree.h (instantiate_decl): new boolean parameter,
1280 undefined_ok. Current behavior is equivalent to its being 0.
1281 * decl2.c (mark_used): Add new argument when calling instantiate_decl
1282 * pt.c (mark_decl_instantiated): Unconditionally make
1283 instantiations explicit unconditionally
1284 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
1285 since mark_decl_instantiated now does it.
1286 (instantiate_class_member): New. Instantiate a member of an
1287 explicitly instantiated class template.
1288 (do_type_instantiation): Explicitly instantiate members of an
1289 explicitly instantiated class template.
1290 (instantiate_decl): if undefined_ok is nonzero, and if we're
1291 trying to explicitly instantiated a template with no definition,
1292 change it to an implicit instantiation.
1293 (instantiate_pending_templates): Add new argument to instantiate_decl.
1294 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1295
1296 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
1297
1298 * cp-tree.h: Fix typo.
1299
1300 * cp-tree.h: Include cgraph.h
1301 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1302 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1303
1304 2004-06-01 Jason Merrill <jason@redhat.com>
1305
1306 PR c++/15142
1307 * call.c (call_builtin_trap): Remove type parm.
1308 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
1309 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
1310
1311 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1312
1313 PR c++/13092
1314 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1315 TREE_TYPE for non-dependent names.
1316 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1317 unknown_type_node as its TREE_TYPE.
1318 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1319 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1320 (dump_expr) <SCOPE_REF case>: Likewise.
1321
1322 2004-06-01 Richard Henderson <rth@redhat.com>
1323 Andrew Pinski <pinskia@physics.uc.edu>
1324
1325 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
1326 * parser.c (struct cp_parser): Remove in_offsetof.
1327 (cp_parser_new): Don't set it.
1328 (cp_parser_unary_expression): Don't check it.
1329 (cp_parser_postfix_open_square_expression): Split out from ...
1330 (cp_parser_postfix_expression): ... here.
1331 (cp_parser_postfix_dot_deref_expression): Likewise.
1332 (cp_parser_builtin_offsetof): New.
1333 (cp_parser_primary_expression): Use it.
1334
1335 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1336
1337 PR c++/14932
1338 * parser.c (cp_parser_postfix_expression): Allow subscript
1339 operator in offsetof.
1340
1341 2004-05-31 Mark Mitchell <mark@codesourcery.com>
1342
1343 PR c++/15701
1344 * friend.c (add_friend): Do not try to perform access checks for
1345 functions from dependent classes.
1346
1347 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1348
1349 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
1350 (pp_cxx_begin_template_argument_list): Turn into a function.
1351 (pp_cxx_end_template_argument_list): Likewise.
1352 (pp_cxx_separate_with): Define.
1353 (pp_cxx_unqualified_id): Tidy.
1354 (pp_cxx_primary_expression): Likewise.
1355 (pp_cxx_postfix_expression): Likewise.
1356 (pp_cxx_expression): Likewise.
1357 (pp_cxx_simple_type_specifier): Likewise.
1358 (pp_cxx_type_specifier_seq): Likewise.
1359 (pp_cxx_parameter_declaration_clause): Likewise.
1360 (pp_cxx_exception_specification): Likewise.
1361 (pp_cxx_direct_declarator): Likewise.
1362 (pp_cxx_type_id): Likewise.
1363 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
1364 cxx-pretty-print.c.
1365 (pp_cxx_left_paren): Likewise.
1366 (pp_cxx_right_paren): Likewise.
1367 (pp_cxx_left_brace): Likewise.
1368 (pp_cxx_right_brace): Likewise.
1369 (pp_cxx_left_bracket): Likewise.
1370 (pp_cxx_right_bracket): Likewise.
1371 (pp_cxx_dot): Likewise.
1372 (pp_cxx_identifier): Likewise.
1373 (pp_cxx_tree_identifier): Likewise.
1374 (pp_cxx_ampersand): New macro.
1375 (pp_cxx_star): Likewise.
1376 (pp_cxx_arrow): Likewise.
1377 (pp_cxx_semicolon): Likewise.
1378 (pp_cxx_complement): Likewise.
1379 (pp_cxx_begin_template_argument_list): Declaree.
1380 (pp_cxx_end_template_argument_list): Likewise.
1381 (pp_cxx_colon_colon): likewise.
1382
1383 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
1384
1385 * parser.c (cp_parser_simple_type_specifier): Explicitly test
1386 against NULL_TREE.
1387
1388 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
1389
1390 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
1391 typeck.c: Fix comment formatting.
1392
1393 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
1394
1395 * cp-lang.c (cp_expand_decl): Remove.
1396 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
1397
1398 2004-05-30 Andreas Jaeger <aj@suse.de>
1399
1400 * lang-specs.h: Add missing initializers for .ii.
1401
1402 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
1403
1404 * decl.c (cp_make_fname_decl): Free return value from
1405 fname_as_string.
1406
1407 2004-05-28 Mark Mitchell <mark@codesourcery.com>
1408
1409 PR c++/15083
1410 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
1411 even in a templat.e
1412 * init.c (build_new): Likewise.
1413
1414 PR c++/15640
1415 * name-lookup.c (arg_assoc): Robustify.
1416
1417 PR c++/15471
1418 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
1419 when determining the scope to use for a pointer to member.
1420 (lookup_anon_field): Give it external linkage.
1421 * cp-tree.h (lookup_anon_field): Declare it.
1422 * expr.c (cplus_expand_constant): Use it.
1423
1424 2004-05-28 Mark Mitchell <mark@codesourcery.com>
1425
1426 PR c++/14668
1427 * parser.c (cp_parser_simple_type_specifier): Call
1428 maybe_note_name_used_in_class.
1429
1430 2004-05-28 Tom Marshall <tmarshall@real.com>
1431
1432 PR c++/15214
1433 * class.c (finish_struct_1): Warn only if the dtor is non-private or
1434 the class has friends.
1435
1436 2004-05-27 Adam Nemet <anemet@lnxw.com>
1437
1438 PR c++/12883
1439 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
1440 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
1441
1442 2004-05-24 Geoffrey Keating <geoffk@apple.com>
1443
1444 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
1445 if it might be needed.
1446 * pt.c (mark_decl_instantiated): Only call defer_fn if
1447 the function actually needs processing in finish_file.
1448 * decl2.c (finish_file): Add check that elements in
1449 deferred_fns_used are really needed there. Remove unnecessary
1450 test of DECL_SAVED_TREE.
1451
1452 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
1453
1454 * Make-lang.in: No need to specify $(LIBCPP).
1455
1456 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1457
1458 PR c++/15044
1459 * parser.c (cp_parser_class_head): Robustify.
1460
1461 PR c++/15317
1462 * parser.c (cp_parser_decl_specifier_seq): Correct error in
1463 comment.
1464 (cp_parser_constructor_declarator_p): Treat attributes
1465 as decl-specifiers.
1466
1467 PR c++/15329
1468 * typeck.c (build_unary_op): Do not attempt to resolve casts to
1469 base classes in templates.
1470
1471 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1472
1473 PR c++/15165
1474 * pt.c (instantiate_template): Robustify.
1475
1476 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1477
1478 PR c++/15025
1479 * decl.c (xref_tag): Issue errors about redeclaring template
1480 classes as non-template classes.
1481
1482 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1483
1484 PR c++/14821
1485 * name-lookup.c (supplement_binding): Allow redefinitions of
1486 namespace aliases.
1487
1488 PR c++/14883
1489 * parser.c (cp_parser_template_argument): Robustify.
1490
1491 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1492
1493 * class.c (alter_access): Use %E format specifier to print an
1494 identifier node. Avoid looking at the IDENTIFIER_POINTER.
1495 (push_lang_context): Likewise.
1496 * decl.c (lookup_label): Likewise.
1497 (grokdeclarator): Likewise.
1498 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
1499 * pt.c (do_type_instantiation): Likewise.
1500 * tree.c (handle_java_interface_attribute): Likewise.
1501 (handle_com_interface_attribute): Likewise.
1502 (handle_init_priority_attribute): Likewise.
1503
1504 2004-05-22 Mark Mitchell <mark@codesourcery.com>
1505
1506 PR c++/15285
1507 PR c++/15299
1508 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
1509 recognized as overloaded functions.
1510
1511 2004-05-22 Mark Mitchell <mark@codesourcery.com>
1512
1513 PR c++/15507
1514 * class.c (layout_nonempty_base_or_field): Do not try to avoid
1515 layout conflicts for unions.
1516
1517 PR c++/15542
1518 * typeck.c (build_x_unary_op): Instantiate template class
1519 specializations before looking for "operator &".
1520
1521 PR c++/15427
1522 * typeck.c (complete_type): Layout non-dependent array types, even
1523 in templates.
1524
1525 PR c++/15287
1526 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
1527 template.
1528
1529 2004-05-22 Roger Sayle <roger@eyesopen.com>
1530
1531 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
1532 returning when TREE_TYPE is error_mark_node.
1533 * typeck.c (require_complete_type): Return error_mark_node if
1534 value's type is an error_mark_node.
1535
1536 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
1537
1538 * optimize.c (calls_setjmp_r): Remove.
1539 (calls_setjmp_p): Remove.
1540 * cp-tree.c (calls_setjmp_p): Remove.
1541 * decl.c (finish_function): Do not call calls_setjmp_p.
1542
1543 2004-05-18 Zack Weinberg <zack@codesourcery.com>
1544
1545 * decl.c (cp_finish_decl): Use mark_decl_referenced.
1546 * decl2.c (maybe_make_one_only): Likewise.
1547 * method.c (use_thunk): Likewise.
1548
1549 2004-05-18 Jason Merrill <jason@redhat.com>
1550
1551 * class.c (build_base_path): Tidy a bit.
1552
1553 2004-05-14 Geoffrey Keating <geoffk@apple.com>
1554
1555 * name-lookup.c (struct scope_binding): New.
1556 (EMPTY_SCOPE_BINDING): New.
1557 (lookup_using_namespace): Take a scope_binding instead of a
1558 cxx_binding.
1559 (qualified_lookup_using_namespace): Likewise.
1560 (cxx_binding_clear): Delete.
1561 (do_nonmember_using_decl): Use a scope_binding instead of a
1562 cxx_binding.
1563 (lookup_tag): Don't call select_decl.
1564 (ambiguous_decl): Don't return anything (and change callers to match).
1565 Take a scope_binding as the second parameter.
1566 (lookup_namespace_name): Use a scope_binding instead of a
1567 cxx_binding.
1568 (unqualified_namespace_lookup): Likewise.
1569 (lookup_qualified_name): Likewise.
1570 (select_decl): Take a scope_binding instead of a cxx_binding.
1571 Use macros rather than hand-coding tests for type-ness.
1572
1573 2004-05-13 Diego Novillo <dnovillo@redhat.com>
1574
1575 * cp-gimplify.c: Rename from cp-simplify.c.
1576 * Make-lang.in, optimize.c: Update.
1577
1578 2004-05-13 Diego Novillo <dnovillo@redhat.com>
1579
1580 Merge from tree-ssa-20020619-branch. See
1581 ChangeLog.tree-ssa for details.
1582
1583 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
1584 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
1585 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
1586 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
1587 Merged.
1588 * cp-mudflap.c: New file.
1589 * cp-simplify.c:: New file.
1590
1591 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1592
1593 PR c++/14389
1594 * decl2.c (check_classfn): For member templates, compare also the
1595 template parameters to match the declaration.
1596 * cp-tree.h: Adjust declaration of check_classfn.
1597 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
1598 * friend.c (do_friend): Likewise.
1599 * pt.c (tsubst_friend_function): Likewise.
1600
1601 2004-05-01 Zack Weinberg <zack@codesourcery.com>
1602
1603 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
1604 Instead, dig into the representation type to find the array bound.
1605
1606 2004-04-30 Jason Merrill <jason@redhat.com>
1607
1608 Refer to base members using COMPONENT_REFs where possible.
1609 * class.c (build_simple_base_path): New fn.
1610 (build_base_path): Use it for non-virtual base references.
1611 (layout_class_type): Change base fields to their real type
1612 after layout is done.
1613 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
1614 * cp-lang.c (cxx_get_alias_set): Use it.
1615
1616 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
1617
1618 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
1619 comment typos.
1620
1621 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1622
1623 PR c++/15064
1624 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
1625 used in integral constant expressions.
1626
1627 2004-04-22 Mark Mitchell <mark@codesourcery.com>
1628
1629 * init.c (build_aggr_init): Fix accidental use of C99 construct in
1630 previous change.
1631
1632 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
1633 braced initializer.
1634 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
1635 * decl.c (reshape_init): Use it.
1636 * init.c (perform_member_init): Remove redundant condition.
1637 (build_aggr_init): Adjust to handle brace-enclosed initializers
1638 correctly.
1639 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
1640
1641 * parser.c (cp_parser_initializer_clause): Do not set
1642 TREE_HAS_CONSTRUCTOR on the initializer.
1643 * rtti.c (tinfo_base_init): Likewise.
1644 (generic_initializer): Likewise.
1645 (ptr_initializer): Likewise.
1646 (ptm_initializer): Likewise.
1647 (class_initializer): Likewise.
1648 (get_pseudo_ti_init): Likewise.
1649 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
1650
1651 2004-04-22 Alan Modra <amodra@bigpond.net.au>
1652
1653 * name-lookup.c (anonymous_namespace_name): Make static.
1654
1655 2004-04-19 Roger Sayle <roger@eyesopen.com>
1656
1657 PR middle-end/14531
1658 * class.c (build_base_path): Call fold whilst building the NULL
1659 pointer check expression trees.
1660
1661 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
1662
1663 * init.c (build_new_1): Don't use type size argument for Java
1664 _Jv_AllocObject call.
1665
1666 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
1667
1668 * method.c (make_alias_for_thunk): Remove preprocessor guard on
1669 declaration and definition.
1670
1671 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
1672
1673 PR c++/14808
1674 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
1675 than ASM_OUTPUT_DEF.
1676
1677 2004-04-08 Jakub Jelinek <jakub@redhat.com>
1678
1679 * decl2.c (mark_used): Don't segfault if cfun != NULL but
1680 current_function_decl == NULL.
1681
1682 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
1683
1684 PR c++/3518
1685 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
1686 level.
1687
1688 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1689
1690 * init.c (decl_constant_value): Don't look at DECL_INITIAL
1691 of PARM_DECL.
1692 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
1693 or TREE_SIDE_EFFECTS of a type.
1694
1695 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
1696
1697 PR c++/14007
1698 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
1699 cv-qualifier unification.
1700 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
1701
1702 2004-04-02 Jan Hubicka <jh@suse.cz>
1703
1704 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
1705 * cp-tree.h (cp_update_decl_after_saving): Declare.
1706 * tree.c (cp_update_decl_after_saving): Define.
1707
1708 2004-04-01 Mark Mitchell <mark@codesourcery.com>
1709
1710 PR c++/14803
1711 * typeck.c (get_delta_difference): Call fold before returning the
1712 value.
1713
1714 2004-04-01 Richard Henderson <rth@redhat.com>
1715
1716 PR c++/14804
1717 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
1718 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
1719
1720 2004-04-01 Mark Mitchell <mark@codesourcery.com>
1721
1722 PR c++/14810
1723 * name-lookup.c (maybe_push_cleanup_level): Robustify.
1724
1725 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1726
1727 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
1728
1729 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1730
1731 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
1732 * class.c (check_bitfield_decl): Likewise.
1733 * cvt.c (type_promotes_to): Likewise.
1734 * decl.c (finish_enum): Likewise.
1735 * mangle.c (write_builtin_type): Likewise.
1736 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
1737 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
1738 (build_binary_op): Likewise.
1739
1740 2004-03-31 Jan Hubicka <jh@suse.cz>
1741
1742 * tree.h (optimize_function): Kill prototype.
1743 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
1744 * semantics.c (expand_body): Kill.
1745
1746 2004-03-30 Mark Mitchell <mark@codesourcery.com>
1747
1748 PR c++/14724
1749 * decl.c (start_decl_1): Do not decide whether or not to create a
1750 new cleanup level until after the type has been completed.
1751
1752 PR c++/14763
1753 * pt.c (tsubst_default_argument): Clear current_function_decl.
1754
1755 2004-03-30 Zack Weinberg <zack@codesourcery.com>
1756
1757 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
1758
1759 2004-03-29 Zack Weinberg <zack@codesourcery.com>
1760
1761 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
1762 is null, just print the literal name and return.
1763
1764 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
1765
1766 * cxx-pretty-print.c: Fix comment typos.
1767
1768 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
1769
1770 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
1771 Update copyright.
1772
1773 2004-03-23 Ziemowit Laski <zlaski@apple.com>
1774
1775 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
1776 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
1777 target hook.
1778
1779 2004-03-23 Zack Weinberg <zack@codesourcery.com>
1780
1781 PR 12267, 12391, 12560, 13129, 14114, 14133
1782 * cp-lang.c (c_reset_state): Delete.
1783 (push_file_scope, pop_file_scope): New stubs.
1784 * parser.c (c_parse_file): Call sorry() here if called more than once.
1785
1786 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1787
1788 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
1789 for INTEGER_CST.
1790
1791 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1792
1793 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
1794
1795 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
1796
1797 * error.c (enum pad): Remove.
1798 (dump_qualifiers): Likewise.
1799 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
1800 (dump_aggr_type): Likewise.
1801 (dump_type_suffix): Likewise.
1802 (dump_simple_decl): Likewise.
1803 (dump_function_decl): Likewise.
1804 (cv_to_string): Likewise.
1805 (dump_type_prefix): Likewise. Adjust return void.
1806 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
1807 cxx_pretty_print.h.
1808 (pp_cxx_template_keyword_if_needed): Document.
1809 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
1810 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
1811 MUST_NOT_THROW_EXPR.
1812
1813 2004-03-21 Mark Mitchell <mark@codesourcery.com>
1814
1815 PR c++/14616
1816 * decl.c (cp_finish_decl): Compute the size of arrays declared in
1817 templates, if their type is non-dependent.
1818
1819 2004-03-19 Mark Mitchell <mark@codesourcery.com>
1820
1821 * call.c (build_op_delete_call): Do not forget the placement
1822 arguments when iterating through mutiple delete operators.
1823
1824 * cp-tree.h (svaed_scope): Remove last_parms.
1825 (NEW_DELETE_OPNAME_P): New macro.
1826 (last_function_parms): Remove.
1827 (do_friend): Adjust prototype.
1828 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
1829 using last_function_parms.
1830 (grokfndecl): Take the PARM_DECLs as an argument, rather than
1831 using last_function_parms.
1832 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
1833 for class-specific operator new and operator delete.
1834 (grok_op_properties): Do not look for allocation functions with
1835 METHOD_TYPEs.
1836 (start_function): Use DECL_ARGUMENTS instead of
1837 last_function_parms.
1838 * decl.h (last_function_parms): Do not declare.
1839 * decl2.c (grokclassfn): Do not use last_function_parms.
1840 * friend.c (do_friend): Remove parmdecls parameter.
1841 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
1842 (pop_from_top_level): Do not restore it.
1843 * pt.c (check_explicit_specialization): Do not adjust
1844 last_function_parms.
1845
1846 * name-lookup.c (do_local_using_decl): Create a local binding for
1847 types brought in via using declarations.
1848
1849 * name-lookup.c (lookup_arg_dependent): Handle block-scope
1850 function declarations correctly.
1851
1852 * semantics.c (finish_id_expression): Correct handling of
1853 conversion operators to dependent types.
1854
1855 * typeck.c (lookup_destructor): Allow the use of destructors from
1856 base classes.
1857
1858 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1859
1860 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
1861 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
1862 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
1863 the field is named TEMPLATE_TYPE_PARM_INDEX.
1864
1865 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1866
1867 PR c++/14545
1868 * parser.c (cp_parser_functional_cast): A cast to anything
1869 but integral or enumaration type is not an integral constant
1870 expression.
1871 * pt.c (value_dependent_expression_p): Handle cast expressions
1872 without operands (such as "int()").
1873
1874 2004-03-18 Mark Mitchell <mark@codesourcery.com>
1875
1876 * semantics.c (finish_pseudo_destructor_expr): Allow differing
1877 cv-qualification between the type named by the
1878 pseudo-destructor-name and the object-type.
1879
1880 * search.c (accessible_base_p): Handle non-proper bases.
1881
1882 * name-lookup.c (do_nonmember_using_decl): If a using declaration
1883 refers to a single overloaded function, set the type of the
1884 function.
1885 * tree.c (lvalue_type): Simplify.
1886 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
1887 unknown type.
1888 (build_unary_op): Handle OVERLOADs with known types.
1889
1890 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
1891 function templates.
1892
1893 * parser.c (cp_parser_postfix_expression): Handle the use of
1894 "typename" in non-dependent contexts. Convert appropriately when
1895 when using a qualified name after "->" or ".".
1896
1897 * call.c (conditional_conversion): Honor the requirement that some
1898 conversions refer to the original object.
1899
1900 2004-03-18 Mark Mitchell <mark@codesourcery.com>
1901
1902 * call.c (build_conditional_expr): Do not call force_rvalue for
1903 operands of void_type when the conditional expression itself has
1904 void type.
1905 * name-lookup.c (pushdecl): Don't consider a declaration of a
1906 function named "main" to be an overload of a type named "main".
1907 * parser.c (cp_parser_template_name): Perform name lookup when the
1908 template name is proceeded by "template" if the qualifying scope
1909 is non-dependent.
1910 * typeck.c (composite_pointer_type_r): Correctly handle
1911 pointer-to-member types.
1912 (build_const_cast): Likewise.
1913
1914 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1915
1916 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
1917 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
1918 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
1919 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
1920 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
1921 (TYPEOF_TYPE_EXPR): New macro.
1922 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
1923 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
1924 * pt.c (tsubst): Likewise.
1925 * semantics.c (finish_typeof): Likewise.
1926 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
1927 and TEMPLATE_TYPE_PARM.
1928 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
1929 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
1930
1931 2004-03-16 Mark Mitchell <mark@codesourcery.com>
1932
1933 PR c++/14586
1934 * cp-tree.h (build_new_op): Change prototype.
1935 (build_x_binary_op): Likewise.
1936 * call.c (build_new_op): Add overloaded_p parameter.
1937 * decl2.c (grok_array_decl): Adjust call to build_new_op.
1938 * parser.c (cp_parser_binary_expression): Note that uses of
1939 overloaded operators prevents an expression from being considered
1940 an integral constant.
1941 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
1942 build_x_binary_op.
1943 * semantics.c (finish_call_expr): Likewise.
1944 * typeck.c (rationalize_conditional_expr): Likewise.
1945 (build_x_indirect_ref): Likewise.
1946 (build_x_binary_op): Likewise.
1947 (build_x_unary_op): Likewise.
1948 (build_x_compound_expr): Likewise.
1949 (build_modify_expr): Likewise.
1950 * typeck2.c (build_x_arrow): Likewise.
1951
1952 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
1953
1954 * cp-lang.c, ptree.c: Update copyright.
1955
1956 2004-03-13 Mark Mitchell <mark@codesourcery.com>
1957
1958 PR c++/14550
1959 * parser.c (cp_parser_non_integral_constant_expression): Encode
1960 more of the idiom that surrounded calls to this function within
1961 the function itself
1962 (cp_parser_primary_expression): Adjust accordingly.
1963 (cp_parser_postfix_expression): Likewise.
1964 (cp_parser_unary_expression): Likewise.
1965 (cp_parser_cast_expression): Likewise.
1966 (cp_parser_assignment_expression): Likewise.
1967 (cp_parser_expression): Likewise.
1968 (cp_parser_new_expression): Note that new-expressions are not
1969 allowed in integral constant expressions.
1970 (cp_parser_delete_expression): Likewise.
1971
1972 2004-03-12 Matt Austern <austern@apple.com>
1973
1974 * decl2.c (maybe_make_one_only): Look at
1975 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
1976 to make an explicit instantiation weak.
1977 * method.c (use_thunk): Make sure we call comdat_linkage
1978 when appropriate.
1979 * pt.c (do_type_instantiation): On systems where weak symbols
1980 don't go in a static archive's TOC, explicit instantiation of a
1981 class must imply *explicit* instantiation of its memeber.
1982
1983 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
1984
1985 * call.c, cp-tree.h, pt.c: Fix comment typos.
1986
1987 2004-03-10 Mark Mitchell <mark@codesourcery.com>
1988
1989 PR c++/14510
1990 * decl.c (xref_tag): Disregard non-type declarations when
1991 looking up a tagged type.
1992
1993 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
1994
1995 PR c++/14397
1996 * call.c (convert_like_real): Build a const qualified temporary,
1997 when testing ctor access.
1998
1999 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2000
2001 * call.c (initialize_reference): Fix typo.
2002
2003 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2004
2005 PR c++/14409
2006 * pt.c (determine_specialization): For member templates, match also
2007 constness.
2008
2009 PR c++/14448
2010 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
2011 non-dependent.
2012 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
2013
2014 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2015
2016 PR c++/14230
2017 * call.c (initialize_reference): Handle initializers that are
2018 class-member access expressions applies to rvalues.
2019
2020 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2021
2022 PR c++/14432
2023 * name-lookup.c (supplement_binding): Ignore functions that are
2024 marked DECL_ANTICIPATED.
2025
2026 2004-03-08 Mark Mitchell <mark@codesourcery.com>
2027
2028 PR c++/14401
2029 * class.c (check_field_decls): Complain about non-static data
2030 members of reference type in unions. Propagate
2031 CLASSTYPE_REF_FIELDS_NEED_INIT and
2032 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
2033 data members.
2034 * init.c (perform_member_init): Complain about mbmers with const
2035 type that are not explicitly initialized.
2036
2037 2004-03-08 Mark Mitchell <mark@codesourcery.com>
2038
2039 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
2040 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
2041 (lang_identifier): Remove implicit_decl and error_locus.
2042 (IDENTIFIER_IMPLICIT_DECL): Remove.
2043 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
2044 (IDENTIFIER_ERROR_LOCUS): Likewise.
2045 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
2046 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
2047 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
2048 (implicitly_declare): Remove.
2049 * decl.c (warn_extern_redeclared_static): Remove check of
2050 IDENTIFIER_IMPLICIT_DECL.
2051 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
2052 (implicitly_declare): Remove.
2053 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
2054 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
2055 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
2056 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
2057 in the innermost scope, rather than at namespace scope.
2058 * name-lookup.c (push_local_binding): Give it external linkage.
2059 (pushdecl): Remove dead code.
2060 * name-lookup.h (push_local_binding): Declare it.
2061 * ptree.c (cxx_print_identifier): Don't print
2062 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
2063 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
2064 not IDENTIFIER_ERROR_LOCUS.
2065 * typeck.c (build_function_call): Remove dead code.
2066
2067 2004-03-08 Jason Merrill <jason@redhat.com>
2068
2069 PR c++/13170
2070 * decl.c (xref_tag): Remove attribute handling.
2071 * cp-tree.h: Adjust prototype.
2072 * decl.c, parser.c, rtti.c: Adjust callers.
2073 * parser.c (cp_parser_class_head): Pass back attributes in the
2074 class head.
2075 (cp_parser_class_specifier): Adjust.
2076
2077 2004-03-08 Matt Austern <austern@apple.com>
2078
2079 PR debug/14079
2080 * name-lookup.c (add_decl_to_level): Add extern variables, as well
2081 as static, to static_decls array.
2082
2083 2004-03-05 Jason Merrill <jason@redhat.com>
2084
2085 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
2086
2087 2004-03-04 Geoffrey Keating <geoffk@apple.com>
2088
2089 * decl.c (grokfndecl): Update old incorrect comment.
2090 (grokvardecl): Diagnose C++ variables of type with no linkage.
2091
2092 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2093
2094 PR c++/14369
2095 * pt.c (build_non_dependent_expr): Do not create a
2096 NON_DEPENDENT_EXPR for a THROW_EXPR.
2097
2098 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
2099
2100 PR c++/14369
2101 * error.c (dump_expr): Handle THROW_EXPR.
2102
2103 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2104
2105 PR c++/14360
2106 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
2107 lookup if ordinary name-lookup finds a non-function.
2108 * pt.c (tsubst_copy_and_build): Likewise.
2109
2110 PR c++/14361
2111 * parser.c (cp_parser_late_parsing_default_args): Check that there
2112 are no extra tokens after the end of the default-argument
2113 expression.
2114
2115 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2116
2117 PR c++/14324
2118 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
2119 having C++ linkage for name-mangling purposes.
2120
2121 PR c++/14260
2122 * parser.c (cp_parser_direct_declarator): Recognize constructor
2123 declarators that use a template-id to name the class being
2124 constructed.
2125
2126 PR c++/14337
2127 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
2128 (tsubst_expr): Do not call tsubst_copy, even when
2129 processing_template_decl.
2130
2131 2004-03-01 Jeff Law <law@redhat.com>
2132
2133 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
2134 the proper type.
2135
2136 2004-02-29 Mark Mitchell <mark@codesourcery.com>
2137
2138 PR c++/14138
2139 * name-lookup.h (push_scope): Change prototype.
2140 * name-lookup.c (push_scope): Do not reenter the current class
2141 scope.
2142 * decl.c (grokfndecl): Check return code from push_scope before
2143 calling pop_scope.
2144 * decl2.c (check_classfn): Likewise.
2145 * parser.c (cp_parser_conversion_function_id): Likewise.
2146 (cp_parser_init_declarator): Likewise.
2147 (cp_parser_direct_declarator): Likewise.
2148 (cp_parser_class_specifier): Likewise.
2149 (cp_parser_class_head): Likewise.
2150 (cp_parser_lookup_name): Likewise.
2151 (cp_parser_constructor_declarator_p): Likewise.
2152 * pt.c (instantiate_class_template): Likewise.
2153 (resolve_typename_type): Likewise.
2154
2155 2004-02-29 Mark Mitchell <mark@codesourcery.com>
2156
2157 PR c++/14267
2158 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
2159 extension.
2160
2161 PR debug/12103
2162 * class.c (update_vtable_entry_for_fn): Do not go through
2163 covariance machinery if the type returned by an overrider is the
2164 same as the original.
2165
2166 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
2167
2168 * call.c: Fix a comment typo.
2169
2170 2004-02-27 Ziemowit Laski <zlaski@apple.com>
2171
2172 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
2173
2174 2004-02-26 Mark Mitchell <mark@codesourcery.com>
2175
2176 PR c++/14278
2177 * parser.c (cp_parser_parameter_declaration_list): Commit
2178 to fewer tentative parses.
2179
2180 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2181
2182 PR c++/14284
2183 * pt.c (dependent_type_p_r): A template template parameter is a
2184 dependent type.
2185
2186 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2187
2188 PR c++/14246
2189 * mangle.c (write_template_arg_literal): Don't rely on identity for
2190 boolean constants.
2191
2192 2004-02-24 Jason Merrill <jason@redhat.com>
2193
2194 * tree.c (build_exception_variant): Use check_qualified_type.
2195
2196 2004-02-23 Zack Weinberg <zack@codesourcery.com>
2197 Kazu Hirata <kazu@cs.umass.edu>
2198
2199 * decl.c (cxx_init_decl_processing): Don't check
2200 flag_writable_strings.
2201
2202 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
2203
2204 PR c++/14156
2205 * typeck.c (maybe_warn_about_returning_address_of_location):
2206 Change check for VAR_DECL to use DECL_P instead.
2207
2208 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2209
2210 PR c++/14250
2211 * cvt.c (build_expr_type_conversion): Type must be complete before
2212 looking up for conversions.
2213
2214 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2215
2216 PR c++/14143
2217 * name-lookup.c (arg_assoc_class): Don't look into template
2218 arguments if it is not a primary template.
2219
2220 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2221
2222 PR c++/12007
2223 * method.c (use_thunk): Always clone function argument tree.
2224
2225 2004-02-20 Mark Mitchell <mark@codesourcery.com>
2226
2227 PR c++/14199
2228 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
2229
2230 PR c++/14173
2231 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
2232 for all type variants.
2233
2234 2004-02-19 Mark Mitchell <mark@codesourcery.com>
2235
2236 PR c++/13927
2237 * decl.c (duplicate_decls): Return error_mark_node for invalid
2238 redeclarations.
2239 * name-lookup.c (push_namespace): Ignore the return value from
2240 pushdecl.
2241 * pt.c (push_template_decl_real): Robustify.
2242
2243 PR c++/14186
2244 * name-lookup.c (push_class_level_binding): Do not complain about
2245 adding a binding for a member whose name is the same as the
2246 enclosing class if the member is located in a base class of the
2247 current class.
2248
2249 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2250
2251 PR c++/14181
2252 * parser.c (cp_parser_new_expression): Parse an ill-formed
2253 direct-new-declarator after a parenthesized type-id to emit good
2254 diagnostic.
2255
2256 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
2257
2258 * cp-tree.def, cvt.c: Update copyright.
2259
2260 2004-02-17 Mark Mitchell <mark@codesourcery.com>
2261
2262 PR c++/11326
2263 * cp-tree.h (abi_version_at_least): Remove.
2264 * mangle.c: Include flags.h.
2265
2266 2004-02-15 Mark Mitchell <mark@codesourcery.com>
2267
2268 PR c++/13971
2269 * call.c (build_conditional_expr): Handle conversions between
2270 class types which result in differently cv-qualified type
2271 variants.
2272
2273 PR c++/14086
2274 * class.c (delete_duplicate_fields_1): Remove.
2275 (delete_duplicate_fields): Likewise.
2276 (finish_struct_anon): Remove check for members with the same name
2277 as their enclosing class.
2278 (check_field_decls): Do not call duplicate_fields.
2279 * decl.c (grokdeclarator): Remove check for static data members
2280 with the same name as their enclosing class.
2281 * name-lookup.c (push_class_level_binding): Check for members with
2282 the same name as their enclosing class.
2283
2284 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
2285
2286 PR c++/14085
2287 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
2288
2289 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2290
2291 PR c++/13635
2292 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
2293 has full set of arguments.
2294
2295 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2296
2297 PR c++/13927
2298 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
2299
2300 2004-02-13 Mark Mitchell <mark@codesourcery.com>
2301
2302 PR c++/14122
2303 * cp-tree.h (delete_sanity): Change prototype.
2304 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
2305 Remove dead code. Adjust code to warn about deleting an array.
2306 * typekc.c (decay_conversion): Use build_address and build_nop.
2307
2308 PR c++/14108
2309 * search.c (accessible_p): Do not check access in thunks.
2310
2311 PR c++/14083
2312 * call.c (build_conditional_expr): Call force_rvalue on the
2313 non-void operand in the case that one result is a throw-expression
2314 and the other is not.
2315
2316 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
2317
2318 PR c++/9851
2319 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
2320 the type name and look ahead for ::~, and bail out early with a
2321 better error message if the parse is going to fail.
2322
2323 2004-02-12 Mark Mitchell <mark@codesourcery.com>
2324
2325 * call.c (conversion_kind): New type.
2326 (conversion_rank): Likewise.
2327 (conversion): Likewise.
2328 (CONVERSION_RANK): New macro.
2329 (conversion_obstack): New variable.
2330 (obstack_initialized): Likewise.
2331 (z_candidate): Change type of convs and second_conv.
2332 (candidate_warning): New type.
2333 (IDENTITY_RANK): Remove.
2334 (EXACT_RANK): Likewise.
2335 (PROMO_RANK): Likewise.
2336 (STD_RANK): Likewise.
2337 (PBOOL_RANK): Likewise.
2338 (USER_RANK): Likewise.
2339 (ELLIPSIS_RANK): Likewise.
2340 (BAD_RANK): Likewise.
2341 (ICS_RANK): Likewise.
2342 (ICS_STD_RANK): Likewise.
2343 (ICS_USER_FLAG): Likewise.
2344 (ICS_ELLIPSIS_FLAG): Likewise.
2345 (ICS_THIS_FLAG): Likewise.
2346 (ICS_BAD_FLAG): Likewise.
2347 (NEED_TEMPORARY_P): Likewise.
2348 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
2349 (USER_CONV_CAND): Likewise.
2350 (USER_CONV_FN): Likewise.
2351 (conversion_obstack_alloc): New function.
2352 (alloc_conversion): Likewise.
2353 (validate_conversion_obstack): Likewise.
2354 (alloc_conversions): Likewise.
2355 (build_conv): Adjust to deal with new conversion data structures.
2356 (build_identity_conv): New function.
2357 (build_ambiguous_conv): Likewise.
2358 (standard_conversion): Adjust to deal with new conversion data
2359 structures.
2360 (convert_class_to_reference): Likewise.
2361 (direct_reference_binding): Likewise.
2362 (reference_binding): Likewise.
2363 (implicit_conversion): Likewise.
2364 (add_candidate): Likewise.
2365 (add_function_candidate): Likewise.
2366 (add_conv_candidate): Likewise.
2367 (build_builtin_candidate): Likewise.
2368 (print_z_candidate): Likewise.
2369 (merge_conversion_sequences): Likewise.
2370 (build_user_type_conversion_1): Likewise.
2371 (build_user_type_conversion): Likewise.
2372 (build_new_function_call): Likewise.
2373 (build_object_call): Likewise.
2374 (conditional_conversion): Likewise.
2375 (build_conditional_expr): Likewise.
2376 (build_new_op): Likewise.
2377 (build_op_delete_call): Likewise.
2378 (convert_like_real): Likewise.
2379 (build_over_call): Likewise.
2380 (build_new_method_call): Likewise.
2381 (is_subseq): Likewise.
2382 (maybe_handle_implicit_object): Likewise.
2383 (maybe_handle_ref_bind): Likewise.
2384 (compare_ics): Likewise.
2385 (source_type): Likewise.
2386 (add_warning): Likewise.
2387 (joust): Likewise.
2388 (can_convert_arg): Likewise.
2389 (can_convert_arg_bad): Likewise.
2390 (perform_implicit_conversion): Likewise.
2391 (perform_direct_initialization_if_possible): Likewise.
2392 (initialize_reference): Likewise.
2393 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
2394 * cp-tree.def (WRAPPER): Likewise.
2395 (IDENTITY_CONV): Remove.
2396 (LVALUE_CONV): Likewise.
2397 (QUAL_CONV): Likewise.
2398 (STD_CONV): Likewise.
2399 (PTR_CONV): Likewise.
2400 (PMEM_CONV): Likewise.
2401 (BASE_CONV): Likewise.
2402 (REF_BIND): Likewise.
2403 (USER_CONV): Likewise.
2404 (AMBIG_CONV): Likewise.
2405 (RVALUE_CONV): Likewise.
2406 * cp-tree.h (tree_wrapper): Remove.
2407 (WRAPPER_ZC): Remove.
2408 (lang_tree_node): Remove wrapper.
2409 (LOOKUP_SPECULATIVELY): Remove.
2410 (build_op_delete_call): Adjust prototype.
2411 (validate_conversion_obstack): Declare.
2412 (build_zc_wrapper): Remove.
2413 * cvt.c (convert_to_reference): Remove dead code.
2414 (ocp_convert): Likewise.
2415 * decl.c (redeclaration_error_message): Correct handling of
2416 templates.
2417 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
2418 (cp_tree_node_structure): Remove WRAPPER case.
2419 * decl2.c (finish_file): Call validate_conversion_obstack.
2420 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
2421 (build_op_delete_call): Likewise.
2422 (build_x_delete): Likewise.
2423 (build_delete): Adjust call to build_op_delete_call.
2424 * pt.c (tsubst_friend_declaration): Adjust code to determine
2425 whether or not a friend template is a definition.
2426 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
2427 * tree.c (build_zc_wrapper): Remove.
2428
2429 2004-02-12 Zack Weinberg <zack@codesourcery.com>
2430
2431 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
2432 * cp-tree.h: Don't declare cxx_builtin_type_decls.
2433 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
2434 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
2435
2436 2004-02-10 Mark Mitchell <mark@codesourcery.com>
2437
2438 * typeck.c (lookup_destructor): Fix typo in error message.
2439
2440 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
2441
2442 * call.c, parser.c, tree.c: Fix comment typos.
2443
2444 2004-02-07 Zack Weinberg <zack@codesourcery.com>
2445
2446 Bug 13856
2447 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
2448 * decl.c (duplicate_decls, start_function): Likewise.
2449
2450 2004-02-07 Zack Weinberg <zack@codesourcery.com>
2451
2452 * name-lookup.c (pushdecl): Issue shadow warnings directly.
2453 * parser.c (free_parser_stacks): Delete.
2454
2455 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
2456
2457 * rtti.c: Update copyright.
2458
2459 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2460
2461 PR c++/14033
2462 * decl.c (require_complete_types_for_parms): Do not insert
2463 error_mark_node in the parameter list.
2464
2465 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2466
2467 PR c++/14028
2468 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
2469 error when terminator can not be found.
2470
2471 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
2472
2473 Make-lang.in (po-generated): Delete.
2474
2475 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
2476
2477 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
2478 targetm.calls.promote_prototypes.
2479
2480 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2481
2482 PR middle-end/13750
2483 Revert:
2484 2004-01-15 Geoffrey Keating <geoffk@apple.com>
2485 PR pch/13361
2486 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2487 (handle_pragma_implementation): Likewise.
2488
2489 2004-02-05 Mark Mitchell <mark@codesourcery.com>
2490
2491 PR c++/13714
2492 * typeck.c (lookup_destructor): Tweak error message.
2493
2494 2004-02-05 Jan Hubicka <jh@suse.cz>
2495
2496 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
2497 functions.
2498
2499 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2500
2501 PR c++/14008
2502 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
2503 code, only emits the diagnostic now. Added lookup of the identifier
2504 and support for qualified ids.
2505 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
2506 Parse an (invalid) type name as id-expression within a declarator.
2507 (cp_parser_simple_declaration): Use it.
2508 (cp_parser_member_declaration): Likewise.
2509 (cp_parser_make_typename_type): New function. Handle errors through
2510 cp_parser_diagnose_invalid_typename.
2511 (cp_parser_elaborated_type_specifier): Use it.
2512
2513 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2514
2515 PR c++/13932
2516 * call.c (convert_like_real): Use "converting" rather than
2517 "argument" as the descriptive keyword to
2518 dubious_conversion_warnings.
2519 * typeck.c (convert_for_assignment): Do not call
2520 dubious_conversion_warnings.
2521
2522 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2523
2524 PR c++/13086
2525 * init.c (build_delete): Emit a more informative error message in
2526 case of an incomplete type, and on the correct source line.
2527
2528 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
2529
2530 * error.c, search.c: Update copyright.
2531
2532 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2533
2534 PR c++/9941
2535 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
2536 linkage for the typeinfo name string.
2537
2538 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2539
2540 PR c++/13969
2541 * cp-tree.h (fold_non_dependent_expr): New function.
2542 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
2543 (cp_parser_template_argument): Use fold_non_dependent_expr.
2544 (cp_parser_direct_declarator): Likewise.
2545 * pt.c (fold_non_dependent_expr): New function.
2546 (convert_nontype_argument): Use it.
2547 (tsubst_qualified_id): Simplify.
2548 (tsubst_copy_and_build): Likewise.
2549
2550 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2551
2552 * decl.c (cxx_push_function_context): Do not set
2553 current_function_is_thunk.
2554 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
2555 actual function.
2556
2557 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2558
2559 PR c++/13997
2560 * pt.c (more_specialized_class): Increase processing_template_decl
2561 while partial ordering.
2562
2563 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2564
2565 PR c++/13925
2566 * decl.c (start_function): Do not call pushdecl for any
2567 instantiation or specialization of a primary template.
2568
2569 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2570
2571 PR c++/13950
2572 * parser.c (cp_parser_class_name): Robustify.
2573
2574 PR c++/13970
2575 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
2576
2577 PR c++/14002
2578 * semantics.c (finish_id_expression): Do not return an
2579 IDENTIFIER_NODE when lookup finds a PARM_DECL.
2580
2581 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2582
2583 PR c++/13978
2584 * pt.c (build_non_dependent_expr): Do not build
2585 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
2586
2587 PR c++/13968
2588 * semantics.c (finish_id_expression): Do not return an
2589 IDENTIFIER_NODE when lookup finds a VAR_DECL.
2590
2591 PR c++/13975
2592 * parser.c (cp_parser_simple_declaration): When skipping to the
2593 end of the statement swallow the terminating semicolon.
2594
2595 2004-02-02 Mark Mitchell <mark@codesourcery.com>
2596
2597 PR c++/13113
2598 * init.c (build_offset_ref): Improve error recovery for invalid
2599 uses of non-static member functions.
2600
2601 PR c++/13854
2602 * cp-tree.h (cp_build_type_attribute_variant): New function.
2603 * class.c (build_clone): Use cp_build_type_attribute_variant.
2604 * decl.c (duplicate_decls): Likewise.
2605 * pt.c (copy_default_args_to_explicit_spec): Likewise.
2606 (tsubst_function_type): Likewise.
2607 * tree.c (build_exception_variant): Check attributes before
2608 concluding that two types are the same.
2609 (cp_build_type-attribute_variant): New method.
2610 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
2611
2612 PR c++/13907
2613 * call.c (convert_class_to_reference): Keep better track of
2614 pedantically invalid user-defined conversions.
2615
2616 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2617
2618 PR c++/13957
2619 * pt.c (tsubst_qualified_id): Improved error message when a type
2620 is expected but not found.
2621
2622 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
2623
2624 * class.c: Fix comment typos.
2625 * decl.c: Likewise.
2626 * error.c: Likewise.
2627 * parser.c: Likewise.
2628 * pt.c: Likewise.
2629 * search.c: Likewise.
2630 * typeck.c: Likewise.
2631
2632 2004-01-30 Richard Henderson <rth@redhat.com>
2633
2634 PR c++/13693
2635 * method.c (use_thunk): Don't force_target_expr for void thunks.
2636 * tree.c (build_target_expr_with_type): Assert non-void type.
2637 (force_target_expr): Likewise.
2638
2639 2004-01-30 Michael Matz <matz@suse.de>
2640
2641 * parser.c (cp_parser_labeled_statement): Accept case ranges.
2642
2643 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2644
2645 DR206
2646 PR c++/13813
2647 * decl.c (grokdeclarator): Check immediatly type completeness for
2648 non-dependent types.
2649
2650 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2651
2652 PR c++/13683
2653 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
2654 a sizeof expression.block
2655
2656 2004-01-29 Mark Mitchell <mark@codesourcery.com>
2657
2658 PR c++/13883
2659 * mangle.c (write_encoding): Correct encoding of member template
2660 constructors.
2661
2662 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2663
2664 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
2665 template name as it was `<::' (digraph typo).
2666 (cp_parser_nth_token_starts_template_argument_list_p): New function.
2667 (cp_parser_id_expression): Use it.
2668 (cp_parser_nested_name_specifier_opt): Likewise.
2669 (cp_parser_template_name): Likewise.
2670 (cp_parser_class_name): Likewise.
2671 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
2672
2673 2004-01-28 Mark Mitchell <mark@codesourcery.com>
2674
2675 PR c++/13791
2676 * typeck.c (merge_types): Do not merge attributes into
2677 TYPENAME_TYPEs.
2678
2679 PR c++/13736
2680 * parser.c (cp_parser_direct_declarator): Do not prevent
2681 backtracking inside a parenthesized declarator.
2682 (cp_parser_parameter_declaration): Fix typo in comment.
2683
2684 2004-01-28 Jan Hubicka <jh@suse.cz>
2685
2686 * semantics.c (expand_body) Do emit_associated_thunks before
2687 expansion.
2688
2689 2004-01-27 Devang Patel <dpatel@apple.com>
2690
2691 * name-lookup.c: Include "debug.h"
2692 (do_namespace_alias): Invoke debug_hooks to emit debug info
2693 for namespace alias.
2694 (do_local_using_decl): Invoke debug_hooks to emit debug info
2695 for using decl.
2696 (do_class_using_decl): Same.
2697 (do_toplevel_using_decl): Same.
2698 (do_using_directive): Same.
2699 (cp_emit_debug_info_for_using): New function.
2700 * Make-lang.in (cp/parser.o): Depend on debug.h
2701 (cp/name-lookup.o): Same.
2702
2703 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2704
2705 * cp-tree.h (language_function, lang_type_header): Use
2706 BOOL_BITFIELD.
2707 * name-lookup.h (cp_binding_level): Likewise.
2708
2709 2004-01-26 Mark Mitchell <mark@codesourcery.com>
2710
2711 PR c++/13663
2712 * semantics.c (finish_for_expr): Check for unresolved overloaded
2713 functions.
2714
2715 * class.c (add_method): Just check processing_template_decl to
2716 determine whether or not we are within a template.
2717 * decl2.c (maybe_retrofit_in_chrg): Likewise.
2718 * init.c (decl_constant_value): Check the type of the declaration,
2719 not TREE_READONLY.
2720 * name-lookup.c (maybe_push_to_top_level): Rename to ...
2721 (push_to_top_level): ... this.
2722 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
2723 * pt.c (push_template_decl_real): Reorder condition for speed.
2724 (convert_template_argument): Use dependency-checking functions in
2725 place of uses_template_parms.
2726 (lookup_template_class): Avoid calling uses_template_parms more
2727 than once.
2728 (uses_template_parms): Reimplement, using dependency-checking
2729 functions.
2730 (instantiate_class_template): Use push_to_top_level, not
2731 maybe_push_to_top_level.
2732 (type_unification_real): Simplify.
2733 (type_dependent_expression_p): Handle OFFSET_REFs and
2734 TEMPLATE_DECLs.
2735 (any_dependent_template_arguments_p): Handle multiple levels of
2736 template argument.
2737 * semantics.c (expand_or_defer_fn): Do not check
2738 uses_template_parms for template instantiations.
2739 * typeck.c (comptypes): Avoid calling cp_type_quals.
2740
2741 2004-01-25 Mark Mitchell <mark@codesourcery.com>
2742
2743 PR c++/13833
2744 * call.c (build_over_call): Do not convert arguments when
2745 processing a template.
2746 * pt.c (build_non_dependent_expr): Do not build a
2747 NON_DEPENDENT_EXPR for arithmetic constants.
2748
2749 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2750
2751 PR c++/13810
2752 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
2753 returns a TYPE_DECL. no further lookup is required.
2754 * semantics.c (check_template_template_default_arg): A TYPE_DECL
2755 is invalid. Rework to give better diagnostics.
2756
2757 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2758
2759 PR c++/13797
2760 * pt.c (instantiate_class_template): Add an error_mark_node
2761 check.
2762 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
2763
2764 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
2765
2766 PR c++/13701
2767 * decl.c (finish_function): Move the call to
2768 finish_fname_decls below the call to
2769 finish_eh_spec_block.
2770
2771 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
2772
2773 * optimize.c, typeck2.c: Update copyright.
2774
2775 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
2776
2777 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
2778 init.c, mangle.c, typeck.c: Update copyright.
2779
2780 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
2781
2782 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
2783
2784 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2785
2786 * Make-lang.in: Replace $(docdir) with doc.
2787 (c++.info, c++.srcinfo): Dummy entry.
2788 (c++.man, c++.srcman): New rules.
2789 (c++.install-man): Revamp rule.
2790
2791 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2792
2793 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
2794 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
2795 immediate $(shell) instead of deferred backquote.
2796
2797 2004-01-19 Mark Mitchell <mark@codesourcery.com>
2798
2799 PR c++/13651
2800 * parser.c (cp_parser_postfix_expression): When encountering
2801 incomplete type on left-hand side of "->" or ".", treat the entire
2802 expression as erroneous.
2803
2804 PR c++/13592
2805 * call.c (build_field_call): Remove.
2806 (n_build_method_call): Likewise.
2807 (build_method_call): Likewise.
2808 (build_new_method_call): Do not call build_field_call.
2809 * class.c (n_build_method_call): Remove.
2810 (print_class_statistics): Do not print it.
2811 * cp-tree.h (build_method_call): Remove declaration.
2812 (finish_object_call_expr): Likewise.
2813 (build_new_1): Do not use build_method_call.
2814 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
2815 when the function appearing on the right-hand-side of "." or "->"
2816 is not actually a function.
2817 * pt.c (tsubst_copy_and_build): Likewise.
2818 * semantics.c (finish_object_call_expr): Remove.
2819
2820 2004-01-18 Mark Mitchell <mark@codesourcery.com>
2821
2822 PR c++/13710
2823 * pt.c (tsubst): Use finish_typeof.
2824
2825 2004-01-18 Jason Merrill <jason@redhat.com>
2826
2827 PR c++/11725
2828 * except.c (build_throw): In a template, set
2829 current_function_returns_abnormally.
2830
2831 2004-01-17 Fred Fish <fnf@intrinsity.com>
2832
2833 PR c++/11895
2834 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
2835 except don't call array_type_nelts() with a VECTOR_TYPE.
2836
2837 2004-01-16 Jan Hubicka <jh@suse.cz>
2838
2839 * mangle.c (write_mangled_name): Remove inline modifier.
2840
2841 2004-01-16 Mark Mitchell <mark@codesourcery.com>
2842
2843 PR c++/13574
2844 * decl.c (compute_array_index_type): Fix grammar in comment.
2845 * init.c (build_zero_init): Handle zero-sized arrays correctly.
2846
2847 PR c++/13178
2848 * call.c (name_as_c_string): Print conversion operator names
2849 correctly.
2850
2851 PR c++/13478
2852 * call.c (initialize_reference): Pass -1 for inner parameter to
2853 convert_like_real.
2854
2855 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2856
2857 PR c++/13407
2858 * parser.c (cp_parser_base_specifier): Check for an invalid
2859 keyword `typename' and emit an user-friendly error message.
2860
2861 2004-01-15 Geoffrey Keating <geoffk@apple.com>
2862
2863 PR pch/13361
2864 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2865 (handle_pragma_implementation): Likewise.
2866
2867 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2868
2869 PR c++/9259
2870 * typeck.c (build_class_member_access_expr): Allow to access members
2871 of the currently open class.
2872 (finish_class_member_access_expr): Likewise.
2873
2874 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
2875
2876 PR c++/13659
2877 * name-lookup.c (validate_nonmember_using_decl): Take scope and
2878 name by value, instead of computing them.
2879 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
2880 arguments. Pass them to validate_nonmember_using_decl.
2881 * name-lookup.h (do_local_using_decl): Adjust.
2882 (do_toplevel_using_decl): Likewise.
2883 * parser.c (cp_parser_using_declaration): Likewise.
2884 * pt.c (tsubst_expr): Likewise.
2885
2886 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
2887
2888 PR c++/13594
2889 PR c++/13658
2890 * name-lookup.c (qualified_lookup_using_namespace): Search
2891 strongly-associated namespaces first, and only then try other
2892 namespaces.
2893
2894 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
2895
2896 * Make-lang.in (c++.srcextra): Dummy entry.
2897
2898 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2899
2900 PR c++/8856
2901 * parser.c (cp_parser_template_name): Don't try to parse a
2902 conversion-function-id, as it cannot be a template-name.
2903 (cp_parser_simple_type_specifier): Check for invalid template-ids
2904 even after a built-in type.
2905
2906 2004-01-14 Jan Hubicka <jh@suse.cz>
2907
2908 PR c++/12850
2909 * pt.c (instantiate_decl): Do not increase function_depth.
2910
2911 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
2912
2913 PR c++/9021
2914 PR c++/11005
2915 * parser.c (cp_parser_elaborated_type_specifier): Warn about
2916 attributes and discard.
2917 * decl.c (xref_tag): Don't overwite existing attributes with
2918 NULL_TREE.
2919
2920 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2921
2922 PR c++/12335
2923 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
2924 is no destructor while looking up a BIT_NOT_EXPR.
2925
2926 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
2927
2928 * cxxfilt.c: Remove unused file.
2929
2930 2004-01-14 Jan Hubicka <jh@suse.cz>
2931
2932 Partial fix to PR c++/12850
2933 * decl2.c (mark_used): Do not proactively instantiate templates
2934 when compiling in unit-at-a-time or not optimizing.
2935 * optimize.c (maybe_clone_body): Do not increase function depth.
2936
2937 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2938
2939 PR c++/13474
2940 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
2941
2942 2004-01-12 Steven Bosscher <stevenb@suse.de>
2943
2944 PR c++/13558
2945 * parser.c (cp_parser_member_declaration): Any non-type is also
2946 not a class or a function.
2947
2948 2004-01-12 Jason Merrill <jason@redhat.com>
2949
2950 PR c++/12815
2951 * class.c (build_base_path): Do not mark vtable references as
2952 TREE_CONSTANT.
2953 (build_vtbl_ref_1): Likewise.
2954
2955 2004-01-12 Richard Henderson <rth@redhat.com>
2956
2957 PR opt/10776
2958 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
2959 (store_init_value): Use it.
2960 * decl.c (check_initializer): Expect full initialization code
2961 from store_init_value.
2962 * init.c (expand_aggr_init_1): Likewise.
2963 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
2964
2965 2004-01-12 Mark Mitchell <mark@codesourcery.com>
2966
2967 * class.c (layout_class_type): For non-POD class types, also copy
2968 the DECL_SIZE and DECL_MODE of fields to the base class type.
2969
2970 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2971
2972 PR c++/13289
2973 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
2974 calling regenerate_decl_from_template.
2975
2976 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
2977
2978 PR c++/4100
2979 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
2980 decl-specifier occurring along with a class definition.
2981
2982 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
2983
2984 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
2985 clauses to comments describing declares_class_or_enum.
2986 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
2987 false.
2988
2989 2004-01-12 Jan Hubicka <jh@suse.cz>
2990
2991 * pt.c (for_each_template_parm): Do not check for duplicates.
2992 (for_each_template_parm): Use walk_tree duplicate checking code.
2993
2994 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
2995
2996 PR c++/3478
2997 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
2998 is error_mark_node, don't add any more decl_specs.
2999 (cp_parser_init_declarator): After committing to a declaration, if
3000 the decl_specifiers start with error_mark_node, issue an error and
3001 change the type to "int".
3002
3003 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
3004
3005 PR bootstrap/7817
3006 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
3007
3008 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3009
3010 DR 337
3011 PR c++/9256
3012 * pt.c (tsubst): Substitution must fail if we are attempting to
3013 create an array with element type that is an abstract class type.
3014 * decl.c (cp_finish_decl): Strip pointers and array types recursively
3015 before calling abstract_virtuals_error.
3016
3017 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
3018
3019 * name-lookup.c (qualified_lookup_using_namespace): Consider
3020 strong using directives even if we've already found a binding.
3021
3022 2004-01-09 Mark Mitchell <mark@codesourcery.com>
3023
3024 * cp-tree.h (cxx_expand_expr): Change prototype.
3025 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
3026
3027 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3028
3029 PR c++/12573
3030 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
3031 looking into them recursively. They can be there because of the
3032 new __offsetof__ extension.
3033
3034 2004-01-07 Zack Weinberg <zack@codesourcery.com>
3035
3036 * parser.c (cp_parser_save_member_function_body): Mark the
3037 definition static.
3038
3039 2004-01-05 Mark Mitchell <mark@codesourcery.com>
3040
3041 PR c++/13057
3042 * class.c (build_clone): Copy type attributes from the original
3043 function to the clone.
3044
3045 PR c++/12815
3046 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
3047 references as constant.
3048
3049 PR c++/12132
3050 * parser.c (cp_parser_explicit_instantiation): Improve error
3051 recovery.
3052 (cp_parser_require): Improve indication of the error location.
3053
3054 PR c++/13451
3055 * parser.c (cp_parser_class_head): Reorder logic to check for
3056 invalid qualification.
3057
3058 2004-01-04 Mark Mitchell <mark@codesourcery.com>
3059
3060 PR c++/13157
3061 * name-lookup.c (lookup_using_namespace): Remove spacesp
3062 parameter.
3063 (unqualified_namespace_lookup): Likewise.
3064 (lookup_qualified_name): Adjust accordingly.
3065 (lookup_name_real): Likewise.
3066 (lookup_arg_dependent): Do not eliminate the namespace of the
3067 functions found by unqualified name lookup unless that is the
3068 current namespace.
3069
3070 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
3071
3072 * semantics.c (push_deferring_access_checks): Fix format.
3073 (resume_deferring_access_checks): Likewise.
3074 (stop_deferring_access_checks): Likewise.
3075 (pop_deferring_access_checks): Likewise.
3076 (get_deferred_access_checks): Likewise.
3077 (pop_to_parent_deferring_access_checks): Likewise.
3078 (perform_deferred_access_checks): Likewise.
3079 (perform_or_defer_access_check): Likewise.
3080
3081 2004-01-04 Richard Henderson <rth@redhat.com>
3082
3083 * call.c (build_over_call): Don't create a save_expr of an
3084 aggregate, but rather its address.
3085
3086 2004-01-04 Mark Mitchell <mark@codesourcery.com>
3087
3088 PR c++/13529
3089 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
3090 an offsetof expression.
3091
3092 * parser.c (cp_parser_parameter_declaration): Fix comment.
3093
3094 PR c++/12226
3095 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
3096 (reference_binding): Set it when appropriate.
3097 (build_temp): New function, split out from ...
3098 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
3099 (initialize_reference): Likewise.
3100
3101 PR c++/13536
3102 * parser.c (cp_parser): Add in_type_id_in_expr_p.
3103 (cp_parser_new): Initialize it.
3104 (cp_parser_postfix_expression): Set it.
3105 (cp_parser_sizeof_operand): Likewise.
3106 (cp_parser_parameteR_declaration): Do not commit early to tenative
3107 parsers when in_type_id_in_expr_p is set.
3108
3109 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3110
3111 PR c++/13094
3112 * parser.c (cp_parser_template_argument): Don't call
3113 make_unbound_class_template directly.
3114 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
3115 UNBOUND_CLASS_TEMPLATE tree node.
3116
3117 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
3118
3119 PR target/12729
3120 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
3121
3122 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3123
3124 PR c++/13520
3125 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
3126 (DECL_FUNCTION_TEMPLATE_P): Use it.
3127 (DECL_CLASS_TEMPLATE_P): Likewise.
3128 * parser.c (cp_parser_lookup_name): Add is_template parameter.
3129 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
3130 (cp_parser_template_name): Likewise.
3131 (cp_parser_elaborated_type_specifier): Likewise.
3132 (cp_parser_namespace_name): Likewise.
3133 (cp_parser_class_name): Likewise.
3134 (cp_parser_lookup_name_simple): Likewise.
3135
3136 See ChangeLog.3 for earlier changes.