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