1 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
4 * semantics.c (add_decl_expr): If the decl has a size which
5 has side effects then the decl expression needs a cleanup point.
7 2004-10-10 Mark Mitchell <mark@codesourcery.com>
10 * decl.c (grokdeclarator): Robustify error-recovery on invalid
13 2004-10-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
15 Convert diagnostics to use quoting flag q 7/n
16 * typeck.c (composite_pointer_type_r, composite_pointer_type,
17 cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr,
18 string_conv_p, build_class_member_access_expr,
19 build_class_member_access_expr, lookup_destructor,
20 finish_class_member_access_expr, build_indirect_ref,
21 get_member_function_from_ptrfunc, build_function_call,
22 convert_arguments, build_binary_op, pointer_diff, build_unary_op,
23 check_for_casting_away_constness, build_static_cast,
24 build_reinterpret_cast, build_const_cast, build_c_cast,
25 build_modify_expr, get_delta_difference, build_ptrmemfunc,
26 dubious_conversion_warnings, convert_for_assignment,
27 convert_for_initialization,
28 maybe_warn_about_returning_address_of_local, check_return_expr):
31 * typeck2.c (error_not_base_type, readonly_error,
32 abstract_virtuals_error, cxx_incomplete_type_diagnostic,
33 store_init_value, digest_init, build_x_arrow,
34 build_m_component_ref, require_complete_eh_spec_types): Likewise.
36 * tree.c (cp_build_qualified_type_real,
37 handle_java_interface_attribute, handle_init_priority_attribute):
40 * semantics.c (finish_asm_stmt, finish_non_static_data_member,
41 finish_pseudo_destructor_expr,
42 check_template_template_default_arg, begin_class_definition,
43 finish_base_specifier, qualified_name_lookup_error,
44 finish_id_expression, finish_typeof): Likewise.
46 * search.c (lookup_base, check_final_overrider,
47 look_for_overrides_r): Likewise.
49 * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise.
51 2004-10-09 Mark Mitchell <mark@codesourcery.com>
54 * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a
58 * init.c (build_new): Correct comments.
59 * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in
63 * parser.c (cp_parser_postfix_dot_deref_expression): If the
64 pseduo-destructor-name production does not work, fall back to the
68 * tree.c (cp_tree_equal): Handle a BASELINK.
71 * cp-tree.h (check_var_type): New function.
72 * decl.c (check_var_type): New function, split out from ...
73 (grokdeclarator): ... here.
74 * pt.c (tsubst_decl): Use check_var_type.
77 * decl.c (grokdeclarator): Disallow declarations of operators as
80 2004-10-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
83 * error.c (dump_expr): Add missing case for RDIV_EXPR.
85 2004-10-08 Kazu Hirata <kazu@cs.umass.edu>
87 * pt.c, search.c: Fix comment typos.
89 2004-10-08 Nathan Sidwell <nathan@codesourcery.com>
91 * cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp,
93 (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New.
94 * class.c (struct find_final_overrider_data): Remove most_derived,
95 vpath_list and vpath fields. Add path field.
96 (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust.
97 (dfs_find_final_overrider): Rename to ...
98 (dfs_find_final_overrider_pre): ... here. Adjust.
99 (dfs_find_final_overrider_post): Adjust.
100 (dfs_find_final_overrider_q): Fold into
101 dfs_find_final_overrider_pre.
102 (find_final_overrider): Adjust dfs searching.
103 (dfs_modify_vtables): Don't mark binfo here.
104 (modify_all_vtables): Use dfs_walk_once.
105 (build_vtt_inits): Likwise. Use dfs_walk_all.
106 (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here.
107 Return dfs_skip_bases as appropriate.
108 (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate.
109 * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as
110 appropriate. Don't mark binfo here.
111 (initialize_vtbl_ptrs): Use dfs_walk_once.
112 * search.c (struct vbase_info): Remove unused struct.
113 (access_in_type): Use dfs_walk_once.
114 (dfs_access_in_type): Don't mark binfo here.
115 (dfs_accessible_queue_p, dfs_accessible_p) Remove.
117 (accessible_r): ... here. New. Specialize dfs_walk_once.
118 (accessible_p): Use accessible_r.
119 (lookup_field_queue_p): Remove. Fold into ...
120 (lookup_field_r): ... here. Adjust.
121 (lookup_member): Use dfs_walk_all.
122 (dfs_walk_real, dfs_walk): Replace with ...
123 (dfs_walk_all, dfs_walk_once): ... these.
124 (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once.
125 (dfs_unmark, unmarkedp, markedp): Remove.
126 (dfs_get_pure_virtuals): Don't mark binfo here.
127 (get_pure_virtuals): Use dfs_walk_once.
128 (dfs_debug_unmarked_p): Remove. Fold into ...
129 (dfs_debug_mark): ... here.
130 (note_debug_info_needed): Use dfs_walk_all.
132 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
134 * pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the
135 CLEANUP_POINT_EXPR to get the asm expression.
137 2004-10-07 Mark Mitchell <mark@codesourcery.com>
139 * cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag.
140 (DECL_MEMBER_TEMPLATE_P): New macro.
141 (is_member_template): Remove.
142 (class_method_index_for_fn): New function.
143 * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P.
144 * class.c (finish_struct_methods): Remove out-of-date comment.
145 * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P.
146 * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and
147 class_method_index_for_fn.
148 * pt.c (is_member_template): Remove.
149 (is_member_template_class): Likewise.
150 (optimize_specialization_lookup_p): New function.
151 (retrieve_specialization): Optimize lookups for members that are
152 not member templates.
153 (register_specialization): Adjust accordingly.
154 (build_template_decl): Add member_template_p parameter. Set
155 DECL_MEMBER_TEMPLATE_P.
156 (process_partial_specialization): Adjust call to
157 retrieve_specialization.
158 (push_template_decl_real): Determine whether the template is a
160 (lookup_template_class): Use retrieve_specialization.
161 (tsubst_decl): Adjust call to retrieve_specialization.
162 (tsubst_exception_specification): New function.
164 (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P.
165 (instantiate_template): Adjust call to retrieve_specialization.
166 (regenerate_decl_from_template): Do not actually generate a new
168 (instantiate_decl): Adjust call to retrieve_specialization.
169 (class_method_index_for_fn): New method.
171 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
173 * parser.c (cp_parser_asm_definition): Look passed the
174 CLEANUP_POINT_EXPR to get the asm expression.
176 2004-10-06 Andrew Pinski <pinskia@physics.uc.edu>
179 * semantics.c (finish_asm_stmt): Asm expressions need cleanup
182 2004-10-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
184 Convert diagnostics to use quoting flag q 6/n
185 * pt.c (finish_member_template_decl, check_specialization_scope,
186 maybe_process_partial_specialization, determine_specialization,
187 check_explicit_specialization, maybe_check_template_type,
188 process_partial_specialization, check_default_tmpl_args,
189 push_template_decl_real, redeclare_class_template,
190 convert_nontype_argument, coerce_template_parms,
191 lookup_template_class, push_tinst_level,
192 instantiate_class_template, tsubst_arg_types,
193 tsubst_function_type, tsubst, tsubst_qualified_id,
194 tsubst_copy_and_build, check_instantiated_args,
195 do_decl_instantiation, do_type_instantiation,
196 invalid_nontype_parm_type_p, check_specialization_namespace,
197 convert_template_argument, determine_specialization,
198 check_template_shadow, tsubst_decl
199 instantiate_pending_templates): Use quoting marks.
201 2004-10-05 Nathan Sidwell <nathan@codesourcery.com>
204 * parser.c (cp_parser_postfix_expression): Inhibit Koenig when
205 unqualified lookup finds a member function.
207 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
209 Convert diagnostics to use quoting flag q 5/n
210 * parser.c (cp_parser_name_lookup_error,
211 cp_parser_diagnose_invalid_type_name,
212 cp_parser_primary_expression, cp_parser_unqualified_id,
213 cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement,
214 cp_parser_jump_statement, cp_parser_simple_declaration,
215 cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id,
216 cp_parser_type_parameter, cp_parser_template_id,
217 cp_parser_template_name, cp_parser_direct_declarator,
218 cp_parser_parameter_declaration_list, cp_parser_class_head,
219 cp_parser_base_specifier, cp_parser_lookup_name,
220 cp_parser_late_parsing_default_args,
221 cp_parser_optional_template_keyword
222 cp_parser_elaborated_type_specifier, cp_parser_check_class_key,
223 cp_parser_check_access_in_redeclaration): Use quoting marks.
225 * name-lookup.c (supplement_binding, pushdecl,
226 check_for_out_of_scope_variable, validate_nonmember_using_decl,
227 do_nonmember_using_decl, lookup_tag, set_decl_namespace,
228 push_namespace, do_namespace_alias, do_using_directive,
229 ambiguous_decl, lookup_namespace_name, add_function): Likewise.
231 * method.c (use_thunk): Likewise.
233 * lex.c (unqualified_name_lookup_error,
234 unqualified_fn_lookup_error): Likewise.
236 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
238 Convert diagnostics to use quoting flag q 4/n
239 * except.c (decl_is_java_type, build_throw,
240 is_admissible_throw_operand, check_handlers_1, check_handlers):
242 * friend.c (add_friend, make_friend_class, do_friend): Likewise.
243 * init.c (sort_mem_initializers, emit_mem_initializers,
244 member_init_ok_or_else, expand_member_init, is_aggr_type,
245 build_offset_ref, build_java_class_ref): Likewise.
247 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
249 Convert diagnostics to use quoting flag q 3/n
250 * decl.c (pop_label, duplicate_decls, redeclaration_error_message,
251 redeclaration_error_message, lookup_label, check_goto,
252 make_typename_type, make_unbound_class_template,
253 fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1,
254 grok_reference_init, layout_var_decl, maybe_commonize_var,
255 check_for_uninitialized_const_var, reshape_init_array,
256 reshape_init, check_initializer, cp_finish_decl,
257 member_function_or_else, bad_specifiers, grokfndecl, grokvardecl,
258 check_static_variable_definition, compute_array_index_type,
259 create_array_type_for_decl, check_special_function_return_type,
260 grokdeclarator, check_default_argument, grokparms,
261 grok_ctor_properties, grok_op_properties,
262 check_elaborated_type_specifier, xref_tag, finish_enum,
263 build_enumerator, check_function_type, start_preparsed_function,
264 store_parm_decls): Use quoting formats.
265 * decl2.c (grok_array_decl, delete_sanity, check_member_template,
266 check_java_method, check_classfn, finish_static_data_member_decl,
267 grokfield, grokbitfield, grok_function_init,
268 build_anon_union_vars, coerce_new_type, coerce_delete_type,
269 check_default_args): Likewise.
270 * parser.c (cp_parser_decl_specifier_seq): Likewise.
272 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
274 Convert diagnostics to use quoting flag q 2/n
275 * class.c (build_base_path, add_method, alter_access,
276 handle_using_decl, check_bases,
277 maybe_warn_about_overly_private_class, find_final_overrider,
278 warn_hidden, finish_struct_anon, add_implicitly_declared_members,
279 check_bitfield_decl, check_field_decls, layout_empty_base,
280 build_base_field, check_methods, layout_virtual_bases,
281 warn_about_ambiguous_bases, layout_class_type, finish_struct_1,
282 resolve_address_of_overloaded_function, instantiate_type,
283 note_name_declared_in_class): Use format flag "q" for quoting.
285 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
287 Convert diagnostics to use quoting flag q 1/n
288 * error.c (locate_error): Ignore quoting flag q.
289 * call.c (build_user_type_conversion_1, build_operator_new_call,
290 build_object_call, op_error, build_conditional_expr,
291 build_new_op, build_op_delete_call, enforce_access,
292 convert_like_real, convert_arg_to_ellipsis, build_x_va_arg,
293 convert_default_arg, build_over_call, build_new_method_call,
294 joust, perform_implicit_conversion, initialize_reference): Use the
297 2004-10-03 Andrew Pinski <pinskia@physics.uc.edu>
300 * typeck.c (build_reinterpret_cast): Return if the inner type
303 2004-10-01 Jan Hubicka <jh@suse.cz>
305 * semantics.c (expand_body): Update call of tree_rest_of_compilation.
307 2004-09-30 Nathan Sidwell <nathan@codesourcery.com>
309 * cp-tree.h (struct lang_decl): Shrink by reordering fields and
310 turning operator_code and fixed_offset into bitfields.
312 2004-09-29 Joseph S. Myers <jsm@polyomino.org.uk>
314 * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
316 2004-09-29 Jason Merrill <jason@redhat.com>
318 PR tree-optimization/17697
319 * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
321 2004-09-28 Jason Merrill <jason@redhat.com>
324 * class.c (build_base_field): Set TYPE_MODE.
326 2004-09-28 Roger Sayle <roger@eyesopen.com>
329 * g++spec.c (lang_specific_driver): Unrecognized libraries, other
330 than -lc and -lm, may require linking against libstc++.
332 2004-09-28 Kazu Hirata <kazu@cs.umass.edu>
334 * tree.c: Fix a comment typo.
336 2004-09-28 Nathan Sidwell <nathan@codesourcery.com>
338 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove.
339 (struct secondary_vptr_vtt_init_data_s): New.
340 (build_vtt_inits): Adjust dfs_walkers.
341 (dfs_build_secondary_vptr_vtt_inits): Caller data is a
342 secondary_vptr_vtt_init_data_s structure. Adjust.
343 (dfs_ctor_vtable_bases_queue_p): Remove.
344 (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify.
346 * pt.c (struct get_template_base_data_s): Remove.
347 (get_template_base_r): Fold into get_template_base.
348 (get_template_base): Walk base binfos directly in inheritance
351 2004-09-27 Mark Mitchell <mark@codesourcery.com>
354 * cp-tree.h (fold_if_not_in_template): New function.
355 * call.c (build_conditional_expr): Use fold_if_not_in_template.
356 (build_cxx_call): Likewise.
357 * cvt.c (convert_to_complex): Likewise.
358 (ocp_convert): Likewise.
360 (convert_force): Likewise.
361 * decl.c (compute_array_index_type): Clear
362 processing_template_decl while folding array bounds.
363 * pt.c (convert_nontype_argument): Clear
364 processing_template_decl while processing non-type argument
366 * tree.c (fold_if_not_in_template): New function.
367 * typeck.c (build_class_member_access_expr): Use
368 fold_if_not_in_template.
369 (build_array_ref): Likewise.
370 (build_binary_op): Likewise. Do not try to optimize computations
371 when processing templates.
372 (cp_pointer_int_sum): Use fold_if_not_in_template.
373 (pointer_diff): Likewise.
374 (build_unary_op): Likewise.
375 (build_reinterpret_cast): Likewise.
376 (get_delta_difference): Likewise.
377 (expand_ptrmemfunc_cst): Likewise.
378 (dubious_conversion_warnings): Likewise.
380 2004-09-27 Matt Austern <austern@apple.com>
382 * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c
383 (cp_lexer_get_preprocessor_token): Set implicit_extern_c for
384 tokens that come from headers that are implicitly extern "C".
385 (struct cp_parser): new one-bit field, implicit_extern_c.
386 (cp_parser_new): Set parser's implicit_extern_c to false.
387 (cp_parser_translation_unit): Pop lang context if we were in a
388 header that was implicitly extern "C".
389 (cp_parser_declaration_seq_opt): Push/pop lang context as
390 required by the token's and parser's implicit_extern_c.
392 2004-09-27 Mark Mitchell <mark@codesourcery.com>
395 * cp-tree.h (shared_member_p): Declare.
396 * search.c (shared_member_p): Give it external linkage.
397 * semantics.c (finish_qualified_id_expr): Use it.
398 (finish_id_expression): Likewise.
401 * semantics.c (finish_id_expression): Do not add "this->" to
402 static member functions.
404 2004-09-27 Nathan Sidwell <nathan@codesourcery.com>
407 * error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
409 * class.c (struct count_depth_data): Remove.
410 (dfs_depth_post, dfs_depth_q): Remove.
411 (find_final_overrider): Use number of vbase classes as depth
414 * cp-tree.h (types_overlap_p): Remove.
415 * search.c (struct overlap_info): Remove.
416 (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove.
418 * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove.
419 (get_template_base_recursive): Remove. Replace with ...
420 (get_template_base_r): ... this.
421 (struct get_template_base_data_s): New.
422 (get_template_base): Use get_template_base_r via dfs_walk. Always
423 return NULL on failure.
424 (unify): Remove error_mark_node check from get_template_base result.
426 2004-09-24 Paolo Bonzini <bonzini@gnu.org>
428 * parser.c (cp_parser_expression_stack): Clarify why it is
429 an array of NUM_PREC_VALUES elements.
430 (cp_parser_binary_expression): Clarify why we do not need to
431 handle stack overflow.
433 2004-09-24 Nathan Sidwell <nathan@codesourcery.com>
436 * search.c (lookup_field_queue_p): Correct check for hidden base.
438 * search.c (bfs_walk): Remove.
439 (lookup_member): Use dfs_walk_real.
440 (dfs_walk_real): Move and adjust documentation from bfs_walk.
442 2004-09-23 Zack Weinberg <zack@codesourcery.com>
444 * decl.c (grokfndecl): If ::main is found not to return int,
445 correct it after issuing a diagnostic.
446 (grokdeclarator): If the incoming type was error_mark_node, do
447 not complain about declaring something with no type.
448 (start_function): Change check for ::main not returning int to
449 an assertion, as grokfndecl now catches this when the user did it.
450 * init.c (perform_member_init, sort_mem_initializers)
451 (emit_mem_initializers): Make most diagnostics be issued on
452 the line of current_function_decl, not whatever the current
454 * parser.c (cp_lexer_peek_token_emit_debug_info): Surround
455 definition and declaration with #ifdef ENABLE_CHECKING.
456 Avoid unnecessary use of fprintf.
457 (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
458 definitions to avoid warnings.
459 (cp_lexer_new_main): Add assertion that first token is not a
461 (cp_lexer_new_from_token_array): Fold into ...
462 (cp_lexer_new_from_tokens): ... here. Add assertion that
463 first token is not a padding token.
464 (cp_lexer_set_source_position_from_token): Move nearer to callers.
465 Remove unused lexer argument.
466 (cp_lexer_peek_token): Just print debugging report (if enabled)
467 and return lexer->next_token.
468 (cp_lexer_skip_purged_tokens): Delete.
469 (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
470 inline, simplify bodies.
471 (cp_lexer_peek_nth_token): Add debugging report a la
473 (cp_lexer_consume_token): Correct commentary. Advance over
474 purged tokens here. Set current source position here, from
475 token to be returned. Avoid unnecessary use of fprintf.
476 (cp_lexer_purge_token): Advance next_token pointer over this and
477 subsequent purged tokens.
478 (cp_parser_error): Adjust source position to that of the
480 (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
481 (cp_parser_string_literal): Remove some excessive cleverness.
482 (cp_parser_enum_specifier): Call start_enum before consuming
484 (cp_parser_member_declaration): Make the "extra semicolon"
485 diagnostic consistently-worded with the other place this is
486 diagnosed. Explicitly set the diagnostic location to the
487 location of the offending semicolon.
488 (cp_parser_enclosed_template_argument_list): Use %</%> quoting
489 in diagnostics. Do not use cp_parser_require. Set location
490 of diagnostics about improper use of '>>' to location of
492 (cp_parser_late_parsing_for_member):
493 Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
494 (cp_parser_late_parsing_default_args): Likewise. Manually
495 move some logic outside the loop.
497 2004-09-23 Andrew Pinski <pinskia@physics.uc.edu>
500 * cvt.c (cp_convert_to_pointer): Return early when the type is
503 2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
507 * decl.c (grokfndecl): Add new argument "attrlist", use it
508 to call cplus_decl_attributes.
509 (start_function): Remove call to cplus_decl_attributes.
510 * cvt.c (ocp_convert): Add support to use type conversion
511 function to vector type.
512 * parser.c (cp_parser_conversion_type_id): Add attributes, if any,
515 2004-09-23 Paolo Bonzini <bonzini@gnu.org>
519 * parser.c (cp_parser_token_tree_map_node,
520 cp_parser_pm_expression, cp_parser_additive_expression,
521 cp_parser_multiplicative_expression, cp_parser_shift_expression,
522 cp_parser_relational_expression, cp_parser_equality_expression,
523 cp_parser_and_expression, cp_parser_exclusive_or_expression,
524 cp_parser_inclusive_or_expression,
525 cp_parser_logical_and_expression,
526 cp_parser_logical_or_expression): Removed.
527 (enum cp_parser_prec, struct cp_parser_token_tree_map_node,
528 binops, binops_by_token): New.
529 (cp_parser_assignment_expression): Use cp_parser_binary_expression.
530 (cp_parser_new): Initialize binops_by_token.
531 (cp_parser_binary_expression): Rewritten.
534 2004-09-23 Kazu Hirata <kazu@cs.umass.edu>
536 * parser.c: Fix a comment typo.
538 2004-09-23 Nathan Sidwell <nathan@codesourcery.com>
541 * decl.c (xref_basetypes): Look through typedefs before checking
544 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
546 * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
547 * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
548 * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
549 (init_rtti_processing): Initialize it to something realistic.
550 (get_tinfo_decl): Adjust pushing the new decl.
552 * cp-tree.h (struct lang_type_class): Remove marked flags, add
553 diamond_shaped and repeated_base flags. Reorder to keep 8-bit blocks.
554 (TYPE_MARKED_P): New.
555 (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New.
556 (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
557 CLEAR_CLASSTYPE_MARKED_N): Remove.
558 (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*,
559 CLEAR_CLASSTYPE_MARKED_*): Remove.
560 * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond
561 shaped and repeated base properties.
562 * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET.
563 * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark,
564 class_hint_flags): Remove.
565 (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and
566 CLASSTYPE_DIAMOND_SHAPED_P.
568 2004-09-21 Ziemowit Laski <zlaski@apple.com>
570 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from
572 (objcp_tsubst_copy_and_build): Reformat function signature.
573 * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise.
574 (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c.
576 2004-09-21 Zack Weinberg <zack@codesourcery.com>
578 * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):
579 Don't handle CPP_PRAGMA tokens specially.
580 (cp_lexer_handle_pragma): Use cp_lexer_consume_token. Don't
581 purge the token; do clear token->value after processing. Add
582 assertion at beginning that token->value is nonzero.
583 (cp_parser_statement, cp_parser_declaration_seq_opt): Handle
584 CPP_PRAGMA as a full statement or declaration in its own right.
586 2004-09-21 Matt Austern <austern@apple.com>
589 * decl.c (grokvardecl): Accept declarations of global variables
590 using anonymous types.
592 2004-09-21 Roger Sayle <roger@eyesopen.com>
595 * tree.c (lvalue_p_1): Disallow MIN_EXPR and MAX_EXPR as lvalues
596 if either operand has side-effects.
597 * typeck.c (rationalize_conditional_expr): Assert that neither
598 operand of MIN_EXPR or MAX_EXPR has side-effects.
599 (build_modify_expr): Add support for MIN_EXPR and MAX_EXPR.
600 Check that the "lhs" is a valid lvalue, i.e. that neither operand
601 of a MIN_EXPR or MAX_EXPR has a side-effect.
603 2004-09-21 Nathan Sidwell <nathan@codesourcery.com>
605 * cp-tree.h (struct lang_type_header): Remove
606 uses_multiple_inheritance field.
607 (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
608 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
609 (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
610 (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
611 (TYPE_CONTAINS_VPTR_P): Likewise.
612 * call.c (add_template_candidate_real): Use
613 CLASSTYPE_VBASECLASSES.
614 (build_special_member_call): Likewise.
615 * class.c (finish_struct_bits): Remove
616 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
618 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
619 (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
621 (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
622 (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
624 * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
625 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
627 (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
628 * decl2.c (maybe_retrofit_in_chrg): Likewise.
629 * init.c (expand_member, push_base_cleanups): Likewise.
630 * pt.c (instantiate_class_template): Remove
631 TYPE_USES_MULTIPLE_INHERITANCE,
632 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
634 * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
636 * typeck2.c (process_init_constructor): Replace some sorrys with
639 2004-09-21 Andreas Tobler <a.tobler@schweiz.ch>
641 * decl.c (reshape_init_array): Initialize max_index_cst to fix
644 2004-09-20 Mark Mitchell <mark@codesourcery.com>
647 * pt.c (tsubst): Fix parentheses to accomodate emacs.
648 (tsubst_baselink): If we get a single function, mark it as used.
650 2004-09-20 Matt Austern <austern@apple.com>
651 Zack Weinberg <zack@codesourcery.com>
653 * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
654 Apply lbasename to input_filename before passing to get_fileinfo.
655 * semantics.c (begin_class_definition): Likewise.
656 * lex.c (handle_pragma_interface): Apply get_fileinfo to the
657 correct filename. Rename variables to be less confusing.
658 (handle_pragma_implementation): Likewise. Disable "appears
659 after file is included" diagnostic.
661 * parser.c (struct cp_token): Add in_system_header fiag.
662 (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
663 (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
664 (CPP_NONE, cp_lexer_read_token): Delete.
665 (struct cp_lexer): Remove first_token, string_tokens,
666 main_lexer_p fields. Clarify comments.
667 (struct cp_token_cache): Now just a pair of pointers.
668 (CP_LEXER_BUFFER_SIZE): New #define.
669 (CPP_PURGED): New fake token type.
670 (cp_lexer_new_from_token_array, cp_lexer_destroy)
671 (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
672 (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
674 (cp_lexer_new_from_tokens): Now a simple wrapper around
675 cp_lexer_new_from_token_array.
676 (cp_lexer_set_source_position_from_token): Also update
678 (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
680 (cp_lexer_token_difference): Dont handle wrapping round.
681 (cp_lexer_new_main): Enable pragma deferral and raw strings,
682 read the entire translation unit through c_lex_with_flags into
683 this lexer's buffer, then turn raw strings back off again.
684 (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
685 (cp_lexer_get_preprocessor_token): No need to handle not being
686 the main lexer. Set token->in_system_header too.
687 (cp_lexer_peek_token): Skip purged tokens. Feed pragma tokens
688 to cp_lexer_handle_pragma. No need to call cp_lexer_read_token.
689 (cp_lexer_peek_nth_token): Likewise.
690 (cp_lexer_purge_token): Mark the token PURGED, don't shift all
691 the other tokens down.
692 (cp_lexer_purge_tokens_after): Likewise.
693 (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
694 about there being no tokens.
695 (cp_lexer_print_token): Revise to give useful information on
697 (struct cp_parser): Add field translate_strings_p.
698 (cp_parser_new): Initialize it.
699 (cp_parser_translation_unit): Destroy the lexer when done.
700 (cp_parser_parameter_declaration): Restructure saving of
702 (cp_parser_save_member_function_body): Likewise.
703 (cp_parser_check_for_invalid_template_id)
704 (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
705 Adjust calls to cp_lexer_advance_token.
706 (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
707 No need to fiddle c_lex_string_translate.
708 (cp_parser_primary_expression, cp_parser_linkage_specification)
709 (cp_parser_asm_definition, cp_parser_asm_specification_opt)
710 (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
711 Use cp_parser_string_literal.
712 (cp_parser_attribute_list): Save and restore
713 parser->translate_strings_p, not c_lex_string_translate.
714 (cp_parser_cache_group): Delete.
715 (cp_parser_cache_group_1): Rename cp_parser_cache_group. Do
716 not take a cache argument.
718 2004-09-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
721 * decl.c (reshape_init): Extract array handling into...
722 (reshape_init_array): New function. Use integers instead of trees
723 for indices. Handle out-of-range designated initializers.
725 2004-09-20 Steven Bosscher <stevenb@suse.de>
727 * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
730 2004-09-19 Mark Mitchell <mark@codesourcery.com>
732 * decl2.c (determine_visibility): Allow class visibility
733 directives to override targetm.cxx.export_class_data.
735 2004-09-18 Kazu Hirata <kazu@cs.umass.edu>
737 * call.c, semantics.c: Follow spelling conventions.
738 * class.c: Fix a comment typo.
740 2004-09-16 Geoffrey Keating <geoffk@apple.com>
743 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
744 (handle_pragma_implementation): Likewise.
746 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
747 Zack Weinberg <zack@codesourcery.com>
749 * cp-tree.def: Use tree_code_class enumeration constants
750 instead of code letters.
751 * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
752 * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
753 Update for new tree-class enumeration constants.
755 2004-09-16 Mark Mitchell <mark@codesourcery.com>
758 * parser.c (cp_parser_simple_declaration): Commit to tentative
759 parses after seeing a decl-specifier.
760 (cp_parser_simple_declaration): Eliminate spurious message.
761 (cp_parser_init_declarator): Adjust error message.
764 * lex.c (unqualified_name_lookup_error): Mark the dummy
768 * parser.c (cp_parser_nested_name_specifier): Do not resolve
769 typename types if the user explicitly said "typename".
771 2004-09-16 Andrew MacLeod <amacleod@redhat.com>
773 * error.c (dump_decl): Make sure there is lang_specific info before
774 checking for DTOR and CTOR decls.
776 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
778 * class.c (copy_virtuals): Remove.
779 (build_primary_vtable): Use copy_list directly.
780 (build_secondary_vtable): Likewise.
781 (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
782 (create_vtable_ptr): Likewise.
784 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
786 * search.c: Follow spelling conventions.
788 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
790 * cp-tree.h (struct lang_type_class): Make pure_virtuals a
792 (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
794 * call.c (build_new_method_call): Don't confirm a pure virtual is
795 in CLASSTYPE_PURE_VIRTUALS. Reorder checks. Make it a warning.
796 * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
797 (fixup_inline_methods, finish_struct): Likewise.
798 * decl.c (finish_method): Likewise.
799 * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
800 CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
801 * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
802 vector to avoid repeating the list in error messages.
804 2004-09-15 Mark Mitchell <mark@codesourcery.com>
806 * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
807 * cp-tree.h (cxx_comdat_group): Declare.
808 * decl.c (cxx_comdat_group): New function.
810 2004-09-15 Nathan Sidwell <nathan@codesourcery.com>
812 * search.c (get_pure_virtuals): Remove unused variables.
814 * cp-tree.h (struct lang_decl_flags): Remove
815 needs_final_overrider.
816 (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
817 * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
818 * class.c (finish_struct_bits): Correct comment about
819 CLASSTYPE_PURE_VIRTUALS.
820 * search.c (get_pure_virtuals): Remove useless loop.
822 2004-09-14 Mark Mitchell <mark@codesourcery.com>
825 * mangle.c (partially_mangled_name): New variable.
826 (partially_mangled_name_len): Likewise.
827 (save_partially_mangled_name): New function.
828 (restore_partially_mangled_name): Likewise.
829 (write_encoding): Save and restore partially mangled names around
830 calls to get_mostly_instantiated_function_type.
831 (write_unqualified_name): Likewise.
833 2004-09-14 Nathan Sidwell <nathan@codesourcery.com>
835 * pt.c (unify): Replace gcc_unreachable with gcc_assert.
837 2004-09-13 Mark Mitchell <mark@codesourcery.com>
840 * parser.c (cp_parser_id_expression): Correct value for
842 (cp_parser_nested_name_specifier_opt): Look through typenames as
844 (cp_parser_template_name): Honor check_dependency_p.
847 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
851 * pt.c (unify): Add ENUMERAL_TYPE case. Replace sorry with
854 2004-09-12 Richard Henderson <rth@redhat.com>
857 * semantics.c (maybe_cleanup_point_expr): Don't call fold.
858 * typeck.c (condition_conversion): Likewise.
860 2004-09-11 Richard Henderson <rth@redhat.com>
863 * pt.c (cur_stmt_expr): Move from tsubst_expr.
864 (tsubst_expr) <case STMT_EXPR>: Move ...
865 (tsubst_copy_and_build): ... here.
867 2004-09-10 Zack Weinberg <zack@codesourcery.com>
869 * cp-tree.h (interface_only, interface_unknown): Delete declarations;
870 comment explaining them moved to c-common.h.
871 * lex.c (interface_only, interface_unknown, extract_interface_info):
873 (cxx_finish): Don't reset interface_unknown.
874 (handle_pragma_interface): Don't set interface_only and
875 interface_unknown; just the like-named fields in finfo.
876 (handle_pragma_implementation): Adjust comment.
877 * decl2.c (cp_finish_file): Don't reset interface_only and
879 * method.c (synthesize_method): Don't reset interface_unknown or
880 call extract_interface_info.
881 * pt.c (pop_tinst_level): Don't call extract_interface_info.
882 * decl.c (start_cleanup_fn): Don't save or restore interface_only
883 and interface_unknown.
884 (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
885 and use the result instead of the interface_only/interface_unknown
887 (start_preparsed_function): Likewise.
888 * lex.c (cxx_make_type): Likewise.
889 * semantics.c (begin_class_definition): Likewise.
890 (expand_body): Don't call extract_interface_info.
892 2004-09-10 Ziemowit Laski <zlaski@apple.com>
894 * decl.c (objc_mark_locals_volatile): Make description of
895 routine more descriptive; only mark VAR_DECLs at each
898 2004-09-10 Richard Henderson <rth@redhat.com>
901 * call.c (build_vfield_ref): Move...
902 * class.c (build_vfield_ref): ... here. Convert datum to the
903 primary base containing the vptr.
904 (make_new_vtable): Simplify build_primary_vtable arguments.
905 (finish_struct_1): Do not duplicate TYPE_VFIELD.
906 * typeck.c (build_class_member_access_expr): Don't warn for
907 null object access to base fields.
909 2004-09-10 Ziemowit Laski <zlaski@apple.com>
911 * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
912 New functions, to be called from ObjC++.
914 2004-09-10 Kazu Hirata <kazu@cs.umass.edu>
916 * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
917 name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
920 2004-09-09 Ziemowit Laski <zlaski@apple.com>
922 * typeck.c (build_c_cast): Preserve the cast if casting
923 to and from an Objective-C type.
925 2004-09-09 Ziemowit Laski <zlaski@apple.com>
927 * Make-lang.in (cp/typeck.o): Depend on c-common.h.
928 * typeck.c: Include c-common.h.
929 (comptypes): For RECORD_TYPEs, call objc_comptypes() and
930 return the result if nonnegative.
932 2004-09-09 Zack Weinberg <zack@codesourcery.com>
934 * decl2.c (import_export_class)
935 * lex.c (handle_pragma_interface):
936 Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
938 2004-09-08 Ziemowit Laski <zlaski@apple.com>
940 * Make-lang.in (cp/semantics.o): Depend on c-common.h.
941 * semantics.c: Include c-common.h.
942 (finish_compound_stmt): Call objc_clear_super_receiver().
944 2004-09-08 Ziemowit Laski <zlaski@apple.com>
946 * cp-tree.h (do_poplevel): New prototype.
947 * semantics.c (do_poplevel): Make externally visible.
949 2004-09-08 Nathan Sidwell <nathan@codesourcery.com>
951 * cp-tree.h (tree_pair_s): Define a GC'd vector.
952 * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
953 * semantics.c (deferred_access): Likewise.
955 2004-09-06 Daniel Jacobowitz <dan@debian.org>
957 * semantics.c (expand_body): Assert that we are not nested.
959 2004-09-06 Zack Weinberg <zack@codesourcery.com>
961 * decl.c (build_enumerator): Use add_double and int_fits_type_p
962 instead of cp_build_binary_op, to avoid creating short-lived trees.
963 * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
964 lookahead instead of backtracking. Move some code to avoid a
966 (cp_parser_enum_specifier): Avoid duplication of effort with caller.
967 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
968 (cp_parser_enumerator_list, cp_parser_enumerator_definition):
969 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
971 2004-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
973 * decl.c (grok_declarator): Remove a redundant semicolon.
975 * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
976 Correct comments describing function parameters.
978 2004-09-03 Matt Austern <austern@apple.com>
979 Compile speed improvement.
980 * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
981 Otherwise define a stub macro that expands to nothing.
982 (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set. Otherwise
983 define a stub macro that expands to 0.
984 (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
985 (cp_lexer_stop_debugging): Likewise.
986 (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set. Otherwise
987 define a stub macro that expands to NULL.
988 (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
989 (cp_lexer_new_from_tokens): Likewise.
991 2004-09-03 Jan Hubicka <jh@suse.cz>
993 * decl.c (finish_function): Clean out pointers we no longer need.
995 2004-09-03 Jan Beulich <jbeulich@novell.com>
997 * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
1000 2004-09-02 Paul Brook <paul@codesourcery.com>
1002 * decl2.c (determine_visibility): Only check data visibility
1005 2004-08-31 Mark Mitchell <mark@codesourcery.com>
1007 * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
1008 * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
1009 * decl2.c (determine_visibility): Honor
1010 TARGET_CXX_EXPORT_CLASS_DATA.
1012 * class.c (key_method): Rename to ...
1013 (determine_key_method): ... this.
1014 (finish_struct_1): Adjust accordingly.
1015 * cp-tree.h (key_method): Declare.
1016 * decl2.c (maybe_emit_vtables): Determine the key method here if
1017 it has not already been done.
1019 2004-08-31 Ziemowit Laski <zlaski@apple.com>
1021 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
1022 (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
1023 (cp/cp-decl.c): Do not depend on gtype-cp.h.
1024 (cp/cp-objcp-common.o): New target.
1025 * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
1026 (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
1027 cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
1028 prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
1030 (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
1031 LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
1032 LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
1033 LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
1034 LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
1035 LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
1036 LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
1037 LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
1038 LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
1039 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
1040 LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
1041 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
1042 LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
1043 LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
1044 LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
1045 LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
1046 LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
1047 LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
1048 LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
1049 LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
1050 LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
1051 LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
1052 LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
1053 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
1054 LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
1055 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
1056 LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
1057 LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
1058 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
1059 LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
1060 LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
1061 hooks to cp-objcp-common.h.
1062 (finish_file): New function.
1063 * cp-objcp-common.c: New file.
1064 * cp-objcp-common.h: New file.
1065 * cp-tree.h (cp_finish_file): New prototype.
1066 * decl.c: Do not include gtype-cp.h.
1067 * decl2.c (finish_file): Rename to cp_finish_file.
1069 2004-08-31 Richard Henderson <rth@redhat.com>
1072 * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
1073 (tsubst_copy_and_build): ... here.
1075 2004-08-30 Mark Mitchell <mark@codesourcery.com>
1077 * cp-tree.h (initialize_artificial_var): Declare.
1078 * decl.c (initialize_artifical_var): New function.
1079 * class.c (initialize_array): Remove.
1080 (initialize_vtable): Use initialize_artificial_var.
1081 (build_vtt): Likewise.
1082 (build_ctor_vtbl_group): Likewise.
1084 2004-08-30 Richard Henderson <rth@redhat.com>
1086 * class.c (build_base_path): Use build_address directly.
1087 * typeck.c (build_unary_op): Don't lower &a.b to pointer
1088 arithmetic directly.
1089 * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
1090 means !initializer_constant_valid_p.
1092 2004-08-30 Richard Henderson <rth@redhat.com>
1094 * class.c (fixed_type_or_null): Use get_base_address before
1095 assuming an ADDR_EXPR is non-null.
1097 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
1099 * name-lookup.c (pop_binding, pushdecl,
1100 set_identifier_type_value_with_scope, push_overloaded_decl,
1101 arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
1102 * parser.c (cp_parser_diagnose_invalid_type_name,
1103 cp_parser_postfix_expression, cp_parser_unary_expression,
1104 cp_parser_check_declarator_template_para): Likewise.
1105 * pt.c (push_inline_template_parms_recursive,
1106 check_explicit_specialization, convert_nontype_argument,
1107 coerce_template_template_parms, uses_template_parms,
1108 instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
1109 tsubst_expr, instantiate_template,
1110 maybe_adjust_types_for_deduction, type_unification_real,
1111 resolve_overloaded_unification, template_decl_level,
1112 type_dependent_expression_p): Likewise.
1113 * search.c (lookup_base_r): Likewise.
1114 * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
1115 * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
1116 verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
1117 * typeck.c (common_type, get_member_function_from_ptrfunc,
1118 build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
1119 * typeck2.c (cxx_incomplete_type_diagnostic,
1120 split_nonconstant_init_1, store_init_value,
1121 process_init_constructor): Likewise.
1123 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
1125 * call.c (check_dtor_name): Replace abort with gcc_assert or
1127 (build_call, add_builtin_candidate, build_new_op,
1128 convert_like_real, build_over_call, in_charge_arg_for_name,
1129 source_type, joust): Likewise.
1130 * class.c (build_simple_base_path, get_vcall_index,
1131 finish_struct_1, instantiate_type, get_enclosing_class,
1132 add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
1133 * cp-gimplify.c (cp_genericize): Likewise.
1134 * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
1135 * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
1136 * decl.c (poplevel, make_unbound_class_template, reshape_init,
1137 check_special_function_return_type, grokdeclarator,
1138 grok_op_properties, tag_name, xref_tag, start_preparsed_function,
1139 finish_function): Likewise.
1140 * decl2.c (grokfield, maybe_emit_vtables):Likewise.
1141 * error.c (dump_global_iord, dump_decl, dump_template_decl,
1142 language_to_string): Likewise.
1143 * except.c (choose_personality_routine): Likewise.
1144 * friend.c (do_friend): Likewise.
1145 * g++spec.c (lang_specific_driver): Likewise.
1146 * init.c (build_zero_init, expand_default_init, build_new_1,
1147 build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
1148 * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
1149 * mangle.c (add_substitution, write_unscoped_name,
1150 write_template_prefix, write_identifier,
1151 write_special_name_destructor, write_type, write_builtin_type,
1152 write_expression, write_template_param,
1153 write_java_integer_type_codes): Likewise.
1154 * method.c (implicitly_declare_fn): Likewise.
1156 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
1158 * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
1159 (BINFO_INDIRECT_PRIMARY_P): Remove.
1160 * class.c (determine_primary_base): Rename to ...
1161 (determine_primary_bases): ... here. Set all primary bases.
1162 (set_primary_base): Remove.
1163 (mark_primary_bases): Remove.
1164 (build_simple_base_path, walk_subobject_offsets,
1165 propagate_binfo_offsets, end_of_class): Adjust.
1166 (layout_class_type): Rename determine_primary_base call.
1167 (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
1169 (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
1170 build_rtti_vtbl_entries): Adjust.
1171 * init.c (build_vtbl_address): Adjust.
1173 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
1175 2004-08-28 Ziemowit Laski <zlaski@apple.com>
1177 * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
1178 CXX_AND_OBJCXX_OBJS.
1179 (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
1180 separately on the link line.
1182 2004-08-28 Jason Merrill <jason@redhat.com>
1184 * decl.c (expand_static_init): Avoid bogus warnings.
1186 2004-08-27 Jason Merrill <jason@redhat.com>
1189 * tree.c (stabilize_init): See through a COMPOUND_EXPR.
1192 * decl.c (expand_static_init): Use thread-safety API.
1193 (register_dtor_fn): Return the call, don't expand it.
1194 * tree.c (add_stmt_to_compound): New fn.
1195 (stabilize_call): Use it.
1197 2004-08-27 Richard Henderson <rth@redhat.com>
1199 * cp-tree.def (OFFSETOF_EXPR): New.
1200 * parser.c (cp_parser_builtin_offsetof): Either built an
1201 OFFSETOF_EXPR, or call fold_offsetof immediately.
1202 * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
1204 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
1206 * call.c (validate_conversion_obstack): Replace
1207 my_friendly_assert with gcc_assert or gcc_unreachable.
1208 (direct_reference_binding, merge_conversion_sequences,
1209 build_user_type_conversion_1, perform_overload_resolution,
1210 build_op_delete_call, enforce_access, call_builtin_trap,
1211 build_over_call, build_special_member_call, build_new_method_call,
1212 initialize_reference): Likewise.
1213 * class.c (build_base_path, build_primary_vtable, alter_access,
1214 check_bases, update_vtable_entry_for_fn, layout_empty_base,
1215 clone_function_decl, adjust_clone_args,
1216 type_requires_array_cookie, include_empty_classes,
1217 finish_struct_1, resolve_address_of_overloaded_function,
1218 instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
1219 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
1220 accumulate_vtbl_inits, build_vtbl_initializer,
1221 build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
1222 * cvt.c (build_up_reference, convert_to_reference): Likewise.
1223 * decl.c (poplevel, duplicate_decls, make_typename_type,
1224 cxx_init_decl_processing, reshape_init, check_initializer,
1225 make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
1226 expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
1227 grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
1228 xref_basetypes, start_preparsed_function, save_function_data,
1229 finish_function, finish_method, maybe_register_incomplete_var,
1230 complete_vars): Likewise.
1231 * decl2.c (grok_array_decl, check_member_template,
1232 check_classfn, finish_static_data_member_decl, coerce_new_type,
1233 coerce_delete_type, import_export_class, decl_needed_p,
1234 determine_visibility, import_export_decl, build_cleanup,
1235 start_static_initialization_or_destructi, do_static_destruction,
1236 prune_vars_needing_no_initialization,
1237 build_offset_ref_call_from_tree): Likewise.
1238 * error.c (dump_decl, dump_expr): Likewise.
1239 * init.c (finish_init_stmts, build_zero_init,
1240 expand_virtual_init, expand_default_init, expand_aggr_init_1,
1241 build_offset_ref, build_new_1, build_delete, build_vbase_delete):
1243 * mangle.c (write_method_parms, write_template_args,
1244 write_expression, write_template_arg): Likewise.
1245 * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
1246 * name-lookup.c (pop_binding, begin_scope, leave_scope,
1247 resume_scope, push_using_decl, validate_nonmember_using_decl,
1248 is_ancestor, poplevel_class, set_inherited_value_binding_p,
1249 push_class_level_binding, do_class_using_decl, push_namespace,
1250 pop_namespace, add_using_namespace, ambiguous_decl,
1251 lookup_namespace_name, lookup_type_current_level,
1252 maybe_process_template_type_declaration): Likewise.
1253 * parser.c (cp_lexer_peek_nth_token,
1254 cp_parser_parse_and_diagnose_invalid_typ,
1255 cp_parser_translation_unit, cp_parser_template_id,
1256 cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
1257 * pt.c (push_access_scope, finish_member_template_decl,
1258 push_inline_template_parms_recursive, add_outermost_template_args,
1259 get_innermost_template_args, begin_explicit_instantiation,
1260 end_explicit_instantiation, retrieve_specialization,
1261 is_specialization_of, is_specialization_of_friend,
1262 register_specialization, check_explicit_specialization,
1263 comp_template_parms, process_template_parm,
1264 process_partial_specialization, convert_nontype_argument,
1265 coerce_template_template_parms, coerce_template_parms,
1266 mangle_class_name_for_template, lookup_template_function,
1267 lookup_template_class, instantiate_class_template, tsubst_decl,
1268 tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
1269 instantiate_template, fn_type_unification, type_unification_real,
1270 get_template_base, regenerate_decl_from_template,
1271 template_for_substitution, instantiate_decl,
1272 get_mostly_instantiated_function_type, dependent_scope_ref_p,
1273 value_dependent_expression_p, resolve_typename_type): Likewise.
1274 * repo.c (repo_emit_p): Likewise.
1275 * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
1276 create_tinfo_types, emit_tinfo_decl): Likewise.
1277 * search.c (lookup_base_r, lookup_base, lookup_field_1,
1278 dfs_access_in_type, build_baselink, lookup_member,
1279 adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
1280 * semantics.c (perform_or_defer_access_check,
1281 finish_non_static_data_member, finish_stmt_expr_expr,
1282 finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
1283 finish_template_template_parm, finish_member_declaration,
1284 emit_associated_thunks): Likewise.
1285 * tree.c (build_target_expr_with_type, force_target_expr,
1286 copy_binfo, get_first_fn, cp_tree_equal): Likewise.
1287 * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
1288 cxx_sizeof_or_alignof_type, perform_integral_promotions,
1289 build_class_member_access_expr, finish_class_member_access_expr,
1290 build_ptrmemfunc_access_expr, build_unary_op,
1291 unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
1292 build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
1293 * typeck2.c (complete_type_check_abstract,
1294 abstract_virtuals_error, process_init_constructor,
1295 add_exception_specifier): Likewise.
1297 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
1299 * class.c (build_vtbl_initializer): Use ssize_int.
1300 * decl.c (complete_array_type): Likewise.
1301 * method.c (finish_thunk): Likewise.
1302 * search.c (get_dynamic_base_type): Likewise.
1304 2004-08-26 Richard Henderson <rth@redhat.com>
1306 * cp-tree.h (DECL_FIELD_IS_BASE): New.
1307 * class.c (build_base_field): Set it.
1308 (build_simple_base_path): Use it.
1309 (fixed_type_or_null): Don't consider base fields definitive.
1311 2004-08-25 Roger Sayle <roger@eyesopen.com>
1314 PR tree-optimization/16372
1315 * decl.c (finish_enum): Make the precision of the enumerated type
1316 the same width as the underlying integer type.
1318 2004-08-25 Mark Mitchell <mark@codesourcery.com>
1321 * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
1324 * mangle.c (get_identifier_nocopy): Add cast.
1326 * cp-tree.h (mangle_type): Remove.
1327 * mangle.c (globals): GTY it.
1328 (mangle_obstack): New variable.
1329 (name_obstack): Likewise.
1330 (name_base): Likewise.
1331 (write_char): Adjust accordingly.
1332 (write_chars): Likewise.
1333 (write_string): Likewise.
1334 (start_mangling): Initialize G.substitutions only one. Add
1336 (finish_mangling): Use VARRAY_CLEAR to reclaim
1337 storage in G.substitutions. Use obstack_finish.
1338 (init_mangle): Adjust for changes to variable names above.
1339 Initialize G.substitutions.
1340 (mangle_decl_string): Adjust call to start_mangling.
1341 (get_identifier_nocopy): New function.
1342 (mangle_decl): Use it.
1343 (mangle_type_string): Adjust call to start_mangling.
1344 (mangle_special_for_type): Likewise.
1345 (mangle_vtt_for_type): Likewise.
1346 (mangle_ctor_vtbl_for_type): Likewise.
1347 (mangle_thunk): Likewise.
1348 (mangle_guard_variable): Likewise.
1349 (mangle_ref_init_variable): Likewise.
1351 2004-08-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1354 * pt.c (redeclare_class_template): Check the type of non-type and
1355 template template parameter.
1357 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
1359 * call.c (convert_class_to_reference): Adjust build_int_cst calls.
1360 (build_user_type_conversion_1, convert_like_real,
1361 build_java_interface_fn_ref, build_special_member_call): Likewise.
1362 * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
1363 * cp-gimplify.c (cp_gimplify_expr): Likewise.
1364 * cvt.c (cp_convert_to_pointer): Likewise.
1365 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
1366 * decl2.c (start_static_initialization_or_destruction,
1367 generate_ctor_or_dtor_function): Likewise.
1368 * except.c (build_throw): Likewise.
1369 * mangle.c (write_integer_cst): Likewise.
1370 * method.c (finish_thunk): Likewise.
1371 * rtti.c (build_headof, get_tinfo_decl_dynamic,
1372 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
1373 get_pseudo_ti_init): Likewise.
1374 * search.c (get_dynamic_cast_base_type): Likewise.
1376 2004-08-25 Zack Weinberg <zack@codesourcery.com>
1378 * class.c, search.c: Remove references to DWARF_DEBUG.
1380 2004-08-25 Adam Nemet <anemet@lnxw.com>
1382 * repo.c (extract_string): Reset backquote after one character.
1383 (get_base_filename): Fix indentation.
1385 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
1387 * decl.c (cxx_init_decl_processing): Adjust
1388 build_common_tree_nodes call.
1390 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
1393 * (is_subobject_of_p): Resurrect & optimize.
1394 (lookup_field_r): Use it.
1396 2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1399 * search.c (friend_accessible_p): Increment processing_template_decl
1400 when deal with TEMPLATE_DECL of SCOPE.
1402 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
1405 * semantics.c (check_accessibility_of_qualified_id): Defer check
1406 if qualifying_type is a template parameter.
1408 2004-08-23 Mark Mitchell <mark@codesourcery.com>
1411 * pt.c (instantiate_decl): Do not try to apply
1412 DECL_DECLARED_INLINED_P to a VAR_DECL.
1414 * search.c (build_baselink): Fix typo in comment.
1416 2004-08-22 Andrew Pinski <apinski@apple.com>
1419 2004-08-22 Andrew Pinski <apinski@apple.com>
1421 * typeck.c (build_unary_op): Use &a.b if the folded lowered
1422 expression is not constant.
1424 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
1426 * name-lookup.c (pushdecl): Rename build_type_copy call.
1427 * tree.c (cp_build_qualified_type_real,
1428 build_exception_variant, handle_java_interface_attribute): Likewise.
1430 2004-08-22 Andrew Pinski <apinski@apple.com>
1433 * typeck.c (build_unary_op): Use &a.b if the folded lowered
1434 expression is not constant.
1436 2004-08-20 Mark Mitchell <mark@codesourcery.com>
1439 * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
1441 2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
1444 * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
1447 2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1449 * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
1450 before calling comp_template_args.
1452 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
1454 * class.c (build_vtbl_initializer): Use build_int_cst for
1455 negative size types.
1456 * decl.c (complete_array_type): Likewise.
1457 * method.c (finish_thunk): Likewise.
1459 2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
1461 * tree.c: Remove unused mark_local_for_remap_r.
1463 2004-08-19 Eric Christopher <echristo@redhat.com>
1465 * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
1466 * tree.c (cxx_unsave_expr_now): Delete.
1467 (cp_unsave_r): Ditto.
1469 2004-08-19 Mark Mitchell <mark@codesourcery.com>
1472 * pt.c (push_template_decl_real): Disallow template allocation
1473 functions with fewer than two parameters.
1475 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
1477 * cp-tree.h (build_shared_int_cst): Remove.
1478 * tree.c (shared_int_cache): Remove.
1479 (build_shared_int_cst): Remove.
1480 * class.c (finish_struct_1): Use build_int_cst.
1482 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
1484 * decl.c (finish_enum): Do not copy value node early, copy
1486 * lex.c (cxx_init): Force null_node to be unique.
1488 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
1491 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
1492 from input for MODOP_EXPR.
1494 2004-08-18 Mark Mitchell <mark@codesourcery.com>
1496 * pt.c (dependent_template_p): Fix typo in commment.
1499 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
1502 2004-08-17 Mark Mitchell <mark@codesourcery.com>
1505 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
1506 arguments have the same type as the corresponding parameter.
1509 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
1510 is set use it for diagnostic purposes.
1511 (cp_parser_pseudo_destructor_name): Remove special-case error
1515 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
1518 * cp-tree.h (qualified_name_lookup_error): Add parameter.
1519 * name-lookup.c (do_class_using_decl): Restrict set of entities
1520 passed to cp_emit_debug_info_for_using more carefully.
1521 (lookup_qualified_name): Allow lookup_member to return sets of
1523 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
1524 (cp_parser_primary_expression): Handle ambiguous lookups.
1525 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
1526 (cp_parser_template_argument): Likewise.
1527 (cp_parser_elaborate_type_specifier): Likewise.
1528 (cp_parser_namespace_name): Likewise.
1529 (cp_parser_class_name): Likewise.
1530 (cp_parser_lookup_name_simple): Likewise.
1531 * pt.c (tsubst_qualified_id): Handle ambiguous results.
1532 (tsubst_expr): Likewise.
1533 * semantics.c (qualified_name_lookup_error): Add decl paramter.
1534 For ambiguous lookups, print candidates.
1536 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1539 * pt.c (instantiate_pending_templates): Add int parameter. Don't
1541 * cp-tree.h (instantiate_pending_templates): Adjust prototype.
1542 * decl2.c (finish_file): Adjust call to
1543 instantiate_pending_templates.
1545 2004-08-15 Roger Sayle <roger@eyesopen.com>
1547 * call.c (build_vfield_ref, build_call, build_conditional_expr,
1548 convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
1549 build_java_interface_fn_ref, build_special_member_call,
1550 build_new_method_call, initialize_reference): Replace calls to
1551 build with calls to buildN.
1552 * class.c (build_base_path, convert_to_base_statically,
1553 build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
1554 build_vtbl_initializer): Likewise.
1555 * cp-gimplify.c (genericize_try_block, genericize_catch_block,
1556 gimplify_if_stmt, cp_genericize_r): Likewise.
1557 * cvt.c (convert_to_void): Likewise.
1558 * decl.c (check_initializer, finish_constructor_body,
1559 finish_destructor_body): Likewise.
1560 * error.c (dump_expr): Likewise.
1561 * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
1563 * init.c (perform_member_init, expand_virtual_init,
1564 expand_cleanup_for_base, build_init, expand_default_init,
1565 build_offset_ref, decl_constant_value, build_new, build_new_1,
1566 build_vec_delete_1, build_vec_init, build_delete,
1567 push_base_cleanups, build_vec_delete): Likewise.
1568 * mangle.c (write_integer_cst): Likewise.
1569 * method.c (thunk_adjust, do_build_copy_constructor,
1570 do_build_assign_ref): Likewise.
1571 * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
1572 unify, build_non_dependent_expr): Likewise.
1573 * rtti.c (build_headof, build_typeid, ifnonnull,
1574 build_dyanmic_cast_1, tinfo_base_init): Likewise.
1575 * semantics.c (begin_compound_stmt, finish_call_expr,
1576 finish_pseudo_destructor_expr, finish_id_expression,
1577 simplify_aggr_init_expr, finalize_nrv_r): Likewise.
1578 * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
1579 array_type_nelts_total, stabilize_call): Likewise.
1580 * typeck.c (decay_conversion, build_class_member_access_expr,
1581 lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
1582 get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
1583 build_x_unary_op, build_unary_op, unary_complex_lvalue,
1584 build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
1585 check_return_expr): Likewise.
1586 * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
1587 split_nonconstant_init, store_init_value, build_m_component_ref):
1590 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
1592 * call.c (convert_class_to_reference,
1593 build_user_type_conversion_1, convert_like_real,
1594 build_java_interface_fn_ref, build_special_member_call): Use
1596 * class.c (build_vtbl_initializer): Likewise.
1597 * cp-gimplify.c (cp_gimplify_expr): Likewise.
1598 * cvt.c (cp_convert_to_pointer): Likewise.
1599 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
1600 * decl2.c (start_static_initialization_or_destruction,
1601 generate_ctor_or_dtor_function): Likewise.
1602 * except.c (build_throw): Likewise.
1603 * lex.c (cxx_init): Likewise.
1604 * mangle.c (write_integer_cst): Likewise.
1605 * rtti.c (build_headof, get_tinfo_decl_dynamic,
1606 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
1607 get_pseudo_ti_init): Likewise.
1608 * search.c (get_dynamic_cast_base_type): Likewise.
1609 * tree.c (build_shared_int_cst): Likewise.
1611 2004-08-12 Mark Mitchell <mark@codesourcery.com>
1614 * class.c (count_depth_data): New type.
1615 (dfs_depth_post): New function.
1616 (dfs_depth_q): Likewise.
1617 (find_final_overrider_data_s): Change type of vpath.
1619 (dfs_find_final_overrider_1): New function.
1620 (dfs_find_final_overrider): Use it.
1621 (dfs_find_final_overrider_q): Adjust use of vpath.
1622 (dfs_find_final_overrider_post): Likewise.
1623 (find_final_overrider): Use dfs_depth. Allocate and deallocate
1626 2004-08-12 Jan Beulich <jbeulich@novell.com>
1628 * parser.c (cp_parser_asm_definition): Properly consume scope operator
1629 tokens preceding the clobbers. Don't check for scope operator
1630 following inputs. Simplify inputs handling to match that now used for
1633 2004-08-11 Mark Mitchell <mark@codesourcery.com>
1636 * except.c (build_throw): Allocate cleanup_type and the function
1637 for __cxa_throw separately.
1640 * call.c (standard_conversion): Do not accept conversions between
1641 pointers to members if the class types are unrelated.
1644 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
1645 char &" instead of just "char &".
1648 * pt.c (tsubst): Just return the unknown_type_node.
1650 2004-08-11 Mark Mitchell <mark@codesourcery.com>
1653 * parser.c (cp_parser_class_specifier): Robustify.
1656 * pt.c (tsubst_copy_and_build): Complain about invalid
1660 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
1661 current_class_ref while tsubsting.
1663 2004-08-10 Mark Mitchell <mark@codesourcery.com>
1666 * parser.c (cp_parser_init_declarator): Robustify.
1668 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
1670 * typeck2.c (process_init_constructor): Guard the missing field warning
1671 with warn_missing_field_initializers rather than extra_warnings.
1673 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
1675 * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
1677 2004-08-05 Mark Mitchell <mark@codesourcery.com>
1679 * decl.c (start_preparsed_function): Move determine_visibility
1681 * decl2.c (determine_visibility): Incorporate dllexport testing.
1683 2004-08-05 Geoffrey Keating <geoffk@apple.com>
1685 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
1686 means that libstdc++ is needed.
1688 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
1690 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
1692 2004-08-04 Geoffrey Keating <geoffk@apple.com>
1694 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
1695 than passing it as a parameter to rest_of_decl_compilation.
1696 * decl2.c (grokfield): Use set_user_assembler_name.
1698 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
1700 * decl.c (complete_array_type): Don't gratuitously copy
1701 maxindex. Its type is always set.
1703 2004-08-04 Paul Brook <paul@codesourcery.com>
1705 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
1706 * cp-tree.h (struct language_function): Rename x_dtor_label to
1708 (dtor_label): Rename ...
1709 (cdtor_label): ... to this.
1710 * decl.c (begin_constructor_body): Remove.
1711 (check_special_function_return_type): Maybe change the return type.
1712 (grokdeclarator): Pass the class type.
1713 (start_preparsed_function): Constructors may need a return label.
1714 (finish_constructor_body, finish_destructor_body): Set the return
1716 (begin_function_body): Don't call begin_constructor_body.
1717 (finish_function): Don't warn for constructors or destructors.
1718 (implicitly_declare_fn): Maybe change the return type.
1719 * optimize.c: Include target.h.
1720 (maybe_clone_body): Remap the function result.
1721 * semantics.c: Include target.h.
1722 (finish_return_stmt): Maybe jump to return label for constructors.
1724 2004-08-03 Mark Mitchell <mark@codesourcery.com>
1726 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
1727 (check_field_decls): Or here.
1728 (check_methods): Or here.
1729 (initialize_array): Don't mess with DECL_CONTEXT.
1730 * cp-tree.h (start_decl): Adjust prototype.
1731 (determine_visibility): New function.
1732 * decl.c (duplicate_decls): Remove checks for hidden "operator
1734 (build_library_fn_1): Give all library functions default
1736 (start_decl): Add pop_scope_p parameter. Tidy.
1737 (cp_finish_decl): Do not pop scopes here. Call
1738 determine_visibility for variable definitions.
1739 (start_preparsed_function): Call determine_visibility.
1740 * decl2.c (determine_visibility): New function.
1741 * method.c (use_thunk): Fix formatting.
1742 * parser.c (cp_parser_condition): Adjust calls to start_decl.
1743 (cp_parser_init_declarator): Likewise.
1744 * pt.c (instantiate_decl): Always call pop_nested_class.
1745 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
1746 (tinfo_base_init): Likewise.
1748 2004-08-02 Mark Mitchell <mark@codesourcery.com>
1751 * name-lookup.c (validate_nonmember_using_decl): Robustify.
1753 2004-08-01 Mark Mitchell <mark@codesourcery.com>
1756 * name-lookup.c (decl_namespace): Remove.
1757 (current_decl_namespace): Use decl_namespace_context instead of
1759 (push_decl_namespace): Likewise.
1760 (arg_assoc_class): Likewise.
1761 (arg_assoc_type): Likewise.
1762 * pt.c (check_specialization_namespace): New function.
1763 (maybe_process_partial_specialization): Use it.
1764 (register_specialization): Likewise.
1767 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
1768 * call.c (null_ptr_cst_p): Handle variables with constant
1770 * pt.c (convert_nontype_argument): Use
1771 DECL_INTEGRAL_CONSTANT_VAR_P.
1772 * semantics.c (finish_id_expression): Likewise.
1775 * decl.c (duplicate_decls): Reject duplicate namespace
1779 * typeck.c (build_ptrmemfunc): Loosen assertion.
1781 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
1783 * call.c (z_candidate::template_decl): Rename from template.
1784 (add_template_candidate_real): Adjust member reference.
1787 2004-07-29 Mark Mitchell <mark@codesourcery.com>
1789 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
1790 (lang_decl_flags): Narrow the width of "languages". Add
1792 (DECL_NEEDED_P): Remove.
1793 (FOR_EACH_CLONE): New macro.
1794 (DECL_REPO_AVAILABLE_P): Likewise.
1795 (DECL_TINFO_P): Likewise.
1796 (set_linkage_according_to_type): Declare.
1797 (import_export_vtable): Remove.
1798 (import_export_tinfo): Likewise.
1799 (mark_needed): New function.
1800 (decl_needed_p): Likewise.
1801 (note_vauge_linkage_fn): Likewise.
1802 (init_repo): Change prototype.
1803 (repo_template_used): Remove.
1804 (repo_template_instantiated): Likewise.
1805 (repo_emit_p): New function.
1806 (repo_export_class_p): Likewise.
1807 (no_linkage_check): Change prototype.
1808 * class.c (set_linkage_according_to_type): New function.
1809 (build_vtable): Use it. Do not call import_export_vtable. Set
1810 DECL_IGNORED_P if appropriate.
1811 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
1812 (make_rtL_for_nonlocal_decls): Check for template instantiations
1814 (grokfndecl): Adjust call to no_linkage_check.
1815 (set_linkage_for_static_data_member): New function.
1816 (grokvardecl): Use it. Adjust call to no_linkage_check.
1817 (grokdeclarator): Use set_linkage_for_static_data_member.
1818 * decl2.c (note_vague_linkage_fn): New function.
1819 (note_vague_linkage_var): Likewise.
1820 (finish_static_data_member_decl): Use it.
1821 (import_export_vtable): Remove.
1822 (import_export_class): Use repo_export_class_p.
1823 (var_finalized_p): Simplify.
1824 (maybe_emit_vtables): Simplify.
1825 (mark_needed): New function.
1826 (decl_needed_p): Likewise.
1827 (import_export_decl): Add documentation and consistency checks.
1828 Use repo_emit_p. Handle virtual tables and RTTI information
1830 (import_export_tinfo): Remove.
1831 (write_out_vars): Call import_export_decl.
1832 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
1834 (finish_file): Use decl_needed_p. Do not call import_export_decl
1835 for undefined static data members. Do not warn about undefined
1836 inlines when using a repository.
1837 (mark_used): Use note_vague_linkage_fn. Always defer template
1839 * lex.c (cxx_init): Adjust call to init_repo. Always set
1840 flag_unit_at_a-time.
1841 * method.c (synthesize_method): Remove unncessary
1842 import_export_decl call.
1843 (implicitly_declare_fn): Use set_linkage_according_to_type.
1844 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
1845 * pt.c (instantiate_class_template): Don't redundantly add classes
1846 to keyed_classes. Don't call repo_template_used.
1847 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
1848 templates with internal linkage.
1849 (check_instantiated_args): Adjust call to no_linkage_check.
1850 (instantiate_template): Use FOR_EACH_CLONE.
1851 (mark_definable): New function.
1852 (mark_decl_instantiated): Use it.
1853 (do_decl_instantiation): Adjust tests for explicit instantiation
1854 after "extern template".
1855 (instantiate_class_member): Do not use repo_template_instantiated.
1856 (do_type_instantiation): Simplify.
1857 (instantiate_decl): Use mark_definable. Check repo_emit_p.
1859 * repo.c (repo_get_id): Remove.
1860 (original_repo): Remove.
1861 (IDENTIFIER_REPO_USED): Remove.
1862 (IDENTIFIER_REPO_CHOSEN): Remove.
1863 Remove all #if 0'd code.
1864 (repo_template_used): Remove.
1865 (repo_template_instantiated): Remove.
1866 (temporary_obstack_initialized_p): New variable.
1867 (init_repo): Register with lang_post_pch_load. Avoid creating
1868 identifiers unnecessarily. Don't use original_repo. Close the
1870 (reopen_repo_file_for_write): Not here.
1871 (finish_repo): Always write out a new repository file.
1872 (repo_emit_p): New function.
1873 (repo_export_class_p): Likewise.
1874 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
1875 (involves_incomplete_p): New function.
1876 (tinfo_base_init): Use it.
1877 (ptr_initializer): Remove non_public_ptr parameter.
1878 (ptm_initializer): Likewise.
1879 (get_pseudo_ti_init): Likewise.
1880 (unemitted_tinfo_decl_p): Remove.
1881 (emit_tinfo_decl): Use import_export_decl.
1882 * semantics.c (expand_body): Move updates of static_ctors and
1884 (expand_or_defer_fn): ... here.
1885 * tree.c (no_linkage_check): Add relaxed_p parameter.
1887 2004-07-28 Eric Christopher <echristo@redhat.com>
1889 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
1891 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
1893 * cp-tree.h (struct tree_pair_s): New.
1894 (typedef tree_pair_p): New.
1895 (DEF_VEC_O(tree_pair_s)): New.
1896 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
1897 (CLASSTYPE_VCALL_INDICES): Update documentation.
1898 * class.c (get_vcall_index): Adjust.
1899 (add_vcall_offset): Adjust.
1901 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
1903 * pt.c, typeck.c: Remove spurious carriage returns.
1905 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1908 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
1909 when the type of ARG is not dependent.
1911 2004-07-26 Geoffrey Keating <geoffk@apple.com>
1913 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
1914 (lang_specific_driver): If the C++ or math library options don't
1915 start with '-l', don't count them as added libraries.
1917 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
1919 * decl.c (xref_basetypes): Adjust base access vector creation.
1920 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
1922 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
1924 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
1925 Brian Ryner <bryner@brianryner.com>
1929 * class.c (check_field_decls): Apply hidden visibility if
1930 -fvisibility-inlines-hidden and inlined unless otherwise specified
1931 (build_vtable): Set vtable visibility to class visibility.
1932 (check_field_decls): Default static member visibility to class
1934 (check_methods): Default method visibility to class visibility.
1935 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
1936 CLASSTYPE_VISIBILITY_SPECIFIED macro.
1937 * decl.c (duplicate_decls): New logic for merging definition decls
1938 with declaration decls. Added ignore & warning when non default
1939 applied to global operator new or delete.
1940 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
1941 wherever VISIBILITY was changed
1942 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
1944 (tinfo_base_init): Set typeinfo name visibility to class visibility.
1946 2004-07-25 Bernardo Innocenti <bernie@develer.com>
1948 * decl.c: Rename all identifiers named `class' to `cl'.
1949 * cp-tree.h: Likewise.
1951 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
1953 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
1954 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
1955 * name-lookup.c (binding_entry_make): Use GGC_NEW.
1956 (binding_table_construct): Use GGC_CNEWVEC.
1957 (binding_table_new): Use GGC_NEW.
1958 (cxx_binding_make): Likewise.
1959 (begin_scope): Likewise.
1960 (push_to_top_level): Use GCC_CNEW.
1961 * parser.c (cp_token_cache_new): Likewise.
1962 (cp_token_cache_push_token): Likewise.
1963 (cp_lexer_new_main): Likewise.
1964 (cp_lexer_new_from_tokens): Likewise.
1965 (cp_parser_context_new): Likewise.
1966 (cp_parser_new): Likewise.
1967 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
1968 * lex.c (cxx_make_type): Use GGC_CNEW.
1969 (retrofit_lang_decl): Use GGC_NEWVAR.
1970 (cxx_dup_lang_specific_decl): Likewise.
1971 (copy_lang_type): Likewise.
1972 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
1973 (save_function_data): Likewise.
1974 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
1975 (cxx_push_function_context): Likewise.
1977 2004-07-25 Richard Henderson <rth@redhat.com>
1979 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
1980 DECL_IGNORED_P on RESULT_DECL.
1981 * semantics.c (finalize_nrv): Copy them too.
1983 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
1985 * search.c (lookup_conversion_operator): Avoid two loops.
1986 (add_conversions): Remove.
1987 (check_hidden_convs, split_conversions,
1988 lookup_conversions_r): New.
1989 (lookup_conversions): Use lookup_conversions_r.
1991 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
1993 * pt.c (get_template_base): Check type is completable.
1995 2004-07-21 Eric Christopher <echristo@redhat.com>
1997 * decl.c (poplevel): Inline unused variable checking.
2000 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
2002 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
2005 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2008 * pt.c (check_explicit_specialization): Remove extension to accept
2009 specializations without template headers. Fall-through to normal
2012 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2015 * pt.c (determine_specialization): New parameter template_count.
2016 Disambiguate between member templates and member functions counting
2017 the template headers.
2018 (check_explicit_specialization): Update caller.
2019 (tsubst_friend_function): Likewise.
2021 2004-07-20 Steven Bosscher <stevenb@suse.de>
2023 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
2024 * cp-tree.h (tinst_level_t): New tree type.
2025 (union lang_tree_node): Handle it.
2026 (TINST_LOCATION): New accessor macro.
2027 (make_tinst_level): New prototype.
2028 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
2029 * decl.c (cp_tree_node_structure): Likewise.
2030 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
2031 (print_instantiation_partial_context): Likewise.
2032 * pt.c (pop_tinst_level): Likewise.
2033 (push_tinst_level): Use make_tinst_level.
2034 * tree.c (make_tinst_level): New function.
2035 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
2037 2004-07-20 Mark Mitchell <mark@codesourcery.com>
2039 * parser.c (cp_parser_simple_type_specifier): Fix typo.
2042 * parser.c (cp_parser_simple_type_specifier): Do not record usage
2043 of globally-qualified names.
2045 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2048 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
2051 2004-07-19 Mark Mitchell <mark@codesourcery.com>
2054 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
2055 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
2056 * class.c (add_implicitly_declared_members): Use
2057 CLASSTYPE_LAZY_ASSIGNMENT_OP.
2058 * method.c (lazily_declare_fn): Clear
2059 CLASSTYPE_LAZY_ASSIGNMENT_OP.
2060 * search.c (lookup_fnfields_1): Check it.
2062 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
2064 * cp-tree.h (vec_binfo_member): Remove.
2065 * tree.c (vec_binfo_member): Remove.
2067 * cp-tree.h (struct lang_type_class): Remove vfields field.
2068 (CLASSTYPE_VFIELDS): Remove.
2069 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
2070 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
2072 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
2073 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
2074 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
2076 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
2078 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
2079 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
2081 (BINFO_LANG_SLOTS): Remove.
2082 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
2083 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
2084 * class.c (check_bases): Adjust BINFO accessors.
2085 (determine_primary_base, finish_struct_bits,
2086 maybe_warn_about_overly_private_class, warn_hidden,
2087 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
2088 warn_about_ambiguous_bases, get_vfield_name,
2089 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
2090 add_vcall_offset_vtbl_entries_r): Likewise.
2091 * dump.c (cp_dump_tree): Likewise.
2092 * init.c (sort_mem_initializers, expand_member_init, build_delete,
2093 push_base_cleanups): Likewise.
2094 * method.c (do_build_copy_constructor, do_build_assign_ref,
2095 synthesize_exception_spec): Likewise.
2096 name-lookup.c (arg_assoc_class): Likewise.
2097 * pt.c (instantiate_class_template,
2098 get_template_base_recursive): Likewise.
2099 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
2100 * typeck2.c (process_init_constructor): Likewise.
2101 * search.c (lookup_base_r, dynamic_cast_base_recurse,
2102 dfs_access_in_type, dfs_walk_real, look_for_overrides,
2103 types_overlap_p, copied_binfo, original_binfo): Likewise.
2104 (binfo_for_vtable): Remove
2106 2004-07-20 Steven Bosscher <stevenb@suse.de>
2108 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
2109 thunk_alias, and the access and virtual_offset fields.
2110 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
2111 * decl.c (finish_case_label): Update c_add_case_node call.
2113 2004-07-19 Mark Mitchell <mark@codesourcery.com>
2115 Revert patch for PR c++/16623.
2117 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
2119 * except.c: Remove two spurious carriage returns.
2121 2004-07-19 Mark Mitchell <mark@codesourcery.com>
2124 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
2125 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
2126 * class.c (add_implicitly_declared_members): Use
2127 CLASSTYPE_LAZY_ASSIGNMENT_OP.
2128 * method.c (lazily_declare_fn): Clear
2129 CLASSTYPE_LAZY_ASSIGNMENT_OP.
2130 * search.c (lookup_fnfields_1): Check it.
2132 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
2134 * class.c (add_method): Delay adding the slot until the end.
2135 (determine_primary_base): Adjust VEC_iterate invokation.
2136 (resort_type_method_vec, finish_struct_methods, warn_hidden,
2137 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
2138 build_vtbl_initializer): Likewise.
2139 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
2140 build_vbase_delete): Likewise.
2141 * method.c (do_build_copy_constructor): Likewise.
2142 * name-lookup.c (new_class_binding, print_binding_level,
2143 poplevel_class, store_class_bindings, push_to_top_level,
2144 pop_from_top_level): Likewise.
2145 * pt.c (check_explicit_specialization): Likewise.
2146 * search.c (lookup_conversion_operator, lookup_fnfields_1,
2147 get_pure_virtuals, add_conversions, dfs_check_overlap,
2148 binfo_for_vbase): Likewise.
2150 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2153 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
2154 innermost set of template arguments during deduction. Simplify.
2156 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
2158 * typeck.c (build_modify_expr, build_x_modify_expr): Set
2159 TREE_NO_WARNING on assignments with an operator other than '='.
2161 2004-07-10 Steven Bosscher <stevenb@suse.de>
2162 Joseph S. Myers <jsm@polyomino.org.uk>
2164 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
2165 * decl2.c (grokfield): Don't check current_class_depth via
2166 unused TREE_COMPLEXITY.
2167 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
2168 to avoid the missing parentheses warning.
2169 Don't set C_SET_EXP_ORIGINAL_CODE.
2171 2004-07-18 Mark Mitchell <mark@codesourcery.com>
2173 * tree.c (no_linkage_helper): Remove.
2174 (no_linkage_check): Don't use walk_tree_without_duplicates.
2176 * mangle.c (write_expression): Issue a sorry for zero-operand
2179 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2182 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2183 TREE_TYPE for non-dependent names.
2184 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
2185 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2186 unknown_type_node as its TREE_TYPE.
2187 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2188 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2189 (dump_expr) <SCOPE_REF case>: Likewise.
2191 2004-07-17 Jason Merrill <jason@redhat.com>
2194 * call.c (type_passed_as): Make the invisible reference type
2196 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
2197 cp_genericize_r. Handle invisible reference lowering.
2198 (is_invisiref_parm): New fn.
2199 (cp_genericize): Adjust the types of invisible reference parms.
2200 Don't repeat the walk for clones.
2201 * decl.c (store_parm_decls): Don't generate any code for clones.
2203 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
2205 * cp-tree.h (builtin_function): Declare.
2207 2004-07-16 Mark Mitchell <mark@codesourcery.com>
2209 * class.c (finish_struct_methods): Remove unncessary code.
2210 (add_implicitly_declared_members): Create declarations for default
2211 constructors and copy constructors lazily.
2212 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
2214 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
2215 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
2216 * decl2.c (check_classfn): Robustify.
2217 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
2218 (locate_ctor): Handle lazy default constructors.
2219 (locate_copy): Handle lazy copy constructors.
2220 (implicitly_declare_fn): Make sure we're looking at the
2221 TYPE_MAIN_VARIANT for a class before creating functions. Don't
2222 set TYPE_HAS_CONSTRUCTOR.
2223 (lazily_declare_fn): New function.
2224 * name-lookup.c (constructor_name_full): Simplify.
2225 * search.c (lookup_fnfields_1): Lazily create methods, as
2227 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
2229 2004-07-16 Steven Bosscher <stevenb@suse.de>
2231 * cp-tree.h (struct lang_type): Don't have three GTY options on a
2232 single bit GTY desc.
2234 2004-07-16 Richard Henderson <rth@redhat.com>
2236 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
2237 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
2238 * tree.c (cp_copy_res_decl_for_inlining): Remove.
2240 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
2242 * class.c (finish_struct_bits): Use for loop.
2243 (propagate_binfo_offsets): Do primary binfo outside of loop.
2246 * dump.c (cp_dump_tree): Don't dump the bases if there's no
2249 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
2251 2004-07-15 Mark Mitchell <mark@codesourcery.com>
2253 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
2254 has_abstract_assign_ref. Make methods a VEC(tree) *.
2255 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
2256 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
2257 (CLASSTYPE_DESTRUCTORS): Likewise.
2258 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
2259 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
2260 (add_method): Change prototoype.
2261 * class.c (add_method): Remove error_p parameter. Adjust for
2262 changes to CLASSTYPE_METHOD_VEC.
2263 (handle_using_decl): Adjust call to add_method.
2264 (maybe_warn_about_overly_private_class): Adjust for
2265 changes to CLASSTYPE_METHOD_VEC.
2266 (resort_type_method_vec): Likewise.
2267 (finish_struct_methods): Likewise.
2268 (check_for_override): Likewise.
2269 (warn_hidden): Likewise.
2270 (add_implicitly_declared_members): Defer creation of assignment
2271 operators. Adjust call to add_method.
2272 (clone_function_decl): Adjust call to add_method.
2273 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
2274 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
2275 * decl.c (grok_special_member_properties): Don't set
2276 TYPE_HAS_ABSTRACT_ASSIGN_REF.
2277 * decl2.c (check_classfn): Adjust for
2278 changes to CLASSTYPE_METHOD_VEC.
2279 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
2280 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
2281 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
2282 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
2284 * pt.c (check_explicit_specialization): Adjust for
2285 changes to CLASSTYPE_METHOD_VEC.
2286 (instantiate_class_template): Do not set
2287 TYPE_HAS_ABSTRACT_ASSIGN_REF.
2288 * ptree.c (cxx_print_type): Don't try to print
2289 CLASSTYPE_METHOD_VEC.
2290 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
2291 * search.c (lookup_field_r): Adjust for
2292 changes to CLASSTYPE_METHOD_VEC.
2293 (lookup_fnfields): Likewise.
2294 (lookup_conversion_operator): Likewise.
2295 (lookup_fnfields_1): Likewise. Create assignment operators
2297 (look_for_overrides_here): Adjust for
2298 changes to CLASSTYPE_METHOD_VEC.
2299 (add_conversions): Likewise.
2300 * semantics.c (finish_member_declaration): Adjust call to add_method.
2302 2004-07-15 Jason Merrill <jason@redhat.com>
2304 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
2305 references and pointers are compatible.
2307 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
2309 * decl.c (xref_basetypes): Refactor.
2310 * tree.c (copy_base_binfos): Replace with ...
2311 (copy_binfo): ... this. Deep copy the given binfo, (not the just
2312 bases of the given base).
2313 * cp-tree.h (copy_base_binfo): Remove.
2314 (copy_binfo): Declare.
2316 2004-07-15 Mark Mitchell <mark@codesourcery.com>
2318 * name-lookup.c (set_inherited_value_binding_p): Add class_type
2320 (get_class_binding): Adjust.
2321 (push_class_level_binding): Don't use set_inherited_value_binding_p.
2323 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
2325 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
2326 * decl.c (xref_basetypes): Set it here.
2328 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
2329 Don't check for incomplete base.
2330 (get_vfield_name): Simplify while loop.
2331 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
2333 2004-07-14 Mark Mitchell <mark@codesourcery.com>
2335 * lex.c (cxx_make_type): Remove call to get_pointer_type.
2337 * cp-tree.h (IDENTIFIER_VALUE): Remove.
2338 (BINFO_PUSHDECLS_MARKED): Likewise.
2339 (maybe_inject_for_scope_var): Likewise.
2340 (push_class_decls): Likewise.
2341 * name-lookup.h (push_class_binding): Remove.
2342 (innermost_non_namespace_value): New function.
2343 (outer_binding): Likewise.
2344 * class.c (add_method): Push bindings before adding to
2346 (restore_class_cache): Do not restore class_shadowed.
2347 (pushclass): Do not add USING_DECLs. Do not call
2349 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
2350 * decl.c (pushdecl): Use outer_binding.
2351 (poplevel): Set the scope for an out-of-scope for-loop declaration
2353 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
2354 * name-lookup.c (new_class_binding): New function.
2355 (push_binding): Use it.
2356 (pushdecl): Use innermost_non_namespace_value.
2357 (maybe_inject_for_scope_var): Remove.
2358 (push_class_binding): Remove.
2359 (set_inherited_value_binding_p): New function.
2360 (get_class_binding): New function.
2361 (push_class_level_binding): Assert that the current_class_type is
2363 (outer_binding): New function.
2364 (innermost_non_namespace_value): Likewise.
2365 (lookup_name_real): Use outer_binding.
2366 (lookup_name_current_level): Ignore out-of-scope variables.
2367 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
2368 (lookup_template_class): Likewise.
2369 * search.c (dfs_push_type_decls): Remove.
2370 (dfs_push_decls): Likewise.
2371 (setup_class_bindings): Likewise.
2372 (lookup_field_1): Handle USING_DECLs from dependent scopes.
2373 (marked_pushdecls_p): Remove.
2374 (unmarked_pushdecls_p): Remove.
2375 (marked_identifiers): Remove.
2376 (setup_class_bindings): Remove.
2377 (dfs_push_type_decls): Remove.
2378 (dfs_push_decls): Remove.
2379 (push_class_decls): Remove.
2381 2004-07-13 Mark Mitchell <mark@codesourcery.com>
2385 * decl.c (grokvardecl): Make declspecs parameter const.
2386 (grokdeclarator): Likewise. Adjust accordingly.
2387 * decl.h (grokdeclarator): Adjust declaration.
2388 * parser.c (cp_parser_init_declarator): Do not clear
2389 decl_specifiers->attributes.
2391 * cp-tree.h (lang_identifier): Remove class_value.
2392 (IDENTIFIER_CLASS_VALUE): Remove.
2393 (pop_class_decls): Likewise.
2394 (init_search_processing): Likewise.
2395 * class.c (handle_using_decl): Use lookup_member, not
2396 IDENTIFIER_CLASS_VALUE.
2397 (restore_class_cache): New function, split out from ...
2398 (pushclass): ... here. Do not call clear_identifier_class_values.
2399 (invalidate_class_lookup_cache): Do not clear
2400 IDENTIFIER_CLASS_VALUE.
2401 (popclass): Do not call pop_class_decls.
2402 (maybe_note_name_used_in_class): Do not save names looked up after
2403 the class is complete. Use lookup_member, not
2404 IDENTIFIER_CLASS_VALUE.
2405 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
2406 * decl.c (cxx_init_decl_processing): Do not call
2407 init_search_processing.
2408 * method.c (do_build_copy_constructor): Remove unnecessary code.
2409 (do_build_assign_ref): Likewise.
2410 * name-lookup.c (pushdecl): Use lookup_member, not
2411 IDENTIFIER_CLASS_VALUE.
2412 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
2414 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
2415 (push_class_binding): Do not set it.
2416 (clear_identifier_class_values): Remove.
2417 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
2418 (store_binding): Do not save it.
2419 (pop_from_top_level): Do not restore it.
2420 * name-lookup.h (cxx_saved_binding): Remove class_value.
2421 (clear_identifier_class_values): Remove.
2422 * ptree.c (cxx_print_identifier): Do not print
2423 IDENTIFIER_CLASS_VALUE.
2424 * search.c (search_obstack): Remove.
2425 (push_stack_level): Remove.
2426 (pop_stack_level): Remove.
2427 (search_level): Remove.
2428 (search_stack): Remove.
2429 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
2430 (setup_class_bindings): Use IDENTIFIER_MARKED, not
2431 IDENTIFIER_CLASS_VALUE.
2432 (marked_identifiers): New variable.
2433 (push_class_decls): Clear IDENTIFIER_MARKED.
2434 (pop_class_decls): Don't call pop_search_level.
2435 (init_search_processing): Remove.
2437 2004-07-12 Mark Mitchell <mark@codesourcery.com>
2439 * cp-tree.h (get_aggr_typedef): Remove.
2440 * init.c (get_aggr_typedef): Likewise.
2442 * name-lookup.c (push_class_level_binding): Simplify.
2444 2004-07-12 Andrew Pinski <apinski@apple.com>
2448 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
2450 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
2453 2004-07-12 Eric Christopher <echristo@redhat.com>
2455 * parser.c (cp_parser_class_head): Remove unused variable.
2457 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2459 * decl.c (grok_op_properties): Reject [de-]allocation functions
2460 declared in a namespace, or declared as static.
2462 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
2464 * cp-tree.h (make_binfo): Remove.
2465 * decl.c (xref_basetypes): Use make_tree_binfo directly.
2466 * tree.h (copy_base_binfos): Likewise.
2467 (make_binfo): Remove.
2469 * call.c (build_user_type_conversion_1, build_new_op,
2470 check_constructor_callable, build_temp,
2471 perform_direct_initialization_of_possible): Pass type directly to
2472 lookup_fnfields & build_special_member_call.
2473 (build_special_member_call): Accept a type, and complete it.
2474 * class.c (finish_stuct_bits): Copy the BINFOs here.
2475 * cvt.c (ocp_convert): Pass type directly to
2476 build_special_member_call.
2477 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
2478 (xref_basetypes): Allocate the binfo here. Adjust.
2479 * init.c (build_init, build_new_1): Pass type directly to
2480 build_special_member_call.
2481 * lex.c (cxx_make_type): Do not allocate binfo here.
2482 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
2483 * parser.c (cp_parser_class_head): Always call xref_basetypes.
2484 * pt.c (instantiate_class_template): Likewise. Inhibit access
2485 checking for template friends.
2486 * ptree.c (cxx_print_type): Adjust record printing.
2487 * search.c (lookup_base): When taking a type, complete it before
2488 looking for a binfo.
2489 (lookup_member): Delay completing a type.
2490 (push_class_decls): Don't walk an incomplete type.
2491 (lookup_conversions): Likewise.
2492 * semantics.c (finish_stmt_expr_expr): Pass type directly to
2493 build_special_member_call.
2494 * tree.c (copy_base_binfos): Adjust.
2495 (make_binfo): Likewise.
2496 * typeck.c (build_modify_expr): Pass type directly to
2497 build_special_member_call.
2498 * typeck2.c (process_init_constructor): Check a binfo exists.
2499 (build_m_component_ref): Allow accessing an incomplete type.
2500 (build_functional_cast): Pass type directly to
2501 build_special_member_call.
2503 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2506 * config-lang.in (gtfiles): Add typeck2.c.
2507 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
2509 * cp-tree.h: Declare complete_type_check_abstract.
2510 * typeck2.c (pat_calc_hash, pat_compare,
2511 complete_type_check_abstract): New functions.
2512 (abstract_virtuals_error): If the type is abstract, register the
2513 declaration within abstract_pending_vars for further checks.
2514 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
2515 * decl.c (cp_finish_decl): Do not strip array types.
2516 (create_array_type_for_decl): Check for abstractness of the element
2518 (complete_vars): Call complete_type_check_abstract.
2519 * class.c (finish_struct): Prepare a list of virtual functions for
2520 template types, and call complete_vars on it to check for abstractness.
2522 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
2524 PR tree-optimization/14107
2525 * decl.c (finish_function): Remove temporary band-aid.
2527 2004-07-11 Mark Mitchell <mark@codesourcery.com>
2529 * call.c (build_operator_new_call): Avoid using push_to_top_level.
2530 (build_new_op): Adjust call to lookup_function_nonclass.
2531 * name-lookup.c (identifier_type_value): Adjust call to
2533 (lookup_name_real): Add block_p parameter.
2534 (lookup_name_nonclass): Adjust call to lookup_name_real.
2535 (lookup_function_nonclass): Likewise.
2536 (lookup_name): Likewise.
2537 * name-lookup.h (lookup_name_real): Change prototype.
2538 (lookup_name_nonclass): Likewise.
2539 * parser.c (cp_parser_lookup_name): Likewise.
2541 * cp-tree.h (saved_scope): Make old_bindings a vector.
2542 (unuse_fields): Remove.
2543 * name-lookup.h (cxx_saved_binding): Define it.
2544 * class.c (pushclass): Don't use unuse_fields.
2545 * name-lookup.c (cxx_saved_binding_make): Remove.
2546 (store_binding): Add new bindings to a vector, using an
2547 accumulator style, rather than adding them to a list.
2548 (store_bindings): Adjust accordingly.
2549 (store_class_bindings): Likewise.
2550 (push_to_top_level): Likewise.
2551 (pop_from_top_level): Likewise.
2552 * optimize.c (maybe_clone_body): Must push_to_top_level and
2553 pop_from_top_level calls outside of loop.
2554 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
2555 calls here from cp_parser_late_parsing_default_args.
2556 (cp_parser_save_default_args): Record the class type in which the
2557 function is declared.
2558 (cp_parser_late_parsing_default_args): Do not call
2559 push_nested_class/pop_nested_class.
2560 * search.c (dfs_unuse_fields): Remove.
2561 (unuse_fields): Remove.
2563 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
2565 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
2566 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
2567 * cp-tree.h (poplevel): Declare.
2568 (set_block): Remove.
2569 * decl.c (set_block): Remove.
2571 2004-07-10 Mike Stump <mrs@apple.com>
2573 * decl2.c (import_export_class): Never export/import vtables
2574 with inline key functions.
2576 2004-07-09 Steven Bosscher <stevenb@suse.de>
2578 * typeck.c (c_expand_asm_operands): Remove.
2580 2004-07-09 Mike Stump <mrs@apple.com>
2582 * typeck.c (build_class_member_access_expr): Skip null deref
2583 warning when we don't dereference it.
2585 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2589 * class.c (check_field_decls): Improve -Weffc++ warning: do not
2590 warn for pointers to functions/members, or for classes without
2593 2004-07-08 Mark Mitchell <mark@codesourcery.com>
2595 * name-lookup.h (struct cp_binding_level): Update documentation
2598 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2601 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
2602 returning CALL_EXPR, and non-reference return type.
2604 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
2606 * name-lookup.c (push_binding): Use VEC_reserve.
2608 2004-07-08 Richard Henderson <rth@redhat.com>
2610 * cp-tree.h (expand_eh_spec_block): Remove.
2612 2004-07-07 Mark Mitchell <mark@codesourcery.com>
2614 * cp-tree.h (saved_scope): Remove x_previous_class_type and
2615 x_previous_class_values; add x_previous_class_level.
2616 (previous_class_type): Remove.
2617 (previous_class_values): Remove.
2618 (previous_class_level): New macro.
2619 * class.c (pushclass): Restore the identifier cache more
2621 (invalidate_class_lookup_cache): Use vector for class_shadowed and
2622 previous_class_values.
2623 * decl.c (poplevel): Likewise.
2624 * name-lookup.c (cxx_binding_init): New function.
2625 (cxx_binding_make): Use it.
2626 (push_binding): For a binding in a class level, use a vector of
2627 cp_class_binding nodes.
2628 (push_binding_level): New function.
2629 (begin_scope): Use it.
2630 (leave_scope): Do not put class binding levels on the free list.
2631 (print_binding_level): Adjust for the fact that class_shadowed is
2633 (poplevel_class): Likewise.
2634 (clear_identifier_class_values): Likewise.
2635 (push_class_level_binding): Likewise.
2636 (set_class_shadows): Remove.
2637 (store_binding): New function.
2638 (store_class_bindings): New function.
2639 (push_to_top_level): Use store_class_bindings as appropriate.
2640 (pop_from_top_level): Use previous_class_level, not
2641 previous_class_type.
2642 * name-lookup.h (cp_class_binding): New type.
2643 (cp_binding_level): Use a vector object for class_shadowed.
2644 (push_binding_level): Declare.
2645 (set_class_shadows): Remove.
2647 2004-07-07 Andrew Pinski <apinski@apple.com>
2649 * class.c (instantiate_type): BUFFER_REF is dead.
2650 * lex.c (init_operators): IN_EXPR is dead.
2652 2004-07-07 Jason Merrill <jason@redhat.com>
2655 * call.c (build_new_op): Give overload warnings for built-in
2658 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
2661 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
2664 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
2666 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
2667 * class.c (build_primary_vtable, check_bases,
2668 determine_primary_base, finish_struct_bits,
2669 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
2670 get_basefndecls, warn_hidden, walk_subobject_offsets,
2671 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
2672 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
2673 finish_struct_1, get_vfield_name, contains_empty_class_p,
2674 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
2675 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
2676 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
2678 * decl.c (xref_basetypes): Likewise.
2679 * dump.c (cp_dump_tree): Likewise.
2680 * error.c (dump_expr): Likewise.
2681 * init.c (sort_mem_initializers, expand_member_init,
2682 push_base_cleanups): Likewise.
2683 * method.c (do_build_copy_constructor, do_build_assign_reg,
2684 synthesize_exception_spec): Likewise.
2685 * name-lookup.c (arg_assoc_class): Likewise.
2686 * pt.c (instantiate_class_template, tsubst,
2687 get_template_base_recursive): Likewise.
2688 * ptree.c (cxx_print_type): Likewise.
2689 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
2690 * search.c (lookup_base_r, dynamic_cast_base_recurse,
2691 dfs_access_in_type, access_in_type, lookup_field_queue_p,
2692 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
2693 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
2694 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
2695 binfo_for_vtable, copied_binfo, original_binfo): Likewise
2696 * tree.c (copy_base_binfos, make_binfo): Likewise.
2697 * typeck.c (commmon_base_type): Likewise
2698 * typeck2.c (process_init_constructor): Likewise
2700 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
2702 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
2704 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2707 * pt.c (convert_nontype_argument): Disallow conversions between
2708 different enumeration types.
2710 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
2712 * cp-tree.h (BINFO_MARKED): Remove.
2713 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
2714 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
2715 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
2716 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
2717 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
2718 (mark_primary_bases, determine_primary_base, base_derived_from,
2719 dfs_find_final_overrider, dfs_find_final_overrider_q,
2720 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
2721 dfs_modify_vtables, walk_subobject_offsets,
2722 layout_nonempty_base_or_field, build_base_field,
2723 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
2724 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
2725 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
2726 build_ctor_vtbl_group, accumulate_vtble_inits,
2727 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
2728 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
2729 add_vcall_offset_vtbl_entries_1): Likewise.
2730 * decl.c (xref_basetypes): Incomming virtual base indicated by
2732 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
2733 * init.c (finish_init_stmts, sort_mem_initializers,
2734 emit_mem_initializers, build_vtble_address, expand_member_init,
2735 push_base_cleanups): Likewise.
2736 * method.c (do_build_copy_constructor): Likewise.
2737 * pt.c (instantiate_class_template,
2738 get_template_base_recursive): Likewise.
2739 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
2740 get_pseudo_ti_desc): Likewise.
2741 * search.c (lookup_base_r, dynamic_cast_base_recurse,
2742 binfo_from_vbase, binfo_via_virtual, copied_binfo,
2743 original_binfo): Likewise.
2744 * semantics.c (finish_base_specifier): Virtualness is indicated
2746 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
2748 2004-07-06 Mark Mitchell <mark@codesourcery.com>
2751 2004-06-24 Jason Merrill <jason@redhat.com>
2753 * decl.c (grokparms): Give the PARM_DECL reference type if the
2754 parameter is passed by invisible reference.
2756 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2758 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
2759 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
2760 * pt.c (check_instantiated_args, unify): Likewise.
2762 2004-07-05 Phil Edwards <phil@codesourcery.com>
2764 * Make-lang.in (check-c++, lang_checks): Add some comments.
2766 2004-07-05 Zack Weinberg <zack@codesourcery.com>
2768 * cp-mudflap.c: Delete file.
2769 * Makefile.in: Remove all references to cp-mudflap.o.
2771 2004-07-05 Zack Weinberg <zack@codesourcery.com>
2773 * decl.c (cxx_init_decl_processing): Call
2774 build_common_tree_nodes before creating the global NAMESPACE_DECL.
2776 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2779 * call.c (build_operator_new_call): Look only at global scope.
2781 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
2783 * call.c (enforce_access): Expect TREE_BINFO.
2784 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
2785 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
2786 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
2788 (BINFO_LANG_ELTS): Remove.
2789 (BINFO_LANG_SLOTS): New.
2790 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
2791 (CLASSTYPE_TEMPLATE_INFO): Adjust.
2792 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
2793 * search.c (lookup_member): Check TREE_BINFO.
2794 * semantics.c (perform_or_defer_access_check): Likewise.
2795 (check_accessibility_of_qualified_id): Check
2796 deferred_access_no_check.
2797 * tree.c (make_binfo): Use make_tree_binfo.
2799 2004-07-04 Mark Mitchell <mark@codesourcery.com>
2801 * method.c (implicitly_declare_fn): Set linkage of generated
2804 2004-07-04 Richard Henderson <rth@redhat.com>
2806 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
2808 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
2811 * name-lookup.c (push_class_level_binding): Don't pass a
2812 TREE_LIST of ambiguous names to check_template_shadow as it
2813 only handles declarations. Instead, pull the declaration
2816 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2819 * pt.c (check_explicit_specialization): Clarify error message.
2821 2004-07-02 Richard Henderson <rth@redhat.com>
2823 * tree.c (cp_unsave_r): Update remap_save_expr call.
2825 2004-07-02 Mark Mitchell <mark@codesourcery.com>
2828 * mangle.c (write_template_arg): Correct mangling.
2831 * decl.c (grokdeclarator): Robustify.
2833 2004-07-01 Richard Henderson <rth@redhat.com>
2835 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
2836 * method.c (synthesize_method): Don't clear_last_expr.
2837 * name-lookup.c (maybe_push_cleanup_level): Likewise.
2839 2004-07-01 Nick Clifton <nickc@redhat.com>
2841 * decl2.c (import_export_class): Invoke the
2842 import_export_class field in the gcc_target structure if it is not
2845 2004-06-30 Richard Henderson (rth@redhat.com>
2847 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
2848 * method.c (use_thunk): Likewise.
2850 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
2852 * call.c (build_over_call), typeck.c (build_function_call): Call
2853 check_function_arguments instead of check_function_format.
2855 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
2857 * call.c (build_over_call), typeck.c (build_function_call): Update
2858 calls to check_function_format.
2860 2004-06-30 Richard Henderson <rth@redhat.com>
2862 * call.c (build_over_call): Use __builtin_memcpy for copying
2863 CLASS_AS_BASE rather than funny casting.
2865 2004-06-30 Richard Henderson <rth@redhat.com>
2867 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
2868 TYPE_SIZE_UNIT of full_type.
2870 2004-06-30 Per Bothner <per@bothner.com>
2872 Conditionally compile support for --enable-mapped_location.
2873 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
2874 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
2875 adjustments - which I don't understand.
2876 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
2877 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
2878 (print_instantiation_partial_context): Use expand_location.
2879 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
2880 * name-lookup.c: Likewise.
2881 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
2882 * name-lookup.c: Use input_line macro.
2883 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
2884 (cp_parser_statement): Rename locaal variable statement_locus to
2885 statement_location and use SET_EXPR_LOCATION macro.
2886 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
2887 * tree.c (cp_walk_subtrees): Likewise.
2889 2004-06-29 Per Bothner <per@bothner.com>
2891 * tree.c (build_min_nt, build_min, build_min_non_dep):
2892 Don't set TREE_COMPLEXITY from input_line.
2894 2004-06-29 Paul Brook <paul@codesourcery.com>
2896 * init.c: Include target.h.
2897 (get_cookie_size): Remove and replace with target hook.
2899 (build_new_1): Store the element size in the cookie.
2901 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
2904 * parser.c (cp_parser_template_declaration_after_export): Disable
2905 access checks here ...
2906 (cp_parser_class_specifier): ... not here.
2908 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
2910 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
2911 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
2912 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
2915 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
2917 * cp-tree.h (struct deferred_access): Move to ...
2918 * semantics.c (struct deferred_access): ... here. Adjust.
2919 (deferred_access_stack): Make a VEC(deferred_access),
2920 (deferred_access_free_list): Remove.
2921 (deferred_access_no_check): New.
2922 (push_deferring_access_checks, resume_deferring_access_checks,
2923 stop_deferring_access_checks, pop_deferring_access_checks,
2924 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
2925 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
2927 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
2930 * call.c (build_temp): Declare.
2931 (check_constructor_callable): New.
2932 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
2933 CONSTRUCTOR_CALLABLE.
2934 (convert_like_real, initialize_reference): Use
2935 check_constructor_callable.
2936 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
2937 (LOOKUP_*): Renumber.
2939 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
2941 * friend.c (add_friend): Only perform access checks when context
2943 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
2944 * parser.c (cp_parser_class_specifier): Disable access checks here
2945 when parsing the body of a templated class.
2946 * semantics.c (perform_or_defer_access_checks): Reorder to allow
2947 NULL binfos when not checking access.
2949 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
2951 Use vector API for vbase list.
2952 * cp-tree.h: Include vec.h
2953 (DEF_VEC_P (tree)): New type.
2954 (struct lang_type_class): Change vbase's member type.
2955 (binfo_for_vbase): Declare.
2956 * class.c (determine_primary_base, base_derived_from,
2957 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
2958 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
2959 build_vtbl_initializer): Adjust.
2960 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
2962 * init.c (sort_mem_initializers, expand_member_init,
2963 push_base_cleanups): Adjust.
2964 * method.c (do_build_copy_constructor): Adjust.
2965 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
2966 (binfo_for_vbase): New.
2967 * tree.c (copy_base_binfos): Adjust.
2969 2004-06-28 Mark Mitchell <mark@codesourcery.com>
2971 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
2973 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
2976 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
2977 paranthesis in case of pointers to array members.
2978 * error.c (dump_type_prefix): Likewise.
2979 (dump_type_suffix): Maybe issue a whitespace when printing
2982 2004-06-27 Mark Mitchell <mark@codesourcery.com>
2985 * parser.c (cp_parser_set_decl_spec_type): Refine test for
2986 redefinition of built-in types.
2988 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
2990 * error.c (pp_template_argument_list_start): Remove.
2991 (pp_template_argument_list_end): Likewise.
2992 (pp_separate_with_comma): Use pp_cxx_separate_with.
2993 (reinit_global_formatting_buffer): Remove.
2994 (pp_non_consecutive_character): Likewise.
2995 (dump_scope): Use pp_cxx_colon_colon.
2996 (dump_template_parameter): Use pp_cxx_identifier,
2997 pp_cxx_tree_identifier and pp_cxx_whitespace.
2998 (dump_templat_bindings): Replace use of pp_string with sequence
2999 of pp_cxx_whitespace and pp_equal.
3000 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
3001 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
3003 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
3004 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
3005 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
3006 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
3007 pp_cxx_right_bracket, pp_cxx_identifier throughout,
3008 (dump_decl): Likewise.
3009 (dump_template_decl): Likewise.
3010 (dump_function_decl): Likewise. Set padding as appropriate.
3011 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
3013 (dump_exception_spec): Likewise.
3014 (dump_function_name): Use pp_cxx_tree_identifier and
3016 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
3017 pp_cxx_end_template_argument_list.
3018 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
3019 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
3020 pp_cxx_whitespace throughout.
3021 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
3023 (dump_unary_op): Likewise.
3024 (reinit_cxx_pp): New function.
3025 (type_as_string); Use it.
3026 (expr_as_string): Likewise.
3027 (decl_as_string); Likewise.
3028 (context_as_string): Likewise.
3029 (lang_decl_name): Likewise.
3030 (decl_to_string): Likewise.
3031 (expr_to_string): Likewise.
3032 (parm_to_string): Likewise.
3033 (type_to_string): Likewise.
3034 (args_to_string): Likewise.
3035 (cv_to_string): Likewise.
3037 2004-06-26 Mark Mitchell <mark@codesourcery.com>
3039 * cp-tree.h (cp_cv_quals): New type.
3040 (cp_declarator): Use it instead of "tree" as appropriate.
3041 (grok_method_quals): Adjust prototype.
3042 (grokclassfn): Likewise.
3043 (do_friend): Likewise.
3044 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
3045 (grokdeclarator): Likewise.
3046 * decl2.c (grok_method_quals): Likewise.
3047 (grokclassfn): Likewise.
3048 * friend.c (do_friend): Likewise.
3049 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
3050 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
3051 (make_pointer_declarator): Likewise.
3052 (make_reference_declarator): Likewise.
3053 (make_ptrmem_declarator): Likewise.
3054 (cp_parser_ptr_operator): Likewise.
3055 (cp_parser_cv_qualifier_seq_opt): Likewise.
3056 (cp_parser_cv_qualifier_opt): Remove.
3057 (cp_parser_new_declarator_opt): Adjust call to
3058 cp_parser_ptr_operator.
3059 (cp_parser_conversion_declaration_opt): Likewise.
3060 (cp_parser_declarator): Use cp_cv_quals, not tree.
3061 (cp_parser_direct_declarator): Likewise.
3063 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3065 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
3066 Rename DECL_STMT to DECL_EXPR.
3067 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
3068 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
3069 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
3071 2004-06-26 Jan Hubicka <jh@suse.cz>
3074 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
3075 reachability analysis.
3077 2004-06-25 Mark Mitchell <mark@codesourcery.com>
3079 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
3082 2004-06-25 Paul Brook <paul@codesourcery.com>
3084 * decl2.c (get_guard): Call targetm.cxx.guard_type.
3085 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
3087 2004-06-24 Mark Mitchell <mark@codesourcery.com>
3089 * decl.c (grokdeclarator): Restore error messages about __thread.
3090 * parser.c (cp_parser_decl_specifier_seq): Likewise.
3092 2004-06-24 Jason Merrill <jason@redhat.com>
3095 * decl.c (grokparms): Give the PARM_DECL reference type if the
3096 parameter is passed by invisible reference.
3098 2004-06-24 Andreas Schwab <schwab@suse.de>
3100 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
3102 2004-06-23 Mark Mitchell <mark@codesourcery.com>
3104 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
3105 (cp/decl.o): Likewise.
3106 (cp/decl2.o): Likewise.
3107 (cp/pt.o): Likewise.
3108 (cp/semantics.o): Likewise.
3109 * config-lang.in (gtfiles): Do not reference cp/lex.h.
3110 * class.c: Do not include lex.h.
3111 (add_implicitly_declared_members): Do not use
3112 adding_implicit_members.
3113 (check_bases_and_members): Do not talk about grok_x_components.
3114 * cp/cp-tree.h (adding_implicit_members): Remove.
3115 (cp_storage_class): New type.
3116 (cp_decl_spec): Likewise.
3117 (cp_decl_specifier_seq): Likewise.
3118 (cp_parameter_declarator): Use it for the decl_specifiers field.
3119 (check_tag_decl): Adjust prototype.
3120 (shadow_tag): Likewise.
3121 (groktypename): Likewise.
3122 (start_decl): Likewise.
3123 (start_function): Likewise.
3124 (start_method): Likewise.
3125 (grok_x_components): Remove.
3126 (grokfield): Adjust prototype.
3127 (grokbitfield): Likewise.
3128 (finish_member_class_template): Remove.
3129 * decl.c: Do not include lex.h.
3130 (adding_implicit_members): Do not define.
3131 (check_tag_decl): Do not use trees to represent decl-specifiers.
3132 (shadow_tag): Likewise.
3133 (groktypename): Likewise.
3134 (start_decl): Likewise.
3135 (grokvardecl): Likewise.
3136 (grokdeclarator): Likewise.
3137 (grokparms): Likewise.
3138 (start_function): Likewise.
3139 (start_method): Likewise.
3140 * decl.h (grokdeclarator): Adjust prototype.
3141 * decl2.c: Do not include lex.h.
3142 (grok_x_components): Remove.
3143 (grokfield): Do not use trees to represent decl-specifiers.
3144 (grokbitfield): Likewise.
3145 * lex.c: Do not include lex.h.
3147 * parser.c: Include target.h.
3148 (clear_decl_specs): New function.
3149 (cp_parser_translation_unit): Do not use trees to represent
3151 (cp_parser_postfix_expression): Likewise.
3152 (cp_parser_new_type_id): Likewise.
3153 (cp_parser_condition): Likewise.
3154 (cp_parser_simple_declaration): Likewise.
3155 (cp_parser_decl_specifier_seq): Likewise.
3156 (cp_parser_function_specifier_opt): Likewise.
3157 (cp_parser_conversion_type_id): Likewise.
3158 (cp_parser_template_parameter): Likewise.
3159 (cp_parser_explicit_instantiation): Likewise.
3160 (cp_parser_type_specifier): Likewise.
3161 (cp_parser_simple_type_specifier): Likewise.
3162 (cp_parser_init_declarator): Likewise.
3163 (cp_parser_type_id): Likewise.
3164 (cp_parser_type_specifier_seq): Likewise.
3165 (cp_parser_parameter_declaration): Likewise.
3166 (cp_parser_member_declaration): Likewise.
3167 (cp_parser_exception_declaration): Likewise.
3168 (cp_parser_function_definition_from_specifiers_and_declarator):
3170 (cp_parser_single_declaration): Likewise.
3171 (cp_parser_save_member_function_body): Likewise.
3172 (cp_parser_friend_p): Likewise.
3173 (cp_parser_set_storage_class): New function.
3174 (cp_parser_set_decl_spec_type): Likewise.
3175 * pt.c: Do not include lex.h.
3176 * semantics.c: Likewise.
3177 (finish_member_class_template): Remove.
3179 2004-06-23 Roger Sayle <roger@eyesopen.com>
3181 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
3182 longer take both "args" and "convert_args" as arguments.
3183 (build_op_delete_call): Update call to build_cxx_call.
3184 (build_over_call): Likewise, update call to build_cxx_call.
3185 * cp-tree.h (build_cxx_call): Update funtion prototype.
3186 * typeck.c (build_function_call): Don't call expand_tree_builtin.
3187 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
3188 (throw_bad_typeid): Likewise.
3189 (build_dynamic_cast_1): Likewise.
3191 2004-06-22 Richard Henderson <rth@redhat.com>
3193 * class.c (build_vfn_ref): Take a pointer not object. Build
3195 (cp_fold_obj_type_ref): New.
3196 * call.c (build_over_call): Update build_vfn_ref call.
3197 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
3198 * cp-tree.h (cp_fold_obj_type_ref): Declare.
3200 2004-06-21 Jason Merrill <jason@redhat.com>
3203 * cp-gimplify.c (cp_gimplify_init_expr): Look through
3206 2004-06-21 Mark Mitchell <mark@codesourcery.com>
3208 * cp-tree.def (NEW_EXPR): Add a fourth slot.
3209 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
3210 (TREE_PARMLIST): Likewise.
3211 (CALL_DECLARATOR_PARMS): Likewise.
3212 (CALL_DECLARATOR_QUALS): Likewise.
3213 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
3214 (cp_declarator_kind): New type.
3215 (cp_parameter_declarator): Likewise.
3216 (cp_declarator): Likewise.
3217 (cp_error_declarator): Likewise.
3218 (no_parameters): Likewise.
3219 (groktypename): Change prototype.
3220 (start_decl): Likewise.
3221 (start_handler_parms): Likewise.
3222 (get_scope_of_declarator): Likewise.
3223 (start_function): Likewise.
3224 (start_preparsed_function): New function.
3225 (start_function): Change prototype.
3226 (start_method): Likewise.
3227 (grokfield): Likewise.
3228 (grokbitfield): Likewise.
3229 (build_new): Likewise.
3230 (make_pointer_declarator): Remove.
3231 (make_reference_declarator): Likewise.
3232 (make_call_declarator): Likewise.
3233 (set_quals_and_spec): Likewise.
3234 (process_template_parm): Change prototype.
3235 (begin_function_definition): Remove.
3236 (finish_parmlist): Remove.
3237 * decl.c (groktypename): Do not use trees to represent
3239 (start_decl): Likewise.
3240 (start_handler_parms): Remove.
3241 (get_scope_of_declarator): Reimplement.
3242 (grokdeclarator): Do not use trees to represent declarators.
3243 (grokparms): Likewise.
3244 (start_function): Likewise.
3245 (start_method): Likewise.
3246 (build_void_list_mode): Do not use TREE_PARMLIST.
3247 * decl.h (grokdeclarator): Change prototype.
3248 * decl2.c (grok_method_quals): Robustify.
3249 (grok_x_components): Do not use trees to represent declarators.
3250 (grokfield): Likewise.
3251 (grokbitfield): Likewise.
3252 (start_objects): Build FUNCTION_DECLs, not declarators.
3253 (start_static_storage_duration_function): Likewise.
3254 * init.c (build_new): Simplify.
3255 * lex.c (make_pointer_declarator): Remove.
3256 (make_reference_declarator): Likewise.
3257 (make_call_declarator): Likewise.
3258 (set_quals_and_spec): Likewise.
3259 * method.c (use_thunk): Use start_preparsed_function.
3260 (synthesize_method): Likewise.
3261 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
3262 * optimize.c (maybe_clone_body): Use start_preparsed_function.
3263 * parser.c (cp_error_declarator): New variable.
3264 (declarator_obstack): Likewise.
3265 (alloc_declarator): New function.
3266 (make_declarator): Likewise.
3267 (make_id_declarator): Likewise.
3268 (make_pointer_declarator): Likewise.
3269 (make_reference_declarator): Likewise.
3270 (make_ptrmem_declarator): Likewise.
3271 (make_call_declarator): Likewise.
3272 (make_array_declarator): Likewise.
3273 (no_parameters): New variable.
3274 (make_parameter_declarator): Likewise.
3275 (cp_parser_check_for_definition_in_return_type): Do not use trees
3276 to represent declarators.
3277 (cp_parser_translation_unit): Likewise.
3278 (cp_parser_new_expression): Likewise.
3279 (cp_parser_new_type_id): Likewise.
3280 (cp_parser_new_declarator_opt): Likewise.
3281 (cp_parser_direct_new_declarator): Likewise.
3282 (cp_parser_condition): Likewise.
3283 (cp_parser_declaration_statement): Likewise.
3284 (cp_parser_declaration): Likewise.
3285 (cp_parser_conversion_type_id): Likewise.
3286 (cp_parser_conversion_declarator_opt): Likewise.
3287 (cp_parser_template_parameter_list): Likewise.
3288 (cp_parser_template_parameter): Likewise.
3289 (cp_parser_explicit_instantiation): Likewise.
3290 (cp_parser_init_declarator): Likewise.
3291 (cp_parser_declarator): Likewise.
3292 (cp_parser_direct_declarator): Likewise.
3293 (cp_parser_type_id): Likewise.
3294 (cp_parser_parameter_declaration_clause): Likewise.
3295 (cp_parser_parameter_declaration_list): Likewise.
3296 (cp_parser_parameter_declaration): Likewise.
3297 (cp_parser_member_declaration): Likewise.
3298 (cp_parser_exception_declaration): Likewise.
3299 (cp_parser_check_declarator_template_parameters): Likewise.
3300 (cp_parser_function_definition_from_specifiers_and_declarator):
3302 (cp_parser_save_member_function_body): Likewise.
3303 * pt.c (process_template_parm): Add is_non_type parameter.
3304 (convert_template_argument): Adjust call to groktypename.
3305 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
3306 (tsubst): Do not expect declarators.
3307 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
3309 (instantiate_decl): Use start_preparsed_function.
3310 * semantics.c (begin_function_definition): Remove.
3311 (finish_parmlist): Remove.
3312 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
3315 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3317 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
3318 (build_new_method_call): Likewise.
3319 * decl.c (local_variable_p_walkfn): Don't walk into types.
3320 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
3321 (build_anon_union_vars): Add new operand for COMPONENT_REF.
3322 * init.c (buld_new): Add new operand for ARRAY_REF.
3323 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
3324 (do_build_assign_ref): Likewise.
3325 * parser.c (cp_parser_direct_new_declarator): Add new operands
3327 (cp_parser_direct_declarator): Likewise.
3328 * pt.c (tsubst): Likewise.
3329 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
3331 * semantics.c (finish_non_static_data_member): Add new operand
3333 * typeck.c (build_class_member_access_expr): Likewise.
3334 (build_class_member_access_expr, finish_class_member_access_expr):
3336 (build_ptrmemfunc_access_expr): Likewise.
3337 (build_array_ref): Add new operands for ARRAY_REF.
3338 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
3339 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
3341 2004-06-21 Richard Henderson <rth@redhat.com>
3343 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
3344 * parser.c (cp_parser_jump_statement): Update commentary.
3345 * pt.c (tsubst_expr): Use RETURN_EXPR.
3346 * semantics.c (finish_return_stmt): Likewise.
3347 (finalize_nrv_r): Likewise.
3348 * typeck.c, typeck2.c: Update file start commentary.
3350 2004-06-21 Richard Henderson <rth@redhat.com>
3352 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
3354 2004-06-20 Richard Henderson <rth@redhat.com>
3356 * cp-tree.h (add_decl_stmt): Declare.
3357 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
3358 * semantics.c (maybe_cleanup_point_expr): New.
3359 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
3360 finish_for_expr, finish_switch_cond): Use it.
3361 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
3363 2004-06-20 Richard Henderson <rth@redhat.com>
3365 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
3366 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
3367 (cp_gimplify_expr): Call it.
3368 (gimplify_cleanup_stmt): Move from c-gimplify.c.
3369 (cp_genericize): New.
3370 * decl.c (finish_function): Call it.
3371 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
3372 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
3373 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
3374 (cp_genericize): Declare.
3375 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
3376 * dump.c (cp_dump_tree): Likewise.
3377 * semantics.c (push_cleanup): Move from c-semantics.c.
3379 2004-06-20 Zack Weinberg <zack@codesourcery.com>
3381 * cp-lang.c (has_c_linkage): Implement.
3383 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
3384 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
3385 (builtin_function_1): Don't call make_decl_rtl.
3386 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
3387 (grokvardecl): Don't call mangle_decl.
3388 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
3389 DECL_ASSEMBLER_NAME.
3390 * method.c (set_mangled_name_for_decl): Delete.
3391 * name-lookup.c (pushdecl): When a local extern shadows a
3392 file-scope declaration of the same object, give both DECLs the
3394 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
3395 on DECL_ASSEMBLER_NAME.
3397 2004-06-19 Richard Henderson <rth@redhat.com>
3399 * cp-gimplify.c: Remove unnecessary prototypes.
3400 (cp_gimplify_stmt): Merge into ...
3401 (cp_gimplify_expr): ... here. Move to end of file. Handle
3402 stmts_are_full_exprs_p frobbing.
3403 * cp-tree.h (cp_gimplify_stmt): Remove.
3404 * pt.c (tsubst_expr): Merge prep_stmt and unify.
3405 * tree.c (init_tree): Don't set lang_gimplify_stmt.
3407 2004-06-18 Richard Henderson <rth@redhat.com>
3410 * semantics.c (begin_cond): New.
3411 (finish_cond): Rewrite to handle template DECL_STMTs specially.
3412 Assume that non-template decls go land before the conditional.
3413 (simplify_loop_decl_cond): Likewise.
3414 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
3415 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
3416 begin_switch_stmt, finish_switch_cond): Update to match.
3418 2004-06-17 Jason Merrill <jason@redhat.com>
3421 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
3422 (finish_stmt_expr_expr): Update type after conversions.
3423 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
3424 Handle void initializer.
3425 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
3427 2004-06-17 Geoffrey Keating <geoffk@apple.com>
3429 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
3430 * cp-tree.h (defer_fn): Delete.
3431 * decl2.c (defer_fn): Delete.
3432 (finish_file): Simplify deferred_fns loops; check that
3433 only used inline functions get into deferred_fns.
3434 (mark_used): Inline previous contents of defer_fn.
3436 2004-06-16 Richard Henderson <rth@redhat.com>
3438 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
3439 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
3440 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
3441 of CTOR_INITIALIZER ...
3442 (pp_cxx_statement): ... here.
3443 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
3444 (finish_function): Use alloc_stmt_list to zap entire function.
3445 * parser.c (cp_parser_compound_statement): Update commentary.
3446 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
3447 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
3448 (finish_stmt_expr): Don't look through COMPOUND_STMT.
3450 2004-06-16 Geoffrey Keating <geoffk@apple.com>
3452 * pt.c (mark_decl_instantiated): Don't call defer_fn.
3454 2004-06-16 Richard Henderson <rth@redhat.com>
3456 * parser.c (cp_parser_labeled_statement): Update commentary.
3457 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
3458 * tree.c (mark_local_for_remap_r): Likewise.
3460 2004-06-16 Richard Henderson <rth@redhat.com>
3462 * parser.c (cp_parser_asm_definition): Update commentary.
3463 * pt.c (tsubst_expr): Use ASM_EXPR.
3464 * semantics.c (finish_asm_stmt): Likewise.
3466 2004-06-16 Richard Henderson <rth@redhat.com>
3468 * decl.c (finish_destructor_body): Use LABEL_EXPR.
3469 * parser.c (cp_parser_statement): Update commentary.
3470 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
3471 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
3472 * tree.c (mark_local_for_remap_r): Likewise.
3474 2004-06-16 Richard Henderson <rth@redhat.com>
3477 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
3478 statement in FOR_INIT_STMT for templates.
3480 2004-06-15 Richard Henderson <rth@redhat.com>
3482 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
3483 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
3484 (genericize_try_block): Use gimplify_stmt.
3485 (genericize_catch_block, genericize_eh_spec_block): Likewise.
3486 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
3487 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
3488 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
3489 (cp_tree_chain_matters_p): Remove.
3490 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
3491 (COMPOUND_STMT_BODY_BLOCK): New.
3492 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
3493 (EXPR_STMT_STMT_EXPR_RESULT): New.
3494 (building_stmt_tree): Check cur_stmt_list.
3495 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
3496 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
3497 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
3498 (cp_finish_decl): Use push_cleanup.
3499 (start_function, finish_function): Use statement lists.
3500 (finish_stmt): Do nothing.
3501 * except.c (begin_eh_spec_block): Use statement lists.
3502 (check_handlers_1, check_handlers): Likewise.
3503 * init.c (construct_virtual_base): Don't add extra compound stmts.
3504 (build_vec_init): Likewise.
3505 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
3506 * name-lookup.h (struct cp_binding_level): Add statement_list.
3507 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
3508 (cp_parser_labeled_statement, cp_parser_expression_statement,
3509 cp_parser_statement_seq_opt): Likewise.
3510 (cp_parser_compound_statement): Likewise. Take bool for try block.
3511 (cp_parser_selection_statement): Tidy if processing.
3512 (cp_parser_already_scoped_statement): Rewrite to do what it says.
3513 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
3514 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
3515 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
3516 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
3517 (finish_cond): New, rewritten from FINISH_COND.
3518 (simplify_loop_decl_cond): New.
3519 (finish_expr_stmt): Avoid nested EXPR_STMTs.
3520 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
3521 begin_else_clause, finish_else_clause, finish_if_stmt,
3522 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
3523 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
3524 finish_for_cond, finish_for_stmt, begin_switch_stmt,
3525 finish_switch_cond, finish_switch_stmt, begin_try_block,
3526 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
3527 finish_handler_sequence, finish_function_handler_sequence,
3528 begin_handler, finish_handler_parms, finish_handler,
3529 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
3530 using statement lists.
3531 (begin_compound_stmt): Replace has_no_scope argument with flags.
3532 Update all callers. Use statement lists.
3533 (finish_compound_stmt): Likewise.
3534 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
3535 (current_scope_stmt_stack): Remove.
3536 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
3537 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
3538 Rewrite with statement lists.
3540 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
3542 * parser.c: Change all assignments of c_lex_string_translate
3543 to true and false to 1 and 0.
3544 (cp_lexer_read_token): Convert type of the translated string.
3545 (cp_parser_skip_to_closing_parentheses): Preserve original
3546 value of c_lex_string_translate, and set it to -1 while
3548 (cp_parser_cache_group): Likewise.
3549 (cp_parser_cache_group_1): Renamed.
3550 (cp_parser_asm_operand_list): Remove redundant setting of
3551 c_lex_string_translate.
3552 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
3553 Handle chained strings.
3555 2004-06-12 Andrew Pinski <apinski@apple.com>
3559 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
3561 * cp-tree.h: Fix typo.
3563 * cp-tree.h: Include cgraph.h
3564 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
3565 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
3567 2004-06-12 Jason Merrill <jason@redhat.com>
3569 PR tree-optimization/14107
3570 * decl.c (finish_function): Warn about no return in all functions.
3572 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
3574 * cp-tree.h (struct language_function): Remove cannot_inline.
3575 * decl.c (save_function_data): cannot_inline is no more.
3576 (cxx_push_function_context): Likewise.
3577 * decl2.c (start_objects, start_static_storage_duration_function):
3578 Reset DECL_INLINE, set DECL_UNINLINABLE.
3580 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3583 * search.c (lookup_field): Propagate the ambiguity list.
3584 (lookup_fnfields): Likewise.
3586 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3589 * parser.c (cp_parser_template_name): Ctors/dtors never need a
3590 template keyword to disambiguate.
3592 2004-06-14 Mark Mitchell <mark@codesourcery.com>
3595 * decl.c (grokdeclarator): Ignore pointer-to-members when
3596 computing template depth.
3599 * name-lookup.c (pushtag): Do not try to put class declarations in
3600 explicit specialization scopes.
3602 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
3604 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
3606 2004-06-11 Mark Mitchell <mark@codesourcery.com>
3609 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
3610 bindings for undeclared built-ins.
3612 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3614 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
3615 appear at the correct location.
3617 2004-06-10 Jason Merrill <jason@redhat.com>
3621 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3622 * init.c (build_offset_ref): Build SCOPE_REF with non-null
3623 TREE_TYPE for non-dependent names.
3624 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
3625 unknown_type_node as its TREE_TYPE.
3626 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
3627 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
3628 (dump_expr) <SCOPE_REF case>: Likewise.
3630 2004-06-10 Mark Mitchell <mark@codesourcery.com>
3633 * parser.c (cp_parser_direct_declarator): Robustify.
3636 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
3637 constants in non-dependent contexts.
3641 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
3644 2004-06-10 Jakub Jelinek <jakub@redhat.com>
3647 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
3650 2004-06-09 Mark Mitchell <mark@codesourcery.com>
3654 2004-06-07 Mark Mitchell <mark@codesourcery.com>
3655 * lex.c (handle_pragma_interface): Deprecate.
3656 (handle_pragma_implementation): Likewise.
3658 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
3660 * g++spec.c (lang_specific_driver): Remove check for -lm
3661 and -lmath when check it see if it was the math library.
3663 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3666 * parser.c (cp_parser_direct_declarator): Reject constructor named
3667 as qualified template-id.
3669 2004-06-07 Mark Mitchell <mark@codesourcery.com>
3672 * lex.c (handle_pragma_interface): Deprecate.
3673 (handle_pragma_implementation): Likewise.
3675 2004-06-07 Mark Mitchell <mark@codesourcery.com>
3678 * parser.c (cp_parser_iteration_statement): Fix typo in error
3682 * pt.c (tsubst_default_argument): Do not defer access checks
3683 while substituting into the default argument.
3686 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
3687 constant in a non-dependent context.
3690 * except.c (build_throw): Ensure that temp_expr has been
3693 2004-06-06 Roger Sayle <roger@eyesopen.com>
3695 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
3697 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3700 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
3701 'typename', and accept 'template'.
3703 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
3704 Jan Hubicka <jh@suse.cz>
3707 * method.c (use_think): Do not mark thunk as referenced.
3709 2004-06-03 Matt Austern <austern@apple.com>
3712 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
3713 is nonzero, and if we see a noninline definition of a key method,
3714 make the vtables nonweak.
3716 2004-06-02 Matt Austern <austern@apple.com>
3718 * cp-tree.h (instantiate_decl): new boolean parameter,
3719 undefined_ok. Current behavior is equivalent to its being 0.
3720 * decl2.c (mark_used): Add new argument when calling instantiate_decl
3721 * pt.c (mark_decl_instantiated): Unconditionally make
3722 instantiations explicit unconditionally
3723 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
3724 since mark_decl_instantiated now does it.
3725 (instantiate_class_member): New. Instantiate a member of an
3726 explicitly instantiated class template.
3727 (do_type_instantiation): Explicitly instantiate members of an
3728 explicitly instantiated class template.
3729 (instantiate_decl): if undefined_ok is nonzero, and if we're
3730 trying to explicitly instantiated a template with no definition,
3731 change it to an implicit instantiation.
3732 (instantiate_pending_templates): Add new argument to instantiate_decl.
3733 * tree.c (cp_cannot_inline_tree_fn): Likewise.
3735 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
3737 * cp-tree.h: Fix typo.
3739 * cp-tree.h: Include cgraph.h
3740 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
3741 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
3743 2004-06-01 Jason Merrill <jason@redhat.com>
3746 * call.c (call_builtin_trap): Remove type parm.
3747 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
3748 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
3750 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3753 * init.c (build_offset_ref): Build SCOPE_REF with non-null
3754 TREE_TYPE for non-dependent names.
3755 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
3756 unknown_type_node as its TREE_TYPE.
3757 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
3758 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
3759 (dump_expr) <SCOPE_REF case>: Likewise.
3761 2004-06-01 Richard Henderson <rth@redhat.com>
3762 Andrew Pinski <pinskia@physics.uc.edu>
3764 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
3765 * parser.c (struct cp_parser): Remove in_offsetof.
3766 (cp_parser_new): Don't set it.
3767 (cp_parser_unary_expression): Don't check it.
3768 (cp_parser_postfix_open_square_expression): Split out from ...
3769 (cp_parser_postfix_expression): ... here.
3770 (cp_parser_postfix_dot_deref_expression): Likewise.
3771 (cp_parser_builtin_offsetof): New.
3772 (cp_parser_primary_expression): Use it.
3774 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3777 * parser.c (cp_parser_postfix_expression): Allow subscript
3778 operator in offsetof.
3780 2004-05-31 Mark Mitchell <mark@codesourcery.com>
3783 * friend.c (add_friend): Do not try to perform access checks for
3784 functions from dependent classes.
3786 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
3788 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
3789 (pp_cxx_begin_template_argument_list): Turn into a function.
3790 (pp_cxx_end_template_argument_list): Likewise.
3791 (pp_cxx_separate_with): Define.
3792 (pp_cxx_unqualified_id): Tidy.
3793 (pp_cxx_primary_expression): Likewise.
3794 (pp_cxx_postfix_expression): Likewise.
3795 (pp_cxx_expression): Likewise.
3796 (pp_cxx_simple_type_specifier): Likewise.
3797 (pp_cxx_type_specifier_seq): Likewise.
3798 (pp_cxx_parameter_declaration_clause): Likewise.
3799 (pp_cxx_exception_specification): Likewise.
3800 (pp_cxx_direct_declarator): Likewise.
3801 (pp_cxx_type_id): Likewise.
3802 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
3804 (pp_cxx_left_paren): Likewise.
3805 (pp_cxx_right_paren): Likewise.
3806 (pp_cxx_left_brace): Likewise.
3807 (pp_cxx_right_brace): Likewise.
3808 (pp_cxx_left_bracket): Likewise.
3809 (pp_cxx_right_bracket): Likewise.
3810 (pp_cxx_dot): Likewise.
3811 (pp_cxx_identifier): Likewise.
3812 (pp_cxx_tree_identifier): Likewise.
3813 (pp_cxx_ampersand): New macro.
3814 (pp_cxx_star): Likewise.
3815 (pp_cxx_arrow): Likewise.
3816 (pp_cxx_semicolon): Likewise.
3817 (pp_cxx_complement): Likewise.
3818 (pp_cxx_begin_template_argument_list): Declaree.
3819 (pp_cxx_end_template_argument_list): Likewise.
3820 (pp_cxx_colon_colon): likewise.
3822 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
3824 * parser.c (cp_parser_simple_type_specifier): Explicitly test
3827 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
3829 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
3830 typeck.c: Fix comment formatting.
3832 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
3834 * cp-lang.c (cp_expand_decl): Remove.
3835 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
3837 2004-05-30 Andreas Jaeger <aj@suse.de>
3839 * lang-specs.h: Add missing initializers for .ii.
3841 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
3843 * decl.c (cp_make_fname_decl): Free return value from
3846 2004-05-28 Mark Mitchell <mark@codesourcery.com>
3849 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
3851 * init.c (build_new): Likewise.
3854 * name-lookup.c (arg_assoc): Robustify.
3857 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
3858 when determining the scope to use for a pointer to member.
3859 (lookup_anon_field): Give it external linkage.
3860 * cp-tree.h (lookup_anon_field): Declare it.
3861 * expr.c (cplus_expand_constant): Use it.
3863 2004-05-28 Mark Mitchell <mark@codesourcery.com>
3866 * parser.c (cp_parser_simple_type_specifier): Call
3867 maybe_note_name_used_in_class.
3869 2004-05-28 Tom Marshall <tmarshall@real.com>
3872 * class.c (finish_struct_1): Warn only if the dtor is non-private or
3873 the class has friends.
3875 2004-05-27 Adam Nemet <anemet@lnxw.com>
3878 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
3879 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
3881 2004-05-24 Geoffrey Keating <geoffk@apple.com>
3883 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
3884 if it might be needed.
3885 * pt.c (mark_decl_instantiated): Only call defer_fn if
3886 the function actually needs processing in finish_file.
3887 * decl2.c (finish_file): Add check that elements in
3888 deferred_fns_used are really needed there. Remove unnecessary
3889 test of DECL_SAVED_TREE.
3891 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
3893 * Make-lang.in: No need to specify $(LIBCPP).
3895 2004-05-23 Mark Mitchell <mark@codesourcery.com>
3898 * parser.c (cp_parser_class_head): Robustify.
3901 * parser.c (cp_parser_decl_specifier_seq): Correct error in
3903 (cp_parser_constructor_declarator_p): Treat attributes
3907 * typeck.c (build_unary_op): Do not attempt to resolve casts to
3908 base classes in templates.
3910 2004-05-23 Mark Mitchell <mark@codesourcery.com>
3913 * pt.c (instantiate_template): Robustify.
3915 2004-05-23 Mark Mitchell <mark@codesourcery.com>
3918 * decl.c (xref_tag): Issue errors about redeclaring template
3919 classes as non-template classes.
3921 2004-05-23 Mark Mitchell <mark@codesourcery.com>
3924 * name-lookup.c (supplement_binding): Allow redefinitions of
3928 * parser.c (cp_parser_template_argument): Robustify.
3930 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3932 * class.c (alter_access): Use %E format specifier to print an
3933 identifier node. Avoid looking at the IDENTIFIER_POINTER.
3934 (push_lang_context): Likewise.
3935 * decl.c (lookup_label): Likewise.
3936 (grokdeclarator): Likewise.
3937 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
3938 * pt.c (do_type_instantiation): Likewise.
3939 * tree.c (handle_java_interface_attribute): Likewise.
3940 (handle_com_interface_attribute): Likewise.
3941 (handle_init_priority_attribute): Likewise.
3943 2004-05-22 Mark Mitchell <mark@codesourcery.com>
3947 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
3948 recognized as overloaded functions.
3950 2004-05-22 Mark Mitchell <mark@codesourcery.com>
3953 * class.c (layout_nonempty_base_or_field): Do not try to avoid
3954 layout conflicts for unions.
3957 * typeck.c (build_x_unary_op): Instantiate template class
3958 specializations before looking for "operator &".
3961 * typeck.c (complete_type): Layout non-dependent array types, even
3965 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
3968 2004-05-22 Roger Sayle <roger@eyesopen.com>
3970 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
3971 returning when TREE_TYPE is error_mark_node.
3972 * typeck.c (require_complete_type): Return error_mark_node if
3973 value's type is an error_mark_node.
3975 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
3977 * optimize.c (calls_setjmp_r): Remove.
3978 (calls_setjmp_p): Remove.
3979 * cp-tree.c (calls_setjmp_p): Remove.
3980 * decl.c (finish_function): Do not call calls_setjmp_p.
3982 2004-05-18 Zack Weinberg <zack@codesourcery.com>
3984 * decl.c (cp_finish_decl): Use mark_decl_referenced.
3985 * decl2.c (maybe_make_one_only): Likewise.
3986 * method.c (use_thunk): Likewise.
3988 2004-05-18 Jason Merrill <jason@redhat.com>
3990 * class.c (build_base_path): Tidy a bit.
3992 2004-05-14 Geoffrey Keating <geoffk@apple.com>
3994 * name-lookup.c (struct scope_binding): New.
3995 (EMPTY_SCOPE_BINDING): New.
3996 (lookup_using_namespace): Take a scope_binding instead of a
3998 (qualified_lookup_using_namespace): Likewise.
3999 (cxx_binding_clear): Delete.
4000 (do_nonmember_using_decl): Use a scope_binding instead of a
4002 (lookup_tag): Don't call select_decl.
4003 (ambiguous_decl): Don't return anything (and change callers to match).
4004 Take a scope_binding as the second parameter.
4005 (lookup_namespace_name): Use a scope_binding instead of a
4007 (unqualified_namespace_lookup): Likewise.
4008 (lookup_qualified_name): Likewise.
4009 (select_decl): Take a scope_binding instead of a cxx_binding.
4010 Use macros rather than hand-coding tests for type-ness.
4012 2004-05-13 Diego Novillo <dnovillo@redhat.com>
4014 * cp-gimplify.c: Rename from cp-simplify.c.
4015 * Make-lang.in, optimize.c: Update.
4017 2004-05-13 Diego Novillo <dnovillo@redhat.com>
4019 Merge from tree-ssa-20020619-branch. See
4020 ChangeLog.tree-ssa for details.
4022 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
4023 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
4024 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
4025 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
4027 * cp-mudflap.c: New file.
4028 * cp-simplify.c:: New file.
4030 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4033 * decl2.c (check_classfn): For member templates, compare also the
4034 template parameters to match the declaration.
4035 * cp-tree.h: Adjust declaration of check_classfn.
4036 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
4037 * friend.c (do_friend): Likewise.
4038 * pt.c (tsubst_friend_function): Likewise.
4040 2004-05-01 Zack Weinberg <zack@codesourcery.com>
4042 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
4043 Instead, dig into the representation type to find the array bound.
4045 2004-04-30 Jason Merrill <jason@redhat.com>
4047 Refer to base members using COMPONENT_REFs where possible.
4048 * class.c (build_simple_base_path): New fn.
4049 (build_base_path): Use it for non-virtual base references.
4050 (layout_class_type): Change base fields to their real type
4051 after layout is done.
4052 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
4053 * cp-lang.c (cxx_get_alias_set): Use it.
4055 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
4057 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
4060 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4063 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
4064 used in integral constant expressions.
4066 2004-04-22 Mark Mitchell <mark@codesourcery.com>
4068 * init.c (build_aggr_init): Fix accidental use of C99 construct in
4071 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
4073 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
4074 * decl.c (reshape_init): Use it.
4075 * init.c (perform_member_init): Remove redundant condition.
4076 (build_aggr_init): Adjust to handle brace-enclosed initializers
4078 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
4080 * parser.c (cp_parser_initializer_clause): Do not set
4081 TREE_HAS_CONSTRUCTOR on the initializer.
4082 * rtti.c (tinfo_base_init): Likewise.
4083 (generic_initializer): Likewise.
4084 (ptr_initializer): Likewise.
4085 (ptm_initializer): Likewise.
4086 (class_initializer): Likewise.
4087 (get_pseudo_ti_init): Likewise.
4088 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
4090 2004-04-22 Alan Modra <amodra@bigpond.net.au>
4092 * name-lookup.c (anonymous_namespace_name): Make static.
4094 2004-04-19 Roger Sayle <roger@eyesopen.com>
4097 * class.c (build_base_path): Call fold whilst building the NULL
4098 pointer check expression trees.
4100 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
4102 * init.c (build_new_1): Don't use type size argument for Java
4103 _Jv_AllocObject call.
4105 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
4107 * method.c (make_alias_for_thunk): Remove preprocessor guard on
4108 declaration and definition.
4110 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
4113 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
4114 than ASM_OUTPUT_DEF.
4116 2004-04-08 Jakub Jelinek <jakub@redhat.com>
4118 * decl2.c (mark_used): Don't segfault if cfun != NULL but
4119 current_function_decl == NULL.
4121 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
4124 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
4127 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4129 * init.c (decl_constant_value): Don't look at DECL_INITIAL
4131 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
4132 or TREE_SIDE_EFFECTS of a type.
4134 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
4137 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
4138 cv-qualifier unification.
4139 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
4141 2004-04-02 Jan Hubicka <jh@suse.cz>
4143 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
4144 * cp-tree.h (cp_update_decl_after_saving): Declare.
4145 * tree.c (cp_update_decl_after_saving): Define.
4147 2004-04-01 Mark Mitchell <mark@codesourcery.com>
4150 * typeck.c (get_delta_difference): Call fold before returning the
4153 2004-04-01 Richard Henderson <rth@redhat.com>
4156 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
4157 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
4159 2004-04-01 Mark Mitchell <mark@codesourcery.com>
4162 * name-lookup.c (maybe_push_cleanup_level): Robustify.
4164 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4166 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
4168 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4170 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
4171 * class.c (check_bitfield_decl): Likewise.
4172 * cvt.c (type_promotes_to): Likewise.
4173 * decl.c (finish_enum): Likewise.
4174 * mangle.c (write_builtin_type): Likewise.
4175 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
4176 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
4177 (build_binary_op): Likewise.
4179 2004-03-31 Jan Hubicka <jh@suse.cz>
4181 * tree.h (optimize_function): Kill prototype.
4182 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
4183 * semantics.c (expand_body): Kill.
4185 2004-03-30 Mark Mitchell <mark@codesourcery.com>
4188 * decl.c (start_decl_1): Do not decide whether or not to create a
4189 new cleanup level until after the type has been completed.
4192 * pt.c (tsubst_default_argument): Clear current_function_decl.
4194 2004-03-30 Zack Weinberg <zack@codesourcery.com>
4196 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
4198 2004-03-29 Zack Weinberg <zack@codesourcery.com>
4200 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
4201 is null, just print the literal name and return.
4203 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
4205 * cxx-pretty-print.c: Fix comment typos.
4207 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
4209 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
4212 2004-03-23 Ziemowit Laski <zlaski@apple.com>
4214 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
4215 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
4218 2004-03-23 Zack Weinberg <zack@codesourcery.com>
4220 PR 12267, 12391, 12560, 13129, 14114, 14133
4221 * cp-lang.c (c_reset_state): Delete.
4222 (push_file_scope, pop_file_scope): New stubs.
4223 * parser.c (c_parse_file): Call sorry() here if called more than once.
4225 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4227 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
4230 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4232 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
4234 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
4236 * error.c (enum pad): Remove.
4237 (dump_qualifiers): Likewise.
4238 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
4239 (dump_aggr_type): Likewise.
4240 (dump_type_suffix): Likewise.
4241 (dump_simple_decl): Likewise.
4242 (dump_function_decl): Likewise.
4243 (cv_to_string): Likewise.
4244 (dump_type_prefix): Likewise. Adjust return void.
4245 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
4247 (pp_cxx_template_keyword_if_needed): Document.
4248 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
4249 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
4250 MUST_NOT_THROW_EXPR.
4252 2004-03-21 Mark Mitchell <mark@codesourcery.com>
4255 * decl.c (cp_finish_decl): Compute the size of arrays declared in
4256 templates, if their type is non-dependent.
4258 2004-03-19 Mark Mitchell <mark@codesourcery.com>
4260 * call.c (build_op_delete_call): Do not forget the placement
4261 arguments when iterating through mutiple delete operators.
4263 * cp-tree.h (svaed_scope): Remove last_parms.
4264 (NEW_DELETE_OPNAME_P): New macro.
4265 (last_function_parms): Remove.
4266 (do_friend): Adjust prototype.
4267 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
4268 using last_function_parms.
4269 (grokfndecl): Take the PARM_DECLs as an argument, rather than
4270 using last_function_parms.
4271 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
4272 for class-specific operator new and operator delete.
4273 (grok_op_properties): Do not look for allocation functions with
4275 (start_function): Use DECL_ARGUMENTS instead of
4276 last_function_parms.
4277 * decl.h (last_function_parms): Do not declare.
4278 * decl2.c (grokclassfn): Do not use last_function_parms.
4279 * friend.c (do_friend): Remove parmdecls parameter.
4280 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
4281 (pop_from_top_level): Do not restore it.
4282 * pt.c (check_explicit_specialization): Do not adjust
4283 last_function_parms.
4285 * name-lookup.c (do_local_using_decl): Create a local binding for
4286 types brought in via using declarations.
4288 * name-lookup.c (lookup_arg_dependent): Handle block-scope
4289 function declarations correctly.
4291 * semantics.c (finish_id_expression): Correct handling of
4292 conversion operators to dependent types.
4294 * typeck.c (lookup_destructor): Allow the use of destructors from
4297 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4299 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
4300 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
4301 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
4302 the field is named TEMPLATE_TYPE_PARM_INDEX.
4304 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4307 * parser.c (cp_parser_functional_cast): A cast to anything
4308 but integral or enumaration type is not an integral constant
4310 * pt.c (value_dependent_expression_p): Handle cast expressions
4311 without operands (such as "int()").
4313 2004-03-18 Mark Mitchell <mark@codesourcery.com>
4315 * semantics.c (finish_pseudo_destructor_expr): Allow differing
4316 cv-qualification between the type named by the
4317 pseudo-destructor-name and the object-type.
4319 * search.c (accessible_base_p): Handle non-proper bases.
4321 * name-lookup.c (do_nonmember_using_decl): If a using declaration
4322 refers to a single overloaded function, set the type of the
4324 * tree.c (lvalue_type): Simplify.
4325 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
4327 (build_unary_op): Handle OVERLOADs with known types.
4329 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
4332 * parser.c (cp_parser_postfix_expression): Handle the use of
4333 "typename" in non-dependent contexts. Convert appropriately when
4334 when using a qualified name after "->" or ".".
4336 * call.c (conditional_conversion): Honor the requirement that some
4337 conversions refer to the original object.
4339 2004-03-18 Mark Mitchell <mark@codesourcery.com>
4341 * call.c (build_conditional_expr): Do not call force_rvalue for
4342 operands of void_type when the conditional expression itself has
4344 * name-lookup.c (pushdecl): Don't consider a declaration of a
4345 function named "main" to be an overload of a type named "main".
4346 * parser.c (cp_parser_template_name): Perform name lookup when the
4347 template name is proceeded by "template" if the qualifying scope
4349 * typeck.c (composite_pointer_type_r): Correctly handle
4350 pointer-to-member types.
4351 (build_const_cast): Likewise.
4353 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4355 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
4356 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
4357 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
4358 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
4359 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
4360 (TYPEOF_TYPE_EXPR): New macro.
4361 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
4362 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
4363 * pt.c (tsubst): Likewise.
4364 * semantics.c (finish_typeof): Likewise.
4365 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
4366 and TEMPLATE_TYPE_PARM.
4367 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
4368 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
4370 2004-03-16 Mark Mitchell <mark@codesourcery.com>
4373 * cp-tree.h (build_new_op): Change prototype.
4374 (build_x_binary_op): Likewise.
4375 * call.c (build_new_op): Add overloaded_p parameter.
4376 * decl2.c (grok_array_decl): Adjust call to build_new_op.
4377 * parser.c (cp_parser_binary_expression): Note that uses of
4378 overloaded operators prevents an expression from being considered
4379 an integral constant.
4380 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
4382 * semantics.c (finish_call_expr): Likewise.
4383 * typeck.c (rationalize_conditional_expr): Likewise.
4384 (build_x_indirect_ref): Likewise.
4385 (build_x_binary_op): Likewise.
4386 (build_x_unary_op): Likewise.
4387 (build_x_compound_expr): Likewise.
4388 (build_modify_expr): Likewise.
4389 * typeck2.c (build_x_arrow): Likewise.
4391 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
4393 * cp-lang.c, ptree.c: Update copyright.
4395 2004-03-13 Mark Mitchell <mark@codesourcery.com>
4398 * parser.c (cp_parser_non_integral_constant_expression): Encode
4399 more of the idiom that surrounded calls to this function within
4401 (cp_parser_primary_expression): Adjust accordingly.
4402 (cp_parser_postfix_expression): Likewise.
4403 (cp_parser_unary_expression): Likewise.
4404 (cp_parser_cast_expression): Likewise.
4405 (cp_parser_assignment_expression): Likewise.
4406 (cp_parser_expression): Likewise.
4407 (cp_parser_new_expression): Note that new-expressions are not
4408 allowed in integral constant expressions.
4409 (cp_parser_delete_expression): Likewise.
4411 2004-03-12 Matt Austern <austern@apple.com>
4413 * decl2.c (maybe_make_one_only): Look at
4414 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
4415 to make an explicit instantiation weak.
4416 * method.c (use_thunk): Make sure we call comdat_linkage
4418 * pt.c (do_type_instantiation): On systems where weak symbols
4419 don't go in a static archive's TOC, explicit instantiation of a
4420 class must imply *explicit* instantiation of its memeber.
4422 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
4424 * call.c, cp-tree.h, pt.c: Fix comment typos.
4426 2004-03-10 Mark Mitchell <mark@codesourcery.com>
4429 * decl.c (xref_tag): Disregard non-type declarations when
4430 looking up a tagged type.
4432 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
4435 * call.c (convert_like_real): Build a const qualified temporary,
4436 when testing ctor access.
4438 2004-03-09 Mark Mitchell <mark@codesourcery.com>
4440 * call.c (initialize_reference): Fix typo.
4442 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4445 * pt.c (determine_specialization): For member templates, match also
4449 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
4451 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
4453 2004-03-09 Mark Mitchell <mark@codesourcery.com>
4456 * call.c (initialize_reference): Handle initializers that are
4457 class-member access expressions applies to rvalues.
4459 2004-03-09 Mark Mitchell <mark@codesourcery.com>
4462 * name-lookup.c (supplement_binding): Ignore functions that are
4463 marked DECL_ANTICIPATED.
4465 2004-03-08 Mark Mitchell <mark@codesourcery.com>
4468 * class.c (check_field_decls): Complain about non-static data
4469 members of reference type in unions. Propagate
4470 CLASSTYPE_REF_FIELDS_NEED_INIT and
4471 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
4473 * init.c (perform_member_init): Complain about mbmers with const
4474 type that are not explicitly initialized.
4476 2004-03-08 Mark Mitchell <mark@codesourcery.com>
4478 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
4479 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
4480 (lang_identifier): Remove implicit_decl and error_locus.
4481 (IDENTIFIER_IMPLICIT_DECL): Remove.
4482 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
4483 (IDENTIFIER_ERROR_LOCUS): Likewise.
4484 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
4485 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
4486 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
4487 (implicitly_declare): Remove.
4488 * decl.c (warn_extern_redeclared_static): Remove check of
4489 IDENTIFIER_IMPLICIT_DECL.
4490 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
4491 (implicitly_declare): Remove.
4492 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
4493 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
4494 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
4495 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
4496 in the innermost scope, rather than at namespace scope.
4497 * name-lookup.c (push_local_binding): Give it external linkage.
4498 (pushdecl): Remove dead code.
4499 * name-lookup.h (push_local_binding): Declare it.
4500 * ptree.c (cxx_print_identifier): Don't print
4501 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
4502 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
4503 not IDENTIFIER_ERROR_LOCUS.
4504 * typeck.c (build_function_call): Remove dead code.
4506 2004-03-08 Jason Merrill <jason@redhat.com>
4509 * decl.c (xref_tag): Remove attribute handling.
4510 * cp-tree.h: Adjust prototype.
4511 * decl.c, parser.c, rtti.c: Adjust callers.
4512 * parser.c (cp_parser_class_head): Pass back attributes in the
4514 (cp_parser_class_specifier): Adjust.
4516 2004-03-08 Matt Austern <austern@apple.com>
4519 * name-lookup.c (add_decl_to_level): Add extern variables, as well
4520 as static, to static_decls array.
4522 2004-03-05 Jason Merrill <jason@redhat.com>
4524 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
4526 2004-03-04 Geoffrey Keating <geoffk@apple.com>
4528 * decl.c (grokfndecl): Update old incorrect comment.
4529 (grokvardecl): Diagnose C++ variables of type with no linkage.
4531 2004-03-01 Mark Mitchell <mark@codesourcery.com>
4534 * pt.c (build_non_dependent_expr): Do not create a
4535 NON_DEPENDENT_EXPR for a THROW_EXPR.
4537 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
4540 * error.c (dump_expr): Handle THROW_EXPR.
4542 2004-03-01 Mark Mitchell <mark@codesourcery.com>
4545 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
4546 lookup if ordinary name-lookup finds a non-function.
4547 * pt.c (tsubst_copy_and_build): Likewise.
4550 * parser.c (cp_parser_late_parsing_default_args): Check that there
4551 are no extra tokens after the end of the default-argument
4554 2004-03-01 Mark Mitchell <mark@codesourcery.com>
4557 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
4558 having C++ linkage for name-mangling purposes.
4561 * parser.c (cp_parser_direct_declarator): Recognize constructor
4562 declarators that use a template-id to name the class being
4566 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
4567 (tsubst_expr): Do not call tsubst_copy, even when
4568 processing_template_decl.
4570 2004-03-01 Jeff Law <law@redhat.com>
4572 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
4575 2004-02-29 Mark Mitchell <mark@codesourcery.com>
4578 * name-lookup.h (push_scope): Change prototype.
4579 * name-lookup.c (push_scope): Do not reenter the current class
4581 * decl.c (grokfndecl): Check return code from push_scope before
4583 * decl2.c (check_classfn): Likewise.
4584 * parser.c (cp_parser_conversion_function_id): Likewise.
4585 (cp_parser_init_declarator): Likewise.
4586 (cp_parser_direct_declarator): Likewise.
4587 (cp_parser_class_specifier): Likewise.
4588 (cp_parser_class_head): Likewise.
4589 (cp_parser_lookup_name): Likewise.
4590 (cp_parser_constructor_declarator_p): Likewise.
4591 * pt.c (instantiate_class_template): Likewise.
4592 (resolve_typename_type): Likewise.
4594 2004-02-29 Mark Mitchell <mark@codesourcery.com>
4597 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
4601 * class.c (update_vtable_entry_for_fn): Do not go through
4602 covariance machinery if the type returned by an overrider is the
4603 same as the original.
4605 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
4607 * call.c: Fix a comment typo.
4609 2004-02-27 Ziemowit Laski <zlaski@apple.com>
4611 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
4613 2004-02-26 Mark Mitchell <mark@codesourcery.com>
4616 * parser.c (cp_parser_parameter_declaration_list): Commit
4617 to fewer tentative parses.
4619 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4622 * pt.c (dependent_type_p_r): A template template parameter is a
4625 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4628 * mangle.c (write_template_arg_literal): Don't rely on identity for
4631 2004-02-24 Jason Merrill <jason@redhat.com>
4633 * tree.c (build_exception_variant): Use check_qualified_type.
4635 2004-02-23 Zack Weinberg <zack@codesourcery.com>
4636 Kazu Hirata <kazu@cs.umass.edu>
4638 * decl.c (cxx_init_decl_processing): Don't check
4639 flag_writable_strings.
4641 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
4644 * typeck.c (maybe_warn_about_returning_address_of_location):
4645 Change check for VAR_DECL to use DECL_P instead.
4647 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4650 * cvt.c (build_expr_type_conversion): Type must be complete before
4651 looking up for conversions.
4653 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4656 * name-lookup.c (arg_assoc_class): Don't look into template
4657 arguments if it is not a primary template.
4659 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4662 * method.c (use_thunk): Always clone function argument tree.
4664 2004-02-20 Mark Mitchell <mark@codesourcery.com>
4667 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
4670 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
4671 for all type variants.
4673 2004-02-19 Mark Mitchell <mark@codesourcery.com>
4676 * decl.c (duplicate_decls): Return error_mark_node for invalid
4678 * name-lookup.c (push_namespace): Ignore the return value from
4680 * pt.c (push_template_decl_real): Robustify.
4683 * name-lookup.c (push_class_level_binding): Do not complain about
4684 adding a binding for a member whose name is the same as the
4685 enclosing class if the member is located in a base class of the
4688 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4691 * parser.c (cp_parser_new_expression): Parse an ill-formed
4692 direct-new-declarator after a parenthesized type-id to emit good
4695 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
4697 * cp-tree.def, cvt.c: Update copyright.
4699 2004-02-17 Mark Mitchell <mark@codesourcery.com>
4702 * cp-tree.h (abi_version_at_least): Remove.
4703 * mangle.c: Include flags.h.
4705 2004-02-15 Mark Mitchell <mark@codesourcery.com>
4708 * call.c (build_conditional_expr): Handle conversions between
4709 class types which result in differently cv-qualified type
4713 * class.c (delete_duplicate_fields_1): Remove.
4714 (delete_duplicate_fields): Likewise.
4715 (finish_struct_anon): Remove check for members with the same name
4716 as their enclosing class.
4717 (check_field_decls): Do not call duplicate_fields.
4718 * decl.c (grokdeclarator): Remove check for static data members
4719 with the same name as their enclosing class.
4720 * name-lookup.c (push_class_level_binding): Check for members with
4721 the same name as their enclosing class.
4723 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
4726 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
4728 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4731 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
4732 has full set of arguments.
4734 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4737 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
4739 2004-02-13 Mark Mitchell <mark@codesourcery.com>
4742 * cp-tree.h (delete_sanity): Change prototype.
4743 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
4744 Remove dead code. Adjust code to warn about deleting an array.
4745 * typekc.c (decay_conversion): Use build_address and build_nop.
4748 * search.c (accessible_p): Do not check access in thunks.
4751 * call.c (build_conditional_expr): Call force_rvalue on the
4752 non-void operand in the case that one result is a throw-expression
4753 and the other is not.
4755 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
4758 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
4759 the type name and look ahead for ::~, and bail out early with a
4760 better error message if the parse is going to fail.
4762 2004-02-12 Mark Mitchell <mark@codesourcery.com>
4764 * call.c (conversion_kind): New type.
4765 (conversion_rank): Likewise.
4766 (conversion): Likewise.
4767 (CONVERSION_RANK): New macro.
4768 (conversion_obstack): New variable.
4769 (obstack_initialized): Likewise.
4770 (z_candidate): Change type of convs and second_conv.
4771 (candidate_warning): New type.
4772 (IDENTITY_RANK): Remove.
4773 (EXACT_RANK): Likewise.
4774 (PROMO_RANK): Likewise.
4775 (STD_RANK): Likewise.
4776 (PBOOL_RANK): Likewise.
4777 (USER_RANK): Likewise.
4778 (ELLIPSIS_RANK): Likewise.
4779 (BAD_RANK): Likewise.
4780 (ICS_RANK): Likewise.
4781 (ICS_STD_RANK): Likewise.
4782 (ICS_USER_FLAG): Likewise.
4783 (ICS_ELLIPSIS_FLAG): Likewise.
4784 (ICS_THIS_FLAG): Likewise.
4785 (ICS_BAD_FLAG): Likewise.
4786 (NEED_TEMPORARY_P): Likewise.
4787 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
4788 (USER_CONV_CAND): Likewise.
4789 (USER_CONV_FN): Likewise.
4790 (conversion_obstack_alloc): New function.
4791 (alloc_conversion): Likewise.
4792 (validate_conversion_obstack): Likewise.
4793 (alloc_conversions): Likewise.
4794 (build_conv): Adjust to deal with new conversion data structures.
4795 (build_identity_conv): New function.
4796 (build_ambiguous_conv): Likewise.
4797 (standard_conversion): Adjust to deal with new conversion data
4799 (convert_class_to_reference): Likewise.
4800 (direct_reference_binding): Likewise.
4801 (reference_binding): Likewise.
4802 (implicit_conversion): Likewise.
4803 (add_candidate): Likewise.
4804 (add_function_candidate): Likewise.
4805 (add_conv_candidate): Likewise.
4806 (build_builtin_candidate): Likewise.
4807 (print_z_candidate): Likewise.
4808 (merge_conversion_sequences): Likewise.
4809 (build_user_type_conversion_1): Likewise.
4810 (build_user_type_conversion): Likewise.
4811 (build_new_function_call): Likewise.
4812 (build_object_call): Likewise.
4813 (conditional_conversion): Likewise.
4814 (build_conditional_expr): Likewise.
4815 (build_new_op): Likewise.
4816 (build_op_delete_call): Likewise.
4817 (convert_like_real): Likewise.
4818 (build_over_call): Likewise.
4819 (build_new_method_call): Likewise.
4820 (is_subseq): Likewise.
4821 (maybe_handle_implicit_object): Likewise.
4822 (maybe_handle_ref_bind): Likewise.
4823 (compare_ics): Likewise.
4824 (source_type): Likewise.
4825 (add_warning): Likewise.
4827 (can_convert_arg): Likewise.
4828 (can_convert_arg_bad): Likewise.
4829 (perform_implicit_conversion): Likewise.
4830 (perform_direct_initialization_if_possible): Likewise.
4831 (initialize_reference): Likewise.
4832 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
4833 * cp-tree.def (WRAPPER): Likewise.
4834 (IDENTITY_CONV): Remove.
4835 (LVALUE_CONV): Likewise.
4836 (QUAL_CONV): Likewise.
4837 (STD_CONV): Likewise.
4838 (PTR_CONV): Likewise.
4839 (PMEM_CONV): Likewise.
4840 (BASE_CONV): Likewise.
4841 (REF_BIND): Likewise.
4842 (USER_CONV): Likewise.
4843 (AMBIG_CONV): Likewise.
4844 (RVALUE_CONV): Likewise.
4845 * cp-tree.h (tree_wrapper): Remove.
4846 (WRAPPER_ZC): Remove.
4847 (lang_tree_node): Remove wrapper.
4848 (LOOKUP_SPECULATIVELY): Remove.
4849 (build_op_delete_call): Adjust prototype.
4850 (validate_conversion_obstack): Declare.
4851 (build_zc_wrapper): Remove.
4852 * cvt.c (convert_to_reference): Remove dead code.
4853 (ocp_convert): Likewise.
4854 * decl.c (redeclaration_error_message): Correct handling of
4856 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
4857 (cp_tree_node_structure): Remove WRAPPER case.
4858 * decl2.c (finish_file): Call validate_conversion_obstack.
4859 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
4860 (build_op_delete_call): Likewise.
4861 (build_x_delete): Likewise.
4862 (build_delete): Adjust call to build_op_delete_call.
4863 * pt.c (tsubst_friend_declaration): Adjust code to determine
4864 whether or not a friend template is a definition.
4865 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
4866 * tree.c (build_zc_wrapper): Remove.
4868 2004-02-12 Zack Weinberg <zack@codesourcery.com>
4870 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
4871 * cp-tree.h: Don't declare cxx_builtin_type_decls.
4872 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
4873 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
4875 2004-02-10 Mark Mitchell <mark@codesourcery.com>
4877 * typeck.c (lookup_destructor): Fix typo in error message.
4879 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
4881 * call.c, parser.c, tree.c: Fix comment typos.
4883 2004-02-07 Zack Weinberg <zack@codesourcery.com>
4886 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
4887 * decl.c (duplicate_decls, start_function): Likewise.
4889 2004-02-07 Zack Weinberg <zack@codesourcery.com>
4891 * name-lookup.c (pushdecl): Issue shadow warnings directly.
4892 * parser.c (free_parser_stacks): Delete.
4894 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
4896 * rtti.c: Update copyright.
4898 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4901 * decl.c (require_complete_types_for_parms): Do not insert
4902 error_mark_node in the parameter list.
4904 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4907 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
4908 error when terminator can not be found.
4910 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
4912 Make-lang.in (po-generated): Delete.
4914 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
4916 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
4917 targetm.calls.promote_prototypes.
4919 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
4923 2004-01-15 Geoffrey Keating <geoffk@apple.com>
4925 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
4926 (handle_pragma_implementation): Likewise.
4928 2004-02-05 Mark Mitchell <mark@codesourcery.com>
4931 * typeck.c (lookup_destructor): Tweak error message.
4933 2004-02-05 Jan Hubicka <jh@suse.cz>
4935 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
4938 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4941 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
4942 code, only emits the diagnostic now. Added lookup of the identifier
4943 and support for qualified ids.
4944 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
4945 Parse an (invalid) type name as id-expression within a declarator.
4946 (cp_parser_simple_declaration): Use it.
4947 (cp_parser_member_declaration): Likewise.
4948 (cp_parser_make_typename_type): New function. Handle errors through
4949 cp_parser_diagnose_invalid_typename.
4950 (cp_parser_elaborated_type_specifier): Use it.
4952 2004-02-04 Mark Mitchell <mark@codesourcery.com>
4955 * call.c (convert_like_real): Use "converting" rather than
4956 "argument" as the descriptive keyword to
4957 dubious_conversion_warnings.
4958 * typeck.c (convert_for_assignment): Do not call
4959 dubious_conversion_warnings.
4961 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4964 * init.c (build_delete): Emit a more informative error message in
4965 case of an incomplete type, and on the correct source line.
4967 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
4969 * error.c, search.c: Update copyright.
4971 2004-02-04 Mark Mitchell <mark@codesourcery.com>
4974 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
4975 linkage for the typeinfo name string.
4977 2004-02-04 Mark Mitchell <mark@codesourcery.com>
4980 * cp-tree.h (fold_non_dependent_expr): New function.
4981 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
4982 (cp_parser_template_argument): Use fold_non_dependent_expr.
4983 (cp_parser_direct_declarator): Likewise.
4984 * pt.c (fold_non_dependent_expr): New function.
4985 (convert_nontype_argument): Use it.
4986 (tsubst_qualified_id): Simplify.
4987 (tsubst_copy_and_build): Likewise.
4989 2004-02-04 Mark Mitchell <mark@codesourcery.com>
4991 * decl.c (cxx_push_function_context): Do not set
4992 current_function_is_thunk.
4993 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
4996 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4999 * pt.c (more_specialized_class): Increase processing_template_decl
5000 while partial ordering.
5002 2004-02-03 Mark Mitchell <mark@codesourcery.com>
5005 * decl.c (start_function): Do not call pushdecl for any
5006 instantiation or specialization of a primary template.
5008 2004-02-03 Mark Mitchell <mark@codesourcery.com>
5011 * parser.c (cp_parser_class_name): Robustify.
5014 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
5017 * semantics.c (finish_id_expression): Do not return an
5018 IDENTIFIER_NODE when lookup finds a PARM_DECL.
5020 2004-02-03 Mark Mitchell <mark@codesourcery.com>
5023 * pt.c (build_non_dependent_expr): Do not build
5024 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
5027 * semantics.c (finish_id_expression): Do not return an
5028 IDENTIFIER_NODE when lookup finds a VAR_DECL.
5031 * parser.c (cp_parser_simple_declaration): When skipping to the
5032 end of the statement swallow the terminating semicolon.
5034 2004-02-02 Mark Mitchell <mark@codesourcery.com>
5037 * init.c (build_offset_ref): Improve error recovery for invalid
5038 uses of non-static member functions.
5041 * cp-tree.h (cp_build_type_attribute_variant): New function.
5042 * class.c (build_clone): Use cp_build_type_attribute_variant.
5043 * decl.c (duplicate_decls): Likewise.
5044 * pt.c (copy_default_args_to_explicit_spec): Likewise.
5045 (tsubst_function_type): Likewise.
5046 * tree.c (build_exception_variant): Check attributes before
5047 concluding that two types are the same.
5048 (cp_build_type-attribute_variant): New method.
5049 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
5052 * call.c (convert_class_to_reference): Keep better track of
5053 pedantically invalid user-defined conversions.
5055 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5058 * pt.c (tsubst_qualified_id): Improved error message when a type
5059 is expected but not found.
5061 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
5063 * class.c: Fix comment typos.
5065 * error.c: Likewise.
5066 * parser.c: Likewise.
5068 * search.c: Likewise.
5069 * typeck.c: Likewise.
5071 2004-01-30 Richard Henderson <rth@redhat.com>
5074 * method.c (use_thunk): Don't force_target_expr for void thunks.
5075 * tree.c (build_target_expr_with_type): Assert non-void type.
5076 (force_target_expr): Likewise.
5078 2004-01-30 Michael Matz <matz@suse.de>
5080 * parser.c (cp_parser_labeled_statement): Accept case ranges.
5082 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5086 * decl.c (grokdeclarator): Check immediatly type completeness for
5087 non-dependent types.
5089 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5092 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
5093 a sizeof expression.block
5095 2004-01-29 Mark Mitchell <mark@codesourcery.com>
5098 * mangle.c (write_encoding): Correct encoding of member template
5101 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5103 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
5104 template name as it was `<::' (digraph typo).
5105 (cp_parser_nth_token_starts_template_argument_list_p): New function.
5106 (cp_parser_id_expression): Use it.
5107 (cp_parser_nested_name_specifier_opt): Likewise.
5108 (cp_parser_template_name): Likewise.
5109 (cp_parser_class_name): Likewise.
5110 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
5112 2004-01-28 Mark Mitchell <mark@codesourcery.com>
5115 * typeck.c (merge_types): Do not merge attributes into
5119 * parser.c (cp_parser_direct_declarator): Do not prevent
5120 backtracking inside a parenthesized declarator.
5121 (cp_parser_parameter_declaration): Fix typo in comment.
5123 2004-01-28 Jan Hubicka <jh@suse.cz>
5125 * semantics.c (expand_body) Do emit_associated_thunks before
5128 2004-01-27 Devang Patel <dpatel@apple.com>
5130 * name-lookup.c: Include "debug.h"
5131 (do_namespace_alias): Invoke debug_hooks to emit debug info
5132 for namespace alias.
5133 (do_local_using_decl): Invoke debug_hooks to emit debug info
5135 (do_class_using_decl): Same.
5136 (do_toplevel_using_decl): Same.
5137 (do_using_directive): Same.
5138 (cp_emit_debug_info_for_using): New function.
5139 * Make-lang.in (cp/parser.o): Depend on debug.h
5140 (cp/name-lookup.o): Same.
5142 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5144 * cp-tree.h (language_function, lang_type_header): Use
5146 * name-lookup.h (cp_binding_level): Likewise.
5148 2004-01-26 Mark Mitchell <mark@codesourcery.com>
5151 * semantics.c (finish_for_expr): Check for unresolved overloaded
5154 * class.c (add_method): Just check processing_template_decl to
5155 determine whether or not we are within a template.
5156 * decl2.c (maybe_retrofit_in_chrg): Likewise.
5157 * init.c (decl_constant_value): Check the type of the declaration,
5159 * name-lookup.c (maybe_push_to_top_level): Rename to ...
5160 (push_to_top_level): ... this.
5161 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
5162 * pt.c (push_template_decl_real): Reorder condition for speed.
5163 (convert_template_argument): Use dependency-checking functions in
5164 place of uses_template_parms.
5165 (lookup_template_class): Avoid calling uses_template_parms more
5167 (uses_template_parms): Reimplement, using dependency-checking
5169 (instantiate_class_template): Use push_to_top_level, not
5170 maybe_push_to_top_level.
5171 (type_unification_real): Simplify.
5172 (type_dependent_expression_p): Handle OFFSET_REFs and
5174 (any_dependent_template_arguments_p): Handle multiple levels of
5176 * semantics.c (expand_or_defer_fn): Do not check
5177 uses_template_parms for template instantiations.
5178 * typeck.c (comptypes): Avoid calling cp_type_quals.
5180 2004-01-25 Mark Mitchell <mark@codesourcery.com>
5183 * call.c (build_over_call): Do not convert arguments when
5184 processing a template.
5185 * pt.c (build_non_dependent_expr): Do not build a
5186 NON_DEPENDENT_EXPR for arithmetic constants.
5188 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5191 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
5192 returns a TYPE_DECL. no further lookup is required.
5193 * semantics.c (check_template_template_default_arg): A TYPE_DECL
5194 is invalid. Rework to give better diagnostics.
5196 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5199 * pt.c (instantiate_class_template): Add an error_mark_node
5201 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
5203 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
5206 * decl.c (finish_function): Move the call to
5207 finish_fname_decls below the call to
5208 finish_eh_spec_block.
5210 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
5212 * optimize.c, typeck2.c: Update copyright.
5214 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
5216 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
5217 init.c, mangle.c, typeck.c: Update copyright.
5219 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
5221 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
5223 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
5225 * Make-lang.in: Replace $(docdir) with doc.
5226 (c++.info, c++.srcinfo): Dummy entry.
5227 (c++.man, c++.srcman): New rules.
5228 (c++.install-man): Revamp rule.
5230 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
5232 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
5233 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
5234 immediate $(shell) instead of deferred backquote.
5236 2004-01-19 Mark Mitchell <mark@codesourcery.com>
5239 * parser.c (cp_parser_postfix_expression): When encountering
5240 incomplete type on left-hand side of "->" or ".", treat the entire
5241 expression as erroneous.
5244 * call.c (build_field_call): Remove.
5245 (n_build_method_call): Likewise.
5246 (build_method_call): Likewise.
5247 (build_new_method_call): Do not call build_field_call.
5248 * class.c (n_build_method_call): Remove.
5249 (print_class_statistics): Do not print it.
5250 * cp-tree.h (build_method_call): Remove declaration.
5251 (finish_object_call_expr): Likewise.
5252 (build_new_1): Do not use build_method_call.
5253 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
5254 when the function appearing on the right-hand-side of "." or "->"
5255 is not actually a function.
5256 * pt.c (tsubst_copy_and_build): Likewise.
5257 * semantics.c (finish_object_call_expr): Remove.
5259 2004-01-18 Mark Mitchell <mark@codesourcery.com>
5262 * pt.c (tsubst): Use finish_typeof.
5264 2004-01-18 Jason Merrill <jason@redhat.com>
5267 * except.c (build_throw): In a template, set
5268 current_function_returns_abnormally.
5270 2004-01-17 Fred Fish <fnf@intrinsity.com>
5273 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
5274 except don't call array_type_nelts() with a VECTOR_TYPE.
5276 2004-01-16 Jan Hubicka <jh@suse.cz>
5278 * mangle.c (write_mangled_name): Remove inline modifier.
5280 2004-01-16 Mark Mitchell <mark@codesourcery.com>
5283 * decl.c (compute_array_index_type): Fix grammar in comment.
5284 * init.c (build_zero_init): Handle zero-sized arrays correctly.
5287 * call.c (name_as_c_string): Print conversion operator names
5291 * call.c (initialize_reference): Pass -1 for inner parameter to
5294 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5297 * parser.c (cp_parser_base_specifier): Check for an invalid
5298 keyword `typename' and emit an user-friendly error message.
5300 2004-01-15 Geoffrey Keating <geoffk@apple.com>
5303 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
5304 (handle_pragma_implementation): Likewise.
5306 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5309 * typeck.c (build_class_member_access_expr): Allow to access members
5310 of the currently open class.
5311 (finish_class_member_access_expr): Likewise.
5313 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
5316 * name-lookup.c (validate_nonmember_using_decl): Take scope and
5317 name by value, instead of computing them.
5318 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
5319 arguments. Pass them to validate_nonmember_using_decl.
5320 * name-lookup.h (do_local_using_decl): Adjust.
5321 (do_toplevel_using_decl): Likewise.
5322 * parser.c (cp_parser_using_declaration): Likewise.
5323 * pt.c (tsubst_expr): Likewise.
5325 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
5329 * name-lookup.c (qualified_lookup_using_namespace): Search
5330 strongly-associated namespaces first, and only then try other
5333 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
5335 * Make-lang.in (c++.srcextra): Dummy entry.
5337 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5340 * parser.c (cp_parser_template_name): Don't try to parse a
5341 conversion-function-id, as it cannot be a template-name.
5342 (cp_parser_simple_type_specifier): Check for invalid template-ids
5343 even after a built-in type.
5345 2004-01-14 Jan Hubicka <jh@suse.cz>
5348 * pt.c (instantiate_decl): Do not increase function_depth.
5350 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
5354 * parser.c (cp_parser_elaborated_type_specifier): Warn about
5355 attributes and discard.
5356 * decl.c (xref_tag): Don't overwite existing attributes with
5359 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5362 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
5363 is no destructor while looking up a BIT_NOT_EXPR.
5365 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
5367 * cxxfilt.c: Remove unused file.
5369 2004-01-14 Jan Hubicka <jh@suse.cz>
5371 Partial fix to PR c++/12850
5372 * decl2.c (mark_used): Do not proactively instantiate templates
5373 when compiling in unit-at-a-time or not optimizing.
5374 * optimize.c (maybe_clone_body): Do not increase function depth.
5376 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5379 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
5381 2004-01-12 Steven Bosscher <stevenb@suse.de>
5384 * parser.c (cp_parser_member_declaration): Any non-type is also
5385 not a class or a function.
5387 2004-01-12 Jason Merrill <jason@redhat.com>
5390 * class.c (build_base_path): Do not mark vtable references as
5392 (build_vtbl_ref_1): Likewise.
5394 2004-01-12 Richard Henderson <rth@redhat.com>
5397 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
5398 (store_init_value): Use it.
5399 * decl.c (check_initializer): Expect full initialization code
5400 from store_init_value.
5401 * init.c (expand_aggr_init_1): Likewise.
5402 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
5404 2004-01-12 Mark Mitchell <mark@codesourcery.com>
5406 * class.c (layout_class_type): For non-POD class types, also copy
5407 the DECL_SIZE and DECL_MODE of fields to the base class type.
5409 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5412 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
5413 calling regenerate_decl_from_template.
5415 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
5418 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
5419 decl-specifier occurring along with a class definition.
5421 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
5423 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
5424 clauses to comments describing declares_class_or_enum.
5425 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
5428 2004-01-12 Jan Hubicka <jh@suse.cz>
5430 * pt.c (for_each_template_parm): Do not check for duplicates.
5431 (for_each_template_parm): Use walk_tree duplicate checking code.
5433 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
5436 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
5437 is error_mark_node, don't add any more decl_specs.
5438 (cp_parser_init_declarator): After committing to a declaration, if
5439 the decl_specifiers start with error_mark_node, issue an error and
5440 change the type to "int".
5442 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
5445 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
5447 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5451 * pt.c (tsubst): Substitution must fail if we are attempting to
5452 create an array with element type that is an abstract class type.
5453 * decl.c (cp_finish_decl): Strip pointers and array types recursively
5454 before calling abstract_virtuals_error.
5456 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
5458 * name-lookup.c (qualified_lookup_using_namespace): Consider
5459 strong using directives even if we've already found a binding.
5461 2004-01-09 Mark Mitchell <mark@codesourcery.com>
5463 * cp-tree.h (cxx_expand_expr): Change prototype.
5464 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
5466 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5469 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
5470 looking into them recursively. They can be there because of the
5471 new __offsetof__ extension.
5473 2004-01-07 Zack Weinberg <zack@codesourcery.com>
5475 * parser.c (cp_parser_save_member_function_body): Mark the
5478 2004-01-05 Mark Mitchell <mark@codesourcery.com>
5481 * class.c (build_clone): Copy type attributes from the original
5482 function to the clone.
5485 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
5486 references as constant.
5489 * parser.c (cp_parser_explicit_instantiation): Improve error
5491 (cp_parser_require): Improve indication of the error location.
5494 * parser.c (cp_parser_class_head): Reorder logic to check for
5495 invalid qualification.
5497 2004-01-04 Mark Mitchell <mark@codesourcery.com>
5500 * name-lookup.c (lookup_using_namespace): Remove spacesp
5502 (unqualified_namespace_lookup): Likewise.
5503 (lookup_qualified_name): Adjust accordingly.
5504 (lookup_name_real): Likewise.
5505 (lookup_arg_dependent): Do not eliminate the namespace of the
5506 functions found by unqualified name lookup unless that is the
5509 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
5511 * semantics.c (push_deferring_access_checks): Fix format.
5512 (resume_deferring_access_checks): Likewise.
5513 (stop_deferring_access_checks): Likewise.
5514 (pop_deferring_access_checks): Likewise.
5515 (get_deferred_access_checks): Likewise.
5516 (pop_to_parent_deferring_access_checks): Likewise.
5517 (perform_deferred_access_checks): Likewise.
5518 (perform_or_defer_access_check): Likewise.
5520 2004-01-04 Richard Henderson <rth@redhat.com>
5522 * call.c (build_over_call): Don't create a save_expr of an
5523 aggregate, but rather its address.
5525 2004-01-04 Mark Mitchell <mark@codesourcery.com>
5528 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
5529 an offsetof expression.
5531 * parser.c (cp_parser_parameter_declaration): Fix comment.
5534 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
5535 (reference_binding): Set it when appropriate.
5536 (build_temp): New function, split out from ...
5537 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
5538 (initialize_reference): Likewise.
5541 * parser.c (cp_parser): Add in_type_id_in_expr_p.
5542 (cp_parser_new): Initialize it.
5543 (cp_parser_postfix_expression): Set it.
5544 (cp_parser_sizeof_operand): Likewise.
5545 (cp_parser_parameteR_declaration): Do not commit early to tenative
5546 parsers when in_type_id_in_expr_p is set.
5548 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5551 * parser.c (cp_parser_template_argument): Don't call
5552 make_unbound_class_template directly.
5553 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
5554 UNBOUND_CLASS_TEMPLATE tree node.
5556 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
5559 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
5561 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5564 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
5565 (DECL_FUNCTION_TEMPLATE_P): Use it.
5566 (DECL_CLASS_TEMPLATE_P): Likewise.
5567 * parser.c (cp_parser_lookup_name): Add is_template parameter.
5568 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
5569 (cp_parser_template_name): Likewise.
5570 (cp_parser_elaborated_type_specifier): Likewise.
5571 (cp_parser_namespace_name): Likewise.
5572 (cp_parser_class_name): Likewise.
5573 (cp_parser_lookup_name_simple): Likewise.
5575 See ChangeLog.3 for earlier changes.