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