1 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
3 * error.c (dump_expr): Handle COMPLEX_CST.
4 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
5 (pp_cxx_expression): Likewise.
7 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
9 * decl.c (GNU_INLINE_P): New.
10 (duplicate_decls): Handle gnu_inline. Merge attributes and
11 some flags in overriding definitions.
12 (redeclaration_error_message): Handle gnu_inline.
13 (start_preparsed_function): Likewise.
15 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17 * call.c (sufficient_parms_p): Constify.
18 * class.c (same_signature_p): Likewise.
19 * cp-gimplify.c (is_invisiref_parm,
20 cxx_omp_privatize_by_reference): Likewise.
21 * cp-objcp-common.c (has_c_linkage): Likewise.
22 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
23 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
24 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
25 num_artificial_parms_for, comp_template_parms,
26 template_parameter_pack_p, any_dependent_template_arguments_p,
27 any_type_dependent_arguments_p, any_value_dependent_elements_p,
28 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
29 zero_init_p, member_p, cp_lvalue_kind,
30 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
31 varargs_function_p, is_dummy_object, special_function_kind,
32 string_conv_p, type_unknown_p, comp_except_specs, compparms,
33 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
34 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
35 cp_has_mutable_p, at_least_as_qualified_p,
36 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
37 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
38 * except.c (nothrow_libfn_p): Likewise.
39 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
41 * pt.c (comp_template_parms, template_parameter_pack_p,
42 any_type_dependent_arguments_p, any_value_dependent_elements_p,
43 any_dependent_template_arguments_p): Likewise.
44 * repo.c (repo_export_class_p): Likewise.
45 * semantics.c (anon_aggr_type_p): Likewise.
46 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
47 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
48 varargs_function_p, member_p, is_dummy_object, pod_type_p,
49 zero_init_p, special_function_p): Likewise.
50 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
51 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
52 compparms, invalid_nonstatic_memfn_p,
53 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
54 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
55 cp_has_mutable_p, lvalue_or_else): Likewise.
57 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
59 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
60 * cp-objcp-common.c (cp_tree_size): Ditto.
61 * tree.c (cp_walk_subtrees): Ditto
62 * cp-tree.def (TINST_LEVEL): Go away.
63 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
64 move together with other non-tree structs.
65 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
66 (union lang_tree_node): Eliminate tinst_level field.
67 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
68 (current_instantiation, outermost_tinst_level): Return
69 a "struct tinst_level *".
71 * error.c (print_instantiation_partial_context): Change second
72 parameter to a "struct tinst_level *". Replace accessor macros
74 (print_instantiation_full_context): Likewise.
75 * lex.c (in_main_input_context): Likewise.
77 * pt.c (struct pending_templates): New.
78 (pending_templates, last_pending_template): Use it as a type.
79 (current_tinst_level): Change typo to "struct tinst_level *"
80 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
81 (add_pending_template): Construct a "struct pending_template".
82 Replace TINST_LEVEL accessor macros with field access.
83 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
84 (pop_tinst_level): Likewise.
85 (instantiate_pending_templates): Likewise. Factor common code used
86 when an instantiation has been done.
87 (outermost_tinst_level): Replace tree_last with loop.
88 (current_instantiation): Return a "struct tinst_level *".
90 2007-08-24 Ollie Wild <aaw@google.com>
92 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
93 * name-lookup.h (cp_binding_level): Remove vtables member.
95 2007-08-24 Richard Guenther <rguenther@suse.de>
97 * tree.c (cp_cannot_inline_tree_fn): Remove.
98 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
99 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
102 2007-08-24 Jakub Jelinek <jakub@redhat.com>
105 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
106 error_mark_node right away if build_expr_type_conversion
110 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
111 is error_mark_node rather than NULL_TREE.
112 * pt.c (check_explicit_specialization): Likewise.
115 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
116 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
118 2007-08-22 Jason Merrill <jason@redhat.com>
121 * pt.c (outermost_tinst_level): New function.
122 * lex.c (in_main_input_context): New function.
123 * cp-tree.h: Declare it.
124 * decl2.c (constrain_class_visibility): Use it to avoid warning
125 about uses of the anonymous namespace in the main input file.
127 2007-08-21 Jakub Jelinek <jakub@redhat.com>
129 * init.c (build_new_1): Use get_target_expr instead of save_expr.
131 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
134 * class.c (finish_struct_1): Warn when a class has virtual
135 functions and accessible non-virtual destructor.
137 2007-08-20 Richard Guenther <rguenther@suse.de>
141 * call.c (build_new_method_call): Convert initializer to
143 * init.c (build_aggr_init): Do not fiddle with types.
144 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
145 * except.c (build_throw): Do not drop qualifiers for the
147 * typeck.c (get_member_function_from_ptrfunc): Do not
148 fiddle with types, instead convert.
149 (build_ptrmemfunc1): Convert to the target type for
151 (gfc_trans_allocate): Convert result to target type.
152 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
153 pointer-to-member structures shall have alias set zero as well.
155 2007-08-20 Richard Guenther <rguenther@suse.de>
157 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
159 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
160 (nonstatic_local_decl_p): Likewise.
161 * tree.c (cp_auto_var_in_fn_p): Remove.
162 * decl.c (nonstatic_local_decl_p): Remove.
164 2007-08-20 Richard Guenther <rguenther@suse.de>
166 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
168 * tree.h (cp_walk_tree): New define to walk_tree_1 with
169 cp_walk_subtrees lh parameter.
170 (cp_walk_tree_without_duplicates): New define to
171 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
172 * tree.c (count_trees): Call
173 cp_walk_tree_without_duplicates.
174 (verify_stmt_tree): Call cp_walk_tree.
175 (break_out_target_exprs): Likewise.
176 (WALK_SUBTREE): Likewise.
177 * cp-gimplify.c (cp_genericize): Likewise.
178 * cp-pt.c (find_parameter_packs_r): Likewise.
179 (uses_parameter_packs): Likewise.
180 (make_pack_expansion): Likewise.
181 (check_for_bare_parameter_packs): Likewise.
182 (for_each_template_parm): Likewise.
183 * decl.c (check_default_argument): Call
184 cp_walk_tree_without_duplicates.
185 * except.c (build_throw): Likewise.
186 * decl2.c (type_visibility): Likewise.
187 * semantics.c (expand_or_defer_fn): Likewise.
188 (finalize_nrv): Call cp_walk_tree.
190 2007-08-20 Jakub Jelinek <jakub@redhat.com>
193 * init.c (build_new_1): Rename placement_var variable to placement_expr.
194 Initialize it with save_expr rather than get_temp_regvar.
196 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
199 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
202 2007-08-17 Ollie Wild <aaw@google.com>
205 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
206 declarations into appropriate slots for comparison. Fix type
209 2007-08-17 Paolo Carlini <pcarlini@suse.de>
212 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
213 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
215 2007-08-17 Paolo Carlini <pcarlini@suse.de>
218 * parser.c (cp_parser_class_head): Improve error message.
220 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
222 * pt.c (instantiate_decl): Set input_location
223 for the function end.
225 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
227 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
229 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
230 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
231 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
232 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
233 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
234 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
235 * typeck.c (cp_type_quals): Likewise.
236 * typeck2.c (cxx_incomplete_type_diagnostic,
237 cxx_incomplete_type_error): Likewise.
239 2007-08-16 Paolo Carlini <pcarlini@suse.de>
242 * pt.c (tsubst_friend_function): When check_classfn
243 returns error_mark_node likewise return it.
245 2007-08-15 Jakub Jelinek <jakub@redhat.com>
248 * typeck.c (check_return_expr): Don't NRV optimize vars in
250 * decl.c (finish_function): Comment fix.
252 2007-08-15 Paolo Carlini <pcarlini@suse.de>
255 * pt.c (push_template_decl_real): Depending on TYPE_P
256 use either TYPE_CONTEXT or DECL_CONTEXT.
258 2007-08-14 Mark Mitchell <mark@codesourcery.com>
260 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
261 constructors and destructors return this.
263 2007-08-14 Paolo Carlini <pcarlini@suse.de>
266 * decl2.c (check_classfn): Return error_mark_node in case of error;
267 in that case, do not call add_method.
268 * decl.c (start_decl): Deal with check_classfn returning
270 (grokfndecl): Likewise.
271 * pt.c (tsubst_friend_function): Likewise.
273 2007-08-14 Andrew Pinski <pinskia@gmail.com>
276 * typeck.c (build_binary_op): Disallow vector float types with
277 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
279 2007-08-11 Ian Lance Taylor <iant@google.com>
281 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
283 * cp/cp-tree.h (cxx_get_alias_set): Update declaration.
285 2007-08-10 Ollie Wild <aaw@google.com>
287 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
289 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
291 (unqualified_namespace_lookup): Fix ambiguous_decl call.
292 (lookup_using_namespace): Fix ambiguous_decl call.
293 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
295 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
297 * call.c (name_as_c_string): Use CONST_CAST.
298 * decl.c (build_decl): Likewise.
299 * parser.c (cp_parser_string_literal): Likewise.
301 2007-08-10 Paolo Carlini <pcarlini@suse.de>
304 * error.c (dump_expr): Consistently use the *_cxx_*
305 variants of the pretty-print functions.
307 2007-08-10 Paolo Carlini <pcarlini@suse.de>
310 * decl.c (check_special_function_return_type): Just error
311 on return type specified for conversion operator.
313 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
315 * typeck2.c (readonly_error): Handle general expressions.
316 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
318 2007-08-06 Dan Hipschman <dsh@google.com>
320 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
321 access function name.
323 2007-08-04 Alfred Minarik <a.minarik@aon.at>
326 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
327 * g++spec.c (lang_specific_driver): Check them.
329 2007-08-06 Paolo Carlini <pcarlini@suse.de>
332 * pt.c (template_class_depth): Fix comment; change return type
335 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
338 2007-03-26 Dirk Mueller <dmueller@suse.de>
340 * parser.c (cp_parser_member_declaration): Pedwarn
341 about stray semicolons after member declarations.
343 2007-08-02 Lee Millward <lee.millward@gmail.com>
348 * parser.c (cp_parser_asm_definition): Detect and discard asm
349 statements with invalid inputs or outputs.
350 (cp_parser_asm_operand_list): Return error mark node if any
351 of the operands are invalid. Adjust documentation.
353 2007-08-02 Nick Clifton <nickc@redhat.com>
355 * typeck.c: Change copyright header to refer to version 3 of the
356 GNU General Public License and to point readers at the COPYING3
357 file and the FSF's license web page.
358 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
359 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
360 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
361 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
362 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
363 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
364 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
365 name-lookup.h, parser.c: Likewise.
367 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
370 * call.c (magic_varargs_p): Honor the "type generic" attribute.
372 2007-07-30 Paolo Carlini <pcarlini@suse.de>
375 * semantics.c (finish_label_stmt): Reject the __label__
376 extension outside function scopes.
378 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
380 * parser.c (eof_token): Un-constify.
381 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
382 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
385 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
387 * pt.c, tree.c, typeck2.c: Fix comment typos.
389 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
390 Mark Mitchell <mark@codesourcery.com>
393 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
394 hidden due to friend declarations in local classes.
396 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
398 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
399 * cp-tree.def (DECLTYPE_TYPE): New.
400 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
401 (dump_type_prefix): Ditto.
402 (dump_type_suffix): Ditto.
403 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
404 * mangle.c (write_type): Handle DECLTYPE_TYPE.
405 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
407 (DECLTYPE_TYPE_EXPR): New.
408 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
409 (finish_declared_type): Declare.
410 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
412 (pp_cxx_type_id): Ditto.
413 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
414 (tsubst): Substitute into a DECLTYPE_TYPE node.
415 (tsubst_copy): Ditto.
416 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
418 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
419 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
420 structural equality (because we can't hash the expressions).
421 (finish_declared_type): New.
422 * lex.c (reswords): Add "decltype" keyword.
423 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
424 (cp_parser_postfix_expression): Add member_access_only_p to
425 restrict postfix expression to member access expressions.
426 (cp_parser_unary_expression): Update call to
427 cp_parser_postfix_expression to reflect new parameter.
428 (cp_parser_declared_type): New.
429 (cp_parser_simple_type_specifier): Parse decltype types.
431 2007-07-27 Mark Mitchell <mark@codesourcery.com>
434 * call.c (convert_for_arg_passing): Only widen bitfields to their
435 declared types if necessary.
437 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
439 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
442 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
444 * decl.c (typename_hash, typename_compare): Constify.
445 * mangle.c (hash_type, compare_type): Likewise.
446 * pt.c (eq_local_specializations, hash_local_specialization):
448 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
449 list_hash): Likewise.
450 * typeck2.c (pat_compare): Likewise.
452 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
454 * method.c (implicitly_declare_fn): Increase alignment if member
455 function pointer format requires it.
457 2007-07-24 Paolo Carlini <pcarlini@suse.de>
460 * typeck.c (check_return_expr): Do not pass a null argument
463 2007-07-24 Paolo Carlini <pcarlini@suse.de>
466 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
469 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
472 * typeck.c (convert_arguments): Only use default args if we have
476 * typeck.c (structural_comptypes): No need to check
477 resolve_typename_type return value here.
478 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
479 * pt.c (resolve_typename_type): Follow typename typedefs. Return
480 original type rather than error_mark_node in case of failure.
481 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
482 resolve_typename_type result check.
483 (cp_parser_direct_declarator, cp_parser_head,
484 cp_parser_constructor_declarator_p): Likewise.
486 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
488 * pt.c (template_parms_variadic_p): Remove.
489 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
491 2007-07-12 Jakub Jelinek <jakub@redhat.com>
494 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
495 argument to dump_aggr_init_expr_args instead of false.
497 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
499 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
500 canonical types; otherwise, fall back to structural type
501 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
502 internal compiler error if the canonical types are wrong.
504 2007-07-11 Paolo Carlini <pcarlini@suse.de>
507 * parser.c (cp_parser_make_indirect_declarator): When the
508 the code argument is ERROR_MARK return cp_error_declarator.
510 2007-07-09 Geoffrey Keating <geoffk@apple.com>
513 * decl.c (cxx_init_decl_processing): Don't set
514 force_align_functions_log.
515 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
516 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
517 FUNCTION_DECL, return its alignment.
519 2007-07-09 Richard Guenther <rguenther@suse.de>
521 * decl.c (start_preparsed_function): Do not promote return type.
523 2007-07-08 Paolo Carlini <pcarlini@suse.de>
526 * pt.c (unify): Never pass error_mark_node to template_decl_level.
528 2007-07-07 Mark Mitchell <mark@codesourcery.com>
531 * pt.c (resolve_overloaded_unification): Robustify. Return a
533 (type_unification_real): Adjust accordingly.
535 2007-07-06 Richard Guenther <rguenther@suse.de>
537 * init.c (build_new_1): Use the correct pointer type.
538 * typeck2.c (build_m_component_ref): Likewise.
540 2007-07-05 Mark Mitchell <mark@codesourcery.com>
543 * init.c (build_zero_init): Always build an initializer for
545 * typeck2.c (build_functional_cast): Use build_zero_init.
548 * init.c (build_new_1): Always pass the allocation function to
549 build_op_delete_call.
550 * call.c (build_op_delete_call): Handle operator delete with a
551 variable-argument list. Do not issue an error when no matching
552 deallocation function is available for a new operator.
555 * cp-tree.h (any_value_dependent_elements_p): Declare it.
556 * decl.c (value_dependent_init_p): New function.
557 (cp_finish_decl): Use it.
558 * pt.c (value_dependent_expression_p): Use
559 any_value_dependent_elements_p.
560 * parser.c (cp_parser_primary_expression): Add comment about
561 treating dependent qualified names as integral
562 constant-expressions.
564 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
566 * decl.c (build_ptrmemfunc_type): Always use structural equality
567 tests when comparing pointer-to-member-function types, because the
568 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
571 2007-07-03 Mark Mitchell <mark@codesourcery.com>
573 * init.c (build_new): Tweak comment.
575 2007-06-29 Dave Brolley <brolley@redhat.com>
578 * parser.c (cp_parser_new_type_id): Don't reduce a named array
579 type to its base type and number of elements here.
580 * init.c (build_new): Call complete_type_or_else to ensure that the
581 type is complete and to issue a diagnostic if it is not.
582 (build_new_1): Don't call complete_type_or_else here.
584 2007-07-03 Richard Guenther <rguenther@suse.de>
587 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
590 2007-07-02 Simon Baldwin <simonb@google.com>
592 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
593 for inner-style nested forward declarations that don't declare
596 2007-07-02 Jakub Jelinek <jakub@redhat.com>
599 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
600 DECL_P in not a variable and appears more than once error messages.
602 2007-07-01 Ollie Wild <aaw@google.com>
604 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
605 (select_decl): Remove function.
606 (unqualified_namespace_lookup): Populate binding by calling
607 ambiguous_decl. Remove select_decl call.
608 (lookup_qualified_name): Remove select_decl call.
609 * decl.c (lookup_and_check_tag): Check for ambiguous references.
610 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
611 generation when name lookup is ambiguous.
613 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
616 * init.c (build_new_1): Use structural equality on the copy of the
619 2007-06-28 Geoffrey Keating <geoffk@apple.com>
621 * decl2.c (determine_visibility): Implement
622 flag_visibility_ms_compat effect on type info.
623 * decl.c (cxx_init_decl_processing): Implement
624 global effect of flag_visibility_ms_compat.
626 2007-06-28 Geoffrey Keating <geoffk@apple.com>
628 * decl2.c (start_objects): Mark constructor-running function
631 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
634 * decl.c (grokdeclarator): Reset friendp for member functions declared
635 friend of their own class.
637 2007-06-23 Mark Mitchell <mark@codesourcery.com>
639 * decl2.c (determine_visibility): Don't look for dllexport here.
640 (determine_visibility_from_class): Tidy.
642 2007-06-18 Simon Baldwin <simonb@google.com>
645 * parser.c (cp_parser_single_declaration): Added check for storage
646 class other than sc_none in parsed declaration, and a flag to indicate
647 if the call is part of an explicit template specialization parse.
648 * (cp_parser_explicit_specialization): Specialization check flag added
649 to call to cp_parser_single_declaration(), set true.
650 * (cp_parser_template_declaration_after_export): Specialization check
651 flag added to call to cp_parser_single_declaration(), set false.
652 * pt.c (check_explicit_specialization): Added code to copy visiblity
653 and linkage from the templated function to the explicit specialization.
655 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
657 * typeck.c (build_binary_op): For templates build the
658 expression in pieces to avoid the assert in build2_stat.
659 (get_member_function_from_ptrfunc):
660 Change over to using POINTER_PLUS_EXPR and convert
661 the second operand to sizetype.
662 * typeck2.c (build_m_component_ref): Likewise.
663 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
664 instead of PLUS_EXPR for pointers.
665 (build_new_1): Likewise.
666 (build_vec_delete_1): Likewise.
667 (build_vec_delete): Likewise.
668 * class.c (build_base_path): Likewise.
669 (build_base_path): Likewise.
670 (convert_to_base_statically): Likewise.
671 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
672 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
673 instead of PLUS_EXPR.
674 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
675 instead of PLUS_EXPR for pointers.
676 * call.c (build_special_member_call): Likewise.
677 * rtti.c (build_headof): Likewise.
678 Use sizetype instead of ptrdiff_type_node.
679 (tinfo_base_init): Create a POINTER_PLUS_EXPR
680 instead of PLUS_EXPR for pointers.
681 * except.c (expand_start_catch_block): Do a
682 NEGATIVE and then a POINTER_PLUS_EXPR instead
684 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
685 PLUS_EXPR on pointer types over to use
686 POINTER_PLUS_EXPR and remove the conversion
687 to the pointer types.
688 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
689 adding to a pointer type. Use size_int instead of
690 ssize_int. Convert the index to sizetype before
691 adding it to the pointer.
693 2007-06-15 Mark Mitchell <mark@codesourcery.com>
695 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
696 (DECL_ANON_UNION_VAR_P): New macro.
697 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
698 than DECL_VAR_MARKED_P, to keep track of which variables we have
700 * decl.c (redeclaration_error_message): Complain about redeclaring
701 anonymous union members at namespace scope.
702 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
704 2007-06-14 Geoff Keating <geoffk@apple.com>
706 * decl2.c (determine_visibility): Ensure that functions with
707 hidden types as parameters are hidden.
710 * decl2.c (determine_visibility): Remove duplicate code for
713 2007-06-12 Ian Lance Taylor <iant@google.com>
716 * init.c (avoid_placement_new_aliasing): New static function.
717 (build_new_1): Call it.
719 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
721 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
722 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
724 2007-06-08 Jakub Jelinek <jakub@redhat.com>
727 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
728 on init, the non-decl cond operand and increment value.
730 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
733 * decl.c (check_initializer): Report an error when a brace enclosed
734 initializer is used for a non-aggregate type in C++98.
735 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
737 (grokdeclarator): Likewise.
738 (move_fn_p): Likewise.
739 * typeck.c (check_return_expr): Likewise.
740 * call.c (reference_binding): Likewise.
741 * error.c (cp_cpp_error): Likewise.
742 * pt.c (check_default_tmpl_args): Likewise.
744 * lex.c (init_reswords): Likewise.
745 * parser.c (p_parser_primary_expression): Likewise.
746 (TOKEN_PRECEDENCE): Likewise.
747 (cp_parser_init_declarator): Likewise.
748 (cp_parser_ptr_operator): Likewise.
749 (cp_parser_parameter_declaration): Likewise.
750 (cp_parser_enclosed_template_argument_list): Likewise.
751 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
752 (cp_parser_next_token_ends_template_argument_p): Likewise.
754 2007-06-04 Simon Baldwin <simonb@google.com>
756 * decl.c (grokdeclarator): Readability change. Moved case labels
757 into direct switch statement scope.
759 2007-06-04 Paolo Carlini <pcarlini@suse.de>
761 * call.c (convert_like_real): Remove pointless code.
763 2007-05-31 Mark Mitchell <mark@codesourcery.com>
765 * decl.c (get_atexit_fn_ptr_type): New function.
766 (get_atexit_node): Use it.
767 (start_cleanup_fn): Likewise.
768 (register_dtor_fn): Use the object's destructor, instead of a
769 separate cleanup function, where possible.
770 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
771 (atexit_fn_ptr_type_node): New macro.
772 * decl2.c (build_cleanup): Use build_address.
774 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
776 * typeck.c (build_binary_op): Include types in error.
778 2007-05-31 Jakub Jelinek <jakub@redhat.com>
781 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
782 needs runtime initialization.
784 2007-05-31 Paolo Carlini <pcarlini@suse.de>
787 * semantics.c (finish_trait_expr): Complete the types.
789 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
790 Douglas Gregor <doug.gregor@gmail.com>
791 Pedro Lamarao <pedro.lamarao@mndfck.org>
792 Howard Hinnant <howard.hinnant@gmail.com>
796 * typeck.c (comptypes): Don't consider rvalue and lvalue
797 reference types to be equivalent.
798 (check_return_expr): Move from certain lvalues when returning
800 * decl.c (grokdeclarator): Implement reference collapsing.
801 (copy_fn_p): Don't consider constructors taking rvalue references
802 to be copy constructors.
804 * call.c (conversion): New "rvaluedness_matches_p" member.
805 (convert_class_to_reference): Require reference type as first
806 parameter instead of base type.
807 (reference_binding): Add logic to handle rvalue references.
808 (implicit_conversion): Update inaccurate comment.
809 (convert_like_real): Disable creation of temporaries that are
810 impossible to initialize for types with move constructors.
811 (build_over_call): Elide move constructors when possible.
812 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
813 (maybe_handle_ref_bind): Return conversion instead of type node.
814 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
815 determine preferred conversion sequences.
816 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
817 (LOOKUP_PREFER_RVALUE): New.
818 (DECL_MOVE_CONSTRUCTOR_P): New.
819 (struct cp_declarator): Add "reference" member for reference
820 types, with new "rvalue_ref" flag.
821 (cp_build_reference_type): Declare.
822 (move_fn_p): Declare.
823 * error.c (dump_type_prefix): Format rvalue reference types
824 correctly in error messages.
825 * except.c (build_throw): Move from certain lvalues when
827 * mangle.c (write_type): Mangle rvalue references differently
828 than regular references.
829 * parser.c (make_reference_declarator): Add boolean parameter for
831 (cp_parser_make_indirect_declarator): New.
832 (cp_parser_new_declarator_opt): Call
833 cp_parser_make_indirect_declarator.
834 (cp_parser_conversion_declarator_opt): Ditto.
835 (cp_parser_declarator): Ditto.
836 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
838 * pt.c (tsubst): Implement reference collapsing.
839 (maybe_adjust_types_for_deduction): Implement special template
840 parameter deduction rule for rvalue references.
841 (type_unification_real): Update calls to
842 maybe_adjust_types_for_deduction.
843 (try_one_overload): Ditto.
844 (unify_pack_expansion): Ditto.
845 * tree.c (lvalue_p_1): Handle rvalue reference types.
846 (cp_build_reference_type): New.
848 2007-05-30 Jakub Jelinek <jakub@redhat.com>
851 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
852 variables that need runtime initialization.
854 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
857 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
858 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
859 case POSTDECREMENT_EXPR>): Return the error_mark_node
860 if either the real or imaginary parts would an
863 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
864 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
867 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
868 token is a closing brace, false if there are no tokens left.
869 (cp_parser_namespace_alias_definition): Only consume the next token if
870 it is a closing brace.
872 * parser.c (cp_parser_class_specifier): Likewise.
874 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
876 * semantics.c (finish_member_declaration): Fix a typo in the
879 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
891 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
892 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
893 * pt.c (check_for_bare_parameter_packs): Return bool indicated
894 whether everything was okay. Fix indentation.
895 (push_template_decl_real): Check for bare parameter packs in
896 function parameters; where errors occur, mark the parameter types
897 with ERROR_MARK_NODEs to avert ICEs.
898 (coerce_template_parameter_pack): New.
899 (coerce_template_parms): Moved parameter pack coercion into
900 coerce_template_parameter_pack, and permit it anywhere in the
901 template parameter list (not just at the end). Parameter and
902 argument indices can vary (somewhat) separately now, so add
903 PARM_IDX and ARG_IDX.
904 (fn_type_unification): Don't set an argument pack as incomplete if
905 no argument pack was deduced.
906 (type_unification_real): If a type parameter is a parameter pack
907 and has not otherwise been deduced, it will be deduced to an empty
909 (more_specialized_fn): Use the actual lengths of the argument
910 lists when comparing against expansions.
911 * semantics.c (finish_member_declaration): If a field's type has
912 bare parameter packs, error and set its type to ERROR_MARK_NODE.
914 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
917 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
919 2007-05-22 Ollie Wild <aaw@google.com>
921 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
922 (unqualified_namespace_lookup): Adds check for hidden types.
924 2007-05-22 Ollie Wild <aaw@google.com>
926 * decl.c (duplicate_decls): Verify namespace names are unique.
928 2007-05-21 Mark Mitchell <mark@codesourcery.com>
930 * decl.c (cxx_maybe_build_cleanup): Handle
931 __attribute__((cleanup)).
933 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
935 * cvt.c (cp_convert_and_check): Don't check warnings if the
938 2007-05-18 Geoffrey Keating <geoffk@apple.com>
940 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
942 2007-05-14 Paolo Carlini <pcarlini@suse.de>
945 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
946 type only if is a class type (5.2.8/4).
948 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
950 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
951 * decl.c (grokdeclarator): Use unsigned_type_for instead of
952 c_common_unsigned_type.
954 2007-05-11 Silvius Rus <rus@google.com>
956 * cp/typeck.c (build_indirect_ref): Add call to
957 strict_aliasing_warning.
958 (build_reinterpret_cast_1): Condition call to
959 strict_aliasing_warning.
961 2007-05-11 Jan Hubicka <jh@suse.cz>
963 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
964 * decl2.c (start_objects): ctors and dtors are no longer public.
965 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
967 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
969 * typeck.c (build_unary_op): Remove code that used to
970 handle non lvalue increments/decrements.
972 2007-05-07 Mike Stump <mrs@apple.com>
974 * parser.c (check_empty_body): Add.
975 (cp_parser_iteration_statement): Add call to check_empty_body.
977 2007-05-05 Geoffrey Keating <geoffk@apple.com>
980 * mangle.c (write_mangled_name): Mangle static variable names.
981 (write_unqualified_name): Use local-source-name for
982 namespace-scope static variables.
984 2007-05-04 Dirk Mueller <dmueller@suse.de>
986 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
989 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
992 * decl2.c (constrain_class_visibility):
993 Use strip_pointer_or_array_types instead of strip_array_types.
995 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
998 * decl.c (reshape_init_r): Don't reshape the first element if it
999 is a pointer to member function.
1001 2007-04-27 Simon Baldwin <simonb@google.com>
1003 * decl.c (grokparms): Changed message format from %qD to %qE.
1005 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
1007 * error.c (maybe_warn_variadic_templates): Variadic templates are
1008 now in C++0x, so only warn about them in C++98 mode.
1010 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
1013 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
1014 integeral types from vectors types.
1016 2007-04-26 Jakub Jelinek <jakub@redhat.com>
1019 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
1020 for type dependent OMP_CLAUSE_DECLs.
1022 2007-04-24 Mark Mitchell <mark@codesourcery.com>
1025 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
1026 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
1027 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
1028 * init.c (build_zero_init): Adjust, as
1029 COMPLEX_TYPE is now a SCALAR_TYPE.
1030 * typeck2.c (digest_init): Allow brace-enclosed initializers for
1031 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
1033 2007-04-25 Paolo Carlini <pcarlini@suse.de>
1035 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
1036 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
1037 (trait_expr_value): Adjust.
1039 2007-04-23 Simon Baldwin <simonb@google.com>
1041 * decl.c (grokparms): Added new error for duplicate function
1042 parameters names in function prototypes, to match gcc behavior.
1044 2007-04-23 Jan Hubicka <jh@suse.cz>
1046 * cp/decl2.c (finish_objects): Do not call target constructor/destructor
1049 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
1051 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
1052 instead of checking GIMPLE_STMT_P in chain_next.
1054 2007-04-17 Mark Mitchell <mark@codesourcery.com>
1057 * call.c (convert_for_arg_passing): Convert bitfields to their
1060 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
1063 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
1065 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
1068 * cp/decl2.c (constrain_class_visibility):
1069 Do not warn about the use of anonymous namespace in the main input file.
1071 2007-04-15 Mark Mitchell <mark@codesourcery.com>
1073 * cp-tree.h (current_template_parms): Fix typo in comment.
1075 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
1077 * cp-tree.h, error.c: Fix comment typos.
1079 2007-04-13 Jason Merrill <jason@redhat.com>
1082 * call.c (reference_binding): Add c_cast_p parm. If true,
1083 add quals to TO as needed to make it reference-compatible.
1085 2007-04-11 Jan Hubicka <jh@suse.cz>
1087 * cp/class.c (convert_to_base_statically): Fold produced tree; verify
1088 that we are not processing template_decl.
1090 2007-04-09 Mark Mitchell <mark@codesourcery.com>
1093 * class.c (build_base_path): Ensure that the converted pointer has
1094 the same cv-qualification as the input.
1096 2007-04-09 Paolo Carlini <pcarlini@suse.de>
1098 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
1100 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
1102 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
1104 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
1105 * tree.c (cp_add_pending_fn_decls): Remove.
1106 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
1108 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
1110 Revert change removing staticp.
1112 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
1114 * cp-objcp-common.c (cxx_staticp): Remove.
1115 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
1116 * cp-tree.h (cxx_staticp):
1118 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
1120 * class.c (check_for_override): Don't remove dllmport attribute
1123 2007-04-03 Jakub Jelinek <jakub@redhat.com>
1126 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
1127 type issue error and return early.
1129 2007-03-30 Jason Merrill <jason@redhat.com>
1132 * typeck.c (cp_type_readonly): New fn.
1133 * cp-tree.h: Declare it.
1134 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
1135 (cp_finish_decl): Not here.
1137 2007-03-31 Richard Guenther <rguenther@suse.de>
1139 * optimize.c (maybe_clone_body): Replace splay-tree usage by
1142 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
1147 * parser.c (declarator_can_be_parameter_pack): New.
1148 (cp_parser_template_parameter): Only parse the `...' if the
1149 declarator can be a parameter pack.
1150 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
1152 * pt.c (find_parameter_packs_r): Look into the bounds on integer
1153 types (they could be used as array bounds).
1154 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
1155 (tsubst_pack_expansion): Handle failure to expand parameter
1158 2007-03-30 Paolo Carlini <pcarlini@suse.de>
1161 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
1162 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
1163 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
1164 (CLASS_TYPE_NON_UNION_P): Add.
1165 (struct lang_type_class): Add has_complex_dflt.
1166 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
1167 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
1168 * cp-tree.def: Add TRAIT_EXPR.
1169 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
1170 * lex.c (struct resword): Add __has_nothrow_assign,
1171 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
1172 __has_trivial_constructor, __has_trivial_copy,
1173 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
1174 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
1175 __is_pod, __is_polymorphic, __is_union.
1176 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
1177 (cp_parser_trait_expr): New.
1178 * semantics.c (finish_trait_expr, trait_expr_value
1179 classtype_has_nothrow_copy_or_assign_p): New.
1180 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
1182 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
1183 * class.c (check_bases, check_field_decl, check_bases_and_members):
1184 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
1185 * pt.c (uses_template_parms, tsubst_copy_and_build,
1186 value_dependent_expression_p, type_dependent_expression_p): Deal with
1188 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
1190 2007-03-29 Richard Guenther <rguenther@suse.de>
1192 * tree.c (cp_walk_subtrees): Do not set input_location.
1194 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
1197 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
1200 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1202 * parser.c (struct cp_parser): Update comment for
1203 greater_than_is_operator_p.
1204 (cp_parser_primary_expression): In C++0x mode, a cast operator can
1205 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
1206 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
1207 !GREATER_THAN_IS_OPERATOR_P.
1208 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
1209 `>>' operators that will become two `>' tokens in C++0x.
1210 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
1211 mode, allowing it to terminate default arguments.
1212 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
1213 `>>' like two consecutive `>' tokens.
1214 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
1215 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
1216 ends a template argument.
1218 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1220 * decl.c (redeclaration_error_message): Complain when redeclaring
1221 a friend function with default template arguments (C++0x mode only).
1222 * cp-tree.h (check_default_tmpl_args): Declare.
1223 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
1224 template arguments in function templates. Add support for checking
1225 the default template arguments of friend templates.
1226 (push_template_decl_real): Fix call to check_default_tmpl_args.
1227 (type_unification_real): If a template parameter has not been
1228 deduced but provides a default template argument, substitute into
1229 that default template argument.
1230 * parser.c (cp_parser_init_declarator): When declaring (but not
1231 defining!) a function template in C++0x mode, check for default
1234 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1237 * decl.c (grokdeclarator): Deal with cv-qualified function type
1238 typedefs in the same way for member and non-member functions.
1240 2007-03-26 Dirk Mueller <dmueller@suse.de>
1242 * parser.c (cp_parser_member_declaration): Pedwarn
1243 about stray semicolons after member declarations.
1245 2007-03-26 Paolo Carlini <pcarlini@suse.de>
1248 * pt.c (instantiate_decl): Set in_system_header.
1250 2007-03-22 Mark Mitchell <mark@codesourcery.com>
1252 * cp-tree.h (current_tempalte_parms): Improve documentation.
1253 * pt.c (current_template_args): Likewise.
1256 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
1257 not consume tokens when failing.
1259 2007-03-22 Jim Wilson <wilson@specifix.com>
1260 Mark Mitchell <mark@codesourcery.com>
1263 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
1264 consistent with FROM.
1266 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1268 * error.c (dump_expr): Handle dependent names that designate types.
1269 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
1271 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
1273 * cp-tree.def, parser.c, pt.c: Fix comment typos.
1275 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1277 * cvt.c (cp_convert_and_check) : Define.
1278 * cp-tree.h (cp_convert_and_check): Declare.
1279 * call.c (convert_conversion_warnings): Rename to
1280 conversion_null_warnings. The warning for floating-point to
1281 integer is handled by convert_and_check in convert_like_real.
1282 (convert_like_real): convert_conversion_warnings was renamed as
1283 conversion_null_warnings.
1284 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
1285 overflow and changes of value during conversion.
1287 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1290 * parser.c (cp_parser_statement): If 'namespace' is found, this
1291 only can be a namespace alias definition, so parse it now.
1292 (cp_parser_namespace_alias_definition): if we find an open brace
1293 instead of '=', then this is actually a misplaced namespace
1296 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1299 * decl.c (cxx_init_decl_processing): Move command-line options
1300 processing to c-opts.c.
1302 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
1304 * ptree.c (cxx_print_type): Use formatting markup for integers
1305 when printing template parameter index/level/orig level.
1306 (cxx_print_xnode): Ditto.
1307 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
1308 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
1309 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
1311 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
1312 rather than a HOST_WIDE_INT.
1313 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
1314 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
1316 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
1317 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
1318 IN_BASE_INITIALIZER bool bitfields.
1319 (struct cp_declarator): Make KIND a 4-bit field. Make
1320 PARAMETER_PACK_P a bool bitfield just after KIND.
1321 * pt.c (uses_parameter_packs): Destroy the pointer set.
1322 (make_pack_expansion): Ditto.
1323 (check_for_bare_parameter_packs): Ditto.
1324 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
1326 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
1329 * call.c (convert_default_arg): Instead of copying the node,
1332 2007-03-15 Dirk Mueller <dmueller@suse.de>
1335 * call.c (convert_conversion_warnings): New..
1336 (convert_like_real): .. factored out from here.
1337 (convert_conversion_warnings): Add warning about
1338 false being converted to NULL in argument passing.
1340 2007-03-14 Dirk Mueller <dmueller@suse.de>
1342 * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
1343 (finish_do_body): Warn about empty body in do/while statement.
1345 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1347 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
1349 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1352 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
1355 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
1357 * cp/repo.c (init_repo): Initialize random_seed saved options.
1358 (finish_repo): Adjust.
1360 2007-03-13 Mark Mitchell <mark@codesourcery.com>
1363 * Make-lang.in (doc/g++.1): Use $< to specify the location from
1366 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
1368 * decl.c (compute_array_index_type): New warning flag warn_vla.
1370 2007-03-12 Mark Mitchell <mark@codesourcery.com>
1373 * call.c (convert_default_arg): Copy non-constant arguments.
1375 2007-03-11 Mark Mitchell <mark@codesourcery.com>
1378 * parser.c (cp_parser_postfix_expression): Disallow compound
1379 literals in constant expressions.
1382 * semantics.c (finish_typeof): Use unlowered_expr_type.
1384 2007-03-10 Mark Mitchell <mark@codesourcery.com>
1387 * cp-tree.h (unlowered_expr_type): New function.
1388 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
1389 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
1390 (unlowered_expr_type): New function.
1391 (build_unary_op): Disallow predecrements of bool bitfields.
1392 * call.c (build_conditional_expr): Use unlowered_expr_type.
1393 * pt.c (type_unification_real): Likewise.
1395 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
1398 * typeck.c (check_return_expr): Check for bare parameter packs.
1399 (comptypes): Compare template parameter packs and
1400 type pack expansions.
1401 * decl.c (grokdeclarator): Deal with the declaration of function
1403 (grokparms): Verify that the (optional) function parameter pack is
1404 at the end of the parameter list.
1405 (xref_basetypes): Handle pack expansions in the base class.
1406 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
1407 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
1408 (NONTYPE_ARGUMENT_PACK): New.
1409 (TYPE_PACK_EXPANSION): New.
1410 (EXPR_PACK_EXPANSION): New.
1411 (ARGUMENT_PACK_SELECT): New.
1412 * cp-objcp-common.c (cp_tree_size): Compute size of
1413 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
1414 ARGUMENT_PACK_SELECT.
1415 * error.c (dump_template_argument): Print template argument packs.
1416 (dump_template_argument_list): Ditto.
1417 (dump_template_parameter): Dump `...' for template type parameter
1419 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
1420 (dump_parameters): Print function parameter packs.
1421 (dump_template_parms): Print template argument packs.
1422 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
1423 (maybe_warn_variadic_templates): New.
1424 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
1425 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1426 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1428 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
1429 (write_template_arg): Write argument packs as separate arguments.
1430 * cp-tree.h (struct template_parm_index_s): Add flag that
1431 indicates that the template parameter is actually a parameter
1433 (struct tree_argument_pack_select): New.
1434 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
1435 (union lang_tree_node): Add argument_pack_select.
1436 (FUNCTION_PARAMETER_PACK_P): New.
1437 (PACK_EXPANSION_P): New.
1438 (PACK_EXPANSION_PATTERN): New.
1439 (SET_PACK_EXPANSION_PATTERN): New.
1440 (PACK_EXPANSION_PARAMETER_PACKS): New.
1441 (ARGUMENT_PACK_P): New.
1442 (ARGUMENT_PACK_ARGS): New.
1443 (SET_ARGUMENT_PACK_ARGS): New.
1444 (ARGUMENT_PACK_INCOMPLETE_P): New.
1445 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
1446 (TEMPLATE_PARM_PARAMETER_PACK): New.
1447 (TEMPLATE_TYPE_PARAMETER_PACK): New.
1448 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
1449 (ARGUMENT_PACK_SELECT_INDEX): New.
1450 (ARGUMENT_PACK_SELECT_ARG): New.
1451 (struct cp_declarator): Add parameter_pack_p flag.
1452 (maybe_warn_variadic_templates): Declare.
1453 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
1454 indicate a template parameter pack.
1455 (uses_parameter_packs): Declare.
1456 (template_parameter_pack_p): Declare.
1457 (template_parms_variadic_p): Declare.
1458 (make_pack_expansion): Declare.
1459 (check_for_bare_parameter_packs): Declare.
1460 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
1461 sizeof... expressions.
1462 (pp_cxx_expression): Print pack expansions and non-type argument
1464 (pp_cxx_exception_specification): Print pack expansions.
1465 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
1466 (pp_cxx_ctor_initializer): Print pack expansions.
1467 (pp_cxx_type_id): Print pack expansions.
1468 (pp_cxx_template_argument_list): Print argument packs.
1469 (pp_cxx_template_parameter): Print ellipsis for template parameter
1471 * pt.c (comp_template_parms): Compare template parameter packs.
1472 (template_parameter_pack_p): New.
1473 (template_parms_variadic_p): New.
1474 (template_args_variadic_p): New.
1475 (make_ith_pack_parameter_name): New.
1476 (struct find_parameter_pack_data): New.
1477 (find_parameter_packs_r): New.
1478 (uses_parameter_packs): New.
1479 (make_pack_expansion): New.
1480 (check_for_bare_parameter_packs): New.
1481 (expand_template_argument_pack): New.
1482 (reduce_template_parm_level): Propagate parameter pack flag.
1483 (process_template_parm): Add is_parameter_pack parameter to state
1484 when the parameter is actually a parameter pack. Create template
1485 parameter packs when is_parameter_pack is true.
1486 (current_template_args): The argument for a template parameter
1487 pack is an argument pack containing a single pack expansion.
1488 (process_partial_specialization): When checking that non-type
1489 argument expressions do not involve template parameters, loop over
1490 the arguments in argument packs separately.
1491 (push_template_decl_real): Check that the type of the declaration
1492 does not have any bare parameter packs. Check that primary
1493 templates have no more than one parameter pack, and that it comes
1494 at the end of the template parameter list.
1495 (convert_template_argument): Handle coercions for pack expansion
1496 expressions by coercing the pattern then rebuilding the expansion.
1497 (coerce_template_parms): When coercing the arguments for a
1498 variadic template, pack "extra" arguments into an argument pack.
1499 (coerce_template_template_parms): Cannot coerce between parameter
1500 packs and non-pack parameters.
1501 (template_args_equal): Compare PACK_EXPANSION_P expressions.
1502 (comp_template_args): Expand all template arguments packs before
1503 comparing template argument lists.
1504 (mangle_class_name_for_template): Make argument packs as separate
1506 (for_each_template_parm_r): No need to handle BASELINK.
1507 (instantiate_class_template): Handle pack expansions in the base
1509 (tsubst_pack_expansion): New.
1510 (tsubst_template_args): Handle substitutions of argument packs and
1511 pack expansion into template argument lists.
1512 (tsubst_decl): Expand function parameter packs into separate
1513 function parameters.
1514 (tsubst_arg_types): Expand a type pack expansion into separate
1516 (tsubst_exception_specification): Handle pack expansions in
1517 exception specifiers.
1518 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
1519 replacing a template parameter with its argument. If we encounter
1520 a substitution for an argument pack, just return the parameter
1522 (tsubst_copy): sizeof(X...) returns the number of elements in
1523 parameter pack X. See through ARGUMENT_PACK_SELECT when the
1524 PARM_DECL is a parameter pack.
1525 (tsubst_expr): Expression pack expansions and argument packs
1526 cannot show up here; they will all be handled through function
1527 calls, sizeof, and template argument lists.
1528 (tsubst_copy_and_build): sizeof(X...) returns the number of
1529 elements in parameter pack X. Handle pack expansions in TREE_LIST
1530 and CONSTRUCTOR nodes.
1531 (fn_type_unification): Handle "incomplete" explicit template
1532 argument lists that specify some of the arguments for a template
1534 (type_unification_real): Unify arguments against pack expansions.
1535 (template_parm_level_and_index): New, helper function.
1536 (unify_pack_expansion): New.
1537 (unify): Unify argument packs on an argument-by-argument basis,
1538 handling variadic argument packs as well.
1539 (more_specialized_fn): Handle unification of function parameter
1540 packs. All things being equal, prefer non-variadic function
1541 templates to variadic function templates.
1542 (more_specialized_class): Prefer the variadic class template
1543 partial specialization that binds fewer arguments to a parameter
1545 (regenerate_decl_from_template): Expand function parameter packs
1546 into separate parameters.
1547 (instantiate_decl): Ditto.
1548 (tsubst_initializer_list): Handle pack expansions for base-class
1550 (dependent_type_p_r): Determine dependent types in argument packs
1551 and pack expansions.
1552 (value_dependent_expression_p): Determine value-dependence of
1553 non-type argument packs.
1554 (dependent_template_arg_p): Handle argument packs.
1555 * semantics.c (finish_cond): Check for bare parameter packs.
1556 (finish_expr_stmt): Ditto.
1557 (finish_for_expr): Ditto.
1558 (finish_switch_cond): Ditto.
1559 (finish_mem_initializers): Ditto.
1560 * name-lookup.c (arg_assoc_type): Handle pack expansions and
1562 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
1563 * parser.c (make_declarator): Declarator is not an expansion.
1564 (make_pointer_declarator): Transfer parameter pack flag to outer
1566 (make_reference_declarator): Ditto.
1567 (make_ptrmem_declarator): Ditto.
1568 (make_call_declarator): Ditto.
1569 (make_array_declarator): Ditto.
1570 (cp_parser_postfix_expression): Allow pack expansion expressions
1571 in the argument list for a call expression.
1572 (cp_parser_parenthesized_expression_list): Add new parameter
1573 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
1574 into separate arguments."
1575 (cp_parser_new_placement): Allow pack expansion expressions.
1576 (cp_parser_new_initializer): Ditto.
1577 (cp_parser_mem_initializer_list): Allow ellipsis to create a
1578 base-class initializer expansion.
1579 (cp_parser_mem_initializer): Ditto.
1580 (cp_parser_template_parameter_list): Keep track of whether the
1581 template parameter is a template parameter pack.
1582 (cp_parser_template_parameter): Parse the ellipsis to indicate a
1583 template parameter pack.
1584 (cp_parser_type_parameter): Ditto.
1585 (cp_parser_template_argument_list): Parse the ellipsis to indicate
1587 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
1588 this declarator is a parameter pack.
1589 (cp_parser_parameter_declaration): The ellipsis does not end the
1590 parameter declaration, because it might be a parameter pack. Parse
1591 the ellipsis to indicate a parameter pack.
1592 (cp_parser_initializer): Allow pack expansions.
1593 (cp_parser_initializer_list): Allow ellipsis to create an
1594 initializer expansion.
1595 (cp_parser_base_clause): Allow ellipsis to create a base specifier
1597 (cp_parser_type_id_list): Allow ellipsis to create an exception
1598 specifier expansion.
1599 (cp_parser_attribute_list): Don't allow pack expansions.
1600 (cp_parser_functional_cast): Allow pack expansions.
1601 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
1602 compute the length of a parameter pack.
1603 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
1604 end a template argument.
1605 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1606 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1609 2007-03-09 Dirk Mueller <dmueller@suse.de>
1611 * cp/call.c (build_new_op): Call warn_logical_operator.
1613 2007-03-08 Volker Reichelt <reichelt@netcologne.de>
1616 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
1619 * pt.c (any_template_arguments_need_structural_equality_p):
1622 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
1624 * decl.c (grokdeclarator): Disable warnings for anonymous
1627 2007-03-05 Volker Reichelt <reichelt@netcologne.de>
1629 * typeck2.c (readonly_error): Always emit a hard error.
1630 Remove last argument.
1631 * cp-tree.h (readonly_error): Adjust prototype.
1632 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
1633 * typeck.c (build_unary_op): Likewise.
1634 (build_modify_expr): Likewise.
1636 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
1639 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
1641 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1644 * parser.c (struct cp_parser): New IN_IF_STMT.
1645 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
1646 returning if parsing the body of an 'if' statement or issuing an
1647 error and continuing.
1648 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
1650 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
1652 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
1655 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
1658 2007-03-02 Geoffrey Keating <geoffk@apple.com>
1660 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
1661 Objective-C++. Don't exit early if -shared-libgcc needs to be
1664 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1666 * typeck.c (common_base_type): Delete unused function.
1668 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
1670 * Make-lang.in: Add dummy lang.install-pdf target.
1672 2007-03-01 Simon Baldwin <simonb@google.com>
1675 * decl.c (check_tag_decl): Added new warning for typedef ignored
1676 when it precedes an otherwise valid non-typedef declaration.
1678 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
1680 * typeck.c (build_function_call): Store converted arguments
1681 in a stack-allocated array instead of building a list.
1682 (convert_arguments): Store arguments in the array passed in as an
1683 argument, and return the actual number of arguments.
1684 * call.c (build_call): Delete, and replace with...
1685 (build_call_n, build_call_a): New.
1686 (build_op_delete_call): Rewrite to avoid constructing argument lists.
1687 (build_over_call): Store converted arguments in a stack-allocated
1688 array instead of building a list.
1689 (build_cxx_call): Pass arguments in an array instead of as a list.
1690 (build_java_interface_fn_ref): Rewrite to avoid constructing
1692 * tree.h: Update declarations to reflect above changes.
1693 * method.c (use_thunk): Use a stack-allocated array to hold
1694 the arguments instead of a list.
1695 * rtti.c (throw_bad_cast): Update call to cxx_call.
1696 (throw_bad_typeid): Likewise.
1697 (build_dynamic_cast_1): Likewise.
1698 * init.c (build_builtin_delete_call): Use build_call_n.
1699 * decl.c (expand_static_init): Likewise.
1700 * except.c (cp_protect_cleanup_actions): Likewise.
1701 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
1702 (gimplify_must_not_throw_expr): Likewise.
1703 (cxx_omp_apply_fn): Use build_call_a.
1705 2007-02-26 Mark Mitchell <mark@codesourcery.com>
1707 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
1708 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
1710 2007-02-25 Mark Mitchell <mark@codesourcery.com>
1712 * cp-tree.h (static_ctors): Remove.
1713 * cp-tree.h (static_dtors): Likewise.
1714 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
1715 refactoring of tree_map hierarchy.
1716 (decl_shadowed_for_var_insert): Likewise.
1717 * semantics.c (expand_body): Use c_expand_body.
1718 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
1719 * decl2.c (static_ctors): Remove.
1720 (static_dtors): Likewise.
1721 (generate_ctor_or_dtor_function): Pass NULL_TREE to
1722 objc_generate_static_init_call. Do not call static_[cd]tors.
1723 (generate_ctor_and_dtor_functions_for_priority): Do not check for
1725 (cp_write_global_declarations): Likewise.
1727 2007-02-23 Richard Guenther <rguenther@suse.de>
1729 * class.c (note_name_declared_in_class): Make declaration
1730 changes meaning a pedwarn.
1732 2007-02-22 Michael Matz <matz@suse.de>
1735 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
1736 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
1737 dump_function_decl): Guard emitting outer scopes by new flag.
1738 * cp-lang.c (cxx_dwarf_name): New function.
1739 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
1740 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
1742 (push_template_decl_real, lookup_template_class): Remove calls
1745 2007-02-19 Mark Mitchell <mark@codesourcery.com>
1747 * call.c (build_new_method_call): Ensure that explicit calls of
1748 destructors have type "void".
1750 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1752 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
1753 and -Walways-true with -Waddress.
1754 * cvt.c (convert_to_void): Replace unconditional warning with
1757 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
1759 * decl.c, tree.c: Fix comment typos.
1761 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1764 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
1765 statement expression if we had an error mark node.
1767 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
1768 Brooks Moses <brooks.moses@codesourcery.com>
1769 Lee Millward <lee.millward@codesourcery.com>
1771 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
1772 Change class to tcc_vl_exp.
1774 * call.c (build_call): Use build_call_list instead
1776 (build_over_call): Likewise.
1777 (build_new_method_call): Use build_min_non_dep_call_list
1778 instead of build_min_non_dep.
1780 * error.c (dump_call_expr_args): New function.
1781 (dump_aggr_init_expr_args): New function.
1782 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
1783 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
1785 * cvt.c (convert_to_void): Use build_call_array instead
1786 of build3; use new AGGR_INIT_EXPR accessor macros.
1788 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
1789 instead of TREE_CODE_LENGTH.
1791 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
1792 AGGR_INIT_EXPR accessor macros.
1794 * cp-gimplify.c (cp_gimplify_init_expr): Use
1795 AGGR_INIT_EXPR_SLOT to set the slot operand.
1797 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
1798 (AGGR_INIT_EXPR_SLOT): New macro.
1799 (AGGR_INIT_EXPR_ARG): New macro.
1800 (aggr_init_expr_nargs): New macro.
1801 (AGGR_INIT_EXPR_ARGP): New macro.
1802 (aggr_init_expr_arg_iterator): New.
1803 (init_aggr_init_expr_arg_iterator): New.
1804 (next_aggr_init_expr_arg): New.
1805 (first_aggr_init_expr_arg): New.
1806 (more_aggr_init_expr_args_p): New.
1807 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
1808 (stabilize_aggr_init): New declaration.
1809 (build_min_non_dep_call_list): Likewise.
1811 * tree.c (process_aggr_init_operands): New function.
1812 (build_aggr_init_array) New function.
1813 (build_cplus_new): Update to use new CALL_EXPR and
1814 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
1815 build_aggr_init_array.
1816 (build_min_non_dep_call_list) New function.
1817 (build_min_nt): Assert input code parameter is not a variable
1818 length expression class.
1819 (build_min, build_min_non_dep): Likewise.
1820 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
1821 to check for equality instead of recursing. Handle tcc_vl_exp
1823 (stabilize_call): Update to only handle CALL_EXPRs, not
1824 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
1825 (stabilize_aggr_init): New function.
1826 (stabilize_init): Use it.
1828 * cxx-pretty-print.c (pp_cxx_postfix_expression)
1829 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
1830 AGGR_INIT_EXPR accessor macros and argument iterators.
1832 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
1833 build_vl_exp. Iterate through the operands, recursively
1834 processing each one.
1835 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
1836 CALL_EXPR accessor macros.
1837 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
1838 tree code classes. Use TREE_OPERAND_LENGTH instead of
1841 * semantics.c (finish_call_expr): Use build_nt_call_list
1842 instead of build_nt.
1843 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
1844 accessor macros. Use build_call_array to construct the
1845 CALL_EXPR node instead of build3
1847 * decl2.c (build_offset_ref_call_from_tree): Use
1848 build_nt_call_list and build_min_non_dep_call_list instead
1849 of build_min_nt and build_min_non_dep.
1851 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
1852 Use build_nt_call_list instead of build_min_nt.
1854 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1857 * call.c (build_conditional_expr): Improve error message.
1859 2007-02-13 Dirk Mueller <dmueller@suse.de>
1861 * friend.c (do_friend): Annotate warning about friend
1862 declarations in templates with OPT_Wnon_template_friend.
1863 Convert informal message from warning() to inform().
1865 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
1866 Mark Mitchell <mark@codesourcery.com>
1869 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
1870 instantiations for variables.
1872 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1875 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
1876 Check warn_unused_value just once.
1878 2007-02-11 Mark Mitchell <mark@codesourcery.com>
1881 * pt.c (determine_specialization): Use skip_artificial_parms_for.
1882 (fn_type_unificiation): Likewise.
1883 (get_bindings): Likewise.
1885 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
1888 * decl.c (finish_function): Use DECL_REPLACEABLE.
1889 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1891 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
1893 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
1895 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
1897 * decl.c (grokvardecl): Don't error if !have_tls.
1898 (grokdeclarator): Likewise.
1899 * parser.c (cp_parser_omp_threadprivate): Likewise.
1901 2007-02-07 Jakub Jelinek <jakub@redhat.com>
1904 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
1905 parameters and result decls in omp clauses.
1906 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
1909 2007-02-05 Dirk Mueller <dmueller@suse.de>
1912 * parser.c (cp_parser_class_specifier): Always initialize bases.
1914 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
1916 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
1917 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
1918 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
1920 * semantics.c (finish_omp_atomic): Store a whole expression node
1921 in operand 1, and integer_zero_node in operand 0, for dependent
1922 OMP_ATOMIC. Rewrite to make flow easier to understand.
1924 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1926 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
1928 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
1930 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
1931 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
1933 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
1935 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
1936 keyword warning to -Wc++0x-compat.
1938 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1940 * decl.c (grokdeclarator): Update documentation.
1942 2007-02-02 Jakub Jelinek <jakub@redhat.com>
1945 * decl.c (grokdeclarator): If __thread is used together with
1946 a storage class other than extern and static, clear thread_p
1947 after issuing diagnostics and fall through to checking the
1950 2007-01-30 Roger Sayle <roger@eyesopen.com>
1952 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
1953 calculating the size of an array (to avoid recursive errors).
1955 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1958 * typeck.c (build_binary_op): Fix logic for warning. Move warning
1960 * call.c (convert_like_real): Don't warn when converting to
1963 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1965 * decl.c (pop_label): Replace warning with call to
1966 warn_for_unused_label.
1968 2007-01-28 Andrew Pinski <pinskia@gmail.com>
1971 * semantics.c (finish_pseudo_destructor_expr): Check the
1972 destrutor name by calling check_dtor_name.
1974 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
1976 * lex.c (D_CPP0X): Rename.
1978 (reswords): D_CPP0X -> D_CXX0X.
1979 (init_reswords): Ditto.
1980 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
1981 of C++0x keywords as identifiers.
1983 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
1986 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
1989 2007-01-23 Ian Lance Taylor <iant@google.com>
1991 * typeck.c (convert_for_assignment): Only warn about a = b = c
1992 when converting to bool.
1994 2007-01-23 Roger Sayle <roger@eyesopen.com>
1996 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
1998 * typeck.c (ignore_overflows): Remove the remaining uses of
1999 TREE_CONSTANT_OVERFLOW.
2001 2007-01-20 Jan Hubicka <jh@suse.cz>
2003 * decl2.c (start_objects, start_static_storage_duration_function):
2004 Do not make the functions uninlinable.
2006 2007-01-17 Ian Lance Taylor <iant@google.com>
2008 * class.c (add_method): Call VEC_reserve_exact rather than passing
2009 a negative size to VEC_reserve.
2011 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
2014 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
2016 2007-01-10 Mark Mitchell <mark@codesourcery.com>
2019 * decl.c (make_typename_type): If the qualified name is not a
2020 type, issue an error.
2021 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
2024 2007-01-08 Geoffrey Keating <geoffk@apple.com>
2026 * rtti.c: Include target.h.
2027 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
2028 don't emit typeinfo for fundamental types as weak.
2029 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
2031 2007-01-08 Richard Guenther <rguenther@suse.de>
2033 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
2035 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
2037 * call.c (standard_conversion): Pass flag to
2038 vector_types_convertible_p to disallow emission of note.
2039 * typeck.c (convert_for_assignment): Pass flag to
2040 vector_types_convertible_p to allow emission of note.
2041 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
2042 to disallow emission of note.
2044 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2047 * typeck.c (build_binary_op): Call overflow_warning if
2048 TREE_OVERFLOW_P is true for the result and not for any of the
2051 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
2054 * class.c (add_method): Don't wait until template
2055 instantiation time to complain about duplicate methods.
2057 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2060 * semantics.c (finish_unary_op_expr): Warn only if result
2061 overflowed and operands did not.
2063 2007-01-05 Ian Lance Taylor <iant@google.com>
2065 * typeck.c (build_binary_op): Warn about comparing a non-weak
2068 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
2070 * pt.c (tsubst): Propagate the need for structural equality checks
2071 when reducing the level of template parameters.
2073 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
2075 * pt.c: Fix a comment typo.
2077 2007-01-02 Ian Lance Taylor <iant@google.com>
2079 * semantics.c (maybe_convert_cond): Optionally warn when using an
2080 assignment as a condition.
2081 * typeck.c (convert_for_assignment): Optionally warn about
2082 assigning the result of an assignment to a bool.
2084 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
2086 * pt.c (canonical_template_parms): Correct typo in comment.
2088 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
2090 * typeck.c (structural_comptypes): Renamed from "comptypes".
2091 (comptypes): Use canonical type information to perform fast type
2092 comparison. When VERIFY_CANONICAL_TYPES, verify that the
2093 canonical type comparison returns the same results as we would see
2094 from the current, structural check. Support COMPARE_STRUCTURAL
2095 when we need structural checks.
2096 * decl.c (typename_compare): Fix comment.
2097 (build_typename_type): TYPENAME_TYPE nodes require structural
2098 equality checks, because they resolve different based on the
2100 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
2101 require structural equality checks (for now).
2102 (build_ptrmemfunc_type): Build the canonical pointer to member
2104 (compute_array_index_type): Whenever we build a new index type
2105 to represent the size of an array in a template, we need to mark
2106 this index type as requiring structural equality. This goes for
2107 arrays with value-dependent sizes with the current ABI, or all
2109 * tree.c (cplus_array_hash): New.
2110 (struct cplus_array_info): New.
2111 (cplus_array_compare): New.
2112 (cplus_array_htab): New.
2113 (build_cplus_array_type_1): Use a hash table to cache the array
2114 types we build. Build the canonical array type for each array
2116 (cp_build_qualified_type_real): When building a cv-qualified array
2117 type, use the hash table of array types and build canonical array
2119 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
2120 use structural equality (for now).
2121 * cp-tree.h (COMPARE_STRUCTURAL): New.
2122 * pt.c (canonical_template_parms): New.
2123 (canonical_type_parameter): New.
2124 (process_template_parm): Find the canonical type parameter.
2125 (lookup_template_class): When we have named the primary template
2126 type, set the canonical type for our template class to the primary
2127 template type. If any of the template arguments need structural
2128 equality checks, the template class needs structural equality
2130 (tsubst): When reducing the level of a template template
2131 parameter, we require structural equality tests for the resulting
2132 parameter because its template parameters have not had their types
2133 canonicalized. When reducing a template type parameter, find the
2134 canonical reduced type parameter.
2135 (any_template_arguments_need_structural_equality_p): New.