1 2004-05-14 Geoffrey Keating <geoffk@apple.com>
3 * name-lookup.c (struct scope_binding): New.
4 (EMPTY_SCOPE_BINDING): New.
5 (lookup_using_namespace): Take a scope_binding instead of a
7 (qualified_lookup_using_namespace): Likewise.
8 (cxx_binding_clear): Delete.
9 (do_nonmember_using_decl): Use a scope_binding instead of a
11 (lookup_tag): Don't call select_decl.
12 (ambiguous_decl): Don't return anything (and change callers to match).
13 Take a scope_binding as the second parameter.
14 (lookup_namespace_name): Use a scope_binding instead of a
16 (unqualified_namespace_lookup): Likewise.
17 (lookup_qualified_name): Likewise.
18 (select_decl): Take a scope_binding instead of a cxx_binding.
19 Use macros rather than hand-coding tests for type-ness.
21 2004-05-13 Diego Novillo <dnovillo@redhat.com>
23 * cp-gimplify.c: Rename from cp-simplify.c.
24 * Make-lang.in, optimize.c: Update.
26 2004-05-13 Diego Novillo <dnovillo@redhat.com>
28 Merge from tree-ssa-20020619-branch. See
29 ChangeLog.tree-ssa for details.
31 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
32 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
33 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
34 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
36 * cp-mudflap.c: New file.
37 * cp-simplify.c:: New file.
39 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
42 * decl2.c (check_classfn): For member templates, compare also the
43 template parameters to match the declaration.
44 * cp-tree.h: Adjust declaration of check_classfn.
45 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
46 * friend.c (do_friend): Likewise.
47 * pt.c (tsubst_friend_function): Likewise.
49 2004-05-01 Zack Weinberg <zack@codesourcery.com>
51 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
52 Instead, dig into the representation type to find the array bound.
54 2004-04-30 Jason Merrill <jason@redhat.com>
56 Refer to base members using COMPONENT_REFs where possible.
57 * class.c (build_simple_base_path): New fn.
58 (build_base_path): Use it for non-virtual base references.
59 (layout_class_type): Change base fields to their real type
61 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
62 * cp-lang.c (cxx_get_alias_set): Use it.
64 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
66 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
69 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
72 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
73 used in integral constant expressions.
75 2004-04-22 Mark Mitchell <mark@codesourcery.com>
77 * init.c (build_aggr_init): Fix accidental use of C99 construct in
80 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
82 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
83 * decl.c (reshape_init): Use it.
84 * init.c (perform_member_init): Remove redundant condition.
85 (build_aggr_init): Adjust to handle brace-enclosed initializers
87 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
89 * parser.c (cp_parser_initializer_clause): Do not set
90 TREE_HAS_CONSTRUCTOR on the initializer.
91 * rtti.c (tinfo_base_init): Likewise.
92 (generic_initializer): Likewise.
93 (ptr_initializer): Likewise.
94 (ptm_initializer): Likewise.
95 (class_initializer): Likewise.
96 (get_pseudo_ti_init): Likewise.
97 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
99 2004-04-22 Alan Modra <amodra@bigpond.net.au>
101 * name-lookup.c (anonymous_namespace_name): Make static.
103 2004-04-19 Roger Sayle <roger@eyesopen.com>
106 * class.c (build_base_path): Call fold whilst building the NULL
107 pointer check expression trees.
109 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
111 * init.c (build_new_1): Don't use type size argument for Java
112 _Jv_AllocObject call.
114 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
116 * method.c (make_alias_for_thunk): Remove preprocessor guard on
117 declaration and definition.
119 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
122 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
125 2004-04-08 Jakub Jelinek <jakub@redhat.com>
127 * decl2.c (mark_used): Don't segfault if cfun != NULL but
128 current_function_decl == NULL.
130 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
133 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
136 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
138 * init.c (decl_constant_value): Don't look at DECL_INITIAL
140 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
141 or TREE_SIDE_EFFECTS of a type.
143 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
146 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
147 cv-qualifier unification.
148 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
150 2004-04-02 Jan Hubicka <jh@suse.cz>
152 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
153 * cp-tree.h (cp_update_decl_after_saving): Declare.
154 * tree.c (cp_update_decl_after_saving): Define.
156 2004-04-01 Mark Mitchell <mark@codesourcery.com>
159 * typeck.c (get_delta_difference): Call fold before returning the
162 2004-04-01 Richard Henderson <rth@redhat.com>
165 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
166 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
168 2004-04-01 Mark Mitchell <mark@codesourcery.com>
171 * name-lookup.c (maybe_push_cleanup_level): Robustify.
173 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
175 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
177 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
179 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
180 * class.c (check_bitfield_decl): Likewise.
181 * cvt.c (type_promotes_to): Likewise.
182 * decl.c (finish_enum): Likewise.
183 * mangle.c (write_builtin_type): Likewise.
184 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
185 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
186 (build_binary_op): Likewise.
188 2004-03-31 Jan Hubicka <jh@suse.cz>
190 * tree.h (optimize_function): Kill prototype.
191 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
192 * semantics.c (expand_body): Kill.
194 2004-03-30 Mark Mitchell <mark@codesourcery.com>
197 * decl.c (start_decl_1): Do not decide whether or not to create a
198 new cleanup level until after the type has been completed.
201 * pt.c (tsubst_default_argument): Clear current_function_decl.
203 2004-03-30 Zack Weinberg <zack@codesourcery.com>
205 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
207 2004-03-29 Zack Weinberg <zack@codesourcery.com>
209 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
210 is null, just print the literal name and return.
212 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
214 * cxx-pretty-print.c: Fix comment typos.
216 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
218 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
221 2004-03-23 Ziemowit Laski <zlaski@apple.com>
223 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
224 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
227 2004-03-23 Zack Weinberg <zack@codesourcery.com>
229 PR 12267, 12391, 12560, 13129, 14114, 14133
230 * cp-lang.c (c_reset_state): Delete.
231 (push_file_scope, pop_file_scope): New stubs.
232 * parser.c (c_parse_file): Call sorry() here if called more than once.
234 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
236 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
239 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
241 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
243 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
245 * error.c (enum pad): Remove.
246 (dump_qualifiers): Likewise.
247 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
248 (dump_aggr_type): Likewise.
249 (dump_type_suffix): Likewise.
250 (dump_simple_decl): Likewise.
251 (dump_function_decl): Likewise.
252 (cv_to_string): Likewise.
253 (dump_type_prefix): Likewise. Adjust return void.
254 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
256 (pp_cxx_template_keyword_if_needed): Document.
257 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
258 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
261 2004-03-21 Mark Mitchell <mark@codesourcery.com>
264 * decl.c (cp_finish_decl): Compute the size of arrays declared in
265 templates, if their type is non-dependent.
267 2004-03-19 Mark Mitchell <mark@codesourcery.com>
269 * call.c (build_op_delete_call): Do not forget the placement
270 arguments when iterating through mutiple delete operators.
272 * cp-tree.h (svaed_scope): Remove last_parms.
273 (NEW_DELETE_OPNAME_P): New macro.
274 (last_function_parms): Remove.
275 (do_friend): Adjust prototype.
276 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
277 using last_function_parms.
278 (grokfndecl): Take the PARM_DECLs as an argument, rather than
279 using last_function_parms.
280 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
281 for class-specific operator new and operator delete.
282 (grok_op_properties): Do not look for allocation functions with
284 (start_function): Use DECL_ARGUMENTS instead of
286 * decl.h (last_function_parms): Do not declare.
287 * decl2.c (grokclassfn): Do not use last_function_parms.
288 * friend.c (do_friend): Remove parmdecls parameter.
289 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
290 (pop_from_top_level): Do not restore it.
291 * pt.c (check_explicit_specialization): Do not adjust
294 * name-lookup.c (do_local_using_decl): Create a local binding for
295 types brought in via using declarations.
297 * name-lookup.c (lookup_arg_dependent): Handle block-scope
298 function declarations correctly.
300 * semantics.c (finish_id_expression): Correct handling of
301 conversion operators to dependent types.
303 * typeck.c (lookup_destructor): Allow the use of destructors from
306 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
308 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
309 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
310 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
311 the field is named TEMPLATE_TYPE_PARM_INDEX.
313 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
316 * parser.c (cp_parser_functional_cast): A cast to anything
317 but integral or enumaration type is not an integral constant
319 * pt.c (value_dependent_expression_p): Handle cast expressions
320 without operands (such as "int()").
322 2004-03-18 Mark Mitchell <mark@codesourcery.com>
324 * semantics.c (finish_pseudo_destructor_expr): Allow differing
325 cv-qualification between the type named by the
326 pseudo-destructor-name and the object-type.
328 * search.c (accessible_base_p): Handle non-proper bases.
330 * name-lookup.c (do_nonmember_using_decl): If a using declaration
331 refers to a single overloaded function, set the type of the
333 * tree.c (lvalue_type): Simplify.
334 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
336 (build_unary_op): Handle OVERLOADs with known types.
338 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
341 * parser.c (cp_parser_postfix_expression): Handle the use of
342 "typename" in non-dependent contexts. Convert appropriately when
343 when using a qualified name after "->" or ".".
345 * call.c (conditional_conversion): Honor the requirement that some
346 conversions refer to the original object.
348 2004-03-18 Mark Mitchell <mark@codesourcery.com>
350 * call.c (build_conditional_expr): Do not call force_rvalue for
351 operands of void_type when the conditional expression itself has
353 * name-lookup.c (pushdecl): Don't consider a declaration of a
354 function named "main" to be an overload of a type named "main".
355 * parser.c (cp_parser_template_name): Perform name lookup when the
356 template name is proceeded by "template" if the qualifying scope
358 * typeck.c (composite_pointer_type_r): Correctly handle
359 pointer-to-member types.
360 (build_const_cast): Likewise.
362 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
364 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
365 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
366 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
367 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
368 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
369 (TYPEOF_TYPE_EXPR): New macro.
370 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
371 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
372 * pt.c (tsubst): Likewise.
373 * semantics.c (finish_typeof): Likewise.
374 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
375 and TEMPLATE_TYPE_PARM.
376 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
377 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
379 2004-03-16 Mark Mitchell <mark@codesourcery.com>
382 * cp-tree.h (build_new_op): Change prototype.
383 (build_x_binary_op): Likewise.
384 * call.c (build_new_op): Add overloaded_p parameter.
385 * decl2.c (grok_array_decl): Adjust call to build_new_op.
386 * parser.c (cp_parser_binary_expression): Note that uses of
387 overloaded operators prevents an expression from being considered
388 an integral constant.
389 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
391 * semantics.c (finish_call_expr): Likewise.
392 * typeck.c (rationalize_conditional_expr): Likewise.
393 (build_x_indirect_ref): Likewise.
394 (build_x_binary_op): Likewise.
395 (build_x_unary_op): Likewise.
396 (build_x_compound_expr): Likewise.
397 (build_modify_expr): Likewise.
398 * typeck2.c (build_x_arrow): Likewise.
400 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
402 * cp-lang.c, ptree.c: Update copyright.
404 2004-03-13 Mark Mitchell <mark@codesourcery.com>
407 * parser.c (cp_parser_non_integral_constant_expression): Encode
408 more of the idiom that surrounded calls to this function within
410 (cp_parser_primary_expression): Adjust accordingly.
411 (cp_parser_postfix_expression): Likewise.
412 (cp_parser_unary_expression): Likewise.
413 (cp_parser_cast_expression): Likewise.
414 (cp_parser_assignment_expression): Likewise.
415 (cp_parser_expression): Likewise.
416 (cp_parser_new_expression): Note that new-expressions are not
417 allowed in integral constant expressions.
418 (cp_parser_delete_expression): Likewise.
420 2004-03-12 Matt Austern <austern@apple.com>
422 * decl2.c (maybe_make_one_only): Look at
423 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
424 to make an explicit instantiation weak.
425 * method.c (use_thunk): Make sure we call comdat_linkage
427 * pt.c (do_type_instantiation): On systems where weak symbols
428 don't go in a static archive's TOC, explicit instantiation of a
429 class must imply *explicit* instantiation of its memeber.
431 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
433 * call.c, cp-tree.h, pt.c: Fix comment typos.
435 2004-03-10 Mark Mitchell <mark@codesourcery.com>
438 * decl.c (xref_tag): Disregard non-type declarations when
439 looking up a tagged type.
441 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
444 * call.c (convert_like_real): Build a const qualified temporary,
445 when testing ctor access.
447 2004-03-09 Mark Mitchell <mark@codesourcery.com>
449 * call.c (initialize_reference): Fix typo.
451 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
454 * pt.c (determine_specialization): For member templates, match also
458 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
460 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
462 2004-03-09 Mark Mitchell <mark@codesourcery.com>
465 * call.c (initialize_reference): Handle initializers that are
466 class-member access expressions applies to rvalues.
468 2004-03-09 Mark Mitchell <mark@codesourcery.com>
471 * name-lookup.c (supplement_binding): Ignore functions that are
472 marked DECL_ANTICIPATED.
474 2004-03-08 Mark Mitchell <mark@codesourcery.com>
477 * class.c (check_field_decls): Complain about non-static data
478 members of reference type in unions. Propagate
479 CLASSTYPE_REF_FIELDS_NEED_INIT and
480 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
482 * init.c (perform_member_init): Complain about mbmers with const
483 type that are not explicitly initialized.
485 2004-03-08 Mark Mitchell <mark@codesourcery.com>
487 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
488 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
489 (lang_identifier): Remove implicit_decl and error_locus.
490 (IDENTIFIER_IMPLICIT_DECL): Remove.
491 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
492 (IDENTIFIER_ERROR_LOCUS): Likewise.
493 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
494 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
495 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
496 (implicitly_declare): Remove.
497 * decl.c (warn_extern_redeclared_static): Remove check of
498 IDENTIFIER_IMPLICIT_DECL.
499 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
500 (implicitly_declare): Remove.
501 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
502 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
503 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
504 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
505 in the innermost scope, rather than at namespace scope.
506 * name-lookup.c (push_local_binding): Give it external linkage.
507 (pushdecl): Remove dead code.
508 * name-lookup.h (push_local_binding): Declare it.
509 * ptree.c (cxx_print_identifier): Don't print
510 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
511 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
512 not IDENTIFIER_ERROR_LOCUS.
513 * typeck.c (build_function_call): Remove dead code.
515 2004-03-08 Jason Merrill <jason@redhat.com>
518 * decl.c (xref_tag): Remove attribute handling.
519 * cp-tree.h: Adjust prototype.
520 * decl.c, parser.c, rtti.c: Adjust callers.
521 * parser.c (cp_parser_class_head): Pass back attributes in the
523 (cp_parser_class_specifier): Adjust.
525 2004-03-08 Matt Austern <austern@apple.com>
528 * name-lookup.c (add_decl_to_level): Add extern variables, as well
529 as static, to static_decls array.
531 2004-03-05 Jason Merrill <jason@redhat.com>
533 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
535 2004-03-04 Geoffrey Keating <geoffk@apple.com>
537 * decl.c (grokfndecl): Update old incorrect comment.
538 (grokvardecl): Diagnose C++ variables of type with no linkage.
540 2004-03-01 Mark Mitchell <mark@codesourcery.com>
543 * pt.c (build_non_dependent_expr): Do not create a
544 NON_DEPENDENT_EXPR for a THROW_EXPR.
546 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
549 * error.c (dump_expr): Handle THROW_EXPR.
551 2004-03-01 Mark Mitchell <mark@codesourcery.com>
554 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
555 lookup if ordinary name-lookup finds a non-function.
556 * pt.c (tsubst_copy_and_build): Likewise.
559 * parser.c (cp_parser_late_parsing_default_args): Check that there
560 are no extra tokens after the end of the default-argument
563 2004-03-01 Mark Mitchell <mark@codesourcery.com>
566 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
567 having C++ linkage for name-mangling purposes.
570 * parser.c (cp_parser_direct_declarator): Recognize constructor
571 declarators that use a template-id to name the class being
575 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
576 (tsubst_expr): Do not call tsubst_copy, even when
577 processing_template_decl.
579 2004-03-01 Jeff Law <law@redhat.com>
581 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
584 2004-02-29 Mark Mitchell <mark@codesourcery.com>
587 * name-lookup.h (push_scope): Change prototype.
588 * name-lookup.c (push_scope): Do not reenter the current class
590 * decl.c (grokfndecl): Check return code from push_scope before
592 * decl2.c (check_classfn): Likewise.
593 * parser.c (cp_parser_conversion_function_id): Likewise.
594 (cp_parser_init_declarator): Likewise.
595 (cp_parser_direct_declarator): Likewise.
596 (cp_parser_class_specifier): Likewise.
597 (cp_parser_class_head): Likewise.
598 (cp_parser_lookup_name): Likewise.
599 (cp_parser_constructor_declarator_p): Likewise.
600 * pt.c (instantiate_class_template): Likewise.
601 (resolve_typename_type): Likewise.
603 2004-02-29 Mark Mitchell <mark@codesourcery.com>
606 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
610 * class.c (update_vtable_entry_for_fn): Do not go through
611 covariance machinery if the type returned by an overrider is the
612 same as the original.
614 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
616 * call.c: Fix a comment typo.
618 2004-02-27 Ziemowit Laski <zlaski@apple.com>
620 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
622 2004-02-26 Mark Mitchell <mark@codesourcery.com>
625 * parser.c (cp_parser_parameter_declaration_list): Commit
626 to fewer tentative parses.
628 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
631 * pt.c (dependent_type_p_r): A template template parameter is a
634 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
637 * mangle.c (write_template_arg_literal): Don't rely on identity for
640 2004-02-24 Jason Merrill <jason@redhat.com>
642 * tree.c (build_exception_variant): Use check_qualified_type.
644 2004-02-23 Zack Weinberg <zack@codesourcery.com>
645 Kazu Hirata <kazu@cs.umass.edu>
647 * decl.c (cxx_init_decl_processing): Don't check
648 flag_writable_strings.
650 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
653 * typeck.c (maybe_warn_about_returning_address_of_location):
654 Change check for VAR_DECL to use DECL_P instead.
656 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
659 * cvt.c (build_expr_type_conversion): Type must be complete before
660 looking up for conversions.
662 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
665 * name-lookup.c (arg_assoc_class): Don't look into template
666 arguments if it is not a primary template.
668 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
671 * method.c (use_thunk): Always clone function argument tree.
673 2004-02-20 Mark Mitchell <mark@codesourcery.com>
676 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
679 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
680 for all type variants.
682 2004-02-19 Mark Mitchell <mark@codesourcery.com>
685 * decl.c (duplicate_decls): Return error_mark_node for invalid
687 * name-lookup.c (push_namespace): Ignore the return value from
689 * pt.c (push_template_decl_real): Robustify.
692 * name-lookup.c (push_class_level_binding): Do not complain about
693 adding a binding for a member whose name is the same as the
694 enclosing class if the member is located in a base class of the
697 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
700 * parser.c (cp_parser_new_expression): Parse an ill-formed
701 direct-new-declarator after a parenthesized type-id to emit good
704 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
706 * cp-tree.def, cvt.c: Update copyright.
708 2004-02-17 Mark Mitchell <mark@codesourcery.com>
711 * cp-tree.h (abi_version_at_least): Remove.
712 * mangle.c: Include flags.h.
714 2004-02-15 Mark Mitchell <mark@codesourcery.com>
717 * call.c (build_conditional_expr): Handle conversions between
718 class types which result in differently cv-qualified type
722 * class.c (delete_duplicate_fields_1): Remove.
723 (delete_duplicate_fields): Likewise.
724 (finish_struct_anon): Remove check for members with the same name
725 as their enclosing class.
726 (check_field_decls): Do not call duplicate_fields.
727 * decl.c (grokdeclarator): Remove check for static data members
728 with the same name as their enclosing class.
729 * name-lookup.c (push_class_level_binding): Check for members with
730 the same name as their enclosing class.
732 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
735 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
737 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
740 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
741 has full set of arguments.
743 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
746 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
748 2004-02-13 Mark Mitchell <mark@codesourcery.com>
751 * cp-tree.h (delete_sanity): Change prototype.
752 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
753 Remove dead code. Adjust code to warn about deleting an array.
754 * typekc.c (decay_conversion): Use build_address and build_nop.
757 * search.c (accessible_p): Do not check access in thunks.
760 * call.c (build_conditional_expr): Call force_rvalue on the
761 non-void operand in the case that one result is a throw-expression
762 and the other is not.
764 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
767 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
768 the type name and look ahead for ::~, and bail out early with a
769 better error message if the parse is going to fail.
771 2004-02-12 Mark Mitchell <mark@codesourcery.com>
773 * call.c (conversion_kind): New type.
774 (conversion_rank): Likewise.
775 (conversion): Likewise.
776 (CONVERSION_RANK): New macro.
777 (conversion_obstack): New variable.
778 (obstack_initialized): Likewise.
779 (z_candidate): Change type of convs and second_conv.
780 (candidate_warning): New type.
781 (IDENTITY_RANK): Remove.
782 (EXACT_RANK): Likewise.
783 (PROMO_RANK): Likewise.
784 (STD_RANK): Likewise.
785 (PBOOL_RANK): Likewise.
786 (USER_RANK): Likewise.
787 (ELLIPSIS_RANK): Likewise.
788 (BAD_RANK): Likewise.
789 (ICS_RANK): Likewise.
790 (ICS_STD_RANK): Likewise.
791 (ICS_USER_FLAG): Likewise.
792 (ICS_ELLIPSIS_FLAG): Likewise.
793 (ICS_THIS_FLAG): Likewise.
794 (ICS_BAD_FLAG): Likewise.
795 (NEED_TEMPORARY_P): Likewise.
796 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
797 (USER_CONV_CAND): Likewise.
798 (USER_CONV_FN): Likewise.
799 (conversion_obstack_alloc): New function.
800 (alloc_conversion): Likewise.
801 (validate_conversion_obstack): Likewise.
802 (alloc_conversions): Likewise.
803 (build_conv): Adjust to deal with new conversion data structures.
804 (build_identity_conv): New function.
805 (build_ambiguous_conv): Likewise.
806 (standard_conversion): Adjust to deal with new conversion data
808 (convert_class_to_reference): Likewise.
809 (direct_reference_binding): Likewise.
810 (reference_binding): Likewise.
811 (implicit_conversion): Likewise.
812 (add_candidate): Likewise.
813 (add_function_candidate): Likewise.
814 (add_conv_candidate): Likewise.
815 (build_builtin_candidate): Likewise.
816 (print_z_candidate): Likewise.
817 (merge_conversion_sequences): Likewise.
818 (build_user_type_conversion_1): Likewise.
819 (build_user_type_conversion): Likewise.
820 (build_new_function_call): Likewise.
821 (build_object_call): Likewise.
822 (conditional_conversion): Likewise.
823 (build_conditional_expr): Likewise.
824 (build_new_op): Likewise.
825 (build_op_delete_call): Likewise.
826 (convert_like_real): Likewise.
827 (build_over_call): Likewise.
828 (build_new_method_call): Likewise.
829 (is_subseq): Likewise.
830 (maybe_handle_implicit_object): Likewise.
831 (maybe_handle_ref_bind): Likewise.
832 (compare_ics): Likewise.
833 (source_type): Likewise.
834 (add_warning): Likewise.
836 (can_convert_arg): Likewise.
837 (can_convert_arg_bad): Likewise.
838 (perform_implicit_conversion): Likewise.
839 (perform_direct_initialization_if_possible): Likewise.
840 (initialize_reference): Likewise.
841 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
842 * cp-tree.def (WRAPPER): Likewise.
843 (IDENTITY_CONV): Remove.
844 (LVALUE_CONV): Likewise.
845 (QUAL_CONV): Likewise.
846 (STD_CONV): Likewise.
847 (PTR_CONV): Likewise.
848 (PMEM_CONV): Likewise.
849 (BASE_CONV): Likewise.
850 (REF_BIND): Likewise.
851 (USER_CONV): Likewise.
852 (AMBIG_CONV): Likewise.
853 (RVALUE_CONV): Likewise.
854 * cp-tree.h (tree_wrapper): Remove.
855 (WRAPPER_ZC): Remove.
856 (lang_tree_node): Remove wrapper.
857 (LOOKUP_SPECULATIVELY): Remove.
858 (build_op_delete_call): Adjust prototype.
859 (validate_conversion_obstack): Declare.
860 (build_zc_wrapper): Remove.
861 * cvt.c (convert_to_reference): Remove dead code.
862 (ocp_convert): Likewise.
863 * decl.c (redeclaration_error_message): Correct handling of
865 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
866 (cp_tree_node_structure): Remove WRAPPER case.
867 * decl2.c (finish_file): Call validate_conversion_obstack.
868 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
869 (build_op_delete_call): Likewise.
870 (build_x_delete): Likewise.
871 (build_delete): Adjust call to build_op_delete_call.
872 * pt.c (tsubst_friend_declaration): Adjust code to determine
873 whether or not a friend template is a definition.
874 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
875 * tree.c (build_zc_wrapper): Remove.
877 2004-02-12 Zack Weinberg <zack@codesourcery.com>
879 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
880 * cp-tree.h: Don't declare cxx_builtin_type_decls.
881 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
882 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
884 2004-02-10 Mark Mitchell <mark@codesourcery.com>
886 * typeck.c (lookup_destructor): Fix typo in error message.
888 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
890 * call.c, parser.c, tree.c: Fix comment typos.
892 2004-02-07 Zack Weinberg <zack@codesourcery.com>
895 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
896 * decl.c (duplicate_decls, start_function): Likewise.
898 2004-02-07 Zack Weinberg <zack@codesourcery.com>
900 * name-lookup.c (pushdecl): Issue shadow warnings directly.
901 * parser.c (free_parser_stacks): Delete.
903 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
905 * rtti.c: Update copyright.
907 2003-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
910 * decl.c (require_complete_types_for_parms): Do not insert
911 error_mark_node in the parameter list.
913 2003-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
916 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
917 error when terminator can not be found.
919 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
921 Make-lang.in (po-generated): Delete.
923 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
925 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
926 targetm.calls.promote_prototypes.
928 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
932 2004-01-15 Geoffrey Keating <geoffk@apple.com>
934 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
935 (handle_pragma_implementation): Likewise.
937 2004-02-05 Mark Mitchell <mark@codesourcery.com>
940 * typeck.c (lookup_destructor): Tweak error message.
942 2004-02-05 Jan Hubicka <jh@suse.cz>
944 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
947 2003-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
950 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
951 code, only emits the diagnostic now. Added lookup of the identifier
952 and support for qualified ids.
953 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
954 Parse an (invalid) type name as id-expression within a declarator.
955 (cp_parser_simple_declaration): Use it.
956 (cp_parser_member_declaration): Likewise.
957 (cp_parser_make_typename_type): New function. Handle errors through
958 cp_parser_diagnose_invalid_typename.
959 (cp_parser_elaborated_type_specifier): Use it.
961 2004-02-04 Mark Mitchell <mark@codesourcery.com>
964 * call.c (convert_like_real): Use "converting" rather than
965 "argument" as the descriptive keyword to
966 dubious_conversion_warnings.
967 * typeck.c (convert_for_assignment): Do not call
968 dubious_conversion_warnings.
970 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
973 * init.c (build_delete): Emit a more informative error message in
974 case of an incomplete type, and on the correct source line.
976 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
978 * error.c, search.c: Update copyright.
980 2004-02-04 Mark Mitchell <mark@codesourcery.com>
983 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
984 linkage for the typeinfo name string.
986 2004-02-04 Mark Mitchell <mark@codesourcery.com>
989 * cp-tree.h (fold_non_dependent_expr): New function.
990 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
991 (cp_parser_template_argument): Use fold_non_dependent_expr.
992 (cp_parser_direct_declarator): Likewise.
993 * pt.c (fold_non_dependent_expr): New function.
994 (convert_nontype_argument): Use it.
995 (tsubst_qualified_id): Simplify.
996 (tsubst_copy_and_build): Likewise.
998 2004-02-04 Mark Mitchell <mark@codesourcery.com>
1000 * decl.c (cxx_push_function_context): Do not set
1001 current_function_is_thunk.
1002 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
1005 2003-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1008 * pt.c (more_specialized_class): Increase processing_template_decl
1009 while partial ordering.
1011 2004-02-03 Mark Mitchell <mark@codesourcery.com>
1014 * decl.c (start_function): Do not call pushdecl for any
1015 instantiation or specialization of a primary template.
1017 2004-02-03 Mark Mitchell <mark@codesourcery.com>
1020 * parser.c (cp_parser_class_name): Robustify.
1023 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
1026 * semantics.c (finish_id_expression): Do not return an
1027 IDENTIFIER_NODE when lookup finds a PARM_DECL.
1029 2004-02-03 Mark Mitchell <mark@codesourcery.com>
1032 * pt.c (build_non_dependent_expr): Do not build
1033 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
1036 * semantics.c (finish_id_expression): Do not return an
1037 IDENTIFIER_NODE when lookup finds a VAR_DECL.
1040 * parser.c (cp_parser_simple_declaration): When skipping to the
1041 end of the statement swallow the terminating semicolon.
1043 2004-02-02 Mark Mitchell <mark@codesourcery.com>
1046 * init.c (build_offset_ref): Improve error recovery for invalid
1047 uses of non-static member functions.
1050 * cp-tree.h (cp_build_type_attribute_variant): New function.
1051 * class.c (build_clone): Use cp_build_type_attribute_variant.
1052 * decl.c (duplicate_decls): Likewise.
1053 * pt.c (copy_default_args_to_explicit_spec): Likewise.
1054 (tsubst_function_type): Likewise.
1055 * tree.c (build_exception_variant): Check attributes before
1056 concluding that two types are the same.
1057 (cp_build_type-attribute_variant): New method.
1058 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
1061 * call.c (convert_class_to_reference): Keep better track of
1062 pedantically invalid user-defined conversions.
1064 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1067 * pt.c (tsubst_qualified_id): Improved error message when a type
1068 is expected but not found.
1070 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
1072 * class.c: Fix comment typos.
1074 * error.c: Likewise.
1075 * parser.c: Likewise.
1077 * search.c: Likewise.
1078 * typeck.c: Likewise.
1080 2004-01-30 Richard Henderson <rth@redhat.com>
1083 * method.c (use_thunk): Don't force_target_expr for void thunks.
1084 * tree.c (build_target_expr_with_type): Assert non-void type.
1085 (force_target_expr): Likewise.
1087 2004-01-30 Michael Matz <matz@suse.de>
1089 * parser.c (cp_parser_labeled_statement): Accept case ranges.
1091 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1095 * decl.c (grokdeclarator): Check immediatly type completeness for
1096 non-dependent types.
1098 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1101 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
1102 a sizeof expression.block
1104 2004-01-29 Mark Mitchell <mark@codesourcery.com>
1107 * mangle.c (write_encoding): Correct encoding of member template
1110 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1112 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
1113 template name as it was `<::' (digraph typo).
1114 (cp_parser_nth_token_starts_template_argument_list_p): New function.
1115 (cp_parser_id_expression): Use it.
1116 (cp_parser_nested_name_specifier_opt): Likewise.
1117 (cp_parser_template_name): Likewise.
1118 (cp_parser_class_name): Likewise.
1119 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
1121 2004-01-28 Mark Mitchell <mark@codesourcery.com>
1124 * typeck.c (merge_types): Do not merge attributes into
1128 * parser.c (cp_parser_direct_declarator): Do not prevent
1129 backtracking inside a parenthesized declarator.
1130 (cp_parser_parameter_declaration): Fix typo in comment.
1132 2004-01-28 Jan Hubicka <jh@suse.cz>
1134 * semantics.c (expand_body) Do emit_associated_thunks before
1137 2004-01-27 Devang Patel <dpatel@apple.com>
1139 * name-lookup.c: Include "debug.h"
1140 (do_namespace_alias): Invoke debug_hooks to emit debug info
1141 for namespace alias.
1142 (do_local_using_decl): Invoke debug_hooks to emit debug info
1144 (do_class_using_decl): Same.
1145 (do_toplevel_using_decl): Same.
1146 (do_using_directive): Same.
1147 (cp_emit_debug_info_for_using): New function.
1148 * Make-lang.in (cp/parser.o): Depend on debug.h
1149 (cp/name-lookup.o): Same.
1151 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1153 * cp-tree.h (language_function, lang_type_header): Use
1155 * name-lookup.h (cp_binding_level): Likewise.
1157 2004-01-26 Mark Mitchell <mark@codesourcery.com>
1160 * semantics.c (finish_for_expr): Check for unresolved overloaded
1163 * class.c (add_method): Just check processing_template_decl to
1164 determine whether or not we are within a template.
1165 * decl2.c (maybe_retrofit_in_chrg): Likewise.
1166 * init.c (decl_constant_value): Check the type of the declaration,
1168 * name-lookup.c (maybe_push_to_top_level): Rename to ...
1169 (push_to_top_level): ... this.
1170 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
1171 * pt.c (push_template_decl_real): Reorder condition for speed.
1172 (convert_template_argument): Use dependency-checking functions in
1173 place of uses_template_parms.
1174 (lookup_template_class): Avoid calling uses_template_parms more
1176 (uses_template_parms): Reimplement, using dependency-checking
1178 (instantiate_class_template): Use push_to_top_level, not
1179 maybe_push_to_top_level.
1180 (type_unification_real): Simplify.
1181 (type_dependent_expression_p): Handle OFFSET_REFs and
1183 (any_dependent_template_arguments_p): Handle multiple levels of
1185 * semantics.c (expand_or_defer_fn): Do not check
1186 uses_template_parms for template instantiations.
1187 * typeck.c (comptypes): Avoid calling cp_type_quals.
1189 2004-01-25 Mark Mitchell <mark@codesourcery.com>
1192 * call.c (build_over_call): Do not convert arguments when
1193 processing a template.
1194 * pt.c (build_non_dependent_expr): Do not build a
1195 NON_DEPENDENT_EXPR for arithmetic constants.
1197 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1200 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
1201 returns a TYPE_DECL. no further lookup is required.
1202 * semantics.c (check_template_template_default_arg): A TYPE_DECL
1203 is invalid. Rework to give better diagnostics.
1205 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1208 * pt.c (instantiate_class_template): Add an error_mark_node
1210 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
1212 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
1215 * decl.c (finish_function): Move the call to
1216 finish_fname_decls below the call to
1217 finish_eh_spec_block.
1219 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
1221 * optimize.c, typeck2.c: Update copyright.
1223 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
1225 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
1226 init.c, mangle.c, typeck.c: Update copyright.
1228 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
1230 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
1232 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
1234 * Make-lang.in: Replace $(docdir) with doc.
1235 (c++.info, c++.srcinfo): Dummy entry.
1236 (c++.man, c++.srcman): New rules.
1237 (c++.install-man): Revamp rule.
1239 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
1241 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
1242 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
1243 immediate $(shell) instead of deferred backquote.
1245 2004-01-19 Mark Mitchell <mark@codesourcery.com>
1248 * parser.c (cp_parser_postfix_expression): When encountering
1249 incomplete type on left-hand side of "->" or ".", treat the entire
1250 expression as erroneous.
1253 * call.c (build_field_call): Remove.
1254 (n_build_method_call): Likewise.
1255 (build_method_call): Likewise.
1256 (build_new_method_call): Do not call build_field_call.
1257 * class.c (n_build_method_call): Remove.
1258 (print_class_statistics): Do not print it.
1259 * cp-tree.h (build_method_call): Remove declaration.
1260 (finish_object_call_expr): Likewise.
1261 (build_new_1): Do not use build_method_call.
1262 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
1263 when the function appearing on the right-hand-side of "." or "->"
1264 is not actually a function.
1265 * pt.c (tsubst_copy_and_build): Likewise.
1266 * semantics.c (finish_object_call_expr): Remove.
1268 2004-01-18 Mark Mitchell <mark@codesourcery.com>
1271 * pt.c (tsubst): Use finish_typeof.
1273 2004-01-18 Jason Merrill <jason@redhat.com>
1276 * except.c (build_throw): In a template, set
1277 current_function_returns_abnormally.
1279 2004-01-17 Fred Fish <fnf@intrinsity.com>
1282 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
1283 except don't call array_type_nelts() with a VECTOR_TYPE.
1285 2004-01-16 Jan Hubicka <jh@suse.cz>
1287 * mangle.c (write_mangled_name): Remove inline modifier.
1289 2004-01-16 Mark Mitchell <mark@codesourcery.com>
1292 * decl.c (compute_array_index_type): Fix grammar in comment.
1293 * init.c (build_zero_init): Handle zero-sized arrays correctly.
1296 * call.c (name_as_c_string): Print conversion operator names
1300 * call.c (initialize_reference): Pass -1 for inner parameter to
1303 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1306 * parser.c (cp_parser_base_specifier): Check for an invalid
1307 keyword `typename' and emit an user-friendly error message.
1309 2004-01-15 Geoffrey Keating <geoffk@apple.com>
1312 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
1313 (handle_pragma_implementation): Likewise.
1315 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1318 * typeck.c (build_class_member_access_expr): Allow to access members
1319 of the currently open class.
1320 (finish_class_member_access_expr): Likewise.
1322 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
1325 * name-lookup.c (validate_nonmember_using_decl): Take scope and
1326 name by value, instead of computing them.
1327 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
1328 arguments. Pass them to validate_nonmember_using_decl.
1329 * name-lookup.h (do_local_using_decl): Adjust.
1330 (do_toplevel_using_decl): Likewise.
1331 * parser.c (cp_parser_using_declaration): Likewise.
1332 * pt.c (tsubst_expr): Likewise.
1334 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
1338 * name-lookup.c (qualified_lookup_using_namespace): Search
1339 strongly-associated namespaces first, and only then try other
1342 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
1344 * Make-lang.in (c++.srcextra): Dummy entry.
1346 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1349 * parser.c (cp_parser_template_name): Don't try to parse a
1350 conversion-function-id, as it cannot be a template-name.
1351 (cp_parser_simple_type_specifier): Check for invalid template-ids
1352 even after a built-in type.
1354 2004-01-14 Jan Hubicka <jh@suse.cz>
1357 * pt.c (instantiate_decl): Do not increase function_depth.
1359 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
1363 * parser.c (cp_parser_elaborated_type_specifier): Warn about
1364 attributes and discard.
1365 * decl.c (xref_tag): Don't overwite existing attributes with
1368 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1371 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
1372 is no destructor while looking up a BIT_NOT_EXPR.
1374 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
1376 * cxxfilt.c: Remove unused file.
1378 2004-01-14 Jan Hubicka <jh@suse.cz>
1380 Partial fix to PR c++/12850
1381 * decl2.c (mark_used): Do not proactively instantiate templates
1382 when compiling in unit-at-a-time or not optimizing.
1383 * optimize.c (maybe_clone_body): Do not increase function depth.
1385 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1388 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
1390 2003-01-12 Steven Bosscher <stevenb@suse.de>
1393 * parser.c (cp_parser_member_declaration): Any non-type is also
1394 not a class or a function.
1396 2004-01-12 Jason Merrill <jason@redhat.com>
1399 * class.c (build_base_path): Do not mark vtable references as
1401 (build_vtbl_ref_1): Likewise.
1403 2004-01-12 Richard Henderson <rth@redhat.com>
1406 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
1407 (store_init_value): Use it.
1408 * decl.c (check_initializer): Expect full initialization code
1409 from store_init_value.
1410 * init.c (expand_aggr_init_1): Likewise.
1411 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
1413 2004-01-12 Mark Mitchell <mark@codesourcery.com>
1415 * class.c (layout_class_type): For non-POD class types, also copy
1416 the DECL_SIZE and DECL_MODE of fields to the base class type.
1418 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1421 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
1422 calling regenerate_decl_from_template.
1424 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
1427 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
1428 decl-specifier occurring along with a class definition.
1430 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
1432 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
1433 clauses to comments describing declares_class_or_enum.
1434 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
1437 2004-01-12 Jan Hubicka <jh@suse.cz>
1439 * pt.c (for_each_template_parm): Do not check for duplicates.
1440 (for_each_template_parm): Use walk_tree duplicate checking code.
1442 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
1445 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
1446 is error_mark_node, don't add any more decl_specs.
1447 (cp_parser_init_declarator): After committing to a declaration, if
1448 the decl_specifiers start with error_mark_node, issue an error and
1449 change the type to "int".
1451 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
1454 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
1456 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1460 * pt.c (tsubst): Substitution must fail if we are attempting to
1461 create an array with element type that is an abstract class type.
1462 * decl.c (cp_finish_decl): Strip pointers and array types recursively
1463 before calling abstract_virtuals_error.
1465 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
1467 * name-lookup.c (qualified_lookup_using_namespace): Consider
1468 strong using directives even if we've already found a binding.
1470 2004-01-09 Mark Mitchell <mark@codesourcery.com>
1472 * cp-tree.h (cxx_expand_expr): Change prototype.
1473 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
1475 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1478 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
1479 looking into them recursively. They can be there because of the
1480 new __offsetof__ extension.
1482 2004-01-07 Zack Weinberg <zack@codesourcery.com>
1484 * parser.c (cp_parser_save_member_function_body): Mark the
1487 2004-01-05 Mark Mitchell <mark@codesourcery.com>
1490 * class.c (build_clone): Copy type attributes from the original
1491 function to the clone.
1494 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
1495 references as constant.
1498 * parser.c (cp_parser_explicit_instantiation): Improve error
1500 (cp_parser_require): Improve indication of the error location.
1503 * parser.c (cp_parser_class_head): Reorder logic to check for
1504 invalid qualification.
1506 2004-01-04 Mark Mitchell <mark@codesourcery.com>
1509 * name-lookup.c (lookup_using_namespace): Remove spacesp
1511 (unqualified_namespace_lookup): Likewise.
1512 (lookup_qualified_name): Adjust accordingly.
1513 (lookup_name_real): Likewise.
1514 (lookup_arg_dependent): Do not eliminate the namespace of the
1515 functions found by unqualified name lookup unless that is the
1518 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
1520 * semantics.c (push_deferring_access_checks): Fix format.
1521 (resume_deferring_access_checks): Likewise.
1522 (stop_deferring_access_checks): Likewise.
1523 (pop_deferring_access_checks): Likewise.
1524 (get_deferred_access_checks): Likewise.
1525 (pop_to_parent_deferring_access_checks): Likewise.
1526 (perform_deferred_access_checks): Likewise.
1527 (perform_or_defer_access_check): Likewise.
1529 2004-01-04 Richard Henderson <rth@redhat.com>
1531 * call.c (build_over_call): Don't create a save_expr of an
1532 aggregate, but rather its address.
1534 2004-01-04 Mark Mitchell <mark@codesourcery.com>
1537 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
1538 an offsetof expression.
1540 * parser.c (cp_parser_parameter_declaration): Fix comment.
1543 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
1544 (reference_binding): Set it when appropriate.
1545 (build_temp): New function, split out from ...
1546 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
1547 (initialize_reference): Likewise.
1550 * parser.c (cp_parser): Add in_type_id_in_expr_p.
1551 (cp_parser_new): Initialize it.
1552 (cp_parser_postfix_expression): Set it.
1553 (cp_parser_sizeof_operand): Likewise.
1554 (cp_parser_parameteR_declaration): Do not commit early to tenative
1555 parsers when in_type_id_in_expr_p is set.
1557 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1560 * parser.c (cp_parser_template_argument): Don't call
1561 make_unbound_class_template directly.
1562 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
1563 UNBOUND_CLASS_TEMPLATE tree node.
1565 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
1568 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
1570 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1573 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
1574 (DECL_FUNCTION_TEMPLATE_P): Use it.
1575 (DECL_CLASS_TEMPLATE_P): Likewise.
1576 * parser.c (cp_parser_lookup_name): Add is_template parameter.
1577 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
1578 (cp_parser_template_name): Likewise.
1579 (cp_parser_elaborated_type_specifier): Likewise.
1580 (cp_parser_namespace_name): Likewise.
1581 (cp_parser_class_name): Likewise.
1582 (cp_parser_lookup_name_simple): Likewise.
1584 See ChangeLog.3 for earlier changes.