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