1 2005-06-15 Nathan Sidwell <nathan@codesourcery.com>
3 * Make-lang.in: Reformat some long lines.
4 (gt-cp-rtti.h): New target.
5 (cp/rtti.o): Add dependency.
6 * config-lang.in (gtfiles): Add cp/rtti.c.
7 * cp-tree.h (CPTI_TI_DESC_TYPE, CPTI_BLTN_DESC_TYPE,
8 CPTI_PTR_DESC_TYPE, CPTI_ARY_DESC_TYPE, CPTI_FUNC_DESC_TYPE,
9 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE,
10 CPTI_SI_CLASS_DESC_TYPE, CPTI_VMI_CLASS_DESC_TYPE,
11 CPTI_PTM_DESC_TYPE, CPTI_BASE_DESC_TYPE): Remove.
12 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
13 ary_desc_type_node, func_desc_type_node, enum_desc_type_node,
14 class_desc_type_node, si_class_desc_type_node,
15 vmi_class_desc_type_node, ptm_desc_type_node,
16 base_desc_type_node): Remove.
17 * decl.c: Adjust documentation of global trees.
18 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL,
19 TINFO_REAL_NAME): Remove.
20 (struct tinfo_s): New.
21 (enum tinfo_kind): New.
23 (get_tinfo_decl): Adjust use of tinfo descriptor.
24 (tinfo_base_init, generic_initializer, ptr_initializer,
25 ptm_initializer, class_initializer): Likewise.
26 (get_pseudo_ti_init): Take descriptor index. Adjust.
27 (create_pseudo_type_info): Likewise.
28 (get_pseudo_ti_desc): Return descriptor index. Adjust.
29 (create_tinfo_types): Adjust use of create_pseudo_type_info.
30 (emit_tinfo_decl): Adjust use of tinfo descriptor.
32 2005-06-14 Roger Sayle <roger@eyesopen.com>
34 * decl.c (grokdeclarator): Only check TREE_OVERFLOW on INTEGER_CST.
36 2005-06-13 Geoffrey Keating <geoffk@apple.com>
38 * Make-lang.in (c++.install-man): Doesn't really depend on installdirs.
39 (rule for installing g++.1 manpage): Does depend on installdirs.
41 2005-06-13 Nathan Sidwell <nathan@codesourcery.com>
44 * decl.c (cp_finish_decl): Clear runtime runtime initialization if
45 in-class decl's initializer is bad.
48 * parser.c (struct cp_parser): Document that scope could be
50 (cp_parser_diagnose_invalid_type_name): Cope with error_mark for
52 (cp_parser_nested_name_specifier): Return NULL_TREE on error.
53 (cp_parser_postfix_expression): Deal with null or error_mark
55 (cp_parser_elaborated_type_specifier): Adjust
56 cp_parser_nested_name_specifier call.
58 * parser (cp_parser_skip_to_end_of_block_or_statement): Cleanup.
60 2005-06-12 Roger Sayle <roger@eyesopen.com>
63 * error.c (dump_expr): UNARY_PLUS_EXPR need not handle void types.
64 Treat CONVERT_EXPR identically to NOP_EXPR.
66 2005-06-10 Aldy Hernandez <aldyh@redhat.com>
69 * cvt.c (build_expr_type_conversion): Same.
70 * typeck.c (build_binary_op): Handle vectors.
72 (type_after_usual_arithmetic_conversions): Same.
73 * testsuite/g++.dg/conversion/simd2.C: New.
75 2005-06-08 Nathan Sidwell <nathan@codesourcery.com>
78 * cp-tree.def (USING_DECL): Update documentation.
79 * cp-tree.h (DECL_DEPENDENT_P): New.
80 (USING_DECL_DECLS, USING_DECL_SCOPE): New.
81 * class.c (handle_using_decl): Move most of the processing to ...
82 * name-lookup.c (do_class_using_decl): ... here. Make stricter.
83 (push_using_decl): Use USING_DECL_SCOPE.
84 (cp_emit_debug_info_for_using): Make extern.
85 * cxx-pretty-print.c (pp_cxx_statement) <USING_DECL case>: Adjust.
86 * name-lookup.h (cp_emit_debug_info_for_using): Declare.
87 * pt.c (tsubst_decl) <USING_DECL case>: Use do_class_using_decl
89 (tsubst_expr): Use USING_DECL_SCOPE.
90 * search.c (lookup_field_1): Use DECL_DEPENDENT_P.
91 * semantics.c (finish_member_declaration): Likewise.
93 2005-06-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
96 * pt.c (tsubst): Reject pointer-to-member of type void.
99 * parser.c (cp_parser_label_declaration): Deal with invalid/missing
102 2005-06-07 Nathan Sidwell <nathan@codesourcery.com>
104 * cp-tree.def (DEFAULT_ARG): Adjust documentation.
105 * cp-tree.h (DEFARG_INSTANTIATIONS): New.
106 (struct tree_default_arg): Add instantiations member.
107 * parser.c (cp_parser_late_parsing_default_args): Adjust to use a
109 * pt.c (tsubst_arg_types): Likewise.
111 * parser.c (cp_parser_late_parsing_default_args): Fix overeager
112 assert in previous patch.
114 2005-06-06 Jakub Jelinek <jakub@redhat.com>
116 * error.c (locate_error): Use gmsgid instead of msgid for argument
118 (cp_error_at, cp_warning_at, cp_pedwarn_at): Likewise.
120 2005-06-06 Nathan Sidwell <nathan@codesourcery.com>
123 * cp-tree.def (DEFAULT_ARG): Document TREE_CHAIN use.
124 * parser.c (cp_parser_late_parsing_default_args): Propagate parsed
125 argument to any early instantiations.
126 * pt.c (tsubst_arg_types): Chain early instantiation of default arg.
129 * cp-tree.h (add_method): Add using_decl parameter.
130 * class.c (add_method): Add using_decl parameter. Adjust error
132 (handle_using_decl): Pass the using decl to add_method.
133 (clone_function_decl): Adjust add_member calls.
134 * decl2.c (check_classfn): Likewise.
135 * method.c (lazily_declare_fn): Likewise.
136 * semantics.c (finish_member_declaration): Likewise.
138 * method.c (synthesize_method): Use inform, not warning.
140 2005-06-06 Hans-Peter Nilsson <hp@axis.se>
142 * config-lang.in (target_libs): Remove target-gperf.
144 2005-06-05 Mark Mitchell <mark@codesourcery.com>
147 * cp-tree.h (DECL_IS_BUILTIN_CONSTANT_P): New macro.
148 * parser.c (cp_parser_postfix_expression): Allow non-constant
149 expressions as arguments to __builtin_constant_p.
150 * tree.c (builtin_valid_in_constant_expr_p): Use
151 DECL_IS_BUILTIN_CONSTANT_P.
153 2005-06-03 Mark Mitchell <mark@codesourcery.com>
156 * typeck.c (casts_away_constness_r): Do not drop cv-qualifiers on
157 the pointed-to type for a pointer-to-member.
160 * cp-tree.h (grok_op_properties): Remove friendp parameter.
161 * decl.c (grokfndecl): Adjust call.
162 (grok_op_properties): Determine the class of which the function is
163 a member by looking at its DECL_CONTEXT, not current_class_type.
164 * pt.c (tsubst_decl): Adjust call to grok_op_properties.
166 2005-06-02 Nathan Sidwell <nathan@codesourcery.com>
168 * method.c (synthesize_method): Add addtional arg to warning call.
171 * Make-lang.in (method.o): Add diagnostic.h
172 * decl.c (start_preparsed_function): Use decl's location for file
174 * decl2.c (cp_finish_file): Set input_location before synthesizing
176 (mark_used): When deferring a synthesized function, save current
177 location. Do not set function's location when actually
179 * method.c: #include diagnostic.h.
180 (synthesize_method): Set the functions source location. Show
181 needed location if errors are emitted.
183 * decl.c (start_decl): Simplify specialization handling. Remove
184 unneeded CLASSTYPE_TEMPLATE_INSTANTIATION check.
185 * mangle.c (discriminator_for_local_entity): Use VEC_index.
188 * decl.c (duplicate_decls): Copy all of DECL_USE_TEMPLATE.
191 * name-lookup.c (pushtag): Push local class even in a template.
193 2005-05-31 Nathan Sidwell <nathan@codesourcery.com>
196 * init.c (integral_constant_value): Check the type of the
197 initializer, not the decl.
199 2005-05-30 Mark Mitchell <mark@codesourcery.com>
202 * name-lookup.c (do_nonmember_using_decl): Ignore builtin
203 functions, even when the used name is not a function.
205 2005-05-30 Kazu Hirata <kazu@cs.umass.edu>
207 * operators.def, optimize.c: Update copyright.
209 2005-05-28 Mark Mitchell <mark@codesourcery.com>
212 * call.c (standard_conversion): Permit conversions to complex
213 types if conversion to the corresponding scalar type would be
217 * method.c (implicitly_declare_fn): Clear processing_template_decl
218 when generating implicit declaration.
220 2005-05-27 Mark Mitchell <mark@codesourcery.com>
223 * typeck.c (get_member_function_from_ptrfunc): Do not attempt
224 conversions to base classes of incomplete types.
226 2005-05-27 Ian Lance Taylor <ian@airs.com>
228 * semantics.c (add_stmt): Add C++ frontend specific version.
229 * cp-tree.h (STMT_IS_FULL_EXPR_P): Define.
230 (stmts_are_full_exprs_p): Declare.
232 2005-05-27 Roger Sayle <roger@eyesopen.com>
233 Giovanni Bajo <giovannibajo@gcc.gnu.org>
235 * cp-tree.def (UNARY_PLUS_EXPR): New C++ unary tree code.
236 * parser.c (cp_parser_unary_expression): Use UNARY_PLUS_EXPR instead
238 (cp_parser_unary_expression): Likewise.
239 * typeck.c (build_unary_op): Likewise.
240 * call.c (add_builtin_candidate, build_new_op): Likewise.
241 * error.c (dump_expr): Likewise.
242 * pt.c (tsubst_copy, tsubst_copy_and_build): Likewise.
243 * decl.c (ambi_op_p, grok_op_properties): Likewise.
244 * dump.c (dump_op): Likewise.
245 * lex.c (init_operators): Likewise.
246 * operators.def ("+"): Likewise.
247 * cp-gimplify.c (cp_gimplify_expr): Handle UNARY_PLUS_EXPR like a
248 conversion, if the result and argument types differ.
249 * tree.c (fold_if_not_in_template): Fold UNARY_PLUS_EXPR much
250 like a NOP_EXPR when !processing_template_decl.
252 * cxx-pretty-print.c (pp_cxx_cast_expression): Prototype.
253 (pp_cxx_unary_expression): Handle new UNARY_PLUS_EXPR tree code.
255 2005-05-27 Nathan Sidwell <nathan@codesourcery.com>
258 * typeck.c (get_delta_difference): Cope with incomplete but equal
262 * parser.c (cp_parser_late_parsing_for_member): Disable access
263 checking for template functions.
265 2005-05-26 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
268 * pt.c (redeclare_class_template): Change error message according
269 to coding conventions.
271 2005-05-26 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
273 * call.c (build_op_delete_call): Fix quoting in error message.
275 2005-05-25 Richard Henderson <rth@redhat.com>
278 * cp-tree.h (make_alias_for): Declare.
279 * decl2.c (build_java_method_aliases): New.
280 (cp_finish_file): Call it.
281 * method.c (make_alias_for): Split out from ...
282 (make_alias_for_thunk): ... here.
284 2005-05-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
287 * semantics.c (finish_id_expression): Fix quoting in error message.
289 2005-05-25 DJ Delorie <dj@redhat.com>
291 * decl.c (duplicate_decls): Move warning control from if() to
293 * name-lookup.c (parse_using_directive): Likewise.
294 * parser.c (cp_parser_elaborated_type_specifier): Likewise.
295 (cp_parser_init_declarator): Likewise.
296 * tree.c (handle_com_interface_attribute): Likewise.
298 2005-05-24 Ziemowit Laski <zlaski@apple.com>
300 * class.c (layout_class_type): Do not issue C++ ABI warnings
302 * decl.c (objc_mark_locals_volatile): Streamline by calling
303 objc_volatilize_decl().
304 * parser.c (cp_parser_objc_message_expression): Allow simple
305 type specifiers (instead of merely type names) as message
307 * pt.c (template_args_equal): Do not call objc_comptypes().
308 * typeck.c (composite_pointer_type): If both pointers are
309 ObjC-esque, arbitrarily choose the first; do not call
311 (comptypes): Do not call objc_comptypes().
312 (convert_for_assignment): Call objc_compare_types().
313 (comp_ptr_ttypes_real): Call objc_type_quals_match() before
314 concluding that types do not match.
316 2005-05-24 Andrew Pinski <pinskia@physics.uc.edu>
319 * optimize.c (update_cloned_parm): Copy the TYPE also from the
322 2005-05-19 Jakub Jelinek <jakub@redhat.com>
325 * decl.c (grokdeclarator): Fix "storage class specified for"
328 2005-05-19 Kazu Hirata <kazu@cs.umass.edu>
330 * parser.c: Fix comment typos.
332 2005-05-18 Geoffrey Keating <geoffk@apple.com>
334 * Make-lang.in (cc1plus-dummy): New.
335 (cc1plus-checksum.c): New.
336 (cc1plus-checksum.o): New.
337 (cc1plus): Add cc1plus-checksum.o.
339 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
342 * decl2.c (determine_visibility): Don't set visibility to
343 hidden if it has been set explicitly by user.
345 2005-05-17 Ziemowit Laski <zlaski@apple.com>
346 Mike Stump <mrs@apple.com>
348 Yet more Objective-C++...
350 * cp-objcp-common.h (cxx_get_alias_set): Move from
352 (cxx_warn_unused_global_decl): Likewise.
353 (cp_expr_size): Likewise.
354 (cp_tree_size): Likewise.
355 (cp_var_mod_type_p): Likewise.
356 (cxx_initialize_diagnostics): Likewise.
357 (cxx_types_compatible_p): Likewise.
358 * cp-tree.h: to here.
360 * lex.c (D_OBJC): Add.
361 (init_reswords): Add.
362 * Make-lang.in (cp/pt.o): Add cp/cp-objcp-common.h.
363 * parser.c: Add c-common.h include.
364 * pt.c: Add c-common.h and cp-objcp-common.h includes.
365 (template_args_equal): Use objc_comptypes as well.
366 (tsubst_copy_and_build): Use objcp_tsubst_copy_and_build as well.
367 * semantics.c (do_poplevel): Remove static.
369 * decl.c (objc_mark_locals_volatile): Don't change decls that are
371 * decl2.c (generate_ctor_or_dtor_function): Add code to initialize
372 Objective C++ early enough.
373 * lex.c (struct resword reswords): Add Objective-C++ support.
374 * parser.c (cp_lexer_get_preprocessor_token): Add Objective-C++.
375 (cp_parser_objc_message_receiver): Add.
376 (cp_parser_objc_message_args): Likewise.
377 (cp_parser_objc_message_expression): Likewise.
378 (cp_parser_objc_encode_expression): Likewise.
379 (cp_parser_objc_defs_expression): Likewise.
380 (cp_parser_objc_protocol_expression): Likewise.
381 (cp_parser_objc_selector_expression): Likewise.
382 (cp_parser_objc_expression): Likewise.
383 (cp_parser_objc_visibility_spec): Likewise.
384 (cp_parser_objc_method_type): Likewise.
385 (cp_parser_objc_protocol_qualifiers): Likewise.
386 (cp_parser_objc_typename): Likewise.
387 (cp_parser_objc_selector_p): Likewise.
388 (cp_parser_objc_selector): Likewise.
389 (cp_parser_objc_method_keyword_params): Likewise.
390 (cp_parser_objc_method_tail_params_opt): Likewise.
391 (cp_parser_objc_interstitial_code): Likewise.
392 (cp_parser_objc_method_signature): Likewise.
393 (cp_parser_objc_method_prototype_list): Likewise.
394 (cp_parser_objc_method_definition_list): Likewise.
395 (cp_parser_objc_class_ivars): Likewise.
396 (cp_parser_objc_identifier_list): Likewise.
397 (cp_parser_objc_alias_declaration): Likewise.
398 (cp_parser_objc_class_declaration): Likewise.
399 (cp_parser_objc_protocol_declaration): Likewise.
400 (cp_parser_objc_protocol_refs_opt): Likewise.
401 (cp_parser_objc_superclass_or_category): Likewise.
402 (cp_parser_objc_class_interface): Likewise.
403 (cp_parser_objc_class_implementation): Likewise.
404 (cp_parser_objc_end_implementation): Likewise.
405 (cp_parser_objc_declaration): Likewise.
406 (cp_parser_objc_try_catch_finally_statement): Likewise.
407 (cp_parser_objc_synchronized_statement): Likewise.
408 (cp_parser_objc_throw_statement): Likewise.
409 (cp_parser_objc_statement): Likewise.
410 (cp_parser_primary_expression): Add Objective-C++.
411 (cp_parser_statement): Likewise.
412 (cp_parser_declaration): Likewise.
413 (cp_parser_simple_type_specifier): Likewise.
414 (cp_parser_type_name): Likewise.
415 (cp_parser_parameter_declaration_list): Likewise.
416 (cp_parser_member_declaration) Likewise.
417 * tree.c: Include debug.h.
418 * typeck.c (composite_pointer_type): Add Objective-C++ support.
419 (finish_class_member_access_expr): Likewise.
420 (build_function_call): Allow objc to rewrite FUNCTION_DECLs.
421 (build_modify_expr): Allow objc to generate write barriers.
423 * Make-lang.in (cp/tree.o): Add debug.h.
424 * tree.c (lvalue_p_1, case CONST_DECL): Add.
426 2005-05-18 Jan Hubicka <jh@suse.cz>
428 * method.c: Include tree-pass.h
429 (use_thunk): Lower body before expanding.
431 2005-05-17 Jakub Jelinek <jakub@redhat.com>
434 * decl.c (maybe_deduce_size_from_array_init): Call
435 cp_apply_type_quals_to_decl after completing array type.
437 2005-05-16 Richard Henderson <rth@redhat.com>
439 * decl.c (build_library_fn_1): Move setting TREE_NOTHROW ...
440 (build_library_fn): ... here.
442 2005-05-12 Ian Lance Taylor <ian@airs.com>
444 * cp-tree.h (cp_stmt_codes): Don't define.
445 (statement_code_p): Declare.
446 (STATEMENT_CODE_P): Define.
447 * lex.c (statement_code_p): Define.
448 (cxx_init): Use actual codes in stmt_codes initializer, not
449 cp_stmt_codes macro. Initialize statement_code_p directly, rather
450 than using INIT_STATEMENT_CODES.
452 2005-05-09 Mark Mitchell <mark@codesourcery.com>
454 * typeck.c (build_unary_op): Do not resort to address arithmetic
455 when taking the address of a COMPONENT_REF.
457 2005-05-08 Kazu Hirata <kazu@cs.umass.edu>
459 * class.c (vtbl_init_data_s): Change the type of fns to
461 (build_vtbl_initializer, add_vcall_offset, add_vcall_offset):
462 Use VEC instead of VARRAY.
464 2005-05-07 Richard Sandiford <rsandifo@redhat.com>
466 * mangle.c: Remove a reference to the MIPS -mint64 option.
468 2005-05-07 Kazu Hirata <kazu@cs.umass.edu>
470 * decl.c (wrapup_globals_for_namespace): Use VEC instead of
472 * name-lookup.c (add_decl_to_level, begin_scope): Likewise.
473 * name-lookup.h (cp_binding_level): Change the type of
474 static_decls to VEC(tree,gc)*.
476 * mangle.c (globals): Change the type of substitutions to
478 (dump_substitution_candidates, add_substitution,
479 find_substitution, finish_mangling, init_mangle): Use VEC
482 2005-05-06 Kazu Hirata <kazu@cs.umass.edu>
484 * decl2.c (spew_debug): Remove.
486 * decl2.c (ssdf_decls, start_static_storage_duration_function,
487 generate_ctor_or_dtor_function): Use VEC instead of VARRAY.
489 * decl2.c (pending_statics, note_vague_linkage_var,
490 cp_finish_file): Use VEC instead of VARRAY.
491 (pending_statics_used): Remove.
493 2005-05-05 Kazu Hirata <kazu@cs.umass.edu>
495 * decl2.c (deferred_fns, note_vague_linkage_fn,
496 cp_finish_file): Use VEC instead of VARRAY.
498 2005-05-05 Mark Mitchell <mark@codesourcery.com>
501 * pt.c (build_non_dependent_expr): Use is_overloaded_fn.
503 2005-05-05 Kazu Hirata <kazu@cs.umass.edu>
505 * pt.c: Fix a comment typo.
507 2005-05-04 Kazu Hirata <kazu@cs.umass.edu>
509 * cp-tree.h (language_function): Change the type of
510 x_local_names to VEC.
511 * decl.c (push_local_name): Adjust uses of local_names.
513 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
515 * friend.c, lex.c, mangle.c, repo.c: Update copyright.
517 2005-05-02 Kazu Hirata <kazu@cs.umass.edu>
519 * class.c (local_classes, init_class_processing): Use VEC
521 * cp-tree.h (local_classes): Likewise.
522 * mangle.c (discriminator_for_local_entity): Likewise.
523 * name-lookup.c (pushtag): Likewise.
525 * class.c (current_lang_depth, push_lang_context,
526 pop_lang_context): Use VEC instead of VARRAY.
527 * cp-tree.h (saved_scope): Use VEC for lang_base instead of
529 * name-lookup.c (push_to_top_level): Use VEC instead of
532 2005-05-02 Paolo Bonzini <bonzini@gnu.org>
534 * semantics.c (finish_call_expr): Call resolve_overloaded_builtin
535 for BUILT_IN_MD built-ins.
537 2005-05-02 Michael Matz <matz@suse.de>
540 * cp-tree.h (cp_tree_index): Remove CPTI_NULL, to be defined in C
543 * lex.c (cxx_init): Move null_node initialisation to C common frontend.
545 2005-04-25 Ian Lance Taylor <ian@airs.com>
547 * cp-tree.def: Add EXPR_STMT.
548 * cp-tree.h (cp_stmt_codes): Add EXPR_STMT.
549 (EXPR_STMT_EXPR): Define.
550 * cp-gimplify.c: Include "flags.h".
551 (gimplify_expr_stmt): New static function.
552 (cp_gimplify_expr): Handle EXPR_STMT.
553 * cxx-pretty-print.c (pp_cxx_statement): Use pp_cxx_expression
554 rather than pp_expression.
555 (pp_cxx_statement): Handle EXPR_STMT.
556 * dump.c (cp_dump_tree): Handle EXPR_STMT.
557 * lex.c (cxx_init): Don't use c_common_stmt_codes in stmt_codes
560 2005-04-25 Andrew Pinski <pinskia@physics.uc.edu>
563 * rtti.c (ifnonnull): Cast the zero comparison operand
566 2005-04-24 Jakub Jelinek <jakub@redhat.com>
569 * class.c: Include cgraph.h.
570 (cp_fold_obj_type_ref): Set node->local.vtable_method.
571 * Make-lang.in (cgraph.o): Depend on $(CGRAPH_H).
573 2005-04-12 Markus F.X.J. Oberhumer <markus@oberhumer.com>
575 * mangle.c (write_builtin_type): Handle integer types which are
576 not one of the shared integer type nodes and emit a "vendor
577 extended builtin type" with an encoding in the form of "u5int96".
579 2005-04-24 Ian Lance Taylor <ian@airs.com>
581 * cp-tree.def (USING_STMT): Change class to tcc_statement.
582 (TRY_BLOCK, EH_SPEC_BLOCK, HANDLER, CLEANUP_STMT): Likewise.
583 (IF_STMT, FOR_STMT, WHILE_STMT, DO_STMT): Likewise.
584 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
586 2005-04-23 DJ Delorie <dj@redhat.com>
588 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, friend.c,
589 init.c, lex.c, mangle.c, method.c, name-lookup.c, parser.c,
590 repo.c, rtti.c, tree.c, typeck.c, typeck2.c: Adjust warning()
593 2005-04-22 Per Bothner <per@bothner.com>
595 * decl.c (make_rtl_for_nonlocal_decl): Don't try get_fileinfo if
596 input_filename is NULL, as it is for (say) __PRETTY_FUNCTION__.
598 2005-04-22 Alexandre Oliva <aoliva@redhat.com>
601 * name-lookup.c (push_overloaded_decl): Do not overload with
602 non-duplicate anticipated built-in.
604 2005-04-21 Kazu Hirata <kazu@cs.umass.edu>
606 * cp-tree.h (THROW_NAME, AUTO_VTABLE_NAME, AUTO_TEMP_FORMAT,
607 VTABLE_BASE, VTABLE_NAME_PREFIX, STATIC_NAME_FORMAT): Remove.
609 2005-04-21 Nathan Sidwell <nathan@codesourcery.com>
611 * cp-tree.h: Adjust for new VEC API.
612 Define VEC(tree_pair_s,gc).
613 (struct save_scope): Adjust.
614 (struct lang_type_class): Adjust.
615 (unemitted_tinfo_decls): Adjust.
616 * class.c (add_method, resort_type_method_vec,
617 finish_struct_methods, struct find_final_overrider_data,
618 dfs_find_final_overrider_pre, find_final_overrider,
619 get_vcall_index, warn_hidden, walk_subobject_offsets,
620 check_methods, fixup_inline_methods, end_of_class,
621 warn_about_ambiguous_bases, finish_struct, build_vtbl_initializer,
622 add_vcall_offset): Adjust.
623 * decl.c (xref_basetypes, finish_method): Adjust.
624 * decl2.c (check_classfn): Adjust.
625 * init.c (sort_mem_initializers, push_base_cleanups): Adjust.
626 * method.c (do_build_copy_constructor): Adjust.
627 * name-lookup.c (new_class_binding, store_binding,
628 store_bindings, store_class_bindings): Adjust.
629 * name-lookup.h: Define VEC(cxx_saved_binding,gc),
630 VEC(cp_class_binding,gc).
631 (struct cp_binding_level): Adjust.
632 * parser.c: Define VEC(cp_token_position,heap).
633 (struct cp_lexer): Adjust.
634 (cp_lexer_new_main, cp_lexer_new_from_tokens, cp_lexer_destroy,
635 cp_lexer_save_tokens): Adjust.
636 * pt.c (retrieve_specialization,
637 check_explicit_specialization): Adjust.
638 * rtti.c (unemitted_tinfo_decls): Adjust.
639 (init_rtti_processing, get_tinfo_decl, get_pseudo_ti_init,
640 get_pseudo_ti_desc): Adjust.
641 * search.c (dfs_access_in_type, lookup_conversion_operator,
642 lookup_fnfields_1, dfs_walk_once, dfs_walk_once_accessible,
643 dfs_get_pure_virtuals, lookup_conversions_r, binfo_for_vbase): Adjust.
644 * semantics.c: Define VEC(deferred_access,gc).
645 (push_deferring_access_checks): Adjust.
646 * typeck2.c (abstract_virtuals_error): Adjust.
648 2005-04-20 Ian Lance Taylor <ian@airs.com>
650 * cp-tree.def: Add STMT_EXPR.
651 * cp-tree.h (STMT_EXPR_NO_SCOPE): Define.
652 (STMT_EXPR_STMT): Define.
653 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
655 (pp_cxx_expression): Likewise.
656 (pp_cxx_statement): Call pp_cxx_statement, not pp_statement.
657 * dump.c (cp_dump_tree): Handle STMT_EXPR.
659 2005-04-18 Kazu Hirata <kazu@cs.umass.edu>
661 * decl.c (expand_static_init): Call build2 and build3 instead
664 * cp-tree.h (VPTR_NAME, VPTR_NAME_P): Remove.
666 2005-04-17 Ian Lance Taylor <ian@airs.com>
668 * cp-tree.def: Add SIZEOF_EXPR, ARROW_EXPR and ALIGNOF_EXPR.
669 * cxx-pretty-print.c (pp_cxx_postfix_expression): Handle
671 (pp_cxx_unary_expression): Handle SIZEOF_EXPR and ALIGNOF_EXPR.
672 (pp_cxx_expression): Handle ARROW_EXPR, SIZEOF_EXPR, and
674 * typeck.c (cxx_sizeof_or_alignof_type): Update call to
675 c_sizeof_or_alignof_type for change in parameter type.
677 2005-04-16 Mark Mitchell <mark@codesourcery.com>
680 * typeck.c (cxx_sizeof_or_alignof_type): Check whether the type to
681 which sizeof/alignof is dependent, rather than just whether we are
682 processing_template_decl.
684 2005-04-17 Kazu Hirata <kazu@cs.umass.edu>
686 * cp-tree.h (LOOKUP_GLOBAL): Remove.
687 (LOOKUP_ONLYCONVERTING, DIRECT_BIND, LOOKUP_NO_CONVERSION,
688 LOOKUP_DESTRUCTOR, LOOKUP_NO_TEMP_BIND, LOOKUP_PREFER_TYPES,
689 LOOKUP_PREFER_NAMESPACES, LOOKUP_CONSTRUCTOR_CALLABLE): Adjust
692 2005-04-15 Richard Henderson <rth@redhat.com>
695 * semantics.c (finish_call_expr): Call resolve_overloaded_builtin.
697 2005-04-15 Kazu Hirata <kazu@cs.umass.edu>
699 * cp-tree.h (lang_type_class): Remove redefined. Move
700 java_interface into where redefined was. Increment the width
702 (TYPE_REDEFINED): Remove.
704 2005-04-14 Kazu Hirata <kazu@cs.umass.edu>
706 * cp-tree.h (SET_TMPL_ARG, ENUM_TI_TEMPLATE, ENUM_TI_ARGS,
707 CLASSTYPE_TEMPLATE_LEVEL): Remove.
709 2005-04-11 Mark Mitchell <mark@codesourcery.com>
711 * decl2.c (determine_visibility): Don't use export_class_data.
712 (import_export_decl): Honor TARGET_CXX_CLASS_DATA_ALWAYS_WEAK and
713 TARGET_CXX_DETERMINE_CLASS_DATA_VISIBILITY.
715 2005-04-09 Kazu Hirata <kazu@cs.umass.edu>
717 * cp-tree.h (cxx_alignof): Remove.
719 * cp-tree.h (DECL_ARRAY_DELETE_OPERATOR_P): Remove.
721 * cp-tree.h (EXCEPTION_CLEANUP_NAME, B_SET, B_CLR, B_TST,
722 CONV_STATIC_CAST): Remove.
724 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Remove.
726 * cp-tree.h (VF_BINFO_VALUE, VF_BASETYPE_VALUE): Remove.
728 * cp-tree.h (cp_deprecated): Remove.
730 2005-04-08 Ian Lance Taylor <ian@airs.com>
732 * cp-tree.def: Define FOR_STMT, WHILE_STMT, DO_STMT, BREAK_STMT,
733 CONTINUE_STMT, SWITCH_STMT.
734 * cp-tree.h (cp_stmt_codes): Add FOR_STMT, WHILE_STMT, DO_STMT,
735 BREAK_STMT, CONTINUE_STMT, SWITCH_STMT.
736 (WHILE_COND, WHILE_BODY): Define.
737 (DO_COND, DO_BODY): Define.
738 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY): Define.
739 (SWITCH_STMT_COND, SWITCH_STMT_BODY, SWITCH_STMT_TYPE): Define.
740 * cp-gimplify.c (enum bc_t): Define.
741 (struct cp_gimplify_ctx, ctxp): Define.
742 (push_context, pop_context): New static functions.
743 (begin_bc_block, finish_bc_block): New static functions.
744 (build_bc_goto): New static function.
745 (gimplify_cp_loop, gimplify_for_stmt): New static functions.
746 (gimplify_while_stmt, gimplify_do_stmt): Likewise.
747 (gimplify_switch_stmt): Likewise.
748 (cp_gimplify_expr): Handle FOR_STMT, WHILE_STMT, DO_STMT,
749 SWITCH_STMT, CONTINUE_STMT, BREAK_STMT.
750 (cp_genericize): Call push_context and pop_context.
751 * semantics.c (finish_break_stmt): Just call build_stmt
752 (BREAK_STMT) rather than build_break_stmt.
753 (finish_continue_stmt): Corresponding change.
754 * decl.c (pop_switch): Update call to c_do_switch_warnings for new
756 * cxx-pretty-print.c (pp_cxx_statement): Handle SWITCH_STMT,
757 WHILE_STMT, DO_STMT, FOR_STMT, BREAK_STMT, CONTINUE_STMT.
758 * dump.c (cp_dump_tree): Likewise.
760 2005-04-08 Mark Mitchell <mark@codesourcery.com>
763 * parser.c (cp_parser_type_specifier_seq): Add is_condition
765 (cp_parser_new_type_id): Pass it.
766 (cp_parser_condition): Likewise.
767 (cp_parser_conversion_type_id): Likewise.
768 (cp_parser_type_id): Likewise.
769 (cp_parser_type_specifier_seq): In a condition, do not allow
770 invalid type-specifier combinations.
771 (cp_parser_exception_declaration): Adjust call to
772 cp_parser_type_specifier_seq.
774 * cp-tree.def (TINST_LEVEL): Document TINST_IN_SYSTEM_HEADER_P.
775 * cp-tree.h (struct tinst_level): Add in_system_header_p.
776 (TINST_IN_SYSTEM_HEADER_P): New macro.
777 (make_tinst_level): Remove.
778 * pt.c (lookup_template_class): Preserve DECL_IN_SYSTEM_HEADER on
779 the instantiated class.
780 (push_tinst_level): Do not use make_tinst_level. Set
781 TINST_IN_SYSTEM_HEADER_P.
782 (pop_tinst_level): Likewise.
783 (instantiate_class_template): Set in_system_header.
784 (instantiate_pending_templates): Likewise.
785 * tree.c (make_tinst_level): Remove.
787 2005-04-06 Joseph S. Myers <joseph@codesourcery.com>
789 * decl.c (start_decl): Apply pending #pragma weak regardless of
792 2005-04-06 Mark Mitchell <mark@codesourcery.com>
795 * pt.c (regenerate_decl_from_template): Copy attributes for
796 parameters from the pattern to the instantiation.
798 2005-04-05 Mark Mitchell <mark@codesourcery.com>
801 * cp-tree.def (OFFSET_REF): Correct comments.
802 * init.c (build_offset_ref): Remove misleading comment.
803 * typeck.c (build_unary_op): Handle pointer-to-member creation
804 here, rather than ...
805 (unary_complex_lvalue): ... here.
807 2005-04-06 Jason Merrill <jason@redhat.com>
810 * tree.c (stabilize_init): Don't bother trying to stabilize
811 something with no side-effects.
813 2005-04-05 Mark Mitchell <mark@codesourcery.com>
816 * decl.c (grokdeclarator): Correct attribute handling.
818 2005-04-05 Mark Mitchell <mark@codesourcery.com>
821 * decl2.c (import_export_decl): Use non-COMDAT external linkage
822 for virtual tables, typeinfo, etc. that will be emitted in only
823 one translation unit on systems without weak symbols.
825 2005-04-04 Mark Mitchell <mark@codesourcery.com>
828 * parser.c (cp_parser_template_name): Fix thinko.
830 2005-04-04 Nathan Sidwell <nathan@codesourcery.com>
833 * method.c (use_thunk): Protect covariant pointer return
834 adjustments from NULL pointers.
836 2005-04-04 Jan Hubicka <jh@suse.cz>
838 * decl2.c (finish_objects): Revert my previous patch.
839 (cp_finish_file): Likewise.
841 2005-04-03 Kazu Hirata <kazu@cs.umass.edu>
843 * pt.c: Fix comment typos.
845 2005-04-03 Nathan Sidwell <nathan@codesourcery.com>
848 * pt.c (more_specialized_fn): Member functions are unordered wrt
849 non-members. Conversion operators are unordered wrt other
852 2005-04-01 Nathan Sidwell <nathan@codesourcery.com>
854 * call.c (add_template_candidates_real): Remove length parameter
855 from fn_type_unification call.
856 * class.c (resolve_address_of_overloaded_function): Likewise
857 * cp-tree.h (fn_type_unification): Remove length parameter.
858 * pt.c (get_bindings_overload): Remove.
859 (get_bindings_real): Rename to ...
860 (get_bindings): ... here. Remove length and strict
861 parameters. Change return type flag to boolean. Remove original
863 (determine_specialization): Adjust get_bindings call.
864 (fn_type_unification): Remove length parameter. Adjust.
865 (type_unification_real): Remove length parameter. Adjust.
866 (resolve_overloaded_unification): Adjust get_bindings call.
867 (try_one_overload): Simplify confusing cascaded if control flow.
868 (unify): Remove length paramter from type_unification_real call.
869 (most_specialized_instantiation): Adjust get_bindings calls.
870 (most_specialized): Likewise.
872 2005-03-31 Nathan Sidwell <nathan@codesourcery.com>
874 PR c++/19203, implement DR 214
875 * call.c (joust): Use more_specialized_fn.
876 * cp-tree.h (DEDUCE_ORDER): Remove.
877 (more_specialized): Replace with ...
878 (more_specialized_fn): ... this.
879 * pt.c (maybe_adjust_types_for_deduction): Remove DEDUCE_ORDER
881 (type_unification_real): Remove DEDUCE_ORDER case.
882 (more_specialized): Replace with ...
883 (more_specialized_fn): ... this. Implement DR 214.
884 (most_specialized_instantiation): Use get_bindings_real directly.
886 2005-03-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
889 * call.c (build_new_op): Remove check for -Wsynth.
891 2005-03-31 Jan Hubicka <jh@suse.cz>
893 * decl2.c (finish_objects): Mark ctor as needed.
894 (cp_finish_file): Output variables only in nonunit-at-a-time.
896 2005-03-29 Richard Henderson <rth@redhat.com>
899 * decl.c (cp_complete_array_type): Rename from complete_array_type.
900 Use the new complete_array_type in c-common.c. Update all callers.
901 * cp-tree.h (cp_complete_array_type): Update to match.
903 2005-03-24 Geoffrey Keating <geoffk@apple.com>
905 * typeck.c (build_static_cast_1): Allow scalar_cast between
906 any integral, floating, or enumeration type.
908 2005-03-24 Steven Bosscher <stevenb@suse.de>
910 * typeck.c (comptypes): First determine if the types are compatible
911 from a target-independent point of view. Check target attributes
914 * class.c (build_base_path):
915 (build_vbase_offset_vtbl_entries):
916 (add_vcall_offset): Replace fold (buildN (...)) with fold_buildN.
917 * error.c (dump_expr): Likewise.
918 * init.c (build_zero_init, expand_cleanup_for_base,
919 build_vec_delete_1): Likewise.
920 * mangle.c (write_integer_cst): Likewise.
921 * method.c (thunk_adjust): Likewise.
922 * pt.c (convert_nontype_argument, tsubst, unify): Likewise.
923 * tree.c (cxx_print_statistics, array_type_nelts_total): Likewise.
924 * typeck.c (build_ptrmemfunc_access_expr,
925 (get_member_function_from_ptrfunc): Likewise.
927 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
929 * cp-objcp-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
931 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
933 * cp-tree.h (perform_integral_promotions): Remove.
934 (default_conversion): Add.
936 2005-03-22 Mark Mitchell <mark@codesourcery.com>
938 * parser.c (cp_parser_warn_min_max): New function.
939 (cp_parser_binary_expression): Use it.
940 (cp_parser_assignment_operator_opt): Likewise.
941 (cp_parser_operator): Likewise.
943 2005-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
946 * decl.c (start_preparsed_function): Robustify.
948 2005-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
951 * parser.c (cp_parser_class_head): Return NULL_TREE when
952 encountering a redefinition.
954 2005-03-22 Nathan Sidwell <nathan@codesourcery.com>
958 * typeck.c (build_ptrmemfunc): Allow OFFSET_REF when processing a
961 2005-03-21 Paolo Carlini <pcarlini@suse.de>
965 * init.c (emit_mem_initializers): Don't crash on undefined
968 2005-03-21 Paolo Carlini <pcarlini@suse.de>
971 * semantics.c (finish_stmt_expr_expr): Return immediately
972 if error_operand_p (expr).
974 2005-03-21 Joseph S. Myers <joseph@codesourcery.com>
976 * cp-tree.h (lvalue_or_else, lvalue_p): New.
977 * typeck.c (lvalue_or_else): New. Call lvalue_error.
979 2005-03-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
982 * decl.c (decls_match): Compare context of VAR_DECL.
984 2005-03-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
987 * parser.c (cp_parser_postfix_expression) <case RID_TYPENAME>:
988 Check the return value of cp_parser_nested_name_specifier.
990 2005-03-18 Dale Johannesen <dalej@apple.com>
992 * cp/tree.c (cp_tree_equal): Handle SSA_NAME.
994 2005-03-18 Paolo Carlini <pcarlini@suse.de>
997 * parser.c (cp_parser_diagnose_invalid_type_name):
998 Check TYPE_BINFO (current_class_type) before attempting
999 to emit inform messages.
1001 2005-03-17 Paolo Carlini <pcarlini@suse.de>
1004 * cp-tree.h (grok_op_properties): Change return type to void.
1005 * decl.c (grok_op_properties): Return early - don't check the
1006 arity - in case of a static member or an operator that cannot
1007 be non-member; tidy a bit.
1009 2005-03-17 Nathan Sidwell <nathan@codesourcery.com>
1012 * pt.c (contains_dependent_cast_p): Remove.
1013 (fold_non_dependent_expr): Don't use it.
1014 (value_dependent_expression_p): Use a switch statement.
1015 reference_exprs can be dependent.
1017 2005-03-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1021 * name-lookup.c (pushtag): Skip template parameter scope when
1022 scope is ts_global. Don't push tag into template parameter
1024 * pt.c (instantiate_class_template): Reorder friend class
1025 template substitution to handle non-dependent friend class
1026 that hasn't been previously declared.
1028 2005-03-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1030 Friend class name lookup 5/n
1032 * cp-tree.h (pushtag): Adjust declaration.
1033 * decl.c (lookup_and_check_tag): Call lookup_type_scope if
1035 (xref_tag): Adjust call to pushtag. Make hidden class visible.
1036 (start_enum): Adjust call to pushtag.
1037 * name-lookup.c (ambiguous_decl): Ignore hidden names.
1038 (qualify_lookup): Change return type to bool.
1039 (hidden_name_p): New function.
1040 (lookup_namespace_name, unqualified_namespace_lookup,
1041 lookup_name_real): Use it.
1042 (lookup_type_scope): Update comments.
1043 (maybe_process_template_type_declaration): Change parameter name
1044 from globalize to is_friend.
1045 (pushtag): Change globalize parameter of type int to tag_scope.
1046 Hide name if introduced by friend declaration.
1047 * name-lookup.h (hidden_name_p): Add declaration.
1048 * parser.c (cp_parser_lookup_name): Don't deal with hidden name
1050 * pt.c (push_template_decl_real): Make hidden class template
1052 (lookup_template_class, instantiate_class_template): Adjust call
1054 * semantics.c (begin_class_definition): Likewise.
1055 * rtti.c (init_rtti_processing, build_dynamic_cast_1,
1056 tinfo_base_init, emit_support_tinfos): Use ts_current instead of
1059 2005-03-13 Mark Mitchell <mark@codesourcery.com>
1062 * pt.c (determine_specialization): Reject non-specializations.
1064 2005-03-11 Per Bothner <per@bothner.com>
1066 * cp-tree.h (struct cp_declarator): New id_loc field.
1067 * cp/parser.c (cp_lexer_get_preprocessor_token): Set cp_token's
1068 location using c_lex_with_flags, instead of input_location.
1069 (cp_parser_direct_declarator): Set declarator's id_loc from
1072 2005-03-10 Jakub Jelinek <jakub@redhat.com>
1074 PR c++/18384, c++/18327
1075 * decl.c (reshape_init_array): Use UHWI type for max_index_cst
1076 and index. Convert max_index to size_type_node if it isn't
1077 host_integerp (, 1).
1079 2005-03-09 Mark Mitchell <mark@codesourcery.com>
1082 * pt.c (tsubst_decl): Apply array-to-pointer and
1083 function-to-pointer conversions to function arguments.
1084 (regenerate_decl_from_template): Likewise.
1086 2005-03-09 Paolo Carlini <pcarlini@suse.de>
1089 * decl.c (complete_array_type): In pedantic mode, return
1090 3 for an empty initializer list as the initializer for an
1091 array of unknown bound (8.5.1/4).
1092 (maybe_deduce_size_from_array_init): Fix final test to use
1095 2005-03-08 Nathan Sidwell <nathan@codesourcery.com>
1098 * pt.c (contains_dependent_cast_p): New.
1099 (fold_non_dependent_expr): Call it.
1101 2005-03-08 Mark Mitchell <mark@codesourcery.com>
1104 * cp-tree.h (target_type): Remove.
1105 * decl.c (layout_var_decl): Remove #if 0'd code.
1106 (cp_finish_decl): Remove dead code.
1107 * init.c (build_vec_init): When determining whether or not the
1108 element type has an asignment operator, look through all array
1110 * typeck.c (target_type): Remove.
1112 2005-03-07 Mark Mitchell <mark@codesourcery.com>
1114 * class.c (finish_struct_1): Do not warn about non-virtual
1115 destructors in Java classes.
1117 2005-03-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1120 * init.c (build_offset_ref): Don't build non-dependent SCOPE_REF.
1121 * pt.c (build_non_dependent_expr): Don't build NON_DEPENDENT_EXPR
1123 * typeck.c (build_x_unary_op): Don't build non-dependent SCOPE_REF.
1124 Also set PTRMEM_OK_P for NON_DEPENDENT_EXPR.
1125 (build_unary_op): Handle building ADDR_EXPR of OFFSET_REF inside
1128 2005-03-02 Alexandre Oliva <aoliva@redhat.com>
1130 * name-lookup.c (push_overloaded_decl): Don't error if the new
1131 decl matches the old one.
1132 * decl.c (redeclaration_error_message): Likewise.
1134 2005-03-01 Per Bothner <per@bothner.com>
1136 * decl.c (finish_function): Use SET_EXPR_LOCATION instead of
1137 unavailable annotate_with_file_line, if USE_MAPPED_LOCATION.
1139 2005-03-01 Nathan Sidwell <nathan@codesourcery.com>
1142 * class.c (update_vtable_entry_for_fn): Don't crash on invalid
1145 * cp-tree.g (THUNK_TARGET): Expand comment.
1146 * method.c (use_thunk): Make sure we also use the target, if that
1149 2005-02-27 Jakub Jelinek <jakub@redhat.com>
1152 * decl.c (cxx_comdat_group): Put thunks for
1153 TARGET_USE_LOCAL_THUNK_ALIAS_P (function) functions into the same
1154 comdat group as the thunk target.
1156 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1158 * call.c, class.c, cp-tree.h, decl2.c, error.c, init.c, mangle.c,
1159 parser.c: Fix comment typo(s).
1161 2005-02-24 Jakub Jelinek <jakub@redhat.com>
1164 * decl.c (reshape_init): Don't warn about missing braces if STRING_CST
1165 initializes a char/wchar_t array.
1167 2005-02-23 Mark Mitchell <mark@codesourcery.com>
1170 * decl.c (grokvardecl): Set DECL_INTERFACE_KNOWN for declarations
1171 with internal linkage.
1173 2005-02-23 Alexandre Oliva <aoliva@redhat.com>
1175 * decl.c (grokvardecl): Don't exempt anonymous types from having
1176 linkage for variables that have linkage other than "C".
1178 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
1180 * cp-objcp-common.h, error.c: Update copyright.
1182 2005-02-22 Mark Mitchell <mark@codesourcery.com>
1185 * decl.c (start_decl_1): Don't clear TREE_READONLY.
1186 (cp_finish_decl): Likewise.
1187 (complete_vars): Call cp_apply_type_quals_to_decl.
1188 * typeck.c (cp_apply_type_quals): Avoid setting TREE_READONLY in
1189 cases where that's not valid.
1192 * init.c (integral_constant_value): Iterate if the value of a decl
1193 is itself a constant.
1196 * parser.c (cp_parser_class_head): Check for redefintions here.
1197 * semantics.c (begin_class_definition): Not here.
1200 * decl2.c (build_anon_union_vars): Add type parameter.
1201 (finish_anon_union): Pass it.
1204 * error.c (dump_expr): Do not print the body of a BIND_EXPR.
1205 Handle STATEMENT_LIST.
1208 * parser.c (cp_parser_direct_declarator): Always complain about
1209 non-constant array bounds when in a function scope.
1210 * semantics.c (finish_id_expression): Do not mark dependent names
1213 2005-02-21 Douglas Gregor <dgregor@cs.indiana.edu>
1217 * cp-tree.h (cp_apply_type_quals_to_decl): Declared.
1218 * decl.c (grokdeclarator): Pedwarn about qualifying a function
1220 Add qualifiers when declaring a typedef of a function type.
1221 Member function pointers pick up the qualifiers of the typedef
1222 used to declare them.
1223 Don't complain about creating cv-qualified function types.
1224 Complain about qualified function typedefs that are used to
1225 declare non-static member functions or free functions.
1226 Use cp_apply_type_quals_to_decl.
1227 (start_preparsed_function): Use cp_apply_type_quals_to_decl.
1228 (grokclassfn): Use cp_apply_type_quals_to_decl.
1229 * error.c (dump_type_suffix): Print qualifiers for function
1231 * pt.c (tsubst_decl): Use cp_apply_type_quals_to_decl.
1232 (tsubst): When substituting a function type into a member
1233 pointer type, pass along the qualifiers.
1234 (unify): Unify member pointers to member function pointers.
1235 * tree.c (cp_build_qualified_type_real): Function types may be
1236 qualified. This includes restrict qualifiers.
1237 * typeck.c (cp_apply_type_quals_to_decl): New function to replace
1238 use of c_apply_type_quals_to_decl. Drops qualifiers that are being
1239 added to function types.
1241 2005-02-20 Zack Weinberg <zack@codesourcery.com>
1244 * cp-objcp-common.h (LANG_HOOKS_TO_TARGET_CHARSET): Set to
1245 c_common_to_target_charset. Delete bogus comment.
1247 2005-02-18 Richard Henderson <rth@redhat.com>
1250 * except.c (do_get_exception_ptr): New.
1251 (expand_start_catch_block): Use it.
1253 2005-02-19 Jakub Jelinek <jakub@redhat.com>
1255 * decl.c (start_decl_1): Only check TYPE_NEEDS_CONSTRUCTING
1256 if type is not error_mark_node.
1258 2005-01-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1261 * decl2.c (grokfield): Do not apply attributes to template parameters
1262 as they are ignored by tsubst anyway.
1264 2005-02-18 Jakub Jelinek <jakub@redhat.com>
1267 * decl.c (start_decl_1): Clear TREE_READONLY flag if
1268 its type has TYPE_NEEDS_CONSTRUCTING.
1269 (complete_vars): Likewise.
1271 2005-02-17 Alexandre Oliva <aoliva@redhat.com>
1274 * class.c (finish_struct): Initialize TYPE_SIZE_UNIT of a
1275 template along with TYPE_SIZE.
1278 * semantics.c (perform_deferred_access_checks): Use
1279 get_deferred_access_checks to get the top of the stack.
1281 2005-02-15 Alexandre Oliva <aoliva@redhat.com>
1284 * class.c (add_implicitly_declared_members, check_field_decl)
1285 (check_field_decls, check_bases): Remove arguments, tests and
1286 assignments of cant_have_default_ctor-related variables.
1288 2005-02-15 Alexandre Oliva <aoliva@redhat.com>
1290 * decl2.c (mark_used): Set the source location of the used decl to
1291 the current input location here...
1292 * method.c (synthesize_method): ... not here. Set input_location
1293 from the decl instead.
1295 2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
1298 * parser.c (cp_parser_late_parsing_for_member): Use
1299 current_function_decl as scope to push to and from.
1302 * pt.c (check_explicit_specialization): Make sure namespace
1303 binding lookup found an overloaded function.
1304 (lookup_template_function): Just assert FNS is an overloaded
1308 * decl.c (grokdeclarator): Check for error mark node in ptrmem
1311 2005-02-14 Alexandre Oliva <aoliva@redhat.com>
1314 * decl.c (redeclaration_error_message): Report redefinition of
1315 pure virtual function.
1317 2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
1320 * class.c (build_simple_base_path): Build the component_ref
1322 (update_vtable_entry_for_fn): Walk the covariant's binfo chain
1323 rather than using lookup_base.
1324 * search.c (dfs_walk_once): Add non-recursive assert check.
1325 * typeck.c (build_class_member_access_expr): It is possible for
1326 the member type to be both const and volatile.
1328 2005-02-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1332 * pt.c (maybe_check_template_type): Remove.
1333 * cp-tree.h (maybe_check_template_type): Remove prototype.
1334 * name-lookup.c (maybe_process_template_type_declaration): Don't
1335 use maybe_check_template_type.
1337 2005-02-11 Richard Henderson <rth@redhat.com>
1340 * pt.c (get_mostly_instantiated_function_type): Save and restore
1341 flag_access_control instead of push/pop_access_scope.
1343 2005-02-10 Mark Mitchell <mark@codesourcery.com>
1346 * decl.c (reshape_init): Issue warnings about missing braces.
1348 2005-02-11 Kazu Hirata <kazu@cs.umass.edu>
1350 * cp-tree.def, except.c, ptree.c: Update copyright.
1352 2005-02-09 Mark Mitchell <mark@codesourcery.com>
1355 * call.c (build_op_delete_call): Check COMPLETE_TYPE_P before
1356 attempting name lookup.
1358 * parser.c (cp_parser_unqualified_id): Initialize type_decl.
1361 * call.c (initialize_reference): Robustify.
1364 * decl.c (grokdeclarator): Check for invalid use of destructor
1368 * parser.c (cp_parser_unqualified_id): Avoid creating destructor
1369 names with invalid types.
1372 * parser.c (cp_parser_direct_declarator): Allow type-dependent
1373 expressions as array bounds.
1376 * parser.c (cp_parser_attributes_list): Allow empty lists.
1378 2005-02-08 Mark Mitchell <mark@codesourcery.com>
1381 * class.c (add_method): Don't set TYPE_HAS_DESTRUCTOR.
1382 (check_bases): Give warnings about a base class with a
1383 non-virtual destructor, even if it is implicit.
1384 (finish_struct_bits): Don't copy TYPE_HAS_DESTRUCTOR.
1385 (maybe_warn_about_overly_private_class): Don't use
1386 TYPE_HAS_DESTRUCTOR.
1387 (finish_struct_methods): Don't set TYPE_HAS_DESTRUCTOR.
1388 (check_for_override): Give it external linkage.
1389 (add_implicitly_declared_members): Generate destructors lazily.
1390 (check_field_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
1391 TYPE_HAS_DESTRUCTOR.
1392 (check_bases_and_members): Call check_methods before
1394 (check_bases_and_members): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
1395 TYPE_HAS_DESTRUCTOR.
1396 (finish_struct_1): Do not use TYPE_HAS_DESTRUCTOR.
1397 * cp-tree.def (PSEUDO_DTOR_EXPR): Document.
1398 * cp-tree.h (TYPE_HAS_DESTRUCTOR): Remove.
1399 (lang_type_class): Add lazy_destructor.
1400 (CLASSTYPE_LAZY_DESTRUCTOR): New macro.
1401 (CLASSTYPE_DESTRUCTORS): Robustify.
1402 (TYPE_HAS_DESTRUCTOR): Remove.
1403 (check_for_override): Declare.
1404 (build_vbase_delete): Remove.
1405 * cvt.c (convert_to_void): Issue errors about pseudo-destructor
1407 * decl.c (cxx_maybe_build_cleanup): Remove dead code.
1408 * except.c (dtor_nothrow): Lazily create destructors if necessary.
1409 (build_throw): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
1410 * init.c (build_delete): Lazily create destructors, if necessary.
1411 (build_vbase_delete): Remove.
1412 * method.c (locate_dtor): Simplify.
1413 (implicitly_declare_fn): Add support for destructors.
1414 * parser.c (cp_parser_lookup_name): Lazily create destructors, if
1416 * pt.c (check_explicit_specialization): Don't use
1417 TYPE_HAS_DESTRUCTOR.
1418 (instantiate_class_template): Likewise.
1419 * ptree.c (cxx_print_type): Don't print TYPE_HAS_DESTRUCTOR.
1420 * rtti.c (emit_support_tinfos): Robustify.
1421 * search.c (lookup_fnfields_1): Lazily create destructors.
1422 * typeck.c (build_class_member_access_expr): Remove
1423 PSEUDO_DTOR_EXPR handling.
1424 (lookup_destructor): Likewise.
1426 2005-02-08 Kazu Hirata <kazu@cs.umass.edu>
1428 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h: Update
1431 2005-02-07 Mark Mitchell <mark@codesourcery.com>
1433 * parser.c (cp_lexer_start_debugging): Avoid arithmetic operations
1434 on boolean variables.
1435 (cp_lexer_stop_debugging): Likewise.
1437 2005-02-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1440 * parser.c (cp_parser_pure_specifier): Emit a specific error
1441 message with an invalid pure specifier.
1442 * decl2.c (grok_function_init): Remove.
1443 (grokfield): An initializer for a method is a always a pure
1446 2005-02-02 Matt Austern <austern@apple.com>
1449 * cp-tree.h (builtin_valid_in_constant_expr_p): Declare.
1450 * parser.c (cp_parser_postfix_expression): Accept function call in
1451 constant expression if builtin_valid_in_constant_expr_p is true
1453 * pt.c (value_dependent_expression_p): Handle CALL_EXPRs properly.
1454 * semantics.c (finish_id_expression): Accept function call in constant
1455 expression if builtin_valid_in_constant_expr_p is true for that
1457 * tree.c (builtin_valid_in_constant_expr_p): New.
1459 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1462 * pt.c (check_instantiated_args): Improve error message.
1463 Fix logic when to print its second part.
1465 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1467 * cp-tree.h (complete_type_or_else): Remove macro.
1468 (complete_type_or_diagnostic): Rename to complete_type_or_else
1469 and remove last argument.
1470 * typeck.c (complete_type_or_diagnostic): Rename to
1471 complete_type_or_else and remove last argument.
1473 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1475 * cp-tree.h (commonparms): Remove prototype.
1476 (convert_arguments): Likewise.
1477 (PFN_FROM_PTRMEMFUNC): Remove.
1478 * typeck.c (commonparms): Make static.
1479 (convert_arguments): Add prototype. Make static.
1480 (PFN_FROM_PTRMEMFUNC): Replace by pfn_from_ptrmemfunc.
1482 2005-01-31 Mark Mitchell <mark@codesourcery.com>
1484 * parser.c (cp_parser_primary_expression): Don't complain about
1485 floating-point literals in integral constant expressions when
1488 2005-02-01 Alexandre Oliva <aoliva@redhat.com>
1490 * parser.c (cp_parser_template_id): Revert comment patch too.
1495 * parser.c (cp_parser_template_id): Revert 2004-12-09's patch.
1496 Issue an error when creating the template id.
1497 * pt.c (fn_type_unification): Return early if the explicit
1498 template arg list is an error_mark_node.
1500 2005-01-31 Mark Mitchell <mark@codesourcery.com>
1502 * decl.c (build_enumerator): Do not issue duplicate error messages
1503 about invalid enumeration constants.
1504 * parser.c (cp_parser_non_integral_constant_expression): Always
1505 set parser->non_integral_constant_expression_p.
1506 (cp_parser_primary_expression): Add cast_p parameter. Issue
1507 errors about invalid uses of floating-point literals in
1509 (cp_parser_postfix_expression): Add cast_p parameter.
1510 (cp_parser_open_square_expression): Pass it.
1511 (cp_parser_parenthesized_expression_list): Add cast_p parameter.
1512 (cp_parser_unary_expression): Likewise.
1513 (cp_parser_new_placement): Pass it.
1514 (cp_parser_direct_new_declarator): Likewise.
1515 (cp_parser_new_initializer): Likewise.
1516 (cp_parser_cast_expression): Add cast_p parameter.
1517 (cp_parser_binary_expression): Likewise.
1518 (cp_parser_question_colon_clause): Likewise.
1519 (cp_parser_assignment_expression): Likewise.
1520 (cp_parser_expression): Likewise.
1521 (cp_parser_constant_expression): If an integral constant
1522 expression is invalid, return error_mark_node.
1523 (cp_parser_expression_statement): Pass cast_p.
1524 (cp_parser_condition): Likewise.
1525 (cp_parser_iteration_statement): Likewise.
1526 (cp_parser_jump_statement): Likewise.
1527 (cp_parser_mem_initializer): Likewise.
1528 (cp_parser_template_argument): Likewise.
1529 (cp_parser_parameter_declaration): Likewise.
1530 (cp_parser_initializer): Likewise.
1531 (cp_parser_throw_expression): Likewise.
1532 (cp_parser_attribute_list): Likewise.
1533 (cp_parser_simple_cast_expression): Likewise.
1534 (cp_parser_functional_cast): Likewise.
1535 (cp_parser_late_parsing_default_args): Likewise.
1536 (cp_parser_sizeof_operand): Save/restore
1537 non_integral_constant_expression_p.
1539 2005-01-31 Mike Stump <mrs@apple.com>
1541 * parser.c (cp_lexer_new_main): Get the first token, first, before
1544 2005-01-31 Mark Mitchell <mark@codesourcery.com>
1546 * decl.c (start_decl): Add missing parentheses.
1548 2005-01-30 Mark Mitchell <mark@codesourcery.com>
1551 * cp-tree.h (DECL_USE_TEMPLATE): Expand documentation.
1552 * decl.c (duplicate_decls): Do not discard
1553 DECL_IMPLICIT_INSTANTIATION when merging declarations.
1554 (start_decl): Do not SET_DECL_TEMPLATE_SPECIALIZATION for
1555 variables that do not have DECL_USE_TEMPLATE.
1558 * decl.c (grokdeclarator): Refactor code so that qualified names
1559 are never allowed as the declarator in a typedef.
1562 * name-lookup.c (do_nonmember_using_decl): Avoid overloading
1563 builtin declarations.
1566 * call.c (convert_like_real): Inline call to
1567 dubious_conversion_warnings here.
1568 * cp-tree.h (dubious_conversion_warnings): Remove.
1569 * semantics.c (finish_unary_op_expr): Copy INTEGER_CSTs before
1570 setting TREE_NEGATED_INT.
1571 * typeck.c (dubious_conversion_warnings): Remove.
1574 * name-lookup.c (pushdecl_namespace_level): Avoid accessing free'd
1577 2005-01-28 Mark Mitchell <mark@codesourcery.com>
1580 * parser.c (cp_parser_diagnose_invalid_type_name): Commit to
1584 * pt.c (redeclare_class_template): Robustify.
1586 2005-01-27 Steven Bosscher <stevenb@suse.de>
1588 * decl.c (finish_case_label): Use SWITCH_STMT accessor macros
1589 instead of SWITCH_EXPR ones.
1590 * pt.c (tsubst_expr): Likewise.
1591 * semantics.c (begin_switch_stmt, finish_switch_cond,
1592 finish_switch_stmt): Likewise.
1594 2005-01-26 J"orn Rennecke <joern.rennecke@st.com>
1597 * parser.c (cp_parser_initializer_clause): Initialize *non_constant_p.
1599 2005-01-25 Andrew Pinski <pinskia@physics.uc.edu>
1601 * class.c (abort_fndecl_addr): New variable.
1602 (build_vtbl_initializer): If we have a pure virtual function
1603 share the abort function's address.
1604 Include gt-cp-class.h at the end.
1605 * config-lang.in (gtfiles): Add cp/class.c.
1607 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1609 * cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static.
1610 (pp_cxx_function_definition): Make static.
1611 * cxx-pretty-print.h (pp_cxx_statement): Remove prototype.
1612 (pp_cxx_function_definition): Likewise.
1614 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1616 * name-lookup.c (print_binding_level): Make static.
1617 (constructor_name_full): Make static inline.
1618 (current_decl_namespace): Make static.
1619 * name-lookup.h (constructor_name_full): Remove prototype.
1620 (print_binding_level): Likewise.
1621 (current_decl_namespace): Likewise.
1623 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1625 * decl.h (debug_bindings_indentation): Remove.
1627 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
1629 * typeck.c: Fix a comment typo.
1631 2005-01-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1634 * pt.c (fold_decl_constant_value): Always call fold_non_dependent_expr
1636 (tsubst): Use fold_decl_constant_value in place of a bare call to
1637 integral_constant_value.
1639 2005-01-20 Kazu Hirata <kazu@cs.umass.edu>
1641 * typeck.c (more_qualified_p): Remove.
1642 * cp-tree.h: Remove the corresponding prototype.
1644 2005-01-19 Matt Austern <austern@apple.com>
1646 * typeck.c (comptypes): Handle return code from objc_comptypes
1649 2005-01-19 Kazu Hirata <kazu@cs.umass.edu>
1651 * cp-tree.h, name-lookup.h: Remove unused prototypes.
1653 2005-01-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1656 * semantics.c (finish_id_expression): Disable access checking for
1657 already lookuped FIELD_DECL.
1659 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
1661 * decl.c (delete_block): Remove.
1662 * cp-tree.h: Remove the corresponding prototype.
1664 * decl.c (vtable_decl_p, vtype_decl_p, walk_globals_data,
1665 walk_vtables_r, walk_vtables, walk_globals_r, walk_globals):
1667 * cp-tree.h: Remove the corresponding prototypes.
1669 * tree.c (count_functions, bound_pmf_p, cp_is_overload_p,
1670 cp_update_decl_after_saving, name_p): Remove.
1671 * cp-tree.h: Remove the corresponding prototypes.
1673 2005-01-18 Andrew Pinski <pinskia@physics.uc.edu>
1676 * semantics.c (finish_asm_stmt): Strip nops off
1677 input memory operands.
1679 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
1681 * Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c,
1682 typeck2.c: Update copyright.
1684 2005-01-16 Kazu Hirata <kazu@cs.umass.edu>
1686 * class.c (get_enclosing_class): Remove.
1687 * cp-tree.h: Remove the corresponding prototypes.
1689 * cvt.c (convert_lvalue): Remove.
1690 * cp-tree.h: Remove the corresponding prototype.
1692 * pt.c (tinst_for_decl): Remove.
1693 * cp-tree.h: Remove the corresponding prototypes.
1695 * tree.c (hash_chainon): Remove.
1696 * cp-tree.h: Remove the corresponding prototypes.
1698 2005-01-15 Jakub Jelinek <jakub@redhat.com>
1701 * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
1702 of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
1704 2005-01-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1706 * Make-lang.in (cp-warn): Don't append $(WERROR).
1708 2005-01-10 Kazu Hirata <kazu@cs.umass.edu>
1710 * cp-tree.h: Fix a comment typo.
1712 2005-01-07 Nathan Sidwell <nathan@codesourcery.com>
1715 * pt.c (tsubst_qualified_id): Call convert_from_reference.
1717 2005-01-06 Mark Mitchell <mark@codesourcery.com>
1720 * class.c (add_implicitly_declared_members): Remove dead code.
1721 * decl.c (grokfndecl): Add sfk parameter. Use it do set
1723 (grokdeclarator): Adjust calls to grokfndecl.
1724 * method.c (implicitly_declare_fn): Improve documentation.
1725 * parser.c (cp_parser_direct_declarator): Do not consider a
1726 function to be a constructor if the containing class was
1727 originally anonymous.
1729 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1732 * search.c (lookup_field_1): Handle using declaration in
1733 class template partial specialization.
1735 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1738 * pt.c (push_access_scope): Handle friend defined in class.
1739 (pop_access_scope): Likewise.
1741 2005-01-06 Nathan Sidwell <nathan@codesourcery.com>
1744 * pt.c (tsubst_copy) <ARRAY_REF case>: Handle separately.
1745 (tsubst_copy_and_build) <ARRAY_REF case>: Remove obsolete
1746 array-new handling code. Use build_x_binary_op.
1748 2005-01-05 Nathan Sidwell <nathan@codesourcery.com>
1751 * cp-tree.h (start_decl): Take pointer to pushed scope, not bool.
1752 * name-lookup.h (push_scope): Return pushed scope, not flag.
1753 * name-lookup.c (push_scope): Return scope that should be popped,
1755 * decl.c (start_decl): Adjust.
1756 (grokfndecl): Adjust scope push and pop.
1757 * decl2.c (check_classfn): Likewise.
1758 * parser.c (cp_parser_condition, cp_parser_conversion_function_id,
1759 cp_parser_init_declarator, cp_parser_direct_declarator,
1760 cp_parser_class_specifier, cp_parser_class_head,
1761 cp_parser_lookup_name,
1762 cp_parser_constructor_declarator_p): Likewise.
1763 * pt.c (instantiate_class_template,
1764 resolve_typename_type): Likewise.
1766 2005-01-03 Volker Reichelt <reichelt@igpm.rwth-aaachen.de>
1769 * parser.c (cp_parser_unqualified_id): Do not issue error message
1770 for typedef-name as destructor declarator when performing an
1771 uncommitted tentative parse.
1773 2005-01-01 Steven Bosscher <stevenb@suse.de>
1776 * decl.c (finish_function): Fix comment. Annotate the compiler
1777 generated return with the current file name and line 0.
1779 2004-12-31 Richard Henderson <rth@redhat.com>
1782 * call.c (make_temporary_var_for_ref_to_temp): Set DECL_IGNORED_P.
1783 * class.c (build_vtable): Don't conditionallize setting it
1784 based on DWARF2_DEBUG.
1785 (layout_class_type): Set DECL_IGNORED_P.
1786 * decl2.c (get_guard): Likewise.
1787 * rtti.c (get_tinfo_decl, build_lang_decl): Likewise.
1788 * tree.c (build_local_temp): Likewise.
1790 2004-12-30 Mark Mitchell <mark@codesourcery.com>
1792 * cp-tree.h (cp_declarator): Split "name" field into
1793 qualifying_scope and unqualified_name.
1794 * decl.c (get_scope_of_declarator): Adjust accordingly.
1795 (grokdeclarator): Likewise.
1796 * decl2.c (grokfield): Likewise, and adjust call to
1797 do_class_using_decl.
1798 * name-lookup.c (do_class_using_decl): Split "decl" into
1799 "scope" and "name". Remove unnecessary code.
1800 * name-lookup.h (do_class_using_decl): Adjust declaration.
1801 * parser.c (make_id_declarator): Split "id" into qualifying_scope
1802 and unqualified_name.
1803 (cp_parser_using_declaration): Adjust call to do_class_using_decl.
1804 (cp_parser_direct_declarator): Adjust to handle the fact that
1805 cp_parser_declarator_id no longer returns a SCOPE_REF.
1806 (cp_parser_direct_declarator): Likewise.
1807 (cp_parser_declarator_id): Do not create a SCOPE_REF for qualified
1809 (cp_parser_member_declaration): Adjust call to make_id_declarator.
1810 (cp_parser_check_declarator_template_parameters): Do not expect a
1813 * decl.c (duplicate_decls): Call ggc_free on declarations we will
1814 not be needing any longer.
1817 * cvt.c (convert_to_void): Do not use STRIP_NOPs.
1819 2004-12-28 Richard Henderson <rth@redhat.com>
1822 * semantics.c (finish_asm_stmt): Resolve asm names. Validate input
1823 constraints. Mark memory inputs addressable.
1825 2004-12-27 Jason Merrill <jason@redhat.com>
1827 * decl.c (expand_static_init): Don't use shortcut if
1828 targetm.relaxed_ordering.
1830 2004-12-27 Mark Mitchell <mark@codesourcery.com>
1833 * decl.c (check_tag_decl): Robustify.
1835 2004-12-23 Mark Mitchell <mark@codesourcery.com>
1838 * parser.c (cp_parser_error): Issue better messages about
1839 #pragma in locations where it is not permitted.
1842 * pt.c (check_instantiated_args): Remove bogus SFINAE code.
1844 * cvt.c (convert_to_void): Fix typo in comment.
1846 2004-12-23 Alexandre Oliva <aoliva@redhat.com>
1849 * pt.c (check_explicit_specialization): Use the argument list from
1850 the definition in a template function specialization definition.
1852 2004-12-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1855 * pt.c (check_explicit_specialization): Use special logic to validate
1856 befriended specializations.
1858 2004-12-22 Mark Mitchell <mark@codesourcery.com>
1860 * rtti.c (emit_support_tinfos): Avoid using C99 semantics.
1863 * call.c (build_this): In templates, do not bother with
1865 * typeck.c (unary_complex_lvalue): In a template, always refuse
1869 * cp-gimplify.c (cp_genericize): Relax assertion.
1872 * cvt.c (convert_to_void): Warn about unused values.
1875 * rtti.c (emit_support_tinfos): On systems without weak symbols,
1876 emit the runtime library type-info objects as non-COMDAT.
1878 2004-12-21 Mark Mitchell <mark@codesourcery.com>
1881 * call.c (convert_like_real): Do not permit the use of a copy
1882 constructor to copy a packed field.
1885 * decl.c (grokdeclarator): Return error_mark_node, not
1886 void_type_node, to indicate errors.
1887 * parser.c (cp_parser_template_parameter_list): Robustify.
1888 (cp_parser_template_parameter): Likewise.
1891 * tree.c (cp_tree_equal): Handle OVERLOAD.
1893 2004-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1895 * decl.c (define_label): Use POP_TIMEVAR_AND_RETURN.
1896 * name-lookup.c (pushdecl_class_level): Likewise.
1898 2004-12-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1900 * name-lookup.c (pushtag): Add missing POP_TIMEVAR_AND_RETURN.
1902 2004-12-21 Andrew Pinski <pinskia@physics.uc.edu>
1905 * cp-gimplify.c (cp_genericize_r): Don't insert first but instead
1906 check to see if contains the pointer. Insert the statement before
1909 2004-12-21 Nathan Sidwell <nathan@codesourcery.com>
1912 * decl.c (check_initializer): Check string initializer of array is
1914 * cp-tree.h (PAREN_STRING_LITERAL_P): New.
1915 * semantics.c (finish_parenthesized_expr): Mark a STRING_CST.
1916 * error.c (dump_expr): <STRING_CST case> Add parens, if needed.
1918 * cp-tree.def (TEMPLATE_TYPE_PARM,
1919 BOUND_TEMPLATE_TEMPLATE_PARM, TYPE_OF_TYPE, TYPENAME_TYPE): Reorder
1920 for better code efficiency.
1921 * cp-tree.h (CLASS_TYPE_P): Short circuit IS_AGGR_TYPE check.
1922 (CAN_HAVE_FULL_LANG_DECL_P): Reorder for better optimization.
1923 (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P,
1924 INTEGRAL_OR_ENUMERATION_TYPE_P, SCALAR_TYPE_P,
1925 CP_AGGREGATE_TYPE_P, TYPE_PTROB_P, TYPE_REF_OBJ_P,
1926 TYPE_PTROBV_P): Likewise.
1929 * method.c (do_build_copy_constructor): Refactor. Don't const
1930 qualify a mutable field.
1931 (do_build_assign_ref): Likewise.
1933 2004-12-20 Matt Austern <austern@apple.com>
1936 * decl.c (make_rtl_for_nonlocal_decl): Use
1937 set_builtin_user_assembler_name.
1939 2004-12-19 Mark Mitchell <mark@codesourcery.com>
1941 * cp-tree.h (note_decl_for_pch): New function.
1942 * class.c (build_clone): Call note_decl_for_pch.
1943 * semantics.c (finish_member_declaration): Likewise.
1944 (note_decl_for_pch): New function.
1946 2004-12-17 Steven Bosscher <stevenb@suse.de>
1948 * init.c (build_zero_init): max_index is the number of
1951 2004-12-17 Nathan Sidwell <nathan@codesourcery.com>
1954 * class.c (add_method): Do not push conversion operators into a
1957 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE_TYPE): Reformat.
1958 * error.c (dump_decl): <TYPE_DECL case> Remove extraneous braces.
1960 2004-12-16 Nathan Sidwell <nathan@codesourcery.com>
1963 * cp-tree.h (integral_constant_value): Declare.
1964 * call.c (null_ptr_cst_p): Use integral_constant_value, not
1965 decl_constant_value.
1966 (convert_like_real): Likewise.
1967 * class.c (check_bitfield_decl): Likewise.
1968 * cvt.c (ocp_convert): Likewise.
1969 (convert): Remove unnecessary decl_constant_value call.
1970 * decl.c (compute_array_index_type): Use integral_constant_value,
1971 not decl_constant_value.
1972 (build_enumerator): Likewise.
1973 * decl2.c (grokfield): Likewise.
1974 * init.c (decl_constant_value): Simplify.
1975 (integral_constant_value): New.
1976 * pt.c (fold_decl_constant_value): Use integral_constant_value,
1977 remove subsequent check.
1978 (tsubst): Use integral_constant_value, not decl_constant_value.
1979 (tsubst_copy, unify): Likewise.
1980 * typeck.c (decay_conversion): Likewise.
1981 (build_compound_expr): Remove unnecessary decl_constant_value
1983 (build_static_cast_1, build_reinterpret_cast_1):
1984 (convert_for_assignment): Remove comment about not calling
1985 decl_constant_value.
1987 2004-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1990 * pt.c (instantiate_class_template): Set input_location for
1992 (tsubst_friend_function): Don't set input_location here.
1993 Make sure the context is complete if necessary.
1995 2004-12-15 Nathan Sidwell <nathan@codesourcery.com>
1998 * parser.c (cp_parser_lookup_name): Remove unneeded TYPENAME_TYPE
2001 2004-12-14 Mark Mitchell <mark@codesourcery.com>
2004 * decl.c (make_typename_type): Do not handle namespace-scoped
2006 (tag_name): Handle typename_type.
2007 (check_elaborated_type_specifier): Handle typenames.
2008 * parser.c (cp_parser_diagnose_invalid_type_name): Improve
2010 (cp_parser_elaborated_type_specifier): Use
2011 cp_parser_diagnose_invalid_type_name.
2013 2004-12-14 Andrew Pinski <pinskia@physics.uc.edu>
2016 * init.c (build_zero_init): If the max_index is 0, there is no
2017 need to create a RANGE_EXPR.
2019 2004-12-14 Mark Mitchell <mark@codesourcery.com>
2022 * cp-objcp-common.c (cp_expr_size): Loosen assertion.
2024 2004-12-14 Nathan Sidwell <nathan@codesourcery.com>
2027 * pt.c (tsubst_copy_and_build): <INDIRECT_REF case> Check that a
2028 REFERENCE_REF_P is dereferencing a reference type.
2029 * typeck.c (build_static_cast): Convert from reference even in a
2031 (build_reinterpret_cast, build_const_cast, build_c_cast): Likewise.
2033 2004-12-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2035 * parser.c (cp_parser_uncommitted_to_tentative_parse_p): New function.
2036 (cp_parser_name_lookup_error): Use it.
2037 (cp_parser_check_for_invalid_template_id): Likewise.
2038 (cp_parser_skip_to_closing_parenthesis): Likewise.
2039 (cp_parser_nested_name_specifier_opt): Likewise.
2040 (cp_parser_simple_declaration, cp_parser_template_id): Likewise.
2041 (cp_parser_parameter_declaration_list): Likewise.
2042 (cp_parser_parameter_declaration): Likewise.
2043 (cp_parser_template_name): Let cp_parser_simulate_error perform
2045 (cp_parser_committed_to_tentative_parse): Remove.
2047 2004-12-13 Andrew Pinski <pinskia@physics.uc.edu>
2050 * class.c (build_base_path): Convert the zero constant to the correct
2051 type when comparing.
2053 2004-12-13 Mark Mitchell <mark@codesourcery.com>
2056 * class.c (layout_class_type): Determine the visibility of static
2059 2004-12-12 Roger Sayle <roger@eyesopen.com>
2062 * cp-gimplify.c (gimplify_if_stmt): Optimize the case where the
2063 condition is a constant and the unexecuted clause is empty.
2065 2004-12-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2068 * parser.c (cp_parser_class_head): Reject typedef-name in class head.
2070 2004-12-09 Matt Austern <austern@apple.com>
2073 * name-lookup.c (do_nonmember_using_decl): A real function
2074 declaration takes precedence over an anticipated declaration.
2076 2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2078 * parser.c (cp_parser_member_declaration): Fix comment typo.
2080 2004-12-09 Alexandre Oliva <aoliva@redhat.com>
2083 * parser.c (cp_parser_template_id): Don't create a CPP_TEMPLATE_ID
2086 2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2089 * typeck.c (build_reinterpret_cast_1): Allow cast from vector type.
2091 2004-12-09 Nathan Sidwell <nathan@codesourcery.com>
2094 * init.c (build_zero_init): Build a RANGE_EXPR for an array
2097 2004-12-08 Kelley Cook <kcook@gcc.gnu.org>
2099 * typeck.c: Remove DOS line endings.
2101 2004-12-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2104 * decl.c (lookup_and_check_tag): Diagnose nested class with
2105 the same name as enclosing class.
2107 2004-12-08 Nathan Sidwell <nathan@codesourcery.com>
2110 * cp-tree.h (REFERENCE_REF_P): New.
2111 (CPTI_TYPE_INFO_TYPE): Rename to ...
2112 (CPTI_CONST_TYPE_INFO_TYPE): ... here.
2113 (CPTI_TYPE_INFO_REF_TYPE): Remove.
2114 (type_info_type_node): Rename to ...
2115 (const_type_info_type_node): ... here.
2116 (type_info_ref_type): Remove.
2117 * call.c (build_user_type_conversion): Reformat.
2118 (resolve_args): Do not convert_from_reference.
2119 (build_object_call): Call convert_from_reference.
2120 (prep_operand): Do not convert_from_reference.
2121 (build_new_method_call): Likewise.
2122 * class.c (build_vfield_ref): Likewise.
2123 * cvt.c (convert_to_reference): Likewise.
2124 (convert_from_reference): Build INDIRECT_REF here, not with
2126 (convert_force): Do not convert_from_reference.
2127 (build_expr_type_conversion): Likewise.
2128 * decl.c (grok_reference_init): Likewise.
2129 * decl2.c (delete_sanity): Likewise.
2130 * except.c (initialize_handler_parm): Use POINTER_TYPE_P.
2131 * init.c (build_dtor_call): Do not convert_from_reference.
2132 * parser.c (cp_parser_template_argument): Unwrap indirected
2133 reference. Allow TEMPLATE_PARM_INDEX as an object parm.
2134 * pt.c (tsubst_copy_and_build) <case INDIRECT_REF>: Use
2135 convert_from_reference, if indicated.
2136 <case CALL_EXPR>: Do not convert_from_reference.
2137 <case PARM_DECL, VAR_DECL>: Convert_from_reference if needed.
2138 (tsubst_initializer_list): Do not convert_from_reference.
2139 * rtti.c (init_rtti_processing): Adjust node creation.
2140 (throw_bad_typeid): Use const_type_info_type_node.
2141 Do not convert_from_reference.
2142 (typeid_ok_p): Use const_type_info_type_node.
2143 (build_typeid, get_typeid): Always return type_info typed node.
2144 (build_dynamic_cast_1): Dont convert_from_reference. Refactor.
2145 * semantics.c (finish_stmt_expr_expr): Do not
2146 convert_from_reference.
2147 (finish_id_expression): Convert_from_reference as appropriate.
2148 * typeck.c (decay_conversion): Do not convert_from_reference.
2149 (finish_class_member_access_expr): Likewise.
2150 (build_indirect_ref): Use POINTER_TYPE_P.
2151 (convert_arguments): Do not convert_from_reference.
2152 (build_modify_expr): Likewise.
2153 (convert_for_initialization): Likewise.
2154 * typeck2.c (build_x_arrow): Likewise.
2156 2004-12-07 Ziemowit Laski <zlaski@apple.com>
2158 * cp-tree.h (struct lang_type_class): Rename 'objc_protocols'
2159 field to 'objc_info'.
2161 2004-12-07 Kazu Hirata <kazu@cs.umass.edu>
2163 * pt.c: Replace a use of first_rtl_op with TREE_CODE_LENGTH.
2165 2004-12-07 Roger Sayle <roger@eyesopen.com>
2167 * name-lookup.c (leave_scope): We only need to update
2168 class_binding_level when leaving a class scope.
2170 2004-12-06 Ziemowit Laski <zlaski@apple.com>
2172 * cp-tree.h (struct lang_type_class): Add 'objc_protocols' field.
2174 2004-12-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2176 PR c++/17011, c++/17971
2177 * pt.c (tsubst_copy) <FIELD_DECL case>: Check and diagnose
2179 (tsubst_copy_and_build) <COMPONENT_REF case>: Check
2180 error_mark_node after member substitution.
2181 * semantics.c (finish_id_expression): Call
2182 finish_non_static_data_member for non-dependent FIELD_DECL.
2184 2004-12-03 Nathan Sidwell <nathan@codesourcery.com>
2187 * decl.c (grokdeclarator): Make sure class in pointer to member is
2190 2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
2193 * parser.c (cp_parser_new_type_id): Move array size expression
2194 checks from here ...
2195 * init.c (build_new): ... to here.
2197 2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
2200 * parser.c (cp_parser_class_head): Return NULL_TREE when
2201 push_template_decl fails. Update comment.
2203 2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2205 PR c++/15664, c++/18276
2206 * pt.c (tsubst_decl) <TEMPLATE_DECL case>: Reorganize. Correctly
2207 tsubst TEMPLATE_DECL that is a TEMPLATE_TEMPLATE_PARM.
2209 2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2212 * parser.c (cp_parser_type_specifier): Catch template declaration
2215 2004-12-01 Matt Austern <austern@apple.com>
2217 * name-lookup.c (namespace_binding): Omit alias check for global
2220 2004-12-01 Nathan Sidwell <nathan@codesourcery.com>
2223 * parser.c (cp_parser_class_name): Check decl's type is not
2227 * call.c (standard_conversion): Add FLAGS parameter. Do not allow
2228 derived to base conversion when checking constructor
2230 (implicit_conversion): Pass FLAGS to standard_conversion.
2231 (check_constructir_callable): Disallow conversion functions.
2233 2004-11-30 Kazu Hirata <kazu@cs.umass.edu>
2235 * parser.c: Fix comment typos.
2237 2004-11-27 Mark Mitchell <mark@codesourcery.com>
2240 * parser.c (cp_parser_check_for_definition_in_return_type): Take
2241 the defined type as a parameter, and inform the user about the
2242 possibility of a missing semicolon.
2243 (cp_parser_explicit_instantiation): Adjust call to
2244 cp_parser_check_for_definition_in_return_type.
2245 (cp_parser_init_declarator): Likewise.
2246 (cp_parser_member_declaration): Likewise.
2249 * cp-tree.def (TYPENAME_TYPE): Remove discussion of implicit
2250 typename from comments.
2251 * cp-tree.h (TYPENAME_IS_ENUM_P): New macro.
2252 (TYPENAME_IS_CLASS_P): Likewise.
2253 (make_typename_type): Change prototype.
2254 * decl.c (struct_typename_info): New type.
2255 (typename_compare): Expect the second argument to be a
2256 typename_info, not a tree.
2257 (build_typename_type): Add tag_type parameter. Do not create a
2258 new type until necessary.
2259 (make_typename_type): Add tag_type parameter.
2260 * error.c (TYPENAME_TYPE): Print tags other than "typename" if
2262 * friend.c (make_friend_class): Adjust call to make_typename_type.
2263 * parser.c (cp_parser_make_typename_type): Likewise.
2264 (cp_parser_primary_expression): Adjust call to
2265 cp_parser_lookup_name.
2266 (cp_parser_unqualified_id): Adjust calls to cp_parser_class_name.
2267 (cp_parser_class_or_namespace_name): Likewise.
2268 (cp_parser_postfix_expression): Adjust calls to
2270 (cp_parser_mem_initializer_id): Adjust calls to
2271 cp_parser_class_name.
2272 (cp_parser_type_parameter): Adjust calls to cp_parser_lookup_name.
2273 (cp_parser_template_name): Likewise.
2274 (cp_parser_template_argument): Likewise.
2275 (cp_parser_type_name): Adjust call to cp_parser_class_name.
2276 (cp_parser_elaborated_type_specifier): Adjust calls to
2277 make_typename_type and cp_parser_lookup_name.
2278 (cp_parser_namespace_name): Likewise.
2279 (cp_parser_class_name): Replace type_p parameter with tag_type.
2280 Adjust calls to make_typename_type and cp_parser_lookup_name.
2281 (cp_parser_class_head): Adjust calls to cp_parser_class_name.
2282 (cp_parser_base_specifier): Likewise.
2283 (cp_parser_lookup_name): Replace is_type parameter with tag_type.
2284 Adjust calls to make_typename_type and lookup_qualified_name.
2285 (cp_parser_lookup_name_simple): Adjust call to
2286 cp_parser_lookup_name.
2287 (cp_parser_constructor_declarator_p): Adjust call to
2288 cp_parser_class_name.
2289 * pt.c (convert_template_argument): Adjust all to
2291 (tsubst_decl): Do not pre-substitute the type of the declaration.
2292 (tsubst): Hand off declarations more quickly. Adjust call to
2296 * parser.c (cp_parser_postfix_dot_deref_expression): Robustify.
2298 2004-11-29 Daniel Jacobowitz <dan@codesourcery.com>
2301 * Make-lang.in (cp/decl2.o): Update dependencies.
2302 * decl2.c (finish_file): Call maybe_apply_pending_pragma_weaks.
2304 2004-11-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2307 * name-lookup.c (pushtag): Change return type to tree.
2308 * cp-tree.h (pushtag): Adjust declaration.
2309 * decl.c (xref_tag, start_enum): Use return value of pushtag.
2310 * pt.c (push_template_decl_real): Return immediately if
2311 pushdecl_namespace_level returns error_mark_node.
2313 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
2315 * pt.c: Fix a comment typo.
2317 2004-11-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2319 Friend class name lookup 4/n
2320 * class.c (pushclass): Don't call cxx_remember_type_decls.
2321 * cp-tree.h (clear_anon_tags): Remove declaration.
2322 * decl.c (grokdeclarator): Don't call lookup_tag_reverse.
2323 * name-lookup.c (binding_entry_free, binding_table_free): Comment
2325 (binding_table_find_anon_type, binding_table_reverse_maybe_remap,
2326 binding_table_remove_anonymous_types, cxx_remember_type_decls,
2327 bt_print_entry, clear_anon_tags, follow_tag_typedef, lookup_tag,
2328 lookup_tag_reverse): Remove
2329 (begin_scope, leave_scope, kept_level_p, print_binding_level):
2330 Don't use type_decls field in cp_binding_level.
2331 (maybe_process_template_type_declaration, pushtag): Set
2332 CLASSTYPE_NESTED_UTDS directly.
2333 * name-lookup.h (binding_table_remove_anonymous_types,
2334 cxx_remember_type_decls, lookup_tag, lookup_tag_reverse): Remove
2336 (cp_binding_level): Remove type_decls field.
2338 2004-11-26 Kazu Hirata <kazu@cs.umass.edu>
2340 * typeck.c: Fix a comment typo.
2342 2004-11-25 Mark Mitchell <mark@codesourcery.com>
2345 * class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with
2346 unknown_type as non matching. Tidy up.
2347 * pt.c (build_non_dependent_expr): Do not build a
2348 NON_DEPENDENT_EXPR for a VAR_DECL.
2351 * cp-tree.h (lvalue_or_else): Remove declaration.
2352 * tree.c (lvalue_or_else): Remove.
2353 * typeck.c (build_unary_op): Adjust call to lvalue_or_else.
2354 (build_modify_expr): Likewise.
2357 * decl.c (duplicate_decls): Return error_mark_node on error, as
2361 * decl.c (grokvardecl): Keep track of whether or not a there was
2362 explicit qualification.
2363 * name-lookup.c (set_decl_namespace): Complain about explicit
2364 qualification of a name within its own namespace.
2367 * typeck.c (check_return_expr): Robustify.
2369 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2371 Friend class name lookup 3/n, PR c++/3332
2372 * name-lookup.c (push_inner_scope, pop_inner_scope): New functions.
2373 (lookup_type_scope): Don't deal with name from user declaration
2375 * name-lookup.h (push_inner_scope, pop_inner_scope): Add declarations.
2376 * parser.c (cp_parser_class_specifier): Use push_inner_scope and
2379 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2381 Friend class name lookup 2/n, PR c++/14513, c++/15410
2382 * name-lookup.c (lookup_name_real): Simplify.
2383 (lookup_type_scope): Add SCOPE parameter. Handle friend class
2385 * name-lookup.h (tag_scope): New enum type.
2386 (lookup_type_scope): Adjust declaration.
2387 * decl.c (lookup_and_check_tag, xref_tag, xref_tag_from_type):
2388 Change bool parameter GLOBALIZED to TAG_SCOPE parameter SCOPE.
2389 (start_enum): Likewise. Add assertion test that NAME is
2390 IDENTIFIER_NODE. Use anonymous name for dummy ENUMERAL_TYPE in
2392 * cp-tree.h (xref_tag, xref_tag_from_type): Adjust declarations.
2393 * parser.c (cp_parser_elaborated_type_specifier,
2394 cp_parser_class_head): Adjust call to xref_tag.
2395 * pt.c (lookup_template_class, instantiate_class_template):
2397 * rtti.c (init_rtti_processing, build_dynamic_cast_1,
2398 tinfo_base_init, emit_support_tinfos): Likewise.
2400 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
2402 * g++spec.c, lex.c: Avoid ` as left quote in diagnostics.
2404 2004-11-24 Mark Mitchell <mark@codesourcery.com>
2407 * name-lookup.c (supplement_binding): Do not allow typedefs to be
2408 redefined in class scope.
2411 * parser.c (cp_parser_set_decl_type_spec): Do not try to allow
2412 redefinitions of builtin types other that "bool" or "wchar_t".
2414 2004-11-24 Steven Bosscher <stevenb@suse.de>
2416 * decl.c (cxx_init_decl_processing): Don't clear
2417 flag_inline_functions.
2419 2004-11-24 Mark Mitchell <mark@codesourcery.com>
2421 * pt.c (tsubst_function_type): Do not permit function types which
2422 return arrays or functions.
2425 * parser.c (cp_parser_init_declarator): Do not pop scope twice.
2428 * cp-tree.h (CTOR_NAME): Remove.
2429 (DTOR_NAME): Remove.
2430 * decl.c (initialize_predefined_identifiers): Add spaces to the
2431 end of constructor and destructor names.
2433 2004-11-24 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2436 * decl.c (start_decl): Check for invalid specialization headers.
2438 2004-11-24 Paolo Bonzini <bonzini@gnu.org>
2442 * call.c (standard_conversion): Move check for conversions between
2444 * typeck.c (ptr_reasonably_similar): ... here.
2446 2004-11-23 Ben Elliston <bje@au.ibm.com>
2448 * cp-tree.h (context_as_string): Remove extern.
2449 * error.c (context_as_string): Remove.
2451 * cp-tree.h (cp_type_qual_from_rid): Remove extern.
2452 * lex.c (cp_type_qual_from_rid): Remove.
2454 * cp-tree.h (do_poplevel): Remove extern.
2455 (check_multiple_declarators): Likewise.
2456 * semantics.c (do_poplevel): Make static.
2457 (check_multiple_declarators): Remove.
2459 * cp-tree.h (check_final_overrider): Remove extern.
2460 * search.c (check_final_overrider): Make static.
2462 * cp-tree.h (build_artificial_parm): Remove extern.
2463 * decl2.c (build_artificial_parm): Make static.
2465 2004-11-22 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2468 * typeck.c (build_unary_op) <CONVERT_EXPR, NEGATE_EXPR>: Unify code.
2469 Make sure the result is always a rvalue.
2471 2004-11-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2473 * decl.c (start_preparsed_function): Call check_function_type even
2475 (require_complete_types_for_parms): Skip dependent types.
2476 (check_function_type): Likewise.
2478 2004-11-16 Steven Bosscher <stevenb@suse.de>
2480 * Make-lang.in (cp/decl.o, cp/search.o): Don't depend on stack.h.
2481 * search.c: Don't include it.
2483 2004-11-15 Andrew Pinski <pinskia@physics.uc.edu>
2485 * cp-gimplify.c: Include pointer-set.h
2486 (cp_genericize_r): Use pointer_sets instead of a hashtable.
2487 Also instert the new statement for CLEANUP_STMT.
2488 (cp_genericize): Use pointer_sets instead of a hashtable.
2489 * Make-lang.in (cp-gimplify.o): Depend on pointer-set.h.
2491 2004-11-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2493 Friend class name lookup 1/n, PR c++/18471
2494 * decl.c (lookup_and_check_tag): New function.
2495 (xref_tag, start_enum): Use it.
2496 (check_elaborated_type_specifier): Move TEMPLATE_TYPE_PARM check
2497 before !DECL_IMPLICIT_TYPEDEF_P. Also display previously declared
2499 * name-lookup.c (lookup_name_current_level): Rename to ...
2500 (lookup_name_innermost_nonclass_level): ... this.
2501 (lookup_type_scope): New function.
2502 * name-lookup.h (lookup_name_current_level): Rename to ...
2503 (lookup_name_innermost_nonclass_level): ... this.
2504 (lookup_type_scope): Add declaration.
2506 2004-11-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2509 * pt.c (coerce_template_parms): Only emit error message about
2510 invalid template argument when TF_ERROR.
2512 2004-11-12 Mark Mitchell <mark@codesourcery.com>
2515 * decl.c (start_decl): Make sure to set *pop_scope_p. Return
2516 error_mark_node to indicate errors.
2519 * parser.c (cp_parser_direct_declarator): Disallow non-constant
2520 array bounds when not inside a function.
2523 * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an
2524 unqualified name resolves to a member function.
2527 * pt.c (tsubst_copy_and_build): Handle qualified names used from a
2528 derived class correctly.
2530 * decl2.c (import_export_decl): Fix typo in comment.
2531 * tree.c (pod_type_p): Likewise.
2533 2004-11-10 Andrew Pinski <pinskia@physics.uc.edu>
2535 * typeck.c (cxx_mark_addressable): Add braces around the first if.
2537 2004-11-10 Adam Nemet <anemet@lnxw.com>
2540 * typeck.c (cxx_mark_addressable): Issue an error if address of an
2541 explicit register variable is requested.
2543 2004-11-10 Nathan Sidwell <nathan@codesourcery.com>
2546 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK): New.
2547 (struct lang_decl_flags): Add thunk_p flag.
2548 (struct lang_decl): Remove separate fixed_offset. Place
2549 cloned_function and fixed_offset into union.
2550 (DECL_CLONED_FUNCTION_P, DECL_CLONED_FUNCTION): Adjust.
2551 (DECL_THUNK_P, SET_DECL_THUNK_P): Adjust.
2552 (THUNK_FIXED_OFFSET): Adjust.
2553 * method.c (make_thunk): Adjust.
2555 2004-11-09 Mark Mitchell <mark@codesourcery.com>
2558 * init.c (build_new_1): Handle parenthesized type-ids that name an
2561 2004-11-09 Joseph S. Myers <joseph@codesourcery.com>
2563 * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
2564 pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
2565 quoting in diagnostics.
2566 * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
2567 quoting in printf format.
2568 * decl.c (duplicate_decls, start_decl): Use %qD instead of
2571 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
2573 * class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c,
2574 search.c, typeck2.c: Fix comment formatting.
2576 2004-11-04 Ulrich Weigand <uweigand@de.ibm.com>
2578 PR tree-optimization/18184
2579 * cp-objcp-common.c (cxx_types_compatible_p): Do not treat pointers
2580 of different modes or alias-all flags as equivalent.
2581 * typeck.c (comptypes): Likewise.
2583 2004-11-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2586 * cp-tree.h (TYPE_REF_OBJ_P): New macro.
2587 (TYPE_PTR_P, TYPE_PTROB_P, TYPE_PTROBV_P, TYPE_PTRFN_P,
2588 TYPE_REFFN_P): Document.
2589 (fold_decl_constant_value): New prototype.
2590 * pt.c (convert_nontype_argument_function): Rewrite and extract
2592 (fold_decl_constant_value, convert_nontype_argument_function): New.
2593 (lookup_template_class): Add comment about useless double call.
2594 * mangle.c (write_expression): Strip conversions before lowering
2596 * cvt.c (ocp_convert): Check LOOKUP_COMPLAIN for a pedwarn. Disallow
2597 enum to enum conversion.
2599 2004-11-02 Mark Mitchell <mark@codesourcery.com>
2602 * parser.c (cp_parser_type_parameter): Robustify.
2605 * parser.c (cp_parser_single_declaration): Disallow template
2609 * typeck.c (build_const_cast): Use error_operand_p.
2611 2004-11-02 Ziemowit Laski <zlaski@apple.com>
2613 * cp-lang.c (cxx_types_compatible_p): Remove prototype and definition.
2614 (LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h.
2615 * cp-objcp-common.c (cxx_types_compatible_p): Moved definition here
2617 * cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here
2619 (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c.
2621 2004-11-01 Nathan Sidwell <nathan@codesourcery.com>
2624 * search.c (check_final_overrider): Deprecate gnu covariant extension.
2626 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2628 Convert diagnostics to use quoting flag q 9/n
2629 * typeck.c (build_x_unary_op, convert_member_func_to_ptr,
2630 get_delta_difference): Use new quotation style.
2631 * repo.c (reopen_repo_file_for_write): Likewise.
2632 * pt.c (do_type_instantiation): Likewise.
2633 * parser.c (cp_parser_diagnose_invalid_type_name):
2634 * name-lookup.c (push_overloaded_decl, set_decl_namespace):
2635 * error.c (cp_print_error_function,
2636 print_instantiation_full_context): Likewise.
2637 * decl.c (define_label, grok_reference_init,
2638 maybe_deduce_size_from_array_init, revert_static_member_fn):
2639 * decl2.c (check_classfn): Likewise.
2640 * class.c (add_method, check_field_decls, layout_class_type,
2641 resolve_address_of_overloaded_function): Likewise.
2642 * call.c (build_x_va_arg, build_over_call): Likewise.
2644 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2646 Convert diagnostics to use quoting flag q 8/n
2647 * cvt.c (cp_convert_to_pointer, warn_ref_binding,
2648 convert_to_reference, ocp_convert, convert_to_void
2649 cp_convert_to_pointer): Use new quotation style.
2651 2004-10-31 Mark Mitchell <mark@codesourcery.com>
2654 * typeck2.c (store_init_value): Use split_nonconstant_init even
2655 for types that require construction.
2657 1004-10-28 Matt Austern <austern@apple.com>
2660 * cp-tree.h (class_key_or_enum_as_string): Declare.
2661 * error.c (class_key_or_enum): Rename to class_key_or_enum_as_string
2662 and remove static qualifier.
2663 * decl.c (shadow_tag): Warn about ignored attributes in class/struct/
2664 union/enum declaration.
2666 2004-10-29 Kazu Hirata <kazu@cs.umass.edu>
2668 * pt.c: Fix a comment typo.
2670 2004-10-28 Nathan Sidwell <nathan@codesourcery.com>
2672 * typeck.c (composite_pointer_type): Remove comment about DR 195.
2673 (build_reinterpret_cast_1): Revert DR195 patch. Only emit a
2674 warning when being pedantic.
2675 (build_reinterpet_cast, build_c_cast): Adjust.
2677 2004-10-29 Mark Mitchell <mark@codesourcery.com>
2680 * decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they
2681 appear in a constructor/destructor that will be cloned.
2683 1004-10-28 Matt Austern <austern@apple.com>
2686 * decl.c (finish_enum): Handle packed attribute.
2687 * parser.c (cp_parser_enum_specifier): Process trailing attributes.
2689 2004-10-28 Mark Mitchell <mark@codesourcery.com>
2692 * pt.c (instantiate_class_template): Increment
2693 processing_template_decl when substituting into a member class
2696 2004-10-27 Mark Mitchell <mark@codesourcery.com>
2699 * call.c (convert_like_real): Fix formatting.
2700 (initialize_reference): When binding a temporary to a base class,
2701 ensure that the nominal copy made is to the derived class, not the
2705 * parser.c (cp_parser_next_token_ends_template_argument_p): Do not
2708 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
2710 * decl.c (bad_specifiers): Move the q after the %.
2712 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
2714 * parser.c (cp_parser_diagnose_invalid_type_name): Move the q after
2717 2004-10-26 Mark Mitchell <mark@codesourcery.com>
2719 * name-lookup.c (do_namespace_alias): Use FROB_CONTEXT.
2720 * search.c (current_scope): Fix prototype.
2723 * search.c (current_scope): Return the innermost non-block scope,
2724 not the innermost non-block, non-namespace scope.
2725 (at_namespace_scope_p): Adjust accordingly.
2726 (dfs_accessible_post): Do not pass namespaces to is_friend.
2727 (dfs_walk_once_accessible_r): Likewise.
2728 * decl.c (grokvardecl): Adjust call to current_scope.
2729 (build_enumerator): Likewise.
2730 * parser.c (cp_parser_using_declaration): Likewise.
2731 (cp_parser_direct_declarator): Use at_namespace_scope_p instead of
2733 (cp_parser_class_head): Adjust call to current_scope.
2734 * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
2738 * pt.c (tusbst_copy_and_build): Resolve enumeration constants to
2739 their underlying values.
2742 * typeck.c (build_binary_op): Honor build_type, even when in a
2745 2004-10-26 Nathan Sidwell <nathan@codesourcery.com>
2747 * parser.c (cp_lexer_get_preprocessor_token): Remove unneeded
2748 padding token checking.
2750 2004-10-25 Andrew Pinski <pinskia@physics.uc.edu>
2753 * decl.c (grokdeclarator) <case cdk_array>: Remove the call
2754 layout_type as it is already done by create_array_type_for_decl.
2756 2004-10-22 Nathan Sidwell <nathan@codesourcery.com>
2759 * parser.c (eof_token): Make const, correctly initialize rid and
2761 (struct cp_lexer): Replace buffer_end pointer with buffer_length
2763 (cp_lexer_new_main): Directly grow lexer's buffer here. Don't
2765 (cp_lexer_new_from_tokens): Adjust.
2766 (cp_lexer_grow_buffer): Remove.
2767 (cp_lexer_peek_nth_token, cp_lexer_consume_token,
2768 cp_lexer_purge_token): Add const casts.
2770 2004-10-21 Mark Mitchell <mark@codesourcery.com>
2774 * cp-tree.h (convert_to_base): Change prototype.
2775 (build_ptrmemfunc): Likewise.
2776 (convert_ptrmem): New function.
2777 * call.c (struct conversion): Adjust documentation for base_p.
2778 (standard_conversion): Set base_p for ck_pmem conversions as
2780 (convert_like_real): Use convert_to_base for ck_pmem and ck_ptr
2782 * class.c (convert_to_base): Handle both pointers and objects.
2783 Add nonnull parameter.
2784 (build_vfield_ref): Adjust call to convert_to_base.
2785 * cvt.c (cp_convert_to_pointer): Adjust call to build_ptrmemfunc.
2786 (convert_force): Likewise.
2787 * typeck.c (build_unary_op): Likewise.
2788 (convert_ptrmem): New function.
2789 (build_static_cast_1): Use it.
2790 (build_reinterpret_cast): Allow conversions to vector types.
2791 (get_delta_difference): Add c_cast_p parameter.
2792 (build_ptrmemfunc): Likewise. Adjust calls to
2793 get_delta_difference.
2795 2004-10-21 Andrew Pinski <pinskia@physics.uc.edu>
2798 * error.c (cp_error_at): Output the context as it might be
2799 different file as the other location.
2801 2004-10-21 Kazu Hirata <kazu@cs.umass.edu>
2803 * typeck.c: Fix a comment typo.
2805 2004-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2808 * decl.c (make_unbound_class_template): Add PARM_LIST parameter.
2809 * cp-tree.h (make_unbound_class_template): Adjust prototype.
2810 * parser.c (cp_parser_lookup_name): Adjust call to
2811 make_unbound_class_template.
2812 (cp_parser_single_declaration): Handle member class of class
2813 template as template friend parsing correctly.
2814 * friend.c (is_friend): Call is_specialization_of_friend for
2815 template friend class.
2816 (make_friend_class): Handle member class of class template as
2818 * pt.c (is_specialization_of_friend): Likewise.
2819 (instantiate_class_template): Likewise.
2820 (tsubst): Adjust call to make_unbound_class_template.
2822 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
2824 * typeck.c (composite_pointer_type): Add comment about DR 195
2825 (build_reinterpret_cast_1): Add for_reinterpret_cast_p parameter.
2826 Allow function pointer conversions that DR195 suggests.
2827 (build_reinterpret_cast, build_c_cast): Update
2828 build_reinterpret_cast_1 calls.
2830 2004-10-20 Kazu Hirata <kazu@cs.umass.edu>
2832 * call.c, typeck.c: Fix comment typos.
2834 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
2836 * parser.c (cp_token_position): New typedef. Define VEC thereof.
2837 (struct cp_lexer): Allow buffer and buffer_end to be NULL. Make
2838 next_token and last_token cp_token_position. Make saved_tokens a
2839 VEC(cp_token_position).
2840 (eof_token): New static variable.
2841 (CP_SAVED_TOKENS_SIZE): Rename to ...
2842 (CP_SAVED_TOKEN_STACK): ... here.
2843 (cp_lexer_new_main): Adjust main lexer creation and buffer
2845 (cp_lexer_new_from_tokens): Do not copy the tokens, merely point
2846 to the parent buffer. Do not append eof token.
2847 (cp_lexer_destroy): Only free buffer if non-NULL. Free token
2849 (cp_lexer_next_token, cp_lexer_prev_token): Remove.
2850 (cp_lexer_token_position, cp_lexer_token_at): New.
2851 (cp_lexer_saving_tokens): Adjust. Make inline.
2852 (cp_lexer_advance_token, cp_lexer_token_difference): Remove.
2853 (cp_lexer_peek_token_emit_debug_info): Fold into ...
2854 (cp_lexer_peek_token): ... here.
2855 (cp_lexer_peek_nth_token): Don't peek past EOF.
2856 (cp_lexer_consume_token): Set next_token to eof_token, if reaching
2858 (cp_lexer_purge_token): Adjust eof setting.
2859 (cp_lexer_purge_tokens_after): Likewise.
2860 (cp_lexer_save_tokens): Push next_token directly.
2861 (cp_lexer_commit_tokens): Adjust.
2862 (cp_lexer_rollback_tokens): Pop next_token directly.
2863 (cp_parser_check_for_invalid_template_id): Adjust token purging.
2864 (cp_parser_translation_unit): Do not consume the EOF.
2865 (cp_parser_nested_name_specifier_opt): Adjust token purging.
2866 (cp_parser_template_id, cp_parser_template_name): Likewise.
2868 2004-10-19 Mark Mitchell <mark@codesourcery.com>
2871 * call.c (struct conversion): Add base_p.
2872 (convert_like): Add c_cast_p argument.
2873 (convert_like_with_conversion): Likewise.
2874 (build_conv): Clear base_p.
2875 (standard_conversion): Set it, for derived-to-base conversions.
2876 (convert_like_real): Add c_cast_p parameter. Handle pointer
2877 conversions directly rather than relying on ocp_convert.
2878 (perform_direct_initialization_if_possible): Add c_cast_p
2880 * cp-tree.h (perform_direct_initialization_if_possible): Change
2882 (convert_member_func_to_ptr): New function.
2883 * typeck.c (check_for_casting_away_constness): Add diag_fn
2885 (build_static_cast_1): New function, split out from ...
2886 (build_static_cast): ... here. Use build_static_cast_1.
2887 (build_reinterpret_cast_1): New function, split out from ...
2888 (build_reinterpret_cast): ... here. Use build_reinterpret_cast_1.
2889 (build_const_cast_1): New function, split out from ...
2890 (build_const_cast): ... here. Use build_const_cast_1.
2891 (build_c_cast): Rewrite to use build_const_cast_1,
2892 build_static_cast_1, and build_reinterpret_cast_1.
2893 (convert_member_func_to_ptr): New function.
2895 2004-10-19 Paolo Bonzini <bonzini@gnu.org>
2898 * parser.c (enum cp_parser_prec): Give relational expressions
2899 a higher precedence than equality expressions.
2901 2004-10-15 Nathan Sidwell <nathan@codesourcery.com>
2903 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call.
2904 (ACCESSIBLY_UNIQUELY_DERIVED_P): Remove.
2905 (PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call.
2906 (enum base_access): Reorganize.
2907 (accessible_base_p, accessible_p): Add consider_local_p parameter.
2908 * call.c (standard_conversion): Update comment about
2910 (enforce_access): Adjust accessible_p call.
2911 (build_over_call): Adjust accessible_base_p call.
2912 * class.c (convert_to_base): Adjust lookup_base call.
2913 (build_vtbl_ref_1): Likewise.
2914 (warn_about_ambiguous_bases): Likewise. Add early exit.
2915 * cvt.c (convert_to_pointer_force) Adjust lookup_base call.
2916 * search.c (accessible_base_p): Add consider_local_p parameter.
2917 (lookup_base): Pass consider_local_p to accessible_base_p call.
2918 (friend_accessible_p): Check whether scope is a class member.
2919 Remove unnecessary class template check.
2920 (accessible_p): Add consider_local_p parameter. Use it.
2921 (adjust_result_of_qualified_name_lookup): Adjust lookup_base call.
2922 * tree.c (maybe_dummy_object): Likewise.
2923 * typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P.
2924 (build_class_member_access_expr): Adjust lookup_base call.
2925 * typeck2.c (binfo_or_else): Likewise.
2926 * rtti.c (build_dynamic_cast_1): Access can consider friendship
2929 2004-10-17 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2932 * decl2.c (grokfield): Apply attributes also to TYPE_DECLs.
2934 2004-10-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2937 * parser.c (cp_parser_parenthesized_expression_list): Fold
2938 non-dependent expressions in attribute lists.
2940 2004-10-15 Mark Mitchell <mark@codesourcery.com>
2943 * decl.c (declare_global_var): Use the return value from pushdecl.
2946 * parser.c (cp_parser_simple_declaration): Do not diagnose invalid
2947 type names if we have already found a valid type.
2948 (cp_parser_member_declaration): Likewise.
2951 * parser.c (cp_parser_member_specification_opt): Handle
2954 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
2956 * dump.c, g++spec.c, repo.c: Update copyright.
2958 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
2960 * decl.c: Fix a comment typo.
2962 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
2965 * name-lookup.c (parse_using_directive): If we have a
2966 error_mark_node, do not set the decl namespace associations
2969 2004-10-14 Mark Mitchell <mark@codesourcery.com>
2972 * decl.c (cp_finish_decl): Do not call expand_static_init more
2973 than once for a single variable.
2975 2004-10-14 Matt Austern <austern@apple.com>
2977 * Make-lang.in (pt.o): depends on pointer-set.h
2978 * cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now.
2979 * pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t
2980 (for_each_template_parm): Convert from htab_t to pointer_set_t.
2981 * tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now.
2983 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
2986 * semantics.c (finish_for_expr): Convert expression to void
2987 so that we don't create temporaries for a?b:c.
2989 2004-10-13 Kazu Hirata <kazu@cs.umass.edu>
2991 * search.c: Fix a comment typo.
2993 2004-10-12 Nathan Sidwell <nathan@codesourcery.com>
2995 * class.c (dfs_modify_vtables): Simplify condition. Return
2996 dfs_skip_bases as appropriate.
2997 (modify_all_vtables): Walk in pre-order.
2998 * search.c (dfs_walk_all, dfs_walk_once_r,
2999 dfs_walk_once_accessible_r): Assert post order function never
3000 returns dfs_skip_bases.
3002 * search.c (struct lookup_base_data_s): New.
3003 (lookup_base_r): Replace with ...
3004 (dfs_lookup_base): ... this.
3005 (lookup_base): Use dfs_walk_all.
3007 2004-10-12 Kazu Hirata <kazu@cs.umass.edu>
3009 * search.c: Fix comment typos.
3011 2004-10-11 Mark Mitchell <mark@codesourcery.com>
3014 * parser.c (cp_parser_declarator): Add member_p parameter.
3015 (cp_parser_condition): Adjust calls to cp_parser_declarator.
3016 (cp_parser_explicit_instantiation): Likewise.
3017 (cp_parser_init_declarator): Likewise.
3018 (cp_parser_direct_declarator): Add member_p parameter. Do not
3019 parse tentatively when parsing the parameters to a member.
3020 (cp_parser_type_id): Adjust calls to cp_parser_declarator.
3021 (cp_parser_parameter_declaration): Likewise.
3022 (cp_parser_member_declaration): Likewise.
3023 (cp_parser_exception_declaration): Likewise.
3026 * cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment.
3027 * pt.c (optimize_specialization_lookup_p): Do not optimize lookups
3028 for members of partial or explicit specializations.
3031 * decl2.c (finish_anon_union): Robustify.
3033 2004-10-11 Nathan Sidwell <nathan@codesourcery.com>
3035 * cp-tree.h (get_dynamic_cast_base_type): Rename to ...
3036 (dcast_base_hint): ... here.
3037 * rtti.c (build_dynamic_cast_1): Use dcast_base_hint.
3038 * search.c (struct dcast_data_s): New.
3039 (dynamic_cast_base_recurse): Remove. Replace with ...
3040 (dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New.
3041 (get_dynamic_cast_base_type): Rename to ...
3042 (dcast_base_hint): ... here. Use dfs_walk_once_accessible.
3043 (accessible_r): Remove.
3044 (dfs_accessible_post): New, broken out of accessible_r.
3045 (accessible_p): Use dfs_walk_once_accessible.
3046 (dfs_walk_once_accessible_r): New. From accessible_r.
3047 (dfs_walk_once_accessible): New. From acessible_p.
3049 * cp-tree.h (SAME_BINFO_TYPE_P): New.
3050 * class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare
3052 (convert_to_base_statically, determine_primary_bases,
3053 update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits,
3054 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
3055 accumulate_vtbl_inits, dfs_accumulate_vtbl_inits,
3056 build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise.
3057 * init.c (expand_member_init): Likewise.
3058 * search.c (lookup_base_r, dynamic_cast_base_recurse,
3059 binfo_via_virtual, copied_binfo, binfo_for_vbase,
3060 original_binfo): Likewise.
3061 * tree.c (copy_binfo): Likewise.
3063 2004-10-11 Kazu Hirata <kazu@cs.umass.edu>
3065 * semantics.c: Fix comment typos.
3067 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
3072 * semantics.c (maybe_cleanup_point_expr): Call
3073 fold_build_cleanup_point_expr.
3074 (maybe_cleanup_point_expr_void): New function.
3075 (add_decl_expr): Call maybe_cleanup_point_expr_void.
3076 (finish_expr_stmt): Likewise.
3077 (finish_return_stmt): Likewise.
3078 (finish_for_expr): Likewise.
3079 (finish_asm_stmt): Likewise.
3080 * typeck.c (condition_conversion): Call
3081 fold_build_cleanup_point_expr.
3083 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
3086 * semantics.c (add_decl_expr): If the decl has a size which
3087 has side effects then the decl expression needs a cleanup point.
3089 2004-10-10 Mark Mitchell <mark@codesourcery.com>
3092 * decl.c (grokdeclarator): Robustify error-recovery on invalid
3095 2004-10-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
3097 Convert diagnostics to use quoting flag q 7/n
3098 * typeck.c (composite_pointer_type_r, composite_pointer_type,
3099 cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr,
3100 string_conv_p, build_class_member_access_expr,
3101 build_class_member_access_expr, lookup_destructor,
3102 finish_class_member_access_expr, build_indirect_ref,
3103 get_member_function_from_ptrfunc, build_function_call,
3104 convert_arguments, build_binary_op, pointer_diff, build_unary_op,
3105 check_for_casting_away_constness, build_static_cast,
3106 build_reinterpret_cast, build_const_cast, build_c_cast,
3107 build_modify_expr, get_delta_difference, build_ptrmemfunc,
3108 dubious_conversion_warnings, convert_for_assignment,
3109 convert_for_initialization,
3110 maybe_warn_about_returning_address_of_local, check_return_expr):
3113 * typeck2.c (error_not_base_type, readonly_error,
3114 abstract_virtuals_error, cxx_incomplete_type_diagnostic,
3115 store_init_value, digest_init, build_x_arrow,
3116 build_m_component_ref, require_complete_eh_spec_types): Likewise.
3118 * tree.c (cp_build_qualified_type_real,
3119 handle_java_interface_attribute, handle_init_priority_attribute):
3122 * semantics.c (finish_asm_stmt, finish_non_static_data_member,
3123 finish_pseudo_destructor_expr,
3124 check_template_template_default_arg, begin_class_definition,
3125 finish_base_specifier, qualified_name_lookup_error,
3126 finish_id_expression, finish_typeof): Likewise.
3128 * search.c (lookup_base, check_final_overrider,
3129 look_for_overrides_r): Likewise.
3131 * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise.
3133 2004-10-09 Mark Mitchell <mark@codesourcery.com>
3136 * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a
3140 * init.c (build_new): Correct comments.
3141 * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in
3145 * parser.c (cp_parser_postfix_dot_deref_expression): If the
3146 pseduo-destructor-name production does not work, fall back to the
3147 ordinary production.
3150 * tree.c (cp_tree_equal): Handle a BASELINK.
3153 * cp-tree.h (check_var_type): New function.
3154 * decl.c (check_var_type): New function, split out from ...
3155 (grokdeclarator): ... here.
3156 * pt.c (tsubst_decl): Use check_var_type.
3159 * decl.c (grokdeclarator): Disallow declarations of operators as
3162 2004-10-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3165 * error.c (dump_expr): Add missing case for RDIV_EXPR.
3167 2004-10-08 Kazu Hirata <kazu@cs.umass.edu>
3169 * pt.c, search.c: Fix comment typos.
3171 2004-10-08 Nathan Sidwell <nathan@codesourcery.com>
3173 * cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp,
3175 (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New.
3176 * class.c (struct find_final_overrider_data): Remove most_derived,
3177 vpath_list and vpath fields. Add path field.
3178 (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust.
3179 (dfs_find_final_overrider): Rename to ...
3180 (dfs_find_final_overrider_pre): ... here. Adjust.
3181 (dfs_find_final_overrider_post): Adjust.
3182 (dfs_find_final_overrider_q): Fold into
3183 dfs_find_final_overrider_pre.
3184 (find_final_overrider): Adjust dfs searching.
3185 (dfs_modify_vtables): Don't mark binfo here.
3186 (modify_all_vtables): Use dfs_walk_once.
3187 (build_vtt_inits): Likwise. Use dfs_walk_all.
3188 (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here.
3189 Return dfs_skip_bases as appropriate.
3190 (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate.
3191 * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as
3192 appropriate. Don't mark binfo here.
3193 (initialize_vtbl_ptrs): Use dfs_walk_once.
3194 * search.c (struct vbase_info): Remove unused struct.
3195 (access_in_type): Use dfs_walk_once.
3196 (dfs_access_in_type): Don't mark binfo here.
3197 (dfs_accessible_queue_p, dfs_accessible_p) Remove.
3199 (accessible_r): ... here. New. Specialize dfs_walk_once.
3200 (accessible_p): Use accessible_r.
3201 (lookup_field_queue_p): Remove. Fold into ...
3202 (lookup_field_r): ... here. Adjust.
3203 (lookup_member): Use dfs_walk_all.
3204 (dfs_walk_real, dfs_walk): Replace with ...
3205 (dfs_walk_all, dfs_walk_once): ... these.
3206 (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once.
3207 (dfs_unmark, unmarkedp, markedp): Remove.
3208 (dfs_get_pure_virtuals): Don't mark binfo here.
3209 (get_pure_virtuals): Use dfs_walk_once.
3210 (dfs_debug_unmarked_p): Remove. Fold into ...
3211 (dfs_debug_mark): ... here.
3212 (note_debug_info_needed): Use dfs_walk_all.
3214 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
3216 * pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the
3217 CLEANUP_POINT_EXPR to get the asm expression.
3219 2004-10-07 Mark Mitchell <mark@codesourcery.com>
3221 * cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag.
3222 (DECL_MEMBER_TEMPLATE_P): New macro.
3223 (is_member_template): Remove.
3224 (class_method_index_for_fn): New function.
3225 * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P.
3226 * class.c (finish_struct_methods): Remove out-of-date comment.
3227 * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P.
3228 * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and
3229 class_method_index_for_fn.
3230 * pt.c (is_member_template): Remove.
3231 (is_member_template_class): Likewise.
3232 (optimize_specialization_lookup_p): New function.
3233 (retrieve_specialization): Optimize lookups for members that are
3234 not member templates.
3235 (register_specialization): Adjust accordingly.
3236 (build_template_decl): Add member_template_p parameter. Set
3237 DECL_MEMBER_TEMPLATE_P.
3238 (process_partial_specialization): Adjust call to
3239 retrieve_specialization.
3240 (push_template_decl_real): Determine whether the template is a
3242 (lookup_template_class): Use retrieve_specialization.
3243 (tsubst_decl): Adjust call to retrieve_specialization.
3244 (tsubst_exception_specification): New function.
3246 (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P.
3247 (instantiate_template): Adjust call to retrieve_specialization.
3248 (regenerate_decl_from_template): Do not actually generate a new
3250 (instantiate_decl): Adjust call to retrieve_specialization.
3251 (class_method_index_for_fn): New method.
3253 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
3255 * parser.c (cp_parser_asm_definition): Look passed the
3256 CLEANUP_POINT_EXPR to get the asm expression.
3258 2004-10-06 Andrew Pinski <pinskia@physics.uc.edu>
3261 * semantics.c (finish_asm_stmt): Asm expressions need cleanup
3264 2004-10-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
3266 Convert diagnostics to use quoting flag q 6/n
3267 * pt.c (finish_member_template_decl, check_specialization_scope,
3268 maybe_process_partial_specialization, determine_specialization,
3269 check_explicit_specialization, maybe_check_template_type,
3270 process_partial_specialization, check_default_tmpl_args,
3271 push_template_decl_real, redeclare_class_template,
3272 convert_nontype_argument, coerce_template_parms,
3273 lookup_template_class, push_tinst_level,
3274 instantiate_class_template, tsubst_arg_types,
3275 tsubst_function_type, tsubst, tsubst_qualified_id,
3276 tsubst_copy_and_build, check_instantiated_args,
3277 do_decl_instantiation, do_type_instantiation,
3278 invalid_nontype_parm_type_p, check_specialization_namespace,
3279 convert_template_argument, determine_specialization,
3280 check_template_shadow, tsubst_decl
3281 instantiate_pending_templates): Use quoting marks.
3283 2004-10-05 Nathan Sidwell <nathan@codesourcery.com>
3286 * parser.c (cp_parser_postfix_expression): Inhibit Koenig when
3287 unqualified lookup finds a member function.
3289 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3291 Convert diagnostics to use quoting flag q 5/n
3292 * parser.c (cp_parser_name_lookup_error,
3293 cp_parser_diagnose_invalid_type_name,
3294 cp_parser_primary_expression, cp_parser_unqualified_id,
3295 cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement,
3296 cp_parser_jump_statement, cp_parser_simple_declaration,
3297 cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id,
3298 cp_parser_type_parameter, cp_parser_template_id,
3299 cp_parser_template_name, cp_parser_direct_declarator,
3300 cp_parser_parameter_declaration_list, cp_parser_class_head,
3301 cp_parser_base_specifier, cp_parser_lookup_name,
3302 cp_parser_late_parsing_default_args,
3303 cp_parser_optional_template_keyword
3304 cp_parser_elaborated_type_specifier, cp_parser_check_class_key,
3305 cp_parser_check_access_in_redeclaration): Use quoting marks.
3307 * name-lookup.c (supplement_binding, pushdecl,
3308 check_for_out_of_scope_variable, validate_nonmember_using_decl,
3309 do_nonmember_using_decl, lookup_tag, set_decl_namespace,
3310 push_namespace, do_namespace_alias, do_using_directive,
3311 ambiguous_decl, lookup_namespace_name, add_function): Likewise.
3313 * method.c (use_thunk): Likewise.
3315 * lex.c (unqualified_name_lookup_error,
3316 unqualified_fn_lookup_error): Likewise.
3318 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3320 Convert diagnostics to use quoting flag q 4/n
3321 * except.c (decl_is_java_type, build_throw,
3322 is_admissible_throw_operand, check_handlers_1, check_handlers):
3323 Use quoting formats.
3324 * friend.c (add_friend, make_friend_class, do_friend): Likewise.
3325 * init.c (sort_mem_initializers, emit_mem_initializers,
3326 member_init_ok_or_else, expand_member_init, is_aggr_type,
3327 build_offset_ref, build_java_class_ref): Likewise.
3329 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3331 Convert diagnostics to use quoting flag q 3/n
3332 * decl.c (pop_label, duplicate_decls, redeclaration_error_message,
3333 redeclaration_error_message, lookup_label, check_goto,
3334 make_typename_type, make_unbound_class_template,
3335 fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1,
3336 grok_reference_init, layout_var_decl, maybe_commonize_var,
3337 check_for_uninitialized_const_var, reshape_init_array,
3338 reshape_init, check_initializer, cp_finish_decl,
3339 member_function_or_else, bad_specifiers, grokfndecl, grokvardecl,
3340 check_static_variable_definition, compute_array_index_type,
3341 create_array_type_for_decl, check_special_function_return_type,
3342 grokdeclarator, check_default_argument, grokparms,
3343 grok_ctor_properties, grok_op_properties,
3344 check_elaborated_type_specifier, xref_tag, finish_enum,
3345 build_enumerator, check_function_type, start_preparsed_function,
3346 store_parm_decls): Use quoting formats.
3347 * decl2.c (grok_array_decl, delete_sanity, check_member_template,
3348 check_java_method, check_classfn, finish_static_data_member_decl,
3349 grokfield, grokbitfield, grok_function_init,
3350 build_anon_union_vars, coerce_new_type, coerce_delete_type,
3351 check_default_args): Likewise.
3352 * parser.c (cp_parser_decl_specifier_seq): Likewise.
3354 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3356 Convert diagnostics to use quoting flag q 2/n
3357 * class.c (build_base_path, add_method, alter_access,
3358 handle_using_decl, check_bases,
3359 maybe_warn_about_overly_private_class, find_final_overrider,
3360 warn_hidden, finish_struct_anon, add_implicitly_declared_members,
3361 check_bitfield_decl, check_field_decls, layout_empty_base,
3362 build_base_field, check_methods, layout_virtual_bases,
3363 warn_about_ambiguous_bases, layout_class_type, finish_struct_1,
3364 resolve_address_of_overloaded_function, instantiate_type,
3365 note_name_declared_in_class): Use format flag "q" for quoting.
3367 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3369 Convert diagnostics to use quoting flag q 1/n
3370 * error.c (locate_error): Ignore quoting flag q.
3371 * call.c (build_user_type_conversion_1, build_operator_new_call,
3372 build_object_call, op_error, build_conditional_expr,
3373 build_new_op, build_op_delete_call, enforce_access,
3374 convert_like_real, convert_arg_to_ellipsis, build_x_va_arg,
3375 convert_default_arg, build_over_call, build_new_method_call,
3376 joust, perform_implicit_conversion, initialize_reference): Use the
3379 2004-10-03 Andrew Pinski <pinskia@physics.uc.edu>
3382 * typeck.c (build_reinterpret_cast): Return if the inner type
3385 2004-10-01 Jan Hubicka <jh@suse.cz>
3387 * semantics.c (expand_body): Update call of tree_rest_of_compilation.
3389 2004-09-30 Nathan Sidwell <nathan@codesourcery.com>
3391 * cp-tree.h (struct lang_decl): Shrink by reordering fields and
3392 turning operator_code and fixed_offset into bitfields.
3394 2004-09-29 Joseph S. Myers <jsm@polyomino.org.uk>
3396 * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
3398 2004-09-29 Jason Merrill <jason@redhat.com>
3400 PR tree-optimization/17697
3401 * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
3403 2004-09-28 Jason Merrill <jason@redhat.com>
3406 * class.c (build_base_field): Set TYPE_MODE.
3408 2004-09-28 Roger Sayle <roger@eyesopen.com>
3411 * g++spec.c (lang_specific_driver): Unrecognized libraries, other
3412 than -lc and -lm, may require linking against libstc++.
3414 2004-09-28 Kazu Hirata <kazu@cs.umass.edu>
3416 * tree.c: Fix a comment typo.
3418 2004-09-28 Nathan Sidwell <nathan@codesourcery.com>
3420 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove.
3421 (struct secondary_vptr_vtt_init_data_s): New.
3422 (build_vtt_inits): Adjust dfs_walkers.
3423 (dfs_build_secondary_vptr_vtt_inits): Caller data is a
3424 secondary_vptr_vtt_init_data_s structure. Adjust.
3425 (dfs_ctor_vtable_bases_queue_p): Remove.
3426 (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify.
3428 * pt.c (struct get_template_base_data_s): Remove.
3429 (get_template_base_r): Fold into get_template_base.
3430 (get_template_base): Walk base binfos directly in inheritance
3433 2004-09-27 Mark Mitchell <mark@codesourcery.com>
3436 * cp-tree.h (fold_if_not_in_template): New function.
3437 * call.c (build_conditional_expr): Use fold_if_not_in_template.
3438 (build_cxx_call): Likewise.
3439 * cvt.c (convert_to_complex): Likewise.
3440 (ocp_convert): Likewise.
3441 (convert): Likewise.
3442 (convert_force): Likewise.
3443 * decl.c (compute_array_index_type): Clear
3444 processing_template_decl while folding array bounds.
3445 * pt.c (convert_nontype_argument): Clear
3446 processing_template_decl while processing non-type argument
3448 * tree.c (fold_if_not_in_template): New function.
3449 * typeck.c (build_class_member_access_expr): Use
3450 fold_if_not_in_template.
3451 (build_array_ref): Likewise.
3452 (build_binary_op): Likewise. Do not try to optimize computations
3453 when processing templates.
3454 (cp_pointer_int_sum): Use fold_if_not_in_template.
3455 (pointer_diff): Likewise.
3456 (build_unary_op): Likewise.
3457 (build_reinterpret_cast): Likewise.
3458 (get_delta_difference): Likewise.
3459 (expand_ptrmemfunc_cst): Likewise.
3460 (dubious_conversion_warnings): Likewise.
3462 2004-09-27 Matt Austern <austern@apple.com>
3464 * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c
3465 (cp_lexer_get_preprocessor_token): Set implicit_extern_c for
3466 tokens that come from headers that are implicitly extern "C".
3467 (struct cp_parser): new one-bit field, implicit_extern_c.
3468 (cp_parser_new): Set parser's implicit_extern_c to false.
3469 (cp_parser_translation_unit): Pop lang context if we were in a
3470 header that was implicitly extern "C".
3471 (cp_parser_declaration_seq_opt): Push/pop lang context as
3472 required by the token's and parser's implicit_extern_c.
3474 2004-09-27 Mark Mitchell <mark@codesourcery.com>
3477 * cp-tree.h (shared_member_p): Declare.
3478 * search.c (shared_member_p): Give it external linkage.
3479 * semantics.c (finish_qualified_id_expr): Use it.
3480 (finish_id_expression): Likewise.
3483 * semantics.c (finish_id_expression): Do not add "this->" to
3484 static member functions.
3486 2004-09-27 Nathan Sidwell <nathan@codesourcery.com>
3489 * error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
3491 * class.c (struct count_depth_data): Remove.
3492 (dfs_depth_post, dfs_depth_q): Remove.
3493 (find_final_overrider): Use number of vbase classes as depth
3496 * cp-tree.h (types_overlap_p): Remove.
3497 * search.c (struct overlap_info): Remove.
3498 (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove.
3500 * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove.
3501 (get_template_base_recursive): Remove. Replace with ...
3502 (get_template_base_r): ... this.
3503 (struct get_template_base_data_s): New.
3504 (get_template_base): Use get_template_base_r via dfs_walk. Always
3505 return NULL on failure.
3506 (unify): Remove error_mark_node check from get_template_base result.
3508 2004-09-24 Paolo Bonzini <bonzini@gnu.org>
3510 * parser.c (cp_parser_expression_stack): Clarify why it is
3511 an array of NUM_PREC_VALUES elements.
3512 (cp_parser_binary_expression): Clarify why we do not need to
3513 handle stack overflow.
3515 2004-09-24 Nathan Sidwell <nathan@codesourcery.com>
3518 * search.c (lookup_field_queue_p): Correct check for hidden base.
3520 * search.c (bfs_walk): Remove.
3521 (lookup_member): Use dfs_walk_real.
3522 (dfs_walk_real): Move and adjust documentation from bfs_walk.
3524 2004-09-23 Zack Weinberg <zack@codesourcery.com>
3526 * decl.c (grokfndecl): If ::main is found not to return int,
3527 correct it after issuing a diagnostic.
3528 (grokdeclarator): If the incoming type was error_mark_node, do
3529 not complain about declaring something with no type.
3530 (start_function): Change check for ::main not returning int to
3531 an assertion, as grokfndecl now catches this when the user did it.
3532 * init.c (perform_member_init, sort_mem_initializers)
3533 (emit_mem_initializers): Make most diagnostics be issued on
3534 the line of current_function_decl, not whatever the current
3536 * parser.c (cp_lexer_peek_token_emit_debug_info): Surround
3537 definition and declaration with #ifdef ENABLE_CHECKING.
3538 Avoid unnecessary use of fprintf.
3539 (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
3540 definitions to avoid warnings.
3541 (cp_lexer_new_main): Add assertion that first token is not a
3543 (cp_lexer_new_from_token_array): Fold into ...
3544 (cp_lexer_new_from_tokens): ... here. Add assertion that
3545 first token is not a padding token.
3546 (cp_lexer_set_source_position_from_token): Move nearer to callers.
3547 Remove unused lexer argument.
3548 (cp_lexer_peek_token): Just print debugging report (if enabled)
3549 and return lexer->next_token.
3550 (cp_lexer_skip_purged_tokens): Delete.
3551 (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
3552 inline, simplify bodies.
3553 (cp_lexer_peek_nth_token): Add debugging report a la
3554 cp_lexer_peek_token.
3555 (cp_lexer_consume_token): Correct commentary. Advance over
3556 purged tokens here. Set current source position here, from
3557 token to be returned. Avoid unnecessary use of fprintf.
3558 (cp_lexer_purge_token): Advance next_token pointer over this and
3559 subsequent purged tokens.
3560 (cp_parser_error): Adjust source position to that of the
3562 (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
3563 (cp_parser_string_literal): Remove some excessive cleverness.
3564 (cp_parser_enum_specifier): Call start_enum before consuming
3566 (cp_parser_member_declaration): Make the "extra semicolon"
3567 diagnostic consistently-worded with the other place this is
3568 diagnosed. Explicitly set the diagnostic location to the
3569 location of the offending semicolon.
3570 (cp_parser_enclosed_template_argument_list): Use %</%> quoting
3571 in diagnostics. Do not use cp_parser_require. Set location
3572 of diagnostics about improper use of '>>' to location of
3574 (cp_parser_late_parsing_for_member):
3575 Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
3576 (cp_parser_late_parsing_default_args): Likewise. Manually
3577 move some logic outside the loop.
3579 2004-09-23 Andrew Pinski <pinskia@physics.uc.edu>
3582 * cvt.c (cp_convert_to_pointer): Return early when the type is
3585 2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
3589 * decl.c (grokfndecl): Add new argument "attrlist", use it
3590 to call cplus_decl_attributes.
3591 (start_function): Remove call to cplus_decl_attributes.
3592 * cvt.c (ocp_convert): Add support to use type conversion
3593 function to vector type.
3594 * parser.c (cp_parser_conversion_type_id): Add attributes, if any,
3597 2004-09-23 Paolo Bonzini <bonzini@gnu.org>
3601 * parser.c (cp_parser_token_tree_map_node,
3602 cp_parser_pm_expression, cp_parser_additive_expression,
3603 cp_parser_multiplicative_expression, cp_parser_shift_expression,
3604 cp_parser_relational_expression, cp_parser_equality_expression,
3605 cp_parser_and_expression, cp_parser_exclusive_or_expression,
3606 cp_parser_inclusive_or_expression,
3607 cp_parser_logical_and_expression,
3608 cp_parser_logical_or_expression): Removed.
3609 (enum cp_parser_prec, struct cp_parser_token_tree_map_node,
3610 binops, binops_by_token): New.
3611 (cp_parser_assignment_expression): Use cp_parser_binary_expression.
3612 (cp_parser_new): Initialize binops_by_token.
3613 (cp_parser_binary_expression): Rewritten.
3616 2004-09-23 Kazu Hirata <kazu@cs.umass.edu>
3618 * parser.c: Fix a comment typo.
3620 2004-09-23 Nathan Sidwell <nathan@codesourcery.com>
3623 * decl.c (xref_basetypes): Look through typedefs before checking
3626 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
3628 * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
3629 * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
3630 * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
3631 (init_rtti_processing): Initialize it to something realistic.
3632 (get_tinfo_decl): Adjust pushing the new decl.
3634 * cp-tree.h (struct lang_type_class): Remove marked flags, add
3635 diamond_shaped and repeated_base flags. Reorder to keep 8-bit blocks.
3636 (TYPE_MARKED_P): New.
3637 (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New.
3638 (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
3639 CLEAR_CLASSTYPE_MARKED_N): Remove.
3640 (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*,
3641 CLEAR_CLASSTYPE_MARKED_*): Remove.
3642 * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond
3643 shaped and repeated base properties.
3644 * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET.
3645 * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark,
3646 class_hint_flags): Remove.
3647 (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and
3648 CLASSTYPE_DIAMOND_SHAPED_P.
3650 2004-09-21 Ziemowit Laski <zlaski@apple.com>
3652 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from
3654 (objcp_tsubst_copy_and_build): Reformat function signature.
3655 * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise.
3656 (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c.
3658 2004-09-21 Zack Weinberg <zack@codesourcery.com>
3660 * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):
3661 Don't handle CPP_PRAGMA tokens specially.
3662 (cp_lexer_handle_pragma): Use cp_lexer_consume_token. Don't
3663 purge the token; do clear token->value after processing. Add
3664 assertion at beginning that token->value is nonzero.
3665 (cp_parser_statement, cp_parser_declaration_seq_opt): Handle
3666 CPP_PRAGMA as a full statement or declaration in its own right.
3668 2004-09-21 Matt Austern <austern@apple.com>
3671 * decl.c (grokvardecl): Accept declarations of global variables
3672 using anonymous types.
3674 2004-09-21 Roger Sayle <roger@eyesopen.com>
3677 * tree.c (lvalue_p_1): Disallow MIN_EXPR and MAX_EXPR as lvalues
3678 if either operand has side-effects.
3679 * typeck.c (rationalize_conditional_expr): Assert that neither
3680 operand of MIN_EXPR or MAX_EXPR has side-effects.
3681 (build_modify_expr): Add support for MIN_EXPR and MAX_EXPR.
3682 Check that the "lhs" is a valid lvalue, i.e. that neither operand
3683 of a MIN_EXPR or MAX_EXPR has a side-effect.
3685 2004-09-21 Nathan Sidwell <nathan@codesourcery.com>
3687 * cp-tree.h (struct lang_type_header): Remove
3688 uses_multiple_inheritance field.
3689 (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
3690 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
3691 (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
3692 (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
3693 (TYPE_CONTAINS_VPTR_P): Likewise.
3694 * call.c (add_template_candidate_real): Use
3695 CLASSTYPE_VBASECLASSES.
3696 (build_special_member_call): Likewise.
3697 * class.c (finish_struct_bits): Remove
3698 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
3700 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
3701 (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
3703 (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
3704 (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
3706 * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
3707 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
3709 (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
3710 * decl2.c (maybe_retrofit_in_chrg): Likewise.
3711 * init.c (expand_member, push_base_cleanups): Likewise.
3712 * pt.c (instantiate_class_template): Remove
3713 TYPE_USES_MULTIPLE_INHERITANCE,
3714 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
3716 * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
3718 * typeck2.c (process_init_constructor): Replace some sorrys with
3721 2004-09-21 Andreas Tobler <a.tobler@schweiz.ch>
3723 * decl.c (reshape_init_array): Initialize max_index_cst to fix
3726 2004-09-20 Mark Mitchell <mark@codesourcery.com>
3729 * pt.c (tsubst): Fix parentheses to accomodate emacs.
3730 (tsubst_baselink): If we get a single function, mark it as used.
3732 2004-09-20 Matt Austern <austern@apple.com>
3733 Zack Weinberg <zack@codesourcery.com>
3735 * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
3736 Apply lbasename to input_filename before passing to get_fileinfo.
3737 * semantics.c (begin_class_definition): Likewise.
3738 * lex.c (handle_pragma_interface): Apply get_fileinfo to the
3739 correct filename. Rename variables to be less confusing.
3740 (handle_pragma_implementation): Likewise. Disable "appears
3741 after file is included" diagnostic.
3743 * parser.c (struct cp_token): Add in_system_header fiag.
3744 (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
3745 (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
3746 (CPP_NONE, cp_lexer_read_token): Delete.
3747 (struct cp_lexer): Remove first_token, string_tokens,
3748 main_lexer_p fields. Clarify comments.
3749 (struct cp_token_cache): Now just a pair of pointers.
3750 (CP_LEXER_BUFFER_SIZE): New #define.
3751 (CPP_PURGED): New fake token type.
3752 (cp_lexer_new_from_token_array, cp_lexer_destroy)
3753 (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
3754 (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
3756 (cp_lexer_new_from_tokens): Now a simple wrapper around
3757 cp_lexer_new_from_token_array.
3758 (cp_lexer_set_source_position_from_token): Also update
3760 (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
3762 (cp_lexer_token_difference): Dont handle wrapping round.
3763 (cp_lexer_new_main): Enable pragma deferral and raw strings,
3764 read the entire translation unit through c_lex_with_flags into
3765 this lexer's buffer, then turn raw strings back off again.
3766 (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
3767 (cp_lexer_get_preprocessor_token): No need to handle not being
3768 the main lexer. Set token->in_system_header too.
3769 (cp_lexer_peek_token): Skip purged tokens. Feed pragma tokens
3770 to cp_lexer_handle_pragma. No need to call cp_lexer_read_token.
3771 (cp_lexer_peek_nth_token): Likewise.
3772 (cp_lexer_purge_token): Mark the token PURGED, don't shift all
3773 the other tokens down.
3774 (cp_lexer_purge_tokens_after): Likewise.
3775 (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
3776 about there being no tokens.
3777 (cp_lexer_print_token): Revise to give useful information on
3779 (struct cp_parser): Add field translate_strings_p.
3780 (cp_parser_new): Initialize it.
3781 (cp_parser_translation_unit): Destroy the lexer when done.
3782 (cp_parser_parameter_declaration): Restructure saving of
3784 (cp_parser_save_member_function_body): Likewise.
3785 (cp_parser_check_for_invalid_template_id)
3786 (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
3787 Adjust calls to cp_lexer_advance_token.
3788 (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
3789 No need to fiddle c_lex_string_translate.
3790 (cp_parser_primary_expression, cp_parser_linkage_specification)
3791 (cp_parser_asm_definition, cp_parser_asm_specification_opt)
3792 (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
3793 Use cp_parser_string_literal.
3794 (cp_parser_attribute_list): Save and restore
3795 parser->translate_strings_p, not c_lex_string_translate.
3796 (cp_parser_cache_group): Delete.
3797 (cp_parser_cache_group_1): Rename cp_parser_cache_group. Do
3798 not take a cache argument.
3800 2004-09-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3803 * decl.c (reshape_init): Extract array handling into...
3804 (reshape_init_array): New function. Use integers instead of trees
3805 for indices. Handle out-of-range designated initializers.
3807 2004-09-20 Steven Bosscher <stevenb@suse.de>
3809 * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
3812 2004-09-19 Mark Mitchell <mark@codesourcery.com>
3814 * decl2.c (determine_visibility): Allow class visibility
3815 directives to override targetm.cxx.export_class_data.
3817 2004-09-18 Kazu Hirata <kazu@cs.umass.edu>
3819 * call.c, semantics.c: Follow spelling conventions.
3820 * class.c: Fix a comment typo.
3822 2004-09-16 Geoffrey Keating <geoffk@apple.com>
3825 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3826 (handle_pragma_implementation): Likewise.
3828 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
3829 Zack Weinberg <zack@codesourcery.com>
3831 * cp-tree.def: Use tree_code_class enumeration constants
3832 instead of code letters.
3833 * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
3834 * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
3835 Update for new tree-class enumeration constants.
3837 2004-09-16 Mark Mitchell <mark@codesourcery.com>
3840 * parser.c (cp_parser_simple_declaration): Commit to tentative
3841 parses after seeing a decl-specifier.
3842 (cp_parser_simple_declaration): Eliminate spurious message.
3843 (cp_parser_init_declarator): Adjust error message.
3846 * lex.c (unqualified_name_lookup_error): Mark the dummy
3847 declaration as used.
3850 * parser.c (cp_parser_nested_name_specifier): Do not resolve
3851 typename types if the user explicitly said "typename".
3853 2004-09-16 Andrew MacLeod <amacleod@redhat.com>
3855 * error.c (dump_decl): Make sure there is lang_specific info before
3856 checking for DTOR and CTOR decls.
3858 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
3860 * class.c (copy_virtuals): Remove.
3861 (build_primary_vtable): Use copy_list directly.
3862 (build_secondary_vtable): Likewise.
3863 (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
3864 (create_vtable_ptr): Likewise.
3866 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
3868 * search.c: Follow spelling conventions.
3870 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
3872 * cp-tree.h (struct lang_type_class): Make pure_virtuals a
3874 (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
3876 * call.c (build_new_method_call): Don't confirm a pure virtual is
3877 in CLASSTYPE_PURE_VIRTUALS. Reorder checks. Make it a warning.
3878 * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
3879 (fixup_inline_methods, finish_struct): Likewise.
3880 * decl.c (finish_method): Likewise.
3881 * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
3882 CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
3883 * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
3884 vector to avoid repeating the list in error messages.
3886 2004-09-15 Mark Mitchell <mark@codesourcery.com>
3888 * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
3889 * cp-tree.h (cxx_comdat_group): Declare.
3890 * decl.c (cxx_comdat_group): New function.
3892 2004-09-15 Nathan Sidwell <nathan@codesourcery.com>
3894 * search.c (get_pure_virtuals): Remove unused variables.
3896 * cp-tree.h (struct lang_decl_flags): Remove
3897 needs_final_overrider.
3898 (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
3899 * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
3900 * class.c (finish_struct_bits): Correct comment about
3901 CLASSTYPE_PURE_VIRTUALS.
3902 * search.c (get_pure_virtuals): Remove useless loop.
3904 2004-09-14 Mark Mitchell <mark@codesourcery.com>
3907 * mangle.c (partially_mangled_name): New variable.
3908 (partially_mangled_name_len): Likewise.
3909 (save_partially_mangled_name): New function.
3910 (restore_partially_mangled_name): Likewise.
3911 (write_encoding): Save and restore partially mangled names around
3912 calls to get_mostly_instantiated_function_type.
3913 (write_unqualified_name): Likewise.
3915 2004-09-14 Nathan Sidwell <nathan@codesourcery.com>
3917 * pt.c (unify): Replace gcc_unreachable with gcc_assert.
3919 2004-09-13 Mark Mitchell <mark@codesourcery.com>
3922 * parser.c (cp_parser_id_expression): Correct value for
3924 (cp_parser_nested_name_specifier_opt): Look through typenames as
3926 (cp_parser_template_name): Honor check_dependency_p.
3929 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
3933 * pt.c (unify): Add ENUMERAL_TYPE case. Replace sorry with
3936 2004-09-12 Richard Henderson <rth@redhat.com>
3939 * semantics.c (maybe_cleanup_point_expr): Don't call fold.
3940 * typeck.c (condition_conversion): Likewise.
3942 2004-09-11 Richard Henderson <rth@redhat.com>
3945 * pt.c (cur_stmt_expr): Move from tsubst_expr.
3946 (tsubst_expr) <case STMT_EXPR>: Move ...
3947 (tsubst_copy_and_build): ... here.
3949 2004-09-10 Zack Weinberg <zack@codesourcery.com>
3951 * cp-tree.h (interface_only, interface_unknown): Delete declarations;
3952 comment explaining them moved to c-common.h.
3953 * lex.c (interface_only, interface_unknown, extract_interface_info):
3955 (cxx_finish): Don't reset interface_unknown.
3956 (handle_pragma_interface): Don't set interface_only and
3957 interface_unknown; just the like-named fields in finfo.
3958 (handle_pragma_implementation): Adjust comment.
3959 * decl2.c (cp_finish_file): Don't reset interface_only and
3961 * method.c (synthesize_method): Don't reset interface_unknown or
3962 call extract_interface_info.
3963 * pt.c (pop_tinst_level): Don't call extract_interface_info.
3964 * decl.c (start_cleanup_fn): Don't save or restore interface_only
3965 and interface_unknown.
3966 (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
3967 and use the result instead of the interface_only/interface_unknown
3969 (start_preparsed_function): Likewise.
3970 * lex.c (cxx_make_type): Likewise.
3971 * semantics.c (begin_class_definition): Likewise.
3972 (expand_body): Don't call extract_interface_info.
3974 2004-09-10 Ziemowit Laski <zlaski@apple.com>
3976 * decl.c (objc_mark_locals_volatile): Make description of
3977 routine more descriptive; only mark VAR_DECLs at each
3980 2004-09-10 Richard Henderson <rth@redhat.com>
3983 * call.c (build_vfield_ref): Move...
3984 * class.c (build_vfield_ref): ... here. Convert datum to the
3985 primary base containing the vptr.
3986 (make_new_vtable): Simplify build_primary_vtable arguments.
3987 (finish_struct_1): Do not duplicate TYPE_VFIELD.
3988 * typeck.c (build_class_member_access_expr): Don't warn for
3989 null object access to base fields.
3991 2004-09-10 Ziemowit Laski <zlaski@apple.com>
3993 * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
3994 New functions, to be called from ObjC++.
3996 2004-09-10 Kazu Hirata <kazu@cs.umass.edu>
3998 * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
3999 name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
4002 2004-09-09 Ziemowit Laski <zlaski@apple.com>
4004 * typeck.c (build_c_cast): Preserve the cast if casting
4005 to and from an Objective-C type.
4007 2004-09-09 Ziemowit Laski <zlaski@apple.com>
4009 * Make-lang.in (cp/typeck.o): Depend on c-common.h.
4010 * typeck.c: Include c-common.h.
4011 (comptypes): For RECORD_TYPEs, call objc_comptypes() and
4012 return the result if nonnegative.
4014 2004-09-09 Zack Weinberg <zack@codesourcery.com>
4016 * decl2.c (import_export_class)
4017 * lex.c (handle_pragma_interface):
4018 Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
4020 2004-09-08 Ziemowit Laski <zlaski@apple.com>
4022 * Make-lang.in (cp/semantics.o): Depend on c-common.h.
4023 * semantics.c: Include c-common.h.
4024 (finish_compound_stmt): Call objc_clear_super_receiver().
4026 2004-09-08 Ziemowit Laski <zlaski@apple.com>
4028 * cp-tree.h (do_poplevel): New prototype.
4029 * semantics.c (do_poplevel): Make externally visible.
4031 2004-09-08 Nathan Sidwell <nathan@codesourcery.com>
4033 * cp-tree.h (tree_pair_s): Define a GC'd vector.
4034 * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
4035 * semantics.c (deferred_access): Likewise.
4037 2004-09-06 Daniel Jacobowitz <dan@debian.org>
4039 * semantics.c (expand_body): Assert that we are not nested.
4041 2004-09-06 Zack Weinberg <zack@codesourcery.com>
4043 * decl.c (build_enumerator): Use add_double and int_fits_type_p
4044 instead of cp_build_binary_op, to avoid creating short-lived trees.
4045 * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
4046 lookahead instead of backtracking. Move some code to avoid a
4048 (cp_parser_enum_specifier): Avoid duplication of effort with caller.
4049 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
4050 (cp_parser_enumerator_list, cp_parser_enumerator_definition):
4051 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
4053 2004-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4055 * decl.c (grok_declarator): Remove a redundant semicolon.
4057 * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
4058 Correct comments describing function parameters.
4060 2004-09-03 Matt Austern <austern@apple.com>
4061 Compile speed improvement.
4062 * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
4063 Otherwise define a stub macro that expands to nothing.
4064 (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set. Otherwise
4065 define a stub macro that expands to 0.
4066 (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
4067 (cp_lexer_stop_debugging): Likewise.
4068 (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set. Otherwise
4069 define a stub macro that expands to NULL.
4070 (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
4071 (cp_lexer_new_from_tokens): Likewise.
4073 2004-09-03 Jan Hubicka <jh@suse.cz>
4075 * decl.c (finish_function): Clean out pointers we no longer need.
4077 2004-09-03 Jan Beulich <jbeulich@novell.com>
4079 * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
4082 2004-09-02 Paul Brook <paul@codesourcery.com>
4084 * decl2.c (determine_visibility): Only check data visibility
4087 2004-08-31 Mark Mitchell <mark@codesourcery.com>
4089 * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
4090 * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
4091 * decl2.c (determine_visibility): Honor
4092 TARGET_CXX_EXPORT_CLASS_DATA.
4094 * class.c (key_method): Rename to ...
4095 (determine_key_method): ... this.
4096 (finish_struct_1): Adjust accordingly.
4097 * cp-tree.h (key_method): Declare.
4098 * decl2.c (maybe_emit_vtables): Determine the key method here if
4099 it has not already been done.
4101 2004-08-31 Ziemowit Laski <zlaski@apple.com>
4103 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
4104 (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
4105 (cp/cp-decl.c): Do not depend on gtype-cp.h.
4106 (cp/cp-objcp-common.o): New target.
4107 * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
4108 (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
4109 cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
4110 prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
4112 (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
4113 LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
4114 LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
4115 LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
4116 LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
4117 LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
4118 LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
4119 LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
4120 LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
4121 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
4122 LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
4123 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
4124 LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
4125 LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
4126 LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
4127 LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
4128 LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
4129 LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
4130 LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
4131 LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
4132 LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
4133 LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
4134 LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
4135 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
4136 LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
4137 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
4138 LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
4139 LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
4140 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
4141 LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
4142 LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
4143 hooks to cp-objcp-common.h.
4144 (finish_file): New function.
4145 * cp-objcp-common.c: New file.
4146 * cp-objcp-common.h: New file.
4147 * cp-tree.h (cp_finish_file): New prototype.
4148 * decl.c: Do not include gtype-cp.h.
4149 * decl2.c (finish_file): Rename to cp_finish_file.
4151 2004-08-31 Richard Henderson <rth@redhat.com>
4154 * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
4155 (tsubst_copy_and_build): ... here.
4157 2004-08-30 Mark Mitchell <mark@codesourcery.com>
4159 * cp-tree.h (initialize_artificial_var): Declare.
4160 * decl.c (initialize_artifical_var): New function.
4161 * class.c (initialize_array): Remove.
4162 (initialize_vtable): Use initialize_artificial_var.
4163 (build_vtt): Likewise.
4164 (build_ctor_vtbl_group): Likewise.
4166 2004-08-30 Richard Henderson <rth@redhat.com>
4168 * class.c (build_base_path): Use build_address directly.
4169 * typeck.c (build_unary_op): Don't lower &a.b to pointer
4170 arithmetic directly.
4171 * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
4172 means !initializer_constant_valid_p.
4174 2004-08-30 Richard Henderson <rth@redhat.com>
4176 * class.c (fixed_type_or_null): Use get_base_address before
4177 assuming an ADDR_EXPR is non-null.
4179 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
4181 * name-lookup.c (pop_binding, pushdecl,
4182 set_identifier_type_value_with_scope, push_overloaded_decl,
4183 arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
4184 * parser.c (cp_parser_diagnose_invalid_type_name,
4185 cp_parser_postfix_expression, cp_parser_unary_expression,
4186 cp_parser_check_declarator_template_para): Likewise.
4187 * pt.c (push_inline_template_parms_recursive,
4188 check_explicit_specialization, convert_nontype_argument,
4189 coerce_template_template_parms, uses_template_parms,
4190 instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
4191 tsubst_expr, instantiate_template,
4192 maybe_adjust_types_for_deduction, type_unification_real,
4193 resolve_overloaded_unification, template_decl_level,
4194 type_dependent_expression_p): Likewise.
4195 * search.c (lookup_base_r): Likewise.
4196 * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
4197 * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
4198 verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
4199 * typeck.c (common_type, get_member_function_from_ptrfunc,
4200 build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
4201 * typeck2.c (cxx_incomplete_type_diagnostic,
4202 split_nonconstant_init_1, store_init_value,
4203 process_init_constructor): Likewise.
4205 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
4207 * call.c (check_dtor_name): Replace abort with gcc_assert or
4209 (build_call, add_builtin_candidate, build_new_op,
4210 convert_like_real, build_over_call, in_charge_arg_for_name,
4211 source_type, joust): Likewise.
4212 * class.c (build_simple_base_path, get_vcall_index,
4213 finish_struct_1, instantiate_type, get_enclosing_class,
4214 add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
4215 * cp-gimplify.c (cp_genericize): Likewise.
4216 * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
4217 * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
4218 * decl.c (poplevel, make_unbound_class_template, reshape_init,
4219 check_special_function_return_type, grokdeclarator,
4220 grok_op_properties, tag_name, xref_tag, start_preparsed_function,
4221 finish_function): Likewise.
4222 * decl2.c (grokfield, maybe_emit_vtables):Likewise.
4223 * error.c (dump_global_iord, dump_decl, dump_template_decl,
4224 language_to_string): Likewise.
4225 * except.c (choose_personality_routine): Likewise.
4226 * friend.c (do_friend): Likewise.
4227 * g++spec.c (lang_specific_driver): Likewise.
4228 * init.c (build_zero_init, expand_default_init, build_new_1,
4229 build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
4230 * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
4231 * mangle.c (add_substitution, write_unscoped_name,
4232 write_template_prefix, write_identifier,
4233 write_special_name_destructor, write_type, write_builtin_type,
4234 write_expression, write_template_param,
4235 write_java_integer_type_codes): Likewise.
4236 * method.c (implicitly_declare_fn): Likewise.
4238 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
4240 * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
4241 (BINFO_INDIRECT_PRIMARY_P): Remove.
4242 * class.c (determine_primary_base): Rename to ...
4243 (determine_primary_bases): ... here. Set all primary bases.
4244 (set_primary_base): Remove.
4245 (mark_primary_bases): Remove.
4246 (build_simple_base_path, walk_subobject_offsets,
4247 propagate_binfo_offsets, end_of_class): Adjust.
4248 (layout_class_type): Rename determine_primary_base call.
4249 (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
4251 (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
4252 build_rtti_vtbl_entries): Adjust.
4253 * init.c (build_vtbl_address): Adjust.
4255 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
4257 2004-08-28 Ziemowit Laski <zlaski@apple.com>
4259 * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
4260 CXX_AND_OBJCXX_OBJS.
4261 (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
4262 separately on the link line.
4264 2004-08-28 Jason Merrill <jason@redhat.com>
4266 * decl.c (expand_static_init): Avoid bogus warnings.
4268 2004-08-27 Jason Merrill <jason@redhat.com>
4271 * tree.c (stabilize_init): See through a COMPOUND_EXPR.
4274 * decl.c (expand_static_init): Use thread-safety API.
4275 (register_dtor_fn): Return the call, don't expand it.
4276 * tree.c (add_stmt_to_compound): New fn.
4277 (stabilize_call): Use it.
4279 2004-08-27 Richard Henderson <rth@redhat.com>
4281 * cp-tree.def (OFFSETOF_EXPR): New.
4282 * parser.c (cp_parser_builtin_offsetof): Either built an
4283 OFFSETOF_EXPR, or call fold_offsetof immediately.
4284 * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
4286 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
4288 * call.c (validate_conversion_obstack): Replace
4289 my_friendly_assert with gcc_assert or gcc_unreachable.
4290 (direct_reference_binding, merge_conversion_sequences,
4291 build_user_type_conversion_1, perform_overload_resolution,
4292 build_op_delete_call, enforce_access, call_builtin_trap,
4293 build_over_call, build_special_member_call, build_new_method_call,
4294 initialize_reference): Likewise.
4295 * class.c (build_base_path, build_primary_vtable, alter_access,
4296 check_bases, update_vtable_entry_for_fn, layout_empty_base,
4297 clone_function_decl, adjust_clone_args,
4298 type_requires_array_cookie, include_empty_classes,
4299 finish_struct_1, resolve_address_of_overloaded_function,
4300 instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
4301 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
4302 accumulate_vtbl_inits, build_vtbl_initializer,
4303 build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
4304 * cvt.c (build_up_reference, convert_to_reference): Likewise.
4305 * decl.c (poplevel, duplicate_decls, make_typename_type,
4306 cxx_init_decl_processing, reshape_init, check_initializer,
4307 make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
4308 expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
4309 grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
4310 xref_basetypes, start_preparsed_function, save_function_data,
4311 finish_function, finish_method, maybe_register_incomplete_var,
4312 complete_vars): Likewise.
4313 * decl2.c (grok_array_decl, check_member_template,
4314 check_classfn, finish_static_data_member_decl, coerce_new_type,
4315 coerce_delete_type, import_export_class, decl_needed_p,
4316 determine_visibility, import_export_decl, build_cleanup,
4317 start_static_initialization_or_destructi, do_static_destruction,
4318 prune_vars_needing_no_initialization,
4319 build_offset_ref_call_from_tree): Likewise.
4320 * error.c (dump_decl, dump_expr): Likewise.
4321 * init.c (finish_init_stmts, build_zero_init,
4322 expand_virtual_init, expand_default_init, expand_aggr_init_1,
4323 build_offset_ref, build_new_1, build_delete, build_vbase_delete):
4325 * mangle.c (write_method_parms, write_template_args,
4326 write_expression, write_template_arg): Likewise.
4327 * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
4328 * name-lookup.c (pop_binding, begin_scope, leave_scope,
4329 resume_scope, push_using_decl, validate_nonmember_using_decl,
4330 is_ancestor, poplevel_class, set_inherited_value_binding_p,
4331 push_class_level_binding, do_class_using_decl, push_namespace,
4332 pop_namespace, add_using_namespace, ambiguous_decl,
4333 lookup_namespace_name, lookup_type_current_level,
4334 maybe_process_template_type_declaration): Likewise.
4335 * parser.c (cp_lexer_peek_nth_token,
4336 cp_parser_parse_and_diagnose_invalid_typ,
4337 cp_parser_translation_unit, cp_parser_template_id,
4338 cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
4339 * pt.c (push_access_scope, finish_member_template_decl,
4340 push_inline_template_parms_recursive, add_outermost_template_args,
4341 get_innermost_template_args, begin_explicit_instantiation,
4342 end_explicit_instantiation, retrieve_specialization,
4343 is_specialization_of, is_specialization_of_friend,
4344 register_specialization, check_explicit_specialization,
4345 comp_template_parms, process_template_parm,
4346 process_partial_specialization, convert_nontype_argument,
4347 coerce_template_template_parms, coerce_template_parms,
4348 mangle_class_name_for_template, lookup_template_function,
4349 lookup_template_class, instantiate_class_template, tsubst_decl,
4350 tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
4351 instantiate_template, fn_type_unification, type_unification_real,
4352 get_template_base, regenerate_decl_from_template,
4353 template_for_substitution, instantiate_decl,
4354 get_mostly_instantiated_function_type, dependent_scope_ref_p,
4355 value_dependent_expression_p, resolve_typename_type): Likewise.
4356 * repo.c (repo_emit_p): Likewise.
4357 * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
4358 create_tinfo_types, emit_tinfo_decl): Likewise.
4359 * search.c (lookup_base_r, lookup_base, lookup_field_1,
4360 dfs_access_in_type, build_baselink, lookup_member,
4361 adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
4362 * semantics.c (perform_or_defer_access_check,
4363 finish_non_static_data_member, finish_stmt_expr_expr,
4364 finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
4365 finish_template_template_parm, finish_member_declaration,
4366 emit_associated_thunks): Likewise.
4367 * tree.c (build_target_expr_with_type, force_target_expr,
4368 copy_binfo, get_first_fn, cp_tree_equal): Likewise.
4369 * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
4370 cxx_sizeof_or_alignof_type, perform_integral_promotions,
4371 build_class_member_access_expr, finish_class_member_access_expr,
4372 build_ptrmemfunc_access_expr, build_unary_op,
4373 unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
4374 build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
4375 * typeck2.c (complete_type_check_abstract,
4376 abstract_virtuals_error, process_init_constructor,
4377 add_exception_specifier): Likewise.
4379 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
4381 * class.c (build_vtbl_initializer): Use ssize_int.
4382 * decl.c (complete_array_type): Likewise.
4383 * method.c (finish_thunk): Likewise.
4384 * search.c (get_dynamic_base_type): Likewise.
4386 2004-08-26 Richard Henderson <rth@redhat.com>
4388 * cp-tree.h (DECL_FIELD_IS_BASE): New.
4389 * class.c (build_base_field): Set it.
4390 (build_simple_base_path): Use it.
4391 (fixed_type_or_null): Don't consider base fields definitive.
4393 2004-08-25 Roger Sayle <roger@eyesopen.com>
4396 PR tree-optimization/16372
4397 * decl.c (finish_enum): Make the precision of the enumerated type
4398 the same width as the underlying integer type.
4400 2004-08-25 Mark Mitchell <mark@codesourcery.com>
4403 * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
4406 * mangle.c (get_identifier_nocopy): Add cast.
4408 * cp-tree.h (mangle_type): Remove.
4409 * mangle.c (globals): GTY it.
4410 (mangle_obstack): New variable.
4411 (name_obstack): Likewise.
4412 (name_base): Likewise.
4413 (write_char): Adjust accordingly.
4414 (write_chars): Likewise.
4415 (write_string): Likewise.
4416 (start_mangling): Initialize G.substitutions only one. Add
4418 (finish_mangling): Use VARRAY_CLEAR to reclaim
4419 storage in G.substitutions. Use obstack_finish.
4420 (init_mangle): Adjust for changes to variable names above.
4421 Initialize G.substitutions.
4422 (mangle_decl_string): Adjust call to start_mangling.
4423 (get_identifier_nocopy): New function.
4424 (mangle_decl): Use it.
4425 (mangle_type_string): Adjust call to start_mangling.
4426 (mangle_special_for_type): Likewise.
4427 (mangle_vtt_for_type): Likewise.
4428 (mangle_ctor_vtbl_for_type): Likewise.
4429 (mangle_thunk): Likewise.
4430 (mangle_guard_variable): Likewise.
4431 (mangle_ref_init_variable): Likewise.
4433 2004-08-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4436 * pt.c (redeclare_class_template): Check the type of non-type and
4437 template template parameter.
4439 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
4441 * call.c (convert_class_to_reference): Adjust build_int_cst calls.
4442 (build_user_type_conversion_1, convert_like_real,
4443 build_java_interface_fn_ref, build_special_member_call): Likewise.
4444 * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
4445 * cp-gimplify.c (cp_gimplify_expr): Likewise.
4446 * cvt.c (cp_convert_to_pointer): Likewise.
4447 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
4448 * decl2.c (start_static_initialization_or_destruction,
4449 generate_ctor_or_dtor_function): Likewise.
4450 * except.c (build_throw): Likewise.
4451 * mangle.c (write_integer_cst): Likewise.
4452 * method.c (finish_thunk): Likewise.
4453 * rtti.c (build_headof, get_tinfo_decl_dynamic,
4454 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
4455 get_pseudo_ti_init): Likewise.
4456 * search.c (get_dynamic_cast_base_type): Likewise.
4458 2004-08-25 Zack Weinberg <zack@codesourcery.com>
4460 * class.c, search.c: Remove references to DWARF_DEBUG.
4462 2004-08-25 Adam Nemet <anemet@lnxw.com>
4464 * repo.c (extract_string): Reset backquote after one character.
4465 (get_base_filename): Fix indentation.
4467 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
4469 * decl.c (cxx_init_decl_processing): Adjust
4470 build_common_tree_nodes call.
4472 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
4475 * (is_subobject_of_p): Resurrect & optimize.
4476 (lookup_field_r): Use it.
4478 2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4481 * search.c (friend_accessible_p): Increment processing_template_decl
4482 when deal with TEMPLATE_DECL of SCOPE.
4484 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
4487 * semantics.c (check_accessibility_of_qualified_id): Defer check
4488 if qualifying_type is a template parameter.
4490 2004-08-23 Mark Mitchell <mark@codesourcery.com>
4493 * pt.c (instantiate_decl): Do not try to apply
4494 DECL_DECLARED_INLINED_P to a VAR_DECL.
4496 * search.c (build_baselink): Fix typo in comment.
4498 2004-08-22 Andrew Pinski <apinski@apple.com>
4501 2004-08-22 Andrew Pinski <apinski@apple.com>
4503 * typeck.c (build_unary_op): Use &a.b if the folded lowered
4504 expression is not constant.
4506 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
4508 * name-lookup.c (pushdecl): Rename build_type_copy call.
4509 * tree.c (cp_build_qualified_type_real,
4510 build_exception_variant, handle_java_interface_attribute): Likewise.
4512 2004-08-22 Andrew Pinski <apinski@apple.com>
4515 * typeck.c (build_unary_op): Use &a.b if the folded lowered
4516 expression is not constant.
4518 2004-08-20 Mark Mitchell <mark@codesourcery.com>
4521 * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
4523 2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
4526 * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
4529 2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4531 * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
4532 before calling comp_template_args.
4534 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
4536 * class.c (build_vtbl_initializer): Use build_int_cst for
4537 negative size types.
4538 * decl.c (complete_array_type): Likewise.
4539 * method.c (finish_thunk): Likewise.
4541 2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
4543 * tree.c: Remove unused mark_local_for_remap_r.
4545 2004-08-19 Eric Christopher <echristo@redhat.com>
4547 * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
4548 * tree.c (cxx_unsave_expr_now): Delete.
4549 (cp_unsave_r): Ditto.
4551 2004-08-19 Mark Mitchell <mark@codesourcery.com>
4554 * pt.c (push_template_decl_real): Disallow template allocation
4555 functions with fewer than two parameters.
4557 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
4559 * cp-tree.h (build_shared_int_cst): Remove.
4560 * tree.c (shared_int_cache): Remove.
4561 (build_shared_int_cst): Remove.
4562 * class.c (finish_struct_1): Use build_int_cst.
4564 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
4566 * decl.c (finish_enum): Do not copy value node early, copy
4568 * lex.c (cxx_init): Force null_node to be unique.
4570 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
4573 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
4574 from input for MODOP_EXPR.
4576 2004-08-18 Mark Mitchell <mark@codesourcery.com>
4578 * pt.c (dependent_template_p): Fix typo in commment.
4581 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
4584 2004-08-17 Mark Mitchell <mark@codesourcery.com>
4587 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
4588 arguments have the same type as the corresponding parameter.
4591 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
4592 is set use it for diagnostic purposes.
4593 (cp_parser_pseudo_destructor_name): Remove special-case error
4597 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
4600 * cp-tree.h (qualified_name_lookup_error): Add parameter.
4601 * name-lookup.c (do_class_using_decl): Restrict set of entities
4602 passed to cp_emit_debug_info_for_using more carefully.
4603 (lookup_qualified_name): Allow lookup_member to return sets of
4605 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
4606 (cp_parser_primary_expression): Handle ambiguous lookups.
4607 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
4608 (cp_parser_template_argument): Likewise.
4609 (cp_parser_elaborate_type_specifier): Likewise.
4610 (cp_parser_namespace_name): Likewise.
4611 (cp_parser_class_name): Likewise.
4612 (cp_parser_lookup_name_simple): Likewise.
4613 * pt.c (tsubst_qualified_id): Handle ambiguous results.
4614 (tsubst_expr): Likewise.
4615 * semantics.c (qualified_name_lookup_error): Add decl paramter.
4616 For ambiguous lookups, print candidates.
4618 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4621 * pt.c (instantiate_pending_templates): Add int parameter. Don't
4623 * cp-tree.h (instantiate_pending_templates): Adjust prototype.
4624 * decl2.c (finish_file): Adjust call to
4625 instantiate_pending_templates.
4627 2004-08-15 Roger Sayle <roger@eyesopen.com>
4629 * call.c (build_vfield_ref, build_call, build_conditional_expr,
4630 convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
4631 build_java_interface_fn_ref, build_special_member_call,
4632 build_new_method_call, initialize_reference): Replace calls to
4633 build with calls to buildN.
4634 * class.c (build_base_path, convert_to_base_statically,
4635 build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
4636 build_vtbl_initializer): Likewise.
4637 * cp-gimplify.c (genericize_try_block, genericize_catch_block,
4638 gimplify_if_stmt, cp_genericize_r): Likewise.
4639 * cvt.c (convert_to_void): Likewise.
4640 * decl.c (check_initializer, finish_constructor_body,
4641 finish_destructor_body): Likewise.
4642 * error.c (dump_expr): Likewise.
4643 * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
4645 * init.c (perform_member_init, expand_virtual_init,
4646 expand_cleanup_for_base, build_init, expand_default_init,
4647 build_offset_ref, decl_constant_value, build_new, build_new_1,
4648 build_vec_delete_1, build_vec_init, build_delete,
4649 push_base_cleanups, build_vec_delete): Likewise.
4650 * mangle.c (write_integer_cst): Likewise.
4651 * method.c (thunk_adjust, do_build_copy_constructor,
4652 do_build_assign_ref): Likewise.
4653 * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
4654 unify, build_non_dependent_expr): Likewise.
4655 * rtti.c (build_headof, build_typeid, ifnonnull,
4656 build_dyanmic_cast_1, tinfo_base_init): Likewise.
4657 * semantics.c (begin_compound_stmt, finish_call_expr,
4658 finish_pseudo_destructor_expr, finish_id_expression,
4659 simplify_aggr_init_expr, finalize_nrv_r): Likewise.
4660 * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
4661 array_type_nelts_total, stabilize_call): Likewise.
4662 * typeck.c (decay_conversion, build_class_member_access_expr,
4663 lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
4664 get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
4665 build_x_unary_op, build_unary_op, unary_complex_lvalue,
4666 build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
4667 check_return_expr): Likewise.
4668 * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
4669 split_nonconstant_init, store_init_value, build_m_component_ref):
4672 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
4674 * call.c (convert_class_to_reference,
4675 build_user_type_conversion_1, convert_like_real,
4676 build_java_interface_fn_ref, build_special_member_call): Use
4678 * class.c (build_vtbl_initializer): Likewise.
4679 * cp-gimplify.c (cp_gimplify_expr): Likewise.
4680 * cvt.c (cp_convert_to_pointer): Likewise.
4681 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
4682 * decl2.c (start_static_initialization_or_destruction,
4683 generate_ctor_or_dtor_function): Likewise.
4684 * except.c (build_throw): Likewise.
4685 * lex.c (cxx_init): Likewise.
4686 * mangle.c (write_integer_cst): Likewise.
4687 * rtti.c (build_headof, get_tinfo_decl_dynamic,
4688 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
4689 get_pseudo_ti_init): Likewise.
4690 * search.c (get_dynamic_cast_base_type): Likewise.
4691 * tree.c (build_shared_int_cst): Likewise.
4693 2004-08-12 Mark Mitchell <mark@codesourcery.com>
4696 * class.c (count_depth_data): New type.
4697 (dfs_depth_post): New function.
4698 (dfs_depth_q): Likewise.
4699 (find_final_overrider_data_s): Change type of vpath.
4701 (dfs_find_final_overrider_1): New function.
4702 (dfs_find_final_overrider): Use it.
4703 (dfs_find_final_overrider_q): Adjust use of vpath.
4704 (dfs_find_final_overrider_post): Likewise.
4705 (find_final_overrider): Use dfs_depth. Allocate and deallocate
4708 2004-08-12 Jan Beulich <jbeulich@novell.com>
4710 * parser.c (cp_parser_asm_definition): Properly consume scope operator
4711 tokens preceding the clobbers. Don't check for scope operator
4712 following inputs. Simplify inputs handling to match that now used for
4715 2004-08-11 Mark Mitchell <mark@codesourcery.com>
4718 * except.c (build_throw): Allocate cleanup_type and the function
4719 for __cxa_throw separately.
4722 * call.c (standard_conversion): Do not accept conversions between
4723 pointers to members if the class types are unrelated.
4726 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
4727 char &" instead of just "char &".
4730 * pt.c (tsubst): Just return the unknown_type_node.
4732 2004-08-11 Mark Mitchell <mark@codesourcery.com>
4735 * parser.c (cp_parser_class_specifier): Robustify.
4738 * pt.c (tsubst_copy_and_build): Complain about invalid
4742 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
4743 current_class_ref while tsubsting.
4745 2004-08-10 Mark Mitchell <mark@codesourcery.com>
4748 * parser.c (cp_parser_init_declarator): Robustify.
4750 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
4752 * typeck2.c (process_init_constructor): Guard the missing field warning
4753 with warn_missing_field_initializers rather than extra_warnings.
4755 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
4757 * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
4759 2004-08-05 Mark Mitchell <mark@codesourcery.com>
4761 * decl.c (start_preparsed_function): Move determine_visibility
4763 * decl2.c (determine_visibility): Incorporate dllexport testing.
4765 2004-08-05 Geoffrey Keating <geoffk@apple.com>
4767 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
4768 means that libstdc++ is needed.
4770 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
4772 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
4774 2004-08-04 Geoffrey Keating <geoffk@apple.com>
4776 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
4777 than passing it as a parameter to rest_of_decl_compilation.
4778 * decl2.c (grokfield): Use set_user_assembler_name.
4780 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
4782 * decl.c (complete_array_type): Don't gratuitously copy
4783 maxindex. Its type is always set.
4785 2004-08-04 Paul Brook <paul@codesourcery.com>
4787 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
4788 * cp-tree.h (struct language_function): Rename x_dtor_label to
4790 (dtor_label): Rename ...
4791 (cdtor_label): ... to this.
4792 * decl.c (begin_constructor_body): Remove.
4793 (check_special_function_return_type): Maybe change the return type.
4794 (grokdeclarator): Pass the class type.
4795 (start_preparsed_function): Constructors may need a return label.
4796 (finish_constructor_body, finish_destructor_body): Set the return
4798 (begin_function_body): Don't call begin_constructor_body.
4799 (finish_function): Don't warn for constructors or destructors.
4800 (implicitly_declare_fn): Maybe change the return type.
4801 * optimize.c: Include target.h.
4802 (maybe_clone_body): Remap the function result.
4803 * semantics.c: Include target.h.
4804 (finish_return_stmt): Maybe jump to return label for constructors.
4806 2004-08-03 Mark Mitchell <mark@codesourcery.com>
4808 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
4809 (check_field_decls): Or here.
4810 (check_methods): Or here.
4811 (initialize_array): Don't mess with DECL_CONTEXT.
4812 * cp-tree.h (start_decl): Adjust prototype.
4813 (determine_visibility): New function.
4814 * decl.c (duplicate_decls): Remove checks for hidden "operator
4816 (build_library_fn_1): Give all library functions default
4818 (start_decl): Add pop_scope_p parameter. Tidy.
4819 (cp_finish_decl): Do not pop scopes here. Call
4820 determine_visibility for variable definitions.
4821 (start_preparsed_function): Call determine_visibility.
4822 * decl2.c (determine_visibility): New function.
4823 * method.c (use_thunk): Fix formatting.
4824 * parser.c (cp_parser_condition): Adjust calls to start_decl.
4825 (cp_parser_init_declarator): Likewise.
4826 * pt.c (instantiate_decl): Always call pop_nested_class.
4827 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
4828 (tinfo_base_init): Likewise.
4830 2004-08-02 Mark Mitchell <mark@codesourcery.com>
4833 * name-lookup.c (validate_nonmember_using_decl): Robustify.
4835 2004-08-01 Mark Mitchell <mark@codesourcery.com>
4838 * name-lookup.c (decl_namespace): Remove.
4839 (current_decl_namespace): Use decl_namespace_context instead of
4841 (push_decl_namespace): Likewise.
4842 (arg_assoc_class): Likewise.
4843 (arg_assoc_type): Likewise.
4844 * pt.c (check_specialization_namespace): New function.
4845 (maybe_process_partial_specialization): Use it.
4846 (register_specialization): Likewise.
4849 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
4850 * call.c (null_ptr_cst_p): Handle variables with constant
4852 * pt.c (convert_nontype_argument): Use
4853 DECL_INTEGRAL_CONSTANT_VAR_P.
4854 * semantics.c (finish_id_expression): Likewise.
4857 * decl.c (duplicate_decls): Reject duplicate namespace
4861 * typeck.c (build_ptrmemfunc): Loosen assertion.
4863 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
4865 * call.c (z_candidate::template_decl): Rename from template.
4866 (add_template_candidate_real): Adjust member reference.
4869 2004-07-29 Mark Mitchell <mark@codesourcery.com>
4871 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
4872 (lang_decl_flags): Narrow the width of "languages". Add
4874 (DECL_NEEDED_P): Remove.
4875 (FOR_EACH_CLONE): New macro.
4876 (DECL_REPO_AVAILABLE_P): Likewise.
4877 (DECL_TINFO_P): Likewise.
4878 (set_linkage_according_to_type): Declare.
4879 (import_export_vtable): Remove.
4880 (import_export_tinfo): Likewise.
4881 (mark_needed): New function.
4882 (decl_needed_p): Likewise.
4883 (note_vauge_linkage_fn): Likewise.
4884 (init_repo): Change prototype.
4885 (repo_template_used): Remove.
4886 (repo_template_instantiated): Likewise.
4887 (repo_emit_p): New function.
4888 (repo_export_class_p): Likewise.
4889 (no_linkage_check): Change prototype.
4890 * class.c (set_linkage_according_to_type): New function.
4891 (build_vtable): Use it. Do not call import_export_vtable. Set
4892 DECL_IGNORED_P if appropriate.
4893 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
4894 (make_rtL_for_nonlocal_decls): Check for template instantiations
4896 (grokfndecl): Adjust call to no_linkage_check.
4897 (set_linkage_for_static_data_member): New function.
4898 (grokvardecl): Use it. Adjust call to no_linkage_check.
4899 (grokdeclarator): Use set_linkage_for_static_data_member.
4900 * decl2.c (note_vague_linkage_fn): New function.
4901 (note_vague_linkage_var): Likewise.
4902 (finish_static_data_member_decl): Use it.
4903 (import_export_vtable): Remove.
4904 (import_export_class): Use repo_export_class_p.
4905 (var_finalized_p): Simplify.
4906 (maybe_emit_vtables): Simplify.
4907 (mark_needed): New function.
4908 (decl_needed_p): Likewise.
4909 (import_export_decl): Add documentation and consistency checks.
4910 Use repo_emit_p. Handle virtual tables and RTTI information
4912 (import_export_tinfo): Remove.
4913 (write_out_vars): Call import_export_decl.
4914 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
4916 (finish_file): Use decl_needed_p. Do not call import_export_decl
4917 for undefined static data members. Do not warn about undefined
4918 inlines when using a repository.
4919 (mark_used): Use note_vague_linkage_fn. Always defer template
4921 * lex.c (cxx_init): Adjust call to init_repo. Always set
4922 flag_unit_at_a-time.
4923 * method.c (synthesize_method): Remove unncessary
4924 import_export_decl call.
4925 (implicitly_declare_fn): Use set_linkage_according_to_type.
4926 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
4927 * pt.c (instantiate_class_template): Don't redundantly add classes
4928 to keyed_classes. Don't call repo_template_used.
4929 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
4930 templates with internal linkage.
4931 (check_instantiated_args): Adjust call to no_linkage_check.
4932 (instantiate_template): Use FOR_EACH_CLONE.
4933 (mark_definable): New function.
4934 (mark_decl_instantiated): Use it.
4935 (do_decl_instantiation): Adjust tests for explicit instantiation
4936 after "extern template".
4937 (instantiate_class_member): Do not use repo_template_instantiated.
4938 (do_type_instantiation): Simplify.
4939 (instantiate_decl): Use mark_definable. Check repo_emit_p.
4941 * repo.c (repo_get_id): Remove.
4942 (original_repo): Remove.
4943 (IDENTIFIER_REPO_USED): Remove.
4944 (IDENTIFIER_REPO_CHOSEN): Remove.
4945 Remove all #if 0'd code.
4946 (repo_template_used): Remove.
4947 (repo_template_instantiated): Remove.
4948 (temporary_obstack_initialized_p): New variable.
4949 (init_repo): Register with lang_post_pch_load. Avoid creating
4950 identifiers unnecessarily. Don't use original_repo. Close the
4952 (reopen_repo_file_for_write): Not here.
4953 (finish_repo): Always write out a new repository file.
4954 (repo_emit_p): New function.
4955 (repo_export_class_p): Likewise.
4956 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
4957 (involves_incomplete_p): New function.
4958 (tinfo_base_init): Use it.
4959 (ptr_initializer): Remove non_public_ptr parameter.
4960 (ptm_initializer): Likewise.
4961 (get_pseudo_ti_init): Likewise.
4962 (unemitted_tinfo_decl_p): Remove.
4963 (emit_tinfo_decl): Use import_export_decl.
4964 * semantics.c (expand_body): Move updates of static_ctors and
4966 (expand_or_defer_fn): ... here.
4967 * tree.c (no_linkage_check): Add relaxed_p parameter.
4969 2004-07-28 Eric Christopher <echristo@redhat.com>
4971 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
4973 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
4975 * cp-tree.h (struct tree_pair_s): New.
4976 (typedef tree_pair_p): New.
4977 (DEF_VEC_O(tree_pair_s)): New.
4978 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
4979 (CLASSTYPE_VCALL_INDICES): Update documentation.
4980 * class.c (get_vcall_index): Adjust.
4981 (add_vcall_offset): Adjust.
4983 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
4985 * pt.c, typeck.c: Remove spurious carriage returns.
4987 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4990 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
4991 when the type of ARG is not dependent.
4993 2004-07-26 Geoffrey Keating <geoffk@apple.com>
4995 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
4996 (lang_specific_driver): If the C++ or math library options don't
4997 start with '-l', don't count them as added libraries.
4999 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
5001 * decl.c (xref_basetypes): Adjust base access vector creation.
5002 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
5004 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
5006 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
5007 Brian Ryner <bryner@brianryner.com>
5011 * class.c (check_field_decls): Apply hidden visibility if
5012 -fvisibility-inlines-hidden and inlined unless otherwise specified
5013 (build_vtable): Set vtable visibility to class visibility.
5014 (check_field_decls): Default static member visibility to class
5016 (check_methods): Default method visibility to class visibility.
5017 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
5018 CLASSTYPE_VISIBILITY_SPECIFIED macro.
5019 * decl.c (duplicate_decls): New logic for merging definition decls
5020 with declaration decls. Added ignore & warning when non default
5021 applied to global operator new or delete.
5022 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
5023 wherever VISIBILITY was changed
5024 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
5026 (tinfo_base_init): Set typeinfo name visibility to class visibility.
5028 2004-07-25 Bernardo Innocenti <bernie@develer.com>
5030 * decl.c: Rename all identifiers named `class' to `cl'.
5031 * cp-tree.h: Likewise.
5033 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
5035 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
5036 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
5037 * name-lookup.c (binding_entry_make): Use GGC_NEW.
5038 (binding_table_construct): Use GGC_CNEWVEC.
5039 (binding_table_new): Use GGC_NEW.
5040 (cxx_binding_make): Likewise.
5041 (begin_scope): Likewise.
5042 (push_to_top_level): Use GCC_CNEW.
5043 * parser.c (cp_token_cache_new): Likewise.
5044 (cp_token_cache_push_token): Likewise.
5045 (cp_lexer_new_main): Likewise.
5046 (cp_lexer_new_from_tokens): Likewise.
5047 (cp_parser_context_new): Likewise.
5048 (cp_parser_new): Likewise.
5049 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
5050 * lex.c (cxx_make_type): Use GGC_CNEW.
5051 (retrofit_lang_decl): Use GGC_NEWVAR.
5052 (cxx_dup_lang_specific_decl): Likewise.
5053 (copy_lang_type): Likewise.
5054 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
5055 (save_function_data): Likewise.
5056 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
5057 (cxx_push_function_context): Likewise.
5059 2004-07-25 Richard Henderson <rth@redhat.com>
5061 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
5062 DECL_IGNORED_P on RESULT_DECL.
5063 * semantics.c (finalize_nrv): Copy them too.
5065 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
5067 * search.c (lookup_conversion_operator): Avoid two loops.
5068 (add_conversions): Remove.
5069 (check_hidden_convs, split_conversions,
5070 lookup_conversions_r): New.
5071 (lookup_conversions): Use lookup_conversions_r.
5073 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
5075 * pt.c (get_template_base): Check type is completable.
5077 2004-07-21 Eric Christopher <echristo@redhat.com>
5079 * decl.c (poplevel): Inline unused variable checking.
5082 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
5084 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
5087 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5090 * pt.c (check_explicit_specialization): Remove extension to accept
5091 specializations without template headers. Fall-through to normal
5094 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5097 * pt.c (determine_specialization): New parameter template_count.
5098 Disambiguate between member templates and member functions counting
5099 the template headers.
5100 (check_explicit_specialization): Update caller.
5101 (tsubst_friend_function): Likewise.
5103 2004-07-20 Steven Bosscher <stevenb@suse.de>
5105 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
5106 * cp-tree.h (tinst_level_t): New tree type.
5107 (union lang_tree_node): Handle it.
5108 (TINST_LOCATION): New accessor macro.
5109 (make_tinst_level): New prototype.
5110 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
5111 * decl.c (cp_tree_node_structure): Likewise.
5112 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
5113 (print_instantiation_partial_context): Likewise.
5114 * pt.c (pop_tinst_level): Likewise.
5115 (push_tinst_level): Use make_tinst_level.
5116 * tree.c (make_tinst_level): New function.
5117 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
5119 2004-07-20 Mark Mitchell <mark@codesourcery.com>
5121 * parser.c (cp_parser_simple_type_specifier): Fix typo.
5124 * parser.c (cp_parser_simple_type_specifier): Do not record usage
5125 of globally-qualified names.
5127 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5130 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
5133 2004-07-19 Mark Mitchell <mark@codesourcery.com>
5136 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
5137 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
5138 * class.c (add_implicitly_declared_members): Use
5139 CLASSTYPE_LAZY_ASSIGNMENT_OP.
5140 * method.c (lazily_declare_fn): Clear
5141 CLASSTYPE_LAZY_ASSIGNMENT_OP.
5142 * search.c (lookup_fnfields_1): Check it.
5144 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
5146 * cp-tree.h (vec_binfo_member): Remove.
5147 * tree.c (vec_binfo_member): Remove.
5149 * cp-tree.h (struct lang_type_class): Remove vfields field.
5150 (CLASSTYPE_VFIELDS): Remove.
5151 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
5152 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
5154 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
5155 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
5156 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
5158 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
5160 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
5161 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
5163 (BINFO_LANG_SLOTS): Remove.
5164 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
5165 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
5166 * class.c (check_bases): Adjust BINFO accessors.
5167 (determine_primary_base, finish_struct_bits,
5168 maybe_warn_about_overly_private_class, warn_hidden,
5169 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
5170 warn_about_ambiguous_bases, get_vfield_name,
5171 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
5172 add_vcall_offset_vtbl_entries_r): Likewise.
5173 * dump.c (cp_dump_tree): Likewise.
5174 * init.c (sort_mem_initializers, expand_member_init, build_delete,
5175 push_base_cleanups): Likewise.
5176 * method.c (do_build_copy_constructor, do_build_assign_ref,
5177 synthesize_exception_spec): Likewise.
5178 name-lookup.c (arg_assoc_class): Likewise.
5179 * pt.c (instantiate_class_template,
5180 get_template_base_recursive): Likewise.
5181 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
5182 * typeck2.c (process_init_constructor): Likewise.
5183 * search.c (lookup_base_r, dynamic_cast_base_recurse,
5184 dfs_access_in_type, dfs_walk_real, look_for_overrides,
5185 types_overlap_p, copied_binfo, original_binfo): Likewise.
5186 (binfo_for_vtable): Remove
5188 2004-07-20 Steven Bosscher <stevenb@suse.de>
5190 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
5191 thunk_alias, and the access and virtual_offset fields.
5192 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
5193 * decl.c (finish_case_label): Update c_add_case_node call.
5195 2004-07-19 Mark Mitchell <mark@codesourcery.com>
5197 Revert patch for PR c++/16623.
5199 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
5201 * except.c: Remove two spurious carriage returns.
5203 2004-07-19 Mark Mitchell <mark@codesourcery.com>
5206 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
5207 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
5208 * class.c (add_implicitly_declared_members): Use
5209 CLASSTYPE_LAZY_ASSIGNMENT_OP.
5210 * method.c (lazily_declare_fn): Clear
5211 CLASSTYPE_LAZY_ASSIGNMENT_OP.
5212 * search.c (lookup_fnfields_1): Check it.
5214 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
5216 * class.c (add_method): Delay adding the slot until the end.
5217 (determine_primary_base): Adjust VEC_iterate invokation.
5218 (resort_type_method_vec, finish_struct_methods, warn_hidden,
5219 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
5220 build_vtbl_initializer): Likewise.
5221 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
5222 build_vbase_delete): Likewise.
5223 * method.c (do_build_copy_constructor): Likewise.
5224 * name-lookup.c (new_class_binding, print_binding_level,
5225 poplevel_class, store_class_bindings, push_to_top_level,
5226 pop_from_top_level): Likewise.
5227 * pt.c (check_explicit_specialization): Likewise.
5228 * search.c (lookup_conversion_operator, lookup_fnfields_1,
5229 get_pure_virtuals, add_conversions, dfs_check_overlap,
5230 binfo_for_vbase): Likewise.
5232 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5235 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
5236 innermost set of template arguments during deduction. Simplify.
5238 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
5240 * typeck.c (build_modify_expr, build_x_modify_expr): Set
5241 TREE_NO_WARNING on assignments with an operator other than '='.
5243 2004-07-10 Steven Bosscher <stevenb@suse.de>
5244 Joseph S. Myers <jsm@polyomino.org.uk>
5246 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
5247 * decl2.c (grokfield): Don't check current_class_depth via
5248 unused TREE_COMPLEXITY.
5249 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
5250 to avoid the missing parentheses warning.
5251 Don't set C_SET_EXP_ORIGINAL_CODE.
5253 2004-07-18 Mark Mitchell <mark@codesourcery.com>
5255 * tree.c (no_linkage_helper): Remove.
5256 (no_linkage_check): Don't use walk_tree_without_duplicates.
5258 * mangle.c (write_expression): Issue a sorry for zero-operand
5261 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5264 * init.c (build_offset_ref): Build SCOPE_REF with non-null
5265 TREE_TYPE for non-dependent names.
5266 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
5267 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
5268 unknown_type_node as its TREE_TYPE.
5269 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
5270 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
5271 (dump_expr) <SCOPE_REF case>: Likewise.
5273 2004-07-17 Jason Merrill <jason@redhat.com>
5276 * call.c (type_passed_as): Make the invisible reference type
5278 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
5279 cp_genericize_r. Handle invisible reference lowering.
5280 (is_invisiref_parm): New fn.
5281 (cp_genericize): Adjust the types of invisible reference parms.
5282 Don't repeat the walk for clones.
5283 * decl.c (store_parm_decls): Don't generate any code for clones.
5285 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
5287 * cp-tree.h (builtin_function): Declare.
5289 2004-07-16 Mark Mitchell <mark@codesourcery.com>
5291 * class.c (finish_struct_methods): Remove unncessary code.
5292 (add_implicitly_declared_members): Create declarations for default
5293 constructors and copy constructors lazily.
5294 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
5296 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
5297 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
5298 * decl2.c (check_classfn): Robustify.
5299 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
5300 (locate_ctor): Handle lazy default constructors.
5301 (locate_copy): Handle lazy copy constructors.
5302 (implicitly_declare_fn): Make sure we're looking at the
5303 TYPE_MAIN_VARIANT for a class before creating functions. Don't
5304 set TYPE_HAS_CONSTRUCTOR.
5305 (lazily_declare_fn): New function.
5306 * name-lookup.c (constructor_name_full): Simplify.
5307 * search.c (lookup_fnfields_1): Lazily create methods, as
5309 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
5311 2004-07-16 Steven Bosscher <stevenb@suse.de>
5313 * cp-tree.h (struct lang_type): Don't have three GTY options on a
5314 single bit GTY desc.
5316 2004-07-16 Richard Henderson <rth@redhat.com>
5318 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
5319 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
5320 * tree.c (cp_copy_res_decl_for_inlining): Remove.
5322 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
5324 * class.c (finish_struct_bits): Use for loop.
5325 (propagate_binfo_offsets): Do primary binfo outside of loop.
5328 * dump.c (cp_dump_tree): Don't dump the bases if there's no
5331 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
5333 2004-07-15 Mark Mitchell <mark@codesourcery.com>
5335 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
5336 has_abstract_assign_ref. Make methods a VEC(tree) *.
5337 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
5338 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
5339 (CLASSTYPE_DESTRUCTORS): Likewise.
5340 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
5341 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
5342 (add_method): Change prototoype.
5343 * class.c (add_method): Remove error_p parameter. Adjust for
5344 changes to CLASSTYPE_METHOD_VEC.
5345 (handle_using_decl): Adjust call to add_method.
5346 (maybe_warn_about_overly_private_class): Adjust for
5347 changes to CLASSTYPE_METHOD_VEC.
5348 (resort_type_method_vec): Likewise.
5349 (finish_struct_methods): Likewise.
5350 (check_for_override): Likewise.
5351 (warn_hidden): Likewise.
5352 (add_implicitly_declared_members): Defer creation of assignment
5353 operators. Adjust call to add_method.
5354 (clone_function_decl): Adjust call to add_method.
5355 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
5356 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
5357 * decl.c (grok_special_member_properties): Don't set
5358 TYPE_HAS_ABSTRACT_ASSIGN_REF.
5359 * decl2.c (check_classfn): Adjust for
5360 changes to CLASSTYPE_METHOD_VEC.
5361 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
5362 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
5363 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
5364 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
5366 * pt.c (check_explicit_specialization): Adjust for
5367 changes to CLASSTYPE_METHOD_VEC.
5368 (instantiate_class_template): Do not set
5369 TYPE_HAS_ABSTRACT_ASSIGN_REF.
5370 * ptree.c (cxx_print_type): Don't try to print
5371 CLASSTYPE_METHOD_VEC.
5372 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
5373 * search.c (lookup_field_r): Adjust for
5374 changes to CLASSTYPE_METHOD_VEC.
5375 (lookup_fnfields): Likewise.
5376 (lookup_conversion_operator): Likewise.
5377 (lookup_fnfields_1): Likewise. Create assignment operators
5379 (look_for_overrides_here): Adjust for
5380 changes to CLASSTYPE_METHOD_VEC.
5381 (add_conversions): Likewise.
5382 * semantics.c (finish_member_declaration): Adjust call to add_method.
5384 2004-07-15 Jason Merrill <jason@redhat.com>
5386 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
5387 references and pointers are compatible.
5389 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
5391 * decl.c (xref_basetypes): Refactor.
5392 * tree.c (copy_base_binfos): Replace with ...
5393 (copy_binfo): ... this. Deep copy the given binfo, (not the just
5394 bases of the given base).
5395 * cp-tree.h (copy_base_binfo): Remove.
5396 (copy_binfo): Declare.
5398 2004-07-15 Mark Mitchell <mark@codesourcery.com>
5400 * name-lookup.c (set_inherited_value_binding_p): Add class_type
5402 (get_class_binding): Adjust.
5403 (push_class_level_binding): Don't use set_inherited_value_binding_p.
5405 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
5407 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
5408 * decl.c (xref_basetypes): Set it here.
5410 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
5411 Don't check for incomplete base.
5412 (get_vfield_name): Simplify while loop.
5413 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
5415 2004-07-14 Mark Mitchell <mark@codesourcery.com>
5417 * lex.c (cxx_make_type): Remove call to get_pointer_type.
5419 * cp-tree.h (IDENTIFIER_VALUE): Remove.
5420 (BINFO_PUSHDECLS_MARKED): Likewise.
5421 (maybe_inject_for_scope_var): Likewise.
5422 (push_class_decls): Likewise.
5423 * name-lookup.h (push_class_binding): Remove.
5424 (innermost_non_namespace_value): New function.
5425 (outer_binding): Likewise.
5426 * class.c (add_method): Push bindings before adding to
5428 (restore_class_cache): Do not restore class_shadowed.
5429 (pushclass): Do not add USING_DECLs. Do not call
5431 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
5432 * decl.c (pushdecl): Use outer_binding.
5433 (poplevel): Set the scope for an out-of-scope for-loop declaration
5435 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
5436 * name-lookup.c (new_class_binding): New function.
5437 (push_binding): Use it.
5438 (pushdecl): Use innermost_non_namespace_value.
5439 (maybe_inject_for_scope_var): Remove.
5440 (push_class_binding): Remove.
5441 (set_inherited_value_binding_p): New function.
5442 (get_class_binding): New function.
5443 (push_class_level_binding): Assert that the current_class_type is
5445 (outer_binding): New function.
5446 (innermost_non_namespace_value): Likewise.
5447 (lookup_name_real): Use outer_binding.
5448 (lookup_name_current_level): Ignore out-of-scope variables.
5449 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
5450 (lookup_template_class): Likewise.
5451 * search.c (dfs_push_type_decls): Remove.
5452 (dfs_push_decls): Likewise.
5453 (setup_class_bindings): Likewise.
5454 (lookup_field_1): Handle USING_DECLs from dependent scopes.
5455 (marked_pushdecls_p): Remove.
5456 (unmarked_pushdecls_p): Remove.
5457 (marked_identifiers): Remove.
5458 (setup_class_bindings): Remove.
5459 (dfs_push_type_decls): Remove.
5460 (dfs_push_decls): Remove.
5461 (push_class_decls): Remove.
5463 2004-07-13 Mark Mitchell <mark@codesourcery.com>
5467 * decl.c (grokvardecl): Make declspecs parameter const.
5468 (grokdeclarator): Likewise. Adjust accordingly.
5469 * decl.h (grokdeclarator): Adjust declaration.
5470 * parser.c (cp_parser_init_declarator): Do not clear
5471 decl_specifiers->attributes.
5473 * cp-tree.h (lang_identifier): Remove class_value.
5474 (IDENTIFIER_CLASS_VALUE): Remove.
5475 (pop_class_decls): Likewise.
5476 (init_search_processing): Likewise.
5477 * class.c (handle_using_decl): Use lookup_member, not
5478 IDENTIFIER_CLASS_VALUE.
5479 (restore_class_cache): New function, split out from ...
5480 (pushclass): ... here. Do not call clear_identifier_class_values.
5481 (invalidate_class_lookup_cache): Do not clear
5482 IDENTIFIER_CLASS_VALUE.
5483 (popclass): Do not call pop_class_decls.
5484 (maybe_note_name_used_in_class): Do not save names looked up after
5485 the class is complete. Use lookup_member, not
5486 IDENTIFIER_CLASS_VALUE.
5487 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
5488 * decl.c (cxx_init_decl_processing): Do not call
5489 init_search_processing.
5490 * method.c (do_build_copy_constructor): Remove unnecessary code.
5491 (do_build_assign_ref): Likewise.
5492 * name-lookup.c (pushdecl): Use lookup_member, not
5493 IDENTIFIER_CLASS_VALUE.
5494 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
5496 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
5497 (push_class_binding): Do not set it.
5498 (clear_identifier_class_values): Remove.
5499 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
5500 (store_binding): Do not save it.
5501 (pop_from_top_level): Do not restore it.
5502 * name-lookup.h (cxx_saved_binding): Remove class_value.
5503 (clear_identifier_class_values): Remove.
5504 * ptree.c (cxx_print_identifier): Do not print
5505 IDENTIFIER_CLASS_VALUE.
5506 * search.c (search_obstack): Remove.
5507 (push_stack_level): Remove.
5508 (pop_stack_level): Remove.
5509 (search_level): Remove.
5510 (search_stack): Remove.
5511 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
5512 (setup_class_bindings): Use IDENTIFIER_MARKED, not
5513 IDENTIFIER_CLASS_VALUE.
5514 (marked_identifiers): New variable.
5515 (push_class_decls): Clear IDENTIFIER_MARKED.
5516 (pop_class_decls): Don't call pop_search_level.
5517 (init_search_processing): Remove.
5519 2004-07-12 Mark Mitchell <mark@codesourcery.com>
5521 * cp-tree.h (get_aggr_typedef): Remove.
5522 * init.c (get_aggr_typedef): Likewise.
5524 * name-lookup.c (push_class_level_binding): Simplify.
5526 2004-07-12 Andrew Pinski <apinski@apple.com>
5530 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
5532 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
5535 2004-07-12 Eric Christopher <echristo@redhat.com>
5537 * parser.c (cp_parser_class_head): Remove unused variable.
5539 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5541 * decl.c (grok_op_properties): Reject [de-]allocation functions
5542 declared in a namespace, or declared as static.
5544 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
5546 * cp-tree.h (make_binfo): Remove.
5547 * decl.c (xref_basetypes): Use make_tree_binfo directly.
5548 * tree.h (copy_base_binfos): Likewise.
5549 (make_binfo): Remove.
5551 * call.c (build_user_type_conversion_1, build_new_op,
5552 check_constructor_callable, build_temp,
5553 perform_direct_initialization_of_possible): Pass type directly to
5554 lookup_fnfields & build_special_member_call.
5555 (build_special_member_call): Accept a type, and complete it.
5556 * class.c (finish_stuct_bits): Copy the BINFOs here.
5557 * cvt.c (ocp_convert): Pass type directly to
5558 build_special_member_call.
5559 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
5560 (xref_basetypes): Allocate the binfo here. Adjust.
5561 * init.c (build_init, build_new_1): Pass type directly to
5562 build_special_member_call.
5563 * lex.c (cxx_make_type): Do not allocate binfo here.
5564 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
5565 * parser.c (cp_parser_class_head): Always call xref_basetypes.
5566 * pt.c (instantiate_class_template): Likewise. Inhibit access
5567 checking for template friends.
5568 * ptree.c (cxx_print_type): Adjust record printing.
5569 * search.c (lookup_base): When taking a type, complete it before
5570 looking for a binfo.
5571 (lookup_member): Delay completing a type.
5572 (push_class_decls): Don't walk an incomplete type.
5573 (lookup_conversions): Likewise.
5574 * semantics.c (finish_stmt_expr_expr): Pass type directly to
5575 build_special_member_call.
5576 * tree.c (copy_base_binfos): Adjust.
5577 (make_binfo): Likewise.
5578 * typeck.c (build_modify_expr): Pass type directly to
5579 build_special_member_call.
5580 * typeck2.c (process_init_constructor): Check a binfo exists.
5581 (build_m_component_ref): Allow accessing an incomplete type.
5582 (build_functional_cast): Pass type directly to
5583 build_special_member_call.
5585 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5588 * config-lang.in (gtfiles): Add typeck2.c.
5589 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
5591 * cp-tree.h: Declare complete_type_check_abstract.
5592 * typeck2.c (pat_calc_hash, pat_compare,
5593 complete_type_check_abstract): New functions.
5594 (abstract_virtuals_error): If the type is abstract, register the
5595 declaration within abstract_pending_vars for further checks.
5596 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
5597 * decl.c (cp_finish_decl): Do not strip array types.
5598 (create_array_type_for_decl): Check for abstractness of the element
5600 (complete_vars): Call complete_type_check_abstract.
5601 * class.c (finish_struct): Prepare a list of virtual functions for
5602 template types, and call complete_vars on it to check for abstractness.
5604 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
5606 PR tree-optimization/14107
5607 * decl.c (finish_function): Remove temporary band-aid.
5609 2004-07-11 Mark Mitchell <mark@codesourcery.com>
5611 * call.c (build_operator_new_call): Avoid using push_to_top_level.
5612 (build_new_op): Adjust call to lookup_function_nonclass.
5613 * name-lookup.c (identifier_type_value): Adjust call to
5615 (lookup_name_real): Add block_p parameter.
5616 (lookup_name_nonclass): Adjust call to lookup_name_real.
5617 (lookup_function_nonclass): Likewise.
5618 (lookup_name): Likewise.
5619 * name-lookup.h (lookup_name_real): Change prototype.
5620 (lookup_name_nonclass): Likewise.
5621 * parser.c (cp_parser_lookup_name): Likewise.
5623 * cp-tree.h (saved_scope): Make old_bindings a vector.
5624 (unuse_fields): Remove.
5625 * name-lookup.h (cxx_saved_binding): Define it.
5626 * class.c (pushclass): Don't use unuse_fields.
5627 * name-lookup.c (cxx_saved_binding_make): Remove.
5628 (store_binding): Add new bindings to a vector, using an
5629 accumulator style, rather than adding them to a list.
5630 (store_bindings): Adjust accordingly.
5631 (store_class_bindings): Likewise.
5632 (push_to_top_level): Likewise.
5633 (pop_from_top_level): Likewise.
5634 * optimize.c (maybe_clone_body): Must push_to_top_level and
5635 pop_from_top_level calls outside of loop.
5636 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
5637 calls here from cp_parser_late_parsing_default_args.
5638 (cp_parser_save_default_args): Record the class type in which the
5639 function is declared.
5640 (cp_parser_late_parsing_default_args): Do not call
5641 push_nested_class/pop_nested_class.
5642 * search.c (dfs_unuse_fields): Remove.
5643 (unuse_fields): Remove.
5645 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
5647 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
5648 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
5649 * cp-tree.h (poplevel): Declare.
5650 (set_block): Remove.
5651 * decl.c (set_block): Remove.
5653 2004-07-10 Mike Stump <mrs@apple.com>
5655 * decl2.c (import_export_class): Never export/import vtables
5656 with inline key functions.
5658 2004-07-09 Steven Bosscher <stevenb@suse.de>
5660 * typeck.c (c_expand_asm_operands): Remove.
5662 2004-07-09 Mike Stump <mrs@apple.com>
5664 * typeck.c (build_class_member_access_expr): Skip null deref
5665 warning when we don't dereference it.
5667 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5671 * class.c (check_field_decls): Improve -Weffc++ warning: do not
5672 warn for pointers to functions/members, or for classes without
5675 2004-07-08 Mark Mitchell <mark@codesourcery.com>
5677 * name-lookup.h (struct cp_binding_level): Update documentation
5680 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5683 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
5684 returning CALL_EXPR, and non-reference return type.
5686 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
5688 * name-lookup.c (push_binding): Use VEC_reserve.
5690 2004-07-08 Richard Henderson <rth@redhat.com>
5692 * cp-tree.h (expand_eh_spec_block): Remove.
5694 2004-07-07 Mark Mitchell <mark@codesourcery.com>
5696 * cp-tree.h (saved_scope): Remove x_previous_class_type and
5697 x_previous_class_values; add x_previous_class_level.
5698 (previous_class_type): Remove.
5699 (previous_class_values): Remove.
5700 (previous_class_level): New macro.
5701 * class.c (pushclass): Restore the identifier cache more
5703 (invalidate_class_lookup_cache): Use vector for class_shadowed and
5704 previous_class_values.
5705 * decl.c (poplevel): Likewise.
5706 * name-lookup.c (cxx_binding_init): New function.
5707 (cxx_binding_make): Use it.
5708 (push_binding): For a binding in a class level, use a vector of
5709 cp_class_binding nodes.
5710 (push_binding_level): New function.
5711 (begin_scope): Use it.
5712 (leave_scope): Do not put class binding levels on the free list.
5713 (print_binding_level): Adjust for the fact that class_shadowed is
5715 (poplevel_class): Likewise.
5716 (clear_identifier_class_values): Likewise.
5717 (push_class_level_binding): Likewise.
5718 (set_class_shadows): Remove.
5719 (store_binding): New function.
5720 (store_class_bindings): New function.
5721 (push_to_top_level): Use store_class_bindings as appropriate.
5722 (pop_from_top_level): Use previous_class_level, not
5723 previous_class_type.
5724 * name-lookup.h (cp_class_binding): New type.
5725 (cp_binding_level): Use a vector object for class_shadowed.
5726 (push_binding_level): Declare.
5727 (set_class_shadows): Remove.
5729 2004-07-07 Andrew Pinski <apinski@apple.com>
5731 * class.c (instantiate_type): BUFFER_REF is dead.
5732 * lex.c (init_operators): IN_EXPR is dead.
5734 2004-07-07 Jason Merrill <jason@redhat.com>
5737 * call.c (build_new_op): Give overload warnings for built-in
5740 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
5743 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
5746 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
5748 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
5749 * class.c (build_primary_vtable, check_bases,
5750 determine_primary_base, finish_struct_bits,
5751 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
5752 get_basefndecls, warn_hidden, walk_subobject_offsets,
5753 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
5754 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
5755 finish_struct_1, get_vfield_name, contains_empty_class_p,
5756 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
5757 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
5758 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
5760 * decl.c (xref_basetypes): Likewise.
5761 * dump.c (cp_dump_tree): Likewise.
5762 * error.c (dump_expr): Likewise.
5763 * init.c (sort_mem_initializers, expand_member_init,
5764 push_base_cleanups): Likewise.
5765 * method.c (do_build_copy_constructor, do_build_assign_reg,
5766 synthesize_exception_spec): Likewise.
5767 * name-lookup.c (arg_assoc_class): Likewise.
5768 * pt.c (instantiate_class_template, tsubst,
5769 get_template_base_recursive): Likewise.
5770 * ptree.c (cxx_print_type): Likewise.
5771 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
5772 * search.c (lookup_base_r, dynamic_cast_base_recurse,
5773 dfs_access_in_type, access_in_type, lookup_field_queue_p,
5774 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
5775 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
5776 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
5777 binfo_for_vtable, copied_binfo, original_binfo): Likewise
5778 * tree.c (copy_base_binfos, make_binfo): Likewise.
5779 * typeck.c (commmon_base_type): Likewise
5780 * typeck2.c (process_init_constructor): Likewise
5782 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
5784 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
5786 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5789 * pt.c (convert_nontype_argument): Disallow conversions between
5790 different enumeration types.
5792 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
5794 * cp-tree.h (BINFO_MARKED): Remove.
5795 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
5796 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
5797 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
5798 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
5799 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
5800 (mark_primary_bases, determine_primary_base, base_derived_from,
5801 dfs_find_final_overrider, dfs_find_final_overrider_q,
5802 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
5803 dfs_modify_vtables, walk_subobject_offsets,
5804 layout_nonempty_base_or_field, build_base_field,
5805 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
5806 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
5807 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
5808 build_ctor_vtbl_group, accumulate_vtble_inits,
5809 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
5810 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
5811 add_vcall_offset_vtbl_entries_1): Likewise.
5812 * decl.c (xref_basetypes): Incomming virtual base indicated by
5814 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
5815 * init.c (finish_init_stmts, sort_mem_initializers,
5816 emit_mem_initializers, build_vtble_address, expand_member_init,
5817 push_base_cleanups): Likewise.
5818 * method.c (do_build_copy_constructor): Likewise.
5819 * pt.c (instantiate_class_template,
5820 get_template_base_recursive): Likewise.
5821 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
5822 get_pseudo_ti_desc): Likewise.
5823 * search.c (lookup_base_r, dynamic_cast_base_recurse,
5824 binfo_from_vbase, binfo_via_virtual, copied_binfo,
5825 original_binfo): Likewise.
5826 * semantics.c (finish_base_specifier): Virtualness is indicated
5828 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
5830 2004-07-06 Mark Mitchell <mark@codesourcery.com>
5833 2004-06-24 Jason Merrill <jason@redhat.com>
5835 * decl.c (grokparms): Give the PARM_DECL reference type if the
5836 parameter is passed by invisible reference.
5838 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5840 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
5841 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
5842 * pt.c (check_instantiated_args, unify): Likewise.
5844 2004-07-05 Phil Edwards <phil@codesourcery.com>
5846 * Make-lang.in (check-c++, lang_checks): Add some comments.
5848 2004-07-05 Zack Weinberg <zack@codesourcery.com>
5850 * cp-mudflap.c: Delete file.
5851 * Makefile.in: Remove all references to cp-mudflap.o.
5853 2004-07-05 Zack Weinberg <zack@codesourcery.com>
5855 * decl.c (cxx_init_decl_processing): Call
5856 build_common_tree_nodes before creating the global NAMESPACE_DECL.
5858 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5861 * call.c (build_operator_new_call): Look only at global scope.
5863 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
5865 * call.c (enforce_access): Expect TREE_BINFO.
5866 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
5867 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
5868 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
5870 (BINFO_LANG_ELTS): Remove.
5871 (BINFO_LANG_SLOTS): New.
5872 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
5873 (CLASSTYPE_TEMPLATE_INFO): Adjust.
5874 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
5875 * search.c (lookup_member): Check TREE_BINFO.
5876 * semantics.c (perform_or_defer_access_check): Likewise.
5877 (check_accessibility_of_qualified_id): Check
5878 deferred_access_no_check.
5879 * tree.c (make_binfo): Use make_tree_binfo.
5881 2004-07-04 Mark Mitchell <mark@codesourcery.com>
5883 * method.c (implicitly_declare_fn): Set linkage of generated
5886 2004-07-04 Richard Henderson <rth@redhat.com>
5888 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
5890 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
5893 * name-lookup.c (push_class_level_binding): Don't pass a
5894 TREE_LIST of ambiguous names to check_template_shadow as it
5895 only handles declarations. Instead, pull the declaration
5898 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5901 * pt.c (check_explicit_specialization): Clarify error message.
5903 2004-07-02 Richard Henderson <rth@redhat.com>
5905 * tree.c (cp_unsave_r): Update remap_save_expr call.
5907 2004-07-02 Mark Mitchell <mark@codesourcery.com>
5910 * mangle.c (write_template_arg): Correct mangling.
5913 * decl.c (grokdeclarator): Robustify.
5915 2004-07-01 Richard Henderson <rth@redhat.com>
5917 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
5918 * method.c (synthesize_method): Don't clear_last_expr.
5919 * name-lookup.c (maybe_push_cleanup_level): Likewise.
5921 2004-07-01 Nick Clifton <nickc@redhat.com>
5923 * decl2.c (import_export_class): Invoke the
5924 import_export_class field in the gcc_target structure if it is not
5927 2004-06-30 Richard Henderson (rth@redhat.com>
5929 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
5930 * method.c (use_thunk): Likewise.
5932 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
5934 * call.c (build_over_call), typeck.c (build_function_call): Call
5935 check_function_arguments instead of check_function_format.
5937 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
5939 * call.c (build_over_call), typeck.c (build_function_call): Update
5940 calls to check_function_format.
5942 2004-06-30 Richard Henderson <rth@redhat.com>
5944 * call.c (build_over_call): Use __builtin_memcpy for copying
5945 CLASS_AS_BASE rather than funny casting.
5947 2004-06-30 Richard Henderson <rth@redhat.com>
5949 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
5950 TYPE_SIZE_UNIT of full_type.
5952 2004-06-30 Per Bothner <per@bothner.com>
5954 Conditionally compile support for --enable-mapped_location.
5955 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
5956 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
5957 adjustments - which I don't understand.
5958 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
5959 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
5960 (print_instantiation_partial_context): Use expand_location.
5961 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
5962 * name-lookup.c: Likewise.
5963 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
5964 * name-lookup.c: Use input_line macro.
5965 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
5966 (cp_parser_statement): Rename locaal variable statement_locus to
5967 statement_location and use SET_EXPR_LOCATION macro.
5968 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
5969 * tree.c (cp_walk_subtrees): Likewise.
5971 2004-06-29 Per Bothner <per@bothner.com>
5973 * tree.c (build_min_nt, build_min, build_min_non_dep):
5974 Don't set TREE_COMPLEXITY from input_line.
5976 2004-06-29 Paul Brook <paul@codesourcery.com>
5978 * init.c: Include target.h.
5979 (get_cookie_size): Remove and replace with target hook.
5981 (build_new_1): Store the element size in the cookie.
5983 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
5986 * parser.c (cp_parser_template_declaration_after_export): Disable
5987 access checks here ...
5988 (cp_parser_class_specifier): ... not here.
5990 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
5992 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
5993 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
5994 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
5997 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
5999 * cp-tree.h (struct deferred_access): Move to ...
6000 * semantics.c (struct deferred_access): ... here. Adjust.
6001 (deferred_access_stack): Make a VEC(deferred_access),
6002 (deferred_access_free_list): Remove.
6003 (deferred_access_no_check): New.
6004 (push_deferring_access_checks, resume_deferring_access_checks,
6005 stop_deferring_access_checks, pop_deferring_access_checks,
6006 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
6007 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
6009 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
6012 * call.c (build_temp): Declare.
6013 (check_constructor_callable): New.
6014 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
6015 CONSTRUCTOR_CALLABLE.
6016 (convert_like_real, initialize_reference): Use
6017 check_constructor_callable.
6018 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
6019 (LOOKUP_*): Renumber.
6021 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
6023 * friend.c (add_friend): Only perform access checks when context
6025 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
6026 * parser.c (cp_parser_class_specifier): Disable access checks here
6027 when parsing the body of a templated class.
6028 * semantics.c (perform_or_defer_access_checks): Reorder to allow
6029 NULL binfos when not checking access.
6031 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
6033 Use vector API for vbase list.
6034 * cp-tree.h: Include vec.h
6035 (DEF_VEC_P (tree)): New type.
6036 (struct lang_type_class): Change vbase's member type.
6037 (binfo_for_vbase): Declare.
6038 * class.c (determine_primary_base, base_derived_from,
6039 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
6040 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
6041 build_vtbl_initializer): Adjust.
6042 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
6044 * init.c (sort_mem_initializers, expand_member_init,
6045 push_base_cleanups): Adjust.
6046 * method.c (do_build_copy_constructor): Adjust.
6047 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
6048 (binfo_for_vbase): New.
6049 * tree.c (copy_base_binfos): Adjust.
6051 2004-06-28 Mark Mitchell <mark@codesourcery.com>
6053 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
6055 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
6058 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
6059 paranthesis in case of pointers to array members.
6060 * error.c (dump_type_prefix): Likewise.
6061 (dump_type_suffix): Maybe issue a whitespace when printing
6064 2004-06-27 Mark Mitchell <mark@codesourcery.com>
6067 * parser.c (cp_parser_set_decl_spec_type): Refine test for
6068 redefinition of built-in types.
6070 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
6072 * error.c (pp_template_argument_list_start): Remove.
6073 (pp_template_argument_list_end): Likewise.
6074 (pp_separate_with_comma): Use pp_cxx_separate_with.
6075 (reinit_global_formatting_buffer): Remove.
6076 (pp_non_consecutive_character): Likewise.
6077 (dump_scope): Use pp_cxx_colon_colon.
6078 (dump_template_parameter): Use pp_cxx_identifier,
6079 pp_cxx_tree_identifier and pp_cxx_whitespace.
6080 (dump_templat_bindings): Replace use of pp_string with sequence
6081 of pp_cxx_whitespace and pp_equal.
6082 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
6083 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
6085 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
6086 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
6087 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
6088 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
6089 pp_cxx_right_bracket, pp_cxx_identifier throughout,
6090 (dump_decl): Likewise.
6091 (dump_template_decl): Likewise.
6092 (dump_function_decl): Likewise. Set padding as appropriate.
6093 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
6095 (dump_exception_spec): Likewise.
6096 (dump_function_name): Use pp_cxx_tree_identifier and
6098 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
6099 pp_cxx_end_template_argument_list.
6100 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
6101 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
6102 pp_cxx_whitespace throughout.
6103 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
6105 (dump_unary_op): Likewise.
6106 (reinit_cxx_pp): New function.
6107 (type_as_string); Use it.
6108 (expr_as_string): Likewise.
6109 (decl_as_string); Likewise.
6110 (context_as_string): Likewise.
6111 (lang_decl_name): Likewise.
6112 (decl_to_string): Likewise.
6113 (expr_to_string): Likewise.
6114 (parm_to_string): Likewise.
6115 (type_to_string): Likewise.
6116 (args_to_string): Likewise.
6117 (cv_to_string): Likewise.
6119 2004-06-26 Mark Mitchell <mark@codesourcery.com>
6121 * cp-tree.h (cp_cv_quals): New type.
6122 (cp_declarator): Use it instead of "tree" as appropriate.
6123 (grok_method_quals): Adjust prototype.
6124 (grokclassfn): Likewise.
6125 (do_friend): Likewise.
6126 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
6127 (grokdeclarator): Likewise.
6128 * decl2.c (grok_method_quals): Likewise.
6129 (grokclassfn): Likewise.
6130 * friend.c (do_friend): Likewise.
6131 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
6132 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
6133 (make_pointer_declarator): Likewise.
6134 (make_reference_declarator): Likewise.
6135 (make_ptrmem_declarator): Likewise.
6136 (cp_parser_ptr_operator): Likewise.
6137 (cp_parser_cv_qualifier_seq_opt): Likewise.
6138 (cp_parser_cv_qualifier_opt): Remove.
6139 (cp_parser_new_declarator_opt): Adjust call to
6140 cp_parser_ptr_operator.
6141 (cp_parser_conversion_declaration_opt): Likewise.
6142 (cp_parser_declarator): Use cp_cv_quals, not tree.
6143 (cp_parser_direct_declarator): Likewise.
6145 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6147 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
6148 Rename DECL_STMT to DECL_EXPR.
6149 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
6150 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
6151 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
6153 2004-06-26 Jan Hubicka <jh@suse.cz>
6156 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
6157 reachability analysis.
6159 2004-06-25 Mark Mitchell <mark@codesourcery.com>
6161 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
6164 2004-06-25 Paul Brook <paul@codesourcery.com>
6166 * decl2.c (get_guard): Call targetm.cxx.guard_type.
6167 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
6169 2004-06-24 Mark Mitchell <mark@codesourcery.com>
6171 * decl.c (grokdeclarator): Restore error messages about __thread.
6172 * parser.c (cp_parser_decl_specifier_seq): Likewise.
6174 2004-06-24 Jason Merrill <jason@redhat.com>
6177 * decl.c (grokparms): Give the PARM_DECL reference type if the
6178 parameter is passed by invisible reference.
6180 2004-06-24 Andreas Schwab <schwab@suse.de>
6182 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
6184 2004-06-23 Mark Mitchell <mark@codesourcery.com>
6186 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
6187 (cp/decl.o): Likewise.
6188 (cp/decl2.o): Likewise.
6189 (cp/pt.o): Likewise.
6190 (cp/semantics.o): Likewise.
6191 * config-lang.in (gtfiles): Do not reference cp/lex.h.
6192 * class.c: Do not include lex.h.
6193 (add_implicitly_declared_members): Do not use
6194 adding_implicit_members.
6195 (check_bases_and_members): Do not talk about grok_x_components.
6196 * cp/cp-tree.h (adding_implicit_members): Remove.
6197 (cp_storage_class): New type.
6198 (cp_decl_spec): Likewise.
6199 (cp_decl_specifier_seq): Likewise.
6200 (cp_parameter_declarator): Use it for the decl_specifiers field.
6201 (check_tag_decl): Adjust prototype.
6202 (shadow_tag): Likewise.
6203 (groktypename): Likewise.
6204 (start_decl): Likewise.
6205 (start_function): Likewise.
6206 (start_method): Likewise.
6207 (grok_x_components): Remove.
6208 (grokfield): Adjust prototype.
6209 (grokbitfield): Likewise.
6210 (finish_member_class_template): Remove.
6211 * decl.c: Do not include lex.h.
6212 (adding_implicit_members): Do not define.
6213 (check_tag_decl): Do not use trees to represent decl-specifiers.
6214 (shadow_tag): Likewise.
6215 (groktypename): Likewise.
6216 (start_decl): Likewise.
6217 (grokvardecl): Likewise.
6218 (grokdeclarator): Likewise.
6219 (grokparms): Likewise.
6220 (start_function): Likewise.
6221 (start_method): Likewise.
6222 * decl.h (grokdeclarator): Adjust prototype.
6223 * decl2.c: Do not include lex.h.
6224 (grok_x_components): Remove.
6225 (grokfield): Do not use trees to represent decl-specifiers.
6226 (grokbitfield): Likewise.
6227 * lex.c: Do not include lex.h.
6229 * parser.c: Include target.h.
6230 (clear_decl_specs): New function.
6231 (cp_parser_translation_unit): Do not use trees to represent
6233 (cp_parser_postfix_expression): Likewise.
6234 (cp_parser_new_type_id): Likewise.
6235 (cp_parser_condition): Likewise.
6236 (cp_parser_simple_declaration): Likewise.
6237 (cp_parser_decl_specifier_seq): Likewise.
6238 (cp_parser_function_specifier_opt): Likewise.
6239 (cp_parser_conversion_type_id): Likewise.
6240 (cp_parser_template_parameter): Likewise.
6241 (cp_parser_explicit_instantiation): Likewise.
6242 (cp_parser_type_specifier): Likewise.
6243 (cp_parser_simple_type_specifier): Likewise.
6244 (cp_parser_init_declarator): Likewise.
6245 (cp_parser_type_id): Likewise.
6246 (cp_parser_type_specifier_seq): Likewise.
6247 (cp_parser_parameter_declaration): Likewise.
6248 (cp_parser_member_declaration): Likewise.
6249 (cp_parser_exception_declaration): Likewise.
6250 (cp_parser_function_definition_from_specifiers_and_declarator):
6252 (cp_parser_single_declaration): Likewise.
6253 (cp_parser_save_member_function_body): Likewise.
6254 (cp_parser_friend_p): Likewise.
6255 (cp_parser_set_storage_class): New function.
6256 (cp_parser_set_decl_spec_type): Likewise.
6257 * pt.c: Do not include lex.h.
6258 * semantics.c: Likewise.
6259 (finish_member_class_template): Remove.
6261 2004-06-23 Roger Sayle <roger@eyesopen.com>
6263 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
6264 longer take both "args" and "convert_args" as arguments.
6265 (build_op_delete_call): Update call to build_cxx_call.
6266 (build_over_call): Likewise, update call to build_cxx_call.
6267 * cp-tree.h (build_cxx_call): Update funtion prototype.
6268 * typeck.c (build_function_call): Don't call expand_tree_builtin.
6269 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
6270 (throw_bad_typeid): Likewise.
6271 (build_dynamic_cast_1): Likewise.
6273 2004-06-22 Richard Henderson <rth@redhat.com>
6275 * class.c (build_vfn_ref): Take a pointer not object. Build
6277 (cp_fold_obj_type_ref): New.
6278 * call.c (build_over_call): Update build_vfn_ref call.
6279 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
6280 * cp-tree.h (cp_fold_obj_type_ref): Declare.
6282 2004-06-21 Jason Merrill <jason@redhat.com>
6285 * cp-gimplify.c (cp_gimplify_init_expr): Look through
6288 2004-06-21 Mark Mitchell <mark@codesourcery.com>
6290 * cp-tree.def (NEW_EXPR): Add a fourth slot.
6291 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
6292 (TREE_PARMLIST): Likewise.
6293 (CALL_DECLARATOR_PARMS): Likewise.
6294 (CALL_DECLARATOR_QUALS): Likewise.
6295 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
6296 (cp_declarator_kind): New type.
6297 (cp_parameter_declarator): Likewise.
6298 (cp_declarator): Likewise.
6299 (cp_error_declarator): Likewise.
6300 (no_parameters): Likewise.
6301 (groktypename): Change prototype.
6302 (start_decl): Likewise.
6303 (start_handler_parms): Likewise.
6304 (get_scope_of_declarator): Likewise.
6305 (start_function): Likewise.
6306 (start_preparsed_function): New function.
6307 (start_function): Change prototype.
6308 (start_method): Likewise.
6309 (grokfield): Likewise.
6310 (grokbitfield): Likewise.
6311 (build_new): Likewise.
6312 (make_pointer_declarator): Remove.
6313 (make_reference_declarator): Likewise.
6314 (make_call_declarator): Likewise.
6315 (set_quals_and_spec): Likewise.
6316 (process_template_parm): Change prototype.
6317 (begin_function_definition): Remove.
6318 (finish_parmlist): Remove.
6319 * decl.c (groktypename): Do not use trees to represent
6321 (start_decl): Likewise.
6322 (start_handler_parms): Remove.
6323 (get_scope_of_declarator): Reimplement.
6324 (grokdeclarator): Do not use trees to represent declarators.
6325 (grokparms): Likewise.
6326 (start_function): Likewise.
6327 (start_method): Likewise.
6328 (build_void_list_mode): Do not use TREE_PARMLIST.
6329 * decl.h (grokdeclarator): Change prototype.
6330 * decl2.c (grok_method_quals): Robustify.
6331 (grok_x_components): Do not use trees to represent declarators.
6332 (grokfield): Likewise.
6333 (grokbitfield): Likewise.
6334 (start_objects): Build FUNCTION_DECLs, not declarators.
6335 (start_static_storage_duration_function): Likewise.
6336 * init.c (build_new): Simplify.
6337 * lex.c (make_pointer_declarator): Remove.
6338 (make_reference_declarator): Likewise.
6339 (make_call_declarator): Likewise.
6340 (set_quals_and_spec): Likewise.
6341 * method.c (use_thunk): Use start_preparsed_function.
6342 (synthesize_method): Likewise.
6343 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
6344 * optimize.c (maybe_clone_body): Use start_preparsed_function.
6345 * parser.c (cp_error_declarator): New variable.
6346 (declarator_obstack): Likewise.
6347 (alloc_declarator): New function.
6348 (make_declarator): Likewise.
6349 (make_id_declarator): Likewise.
6350 (make_pointer_declarator): Likewise.
6351 (make_reference_declarator): Likewise.
6352 (make_ptrmem_declarator): Likewise.
6353 (make_call_declarator): Likewise.
6354 (make_array_declarator): Likewise.
6355 (no_parameters): New variable.
6356 (make_parameter_declarator): Likewise.
6357 (cp_parser_check_for_definition_in_return_type): Do not use trees
6358 to represent declarators.
6359 (cp_parser_translation_unit): Likewise.
6360 (cp_parser_new_expression): Likewise.
6361 (cp_parser_new_type_id): Likewise.
6362 (cp_parser_new_declarator_opt): Likewise.
6363 (cp_parser_direct_new_declarator): Likewise.
6364 (cp_parser_condition): Likewise.
6365 (cp_parser_declaration_statement): Likewise.
6366 (cp_parser_declaration): Likewise.
6367 (cp_parser_conversion_type_id): Likewise.
6368 (cp_parser_conversion_declarator_opt): Likewise.
6369 (cp_parser_template_parameter_list): Likewise.
6370 (cp_parser_template_parameter): Likewise.
6371 (cp_parser_explicit_instantiation): Likewise.
6372 (cp_parser_init_declarator): Likewise.
6373 (cp_parser_declarator): Likewise.
6374 (cp_parser_direct_declarator): Likewise.
6375 (cp_parser_type_id): Likewise.
6376 (cp_parser_parameter_declaration_clause): Likewise.
6377 (cp_parser_parameter_declaration_list): Likewise.
6378 (cp_parser_parameter_declaration): Likewise.
6379 (cp_parser_member_declaration): Likewise.
6380 (cp_parser_exception_declaration): Likewise.
6381 (cp_parser_check_declarator_template_parameters): Likewise.
6382 (cp_parser_function_definition_from_specifiers_and_declarator):
6384 (cp_parser_save_member_function_body): Likewise.
6385 * pt.c (process_template_parm): Add is_non_type parameter.
6386 (convert_template_argument): Adjust call to groktypename.
6387 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
6388 (tsubst): Do not expect declarators.
6389 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
6391 (instantiate_decl): Use start_preparsed_function.
6392 * semantics.c (begin_function_definition): Remove.
6393 (finish_parmlist): Remove.
6394 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
6397 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6399 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
6400 (build_new_method_call): Likewise.
6401 * decl.c (local_variable_p_walkfn): Don't walk into types.
6402 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
6403 (build_anon_union_vars): Add new operand for COMPONENT_REF.
6404 * init.c (buld_new): Add new operand for ARRAY_REF.
6405 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
6406 (do_build_assign_ref): Likewise.
6407 * parser.c (cp_parser_direct_new_declarator): Add new operands
6409 (cp_parser_direct_declarator): Likewise.
6410 * pt.c (tsubst): Likewise.
6411 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
6413 * semantics.c (finish_non_static_data_member): Add new operand
6415 * typeck.c (build_class_member_access_expr): Likewise.
6416 (build_class_member_access_expr, finish_class_member_access_expr):
6418 (build_ptrmemfunc_access_expr): Likewise.
6419 (build_array_ref): Add new operands for ARRAY_REF.
6420 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
6421 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
6423 2004-06-21 Richard Henderson <rth@redhat.com>
6425 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
6426 * parser.c (cp_parser_jump_statement): Update commentary.
6427 * pt.c (tsubst_expr): Use RETURN_EXPR.
6428 * semantics.c (finish_return_stmt): Likewise.
6429 (finalize_nrv_r): Likewise.
6430 * typeck.c, typeck2.c: Update file start commentary.
6432 2004-06-21 Richard Henderson <rth@redhat.com>
6434 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
6436 2004-06-20 Richard Henderson <rth@redhat.com>
6438 * cp-tree.h (add_decl_stmt): Declare.
6439 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
6440 * semantics.c (maybe_cleanup_point_expr): New.
6441 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
6442 finish_for_expr, finish_switch_cond): Use it.
6443 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
6445 2004-06-20 Richard Henderson <rth@redhat.com>
6447 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
6448 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
6449 (cp_gimplify_expr): Call it.
6450 (gimplify_cleanup_stmt): Move from c-gimplify.c.
6451 (cp_genericize): New.
6452 * decl.c (finish_function): Call it.
6453 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
6454 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
6455 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
6456 (cp_genericize): Declare.
6457 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
6458 * dump.c (cp_dump_tree): Likewise.
6459 * semantics.c (push_cleanup): Move from c-semantics.c.
6461 2004-06-20 Zack Weinberg <zack@codesourcery.com>
6463 * cp-lang.c (has_c_linkage): Implement.
6465 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
6466 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
6467 (builtin_function_1): Don't call make_decl_rtl.
6468 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
6469 (grokvardecl): Don't call mangle_decl.
6470 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
6471 DECL_ASSEMBLER_NAME.
6472 * method.c (set_mangled_name_for_decl): Delete.
6473 * name-lookup.c (pushdecl): When a local extern shadows a
6474 file-scope declaration of the same object, give both DECLs the
6476 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
6477 on DECL_ASSEMBLER_NAME.
6479 2004-06-19 Richard Henderson <rth@redhat.com>
6481 * cp-gimplify.c: Remove unnecessary prototypes.
6482 (cp_gimplify_stmt): Merge into ...
6483 (cp_gimplify_expr): ... here. Move to end of file. Handle
6484 stmts_are_full_exprs_p frobbing.
6485 * cp-tree.h (cp_gimplify_stmt): Remove.
6486 * pt.c (tsubst_expr): Merge prep_stmt and unify.
6487 * tree.c (init_tree): Don't set lang_gimplify_stmt.
6489 2004-06-18 Richard Henderson <rth@redhat.com>
6492 * semantics.c (begin_cond): New.
6493 (finish_cond): Rewrite to handle template DECL_STMTs specially.
6494 Assume that non-template decls go land before the conditional.
6495 (simplify_loop_decl_cond): Likewise.
6496 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
6497 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
6498 begin_switch_stmt, finish_switch_cond): Update to match.
6500 2004-06-17 Jason Merrill <jason@redhat.com>
6503 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
6504 (finish_stmt_expr_expr): Update type after conversions.
6505 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
6506 Handle void initializer.
6507 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
6509 2004-06-17 Geoffrey Keating <geoffk@apple.com>
6511 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
6512 * cp-tree.h (defer_fn): Delete.
6513 * decl2.c (defer_fn): Delete.
6514 (finish_file): Simplify deferred_fns loops; check that
6515 only used inline functions get into deferred_fns.
6516 (mark_used): Inline previous contents of defer_fn.
6518 2004-06-16 Richard Henderson <rth@redhat.com>
6520 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
6521 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
6522 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
6523 of CTOR_INITIALIZER ...
6524 (pp_cxx_statement): ... here.
6525 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
6526 (finish_function): Use alloc_stmt_list to zap entire function.
6527 * parser.c (cp_parser_compound_statement): Update commentary.
6528 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
6529 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
6530 (finish_stmt_expr): Don't look through COMPOUND_STMT.
6532 2004-06-16 Geoffrey Keating <geoffk@apple.com>
6534 * pt.c (mark_decl_instantiated): Don't call defer_fn.
6536 2004-06-16 Richard Henderson <rth@redhat.com>
6538 * parser.c (cp_parser_labeled_statement): Update commentary.
6539 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
6540 * tree.c (mark_local_for_remap_r): Likewise.
6542 2004-06-16 Richard Henderson <rth@redhat.com>
6544 * parser.c (cp_parser_asm_definition): Update commentary.
6545 * pt.c (tsubst_expr): Use ASM_EXPR.
6546 * semantics.c (finish_asm_stmt): Likewise.
6548 2004-06-16 Richard Henderson <rth@redhat.com>
6550 * decl.c (finish_destructor_body): Use LABEL_EXPR.
6551 * parser.c (cp_parser_statement): Update commentary.
6552 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
6553 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
6554 * tree.c (mark_local_for_remap_r): Likewise.
6556 2004-06-16 Richard Henderson <rth@redhat.com>
6559 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
6560 statement in FOR_INIT_STMT for templates.
6562 2004-06-15 Richard Henderson <rth@redhat.com>
6564 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
6565 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
6566 (genericize_try_block): Use gimplify_stmt.
6567 (genericize_catch_block, genericize_eh_spec_block): Likewise.
6568 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
6569 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
6570 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
6571 (cp_tree_chain_matters_p): Remove.
6572 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
6573 (COMPOUND_STMT_BODY_BLOCK): New.
6574 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
6575 (EXPR_STMT_STMT_EXPR_RESULT): New.
6576 (building_stmt_tree): Check cur_stmt_list.
6577 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
6578 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
6579 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
6580 (cp_finish_decl): Use push_cleanup.
6581 (start_function, finish_function): Use statement lists.
6582 (finish_stmt): Do nothing.
6583 * except.c (begin_eh_spec_block): Use statement lists.
6584 (check_handlers_1, check_handlers): Likewise.
6585 * init.c (construct_virtual_base): Don't add extra compound stmts.
6586 (build_vec_init): Likewise.
6587 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
6588 * name-lookup.h (struct cp_binding_level): Add statement_list.
6589 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
6590 (cp_parser_labeled_statement, cp_parser_expression_statement,
6591 cp_parser_statement_seq_opt): Likewise.
6592 (cp_parser_compound_statement): Likewise. Take bool for try block.
6593 (cp_parser_selection_statement): Tidy if processing.
6594 (cp_parser_already_scoped_statement): Rewrite to do what it says.
6595 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
6596 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
6597 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
6598 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
6599 (finish_cond): New, rewritten from FINISH_COND.
6600 (simplify_loop_decl_cond): New.
6601 (finish_expr_stmt): Avoid nested EXPR_STMTs.
6602 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
6603 begin_else_clause, finish_else_clause, finish_if_stmt,
6604 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
6605 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
6606 finish_for_cond, finish_for_stmt, begin_switch_stmt,
6607 finish_switch_cond, finish_switch_stmt, begin_try_block,
6608 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
6609 finish_handler_sequence, finish_function_handler_sequence,
6610 begin_handler, finish_handler_parms, finish_handler,
6611 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
6612 using statement lists.
6613 (begin_compound_stmt): Replace has_no_scope argument with flags.
6614 Update all callers. Use statement lists.
6615 (finish_compound_stmt): Likewise.
6616 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
6617 (current_scope_stmt_stack): Remove.
6618 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
6619 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
6620 Rewrite with statement lists.
6622 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
6624 * parser.c: Change all assignments of c_lex_string_translate
6625 to true and false to 1 and 0.
6626 (cp_lexer_read_token): Convert type of the translated string.
6627 (cp_parser_skip_to_closing_parentheses): Preserve original
6628 value of c_lex_string_translate, and set it to -1 while
6630 (cp_parser_cache_group): Likewise.
6631 (cp_parser_cache_group_1): Renamed.
6632 (cp_parser_asm_operand_list): Remove redundant setting of
6633 c_lex_string_translate.
6634 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
6635 Handle chained strings.
6637 2004-06-12 Andrew Pinski <apinski@apple.com>
6641 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
6643 * cp-tree.h: Fix typo.
6645 * cp-tree.h: Include cgraph.h
6646 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
6647 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
6649 2004-06-12 Jason Merrill <jason@redhat.com>
6651 PR tree-optimization/14107
6652 * decl.c (finish_function): Warn about no return in all functions.
6654 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
6656 * cp-tree.h (struct language_function): Remove cannot_inline.
6657 * decl.c (save_function_data): cannot_inline is no more.
6658 (cxx_push_function_context): Likewise.
6659 * decl2.c (start_objects, start_static_storage_duration_function):
6660 Reset DECL_INLINE, set DECL_UNINLINABLE.
6662 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6665 * search.c (lookup_field): Propagate the ambiguity list.
6666 (lookup_fnfields): Likewise.
6668 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6671 * parser.c (cp_parser_template_name): Ctors/dtors never need a
6672 template keyword to disambiguate.
6674 2004-06-14 Mark Mitchell <mark@codesourcery.com>
6677 * decl.c (grokdeclarator): Ignore pointer-to-members when
6678 computing template depth.
6681 * name-lookup.c (pushtag): Do not try to put class declarations in
6682 explicit specialization scopes.
6684 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
6686 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
6688 2004-06-11 Mark Mitchell <mark@codesourcery.com>
6691 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
6692 bindings for undeclared built-ins.
6694 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6696 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
6697 appear at the correct location.
6699 2004-06-10 Jason Merrill <jason@redhat.com>
6703 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6704 * init.c (build_offset_ref): Build SCOPE_REF with non-null
6705 TREE_TYPE for non-dependent names.
6706 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
6707 unknown_type_node as its TREE_TYPE.
6708 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
6709 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
6710 (dump_expr) <SCOPE_REF case>: Likewise.
6712 2004-06-10 Mark Mitchell <mark@codesourcery.com>
6715 * parser.c (cp_parser_direct_declarator): Robustify.
6718 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
6719 constants in non-dependent contexts.
6723 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
6726 2004-06-10 Jakub Jelinek <jakub@redhat.com>
6729 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
6732 2004-06-09 Mark Mitchell <mark@codesourcery.com>
6736 2004-06-07 Mark Mitchell <mark@codesourcery.com>
6737 * lex.c (handle_pragma_interface): Deprecate.
6738 (handle_pragma_implementation): Likewise.
6740 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
6742 * g++spec.c (lang_specific_driver): Remove check for -lm
6743 and -lmath when check it see if it was the math library.
6745 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6748 * parser.c (cp_parser_direct_declarator): Reject constructor named
6749 as qualified template-id.
6751 2004-06-07 Mark Mitchell <mark@codesourcery.com>
6754 * lex.c (handle_pragma_interface): Deprecate.
6755 (handle_pragma_implementation): Likewise.
6757 2004-06-07 Mark Mitchell <mark@codesourcery.com>
6760 * parser.c (cp_parser_iteration_statement): Fix typo in error
6764 * pt.c (tsubst_default_argument): Do not defer access checks
6765 while substituting into the default argument.
6768 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
6769 constant in a non-dependent context.
6772 * except.c (build_throw): Ensure that temp_expr has been
6775 2004-06-06 Roger Sayle <roger@eyesopen.com>
6777 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
6779 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6782 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
6783 'typename', and accept 'template'.
6785 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
6786 Jan Hubicka <jh@suse.cz>
6789 * method.c (use_think): Do not mark thunk as referenced.
6791 2004-06-03 Matt Austern <austern@apple.com>
6794 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
6795 is nonzero, and if we see a noninline definition of a key method,
6796 make the vtables nonweak.
6798 2004-06-02 Matt Austern <austern@apple.com>
6800 * cp-tree.h (instantiate_decl): new boolean parameter,
6801 undefined_ok. Current behavior is equivalent to its being 0.
6802 * decl2.c (mark_used): Add new argument when calling instantiate_decl
6803 * pt.c (mark_decl_instantiated): Unconditionally make
6804 instantiations explicit unconditionally
6805 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
6806 since mark_decl_instantiated now does it.
6807 (instantiate_class_member): New. Instantiate a member of an
6808 explicitly instantiated class template.
6809 (do_type_instantiation): Explicitly instantiate members of an
6810 explicitly instantiated class template.
6811 (instantiate_decl): if undefined_ok is nonzero, and if we're
6812 trying to explicitly instantiated a template with no definition,
6813 change it to an implicit instantiation.
6814 (instantiate_pending_templates): Add new argument to instantiate_decl.
6815 * tree.c (cp_cannot_inline_tree_fn): Likewise.
6817 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
6819 * cp-tree.h: Fix typo.
6821 * cp-tree.h: Include cgraph.h
6822 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
6823 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
6825 2004-06-01 Jason Merrill <jason@redhat.com>
6828 * call.c (call_builtin_trap): Remove type parm.
6829 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
6830 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
6832 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6835 * init.c (build_offset_ref): Build SCOPE_REF with non-null
6836 TREE_TYPE for non-dependent names.
6837 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
6838 unknown_type_node as its TREE_TYPE.
6839 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
6840 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
6841 (dump_expr) <SCOPE_REF case>: Likewise.
6843 2004-06-01 Richard Henderson <rth@redhat.com>
6844 Andrew Pinski <pinskia@physics.uc.edu>
6846 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
6847 * parser.c (struct cp_parser): Remove in_offsetof.
6848 (cp_parser_new): Don't set it.
6849 (cp_parser_unary_expression): Don't check it.
6850 (cp_parser_postfix_open_square_expression): Split out from ...
6851 (cp_parser_postfix_expression): ... here.
6852 (cp_parser_postfix_dot_deref_expression): Likewise.
6853 (cp_parser_builtin_offsetof): New.
6854 (cp_parser_primary_expression): Use it.
6856 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6859 * parser.c (cp_parser_postfix_expression): Allow subscript
6860 operator in offsetof.
6862 2004-05-31 Mark Mitchell <mark@codesourcery.com>
6865 * friend.c (add_friend): Do not try to perform access checks for
6866 functions from dependent classes.
6868 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
6870 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
6871 (pp_cxx_begin_template_argument_list): Turn into a function.
6872 (pp_cxx_end_template_argument_list): Likewise.
6873 (pp_cxx_separate_with): Define.
6874 (pp_cxx_unqualified_id): Tidy.
6875 (pp_cxx_primary_expression): Likewise.
6876 (pp_cxx_postfix_expression): Likewise.
6877 (pp_cxx_expression): Likewise.
6878 (pp_cxx_simple_type_specifier): Likewise.
6879 (pp_cxx_type_specifier_seq): Likewise.
6880 (pp_cxx_parameter_declaration_clause): Likewise.
6881 (pp_cxx_exception_specification): Likewise.
6882 (pp_cxx_direct_declarator): Likewise.
6883 (pp_cxx_type_id): Likewise.
6884 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
6886 (pp_cxx_left_paren): Likewise.
6887 (pp_cxx_right_paren): Likewise.
6888 (pp_cxx_left_brace): Likewise.
6889 (pp_cxx_right_brace): Likewise.
6890 (pp_cxx_left_bracket): Likewise.
6891 (pp_cxx_right_bracket): Likewise.
6892 (pp_cxx_dot): Likewise.
6893 (pp_cxx_identifier): Likewise.
6894 (pp_cxx_tree_identifier): Likewise.
6895 (pp_cxx_ampersand): New macro.
6896 (pp_cxx_star): Likewise.
6897 (pp_cxx_arrow): Likewise.
6898 (pp_cxx_semicolon): Likewise.
6899 (pp_cxx_complement): Likewise.
6900 (pp_cxx_begin_template_argument_list): Declaree.
6901 (pp_cxx_end_template_argument_list): Likewise.
6902 (pp_cxx_colon_colon): likewise.
6904 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
6906 * parser.c (cp_parser_simple_type_specifier): Explicitly test
6909 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
6911 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
6912 typeck.c: Fix comment formatting.
6914 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
6916 * cp-lang.c (cp_expand_decl): Remove.
6917 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
6919 2004-05-30 Andreas Jaeger <aj@suse.de>
6921 * lang-specs.h: Add missing initializers for .ii.
6923 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
6925 * decl.c (cp_make_fname_decl): Free return value from
6928 2004-05-28 Mark Mitchell <mark@codesourcery.com>
6931 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
6933 * init.c (build_new): Likewise.
6936 * name-lookup.c (arg_assoc): Robustify.
6939 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
6940 when determining the scope to use for a pointer to member.
6941 (lookup_anon_field): Give it external linkage.
6942 * cp-tree.h (lookup_anon_field): Declare it.
6943 * expr.c (cplus_expand_constant): Use it.
6945 2004-05-28 Mark Mitchell <mark@codesourcery.com>
6948 * parser.c (cp_parser_simple_type_specifier): Call
6949 maybe_note_name_used_in_class.
6951 2004-05-28 Tom Marshall <tmarshall@real.com>
6954 * class.c (finish_struct_1): Warn only if the dtor is non-private or
6955 the class has friends.
6957 2004-05-27 Adam Nemet <anemet@lnxw.com>
6960 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
6961 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
6963 2004-05-24 Geoffrey Keating <geoffk@apple.com>
6965 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
6966 if it might be needed.
6967 * pt.c (mark_decl_instantiated): Only call defer_fn if
6968 the function actually needs processing in finish_file.
6969 * decl2.c (finish_file): Add check that elements in
6970 deferred_fns_used are really needed there. Remove unnecessary
6971 test of DECL_SAVED_TREE.
6973 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
6975 * Make-lang.in: No need to specify $(LIBCPP).
6977 2004-05-23 Mark Mitchell <mark@codesourcery.com>
6980 * parser.c (cp_parser_class_head): Robustify.
6983 * parser.c (cp_parser_decl_specifier_seq): Correct error in
6985 (cp_parser_constructor_declarator_p): Treat attributes
6989 * typeck.c (build_unary_op): Do not attempt to resolve casts to
6990 base classes in templates.
6992 2004-05-23 Mark Mitchell <mark@codesourcery.com>
6995 * pt.c (instantiate_template): Robustify.
6997 2004-05-23 Mark Mitchell <mark@codesourcery.com>
7000 * decl.c (xref_tag): Issue errors about redeclaring template
7001 classes as non-template classes.
7003 2004-05-23 Mark Mitchell <mark@codesourcery.com>
7006 * name-lookup.c (supplement_binding): Allow redefinitions of
7010 * parser.c (cp_parser_template_argument): Robustify.
7012 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7014 * class.c (alter_access): Use %E format specifier to print an
7015 identifier node. Avoid looking at the IDENTIFIER_POINTER.
7016 (push_lang_context): Likewise.
7017 * decl.c (lookup_label): Likewise.
7018 (grokdeclarator): Likewise.
7019 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
7020 * pt.c (do_type_instantiation): Likewise.
7021 * tree.c (handle_java_interface_attribute): Likewise.
7022 (handle_com_interface_attribute): Likewise.
7023 (handle_init_priority_attribute): Likewise.
7025 2004-05-22 Mark Mitchell <mark@codesourcery.com>
7029 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
7030 recognized as overloaded functions.
7032 2004-05-22 Mark Mitchell <mark@codesourcery.com>
7035 * class.c (layout_nonempty_base_or_field): Do not try to avoid
7036 layout conflicts for unions.
7039 * typeck.c (build_x_unary_op): Instantiate template class
7040 specializations before looking for "operator &".
7043 * typeck.c (complete_type): Layout non-dependent array types, even
7047 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
7050 2004-05-22 Roger Sayle <roger@eyesopen.com>
7052 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
7053 returning when TREE_TYPE is error_mark_node.
7054 * typeck.c (require_complete_type): Return error_mark_node if
7055 value's type is an error_mark_node.
7057 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
7059 * optimize.c (calls_setjmp_r): Remove.
7060 (calls_setjmp_p): Remove.
7061 * cp-tree.c (calls_setjmp_p): Remove.
7062 * decl.c (finish_function): Do not call calls_setjmp_p.
7064 2004-05-18 Zack Weinberg <zack@codesourcery.com>
7066 * decl.c (cp_finish_decl): Use mark_decl_referenced.
7067 * decl2.c (maybe_make_one_only): Likewise.
7068 * method.c (use_thunk): Likewise.
7070 2004-05-18 Jason Merrill <jason@redhat.com>
7072 * class.c (build_base_path): Tidy a bit.
7074 2004-05-14 Geoffrey Keating <geoffk@apple.com>
7076 * name-lookup.c (struct scope_binding): New.
7077 (EMPTY_SCOPE_BINDING): New.
7078 (lookup_using_namespace): Take a scope_binding instead of a
7080 (qualified_lookup_using_namespace): Likewise.
7081 (cxx_binding_clear): Delete.
7082 (do_nonmember_using_decl): Use a scope_binding instead of a
7084 (lookup_tag): Don't call select_decl.
7085 (ambiguous_decl): Don't return anything (and change callers to match).
7086 Take a scope_binding as the second parameter.
7087 (lookup_namespace_name): Use a scope_binding instead of a
7089 (unqualified_namespace_lookup): Likewise.
7090 (lookup_qualified_name): Likewise.
7091 (select_decl): Take a scope_binding instead of a cxx_binding.
7092 Use macros rather than hand-coding tests for type-ness.
7094 2004-05-13 Diego Novillo <dnovillo@redhat.com>
7096 * cp-gimplify.c: Rename from cp-simplify.c.
7097 * Make-lang.in, optimize.c: Update.
7099 2004-05-13 Diego Novillo <dnovillo@redhat.com>
7101 Merge from tree-ssa-20020619-branch. See
7102 ChangeLog.tree-ssa for details.
7104 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
7105 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
7106 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
7107 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
7109 * cp-mudflap.c: New file.
7110 * cp-simplify.c:: New file.
7112 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7115 * decl2.c (check_classfn): For member templates, compare also the
7116 template parameters to match the declaration.
7117 * cp-tree.h: Adjust declaration of check_classfn.
7118 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
7119 * friend.c (do_friend): Likewise.
7120 * pt.c (tsubst_friend_function): Likewise.
7122 2004-05-01 Zack Weinberg <zack@codesourcery.com>
7124 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
7125 Instead, dig into the representation type to find the array bound.
7127 2004-04-30 Jason Merrill <jason@redhat.com>
7129 Refer to base members using COMPONENT_REFs where possible.
7130 * class.c (build_simple_base_path): New fn.
7131 (build_base_path): Use it for non-virtual base references.
7132 (layout_class_type): Change base fields to their real type
7133 after layout is done.
7134 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
7135 * cp-lang.c (cxx_get_alias_set): Use it.
7137 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
7139 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
7142 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7145 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
7146 used in integral constant expressions.
7148 2004-04-22 Mark Mitchell <mark@codesourcery.com>
7150 * init.c (build_aggr_init): Fix accidental use of C99 construct in
7153 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
7155 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
7156 * decl.c (reshape_init): Use it.
7157 * init.c (perform_member_init): Remove redundant condition.
7158 (build_aggr_init): Adjust to handle brace-enclosed initializers
7160 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
7162 * parser.c (cp_parser_initializer_clause): Do not set
7163 TREE_HAS_CONSTRUCTOR on the initializer.
7164 * rtti.c (tinfo_base_init): Likewise.
7165 (generic_initializer): Likewise.
7166 (ptr_initializer): Likewise.
7167 (ptm_initializer): Likewise.
7168 (class_initializer): Likewise.
7169 (get_pseudo_ti_init): Likewise.
7170 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
7172 2004-04-22 Alan Modra <amodra@bigpond.net.au>
7174 * name-lookup.c (anonymous_namespace_name): Make static.
7176 2004-04-19 Roger Sayle <roger@eyesopen.com>
7179 * class.c (build_base_path): Call fold whilst building the NULL
7180 pointer check expression trees.
7182 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
7184 * init.c (build_new_1): Don't use type size argument for Java
7185 _Jv_AllocObject call.
7187 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
7189 * method.c (make_alias_for_thunk): Remove preprocessor guard on
7190 declaration and definition.
7192 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
7195 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
7196 than ASM_OUTPUT_DEF.
7198 2004-04-08 Jakub Jelinek <jakub@redhat.com>
7200 * decl2.c (mark_used): Don't segfault if cfun != NULL but
7201 current_function_decl == NULL.
7203 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
7206 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
7209 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7211 * init.c (decl_constant_value): Don't look at DECL_INITIAL
7213 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
7214 or TREE_SIDE_EFFECTS of a type.
7216 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
7219 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
7220 cv-qualifier unification.
7221 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
7223 2004-04-02 Jan Hubicka <jh@suse.cz>
7225 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
7226 * cp-tree.h (cp_update_decl_after_saving): Declare.
7227 * tree.c (cp_update_decl_after_saving): Define.
7229 2004-04-01 Mark Mitchell <mark@codesourcery.com>
7232 * typeck.c (get_delta_difference): Call fold before returning the
7235 2004-04-01 Richard Henderson <rth@redhat.com>
7238 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
7239 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
7241 2004-04-01 Mark Mitchell <mark@codesourcery.com>
7244 * name-lookup.c (maybe_push_cleanup_level): Robustify.
7246 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7248 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
7250 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7252 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
7253 * class.c (check_bitfield_decl): Likewise.
7254 * cvt.c (type_promotes_to): Likewise.
7255 * decl.c (finish_enum): Likewise.
7256 * mangle.c (write_builtin_type): Likewise.
7257 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
7258 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
7259 (build_binary_op): Likewise.
7261 2004-03-31 Jan Hubicka <jh@suse.cz>
7263 * tree.h (optimize_function): Kill prototype.
7264 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
7265 * semantics.c (expand_body): Kill.
7267 2004-03-30 Mark Mitchell <mark@codesourcery.com>
7270 * decl.c (start_decl_1): Do not decide whether or not to create a
7271 new cleanup level until after the type has been completed.
7274 * pt.c (tsubst_default_argument): Clear current_function_decl.
7276 2004-03-30 Zack Weinberg <zack@codesourcery.com>
7278 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
7280 2004-03-29 Zack Weinberg <zack@codesourcery.com>
7282 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
7283 is null, just print the literal name and return.
7285 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
7287 * cxx-pretty-print.c: Fix comment typos.
7289 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
7291 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
7294 2004-03-23 Ziemowit Laski <zlaski@apple.com>
7296 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
7297 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
7300 2004-03-23 Zack Weinberg <zack@codesourcery.com>
7302 PR 12267, 12391, 12560, 13129, 14114, 14133
7303 * cp-lang.c (c_reset_state): Delete.
7304 (push_file_scope, pop_file_scope): New stubs.
7305 * parser.c (c_parse_file): Call sorry() here if called more than once.
7307 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7309 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
7312 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7314 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
7316 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
7318 * error.c (enum pad): Remove.
7319 (dump_qualifiers): Likewise.
7320 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
7321 (dump_aggr_type): Likewise.
7322 (dump_type_suffix): Likewise.
7323 (dump_simple_decl): Likewise.
7324 (dump_function_decl): Likewise.
7325 (cv_to_string): Likewise.
7326 (dump_type_prefix): Likewise. Adjust return void.
7327 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
7329 (pp_cxx_template_keyword_if_needed): Document.
7330 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
7331 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
7332 MUST_NOT_THROW_EXPR.
7334 2004-03-21 Mark Mitchell <mark@codesourcery.com>
7337 * decl.c (cp_finish_decl): Compute the size of arrays declared in
7338 templates, if their type is non-dependent.
7340 2004-03-19 Mark Mitchell <mark@codesourcery.com>
7342 * call.c (build_op_delete_call): Do not forget the placement
7343 arguments when iterating through mutiple delete operators.
7345 * cp-tree.h (svaed_scope): Remove last_parms.
7346 (NEW_DELETE_OPNAME_P): New macro.
7347 (last_function_parms): Remove.
7348 (do_friend): Adjust prototype.
7349 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
7350 using last_function_parms.
7351 (grokfndecl): Take the PARM_DECLs as an argument, rather than
7352 using last_function_parms.
7353 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
7354 for class-specific operator new and operator delete.
7355 (grok_op_properties): Do not look for allocation functions with
7357 (start_function): Use DECL_ARGUMENTS instead of
7358 last_function_parms.
7359 * decl.h (last_function_parms): Do not declare.
7360 * decl2.c (grokclassfn): Do not use last_function_parms.
7361 * friend.c (do_friend): Remove parmdecls parameter.
7362 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
7363 (pop_from_top_level): Do not restore it.
7364 * pt.c (check_explicit_specialization): Do not adjust
7365 last_function_parms.
7367 * name-lookup.c (do_local_using_decl): Create a local binding for
7368 types brought in via using declarations.
7370 * name-lookup.c (lookup_arg_dependent): Handle block-scope
7371 function declarations correctly.
7373 * semantics.c (finish_id_expression): Correct handling of
7374 conversion operators to dependent types.
7376 * typeck.c (lookup_destructor): Allow the use of destructors from
7379 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7381 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
7382 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
7383 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
7384 the field is named TEMPLATE_TYPE_PARM_INDEX.
7386 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7389 * parser.c (cp_parser_functional_cast): A cast to anything
7390 but integral or enumaration type is not an integral constant
7392 * pt.c (value_dependent_expression_p): Handle cast expressions
7393 without operands (such as "int()").
7395 2004-03-18 Mark Mitchell <mark@codesourcery.com>
7397 * semantics.c (finish_pseudo_destructor_expr): Allow differing
7398 cv-qualification between the type named by the
7399 pseudo-destructor-name and the object-type.
7401 * search.c (accessible_base_p): Handle non-proper bases.
7403 * name-lookup.c (do_nonmember_using_decl): If a using declaration
7404 refers to a single overloaded function, set the type of the
7406 * tree.c (lvalue_type): Simplify.
7407 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
7409 (build_unary_op): Handle OVERLOADs with known types.
7411 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
7414 * parser.c (cp_parser_postfix_expression): Handle the use of
7415 "typename" in non-dependent contexts. Convert appropriately when
7416 when using a qualified name after "->" or ".".
7418 * call.c (conditional_conversion): Honor the requirement that some
7419 conversions refer to the original object.
7421 2004-03-18 Mark Mitchell <mark@codesourcery.com>
7423 * call.c (build_conditional_expr): Do not call force_rvalue for
7424 operands of void_type when the conditional expression itself has
7426 * name-lookup.c (pushdecl): Don't consider a declaration of a
7427 function named "main" to be an overload of a type named "main".
7428 * parser.c (cp_parser_template_name): Perform name lookup when the
7429 template name is proceeded by "template" if the qualifying scope
7431 * typeck.c (composite_pointer_type_r): Correctly handle
7432 pointer-to-member types.
7433 (build_const_cast): Likewise.
7435 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7437 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
7438 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
7439 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
7440 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
7441 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
7442 (TYPEOF_TYPE_EXPR): New macro.
7443 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
7444 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
7445 * pt.c (tsubst): Likewise.
7446 * semantics.c (finish_typeof): Likewise.
7447 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
7448 and TEMPLATE_TYPE_PARM.
7449 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
7450 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
7452 2004-03-16 Mark Mitchell <mark@codesourcery.com>
7455 * cp-tree.h (build_new_op): Change prototype.
7456 (build_x_binary_op): Likewise.
7457 * call.c (build_new_op): Add overloaded_p parameter.
7458 * decl2.c (grok_array_decl): Adjust call to build_new_op.
7459 * parser.c (cp_parser_binary_expression): Note that uses of
7460 overloaded operators prevents an expression from being considered
7461 an integral constant.
7462 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
7464 * semantics.c (finish_call_expr): Likewise.
7465 * typeck.c (rationalize_conditional_expr): Likewise.
7466 (build_x_indirect_ref): Likewise.
7467 (build_x_binary_op): Likewise.
7468 (build_x_unary_op): Likewise.
7469 (build_x_compound_expr): Likewise.
7470 (build_modify_expr): Likewise.
7471 * typeck2.c (build_x_arrow): Likewise.
7473 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
7475 * cp-lang.c, ptree.c: Update copyright.
7477 2004-03-13 Mark Mitchell <mark@codesourcery.com>
7480 * parser.c (cp_parser_non_integral_constant_expression): Encode
7481 more of the idiom that surrounded calls to this function within
7483 (cp_parser_primary_expression): Adjust accordingly.
7484 (cp_parser_postfix_expression): Likewise.
7485 (cp_parser_unary_expression): Likewise.
7486 (cp_parser_cast_expression): Likewise.
7487 (cp_parser_assignment_expression): Likewise.
7488 (cp_parser_expression): Likewise.
7489 (cp_parser_new_expression): Note that new-expressions are not
7490 allowed in integral constant expressions.
7491 (cp_parser_delete_expression): Likewise.
7493 2004-03-12 Matt Austern <austern@apple.com>
7495 * decl2.c (maybe_make_one_only): Look at
7496 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
7497 to make an explicit instantiation weak.
7498 * method.c (use_thunk): Make sure we call comdat_linkage
7500 * pt.c (do_type_instantiation): On systems where weak symbols
7501 don't go in a static archive's TOC, explicit instantiation of a
7502 class must imply *explicit* instantiation of its memeber.
7504 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
7506 * call.c, cp-tree.h, pt.c: Fix comment typos.
7508 2004-03-10 Mark Mitchell <mark@codesourcery.com>
7511 * decl.c (xref_tag): Disregard non-type declarations when
7512 looking up a tagged type.
7514 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
7517 * call.c (convert_like_real): Build a const qualified temporary,
7518 when testing ctor access.
7520 2004-03-09 Mark Mitchell <mark@codesourcery.com>
7522 * call.c (initialize_reference): Fix typo.
7524 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7527 * pt.c (determine_specialization): For member templates, match also
7531 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
7533 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
7535 2004-03-09 Mark Mitchell <mark@codesourcery.com>
7538 * call.c (initialize_reference): Handle initializers that are
7539 class-member access expressions applies to rvalues.
7541 2004-03-09 Mark Mitchell <mark@codesourcery.com>
7544 * name-lookup.c (supplement_binding): Ignore functions that are
7545 marked DECL_ANTICIPATED.
7547 2004-03-08 Mark Mitchell <mark@codesourcery.com>
7550 * class.c (check_field_decls): Complain about non-static data
7551 members of reference type in unions. Propagate
7552 CLASSTYPE_REF_FIELDS_NEED_INIT and
7553 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
7555 * init.c (perform_member_init): Complain about mbmers with const
7556 type that are not explicitly initialized.
7558 2004-03-08 Mark Mitchell <mark@codesourcery.com>
7560 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
7561 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
7562 (lang_identifier): Remove implicit_decl and error_locus.
7563 (IDENTIFIER_IMPLICIT_DECL): Remove.
7564 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
7565 (IDENTIFIER_ERROR_LOCUS): Likewise.
7566 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
7567 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
7568 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
7569 (implicitly_declare): Remove.
7570 * decl.c (warn_extern_redeclared_static): Remove check of
7571 IDENTIFIER_IMPLICIT_DECL.
7572 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
7573 (implicitly_declare): Remove.
7574 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
7575 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
7576 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
7577 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
7578 in the innermost scope, rather than at namespace scope.
7579 * name-lookup.c (push_local_binding): Give it external linkage.
7580 (pushdecl): Remove dead code.
7581 * name-lookup.h (push_local_binding): Declare it.
7582 * ptree.c (cxx_print_identifier): Don't print
7583 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
7584 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
7585 not IDENTIFIER_ERROR_LOCUS.
7586 * typeck.c (build_function_call): Remove dead code.
7588 2004-03-08 Jason Merrill <jason@redhat.com>
7591 * decl.c (xref_tag): Remove attribute handling.
7592 * cp-tree.h: Adjust prototype.
7593 * decl.c, parser.c, rtti.c: Adjust callers.
7594 * parser.c (cp_parser_class_head): Pass back attributes in the
7596 (cp_parser_class_specifier): Adjust.
7598 2004-03-08 Matt Austern <austern@apple.com>
7601 * name-lookup.c (add_decl_to_level): Add extern variables, as well
7602 as static, to static_decls array.
7604 2004-03-05 Jason Merrill <jason@redhat.com>
7606 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
7608 2004-03-04 Geoffrey Keating <geoffk@apple.com>
7610 * decl.c (grokfndecl): Update old incorrect comment.
7611 (grokvardecl): Diagnose C++ variables of type with no linkage.
7613 2004-03-01 Mark Mitchell <mark@codesourcery.com>
7616 * pt.c (build_non_dependent_expr): Do not create a
7617 NON_DEPENDENT_EXPR for a THROW_EXPR.
7619 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
7622 * error.c (dump_expr): Handle THROW_EXPR.
7624 2004-03-01 Mark Mitchell <mark@codesourcery.com>
7627 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
7628 lookup if ordinary name-lookup finds a non-function.
7629 * pt.c (tsubst_copy_and_build): Likewise.
7632 * parser.c (cp_parser_late_parsing_default_args): Check that there
7633 are no extra tokens after the end of the default-argument
7636 2004-03-01 Mark Mitchell <mark@codesourcery.com>
7639 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
7640 having C++ linkage for name-mangling purposes.
7643 * parser.c (cp_parser_direct_declarator): Recognize constructor
7644 declarators that use a template-id to name the class being
7648 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
7649 (tsubst_expr): Do not call tsubst_copy, even when
7650 processing_template_decl.
7652 2004-03-01 Jeff Law <law@redhat.com>
7654 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
7657 2004-02-29 Mark Mitchell <mark@codesourcery.com>
7660 * name-lookup.h (push_scope): Change prototype.
7661 * name-lookup.c (push_scope): Do not reenter the current class
7663 * decl.c (grokfndecl): Check return code from push_scope before
7665 * decl2.c (check_classfn): Likewise.
7666 * parser.c (cp_parser_conversion_function_id): Likewise.
7667 (cp_parser_init_declarator): Likewise.
7668 (cp_parser_direct_declarator): Likewise.
7669 (cp_parser_class_specifier): Likewise.
7670 (cp_parser_class_head): Likewise.
7671 (cp_parser_lookup_name): Likewise.
7672 (cp_parser_constructor_declarator_p): Likewise.
7673 * pt.c (instantiate_class_template): Likewise.
7674 (resolve_typename_type): Likewise.
7676 2004-02-29 Mark Mitchell <mark@codesourcery.com>
7679 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
7683 * class.c (update_vtable_entry_for_fn): Do not go through
7684 covariance machinery if the type returned by an overrider is the
7685 same as the original.
7687 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
7689 * call.c: Fix a comment typo.
7691 2004-02-27 Ziemowit Laski <zlaski@apple.com>
7693 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
7695 2004-02-26 Mark Mitchell <mark@codesourcery.com>
7698 * parser.c (cp_parser_parameter_declaration_list): Commit
7699 to fewer tentative parses.
7701 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7704 * pt.c (dependent_type_p_r): A template template parameter is a
7707 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7710 * mangle.c (write_template_arg_literal): Don't rely on identity for
7713 2004-02-24 Jason Merrill <jason@redhat.com>
7715 * tree.c (build_exception_variant): Use check_qualified_type.
7717 2004-02-23 Zack Weinberg <zack@codesourcery.com>
7718 Kazu Hirata <kazu@cs.umass.edu>
7720 * decl.c (cxx_init_decl_processing): Don't check
7721 flag_writable_strings.
7723 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
7726 * typeck.c (maybe_warn_about_returning_address_of_location):
7727 Change check for VAR_DECL to use DECL_P instead.
7729 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7732 * cvt.c (build_expr_type_conversion): Type must be complete before
7733 looking up for conversions.
7735 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7738 * name-lookup.c (arg_assoc_class): Don't look into template
7739 arguments if it is not a primary template.
7741 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7744 * method.c (use_thunk): Always clone function argument tree.
7746 2004-02-20 Mark Mitchell <mark@codesourcery.com>
7749 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
7752 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
7753 for all type variants.
7755 2004-02-19 Mark Mitchell <mark@codesourcery.com>
7758 * decl.c (duplicate_decls): Return error_mark_node for invalid
7760 * name-lookup.c (push_namespace): Ignore the return value from
7762 * pt.c (push_template_decl_real): Robustify.
7765 * name-lookup.c (push_class_level_binding): Do not complain about
7766 adding a binding for a member whose name is the same as the
7767 enclosing class if the member is located in a base class of the
7770 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7773 * parser.c (cp_parser_new_expression): Parse an ill-formed
7774 direct-new-declarator after a parenthesized type-id to emit good
7777 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
7779 * cp-tree.def, cvt.c: Update copyright.
7781 2004-02-17 Mark Mitchell <mark@codesourcery.com>
7784 * cp-tree.h (abi_version_at_least): Remove.
7785 * mangle.c: Include flags.h.
7787 2004-02-15 Mark Mitchell <mark@codesourcery.com>
7790 * call.c (build_conditional_expr): Handle conversions between
7791 class types which result in differently cv-qualified type
7795 * class.c (delete_duplicate_fields_1): Remove.
7796 (delete_duplicate_fields): Likewise.
7797 (finish_struct_anon): Remove check for members with the same name
7798 as their enclosing class.
7799 (check_field_decls): Do not call duplicate_fields.
7800 * decl.c (grokdeclarator): Remove check for static data members
7801 with the same name as their enclosing class.
7802 * name-lookup.c (push_class_level_binding): Check for members with
7803 the same name as their enclosing class.
7805 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
7808 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
7810 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7813 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
7814 has full set of arguments.
7816 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7819 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
7821 2004-02-13 Mark Mitchell <mark@codesourcery.com>
7824 * cp-tree.h (delete_sanity): Change prototype.
7825 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
7826 Remove dead code. Adjust code to warn about deleting an array.
7827 * typekc.c (decay_conversion): Use build_address and build_nop.
7830 * search.c (accessible_p): Do not check access in thunks.
7833 * call.c (build_conditional_expr): Call force_rvalue on the
7834 non-void operand in the case that one result is a throw-expression
7835 and the other is not.
7837 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
7840 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
7841 the type name and look ahead for ::~, and bail out early with a
7842 better error message if the parse is going to fail.
7844 2004-02-12 Mark Mitchell <mark@codesourcery.com>
7846 * call.c (conversion_kind): New type.
7847 (conversion_rank): Likewise.
7848 (conversion): Likewise.
7849 (CONVERSION_RANK): New macro.
7850 (conversion_obstack): New variable.
7851 (obstack_initialized): Likewise.
7852 (z_candidate): Change type of convs and second_conv.
7853 (candidate_warning): New type.
7854 (IDENTITY_RANK): Remove.
7855 (EXACT_RANK): Likewise.
7856 (PROMO_RANK): Likewise.
7857 (STD_RANK): Likewise.
7858 (PBOOL_RANK): Likewise.
7859 (USER_RANK): Likewise.
7860 (ELLIPSIS_RANK): Likewise.
7861 (BAD_RANK): Likewise.
7862 (ICS_RANK): Likewise.
7863 (ICS_STD_RANK): Likewise.
7864 (ICS_USER_FLAG): Likewise.
7865 (ICS_ELLIPSIS_FLAG): Likewise.
7866 (ICS_THIS_FLAG): Likewise.
7867 (ICS_BAD_FLAG): Likewise.
7868 (NEED_TEMPORARY_P): Likewise.
7869 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
7870 (USER_CONV_CAND): Likewise.
7871 (USER_CONV_FN): Likewise.
7872 (conversion_obstack_alloc): New function.
7873 (alloc_conversion): Likewise.
7874 (validate_conversion_obstack): Likewise.
7875 (alloc_conversions): Likewise.
7876 (build_conv): Adjust to deal with new conversion data structures.
7877 (build_identity_conv): New function.
7878 (build_ambiguous_conv): Likewise.
7879 (standard_conversion): Adjust to deal with new conversion data
7881 (convert_class_to_reference): Likewise.
7882 (direct_reference_binding): Likewise.
7883 (reference_binding): Likewise.
7884 (implicit_conversion): Likewise.
7885 (add_candidate): Likewise.
7886 (add_function_candidate): Likewise.
7887 (add_conv_candidate): Likewise.
7888 (build_builtin_candidate): Likewise.
7889 (print_z_candidate): Likewise.
7890 (merge_conversion_sequences): Likewise.
7891 (build_user_type_conversion_1): Likewise.
7892 (build_user_type_conversion): Likewise.
7893 (build_new_function_call): Likewise.
7894 (build_object_call): Likewise.
7895 (conditional_conversion): Likewise.
7896 (build_conditional_expr): Likewise.
7897 (build_new_op): Likewise.
7898 (build_op_delete_call): Likewise.
7899 (convert_like_real): Likewise.
7900 (build_over_call): Likewise.
7901 (build_new_method_call): Likewise.
7902 (is_subseq): Likewise.
7903 (maybe_handle_implicit_object): Likewise.
7904 (maybe_handle_ref_bind): Likewise.
7905 (compare_ics): Likewise.
7906 (source_type): Likewise.
7907 (add_warning): Likewise.
7909 (can_convert_arg): Likewise.
7910 (can_convert_arg_bad): Likewise.
7911 (perform_implicit_conversion): Likewise.
7912 (perform_direct_initialization_if_possible): Likewise.
7913 (initialize_reference): Likewise.
7914 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
7915 * cp-tree.def (WRAPPER): Likewise.
7916 (IDENTITY_CONV): Remove.
7917 (LVALUE_CONV): Likewise.
7918 (QUAL_CONV): Likewise.
7919 (STD_CONV): Likewise.
7920 (PTR_CONV): Likewise.
7921 (PMEM_CONV): Likewise.
7922 (BASE_CONV): Likewise.
7923 (REF_BIND): Likewise.
7924 (USER_CONV): Likewise.
7925 (AMBIG_CONV): Likewise.
7926 (RVALUE_CONV): Likewise.
7927 * cp-tree.h (tree_wrapper): Remove.
7928 (WRAPPER_ZC): Remove.
7929 (lang_tree_node): Remove wrapper.
7930 (LOOKUP_SPECULATIVELY): Remove.
7931 (build_op_delete_call): Adjust prototype.
7932 (validate_conversion_obstack): Declare.
7933 (build_zc_wrapper): Remove.
7934 * cvt.c (convert_to_reference): Remove dead code.
7935 (ocp_convert): Likewise.
7936 * decl.c (redeclaration_error_message): Correct handling of
7938 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
7939 (cp_tree_node_structure): Remove WRAPPER case.
7940 * decl2.c (finish_file): Call validate_conversion_obstack.
7941 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
7942 (build_op_delete_call): Likewise.
7943 (build_x_delete): Likewise.
7944 (build_delete): Adjust call to build_op_delete_call.
7945 * pt.c (tsubst_friend_declaration): Adjust code to determine
7946 whether or not a friend template is a definition.
7947 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
7948 * tree.c (build_zc_wrapper): Remove.
7950 2004-02-12 Zack Weinberg <zack@codesourcery.com>
7952 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
7953 * cp-tree.h: Don't declare cxx_builtin_type_decls.
7954 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
7955 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
7957 2004-02-10 Mark Mitchell <mark@codesourcery.com>
7959 * typeck.c (lookup_destructor): Fix typo in error message.
7961 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
7963 * call.c, parser.c, tree.c: Fix comment typos.
7965 2004-02-07 Zack Weinberg <zack@codesourcery.com>
7968 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
7969 * decl.c (duplicate_decls, start_function): Likewise.
7971 2004-02-07 Zack Weinberg <zack@codesourcery.com>
7973 * name-lookup.c (pushdecl): Issue shadow warnings directly.
7974 * parser.c (free_parser_stacks): Delete.
7976 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
7978 * rtti.c: Update copyright.
7980 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7983 * decl.c (require_complete_types_for_parms): Do not insert
7984 error_mark_node in the parameter list.
7986 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7989 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
7990 error when terminator can not be found.
7992 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
7994 Make-lang.in (po-generated): Delete.
7996 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
7998 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
7999 targetm.calls.promote_prototypes.
8001 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
8005 2004-01-15 Geoffrey Keating <geoffk@apple.com>
8007 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
8008 (handle_pragma_implementation): Likewise.
8010 2004-02-05 Mark Mitchell <mark@codesourcery.com>
8013 * typeck.c (lookup_destructor): Tweak error message.
8015 2004-02-05 Jan Hubicka <jh@suse.cz>
8017 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
8020 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8023 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
8024 code, only emits the diagnostic now. Added lookup of the identifier
8025 and support for qualified ids.
8026 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
8027 Parse an (invalid) type name as id-expression within a declarator.
8028 (cp_parser_simple_declaration): Use it.
8029 (cp_parser_member_declaration): Likewise.
8030 (cp_parser_make_typename_type): New function. Handle errors through
8031 cp_parser_diagnose_invalid_typename.
8032 (cp_parser_elaborated_type_specifier): Use it.
8034 2004-02-04 Mark Mitchell <mark@codesourcery.com>
8037 * call.c (convert_like_real): Use "converting" rather than
8038 "argument" as the descriptive keyword to
8039 dubious_conversion_warnings.
8040 * typeck.c (convert_for_assignment): Do not call
8041 dubious_conversion_warnings.
8043 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8046 * init.c (build_delete): Emit a more informative error message in
8047 case of an incomplete type, and on the correct source line.
8049 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
8051 * error.c, search.c: Update copyright.
8053 2004-02-04 Mark Mitchell <mark@codesourcery.com>
8056 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
8057 linkage for the typeinfo name string.
8059 2004-02-04 Mark Mitchell <mark@codesourcery.com>
8062 * cp-tree.h (fold_non_dependent_expr): New function.
8063 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
8064 (cp_parser_template_argument): Use fold_non_dependent_expr.
8065 (cp_parser_direct_declarator): Likewise.
8066 * pt.c (fold_non_dependent_expr): New function.
8067 (convert_nontype_argument): Use it.
8068 (tsubst_qualified_id): Simplify.
8069 (tsubst_copy_and_build): Likewise.
8071 2004-02-04 Mark Mitchell <mark@codesourcery.com>
8073 * decl.c (cxx_push_function_context): Do not set
8074 current_function_is_thunk.
8075 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
8078 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8081 * pt.c (more_specialized_class): Increase processing_template_decl
8082 while partial ordering.
8084 2004-02-03 Mark Mitchell <mark@codesourcery.com>
8087 * decl.c (start_function): Do not call pushdecl for any
8088 instantiation or specialization of a primary template.
8090 2004-02-03 Mark Mitchell <mark@codesourcery.com>
8093 * parser.c (cp_parser_class_name): Robustify.
8096 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
8099 * semantics.c (finish_id_expression): Do not return an
8100 IDENTIFIER_NODE when lookup finds a PARM_DECL.
8102 2004-02-03 Mark Mitchell <mark@codesourcery.com>
8105 * pt.c (build_non_dependent_expr): Do not build
8106 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
8109 * semantics.c (finish_id_expression): Do not return an
8110 IDENTIFIER_NODE when lookup finds a VAR_DECL.
8113 * parser.c (cp_parser_simple_declaration): When skipping to the
8114 end of the statement swallow the terminating semicolon.
8116 2004-02-02 Mark Mitchell <mark@codesourcery.com>
8119 * init.c (build_offset_ref): Improve error recovery for invalid
8120 uses of non-static member functions.
8123 * cp-tree.h (cp_build_type_attribute_variant): New function.
8124 * class.c (build_clone): Use cp_build_type_attribute_variant.
8125 * decl.c (duplicate_decls): Likewise.
8126 * pt.c (copy_default_args_to_explicit_spec): Likewise.
8127 (tsubst_function_type): Likewise.
8128 * tree.c (build_exception_variant): Check attributes before
8129 concluding that two types are the same.
8130 (cp_build_type-attribute_variant): New method.
8131 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
8134 * call.c (convert_class_to_reference): Keep better track of
8135 pedantically invalid user-defined conversions.
8137 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8140 * pt.c (tsubst_qualified_id): Improved error message when a type
8141 is expected but not found.
8143 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
8145 * class.c: Fix comment typos.
8147 * error.c: Likewise.
8148 * parser.c: Likewise.
8150 * search.c: Likewise.
8151 * typeck.c: Likewise.
8153 2004-01-30 Richard Henderson <rth@redhat.com>
8156 * method.c (use_thunk): Don't force_target_expr for void thunks.
8157 * tree.c (build_target_expr_with_type): Assert non-void type.
8158 (force_target_expr): Likewise.
8160 2004-01-30 Michael Matz <matz@suse.de>
8162 * parser.c (cp_parser_labeled_statement): Accept case ranges.
8164 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8168 * decl.c (grokdeclarator): Check immediatly type completeness for
8169 non-dependent types.
8171 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8174 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
8175 a sizeof expression.block
8177 2004-01-29 Mark Mitchell <mark@codesourcery.com>
8180 * mangle.c (write_encoding): Correct encoding of member template
8183 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8185 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
8186 template name as it was `<::' (digraph typo).
8187 (cp_parser_nth_token_starts_template_argument_list_p): New function.
8188 (cp_parser_id_expression): Use it.
8189 (cp_parser_nested_name_specifier_opt): Likewise.
8190 (cp_parser_template_name): Likewise.
8191 (cp_parser_class_name): Likewise.
8192 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
8194 2004-01-28 Mark Mitchell <mark@codesourcery.com>
8197 * typeck.c (merge_types): Do not merge attributes into
8201 * parser.c (cp_parser_direct_declarator): Do not prevent
8202 backtracking inside a parenthesized declarator.
8203 (cp_parser_parameter_declaration): Fix typo in comment.
8205 2004-01-28 Jan Hubicka <jh@suse.cz>
8207 * semantics.c (expand_body) Do emit_associated_thunks before
8210 2004-01-27 Devang Patel <dpatel@apple.com>
8212 * name-lookup.c: Include "debug.h"
8213 (do_namespace_alias): Invoke debug_hooks to emit debug info
8214 for namespace alias.
8215 (do_local_using_decl): Invoke debug_hooks to emit debug info
8217 (do_class_using_decl): Same.
8218 (do_toplevel_using_decl): Same.
8219 (do_using_directive): Same.
8220 (cp_emit_debug_info_for_using): New function.
8221 * Make-lang.in (cp/parser.o): Depend on debug.h
8222 (cp/name-lookup.o): Same.
8224 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8226 * cp-tree.h (language_function, lang_type_header): Use
8228 * name-lookup.h (cp_binding_level): Likewise.
8230 2004-01-26 Mark Mitchell <mark@codesourcery.com>
8233 * semantics.c (finish_for_expr): Check for unresolved overloaded
8236 * class.c (add_method): Just check processing_template_decl to
8237 determine whether or not we are within a template.
8238 * decl2.c (maybe_retrofit_in_chrg): Likewise.
8239 * init.c (decl_constant_value): Check the type of the declaration,
8241 * name-lookup.c (maybe_push_to_top_level): Rename to ...
8242 (push_to_top_level): ... this.
8243 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
8244 * pt.c (push_template_decl_real): Reorder condition for speed.
8245 (convert_template_argument): Use dependency-checking functions in
8246 place of uses_template_parms.
8247 (lookup_template_class): Avoid calling uses_template_parms more
8249 (uses_template_parms): Reimplement, using dependency-checking
8251 (instantiate_class_template): Use push_to_top_level, not
8252 maybe_push_to_top_level.
8253 (type_unification_real): Simplify.
8254 (type_dependent_expression_p): Handle OFFSET_REFs and
8256 (any_dependent_template_arguments_p): Handle multiple levels of
8258 * semantics.c (expand_or_defer_fn): Do not check
8259 uses_template_parms for template instantiations.
8260 * typeck.c (comptypes): Avoid calling cp_type_quals.
8262 2004-01-25 Mark Mitchell <mark@codesourcery.com>
8265 * call.c (build_over_call): Do not convert arguments when
8266 processing a template.
8267 * pt.c (build_non_dependent_expr): Do not build a
8268 NON_DEPENDENT_EXPR for arithmetic constants.
8270 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8273 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
8274 returns a TYPE_DECL. no further lookup is required.
8275 * semantics.c (check_template_template_default_arg): A TYPE_DECL
8276 is invalid. Rework to give better diagnostics.
8278 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8281 * pt.c (instantiate_class_template): Add an error_mark_node
8283 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
8285 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
8288 * decl.c (finish_function): Move the call to
8289 finish_fname_decls below the call to
8290 finish_eh_spec_block.
8292 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
8294 * optimize.c, typeck2.c: Update copyright.
8296 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
8298 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
8299 init.c, mangle.c, typeck.c: Update copyright.
8301 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
8303 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
8305 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
8307 * Make-lang.in: Replace $(docdir) with doc.
8308 (c++.info, c++.srcinfo): Dummy entry.
8309 (c++.man, c++.srcman): New rules.
8310 (c++.install-man): Revamp rule.
8312 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
8314 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
8315 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
8316 immediate $(shell) instead of deferred backquote.
8318 2004-01-19 Mark Mitchell <mark@codesourcery.com>
8321 * parser.c (cp_parser_postfix_expression): When encountering
8322 incomplete type on left-hand side of "->" or ".", treat the entire
8323 expression as erroneous.
8326 * call.c (build_field_call): Remove.
8327 (n_build_method_call): Likewise.
8328 (build_method_call): Likewise.
8329 (build_new_method_call): Do not call build_field_call.
8330 * class.c (n_build_method_call): Remove.
8331 (print_class_statistics): Do not print it.
8332 * cp-tree.h (build_method_call): Remove declaration.
8333 (finish_object_call_expr): Likewise.
8334 (build_new_1): Do not use build_method_call.
8335 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
8336 when the function appearing on the right-hand-side of "." or "->"
8337 is not actually a function.
8338 * pt.c (tsubst_copy_and_build): Likewise.
8339 * semantics.c (finish_object_call_expr): Remove.
8341 2004-01-18 Mark Mitchell <mark@codesourcery.com>
8344 * pt.c (tsubst): Use finish_typeof.
8346 2004-01-18 Jason Merrill <jason@redhat.com>
8349 * except.c (build_throw): In a template, set
8350 current_function_returns_abnormally.
8352 2004-01-17 Fred Fish <fnf@intrinsity.com>
8355 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
8356 except don't call array_type_nelts() with a VECTOR_TYPE.
8358 2004-01-16 Jan Hubicka <jh@suse.cz>
8360 * mangle.c (write_mangled_name): Remove inline modifier.
8362 2004-01-16 Mark Mitchell <mark@codesourcery.com>
8365 * decl.c (compute_array_index_type): Fix grammar in comment.
8366 * init.c (build_zero_init): Handle zero-sized arrays correctly.
8369 * call.c (name_as_c_string): Print conversion operator names
8373 * call.c (initialize_reference): Pass -1 for inner parameter to
8376 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8379 * parser.c (cp_parser_base_specifier): Check for an invalid
8380 keyword `typename' and emit an user-friendly error message.
8382 2004-01-15 Geoffrey Keating <geoffk@apple.com>
8385 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
8386 (handle_pragma_implementation): Likewise.
8388 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8391 * typeck.c (build_class_member_access_expr): Allow to access members
8392 of the currently open class.
8393 (finish_class_member_access_expr): Likewise.
8395 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
8398 * name-lookup.c (validate_nonmember_using_decl): Take scope and
8399 name by value, instead of computing them.
8400 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
8401 arguments. Pass them to validate_nonmember_using_decl.
8402 * name-lookup.h (do_local_using_decl): Adjust.
8403 (do_toplevel_using_decl): Likewise.
8404 * parser.c (cp_parser_using_declaration): Likewise.
8405 * pt.c (tsubst_expr): Likewise.
8407 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
8411 * name-lookup.c (qualified_lookup_using_namespace): Search
8412 strongly-associated namespaces first, and only then try other
8415 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
8417 * Make-lang.in (c++.srcextra): Dummy entry.
8419 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8422 * parser.c (cp_parser_template_name): Don't try to parse a
8423 conversion-function-id, as it cannot be a template-name.
8424 (cp_parser_simple_type_specifier): Check for invalid template-ids
8425 even after a built-in type.
8427 2004-01-14 Jan Hubicka <jh@suse.cz>
8430 * pt.c (instantiate_decl): Do not increase function_depth.
8432 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
8436 * parser.c (cp_parser_elaborated_type_specifier): Warn about
8437 attributes and discard.
8438 * decl.c (xref_tag): Don't overwite existing attributes with
8441 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8444 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
8445 is no destructor while looking up a BIT_NOT_EXPR.
8447 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
8449 * cxxfilt.c: Remove unused file.
8451 2004-01-14 Jan Hubicka <jh@suse.cz>
8453 Partial fix to PR c++/12850
8454 * decl2.c (mark_used): Do not proactively instantiate templates
8455 when compiling in unit-at-a-time or not optimizing.
8456 * optimize.c (maybe_clone_body): Do not increase function depth.
8458 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8461 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
8463 2004-01-12 Steven Bosscher <stevenb@suse.de>
8466 * parser.c (cp_parser_member_declaration): Any non-type is also
8467 not a class or a function.
8469 2004-01-12 Jason Merrill <jason@redhat.com>
8472 * class.c (build_base_path): Do not mark vtable references as
8474 (build_vtbl_ref_1): Likewise.
8476 2004-01-12 Richard Henderson <rth@redhat.com>
8479 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
8480 (store_init_value): Use it.
8481 * decl.c (check_initializer): Expect full initialization code
8482 from store_init_value.
8483 * init.c (expand_aggr_init_1): Likewise.
8484 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
8486 2004-01-12 Mark Mitchell <mark@codesourcery.com>
8488 * class.c (layout_class_type): For non-POD class types, also copy
8489 the DECL_SIZE and DECL_MODE of fields to the base class type.
8491 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8494 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
8495 calling regenerate_decl_from_template.
8497 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
8500 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
8501 decl-specifier occurring along with a class definition.
8503 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
8505 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
8506 clauses to comments describing declares_class_or_enum.
8507 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
8510 2004-01-12 Jan Hubicka <jh@suse.cz>
8512 * pt.c (for_each_template_parm): Do not check for duplicates.
8513 (for_each_template_parm): Use walk_tree duplicate checking code.
8515 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
8518 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
8519 is error_mark_node, don't add any more decl_specs.
8520 (cp_parser_init_declarator): After committing to a declaration, if
8521 the decl_specifiers start with error_mark_node, issue an error and
8522 change the type to "int".
8524 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
8527 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
8529 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8533 * pt.c (tsubst): Substitution must fail if we are attempting to
8534 create an array with element type that is an abstract class type.
8535 * decl.c (cp_finish_decl): Strip pointers and array types recursively
8536 before calling abstract_virtuals_error.
8538 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
8540 * name-lookup.c (qualified_lookup_using_namespace): Consider
8541 strong using directives even if we've already found a binding.
8543 2004-01-09 Mark Mitchell <mark@codesourcery.com>
8545 * cp-tree.h (cxx_expand_expr): Change prototype.
8546 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
8548 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8551 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
8552 looking into them recursively. They can be there because of the
8553 new __offsetof__ extension.
8555 2004-01-07 Zack Weinberg <zack@codesourcery.com>
8557 * parser.c (cp_parser_save_member_function_body): Mark the
8560 2004-01-05 Mark Mitchell <mark@codesourcery.com>
8563 * class.c (build_clone): Copy type attributes from the original
8564 function to the clone.
8567 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
8568 references as constant.
8571 * parser.c (cp_parser_explicit_instantiation): Improve error
8573 (cp_parser_require): Improve indication of the error location.
8576 * parser.c (cp_parser_class_head): Reorder logic to check for
8577 invalid qualification.
8579 2004-01-04 Mark Mitchell <mark@codesourcery.com>
8582 * name-lookup.c (lookup_using_namespace): Remove spacesp
8584 (unqualified_namespace_lookup): Likewise.
8585 (lookup_qualified_name): Adjust accordingly.
8586 (lookup_name_real): Likewise.
8587 (lookup_arg_dependent): Do not eliminate the namespace of the
8588 functions found by unqualified name lookup unless that is the
8591 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
8593 * semantics.c (push_deferring_access_checks): Fix format.
8594 (resume_deferring_access_checks): Likewise.
8595 (stop_deferring_access_checks): Likewise.
8596 (pop_deferring_access_checks): Likewise.
8597 (get_deferred_access_checks): Likewise.
8598 (pop_to_parent_deferring_access_checks): Likewise.
8599 (perform_deferred_access_checks): Likewise.
8600 (perform_or_defer_access_check): Likewise.
8602 2004-01-04 Richard Henderson <rth@redhat.com>
8604 * call.c (build_over_call): Don't create a save_expr of an
8605 aggregate, but rather its address.
8607 2004-01-04 Mark Mitchell <mark@codesourcery.com>
8610 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
8611 an offsetof expression.
8613 * parser.c (cp_parser_parameter_declaration): Fix comment.
8616 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
8617 (reference_binding): Set it when appropriate.
8618 (build_temp): New function, split out from ...
8619 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
8620 (initialize_reference): Likewise.
8623 * parser.c (cp_parser): Add in_type_id_in_expr_p.
8624 (cp_parser_new): Initialize it.
8625 (cp_parser_postfix_expression): Set it.
8626 (cp_parser_sizeof_operand): Likewise.
8627 (cp_parser_parameteR_declaration): Do not commit early to tenative
8628 parsers when in_type_id_in_expr_p is set.
8630 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8633 * parser.c (cp_parser_template_argument): Don't call
8634 make_unbound_class_template directly.
8635 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
8636 UNBOUND_CLASS_TEMPLATE tree node.
8638 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
8641 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
8643 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8646 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
8647 (DECL_FUNCTION_TEMPLATE_P): Use it.
8648 (DECL_CLASS_TEMPLATE_P): Likewise.
8649 * parser.c (cp_parser_lookup_name): Add is_template parameter.
8650 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
8651 (cp_parser_template_name): Likewise.
8652 (cp_parser_elaborated_type_specifier): Likewise.
8653 (cp_parser_namespace_name): Likewise.
8654 (cp_parser_class_name): Likewise.
8655 (cp_parser_lookup_name_simple): Likewise.
8657 See ChangeLog.3 for earlier changes.