1 2005-06-15 Aldy Hernandez <aldyh@redhat.com>
3 * typeck.c (build_binary_op): Same.
4 * testsuite/g++.dg/conversion/simd3.C: New.
6 2005-06-15 Nathan Sidwell <nathan@codesourcery.com>
9 * error.c (dump_expr) <COMPONENT_REF case>: Check DECL_NAME is not
12 * Make-lang.in: Reformat some long lines.
13 (gt-cp-rtti.h): New target.
14 (cp/rtti.o): Add dependency.
15 * config-lang.in (gtfiles): Add cp/rtti.c.
16 * cp-tree.h (CPTI_TI_DESC_TYPE, CPTI_BLTN_DESC_TYPE,
17 CPTI_PTR_DESC_TYPE, CPTI_ARY_DESC_TYPE, CPTI_FUNC_DESC_TYPE,
18 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE,
19 CPTI_SI_CLASS_DESC_TYPE, CPTI_VMI_CLASS_DESC_TYPE,
20 CPTI_PTM_DESC_TYPE, CPTI_BASE_DESC_TYPE): Remove.
21 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
22 ary_desc_type_node, func_desc_type_node, enum_desc_type_node,
23 class_desc_type_node, si_class_desc_type_node,
24 vmi_class_desc_type_node, ptm_desc_type_node,
25 base_desc_type_node): Remove.
26 * decl.c: Adjust documentation of global trees.
27 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL,
28 TINFO_REAL_NAME): Remove.
29 (struct tinfo_s): New.
30 (enum tinfo_kind): New.
32 (get_tinfo_decl): Adjust use of tinfo descriptor.
33 (tinfo_base_init, generic_initializer, ptr_initializer,
34 ptm_initializer, class_initializer): Likewise.
35 (get_pseudo_ti_init): Take descriptor index. Adjust.
36 (create_pseudo_type_info): Likewise.
37 (get_pseudo_ti_desc): Return descriptor index. Adjust.
38 (create_tinfo_types): Adjust use of create_pseudo_type_info.
39 (emit_tinfo_decl): Adjust use of tinfo descriptor.
41 2005-06-14 Roger Sayle <roger@eyesopen.com>
43 * decl.c (grokdeclarator): Only check TREE_OVERFLOW on INTEGER_CST.
45 2005-06-13 Geoffrey Keating <geoffk@apple.com>
47 * Make-lang.in (c++.install-man): Doesn't really depend on installdirs.
48 (rule for installing g++.1 manpage): Does depend on installdirs.
50 2005-06-13 Nathan Sidwell <nathan@codesourcery.com>
53 * decl.c (cp_finish_decl): Clear runtime runtime initialization if
54 in-class decl's initializer is bad.
57 * parser.c (struct cp_parser): Document that scope could be
59 (cp_parser_diagnose_invalid_type_name): Cope with error_mark for
61 (cp_parser_nested_name_specifier): Return NULL_TREE on error.
62 (cp_parser_postfix_expression): Deal with null or error_mark
64 (cp_parser_elaborated_type_specifier): Adjust
65 cp_parser_nested_name_specifier call.
67 * parser (cp_parser_skip_to_end_of_block_or_statement): Cleanup.
69 2005-06-12 Roger Sayle <roger@eyesopen.com>
72 * error.c (dump_expr): UNARY_PLUS_EXPR need not handle void types.
73 Treat CONVERT_EXPR identically to NOP_EXPR.
75 2005-06-10 Aldy Hernandez <aldyh@redhat.com>
78 * cvt.c (build_expr_type_conversion): Same.
79 * typeck.c (build_binary_op): Handle vectors.
81 (type_after_usual_arithmetic_conversions): Same.
82 * testsuite/g++.dg/conversion/simd2.C: New.
84 2005-06-08 Nathan Sidwell <nathan@codesourcery.com>
87 * cp-tree.def (USING_DECL): Update documentation.
88 * cp-tree.h (DECL_DEPENDENT_P): New.
89 (USING_DECL_DECLS, USING_DECL_SCOPE): New.
90 * class.c (handle_using_decl): Move most of the processing to ...
91 * name-lookup.c (do_class_using_decl): ... here. Make stricter.
92 (push_using_decl): Use USING_DECL_SCOPE.
93 (cp_emit_debug_info_for_using): Make extern.
94 * cxx-pretty-print.c (pp_cxx_statement) <USING_DECL case>: Adjust.
95 * name-lookup.h (cp_emit_debug_info_for_using): Declare.
96 * pt.c (tsubst_decl) <USING_DECL case>: Use do_class_using_decl
98 (tsubst_expr): Use USING_DECL_SCOPE.
99 * search.c (lookup_field_1): Use DECL_DEPENDENT_P.
100 * semantics.c (finish_member_declaration): Likewise.
102 2005-06-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
105 * pt.c (tsubst): Reject pointer-to-member of type void.
108 * parser.c (cp_parser_label_declaration): Deal with invalid/missing
111 2005-06-07 Nathan Sidwell <nathan@codesourcery.com>
113 * cp-tree.def (DEFAULT_ARG): Adjust documentation.
114 * cp-tree.h (DEFARG_INSTANTIATIONS): New.
115 (struct tree_default_arg): Add instantiations member.
116 * parser.c (cp_parser_late_parsing_default_args): Adjust to use a
118 * pt.c (tsubst_arg_types): Likewise.
120 * parser.c (cp_parser_late_parsing_default_args): Fix overeager
121 assert in previous patch.
123 2005-06-06 Jakub Jelinek <jakub@redhat.com>
125 * error.c (locate_error): Use gmsgid instead of msgid for argument
127 (cp_error_at, cp_warning_at, cp_pedwarn_at): Likewise.
129 2005-06-06 Nathan Sidwell <nathan@codesourcery.com>
132 * cp-tree.def (DEFAULT_ARG): Document TREE_CHAIN use.
133 * parser.c (cp_parser_late_parsing_default_args): Propagate parsed
134 argument to any early instantiations.
135 * pt.c (tsubst_arg_types): Chain early instantiation of default arg.
138 * cp-tree.h (add_method): Add using_decl parameter.
139 * class.c (add_method): Add using_decl parameter. Adjust error
141 (handle_using_decl): Pass the using decl to add_method.
142 (clone_function_decl): Adjust add_member calls.
143 * decl2.c (check_classfn): Likewise.
144 * method.c (lazily_declare_fn): Likewise.
145 * semantics.c (finish_member_declaration): Likewise.
147 * method.c (synthesize_method): Use inform, not warning.
149 2005-06-06 Hans-Peter Nilsson <hp@axis.se>
151 * config-lang.in (target_libs): Remove target-gperf.
153 2005-06-05 Mark Mitchell <mark@codesourcery.com>
156 * cp-tree.h (DECL_IS_BUILTIN_CONSTANT_P): New macro.
157 * parser.c (cp_parser_postfix_expression): Allow non-constant
158 expressions as arguments to __builtin_constant_p.
159 * tree.c (builtin_valid_in_constant_expr_p): Use
160 DECL_IS_BUILTIN_CONSTANT_P.
162 2005-06-03 Mark Mitchell <mark@codesourcery.com>
165 * typeck.c (casts_away_constness_r): Do not drop cv-qualifiers on
166 the pointed-to type for a pointer-to-member.
169 * cp-tree.h (grok_op_properties): Remove friendp parameter.
170 * decl.c (grokfndecl): Adjust call.
171 (grok_op_properties): Determine the class of which the function is
172 a member by looking at its DECL_CONTEXT, not current_class_type.
173 * pt.c (tsubst_decl): Adjust call to grok_op_properties.
175 2005-06-02 Nathan Sidwell <nathan@codesourcery.com>
177 * method.c (synthesize_method): Add addtional arg to warning call.
180 * Make-lang.in (method.o): Add diagnostic.h
181 * decl.c (start_preparsed_function): Use decl's location for file
183 * decl2.c (cp_finish_file): Set input_location before synthesizing
185 (mark_used): When deferring a synthesized function, save current
186 location. Do not set function's location when actually
188 * method.c: #include diagnostic.h.
189 (synthesize_method): Set the functions source location. Show
190 needed location if errors are emitted.
192 * decl.c (start_decl): Simplify specialization handling. Remove
193 unneeded CLASSTYPE_TEMPLATE_INSTANTIATION check.
194 * mangle.c (discriminator_for_local_entity): Use VEC_index.
197 * decl.c (duplicate_decls): Copy all of DECL_USE_TEMPLATE.
200 * name-lookup.c (pushtag): Push local class even in a template.
202 2005-05-31 Nathan Sidwell <nathan@codesourcery.com>
205 * init.c (integral_constant_value): Check the type of the
206 initializer, not the decl.
208 2005-05-30 Mark Mitchell <mark@codesourcery.com>
211 * name-lookup.c (do_nonmember_using_decl): Ignore builtin
212 functions, even when the used name is not a function.
214 2005-05-30 Kazu Hirata <kazu@cs.umass.edu>
216 * operators.def, optimize.c: Update copyright.
218 2005-05-28 Mark Mitchell <mark@codesourcery.com>
221 * call.c (standard_conversion): Permit conversions to complex
222 types if conversion to the corresponding scalar type would be
226 * method.c (implicitly_declare_fn): Clear processing_template_decl
227 when generating implicit declaration.
229 2005-05-27 Mark Mitchell <mark@codesourcery.com>
232 * typeck.c (get_member_function_from_ptrfunc): Do not attempt
233 conversions to base classes of incomplete types.
235 2005-05-27 Ian Lance Taylor <ian@airs.com>
237 * semantics.c (add_stmt): Add C++ frontend specific version.
238 * cp-tree.h (STMT_IS_FULL_EXPR_P): Define.
239 (stmts_are_full_exprs_p): Declare.
241 2005-05-27 Roger Sayle <roger@eyesopen.com>
242 Giovanni Bajo <giovannibajo@gcc.gnu.org>
244 * cp-tree.def (UNARY_PLUS_EXPR): New C++ unary tree code.
245 * parser.c (cp_parser_unary_expression): Use UNARY_PLUS_EXPR instead
247 (cp_parser_unary_expression): Likewise.
248 * typeck.c (build_unary_op): Likewise.
249 * call.c (add_builtin_candidate, build_new_op): Likewise.
250 * error.c (dump_expr): Likewise.
251 * pt.c (tsubst_copy, tsubst_copy_and_build): Likewise.
252 * decl.c (ambi_op_p, grok_op_properties): Likewise.
253 * dump.c (dump_op): Likewise.
254 * lex.c (init_operators): Likewise.
255 * operators.def ("+"): Likewise.
256 * cp-gimplify.c (cp_gimplify_expr): Handle UNARY_PLUS_EXPR like a
257 conversion, if the result and argument types differ.
258 * tree.c (fold_if_not_in_template): Fold UNARY_PLUS_EXPR much
259 like a NOP_EXPR when !processing_template_decl.
261 * cxx-pretty-print.c (pp_cxx_cast_expression): Prototype.
262 (pp_cxx_unary_expression): Handle new UNARY_PLUS_EXPR tree code.
264 2005-05-27 Nathan Sidwell <nathan@codesourcery.com>
267 * typeck.c (get_delta_difference): Cope with incomplete but equal
271 * parser.c (cp_parser_late_parsing_for_member): Disable access
272 checking for template functions.
274 2005-05-26 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
277 * pt.c (redeclare_class_template): Change error message according
278 to coding conventions.
280 2005-05-26 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
282 * call.c (build_op_delete_call): Fix quoting in error message.
284 2005-05-25 Richard Henderson <rth@redhat.com>
287 * cp-tree.h (make_alias_for): Declare.
288 * decl2.c (build_java_method_aliases): New.
289 (cp_finish_file): Call it.
290 * method.c (make_alias_for): Split out from ...
291 (make_alias_for_thunk): ... here.
293 2005-05-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
296 * semantics.c (finish_id_expression): Fix quoting in error message.
298 2005-05-25 DJ Delorie <dj@redhat.com>
300 * decl.c (duplicate_decls): Move warning control from if() to
302 * name-lookup.c (parse_using_directive): Likewise.
303 * parser.c (cp_parser_elaborated_type_specifier): Likewise.
304 (cp_parser_init_declarator): Likewise.
305 * tree.c (handle_com_interface_attribute): Likewise.
307 2005-05-24 Ziemowit Laski <zlaski@apple.com>
309 * class.c (layout_class_type): Do not issue C++ ABI warnings
311 * decl.c (objc_mark_locals_volatile): Streamline by calling
312 objc_volatilize_decl().
313 * parser.c (cp_parser_objc_message_expression): Allow simple
314 type specifiers (instead of merely type names) as message
316 * pt.c (template_args_equal): Do not call objc_comptypes().
317 * typeck.c (composite_pointer_type): If both pointers are
318 ObjC-esque, arbitrarily choose the first; do not call
320 (comptypes): Do not call objc_comptypes().
321 (convert_for_assignment): Call objc_compare_types().
322 (comp_ptr_ttypes_real): Call objc_type_quals_match() before
323 concluding that types do not match.
325 2005-05-24 Andrew Pinski <pinskia@physics.uc.edu>
328 * optimize.c (update_cloned_parm): Copy the TYPE also from the
331 2005-05-19 Jakub Jelinek <jakub@redhat.com>
334 * decl.c (grokdeclarator): Fix "storage class specified for"
337 2005-05-19 Kazu Hirata <kazu@cs.umass.edu>
339 * parser.c: Fix comment typos.
341 2005-05-18 Geoffrey Keating <geoffk@apple.com>
343 * Make-lang.in (cc1plus-dummy): New.
344 (cc1plus-checksum.c): New.
345 (cc1plus-checksum.o): New.
346 (cc1plus): Add cc1plus-checksum.o.
348 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
351 * decl2.c (determine_visibility): Don't set visibility to
352 hidden if it has been set explicitly by user.
354 2005-05-17 Ziemowit Laski <zlaski@apple.com>
355 Mike Stump <mrs@apple.com>
357 Yet more Objective-C++...
359 * cp-objcp-common.h (cxx_get_alias_set): Move from
361 (cxx_warn_unused_global_decl): Likewise.
362 (cp_expr_size): Likewise.
363 (cp_tree_size): Likewise.
364 (cp_var_mod_type_p): Likewise.
365 (cxx_initialize_diagnostics): Likewise.
366 (cxx_types_compatible_p): Likewise.
367 * cp-tree.h: to here.
369 * lex.c (D_OBJC): Add.
370 (init_reswords): Add.
371 * Make-lang.in (cp/pt.o): Add cp/cp-objcp-common.h.
372 * parser.c: Add c-common.h include.
373 * pt.c: Add c-common.h and cp-objcp-common.h includes.
374 (template_args_equal): Use objc_comptypes as well.
375 (tsubst_copy_and_build): Use objcp_tsubst_copy_and_build as well.
376 * semantics.c (do_poplevel): Remove static.
378 * decl.c (objc_mark_locals_volatile): Don't change decls that are
380 * decl2.c (generate_ctor_or_dtor_function): Add code to initialize
381 Objective C++ early enough.
382 * lex.c (struct resword reswords): Add Objective-C++ support.
383 * parser.c (cp_lexer_get_preprocessor_token): Add Objective-C++.
384 (cp_parser_objc_message_receiver): Add.
385 (cp_parser_objc_message_args): Likewise.
386 (cp_parser_objc_message_expression): Likewise.
387 (cp_parser_objc_encode_expression): Likewise.
388 (cp_parser_objc_defs_expression): Likewise.
389 (cp_parser_objc_protocol_expression): Likewise.
390 (cp_parser_objc_selector_expression): Likewise.
391 (cp_parser_objc_expression): Likewise.
392 (cp_parser_objc_visibility_spec): Likewise.
393 (cp_parser_objc_method_type): Likewise.
394 (cp_parser_objc_protocol_qualifiers): Likewise.
395 (cp_parser_objc_typename): Likewise.
396 (cp_parser_objc_selector_p): Likewise.
397 (cp_parser_objc_selector): Likewise.
398 (cp_parser_objc_method_keyword_params): Likewise.
399 (cp_parser_objc_method_tail_params_opt): Likewise.
400 (cp_parser_objc_interstitial_code): Likewise.
401 (cp_parser_objc_method_signature): Likewise.
402 (cp_parser_objc_method_prototype_list): Likewise.
403 (cp_parser_objc_method_definition_list): Likewise.
404 (cp_parser_objc_class_ivars): Likewise.
405 (cp_parser_objc_identifier_list): Likewise.
406 (cp_parser_objc_alias_declaration): Likewise.
407 (cp_parser_objc_class_declaration): Likewise.
408 (cp_parser_objc_protocol_declaration): Likewise.
409 (cp_parser_objc_protocol_refs_opt): Likewise.
410 (cp_parser_objc_superclass_or_category): Likewise.
411 (cp_parser_objc_class_interface): Likewise.
412 (cp_parser_objc_class_implementation): Likewise.
413 (cp_parser_objc_end_implementation): Likewise.
414 (cp_parser_objc_declaration): Likewise.
415 (cp_parser_objc_try_catch_finally_statement): Likewise.
416 (cp_parser_objc_synchronized_statement): Likewise.
417 (cp_parser_objc_throw_statement): Likewise.
418 (cp_parser_objc_statement): Likewise.
419 (cp_parser_primary_expression): Add Objective-C++.
420 (cp_parser_statement): Likewise.
421 (cp_parser_declaration): Likewise.
422 (cp_parser_simple_type_specifier): Likewise.
423 (cp_parser_type_name): Likewise.
424 (cp_parser_parameter_declaration_list): Likewise.
425 (cp_parser_member_declaration) Likewise.
426 * tree.c: Include debug.h.
427 * typeck.c (composite_pointer_type): Add Objective-C++ support.
428 (finish_class_member_access_expr): Likewise.
429 (build_function_call): Allow objc to rewrite FUNCTION_DECLs.
430 (build_modify_expr): Allow objc to generate write barriers.
432 * Make-lang.in (cp/tree.o): Add debug.h.
433 * tree.c (lvalue_p_1, case CONST_DECL): Add.
435 2005-05-18 Jan Hubicka <jh@suse.cz>
437 * method.c: Include tree-pass.h
438 (use_thunk): Lower body before expanding.
440 2005-05-17 Jakub Jelinek <jakub@redhat.com>
443 * decl.c (maybe_deduce_size_from_array_init): Call
444 cp_apply_type_quals_to_decl after completing array type.
446 2005-05-16 Richard Henderson <rth@redhat.com>
448 * decl.c (build_library_fn_1): Move setting TREE_NOTHROW ...
449 (build_library_fn): ... here.
451 2005-05-12 Ian Lance Taylor <ian@airs.com>
453 * cp-tree.h (cp_stmt_codes): Don't define.
454 (statement_code_p): Declare.
455 (STATEMENT_CODE_P): Define.
456 * lex.c (statement_code_p): Define.
457 (cxx_init): Use actual codes in stmt_codes initializer, not
458 cp_stmt_codes macro. Initialize statement_code_p directly, rather
459 than using INIT_STATEMENT_CODES.
461 2005-05-09 Mark Mitchell <mark@codesourcery.com>
463 * typeck.c (build_unary_op): Do not resort to address arithmetic
464 when taking the address of a COMPONENT_REF.
466 2005-05-08 Kazu Hirata <kazu@cs.umass.edu>
468 * class.c (vtbl_init_data_s): Change the type of fns to
470 (build_vtbl_initializer, add_vcall_offset, add_vcall_offset):
471 Use VEC instead of VARRAY.
473 2005-05-07 Richard Sandiford <rsandifo@redhat.com>
475 * mangle.c: Remove a reference to the MIPS -mint64 option.
477 2005-05-07 Kazu Hirata <kazu@cs.umass.edu>
479 * decl.c (wrapup_globals_for_namespace): Use VEC instead of
481 * name-lookup.c (add_decl_to_level, begin_scope): Likewise.
482 * name-lookup.h (cp_binding_level): Change the type of
483 static_decls to VEC(tree,gc)*.
485 * mangle.c (globals): Change the type of substitutions to
487 (dump_substitution_candidates, add_substitution,
488 find_substitution, finish_mangling, init_mangle): Use VEC
491 2005-05-06 Kazu Hirata <kazu@cs.umass.edu>
493 * decl2.c (spew_debug): Remove.
495 * decl2.c (ssdf_decls, start_static_storage_duration_function,
496 generate_ctor_or_dtor_function): Use VEC instead of VARRAY.
498 * decl2.c (pending_statics, note_vague_linkage_var,
499 cp_finish_file): Use VEC instead of VARRAY.
500 (pending_statics_used): Remove.
502 2005-05-05 Kazu Hirata <kazu@cs.umass.edu>
504 * decl2.c (deferred_fns, note_vague_linkage_fn,
505 cp_finish_file): Use VEC instead of VARRAY.
507 2005-05-05 Mark Mitchell <mark@codesourcery.com>
510 * pt.c (build_non_dependent_expr): Use is_overloaded_fn.
512 2005-05-05 Kazu Hirata <kazu@cs.umass.edu>
514 * pt.c: Fix a comment typo.
516 2005-05-04 Kazu Hirata <kazu@cs.umass.edu>
518 * cp-tree.h (language_function): Change the type of
519 x_local_names to VEC.
520 * decl.c (push_local_name): Adjust uses of local_names.
522 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
524 * friend.c, lex.c, mangle.c, repo.c: Update copyright.
526 2005-05-02 Kazu Hirata <kazu@cs.umass.edu>
528 * class.c (local_classes, init_class_processing): Use VEC
530 * cp-tree.h (local_classes): Likewise.
531 * mangle.c (discriminator_for_local_entity): Likewise.
532 * name-lookup.c (pushtag): Likewise.
534 * class.c (current_lang_depth, push_lang_context,
535 pop_lang_context): Use VEC instead of VARRAY.
536 * cp-tree.h (saved_scope): Use VEC for lang_base instead of
538 * name-lookup.c (push_to_top_level): Use VEC instead of
541 2005-05-02 Paolo Bonzini <bonzini@gnu.org>
543 * semantics.c (finish_call_expr): Call resolve_overloaded_builtin
544 for BUILT_IN_MD built-ins.
546 2005-05-02 Michael Matz <matz@suse.de>
549 * cp-tree.h (cp_tree_index): Remove CPTI_NULL, to be defined in C
552 * lex.c (cxx_init): Move null_node initialisation to C common frontend.
554 2005-04-25 Ian Lance Taylor <ian@airs.com>
556 * cp-tree.def: Add EXPR_STMT.
557 * cp-tree.h (cp_stmt_codes): Add EXPR_STMT.
558 (EXPR_STMT_EXPR): Define.
559 * cp-gimplify.c: Include "flags.h".
560 (gimplify_expr_stmt): New static function.
561 (cp_gimplify_expr): Handle EXPR_STMT.
562 * cxx-pretty-print.c (pp_cxx_statement): Use pp_cxx_expression
563 rather than pp_expression.
564 (pp_cxx_statement): Handle EXPR_STMT.
565 * dump.c (cp_dump_tree): Handle EXPR_STMT.
566 * lex.c (cxx_init): Don't use c_common_stmt_codes in stmt_codes
569 2005-04-25 Andrew Pinski <pinskia@physics.uc.edu>
572 * rtti.c (ifnonnull): Cast the zero comparison operand
575 2005-04-24 Jakub Jelinek <jakub@redhat.com>
578 * class.c: Include cgraph.h.
579 (cp_fold_obj_type_ref): Set node->local.vtable_method.
580 * Make-lang.in (cgraph.o): Depend on $(CGRAPH_H).
582 2005-04-12 Markus F.X.J. Oberhumer <markus@oberhumer.com>
584 * mangle.c (write_builtin_type): Handle integer types which are
585 not one of the shared integer type nodes and emit a "vendor
586 extended builtin type" with an encoding in the form of "u5int96".
588 2005-04-24 Ian Lance Taylor <ian@airs.com>
590 * cp-tree.def (USING_STMT): Change class to tcc_statement.
591 (TRY_BLOCK, EH_SPEC_BLOCK, HANDLER, CLEANUP_STMT): Likewise.
592 (IF_STMT, FOR_STMT, WHILE_STMT, DO_STMT): Likewise.
593 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
595 2005-04-23 DJ Delorie <dj@redhat.com>
597 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, friend.c,
598 init.c, lex.c, mangle.c, method.c, name-lookup.c, parser.c,
599 repo.c, rtti.c, tree.c, typeck.c, typeck2.c: Adjust warning()
602 2005-04-22 Per Bothner <per@bothner.com>
604 * decl.c (make_rtl_for_nonlocal_decl): Don't try get_fileinfo if
605 input_filename is NULL, as it is for (say) __PRETTY_FUNCTION__.
607 2005-04-22 Alexandre Oliva <aoliva@redhat.com>
610 * name-lookup.c (push_overloaded_decl): Do not overload with
611 non-duplicate anticipated built-in.
613 2005-04-21 Kazu Hirata <kazu@cs.umass.edu>
615 * cp-tree.h (THROW_NAME, AUTO_VTABLE_NAME, AUTO_TEMP_FORMAT,
616 VTABLE_BASE, VTABLE_NAME_PREFIX, STATIC_NAME_FORMAT): Remove.
618 2005-04-21 Nathan Sidwell <nathan@codesourcery.com>
620 * cp-tree.h: Adjust for new VEC API.
621 Define VEC(tree_pair_s,gc).
622 (struct save_scope): Adjust.
623 (struct lang_type_class): Adjust.
624 (unemitted_tinfo_decls): Adjust.
625 * class.c (add_method, resort_type_method_vec,
626 finish_struct_methods, struct find_final_overrider_data,
627 dfs_find_final_overrider_pre, find_final_overrider,
628 get_vcall_index, warn_hidden, walk_subobject_offsets,
629 check_methods, fixup_inline_methods, end_of_class,
630 warn_about_ambiguous_bases, finish_struct, build_vtbl_initializer,
631 add_vcall_offset): Adjust.
632 * decl.c (xref_basetypes, finish_method): Adjust.
633 * decl2.c (check_classfn): Adjust.
634 * init.c (sort_mem_initializers, push_base_cleanups): Adjust.
635 * method.c (do_build_copy_constructor): Adjust.
636 * name-lookup.c (new_class_binding, store_binding,
637 store_bindings, store_class_bindings): Adjust.
638 * name-lookup.h: Define VEC(cxx_saved_binding,gc),
639 VEC(cp_class_binding,gc).
640 (struct cp_binding_level): Adjust.
641 * parser.c: Define VEC(cp_token_position,heap).
642 (struct cp_lexer): Adjust.
643 (cp_lexer_new_main, cp_lexer_new_from_tokens, cp_lexer_destroy,
644 cp_lexer_save_tokens): Adjust.
645 * pt.c (retrieve_specialization,
646 check_explicit_specialization): Adjust.
647 * rtti.c (unemitted_tinfo_decls): Adjust.
648 (init_rtti_processing, get_tinfo_decl, get_pseudo_ti_init,
649 get_pseudo_ti_desc): Adjust.
650 * search.c (dfs_access_in_type, lookup_conversion_operator,
651 lookup_fnfields_1, dfs_walk_once, dfs_walk_once_accessible,
652 dfs_get_pure_virtuals, lookup_conversions_r, binfo_for_vbase): Adjust.
653 * semantics.c: Define VEC(deferred_access,gc).
654 (push_deferring_access_checks): Adjust.
655 * typeck2.c (abstract_virtuals_error): Adjust.
657 2005-04-20 Ian Lance Taylor <ian@airs.com>
659 * cp-tree.def: Add STMT_EXPR.
660 * cp-tree.h (STMT_EXPR_NO_SCOPE): Define.
661 (STMT_EXPR_STMT): Define.
662 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
664 (pp_cxx_expression): Likewise.
665 (pp_cxx_statement): Call pp_cxx_statement, not pp_statement.
666 * dump.c (cp_dump_tree): Handle STMT_EXPR.
668 2005-04-18 Kazu Hirata <kazu@cs.umass.edu>
670 * decl.c (expand_static_init): Call build2 and build3 instead
673 * cp-tree.h (VPTR_NAME, VPTR_NAME_P): Remove.
675 2005-04-17 Ian Lance Taylor <ian@airs.com>
677 * cp-tree.def: Add SIZEOF_EXPR, ARROW_EXPR and ALIGNOF_EXPR.
678 * cxx-pretty-print.c (pp_cxx_postfix_expression): Handle
680 (pp_cxx_unary_expression): Handle SIZEOF_EXPR and ALIGNOF_EXPR.
681 (pp_cxx_expression): Handle ARROW_EXPR, SIZEOF_EXPR, and
683 * typeck.c (cxx_sizeof_or_alignof_type): Update call to
684 c_sizeof_or_alignof_type for change in parameter type.
686 2005-04-16 Mark Mitchell <mark@codesourcery.com>
689 * typeck.c (cxx_sizeof_or_alignof_type): Check whether the type to
690 which sizeof/alignof is dependent, rather than just whether we are
691 processing_template_decl.
693 2005-04-17 Kazu Hirata <kazu@cs.umass.edu>
695 * cp-tree.h (LOOKUP_GLOBAL): Remove.
696 (LOOKUP_ONLYCONVERTING, DIRECT_BIND, LOOKUP_NO_CONVERSION,
697 LOOKUP_DESTRUCTOR, LOOKUP_NO_TEMP_BIND, LOOKUP_PREFER_TYPES,
698 LOOKUP_PREFER_NAMESPACES, LOOKUP_CONSTRUCTOR_CALLABLE): Adjust
701 2005-04-15 Richard Henderson <rth@redhat.com>
704 * semantics.c (finish_call_expr): Call resolve_overloaded_builtin.
706 2005-04-15 Kazu Hirata <kazu@cs.umass.edu>
708 * cp-tree.h (lang_type_class): Remove redefined. Move
709 java_interface into where redefined was. Increment the width
711 (TYPE_REDEFINED): Remove.
713 2005-04-14 Kazu Hirata <kazu@cs.umass.edu>
715 * cp-tree.h (SET_TMPL_ARG, ENUM_TI_TEMPLATE, ENUM_TI_ARGS,
716 CLASSTYPE_TEMPLATE_LEVEL): Remove.
718 2005-04-11 Mark Mitchell <mark@codesourcery.com>
720 * decl2.c (determine_visibility): Don't use export_class_data.
721 (import_export_decl): Honor TARGET_CXX_CLASS_DATA_ALWAYS_WEAK and
722 TARGET_CXX_DETERMINE_CLASS_DATA_VISIBILITY.
724 2005-04-09 Kazu Hirata <kazu@cs.umass.edu>
726 * cp-tree.h (cxx_alignof): Remove.
728 * cp-tree.h (DECL_ARRAY_DELETE_OPERATOR_P): Remove.
730 * cp-tree.h (EXCEPTION_CLEANUP_NAME, B_SET, B_CLR, B_TST,
731 CONV_STATIC_CAST): Remove.
733 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Remove.
735 * cp-tree.h (VF_BINFO_VALUE, VF_BASETYPE_VALUE): Remove.
737 * cp-tree.h (cp_deprecated): Remove.
739 2005-04-08 Ian Lance Taylor <ian@airs.com>
741 * cp-tree.def: Define FOR_STMT, WHILE_STMT, DO_STMT, BREAK_STMT,
742 CONTINUE_STMT, SWITCH_STMT.
743 * cp-tree.h (cp_stmt_codes): Add FOR_STMT, WHILE_STMT, DO_STMT,
744 BREAK_STMT, CONTINUE_STMT, SWITCH_STMT.
745 (WHILE_COND, WHILE_BODY): Define.
746 (DO_COND, DO_BODY): Define.
747 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY): Define.
748 (SWITCH_STMT_COND, SWITCH_STMT_BODY, SWITCH_STMT_TYPE): Define.
749 * cp-gimplify.c (enum bc_t): Define.
750 (struct cp_gimplify_ctx, ctxp): Define.
751 (push_context, pop_context): New static functions.
752 (begin_bc_block, finish_bc_block): New static functions.
753 (build_bc_goto): New static function.
754 (gimplify_cp_loop, gimplify_for_stmt): New static functions.
755 (gimplify_while_stmt, gimplify_do_stmt): Likewise.
756 (gimplify_switch_stmt): Likewise.
757 (cp_gimplify_expr): Handle FOR_STMT, WHILE_STMT, DO_STMT,
758 SWITCH_STMT, CONTINUE_STMT, BREAK_STMT.
759 (cp_genericize): Call push_context and pop_context.
760 * semantics.c (finish_break_stmt): Just call build_stmt
761 (BREAK_STMT) rather than build_break_stmt.
762 (finish_continue_stmt): Corresponding change.
763 * decl.c (pop_switch): Update call to c_do_switch_warnings for new
765 * cxx-pretty-print.c (pp_cxx_statement): Handle SWITCH_STMT,
766 WHILE_STMT, DO_STMT, FOR_STMT, BREAK_STMT, CONTINUE_STMT.
767 * dump.c (cp_dump_tree): Likewise.
769 2005-04-08 Mark Mitchell <mark@codesourcery.com>
772 * parser.c (cp_parser_type_specifier_seq): Add is_condition
774 (cp_parser_new_type_id): Pass it.
775 (cp_parser_condition): Likewise.
776 (cp_parser_conversion_type_id): Likewise.
777 (cp_parser_type_id): Likewise.
778 (cp_parser_type_specifier_seq): In a condition, do not allow
779 invalid type-specifier combinations.
780 (cp_parser_exception_declaration): Adjust call to
781 cp_parser_type_specifier_seq.
783 * cp-tree.def (TINST_LEVEL): Document TINST_IN_SYSTEM_HEADER_P.
784 * cp-tree.h (struct tinst_level): Add in_system_header_p.
785 (TINST_IN_SYSTEM_HEADER_P): New macro.
786 (make_tinst_level): Remove.
787 * pt.c (lookup_template_class): Preserve DECL_IN_SYSTEM_HEADER on
788 the instantiated class.
789 (push_tinst_level): Do not use make_tinst_level. Set
790 TINST_IN_SYSTEM_HEADER_P.
791 (pop_tinst_level): Likewise.
792 (instantiate_class_template): Set in_system_header.
793 (instantiate_pending_templates): Likewise.
794 * tree.c (make_tinst_level): Remove.
796 2005-04-06 Joseph S. Myers <joseph@codesourcery.com>
798 * decl.c (start_decl): Apply pending #pragma weak regardless of
801 2005-04-06 Mark Mitchell <mark@codesourcery.com>
804 * pt.c (regenerate_decl_from_template): Copy attributes for
805 parameters from the pattern to the instantiation.
807 2005-04-05 Mark Mitchell <mark@codesourcery.com>
810 * cp-tree.def (OFFSET_REF): Correct comments.
811 * init.c (build_offset_ref): Remove misleading comment.
812 * typeck.c (build_unary_op): Handle pointer-to-member creation
813 here, rather than ...
814 (unary_complex_lvalue): ... here.
816 2005-04-06 Jason Merrill <jason@redhat.com>
819 * tree.c (stabilize_init): Don't bother trying to stabilize
820 something with no side-effects.
822 2005-04-05 Mark Mitchell <mark@codesourcery.com>
825 * decl.c (grokdeclarator): Correct attribute handling.
827 2005-04-05 Mark Mitchell <mark@codesourcery.com>
830 * decl2.c (import_export_decl): Use non-COMDAT external linkage
831 for virtual tables, typeinfo, etc. that will be emitted in only
832 one translation unit on systems without weak symbols.
834 2005-04-04 Mark Mitchell <mark@codesourcery.com>
837 * parser.c (cp_parser_template_name): Fix thinko.
839 2005-04-04 Nathan Sidwell <nathan@codesourcery.com>
842 * method.c (use_thunk): Protect covariant pointer return
843 adjustments from NULL pointers.
845 2005-04-04 Jan Hubicka <jh@suse.cz>
847 * decl2.c (finish_objects): Revert my previous patch.
848 (cp_finish_file): Likewise.
850 2005-04-03 Kazu Hirata <kazu@cs.umass.edu>
852 * pt.c: Fix comment typos.
854 2005-04-03 Nathan Sidwell <nathan@codesourcery.com>
857 * pt.c (more_specialized_fn): Member functions are unordered wrt
858 non-members. Conversion operators are unordered wrt other
861 2005-04-01 Nathan Sidwell <nathan@codesourcery.com>
863 * call.c (add_template_candidates_real): Remove length parameter
864 from fn_type_unification call.
865 * class.c (resolve_address_of_overloaded_function): Likewise
866 * cp-tree.h (fn_type_unification): Remove length parameter.
867 * pt.c (get_bindings_overload): Remove.
868 (get_bindings_real): Rename to ...
869 (get_bindings): ... here. Remove length and strict
870 parameters. Change return type flag to boolean. Remove original
872 (determine_specialization): Adjust get_bindings call.
873 (fn_type_unification): Remove length parameter. Adjust.
874 (type_unification_real): Remove length parameter. Adjust.
875 (resolve_overloaded_unification): Adjust get_bindings call.
876 (try_one_overload): Simplify confusing cascaded if control flow.
877 (unify): Remove length paramter from type_unification_real call.
878 (most_specialized_instantiation): Adjust get_bindings calls.
879 (most_specialized): Likewise.
881 2005-03-31 Nathan Sidwell <nathan@codesourcery.com>
883 PR c++/19203, implement DR 214
884 * call.c (joust): Use more_specialized_fn.
885 * cp-tree.h (DEDUCE_ORDER): Remove.
886 (more_specialized): Replace with ...
887 (more_specialized_fn): ... this.
888 * pt.c (maybe_adjust_types_for_deduction): Remove DEDUCE_ORDER
890 (type_unification_real): Remove DEDUCE_ORDER case.
891 (more_specialized): Replace with ...
892 (more_specialized_fn): ... this. Implement DR 214.
893 (most_specialized_instantiation): Use get_bindings_real directly.
895 2005-03-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
898 * call.c (build_new_op): Remove check for -Wsynth.
900 2005-03-31 Jan Hubicka <jh@suse.cz>
902 * decl2.c (finish_objects): Mark ctor as needed.
903 (cp_finish_file): Output variables only in nonunit-at-a-time.
905 2005-03-29 Richard Henderson <rth@redhat.com>
908 * decl.c (cp_complete_array_type): Rename from complete_array_type.
909 Use the new complete_array_type in c-common.c. Update all callers.
910 * cp-tree.h (cp_complete_array_type): Update to match.
912 2005-03-24 Geoffrey Keating <geoffk@apple.com>
914 * typeck.c (build_static_cast_1): Allow scalar_cast between
915 any integral, floating, or enumeration type.
917 2005-03-24 Steven Bosscher <stevenb@suse.de>
919 * typeck.c (comptypes): First determine if the types are compatible
920 from a target-independent point of view. Check target attributes
923 * class.c (build_base_path):
924 (build_vbase_offset_vtbl_entries):
925 (add_vcall_offset): Replace fold (buildN (...)) with fold_buildN.
926 * error.c (dump_expr): Likewise.
927 * init.c (build_zero_init, expand_cleanup_for_base,
928 build_vec_delete_1): Likewise.
929 * mangle.c (write_integer_cst): Likewise.
930 * method.c (thunk_adjust): Likewise.
931 * pt.c (convert_nontype_argument, tsubst, unify): Likewise.
932 * tree.c (cxx_print_statistics, array_type_nelts_total): Likewise.
933 * typeck.c (build_ptrmemfunc_access_expr,
934 (get_member_function_from_ptrfunc): Likewise.
936 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
938 * cp-objcp-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
940 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
942 * cp-tree.h (perform_integral_promotions): Remove.
943 (default_conversion): Add.
945 2005-03-22 Mark Mitchell <mark@codesourcery.com>
947 * parser.c (cp_parser_warn_min_max): New function.
948 (cp_parser_binary_expression): Use it.
949 (cp_parser_assignment_operator_opt): Likewise.
950 (cp_parser_operator): Likewise.
952 2005-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
955 * decl.c (start_preparsed_function): Robustify.
957 2005-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
960 * parser.c (cp_parser_class_head): Return NULL_TREE when
961 encountering a redefinition.
963 2005-03-22 Nathan Sidwell <nathan@codesourcery.com>
967 * typeck.c (build_ptrmemfunc): Allow OFFSET_REF when processing a
970 2005-03-21 Paolo Carlini <pcarlini@suse.de>
974 * init.c (emit_mem_initializers): Don't crash on undefined
977 2005-03-21 Paolo Carlini <pcarlini@suse.de>
980 * semantics.c (finish_stmt_expr_expr): Return immediately
981 if error_operand_p (expr).
983 2005-03-21 Joseph S. Myers <joseph@codesourcery.com>
985 * cp-tree.h (lvalue_or_else, lvalue_p): New.
986 * typeck.c (lvalue_or_else): New. Call lvalue_error.
988 2005-03-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
991 * decl.c (decls_match): Compare context of VAR_DECL.
993 2005-03-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
996 * parser.c (cp_parser_postfix_expression) <case RID_TYPENAME>:
997 Check the return value of cp_parser_nested_name_specifier.
999 2005-03-18 Dale Johannesen <dalej@apple.com>
1001 * cp/tree.c (cp_tree_equal): Handle SSA_NAME.
1003 2005-03-18 Paolo Carlini <pcarlini@suse.de>
1006 * parser.c (cp_parser_diagnose_invalid_type_name):
1007 Check TYPE_BINFO (current_class_type) before attempting
1008 to emit inform messages.
1010 2005-03-17 Paolo Carlini <pcarlini@suse.de>
1013 * cp-tree.h (grok_op_properties): Change return type to void.
1014 * decl.c (grok_op_properties): Return early - don't check the
1015 arity - in case of a static member or an operator that cannot
1016 be non-member; tidy a bit.
1018 2005-03-17 Nathan Sidwell <nathan@codesourcery.com>
1021 * pt.c (contains_dependent_cast_p): Remove.
1022 (fold_non_dependent_expr): Don't use it.
1023 (value_dependent_expression_p): Use a switch statement.
1024 reference_exprs can be dependent.
1026 2005-03-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1030 * name-lookup.c (pushtag): Skip template parameter scope when
1031 scope is ts_global. Don't push tag into template parameter
1033 * pt.c (instantiate_class_template): Reorder friend class
1034 template substitution to handle non-dependent friend class
1035 that hasn't been previously declared.
1037 2005-03-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1039 Friend class name lookup 5/n
1041 * cp-tree.h (pushtag): Adjust declaration.
1042 * decl.c (lookup_and_check_tag): Call lookup_type_scope if
1044 (xref_tag): Adjust call to pushtag. Make hidden class visible.
1045 (start_enum): Adjust call to pushtag.
1046 * name-lookup.c (ambiguous_decl): Ignore hidden names.
1047 (qualify_lookup): Change return type to bool.
1048 (hidden_name_p): New function.
1049 (lookup_namespace_name, unqualified_namespace_lookup,
1050 lookup_name_real): Use it.
1051 (lookup_type_scope): Update comments.
1052 (maybe_process_template_type_declaration): Change parameter name
1053 from globalize to is_friend.
1054 (pushtag): Change globalize parameter of type int to tag_scope.
1055 Hide name if introduced by friend declaration.
1056 * name-lookup.h (hidden_name_p): Add declaration.
1057 * parser.c (cp_parser_lookup_name): Don't deal with hidden name
1059 * pt.c (push_template_decl_real): Make hidden class template
1061 (lookup_template_class, instantiate_class_template): Adjust call
1063 * semantics.c (begin_class_definition): Likewise.
1064 * rtti.c (init_rtti_processing, build_dynamic_cast_1,
1065 tinfo_base_init, emit_support_tinfos): Use ts_current instead of
1068 2005-03-13 Mark Mitchell <mark@codesourcery.com>
1071 * pt.c (determine_specialization): Reject non-specializations.
1073 2005-03-11 Per Bothner <per@bothner.com>
1075 * cp-tree.h (struct cp_declarator): New id_loc field.
1076 * cp/parser.c (cp_lexer_get_preprocessor_token): Set cp_token's
1077 location using c_lex_with_flags, instead of input_location.
1078 (cp_parser_direct_declarator): Set declarator's id_loc from
1081 2005-03-10 Jakub Jelinek <jakub@redhat.com>
1083 PR c++/18384, c++/18327
1084 * decl.c (reshape_init_array): Use UHWI type for max_index_cst
1085 and index. Convert max_index to size_type_node if it isn't
1086 host_integerp (, 1).
1088 2005-03-09 Mark Mitchell <mark@codesourcery.com>
1091 * pt.c (tsubst_decl): Apply array-to-pointer and
1092 function-to-pointer conversions to function arguments.
1093 (regenerate_decl_from_template): Likewise.
1095 2005-03-09 Paolo Carlini <pcarlini@suse.de>
1098 * decl.c (complete_array_type): In pedantic mode, return
1099 3 for an empty initializer list as the initializer for an
1100 array of unknown bound (8.5.1/4).
1101 (maybe_deduce_size_from_array_init): Fix final test to use
1104 2005-03-08 Nathan Sidwell <nathan@codesourcery.com>
1107 * pt.c (contains_dependent_cast_p): New.
1108 (fold_non_dependent_expr): Call it.
1110 2005-03-08 Mark Mitchell <mark@codesourcery.com>
1113 * cp-tree.h (target_type): Remove.
1114 * decl.c (layout_var_decl): Remove #if 0'd code.
1115 (cp_finish_decl): Remove dead code.
1116 * init.c (build_vec_init): When determining whether or not the
1117 element type has an asignment operator, look through all array
1119 * typeck.c (target_type): Remove.
1121 2005-03-07 Mark Mitchell <mark@codesourcery.com>
1123 * class.c (finish_struct_1): Do not warn about non-virtual
1124 destructors in Java classes.
1126 2005-03-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1129 * init.c (build_offset_ref): Don't build non-dependent SCOPE_REF.
1130 * pt.c (build_non_dependent_expr): Don't build NON_DEPENDENT_EXPR
1132 * typeck.c (build_x_unary_op): Don't build non-dependent SCOPE_REF.
1133 Also set PTRMEM_OK_P for NON_DEPENDENT_EXPR.
1134 (build_unary_op): Handle building ADDR_EXPR of OFFSET_REF inside
1137 2005-03-02 Alexandre Oliva <aoliva@redhat.com>
1139 * name-lookup.c (push_overloaded_decl): Don't error if the new
1140 decl matches the old one.
1141 * decl.c (redeclaration_error_message): Likewise.
1143 2005-03-01 Per Bothner <per@bothner.com>
1145 * decl.c (finish_function): Use SET_EXPR_LOCATION instead of
1146 unavailable annotate_with_file_line, if USE_MAPPED_LOCATION.
1148 2005-03-01 Nathan Sidwell <nathan@codesourcery.com>
1151 * class.c (update_vtable_entry_for_fn): Don't crash on invalid
1154 * cp-tree.g (THUNK_TARGET): Expand comment.
1155 * method.c (use_thunk): Make sure we also use the target, if that
1158 2005-02-27 Jakub Jelinek <jakub@redhat.com>
1161 * decl.c (cxx_comdat_group): Put thunks for
1162 TARGET_USE_LOCAL_THUNK_ALIAS_P (function) functions into the same
1163 comdat group as the thunk target.
1165 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1167 * call.c, class.c, cp-tree.h, decl2.c, error.c, init.c, mangle.c,
1168 parser.c: Fix comment typo(s).
1170 2005-02-24 Jakub Jelinek <jakub@redhat.com>
1173 * decl.c (reshape_init): Don't warn about missing braces if STRING_CST
1174 initializes a char/wchar_t array.
1176 2005-02-23 Mark Mitchell <mark@codesourcery.com>
1179 * decl.c (grokvardecl): Set DECL_INTERFACE_KNOWN for declarations
1180 with internal linkage.
1182 2005-02-23 Alexandre Oliva <aoliva@redhat.com>
1184 * decl.c (grokvardecl): Don't exempt anonymous types from having
1185 linkage for variables that have linkage other than "C".
1187 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
1189 * cp-objcp-common.h, error.c: Update copyright.
1191 2005-02-22 Mark Mitchell <mark@codesourcery.com>
1194 * decl.c (start_decl_1): Don't clear TREE_READONLY.
1195 (cp_finish_decl): Likewise.
1196 (complete_vars): Call cp_apply_type_quals_to_decl.
1197 * typeck.c (cp_apply_type_quals): Avoid setting TREE_READONLY in
1198 cases where that's not valid.
1201 * init.c (integral_constant_value): Iterate if the value of a decl
1202 is itself a constant.
1205 * parser.c (cp_parser_class_head): Check for redefintions here.
1206 * semantics.c (begin_class_definition): Not here.
1209 * decl2.c (build_anon_union_vars): Add type parameter.
1210 (finish_anon_union): Pass it.
1213 * error.c (dump_expr): Do not print the body of a BIND_EXPR.
1214 Handle STATEMENT_LIST.
1217 * parser.c (cp_parser_direct_declarator): Always complain about
1218 non-constant array bounds when in a function scope.
1219 * semantics.c (finish_id_expression): Do not mark dependent names
1222 2005-02-21 Douglas Gregor <dgregor@cs.indiana.edu>
1226 * cp-tree.h (cp_apply_type_quals_to_decl): Declared.
1227 * decl.c (grokdeclarator): Pedwarn about qualifying a function
1229 Add qualifiers when declaring a typedef of a function type.
1230 Member function pointers pick up the qualifiers of the typedef
1231 used to declare them.
1232 Don't complain about creating cv-qualified function types.
1233 Complain about qualified function typedefs that are used to
1234 declare non-static member functions or free functions.
1235 Use cp_apply_type_quals_to_decl.
1236 (start_preparsed_function): Use cp_apply_type_quals_to_decl.
1237 (grokclassfn): Use cp_apply_type_quals_to_decl.
1238 * error.c (dump_type_suffix): Print qualifiers for function
1240 * pt.c (tsubst_decl): Use cp_apply_type_quals_to_decl.
1241 (tsubst): When substituting a function type into a member
1242 pointer type, pass along the qualifiers.
1243 (unify): Unify member pointers to member function pointers.
1244 * tree.c (cp_build_qualified_type_real): Function types may be
1245 qualified. This includes restrict qualifiers.
1246 * typeck.c (cp_apply_type_quals_to_decl): New function to replace
1247 use of c_apply_type_quals_to_decl. Drops qualifiers that are being
1248 added to function types.
1250 2005-02-20 Zack Weinberg <zack@codesourcery.com>
1253 * cp-objcp-common.h (LANG_HOOKS_TO_TARGET_CHARSET): Set to
1254 c_common_to_target_charset. Delete bogus comment.
1256 2005-02-18 Richard Henderson <rth@redhat.com>
1259 * except.c (do_get_exception_ptr): New.
1260 (expand_start_catch_block): Use it.
1262 2005-02-19 Jakub Jelinek <jakub@redhat.com>
1264 * decl.c (start_decl_1): Only check TYPE_NEEDS_CONSTRUCTING
1265 if type is not error_mark_node.
1267 2005-01-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1270 * decl2.c (grokfield): Do not apply attributes to template parameters
1271 as they are ignored by tsubst anyway.
1273 2005-02-18 Jakub Jelinek <jakub@redhat.com>
1276 * decl.c (start_decl_1): Clear TREE_READONLY flag if
1277 its type has TYPE_NEEDS_CONSTRUCTING.
1278 (complete_vars): Likewise.
1280 2005-02-17 Alexandre Oliva <aoliva@redhat.com>
1283 * class.c (finish_struct): Initialize TYPE_SIZE_UNIT of a
1284 template along with TYPE_SIZE.
1287 * semantics.c (perform_deferred_access_checks): Use
1288 get_deferred_access_checks to get the top of the stack.
1290 2005-02-15 Alexandre Oliva <aoliva@redhat.com>
1293 * class.c (add_implicitly_declared_members, check_field_decl)
1294 (check_field_decls, check_bases): Remove arguments, tests and
1295 assignments of cant_have_default_ctor-related variables.
1297 2005-02-15 Alexandre Oliva <aoliva@redhat.com>
1299 * decl2.c (mark_used): Set the source location of the used decl to
1300 the current input location here...
1301 * method.c (synthesize_method): ... not here. Set input_location
1302 from the decl instead.
1304 2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
1307 * parser.c (cp_parser_late_parsing_for_member): Use
1308 current_function_decl as scope to push to and from.
1311 * pt.c (check_explicit_specialization): Make sure namespace
1312 binding lookup found an overloaded function.
1313 (lookup_template_function): Just assert FNS is an overloaded
1317 * decl.c (grokdeclarator): Check for error mark node in ptrmem
1320 2005-02-14 Alexandre Oliva <aoliva@redhat.com>
1323 * decl.c (redeclaration_error_message): Report redefinition of
1324 pure virtual function.
1326 2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
1329 * class.c (build_simple_base_path): Build the component_ref
1331 (update_vtable_entry_for_fn): Walk the covariant's binfo chain
1332 rather than using lookup_base.
1333 * search.c (dfs_walk_once): Add non-recursive assert check.
1334 * typeck.c (build_class_member_access_expr): It is possible for
1335 the member type to be both const and volatile.
1337 2005-02-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1341 * pt.c (maybe_check_template_type): Remove.
1342 * cp-tree.h (maybe_check_template_type): Remove prototype.
1343 * name-lookup.c (maybe_process_template_type_declaration): Don't
1344 use maybe_check_template_type.
1346 2005-02-11 Richard Henderson <rth@redhat.com>
1349 * pt.c (get_mostly_instantiated_function_type): Save and restore
1350 flag_access_control instead of push/pop_access_scope.
1352 2005-02-10 Mark Mitchell <mark@codesourcery.com>
1355 * decl.c (reshape_init): Issue warnings about missing braces.
1357 2005-02-11 Kazu Hirata <kazu@cs.umass.edu>
1359 * cp-tree.def, except.c, ptree.c: Update copyright.
1361 2005-02-09 Mark Mitchell <mark@codesourcery.com>
1364 * call.c (build_op_delete_call): Check COMPLETE_TYPE_P before
1365 attempting name lookup.
1367 * parser.c (cp_parser_unqualified_id): Initialize type_decl.
1370 * call.c (initialize_reference): Robustify.
1373 * decl.c (grokdeclarator): Check for invalid use of destructor
1377 * parser.c (cp_parser_unqualified_id): Avoid creating destructor
1378 names with invalid types.
1381 * parser.c (cp_parser_direct_declarator): Allow type-dependent
1382 expressions as array bounds.
1385 * parser.c (cp_parser_attributes_list): Allow empty lists.
1387 2005-02-08 Mark Mitchell <mark@codesourcery.com>
1390 * class.c (add_method): Don't set TYPE_HAS_DESTRUCTOR.
1391 (check_bases): Give warnings about a base class with a
1392 non-virtual destructor, even if it is implicit.
1393 (finish_struct_bits): Don't copy TYPE_HAS_DESTRUCTOR.
1394 (maybe_warn_about_overly_private_class): Don't use
1395 TYPE_HAS_DESTRUCTOR.
1396 (finish_struct_methods): Don't set TYPE_HAS_DESTRUCTOR.
1397 (check_for_override): Give it external linkage.
1398 (add_implicitly_declared_members): Generate destructors lazily.
1399 (check_field_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
1400 TYPE_HAS_DESTRUCTOR.
1401 (check_bases_and_members): Call check_methods before
1403 (check_bases_and_members): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
1404 TYPE_HAS_DESTRUCTOR.
1405 (finish_struct_1): Do not use TYPE_HAS_DESTRUCTOR.
1406 * cp-tree.def (PSEUDO_DTOR_EXPR): Document.
1407 * cp-tree.h (TYPE_HAS_DESTRUCTOR): Remove.
1408 (lang_type_class): Add lazy_destructor.
1409 (CLASSTYPE_LAZY_DESTRUCTOR): New macro.
1410 (CLASSTYPE_DESTRUCTORS): Robustify.
1411 (TYPE_HAS_DESTRUCTOR): Remove.
1412 (check_for_override): Declare.
1413 (build_vbase_delete): Remove.
1414 * cvt.c (convert_to_void): Issue errors about pseudo-destructor
1416 * decl.c (cxx_maybe_build_cleanup): Remove dead code.
1417 * except.c (dtor_nothrow): Lazily create destructors if necessary.
1418 (build_throw): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
1419 * init.c (build_delete): Lazily create destructors, if necessary.
1420 (build_vbase_delete): Remove.
1421 * method.c (locate_dtor): Simplify.
1422 (implicitly_declare_fn): Add support for destructors.
1423 * parser.c (cp_parser_lookup_name): Lazily create destructors, if
1425 * pt.c (check_explicit_specialization): Don't use
1426 TYPE_HAS_DESTRUCTOR.
1427 (instantiate_class_template): Likewise.
1428 * ptree.c (cxx_print_type): Don't print TYPE_HAS_DESTRUCTOR.
1429 * rtti.c (emit_support_tinfos): Robustify.
1430 * search.c (lookup_fnfields_1): Lazily create destructors.
1431 * typeck.c (build_class_member_access_expr): Remove
1432 PSEUDO_DTOR_EXPR handling.
1433 (lookup_destructor): Likewise.
1435 2005-02-08 Kazu Hirata <kazu@cs.umass.edu>
1437 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h: Update
1440 2005-02-07 Mark Mitchell <mark@codesourcery.com>
1442 * parser.c (cp_lexer_start_debugging): Avoid arithmetic operations
1443 on boolean variables.
1444 (cp_lexer_stop_debugging): Likewise.
1446 2005-02-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1449 * parser.c (cp_parser_pure_specifier): Emit a specific error
1450 message with an invalid pure specifier.
1451 * decl2.c (grok_function_init): Remove.
1452 (grokfield): An initializer for a method is a always a pure
1455 2005-02-02 Matt Austern <austern@apple.com>
1458 * cp-tree.h (builtin_valid_in_constant_expr_p): Declare.
1459 * parser.c (cp_parser_postfix_expression): Accept function call in
1460 constant expression if builtin_valid_in_constant_expr_p is true
1462 * pt.c (value_dependent_expression_p): Handle CALL_EXPRs properly.
1463 * semantics.c (finish_id_expression): Accept function call in constant
1464 expression if builtin_valid_in_constant_expr_p is true for that
1466 * tree.c (builtin_valid_in_constant_expr_p): New.
1468 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1471 * pt.c (check_instantiated_args): Improve error message.
1472 Fix logic when to print its second part.
1474 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1476 * cp-tree.h (complete_type_or_else): Remove macro.
1477 (complete_type_or_diagnostic): Rename to complete_type_or_else
1478 and remove last argument.
1479 * typeck.c (complete_type_or_diagnostic): Rename to
1480 complete_type_or_else and remove last argument.
1482 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1484 * cp-tree.h (commonparms): Remove prototype.
1485 (convert_arguments): Likewise.
1486 (PFN_FROM_PTRMEMFUNC): Remove.
1487 * typeck.c (commonparms): Make static.
1488 (convert_arguments): Add prototype. Make static.
1489 (PFN_FROM_PTRMEMFUNC): Replace by pfn_from_ptrmemfunc.
1491 2005-01-31 Mark Mitchell <mark@codesourcery.com>
1493 * parser.c (cp_parser_primary_expression): Don't complain about
1494 floating-point literals in integral constant expressions when
1497 2005-02-01 Alexandre Oliva <aoliva@redhat.com>
1499 * parser.c (cp_parser_template_id): Revert comment patch too.
1504 * parser.c (cp_parser_template_id): Revert 2004-12-09's patch.
1505 Issue an error when creating the template id.
1506 * pt.c (fn_type_unification): Return early if the explicit
1507 template arg list is an error_mark_node.
1509 2005-01-31 Mark Mitchell <mark@codesourcery.com>
1511 * decl.c (build_enumerator): Do not issue duplicate error messages
1512 about invalid enumeration constants.
1513 * parser.c (cp_parser_non_integral_constant_expression): Always
1514 set parser->non_integral_constant_expression_p.
1515 (cp_parser_primary_expression): Add cast_p parameter. Issue
1516 errors about invalid uses of floating-point literals in
1518 (cp_parser_postfix_expression): Add cast_p parameter.
1519 (cp_parser_open_square_expression): Pass it.
1520 (cp_parser_parenthesized_expression_list): Add cast_p parameter.
1521 (cp_parser_unary_expression): Likewise.
1522 (cp_parser_new_placement): Pass it.
1523 (cp_parser_direct_new_declarator): Likewise.
1524 (cp_parser_new_initializer): Likewise.
1525 (cp_parser_cast_expression): Add cast_p parameter.
1526 (cp_parser_binary_expression): Likewise.
1527 (cp_parser_question_colon_clause): Likewise.
1528 (cp_parser_assignment_expression): Likewise.
1529 (cp_parser_expression): Likewise.
1530 (cp_parser_constant_expression): If an integral constant
1531 expression is invalid, return error_mark_node.
1532 (cp_parser_expression_statement): Pass cast_p.
1533 (cp_parser_condition): Likewise.
1534 (cp_parser_iteration_statement): Likewise.
1535 (cp_parser_jump_statement): Likewise.
1536 (cp_parser_mem_initializer): Likewise.
1537 (cp_parser_template_argument): Likewise.
1538 (cp_parser_parameter_declaration): Likewise.
1539 (cp_parser_initializer): Likewise.
1540 (cp_parser_throw_expression): Likewise.
1541 (cp_parser_attribute_list): Likewise.
1542 (cp_parser_simple_cast_expression): Likewise.
1543 (cp_parser_functional_cast): Likewise.
1544 (cp_parser_late_parsing_default_args): Likewise.
1545 (cp_parser_sizeof_operand): Save/restore
1546 non_integral_constant_expression_p.
1548 2005-01-31 Mike Stump <mrs@apple.com>
1550 * parser.c (cp_lexer_new_main): Get the first token, first, before
1553 2005-01-31 Mark Mitchell <mark@codesourcery.com>
1555 * decl.c (start_decl): Add missing parentheses.
1557 2005-01-30 Mark Mitchell <mark@codesourcery.com>
1560 * cp-tree.h (DECL_USE_TEMPLATE): Expand documentation.
1561 * decl.c (duplicate_decls): Do not discard
1562 DECL_IMPLICIT_INSTANTIATION when merging declarations.
1563 (start_decl): Do not SET_DECL_TEMPLATE_SPECIALIZATION for
1564 variables that do not have DECL_USE_TEMPLATE.
1567 * decl.c (grokdeclarator): Refactor code so that qualified names
1568 are never allowed as the declarator in a typedef.
1571 * name-lookup.c (do_nonmember_using_decl): Avoid overloading
1572 builtin declarations.
1575 * call.c (convert_like_real): Inline call to
1576 dubious_conversion_warnings here.
1577 * cp-tree.h (dubious_conversion_warnings): Remove.
1578 * semantics.c (finish_unary_op_expr): Copy INTEGER_CSTs before
1579 setting TREE_NEGATED_INT.
1580 * typeck.c (dubious_conversion_warnings): Remove.
1583 * name-lookup.c (pushdecl_namespace_level): Avoid accessing free'd
1586 2005-01-28 Mark Mitchell <mark@codesourcery.com>
1589 * parser.c (cp_parser_diagnose_invalid_type_name): Commit to
1593 * pt.c (redeclare_class_template): Robustify.
1595 2005-01-27 Steven Bosscher <stevenb@suse.de>
1597 * decl.c (finish_case_label): Use SWITCH_STMT accessor macros
1598 instead of SWITCH_EXPR ones.
1599 * pt.c (tsubst_expr): Likewise.
1600 * semantics.c (begin_switch_stmt, finish_switch_cond,
1601 finish_switch_stmt): Likewise.
1603 2005-01-26 J"orn Rennecke <joern.rennecke@st.com>
1606 * parser.c (cp_parser_initializer_clause): Initialize *non_constant_p.
1608 2005-01-25 Andrew Pinski <pinskia@physics.uc.edu>
1610 * class.c (abort_fndecl_addr): New variable.
1611 (build_vtbl_initializer): If we have a pure virtual function
1612 share the abort function's address.
1613 Include gt-cp-class.h at the end.
1614 * config-lang.in (gtfiles): Add cp/class.c.
1616 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1618 * cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static.
1619 (pp_cxx_function_definition): Make static.
1620 * cxx-pretty-print.h (pp_cxx_statement): Remove prototype.
1621 (pp_cxx_function_definition): Likewise.
1623 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1625 * name-lookup.c (print_binding_level): Make static.
1626 (constructor_name_full): Make static inline.
1627 (current_decl_namespace): Make static.
1628 * name-lookup.h (constructor_name_full): Remove prototype.
1629 (print_binding_level): Likewise.
1630 (current_decl_namespace): Likewise.
1632 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1634 * decl.h (debug_bindings_indentation): Remove.
1636 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
1638 * typeck.c: Fix a comment typo.
1640 2005-01-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1643 * pt.c (fold_decl_constant_value): Always call fold_non_dependent_expr
1645 (tsubst): Use fold_decl_constant_value in place of a bare call to
1646 integral_constant_value.
1648 2005-01-20 Kazu Hirata <kazu@cs.umass.edu>
1650 * typeck.c (more_qualified_p): Remove.
1651 * cp-tree.h: Remove the corresponding prototype.
1653 2005-01-19 Matt Austern <austern@apple.com>
1655 * typeck.c (comptypes): Handle return code from objc_comptypes
1658 2005-01-19 Kazu Hirata <kazu@cs.umass.edu>
1660 * cp-tree.h, name-lookup.h: Remove unused prototypes.
1662 2005-01-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1665 * semantics.c (finish_id_expression): Disable access checking for
1666 already lookuped FIELD_DECL.
1668 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
1670 * decl.c (delete_block): Remove.
1671 * cp-tree.h: Remove the corresponding prototype.
1673 * decl.c (vtable_decl_p, vtype_decl_p, walk_globals_data,
1674 walk_vtables_r, walk_vtables, walk_globals_r, walk_globals):
1676 * cp-tree.h: Remove the corresponding prototypes.
1678 * tree.c (count_functions, bound_pmf_p, cp_is_overload_p,
1679 cp_update_decl_after_saving, name_p): Remove.
1680 * cp-tree.h: Remove the corresponding prototypes.
1682 2005-01-18 Andrew Pinski <pinskia@physics.uc.edu>
1685 * semantics.c (finish_asm_stmt): Strip nops off
1686 input memory operands.
1688 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
1690 * Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c,
1691 typeck2.c: Update copyright.
1693 2005-01-16 Kazu Hirata <kazu@cs.umass.edu>
1695 * class.c (get_enclosing_class): Remove.
1696 * cp-tree.h: Remove the corresponding prototypes.
1698 * cvt.c (convert_lvalue): Remove.
1699 * cp-tree.h: Remove the corresponding prototype.
1701 * pt.c (tinst_for_decl): Remove.
1702 * cp-tree.h: Remove the corresponding prototypes.
1704 * tree.c (hash_chainon): Remove.
1705 * cp-tree.h: Remove the corresponding prototypes.
1707 2005-01-15 Jakub Jelinek <jakub@redhat.com>
1710 * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
1711 of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
1713 2005-01-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1715 * Make-lang.in (cp-warn): Don't append $(WERROR).
1717 2005-01-10 Kazu Hirata <kazu@cs.umass.edu>
1719 * cp-tree.h: Fix a comment typo.
1721 2005-01-07 Nathan Sidwell <nathan@codesourcery.com>
1724 * pt.c (tsubst_qualified_id): Call convert_from_reference.
1726 2005-01-06 Mark Mitchell <mark@codesourcery.com>
1729 * class.c (add_implicitly_declared_members): Remove dead code.
1730 * decl.c (grokfndecl): Add sfk parameter. Use it do set
1732 (grokdeclarator): Adjust calls to grokfndecl.
1733 * method.c (implicitly_declare_fn): Improve documentation.
1734 * parser.c (cp_parser_direct_declarator): Do not consider a
1735 function to be a constructor if the containing class was
1736 originally anonymous.
1738 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1741 * search.c (lookup_field_1): Handle using declaration in
1742 class template partial specialization.
1744 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1747 * pt.c (push_access_scope): Handle friend defined in class.
1748 (pop_access_scope): Likewise.
1750 2005-01-06 Nathan Sidwell <nathan@codesourcery.com>
1753 * pt.c (tsubst_copy) <ARRAY_REF case>: Handle separately.
1754 (tsubst_copy_and_build) <ARRAY_REF case>: Remove obsolete
1755 array-new handling code. Use build_x_binary_op.
1757 2005-01-05 Nathan Sidwell <nathan@codesourcery.com>
1760 * cp-tree.h (start_decl): Take pointer to pushed scope, not bool.
1761 * name-lookup.h (push_scope): Return pushed scope, not flag.
1762 * name-lookup.c (push_scope): Return scope that should be popped,
1764 * decl.c (start_decl): Adjust.
1765 (grokfndecl): Adjust scope push and pop.
1766 * decl2.c (check_classfn): Likewise.
1767 * parser.c (cp_parser_condition, cp_parser_conversion_function_id,
1768 cp_parser_init_declarator, cp_parser_direct_declarator,
1769 cp_parser_class_specifier, cp_parser_class_head,
1770 cp_parser_lookup_name,
1771 cp_parser_constructor_declarator_p): Likewise.
1772 * pt.c (instantiate_class_template,
1773 resolve_typename_type): Likewise.
1775 2005-01-03 Volker Reichelt <reichelt@igpm.rwth-aaachen.de>
1778 * parser.c (cp_parser_unqualified_id): Do not issue error message
1779 for typedef-name as destructor declarator when performing an
1780 uncommitted tentative parse.
1782 2005-01-01 Steven Bosscher <stevenb@suse.de>
1785 * decl.c (finish_function): Fix comment. Annotate the compiler
1786 generated return with the current file name and line 0.
1788 2004-12-31 Richard Henderson <rth@redhat.com>
1791 * call.c (make_temporary_var_for_ref_to_temp): Set DECL_IGNORED_P.
1792 * class.c (build_vtable): Don't conditionallize setting it
1793 based on DWARF2_DEBUG.
1794 (layout_class_type): Set DECL_IGNORED_P.
1795 * decl2.c (get_guard): Likewise.
1796 * rtti.c (get_tinfo_decl, build_lang_decl): Likewise.
1797 * tree.c (build_local_temp): Likewise.
1799 2004-12-30 Mark Mitchell <mark@codesourcery.com>
1801 * cp-tree.h (cp_declarator): Split "name" field into
1802 qualifying_scope and unqualified_name.
1803 * decl.c (get_scope_of_declarator): Adjust accordingly.
1804 (grokdeclarator): Likewise.
1805 * decl2.c (grokfield): Likewise, and adjust call to
1806 do_class_using_decl.
1807 * name-lookup.c (do_class_using_decl): Split "decl" into
1808 "scope" and "name". Remove unnecessary code.
1809 * name-lookup.h (do_class_using_decl): Adjust declaration.
1810 * parser.c (make_id_declarator): Split "id" into qualifying_scope
1811 and unqualified_name.
1812 (cp_parser_using_declaration): Adjust call to do_class_using_decl.
1813 (cp_parser_direct_declarator): Adjust to handle the fact that
1814 cp_parser_declarator_id no longer returns a SCOPE_REF.
1815 (cp_parser_direct_declarator): Likewise.
1816 (cp_parser_declarator_id): Do not create a SCOPE_REF for qualified
1818 (cp_parser_member_declaration): Adjust call to make_id_declarator.
1819 (cp_parser_check_declarator_template_parameters): Do not expect a
1822 * decl.c (duplicate_decls): Call ggc_free on declarations we will
1823 not be needing any longer.
1826 * cvt.c (convert_to_void): Do not use STRIP_NOPs.
1828 2004-12-28 Richard Henderson <rth@redhat.com>
1831 * semantics.c (finish_asm_stmt): Resolve asm names. Validate input
1832 constraints. Mark memory inputs addressable.
1834 2004-12-27 Jason Merrill <jason@redhat.com>
1836 * decl.c (expand_static_init): Don't use shortcut if
1837 targetm.relaxed_ordering.
1839 2004-12-27 Mark Mitchell <mark@codesourcery.com>
1842 * decl.c (check_tag_decl): Robustify.
1844 2004-12-23 Mark Mitchell <mark@codesourcery.com>
1847 * parser.c (cp_parser_error): Issue better messages about
1848 #pragma in locations where it is not permitted.
1851 * pt.c (check_instantiated_args): Remove bogus SFINAE code.
1853 * cvt.c (convert_to_void): Fix typo in comment.
1855 2004-12-23 Alexandre Oliva <aoliva@redhat.com>
1858 * pt.c (check_explicit_specialization): Use the argument list from
1859 the definition in a template function specialization definition.
1861 2004-12-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1864 * pt.c (check_explicit_specialization): Use special logic to validate
1865 befriended specializations.
1867 2004-12-22 Mark Mitchell <mark@codesourcery.com>
1869 * rtti.c (emit_support_tinfos): Avoid using C99 semantics.
1872 * call.c (build_this): In templates, do not bother with
1874 * typeck.c (unary_complex_lvalue): In a template, always refuse
1878 * cp-gimplify.c (cp_genericize): Relax assertion.
1881 * cvt.c (convert_to_void): Warn about unused values.
1884 * rtti.c (emit_support_tinfos): On systems without weak symbols,
1885 emit the runtime library type-info objects as non-COMDAT.
1887 2004-12-21 Mark Mitchell <mark@codesourcery.com>
1890 * call.c (convert_like_real): Do not permit the use of a copy
1891 constructor to copy a packed field.
1894 * decl.c (grokdeclarator): Return error_mark_node, not
1895 void_type_node, to indicate errors.
1896 * parser.c (cp_parser_template_parameter_list): Robustify.
1897 (cp_parser_template_parameter): Likewise.
1900 * tree.c (cp_tree_equal): Handle OVERLOAD.
1902 2004-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1904 * decl.c (define_label): Use POP_TIMEVAR_AND_RETURN.
1905 * name-lookup.c (pushdecl_class_level): Likewise.
1907 2004-12-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1909 * name-lookup.c (pushtag): Add missing POP_TIMEVAR_AND_RETURN.
1911 2004-12-21 Andrew Pinski <pinskia@physics.uc.edu>
1914 * cp-gimplify.c (cp_genericize_r): Don't insert first but instead
1915 check to see if contains the pointer. Insert the statement before
1918 2004-12-21 Nathan Sidwell <nathan@codesourcery.com>
1921 * decl.c (check_initializer): Check string initializer of array is
1923 * cp-tree.h (PAREN_STRING_LITERAL_P): New.
1924 * semantics.c (finish_parenthesized_expr): Mark a STRING_CST.
1925 * error.c (dump_expr): <STRING_CST case> Add parens, if needed.
1927 * cp-tree.def (TEMPLATE_TYPE_PARM,
1928 BOUND_TEMPLATE_TEMPLATE_PARM, TYPE_OF_TYPE, TYPENAME_TYPE): Reorder
1929 for better code efficiency.
1930 * cp-tree.h (CLASS_TYPE_P): Short circuit IS_AGGR_TYPE check.
1931 (CAN_HAVE_FULL_LANG_DECL_P): Reorder for better optimization.
1932 (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P,
1933 INTEGRAL_OR_ENUMERATION_TYPE_P, SCALAR_TYPE_P,
1934 CP_AGGREGATE_TYPE_P, TYPE_PTROB_P, TYPE_REF_OBJ_P,
1935 TYPE_PTROBV_P): Likewise.
1938 * method.c (do_build_copy_constructor): Refactor. Don't const
1939 qualify a mutable field.
1940 (do_build_assign_ref): Likewise.
1942 2004-12-20 Matt Austern <austern@apple.com>
1945 * decl.c (make_rtl_for_nonlocal_decl): Use
1946 set_builtin_user_assembler_name.
1948 2004-12-19 Mark Mitchell <mark@codesourcery.com>
1950 * cp-tree.h (note_decl_for_pch): New function.
1951 * class.c (build_clone): Call note_decl_for_pch.
1952 * semantics.c (finish_member_declaration): Likewise.
1953 (note_decl_for_pch): New function.
1955 2004-12-17 Steven Bosscher <stevenb@suse.de>
1957 * init.c (build_zero_init): max_index is the number of
1960 2004-12-17 Nathan Sidwell <nathan@codesourcery.com>
1963 * class.c (add_method): Do not push conversion operators into a
1966 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE_TYPE): Reformat.
1967 * error.c (dump_decl): <TYPE_DECL case> Remove extraneous braces.
1969 2004-12-16 Nathan Sidwell <nathan@codesourcery.com>
1972 * cp-tree.h (integral_constant_value): Declare.
1973 * call.c (null_ptr_cst_p): Use integral_constant_value, not
1974 decl_constant_value.
1975 (convert_like_real): Likewise.
1976 * class.c (check_bitfield_decl): Likewise.
1977 * cvt.c (ocp_convert): Likewise.
1978 (convert): Remove unnecessary decl_constant_value call.
1979 * decl.c (compute_array_index_type): Use integral_constant_value,
1980 not decl_constant_value.
1981 (build_enumerator): Likewise.
1982 * decl2.c (grokfield): Likewise.
1983 * init.c (decl_constant_value): Simplify.
1984 (integral_constant_value): New.
1985 * pt.c (fold_decl_constant_value): Use integral_constant_value,
1986 remove subsequent check.
1987 (tsubst): Use integral_constant_value, not decl_constant_value.
1988 (tsubst_copy, unify): Likewise.
1989 * typeck.c (decay_conversion): Likewise.
1990 (build_compound_expr): Remove unnecessary decl_constant_value
1992 (build_static_cast_1, build_reinterpret_cast_1):
1993 (convert_for_assignment): Remove comment about not calling
1994 decl_constant_value.
1996 2004-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1999 * pt.c (instantiate_class_template): Set input_location for
2001 (tsubst_friend_function): Don't set input_location here.
2002 Make sure the context is complete if necessary.
2004 2004-12-15 Nathan Sidwell <nathan@codesourcery.com>
2007 * parser.c (cp_parser_lookup_name): Remove unneeded TYPENAME_TYPE
2010 2004-12-14 Mark Mitchell <mark@codesourcery.com>
2013 * decl.c (make_typename_type): Do not handle namespace-scoped
2015 (tag_name): Handle typename_type.
2016 (check_elaborated_type_specifier): Handle typenames.
2017 * parser.c (cp_parser_diagnose_invalid_type_name): Improve
2019 (cp_parser_elaborated_type_specifier): Use
2020 cp_parser_diagnose_invalid_type_name.
2022 2004-12-14 Andrew Pinski <pinskia@physics.uc.edu>
2025 * init.c (build_zero_init): If the max_index is 0, there is no
2026 need to create a RANGE_EXPR.
2028 2004-12-14 Mark Mitchell <mark@codesourcery.com>
2031 * cp-objcp-common.c (cp_expr_size): Loosen assertion.
2033 2004-12-14 Nathan Sidwell <nathan@codesourcery.com>
2036 * pt.c (tsubst_copy_and_build): <INDIRECT_REF case> Check that a
2037 REFERENCE_REF_P is dereferencing a reference type.
2038 * typeck.c (build_static_cast): Convert from reference even in a
2040 (build_reinterpret_cast, build_const_cast, build_c_cast): Likewise.
2042 2004-12-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2044 * parser.c (cp_parser_uncommitted_to_tentative_parse_p): New function.
2045 (cp_parser_name_lookup_error): Use it.
2046 (cp_parser_check_for_invalid_template_id): Likewise.
2047 (cp_parser_skip_to_closing_parenthesis): Likewise.
2048 (cp_parser_nested_name_specifier_opt): Likewise.
2049 (cp_parser_simple_declaration, cp_parser_template_id): Likewise.
2050 (cp_parser_parameter_declaration_list): Likewise.
2051 (cp_parser_parameter_declaration): Likewise.
2052 (cp_parser_template_name): Let cp_parser_simulate_error perform
2054 (cp_parser_committed_to_tentative_parse): Remove.
2056 2004-12-13 Andrew Pinski <pinskia@physics.uc.edu>
2059 * class.c (build_base_path): Convert the zero constant to the correct
2060 type when comparing.
2062 2004-12-13 Mark Mitchell <mark@codesourcery.com>
2065 * class.c (layout_class_type): Determine the visibility of static
2068 2004-12-12 Roger Sayle <roger@eyesopen.com>
2071 * cp-gimplify.c (gimplify_if_stmt): Optimize the case where the
2072 condition is a constant and the unexecuted clause is empty.
2074 2004-12-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2077 * parser.c (cp_parser_class_head): Reject typedef-name in class head.
2079 2004-12-09 Matt Austern <austern@apple.com>
2082 * name-lookup.c (do_nonmember_using_decl): A real function
2083 declaration takes precedence over an anticipated declaration.
2085 2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2087 * parser.c (cp_parser_member_declaration): Fix comment typo.
2089 2004-12-09 Alexandre Oliva <aoliva@redhat.com>
2092 * parser.c (cp_parser_template_id): Don't create a CPP_TEMPLATE_ID
2095 2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2098 * typeck.c (build_reinterpret_cast_1): Allow cast from vector type.
2100 2004-12-09 Nathan Sidwell <nathan@codesourcery.com>
2103 * init.c (build_zero_init): Build a RANGE_EXPR for an array
2106 2004-12-08 Kelley Cook <kcook@gcc.gnu.org>
2108 * typeck.c: Remove DOS line endings.
2110 2004-12-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2113 * decl.c (lookup_and_check_tag): Diagnose nested class with
2114 the same name as enclosing class.
2116 2004-12-08 Nathan Sidwell <nathan@codesourcery.com>
2119 * cp-tree.h (REFERENCE_REF_P): New.
2120 (CPTI_TYPE_INFO_TYPE): Rename to ...
2121 (CPTI_CONST_TYPE_INFO_TYPE): ... here.
2122 (CPTI_TYPE_INFO_REF_TYPE): Remove.
2123 (type_info_type_node): Rename to ...
2124 (const_type_info_type_node): ... here.
2125 (type_info_ref_type): Remove.
2126 * call.c (build_user_type_conversion): Reformat.
2127 (resolve_args): Do not convert_from_reference.
2128 (build_object_call): Call convert_from_reference.
2129 (prep_operand): Do not convert_from_reference.
2130 (build_new_method_call): Likewise.
2131 * class.c (build_vfield_ref): Likewise.
2132 * cvt.c (convert_to_reference): Likewise.
2133 (convert_from_reference): Build INDIRECT_REF here, not with
2135 (convert_force): Do not convert_from_reference.
2136 (build_expr_type_conversion): Likewise.
2137 * decl.c (grok_reference_init): Likewise.
2138 * decl2.c (delete_sanity): Likewise.
2139 * except.c (initialize_handler_parm): Use POINTER_TYPE_P.
2140 * init.c (build_dtor_call): Do not convert_from_reference.
2141 * parser.c (cp_parser_template_argument): Unwrap indirected
2142 reference. Allow TEMPLATE_PARM_INDEX as an object parm.
2143 * pt.c (tsubst_copy_and_build) <case INDIRECT_REF>: Use
2144 convert_from_reference, if indicated.
2145 <case CALL_EXPR>: Do not convert_from_reference.
2146 <case PARM_DECL, VAR_DECL>: Convert_from_reference if needed.
2147 (tsubst_initializer_list): Do not convert_from_reference.
2148 * rtti.c (init_rtti_processing): Adjust node creation.
2149 (throw_bad_typeid): Use const_type_info_type_node.
2150 Do not convert_from_reference.
2151 (typeid_ok_p): Use const_type_info_type_node.
2152 (build_typeid, get_typeid): Always return type_info typed node.
2153 (build_dynamic_cast_1): Dont convert_from_reference. Refactor.
2154 * semantics.c (finish_stmt_expr_expr): Do not
2155 convert_from_reference.
2156 (finish_id_expression): Convert_from_reference as appropriate.
2157 * typeck.c (decay_conversion): Do not convert_from_reference.
2158 (finish_class_member_access_expr): Likewise.
2159 (build_indirect_ref): Use POINTER_TYPE_P.
2160 (convert_arguments): Do not convert_from_reference.
2161 (build_modify_expr): Likewise.
2162 (convert_for_initialization): Likewise.
2163 * typeck2.c (build_x_arrow): Likewise.
2165 2004-12-07 Ziemowit Laski <zlaski@apple.com>
2167 * cp-tree.h (struct lang_type_class): Rename 'objc_protocols'
2168 field to 'objc_info'.
2170 2004-12-07 Kazu Hirata <kazu@cs.umass.edu>
2172 * pt.c: Replace a use of first_rtl_op with TREE_CODE_LENGTH.
2174 2004-12-07 Roger Sayle <roger@eyesopen.com>
2176 * name-lookup.c (leave_scope): We only need to update
2177 class_binding_level when leaving a class scope.
2179 2004-12-06 Ziemowit Laski <zlaski@apple.com>
2181 * cp-tree.h (struct lang_type_class): Add 'objc_protocols' field.
2183 2004-12-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2185 PR c++/17011, c++/17971
2186 * pt.c (tsubst_copy) <FIELD_DECL case>: Check and diagnose
2188 (tsubst_copy_and_build) <COMPONENT_REF case>: Check
2189 error_mark_node after member substitution.
2190 * semantics.c (finish_id_expression): Call
2191 finish_non_static_data_member for non-dependent FIELD_DECL.
2193 2004-12-03 Nathan Sidwell <nathan@codesourcery.com>
2196 * decl.c (grokdeclarator): Make sure class in pointer to member is
2199 2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
2202 * parser.c (cp_parser_new_type_id): Move array size expression
2203 checks from here ...
2204 * init.c (build_new): ... to here.
2206 2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
2209 * parser.c (cp_parser_class_head): Return NULL_TREE when
2210 push_template_decl fails. Update comment.
2212 2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2214 PR c++/15664, c++/18276
2215 * pt.c (tsubst_decl) <TEMPLATE_DECL case>: Reorganize. Correctly
2216 tsubst TEMPLATE_DECL that is a TEMPLATE_TEMPLATE_PARM.
2218 2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2221 * parser.c (cp_parser_type_specifier): Catch template declaration
2224 2004-12-01 Matt Austern <austern@apple.com>
2226 * name-lookup.c (namespace_binding): Omit alias check for global
2229 2004-12-01 Nathan Sidwell <nathan@codesourcery.com>
2232 * parser.c (cp_parser_class_name): Check decl's type is not
2236 * call.c (standard_conversion): Add FLAGS parameter. Do not allow
2237 derived to base conversion when checking constructor
2239 (implicit_conversion): Pass FLAGS to standard_conversion.
2240 (check_constructir_callable): Disallow conversion functions.
2242 2004-11-30 Kazu Hirata <kazu@cs.umass.edu>
2244 * parser.c: Fix comment typos.
2246 2004-11-27 Mark Mitchell <mark@codesourcery.com>
2249 * parser.c (cp_parser_check_for_definition_in_return_type): Take
2250 the defined type as a parameter, and inform the user about the
2251 possibility of a missing semicolon.
2252 (cp_parser_explicit_instantiation): Adjust call to
2253 cp_parser_check_for_definition_in_return_type.
2254 (cp_parser_init_declarator): Likewise.
2255 (cp_parser_member_declaration): Likewise.
2258 * cp-tree.def (TYPENAME_TYPE): Remove discussion of implicit
2259 typename from comments.
2260 * cp-tree.h (TYPENAME_IS_ENUM_P): New macro.
2261 (TYPENAME_IS_CLASS_P): Likewise.
2262 (make_typename_type): Change prototype.
2263 * decl.c (struct_typename_info): New type.
2264 (typename_compare): Expect the second argument to be a
2265 typename_info, not a tree.
2266 (build_typename_type): Add tag_type parameter. Do not create a
2267 new type until necessary.
2268 (make_typename_type): Add tag_type parameter.
2269 * error.c (TYPENAME_TYPE): Print tags other than "typename" if
2271 * friend.c (make_friend_class): Adjust call to make_typename_type.
2272 * parser.c (cp_parser_make_typename_type): Likewise.
2273 (cp_parser_primary_expression): Adjust call to
2274 cp_parser_lookup_name.
2275 (cp_parser_unqualified_id): Adjust calls to cp_parser_class_name.
2276 (cp_parser_class_or_namespace_name): Likewise.
2277 (cp_parser_postfix_expression): Adjust calls to
2279 (cp_parser_mem_initializer_id): Adjust calls to
2280 cp_parser_class_name.
2281 (cp_parser_type_parameter): Adjust calls to cp_parser_lookup_name.
2282 (cp_parser_template_name): Likewise.
2283 (cp_parser_template_argument): Likewise.
2284 (cp_parser_type_name): Adjust call to cp_parser_class_name.
2285 (cp_parser_elaborated_type_specifier): Adjust calls to
2286 make_typename_type and cp_parser_lookup_name.
2287 (cp_parser_namespace_name): Likewise.
2288 (cp_parser_class_name): Replace type_p parameter with tag_type.
2289 Adjust calls to make_typename_type and cp_parser_lookup_name.
2290 (cp_parser_class_head): Adjust calls to cp_parser_class_name.
2291 (cp_parser_base_specifier): Likewise.
2292 (cp_parser_lookup_name): Replace is_type parameter with tag_type.
2293 Adjust calls to make_typename_type and lookup_qualified_name.
2294 (cp_parser_lookup_name_simple): Adjust call to
2295 cp_parser_lookup_name.
2296 (cp_parser_constructor_declarator_p): Adjust call to
2297 cp_parser_class_name.
2298 * pt.c (convert_template_argument): Adjust all to
2300 (tsubst_decl): Do not pre-substitute the type of the declaration.
2301 (tsubst): Hand off declarations more quickly. Adjust call to
2305 * parser.c (cp_parser_postfix_dot_deref_expression): Robustify.
2307 2004-11-29 Daniel Jacobowitz <dan@codesourcery.com>
2310 * Make-lang.in (cp/decl2.o): Update dependencies.
2311 * decl2.c (finish_file): Call maybe_apply_pending_pragma_weaks.
2313 2004-11-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2316 * name-lookup.c (pushtag): Change return type to tree.
2317 * cp-tree.h (pushtag): Adjust declaration.
2318 * decl.c (xref_tag, start_enum): Use return value of pushtag.
2319 * pt.c (push_template_decl_real): Return immediately if
2320 pushdecl_namespace_level returns error_mark_node.
2322 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
2324 * pt.c: Fix a comment typo.
2326 2004-11-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2328 Friend class name lookup 4/n
2329 * class.c (pushclass): Don't call cxx_remember_type_decls.
2330 * cp-tree.h (clear_anon_tags): Remove declaration.
2331 * decl.c (grokdeclarator): Don't call lookup_tag_reverse.
2332 * name-lookup.c (binding_entry_free, binding_table_free): Comment
2334 (binding_table_find_anon_type, binding_table_reverse_maybe_remap,
2335 binding_table_remove_anonymous_types, cxx_remember_type_decls,
2336 bt_print_entry, clear_anon_tags, follow_tag_typedef, lookup_tag,
2337 lookup_tag_reverse): Remove
2338 (begin_scope, leave_scope, kept_level_p, print_binding_level):
2339 Don't use type_decls field in cp_binding_level.
2340 (maybe_process_template_type_declaration, pushtag): Set
2341 CLASSTYPE_NESTED_UTDS directly.
2342 * name-lookup.h (binding_table_remove_anonymous_types,
2343 cxx_remember_type_decls, lookup_tag, lookup_tag_reverse): Remove
2345 (cp_binding_level): Remove type_decls field.
2347 2004-11-26 Kazu Hirata <kazu@cs.umass.edu>
2349 * typeck.c: Fix a comment typo.
2351 2004-11-25 Mark Mitchell <mark@codesourcery.com>
2354 * class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with
2355 unknown_type as non matching. Tidy up.
2356 * pt.c (build_non_dependent_expr): Do not build a
2357 NON_DEPENDENT_EXPR for a VAR_DECL.
2360 * cp-tree.h (lvalue_or_else): Remove declaration.
2361 * tree.c (lvalue_or_else): Remove.
2362 * typeck.c (build_unary_op): Adjust call to lvalue_or_else.
2363 (build_modify_expr): Likewise.
2366 * decl.c (duplicate_decls): Return error_mark_node on error, as
2370 * decl.c (grokvardecl): Keep track of whether or not a there was
2371 explicit qualification.
2372 * name-lookup.c (set_decl_namespace): Complain about explicit
2373 qualification of a name within its own namespace.
2376 * typeck.c (check_return_expr): Robustify.
2378 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2380 Friend class name lookup 3/n, PR c++/3332
2381 * name-lookup.c (push_inner_scope, pop_inner_scope): New functions.
2382 (lookup_type_scope): Don't deal with name from user declaration
2384 * name-lookup.h (push_inner_scope, pop_inner_scope): Add declarations.
2385 * parser.c (cp_parser_class_specifier): Use push_inner_scope and
2388 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2390 Friend class name lookup 2/n, PR c++/14513, c++/15410
2391 * name-lookup.c (lookup_name_real): Simplify.
2392 (lookup_type_scope): Add SCOPE parameter. Handle friend class
2394 * name-lookup.h (tag_scope): New enum type.
2395 (lookup_type_scope): Adjust declaration.
2396 * decl.c (lookup_and_check_tag, xref_tag, xref_tag_from_type):
2397 Change bool parameter GLOBALIZED to TAG_SCOPE parameter SCOPE.
2398 (start_enum): Likewise. Add assertion test that NAME is
2399 IDENTIFIER_NODE. Use anonymous name for dummy ENUMERAL_TYPE in
2401 * cp-tree.h (xref_tag, xref_tag_from_type): Adjust declarations.
2402 * parser.c (cp_parser_elaborated_type_specifier,
2403 cp_parser_class_head): Adjust call to xref_tag.
2404 * pt.c (lookup_template_class, instantiate_class_template):
2406 * rtti.c (init_rtti_processing, build_dynamic_cast_1,
2407 tinfo_base_init, emit_support_tinfos): Likewise.
2409 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
2411 * g++spec.c, lex.c: Avoid ` as left quote in diagnostics.
2413 2004-11-24 Mark Mitchell <mark@codesourcery.com>
2416 * name-lookup.c (supplement_binding): Do not allow typedefs to be
2417 redefined in class scope.
2420 * parser.c (cp_parser_set_decl_type_spec): Do not try to allow
2421 redefinitions of builtin types other that "bool" or "wchar_t".
2423 2004-11-24 Steven Bosscher <stevenb@suse.de>
2425 * decl.c (cxx_init_decl_processing): Don't clear
2426 flag_inline_functions.
2428 2004-11-24 Mark Mitchell <mark@codesourcery.com>
2430 * pt.c (tsubst_function_type): Do not permit function types which
2431 return arrays or functions.
2434 * parser.c (cp_parser_init_declarator): Do not pop scope twice.
2437 * cp-tree.h (CTOR_NAME): Remove.
2438 (DTOR_NAME): Remove.
2439 * decl.c (initialize_predefined_identifiers): Add spaces to the
2440 end of constructor and destructor names.
2442 2004-11-24 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2445 * decl.c (start_decl): Check for invalid specialization headers.
2447 2004-11-24 Paolo Bonzini <bonzini@gnu.org>
2451 * call.c (standard_conversion): Move check for conversions between
2453 * typeck.c (ptr_reasonably_similar): ... here.
2455 2004-11-23 Ben Elliston <bje@au.ibm.com>
2457 * cp-tree.h (context_as_string): Remove extern.
2458 * error.c (context_as_string): Remove.
2460 * cp-tree.h (cp_type_qual_from_rid): Remove extern.
2461 * lex.c (cp_type_qual_from_rid): Remove.
2463 * cp-tree.h (do_poplevel): Remove extern.
2464 (check_multiple_declarators): Likewise.
2465 * semantics.c (do_poplevel): Make static.
2466 (check_multiple_declarators): Remove.
2468 * cp-tree.h (check_final_overrider): Remove extern.
2469 * search.c (check_final_overrider): Make static.
2471 * cp-tree.h (build_artificial_parm): Remove extern.
2472 * decl2.c (build_artificial_parm): Make static.
2474 2004-11-22 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2477 * typeck.c (build_unary_op) <CONVERT_EXPR, NEGATE_EXPR>: Unify code.
2478 Make sure the result is always a rvalue.
2480 2004-11-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2482 * decl.c (start_preparsed_function): Call check_function_type even
2484 (require_complete_types_for_parms): Skip dependent types.
2485 (check_function_type): Likewise.
2487 2004-11-16 Steven Bosscher <stevenb@suse.de>
2489 * Make-lang.in (cp/decl.o, cp/search.o): Don't depend on stack.h.
2490 * search.c: Don't include it.
2492 2004-11-15 Andrew Pinski <pinskia@physics.uc.edu>
2494 * cp-gimplify.c: Include pointer-set.h
2495 (cp_genericize_r): Use pointer_sets instead of a hashtable.
2496 Also instert the new statement for CLEANUP_STMT.
2497 (cp_genericize): Use pointer_sets instead of a hashtable.
2498 * Make-lang.in (cp-gimplify.o): Depend on pointer-set.h.
2500 2004-11-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2502 Friend class name lookup 1/n, PR c++/18471
2503 * decl.c (lookup_and_check_tag): New function.
2504 (xref_tag, start_enum): Use it.
2505 (check_elaborated_type_specifier): Move TEMPLATE_TYPE_PARM check
2506 before !DECL_IMPLICIT_TYPEDEF_P. Also display previously declared
2508 * name-lookup.c (lookup_name_current_level): Rename to ...
2509 (lookup_name_innermost_nonclass_level): ... this.
2510 (lookup_type_scope): New function.
2511 * name-lookup.h (lookup_name_current_level): Rename to ...
2512 (lookup_name_innermost_nonclass_level): ... this.
2513 (lookup_type_scope): Add declaration.
2515 2004-11-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2518 * pt.c (coerce_template_parms): Only emit error message about
2519 invalid template argument when TF_ERROR.
2521 2004-11-12 Mark Mitchell <mark@codesourcery.com>
2524 * decl.c (start_decl): Make sure to set *pop_scope_p. Return
2525 error_mark_node to indicate errors.
2528 * parser.c (cp_parser_direct_declarator): Disallow non-constant
2529 array bounds when not inside a function.
2532 * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an
2533 unqualified name resolves to a member function.
2536 * pt.c (tsubst_copy_and_build): Handle qualified names used from a
2537 derived class correctly.
2539 * decl2.c (import_export_decl): Fix typo in comment.
2540 * tree.c (pod_type_p): Likewise.
2542 2004-11-10 Andrew Pinski <pinskia@physics.uc.edu>
2544 * typeck.c (cxx_mark_addressable): Add braces around the first if.
2546 2004-11-10 Adam Nemet <anemet@lnxw.com>
2549 * typeck.c (cxx_mark_addressable): Issue an error if address of an
2550 explicit register variable is requested.
2552 2004-11-10 Nathan Sidwell <nathan@codesourcery.com>
2555 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK): New.
2556 (struct lang_decl_flags): Add thunk_p flag.
2557 (struct lang_decl): Remove separate fixed_offset. Place
2558 cloned_function and fixed_offset into union.
2559 (DECL_CLONED_FUNCTION_P, DECL_CLONED_FUNCTION): Adjust.
2560 (DECL_THUNK_P, SET_DECL_THUNK_P): Adjust.
2561 (THUNK_FIXED_OFFSET): Adjust.
2562 * method.c (make_thunk): Adjust.
2564 2004-11-09 Mark Mitchell <mark@codesourcery.com>
2567 * init.c (build_new_1): Handle parenthesized type-ids that name an
2570 2004-11-09 Joseph S. Myers <joseph@codesourcery.com>
2572 * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
2573 pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
2574 quoting in diagnostics.
2575 * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
2576 quoting in printf format.
2577 * decl.c (duplicate_decls, start_decl): Use %qD instead of
2580 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
2582 * class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c,
2583 search.c, typeck2.c: Fix comment formatting.
2585 2004-11-04 Ulrich Weigand <uweigand@de.ibm.com>
2587 PR tree-optimization/18184
2588 * cp-objcp-common.c (cxx_types_compatible_p): Do not treat pointers
2589 of different modes or alias-all flags as equivalent.
2590 * typeck.c (comptypes): Likewise.
2592 2004-11-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2595 * cp-tree.h (TYPE_REF_OBJ_P): New macro.
2596 (TYPE_PTR_P, TYPE_PTROB_P, TYPE_PTROBV_P, TYPE_PTRFN_P,
2597 TYPE_REFFN_P): Document.
2598 (fold_decl_constant_value): New prototype.
2599 * pt.c (convert_nontype_argument_function): Rewrite and extract
2601 (fold_decl_constant_value, convert_nontype_argument_function): New.
2602 (lookup_template_class): Add comment about useless double call.
2603 * mangle.c (write_expression): Strip conversions before lowering
2605 * cvt.c (ocp_convert): Check LOOKUP_COMPLAIN for a pedwarn. Disallow
2606 enum to enum conversion.
2608 2004-11-02 Mark Mitchell <mark@codesourcery.com>
2611 * parser.c (cp_parser_type_parameter): Robustify.
2614 * parser.c (cp_parser_single_declaration): Disallow template
2618 * typeck.c (build_const_cast): Use error_operand_p.
2620 2004-11-02 Ziemowit Laski <zlaski@apple.com>
2622 * cp-lang.c (cxx_types_compatible_p): Remove prototype and definition.
2623 (LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h.
2624 * cp-objcp-common.c (cxx_types_compatible_p): Moved definition here
2626 * cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here
2628 (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c.
2630 2004-11-01 Nathan Sidwell <nathan@codesourcery.com>
2633 * search.c (check_final_overrider): Deprecate gnu covariant extension.
2635 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2637 Convert diagnostics to use quoting flag q 9/n
2638 * typeck.c (build_x_unary_op, convert_member_func_to_ptr,
2639 get_delta_difference): Use new quotation style.
2640 * repo.c (reopen_repo_file_for_write): Likewise.
2641 * pt.c (do_type_instantiation): Likewise.
2642 * parser.c (cp_parser_diagnose_invalid_type_name):
2643 * name-lookup.c (push_overloaded_decl, set_decl_namespace):
2644 * error.c (cp_print_error_function,
2645 print_instantiation_full_context): Likewise.
2646 * decl.c (define_label, grok_reference_init,
2647 maybe_deduce_size_from_array_init, revert_static_member_fn):
2648 * decl2.c (check_classfn): Likewise.
2649 * class.c (add_method, check_field_decls, layout_class_type,
2650 resolve_address_of_overloaded_function): Likewise.
2651 * call.c (build_x_va_arg, build_over_call): Likewise.
2653 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2655 Convert diagnostics to use quoting flag q 8/n
2656 * cvt.c (cp_convert_to_pointer, warn_ref_binding,
2657 convert_to_reference, ocp_convert, convert_to_void
2658 cp_convert_to_pointer): Use new quotation style.
2660 2004-10-31 Mark Mitchell <mark@codesourcery.com>
2663 * typeck2.c (store_init_value): Use split_nonconstant_init even
2664 for types that require construction.
2666 1004-10-28 Matt Austern <austern@apple.com>
2669 * cp-tree.h (class_key_or_enum_as_string): Declare.
2670 * error.c (class_key_or_enum): Rename to class_key_or_enum_as_string
2671 and remove static qualifier.
2672 * decl.c (shadow_tag): Warn about ignored attributes in class/struct/
2673 union/enum declaration.
2675 2004-10-29 Kazu Hirata <kazu@cs.umass.edu>
2677 * pt.c: Fix a comment typo.
2679 2004-10-28 Nathan Sidwell <nathan@codesourcery.com>
2681 * typeck.c (composite_pointer_type): Remove comment about DR 195.
2682 (build_reinterpret_cast_1): Revert DR195 patch. Only emit a
2683 warning when being pedantic.
2684 (build_reinterpet_cast, build_c_cast): Adjust.
2686 2004-10-29 Mark Mitchell <mark@codesourcery.com>
2689 * decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they
2690 appear in a constructor/destructor that will be cloned.
2692 1004-10-28 Matt Austern <austern@apple.com>
2695 * decl.c (finish_enum): Handle packed attribute.
2696 * parser.c (cp_parser_enum_specifier): Process trailing attributes.
2698 2004-10-28 Mark Mitchell <mark@codesourcery.com>
2701 * pt.c (instantiate_class_template): Increment
2702 processing_template_decl when substituting into a member class
2705 2004-10-27 Mark Mitchell <mark@codesourcery.com>
2708 * call.c (convert_like_real): Fix formatting.
2709 (initialize_reference): When binding a temporary to a base class,
2710 ensure that the nominal copy made is to the derived class, not the
2714 * parser.c (cp_parser_next_token_ends_template_argument_p): Do not
2717 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
2719 * decl.c (bad_specifiers): Move the q after the %.
2721 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
2723 * parser.c (cp_parser_diagnose_invalid_type_name): Move the q after
2726 2004-10-26 Mark Mitchell <mark@codesourcery.com>
2728 * name-lookup.c (do_namespace_alias): Use FROB_CONTEXT.
2729 * search.c (current_scope): Fix prototype.
2732 * search.c (current_scope): Return the innermost non-block scope,
2733 not the innermost non-block, non-namespace scope.
2734 (at_namespace_scope_p): Adjust accordingly.
2735 (dfs_accessible_post): Do not pass namespaces to is_friend.
2736 (dfs_walk_once_accessible_r): Likewise.
2737 * decl.c (grokvardecl): Adjust call to current_scope.
2738 (build_enumerator): Likewise.
2739 * parser.c (cp_parser_using_declaration): Likewise.
2740 (cp_parser_direct_declarator): Use at_namespace_scope_p instead of
2742 (cp_parser_class_head): Adjust call to current_scope.
2743 * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
2747 * pt.c (tusbst_copy_and_build): Resolve enumeration constants to
2748 their underlying values.
2751 * typeck.c (build_binary_op): Honor build_type, even when in a
2754 2004-10-26 Nathan Sidwell <nathan@codesourcery.com>
2756 * parser.c (cp_lexer_get_preprocessor_token): Remove unneeded
2757 padding token checking.
2759 2004-10-25 Andrew Pinski <pinskia@physics.uc.edu>
2762 * decl.c (grokdeclarator) <case cdk_array>: Remove the call
2763 layout_type as it is already done by create_array_type_for_decl.
2765 2004-10-22 Nathan Sidwell <nathan@codesourcery.com>
2768 * parser.c (eof_token): Make const, correctly initialize rid and
2770 (struct cp_lexer): Replace buffer_end pointer with buffer_length
2772 (cp_lexer_new_main): Directly grow lexer's buffer here. Don't
2774 (cp_lexer_new_from_tokens): Adjust.
2775 (cp_lexer_grow_buffer): Remove.
2776 (cp_lexer_peek_nth_token, cp_lexer_consume_token,
2777 cp_lexer_purge_token): Add const casts.
2779 2004-10-21 Mark Mitchell <mark@codesourcery.com>
2783 * cp-tree.h (convert_to_base): Change prototype.
2784 (build_ptrmemfunc): Likewise.
2785 (convert_ptrmem): New function.
2786 * call.c (struct conversion): Adjust documentation for base_p.
2787 (standard_conversion): Set base_p for ck_pmem conversions as
2789 (convert_like_real): Use convert_to_base for ck_pmem and ck_ptr
2791 * class.c (convert_to_base): Handle both pointers and objects.
2792 Add nonnull parameter.
2793 (build_vfield_ref): Adjust call to convert_to_base.
2794 * cvt.c (cp_convert_to_pointer): Adjust call to build_ptrmemfunc.
2795 (convert_force): Likewise.
2796 * typeck.c (build_unary_op): Likewise.
2797 (convert_ptrmem): New function.
2798 (build_static_cast_1): Use it.
2799 (build_reinterpret_cast): Allow conversions to vector types.
2800 (get_delta_difference): Add c_cast_p parameter.
2801 (build_ptrmemfunc): Likewise. Adjust calls to
2802 get_delta_difference.
2804 2004-10-21 Andrew Pinski <pinskia@physics.uc.edu>
2807 * error.c (cp_error_at): Output the context as it might be
2808 different file as the other location.
2810 2004-10-21 Kazu Hirata <kazu@cs.umass.edu>
2812 * typeck.c: Fix a comment typo.
2814 2004-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2817 * decl.c (make_unbound_class_template): Add PARM_LIST parameter.
2818 * cp-tree.h (make_unbound_class_template): Adjust prototype.
2819 * parser.c (cp_parser_lookup_name): Adjust call to
2820 make_unbound_class_template.
2821 (cp_parser_single_declaration): Handle member class of class
2822 template as template friend parsing correctly.
2823 * friend.c (is_friend): Call is_specialization_of_friend for
2824 template friend class.
2825 (make_friend_class): Handle member class of class template as
2827 * pt.c (is_specialization_of_friend): Likewise.
2828 (instantiate_class_template): Likewise.
2829 (tsubst): Adjust call to make_unbound_class_template.
2831 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
2833 * typeck.c (composite_pointer_type): Add comment about DR 195
2834 (build_reinterpret_cast_1): Add for_reinterpret_cast_p parameter.
2835 Allow function pointer conversions that DR195 suggests.
2836 (build_reinterpret_cast, build_c_cast): Update
2837 build_reinterpret_cast_1 calls.
2839 2004-10-20 Kazu Hirata <kazu@cs.umass.edu>
2841 * call.c, typeck.c: Fix comment typos.
2843 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
2845 * parser.c (cp_token_position): New typedef. Define VEC thereof.
2846 (struct cp_lexer): Allow buffer and buffer_end to be NULL. Make
2847 next_token and last_token cp_token_position. Make saved_tokens a
2848 VEC(cp_token_position).
2849 (eof_token): New static variable.
2850 (CP_SAVED_TOKENS_SIZE): Rename to ...
2851 (CP_SAVED_TOKEN_STACK): ... here.
2852 (cp_lexer_new_main): Adjust main lexer creation and buffer
2854 (cp_lexer_new_from_tokens): Do not copy the tokens, merely point
2855 to the parent buffer. Do not append eof token.
2856 (cp_lexer_destroy): Only free buffer if non-NULL. Free token
2858 (cp_lexer_next_token, cp_lexer_prev_token): Remove.
2859 (cp_lexer_token_position, cp_lexer_token_at): New.
2860 (cp_lexer_saving_tokens): Adjust. Make inline.
2861 (cp_lexer_advance_token, cp_lexer_token_difference): Remove.
2862 (cp_lexer_peek_token_emit_debug_info): Fold into ...
2863 (cp_lexer_peek_token): ... here.
2864 (cp_lexer_peek_nth_token): Don't peek past EOF.
2865 (cp_lexer_consume_token): Set next_token to eof_token, if reaching
2867 (cp_lexer_purge_token): Adjust eof setting.
2868 (cp_lexer_purge_tokens_after): Likewise.
2869 (cp_lexer_save_tokens): Push next_token directly.
2870 (cp_lexer_commit_tokens): Adjust.
2871 (cp_lexer_rollback_tokens): Pop next_token directly.
2872 (cp_parser_check_for_invalid_template_id): Adjust token purging.
2873 (cp_parser_translation_unit): Do not consume the EOF.
2874 (cp_parser_nested_name_specifier_opt): Adjust token purging.
2875 (cp_parser_template_id, cp_parser_template_name): Likewise.
2877 2004-10-19 Mark Mitchell <mark@codesourcery.com>
2880 * call.c (struct conversion): Add base_p.
2881 (convert_like): Add c_cast_p argument.
2882 (convert_like_with_conversion): Likewise.
2883 (build_conv): Clear base_p.
2884 (standard_conversion): Set it, for derived-to-base conversions.
2885 (convert_like_real): Add c_cast_p parameter. Handle pointer
2886 conversions directly rather than relying on ocp_convert.
2887 (perform_direct_initialization_if_possible): Add c_cast_p
2889 * cp-tree.h (perform_direct_initialization_if_possible): Change
2891 (convert_member_func_to_ptr): New function.
2892 * typeck.c (check_for_casting_away_constness): Add diag_fn
2894 (build_static_cast_1): New function, split out from ...
2895 (build_static_cast): ... here. Use build_static_cast_1.
2896 (build_reinterpret_cast_1): New function, split out from ...
2897 (build_reinterpret_cast): ... here. Use build_reinterpret_cast_1.
2898 (build_const_cast_1): New function, split out from ...
2899 (build_const_cast): ... here. Use build_const_cast_1.
2900 (build_c_cast): Rewrite to use build_const_cast_1,
2901 build_static_cast_1, and build_reinterpret_cast_1.
2902 (convert_member_func_to_ptr): New function.
2904 2004-10-19 Paolo Bonzini <bonzini@gnu.org>
2907 * parser.c (enum cp_parser_prec): Give relational expressions
2908 a higher precedence than equality expressions.
2910 2004-10-15 Nathan Sidwell <nathan@codesourcery.com>
2912 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call.
2913 (ACCESSIBLY_UNIQUELY_DERIVED_P): Remove.
2914 (PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call.
2915 (enum base_access): Reorganize.
2916 (accessible_base_p, accessible_p): Add consider_local_p parameter.
2917 * call.c (standard_conversion): Update comment about
2919 (enforce_access): Adjust accessible_p call.
2920 (build_over_call): Adjust accessible_base_p call.
2921 * class.c (convert_to_base): Adjust lookup_base call.
2922 (build_vtbl_ref_1): Likewise.
2923 (warn_about_ambiguous_bases): Likewise. Add early exit.
2924 * cvt.c (convert_to_pointer_force) Adjust lookup_base call.
2925 * search.c (accessible_base_p): Add consider_local_p parameter.
2926 (lookup_base): Pass consider_local_p to accessible_base_p call.
2927 (friend_accessible_p): Check whether scope is a class member.
2928 Remove unnecessary class template check.
2929 (accessible_p): Add consider_local_p parameter. Use it.
2930 (adjust_result_of_qualified_name_lookup): Adjust lookup_base call.
2931 * tree.c (maybe_dummy_object): Likewise.
2932 * typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P.
2933 (build_class_member_access_expr): Adjust lookup_base call.
2934 * typeck2.c (binfo_or_else): Likewise.
2935 * rtti.c (build_dynamic_cast_1): Access can consider friendship
2938 2004-10-17 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2941 * decl2.c (grokfield): Apply attributes also to TYPE_DECLs.
2943 2004-10-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2946 * parser.c (cp_parser_parenthesized_expression_list): Fold
2947 non-dependent expressions in attribute lists.
2949 2004-10-15 Mark Mitchell <mark@codesourcery.com>
2952 * decl.c (declare_global_var): Use the return value from pushdecl.
2955 * parser.c (cp_parser_simple_declaration): Do not diagnose invalid
2956 type names if we have already found a valid type.
2957 (cp_parser_member_declaration): Likewise.
2960 * parser.c (cp_parser_member_specification_opt): Handle
2963 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
2965 * dump.c, g++spec.c, repo.c: Update copyright.
2967 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
2969 * decl.c: Fix a comment typo.
2971 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
2974 * name-lookup.c (parse_using_directive): If we have a
2975 error_mark_node, do not set the decl namespace associations
2978 2004-10-14 Mark Mitchell <mark@codesourcery.com>
2981 * decl.c (cp_finish_decl): Do not call expand_static_init more
2982 than once for a single variable.
2984 2004-10-14 Matt Austern <austern@apple.com>
2986 * Make-lang.in (pt.o): depends on pointer-set.h
2987 * cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now.
2988 * pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t
2989 (for_each_template_parm): Convert from htab_t to pointer_set_t.
2990 * tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now.
2992 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
2995 * semantics.c (finish_for_expr): Convert expression to void
2996 so that we don't create temporaries for a?b:c.
2998 2004-10-13 Kazu Hirata <kazu@cs.umass.edu>
3000 * search.c: Fix a comment typo.
3002 2004-10-12 Nathan Sidwell <nathan@codesourcery.com>
3004 * class.c (dfs_modify_vtables): Simplify condition. Return
3005 dfs_skip_bases as appropriate.
3006 (modify_all_vtables): Walk in pre-order.
3007 * search.c (dfs_walk_all, dfs_walk_once_r,
3008 dfs_walk_once_accessible_r): Assert post order function never
3009 returns dfs_skip_bases.
3011 * search.c (struct lookup_base_data_s): New.
3012 (lookup_base_r): Replace with ...
3013 (dfs_lookup_base): ... this.
3014 (lookup_base): Use dfs_walk_all.
3016 2004-10-12 Kazu Hirata <kazu@cs.umass.edu>
3018 * search.c: Fix comment typos.
3020 2004-10-11 Mark Mitchell <mark@codesourcery.com>
3023 * parser.c (cp_parser_declarator): Add member_p parameter.
3024 (cp_parser_condition): Adjust calls to cp_parser_declarator.
3025 (cp_parser_explicit_instantiation): Likewise.
3026 (cp_parser_init_declarator): Likewise.
3027 (cp_parser_direct_declarator): Add member_p parameter. Do not
3028 parse tentatively when parsing the parameters to a member.
3029 (cp_parser_type_id): Adjust calls to cp_parser_declarator.
3030 (cp_parser_parameter_declaration): Likewise.
3031 (cp_parser_member_declaration): Likewise.
3032 (cp_parser_exception_declaration): Likewise.
3035 * cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment.
3036 * pt.c (optimize_specialization_lookup_p): Do not optimize lookups
3037 for members of partial or explicit specializations.
3040 * decl2.c (finish_anon_union): Robustify.
3042 2004-10-11 Nathan Sidwell <nathan@codesourcery.com>
3044 * cp-tree.h (get_dynamic_cast_base_type): Rename to ...
3045 (dcast_base_hint): ... here.
3046 * rtti.c (build_dynamic_cast_1): Use dcast_base_hint.
3047 * search.c (struct dcast_data_s): New.
3048 (dynamic_cast_base_recurse): Remove. Replace with ...
3049 (dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New.
3050 (get_dynamic_cast_base_type): Rename to ...
3051 (dcast_base_hint): ... here. Use dfs_walk_once_accessible.
3052 (accessible_r): Remove.
3053 (dfs_accessible_post): New, broken out of accessible_r.
3054 (accessible_p): Use dfs_walk_once_accessible.
3055 (dfs_walk_once_accessible_r): New. From accessible_r.
3056 (dfs_walk_once_accessible): New. From acessible_p.
3058 * cp-tree.h (SAME_BINFO_TYPE_P): New.
3059 * class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare
3061 (convert_to_base_statically, determine_primary_bases,
3062 update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits,
3063 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
3064 accumulate_vtbl_inits, dfs_accumulate_vtbl_inits,
3065 build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise.
3066 * init.c (expand_member_init): Likewise.
3067 * search.c (lookup_base_r, dynamic_cast_base_recurse,
3068 binfo_via_virtual, copied_binfo, binfo_for_vbase,
3069 original_binfo): Likewise.
3070 * tree.c (copy_binfo): Likewise.
3072 2004-10-11 Kazu Hirata <kazu@cs.umass.edu>
3074 * semantics.c: Fix comment typos.
3076 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
3081 * semantics.c (maybe_cleanup_point_expr): Call
3082 fold_build_cleanup_point_expr.
3083 (maybe_cleanup_point_expr_void): New function.
3084 (add_decl_expr): Call maybe_cleanup_point_expr_void.
3085 (finish_expr_stmt): Likewise.
3086 (finish_return_stmt): Likewise.
3087 (finish_for_expr): Likewise.
3088 (finish_asm_stmt): Likewise.
3089 * typeck.c (condition_conversion): Call
3090 fold_build_cleanup_point_expr.
3092 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
3095 * semantics.c (add_decl_expr): If the decl has a size which
3096 has side effects then the decl expression needs a cleanup point.
3098 2004-10-10 Mark Mitchell <mark@codesourcery.com>
3101 * decl.c (grokdeclarator): Robustify error-recovery on invalid
3104 2004-10-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
3106 Convert diagnostics to use quoting flag q 7/n
3107 * typeck.c (composite_pointer_type_r, composite_pointer_type,
3108 cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr,
3109 string_conv_p, build_class_member_access_expr,
3110 build_class_member_access_expr, lookup_destructor,
3111 finish_class_member_access_expr, build_indirect_ref,
3112 get_member_function_from_ptrfunc, build_function_call,
3113 convert_arguments, build_binary_op, pointer_diff, build_unary_op,
3114 check_for_casting_away_constness, build_static_cast,
3115 build_reinterpret_cast, build_const_cast, build_c_cast,
3116 build_modify_expr, get_delta_difference, build_ptrmemfunc,
3117 dubious_conversion_warnings, convert_for_assignment,
3118 convert_for_initialization,
3119 maybe_warn_about_returning_address_of_local, check_return_expr):
3122 * typeck2.c (error_not_base_type, readonly_error,
3123 abstract_virtuals_error, cxx_incomplete_type_diagnostic,
3124 store_init_value, digest_init, build_x_arrow,
3125 build_m_component_ref, require_complete_eh_spec_types): Likewise.
3127 * tree.c (cp_build_qualified_type_real,
3128 handle_java_interface_attribute, handle_init_priority_attribute):
3131 * semantics.c (finish_asm_stmt, finish_non_static_data_member,
3132 finish_pseudo_destructor_expr,
3133 check_template_template_default_arg, begin_class_definition,
3134 finish_base_specifier, qualified_name_lookup_error,
3135 finish_id_expression, finish_typeof): Likewise.
3137 * search.c (lookup_base, check_final_overrider,
3138 look_for_overrides_r): Likewise.
3140 * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise.
3142 2004-10-09 Mark Mitchell <mark@codesourcery.com>
3145 * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a
3149 * init.c (build_new): Correct comments.
3150 * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in
3154 * parser.c (cp_parser_postfix_dot_deref_expression): If the
3155 pseduo-destructor-name production does not work, fall back to the
3156 ordinary production.
3159 * tree.c (cp_tree_equal): Handle a BASELINK.
3162 * cp-tree.h (check_var_type): New function.
3163 * decl.c (check_var_type): New function, split out from ...
3164 (grokdeclarator): ... here.
3165 * pt.c (tsubst_decl): Use check_var_type.
3168 * decl.c (grokdeclarator): Disallow declarations of operators as
3171 2004-10-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3174 * error.c (dump_expr): Add missing case for RDIV_EXPR.
3176 2004-10-08 Kazu Hirata <kazu@cs.umass.edu>
3178 * pt.c, search.c: Fix comment typos.
3180 2004-10-08 Nathan Sidwell <nathan@codesourcery.com>
3182 * cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp,
3184 (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New.
3185 * class.c (struct find_final_overrider_data): Remove most_derived,
3186 vpath_list and vpath fields. Add path field.
3187 (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust.
3188 (dfs_find_final_overrider): Rename to ...
3189 (dfs_find_final_overrider_pre): ... here. Adjust.
3190 (dfs_find_final_overrider_post): Adjust.
3191 (dfs_find_final_overrider_q): Fold into
3192 dfs_find_final_overrider_pre.
3193 (find_final_overrider): Adjust dfs searching.
3194 (dfs_modify_vtables): Don't mark binfo here.
3195 (modify_all_vtables): Use dfs_walk_once.
3196 (build_vtt_inits): Likwise. Use dfs_walk_all.
3197 (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here.
3198 Return dfs_skip_bases as appropriate.
3199 (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate.
3200 * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as
3201 appropriate. Don't mark binfo here.
3202 (initialize_vtbl_ptrs): Use dfs_walk_once.
3203 * search.c (struct vbase_info): Remove unused struct.
3204 (access_in_type): Use dfs_walk_once.
3205 (dfs_access_in_type): Don't mark binfo here.
3206 (dfs_accessible_queue_p, dfs_accessible_p) Remove.
3208 (accessible_r): ... here. New. Specialize dfs_walk_once.
3209 (accessible_p): Use accessible_r.
3210 (lookup_field_queue_p): Remove. Fold into ...
3211 (lookup_field_r): ... here. Adjust.
3212 (lookup_member): Use dfs_walk_all.
3213 (dfs_walk_real, dfs_walk): Replace with ...
3214 (dfs_walk_all, dfs_walk_once): ... these.
3215 (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once.
3216 (dfs_unmark, unmarkedp, markedp): Remove.
3217 (dfs_get_pure_virtuals): Don't mark binfo here.
3218 (get_pure_virtuals): Use dfs_walk_once.
3219 (dfs_debug_unmarked_p): Remove. Fold into ...
3220 (dfs_debug_mark): ... here.
3221 (note_debug_info_needed): Use dfs_walk_all.
3223 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
3225 * pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the
3226 CLEANUP_POINT_EXPR to get the asm expression.
3228 2004-10-07 Mark Mitchell <mark@codesourcery.com>
3230 * cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag.
3231 (DECL_MEMBER_TEMPLATE_P): New macro.
3232 (is_member_template): Remove.
3233 (class_method_index_for_fn): New function.
3234 * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P.
3235 * class.c (finish_struct_methods): Remove out-of-date comment.
3236 * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P.
3237 * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and
3238 class_method_index_for_fn.
3239 * pt.c (is_member_template): Remove.
3240 (is_member_template_class): Likewise.
3241 (optimize_specialization_lookup_p): New function.
3242 (retrieve_specialization): Optimize lookups for members that are
3243 not member templates.
3244 (register_specialization): Adjust accordingly.
3245 (build_template_decl): Add member_template_p parameter. Set
3246 DECL_MEMBER_TEMPLATE_P.
3247 (process_partial_specialization): Adjust call to
3248 retrieve_specialization.
3249 (push_template_decl_real): Determine whether the template is a
3251 (lookup_template_class): Use retrieve_specialization.
3252 (tsubst_decl): Adjust call to retrieve_specialization.
3253 (tsubst_exception_specification): New function.
3255 (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P.
3256 (instantiate_template): Adjust call to retrieve_specialization.
3257 (regenerate_decl_from_template): Do not actually generate a new
3259 (instantiate_decl): Adjust call to retrieve_specialization.
3260 (class_method_index_for_fn): New method.
3262 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
3264 * parser.c (cp_parser_asm_definition): Look passed the
3265 CLEANUP_POINT_EXPR to get the asm expression.
3267 2004-10-06 Andrew Pinski <pinskia@physics.uc.edu>
3270 * semantics.c (finish_asm_stmt): Asm expressions need cleanup
3273 2004-10-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
3275 Convert diagnostics to use quoting flag q 6/n
3276 * pt.c (finish_member_template_decl, check_specialization_scope,
3277 maybe_process_partial_specialization, determine_specialization,
3278 check_explicit_specialization, maybe_check_template_type,
3279 process_partial_specialization, check_default_tmpl_args,
3280 push_template_decl_real, redeclare_class_template,
3281 convert_nontype_argument, coerce_template_parms,
3282 lookup_template_class, push_tinst_level,
3283 instantiate_class_template, tsubst_arg_types,
3284 tsubst_function_type, tsubst, tsubst_qualified_id,
3285 tsubst_copy_and_build, check_instantiated_args,
3286 do_decl_instantiation, do_type_instantiation,
3287 invalid_nontype_parm_type_p, check_specialization_namespace,
3288 convert_template_argument, determine_specialization,
3289 check_template_shadow, tsubst_decl
3290 instantiate_pending_templates): Use quoting marks.
3292 2004-10-05 Nathan Sidwell <nathan@codesourcery.com>
3295 * parser.c (cp_parser_postfix_expression): Inhibit Koenig when
3296 unqualified lookup finds a member function.
3298 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3300 Convert diagnostics to use quoting flag q 5/n
3301 * parser.c (cp_parser_name_lookup_error,
3302 cp_parser_diagnose_invalid_type_name,
3303 cp_parser_primary_expression, cp_parser_unqualified_id,
3304 cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement,
3305 cp_parser_jump_statement, cp_parser_simple_declaration,
3306 cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id,
3307 cp_parser_type_parameter, cp_parser_template_id,
3308 cp_parser_template_name, cp_parser_direct_declarator,
3309 cp_parser_parameter_declaration_list, cp_parser_class_head,
3310 cp_parser_base_specifier, cp_parser_lookup_name,
3311 cp_parser_late_parsing_default_args,
3312 cp_parser_optional_template_keyword
3313 cp_parser_elaborated_type_specifier, cp_parser_check_class_key,
3314 cp_parser_check_access_in_redeclaration): Use quoting marks.
3316 * name-lookup.c (supplement_binding, pushdecl,
3317 check_for_out_of_scope_variable, validate_nonmember_using_decl,
3318 do_nonmember_using_decl, lookup_tag, set_decl_namespace,
3319 push_namespace, do_namespace_alias, do_using_directive,
3320 ambiguous_decl, lookup_namespace_name, add_function): Likewise.
3322 * method.c (use_thunk): Likewise.
3324 * lex.c (unqualified_name_lookup_error,
3325 unqualified_fn_lookup_error): Likewise.
3327 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3329 Convert diagnostics to use quoting flag q 4/n
3330 * except.c (decl_is_java_type, build_throw,
3331 is_admissible_throw_operand, check_handlers_1, check_handlers):
3332 Use quoting formats.
3333 * friend.c (add_friend, make_friend_class, do_friend): Likewise.
3334 * init.c (sort_mem_initializers, emit_mem_initializers,
3335 member_init_ok_or_else, expand_member_init, is_aggr_type,
3336 build_offset_ref, build_java_class_ref): Likewise.
3338 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3340 Convert diagnostics to use quoting flag q 3/n
3341 * decl.c (pop_label, duplicate_decls, redeclaration_error_message,
3342 redeclaration_error_message, lookup_label, check_goto,
3343 make_typename_type, make_unbound_class_template,
3344 fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1,
3345 grok_reference_init, layout_var_decl, maybe_commonize_var,
3346 check_for_uninitialized_const_var, reshape_init_array,
3347 reshape_init, check_initializer, cp_finish_decl,
3348 member_function_or_else, bad_specifiers, grokfndecl, grokvardecl,
3349 check_static_variable_definition, compute_array_index_type,
3350 create_array_type_for_decl, check_special_function_return_type,
3351 grokdeclarator, check_default_argument, grokparms,
3352 grok_ctor_properties, grok_op_properties,
3353 check_elaborated_type_specifier, xref_tag, finish_enum,
3354 build_enumerator, check_function_type, start_preparsed_function,
3355 store_parm_decls): Use quoting formats.
3356 * decl2.c (grok_array_decl, delete_sanity, check_member_template,
3357 check_java_method, check_classfn, finish_static_data_member_decl,
3358 grokfield, grokbitfield, grok_function_init,
3359 build_anon_union_vars, coerce_new_type, coerce_delete_type,
3360 check_default_args): Likewise.
3361 * parser.c (cp_parser_decl_specifier_seq): Likewise.
3363 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3365 Convert diagnostics to use quoting flag q 2/n
3366 * class.c (build_base_path, add_method, alter_access,
3367 handle_using_decl, check_bases,
3368 maybe_warn_about_overly_private_class, find_final_overrider,
3369 warn_hidden, finish_struct_anon, add_implicitly_declared_members,
3370 check_bitfield_decl, check_field_decls, layout_empty_base,
3371 build_base_field, check_methods, layout_virtual_bases,
3372 warn_about_ambiguous_bases, layout_class_type, finish_struct_1,
3373 resolve_address_of_overloaded_function, instantiate_type,
3374 note_name_declared_in_class): Use format flag "q" for quoting.
3376 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3378 Convert diagnostics to use quoting flag q 1/n
3379 * error.c (locate_error): Ignore quoting flag q.
3380 * call.c (build_user_type_conversion_1, build_operator_new_call,
3381 build_object_call, op_error, build_conditional_expr,
3382 build_new_op, build_op_delete_call, enforce_access,
3383 convert_like_real, convert_arg_to_ellipsis, build_x_va_arg,
3384 convert_default_arg, build_over_call, build_new_method_call,
3385 joust, perform_implicit_conversion, initialize_reference): Use the
3388 2004-10-03 Andrew Pinski <pinskia@physics.uc.edu>
3391 * typeck.c (build_reinterpret_cast): Return if the inner type
3394 2004-10-01 Jan Hubicka <jh@suse.cz>
3396 * semantics.c (expand_body): Update call of tree_rest_of_compilation.
3398 2004-09-30 Nathan Sidwell <nathan@codesourcery.com>
3400 * cp-tree.h (struct lang_decl): Shrink by reordering fields and
3401 turning operator_code and fixed_offset into bitfields.
3403 2004-09-29 Joseph S. Myers <jsm@polyomino.org.uk>
3405 * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
3407 2004-09-29 Jason Merrill <jason@redhat.com>
3409 PR tree-optimization/17697
3410 * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
3412 2004-09-28 Jason Merrill <jason@redhat.com>
3415 * class.c (build_base_field): Set TYPE_MODE.
3417 2004-09-28 Roger Sayle <roger@eyesopen.com>
3420 * g++spec.c (lang_specific_driver): Unrecognized libraries, other
3421 than -lc and -lm, may require linking against libstc++.
3423 2004-09-28 Kazu Hirata <kazu@cs.umass.edu>
3425 * tree.c: Fix a comment typo.
3427 2004-09-28 Nathan Sidwell <nathan@codesourcery.com>
3429 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove.
3430 (struct secondary_vptr_vtt_init_data_s): New.
3431 (build_vtt_inits): Adjust dfs_walkers.
3432 (dfs_build_secondary_vptr_vtt_inits): Caller data is a
3433 secondary_vptr_vtt_init_data_s structure. Adjust.
3434 (dfs_ctor_vtable_bases_queue_p): Remove.
3435 (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify.
3437 * pt.c (struct get_template_base_data_s): Remove.
3438 (get_template_base_r): Fold into get_template_base.
3439 (get_template_base): Walk base binfos directly in inheritance
3442 2004-09-27 Mark Mitchell <mark@codesourcery.com>
3445 * cp-tree.h (fold_if_not_in_template): New function.
3446 * call.c (build_conditional_expr): Use fold_if_not_in_template.
3447 (build_cxx_call): Likewise.
3448 * cvt.c (convert_to_complex): Likewise.
3449 (ocp_convert): Likewise.
3450 (convert): Likewise.
3451 (convert_force): Likewise.
3452 * decl.c (compute_array_index_type): Clear
3453 processing_template_decl while folding array bounds.
3454 * pt.c (convert_nontype_argument): Clear
3455 processing_template_decl while processing non-type argument
3457 * tree.c (fold_if_not_in_template): New function.
3458 * typeck.c (build_class_member_access_expr): Use
3459 fold_if_not_in_template.
3460 (build_array_ref): Likewise.
3461 (build_binary_op): Likewise. Do not try to optimize computations
3462 when processing templates.
3463 (cp_pointer_int_sum): Use fold_if_not_in_template.
3464 (pointer_diff): Likewise.
3465 (build_unary_op): Likewise.
3466 (build_reinterpret_cast): Likewise.
3467 (get_delta_difference): Likewise.
3468 (expand_ptrmemfunc_cst): Likewise.
3469 (dubious_conversion_warnings): Likewise.
3471 2004-09-27 Matt Austern <austern@apple.com>
3473 * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c
3474 (cp_lexer_get_preprocessor_token): Set implicit_extern_c for
3475 tokens that come from headers that are implicitly extern "C".
3476 (struct cp_parser): new one-bit field, implicit_extern_c.
3477 (cp_parser_new): Set parser's implicit_extern_c to false.
3478 (cp_parser_translation_unit): Pop lang context if we were in a
3479 header that was implicitly extern "C".
3480 (cp_parser_declaration_seq_opt): Push/pop lang context as
3481 required by the token's and parser's implicit_extern_c.
3483 2004-09-27 Mark Mitchell <mark@codesourcery.com>
3486 * cp-tree.h (shared_member_p): Declare.
3487 * search.c (shared_member_p): Give it external linkage.
3488 * semantics.c (finish_qualified_id_expr): Use it.
3489 (finish_id_expression): Likewise.
3492 * semantics.c (finish_id_expression): Do not add "this->" to
3493 static member functions.
3495 2004-09-27 Nathan Sidwell <nathan@codesourcery.com>
3498 * error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
3500 * class.c (struct count_depth_data): Remove.
3501 (dfs_depth_post, dfs_depth_q): Remove.
3502 (find_final_overrider): Use number of vbase classes as depth
3505 * cp-tree.h (types_overlap_p): Remove.
3506 * search.c (struct overlap_info): Remove.
3507 (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove.
3509 * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove.
3510 (get_template_base_recursive): Remove. Replace with ...
3511 (get_template_base_r): ... this.
3512 (struct get_template_base_data_s): New.
3513 (get_template_base): Use get_template_base_r via dfs_walk. Always
3514 return NULL on failure.
3515 (unify): Remove error_mark_node check from get_template_base result.
3517 2004-09-24 Paolo Bonzini <bonzini@gnu.org>
3519 * parser.c (cp_parser_expression_stack): Clarify why it is
3520 an array of NUM_PREC_VALUES elements.
3521 (cp_parser_binary_expression): Clarify why we do not need to
3522 handle stack overflow.
3524 2004-09-24 Nathan Sidwell <nathan@codesourcery.com>
3527 * search.c (lookup_field_queue_p): Correct check for hidden base.
3529 * search.c (bfs_walk): Remove.
3530 (lookup_member): Use dfs_walk_real.
3531 (dfs_walk_real): Move and adjust documentation from bfs_walk.
3533 2004-09-23 Zack Weinberg <zack@codesourcery.com>
3535 * decl.c (grokfndecl): If ::main is found not to return int,
3536 correct it after issuing a diagnostic.
3537 (grokdeclarator): If the incoming type was error_mark_node, do
3538 not complain about declaring something with no type.
3539 (start_function): Change check for ::main not returning int to
3540 an assertion, as grokfndecl now catches this when the user did it.
3541 * init.c (perform_member_init, sort_mem_initializers)
3542 (emit_mem_initializers): Make most diagnostics be issued on
3543 the line of current_function_decl, not whatever the current
3545 * parser.c (cp_lexer_peek_token_emit_debug_info): Surround
3546 definition and declaration with #ifdef ENABLE_CHECKING.
3547 Avoid unnecessary use of fprintf.
3548 (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
3549 definitions to avoid warnings.
3550 (cp_lexer_new_main): Add assertion that first token is not a
3552 (cp_lexer_new_from_token_array): Fold into ...
3553 (cp_lexer_new_from_tokens): ... here. Add assertion that
3554 first token is not a padding token.
3555 (cp_lexer_set_source_position_from_token): Move nearer to callers.
3556 Remove unused lexer argument.
3557 (cp_lexer_peek_token): Just print debugging report (if enabled)
3558 and return lexer->next_token.
3559 (cp_lexer_skip_purged_tokens): Delete.
3560 (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
3561 inline, simplify bodies.
3562 (cp_lexer_peek_nth_token): Add debugging report a la
3563 cp_lexer_peek_token.
3564 (cp_lexer_consume_token): Correct commentary. Advance over
3565 purged tokens here. Set current source position here, from
3566 token to be returned. Avoid unnecessary use of fprintf.
3567 (cp_lexer_purge_token): Advance next_token pointer over this and
3568 subsequent purged tokens.
3569 (cp_parser_error): Adjust source position to that of the
3571 (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
3572 (cp_parser_string_literal): Remove some excessive cleverness.
3573 (cp_parser_enum_specifier): Call start_enum before consuming
3575 (cp_parser_member_declaration): Make the "extra semicolon"
3576 diagnostic consistently-worded with the other place this is
3577 diagnosed. Explicitly set the diagnostic location to the
3578 location of the offending semicolon.
3579 (cp_parser_enclosed_template_argument_list): Use %</%> quoting
3580 in diagnostics. Do not use cp_parser_require. Set location
3581 of diagnostics about improper use of '>>' to location of
3583 (cp_parser_late_parsing_for_member):
3584 Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
3585 (cp_parser_late_parsing_default_args): Likewise. Manually
3586 move some logic outside the loop.
3588 2004-09-23 Andrew Pinski <pinskia@physics.uc.edu>
3591 * cvt.c (cp_convert_to_pointer): Return early when the type is
3594 2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
3598 * decl.c (grokfndecl): Add new argument "attrlist", use it
3599 to call cplus_decl_attributes.
3600 (start_function): Remove call to cplus_decl_attributes.
3601 * cvt.c (ocp_convert): Add support to use type conversion
3602 function to vector type.
3603 * parser.c (cp_parser_conversion_type_id): Add attributes, if any,
3606 2004-09-23 Paolo Bonzini <bonzini@gnu.org>
3610 * parser.c (cp_parser_token_tree_map_node,
3611 cp_parser_pm_expression, cp_parser_additive_expression,
3612 cp_parser_multiplicative_expression, cp_parser_shift_expression,
3613 cp_parser_relational_expression, cp_parser_equality_expression,
3614 cp_parser_and_expression, cp_parser_exclusive_or_expression,
3615 cp_parser_inclusive_or_expression,
3616 cp_parser_logical_and_expression,
3617 cp_parser_logical_or_expression): Removed.
3618 (enum cp_parser_prec, struct cp_parser_token_tree_map_node,
3619 binops, binops_by_token): New.
3620 (cp_parser_assignment_expression): Use cp_parser_binary_expression.
3621 (cp_parser_new): Initialize binops_by_token.
3622 (cp_parser_binary_expression): Rewritten.
3625 2004-09-23 Kazu Hirata <kazu@cs.umass.edu>
3627 * parser.c: Fix a comment typo.
3629 2004-09-23 Nathan Sidwell <nathan@codesourcery.com>
3632 * decl.c (xref_basetypes): Look through typedefs before checking
3635 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
3637 * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
3638 * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
3639 * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
3640 (init_rtti_processing): Initialize it to something realistic.
3641 (get_tinfo_decl): Adjust pushing the new decl.
3643 * cp-tree.h (struct lang_type_class): Remove marked flags, add
3644 diamond_shaped and repeated_base flags. Reorder to keep 8-bit blocks.
3645 (TYPE_MARKED_P): New.
3646 (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New.
3647 (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
3648 CLEAR_CLASSTYPE_MARKED_N): Remove.
3649 (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*,
3650 CLEAR_CLASSTYPE_MARKED_*): Remove.
3651 * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond
3652 shaped and repeated base properties.
3653 * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET.
3654 * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark,
3655 class_hint_flags): Remove.
3656 (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and
3657 CLASSTYPE_DIAMOND_SHAPED_P.
3659 2004-09-21 Ziemowit Laski <zlaski@apple.com>
3661 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from
3663 (objcp_tsubst_copy_and_build): Reformat function signature.
3664 * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise.
3665 (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c.
3667 2004-09-21 Zack Weinberg <zack@codesourcery.com>
3669 * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):
3670 Don't handle CPP_PRAGMA tokens specially.
3671 (cp_lexer_handle_pragma): Use cp_lexer_consume_token. Don't
3672 purge the token; do clear token->value after processing. Add
3673 assertion at beginning that token->value is nonzero.
3674 (cp_parser_statement, cp_parser_declaration_seq_opt): Handle
3675 CPP_PRAGMA as a full statement or declaration in its own right.
3677 2004-09-21 Matt Austern <austern@apple.com>
3680 * decl.c (grokvardecl): Accept declarations of global variables
3681 using anonymous types.
3683 2004-09-21 Roger Sayle <roger@eyesopen.com>
3686 * tree.c (lvalue_p_1): Disallow MIN_EXPR and MAX_EXPR as lvalues
3687 if either operand has side-effects.
3688 * typeck.c (rationalize_conditional_expr): Assert that neither
3689 operand of MIN_EXPR or MAX_EXPR has side-effects.
3690 (build_modify_expr): Add support for MIN_EXPR and MAX_EXPR.
3691 Check that the "lhs" is a valid lvalue, i.e. that neither operand
3692 of a MIN_EXPR or MAX_EXPR has a side-effect.
3694 2004-09-21 Nathan Sidwell <nathan@codesourcery.com>
3696 * cp-tree.h (struct lang_type_header): Remove
3697 uses_multiple_inheritance field.
3698 (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
3699 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
3700 (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
3701 (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
3702 (TYPE_CONTAINS_VPTR_P): Likewise.
3703 * call.c (add_template_candidate_real): Use
3704 CLASSTYPE_VBASECLASSES.
3705 (build_special_member_call): Likewise.
3706 * class.c (finish_struct_bits): Remove
3707 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
3709 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
3710 (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
3712 (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
3713 (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
3715 * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
3716 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
3718 (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
3719 * decl2.c (maybe_retrofit_in_chrg): Likewise.
3720 * init.c (expand_member, push_base_cleanups): Likewise.
3721 * pt.c (instantiate_class_template): Remove
3722 TYPE_USES_MULTIPLE_INHERITANCE,
3723 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
3725 * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
3727 * typeck2.c (process_init_constructor): Replace some sorrys with
3730 2004-09-21 Andreas Tobler <a.tobler@schweiz.ch>
3732 * decl.c (reshape_init_array): Initialize max_index_cst to fix
3735 2004-09-20 Mark Mitchell <mark@codesourcery.com>
3738 * pt.c (tsubst): Fix parentheses to accomodate emacs.
3739 (tsubst_baselink): If we get a single function, mark it as used.
3741 2004-09-20 Matt Austern <austern@apple.com>
3742 Zack Weinberg <zack@codesourcery.com>
3744 * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
3745 Apply lbasename to input_filename before passing to get_fileinfo.
3746 * semantics.c (begin_class_definition): Likewise.
3747 * lex.c (handle_pragma_interface): Apply get_fileinfo to the
3748 correct filename. Rename variables to be less confusing.
3749 (handle_pragma_implementation): Likewise. Disable "appears
3750 after file is included" diagnostic.
3752 * parser.c (struct cp_token): Add in_system_header fiag.
3753 (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
3754 (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
3755 (CPP_NONE, cp_lexer_read_token): Delete.
3756 (struct cp_lexer): Remove first_token, string_tokens,
3757 main_lexer_p fields. Clarify comments.
3758 (struct cp_token_cache): Now just a pair of pointers.
3759 (CP_LEXER_BUFFER_SIZE): New #define.
3760 (CPP_PURGED): New fake token type.
3761 (cp_lexer_new_from_token_array, cp_lexer_destroy)
3762 (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
3763 (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
3765 (cp_lexer_new_from_tokens): Now a simple wrapper around
3766 cp_lexer_new_from_token_array.
3767 (cp_lexer_set_source_position_from_token): Also update
3769 (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
3771 (cp_lexer_token_difference): Dont handle wrapping round.
3772 (cp_lexer_new_main): Enable pragma deferral and raw strings,
3773 read the entire translation unit through c_lex_with_flags into
3774 this lexer's buffer, then turn raw strings back off again.
3775 (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
3776 (cp_lexer_get_preprocessor_token): No need to handle not being
3777 the main lexer. Set token->in_system_header too.
3778 (cp_lexer_peek_token): Skip purged tokens. Feed pragma tokens
3779 to cp_lexer_handle_pragma. No need to call cp_lexer_read_token.
3780 (cp_lexer_peek_nth_token): Likewise.
3781 (cp_lexer_purge_token): Mark the token PURGED, don't shift all
3782 the other tokens down.
3783 (cp_lexer_purge_tokens_after): Likewise.
3784 (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
3785 about there being no tokens.
3786 (cp_lexer_print_token): Revise to give useful information on
3788 (struct cp_parser): Add field translate_strings_p.
3789 (cp_parser_new): Initialize it.
3790 (cp_parser_translation_unit): Destroy the lexer when done.
3791 (cp_parser_parameter_declaration): Restructure saving of
3793 (cp_parser_save_member_function_body): Likewise.
3794 (cp_parser_check_for_invalid_template_id)
3795 (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
3796 Adjust calls to cp_lexer_advance_token.
3797 (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
3798 No need to fiddle c_lex_string_translate.
3799 (cp_parser_primary_expression, cp_parser_linkage_specification)
3800 (cp_parser_asm_definition, cp_parser_asm_specification_opt)
3801 (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
3802 Use cp_parser_string_literal.
3803 (cp_parser_attribute_list): Save and restore
3804 parser->translate_strings_p, not c_lex_string_translate.
3805 (cp_parser_cache_group): Delete.
3806 (cp_parser_cache_group_1): Rename cp_parser_cache_group. Do
3807 not take a cache argument.
3809 2004-09-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3812 * decl.c (reshape_init): Extract array handling into...
3813 (reshape_init_array): New function. Use integers instead of trees
3814 for indices. Handle out-of-range designated initializers.
3816 2004-09-20 Steven Bosscher <stevenb@suse.de>
3818 * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
3821 2004-09-19 Mark Mitchell <mark@codesourcery.com>
3823 * decl2.c (determine_visibility): Allow class visibility
3824 directives to override targetm.cxx.export_class_data.
3826 2004-09-18 Kazu Hirata <kazu@cs.umass.edu>
3828 * call.c, semantics.c: Follow spelling conventions.
3829 * class.c: Fix a comment typo.
3831 2004-09-16 Geoffrey Keating <geoffk@apple.com>
3834 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3835 (handle_pragma_implementation): Likewise.
3837 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
3838 Zack Weinberg <zack@codesourcery.com>
3840 * cp-tree.def: Use tree_code_class enumeration constants
3841 instead of code letters.
3842 * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
3843 * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
3844 Update for new tree-class enumeration constants.
3846 2004-09-16 Mark Mitchell <mark@codesourcery.com>
3849 * parser.c (cp_parser_simple_declaration): Commit to tentative
3850 parses after seeing a decl-specifier.
3851 (cp_parser_simple_declaration): Eliminate spurious message.
3852 (cp_parser_init_declarator): Adjust error message.
3855 * lex.c (unqualified_name_lookup_error): Mark the dummy
3856 declaration as used.
3859 * parser.c (cp_parser_nested_name_specifier): Do not resolve
3860 typename types if the user explicitly said "typename".
3862 2004-09-16 Andrew MacLeod <amacleod@redhat.com>
3864 * error.c (dump_decl): Make sure there is lang_specific info before
3865 checking for DTOR and CTOR decls.
3867 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
3869 * class.c (copy_virtuals): Remove.
3870 (build_primary_vtable): Use copy_list directly.
3871 (build_secondary_vtable): Likewise.
3872 (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
3873 (create_vtable_ptr): Likewise.
3875 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
3877 * search.c: Follow spelling conventions.
3879 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
3881 * cp-tree.h (struct lang_type_class): Make pure_virtuals a
3883 (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
3885 * call.c (build_new_method_call): Don't confirm a pure virtual is
3886 in CLASSTYPE_PURE_VIRTUALS. Reorder checks. Make it a warning.
3887 * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
3888 (fixup_inline_methods, finish_struct): Likewise.
3889 * decl.c (finish_method): Likewise.
3890 * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
3891 CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
3892 * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
3893 vector to avoid repeating the list in error messages.
3895 2004-09-15 Mark Mitchell <mark@codesourcery.com>
3897 * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
3898 * cp-tree.h (cxx_comdat_group): Declare.
3899 * decl.c (cxx_comdat_group): New function.
3901 2004-09-15 Nathan Sidwell <nathan@codesourcery.com>
3903 * search.c (get_pure_virtuals): Remove unused variables.
3905 * cp-tree.h (struct lang_decl_flags): Remove
3906 needs_final_overrider.
3907 (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
3908 * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
3909 * class.c (finish_struct_bits): Correct comment about
3910 CLASSTYPE_PURE_VIRTUALS.
3911 * search.c (get_pure_virtuals): Remove useless loop.
3913 2004-09-14 Mark Mitchell <mark@codesourcery.com>
3916 * mangle.c (partially_mangled_name): New variable.
3917 (partially_mangled_name_len): Likewise.
3918 (save_partially_mangled_name): New function.
3919 (restore_partially_mangled_name): Likewise.
3920 (write_encoding): Save and restore partially mangled names around
3921 calls to get_mostly_instantiated_function_type.
3922 (write_unqualified_name): Likewise.
3924 2004-09-14 Nathan Sidwell <nathan@codesourcery.com>
3926 * pt.c (unify): Replace gcc_unreachable with gcc_assert.
3928 2004-09-13 Mark Mitchell <mark@codesourcery.com>
3931 * parser.c (cp_parser_id_expression): Correct value for
3933 (cp_parser_nested_name_specifier_opt): Look through typenames as
3935 (cp_parser_template_name): Honor check_dependency_p.
3938 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
3942 * pt.c (unify): Add ENUMERAL_TYPE case. Replace sorry with
3945 2004-09-12 Richard Henderson <rth@redhat.com>
3948 * semantics.c (maybe_cleanup_point_expr): Don't call fold.
3949 * typeck.c (condition_conversion): Likewise.
3951 2004-09-11 Richard Henderson <rth@redhat.com>
3954 * pt.c (cur_stmt_expr): Move from tsubst_expr.
3955 (tsubst_expr) <case STMT_EXPR>: Move ...
3956 (tsubst_copy_and_build): ... here.
3958 2004-09-10 Zack Weinberg <zack@codesourcery.com>
3960 * cp-tree.h (interface_only, interface_unknown): Delete declarations;
3961 comment explaining them moved to c-common.h.
3962 * lex.c (interface_only, interface_unknown, extract_interface_info):
3964 (cxx_finish): Don't reset interface_unknown.
3965 (handle_pragma_interface): Don't set interface_only and
3966 interface_unknown; just the like-named fields in finfo.
3967 (handle_pragma_implementation): Adjust comment.
3968 * decl2.c (cp_finish_file): Don't reset interface_only and
3970 * method.c (synthesize_method): Don't reset interface_unknown or
3971 call extract_interface_info.
3972 * pt.c (pop_tinst_level): Don't call extract_interface_info.
3973 * decl.c (start_cleanup_fn): Don't save or restore interface_only
3974 and interface_unknown.
3975 (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
3976 and use the result instead of the interface_only/interface_unknown
3978 (start_preparsed_function): Likewise.
3979 * lex.c (cxx_make_type): Likewise.
3980 * semantics.c (begin_class_definition): Likewise.
3981 (expand_body): Don't call extract_interface_info.
3983 2004-09-10 Ziemowit Laski <zlaski@apple.com>
3985 * decl.c (objc_mark_locals_volatile): Make description of
3986 routine more descriptive; only mark VAR_DECLs at each
3989 2004-09-10 Richard Henderson <rth@redhat.com>
3992 * call.c (build_vfield_ref): Move...
3993 * class.c (build_vfield_ref): ... here. Convert datum to the
3994 primary base containing the vptr.
3995 (make_new_vtable): Simplify build_primary_vtable arguments.
3996 (finish_struct_1): Do not duplicate TYPE_VFIELD.
3997 * typeck.c (build_class_member_access_expr): Don't warn for
3998 null object access to base fields.
4000 2004-09-10 Ziemowit Laski <zlaski@apple.com>
4002 * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
4003 New functions, to be called from ObjC++.
4005 2004-09-10 Kazu Hirata <kazu@cs.umass.edu>
4007 * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
4008 name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
4011 2004-09-09 Ziemowit Laski <zlaski@apple.com>
4013 * typeck.c (build_c_cast): Preserve the cast if casting
4014 to and from an Objective-C type.
4016 2004-09-09 Ziemowit Laski <zlaski@apple.com>
4018 * Make-lang.in (cp/typeck.o): Depend on c-common.h.
4019 * typeck.c: Include c-common.h.
4020 (comptypes): For RECORD_TYPEs, call objc_comptypes() and
4021 return the result if nonnegative.
4023 2004-09-09 Zack Weinberg <zack@codesourcery.com>
4025 * decl2.c (import_export_class)
4026 * lex.c (handle_pragma_interface):
4027 Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
4029 2004-09-08 Ziemowit Laski <zlaski@apple.com>
4031 * Make-lang.in (cp/semantics.o): Depend on c-common.h.
4032 * semantics.c: Include c-common.h.
4033 (finish_compound_stmt): Call objc_clear_super_receiver().
4035 2004-09-08 Ziemowit Laski <zlaski@apple.com>
4037 * cp-tree.h (do_poplevel): New prototype.
4038 * semantics.c (do_poplevel): Make externally visible.
4040 2004-09-08 Nathan Sidwell <nathan@codesourcery.com>
4042 * cp-tree.h (tree_pair_s): Define a GC'd vector.
4043 * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
4044 * semantics.c (deferred_access): Likewise.
4046 2004-09-06 Daniel Jacobowitz <dan@debian.org>
4048 * semantics.c (expand_body): Assert that we are not nested.
4050 2004-09-06 Zack Weinberg <zack@codesourcery.com>
4052 * decl.c (build_enumerator): Use add_double and int_fits_type_p
4053 instead of cp_build_binary_op, to avoid creating short-lived trees.
4054 * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
4055 lookahead instead of backtracking. Move some code to avoid a
4057 (cp_parser_enum_specifier): Avoid duplication of effort with caller.
4058 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
4059 (cp_parser_enumerator_list, cp_parser_enumerator_definition):
4060 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
4062 2004-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4064 * decl.c (grok_declarator): Remove a redundant semicolon.
4066 * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
4067 Correct comments describing function parameters.
4069 2004-09-03 Matt Austern <austern@apple.com>
4070 Compile speed improvement.
4071 * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
4072 Otherwise define a stub macro that expands to nothing.
4073 (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set. Otherwise
4074 define a stub macro that expands to 0.
4075 (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
4076 (cp_lexer_stop_debugging): Likewise.
4077 (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set. Otherwise
4078 define a stub macro that expands to NULL.
4079 (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
4080 (cp_lexer_new_from_tokens): Likewise.
4082 2004-09-03 Jan Hubicka <jh@suse.cz>
4084 * decl.c (finish_function): Clean out pointers we no longer need.
4086 2004-09-03 Jan Beulich <jbeulich@novell.com>
4088 * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
4091 2004-09-02 Paul Brook <paul@codesourcery.com>
4093 * decl2.c (determine_visibility): Only check data visibility
4096 2004-08-31 Mark Mitchell <mark@codesourcery.com>
4098 * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
4099 * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
4100 * decl2.c (determine_visibility): Honor
4101 TARGET_CXX_EXPORT_CLASS_DATA.
4103 * class.c (key_method): Rename to ...
4104 (determine_key_method): ... this.
4105 (finish_struct_1): Adjust accordingly.
4106 * cp-tree.h (key_method): Declare.
4107 * decl2.c (maybe_emit_vtables): Determine the key method here if
4108 it has not already been done.
4110 2004-08-31 Ziemowit Laski <zlaski@apple.com>
4112 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
4113 (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
4114 (cp/cp-decl.c): Do not depend on gtype-cp.h.
4115 (cp/cp-objcp-common.o): New target.
4116 * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
4117 (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
4118 cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
4119 prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
4121 (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
4122 LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
4123 LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
4124 LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
4125 LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
4126 LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
4127 LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
4128 LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
4129 LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
4130 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
4131 LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
4132 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
4133 LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
4134 LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
4135 LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
4136 LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
4137 LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
4138 LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
4139 LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
4140 LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
4141 LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
4142 LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
4143 LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
4144 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
4145 LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
4146 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
4147 LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
4148 LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
4149 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
4150 LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
4151 LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
4152 hooks to cp-objcp-common.h.
4153 (finish_file): New function.
4154 * cp-objcp-common.c: New file.
4155 * cp-objcp-common.h: New file.
4156 * cp-tree.h (cp_finish_file): New prototype.
4157 * decl.c: Do not include gtype-cp.h.
4158 * decl2.c (finish_file): Rename to cp_finish_file.
4160 2004-08-31 Richard Henderson <rth@redhat.com>
4163 * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
4164 (tsubst_copy_and_build): ... here.
4166 2004-08-30 Mark Mitchell <mark@codesourcery.com>
4168 * cp-tree.h (initialize_artificial_var): Declare.
4169 * decl.c (initialize_artifical_var): New function.
4170 * class.c (initialize_array): Remove.
4171 (initialize_vtable): Use initialize_artificial_var.
4172 (build_vtt): Likewise.
4173 (build_ctor_vtbl_group): Likewise.
4175 2004-08-30 Richard Henderson <rth@redhat.com>
4177 * class.c (build_base_path): Use build_address directly.
4178 * typeck.c (build_unary_op): Don't lower &a.b to pointer
4179 arithmetic directly.
4180 * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
4181 means !initializer_constant_valid_p.
4183 2004-08-30 Richard Henderson <rth@redhat.com>
4185 * class.c (fixed_type_or_null): Use get_base_address before
4186 assuming an ADDR_EXPR is non-null.
4188 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
4190 * name-lookup.c (pop_binding, pushdecl,
4191 set_identifier_type_value_with_scope, push_overloaded_decl,
4192 arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
4193 * parser.c (cp_parser_diagnose_invalid_type_name,
4194 cp_parser_postfix_expression, cp_parser_unary_expression,
4195 cp_parser_check_declarator_template_para): Likewise.
4196 * pt.c (push_inline_template_parms_recursive,
4197 check_explicit_specialization, convert_nontype_argument,
4198 coerce_template_template_parms, uses_template_parms,
4199 instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
4200 tsubst_expr, instantiate_template,
4201 maybe_adjust_types_for_deduction, type_unification_real,
4202 resolve_overloaded_unification, template_decl_level,
4203 type_dependent_expression_p): Likewise.
4204 * search.c (lookup_base_r): Likewise.
4205 * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
4206 * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
4207 verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
4208 * typeck.c (common_type, get_member_function_from_ptrfunc,
4209 build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
4210 * typeck2.c (cxx_incomplete_type_diagnostic,
4211 split_nonconstant_init_1, store_init_value,
4212 process_init_constructor): Likewise.
4214 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
4216 * call.c (check_dtor_name): Replace abort with gcc_assert or
4218 (build_call, add_builtin_candidate, build_new_op,
4219 convert_like_real, build_over_call, in_charge_arg_for_name,
4220 source_type, joust): Likewise.
4221 * class.c (build_simple_base_path, get_vcall_index,
4222 finish_struct_1, instantiate_type, get_enclosing_class,
4223 add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
4224 * cp-gimplify.c (cp_genericize): Likewise.
4225 * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
4226 * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
4227 * decl.c (poplevel, make_unbound_class_template, reshape_init,
4228 check_special_function_return_type, grokdeclarator,
4229 grok_op_properties, tag_name, xref_tag, start_preparsed_function,
4230 finish_function): Likewise.
4231 * decl2.c (grokfield, maybe_emit_vtables):Likewise.
4232 * error.c (dump_global_iord, dump_decl, dump_template_decl,
4233 language_to_string): Likewise.
4234 * except.c (choose_personality_routine): Likewise.
4235 * friend.c (do_friend): Likewise.
4236 * g++spec.c (lang_specific_driver): Likewise.
4237 * init.c (build_zero_init, expand_default_init, build_new_1,
4238 build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
4239 * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
4240 * mangle.c (add_substitution, write_unscoped_name,
4241 write_template_prefix, write_identifier,
4242 write_special_name_destructor, write_type, write_builtin_type,
4243 write_expression, write_template_param,
4244 write_java_integer_type_codes): Likewise.
4245 * method.c (implicitly_declare_fn): Likewise.
4247 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
4249 * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
4250 (BINFO_INDIRECT_PRIMARY_P): Remove.
4251 * class.c (determine_primary_base): Rename to ...
4252 (determine_primary_bases): ... here. Set all primary bases.
4253 (set_primary_base): Remove.
4254 (mark_primary_bases): Remove.
4255 (build_simple_base_path, walk_subobject_offsets,
4256 propagate_binfo_offsets, end_of_class): Adjust.
4257 (layout_class_type): Rename determine_primary_base call.
4258 (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
4260 (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
4261 build_rtti_vtbl_entries): Adjust.
4262 * init.c (build_vtbl_address): Adjust.
4264 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
4266 2004-08-28 Ziemowit Laski <zlaski@apple.com>
4268 * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
4269 CXX_AND_OBJCXX_OBJS.
4270 (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
4271 separately on the link line.
4273 2004-08-28 Jason Merrill <jason@redhat.com>
4275 * decl.c (expand_static_init): Avoid bogus warnings.
4277 2004-08-27 Jason Merrill <jason@redhat.com>
4280 * tree.c (stabilize_init): See through a COMPOUND_EXPR.
4283 * decl.c (expand_static_init): Use thread-safety API.
4284 (register_dtor_fn): Return the call, don't expand it.
4285 * tree.c (add_stmt_to_compound): New fn.
4286 (stabilize_call): Use it.
4288 2004-08-27 Richard Henderson <rth@redhat.com>
4290 * cp-tree.def (OFFSETOF_EXPR): New.
4291 * parser.c (cp_parser_builtin_offsetof): Either built an
4292 OFFSETOF_EXPR, or call fold_offsetof immediately.
4293 * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
4295 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
4297 * call.c (validate_conversion_obstack): Replace
4298 my_friendly_assert with gcc_assert or gcc_unreachable.
4299 (direct_reference_binding, merge_conversion_sequences,
4300 build_user_type_conversion_1, perform_overload_resolution,
4301 build_op_delete_call, enforce_access, call_builtin_trap,
4302 build_over_call, build_special_member_call, build_new_method_call,
4303 initialize_reference): Likewise.
4304 * class.c (build_base_path, build_primary_vtable, alter_access,
4305 check_bases, update_vtable_entry_for_fn, layout_empty_base,
4306 clone_function_decl, adjust_clone_args,
4307 type_requires_array_cookie, include_empty_classes,
4308 finish_struct_1, resolve_address_of_overloaded_function,
4309 instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
4310 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
4311 accumulate_vtbl_inits, build_vtbl_initializer,
4312 build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
4313 * cvt.c (build_up_reference, convert_to_reference): Likewise.
4314 * decl.c (poplevel, duplicate_decls, make_typename_type,
4315 cxx_init_decl_processing, reshape_init, check_initializer,
4316 make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
4317 expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
4318 grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
4319 xref_basetypes, start_preparsed_function, save_function_data,
4320 finish_function, finish_method, maybe_register_incomplete_var,
4321 complete_vars): Likewise.
4322 * decl2.c (grok_array_decl, check_member_template,
4323 check_classfn, finish_static_data_member_decl, coerce_new_type,
4324 coerce_delete_type, import_export_class, decl_needed_p,
4325 determine_visibility, import_export_decl, build_cleanup,
4326 start_static_initialization_or_destructi, do_static_destruction,
4327 prune_vars_needing_no_initialization,
4328 build_offset_ref_call_from_tree): Likewise.
4329 * error.c (dump_decl, dump_expr): Likewise.
4330 * init.c (finish_init_stmts, build_zero_init,
4331 expand_virtual_init, expand_default_init, expand_aggr_init_1,
4332 build_offset_ref, build_new_1, build_delete, build_vbase_delete):
4334 * mangle.c (write_method_parms, write_template_args,
4335 write_expression, write_template_arg): Likewise.
4336 * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
4337 * name-lookup.c (pop_binding, begin_scope, leave_scope,
4338 resume_scope, push_using_decl, validate_nonmember_using_decl,
4339 is_ancestor, poplevel_class, set_inherited_value_binding_p,
4340 push_class_level_binding, do_class_using_decl, push_namespace,
4341 pop_namespace, add_using_namespace, ambiguous_decl,
4342 lookup_namespace_name, lookup_type_current_level,
4343 maybe_process_template_type_declaration): Likewise.
4344 * parser.c (cp_lexer_peek_nth_token,
4345 cp_parser_parse_and_diagnose_invalid_typ,
4346 cp_parser_translation_unit, cp_parser_template_id,
4347 cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
4348 * pt.c (push_access_scope, finish_member_template_decl,
4349 push_inline_template_parms_recursive, add_outermost_template_args,
4350 get_innermost_template_args, begin_explicit_instantiation,
4351 end_explicit_instantiation, retrieve_specialization,
4352 is_specialization_of, is_specialization_of_friend,
4353 register_specialization, check_explicit_specialization,
4354 comp_template_parms, process_template_parm,
4355 process_partial_specialization, convert_nontype_argument,
4356 coerce_template_template_parms, coerce_template_parms,
4357 mangle_class_name_for_template, lookup_template_function,
4358 lookup_template_class, instantiate_class_template, tsubst_decl,
4359 tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
4360 instantiate_template, fn_type_unification, type_unification_real,
4361 get_template_base, regenerate_decl_from_template,
4362 template_for_substitution, instantiate_decl,
4363 get_mostly_instantiated_function_type, dependent_scope_ref_p,
4364 value_dependent_expression_p, resolve_typename_type): Likewise.
4365 * repo.c (repo_emit_p): Likewise.
4366 * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
4367 create_tinfo_types, emit_tinfo_decl): Likewise.
4368 * search.c (lookup_base_r, lookup_base, lookup_field_1,
4369 dfs_access_in_type, build_baselink, lookup_member,
4370 adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
4371 * semantics.c (perform_or_defer_access_check,
4372 finish_non_static_data_member, finish_stmt_expr_expr,
4373 finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
4374 finish_template_template_parm, finish_member_declaration,
4375 emit_associated_thunks): Likewise.
4376 * tree.c (build_target_expr_with_type, force_target_expr,
4377 copy_binfo, get_first_fn, cp_tree_equal): Likewise.
4378 * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
4379 cxx_sizeof_or_alignof_type, perform_integral_promotions,
4380 build_class_member_access_expr, finish_class_member_access_expr,
4381 build_ptrmemfunc_access_expr, build_unary_op,
4382 unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
4383 build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
4384 * typeck2.c (complete_type_check_abstract,
4385 abstract_virtuals_error, process_init_constructor,
4386 add_exception_specifier): Likewise.
4388 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
4390 * class.c (build_vtbl_initializer): Use ssize_int.
4391 * decl.c (complete_array_type): Likewise.
4392 * method.c (finish_thunk): Likewise.
4393 * search.c (get_dynamic_base_type): Likewise.
4395 2004-08-26 Richard Henderson <rth@redhat.com>
4397 * cp-tree.h (DECL_FIELD_IS_BASE): New.
4398 * class.c (build_base_field): Set it.
4399 (build_simple_base_path): Use it.
4400 (fixed_type_or_null): Don't consider base fields definitive.
4402 2004-08-25 Roger Sayle <roger@eyesopen.com>
4405 PR tree-optimization/16372
4406 * decl.c (finish_enum): Make the precision of the enumerated type
4407 the same width as the underlying integer type.
4409 2004-08-25 Mark Mitchell <mark@codesourcery.com>
4412 * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
4415 * mangle.c (get_identifier_nocopy): Add cast.
4417 * cp-tree.h (mangle_type): Remove.
4418 * mangle.c (globals): GTY it.
4419 (mangle_obstack): New variable.
4420 (name_obstack): Likewise.
4421 (name_base): Likewise.
4422 (write_char): Adjust accordingly.
4423 (write_chars): Likewise.
4424 (write_string): Likewise.
4425 (start_mangling): Initialize G.substitutions only one. Add
4427 (finish_mangling): Use VARRAY_CLEAR to reclaim
4428 storage in G.substitutions. Use obstack_finish.
4429 (init_mangle): Adjust for changes to variable names above.
4430 Initialize G.substitutions.
4431 (mangle_decl_string): Adjust call to start_mangling.
4432 (get_identifier_nocopy): New function.
4433 (mangle_decl): Use it.
4434 (mangle_type_string): Adjust call to start_mangling.
4435 (mangle_special_for_type): Likewise.
4436 (mangle_vtt_for_type): Likewise.
4437 (mangle_ctor_vtbl_for_type): Likewise.
4438 (mangle_thunk): Likewise.
4439 (mangle_guard_variable): Likewise.
4440 (mangle_ref_init_variable): Likewise.
4442 2004-08-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4445 * pt.c (redeclare_class_template): Check the type of non-type and
4446 template template parameter.
4448 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
4450 * call.c (convert_class_to_reference): Adjust build_int_cst calls.
4451 (build_user_type_conversion_1, convert_like_real,
4452 build_java_interface_fn_ref, build_special_member_call): Likewise.
4453 * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
4454 * cp-gimplify.c (cp_gimplify_expr): Likewise.
4455 * cvt.c (cp_convert_to_pointer): Likewise.
4456 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
4457 * decl2.c (start_static_initialization_or_destruction,
4458 generate_ctor_or_dtor_function): Likewise.
4459 * except.c (build_throw): Likewise.
4460 * mangle.c (write_integer_cst): Likewise.
4461 * method.c (finish_thunk): Likewise.
4462 * rtti.c (build_headof, get_tinfo_decl_dynamic,
4463 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
4464 get_pseudo_ti_init): Likewise.
4465 * search.c (get_dynamic_cast_base_type): Likewise.
4467 2004-08-25 Zack Weinberg <zack@codesourcery.com>
4469 * class.c, search.c: Remove references to DWARF_DEBUG.
4471 2004-08-25 Adam Nemet <anemet@lnxw.com>
4473 * repo.c (extract_string): Reset backquote after one character.
4474 (get_base_filename): Fix indentation.
4476 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
4478 * decl.c (cxx_init_decl_processing): Adjust
4479 build_common_tree_nodes call.
4481 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
4484 * (is_subobject_of_p): Resurrect & optimize.
4485 (lookup_field_r): Use it.
4487 2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4490 * search.c (friend_accessible_p): Increment processing_template_decl
4491 when deal with TEMPLATE_DECL of SCOPE.
4493 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
4496 * semantics.c (check_accessibility_of_qualified_id): Defer check
4497 if qualifying_type is a template parameter.
4499 2004-08-23 Mark Mitchell <mark@codesourcery.com>
4502 * pt.c (instantiate_decl): Do not try to apply
4503 DECL_DECLARED_INLINED_P to a VAR_DECL.
4505 * search.c (build_baselink): Fix typo in comment.
4507 2004-08-22 Andrew Pinski <apinski@apple.com>
4510 2004-08-22 Andrew Pinski <apinski@apple.com>
4512 * typeck.c (build_unary_op): Use &a.b if the folded lowered
4513 expression is not constant.
4515 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
4517 * name-lookup.c (pushdecl): Rename build_type_copy call.
4518 * tree.c (cp_build_qualified_type_real,
4519 build_exception_variant, handle_java_interface_attribute): Likewise.
4521 2004-08-22 Andrew Pinski <apinski@apple.com>
4524 * typeck.c (build_unary_op): Use &a.b if the folded lowered
4525 expression is not constant.
4527 2004-08-20 Mark Mitchell <mark@codesourcery.com>
4530 * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
4532 2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
4535 * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
4538 2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4540 * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
4541 before calling comp_template_args.
4543 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
4545 * class.c (build_vtbl_initializer): Use build_int_cst for
4546 negative size types.
4547 * decl.c (complete_array_type): Likewise.
4548 * method.c (finish_thunk): Likewise.
4550 2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
4552 * tree.c: Remove unused mark_local_for_remap_r.
4554 2004-08-19 Eric Christopher <echristo@redhat.com>
4556 * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
4557 * tree.c (cxx_unsave_expr_now): Delete.
4558 (cp_unsave_r): Ditto.
4560 2004-08-19 Mark Mitchell <mark@codesourcery.com>
4563 * pt.c (push_template_decl_real): Disallow template allocation
4564 functions with fewer than two parameters.
4566 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
4568 * cp-tree.h (build_shared_int_cst): Remove.
4569 * tree.c (shared_int_cache): Remove.
4570 (build_shared_int_cst): Remove.
4571 * class.c (finish_struct_1): Use build_int_cst.
4573 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
4575 * decl.c (finish_enum): Do not copy value node early, copy
4577 * lex.c (cxx_init): Force null_node to be unique.
4579 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
4582 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
4583 from input for MODOP_EXPR.
4585 2004-08-18 Mark Mitchell <mark@codesourcery.com>
4587 * pt.c (dependent_template_p): Fix typo in commment.
4590 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
4593 2004-08-17 Mark Mitchell <mark@codesourcery.com>
4596 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
4597 arguments have the same type as the corresponding parameter.
4600 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
4601 is set use it for diagnostic purposes.
4602 (cp_parser_pseudo_destructor_name): Remove special-case error
4606 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
4609 * cp-tree.h (qualified_name_lookup_error): Add parameter.
4610 * name-lookup.c (do_class_using_decl): Restrict set of entities
4611 passed to cp_emit_debug_info_for_using more carefully.
4612 (lookup_qualified_name): Allow lookup_member to return sets of
4614 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
4615 (cp_parser_primary_expression): Handle ambiguous lookups.
4616 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
4617 (cp_parser_template_argument): Likewise.
4618 (cp_parser_elaborate_type_specifier): Likewise.
4619 (cp_parser_namespace_name): Likewise.
4620 (cp_parser_class_name): Likewise.
4621 (cp_parser_lookup_name_simple): Likewise.
4622 * pt.c (tsubst_qualified_id): Handle ambiguous results.
4623 (tsubst_expr): Likewise.
4624 * semantics.c (qualified_name_lookup_error): Add decl paramter.
4625 For ambiguous lookups, print candidates.
4627 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4630 * pt.c (instantiate_pending_templates): Add int parameter. Don't
4632 * cp-tree.h (instantiate_pending_templates): Adjust prototype.
4633 * decl2.c (finish_file): Adjust call to
4634 instantiate_pending_templates.
4636 2004-08-15 Roger Sayle <roger@eyesopen.com>
4638 * call.c (build_vfield_ref, build_call, build_conditional_expr,
4639 convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
4640 build_java_interface_fn_ref, build_special_member_call,
4641 build_new_method_call, initialize_reference): Replace calls to
4642 build with calls to buildN.
4643 * class.c (build_base_path, convert_to_base_statically,
4644 build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
4645 build_vtbl_initializer): Likewise.
4646 * cp-gimplify.c (genericize_try_block, genericize_catch_block,
4647 gimplify_if_stmt, cp_genericize_r): Likewise.
4648 * cvt.c (convert_to_void): Likewise.
4649 * decl.c (check_initializer, finish_constructor_body,
4650 finish_destructor_body): Likewise.
4651 * error.c (dump_expr): Likewise.
4652 * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
4654 * init.c (perform_member_init, expand_virtual_init,
4655 expand_cleanup_for_base, build_init, expand_default_init,
4656 build_offset_ref, decl_constant_value, build_new, build_new_1,
4657 build_vec_delete_1, build_vec_init, build_delete,
4658 push_base_cleanups, build_vec_delete): Likewise.
4659 * mangle.c (write_integer_cst): Likewise.
4660 * method.c (thunk_adjust, do_build_copy_constructor,
4661 do_build_assign_ref): Likewise.
4662 * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
4663 unify, build_non_dependent_expr): Likewise.
4664 * rtti.c (build_headof, build_typeid, ifnonnull,
4665 build_dyanmic_cast_1, tinfo_base_init): Likewise.
4666 * semantics.c (begin_compound_stmt, finish_call_expr,
4667 finish_pseudo_destructor_expr, finish_id_expression,
4668 simplify_aggr_init_expr, finalize_nrv_r): Likewise.
4669 * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
4670 array_type_nelts_total, stabilize_call): Likewise.
4671 * typeck.c (decay_conversion, build_class_member_access_expr,
4672 lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
4673 get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
4674 build_x_unary_op, build_unary_op, unary_complex_lvalue,
4675 build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
4676 check_return_expr): Likewise.
4677 * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
4678 split_nonconstant_init, store_init_value, build_m_component_ref):
4681 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
4683 * call.c (convert_class_to_reference,
4684 build_user_type_conversion_1, convert_like_real,
4685 build_java_interface_fn_ref, build_special_member_call): Use
4687 * class.c (build_vtbl_initializer): Likewise.
4688 * cp-gimplify.c (cp_gimplify_expr): Likewise.
4689 * cvt.c (cp_convert_to_pointer): Likewise.
4690 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
4691 * decl2.c (start_static_initialization_or_destruction,
4692 generate_ctor_or_dtor_function): Likewise.
4693 * except.c (build_throw): Likewise.
4694 * lex.c (cxx_init): Likewise.
4695 * mangle.c (write_integer_cst): Likewise.
4696 * rtti.c (build_headof, get_tinfo_decl_dynamic,
4697 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
4698 get_pseudo_ti_init): Likewise.
4699 * search.c (get_dynamic_cast_base_type): Likewise.
4700 * tree.c (build_shared_int_cst): Likewise.
4702 2004-08-12 Mark Mitchell <mark@codesourcery.com>
4705 * class.c (count_depth_data): New type.
4706 (dfs_depth_post): New function.
4707 (dfs_depth_q): Likewise.
4708 (find_final_overrider_data_s): Change type of vpath.
4710 (dfs_find_final_overrider_1): New function.
4711 (dfs_find_final_overrider): Use it.
4712 (dfs_find_final_overrider_q): Adjust use of vpath.
4713 (dfs_find_final_overrider_post): Likewise.
4714 (find_final_overrider): Use dfs_depth. Allocate and deallocate
4717 2004-08-12 Jan Beulich <jbeulich@novell.com>
4719 * parser.c (cp_parser_asm_definition): Properly consume scope operator
4720 tokens preceding the clobbers. Don't check for scope operator
4721 following inputs. Simplify inputs handling to match that now used for
4724 2004-08-11 Mark Mitchell <mark@codesourcery.com>
4727 * except.c (build_throw): Allocate cleanup_type and the function
4728 for __cxa_throw separately.
4731 * call.c (standard_conversion): Do not accept conversions between
4732 pointers to members if the class types are unrelated.
4735 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
4736 char &" instead of just "char &".
4739 * pt.c (tsubst): Just return the unknown_type_node.
4741 2004-08-11 Mark Mitchell <mark@codesourcery.com>
4744 * parser.c (cp_parser_class_specifier): Robustify.
4747 * pt.c (tsubst_copy_and_build): Complain about invalid
4751 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
4752 current_class_ref while tsubsting.
4754 2004-08-10 Mark Mitchell <mark@codesourcery.com>
4757 * parser.c (cp_parser_init_declarator): Robustify.
4759 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
4761 * typeck2.c (process_init_constructor): Guard the missing field warning
4762 with warn_missing_field_initializers rather than extra_warnings.
4764 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
4766 * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
4768 2004-08-05 Mark Mitchell <mark@codesourcery.com>
4770 * decl.c (start_preparsed_function): Move determine_visibility
4772 * decl2.c (determine_visibility): Incorporate dllexport testing.
4774 2004-08-05 Geoffrey Keating <geoffk@apple.com>
4776 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
4777 means that libstdc++ is needed.
4779 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
4781 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
4783 2004-08-04 Geoffrey Keating <geoffk@apple.com>
4785 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
4786 than passing it as a parameter to rest_of_decl_compilation.
4787 * decl2.c (grokfield): Use set_user_assembler_name.
4789 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
4791 * decl.c (complete_array_type): Don't gratuitously copy
4792 maxindex. Its type is always set.
4794 2004-08-04 Paul Brook <paul@codesourcery.com>
4796 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
4797 * cp-tree.h (struct language_function): Rename x_dtor_label to
4799 (dtor_label): Rename ...
4800 (cdtor_label): ... to this.
4801 * decl.c (begin_constructor_body): Remove.
4802 (check_special_function_return_type): Maybe change the return type.
4803 (grokdeclarator): Pass the class type.
4804 (start_preparsed_function): Constructors may need a return label.
4805 (finish_constructor_body, finish_destructor_body): Set the return
4807 (begin_function_body): Don't call begin_constructor_body.
4808 (finish_function): Don't warn for constructors or destructors.
4809 (implicitly_declare_fn): Maybe change the return type.
4810 * optimize.c: Include target.h.
4811 (maybe_clone_body): Remap the function result.
4812 * semantics.c: Include target.h.
4813 (finish_return_stmt): Maybe jump to return label for constructors.
4815 2004-08-03 Mark Mitchell <mark@codesourcery.com>
4817 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
4818 (check_field_decls): Or here.
4819 (check_methods): Or here.
4820 (initialize_array): Don't mess with DECL_CONTEXT.
4821 * cp-tree.h (start_decl): Adjust prototype.
4822 (determine_visibility): New function.
4823 * decl.c (duplicate_decls): Remove checks for hidden "operator
4825 (build_library_fn_1): Give all library functions default
4827 (start_decl): Add pop_scope_p parameter. Tidy.
4828 (cp_finish_decl): Do not pop scopes here. Call
4829 determine_visibility for variable definitions.
4830 (start_preparsed_function): Call determine_visibility.
4831 * decl2.c (determine_visibility): New function.
4832 * method.c (use_thunk): Fix formatting.
4833 * parser.c (cp_parser_condition): Adjust calls to start_decl.
4834 (cp_parser_init_declarator): Likewise.
4835 * pt.c (instantiate_decl): Always call pop_nested_class.
4836 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
4837 (tinfo_base_init): Likewise.
4839 2004-08-02 Mark Mitchell <mark@codesourcery.com>
4842 * name-lookup.c (validate_nonmember_using_decl): Robustify.
4844 2004-08-01 Mark Mitchell <mark@codesourcery.com>
4847 * name-lookup.c (decl_namespace): Remove.
4848 (current_decl_namespace): Use decl_namespace_context instead of
4850 (push_decl_namespace): Likewise.
4851 (arg_assoc_class): Likewise.
4852 (arg_assoc_type): Likewise.
4853 * pt.c (check_specialization_namespace): New function.
4854 (maybe_process_partial_specialization): Use it.
4855 (register_specialization): Likewise.
4858 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
4859 * call.c (null_ptr_cst_p): Handle variables with constant
4861 * pt.c (convert_nontype_argument): Use
4862 DECL_INTEGRAL_CONSTANT_VAR_P.
4863 * semantics.c (finish_id_expression): Likewise.
4866 * decl.c (duplicate_decls): Reject duplicate namespace
4870 * typeck.c (build_ptrmemfunc): Loosen assertion.
4872 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
4874 * call.c (z_candidate::template_decl): Rename from template.
4875 (add_template_candidate_real): Adjust member reference.
4878 2004-07-29 Mark Mitchell <mark@codesourcery.com>
4880 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
4881 (lang_decl_flags): Narrow the width of "languages". Add
4883 (DECL_NEEDED_P): Remove.
4884 (FOR_EACH_CLONE): New macro.
4885 (DECL_REPO_AVAILABLE_P): Likewise.
4886 (DECL_TINFO_P): Likewise.
4887 (set_linkage_according_to_type): Declare.
4888 (import_export_vtable): Remove.
4889 (import_export_tinfo): Likewise.
4890 (mark_needed): New function.
4891 (decl_needed_p): Likewise.
4892 (note_vauge_linkage_fn): Likewise.
4893 (init_repo): Change prototype.
4894 (repo_template_used): Remove.
4895 (repo_template_instantiated): Likewise.
4896 (repo_emit_p): New function.
4897 (repo_export_class_p): Likewise.
4898 (no_linkage_check): Change prototype.
4899 * class.c (set_linkage_according_to_type): New function.
4900 (build_vtable): Use it. Do not call import_export_vtable. Set
4901 DECL_IGNORED_P if appropriate.
4902 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
4903 (make_rtL_for_nonlocal_decls): Check for template instantiations
4905 (grokfndecl): Adjust call to no_linkage_check.
4906 (set_linkage_for_static_data_member): New function.
4907 (grokvardecl): Use it. Adjust call to no_linkage_check.
4908 (grokdeclarator): Use set_linkage_for_static_data_member.
4909 * decl2.c (note_vague_linkage_fn): New function.
4910 (note_vague_linkage_var): Likewise.
4911 (finish_static_data_member_decl): Use it.
4912 (import_export_vtable): Remove.
4913 (import_export_class): Use repo_export_class_p.
4914 (var_finalized_p): Simplify.
4915 (maybe_emit_vtables): Simplify.
4916 (mark_needed): New function.
4917 (decl_needed_p): Likewise.
4918 (import_export_decl): Add documentation and consistency checks.
4919 Use repo_emit_p. Handle virtual tables and RTTI information
4921 (import_export_tinfo): Remove.
4922 (write_out_vars): Call import_export_decl.
4923 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
4925 (finish_file): Use decl_needed_p. Do not call import_export_decl
4926 for undefined static data members. Do not warn about undefined
4927 inlines when using a repository.
4928 (mark_used): Use note_vague_linkage_fn. Always defer template
4930 * lex.c (cxx_init): Adjust call to init_repo. Always set
4931 flag_unit_at_a-time.
4932 * method.c (synthesize_method): Remove unncessary
4933 import_export_decl call.
4934 (implicitly_declare_fn): Use set_linkage_according_to_type.
4935 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
4936 * pt.c (instantiate_class_template): Don't redundantly add classes
4937 to keyed_classes. Don't call repo_template_used.
4938 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
4939 templates with internal linkage.
4940 (check_instantiated_args): Adjust call to no_linkage_check.
4941 (instantiate_template): Use FOR_EACH_CLONE.
4942 (mark_definable): New function.
4943 (mark_decl_instantiated): Use it.
4944 (do_decl_instantiation): Adjust tests for explicit instantiation
4945 after "extern template".
4946 (instantiate_class_member): Do not use repo_template_instantiated.
4947 (do_type_instantiation): Simplify.
4948 (instantiate_decl): Use mark_definable. Check repo_emit_p.
4950 * repo.c (repo_get_id): Remove.
4951 (original_repo): Remove.
4952 (IDENTIFIER_REPO_USED): Remove.
4953 (IDENTIFIER_REPO_CHOSEN): Remove.
4954 Remove all #if 0'd code.
4955 (repo_template_used): Remove.
4956 (repo_template_instantiated): Remove.
4957 (temporary_obstack_initialized_p): New variable.
4958 (init_repo): Register with lang_post_pch_load. Avoid creating
4959 identifiers unnecessarily. Don't use original_repo. Close the
4961 (reopen_repo_file_for_write): Not here.
4962 (finish_repo): Always write out a new repository file.
4963 (repo_emit_p): New function.
4964 (repo_export_class_p): Likewise.
4965 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
4966 (involves_incomplete_p): New function.
4967 (tinfo_base_init): Use it.
4968 (ptr_initializer): Remove non_public_ptr parameter.
4969 (ptm_initializer): Likewise.
4970 (get_pseudo_ti_init): Likewise.
4971 (unemitted_tinfo_decl_p): Remove.
4972 (emit_tinfo_decl): Use import_export_decl.
4973 * semantics.c (expand_body): Move updates of static_ctors and
4975 (expand_or_defer_fn): ... here.
4976 * tree.c (no_linkage_check): Add relaxed_p parameter.
4978 2004-07-28 Eric Christopher <echristo@redhat.com>
4980 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
4982 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
4984 * cp-tree.h (struct tree_pair_s): New.
4985 (typedef tree_pair_p): New.
4986 (DEF_VEC_O(tree_pair_s)): New.
4987 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
4988 (CLASSTYPE_VCALL_INDICES): Update documentation.
4989 * class.c (get_vcall_index): Adjust.
4990 (add_vcall_offset): Adjust.
4992 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
4994 * pt.c, typeck.c: Remove spurious carriage returns.
4996 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4999 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
5000 when the type of ARG is not dependent.
5002 2004-07-26 Geoffrey Keating <geoffk@apple.com>
5004 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
5005 (lang_specific_driver): If the C++ or math library options don't
5006 start with '-l', don't count them as added libraries.
5008 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
5010 * decl.c (xref_basetypes): Adjust base access vector creation.
5011 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
5013 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
5015 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
5016 Brian Ryner <bryner@brianryner.com>
5020 * class.c (check_field_decls): Apply hidden visibility if
5021 -fvisibility-inlines-hidden and inlined unless otherwise specified
5022 (build_vtable): Set vtable visibility to class visibility.
5023 (check_field_decls): Default static member visibility to class
5025 (check_methods): Default method visibility to class visibility.
5026 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
5027 CLASSTYPE_VISIBILITY_SPECIFIED macro.
5028 * decl.c (duplicate_decls): New logic for merging definition decls
5029 with declaration decls. Added ignore & warning when non default
5030 applied to global operator new or delete.
5031 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
5032 wherever VISIBILITY was changed
5033 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
5035 (tinfo_base_init): Set typeinfo name visibility to class visibility.
5037 2004-07-25 Bernardo Innocenti <bernie@develer.com>
5039 * decl.c: Rename all identifiers named `class' to `cl'.
5040 * cp-tree.h: Likewise.
5042 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
5044 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
5045 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
5046 * name-lookup.c (binding_entry_make): Use GGC_NEW.
5047 (binding_table_construct): Use GGC_CNEWVEC.
5048 (binding_table_new): Use GGC_NEW.
5049 (cxx_binding_make): Likewise.
5050 (begin_scope): Likewise.
5051 (push_to_top_level): Use GCC_CNEW.
5052 * parser.c (cp_token_cache_new): Likewise.
5053 (cp_token_cache_push_token): Likewise.
5054 (cp_lexer_new_main): Likewise.
5055 (cp_lexer_new_from_tokens): Likewise.
5056 (cp_parser_context_new): Likewise.
5057 (cp_parser_new): Likewise.
5058 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
5059 * lex.c (cxx_make_type): Use GGC_CNEW.
5060 (retrofit_lang_decl): Use GGC_NEWVAR.
5061 (cxx_dup_lang_specific_decl): Likewise.
5062 (copy_lang_type): Likewise.
5063 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
5064 (save_function_data): Likewise.
5065 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
5066 (cxx_push_function_context): Likewise.
5068 2004-07-25 Richard Henderson <rth@redhat.com>
5070 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
5071 DECL_IGNORED_P on RESULT_DECL.
5072 * semantics.c (finalize_nrv): Copy them too.
5074 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
5076 * search.c (lookup_conversion_operator): Avoid two loops.
5077 (add_conversions): Remove.
5078 (check_hidden_convs, split_conversions,
5079 lookup_conversions_r): New.
5080 (lookup_conversions): Use lookup_conversions_r.
5082 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
5084 * pt.c (get_template_base): Check type is completable.
5086 2004-07-21 Eric Christopher <echristo@redhat.com>
5088 * decl.c (poplevel): Inline unused variable checking.
5091 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
5093 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
5096 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5099 * pt.c (check_explicit_specialization): Remove extension to accept
5100 specializations without template headers. Fall-through to normal
5103 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5106 * pt.c (determine_specialization): New parameter template_count.
5107 Disambiguate between member templates and member functions counting
5108 the template headers.
5109 (check_explicit_specialization): Update caller.
5110 (tsubst_friend_function): Likewise.
5112 2004-07-20 Steven Bosscher <stevenb@suse.de>
5114 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
5115 * cp-tree.h (tinst_level_t): New tree type.
5116 (union lang_tree_node): Handle it.
5117 (TINST_LOCATION): New accessor macro.
5118 (make_tinst_level): New prototype.
5119 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
5120 * decl.c (cp_tree_node_structure): Likewise.
5121 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
5122 (print_instantiation_partial_context): Likewise.
5123 * pt.c (pop_tinst_level): Likewise.
5124 (push_tinst_level): Use make_tinst_level.
5125 * tree.c (make_tinst_level): New function.
5126 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
5128 2004-07-20 Mark Mitchell <mark@codesourcery.com>
5130 * parser.c (cp_parser_simple_type_specifier): Fix typo.
5133 * parser.c (cp_parser_simple_type_specifier): Do not record usage
5134 of globally-qualified names.
5136 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5139 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
5142 2004-07-19 Mark Mitchell <mark@codesourcery.com>
5145 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
5146 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
5147 * class.c (add_implicitly_declared_members): Use
5148 CLASSTYPE_LAZY_ASSIGNMENT_OP.
5149 * method.c (lazily_declare_fn): Clear
5150 CLASSTYPE_LAZY_ASSIGNMENT_OP.
5151 * search.c (lookup_fnfields_1): Check it.
5153 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
5155 * cp-tree.h (vec_binfo_member): Remove.
5156 * tree.c (vec_binfo_member): Remove.
5158 * cp-tree.h (struct lang_type_class): Remove vfields field.
5159 (CLASSTYPE_VFIELDS): Remove.
5160 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
5161 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
5163 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
5164 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
5165 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
5167 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
5169 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
5170 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
5172 (BINFO_LANG_SLOTS): Remove.
5173 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
5174 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
5175 * class.c (check_bases): Adjust BINFO accessors.
5176 (determine_primary_base, finish_struct_bits,
5177 maybe_warn_about_overly_private_class, warn_hidden,
5178 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
5179 warn_about_ambiguous_bases, get_vfield_name,
5180 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
5181 add_vcall_offset_vtbl_entries_r): Likewise.
5182 * dump.c (cp_dump_tree): Likewise.
5183 * init.c (sort_mem_initializers, expand_member_init, build_delete,
5184 push_base_cleanups): Likewise.
5185 * method.c (do_build_copy_constructor, do_build_assign_ref,
5186 synthesize_exception_spec): Likewise.
5187 name-lookup.c (arg_assoc_class): Likewise.
5188 * pt.c (instantiate_class_template,
5189 get_template_base_recursive): Likewise.
5190 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
5191 * typeck2.c (process_init_constructor): Likewise.
5192 * search.c (lookup_base_r, dynamic_cast_base_recurse,
5193 dfs_access_in_type, dfs_walk_real, look_for_overrides,
5194 types_overlap_p, copied_binfo, original_binfo): Likewise.
5195 (binfo_for_vtable): Remove
5197 2004-07-20 Steven Bosscher <stevenb@suse.de>
5199 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
5200 thunk_alias, and the access and virtual_offset fields.
5201 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
5202 * decl.c (finish_case_label): Update c_add_case_node call.
5204 2004-07-19 Mark Mitchell <mark@codesourcery.com>
5206 Revert patch for PR c++/16623.
5208 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
5210 * except.c: Remove two spurious carriage returns.
5212 2004-07-19 Mark Mitchell <mark@codesourcery.com>
5215 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
5216 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
5217 * class.c (add_implicitly_declared_members): Use
5218 CLASSTYPE_LAZY_ASSIGNMENT_OP.
5219 * method.c (lazily_declare_fn): Clear
5220 CLASSTYPE_LAZY_ASSIGNMENT_OP.
5221 * search.c (lookup_fnfields_1): Check it.
5223 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
5225 * class.c (add_method): Delay adding the slot until the end.
5226 (determine_primary_base): Adjust VEC_iterate invokation.
5227 (resort_type_method_vec, finish_struct_methods, warn_hidden,
5228 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
5229 build_vtbl_initializer): Likewise.
5230 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
5231 build_vbase_delete): Likewise.
5232 * method.c (do_build_copy_constructor): Likewise.
5233 * name-lookup.c (new_class_binding, print_binding_level,
5234 poplevel_class, store_class_bindings, push_to_top_level,
5235 pop_from_top_level): Likewise.
5236 * pt.c (check_explicit_specialization): Likewise.
5237 * search.c (lookup_conversion_operator, lookup_fnfields_1,
5238 get_pure_virtuals, add_conversions, dfs_check_overlap,
5239 binfo_for_vbase): Likewise.
5241 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5244 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
5245 innermost set of template arguments during deduction. Simplify.
5247 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
5249 * typeck.c (build_modify_expr, build_x_modify_expr): Set
5250 TREE_NO_WARNING on assignments with an operator other than '='.
5252 2004-07-10 Steven Bosscher <stevenb@suse.de>
5253 Joseph S. Myers <jsm@polyomino.org.uk>
5255 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
5256 * decl2.c (grokfield): Don't check current_class_depth via
5257 unused TREE_COMPLEXITY.
5258 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
5259 to avoid the missing parentheses warning.
5260 Don't set C_SET_EXP_ORIGINAL_CODE.
5262 2004-07-18 Mark Mitchell <mark@codesourcery.com>
5264 * tree.c (no_linkage_helper): Remove.
5265 (no_linkage_check): Don't use walk_tree_without_duplicates.
5267 * mangle.c (write_expression): Issue a sorry for zero-operand
5270 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5273 * init.c (build_offset_ref): Build SCOPE_REF with non-null
5274 TREE_TYPE for non-dependent names.
5275 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
5276 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
5277 unknown_type_node as its TREE_TYPE.
5278 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
5279 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
5280 (dump_expr) <SCOPE_REF case>: Likewise.
5282 2004-07-17 Jason Merrill <jason@redhat.com>
5285 * call.c (type_passed_as): Make the invisible reference type
5287 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
5288 cp_genericize_r. Handle invisible reference lowering.
5289 (is_invisiref_parm): New fn.
5290 (cp_genericize): Adjust the types of invisible reference parms.
5291 Don't repeat the walk for clones.
5292 * decl.c (store_parm_decls): Don't generate any code for clones.
5294 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
5296 * cp-tree.h (builtin_function): Declare.
5298 2004-07-16 Mark Mitchell <mark@codesourcery.com>
5300 * class.c (finish_struct_methods): Remove unncessary code.
5301 (add_implicitly_declared_members): Create declarations for default
5302 constructors and copy constructors lazily.
5303 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
5305 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
5306 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
5307 * decl2.c (check_classfn): Robustify.
5308 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
5309 (locate_ctor): Handle lazy default constructors.
5310 (locate_copy): Handle lazy copy constructors.
5311 (implicitly_declare_fn): Make sure we're looking at the
5312 TYPE_MAIN_VARIANT for a class before creating functions. Don't
5313 set TYPE_HAS_CONSTRUCTOR.
5314 (lazily_declare_fn): New function.
5315 * name-lookup.c (constructor_name_full): Simplify.
5316 * search.c (lookup_fnfields_1): Lazily create methods, as
5318 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
5320 2004-07-16 Steven Bosscher <stevenb@suse.de>
5322 * cp-tree.h (struct lang_type): Don't have three GTY options on a
5323 single bit GTY desc.
5325 2004-07-16 Richard Henderson <rth@redhat.com>
5327 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
5328 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
5329 * tree.c (cp_copy_res_decl_for_inlining): Remove.
5331 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
5333 * class.c (finish_struct_bits): Use for loop.
5334 (propagate_binfo_offsets): Do primary binfo outside of loop.
5337 * dump.c (cp_dump_tree): Don't dump the bases if there's no
5340 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
5342 2004-07-15 Mark Mitchell <mark@codesourcery.com>
5344 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
5345 has_abstract_assign_ref. Make methods a VEC(tree) *.
5346 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
5347 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
5348 (CLASSTYPE_DESTRUCTORS): Likewise.
5349 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
5350 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
5351 (add_method): Change prototoype.
5352 * class.c (add_method): Remove error_p parameter. Adjust for
5353 changes to CLASSTYPE_METHOD_VEC.
5354 (handle_using_decl): Adjust call to add_method.
5355 (maybe_warn_about_overly_private_class): Adjust for
5356 changes to CLASSTYPE_METHOD_VEC.
5357 (resort_type_method_vec): Likewise.
5358 (finish_struct_methods): Likewise.
5359 (check_for_override): Likewise.
5360 (warn_hidden): Likewise.
5361 (add_implicitly_declared_members): Defer creation of assignment
5362 operators. Adjust call to add_method.
5363 (clone_function_decl): Adjust call to add_method.
5364 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
5365 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
5366 * decl.c (grok_special_member_properties): Don't set
5367 TYPE_HAS_ABSTRACT_ASSIGN_REF.
5368 * decl2.c (check_classfn): Adjust for
5369 changes to CLASSTYPE_METHOD_VEC.
5370 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
5371 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
5372 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
5373 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
5375 * pt.c (check_explicit_specialization): Adjust for
5376 changes to CLASSTYPE_METHOD_VEC.
5377 (instantiate_class_template): Do not set
5378 TYPE_HAS_ABSTRACT_ASSIGN_REF.
5379 * ptree.c (cxx_print_type): Don't try to print
5380 CLASSTYPE_METHOD_VEC.
5381 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
5382 * search.c (lookup_field_r): Adjust for
5383 changes to CLASSTYPE_METHOD_VEC.
5384 (lookup_fnfields): Likewise.
5385 (lookup_conversion_operator): Likewise.
5386 (lookup_fnfields_1): Likewise. Create assignment operators
5388 (look_for_overrides_here): Adjust for
5389 changes to CLASSTYPE_METHOD_VEC.
5390 (add_conversions): Likewise.
5391 * semantics.c (finish_member_declaration): Adjust call to add_method.
5393 2004-07-15 Jason Merrill <jason@redhat.com>
5395 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
5396 references and pointers are compatible.
5398 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
5400 * decl.c (xref_basetypes): Refactor.
5401 * tree.c (copy_base_binfos): Replace with ...
5402 (copy_binfo): ... this. Deep copy the given binfo, (not the just
5403 bases of the given base).
5404 * cp-tree.h (copy_base_binfo): Remove.
5405 (copy_binfo): Declare.
5407 2004-07-15 Mark Mitchell <mark@codesourcery.com>
5409 * name-lookup.c (set_inherited_value_binding_p): Add class_type
5411 (get_class_binding): Adjust.
5412 (push_class_level_binding): Don't use set_inherited_value_binding_p.
5414 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
5416 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
5417 * decl.c (xref_basetypes): Set it here.
5419 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
5420 Don't check for incomplete base.
5421 (get_vfield_name): Simplify while loop.
5422 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
5424 2004-07-14 Mark Mitchell <mark@codesourcery.com>
5426 * lex.c (cxx_make_type): Remove call to get_pointer_type.
5428 * cp-tree.h (IDENTIFIER_VALUE): Remove.
5429 (BINFO_PUSHDECLS_MARKED): Likewise.
5430 (maybe_inject_for_scope_var): Likewise.
5431 (push_class_decls): Likewise.
5432 * name-lookup.h (push_class_binding): Remove.
5433 (innermost_non_namespace_value): New function.
5434 (outer_binding): Likewise.
5435 * class.c (add_method): Push bindings before adding to
5437 (restore_class_cache): Do not restore class_shadowed.
5438 (pushclass): Do not add USING_DECLs. Do not call
5440 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
5441 * decl.c (pushdecl): Use outer_binding.
5442 (poplevel): Set the scope for an out-of-scope for-loop declaration
5444 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
5445 * name-lookup.c (new_class_binding): New function.
5446 (push_binding): Use it.
5447 (pushdecl): Use innermost_non_namespace_value.
5448 (maybe_inject_for_scope_var): Remove.
5449 (push_class_binding): Remove.
5450 (set_inherited_value_binding_p): New function.
5451 (get_class_binding): New function.
5452 (push_class_level_binding): Assert that the current_class_type is
5454 (outer_binding): New function.
5455 (innermost_non_namespace_value): Likewise.
5456 (lookup_name_real): Use outer_binding.
5457 (lookup_name_current_level): Ignore out-of-scope variables.
5458 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
5459 (lookup_template_class): Likewise.
5460 * search.c (dfs_push_type_decls): Remove.
5461 (dfs_push_decls): Likewise.
5462 (setup_class_bindings): Likewise.
5463 (lookup_field_1): Handle USING_DECLs from dependent scopes.
5464 (marked_pushdecls_p): Remove.
5465 (unmarked_pushdecls_p): Remove.
5466 (marked_identifiers): Remove.
5467 (setup_class_bindings): Remove.
5468 (dfs_push_type_decls): Remove.
5469 (dfs_push_decls): Remove.
5470 (push_class_decls): Remove.
5472 2004-07-13 Mark Mitchell <mark@codesourcery.com>
5476 * decl.c (grokvardecl): Make declspecs parameter const.
5477 (grokdeclarator): Likewise. Adjust accordingly.
5478 * decl.h (grokdeclarator): Adjust declaration.
5479 * parser.c (cp_parser_init_declarator): Do not clear
5480 decl_specifiers->attributes.
5482 * cp-tree.h (lang_identifier): Remove class_value.
5483 (IDENTIFIER_CLASS_VALUE): Remove.
5484 (pop_class_decls): Likewise.
5485 (init_search_processing): Likewise.
5486 * class.c (handle_using_decl): Use lookup_member, not
5487 IDENTIFIER_CLASS_VALUE.
5488 (restore_class_cache): New function, split out from ...
5489 (pushclass): ... here. Do not call clear_identifier_class_values.
5490 (invalidate_class_lookup_cache): Do not clear
5491 IDENTIFIER_CLASS_VALUE.
5492 (popclass): Do not call pop_class_decls.
5493 (maybe_note_name_used_in_class): Do not save names looked up after
5494 the class is complete. Use lookup_member, not
5495 IDENTIFIER_CLASS_VALUE.
5496 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
5497 * decl.c (cxx_init_decl_processing): Do not call
5498 init_search_processing.
5499 * method.c (do_build_copy_constructor): Remove unnecessary code.
5500 (do_build_assign_ref): Likewise.
5501 * name-lookup.c (pushdecl): Use lookup_member, not
5502 IDENTIFIER_CLASS_VALUE.
5503 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
5505 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
5506 (push_class_binding): Do not set it.
5507 (clear_identifier_class_values): Remove.
5508 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
5509 (store_binding): Do not save it.
5510 (pop_from_top_level): Do not restore it.
5511 * name-lookup.h (cxx_saved_binding): Remove class_value.
5512 (clear_identifier_class_values): Remove.
5513 * ptree.c (cxx_print_identifier): Do not print
5514 IDENTIFIER_CLASS_VALUE.
5515 * search.c (search_obstack): Remove.
5516 (push_stack_level): Remove.
5517 (pop_stack_level): Remove.
5518 (search_level): Remove.
5519 (search_stack): Remove.
5520 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
5521 (setup_class_bindings): Use IDENTIFIER_MARKED, not
5522 IDENTIFIER_CLASS_VALUE.
5523 (marked_identifiers): New variable.
5524 (push_class_decls): Clear IDENTIFIER_MARKED.
5525 (pop_class_decls): Don't call pop_search_level.
5526 (init_search_processing): Remove.
5528 2004-07-12 Mark Mitchell <mark@codesourcery.com>
5530 * cp-tree.h (get_aggr_typedef): Remove.
5531 * init.c (get_aggr_typedef): Likewise.
5533 * name-lookup.c (push_class_level_binding): Simplify.
5535 2004-07-12 Andrew Pinski <apinski@apple.com>
5539 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
5541 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
5544 2004-07-12 Eric Christopher <echristo@redhat.com>
5546 * parser.c (cp_parser_class_head): Remove unused variable.
5548 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5550 * decl.c (grok_op_properties): Reject [de-]allocation functions
5551 declared in a namespace, or declared as static.
5553 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
5555 * cp-tree.h (make_binfo): Remove.
5556 * decl.c (xref_basetypes): Use make_tree_binfo directly.
5557 * tree.h (copy_base_binfos): Likewise.
5558 (make_binfo): Remove.
5560 * call.c (build_user_type_conversion_1, build_new_op,
5561 check_constructor_callable, build_temp,
5562 perform_direct_initialization_of_possible): Pass type directly to
5563 lookup_fnfields & build_special_member_call.
5564 (build_special_member_call): Accept a type, and complete it.
5565 * class.c (finish_stuct_bits): Copy the BINFOs here.
5566 * cvt.c (ocp_convert): Pass type directly to
5567 build_special_member_call.
5568 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
5569 (xref_basetypes): Allocate the binfo here. Adjust.
5570 * init.c (build_init, build_new_1): Pass type directly to
5571 build_special_member_call.
5572 * lex.c (cxx_make_type): Do not allocate binfo here.
5573 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
5574 * parser.c (cp_parser_class_head): Always call xref_basetypes.
5575 * pt.c (instantiate_class_template): Likewise. Inhibit access
5576 checking for template friends.
5577 * ptree.c (cxx_print_type): Adjust record printing.
5578 * search.c (lookup_base): When taking a type, complete it before
5579 looking for a binfo.
5580 (lookup_member): Delay completing a type.
5581 (push_class_decls): Don't walk an incomplete type.
5582 (lookup_conversions): Likewise.
5583 * semantics.c (finish_stmt_expr_expr): Pass type directly to
5584 build_special_member_call.
5585 * tree.c (copy_base_binfos): Adjust.
5586 (make_binfo): Likewise.
5587 * typeck.c (build_modify_expr): Pass type directly to
5588 build_special_member_call.
5589 * typeck2.c (process_init_constructor): Check a binfo exists.
5590 (build_m_component_ref): Allow accessing an incomplete type.
5591 (build_functional_cast): Pass type directly to
5592 build_special_member_call.
5594 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5597 * config-lang.in (gtfiles): Add typeck2.c.
5598 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
5600 * cp-tree.h: Declare complete_type_check_abstract.
5601 * typeck2.c (pat_calc_hash, pat_compare,
5602 complete_type_check_abstract): New functions.
5603 (abstract_virtuals_error): If the type is abstract, register the
5604 declaration within abstract_pending_vars for further checks.
5605 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
5606 * decl.c (cp_finish_decl): Do not strip array types.
5607 (create_array_type_for_decl): Check for abstractness of the element
5609 (complete_vars): Call complete_type_check_abstract.
5610 * class.c (finish_struct): Prepare a list of virtual functions for
5611 template types, and call complete_vars on it to check for abstractness.
5613 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
5615 PR tree-optimization/14107
5616 * decl.c (finish_function): Remove temporary band-aid.
5618 2004-07-11 Mark Mitchell <mark@codesourcery.com>
5620 * call.c (build_operator_new_call): Avoid using push_to_top_level.
5621 (build_new_op): Adjust call to lookup_function_nonclass.
5622 * name-lookup.c (identifier_type_value): Adjust call to
5624 (lookup_name_real): Add block_p parameter.
5625 (lookup_name_nonclass): Adjust call to lookup_name_real.
5626 (lookup_function_nonclass): Likewise.
5627 (lookup_name): Likewise.
5628 * name-lookup.h (lookup_name_real): Change prototype.
5629 (lookup_name_nonclass): Likewise.
5630 * parser.c (cp_parser_lookup_name): Likewise.
5632 * cp-tree.h (saved_scope): Make old_bindings a vector.
5633 (unuse_fields): Remove.
5634 * name-lookup.h (cxx_saved_binding): Define it.
5635 * class.c (pushclass): Don't use unuse_fields.
5636 * name-lookup.c (cxx_saved_binding_make): Remove.
5637 (store_binding): Add new bindings to a vector, using an
5638 accumulator style, rather than adding them to a list.
5639 (store_bindings): Adjust accordingly.
5640 (store_class_bindings): Likewise.
5641 (push_to_top_level): Likewise.
5642 (pop_from_top_level): Likewise.
5643 * optimize.c (maybe_clone_body): Must push_to_top_level and
5644 pop_from_top_level calls outside of loop.
5645 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
5646 calls here from cp_parser_late_parsing_default_args.
5647 (cp_parser_save_default_args): Record the class type in which the
5648 function is declared.
5649 (cp_parser_late_parsing_default_args): Do not call
5650 push_nested_class/pop_nested_class.
5651 * search.c (dfs_unuse_fields): Remove.
5652 (unuse_fields): Remove.
5654 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
5656 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
5657 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
5658 * cp-tree.h (poplevel): Declare.
5659 (set_block): Remove.
5660 * decl.c (set_block): Remove.
5662 2004-07-10 Mike Stump <mrs@apple.com>
5664 * decl2.c (import_export_class): Never export/import vtables
5665 with inline key functions.
5667 2004-07-09 Steven Bosscher <stevenb@suse.de>
5669 * typeck.c (c_expand_asm_operands): Remove.
5671 2004-07-09 Mike Stump <mrs@apple.com>
5673 * typeck.c (build_class_member_access_expr): Skip null deref
5674 warning when we don't dereference it.
5676 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5680 * class.c (check_field_decls): Improve -Weffc++ warning: do not
5681 warn for pointers to functions/members, or for classes without
5684 2004-07-08 Mark Mitchell <mark@codesourcery.com>
5686 * name-lookup.h (struct cp_binding_level): Update documentation
5689 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5692 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
5693 returning CALL_EXPR, and non-reference return type.
5695 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
5697 * name-lookup.c (push_binding): Use VEC_reserve.
5699 2004-07-08 Richard Henderson <rth@redhat.com>
5701 * cp-tree.h (expand_eh_spec_block): Remove.
5703 2004-07-07 Mark Mitchell <mark@codesourcery.com>
5705 * cp-tree.h (saved_scope): Remove x_previous_class_type and
5706 x_previous_class_values; add x_previous_class_level.
5707 (previous_class_type): Remove.
5708 (previous_class_values): Remove.
5709 (previous_class_level): New macro.
5710 * class.c (pushclass): Restore the identifier cache more
5712 (invalidate_class_lookup_cache): Use vector for class_shadowed and
5713 previous_class_values.
5714 * decl.c (poplevel): Likewise.
5715 * name-lookup.c (cxx_binding_init): New function.
5716 (cxx_binding_make): Use it.
5717 (push_binding): For a binding in a class level, use a vector of
5718 cp_class_binding nodes.
5719 (push_binding_level): New function.
5720 (begin_scope): Use it.
5721 (leave_scope): Do not put class binding levels on the free list.
5722 (print_binding_level): Adjust for the fact that class_shadowed is
5724 (poplevel_class): Likewise.
5725 (clear_identifier_class_values): Likewise.
5726 (push_class_level_binding): Likewise.
5727 (set_class_shadows): Remove.
5728 (store_binding): New function.
5729 (store_class_bindings): New function.
5730 (push_to_top_level): Use store_class_bindings as appropriate.
5731 (pop_from_top_level): Use previous_class_level, not
5732 previous_class_type.
5733 * name-lookup.h (cp_class_binding): New type.
5734 (cp_binding_level): Use a vector object for class_shadowed.
5735 (push_binding_level): Declare.
5736 (set_class_shadows): Remove.
5738 2004-07-07 Andrew Pinski <apinski@apple.com>
5740 * class.c (instantiate_type): BUFFER_REF is dead.
5741 * lex.c (init_operators): IN_EXPR is dead.
5743 2004-07-07 Jason Merrill <jason@redhat.com>
5746 * call.c (build_new_op): Give overload warnings for built-in
5749 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
5752 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
5755 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
5757 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
5758 * class.c (build_primary_vtable, check_bases,
5759 determine_primary_base, finish_struct_bits,
5760 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
5761 get_basefndecls, warn_hidden, walk_subobject_offsets,
5762 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
5763 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
5764 finish_struct_1, get_vfield_name, contains_empty_class_p,
5765 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
5766 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
5767 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
5769 * decl.c (xref_basetypes): Likewise.
5770 * dump.c (cp_dump_tree): Likewise.
5771 * error.c (dump_expr): Likewise.
5772 * init.c (sort_mem_initializers, expand_member_init,
5773 push_base_cleanups): Likewise.
5774 * method.c (do_build_copy_constructor, do_build_assign_reg,
5775 synthesize_exception_spec): Likewise.
5776 * name-lookup.c (arg_assoc_class): Likewise.
5777 * pt.c (instantiate_class_template, tsubst,
5778 get_template_base_recursive): Likewise.
5779 * ptree.c (cxx_print_type): Likewise.
5780 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
5781 * search.c (lookup_base_r, dynamic_cast_base_recurse,
5782 dfs_access_in_type, access_in_type, lookup_field_queue_p,
5783 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
5784 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
5785 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
5786 binfo_for_vtable, copied_binfo, original_binfo): Likewise
5787 * tree.c (copy_base_binfos, make_binfo): Likewise.
5788 * typeck.c (commmon_base_type): Likewise
5789 * typeck2.c (process_init_constructor): Likewise
5791 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
5793 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
5795 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5798 * pt.c (convert_nontype_argument): Disallow conversions between
5799 different enumeration types.
5801 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
5803 * cp-tree.h (BINFO_MARKED): Remove.
5804 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
5805 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
5806 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
5807 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
5808 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
5809 (mark_primary_bases, determine_primary_base, base_derived_from,
5810 dfs_find_final_overrider, dfs_find_final_overrider_q,
5811 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
5812 dfs_modify_vtables, walk_subobject_offsets,
5813 layout_nonempty_base_or_field, build_base_field,
5814 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
5815 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
5816 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
5817 build_ctor_vtbl_group, accumulate_vtble_inits,
5818 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
5819 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
5820 add_vcall_offset_vtbl_entries_1): Likewise.
5821 * decl.c (xref_basetypes): Incomming virtual base indicated by
5823 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
5824 * init.c (finish_init_stmts, sort_mem_initializers,
5825 emit_mem_initializers, build_vtble_address, expand_member_init,
5826 push_base_cleanups): Likewise.
5827 * method.c (do_build_copy_constructor): Likewise.
5828 * pt.c (instantiate_class_template,
5829 get_template_base_recursive): Likewise.
5830 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
5831 get_pseudo_ti_desc): Likewise.
5832 * search.c (lookup_base_r, dynamic_cast_base_recurse,
5833 binfo_from_vbase, binfo_via_virtual, copied_binfo,
5834 original_binfo): Likewise.
5835 * semantics.c (finish_base_specifier): Virtualness is indicated
5837 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
5839 2004-07-06 Mark Mitchell <mark@codesourcery.com>
5842 2004-06-24 Jason Merrill <jason@redhat.com>
5844 * decl.c (grokparms): Give the PARM_DECL reference type if the
5845 parameter is passed by invisible reference.
5847 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5849 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
5850 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
5851 * pt.c (check_instantiated_args, unify): Likewise.
5853 2004-07-05 Phil Edwards <phil@codesourcery.com>
5855 * Make-lang.in (check-c++, lang_checks): Add some comments.
5857 2004-07-05 Zack Weinberg <zack@codesourcery.com>
5859 * cp-mudflap.c: Delete file.
5860 * Makefile.in: Remove all references to cp-mudflap.o.
5862 2004-07-05 Zack Weinberg <zack@codesourcery.com>
5864 * decl.c (cxx_init_decl_processing): Call
5865 build_common_tree_nodes before creating the global NAMESPACE_DECL.
5867 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5870 * call.c (build_operator_new_call): Look only at global scope.
5872 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
5874 * call.c (enforce_access): Expect TREE_BINFO.
5875 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
5876 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
5877 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
5879 (BINFO_LANG_ELTS): Remove.
5880 (BINFO_LANG_SLOTS): New.
5881 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
5882 (CLASSTYPE_TEMPLATE_INFO): Adjust.
5883 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
5884 * search.c (lookup_member): Check TREE_BINFO.
5885 * semantics.c (perform_or_defer_access_check): Likewise.
5886 (check_accessibility_of_qualified_id): Check
5887 deferred_access_no_check.
5888 * tree.c (make_binfo): Use make_tree_binfo.
5890 2004-07-04 Mark Mitchell <mark@codesourcery.com>
5892 * method.c (implicitly_declare_fn): Set linkage of generated
5895 2004-07-04 Richard Henderson <rth@redhat.com>
5897 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
5899 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
5902 * name-lookup.c (push_class_level_binding): Don't pass a
5903 TREE_LIST of ambiguous names to check_template_shadow as it
5904 only handles declarations. Instead, pull the declaration
5907 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5910 * pt.c (check_explicit_specialization): Clarify error message.
5912 2004-07-02 Richard Henderson <rth@redhat.com>
5914 * tree.c (cp_unsave_r): Update remap_save_expr call.
5916 2004-07-02 Mark Mitchell <mark@codesourcery.com>
5919 * mangle.c (write_template_arg): Correct mangling.
5922 * decl.c (grokdeclarator): Robustify.
5924 2004-07-01 Richard Henderson <rth@redhat.com>
5926 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
5927 * method.c (synthesize_method): Don't clear_last_expr.
5928 * name-lookup.c (maybe_push_cleanup_level): Likewise.
5930 2004-07-01 Nick Clifton <nickc@redhat.com>
5932 * decl2.c (import_export_class): Invoke the
5933 import_export_class field in the gcc_target structure if it is not
5936 2004-06-30 Richard Henderson (rth@redhat.com>
5938 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
5939 * method.c (use_thunk): Likewise.
5941 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
5943 * call.c (build_over_call), typeck.c (build_function_call): Call
5944 check_function_arguments instead of check_function_format.
5946 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
5948 * call.c (build_over_call), typeck.c (build_function_call): Update
5949 calls to check_function_format.
5951 2004-06-30 Richard Henderson <rth@redhat.com>
5953 * call.c (build_over_call): Use __builtin_memcpy for copying
5954 CLASS_AS_BASE rather than funny casting.
5956 2004-06-30 Richard Henderson <rth@redhat.com>
5958 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
5959 TYPE_SIZE_UNIT of full_type.
5961 2004-06-30 Per Bothner <per@bothner.com>
5963 Conditionally compile support for --enable-mapped_location.
5964 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
5965 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
5966 adjustments - which I don't understand.
5967 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
5968 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
5969 (print_instantiation_partial_context): Use expand_location.
5970 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
5971 * name-lookup.c: Likewise.
5972 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
5973 * name-lookup.c: Use input_line macro.
5974 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
5975 (cp_parser_statement): Rename locaal variable statement_locus to
5976 statement_location and use SET_EXPR_LOCATION macro.
5977 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
5978 * tree.c (cp_walk_subtrees): Likewise.
5980 2004-06-29 Per Bothner <per@bothner.com>
5982 * tree.c (build_min_nt, build_min, build_min_non_dep):
5983 Don't set TREE_COMPLEXITY from input_line.
5985 2004-06-29 Paul Brook <paul@codesourcery.com>
5987 * init.c: Include target.h.
5988 (get_cookie_size): Remove and replace with target hook.
5990 (build_new_1): Store the element size in the cookie.
5992 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
5995 * parser.c (cp_parser_template_declaration_after_export): Disable
5996 access checks here ...
5997 (cp_parser_class_specifier): ... not here.
5999 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
6001 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
6002 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
6003 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
6006 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
6008 * cp-tree.h (struct deferred_access): Move to ...
6009 * semantics.c (struct deferred_access): ... here. Adjust.
6010 (deferred_access_stack): Make a VEC(deferred_access),
6011 (deferred_access_free_list): Remove.
6012 (deferred_access_no_check): New.
6013 (push_deferring_access_checks, resume_deferring_access_checks,
6014 stop_deferring_access_checks, pop_deferring_access_checks,
6015 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
6016 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
6018 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
6021 * call.c (build_temp): Declare.
6022 (check_constructor_callable): New.
6023 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
6024 CONSTRUCTOR_CALLABLE.
6025 (convert_like_real, initialize_reference): Use
6026 check_constructor_callable.
6027 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
6028 (LOOKUP_*): Renumber.
6030 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
6032 * friend.c (add_friend): Only perform access checks when context
6034 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
6035 * parser.c (cp_parser_class_specifier): Disable access checks here
6036 when parsing the body of a templated class.
6037 * semantics.c (perform_or_defer_access_checks): Reorder to allow
6038 NULL binfos when not checking access.
6040 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
6042 Use vector API for vbase list.
6043 * cp-tree.h: Include vec.h
6044 (DEF_VEC_P (tree)): New type.
6045 (struct lang_type_class): Change vbase's member type.
6046 (binfo_for_vbase): Declare.
6047 * class.c (determine_primary_base, base_derived_from,
6048 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
6049 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
6050 build_vtbl_initializer): Adjust.
6051 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
6053 * init.c (sort_mem_initializers, expand_member_init,
6054 push_base_cleanups): Adjust.
6055 * method.c (do_build_copy_constructor): Adjust.
6056 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
6057 (binfo_for_vbase): New.
6058 * tree.c (copy_base_binfos): Adjust.
6060 2004-06-28 Mark Mitchell <mark@codesourcery.com>
6062 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
6064 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
6067 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
6068 paranthesis in case of pointers to array members.
6069 * error.c (dump_type_prefix): Likewise.
6070 (dump_type_suffix): Maybe issue a whitespace when printing
6073 2004-06-27 Mark Mitchell <mark@codesourcery.com>
6076 * parser.c (cp_parser_set_decl_spec_type): Refine test for
6077 redefinition of built-in types.
6079 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
6081 * error.c (pp_template_argument_list_start): Remove.
6082 (pp_template_argument_list_end): Likewise.
6083 (pp_separate_with_comma): Use pp_cxx_separate_with.
6084 (reinit_global_formatting_buffer): Remove.
6085 (pp_non_consecutive_character): Likewise.
6086 (dump_scope): Use pp_cxx_colon_colon.
6087 (dump_template_parameter): Use pp_cxx_identifier,
6088 pp_cxx_tree_identifier and pp_cxx_whitespace.
6089 (dump_templat_bindings): Replace use of pp_string with sequence
6090 of pp_cxx_whitespace and pp_equal.
6091 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
6092 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
6094 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
6095 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
6096 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
6097 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
6098 pp_cxx_right_bracket, pp_cxx_identifier throughout,
6099 (dump_decl): Likewise.
6100 (dump_template_decl): Likewise.
6101 (dump_function_decl): Likewise. Set padding as appropriate.
6102 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
6104 (dump_exception_spec): Likewise.
6105 (dump_function_name): Use pp_cxx_tree_identifier and
6107 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
6108 pp_cxx_end_template_argument_list.
6109 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
6110 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
6111 pp_cxx_whitespace throughout.
6112 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
6114 (dump_unary_op): Likewise.
6115 (reinit_cxx_pp): New function.
6116 (type_as_string); Use it.
6117 (expr_as_string): Likewise.
6118 (decl_as_string); Likewise.
6119 (context_as_string): Likewise.
6120 (lang_decl_name): Likewise.
6121 (decl_to_string): Likewise.
6122 (expr_to_string): Likewise.
6123 (parm_to_string): Likewise.
6124 (type_to_string): Likewise.
6125 (args_to_string): Likewise.
6126 (cv_to_string): Likewise.
6128 2004-06-26 Mark Mitchell <mark@codesourcery.com>
6130 * cp-tree.h (cp_cv_quals): New type.
6131 (cp_declarator): Use it instead of "tree" as appropriate.
6132 (grok_method_quals): Adjust prototype.
6133 (grokclassfn): Likewise.
6134 (do_friend): Likewise.
6135 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
6136 (grokdeclarator): Likewise.
6137 * decl2.c (grok_method_quals): Likewise.
6138 (grokclassfn): Likewise.
6139 * friend.c (do_friend): Likewise.
6140 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
6141 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
6142 (make_pointer_declarator): Likewise.
6143 (make_reference_declarator): Likewise.
6144 (make_ptrmem_declarator): Likewise.
6145 (cp_parser_ptr_operator): Likewise.
6146 (cp_parser_cv_qualifier_seq_opt): Likewise.
6147 (cp_parser_cv_qualifier_opt): Remove.
6148 (cp_parser_new_declarator_opt): Adjust call to
6149 cp_parser_ptr_operator.
6150 (cp_parser_conversion_declaration_opt): Likewise.
6151 (cp_parser_declarator): Use cp_cv_quals, not tree.
6152 (cp_parser_direct_declarator): Likewise.
6154 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6156 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
6157 Rename DECL_STMT to DECL_EXPR.
6158 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
6159 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
6160 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
6162 2004-06-26 Jan Hubicka <jh@suse.cz>
6165 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
6166 reachability analysis.
6168 2004-06-25 Mark Mitchell <mark@codesourcery.com>
6170 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
6173 2004-06-25 Paul Brook <paul@codesourcery.com>
6175 * decl2.c (get_guard): Call targetm.cxx.guard_type.
6176 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
6178 2004-06-24 Mark Mitchell <mark@codesourcery.com>
6180 * decl.c (grokdeclarator): Restore error messages about __thread.
6181 * parser.c (cp_parser_decl_specifier_seq): Likewise.
6183 2004-06-24 Jason Merrill <jason@redhat.com>
6186 * decl.c (grokparms): Give the PARM_DECL reference type if the
6187 parameter is passed by invisible reference.
6189 2004-06-24 Andreas Schwab <schwab@suse.de>
6191 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
6193 2004-06-23 Mark Mitchell <mark@codesourcery.com>
6195 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
6196 (cp/decl.o): Likewise.
6197 (cp/decl2.o): Likewise.
6198 (cp/pt.o): Likewise.
6199 (cp/semantics.o): Likewise.
6200 * config-lang.in (gtfiles): Do not reference cp/lex.h.
6201 * class.c: Do not include lex.h.
6202 (add_implicitly_declared_members): Do not use
6203 adding_implicit_members.
6204 (check_bases_and_members): Do not talk about grok_x_components.
6205 * cp/cp-tree.h (adding_implicit_members): Remove.
6206 (cp_storage_class): New type.
6207 (cp_decl_spec): Likewise.
6208 (cp_decl_specifier_seq): Likewise.
6209 (cp_parameter_declarator): Use it for the decl_specifiers field.
6210 (check_tag_decl): Adjust prototype.
6211 (shadow_tag): Likewise.
6212 (groktypename): Likewise.
6213 (start_decl): Likewise.
6214 (start_function): Likewise.
6215 (start_method): Likewise.
6216 (grok_x_components): Remove.
6217 (grokfield): Adjust prototype.
6218 (grokbitfield): Likewise.
6219 (finish_member_class_template): Remove.
6220 * decl.c: Do not include lex.h.
6221 (adding_implicit_members): Do not define.
6222 (check_tag_decl): Do not use trees to represent decl-specifiers.
6223 (shadow_tag): Likewise.
6224 (groktypename): Likewise.
6225 (start_decl): Likewise.
6226 (grokvardecl): Likewise.
6227 (grokdeclarator): Likewise.
6228 (grokparms): Likewise.
6229 (start_function): Likewise.
6230 (start_method): Likewise.
6231 * decl.h (grokdeclarator): Adjust prototype.
6232 * decl2.c: Do not include lex.h.
6233 (grok_x_components): Remove.
6234 (grokfield): Do not use trees to represent decl-specifiers.
6235 (grokbitfield): Likewise.
6236 * lex.c: Do not include lex.h.
6238 * parser.c: Include target.h.
6239 (clear_decl_specs): New function.
6240 (cp_parser_translation_unit): Do not use trees to represent
6242 (cp_parser_postfix_expression): Likewise.
6243 (cp_parser_new_type_id): Likewise.
6244 (cp_parser_condition): Likewise.
6245 (cp_parser_simple_declaration): Likewise.
6246 (cp_parser_decl_specifier_seq): Likewise.
6247 (cp_parser_function_specifier_opt): Likewise.
6248 (cp_parser_conversion_type_id): Likewise.
6249 (cp_parser_template_parameter): Likewise.
6250 (cp_parser_explicit_instantiation): Likewise.
6251 (cp_parser_type_specifier): Likewise.
6252 (cp_parser_simple_type_specifier): Likewise.
6253 (cp_parser_init_declarator): Likewise.
6254 (cp_parser_type_id): Likewise.
6255 (cp_parser_type_specifier_seq): Likewise.
6256 (cp_parser_parameter_declaration): Likewise.
6257 (cp_parser_member_declaration): Likewise.
6258 (cp_parser_exception_declaration): Likewise.
6259 (cp_parser_function_definition_from_specifiers_and_declarator):
6261 (cp_parser_single_declaration): Likewise.
6262 (cp_parser_save_member_function_body): Likewise.
6263 (cp_parser_friend_p): Likewise.
6264 (cp_parser_set_storage_class): New function.
6265 (cp_parser_set_decl_spec_type): Likewise.
6266 * pt.c: Do not include lex.h.
6267 * semantics.c: Likewise.
6268 (finish_member_class_template): Remove.
6270 2004-06-23 Roger Sayle <roger@eyesopen.com>
6272 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
6273 longer take both "args" and "convert_args" as arguments.
6274 (build_op_delete_call): Update call to build_cxx_call.
6275 (build_over_call): Likewise, update call to build_cxx_call.
6276 * cp-tree.h (build_cxx_call): Update funtion prototype.
6277 * typeck.c (build_function_call): Don't call expand_tree_builtin.
6278 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
6279 (throw_bad_typeid): Likewise.
6280 (build_dynamic_cast_1): Likewise.
6282 2004-06-22 Richard Henderson <rth@redhat.com>
6284 * class.c (build_vfn_ref): Take a pointer not object. Build
6286 (cp_fold_obj_type_ref): New.
6287 * call.c (build_over_call): Update build_vfn_ref call.
6288 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
6289 * cp-tree.h (cp_fold_obj_type_ref): Declare.
6291 2004-06-21 Jason Merrill <jason@redhat.com>
6294 * cp-gimplify.c (cp_gimplify_init_expr): Look through
6297 2004-06-21 Mark Mitchell <mark@codesourcery.com>
6299 * cp-tree.def (NEW_EXPR): Add a fourth slot.
6300 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
6301 (TREE_PARMLIST): Likewise.
6302 (CALL_DECLARATOR_PARMS): Likewise.
6303 (CALL_DECLARATOR_QUALS): Likewise.
6304 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
6305 (cp_declarator_kind): New type.
6306 (cp_parameter_declarator): Likewise.
6307 (cp_declarator): Likewise.
6308 (cp_error_declarator): Likewise.
6309 (no_parameters): Likewise.
6310 (groktypename): Change prototype.
6311 (start_decl): Likewise.
6312 (start_handler_parms): Likewise.
6313 (get_scope_of_declarator): Likewise.
6314 (start_function): Likewise.
6315 (start_preparsed_function): New function.
6316 (start_function): Change prototype.
6317 (start_method): Likewise.
6318 (grokfield): Likewise.
6319 (grokbitfield): Likewise.
6320 (build_new): Likewise.
6321 (make_pointer_declarator): Remove.
6322 (make_reference_declarator): Likewise.
6323 (make_call_declarator): Likewise.
6324 (set_quals_and_spec): Likewise.
6325 (process_template_parm): Change prototype.
6326 (begin_function_definition): Remove.
6327 (finish_parmlist): Remove.
6328 * decl.c (groktypename): Do not use trees to represent
6330 (start_decl): Likewise.
6331 (start_handler_parms): Remove.
6332 (get_scope_of_declarator): Reimplement.
6333 (grokdeclarator): Do not use trees to represent declarators.
6334 (grokparms): Likewise.
6335 (start_function): Likewise.
6336 (start_method): Likewise.
6337 (build_void_list_mode): Do not use TREE_PARMLIST.
6338 * decl.h (grokdeclarator): Change prototype.
6339 * decl2.c (grok_method_quals): Robustify.
6340 (grok_x_components): Do not use trees to represent declarators.
6341 (grokfield): Likewise.
6342 (grokbitfield): Likewise.
6343 (start_objects): Build FUNCTION_DECLs, not declarators.
6344 (start_static_storage_duration_function): Likewise.
6345 * init.c (build_new): Simplify.
6346 * lex.c (make_pointer_declarator): Remove.
6347 (make_reference_declarator): Likewise.
6348 (make_call_declarator): Likewise.
6349 (set_quals_and_spec): Likewise.
6350 * method.c (use_thunk): Use start_preparsed_function.
6351 (synthesize_method): Likewise.
6352 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
6353 * optimize.c (maybe_clone_body): Use start_preparsed_function.
6354 * parser.c (cp_error_declarator): New variable.
6355 (declarator_obstack): Likewise.
6356 (alloc_declarator): New function.
6357 (make_declarator): Likewise.
6358 (make_id_declarator): Likewise.
6359 (make_pointer_declarator): Likewise.
6360 (make_reference_declarator): Likewise.
6361 (make_ptrmem_declarator): Likewise.
6362 (make_call_declarator): Likewise.
6363 (make_array_declarator): Likewise.
6364 (no_parameters): New variable.
6365 (make_parameter_declarator): Likewise.
6366 (cp_parser_check_for_definition_in_return_type): Do not use trees
6367 to represent declarators.
6368 (cp_parser_translation_unit): Likewise.
6369 (cp_parser_new_expression): Likewise.
6370 (cp_parser_new_type_id): Likewise.
6371 (cp_parser_new_declarator_opt): Likewise.
6372 (cp_parser_direct_new_declarator): Likewise.
6373 (cp_parser_condition): Likewise.
6374 (cp_parser_declaration_statement): Likewise.
6375 (cp_parser_declaration): Likewise.
6376 (cp_parser_conversion_type_id): Likewise.
6377 (cp_parser_conversion_declarator_opt): Likewise.
6378 (cp_parser_template_parameter_list): Likewise.
6379 (cp_parser_template_parameter): Likewise.
6380 (cp_parser_explicit_instantiation): Likewise.
6381 (cp_parser_init_declarator): Likewise.
6382 (cp_parser_declarator): Likewise.
6383 (cp_parser_direct_declarator): Likewise.
6384 (cp_parser_type_id): Likewise.
6385 (cp_parser_parameter_declaration_clause): Likewise.
6386 (cp_parser_parameter_declaration_list): Likewise.
6387 (cp_parser_parameter_declaration): Likewise.
6388 (cp_parser_member_declaration): Likewise.
6389 (cp_parser_exception_declaration): Likewise.
6390 (cp_parser_check_declarator_template_parameters): Likewise.
6391 (cp_parser_function_definition_from_specifiers_and_declarator):
6393 (cp_parser_save_member_function_body): Likewise.
6394 * pt.c (process_template_parm): Add is_non_type parameter.
6395 (convert_template_argument): Adjust call to groktypename.
6396 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
6397 (tsubst): Do not expect declarators.
6398 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
6400 (instantiate_decl): Use start_preparsed_function.
6401 * semantics.c (begin_function_definition): Remove.
6402 (finish_parmlist): Remove.
6403 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
6406 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6408 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
6409 (build_new_method_call): Likewise.
6410 * decl.c (local_variable_p_walkfn): Don't walk into types.
6411 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
6412 (build_anon_union_vars): Add new operand for COMPONENT_REF.
6413 * init.c (buld_new): Add new operand for ARRAY_REF.
6414 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
6415 (do_build_assign_ref): Likewise.
6416 * parser.c (cp_parser_direct_new_declarator): Add new operands
6418 (cp_parser_direct_declarator): Likewise.
6419 * pt.c (tsubst): Likewise.
6420 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
6422 * semantics.c (finish_non_static_data_member): Add new operand
6424 * typeck.c (build_class_member_access_expr): Likewise.
6425 (build_class_member_access_expr, finish_class_member_access_expr):
6427 (build_ptrmemfunc_access_expr): Likewise.
6428 (build_array_ref): Add new operands for ARRAY_REF.
6429 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
6430 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
6432 2004-06-21 Richard Henderson <rth@redhat.com>
6434 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
6435 * parser.c (cp_parser_jump_statement): Update commentary.
6436 * pt.c (tsubst_expr): Use RETURN_EXPR.
6437 * semantics.c (finish_return_stmt): Likewise.
6438 (finalize_nrv_r): Likewise.
6439 * typeck.c, typeck2.c: Update file start commentary.
6441 2004-06-21 Richard Henderson <rth@redhat.com>
6443 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
6445 2004-06-20 Richard Henderson <rth@redhat.com>
6447 * cp-tree.h (add_decl_stmt): Declare.
6448 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
6449 * semantics.c (maybe_cleanup_point_expr): New.
6450 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
6451 finish_for_expr, finish_switch_cond): Use it.
6452 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
6454 2004-06-20 Richard Henderson <rth@redhat.com>
6456 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
6457 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
6458 (cp_gimplify_expr): Call it.
6459 (gimplify_cleanup_stmt): Move from c-gimplify.c.
6460 (cp_genericize): New.
6461 * decl.c (finish_function): Call it.
6462 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
6463 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
6464 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
6465 (cp_genericize): Declare.
6466 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
6467 * dump.c (cp_dump_tree): Likewise.
6468 * semantics.c (push_cleanup): Move from c-semantics.c.
6470 2004-06-20 Zack Weinberg <zack@codesourcery.com>
6472 * cp-lang.c (has_c_linkage): Implement.
6474 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
6475 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
6476 (builtin_function_1): Don't call make_decl_rtl.
6477 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
6478 (grokvardecl): Don't call mangle_decl.
6479 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
6480 DECL_ASSEMBLER_NAME.
6481 * method.c (set_mangled_name_for_decl): Delete.
6482 * name-lookup.c (pushdecl): When a local extern shadows a
6483 file-scope declaration of the same object, give both DECLs the
6485 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
6486 on DECL_ASSEMBLER_NAME.
6488 2004-06-19 Richard Henderson <rth@redhat.com>
6490 * cp-gimplify.c: Remove unnecessary prototypes.
6491 (cp_gimplify_stmt): Merge into ...
6492 (cp_gimplify_expr): ... here. Move to end of file. Handle
6493 stmts_are_full_exprs_p frobbing.
6494 * cp-tree.h (cp_gimplify_stmt): Remove.
6495 * pt.c (tsubst_expr): Merge prep_stmt and unify.
6496 * tree.c (init_tree): Don't set lang_gimplify_stmt.
6498 2004-06-18 Richard Henderson <rth@redhat.com>
6501 * semantics.c (begin_cond): New.
6502 (finish_cond): Rewrite to handle template DECL_STMTs specially.
6503 Assume that non-template decls go land before the conditional.
6504 (simplify_loop_decl_cond): Likewise.
6505 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
6506 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
6507 begin_switch_stmt, finish_switch_cond): Update to match.
6509 2004-06-17 Jason Merrill <jason@redhat.com>
6512 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
6513 (finish_stmt_expr_expr): Update type after conversions.
6514 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
6515 Handle void initializer.
6516 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
6518 2004-06-17 Geoffrey Keating <geoffk@apple.com>
6520 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
6521 * cp-tree.h (defer_fn): Delete.
6522 * decl2.c (defer_fn): Delete.
6523 (finish_file): Simplify deferred_fns loops; check that
6524 only used inline functions get into deferred_fns.
6525 (mark_used): Inline previous contents of defer_fn.
6527 2004-06-16 Richard Henderson <rth@redhat.com>
6529 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
6530 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
6531 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
6532 of CTOR_INITIALIZER ...
6533 (pp_cxx_statement): ... here.
6534 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
6535 (finish_function): Use alloc_stmt_list to zap entire function.
6536 * parser.c (cp_parser_compound_statement): Update commentary.
6537 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
6538 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
6539 (finish_stmt_expr): Don't look through COMPOUND_STMT.
6541 2004-06-16 Geoffrey Keating <geoffk@apple.com>
6543 * pt.c (mark_decl_instantiated): Don't call defer_fn.
6545 2004-06-16 Richard Henderson <rth@redhat.com>
6547 * parser.c (cp_parser_labeled_statement): Update commentary.
6548 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
6549 * tree.c (mark_local_for_remap_r): Likewise.
6551 2004-06-16 Richard Henderson <rth@redhat.com>
6553 * parser.c (cp_parser_asm_definition): Update commentary.
6554 * pt.c (tsubst_expr): Use ASM_EXPR.
6555 * semantics.c (finish_asm_stmt): Likewise.
6557 2004-06-16 Richard Henderson <rth@redhat.com>
6559 * decl.c (finish_destructor_body): Use LABEL_EXPR.
6560 * parser.c (cp_parser_statement): Update commentary.
6561 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
6562 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
6563 * tree.c (mark_local_for_remap_r): Likewise.
6565 2004-06-16 Richard Henderson <rth@redhat.com>
6568 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
6569 statement in FOR_INIT_STMT for templates.
6571 2004-06-15 Richard Henderson <rth@redhat.com>
6573 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
6574 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
6575 (genericize_try_block): Use gimplify_stmt.
6576 (genericize_catch_block, genericize_eh_spec_block): Likewise.
6577 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
6578 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
6579 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
6580 (cp_tree_chain_matters_p): Remove.
6581 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
6582 (COMPOUND_STMT_BODY_BLOCK): New.
6583 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
6584 (EXPR_STMT_STMT_EXPR_RESULT): New.
6585 (building_stmt_tree): Check cur_stmt_list.
6586 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
6587 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
6588 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
6589 (cp_finish_decl): Use push_cleanup.
6590 (start_function, finish_function): Use statement lists.
6591 (finish_stmt): Do nothing.
6592 * except.c (begin_eh_spec_block): Use statement lists.
6593 (check_handlers_1, check_handlers): Likewise.
6594 * init.c (construct_virtual_base): Don't add extra compound stmts.
6595 (build_vec_init): Likewise.
6596 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
6597 * name-lookup.h (struct cp_binding_level): Add statement_list.
6598 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
6599 (cp_parser_labeled_statement, cp_parser_expression_statement,
6600 cp_parser_statement_seq_opt): Likewise.
6601 (cp_parser_compound_statement): Likewise. Take bool for try block.
6602 (cp_parser_selection_statement): Tidy if processing.
6603 (cp_parser_already_scoped_statement): Rewrite to do what it says.
6604 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
6605 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
6606 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
6607 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
6608 (finish_cond): New, rewritten from FINISH_COND.
6609 (simplify_loop_decl_cond): New.
6610 (finish_expr_stmt): Avoid nested EXPR_STMTs.
6611 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
6612 begin_else_clause, finish_else_clause, finish_if_stmt,
6613 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
6614 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
6615 finish_for_cond, finish_for_stmt, begin_switch_stmt,
6616 finish_switch_cond, finish_switch_stmt, begin_try_block,
6617 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
6618 finish_handler_sequence, finish_function_handler_sequence,
6619 begin_handler, finish_handler_parms, finish_handler,
6620 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
6621 using statement lists.
6622 (begin_compound_stmt): Replace has_no_scope argument with flags.
6623 Update all callers. Use statement lists.
6624 (finish_compound_stmt): Likewise.
6625 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
6626 (current_scope_stmt_stack): Remove.
6627 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
6628 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
6629 Rewrite with statement lists.
6631 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
6633 * parser.c: Change all assignments of c_lex_string_translate
6634 to true and false to 1 and 0.
6635 (cp_lexer_read_token): Convert type of the translated string.
6636 (cp_parser_skip_to_closing_parentheses): Preserve original
6637 value of c_lex_string_translate, and set it to -1 while
6639 (cp_parser_cache_group): Likewise.
6640 (cp_parser_cache_group_1): Renamed.
6641 (cp_parser_asm_operand_list): Remove redundant setting of
6642 c_lex_string_translate.
6643 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
6644 Handle chained strings.
6646 2004-06-12 Andrew Pinski <apinski@apple.com>
6650 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
6652 * cp-tree.h: Fix typo.
6654 * cp-tree.h: Include cgraph.h
6655 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
6656 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
6658 2004-06-12 Jason Merrill <jason@redhat.com>
6660 PR tree-optimization/14107
6661 * decl.c (finish_function): Warn about no return in all functions.
6663 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
6665 * cp-tree.h (struct language_function): Remove cannot_inline.
6666 * decl.c (save_function_data): cannot_inline is no more.
6667 (cxx_push_function_context): Likewise.
6668 * decl2.c (start_objects, start_static_storage_duration_function):
6669 Reset DECL_INLINE, set DECL_UNINLINABLE.
6671 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6674 * search.c (lookup_field): Propagate the ambiguity list.
6675 (lookup_fnfields): Likewise.
6677 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6680 * parser.c (cp_parser_template_name): Ctors/dtors never need a
6681 template keyword to disambiguate.
6683 2004-06-14 Mark Mitchell <mark@codesourcery.com>
6686 * decl.c (grokdeclarator): Ignore pointer-to-members when
6687 computing template depth.
6690 * name-lookup.c (pushtag): Do not try to put class declarations in
6691 explicit specialization scopes.
6693 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
6695 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
6697 2004-06-11 Mark Mitchell <mark@codesourcery.com>
6700 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
6701 bindings for undeclared built-ins.
6703 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6705 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
6706 appear at the correct location.
6708 2004-06-10 Jason Merrill <jason@redhat.com>
6712 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6713 * init.c (build_offset_ref): Build SCOPE_REF with non-null
6714 TREE_TYPE for non-dependent names.
6715 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
6716 unknown_type_node as its TREE_TYPE.
6717 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
6718 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
6719 (dump_expr) <SCOPE_REF case>: Likewise.
6721 2004-06-10 Mark Mitchell <mark@codesourcery.com>
6724 * parser.c (cp_parser_direct_declarator): Robustify.
6727 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
6728 constants in non-dependent contexts.
6732 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
6735 2004-06-10 Jakub Jelinek <jakub@redhat.com>
6738 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
6741 2004-06-09 Mark Mitchell <mark@codesourcery.com>
6745 2004-06-07 Mark Mitchell <mark@codesourcery.com>
6746 * lex.c (handle_pragma_interface): Deprecate.
6747 (handle_pragma_implementation): Likewise.
6749 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
6751 * g++spec.c (lang_specific_driver): Remove check for -lm
6752 and -lmath when check it see if it was the math library.
6754 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6757 * parser.c (cp_parser_direct_declarator): Reject constructor named
6758 as qualified template-id.
6760 2004-06-07 Mark Mitchell <mark@codesourcery.com>
6763 * lex.c (handle_pragma_interface): Deprecate.
6764 (handle_pragma_implementation): Likewise.
6766 2004-06-07 Mark Mitchell <mark@codesourcery.com>
6769 * parser.c (cp_parser_iteration_statement): Fix typo in error
6773 * pt.c (tsubst_default_argument): Do not defer access checks
6774 while substituting into the default argument.
6777 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
6778 constant in a non-dependent context.
6781 * except.c (build_throw): Ensure that temp_expr has been
6784 2004-06-06 Roger Sayle <roger@eyesopen.com>
6786 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
6788 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6791 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
6792 'typename', and accept 'template'.
6794 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
6795 Jan Hubicka <jh@suse.cz>
6798 * method.c (use_think): Do not mark thunk as referenced.
6800 2004-06-03 Matt Austern <austern@apple.com>
6803 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
6804 is nonzero, and if we see a noninline definition of a key method,
6805 make the vtables nonweak.
6807 2004-06-02 Matt Austern <austern@apple.com>
6809 * cp-tree.h (instantiate_decl): new boolean parameter,
6810 undefined_ok. Current behavior is equivalent to its being 0.
6811 * decl2.c (mark_used): Add new argument when calling instantiate_decl
6812 * pt.c (mark_decl_instantiated): Unconditionally make
6813 instantiations explicit unconditionally
6814 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
6815 since mark_decl_instantiated now does it.
6816 (instantiate_class_member): New. Instantiate a member of an
6817 explicitly instantiated class template.
6818 (do_type_instantiation): Explicitly instantiate members of an
6819 explicitly instantiated class template.
6820 (instantiate_decl): if undefined_ok is nonzero, and if we're
6821 trying to explicitly instantiated a template with no definition,
6822 change it to an implicit instantiation.
6823 (instantiate_pending_templates): Add new argument to instantiate_decl.
6824 * tree.c (cp_cannot_inline_tree_fn): Likewise.
6826 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
6828 * cp-tree.h: Fix typo.
6830 * cp-tree.h: Include cgraph.h
6831 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
6832 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
6834 2004-06-01 Jason Merrill <jason@redhat.com>
6837 * call.c (call_builtin_trap): Remove type parm.
6838 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
6839 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
6841 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6844 * init.c (build_offset_ref): Build SCOPE_REF with non-null
6845 TREE_TYPE for non-dependent names.
6846 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
6847 unknown_type_node as its TREE_TYPE.
6848 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
6849 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
6850 (dump_expr) <SCOPE_REF case>: Likewise.
6852 2004-06-01 Richard Henderson <rth@redhat.com>
6853 Andrew Pinski <pinskia@physics.uc.edu>
6855 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
6856 * parser.c (struct cp_parser): Remove in_offsetof.
6857 (cp_parser_new): Don't set it.
6858 (cp_parser_unary_expression): Don't check it.
6859 (cp_parser_postfix_open_square_expression): Split out from ...
6860 (cp_parser_postfix_expression): ... here.
6861 (cp_parser_postfix_dot_deref_expression): Likewise.
6862 (cp_parser_builtin_offsetof): New.
6863 (cp_parser_primary_expression): Use it.
6865 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6868 * parser.c (cp_parser_postfix_expression): Allow subscript
6869 operator in offsetof.
6871 2004-05-31 Mark Mitchell <mark@codesourcery.com>
6874 * friend.c (add_friend): Do not try to perform access checks for
6875 functions from dependent classes.
6877 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
6879 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
6880 (pp_cxx_begin_template_argument_list): Turn into a function.
6881 (pp_cxx_end_template_argument_list): Likewise.
6882 (pp_cxx_separate_with): Define.
6883 (pp_cxx_unqualified_id): Tidy.
6884 (pp_cxx_primary_expression): Likewise.
6885 (pp_cxx_postfix_expression): Likewise.
6886 (pp_cxx_expression): Likewise.
6887 (pp_cxx_simple_type_specifier): Likewise.
6888 (pp_cxx_type_specifier_seq): Likewise.
6889 (pp_cxx_parameter_declaration_clause): Likewise.
6890 (pp_cxx_exception_specification): Likewise.
6891 (pp_cxx_direct_declarator): Likewise.
6892 (pp_cxx_type_id): Likewise.
6893 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
6895 (pp_cxx_left_paren): Likewise.
6896 (pp_cxx_right_paren): Likewise.
6897 (pp_cxx_left_brace): Likewise.
6898 (pp_cxx_right_brace): Likewise.
6899 (pp_cxx_left_bracket): Likewise.
6900 (pp_cxx_right_bracket): Likewise.
6901 (pp_cxx_dot): Likewise.
6902 (pp_cxx_identifier): Likewise.
6903 (pp_cxx_tree_identifier): Likewise.
6904 (pp_cxx_ampersand): New macro.
6905 (pp_cxx_star): Likewise.
6906 (pp_cxx_arrow): Likewise.
6907 (pp_cxx_semicolon): Likewise.
6908 (pp_cxx_complement): Likewise.
6909 (pp_cxx_begin_template_argument_list): Declaree.
6910 (pp_cxx_end_template_argument_list): Likewise.
6911 (pp_cxx_colon_colon): likewise.
6913 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
6915 * parser.c (cp_parser_simple_type_specifier): Explicitly test
6918 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
6920 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
6921 typeck.c: Fix comment formatting.
6923 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
6925 * cp-lang.c (cp_expand_decl): Remove.
6926 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
6928 2004-05-30 Andreas Jaeger <aj@suse.de>
6930 * lang-specs.h: Add missing initializers for .ii.
6932 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
6934 * decl.c (cp_make_fname_decl): Free return value from
6937 2004-05-28 Mark Mitchell <mark@codesourcery.com>
6940 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
6942 * init.c (build_new): Likewise.
6945 * name-lookup.c (arg_assoc): Robustify.
6948 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
6949 when determining the scope to use for a pointer to member.
6950 (lookup_anon_field): Give it external linkage.
6951 * cp-tree.h (lookup_anon_field): Declare it.
6952 * expr.c (cplus_expand_constant): Use it.
6954 2004-05-28 Mark Mitchell <mark@codesourcery.com>
6957 * parser.c (cp_parser_simple_type_specifier): Call
6958 maybe_note_name_used_in_class.
6960 2004-05-28 Tom Marshall <tmarshall@real.com>
6963 * class.c (finish_struct_1): Warn only if the dtor is non-private or
6964 the class has friends.
6966 2004-05-27 Adam Nemet <anemet@lnxw.com>
6969 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
6970 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
6972 2004-05-24 Geoffrey Keating <geoffk@apple.com>
6974 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
6975 if it might be needed.
6976 * pt.c (mark_decl_instantiated): Only call defer_fn if
6977 the function actually needs processing in finish_file.
6978 * decl2.c (finish_file): Add check that elements in
6979 deferred_fns_used are really needed there. Remove unnecessary
6980 test of DECL_SAVED_TREE.
6982 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
6984 * Make-lang.in: No need to specify $(LIBCPP).
6986 2004-05-23 Mark Mitchell <mark@codesourcery.com>
6989 * parser.c (cp_parser_class_head): Robustify.
6992 * parser.c (cp_parser_decl_specifier_seq): Correct error in
6994 (cp_parser_constructor_declarator_p): Treat attributes
6998 * typeck.c (build_unary_op): Do not attempt to resolve casts to
6999 base classes in templates.
7001 2004-05-23 Mark Mitchell <mark@codesourcery.com>
7004 * pt.c (instantiate_template): Robustify.
7006 2004-05-23 Mark Mitchell <mark@codesourcery.com>
7009 * decl.c (xref_tag): Issue errors about redeclaring template
7010 classes as non-template classes.
7012 2004-05-23 Mark Mitchell <mark@codesourcery.com>
7015 * name-lookup.c (supplement_binding): Allow redefinitions of
7019 * parser.c (cp_parser_template_argument): Robustify.
7021 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7023 * class.c (alter_access): Use %E format specifier to print an
7024 identifier node. Avoid looking at the IDENTIFIER_POINTER.
7025 (push_lang_context): Likewise.
7026 * decl.c (lookup_label): Likewise.
7027 (grokdeclarator): Likewise.
7028 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
7029 * pt.c (do_type_instantiation): Likewise.
7030 * tree.c (handle_java_interface_attribute): Likewise.
7031 (handle_com_interface_attribute): Likewise.
7032 (handle_init_priority_attribute): Likewise.
7034 2004-05-22 Mark Mitchell <mark@codesourcery.com>
7038 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
7039 recognized as overloaded functions.
7041 2004-05-22 Mark Mitchell <mark@codesourcery.com>
7044 * class.c (layout_nonempty_base_or_field): Do not try to avoid
7045 layout conflicts for unions.
7048 * typeck.c (build_x_unary_op): Instantiate template class
7049 specializations before looking for "operator &".
7052 * typeck.c (complete_type): Layout non-dependent array types, even
7056 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
7059 2004-05-22 Roger Sayle <roger@eyesopen.com>
7061 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
7062 returning when TREE_TYPE is error_mark_node.
7063 * typeck.c (require_complete_type): Return error_mark_node if
7064 value's type is an error_mark_node.
7066 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
7068 * optimize.c (calls_setjmp_r): Remove.
7069 (calls_setjmp_p): Remove.
7070 * cp-tree.c (calls_setjmp_p): Remove.
7071 * decl.c (finish_function): Do not call calls_setjmp_p.
7073 2004-05-18 Zack Weinberg <zack@codesourcery.com>
7075 * decl.c (cp_finish_decl): Use mark_decl_referenced.
7076 * decl2.c (maybe_make_one_only): Likewise.
7077 * method.c (use_thunk): Likewise.
7079 2004-05-18 Jason Merrill <jason@redhat.com>
7081 * class.c (build_base_path): Tidy a bit.
7083 2004-05-14 Geoffrey Keating <geoffk@apple.com>
7085 * name-lookup.c (struct scope_binding): New.
7086 (EMPTY_SCOPE_BINDING): New.
7087 (lookup_using_namespace): Take a scope_binding instead of a
7089 (qualified_lookup_using_namespace): Likewise.
7090 (cxx_binding_clear): Delete.
7091 (do_nonmember_using_decl): Use a scope_binding instead of a
7093 (lookup_tag): Don't call select_decl.
7094 (ambiguous_decl): Don't return anything (and change callers to match).
7095 Take a scope_binding as the second parameter.
7096 (lookup_namespace_name): Use a scope_binding instead of a
7098 (unqualified_namespace_lookup): Likewise.
7099 (lookup_qualified_name): Likewise.
7100 (select_decl): Take a scope_binding instead of a cxx_binding.
7101 Use macros rather than hand-coding tests for type-ness.
7103 2004-05-13 Diego Novillo <dnovillo@redhat.com>
7105 * cp-gimplify.c: Rename from cp-simplify.c.
7106 * Make-lang.in, optimize.c: Update.
7108 2004-05-13 Diego Novillo <dnovillo@redhat.com>
7110 Merge from tree-ssa-20020619-branch. See
7111 ChangeLog.tree-ssa for details.
7113 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
7114 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
7115 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
7116 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
7118 * cp-mudflap.c: New file.
7119 * cp-simplify.c:: New file.
7121 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7124 * decl2.c (check_classfn): For member templates, compare also the
7125 template parameters to match the declaration.
7126 * cp-tree.h: Adjust declaration of check_classfn.
7127 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
7128 * friend.c (do_friend): Likewise.
7129 * pt.c (tsubst_friend_function): Likewise.
7131 2004-05-01 Zack Weinberg <zack@codesourcery.com>
7133 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
7134 Instead, dig into the representation type to find the array bound.
7136 2004-04-30 Jason Merrill <jason@redhat.com>
7138 Refer to base members using COMPONENT_REFs where possible.
7139 * class.c (build_simple_base_path): New fn.
7140 (build_base_path): Use it for non-virtual base references.
7141 (layout_class_type): Change base fields to their real type
7142 after layout is done.
7143 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
7144 * cp-lang.c (cxx_get_alias_set): Use it.
7146 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
7148 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
7151 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7154 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
7155 used in integral constant expressions.
7157 2004-04-22 Mark Mitchell <mark@codesourcery.com>
7159 * init.c (build_aggr_init): Fix accidental use of C99 construct in
7162 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
7164 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
7165 * decl.c (reshape_init): Use it.
7166 * init.c (perform_member_init): Remove redundant condition.
7167 (build_aggr_init): Adjust to handle brace-enclosed initializers
7169 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
7171 * parser.c (cp_parser_initializer_clause): Do not set
7172 TREE_HAS_CONSTRUCTOR on the initializer.
7173 * rtti.c (tinfo_base_init): Likewise.
7174 (generic_initializer): Likewise.
7175 (ptr_initializer): Likewise.
7176 (ptm_initializer): Likewise.
7177 (class_initializer): Likewise.
7178 (get_pseudo_ti_init): Likewise.
7179 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
7181 2004-04-22 Alan Modra <amodra@bigpond.net.au>
7183 * name-lookup.c (anonymous_namespace_name): Make static.
7185 2004-04-19 Roger Sayle <roger@eyesopen.com>
7188 * class.c (build_base_path): Call fold whilst building the NULL
7189 pointer check expression trees.
7191 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
7193 * init.c (build_new_1): Don't use type size argument for Java
7194 _Jv_AllocObject call.
7196 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
7198 * method.c (make_alias_for_thunk): Remove preprocessor guard on
7199 declaration and definition.
7201 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
7204 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
7205 than ASM_OUTPUT_DEF.
7207 2004-04-08 Jakub Jelinek <jakub@redhat.com>
7209 * decl2.c (mark_used): Don't segfault if cfun != NULL but
7210 current_function_decl == NULL.
7212 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
7215 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
7218 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7220 * init.c (decl_constant_value): Don't look at DECL_INITIAL
7222 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
7223 or TREE_SIDE_EFFECTS of a type.
7225 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
7228 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
7229 cv-qualifier unification.
7230 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
7232 2004-04-02 Jan Hubicka <jh@suse.cz>
7234 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
7235 * cp-tree.h (cp_update_decl_after_saving): Declare.
7236 * tree.c (cp_update_decl_after_saving): Define.
7238 2004-04-01 Mark Mitchell <mark@codesourcery.com>
7241 * typeck.c (get_delta_difference): Call fold before returning the
7244 2004-04-01 Richard Henderson <rth@redhat.com>
7247 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
7248 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
7250 2004-04-01 Mark Mitchell <mark@codesourcery.com>
7253 * name-lookup.c (maybe_push_cleanup_level): Robustify.
7255 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7257 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
7259 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7261 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
7262 * class.c (check_bitfield_decl): Likewise.
7263 * cvt.c (type_promotes_to): Likewise.
7264 * decl.c (finish_enum): Likewise.
7265 * mangle.c (write_builtin_type): Likewise.
7266 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
7267 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
7268 (build_binary_op): Likewise.
7270 2004-03-31 Jan Hubicka <jh@suse.cz>
7272 * tree.h (optimize_function): Kill prototype.
7273 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
7274 * semantics.c (expand_body): Kill.
7276 2004-03-30 Mark Mitchell <mark@codesourcery.com>
7279 * decl.c (start_decl_1): Do not decide whether or not to create a
7280 new cleanup level until after the type has been completed.
7283 * pt.c (tsubst_default_argument): Clear current_function_decl.
7285 2004-03-30 Zack Weinberg <zack@codesourcery.com>
7287 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
7289 2004-03-29 Zack Weinberg <zack@codesourcery.com>
7291 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
7292 is null, just print the literal name and return.
7294 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
7296 * cxx-pretty-print.c: Fix comment typos.
7298 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
7300 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
7303 2004-03-23 Ziemowit Laski <zlaski@apple.com>
7305 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
7306 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
7309 2004-03-23 Zack Weinberg <zack@codesourcery.com>
7311 PR 12267, 12391, 12560, 13129, 14114, 14133
7312 * cp-lang.c (c_reset_state): Delete.
7313 (push_file_scope, pop_file_scope): New stubs.
7314 * parser.c (c_parse_file): Call sorry() here if called more than once.
7316 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7318 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
7321 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7323 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
7325 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
7327 * error.c (enum pad): Remove.
7328 (dump_qualifiers): Likewise.
7329 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
7330 (dump_aggr_type): Likewise.
7331 (dump_type_suffix): Likewise.
7332 (dump_simple_decl): Likewise.
7333 (dump_function_decl): Likewise.
7334 (cv_to_string): Likewise.
7335 (dump_type_prefix): Likewise. Adjust return void.
7336 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
7338 (pp_cxx_template_keyword_if_needed): Document.
7339 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
7340 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
7341 MUST_NOT_THROW_EXPR.
7343 2004-03-21 Mark Mitchell <mark@codesourcery.com>
7346 * decl.c (cp_finish_decl): Compute the size of arrays declared in
7347 templates, if their type is non-dependent.
7349 2004-03-19 Mark Mitchell <mark@codesourcery.com>
7351 * call.c (build_op_delete_call): Do not forget the placement
7352 arguments when iterating through mutiple delete operators.
7354 * cp-tree.h (svaed_scope): Remove last_parms.
7355 (NEW_DELETE_OPNAME_P): New macro.
7356 (last_function_parms): Remove.
7357 (do_friend): Adjust prototype.
7358 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
7359 using last_function_parms.
7360 (grokfndecl): Take the PARM_DECLs as an argument, rather than
7361 using last_function_parms.
7362 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
7363 for class-specific operator new and operator delete.
7364 (grok_op_properties): Do not look for allocation functions with
7366 (start_function): Use DECL_ARGUMENTS instead of
7367 last_function_parms.
7368 * decl.h (last_function_parms): Do not declare.
7369 * decl2.c (grokclassfn): Do not use last_function_parms.
7370 * friend.c (do_friend): Remove parmdecls parameter.
7371 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
7372 (pop_from_top_level): Do not restore it.
7373 * pt.c (check_explicit_specialization): Do not adjust
7374 last_function_parms.
7376 * name-lookup.c (do_local_using_decl): Create a local binding for
7377 types brought in via using declarations.
7379 * name-lookup.c (lookup_arg_dependent): Handle block-scope
7380 function declarations correctly.
7382 * semantics.c (finish_id_expression): Correct handling of
7383 conversion operators to dependent types.
7385 * typeck.c (lookup_destructor): Allow the use of destructors from
7388 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7390 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
7391 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
7392 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
7393 the field is named TEMPLATE_TYPE_PARM_INDEX.
7395 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7398 * parser.c (cp_parser_functional_cast): A cast to anything
7399 but integral or enumaration type is not an integral constant
7401 * pt.c (value_dependent_expression_p): Handle cast expressions
7402 without operands (such as "int()").
7404 2004-03-18 Mark Mitchell <mark@codesourcery.com>
7406 * semantics.c (finish_pseudo_destructor_expr): Allow differing
7407 cv-qualification between the type named by the
7408 pseudo-destructor-name and the object-type.
7410 * search.c (accessible_base_p): Handle non-proper bases.
7412 * name-lookup.c (do_nonmember_using_decl): If a using declaration
7413 refers to a single overloaded function, set the type of the
7415 * tree.c (lvalue_type): Simplify.
7416 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
7418 (build_unary_op): Handle OVERLOADs with known types.
7420 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
7423 * parser.c (cp_parser_postfix_expression): Handle the use of
7424 "typename" in non-dependent contexts. Convert appropriately when
7425 when using a qualified name after "->" or ".".
7427 * call.c (conditional_conversion): Honor the requirement that some
7428 conversions refer to the original object.
7430 2004-03-18 Mark Mitchell <mark@codesourcery.com>
7432 * call.c (build_conditional_expr): Do not call force_rvalue for
7433 operands of void_type when the conditional expression itself has
7435 * name-lookup.c (pushdecl): Don't consider a declaration of a
7436 function named "main" to be an overload of a type named "main".
7437 * parser.c (cp_parser_template_name): Perform name lookup when the
7438 template name is proceeded by "template" if the qualifying scope
7440 * typeck.c (composite_pointer_type_r): Correctly handle
7441 pointer-to-member types.
7442 (build_const_cast): Likewise.
7444 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7446 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
7447 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
7448 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
7449 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
7450 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
7451 (TYPEOF_TYPE_EXPR): New macro.
7452 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
7453 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
7454 * pt.c (tsubst): Likewise.
7455 * semantics.c (finish_typeof): Likewise.
7456 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
7457 and TEMPLATE_TYPE_PARM.
7458 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
7459 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
7461 2004-03-16 Mark Mitchell <mark@codesourcery.com>
7464 * cp-tree.h (build_new_op): Change prototype.
7465 (build_x_binary_op): Likewise.
7466 * call.c (build_new_op): Add overloaded_p parameter.
7467 * decl2.c (grok_array_decl): Adjust call to build_new_op.
7468 * parser.c (cp_parser_binary_expression): Note that uses of
7469 overloaded operators prevents an expression from being considered
7470 an integral constant.
7471 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
7473 * semantics.c (finish_call_expr): Likewise.
7474 * typeck.c (rationalize_conditional_expr): Likewise.
7475 (build_x_indirect_ref): Likewise.
7476 (build_x_binary_op): Likewise.
7477 (build_x_unary_op): Likewise.
7478 (build_x_compound_expr): Likewise.
7479 (build_modify_expr): Likewise.
7480 * typeck2.c (build_x_arrow): Likewise.
7482 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
7484 * cp-lang.c, ptree.c: Update copyright.
7486 2004-03-13 Mark Mitchell <mark@codesourcery.com>
7489 * parser.c (cp_parser_non_integral_constant_expression): Encode
7490 more of the idiom that surrounded calls to this function within
7492 (cp_parser_primary_expression): Adjust accordingly.
7493 (cp_parser_postfix_expression): Likewise.
7494 (cp_parser_unary_expression): Likewise.
7495 (cp_parser_cast_expression): Likewise.
7496 (cp_parser_assignment_expression): Likewise.
7497 (cp_parser_expression): Likewise.
7498 (cp_parser_new_expression): Note that new-expressions are not
7499 allowed in integral constant expressions.
7500 (cp_parser_delete_expression): Likewise.
7502 2004-03-12 Matt Austern <austern@apple.com>
7504 * decl2.c (maybe_make_one_only): Look at
7505 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
7506 to make an explicit instantiation weak.
7507 * method.c (use_thunk): Make sure we call comdat_linkage
7509 * pt.c (do_type_instantiation): On systems where weak symbols
7510 don't go in a static archive's TOC, explicit instantiation of a
7511 class must imply *explicit* instantiation of its memeber.
7513 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
7515 * call.c, cp-tree.h, pt.c: Fix comment typos.
7517 2004-03-10 Mark Mitchell <mark@codesourcery.com>
7520 * decl.c (xref_tag): Disregard non-type declarations when
7521 looking up a tagged type.
7523 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
7526 * call.c (convert_like_real): Build a const qualified temporary,
7527 when testing ctor access.
7529 2004-03-09 Mark Mitchell <mark@codesourcery.com>
7531 * call.c (initialize_reference): Fix typo.
7533 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7536 * pt.c (determine_specialization): For member templates, match also
7540 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
7542 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
7544 2004-03-09 Mark Mitchell <mark@codesourcery.com>
7547 * call.c (initialize_reference): Handle initializers that are
7548 class-member access expressions applies to rvalues.
7550 2004-03-09 Mark Mitchell <mark@codesourcery.com>
7553 * name-lookup.c (supplement_binding): Ignore functions that are
7554 marked DECL_ANTICIPATED.
7556 2004-03-08 Mark Mitchell <mark@codesourcery.com>
7559 * class.c (check_field_decls): Complain about non-static data
7560 members of reference type in unions. Propagate
7561 CLASSTYPE_REF_FIELDS_NEED_INIT and
7562 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
7564 * init.c (perform_member_init): Complain about mbmers with const
7565 type that are not explicitly initialized.
7567 2004-03-08 Mark Mitchell <mark@codesourcery.com>
7569 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
7570 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
7571 (lang_identifier): Remove implicit_decl and error_locus.
7572 (IDENTIFIER_IMPLICIT_DECL): Remove.
7573 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
7574 (IDENTIFIER_ERROR_LOCUS): Likewise.
7575 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
7576 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
7577 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
7578 (implicitly_declare): Remove.
7579 * decl.c (warn_extern_redeclared_static): Remove check of
7580 IDENTIFIER_IMPLICIT_DECL.
7581 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
7582 (implicitly_declare): Remove.
7583 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
7584 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
7585 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
7586 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
7587 in the innermost scope, rather than at namespace scope.
7588 * name-lookup.c (push_local_binding): Give it external linkage.
7589 (pushdecl): Remove dead code.
7590 * name-lookup.h (push_local_binding): Declare it.
7591 * ptree.c (cxx_print_identifier): Don't print
7592 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
7593 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
7594 not IDENTIFIER_ERROR_LOCUS.
7595 * typeck.c (build_function_call): Remove dead code.
7597 2004-03-08 Jason Merrill <jason@redhat.com>
7600 * decl.c (xref_tag): Remove attribute handling.
7601 * cp-tree.h: Adjust prototype.
7602 * decl.c, parser.c, rtti.c: Adjust callers.
7603 * parser.c (cp_parser_class_head): Pass back attributes in the
7605 (cp_parser_class_specifier): Adjust.
7607 2004-03-08 Matt Austern <austern@apple.com>
7610 * name-lookup.c (add_decl_to_level): Add extern variables, as well
7611 as static, to static_decls array.
7613 2004-03-05 Jason Merrill <jason@redhat.com>
7615 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
7617 2004-03-04 Geoffrey Keating <geoffk@apple.com>
7619 * decl.c (grokfndecl): Update old incorrect comment.
7620 (grokvardecl): Diagnose C++ variables of type with no linkage.
7622 2004-03-01 Mark Mitchell <mark@codesourcery.com>
7625 * pt.c (build_non_dependent_expr): Do not create a
7626 NON_DEPENDENT_EXPR for a THROW_EXPR.
7628 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
7631 * error.c (dump_expr): Handle THROW_EXPR.
7633 2004-03-01 Mark Mitchell <mark@codesourcery.com>
7636 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
7637 lookup if ordinary name-lookup finds a non-function.
7638 * pt.c (tsubst_copy_and_build): Likewise.
7641 * parser.c (cp_parser_late_parsing_default_args): Check that there
7642 are no extra tokens after the end of the default-argument
7645 2004-03-01 Mark Mitchell <mark@codesourcery.com>
7648 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
7649 having C++ linkage for name-mangling purposes.
7652 * parser.c (cp_parser_direct_declarator): Recognize constructor
7653 declarators that use a template-id to name the class being
7657 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
7658 (tsubst_expr): Do not call tsubst_copy, even when
7659 processing_template_decl.
7661 2004-03-01 Jeff Law <law@redhat.com>
7663 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
7666 2004-02-29 Mark Mitchell <mark@codesourcery.com>
7669 * name-lookup.h (push_scope): Change prototype.
7670 * name-lookup.c (push_scope): Do not reenter the current class
7672 * decl.c (grokfndecl): Check return code from push_scope before
7674 * decl2.c (check_classfn): Likewise.
7675 * parser.c (cp_parser_conversion_function_id): Likewise.
7676 (cp_parser_init_declarator): Likewise.
7677 (cp_parser_direct_declarator): Likewise.
7678 (cp_parser_class_specifier): Likewise.
7679 (cp_parser_class_head): Likewise.
7680 (cp_parser_lookup_name): Likewise.
7681 (cp_parser_constructor_declarator_p): Likewise.
7682 * pt.c (instantiate_class_template): Likewise.
7683 (resolve_typename_type): Likewise.
7685 2004-02-29 Mark Mitchell <mark@codesourcery.com>
7688 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
7692 * class.c (update_vtable_entry_for_fn): Do not go through
7693 covariance machinery if the type returned by an overrider is the
7694 same as the original.
7696 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
7698 * call.c: Fix a comment typo.
7700 2004-02-27 Ziemowit Laski <zlaski@apple.com>
7702 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
7704 2004-02-26 Mark Mitchell <mark@codesourcery.com>
7707 * parser.c (cp_parser_parameter_declaration_list): Commit
7708 to fewer tentative parses.
7710 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7713 * pt.c (dependent_type_p_r): A template template parameter is a
7716 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7719 * mangle.c (write_template_arg_literal): Don't rely on identity for
7722 2004-02-24 Jason Merrill <jason@redhat.com>
7724 * tree.c (build_exception_variant): Use check_qualified_type.
7726 2004-02-23 Zack Weinberg <zack@codesourcery.com>
7727 Kazu Hirata <kazu@cs.umass.edu>
7729 * decl.c (cxx_init_decl_processing): Don't check
7730 flag_writable_strings.
7732 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
7735 * typeck.c (maybe_warn_about_returning_address_of_location):
7736 Change check for VAR_DECL to use DECL_P instead.
7738 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7741 * cvt.c (build_expr_type_conversion): Type must be complete before
7742 looking up for conversions.
7744 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7747 * name-lookup.c (arg_assoc_class): Don't look into template
7748 arguments if it is not a primary template.
7750 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7753 * method.c (use_thunk): Always clone function argument tree.
7755 2004-02-20 Mark Mitchell <mark@codesourcery.com>
7758 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
7761 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
7762 for all type variants.
7764 2004-02-19 Mark Mitchell <mark@codesourcery.com>
7767 * decl.c (duplicate_decls): Return error_mark_node for invalid
7769 * name-lookup.c (push_namespace): Ignore the return value from
7771 * pt.c (push_template_decl_real): Robustify.
7774 * name-lookup.c (push_class_level_binding): Do not complain about
7775 adding a binding for a member whose name is the same as the
7776 enclosing class if the member is located in a base class of the
7779 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7782 * parser.c (cp_parser_new_expression): Parse an ill-formed
7783 direct-new-declarator after a parenthesized type-id to emit good
7786 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
7788 * cp-tree.def, cvt.c: Update copyright.
7790 2004-02-17 Mark Mitchell <mark@codesourcery.com>
7793 * cp-tree.h (abi_version_at_least): Remove.
7794 * mangle.c: Include flags.h.
7796 2004-02-15 Mark Mitchell <mark@codesourcery.com>
7799 * call.c (build_conditional_expr): Handle conversions between
7800 class types which result in differently cv-qualified type
7804 * class.c (delete_duplicate_fields_1): Remove.
7805 (delete_duplicate_fields): Likewise.
7806 (finish_struct_anon): Remove check for members with the same name
7807 as their enclosing class.
7808 (check_field_decls): Do not call duplicate_fields.
7809 * decl.c (grokdeclarator): Remove check for static data members
7810 with the same name as their enclosing class.
7811 * name-lookup.c (push_class_level_binding): Check for members with
7812 the same name as their enclosing class.
7814 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
7817 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
7819 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7822 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
7823 has full set of arguments.
7825 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7828 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
7830 2004-02-13 Mark Mitchell <mark@codesourcery.com>
7833 * cp-tree.h (delete_sanity): Change prototype.
7834 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
7835 Remove dead code. Adjust code to warn about deleting an array.
7836 * typekc.c (decay_conversion): Use build_address and build_nop.
7839 * search.c (accessible_p): Do not check access in thunks.
7842 * call.c (build_conditional_expr): Call force_rvalue on the
7843 non-void operand in the case that one result is a throw-expression
7844 and the other is not.
7846 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
7849 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
7850 the type name and look ahead for ::~, and bail out early with a
7851 better error message if the parse is going to fail.
7853 2004-02-12 Mark Mitchell <mark@codesourcery.com>
7855 * call.c (conversion_kind): New type.
7856 (conversion_rank): Likewise.
7857 (conversion): Likewise.
7858 (CONVERSION_RANK): New macro.
7859 (conversion_obstack): New variable.
7860 (obstack_initialized): Likewise.
7861 (z_candidate): Change type of convs and second_conv.
7862 (candidate_warning): New type.
7863 (IDENTITY_RANK): Remove.
7864 (EXACT_RANK): Likewise.
7865 (PROMO_RANK): Likewise.
7866 (STD_RANK): Likewise.
7867 (PBOOL_RANK): Likewise.
7868 (USER_RANK): Likewise.
7869 (ELLIPSIS_RANK): Likewise.
7870 (BAD_RANK): Likewise.
7871 (ICS_RANK): Likewise.
7872 (ICS_STD_RANK): Likewise.
7873 (ICS_USER_FLAG): Likewise.
7874 (ICS_ELLIPSIS_FLAG): Likewise.
7875 (ICS_THIS_FLAG): Likewise.
7876 (ICS_BAD_FLAG): Likewise.
7877 (NEED_TEMPORARY_P): Likewise.
7878 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
7879 (USER_CONV_CAND): Likewise.
7880 (USER_CONV_FN): Likewise.
7881 (conversion_obstack_alloc): New function.
7882 (alloc_conversion): Likewise.
7883 (validate_conversion_obstack): Likewise.
7884 (alloc_conversions): Likewise.
7885 (build_conv): Adjust to deal with new conversion data structures.
7886 (build_identity_conv): New function.
7887 (build_ambiguous_conv): Likewise.
7888 (standard_conversion): Adjust to deal with new conversion data
7890 (convert_class_to_reference): Likewise.
7891 (direct_reference_binding): Likewise.
7892 (reference_binding): Likewise.
7893 (implicit_conversion): Likewise.
7894 (add_candidate): Likewise.
7895 (add_function_candidate): Likewise.
7896 (add_conv_candidate): Likewise.
7897 (build_builtin_candidate): Likewise.
7898 (print_z_candidate): Likewise.
7899 (merge_conversion_sequences): Likewise.
7900 (build_user_type_conversion_1): Likewise.
7901 (build_user_type_conversion): Likewise.
7902 (build_new_function_call): Likewise.
7903 (build_object_call): Likewise.
7904 (conditional_conversion): Likewise.
7905 (build_conditional_expr): Likewise.
7906 (build_new_op): Likewise.
7907 (build_op_delete_call): Likewise.
7908 (convert_like_real): Likewise.
7909 (build_over_call): Likewise.
7910 (build_new_method_call): Likewise.
7911 (is_subseq): Likewise.
7912 (maybe_handle_implicit_object): Likewise.
7913 (maybe_handle_ref_bind): Likewise.
7914 (compare_ics): Likewise.
7915 (source_type): Likewise.
7916 (add_warning): Likewise.
7918 (can_convert_arg): Likewise.
7919 (can_convert_arg_bad): Likewise.
7920 (perform_implicit_conversion): Likewise.
7921 (perform_direct_initialization_if_possible): Likewise.
7922 (initialize_reference): Likewise.
7923 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
7924 * cp-tree.def (WRAPPER): Likewise.
7925 (IDENTITY_CONV): Remove.
7926 (LVALUE_CONV): Likewise.
7927 (QUAL_CONV): Likewise.
7928 (STD_CONV): Likewise.
7929 (PTR_CONV): Likewise.
7930 (PMEM_CONV): Likewise.
7931 (BASE_CONV): Likewise.
7932 (REF_BIND): Likewise.
7933 (USER_CONV): Likewise.
7934 (AMBIG_CONV): Likewise.
7935 (RVALUE_CONV): Likewise.
7936 * cp-tree.h (tree_wrapper): Remove.
7937 (WRAPPER_ZC): Remove.
7938 (lang_tree_node): Remove wrapper.
7939 (LOOKUP_SPECULATIVELY): Remove.
7940 (build_op_delete_call): Adjust prototype.
7941 (validate_conversion_obstack): Declare.
7942 (build_zc_wrapper): Remove.
7943 * cvt.c (convert_to_reference): Remove dead code.
7944 (ocp_convert): Likewise.
7945 * decl.c (redeclaration_error_message): Correct handling of
7947 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
7948 (cp_tree_node_structure): Remove WRAPPER case.
7949 * decl2.c (finish_file): Call validate_conversion_obstack.
7950 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
7951 (build_op_delete_call): Likewise.
7952 (build_x_delete): Likewise.
7953 (build_delete): Adjust call to build_op_delete_call.
7954 * pt.c (tsubst_friend_declaration): Adjust code to determine
7955 whether or not a friend template is a definition.
7956 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
7957 * tree.c (build_zc_wrapper): Remove.
7959 2004-02-12 Zack Weinberg <zack@codesourcery.com>
7961 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
7962 * cp-tree.h: Don't declare cxx_builtin_type_decls.
7963 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
7964 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
7966 2004-02-10 Mark Mitchell <mark@codesourcery.com>
7968 * typeck.c (lookup_destructor): Fix typo in error message.
7970 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
7972 * call.c, parser.c, tree.c: Fix comment typos.
7974 2004-02-07 Zack Weinberg <zack@codesourcery.com>
7977 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
7978 * decl.c (duplicate_decls, start_function): Likewise.
7980 2004-02-07 Zack Weinberg <zack@codesourcery.com>
7982 * name-lookup.c (pushdecl): Issue shadow warnings directly.
7983 * parser.c (free_parser_stacks): Delete.
7985 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
7987 * rtti.c: Update copyright.
7989 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7992 * decl.c (require_complete_types_for_parms): Do not insert
7993 error_mark_node in the parameter list.
7995 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7998 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
7999 error when terminator can not be found.
8001 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
8003 Make-lang.in (po-generated): Delete.
8005 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
8007 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
8008 targetm.calls.promote_prototypes.
8010 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
8014 2004-01-15 Geoffrey Keating <geoffk@apple.com>
8016 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
8017 (handle_pragma_implementation): Likewise.
8019 2004-02-05 Mark Mitchell <mark@codesourcery.com>
8022 * typeck.c (lookup_destructor): Tweak error message.
8024 2004-02-05 Jan Hubicka <jh@suse.cz>
8026 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
8029 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8032 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
8033 code, only emits the diagnostic now. Added lookup of the identifier
8034 and support for qualified ids.
8035 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
8036 Parse an (invalid) type name as id-expression within a declarator.
8037 (cp_parser_simple_declaration): Use it.
8038 (cp_parser_member_declaration): Likewise.
8039 (cp_parser_make_typename_type): New function. Handle errors through
8040 cp_parser_diagnose_invalid_typename.
8041 (cp_parser_elaborated_type_specifier): Use it.
8043 2004-02-04 Mark Mitchell <mark@codesourcery.com>
8046 * call.c (convert_like_real): Use "converting" rather than
8047 "argument" as the descriptive keyword to
8048 dubious_conversion_warnings.
8049 * typeck.c (convert_for_assignment): Do not call
8050 dubious_conversion_warnings.
8052 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8055 * init.c (build_delete): Emit a more informative error message in
8056 case of an incomplete type, and on the correct source line.
8058 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
8060 * error.c, search.c: Update copyright.
8062 2004-02-04 Mark Mitchell <mark@codesourcery.com>
8065 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
8066 linkage for the typeinfo name string.
8068 2004-02-04 Mark Mitchell <mark@codesourcery.com>
8071 * cp-tree.h (fold_non_dependent_expr): New function.
8072 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
8073 (cp_parser_template_argument): Use fold_non_dependent_expr.
8074 (cp_parser_direct_declarator): Likewise.
8075 * pt.c (fold_non_dependent_expr): New function.
8076 (convert_nontype_argument): Use it.
8077 (tsubst_qualified_id): Simplify.
8078 (tsubst_copy_and_build): Likewise.
8080 2004-02-04 Mark Mitchell <mark@codesourcery.com>
8082 * decl.c (cxx_push_function_context): Do not set
8083 current_function_is_thunk.
8084 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
8087 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8090 * pt.c (more_specialized_class): Increase processing_template_decl
8091 while partial ordering.
8093 2004-02-03 Mark Mitchell <mark@codesourcery.com>
8096 * decl.c (start_function): Do not call pushdecl for any
8097 instantiation or specialization of a primary template.
8099 2004-02-03 Mark Mitchell <mark@codesourcery.com>
8102 * parser.c (cp_parser_class_name): Robustify.
8105 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
8108 * semantics.c (finish_id_expression): Do not return an
8109 IDENTIFIER_NODE when lookup finds a PARM_DECL.
8111 2004-02-03 Mark Mitchell <mark@codesourcery.com>
8114 * pt.c (build_non_dependent_expr): Do not build
8115 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
8118 * semantics.c (finish_id_expression): Do not return an
8119 IDENTIFIER_NODE when lookup finds a VAR_DECL.
8122 * parser.c (cp_parser_simple_declaration): When skipping to the
8123 end of the statement swallow the terminating semicolon.
8125 2004-02-02 Mark Mitchell <mark@codesourcery.com>
8128 * init.c (build_offset_ref): Improve error recovery for invalid
8129 uses of non-static member functions.
8132 * cp-tree.h (cp_build_type_attribute_variant): New function.
8133 * class.c (build_clone): Use cp_build_type_attribute_variant.
8134 * decl.c (duplicate_decls): Likewise.
8135 * pt.c (copy_default_args_to_explicit_spec): Likewise.
8136 (tsubst_function_type): Likewise.
8137 * tree.c (build_exception_variant): Check attributes before
8138 concluding that two types are the same.
8139 (cp_build_type-attribute_variant): New method.
8140 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
8143 * call.c (convert_class_to_reference): Keep better track of
8144 pedantically invalid user-defined conversions.
8146 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8149 * pt.c (tsubst_qualified_id): Improved error message when a type
8150 is expected but not found.
8152 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
8154 * class.c: Fix comment typos.
8156 * error.c: Likewise.
8157 * parser.c: Likewise.
8159 * search.c: Likewise.
8160 * typeck.c: Likewise.
8162 2004-01-30 Richard Henderson <rth@redhat.com>
8165 * method.c (use_thunk): Don't force_target_expr for void thunks.
8166 * tree.c (build_target_expr_with_type): Assert non-void type.
8167 (force_target_expr): Likewise.
8169 2004-01-30 Michael Matz <matz@suse.de>
8171 * parser.c (cp_parser_labeled_statement): Accept case ranges.
8173 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8177 * decl.c (grokdeclarator): Check immediatly type completeness for
8178 non-dependent types.
8180 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8183 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
8184 a sizeof expression.block
8186 2004-01-29 Mark Mitchell <mark@codesourcery.com>
8189 * mangle.c (write_encoding): Correct encoding of member template
8192 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8194 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
8195 template name as it was `<::' (digraph typo).
8196 (cp_parser_nth_token_starts_template_argument_list_p): New function.
8197 (cp_parser_id_expression): Use it.
8198 (cp_parser_nested_name_specifier_opt): Likewise.
8199 (cp_parser_template_name): Likewise.
8200 (cp_parser_class_name): Likewise.
8201 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
8203 2004-01-28 Mark Mitchell <mark@codesourcery.com>
8206 * typeck.c (merge_types): Do not merge attributes into
8210 * parser.c (cp_parser_direct_declarator): Do not prevent
8211 backtracking inside a parenthesized declarator.
8212 (cp_parser_parameter_declaration): Fix typo in comment.
8214 2004-01-28 Jan Hubicka <jh@suse.cz>
8216 * semantics.c (expand_body) Do emit_associated_thunks before
8219 2004-01-27 Devang Patel <dpatel@apple.com>
8221 * name-lookup.c: Include "debug.h"
8222 (do_namespace_alias): Invoke debug_hooks to emit debug info
8223 for namespace alias.
8224 (do_local_using_decl): Invoke debug_hooks to emit debug info
8226 (do_class_using_decl): Same.
8227 (do_toplevel_using_decl): Same.
8228 (do_using_directive): Same.
8229 (cp_emit_debug_info_for_using): New function.
8230 * Make-lang.in (cp/parser.o): Depend on debug.h
8231 (cp/name-lookup.o): Same.
8233 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8235 * cp-tree.h (language_function, lang_type_header): Use
8237 * name-lookup.h (cp_binding_level): Likewise.
8239 2004-01-26 Mark Mitchell <mark@codesourcery.com>
8242 * semantics.c (finish_for_expr): Check for unresolved overloaded
8245 * class.c (add_method): Just check processing_template_decl to
8246 determine whether or not we are within a template.
8247 * decl2.c (maybe_retrofit_in_chrg): Likewise.
8248 * init.c (decl_constant_value): Check the type of the declaration,
8250 * name-lookup.c (maybe_push_to_top_level): Rename to ...
8251 (push_to_top_level): ... this.
8252 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
8253 * pt.c (push_template_decl_real): Reorder condition for speed.
8254 (convert_template_argument): Use dependency-checking functions in
8255 place of uses_template_parms.
8256 (lookup_template_class): Avoid calling uses_template_parms more
8258 (uses_template_parms): Reimplement, using dependency-checking
8260 (instantiate_class_template): Use push_to_top_level, not
8261 maybe_push_to_top_level.
8262 (type_unification_real): Simplify.
8263 (type_dependent_expression_p): Handle OFFSET_REFs and
8265 (any_dependent_template_arguments_p): Handle multiple levels of
8267 * semantics.c (expand_or_defer_fn): Do not check
8268 uses_template_parms for template instantiations.
8269 * typeck.c (comptypes): Avoid calling cp_type_quals.
8271 2004-01-25 Mark Mitchell <mark@codesourcery.com>
8274 * call.c (build_over_call): Do not convert arguments when
8275 processing a template.
8276 * pt.c (build_non_dependent_expr): Do not build a
8277 NON_DEPENDENT_EXPR for arithmetic constants.
8279 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8282 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
8283 returns a TYPE_DECL. no further lookup is required.
8284 * semantics.c (check_template_template_default_arg): A TYPE_DECL
8285 is invalid. Rework to give better diagnostics.
8287 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8290 * pt.c (instantiate_class_template): Add an error_mark_node
8292 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
8294 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
8297 * decl.c (finish_function): Move the call to
8298 finish_fname_decls below the call to
8299 finish_eh_spec_block.
8301 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
8303 * optimize.c, typeck2.c: Update copyright.
8305 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
8307 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
8308 init.c, mangle.c, typeck.c: Update copyright.
8310 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
8312 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
8314 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
8316 * Make-lang.in: Replace $(docdir) with doc.
8317 (c++.info, c++.srcinfo): Dummy entry.
8318 (c++.man, c++.srcman): New rules.
8319 (c++.install-man): Revamp rule.
8321 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
8323 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
8324 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
8325 immediate $(shell) instead of deferred backquote.
8327 2004-01-19 Mark Mitchell <mark@codesourcery.com>
8330 * parser.c (cp_parser_postfix_expression): When encountering
8331 incomplete type on left-hand side of "->" or ".", treat the entire
8332 expression as erroneous.
8335 * call.c (build_field_call): Remove.
8336 (n_build_method_call): Likewise.
8337 (build_method_call): Likewise.
8338 (build_new_method_call): Do not call build_field_call.
8339 * class.c (n_build_method_call): Remove.
8340 (print_class_statistics): Do not print it.
8341 * cp-tree.h (build_method_call): Remove declaration.
8342 (finish_object_call_expr): Likewise.
8343 (build_new_1): Do not use build_method_call.
8344 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
8345 when the function appearing on the right-hand-side of "." or "->"
8346 is not actually a function.
8347 * pt.c (tsubst_copy_and_build): Likewise.
8348 * semantics.c (finish_object_call_expr): Remove.
8350 2004-01-18 Mark Mitchell <mark@codesourcery.com>
8353 * pt.c (tsubst): Use finish_typeof.
8355 2004-01-18 Jason Merrill <jason@redhat.com>
8358 * except.c (build_throw): In a template, set
8359 current_function_returns_abnormally.
8361 2004-01-17 Fred Fish <fnf@intrinsity.com>
8364 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
8365 except don't call array_type_nelts() with a VECTOR_TYPE.
8367 2004-01-16 Jan Hubicka <jh@suse.cz>
8369 * mangle.c (write_mangled_name): Remove inline modifier.
8371 2004-01-16 Mark Mitchell <mark@codesourcery.com>
8374 * decl.c (compute_array_index_type): Fix grammar in comment.
8375 * init.c (build_zero_init): Handle zero-sized arrays correctly.
8378 * call.c (name_as_c_string): Print conversion operator names
8382 * call.c (initialize_reference): Pass -1 for inner parameter to
8385 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8388 * parser.c (cp_parser_base_specifier): Check for an invalid
8389 keyword `typename' and emit an user-friendly error message.
8391 2004-01-15 Geoffrey Keating <geoffk@apple.com>
8394 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
8395 (handle_pragma_implementation): Likewise.
8397 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8400 * typeck.c (build_class_member_access_expr): Allow to access members
8401 of the currently open class.
8402 (finish_class_member_access_expr): Likewise.
8404 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
8407 * name-lookup.c (validate_nonmember_using_decl): Take scope and
8408 name by value, instead of computing them.
8409 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
8410 arguments. Pass them to validate_nonmember_using_decl.
8411 * name-lookup.h (do_local_using_decl): Adjust.
8412 (do_toplevel_using_decl): Likewise.
8413 * parser.c (cp_parser_using_declaration): Likewise.
8414 * pt.c (tsubst_expr): Likewise.
8416 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
8420 * name-lookup.c (qualified_lookup_using_namespace): Search
8421 strongly-associated namespaces first, and only then try other
8424 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
8426 * Make-lang.in (c++.srcextra): Dummy entry.
8428 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8431 * parser.c (cp_parser_template_name): Don't try to parse a
8432 conversion-function-id, as it cannot be a template-name.
8433 (cp_parser_simple_type_specifier): Check for invalid template-ids
8434 even after a built-in type.
8436 2004-01-14 Jan Hubicka <jh@suse.cz>
8439 * pt.c (instantiate_decl): Do not increase function_depth.
8441 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
8445 * parser.c (cp_parser_elaborated_type_specifier): Warn about
8446 attributes and discard.
8447 * decl.c (xref_tag): Don't overwite existing attributes with
8450 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8453 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
8454 is no destructor while looking up a BIT_NOT_EXPR.
8456 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
8458 * cxxfilt.c: Remove unused file.
8460 2004-01-14 Jan Hubicka <jh@suse.cz>
8462 Partial fix to PR c++/12850
8463 * decl2.c (mark_used): Do not proactively instantiate templates
8464 when compiling in unit-at-a-time or not optimizing.
8465 * optimize.c (maybe_clone_body): Do not increase function depth.
8467 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8470 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
8472 2004-01-12 Steven Bosscher <stevenb@suse.de>
8475 * parser.c (cp_parser_member_declaration): Any non-type is also
8476 not a class or a function.
8478 2004-01-12 Jason Merrill <jason@redhat.com>
8481 * class.c (build_base_path): Do not mark vtable references as
8483 (build_vtbl_ref_1): Likewise.
8485 2004-01-12 Richard Henderson <rth@redhat.com>
8488 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
8489 (store_init_value): Use it.
8490 * decl.c (check_initializer): Expect full initialization code
8491 from store_init_value.
8492 * init.c (expand_aggr_init_1): Likewise.
8493 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
8495 2004-01-12 Mark Mitchell <mark@codesourcery.com>
8497 * class.c (layout_class_type): For non-POD class types, also copy
8498 the DECL_SIZE and DECL_MODE of fields to the base class type.
8500 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8503 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
8504 calling regenerate_decl_from_template.
8506 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
8509 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
8510 decl-specifier occurring along with a class definition.
8512 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
8514 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
8515 clauses to comments describing declares_class_or_enum.
8516 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
8519 2004-01-12 Jan Hubicka <jh@suse.cz>
8521 * pt.c (for_each_template_parm): Do not check for duplicates.
8522 (for_each_template_parm): Use walk_tree duplicate checking code.
8524 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
8527 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
8528 is error_mark_node, don't add any more decl_specs.
8529 (cp_parser_init_declarator): After committing to a declaration, if
8530 the decl_specifiers start with error_mark_node, issue an error and
8531 change the type to "int".
8533 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
8536 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
8538 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8542 * pt.c (tsubst): Substitution must fail if we are attempting to
8543 create an array with element type that is an abstract class type.
8544 * decl.c (cp_finish_decl): Strip pointers and array types recursively
8545 before calling abstract_virtuals_error.
8547 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
8549 * name-lookup.c (qualified_lookup_using_namespace): Consider
8550 strong using directives even if we've already found a binding.
8552 2004-01-09 Mark Mitchell <mark@codesourcery.com>
8554 * cp-tree.h (cxx_expand_expr): Change prototype.
8555 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
8557 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8560 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
8561 looking into them recursively. They can be there because of the
8562 new __offsetof__ extension.
8564 2004-01-07 Zack Weinberg <zack@codesourcery.com>
8566 * parser.c (cp_parser_save_member_function_body): Mark the
8569 2004-01-05 Mark Mitchell <mark@codesourcery.com>
8572 * class.c (build_clone): Copy type attributes from the original
8573 function to the clone.
8576 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
8577 references as constant.
8580 * parser.c (cp_parser_explicit_instantiation): Improve error
8582 (cp_parser_require): Improve indication of the error location.
8585 * parser.c (cp_parser_class_head): Reorder logic to check for
8586 invalid qualification.
8588 2004-01-04 Mark Mitchell <mark@codesourcery.com>
8591 * name-lookup.c (lookup_using_namespace): Remove spacesp
8593 (unqualified_namespace_lookup): Likewise.
8594 (lookup_qualified_name): Adjust accordingly.
8595 (lookup_name_real): Likewise.
8596 (lookup_arg_dependent): Do not eliminate the namespace of the
8597 functions found by unqualified name lookup unless that is the
8600 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
8602 * semantics.c (push_deferring_access_checks): Fix format.
8603 (resume_deferring_access_checks): Likewise.
8604 (stop_deferring_access_checks): Likewise.
8605 (pop_deferring_access_checks): Likewise.
8606 (get_deferred_access_checks): Likewise.
8607 (pop_to_parent_deferring_access_checks): Likewise.
8608 (perform_deferred_access_checks): Likewise.
8609 (perform_or_defer_access_check): Likewise.
8611 2004-01-04 Richard Henderson <rth@redhat.com>
8613 * call.c (build_over_call): Don't create a save_expr of an
8614 aggregate, but rather its address.
8616 2004-01-04 Mark Mitchell <mark@codesourcery.com>
8619 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
8620 an offsetof expression.
8622 * parser.c (cp_parser_parameter_declaration): Fix comment.
8625 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
8626 (reference_binding): Set it when appropriate.
8627 (build_temp): New function, split out from ...
8628 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
8629 (initialize_reference): Likewise.
8632 * parser.c (cp_parser): Add in_type_id_in_expr_p.
8633 (cp_parser_new): Initialize it.
8634 (cp_parser_postfix_expression): Set it.
8635 (cp_parser_sizeof_operand): Likewise.
8636 (cp_parser_parameteR_declaration): Do not commit early to tenative
8637 parsers when in_type_id_in_expr_p is set.
8639 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8642 * parser.c (cp_parser_template_argument): Don't call
8643 make_unbound_class_template directly.
8644 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
8645 UNBOUND_CLASS_TEMPLATE tree node.
8647 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
8650 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
8652 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8655 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
8656 (DECL_FUNCTION_TEMPLATE_P): Use it.
8657 (DECL_CLASS_TEMPLATE_P): Likewise.
8658 * parser.c (cp_parser_lookup_name): Add is_template parameter.
8659 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
8660 (cp_parser_template_name): Likewise.
8661 (cp_parser_elaborated_type_specifier): Likewise.
8662 (cp_parser_namespace_name): Likewise.
8663 (cp_parser_class_name): Likewise.
8664 (cp_parser_lookup_name_simple): Likewise.
8666 See ChangeLog.3 for earlier changes.