]> gcc.gnu.org Git - gcc.git/blame - gcc/cp/ChangeLog
Revert patch for PR c++/16623.
[gcc.git] / gcc / cp / ChangeLog
CommitLineData
31aedc36
MM
12004-07-19 Mark Mitchell <mark@codesourcery.com>
2
3 Revert patch for PR c++/16623.
4
e05de6f2
KC
52004-07-19 Kelley Cook <kcook@gcc.gnu.org>
6
7 * except.c: Remove two spurious carriage returns.
8
43fa0f09
MM
92004-07-19 Mark Mitchell <mark@codesourcery.com>
10
11 PR c++/16623
12 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
13 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
14 * class.c (add_implicitly_declared_members): Use
15 CLASSTYPE_LAZY_ASSIGNMENT_OP.
16 * method.c (lazily_declare_fn): Clear
17 CLASSTYPE_LAZY_ASSIGNMENT_OP.
18 * search.c (lookup_fnfields_1): Check it.
19
9ba5ff0f
NS
202004-07-19 Nathan Sidwell <nathan@codesourcery.com>
21
22 * class.c (add_method): Delay adding the slot until the end.
23 (determine_primary_base): Adjust VEC_iterate invokation.
24 (resort_type_method_vec, finish_struct_methods, warn_hidden,
25 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
26 build_vtbl_initializer): Likewise.
27 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
28 build_vbase_delete): Likewise.
29 * method.c (do_build_copy_constructor): Likewise.
30 * name-lookup.c (new_class_binding, print_binding_level,
31 poplevel_class, store_class_bindings, push_to_top_level,
32 pop_from_top_level): Likewise.
33 * pt.c (check_explicit_specialization): Likewise.
34 * search.c (lookup_conversion_operator, lookup_fnfields_1,
35 get_pure_virtuals, add_conversions, dfs_check_overlap,
36 binfo_for_vbase): Likewise.
37
6df91b00
KL
382004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
39
40 PR c++/12170
41 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
42 innermost set of template arguments during deduction. Simplify.
43
487a92fe
JM
442004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
45
46 * typeck.c (build_modify_expr, build_x_modify_expr): Set
47 TREE_NO_WARNING on assignments with an operator other than '='.
48
31ec7d2f
SB
492004-07-10 Steven Bosscher <stevenb@suse.de>
50 Joseph S. Myers <jsm@polyomino.org.uk>
51
52 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
53 * decl2.c (grokfield): Don't check current_class_depth via
54 unused TREE_COMPLEXITY.
55 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
56 to avoid the missing parentheses warning.
57 Don't set C_SET_EXP_ORIGINAL_CODE.
58
383c9d5d
MM
592004-07-18 Mark Mitchell <mark@codesourcery.com>
60
caf43ca4
MM
61 * tree.c (no_linkage_helper): Remove.
62 (no_linkage_check): Don't use walk_tree_without_duplicates.
63
383c9d5d
MM
64 * mangle.c (write_expression): Issue a sorry for zero-operand
65 functional casts.
66
3601f003
KL
672004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
68
69 PR c++/13092
70 * init.c (build_offset_ref): Build SCOPE_REF with non-null
71 TREE_TYPE for non-dependent names.
72 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
73 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
74 unknown_type_node as its TREE_TYPE.
75 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
76 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
77 (dump_expr) <SCOPE_REF case>: Likewise.
78
d8472c75
JM
792004-07-17 Jason Merrill <jason@redhat.com>
80
81 PR c++/16115
82 * call.c (type_passed_as): Make the invisible reference type
83 __restrict.
84 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
85 cp_genericize_r. Handle invisible reference lowering.
86 (is_invisiref_parm): New fn.
87 (cp_genericize): Adjust the types of invisible reference parms.
88 Don't repeat the walk for clones.
89 * decl.c (store_parm_decls): Don't generate any code for clones.
90
6e34d3a3
JM
912004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
92
93 * cp-tree.h (builtin_function): Declare.
94
508a1c9c
MM
952004-07-16 Mark Mitchell <mark@codesourcery.com>
96
97 * class.c (finish_struct_methods): Remove unncessary code.
98 (add_implicitly_declared_members): Create declarations for default
99 constructors and copy constructors lazily.
100 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
101 lazy_copy_ctor.
102 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
103 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
104 * decl2.c (check_classfn): Robustify.
105 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
106 (locate_ctor): Handle lazy default constructors.
107 (locate_copy): Handle lazy copy constructors.
108 (implicitly_declare_fn): Make sure we're looking at the
109 TYPE_MAIN_VARIANT for a class before creating functions. Don't
110 set TYPE_HAS_CONSTRUCTOR.
111 (lazily_declare_fn): New function.
112 * name-lookup.c (constructor_name_full): Simplify.
113 * search.c (lookup_fnfields_1): Lazily create methods, as
114 necessary.
115 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
116
165b54c3
SB
1172004-07-16 Steven Bosscher <stevenb@suse.de>
118
119 * cp-tree.h (struct lang_type): Don't have three GTY options on a
120 single bit GTY desc.
121
7740f00d
RH
1222004-07-16 Richard Henderson <rth@redhat.com>
123
124 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
125 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
126 * tree.c (cp_copy_res_decl_for_inlining): Remove.
127
bd7eccc4
NS
1282004-07-16 Nathan Sidwell <nathan@codesourcery.com>
129
090ad434
NS
130 * class.c (finish_struct_bits): Use for loop.
131 (propagate_binfo_offsets): Do primary binfo outside of loop.
132
3758425f
NS
133 PR c++/16583
134 * dump.c (cp_dump_tree): Don't dump the bases if there's no
135 binfo.
136
bd7eccc4
NS
137 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
138
aaaa46d2
MM
1392004-07-15 Mark Mitchell <mark@codesourcery.com>
140
141 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
142 has_abstract_assign_ref. Make methods a VEC(tree) *.
143 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
144 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
145 (CLASSTYPE_DESTRUCTORS): Likewise.
146 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
147 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
148 (add_method): Change prototoype.
149 * class.c (add_method): Remove error_p parameter. Adjust for
150 changes to CLASSTYPE_METHOD_VEC.
151 (handle_using_decl): Adjust call to add_method.
152 (maybe_warn_about_overly_private_class): Adjust for
153 changes to CLASSTYPE_METHOD_VEC.
154 (resort_type_method_vec): Likewise.
155 (finish_struct_methods): Likewise.
156 (check_for_override): Likewise.
157 (warn_hidden): Likewise.
158 (add_implicitly_declared_members): Defer creation of assignment
159 operators. Adjust call to add_method.
160 (clone_function_decl): Adjust call to add_method.
161 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
162 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
163 * decl.c (grok_special_member_properties): Don't set
164 TYPE_HAS_ABSTRACT_ASSIGN_REF.
165 * decl2.c (check_classfn): Adjust for
166 changes to CLASSTYPE_METHOD_VEC.
167 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
168 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
169 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
170 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
171 cp_finish_decl.
172 * pt.c (check_explicit_specialization): Adjust for
173 changes to CLASSTYPE_METHOD_VEC.
174 (instantiate_class_template): Do not set
175 TYPE_HAS_ABSTRACT_ASSIGN_REF.
176 * ptree.c (cxx_print_type): Don't try to print
177 CLASSTYPE_METHOD_VEC.
178 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
179 * search.c (lookup_field_r): Adjust for
180 changes to CLASSTYPE_METHOD_VEC.
181 (lookup_fnfields): Likewise.
182 (lookup_conversion_operator): Likewise.
183 (lookup_fnfields_1): Likewise. Create assignment operators
184 lazily.
185 (look_for_overrides_here): Adjust for
186 changes to CLASSTYPE_METHOD_VEC.
187 (add_conversions): Likewise.
188 * semantics.c (finish_member_declaration): Adjust call to add_method.
189
27f1984e
JM
1902004-07-15 Jason Merrill <jason@redhat.com>
191
192 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
193 references and pointers are compatible.
194
48b45647
NS
1952004-07-15 Nathan Sidwell <nathan@codesourcery.com>
196
197 * decl.c (xref_basetypes): Refactor.
198 * tree.c (copy_base_binfos): Replace with ...
199 (copy_binfo): ... this. Deep copy the given binfo, (not the just
200 bases of the given base).
201 * cp-tree.h (copy_base_binfo): Remove.
202 (copy_binfo): Declare.
203
df05a794 2042004-07-15 Mark Mitchell <mark@codesourcery.com>
aaaa46d2 205
df05a794
MM
206 * name-lookup.c (set_inherited_value_binding_p): Add class_type
207 parameter.
208 (get_class_binding): Adjust.
209 (push_class_level_binding): Don't use set_inherited_value_binding_p.
210
37a247a0
NS
2112004-07-15 Nathan Sidwell <nathan@codesourcery.com>
212
e4f78bd4 213 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
132c7dd3
NS
214 * decl.c (xref_basetypes): Set it here.
215
37a247a0
NS
216 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
217 Don't check for incomplete base.
218 (get_vfield_name): Simplify while loop.
219 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
220
90ea9897
MM
2212004-07-14 Mark Mitchell <mark@codesourcery.com>
222
cc5e9f5a 223 * lex.c (cxx_make_type): Remove call to get_pointer_type.
cc5e9f5a 224
90ea9897
MM
225 * cp-tree.h (IDENTIFIER_VALUE): Remove.
226 (BINFO_PUSHDECLS_MARKED): Likewise.
227 (maybe_inject_for_scope_var): Likewise.
228 (push_class_decls): Likewise.
229 * name-lookup.h (push_class_binding): Remove.
230 (innermost_non_namespace_value): New function.
231 (outer_binding): Likewise.
232 * class.c (add_method): Push bindings before adding to
233 TYPE_METHODS.
234 (restore_class_cache): Do not restore class_shadowed.
235 (pushclass): Do not add USING_DECLs. Do not call
236 push_class_decls.
237 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
238 * decl.c (pushdecl): Use outer_binding.
239 (poplevel): Set the scope for an out-of-scope for-loop declaration
240 appropriately.
241 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
242 * name-lookup.c (new_class_binding): New function.
243 (push_binding): Use it.
244 (pushdecl): Use innermost_non_namespace_value.
245 (maybe_inject_for_scope_var): Remove.
246 (push_class_binding): Remove.
247 (set_inherited_value_binding_p): New function.
248 (get_class_binding): New function.
249 (push_class_level_binding): Assert that the current_class_type is
250 being defined.
251 (outer_binding): New function.
252 (innermost_non_namespace_value): Likewise.
253 (lookup_name_real): Use outer_binding.
254 (lookup_name_current_level): Ignore out-of-scope variables.
255 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
256 (lookup_template_class): Likewise.
257 * search.c (dfs_push_type_decls): Remove.
258 (dfs_push_decls): Likewise.
259 (setup_class_bindings): Likewise.
260 (lookup_field_1): Handle USING_DECLs from dependent scopes.
261 (marked_pushdecls_p): Remove.
262 (unmarked_pushdecls_p): Remove.
263 (marked_identifiers): Remove.
264 (setup_class_bindings): Remove.
265 (dfs_push_type_decls): Remove.
266 (dfs_push_decls): Remove.
267 (push_class_decls): Remove.
268
39fb05d0
MM
2692004-07-13 Mark Mitchell <mark@codesourcery.com>
270
1ff3c076
MM
271 PR c++/16518
272 PR c++/16337
273 * decl.c (grokvardecl): Make declspecs parameter const.
274 (grokdeclarator): Likewise. Adjust accordingly.
275 * decl.h (grokdeclarator): Adjust declaration.
276 * parser.c (cp_parser_init_declarator): Do not clear
277 decl_specifiers->attributes.
278
39fb05d0
MM
279 * cp-tree.h (lang_identifier): Remove class_value.
280 (IDENTIFIER_CLASS_VALUE): Remove.
281 (pop_class_decls): Likewise.
282 (init_search_processing): Likewise.
283 * class.c (handle_using_decl): Use lookup_member, not
284 IDENTIFIER_CLASS_VALUE.
285 (restore_class_cache): New function, split out from ...
286 (pushclass): ... here. Do not call clear_identifier_class_values.
287 (invalidate_class_lookup_cache): Do not clear
288 IDENTIFIER_CLASS_VALUE.
289 (popclass): Do not call pop_class_decls.
290 (maybe_note_name_used_in_class): Do not save names looked up after
291 the class is complete. Use lookup_member, not
292 IDENTIFIER_CLASS_VALUE.
293 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
294 * decl.c (cxx_init_decl_processing): Do not call
295 init_search_processing.
296 * method.c (do_build_copy_constructor): Remove unnecessary code.
297 (do_build_assign_ref): Likewise.
298 * name-lookup.c (pushdecl): Use lookup_member, not
299 IDENTIFIER_CLASS_VALUE.
300 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
301 type_shadowed list.
302 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
303 (push_class_binding): Do not set it.
304 (clear_identifier_class_values): Remove.
305 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
306 (store_binding): Do not save it.
307 (pop_from_top_level): Do not restore it.
308 * name-lookup.h (cxx_saved_binding): Remove class_value.
309 (clear_identifier_class_values): Remove.
310 * ptree.c (cxx_print_identifier): Do not print
311 IDENTIFIER_CLASS_VALUE.
312 * search.c (search_obstack): Remove.
313 (push_stack_level): Remove.
314 (pop_stack_level): Remove.
315 (search_level): Remove.
316 (search_stack): Remove.
317 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
318 (setup_class_bindings): Use IDENTIFIER_MARKED, not
319 IDENTIFIER_CLASS_VALUE.
320 (marked_identifiers): New variable.
321 (push_class_decls): Clear IDENTIFIER_MARKED.
322 (pop_class_decls): Don't call pop_search_level.
323 (init_search_processing): Remove.
324
f31045fd
MM
3252004-07-12 Mark Mitchell <mark@codesourcery.com>
326
1a57987b
MM
327 * cp-tree.h (get_aggr_typedef): Remove.
328 * init.c (get_aggr_typedef): Likewise.
329
f31045fd
MM
330 * name-lookup.c (push_class_level_binding): Simplify.
331
494d9016
AP
3322004-07-12 Andrew Pinski <apinski@apple.com>
333
334 PR c++/16475
335 Revert:
336 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
337 PR c++/16276
338 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
339 is not public.
340
98ca843c
EC
3412004-07-12 Eric Christopher <echristo@redhat.com>
342
343 * parser.c (cp_parser_class_head): Remove unused variable.
344
3143d517
GB
3452004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
346
347 * decl.c (grok_op_properties): Reject [de-]allocation functions
348 declared in a namespace, or declared as static.
349
cad7e87b
NS
3502004-07-12 Nathan Sidwell <nathan@codesourcery.com>
351
2176cbb5
NS
352 * cp-tree.h (make_binfo): Remove.
353 * decl.c (xref_basetypes): Use make_tree_binfo directly.
354 * tree.h (copy_base_binfos): Likewise.
355 (make_binfo): Remove.
98ca843c 356
cad7e87b
NS
357 * call.c (build_user_type_conversion_1, build_new_op,
358 check_constructor_callable, build_temp,
359 perform_direct_initialization_of_possible): Pass type directly to
360 lookup_fnfields & build_special_member_call.
361 (build_special_member_call): Accept a type, and complete it.
362 * class.c (finish_stuct_bits): Copy the BINFOs here.
363 * cvt.c (ocp_convert): Pass type directly to
364 build_special_member_call.
365 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
366 (xref_basetypes): Allocate the binfo here. Adjust.
367 * init.c (build_init, build_new_1): Pass type directly to
368 build_special_member_call.
369 * lex.c (cxx_make_type): Do not allocate binfo here.
370 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
371 * parser.c (cp_parser_class_head): Always call xref_basetypes.
372 * pt.c (instantiate_class_template): Likewise. Inhibit access
373 checking for template friends.
374 * ptree.c (cxx_print_type): Adjust record printing.
375 * search.c (lookup_base): When taking a type, complete it before
376 looking for a binfo.
377 (lookup_member): Delay completing a type.
378 (push_class_decls): Don't walk an incomplete type.
379 (lookup_conversions): Likewise.
380 * semantics.c (finish_stmt_expr_expr): Pass type directly to
381 build_special_member_call.
382 * tree.c (copy_base_binfos): Adjust.
383 (make_binfo): Likewise.
384 * typeck.c (build_modify_expr): Pass type directly to
385 build_special_member_call.
386 * typeck2.c (process_init_constructor): Check a binfo exists.
387 (build_m_component_ref): Allow accessing an incomplete type.
388 (build_functional_cast): Pass type directly to
389 build_special_member_call.
390
7fb213d8
GB
3912004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
392
393 PR c++/2204
394 * config-lang.in (gtfiles): Add typeck2.c.
395 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
396 gt-cp-typeck2.h.
397 * cp-tree.h: Declare complete_type_check_abstract.
398 * typeck2.c (pat_calc_hash, pat_compare,
399 complete_type_check_abstract): New functions.
400 (abstract_virtuals_error): If the type is abstract, register the
401 declaration within abstract_pending_vars for further checks.
402 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
403 * decl.c (cp_finish_decl): Do not strip array types.
404 (create_array_type_for_decl): Check for abstractness of the element
405 type.
406 (complete_vars): Call complete_type_check_abstract.
407 * class.c (finish_struct): Prepare a list of virtual functions for
408 template types, and call complete_vars on it to check for abstractness.
409
55e99d52
PB
4102004-07-12 Paolo Bonzini <bonzini@gnu.org>
411
412 PR tree-optimization/14107
413 * decl.c (finish_function): Remove temporary band-aid.
414
f44b0c8e
MM
4152004-07-11 Mark Mitchell <mark@codesourcery.com>
416
12cf89fa
MM
417 * call.c (build_operator_new_call): Avoid using push_to_top_level.
418 (build_new_op): Adjust call to lookup_function_nonclass.
419 * name-lookup.c (identifier_type_value): Adjust call to
420 lookup_name_real.
421 (lookup_name_real): Add block_p parameter.
422 (lookup_name_nonclass): Adjust call to lookup_name_real.
423 (lookup_function_nonclass): Likewise.
424 (lookup_name): Likewise.
425 * name-lookup.h (lookup_name_real): Change prototype.
426 (lookup_name_nonclass): Likewise.
427 * parser.c (cp_parser_lookup_name): Likewise.
428
f44b0c8e
MM
429 * cp-tree.h (saved_scope): Make old_bindings a vector.
430 (unuse_fields): Remove.
431 * name-lookup.h (cxx_saved_binding): Define it.
432 * class.c (pushclass): Don't use unuse_fields.
433 * name-lookup.c (cxx_saved_binding_make): Remove.
434 (store_binding): Add new bindings to a vector, using an
435 accumulator style, rather than adding them to a list.
436 (store_bindings): Adjust accordingly.
437 (store_class_bindings): Likewise.
438 (push_to_top_level): Likewise.
439 (pop_from_top_level): Likewise.
440 * optimize.c (maybe_clone_body): Must push_to_top_level and
441 pop_from_top_level calls outside of loop.
442 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
443 calls here from cp_parser_late_parsing_default_args.
444 (cp_parser_save_default_args): Record the class type in which the
445 function is declared.
446 (cp_parser_late_parsing_default_args): Do not call
447 push_nested_class/pop_nested_class.
448 * search.c (dfs_unuse_fields): Remove.
449 (unuse_fields): Remove.
450
9dcf6e73
JM
4512004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
452
453 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
454 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
455 * cp-tree.h (poplevel): Declare.
456 (set_block): Remove.
457 * decl.c (set_block): Remove.
458
30bf22a0
MS
4592004-07-10 Mike Stump <mrs@apple.com>
460
461 * decl2.c (import_export_class): Never export/import vtables
462 with inline key functions.
463
dae42469
SB
4642004-07-09 Steven Bosscher <stevenb@suse.de>
465
466 * typeck.c (c_expand_asm_operands): Remove.
467
999a1ad4
MS
4682004-07-09 Mike Stump <mrs@apple.com>
469
470 * typeck.c (build_class_member_access_expr): Skip null deref
471 warning when we don't dereference it.
472
dd29d26b
GB
4732004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
474
475 PR c++/8211
476 PR c++/16165
477 * class.c (check_field_decls): Improve -Weffc++ warning: do not
478 warn for pointers to functions/members, or for classes without
479 destructors.
480
6f2838e3
MM
4812004-07-08 Mark Mitchell <mark@codesourcery.com>
482
483 * name-lookup.h (struct cp_binding_level): Update documentation
484 for class_shadowed.
485
47293da3
GB
4862004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
487
488 PR c++/16169
489 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
490 returning CALL_EXPR, and non-reference return type.
491
7de5bccc
NS
4922004-07-08 Nathan Sidwell <nathan@codesourcery.com>
493
494 * name-lookup.c (push_binding): Use VEC_reserve.
495
ac45df5d
RH
4962004-07-08 Richard Henderson <rth@redhat.com>
497
498 * cp-tree.h (expand_eh_spec_block): Remove.
499
89b578be
MM
5002004-07-07 Mark Mitchell <mark@codesourcery.com>
501
502 * cp-tree.h (saved_scope): Remove x_previous_class_type and
503 x_previous_class_values; add x_previous_class_level.
504 (previous_class_type): Remove.
505 (previous_class_values): Remove.
506 (previous_class_level): New macro.
507 * class.c (pushclass): Restore the identifier cache more
508 expeditiously.
509 (invalidate_class_lookup_cache): Use vector for class_shadowed and
510 previous_class_values.
511 * decl.c (poplevel): Likewise.
512 * name-lookup.c (cxx_binding_init): New function.
513 (cxx_binding_make): Use it.
514 (push_binding): For a binding in a class level, use a vector of
515 cp_class_binding nodes.
516 (push_binding_level): New function.
517 (begin_scope): Use it.
518 (leave_scope): Do not put class binding levels on the free list.
519 (print_binding_level): Adjust for the fact that class_shadowed is
520 a vector.
521 (poplevel_class): Likewise.
522 (clear_identifier_class_values): Likewise.
523 (push_class_level_binding): Likewise.
524 (set_class_shadows): Remove.
525 (store_binding): New function.
526 (store_class_bindings): New function.
527 (push_to_top_level): Use store_class_bindings as appropriate.
528 (pop_from_top_level): Use previous_class_level, not
529 previous_class_type.
530 * name-lookup.h (cp_class_binding): New type.
531 (cp_binding_level): Use a vector object for class_shadowed.
532 (push_binding_level): Declare.
533 (set_class_shadows): Remove.
534
3a18db48
AP
5352004-07-07 Andrew Pinski <apinski@apple.com>
536
537 * class.c (instantiate_type): BUFFER_REF is dead.
538 * lex.c (init_operators): IN_EXPR is dead.
539
4fe2a1a7
JM
5402004-07-07 Jason Merrill <jason@redhat.com>
541
542 PR c++/16334
543 * call.c (build_new_op): Give overload warnings for built-in
544 candidates.
545
4681c505
L
5462004-07-07 H.J. Lu <hongjiu.lu@intel.com>
547
548 PR c++/16276
549 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
550 is not public.
551
604a3205
NS
5522004-07-07 Nathan Sidwell <nathan@codesourcery.com>
553
554 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
555 * class.c (build_primary_vtable, check_bases,
556 determine_primary_base, finish_struct_bits,
557 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
558 get_basefndecls, warn_hidden, walk_subobject_offsets,
559 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
560 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
561 finish_struct_1, get_vfield_name, contains_empty_class_p,
562 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
563 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
564 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
565 BINFO macros.
566 * decl.c (xref_basetypes): Likewise.
567 * dump.c (cp_dump_tree): Likewise.
568 * error.c (dump_expr): Likewise.
569 * init.c (sort_mem_initializers, expand_member_init,
570 push_base_cleanups): Likewise.
571 * method.c (do_build_copy_constructor, do_build_assign_reg,
572 synthesize_exception_spec): Likewise.
bd7eccc4 573 * name-lookup.c (arg_assoc_class): Likewise.
604a3205 574 * pt.c (instantiate_class_template, tsubst,
bd7eccc4
NS
575 get_template_base_recursive): Likewise.
576 * ptree.c (cxx_print_type): Likewise.
604a3205
NS
577 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
578 * search.c (lookup_base_r, dynamic_cast_base_recurse,
579 dfs_access_in_type, access_in_type, lookup_field_queue_p,
580 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
581 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
582 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
583 binfo_for_vtable, copied_binfo, original_binfo): Likewise
584 * tree.c (copy_base_binfos, make_binfo): Likewise.
585 * typeck.c (commmon_base_type): Likewise
586 * typeck2.c (process_init_constructor): Likewise
587
82b5e52a
JM
5882004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
589
590 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
591
fddabb2c
GB
5922004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
593
594 PR c++/3671
595 * pt.c (convert_nontype_argument): Disallow conversions between
596 different enumeration types.
597
809e3e7f
NS
5982004-07-06 Nathan Sidwell <nathan@codesourcery.com>
599
600 * cp-tree.h (BINFO_MARKED): Remove.
601 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
602 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
603 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
604 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
605 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
606 (mark_primary_bases, determine_primary_base, base_derived_from,
607 dfs_find_final_overrider, dfs_find_final_overrider_q,
608 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
609 dfs_modify_vtables, walk_subobject_offsets,
610 layout_nonempty_base_or_field, build_base_field,
611 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
612 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
613 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
614 build_ctor_vtbl_group, accumulate_vtble_inits,
615 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
616 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
617 add_vcall_offset_vtbl_entries_1): Likewise.
618 * decl.c (xref_basetypes): Incomming virtual base indicated by
619 TREE_TYPE. Adjust.
620 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
621 * init.c (finish_init_stmts, sort_mem_initializers,
622 emit_mem_initializers, build_vtble_address, expand_member_init,
623 push_base_cleanups): Likewise.
624 * method.c (do_build_copy_constructor): Likewise.
625 * pt.c (instantiate_class_template,
626 get_template_base_recursive): Likewise.
627 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
628 get_pseudo_ti_desc): Likewise.
629 * search.c (lookup_base_r, dynamic_cast_base_recurse,
630 binfo_from_vbase, binfo_via_virtual, copied_binfo,
631 original_binfo): Likewise.
632 * semantics.c (finish_base_specifier): Virtualness is indicated
633 by TREE_TYPE.
634 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
635
a95d27c8
MM
6362004-07-06 Mark Mitchell <mark@codesourcery.com>
637
638 Revert:
639 2004-06-24 Jason Merrill <jason@redhat.com>
640 PR c++/16115
641 * decl.c (grokparms): Give the PARM_DECL reference type if the
642 parameter is passed by invisible reference.
643
5377d5ba
RK
6442004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
645
646 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
647 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
648 * pt.c (check_instantiated_args, unify): Likewise.
649
dcbaa800
PE
6502004-07-05 Phil Edwards <phil@codesourcery.com>
651
652 * Make-lang.in (check-c++, lang_checks): Add some comments.
653
c31b8e1b
ZW
6542004-07-05 Zack Weinberg <zack@codesourcery.com>
655
656 * cp-mudflap.c: Delete file.
657 * Makefile.in: Remove all references to cp-mudflap.o.
658
6de66680
ZW
6592004-07-05 Zack Weinberg <zack@codesourcery.com>
660
661 * decl.c (cxx_init_decl_processing): Call
662 build_common_tree_nodes before creating the global NAMESPACE_DECL.
663
030bbecd
GB
6642004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
665
666 PR c++/2518
667 * call.c (build_operator_new_call): Look only at global scope.
668
95b4aca6
NS
6692004-07-05 Nathan Sidwell <nathan@codesourcery.com>
670
671 * call.c (enforce_access): Expect TREE_BINFO.
672 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
673 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
674 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
675 Adjust.
676 (BINFO_LANG_ELTS): Remove.
677 (BINFO_LANG_SLOTS): New.
678 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
679 (CLASSTYPE_TEMPLATE_INFO): Adjust.
680 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
681 * search.c (lookup_member): Check TREE_BINFO.
682 * semantics.c (perform_or_defer_access_check): Likewise.
683 (check_accessibility_of_qualified_id): Check
684 deferred_access_no_check.
685 * tree.c (make_binfo): Use make_tree_binfo.
686
3aaf7c71
MM
6872004-07-04 Mark Mitchell <mark@codesourcery.com>
688
689 * method.c (implicitly_declare_fn): Set linkage of generated
690 functions.
691
8fff4fc1
RH
6922004-07-04 Richard Henderson <rth@redhat.com>
693
694 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
695
6962004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
697
698 PR c++/3761
699 * name-lookup.c (push_class_level_binding): Don't pass a
700 TREE_LIST of ambiguous names to check_template_shadow as it
701 only handles declarations. Instead, pull the declaration
702 out and pass that.
ece95d90 703
e1e93ad8
GB
7042004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
705
706 PR c++/14971
707 * pt.c (check_explicit_specialization): Clarify error message.
708
82c82743
RH
7092004-07-02 Richard Henderson <rth@redhat.com>
710
711 * tree.c (cp_unsave_r): Update remap_save_expr call.
712
717733d4
MM
7132004-07-02 Mark Mitchell <mark@codesourcery.com>
714
d9634d53
MM
715 PR c++/16240
716 * mangle.c (write_template_arg): Correct mangling.
717
954a465f 718 PR c++/16297
717733d4
MM
719 * decl.c (grokdeclarator): Robustify.
720
4dfa0342
RH
7212004-07-01 Richard Henderson <rth@redhat.com>
722
723 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
724 * method.c (synthesize_method): Don't clear_last_expr.
725 * name-lookup.c (maybe_push_cleanup_level): Likewise.
726
d59c7b4b
NC
7272004-07-01 Nick Clifton <nickc@redhat.com>
728
729 * decl2.c (import_export_class): Invoke the
730 import_export_class field in the gcc_target structure if it is not
731 empty.
732
6a0bec2c
RH
7332004-06-30 Richard Henderson (rth@redhat.com>
734
735 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
736 * method.c (use_thunk): Likewise.
737
dd66b8e8
JM
7382004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
739
740 * call.c (build_over_call), typeck.c (build_function_call): Call
741 check_function_arguments instead of check_function_format.
742
99801548
JM
7432004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
744
745 * call.c (build_over_call), typeck.c (build_function_call): Update
746 calls to check_function_format.
747
1d528e29
RH
7482004-06-30 Richard Henderson <rth@redhat.com>
749
750 * call.c (build_over_call): Use __builtin_memcpy for copying
751 CLASS_AS_BASE rather than funny casting.
752
9117ccad
RH
7532004-06-30 Richard Henderson <rth@redhat.com>
754
755 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
756 TYPE_SIZE_UNIT of full_type.
757
93409b8c
PB
7582004-06-30 Per Bothner <per@bothner.com>
759
760 Conditionally compile support for --enable-mapped_location.
761 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
762 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
763 adjustments - which I don't understand.
764 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
765 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
766 (print_instantiation_partial_context): Use expand_location.
767 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
768 * name-lookup.c: Likewise.
769 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
770 * name-lookup.c: Use input_line macro.
771 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
772 (cp_parser_statement): Rename locaal variable statement_locus to
773 statement_location and use SET_EXPR_LOCATION macro.
774 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
775 * tree.c (cp_walk_subtrees): Likewise.
776
dd0d10e8
PB
7772004-06-29 Per Bothner <per@bothner.com>
778
779 * tree.c (build_min_nt, build_min, build_min_non_dep):
780 Don't set TREE_COMPLEXITY from input_line.
781
46e995e0
PB
7822004-06-29 Paul Brook <paul@codesourcery.com>
783
784 * init.c: Include target.h.
785 (get_cookie_size): Remove and replace with target hook.
786 Update callers.
787 (build_new_1): Store the element size in the cookie.
788
fe88415f
NS
7892004-06-29 Nathan Sidwell <nathan@codesourcery.com>
790
791 PR c++/16260
792 * parser.c (cp_parser_template_declaration_after_export): Disable
793 access checks here ...
794 (cp_parser_class_specifier): ... not here.
795
086e3095
NS
7962004-06-28 Nathan Sidwell <nathan@codesourcery.com>
797
798 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
799 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
800 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
801 TREE_CHECK macro.
802
3e1f1ba5
NS
8032004-06-28 Nathan Sidwell <nathan@codesourcery.com>
804
805 * cp-tree.h (struct deferred_access): Move to ...
806 * semantics.c (struct deferred_access): ... here. Adjust.
807 (deferred_access_stack): Make a VEC(deferred_access),
808 (deferred_access_free_list): Remove.
809 (deferred_access_no_check): New.
810 (push_deferring_access_checks, resume_deferring_access_checks,
811 stop_deferring_access_checks, pop_deferring_access_checks,
812 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
813 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
814
0f2a66c9
NS
8152004-06-28 Nathan Sidwell <nathan@codesourcery.com>
816
fe88415f 817 PR c++/16174
644d1951
NS
818 * call.c (build_temp): Declare.
819 (check_constructor_callable): New.
820 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
821 CONSTRUCTOR_CALLABLE.
822 (convert_like_real, initialize_reference): Use
823 check_constructor_callable.
824 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
825 (LOOKUP_*): Renumber.
826
3e1f1ba5
NS
8272004-06-28 Nathan Sidwell <nathan@codesourcery.com>
828
0f2a66c9
NS
829 * friend.c (add_friend): Only perform access checks when context
830 is a class.
831 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
832 * parser.c (cp_parser_class_specifier): Disable access checks here
833 when parsing the body of a templated class.
834 * semantics.c (perform_or_defer_access_checks): Reorder to allow
835 NULL binfos when not checking access.
836
58c42dc2
NS
8372004-06-28 Nathan Sidwell <nathan@codesourcery.com>
838
839 Use vector API for vbase list.
840 * cp-tree.h: Include vec.h
841 (DEF_VEC_P (tree)): New type.
842 (struct lang_type_class): Change vbase's member type.
843 (binfo_for_vbase): Declare.
844 * class.c (determine_primary_base, base_derived_from,
845 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
846 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
847 build_vtbl_initializer): Adjust.
848 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
849 vbases.
850 * init.c (sort_mem_initializers, expand_member_init,
851 push_base_cleanups): Adjust.
852 * method.c (do_build_copy_constructor): Adjust.
853 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
854 (binfo_for_vbase): New.
855 * tree.c (copy_base_binfos): Adjust.
856
0a73e37f
MM
8572004-06-28 Mark Mitchell <mark@codesourcery.com>
858
859 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
860
934d729b
GDR
8612004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
862
6de66680 863 PR c++/14123
934d729b
GDR
864 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
865 paranthesis in case of pointers to array members.
866 * error.c (dump_type_prefix): Likewise.
867 (dump_type_suffix): Maybe issue a whitespace when printing
6de66680 868 ARRAY_TYPE.
934d729b 869
f84b6c96
MM
8702004-06-27 Mark Mitchell <mark@codesourcery.com>
871
872 PR c++/16193
873 * parser.c (cp_parser_set_decl_spec_type): Refine test for
874 redefinition of built-in types.
875
73bbafe5
GDR
8762004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
877
878 * error.c (pp_template_argument_list_start): Remove.
879 (pp_template_argument_list_end): Likewise.
880 (pp_separate_with_comma): Use pp_cxx_separate_with.
881 (reinit_global_formatting_buffer): Remove.
882 (pp_non_consecutive_character): Likewise.
883 (dump_scope): Use pp_cxx_colon_colon.
884 (dump_template_parameter): Use pp_cxx_identifier,
6de66680 885 pp_cxx_tree_identifier and pp_cxx_whitespace.
73bbafe5
GDR
886 (dump_templat_bindings): Replace use of pp_string with sequence
887 of pp_cxx_whitespace and pp_equal.
888 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
889 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
6de66680 890 padding here.
73bbafe5
GDR
891 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
892 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
893 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
894 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
895 pp_cxx_right_bracket, pp_cxx_identifier throughout,
896 (dump_decl): Likewise.
897 (dump_template_decl): Likewise.
898 (dump_function_decl): Likewise. Set padding as appropriate.
899 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
6de66680 900 pp_cxx_right_paren.
73bbafe5
GDR
901 (dump_exception_spec): Likewise.
902 (dump_function_name): Use pp_cxx_tree_identifier and
6de66680 903 pp_cxx_identifier.
73bbafe5
GDR
904 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
905 pp_cxx_end_template_argument_list.
906 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
907 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
6de66680 908 pp_cxx_whitespace throughout.
73bbafe5 909 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
6de66680 910 pp_cxx_right_paren.
73bbafe5
GDR
911 (dump_unary_op): Likewise.
912 (reinit_cxx_pp): New function.
913 (type_as_string); Use it.
914 (expr_as_string): Likewise.
915 (decl_as_string); Likewise.
916 (context_as_string): Likewise.
917 (lang_decl_name): Likewise.
918 (decl_to_string): Likewise.
919 (expr_to_string): Likewise.
920 (parm_to_string): Likewise.
921 (type_to_string): Likewise.
922 (args_to_string): Likewise.
923 (cv_to_string): Likewise.
924
3c01e5df
MM
9252004-06-26 Mark Mitchell <mark@codesourcery.com>
926
927 * cp-tree.h (cp_cv_quals): New type.
928 (cp_declarator): Use it instead of "tree" as appropriate.
929 (grok_method_quals): Adjust prototype.
930 (grokclassfn): Likewise.
931 (do_friend): Likewise.
932 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
933 (grokdeclarator): Likewise.
934 * decl2.c (grok_method_quals): Likewise.
935 (grokclassfn): Likewise.
936 * friend.c (do_friend): Likewise.
937 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
938 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
939 (make_pointer_declarator): Likewise.
940 (make_reference_declarator): Likewise.
941 (make_ptrmem_declarator): Likewise.
942 (cp_parser_ptr_operator): Likewise.
943 (cp_parser_cv_qualifier_seq_opt): Likewise.
944 (cp_parser_cv_qualifier_opt): Remove.
945 (cp_parser_new_declarator_opt): Adjust call to
946 cp_parser_ptr_operator.
947 (cp_parser_conversion_declaration_opt): Likewise.
948 (cp_parser_declarator): Use cp_cv_quals, not tree.
949 (cp_parser_direct_declarator): Likewise.
950
350fae66
RK
9512004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
952
953 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
954 Rename DECL_STMT to DECL_EXPR.
955 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
956 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
957 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
958
e9e4d4ee
JH
9592004-06-26 Jan Hubicka <jh@suse.cz>
960
961 PR C++/14865
962 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
963 reachability analysis.
964
e804f822
MM
9652004-06-25 Mark Mitchell <mark@codesourcery.com>
966
967 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
968 2004-06-23 change.
969
4185ae53
PB
9702004-06-25 Paul Brook <paul@codesourcery.com>
971
972 * decl2.c (get_guard): Call targetm.cxx.guard_type.
973 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
974
f1b90a04
MM
9752004-06-24 Mark Mitchell <mark@codesourcery.com>
976
977 * decl.c (grokdeclarator): Restore error messages about __thread.
978 * parser.c (cp_parser_decl_specifier_seq): Likewise.
979
3db4a9b4
JM
9802004-06-24 Jason Merrill <jason@redhat.com>
981
982 PR c++/16115
983 * decl.c (grokparms): Give the PARM_DECL reference type if the
984 parameter is passed by invisible reference.
985
5e7752d2
AS
9862004-06-24 Andreas Schwab <schwab@suse.de>
987
988 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
989
62d1db17
MM
9902004-06-23 Mark Mitchell <mark@codesourcery.com>
991
992 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
993 (cp/decl.o): Likewise.
994 (cp/decl2.o): Likewise.
995 (cp/pt.o): Likewise.
996 (cp/semantics.o): Likewise.
997 * config-lang.in (gtfiles): Do not reference cp/lex.h.
998 * class.c: Do not include lex.h.
999 (add_implicitly_declared_members): Do not use
1000 adding_implicit_members.
1001 (check_bases_and_members): Do not talk about grok_x_components.
1002 * cp/cp-tree.h (adding_implicit_members): Remove.
1003 (cp_storage_class): New type.
1004 (cp_decl_spec): Likewise.
1005 (cp_decl_specifier_seq): Likewise.
1006 (cp_parameter_declarator): Use it for the decl_specifiers field.
1007 (check_tag_decl): Adjust prototype.
1008 (shadow_tag): Likewise.
1009 (groktypename): Likewise.
1010 (start_decl): Likewise.
1011 (start_function): Likewise.
1012 (start_method): Likewise.
1013 (grok_x_components): Remove.
1014 (grokfield): Adjust prototype.
1015 (grokbitfield): Likewise.
1016 (finish_member_class_template): Remove.
1017 * decl.c: Do not include lex.h.
1018 (adding_implicit_members): Do not define.
1019 (check_tag_decl): Do not use trees to represent decl-specifiers.
1020 (shadow_tag): Likewise.
1021 (groktypename): Likewise.
1022 (start_decl): Likewise.
1023 (grokvardecl): Likewise.
1024 (grokdeclarator): Likewise.
1025 (grokparms): Likewise.
1026 (start_function): Likewise.
1027 (start_method): Likewise.
1028 * decl.h (grokdeclarator): Adjust prototype.
1029 * decl2.c: Do not include lex.h.
1030 (grok_x_components): Remove.
1031 (grokfield): Do not use trees to represent decl-specifiers.
1032 (grokbitfield): Likewise.
1033 * lex.c: Do not include lex.h.
1034 * lex.h: Remove.
1035 * parser.c: Include target.h.
1036 (clear_decl_specs): New function.
1037 (cp_parser_translation_unit): Do not use trees to represent
1038 decl-specifiers.
1039 (cp_parser_postfix_expression): Likewise.
1040 (cp_parser_new_type_id): Likewise.
1041 (cp_parser_condition): Likewise.
1042 (cp_parser_simple_declaration): Likewise.
1043 (cp_parser_decl_specifier_seq): Likewise.
1044 (cp_parser_function_specifier_opt): Likewise.
1045 (cp_parser_conversion_type_id): Likewise.
1046 (cp_parser_template_parameter): Likewise.
1047 (cp_parser_explicit_instantiation): Likewise.
1048 (cp_parser_type_specifier): Likewise.
1049 (cp_parser_simple_type_specifier): Likewise.
1050 (cp_parser_init_declarator): Likewise.
1051 (cp_parser_type_id): Likewise.
1052 (cp_parser_type_specifier_seq): Likewise.
1053 (cp_parser_parameter_declaration): Likewise.
1054 (cp_parser_member_declaration): Likewise.
1055 (cp_parser_exception_declaration): Likewise.
1056 (cp_parser_function_definition_from_specifiers_and_declarator):
1057 Likewise.
1058 (cp_parser_single_declaration): Likewise.
1059 (cp_parser_save_member_function_body): Likewise.
1060 (cp_parser_friend_p): Likewise.
1061 (cp_parser_set_storage_class): New function.
1062 (cp_parser_set_decl_spec_type): Likewise.
1063 * pt.c: Do not include lex.h.
1064 * semantics.c: Likewise.
6de66680
ZW
1065 (finish_member_class_template): Remove.
1066
d522060b
RS
10672004-06-23 Roger Sayle <roger@eyesopen.com>
1068
1069 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
1070 longer take both "args" and "convert_args" as arguments.
1071 (build_op_delete_call): Update call to build_cxx_call.
1072 (build_over_call): Likewise, update call to build_cxx_call.
1073 * cp-tree.h (build_cxx_call): Update funtion prototype.
1074 * typeck.c (build_function_call): Don't call expand_tree_builtin.
1075 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
1076 (throw_bad_typeid): Likewise.
1077 (build_dynamic_cast_1): Likewise.
1078
0f59171d
RH
10792004-06-22 Richard Henderson <rth@redhat.com>
1080
1081 * class.c (build_vfn_ref): Take a pointer not object. Build
1082 an OBJ_TYPE_REF.
1083 (cp_fold_obj_type_ref): New.
1084 * call.c (build_over_call): Update build_vfn_ref call.
1085 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
1086 * cp-tree.h (cp_fold_obj_type_ref): Declare.
1087
28c6dc63
JM
10882004-06-21 Jason Merrill <jason@redhat.com>
1089
514df03f
JM
1090 PR c++/16112
1091 * cp-gimplify.c (cp_gimplify_init_expr): Look through
1092 CLEANUP_POINT_EXPR.
28c6dc63 1093
058b15c1
MM
10942004-06-21 Mark Mitchell <mark@codesourcery.com>
1095
1096 * cp-tree.def (NEW_EXPR): Add a fourth slot.
1097 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
1098 (TREE_PARMLIST): Likewise.
1099 (CALL_DECLARATOR_PARMS): Likewise.
1100 (CALL_DECLARATOR_QUALS): Likewise.
1101 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
1102 (cp_declarator_kind): New type.
1103 (cp_parameter_declarator): Likewise.
1104 (cp_declarator): Likewise.
1105 (cp_error_declarator): Likewise.
1106 (no_parameters): Likewise.
1107 (groktypename): Change prototype.
1108 (start_decl): Likewise.
1109 (start_handler_parms): Likewise.
1110 (get_scope_of_declarator): Likewise.
1111 (start_function): Likewise.
1112 (start_preparsed_function): New function.
1113 (start_function): Change prototype.
1114 (start_method): Likewise.
1115 (grokfield): Likewise.
1116 (grokbitfield): Likewise.
1117 (build_new): Likewise.
1118 (make_pointer_declarator): Remove.
1119 (make_reference_declarator): Likewise.
1120 (make_call_declarator): Likewise.
1121 (set_quals_and_spec): Likewise.
1122 (process_template_parm): Change prototype.
1123 (begin_function_definition): Remove.
1124 (finish_parmlist): Remove.
1125 * decl.c (groktypename): Do not use trees to represent
1126 declarators.
1127 (start_decl): Likewise.
1128 (start_handler_parms): Remove.
1129 (get_scope_of_declarator): Reimplement.
1130 (grokdeclarator): Do not use trees to represent declarators.
1131 (grokparms): Likewise.
1132 (start_function): Likewise.
1133 (start_method): Likewise.
1134 (build_void_list_mode): Do not use TREE_PARMLIST.
1135 * decl.h (grokdeclarator): Change prototype.
1136 * decl2.c (grok_method_quals): Robustify.
1137 (grok_x_components): Do not use trees to represent declarators.
1138 (grokfield): Likewise.
1139 (grokbitfield): Likewise.
1140 (start_objects): Build FUNCTION_DECLs, not declarators.
1141 (start_static_storage_duration_function): Likewise.
1142 * init.c (build_new): Simplify.
1143 * lex.c (make_pointer_declarator): Remove.
1144 (make_reference_declarator): Likewise.
1145 (make_call_declarator): Likewise.
1146 (set_quals_and_spec): Likewise.
1147 * method.c (use_thunk): Use start_preparsed_function.
1148 (synthesize_method): Likewise.
1149 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
1150 * optimize.c (maybe_clone_body): Use start_preparsed_function.
1151 * parser.c (cp_error_declarator): New variable.
1152 (declarator_obstack): Likewise.
1153 (alloc_declarator): New function.
1154 (make_declarator): Likewise.
1155 (make_id_declarator): Likewise.
1156 (make_pointer_declarator): Likewise.
1157 (make_reference_declarator): Likewise.
1158 (make_ptrmem_declarator): Likewise.
1159 (make_call_declarator): Likewise.
1160 (make_array_declarator): Likewise.
1161 (no_parameters): New variable.
1162 (make_parameter_declarator): Likewise.
1163 (cp_parser_check_for_definition_in_return_type): Do not use trees
1164 to represent declarators.
1165 (cp_parser_translation_unit): Likewise.
1166 (cp_parser_new_expression): Likewise.
1167 (cp_parser_new_type_id): Likewise.
1168 (cp_parser_new_declarator_opt): Likewise.
1169 (cp_parser_direct_new_declarator): Likewise.
1170 (cp_parser_condition): Likewise.
1171 (cp_parser_declaration_statement): Likewise.
1172 (cp_parser_declaration): Likewise.
1173 (cp_parser_conversion_type_id): Likewise.
1174 (cp_parser_conversion_declarator_opt): Likewise.
1175 (cp_parser_template_parameter_list): Likewise.
1176 (cp_parser_template_parameter): Likewise.
1177 (cp_parser_explicit_instantiation): Likewise.
1178 (cp_parser_init_declarator): Likewise.
1179 (cp_parser_declarator): Likewise.
1180 (cp_parser_direct_declarator): Likewise.
1181 (cp_parser_type_id): Likewise.
1182 (cp_parser_parameter_declaration_clause): Likewise.
1183 (cp_parser_parameter_declaration_list): Likewise.
1184 (cp_parser_parameter_declaration): Likewise.
1185 (cp_parser_member_declaration): Likewise.
1186 (cp_parser_exception_declaration): Likewise.
1187 (cp_parser_check_declarator_template_parameters): Likewise.
1188 (cp_parser_function_definition_from_specifiers_and_declarator):
1189 Likewise.
1190 (cp_parser_save_member_function_body): Likewise.
1191 * pt.c (process_template_parm): Add is_non_type parameter.
1192 (convert_template_argument): Adjust call to groktypename.
1193 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
1194 (tsubst): Do not expect declarators.
1195 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
1196 argument.
1197 (instantiate_decl): Use start_preparsed_function.
1198 * semantics.c (begin_function_definition): Remove.
1199 (finish_parmlist): Remove.
1200 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
1201 declarators.
1202
44de5aeb
RK
12032004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1204
1205 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
1206 (build_new_method_call): Likewise.
1207 * decl.c (local_variable_p_walkfn): Don't walk into types.
1208 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
1209 (build_anon_union_vars): Add new operand for COMPONENT_REF.
1210 * init.c (buld_new): Add new operand for ARRAY_REF.
1211 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
1212 (do_build_assign_ref): Likewise.
1213 * parser.c (cp_parser_direct_new_declarator): Add new operands
1214 for ARRAY_REF.
1215 (cp_parser_direct_declarator): Likewise.
1216 * pt.c (tsubst): Likewise.
1217 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
1218 for COMPONENT_REF.
1219 * semantics.c (finish_non_static_data_member): Add new operand
1220 for COMPONENT_REF.
1221 * typeck.c (build_class_member_access_expr): Likewise.
1222 (build_class_member_access_expr, finish_class_member_access_expr):
1223 Likewise.
1224 (build_ptrmemfunc_access_expr): Likewise.
1225 (build_array_ref): Add new operands for ARRAY_REF.
1226 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
1227 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
1228
5088b058
RH
12292004-06-21 Richard Henderson <rth@redhat.com>
1230
1231 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
1232 * parser.c (cp_parser_jump_statement): Update commentary.
1233 * pt.c (tsubst_expr): Use RETURN_EXPR.
1234 * semantics.c (finish_return_stmt): Likewise.
1235 (finalize_nrv_r): Likewise.
1236 * typeck.c, typeck2.c: Update file start commentary.
1237
3a5b9284
RH
12382004-06-21 Richard Henderson <rth@redhat.com>
1239
1240 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
1241
543a0daa
RH
12422004-06-20 Richard Henderson <rth@redhat.com>
1243
1244 * cp-tree.h (add_decl_stmt): Declare.
1245 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
1246 * semantics.c (maybe_cleanup_point_expr): New.
1247 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
1248 finish_for_expr, finish_switch_cond): Use it.
1249 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
1250
5a508662
RH
12512004-06-20 Richard Henderson <rth@redhat.com>
1252
1253 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
1254 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
1255 (cp_gimplify_expr): Call it.
1256 (gimplify_cleanup_stmt): Move from c-gimplify.c.
1257 (cp_genericize): New.
1258 * decl.c (finish_function): Call it.
1259 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
1260 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
1261 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
1262 (cp_genericize): Declare.
1263 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
1264 * dump.c (cp_dump_tree): Likewise.
1265 * semantics.c (push_cleanup): Move from c-semantics.c.
1266
84b8b0e0
ZW
12672004-06-20 Zack Weinberg <zack@codesourcery.com>
1268
1269 * cp-lang.c (has_c_linkage): Implement.
1270
1271 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
1272 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
1273 (builtin_function_1): Don't call make_decl_rtl.
1274 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
1275 (grokvardecl): Don't call mangle_decl.
1276 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
1277 DECL_ASSEMBLER_NAME.
1278 * method.c (set_mangled_name_for_decl): Delete.
1279 * name-lookup.c (pushdecl): When a local extern shadows a
1280 file-scope declaration of the same object, give both DECLs the
1281 same DECL_UID.
1282 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
1283 on DECL_ASSEMBLER_NAME.
1284
7c34ced1
RH
12852004-06-19 Richard Henderson <rth@redhat.com>
1286
1287 * cp-gimplify.c: Remove unnecessary prototypes.
1288 (cp_gimplify_stmt): Merge into ...
1289 (cp_gimplify_expr): ... here. Move to end of file. Handle
1290 stmts_are_full_exprs_p frobbing.
1291 * cp-tree.h (cp_gimplify_stmt): Remove.
1292 * pt.c (tsubst_expr): Merge prep_stmt and unify.
1293 * tree.c (init_tree): Don't set lang_gimplify_stmt.
1294
caf2523d
RH
12952004-06-18 Richard Henderson <rth@redhat.com>
1296
1297 PR c++/16034
1298 * semantics.c (begin_cond): New.
1299 (finish_cond): Rewrite to handle template DECL_STMTs specially.
1300 Assume that non-template decls go land before the conditional.
1301 (simplify_loop_decl_cond): Likewise.
84b8b0e0 1302 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
caf2523d
RH
1303 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
1304 begin_switch_stmt, finish_switch_cond): Update to match.
1305
2692eb7d
JM
13062004-06-17 Jason Merrill <jason@redhat.com>
1307
1308 PR c++/16015
1309 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
1310 (finish_stmt_expr_expr): Update type after conversions.
1311 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
1312 Handle void initializer.
1313 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
1314
2f0c006e
GK
13152004-06-17 Geoffrey Keating <geoffk@apple.com>
1316
1317 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
1318 * cp-tree.h (defer_fn): Delete.
1319 * decl2.c (defer_fn): Delete.
1320 (finish_file): Simplify deferred_fns loops; check that
1321 only used inline functions get into deferred_fns.
1322 (mark_used): Inline previous contents of defer_fn.
1323
5882f0f3
RH
13242004-06-16 Richard Henderson <rth@redhat.com>
1325
1326 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
1327 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
1328 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
1329 of CTOR_INITIALIZER ...
1330 (pp_cxx_statement): ... here.
1331 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
1332 (finish_function): Use alloc_stmt_list to zap entire function.
1333 * parser.c (cp_parser_compound_statement): Update commentary.
1334 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
1335 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
1336 (finish_stmt_expr): Don't look through COMPOUND_STMT.
1337
18cf0da2
GK
13382004-06-16 Geoffrey Keating <geoffk@apple.com>
1339
1340 * pt.c (mark_decl_instantiated): Don't call defer_fn.
1341
8c161995
RH
13422004-06-16 Richard Henderson <rth@redhat.com>
1343
1344 * parser.c (cp_parser_labeled_statement): Update commentary.
1345 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
1346 * tree.c (mark_local_for_remap_r): Likewise.
1347
e130a54b
RH
13482004-06-16 Richard Henderson <rth@redhat.com>
1349
1350 * parser.c (cp_parser_asm_definition): Update commentary.
1351 * pt.c (tsubst_expr): Use ASM_EXPR.
1352 * semantics.c (finish_asm_stmt): Likewise.
1353
9e14e18f
RH
13542004-06-16 Richard Henderson <rth@redhat.com>
1355
1356 * decl.c (finish_destructor_body): Use LABEL_EXPR.
1357 * parser.c (cp_parser_statement): Update commentary.
1358 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
1359 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
1360 * tree.c (mark_local_for_remap_r): Likewise.
1361
894ca2c9
RH
13622004-06-16 Richard Henderson <rth@redhat.com>
1363
1364 PR c++/16012
1365 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
1366 statement in FOR_INIT_STMT for templates.
1367
325c3691
RH
13682004-06-15 Richard Henderson <rth@redhat.com>
1369
1370 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
1371 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
1372 (genericize_try_block): Use gimplify_stmt.
1373 (genericize_catch_block, genericize_eh_spec_block): Likewise.
1374 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
1375 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
1376 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
1377 (cp_tree_chain_matters_p): Remove.
1378 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
1379 (COMPOUND_STMT_BODY_BLOCK): New.
1380 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
1381 (EXPR_STMT_STMT_EXPR_RESULT): New.
1382 (building_stmt_tree): Check cur_stmt_list.
1383 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
1384 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
1385 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
1386 (cp_finish_decl): Use push_cleanup.
1387 (start_function, finish_function): Use statement lists.
1388 (finish_stmt): Do nothing.
1389 * except.c (begin_eh_spec_block): Use statement lists.
1390 (check_handlers_1, check_handlers): Likewise.
1391 * init.c (construct_virtual_base): Don't add extra compound stmts.
1392 (build_vec_init): Likewise.
1393 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
1394 * name-lookup.h (struct cp_binding_level): Add statement_list.
1395 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
1396 (cp_parser_labeled_statement, cp_parser_expression_statement,
1397 cp_parser_statement_seq_opt): Likewise.
1398 (cp_parser_compound_statement): Likewise. Take bool for try block.
1399 (cp_parser_selection_statement): Tidy if processing.
1400 (cp_parser_already_scoped_statement): Rewrite to do what it says.
1401 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
1402 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
1403 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
1404 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
1405 (finish_cond): New, rewritten from FINISH_COND.
1406 (simplify_loop_decl_cond): New.
1407 (finish_expr_stmt): Avoid nested EXPR_STMTs.
1408 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
1409 begin_else_clause, finish_else_clause, finish_if_stmt,
1410 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
1411 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
1412 finish_for_cond, finish_for_stmt, begin_switch_stmt,
1413 finish_switch_cond, finish_switch_stmt, begin_try_block,
1414 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
1415 finish_handler_sequence, finish_function_handler_sequence,
1416 begin_handler, finish_handler_parms, finish_handler,
1417 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
1418 using statement lists.
1419 (begin_compound_stmt): Replace has_no_scope argument with flags.
1420 Update all callers. Use statement lists.
1421 (finish_compound_stmt): Likewise.
1422 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
1423 (current_scope_stmt_stack): Remove.
1424 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
1425 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
1426 Rewrite with statement lists.
1427
0173bb6f
AO
14282004-06-15 Alexandre Oliva <aoliva@redhat.com>
1429
1430 * parser.c: Change all assignments of c_lex_string_translate
1431 to true and false to 1 and 0.
1432 (cp_lexer_read_token): Convert type of the translated string.
1433 (cp_parser_skip_to_closing_parentheses): Preserve original
1434 value of c_lex_string_translate, and set it to -1 while
1435 running.
1436 (cp_parser_cache_group): Likewise.
1437 (cp_parser_cache_group_1): Renamed.
1438 (cp_parser_asm_operand_list): Remove redundant setting of
1439 c_lex_string_translate.
1440 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
1441 Handle chained strings.
1442
1f2c9ba5
AP
14432004-06-12 Andrew Pinski <apinski@apple.com>
1444
1445 PR c++/14639
1446 Revert:
1447 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
1448
1449 * cp-tree.h: Fix typo.
1450
1451 * cp-tree.h: Include cgraph.h
84b8b0e0 1452 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1f2c9ba5
AP
1453 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1454
eae29fe1
JM
14552004-06-12 Jason Merrill <jason@redhat.com>
1456
1457 PR tree-optimization/14107
1458 * decl.c (finish_function): Warn about no return in all functions.
1459
096f22f4
PB
14602004-06-15 Paolo Bonzini <bonzini@gnu.org>
1461
1462 * cp-tree.h (struct language_function): Remove cannot_inline.
1463 * decl.c (save_function_data): cannot_inline is no more.
1464 (cxx_push_function_context): Likewise.
1465 * decl2.c (start_objects, start_static_storage_duration_function):
1466 Reset DECL_INLINE, set DECL_UNINLINABLE.
1467
c566721f
GB
14682004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1469
1470 PR c++/15967
1471 * search.c (lookup_field): Propagate the ambiguity list.
1472 (lookup_fnfields): Likewise.
1473
4e0f4df5
GB
14742004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1475
1476 PR c++/15947
1477 * parser.c (cp_parser_template_name): Ctors/dtors never need a
1478 template keyword to disambiguate.
1479
7c82a41e
MM
14802004-06-14 Mark Mitchell <mark@codesourcery.com>
1481
1482 PR c++/15096
1483 * decl.c (grokdeclarator): Ignore pointer-to-members when
1484 computing template depth.
1485
1486 PR c++/14930
1487 * name-lookup.c (pushtag): Do not try to put class declarations in
1488 explicit specialization scopes.
1489
d29647a4
AP
14902004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
1491
1492 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
1493
ba18e4db
MM
14942004-06-11 Mark Mitchell <mark@codesourcery.com>
1495
1496 PR c++/15862
1497 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
1498 bindings for undeclared built-ins.
1499
da291c87
GB
15002004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1501
1502 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
1503 appear at the correct location.
1504
5a57f1b2
JM
15052004-06-10 Jason Merrill <jason@redhat.com>
1506
1507 PR c++/15875
1508 Revert:
1509 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1510 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1511 TREE_TYPE for non-dependent names.
1512 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1513 unknown_type_node as its TREE_TYPE.
1514 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1515 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1516 (dump_expr) <SCOPE_REF case>: Likewise.
1517
109e0040
MM
15182004-06-10 Mark Mitchell <mark@codesourcery.com>
1519
1520 PR c++/15227
1521 * parser.c (cp_parser_direct_declarator): Robustify.
1522
1523 PR c++/15877
1524 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
1525 constants in non-dependent contexts.
1526
1527 PR c++/14211
1528 PR c++/15076
1529 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
1530 necessary.
1531
dbb4e0c6
JJ
15322004-06-10 Jakub Jelinek <jakub@redhat.com>
1533
1534 PR c++/14791
1535 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
1536 specially.
1537
0e5b7cfa
MM
15382004-06-09 Mark Mitchell <mark@codesourcery.com>
1539
1540 Revert:
1541 PR c++/15815
1542 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1543 * lex.c (handle_pragma_interface): Deprecate.
1544 (handle_pragma_implementation): Likewise.
1545
b7115e7f
AP
15462004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
1547
1548 * g++spec.c (lang_specific_driver): Remove check for -lm
1549 and -lmath when check it see if it was the math library.
1550
9221325f
GB
15512004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1552
1553 PR c++/7841
1554 * parser.c (cp_parser_direct_declarator): Reject constructor named
1555 as qualified template-id.
1556
3743236e
MM
15572004-06-07 Mark Mitchell <mark@codesourcery.com>
1558
1559 PR c++/15815
1560 * lex.c (handle_pragma_interface): Deprecate.
1561 (handle_pragma_implementation): Likewise.
1562
d5a10cf0
MM
15632004-06-07 Mark Mitchell <mark@codesourcery.com>
1564
1565 PR c++/15766
1566 * parser.c (cp_parser_iteration_statement): Fix typo in error
1567 message.
1568
1569 PR c++/14777
1570 * pt.c (tsubst_default_argument): Do not defer access checks
1571 while substituting into the default argument.
1572
1573 PR c++/15554
1574 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
84b8b0e0
ZW
1575 constant in a non-dependent context.
1576
d5a10cf0
MM
1577 PR c++/15057
1578 * except.c (build_throw): Ensure that temp_expr has been
1579 initialized.
1580
25a1a39e
RS
15812004-06-06 Roger Sayle <roger@eyesopen.com>
1582
1583 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
1584
8a83a693
GB
15852004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1586
1587 PR c++/15503
1588 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
1589 'typename', and accept 'template'.
1590
f9d18955
AP
15912004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
1592 Jan Hubicka <jh@suse.cz>
1593
1594 PR c++/14639
1595 * method.c (use_think): Do not mark thunk as referenced.
1596
0524c91d
MA
15972004-06-03 Matt Austern <austern@apple.com>
1598
1599 PR c++/15428
1600 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
1601 is nonzero, and if we see a noninline definition of a key method,
1602 make the vtables nonweak.
84b8b0e0 1603
415c974c
MA
16042004-06-02 Matt Austern <austern@apple.com>
1605
1606 * cp-tree.h (instantiate_decl): new boolean parameter,
1607 undefined_ok. Current behavior is equivalent to its being 0.
1608 * decl2.c (mark_used): Add new argument when calling instantiate_decl
1609 * pt.c (mark_decl_instantiated): Unconditionally make
1610 instantiations explicit unconditionally
1611 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
1612 since mark_decl_instantiated now does it.
1613 (instantiate_class_member): New. Instantiate a member of an
1614 explicitly instantiated class template.
1615 (do_type_instantiation): Explicitly instantiate members of an
1616 explicitly instantiated class template.
1617 (instantiate_decl): if undefined_ok is nonzero, and if we're
1618 trying to explicitly instantiated a template with no definition,
1619 change it to an implicit instantiation.
1620 (instantiate_pending_templates): Add new argument to instantiate_decl.
1621 * tree.c (cp_cannot_inline_tree_fn): Likewise.
84b8b0e0 1622
d2d87e6d
AP
16232004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
1624
b9696fd4
AP
1625 * cp-tree.h: Fix typo.
1626
d2d87e6d
AP
1627 * cp-tree.h: Include cgraph.h
1628 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1629 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1630
a90f9bb1
JM
16312004-06-01 Jason Merrill <jason@redhat.com>
1632
1633 PR c++/15142
1634 * call.c (call_builtin_trap): Remove type parm.
1635 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
1636 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
1637
43daf8ff
KL
16382004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1639
1640 PR c++/13092
1641 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1642 TREE_TYPE for non-dependent names.
1643 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1644 unknown_type_node as its TREE_TYPE.
1645 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1646 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1647 (dump_expr) <SCOPE_REF case>: Likewise.
1648
7a3ea201
RH
16492004-06-01 Richard Henderson <rth@redhat.com>
1650 Andrew Pinski <pinskia@physics.uc.edu>
1651
1652 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
1653 * parser.c (struct cp_parser): Remove in_offsetof.
1654 (cp_parser_new): Don't set it.
1655 (cp_parser_unary_expression): Don't check it.
1656 (cp_parser_postfix_open_square_expression): Split out from ...
1657 (cp_parser_postfix_expression): ... here.
1658 (cp_parser_postfix_dot_deref_expression): Likewise.
1659 (cp_parser_builtin_offsetof): New.
1660 (cp_parser_primary_expression): Use it.
1661
07166901
GB
16622004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1663
1664 PR c++/14932
1665 * parser.c (cp_parser_postfix_expression): Allow subscript
1666 operator in offsetof.
1667
e17b3578
MM
16682004-05-31 Mark Mitchell <mark@codesourcery.com>
1669
1670 PR c++/15701
1671 * friend.c (add_friend): Do not try to perform access checks for
1672 functions from dependent classes.
1673
41fd3bac
GDR
16742004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1675
1676 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
1677 (pp_cxx_begin_template_argument_list): Turn into a function.
1678 (pp_cxx_end_template_argument_list): Likewise.
1679 (pp_cxx_separate_with): Define.
1680 (pp_cxx_unqualified_id): Tidy.
1681 (pp_cxx_primary_expression): Likewise.
1682 (pp_cxx_postfix_expression): Likewise.
1683 (pp_cxx_expression): Likewise.
1684 (pp_cxx_simple_type_specifier): Likewise.
1685 (pp_cxx_type_specifier_seq): Likewise.
1686 (pp_cxx_parameter_declaration_clause): Likewise.
1687 (pp_cxx_exception_specification): Likewise.
1688 (pp_cxx_direct_declarator): Likewise.
1689 (pp_cxx_type_id): Likewise.
1690 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
1691 cxx-pretty-print.c.
1692 (pp_cxx_left_paren): Likewise.
1693 (pp_cxx_right_paren): Likewise.
1694 (pp_cxx_left_brace): Likewise.
1695 (pp_cxx_right_brace): Likewise.
1696 (pp_cxx_left_bracket): Likewise.
1697 (pp_cxx_right_bracket): Likewise.
1698 (pp_cxx_dot): Likewise.
1699 (pp_cxx_identifier): Likewise.
1700 (pp_cxx_tree_identifier): Likewise.
1701 (pp_cxx_ampersand): New macro.
1702 (pp_cxx_star): Likewise.
1703 (pp_cxx_arrow): Likewise.
1704 (pp_cxx_semicolon): Likewise.
1705 (pp_cxx_complement): Likewise.
1706 (pp_cxx_begin_template_argument_list): Declaree.
1707 (pp_cxx_end_template_argument_list): Likewise.
1708 (pp_cxx_colon_colon): likewise.
1709
6661a85f
EB
17102004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
1711
1712 * parser.c (cp_parser_simple_type_specifier): Explicitly test
1713 against NULL_TREE.
1714
324f9dfb
KH
17152004-05-31 Kazu Hirata <kazu@cs.umass.edu>
1716
1717 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
1718 typeck.c: Fix comment formatting.
1719
3c79fa86
AP
17202004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
1721
1722 * cp-lang.c (cp_expand_decl): Remove.
1723 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
1724
bd0a5aab
AJ
17252004-05-30 Andreas Jaeger <aj@suse.de>
1726
1727 * lang-specs.h: Add missing initializers for .ii.
1728
9e6f2e7d
AH
17292004-05-28 Aldy Hernandez <aldyh@redhat.com>
1730
1731 * decl.c (cp_make_fname_decl): Free return value from
1732 fname_as_string.
1733
c1cca8d4
MM
17342004-05-28 Mark Mitchell <mark@codesourcery.com>
1735
1736 PR c++/15083
1737 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
1738 even in a templat.e
1739 * init.c (build_new): Likewise.
1740
1741 PR c++/15640
1742 * name-lookup.c (arg_assoc): Robustify.
1743
1744 PR c++/15471
1745 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
1746 when determining the scope to use for a pointer to member.
b3dd05b1
MM
1747 (lookup_anon_field): Give it external linkage.
1748 * cp-tree.h (lookup_anon_field): Declare it.
1749 * expr.c (cplus_expand_constant): Use it.
c1cca8d4 1750
0c1a1ecd
MM
17512004-05-28 Mark Mitchell <mark@codesourcery.com>
1752
1753 PR c++/14668
1754 * parser.c (cp_parser_simple_type_specifier): Call
1755 maybe_note_name_used_in_class.
1756
72e89c7c 17572004-05-28 Tom Marshall <tmarshall@real.com>
9fd8f60d
TM
1758
1759 PR c++/15214
1760 * class.c (finish_struct_1): Warn only if the dtor is non-private or
1761 the class has friends.
1762
81b4398d
AN
17632004-05-27 Adam Nemet <anemet@lnxw.com>
1764
1765 PR c++/12883
1766 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
1767 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
1768
bf277438
GK
17692004-05-24 Geoffrey Keating <geoffk@apple.com>
1770
1771 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
1772 if it might be needed.
1773 * pt.c (mark_decl_instantiated): Only call defer_fn if
1774 the function actually needs processing in finish_file.
1775 * decl2.c (finish_file): Add check that elements in
1776 deferred_fns_used are really needed there. Remove unnecessary
1777 test of DECL_SAVED_TREE.
1778
4f4e53dd
PB
17792004-05-23 Paolo Bonzini <bonzini@gnu.org>
1780
1781 * Make-lang.in: No need to specify $(LIBCPP).
1782
15077df5
MM
17832004-05-23 Mark Mitchell <mark@codesourcery.com>
1784
1785 PR c++/15044
1786 * parser.c (cp_parser_class_head): Robustify.
1787
1788 PR c++/15317
1789 * parser.c (cp_parser_decl_specifier_seq): Correct error in
1790 comment.
1791 (cp_parser_constructor_declarator_p): Treat attributes
1792 as decl-specifiers.
1793
1794 PR c++/15329
1795 * typeck.c (build_unary_op): Do not attempt to resolve casts to
1796 base classes in templates.
1797
a30f62e0
MM
17982004-05-23 Mark Mitchell <mark@codesourcery.com>
1799
1800 PR c++/15165
1801 * pt.c (instantiate_template): Robustify.
1802
9ce1594a
MM
18032004-05-23 Mark Mitchell <mark@codesourcery.com>
1804
1805 PR c++/15025
1806 * decl.c (xref_tag): Issue errors about redeclaring template
1807 classes as non-template classes.
1808
f746161e
MM
18092004-05-23 Mark Mitchell <mark@codesourcery.com>
1810
1811 PR c++/14821
1812 * name-lookup.c (supplement_binding): Allow redefinitions of
1813 namespace aliases.
1814
1815 PR c++/14883
1816 * parser.c (cp_parser_template_argument): Robustify.
1817
4460cef2
GDR
18182004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1819
1820 * class.c (alter_access): Use %E format specifier to print an
1821 identifier node. Avoid looking at the IDENTIFIER_POINTER.
1822 (push_lang_context): Likewise.
1823 * decl.c (lookup_label): Likewise.
1824 (grokdeclarator): Likewise.
1825 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
1826 * pt.c (do_type_instantiation): Likewise.
1827 * tree.c (handle_java_interface_attribute): Likewise.
1828 (handle_com_interface_attribute): Likewise.
1829 (handle_init_priority_attribute): Likewise.
1830
0deb916c
MM
18312004-05-22 Mark Mitchell <mark@codesourcery.com>
1832
1833 PR c++/15285
1834 PR c++/15299
1835 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
1836 recognized as overloaded functions.
1837
1e2e9f54
MM
18382004-05-22 Mark Mitchell <mark@codesourcery.com>
1839
1840 PR c++/15507
1841 * class.c (layout_nonempty_base_or_field): Do not try to avoid
1842 layout conflicts for unions.
1843
1844 PR c++/15542
1845 * typeck.c (build_x_unary_op): Instantiate template class
1846 specializations before looking for "operator &".
1847
1848 PR c++/15427
1849 * typeck.c (complete_type): Layout non-dependent array types, even
1850 in templates.
1851
1852 PR c++/15287
1853 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
1854 template.
1855
ae5cbc33
RS
18562004-05-22 Roger Sayle <roger@eyesopen.com>
1857
1858 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
1859 returning when TREE_TYPE is error_mark_node.
1860 * typeck.c (require_complete_type): Return error_mark_node if
1861 value's type is an error_mark_node.
1862
94632047 18632004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
98d784a9
AP
1864
1865 * optimize.c (calls_setjmp_r): Remove.
1866 (calls_setjmp_p): Remove.
1867 * cp-tree.c (calls_setjmp_p): Remove.
1868 * decl.c (finish_function): Do not call calls_setjmp_p.
1869
bb9a388d
ZW
18702004-05-18 Zack Weinberg <zack@codesourcery.com>
1871
1872 * decl.c (cp_finish_decl): Use mark_decl_referenced.
1873 * decl2.c (maybe_make_one_only): Likewise.
1874 * method.c (use_thunk): Likewise.
1875
d7981fd9
JM
18762004-05-18 Jason Merrill <jason@redhat.com>
1877
1878 * class.c (build_base_path): Tidy a bit.
1879
15f8ac7f
GK
18802004-05-14 Geoffrey Keating <geoffk@apple.com>
1881
1882 * name-lookup.c (struct scope_binding): New.
1883 (EMPTY_SCOPE_BINDING): New.
1884 (lookup_using_namespace): Take a scope_binding instead of a
1885 cxx_binding.
1886 (qualified_lookup_using_namespace): Likewise.
1887 (cxx_binding_clear): Delete.
1888 (do_nonmember_using_decl): Use a scope_binding instead of a
1889 cxx_binding.
1890 (lookup_tag): Don't call select_decl.
1891 (ambiguous_decl): Don't return anything (and change callers to match).
1892 Take a scope_binding as the second parameter.
1893 (lookup_namespace_name): Use a scope_binding instead of a
1894 cxx_binding.
1895 (unqualified_namespace_lookup): Likewise.
1896 (lookup_qualified_name): Likewise.
1897 (select_decl): Take a scope_binding instead of a cxx_binding.
1898 Use macros rather than hand-coding tests for type-ness.
1899
eadf906f
DN
19002004-05-13 Diego Novillo <dnovillo@redhat.com>
1901
1902 * cp-gimplify.c: Rename from cp-simplify.c.
1903 * Make-lang.in, optimize.c: Update.
1904
6de9cd9a
DN
19052004-05-13 Diego Novillo <dnovillo@redhat.com>
1906
1907 Merge from tree-ssa-20020619-branch. See
1908 ChangeLog.tree-ssa for details.
1909
1910 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
1911 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
1912 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
1913 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
1914 Merged.
1915 * cp-mudflap.c: New file.
1916 * cp-simplify.c:: New file.
1917
5015278a
GB
19182004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1919
1920 PR c++/14389
1921 * decl2.c (check_classfn): For member templates, compare also the
1922 template parameters to match the declaration.
1923 * cp-tree.h: Adjust declaration of check_classfn.
1924 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
1925 * friend.c (do_friend): Likewise.
1926 * pt.c (tsubst_friend_function): Likewise.
1927
f8e7a389
ZW
19282004-05-01 Zack Weinberg <zack@codesourcery.com>
1929
1930 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
1931 Instead, dig into the representation type to find the array bound.
1932
00bfffa4
JM
19332004-04-30 Jason Merrill <jason@redhat.com>
1934
1935 Refer to base members using COMPONENT_REFs where possible.
1936 * class.c (build_simple_base_path): New fn.
1937 (build_base_path): Use it for non-virtual base references.
1938 (layout_class_type): Change base fields to their real type
1939 after layout is done.
1940 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
1941 * cp-lang.c (cxx_get_alias_set): Use it.
1942
a692ad2e
KH
19432004-04-30 Kazu Hirata <kazu@cs.umass.edu>
1944
1945 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
1946 comment typos.
1947
4424e0da
GB
19482004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1949
1950 PR c++/15064
1951 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
1952 used in integral constant expressions.
1953
92a62aad
MM
19542004-04-22 Mark Mitchell <mark@codesourcery.com>
1955
671cb993
MM
1956 * init.c (build_aggr_init): Fix accidental use of C99 construct in
1957 previous change.
f8e7a389 1958
92a62aad
MM
1959 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
1960 braced initializer.
1961 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
1962 * decl.c (reshape_init): Use it.
1963 * init.c (perform_member_init): Remove redundant condition.
1964 (build_aggr_init): Adjust to handle brace-enclosed initializers
1965 correctly.
1966 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
671cb993 1967
92a62aad
MM
1968 * parser.c (cp_parser_initializer_clause): Do not set
1969 TREE_HAS_CONSTRUCTOR on the initializer.
1970 * rtti.c (tinfo_base_init): Likewise.
1971 (generic_initializer): Likewise.
1972 (ptr_initializer): Likewise.
1973 (ptm_initializer): Likewise.
1974 (class_initializer): Likewise.
1975 (get_pseudo_ti_init): Likewise.
1976 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
f8e7a389 1977
aa26a3f6
AM
19782004-04-22 Alan Modra <amodra@bigpond.net.au>
1979
1980 * name-lookup.c (anonymous_namespace_name): Make static.
1981
60c90ad1
RS
19822004-04-19 Roger Sayle <roger@eyesopen.com>
1983
1984 PR middle-end/14531
1985 * class.c (build_base_path): Call fold whilst building the NULL
1986 pointer check expression trees.
1987
245c3c04
BM
19882004-04-15 Bryce McKinlay <mckinlay@redhat.com>
1989
1990 * init.c (build_new_1): Don't use type size argument for Java
1991 _Jv_AllocObject call.
1992
c051cc7e
DS
19932004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
1994
1995 * method.c (make_alias_for_thunk): Remove preprocessor guard on
1996 declaration and definition.
1997
4a77e08c
DS
19982004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
1999
2000 PR c++/14808
2001 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
2002 than ASM_OUTPUT_DEF.
2003
a7485e93
JJ
20042004-04-08 Jakub Jelinek <jakub@redhat.com>
2005
2006 * decl2.c (mark_used): Don't segfault if cfun != NULL but
2007 current_function_decl == NULL.
2008
355f774d
NS
20092004-04-05 Nathan Sidwell <nathan@codesourcery.com>
2010
2011 PR c++/3518
2012 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
2013 level.
2014
4f976745
RK
20152004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2016
2017 * init.c (decl_constant_value): Don't look at DECL_INITIAL
2018 of PARM_DECL.
2019 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
2020 or TREE_SIDE_EFFECTS of a type.
2021
2e9ceb77
NS
20222004-04-02 Nathan Sidwell <nathan@codesourcery.com>
2023
2024 PR c++/14007
2025 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
2026 cv-qualifier unification.
2027 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
2028
18c6ada9
JH
20292004-04-02 Jan Hubicka <jh@suse.cz>
2030
2031 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
2032 * cp-tree.h (cp_update_decl_after_saving): Declare.
2033 * tree.c (cp_update_decl_after_saving): Define.
2034
e8632777
MM
20352004-04-01 Mark Mitchell <mark@codesourcery.com>
2036
2037 PR c++/14803
2038 * typeck.c (get_delta_difference): Call fold before returning the
2039 value.
2040
6407bc67
RH
20412004-04-01 Richard Henderson <rth@redhat.com>
2042
2043 PR c++/14804
2044 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
2045 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
2046
bb8b4ed6
MM
20472004-04-01 Mark Mitchell <mark@codesourcery.com>
2048
2049 PR c++/14810
2050 * name-lookup.c (maybe_push_cleanup_level): Robustify.
2051
a150de29
RK
20522004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2053
2054 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
2055
8df83eae
RK
20562004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2057
2058 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
2059 * class.c (check_bitfield_decl): Likewise.
2060 * cvt.c (type_promotes_to): Likewise.
2061 * decl.c (finish_enum): Likewise.
2062 * mangle.c (write_builtin_type): Likewise.
2063 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
2064 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
2065 (build_binary_op): Likewise.
2066
0ba13880
JH
20672004-03-31 Jan Hubicka <jh@suse.cz>
2068
2069 * tree.h (optimize_function): Kill prototype.
2070 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
2071 * semantics.c (expand_body): Kill.
2072
c6671cbb
MM
20732004-03-30 Mark Mitchell <mark@codesourcery.com>
2074
2075 PR c++/14724
2076 * decl.c (start_decl_1): Do not decide whether or not to create a
2077 new cleanup level until after the type has been completed.
2078
2079 PR c++/14763
2080 * pt.c (tsubst_default_argument): Clear current_function_decl.
2081
1431042e
ZW
20822004-03-30 Zack Weinberg <zack@codesourcery.com>
2083
2084 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
2085
93604b1a
ZW
20862004-03-29 Zack Weinberg <zack@codesourcery.com>
2087
2088 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
2089 is null, just print the literal name and return.
2090
666c27b9
KH
20912004-03-25 Kazu Hirata <kazu@cs.umass.edu>
2092
2093 * cxx-pretty-print.c: Fix comment typos.
2094
ef335eb8
KH
20952004-03-24 Kazu Hirata <kazu@cs.umass.edu>
2096
2097 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
2098 Update copyright.
2099
f18eca82
ZL
21002004-03-23 Ziemowit Laski <zlaski@apple.com>
2101
2102 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
2103 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
2104 target hook.
2105
f75fbaf7
ZW
21062004-03-23 Zack Weinberg <zack@codesourcery.com>
2107
1b1d85bd 2108 PR 12267, 12391, 12560, 13129, 14114, 14133
f75fbaf7
ZW
2109 * cp-lang.c (c_reset_state): Delete.
2110 (push_file_scope, pop_file_scope): New stubs.
2111 * parser.c (c_parse_file): Call sorry() here if called more than once.
2112
22421b79
RK
21132004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2114
2115 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
2116 for INTEGER_CST.
2117
7090f4b3
GDR
21182004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2119
2120 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
2121
b9b44fb9
GDR
21222004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
2123
2124 * error.c (enum pad): Remove.
2125 (dump_qualifiers): Likewise.
2126 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
2127 (dump_aggr_type): Likewise.
2128 (dump_type_suffix): Likewise.
2129 (dump_simple_decl): Likewise.
2130 (dump_function_decl): Likewise.
2131 (cv_to_string): Likewise.
f75fbaf7 2132 (dump_type_prefix): Likewise. Adjust return void.
b9b44fb9
GDR
2133 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
2134 cxx_pretty_print.h.
2135 (pp_cxx_template_keyword_if_needed): Document.
2136 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
2137 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
f75fbaf7 2138 MUST_NOT_THROW_EXPR.
b9b44fb9 2139
fc5fccde
MM
21402004-03-21 Mark Mitchell <mark@codesourcery.com>
2141
2142 PR c++/14616
2143 * decl.c (cp_finish_decl): Compute the size of arrays declared in
2144 templates, if their type is non-dependent.
2145
4546865e
MM
21462004-03-19 Mark Mitchell <mark@codesourcery.com>
2147
2148 * call.c (build_op_delete_call): Do not forget the placement
2149 arguments when iterating through mutiple delete operators.
2150
2151 * cp-tree.h (svaed_scope): Remove last_parms.
2152 (NEW_DELETE_OPNAME_P): New macro.
2153 (last_function_parms): Remove.
2154 (do_friend): Adjust prototype.
2155 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
2156 using last_function_parms.
2157 (grokfndecl): Take the PARM_DECLs as an argument, rather than
2158 using last_function_parms.
2159 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
2160 for class-specific operator new and operator delete.
2161 (grok_op_properties): Do not look for allocation functions with
2162 METHOD_TYPEs.
2163 (start_function): Use DECL_ARGUMENTS instead of
2164 last_function_parms.
2165 * decl.h (last_function_parms): Do not declare.
2166 * decl2.c (grokclassfn): Do not use last_function_parms.
2167 * friend.c (do_friend): Remove parmdecls parameter.
2168 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
2169 (pop_from_top_level): Do not restore it.
2170 * pt.c (check_explicit_specialization): Do not adjust
2171 last_function_parms.
2172
2173 * name-lookup.c (do_local_using_decl): Create a local binding for
2174 types brought in via using declarations.
2175
2176 * name-lookup.c (lookup_arg_dependent): Handle block-scope
2177 function declarations correctly.
2178
2179 * semantics.c (finish_id_expression): Correct handling of
2180 conversion operators to dependent types.
2181
2182 * typeck.c (lookup_destructor): Allow the use of destructors from
2183 base classes.
f75fbaf7 2184
32f4f719
RK
21852004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2186
2187 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
2188 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
2189 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
2190 the field is named TEMPLATE_TYPE_PARM_INDEX.
2191
d36d5600
GB
21922004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2193
2194 PR c++/14545
2195 * parser.c (cp_parser_functional_cast): A cast to anything
2196 but integral or enumaration type is not an integral constant
2197 expression.
2198 * pt.c (value_dependent_expression_p): Handle cast expressions
2199 without operands (such as "int()").
2200
26bcf8fc
MM
22012004-03-18 Mark Mitchell <mark@codesourcery.com>
2202
2203 * semantics.c (finish_pseudo_destructor_expr): Allow differing
2204 cv-qualification between the type named by the
2205 pseudo-destructor-name and the object-type.
2206
2207 * search.c (accessible_base_p): Handle non-proper bases.
2208
2209 * name-lookup.c (do_nonmember_using_decl): If a using declaration
2210 refers to a single overloaded function, set the type of the
2211 function.
2212 * tree.c (lvalue_type): Simplify.
2213 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
2214 unknown type.
2215 (build_unary_op): Handle OVERLOADs with known types.
2216
2217 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
2218 function templates.
2219
2220 * parser.c (cp_parser_postfix_expression): Handle the use of
2221 "typename" in non-dependent contexts. Convert appropriately when
2222 when using a qualified name after "->" or ".".
2223
2224 * call.c (conditional_conversion): Honor the requirement that some
2225 conversions refer to the original object.
2226
9d363a56
MM
22272004-03-18 Mark Mitchell <mark@codesourcery.com>
2228
2229 * call.c (build_conditional_expr): Do not call force_rvalue for
2230 operands of void_type when the conditional expression itself has
2231 void type.
2232 * name-lookup.c (pushdecl): Don't consider a declaration of a
2233 function named "main" to be an overload of a type named "main".
2234 * parser.c (cp_parser_template_name): Perform name lookup when the
2235 template name is proceeded by "template" if the qualifying scope
2236 is non-dependent.
2237 * typeck.c (composite_pointer_type_r): Correctly handle
2238 pointer-to-member types.
2239 (build_const_cast): Likewise.
2240
eb34af89
RK
22412004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2242
a2982c1b
RK
2243 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
2244 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
2245 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
2246 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
2247 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
2248 (TYPEOF_TYPE_EXPR): New macro.
eb34af89
RK
2249 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
2250 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
2251 * pt.c (tsubst): Likewise.
2252 * semantics.c (finish_typeof): Likewise.
2253 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
2254 and TEMPLATE_TYPE_PARM.
2255 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
2256 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
2257
ec835fb2
MM
22582004-03-16 Mark Mitchell <mark@codesourcery.com>
2259
2260 PR c++/14586
2261 * cp-tree.h (build_new_op): Change prototype.
2262 (build_x_binary_op): Likewise.
2263 * call.c (build_new_op): Add overloaded_p parameter.
2264 * decl2.c (grok_array_decl): Adjust call to build_new_op.
2265 * parser.c (cp_parser_binary_expression): Note that uses of
2266 overloaded operators prevents an expression from being considered
2267 an integral constant.
2268 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
2269 build_x_binary_op.
2270 * semantics.c (finish_call_expr): Likewise.
2271 * typeck.c (rationalize_conditional_expr): Likewise.
2272 (build_x_indirect_ref): Likewise.
2273 (build_x_binary_op): Likewise.
2274 (build_x_unary_op): Likewise.
2275 (build_x_compound_expr): Likewise.
2276 (build_modify_expr): Likewise.
2277 * typeck2.c (build_x_arrow): Likewise.
2278
ca2b05ba
KH
22792004-03-15 Kazu Hirata <kazu@cs.umass.edu>
2280
2281 * cp-lang.c, ptree.c: Update copyright.
2282
625cbf93
MM
22832004-03-13 Mark Mitchell <mark@codesourcery.com>
2284
2285 PR c++/14550
2286 * parser.c (cp_parser_non_integral_constant_expression): Encode
2287 more of the idiom that surrounded calls to this function within
2288 the function itself
2289 (cp_parser_primary_expression): Adjust accordingly.
2290 (cp_parser_postfix_expression): Likewise.
2291 (cp_parser_unary_expression): Likewise.
2292 (cp_parser_cast_expression): Likewise.
2293 (cp_parser_assignment_expression): Likewise.
2294 (cp_parser_expression): Likewise.
2295 (cp_parser_new_expression): Note that new-expressions are not
2296 allowed in integral constant expressions.
2297 (cp_parser_delete_expression): Likewise.
2298
4746cf84
MA
22992004-03-12 Matt Austern <austern@apple.com>
2300
2301 * decl2.c (maybe_make_one_only): Look at
2302 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
2303 to make an explicit instantiation weak.
2304 * method.c (use_thunk): Make sure we call comdat_linkage
2305 when appropriate.
2306 * pt.c (do_type_instantiation): On systems where weak symbols
2307 don't go in a static archive's TOC, explicit instantiation of a
2308 class must imply *explicit* instantiation of its memeber.
f75fbaf7 2309
878cbb73
KH
23102004-03-11 Kazu Hirata <kazu@cs.umass.edu>
2311
2312 * call.c, cp-tree.h, pt.c: Fix comment typos.
2313
e46e9f82
MM
23142004-03-10 Mark Mitchell <mark@codesourcery.com>
2315
2316 PR c++/14510
2317 * decl.c (xref_tag): Disregard non-type declarations when
f75fbaf7 2318 looking up a tagged type.
e46e9f82 2319
c497b976
NS
23202004-03-09 Nathan Sidwell <nathan@codesourcery.com>
2321
2322 PR c++/14397
2323 * call.c (convert_like_real): Build a const qualified temporary,
2324 when testing ctor access.
2325
205b4f1d
MM
23262004-03-09 Mark Mitchell <mark@codesourcery.com>
2327
2328 * call.c (initialize_reference): Fix typo.
2329
0da99d4e
GB
23302004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2331
2332 PR c++/14409
2333 * pt.c (determine_specialization): For member templates, match also
2334 constness.
2335
2336 PR c++/14448
2337 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
2338 non-dependent.
2339 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
2340
65196e37
MM
23412004-03-09 Mark Mitchell <mark@codesourcery.com>
2342
2343 PR c++/14230
2344 * call.c (initialize_reference): Handle initializers that are
2345 class-member access expressions applies to rvalues.
2346
62d99768
MM
23472004-03-09 Mark Mitchell <mark@codesourcery.com>
2348
2349 PR c++/14432
2350 * name-lookup.c (supplement_binding): Ignore functions that are
2351 marked DECL_ANTICIPATED.
2352
58ec3cc5
MM
23532004-03-08 Mark Mitchell <mark@codesourcery.com>
2354
2355 PR c++/14401
2356 * class.c (check_field_decls): Complain about non-static data
2357 members of reference type in unions. Propagate
2358 CLASSTYPE_REF_FIELDS_NEED_INIT and
2359 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
2360 data members.
2361 * init.c (perform_member_init): Complain about mbmers with const
2362 type that are not explicitly initialized.
2363
23642004-03-08 Mark Mitchell <mark@codesourcery.com>
2365
2366 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
2367 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
2368 (lang_identifier): Remove implicit_decl and error_locus.
2369 (IDENTIFIER_IMPLICIT_DECL): Remove.
2370 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
2371 (IDENTIFIER_ERROR_LOCUS): Likewise.
2372 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
2373 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
2374 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
2375 (implicitly_declare): Remove.
2376 * decl.c (warn_extern_redeclared_static): Remove check of
2377 IDENTIFIER_IMPLICIT_DECL.
2378 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
2379 (implicitly_declare): Remove.
2380 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
2381 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
2382 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
2383 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
2384 in the innermost scope, rather than at namespace scope.
2385 * name-lookup.c (push_local_binding): Give it external linkage.
2386 (pushdecl): Remove dead code.
2387 * name-lookup.h (push_local_binding): Declare it.
2388 * ptree.c (cxx_print_identifier): Don't print
2389 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
2390 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
2391 not IDENTIFIER_ERROR_LOCUS.
2392 * typeck.c (build_function_call): Remove dead code.
2393
38b305d0
JM
23942004-03-08 Jason Merrill <jason@redhat.com>
2395
2396 PR c++/13170
2397 * decl.c (xref_tag): Remove attribute handling.
2398 * cp-tree.h: Adjust prototype.
2399 * decl.c, parser.c, rtti.c: Adjust callers.
2400 * parser.c (cp_parser_class_head): Pass back attributes in the
2401 class head.
2402 (cp_parser_class_specifier): Adjust.
2403
97b6d55b
MA
24042004-03-08 Matt Austern <austern@apple.com>
2405
2406 PR debug/14079
2407 * name-lookup.c (add_decl_to_level): Add extern variables, as well
2408 as static, to static_decls array.
f75fbaf7 2409
fd917e0d
JM
24102004-03-05 Jason Merrill <jason@redhat.com>
2411
2412 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
2413
9fc444cc
GK
24142004-03-04 Geoffrey Keating <geoffk@apple.com>
2415
2416 * decl.c (grokfndecl): Update old incorrect comment.
2417 (grokvardecl): Diagnose C++ variables of type with no linkage.
2418
9b7be7b5
MM
24192004-03-01 Mark Mitchell <mark@codesourcery.com>
2420
2421 PR c++/14369
2422 * pt.c (build_non_dependent_expr): Do not create a
2423 NON_DEPENDENT_EXPR for a THROW_EXPR.
2424
1c09c5e5
GDR
24252004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
2426
2427 PR c++/14369
2428 * error.c (dump_expr): Handle THROW_EXPR.
2429
676e33ca
MM
24302004-03-01 Mark Mitchell <mark@codesourcery.com>
2431
2432 PR c++/14360
2433 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
2434 lookup if ordinary name-lookup finds a non-function.
2435 * pt.c (tsubst_copy_and_build): Likewise.
2436
2437 PR c++/14361
2438 * parser.c (cp_parser_late_parsing_default_args): Check that there
2439 are no extra tokens after the end of the default-argument
2440 expression.
f75fbaf7 2441
ab73670a
MM
24422004-03-01 Mark Mitchell <mark@codesourcery.com>
2443
2444 PR c++/14324
2445 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
2446 having C++ linkage for name-mangling purposes.
2447
2448 PR c++/14260
2449 * parser.c (cp_parser_direct_declarator): Recognize constructor
2450 declarators that use a template-id to name the class being
2451 constructed.
2452
2453 PR c++/14337
2454 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
2455 (tsubst_expr): Do not call tsubst_copy, even when
f75fbaf7 2456 processing_template_decl.
ab73670a 2457
9bf793f9
JL
24582004-03-01 Jeff Law <law@redhat.com>
2459
2460 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
2461 the proper type.
2462
91b004e5
MM
24632004-02-29 Mark Mitchell <mark@codesourcery.com>
2464
2465 PR c++/14138
2466 * name-lookup.h (push_scope): Change prototype.
2467 * name-lookup.c (push_scope): Do not reenter the current class
2468 scope.
2469 * decl.c (grokfndecl): Check return code from push_scope before
2470 calling pop_scope.
2471 * decl2.c (check_classfn): Likewise.
2472 * parser.c (cp_parser_conversion_function_id): Likewise.
2473 (cp_parser_init_declarator): Likewise.
2474 (cp_parser_direct_declarator): Likewise.
2475 (cp_parser_class_specifier): Likewise.
2476 (cp_parser_class_head): Likewise.
2477 (cp_parser_lookup_name): Likewise.
2478 (cp_parser_constructor_declarator_p): Likewise.
2479 * pt.c (instantiate_class_template): Likewise.
2480 (resolve_typename_type): Likewise.
2481
39876352
MM
24822004-02-29 Mark Mitchell <mark@codesourcery.com>
2483
719f407a
MM
2484 PR c++/14267
2485 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
2486 extension.
2487
39876352
MM
2488 PR debug/12103
2489 * class.c (update_vtable_entry_for_fn): Do not go through
2490 covariance machinery if the type returned by an overrider is the
2491 same as the original.
2492
4ee31f1e
KH
24932004-02-29 Kazu Hirata <kazu@cs.umass.edu>
2494
2495 * call.c: Fix a comment typo.
2496
b1009a5d
ZL
24972004-02-27 Ziemowit Laski <zlaski@apple.com>
2498
2499 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
2500
4d5fe289
MM
25012004-02-26 Mark Mitchell <mark@codesourcery.com>
2502
2503 PR c++/14278
2504 * parser.c (cp_parser_parameter_declaration_list): Commit
2505 to fewer tentative parses.
2506
6bf92cb6
GB
25072004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2508
2509 PR c++/14284
2510 * pt.c (dependent_type_p_r): A template template parameter is a
2511 dependent type.
2512
3cc8f587
GB
25132004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2514
2515 PR c++/14246
2516 * mangle.c (write_template_arg_literal): Don't rely on identity for
2517 boolean constants.
2518
134084ff
JM
25192004-02-24 Jason Merrill <jason@redhat.com>
2520
2521 * tree.c (build_exception_variant): Use check_qualified_type.
2522
3521b33c
ZW
25232004-02-23 Zack Weinberg <zack@codesourcery.com>
2524 Kazu Hirata <kazu@cs.umass.edu>
2525
2526 * decl.c (cxx_init_decl_processing): Don't check
2527 flag_writable_strings.
2528
a2f1f4c3
AP
25292004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
2530
2531 PR c++/14156
2532 * typeck.c (maybe_warn_about_returning_address_of_location):
2533 Change check for VAR_DECL to use DECL_P instead.
2534
29f4ceab
GB
25352004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2536
2537 PR c++/14250
2538 * cvt.c (build_expr_type_conversion): Type must be complete before
2539 looking up for conversions.
2540
146d3c99
GB
25412004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2542
2543 PR c++/14143
f75fbaf7 2544 * name-lookup.c (arg_assoc_class): Don't look into template
146d3c99
GB
2545 arguments if it is not a primary template.
2546
7a3e01c4
JDA
25472004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2548
146d3c99 2549 PR c++/12007
7a3e01c4
JDA
2550 * method.c (use_thunk): Always clone function argument tree.
2551
c0694c4b
MM
25522004-02-20 Mark Mitchell <mark@codesourcery.com>
2553
2554 PR c++/14199
2555 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
2556
2557 PR c++/14173
2558 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
2559 for all type variants.
2560
a6567a0f
MM
25612004-02-19 Mark Mitchell <mark@codesourcery.com>
2562
c0694c4b
MM
2563 PR c++/13927
2564 * decl.c (duplicate_decls): Return error_mark_node for invalid
2565 redeclarations.
2566 * name-lookup.c (push_namespace): Ignore the return value from
2567 pushdecl.
2568 * pt.c (push_template_decl_real): Robustify.
2569
a6567a0f
MM
2570 PR c++/14186
2571 * name-lookup.c (push_class_level_binding): Do not complain about
2572 adding a binding for a member whose name is the same as the
2573 enclosing class if the member is located in a base class of the
2574 current class.
2575
063e900f
GB
25762004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2577
2578 PR c++/14181
f75fbaf7 2579 * parser.c (cp_parser_new_expression): Parse an ill-formed
063e900f
GB
2580 direct-new-declarator after a parenthesized type-id to emit good
2581 diagnostic.
2582
aa335b76
KH
25832004-02-18 Kazu Hirata <kazu@cs.umass.edu>
2584
2585 * cp-tree.def, cvt.c: Update copyright.
2586
57782ad8
MM
25872004-02-17 Mark Mitchell <mark@codesourcery.com>
2588
2589 PR c++/11326
2590 * cp-tree.h (abi_version_at_least): Remove.
2591 * mangle.c: Include flags.h.
2592
d2f2c87b
MM
25932004-02-15 Mark Mitchell <mark@codesourcery.com>
2594
2595 PR c++/13971
2596 * call.c (build_conditional_expr): Handle conversions between
2597 class types which result in differently cv-qualified type
2598 variants.
2599
2600 PR c++/14086
2601 * class.c (delete_duplicate_fields_1): Remove.
2602 (delete_duplicate_fields): Likewise.
2603 (finish_struct_anon): Remove check for members with the same name
2604 as their enclosing class.
2605 (check_field_decls): Do not call duplicate_fields.
2606 * decl.c (grokdeclarator): Remove check for static data members
2607 with the same name as their enclosing class.
2608 * name-lookup.c (push_class_level_binding): Check for members with
2609 the same name as their enclosing class.
2610
bf3e8283
GDR
26112004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
2612
2613 PR c++/14085
2614 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
2615
28ba38e3
KL
26162004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2617
2618 PR c++/13635
2619 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
2620 has full set of arguments.
2621
7162281a
GB
26222004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2623
2624 PR c++/13927
2625 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
2626
41dffe62
MM
26272004-02-13 Mark Mitchell <mark@codesourcery.com>
2628
0e8c9b28
MM
2629 PR c++/14122
2630 * cp-tree.h (delete_sanity): Change prototype.
2631 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
2632 Remove dead code. Adjust code to warn about deleting an array.
2633 * typekc.c (decay_conversion): Use build_address and build_nop.
2634
2635 PR c++/14108
2636 * search.c (accessible_p): Do not check access in thunks.
2637
41dffe62
MM
2638 PR c++/14083
2639 * call.c (build_conditional_expr): Call force_rvalue on the
2640 non-void operand in the case that one result is a throw-expression
2641 and the other is not.
2642
d6e57462
ILT
26432004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
2644
2645 PR c++/9851
2646 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
2647 the type name and look ahead for ::~, and bail out early with a
2648 better error message if the parse is going to fail.
2649
5bd61841
MM
26502004-02-12 Mark Mitchell <mark@codesourcery.com>
2651
2652 * call.c (conversion_kind): New type.
2653 (conversion_rank): Likewise.
2654 (conversion): Likewise.
2655 (CONVERSION_RANK): New macro.
2656 (conversion_obstack): New variable.
2657 (obstack_initialized): Likewise.
2658 (z_candidate): Change type of convs and second_conv.
2659 (candidate_warning): New type.
2660 (IDENTITY_RANK): Remove.
2661 (EXACT_RANK): Likewise.
2662 (PROMO_RANK): Likewise.
2663 (STD_RANK): Likewise.
2664 (PBOOL_RANK): Likewise.
2665 (USER_RANK): Likewise.
2666 (ELLIPSIS_RANK): Likewise.
2667 (BAD_RANK): Likewise.
2668 (ICS_RANK): Likewise.
2669 (ICS_STD_RANK): Likewise.
2670 (ICS_USER_FLAG): Likewise.
2671 (ICS_ELLIPSIS_FLAG): Likewise.
2672 (ICS_THIS_FLAG): Likewise.
2673 (ICS_BAD_FLAG): Likewise.
2674 (NEED_TEMPORARY_P): Likewise.
2675 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
2676 (USER_CONV_CAND): Likewise.
2677 (USER_CONV_FN): Likewise.
2678 (conversion_obstack_alloc): New function.
2679 (alloc_conversion): Likewise.
2680 (validate_conversion_obstack): Likewise.
2681 (alloc_conversions): Likewise.
2682 (build_conv): Adjust to deal with new conversion data structures.
2683 (build_identity_conv): New function.
2684 (build_ambiguous_conv): Likewise.
2685 (standard_conversion): Adjust to deal with new conversion data
2686 structures.
2687 (convert_class_to_reference): Likewise.
2688 (direct_reference_binding): Likewise.
2689 (reference_binding): Likewise.
2690 (implicit_conversion): Likewise.
2691 (add_candidate): Likewise.
2692 (add_function_candidate): Likewise.
2693 (add_conv_candidate): Likewise.
2694 (build_builtin_candidate): Likewise.
2695 (print_z_candidate): Likewise.
2696 (merge_conversion_sequences): Likewise.
2697 (build_user_type_conversion_1): Likewise.
2698 (build_user_type_conversion): Likewise.
2699 (build_new_function_call): Likewise.
2700 (build_object_call): Likewise.
2701 (conditional_conversion): Likewise.
2702 (build_conditional_expr): Likewise.
2703 (build_new_op): Likewise.
2704 (build_op_delete_call): Likewise.
2705 (convert_like_real): Likewise.
2706 (build_over_call): Likewise.
2707 (build_new_method_call): Likewise.
2708 (is_subseq): Likewise.
2709 (maybe_handle_implicit_object): Likewise.
2710 (maybe_handle_ref_bind): Likewise.
2711 (compare_ics): Likewise.
2712 (source_type): Likewise.
2713 (add_warning): Likewise.
2714 (joust): Likewise.
2715 (can_convert_arg): Likewise.
2716 (can_convert_arg_bad): Likewise.
2717 (perform_implicit_conversion): Likewise.
2718 (perform_direct_initialization_if_possible): Likewise.
2719 (initialize_reference): Likewise.
2720 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
2721 * cp-tree.def (WRAPPER): Likewise.
2722 (IDENTITY_CONV): Remove.
2723 (LVALUE_CONV): Likewise.
2724 (QUAL_CONV): Likewise.
2725 (STD_CONV): Likewise.
2726 (PTR_CONV): Likewise.
2727 (PMEM_CONV): Likewise.
2728 (BASE_CONV): Likewise.
2729 (REF_BIND): Likewise.
2730 (USER_CONV): Likewise.
2731 (AMBIG_CONV): Likewise.
2732 (RVALUE_CONV): Likewise.
2733 * cp-tree.h (tree_wrapper): Remove.
2734 (WRAPPER_ZC): Remove.
2735 (lang_tree_node): Remove wrapper.
2736 (LOOKUP_SPECULATIVELY): Remove.
2737 (build_op_delete_call): Adjust prototype.
2738 (validate_conversion_obstack): Declare.
2739 (build_zc_wrapper): Remove.
2740 * cvt.c (convert_to_reference): Remove dead code.
2741 (ocp_convert): Likewise.
2742 * decl.c (redeclaration_error_message): Correct handling of
2743 templates.
2744 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
2745 (cp_tree_node_structure): Remove WRAPPER case.
2746 * decl2.c (finish_file): Call validate_conversion_obstack.
2747 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
2748 (build_op_delete_call): Likewise.
2749 (build_x_delete): Likewise.
2750 (build_delete): Adjust call to build_op_delete_call.
2751 * pt.c (tsubst_friend_declaration): Adjust code to determine
2752 whether or not a friend template is a definition.
2753 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
2754 * tree.c (build_zc_wrapper): Remove.
f75fbaf7 2755
21d13d83
ZW
27562004-02-12 Zack Weinberg <zack@codesourcery.com>
2757
2758 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
2759 * cp-tree.h: Don't declare cxx_builtin_type_decls.
2760 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
2761 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
2762
3d2dbfbb
MM
27632004-02-10 Mark Mitchell <mark@codesourcery.com>
2764
2765 * typeck.c (lookup_destructor): Fix typo in error message.
2766
77077b39
KH
27672004-02-09 Kazu Hirata <kazu@cs.umass.edu>
2768
2769 * call.c, parser.c, tree.c: Fix comment typos.
2770
a6f78652
ZW
27712004-02-07 Zack Weinberg <zack@codesourcery.com>
2772
2773 Bug 13856
2774 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
2775 * decl.c (duplicate_decls, start_function): Likewise.
2776
27772004-02-07 Zack Weinberg <zack@codesourcery.com>
2778
2779 * name-lookup.c (pushdecl): Issue shadow warnings directly.
2780 * parser.c (free_parser_stacks): Delete.
2781
0ea5865c
KH
27822004-02-07 Kazu Hirata <kazu@cs.umass.edu>
2783
2784 * rtti.c: Update copyright.
2785
94632047 27862004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2500bbb6
GB
2787
2788 PR c++/14033
2789 * decl.c (require_complete_types_for_parms): Do not insert
2790 error_mark_node in the parameter list.
2791
94632047 27922004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6c0cc713
GB
2793
2794 PR c++/14028
2795 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
2796 error when terminator can not be found.
2797
02ba6b22
KC
27982004-02-05 Kelley Cook <kcook@gcc.gnu.org>
2799
2800 Make-lang.in (po-generated): Delete.
2801
136e64db
KH
28022004-02-05 Kazu Hirata <kazu@cs.umass.edu>
2803
2804 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
2805 targetm.calls.promote_prototypes.
2806
839ee4bc
RO
28072004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2808
2809 PR middle-end/13750
2810 Revert:
2811 2004-01-15 Geoffrey Keating <geoffk@apple.com>
2812 PR pch/13361
2813 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2814 (handle_pragma_implementation): Likewise.
2815
fca00ffb
MM
28162004-02-05 Mark Mitchell <mark@codesourcery.com>
2817
2818 PR c++/13714
2819 * typeck.c (lookup_destructor): Tweak error message.
2820
6039a93d
JH
28212004-02-05 Jan Hubicka <jh@suse.cz>
2822
2823 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
2824 functions.
2825
94632047 28262004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2097b5f2
GB
2827
2828 PR c++/14008
a6f78652 2829 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
2097b5f2
GB
2830 code, only emits the diagnostic now. Added lookup of the identifier
2831 and support for qualified ids.
2832 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
2833 Parse an (invalid) type name as id-expression within a declarator.
2834 (cp_parser_simple_declaration): Use it.
2835 (cp_parser_member_declaration): Likewise.
2836 (cp_parser_make_typename_type): New function. Handle errors through
2837 cp_parser_diagnose_invalid_typename.
2838 (cp_parser_elaborated_type_specifier): Use it.
2839
f583e452
MM
28402004-02-04 Mark Mitchell <mark@codesourcery.com>
2841
2842 PR c++/13932
2843 * call.c (convert_like_real): Use "converting" rather than
2844 "argument" as the descriptive keyword to
2845 dubious_conversion_warnings.
2846 * typeck.c (convert_for_assignment): Do not call
2847 dubious_conversion_warnings.
2848
b1e5b86c
GB
28492004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2850
2851 PR c++/13086
2852 * init.c (build_delete): Emit a more informative error message in
2853 case of an incomplete type, and on the correct source line.
2854
e146f815
KH
28552004-02-04 Kazu Hirata <kazu@cs.umass.edu>
2856
2857 * error.c, search.c: Update copyright.
2858
6f3d0d2f
MM
28592004-02-04 Mark Mitchell <mark@codesourcery.com>
2860
2861 PR c++/9941
2862 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
2863 linkage for the typeinfo name string.
2864
9baa27a9
MM
28652004-02-04 Mark Mitchell <mark@codesourcery.com>
2866
2867 PR c++/13969
2868 * cp-tree.h (fold_non_dependent_expr): New function.
2869 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
2870 (cp_parser_template_argument): Use fold_non_dependent_expr.
2871 (cp_parser_direct_declarator): Likewise.
2872 * pt.c (fold_non_dependent_expr): New function.
2873 (convert_nontype_argument): Use it.
2874 (tsubst_qualified_id): Simplify.
2875 (tsubst_copy_and_build): Likewise.
2876
dd292d0a
MM
28772004-02-04 Mark Mitchell <mark@codesourcery.com>
2878
2879 * decl.c (cxx_push_function_context): Do not set
2880 current_function_is_thunk.
2881 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
2882 actual function.
2883
94632047 28842004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
baa49730 2885
18d0ecb6 2886 PR c++/13997
baa49730
GB
2887 * pt.c (more_specialized_class): Increase processing_template_decl
2888 while partial ordering.
2889
18f5be99
MM
28902004-02-03 Mark Mitchell <mark@codesourcery.com>
2891
2892 PR c++/13925
2893 * decl.c (start_function): Do not call pushdecl for any
2894 instantiation or specialization of a primary template.
2895
3c398f34
MM
28962004-02-03 Mark Mitchell <mark@codesourcery.com>
2897
4bfb8bba
MM
2898 PR c++/13950
2899 * parser.c (cp_parser_class_name): Robustify.
2900
2901 PR c++/13970
2902 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
2903
3c398f34
MM
2904 PR c++/14002
2905 * semantics.c (finish_id_expression): Do not return an
2906 IDENTIFIER_NODE when lookup finds a PARM_DECL.
2907
5a98fa7b
MM
29082004-02-03 Mark Mitchell <mark@codesourcery.com>
2909
2910 PR c++/13978
2911 * pt.c (build_non_dependent_expr): Do not build
2912 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
2913
2914 PR c++/13968
2915 * semantics.c (finish_id_expression): Do not return an
2916 IDENTIFIER_NODE when lookup finds a VAR_DECL.
2917
2918 PR c++/13975
2919 * parser.c (cp_parser_simple_declaration): When skipping to the
2920 end of the statement swallow the terminating semicolon.
2921
e9525111
MM
29222004-02-02 Mark Mitchell <mark@codesourcery.com>
2923
2924 PR c++/13113
2925 * init.c (build_offset_ref): Improve error recovery for invalid
2926 uses of non-static member functions.
2927
2928 PR c++/13854
2929 * cp-tree.h (cp_build_type_attribute_variant): New function.
2930 * class.c (build_clone): Use cp_build_type_attribute_variant.
2931 * decl.c (duplicate_decls): Likewise.
2932 * pt.c (copy_default_args_to_explicit_spec): Likewise.
2933 (tsubst_function_type): Likewise.
2934 * tree.c (build_exception_variant): Check attributes before
2935 concluding that two types are the same.
2936 (cp_build_type-attribute_variant): New method.
2937 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
2938
2939 PR c++/13907
2940 * call.c (convert_class_to_reference): Keep better track of
2941 pedantically invalid user-defined conversions.
2942
84b683c1
GB
29432004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2944
2945 PR c++/13957
2946 * pt.c (tsubst_qualified_id): Improved error message when a type
2947 is expected but not found.
2948
852dcbdd
KH
29492004-01-31 Kazu Hirata <kazu@cs.umass.edu>
2950
2951 * class.c: Fix comment typos.
2952 * decl.c: Likewise.
2953 * error.c: Likewise.
2954 * parser.c: Likewise.
2955 * pt.c: Likewise.
2956 * search.c: Likewise.
2957 * typeck.c: Likewise.
2958
59445d74
RH
29592004-01-30 Richard Henderson <rth@redhat.com>
2960
a6f78652
ZW
2961 PR c++/13693
2962 * method.c (use_thunk): Don't force_target_expr for void thunks.
2963 * tree.c (build_target_expr_with_type): Assert non-void type.
2964 (force_target_expr): Likewise.
59445d74 2965
98ce043b
MM
29662004-01-30 Michael Matz <matz@suse.de>
2967
2968 * parser.c (cp_parser_labeled_statement): Accept case ranges.
2969
a9f46cbb
GB
29702004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2971
2972 DR206
2973 PR c++/13813
2974 * decl.c (grokdeclarator): Check immediatly type completeness for
2975 non-dependent types.
2976
5840af0f
GB
29772004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2978
2979 PR c++/13683
2980 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
2981 a sizeof expression.block
2982
4a5e0ed9
MM
29832004-01-29 Mark Mitchell <mark@codesourcery.com>
2984
2985 PR c++/13883
2986 * mangle.c (write_encoding): Correct encoding of member template
2987 constructors.
2988
f4abade9
GB
29892004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2990
a6f78652 2991 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
f4abade9
GB
2992 template name as it was `<::' (digraph typo).
2993 (cp_parser_nth_token_starts_template_argument_list_p): New function.
2994 (cp_parser_id_expression): Use it.
2995 (cp_parser_nested_name_specifier_opt): Likewise.
2996 (cp_parser_template_name): Likewise.
2997 (cp_parser_class_name): Likewise.
2998 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
2999
a7324e75
MM
30002004-01-28 Mark Mitchell <mark@codesourcery.com>
3001
b1a95e0b
MM
3002 PR c++/13791
3003 * typeck.c (merge_types): Do not merge attributes into
3004 TYPENAME_TYPEs.
3005
a7324e75
MM
3006 PR c++/13736
3007 * parser.c (cp_parser_direct_declarator): Do not prevent
3008 backtracking inside a parenthesized declarator.
3009 (cp_parser_parameter_declaration): Fix typo in comment.
3010
de81ffd4
JH
30112004-01-28 Jan Hubicka <jh@suse.cz>
3012
3013 * semantics.c (expand_body) Do emit_associated_thunks before
3014 expansion.
3015
6097b0c3
DP
30162004-01-27 Devang Patel <dpatel@apple.com>
3017
3018 * name-lookup.c: Include "debug.h"
3019 (do_namespace_alias): Invoke debug_hooks to emit debug info
3020 for namespace alias.
a6f78652 3021 (do_local_using_decl): Invoke debug_hooks to emit debug info
6097b0c3
DP
3022 for using decl.
3023 (do_class_using_decl): Same.
3024 (do_toplevel_using_decl): Same.
3025 (do_using_directive): Same.
3026 (cp_emit_debug_info_for_using): New function.
3027 * Make-lang.in (cp/parser.o): Depend on debug.h
3028 (cp/name-lookup.o): Same.
3029
1c62e7b2
KG
30302004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3031
3032 * cp-tree.h (language_function, lang_type_header): Use
3033 BOOL_BITFIELD.
3034 * name-lookup.h (cp_binding_level): Likewise.
3035
c353b8e3
MM
30362004-01-26 Mark Mitchell <mark@codesourcery.com>
3037
6f69173e
MM
3038 PR c++/13663
3039 * semantics.c (finish_for_expr): Check for unresolved overloaded
3040 functions.
3041
c353b8e3
MM
3042 * class.c (add_method): Just check processing_template_decl to
3043 determine whether or not we are within a template.
3044 * decl2.c (maybe_retrofit_in_chrg): Likewise.
3045 * init.c (decl_constant_value): Check the type of the declaration,
3046 not TREE_READONLY.
3047 * name-lookup.c (maybe_push_to_top_level): Rename to ...
3048 (push_to_top_level): ... this.
3049 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
3050 * pt.c (push_template_decl_real): Reorder condition for speed.
3051 (convert_template_argument): Use dependency-checking functions in
3052 place of uses_template_parms.
3053 (lookup_template_class): Avoid calling uses_template_parms more
3054 than once.
3055 (uses_template_parms): Reimplement, using dependency-checking
3056 functions.
3057 (instantiate_class_template): Use push_to_top_level, not
3058 maybe_push_to_top_level.
3059 (type_unification_real): Simplify.
3060 (type_dependent_expression_p): Handle OFFSET_REFs and
3061 TEMPLATE_DECLs.
3062 (any_dependent_template_arguments_p): Handle multiple levels of
3063 template argument.
3064 * semantics.c (expand_or_defer_fn): Do not check
3065 uses_template_parms for template instantiations.
3066 * typeck.c (comptypes): Avoid calling cp_type_quals.
3067
b7c707d1
MM
30682004-01-25 Mark Mitchell <mark@codesourcery.com>
3069
3070 PR c++/13833
3071 * call.c (build_over_call): Do not convert arguments when
3072 processing a template.
3073 * pt.c (build_non_dependent_expr): Do not build a
3074 NON_DEPENDENT_EXPR for arithmetic constants.
3075
a3a503a5
GB
30762004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3077
3078 PR c++/13810
a6f78652 3079 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
a3a503a5
GB
3080 returns a TYPE_DECL. no further lookup is required.
3081 * semantics.c (check_template_template_default_arg): A TYPE_DECL
3082 is invalid. Rework to give better diagnostics.
3083
ad2768d0 30842004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2620d095
KL
3085
3086 PR c++/13797
3087 * pt.c (instantiate_class_template): Add an error_mark_node
3088 check.
3089 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
3090
279883ed
AP
30912004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
3092
3093 PR c++/13701
3094 * decl.c (finish_function): Move the call to
3095 finish_fname_decls below the call to
3096 finish_eh_spec_block.
3097
3c2426b9
KH
30982004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3099
3100 * optimize.c, typeck2.c: Update copyright.
3101
521cc508
KH
31022004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3103
3104 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
3105 init.c, mangle.c, typeck.c: Update copyright.
3106
4543ee47
ZD
31072004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
3108
3109 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
3110
a541f69d
KC
31112004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3112
3113 * Make-lang.in: Replace $(docdir) with doc.
3114 (c++.info, c++.srcinfo): Dummy entry.
3115 (c++.man, c++.srcman): New rules.
3116 (c++.install-man): Revamp rule.
3117
e165d61b
KC
31182004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3119
a6f78652 3120 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
e165d61b
KC
3121 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
3122 immediate $(shell) instead of deferred backquote.
3123
9f880ef9
MM
31242004-01-19 Mark Mitchell <mark@codesourcery.com>
3125
be799b1e
MM
3126 PR c++/13651
3127 * parser.c (cp_parser_postfix_expression): When encountering
3128 incomplete type on left-hand side of "->" or ".", treat the entire
3129 expression as erroneous.
3130
9f880ef9
MM
3131 PR c++/13592
3132 * call.c (build_field_call): Remove.
3133 (n_build_method_call): Likewise.
3134 (build_method_call): Likewise.
3135 (build_new_method_call): Do not call build_field_call.
3136 * class.c (n_build_method_call): Remove.
3137 (print_class_statistics): Do not print it.
3138 * cp-tree.h (build_method_call): Remove declaration.
3139 (finish_object_call_expr): Likewise.
3140 (build_new_1): Do not use build_method_call.
3141 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
3142 when the function appearing on the right-hand-side of "." or "->"
3143 is not actually a function.
3144 * pt.c (tsubst_copy_and_build): Likewise.
3145 * semantics.c (finish_object_call_expr): Remove.
3146
b830b74c
MM
31472004-01-18 Mark Mitchell <mark@codesourcery.com>
3148
0f18efe3 3149 PR c++/13710
b830b74c
MM
3150 * pt.c (tsubst): Use finish_typeof.
3151
0fed9ec7 31522004-01-18 Jason Merrill <jason@redhat.com>
aff5c451
JM
3153
3154 PR c++/11725
3155 * except.c (build_throw): In a template, set
3156 current_function_returns_abnormally.
3157
4bfaff4d 31582004-01-17 Fred Fish <fnf@intrinsity.com>
6f27961a
AP
3159
3160 PR c++/11895
3161 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
3162 except don't call array_type_nelts() with a VECTOR_TYPE.
3163
965514bd
JH
31642004-01-16 Jan Hubicka <jh@suse.cz>
3165
3166 * mangle.c (write_mangled_name): Remove inline modifier.
3167
ab8ffc79
MM
31682004-01-16 Mark Mitchell <mark@codesourcery.com>
3169
a8e6c82a
MM
3170 PR c++/13574
3171 * decl.c (compute_array_index_type): Fix grammar in comment.
3172 * init.c (build_zero_init): Handle zero-sized arrays correctly.
3173
144e414d
MM
3174 PR c++/13178
3175 * call.c (name_as_c_string): Print conversion operator names
3176 correctly.
3177
ab8ffc79 3178 PR c++/13478
1b6bfcd2
MM
3179 * call.c (initialize_reference): Pass -1 for inner parameter to
3180 convert_like_real.
ab8ffc79 3181
1ed53ef3
GB
31822004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3183
3184 PR c++/13407
3185 * parser.c (cp_parser_base_specifier): Check for an invalid
3186 keyword `typename' and emit an user-friendly error message.
3187
a6dd4094
GK
31882004-01-15 Geoffrey Keating <geoffk@apple.com>
3189
3190 PR pch/13361
3191 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3192 (handle_pragma_implementation): Likewise.
3193
21b34b9c
GB
31942004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3195
3196 PR c++/9259
3197 * typeck.c (build_class_member_access_expr): Allow to access members
3198 of the currently open class.
3199 (finish_class_member_access_expr): Likewise.
3200
ed5f054f
AO
32012004-01-15 Alexandre Oliva <aoliva@redhat.com>
3202
3203 PR c++/13659
3204 * name-lookup.c (validate_nonmember_using_decl): Take scope and
3205 name by value, instead of computing them.
3206 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
3207 arguments. Pass them to validate_nonmember_using_decl.
3208 * name-lookup.h (do_local_using_decl): Adjust.
3209 (do_toplevel_using_decl): Likewise.
3210 * parser.c (cp_parser_using_declaration): Likewise.
3211 * pt.c (tsubst_expr): Likewise.
3212
dc55c941
AO
32132004-01-15 Alexandre Oliva <aoliva@redhat.com>
3214
3215 PR c++/13594
3216 PR c++/13658
3217 * name-lookup.c (qualified_lookup_using_namespace): Search
3218 strongly-associated namespaces first, and only then try other
3219 namespaces.
3220
03787dfd
KC
32212004-01-15 Kelley Cook <kcook@gcc.gnu.org>
3222
3223 * Make-lang.in (c++.srcextra): Dummy entry.
3224
0d956474
GB
32252004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3226
3227 PR c++/8856
a6f78652 3228 * parser.c (cp_parser_template_name): Don't try to parse a
0d956474
GB
3229 conversion-function-id, as it cannot be a template-name.
3230 (cp_parser_simple_type_specifier): Check for invalid template-ids
3231 even after a built-in type.
3232
7ec4deda
JH
32332004-01-14 Jan Hubicka <jh@suse.cz>
3234
3235 PR c++/12850
3236 * pt.c (instantiate_decl): Do not increase function_depth.
3237
e0fed25b
DS
32382004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
3239
3240 PR c++/9021
bd0a5aab 3241 PR c++/11005
e0fed25b
DS
3242 * parser.c (cp_parser_elaborated_type_specifier): Warn about
3243 attributes and discard.
3244 * decl.c (xref_tag): Don't overwite existing attributes with
3245 NULL_TREE.
3246
fd6e3cce
GB
32472004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3248
3249 PR c++/12335
3250 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
3251 is no destructor while looking up a BIT_NOT_EXPR.
3252
f18056ff
ILT
32532004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
3254
3255 * cxxfilt.c: Remove unused file.
3256
d34cb6a1
JH
32572004-01-14 Jan Hubicka <jh@suse.cz>
3258
3259 Partial fix to PR c++/12850
3260 * decl2.c (mark_used): Do not proactively instantiate templates
3261 when compiling in unit-at-a-time or not optimizing.
3262 * optimize.c (maybe_clone_body): Do not increase function depth.
3263
cdf4ac6f
GB
32642004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3265
3266 PR c++/13474
3267 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
3268
94632047 32692004-01-12 Steven Bosscher <stevenb@suse.de>
fdd09134
SB
3270
3271 PR c++/13558
3272 * parser.c (cp_parser_member_declaration): Any non-type is also
3273 not a class or a function.
3274
7b25f6e5
JM
32752004-01-12 Jason Merrill <jason@redhat.com>
3276
3277 PR c++/12815
3278 * class.c (build_base_path): Do not mark vtable references as
3279 TREE_CONSTANT.
3280 (build_vtbl_ref_1): Likewise.
3281
25ebb82a
RH
32822004-01-12 Richard Henderson <rth@redhat.com>
3283
3284 PR opt/10776
3285 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
3286 (store_init_value): Use it.
3287 * decl.c (check_initializer): Expect full initialization code
3288 from store_init_value.
3289 * init.c (expand_aggr_init_1): Likewise.
3290 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
3291
4f0a2b81
MM
32922004-01-12 Mark Mitchell <mark@codesourcery.com>
3293
3294 * class.c (layout_class_type): For non-POD class types, also copy
3295 the DECL_SIZE and DECL_MODE of fields to the base class type.
3296
66e0c440
KL
32972004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3298
3299 PR c++/13289
3300 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
3301 calling regenerate_decl_from_template.
3302
0426c4ca
SB
33032004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
3304
3305 PR c++/4100
3306 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
3307 decl-specifier occurring along with a class definition.
3308
543ca912
ILT
33092004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
3310
3311 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
3312 clauses to comments describing declares_class_or_enum.
3313 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
3314 false.
3315
c1e39976
JH
33162004-01-12 Jan Hubicka <jh@suse.cz>
3317
3318 * pt.c (for_each_template_parm): Do not check for duplicates.
3319 (for_each_template_parm): Use walk_tree duplicate checking code.
3320
e90c7b84
ILT
33212004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
3322
3323 PR c++/3478
3324 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
3325 is error_mark_node, don't add any more decl_specs.
3326 (cp_parser_init_declarator): After committing to a declaration, if
3327 the decl_specifiers start with error_mark_node, issue an error and
3328 change the type to "int".
3329
c90501d0
NN
33302004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
3331
3332 PR bootstrap/7817
3333 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
3334
cfb91b67
GB
33352004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3336
3337 DR 337
3338 PR c++/9256
a6f78652 3339 * pt.c (tsubst): Substitution must fail if we are attempting to
cfb91b67
GB
3340 create an array with element type that is an abstract class type.
3341 * decl.c (cp_finish_decl): Strip pointers and array types recursively
3342 before calling abstract_virtuals_error.
3343
c404ab02
AO
33442004-01-09 Alexandre Oliva <aoliva@redhat.com>
3345
3346 * name-lookup.c (qualified_lookup_using_namespace): Consider
3347 strong using directives even if we've already found a binding.
3348
0fab64a3
MM
33492004-01-09 Mark Mitchell <mark@codesourcery.com>
3350
3351 * cp-tree.h (cxx_expand_expr): Change prototype.
3352 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
3353
3d5ddced
GB
33542004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3355
3356 PR c++/12573
3357 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
3358 looking into them recursively. They can be there because of the
3359 new __offsetof__ extension.
3360
7ce27103
ZW
33612004-01-07 Zack Weinberg <zack@codesourcery.com>
3362
3363 * parser.c (cp_parser_save_member_function_body): Mark the
3364 definition static.
3365
88081599
MM
33662004-01-05 Mark Mitchell <mark@codesourcery.com>
3367
221bfb03
MM
3368 PR c++/13057
3369 * class.c (build_clone): Copy type attributes from the original
3370 function to the clone.
7ce27103 3371
856363c8 3372 PR c++/12815
962c0823
MM
3373 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
3374 references as constant.
3375
216bb6e1
MM
3376 PR c++/12132
3377 * parser.c (cp_parser_explicit_instantiation): Improve error
3378 recovery.
3379 (cp_parser_require): Improve indication of the error location.
3380
88081599
MM
3381 PR c++/13451
3382 * parser.c (cp_parser_class_head): Reorder logic to check for
3383 invalid qualification.
3384
543ebd4a
MM
33852004-01-04 Mark Mitchell <mark@codesourcery.com>
3386
3387 PR c++/13157
3388 * name-lookup.c (lookup_using_namespace): Remove spacesp
3389 parameter.
3390 (unqualified_namespace_lookup): Likewise.
3391 (lookup_qualified_name): Adjust accordingly.
3392 (lookup_name_real): Likewise.
3393 (lookup_arg_dependent): Do not eliminate the namespace of the
3394 functions found by unqualified name lookup unless that is the
3395 current namespace.
3396
572c2b17
AP
33972004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
3398
3399 * semantics.c (push_deferring_access_checks): Fix format.
3400 (resume_deferring_access_checks): Likewise.
3401 (stop_deferring_access_checks): Likewise.
3402 (pop_deferring_access_checks): Likewise.
3403 (get_deferred_access_checks): Likewise.
3404 (pop_to_parent_deferring_access_checks): Likewise.
3405 (perform_deferred_access_checks): Likewise.
3406 (perform_or_defer_access_check): Likewise.
3407
88401f73
RH
34082004-01-04 Richard Henderson <rth@redhat.com>
3409
3410 * call.c (build_over_call): Don't create a save_expr of an
3411 aggregate, but rather its address.
3412
4f8163b1
MM
34132004-01-04 Mark Mitchell <mark@codesourcery.com>
3414
955d0234
MM
3415 PR c++/13529
3416 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
3417 an offsetof expression.
3418
643aee72
MM
3419 * parser.c (cp_parser_parameter_declaration): Fix comment.
3420
4f8163b1
MM
3421 PR c++/12226
3422 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
3423 (reference_binding): Set it when appropriate.
3424 (build_temp): New function, split out from ...
3425 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
3426 (initialize_reference): Likewise.
3427
3428 PR c++/13536
3429 * parser.c (cp_parser): Add in_type_id_in_expr_p.
3430 (cp_parser_new): Initialize it.
3431 (cp_parser_postfix_expression): Set it.
3432 (cp_parser_sizeof_operand): Likewise.
3433 (cp_parser_parameteR_declaration): Do not commit early to tenative
3434 parsers when in_type_id_in_expr_p is set.
3435
5b4acce1
KL
34362004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3437
3438 PR c++/13094
3439 * parser.c (cp_parser_template_argument): Don't call
3440 make_unbound_class_template directly.
3441 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
3442 UNBOUND_CLASS_TEMPLATE tree node.
3443
8748dc22
RS
34442004-01-02 Richard Sandiford <rsandifo@redhat.com>
3445
3446 PR target/12729
3447 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
3448
b0bc6e8e
KL
34492004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3450
3451 PR c++/13520
3452 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
3453 (DECL_FUNCTION_TEMPLATE_P): Use it.
3454 (DECL_CLASS_TEMPLATE_P): Likewise.
3455 * parser.c (cp_parser_lookup_name): Add is_template parameter.
3456 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
3457 (cp_parser_template_name): Likewise.
3458 (cp_parser_elaborated_type_specifier): Likewise.
3459 (cp_parser_namespace_name): Likewise.
3460 (cp_parser_class_name): Likewise.
3461 (cp_parser_lookup_name_simple): Likewise.
58496de1 3462
837b8417 3463See ChangeLog.3 for earlier changes.
This page took 0.666454 seconds and 5 git commands to generate.