1 2007-08-10 Ollie Wild <aaw@google.com>
3 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
5 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
7 (unqualified_namespace_lookup): Fix ambiguous_decl call.
8 (lookup_using_namespace): Fix ambiguous_decl call.
9 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
11 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13 * call.c (name_as_c_string): Use CONST_CAST.
14 * decl.c (build_decl): Likewise.
15 * parser.c (cp_parser_string_literal): Likewise.
17 2007-08-10 Paolo Carlini <pcarlini@suse.de>
20 * error.c (dump_expr): Consistently use the *_cxx_*
21 variants of the pretty-print functions.
23 2007-08-10 Paolo Carlini <pcarlini@suse.de>
26 * decl.c (check_special_function_return_type): Just error
27 on return type specified for conversion operator.
29 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
31 * typeck2.c (readonly_error): Handle general expressions.
32 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
34 2007-08-06 Dan Hipschman <dsh@google.com>
36 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
39 2007-08-04 Alfred Minarik <a.minarik@aon.at>
42 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
43 * g++spec.c (lang_specific_driver): Check them.
45 2007-08-06 Paolo Carlini <pcarlini@suse.de>
48 * pt.c (template_class_depth): Fix comment; change return type
51 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
54 2007-03-26 Dirk Mueller <dmueller@suse.de>
56 * parser.c (cp_parser_member_declaration): Pedwarn
57 about stray semicolons after member declarations.
59 2007-08-02 Lee Millward <lee.millward@gmail.com>
64 * parser.c (cp_parser_asm_definition): Detect and discard asm
65 statements with invalid inputs or outputs.
66 (cp_parser_asm_operand_list): Return error mark node if any
67 of the operands are invalid. Adjust documentation.
69 2007-08-02 Nick Clifton <nickc@redhat.com>
71 * typeck.c: Change copyright header to refer to version 3 of the
72 GNU General Public License and to point readers at the COPYING3
73 file and the FSF's license web page.
74 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
75 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
76 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
77 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
78 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
79 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
80 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
81 name-lookup.h, parser.c: Likewise.
83 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
86 * call.c (magic_varargs_p): Honor the "type generic" attribute.
88 2007-07-30 Paolo Carlini <pcarlini@suse.de>
91 * semantics.c (finish_label_stmt): Reject the __label__
92 extension outside function scopes.
94 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
96 * parser.c (eof_token): Un-constify.
97 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
98 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
101 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
103 * pt.c, tree.c, typeck2.c: Fix comment typos.
105 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
106 Mark Mitchell <mark@codesourcery.com>
109 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
110 hidden due to friend declarations in local classes.
112 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
114 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
115 * cp-tree.def (DECLTYPE_TYPE): New.
116 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
117 (dump_type_prefix): Ditto.
118 (dump_type_suffix): Ditto.
119 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
120 * mangle.c (write_type): Handle DECLTYPE_TYPE.
121 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
123 (DECLTYPE_TYPE_EXPR): New.
124 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
125 (finish_declared_type): Declare.
126 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
128 (pp_cxx_type_id): Ditto.
129 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
130 (tsubst): Substitute into a DECLTYPE_TYPE node.
131 (tsubst_copy): Ditto.
132 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
134 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
135 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
136 structural equality (because we can't hash the expressions).
137 (finish_declared_type): New.
138 * lex.c (reswords): Add "decltype" keyword.
139 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
140 (cp_parser_postfix_expression): Add member_access_only_p to
141 restrict postfix expression to member access expressions.
142 (cp_parser_unary_expression): Update call to
143 cp_parser_postfix_expression to reflect new parameter.
144 (cp_parser_declared_type): New.
145 (cp_parser_simple_type_specifier): Parse decltype types.
147 2007-07-27 Mark Mitchell <mark@codesourcery.com>
150 * call.c (convert_for_arg_passing): Only widen bitfields to their
151 declared types if necessary.
153 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
155 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
158 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
160 * decl.c (typename_hash, typename_compare): Constify.
161 * mangle.c (hash_type, compare_type): Likewise.
162 * pt.c (eq_local_specializations, hash_local_specialization):
164 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
165 list_hash): Likewise.
166 * typeck2.c (pat_compare): Likewise.
168 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
170 * method.c (implicitly_declare_fn): Increase alignment if member
171 function pointer format requires it.
173 2007-07-24 Paolo Carlini <pcarlini@suse.de>
176 * typeck.c (check_return_expr): Do not pass a null argument
179 2007-07-24 Paolo Carlini <pcarlini@suse.de>
182 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
185 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
188 * typeck.c (convert_arguments): Only use default args if we have
192 * typeck.c (structural_comptypes): No need to check
193 resolve_typename_type return value here.
194 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
195 * pt.c (resolve_typename_type): Follow typename typedefs. Return
196 original type rather than error_mark_node in case of failure.
197 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
198 resolve_typename_type result check.
199 (cp_parser_direct_declarator, cp_parser_head,
200 cp_parser_constructor_declarator_p): Likewise.
202 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
204 * pt.c (template_parms_variadic_p): Remove.
205 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
207 2007-07-12 Jakub Jelinek <jakub@redhat.com>
210 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
211 argument to dump_aggr_init_expr_args instead of false.
213 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
215 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
216 canonical types; otherwise, fall back to structural type
217 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
218 internal compiler error if the canonical types are wrong.
220 2007-07-11 Paolo Carlini <pcarlini@suse.de>
223 * parser.c (cp_parser_make_indirect_declarator): When the
224 the code argument is ERROR_MARK return cp_error_declarator.
226 2007-07-09 Geoffrey Keating <geoffk@apple.com>
229 * decl.c (cxx_init_decl_processing): Don't set
230 force_align_functions_log.
231 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
232 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
233 FUNCTION_DECL, return its alignment.
235 2007-07-09 Richard Guenther <rguenther@suse.de>
237 * decl.c (start_preparsed_function): Do not promote return type.
239 2007-07-08 Paolo Carlini <pcarlini@suse.de>
242 * pt.c (unify): Never pass error_mark_node to template_decl_level.
244 2007-07-07 Mark Mitchell <mark@codesourcery.com>
247 * pt.c (resolve_overloaded_unification): Robustify. Return a
249 (type_unification_real): Adjust accordingly.
251 2007-07-06 Richard Guenther <rguenther@suse.de>
253 * init.c (build_new_1): Use the correct pointer type.
254 * typeck2.c (build_m_component_ref): Likewise.
256 2007-07-05 Mark Mitchell <mark@codesourcery.com>
259 * init.c (build_zero_init): Always build an initializer for
261 * typeck2.c (build_functional_cast): Use build_zero_init.
264 * init.c (build_new_1): Always pass the allocation function to
265 build_op_delete_call.
266 * call.c (build_op_delete_call): Handle operator delete with a
267 variable-argument list. Do not issue an error when no matching
268 deallocation function is available for a new operator.
271 * cp-tree.h (any_value_dependent_elements_p): Declare it.
272 * decl.c (value_dependent_init_p): New function.
273 (cp_finish_decl): Use it.
274 * pt.c (value_dependent_expression_p): Use
275 any_value_dependent_elements_p.
276 * parser.c (cp_parser_primary_expression): Add comment about
277 treating dependent qualified names as integral
278 constant-expressions.
280 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
282 * decl.c (build_ptrmemfunc_type): Always use structural equality
283 tests when comparing pointer-to-member-function types, because the
284 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
287 2007-07-03 Mark Mitchell <mark@codesourcery.com>
289 * init.c (build_new): Tweak comment.
291 2007-06-29 Dave Brolley <brolley@redhat.com>
294 * parser.c (cp_parser_new_type_id): Don't reduce a named array
295 type to its base type and number of elements here.
296 * init.c (build_new): Call complete_type_or_else to ensure that the
297 type is complete and to issue a diagnostic if it is not.
298 (build_new_1): Don't call complete_type_or_else here.
300 2007-07-03 Richard Guenther <rguenther@suse.de>
303 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
306 2007-07-02 Simon Baldwin <simonb@google.com>
308 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
309 for inner-style nested forward declarations that don't declare
312 2007-07-02 Jakub Jelinek <jakub@redhat.com>
315 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
316 DECL_P in not a variable and appears more than once error messages.
318 2007-07-01 Ollie Wild <aaw@google.com>
320 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
321 (select_decl): Remove function.
322 (unqualified_namespace_lookup): Populate binding by calling
323 ambiguous_decl. Remove select_decl call.
324 (lookup_qualified_name): Remove select_decl call.
325 * decl.c (lookup_and_check_tag): Check for ambiguous references.
326 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
327 generation when name lookup is ambiguous.
329 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
332 * init.c (build_new_1): Use structural equality on the copy of the
335 2007-06-28 Geoffrey Keating <geoffk@apple.com>
337 * decl2.c (determine_visibility): Implement
338 flag_visibility_ms_compat effect on type info.
339 * decl.c (cxx_init_decl_processing): Implement
340 global effect of flag_visibility_ms_compat.
342 2007-06-28 Geoffrey Keating <geoffk@apple.com>
344 * decl2.c (start_objects): Mark constructor-running function
347 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
350 * decl.c (grokdeclarator): Reset friendp for member functions declared
351 friend of their own class.
353 2007-06-23 Mark Mitchell <mark@codesourcery.com>
355 * decl2.c (determine_visibility): Don't look for dllexport here.
356 (determine_visibility_from_class): Tidy.
358 2007-06-18 Simon Baldwin <simonb@google.com>
361 * parser.c (cp_parser_single_declaration): Added check for storage
362 class other than sc_none in parsed declaration, and a flag to indicate
363 if the call is part of an explicit template specialization parse.
364 * (cp_parser_explicit_specialization): Specialization check flag added
365 to call to cp_parser_single_declaration(), set true.
366 * (cp_parser_template_declaration_after_export): Specialization check
367 flag added to call to cp_parser_single_declaration(), set false.
368 * pt.c (check_explicit_specialization): Added code to copy visiblity
369 and linkage from the templated function to the explicit specialization.
371 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
373 * typeck.c (build_binary_op): For templates build the
374 expression in pieces to avoid the assert in build2_stat.
375 (get_member_function_from_ptrfunc):
376 Change over to using POINTER_PLUS_EXPR and convert
377 the second operand to sizetype.
378 * typeck2.c (build_m_component_ref): Likewise.
379 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
380 instead of PLUS_EXPR for pointers.
381 (build_new_1): Likewise.
382 (build_vec_delete_1): Likewise.
383 (build_vec_delete): Likewise.
384 * class.c (build_base_path): Likewise.
385 (build_base_path): Likewise.
386 (convert_to_base_statically): Likewise.
387 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
388 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
389 instead of PLUS_EXPR.
390 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
391 instead of PLUS_EXPR for pointers.
392 * call.c (build_special_member_call): Likewise.
393 * rtti.c (build_headof): Likewise.
394 Use sizetype instead of ptrdiff_type_node.
395 (tinfo_base_init): Create a POINTER_PLUS_EXPR
396 instead of PLUS_EXPR for pointers.
397 * except.c (expand_start_catch_block): Do a
398 NEGATIVE and then a POINTER_PLUS_EXPR instead
400 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
401 PLUS_EXPR on pointer types over to use
402 POINTER_PLUS_EXPR and remove the conversion
403 to the pointer types.
404 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
405 adding to a pointer type. Use size_int instead of
406 ssize_int. Convert the index to sizetype before
407 adding it to the pointer.
409 2007-06-15 Mark Mitchell <mark@codesourcery.com>
411 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
412 (DECL_ANON_UNION_VAR_P): New macro.
413 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
414 than DECL_VAR_MARKED_P, to keep track of which variables we have
416 * decl.c (redeclaration_error_message): Complain about redeclaring
417 anonymous union members at namespace scope.
418 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
420 2007-06-14 Geoff Keating <geoffk@apple.com>
422 * decl2.c (determine_visibility): Ensure that functions with
423 hidden types as parameters are hidden.
426 * decl2.c (determine_visibility): Remove duplicate code for
429 2007-06-12 Ian Lance Taylor <iant@google.com>
432 * init.c (avoid_placement_new_aliasing): New static function.
433 (build_new_1): Call it.
435 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
437 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
438 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
440 2007-06-08 Jakub Jelinek <jakub@redhat.com>
443 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
444 on init, the non-decl cond operand and increment value.
446 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
449 * decl.c (check_initializer): Report an error when a brace enclosed
450 initializer is used for a non-aggregate type in C++98.
451 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
453 (grokdeclarator): Likewise.
454 (move_fn_p): Likewise.
455 * typeck.c (check_return_expr): Likewise.
456 * call.c (reference_binding): Likewise.
457 * error.c (cp_cpp_error): Likewise.
458 * pt.c (check_default_tmpl_args): Likewise.
460 * lex.c (init_reswords): Likewise.
461 * parser.c (p_parser_primary_expression): Likewise.
462 (TOKEN_PRECEDENCE): Likewise.
463 (cp_parser_init_declarator): Likewise.
464 (cp_parser_ptr_operator): Likewise.
465 (cp_parser_parameter_declaration): Likewise.
466 (cp_parser_enclosed_template_argument_list): Likewise.
467 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
468 (cp_parser_next_token_ends_template_argument_p): Likewise.
470 2007-06-04 Simon Baldwin <simonb@google.com>
472 * decl.c (grokdeclarator): Readability change. Moved case labels
473 into direct switch statement scope.
475 2007-06-04 Paolo Carlini <pcarlini@suse.de>
477 * call.c (convert_like_real): Remove pointless code.
479 2007-05-31 Mark Mitchell <mark@codesourcery.com>
481 * decl.c (get_atexit_fn_ptr_type): New function.
482 (get_atexit_node): Use it.
483 (start_cleanup_fn): Likewise.
484 (register_dtor_fn): Use the object's destructor, instead of a
485 separate cleanup function, where possible.
486 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
487 (atexit_fn_ptr_type_node): New macro.
488 * decl2.c (build_cleanup): Use build_address.
490 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
492 * typeck.c (build_binary_op): Include types in error.
494 2007-05-31 Jakub Jelinek <jakub@redhat.com>
497 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
498 needs runtime initialization.
500 2007-05-31 Paolo Carlini <pcarlini@suse.de>
503 * semantics.c (finish_trait_expr): Complete the types.
505 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
506 Douglas Gregor <doug.gregor@gmail.com>
507 Pedro Lamarao <pedro.lamarao@mndfck.org>
508 Howard Hinnant <howard.hinnant@gmail.com>
512 * typeck.c (comptypes): Don't consider rvalue and lvalue
513 reference types to be equivalent.
514 (check_return_expr): Move from certain lvalues when returning
516 * decl.c (grokdeclarator): Implement reference collapsing.
517 (copy_fn_p): Don't consider constructors taking rvalue references
518 to be copy constructors.
520 * call.c (conversion): New "rvaluedness_matches_p" member.
521 (convert_class_to_reference): Require reference type as first
522 parameter instead of base type.
523 (reference_binding): Add logic to handle rvalue references.
524 (implicit_conversion): Update inaccurate comment.
525 (convert_like_real): Disable creation of temporaries that are
526 impossible to initialize for types with move constructors.
527 (build_over_call): Elide move constructors when possible.
528 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
529 (maybe_handle_ref_bind): Return conversion instead of type node.
530 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
531 determine preferred conversion sequences.
532 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
533 (LOOKUP_PREFER_RVALUE): New.
534 (DECL_MOVE_CONSTRUCTOR_P): New.
535 (struct cp_declarator): Add "reference" member for reference
536 types, with new "rvalue_ref" flag.
537 (cp_build_reference_type): Declare.
538 (move_fn_p): Declare.
539 * error.c (dump_type_prefix): Format rvalue reference types
540 correctly in error messages.
541 * except.c (build_throw): Move from certain lvalues when
543 * mangle.c (write_type): Mangle rvalue references differently
544 than regular references.
545 * parser.c (make_reference_declarator): Add boolean parameter for
547 (cp_parser_make_indirect_declarator): New.
548 (cp_parser_new_declarator_opt): Call
549 cp_parser_make_indirect_declarator.
550 (cp_parser_conversion_declarator_opt): Ditto.
551 (cp_parser_declarator): Ditto.
552 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
554 * pt.c (tsubst): Implement reference collapsing.
555 (maybe_adjust_types_for_deduction): Implement special template
556 parameter deduction rule for rvalue references.
557 (type_unification_real): Update calls to
558 maybe_adjust_types_for_deduction.
559 (try_one_overload): Ditto.
560 (unify_pack_expansion): Ditto.
561 * tree.c (lvalue_p_1): Handle rvalue reference types.
562 (cp_build_reference_type): New.
564 2007-05-30 Jakub Jelinek <jakub@redhat.com>
567 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
568 variables that need runtime initialization.
570 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
573 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
574 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
575 case POSTDECREMENT_EXPR>): Return the error_mark_node
576 if either the real or imaginary parts would an
579 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
580 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
583 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
584 token is a closing brace, false if there are no tokens left.
585 (cp_parser_namespace_alias_definition): Only consume the next token if
586 it is a closing brace.
588 * parser.c (cp_parser_class_specifier): Likewise.
590 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
592 * semantics.c (finish_member_declaration): Fix a typo in the
595 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
607 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
608 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
609 * pt.c (check_for_bare_parameter_packs): Return bool indicated
610 whether everything was okay. Fix indentation.
611 (push_template_decl_real): Check for bare parameter packs in
612 function parameters; where errors occur, mark the parameter types
613 with ERROR_MARK_NODEs to avert ICEs.
614 (coerce_template_parameter_pack): New.
615 (coerce_template_parms): Moved parameter pack coercion into
616 coerce_template_parameter_pack, and permit it anywhere in the
617 template parameter list (not just at the end). Parameter and
618 argument indices can vary (somewhat) separately now, so add
619 PARM_IDX and ARG_IDX.
620 (fn_type_unification): Don't set an argument pack as incomplete if
621 no argument pack was deduced.
622 (type_unification_real): If a type parameter is a parameter pack
623 and has not otherwise been deduced, it will be deduced to an empty
625 (more_specialized_fn): Use the actual lengths of the argument
626 lists when comparing against expansions.
627 * semantics.c (finish_member_declaration): If a field's type has
628 bare parameter packs, error and set its type to ERROR_MARK_NODE.
630 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
633 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
635 2007-05-22 Ollie Wild <aaw@google.com>
637 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
638 (unqualified_namespace_lookup): Adds check for hidden types.
640 2007-05-22 Ollie Wild <aaw@google.com>
642 * decl.c (duplicate_decls): Verify namespace names are unique.
644 2007-05-21 Mark Mitchell <mark@codesourcery.com>
646 * decl.c (cxx_maybe_build_cleanup): Handle
647 __attribute__((cleanup)).
649 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
651 * cvt.c (cp_convert_and_check): Don't check warnings if the
654 2007-05-18 Geoffrey Keating <geoffk@apple.com>
656 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
658 2007-05-14 Paolo Carlini <pcarlini@suse.de>
661 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
662 type only if is a class type (5.2.8/4).
664 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
666 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
667 * decl.c (grokdeclarator): Use unsigned_type_for instead of
668 c_common_unsigned_type.
670 2007-05-11 Silvius Rus <rus@google.com>
672 * cp/typeck.c (build_indirect_ref): Add call to
673 strict_aliasing_warning.
674 (build_reinterpret_cast_1): Condition call to
675 strict_aliasing_warning.
677 2007-05-11 Jan Hubicka <jh@suse.cz>
679 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
680 * decl2.c (start_objects): ctors and dtors are no longer public.
681 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
683 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
685 * typeck.c (build_unary_op): Remove code that used to
686 handle non lvalue increments/decrements.
688 2007-05-07 Mike Stump <mrs@apple.com>
690 * parser.c (check_empty_body): Add.
691 (cp_parser_iteration_statement): Add call to check_empty_body.
693 2007-05-05 Geoffrey Keating <geoffk@apple.com>
696 * mangle.c (write_mangled_name): Mangle static variable names.
697 (write_unqualified_name): Use local-source-name for
698 namespace-scope static variables.
700 2007-05-04 Dirk Mueller <dmueller@suse.de>
702 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
705 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
708 * decl2.c (constrain_class_visibility):
709 Use strip_pointer_or_array_types instead of strip_array_types.
711 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
714 * decl.c (reshape_init_r): Don't reshape the first element if it
715 is a pointer to member function.
717 2007-04-27 Simon Baldwin <simonb@google.com>
719 * decl.c (grokparms): Changed message format from %qD to %qE.
721 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
723 * error.c (maybe_warn_variadic_templates): Variadic templates are
724 now in C++0x, so only warn about them in C++98 mode.
726 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
729 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
730 integeral types from vectors types.
732 2007-04-26 Jakub Jelinek <jakub@redhat.com>
735 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
736 for type dependent OMP_CLAUSE_DECLs.
738 2007-04-24 Mark Mitchell <mark@codesourcery.com>
741 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
742 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
743 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
744 * init.c (build_zero_init): Adjust, as
745 COMPLEX_TYPE is now a SCALAR_TYPE.
746 * typeck2.c (digest_init): Allow brace-enclosed initializers for
747 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
749 2007-04-25 Paolo Carlini <pcarlini@suse.de>
751 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
752 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
753 (trait_expr_value): Adjust.
755 2007-04-23 Simon Baldwin <simonb@google.com>
757 * decl.c (grokparms): Added new error for duplicate function
758 parameters names in function prototypes, to match gcc behavior.
760 2007-04-23 Jan Hubicka <jh@suse.cz>
762 * cp/decl2.c (finish_objects): Do not call target constructor/destructor
765 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
767 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
768 instead of checking GIMPLE_STMT_P in chain_next.
770 2007-04-17 Mark Mitchell <mark@codesourcery.com>
773 * call.c (convert_for_arg_passing): Convert bitfields to their
776 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
779 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
781 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
785 * cp/decl2.c (constrain_class_visibility):
786 Do not warn about the use of anonymous namespace in the main input file.
788 2007-04-15 Mark Mitchell <mark@codesourcery.com>
790 * cp-tree.h (current_template_parms): Fix typo in comment.
792 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
794 * cp-tree.h, error.c: Fix comment typos.
796 2007-04-13 Jason Merrill <jason@redhat.com>
799 * call.c (reference_binding): Add c_cast_p parm. If true,
800 add quals to TO as needed to make it reference-compatible.
802 2007-04-11 Jan Hubicka <jh@suse.cz>
804 * cp/class.c (convert_to_base_statically): Fold produced tree; verify
805 that we are not processing template_decl.
807 2007-04-09 Mark Mitchell <mark@codesourcery.com>
810 * class.c (build_base_path): Ensure that the converted pointer has
811 the same cv-qualification as the input.
813 2007-04-09 Paolo Carlini <pcarlini@suse.de>
815 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
817 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
819 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
821 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
822 * tree.c (cp_add_pending_fn_decls): Remove.
823 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
825 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
827 Revert change removing staticp.
829 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
831 * cp-objcp-common.c (cxx_staticp): Remove.
832 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
833 * cp-tree.h (cxx_staticp):
835 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
837 * class.c (check_for_override): Don't remove dllmport attribute
840 2007-04-03 Jakub Jelinek <jakub@redhat.com>
843 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
844 type issue error and return early.
846 2007-03-30 Jason Merrill <jason@redhat.com>
849 * typeck.c (cp_type_readonly): New fn.
850 * cp-tree.h: Declare it.
851 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
852 (cp_finish_decl): Not here.
854 2007-03-31 Richard Guenther <rguenther@suse.de>
856 * optimize.c (maybe_clone_body): Replace splay-tree usage by
859 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
864 * parser.c (declarator_can_be_parameter_pack): New.
865 (cp_parser_template_parameter): Only parse the `...' if the
866 declarator can be a parameter pack.
867 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
869 * pt.c (find_parameter_packs_r): Look into the bounds on integer
870 types (they could be used as array bounds).
871 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
872 (tsubst_pack_expansion): Handle failure to expand parameter
875 2007-03-30 Paolo Carlini <pcarlini@suse.de>
878 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
879 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
880 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
881 (CLASS_TYPE_NON_UNION_P): Add.
882 (struct lang_type_class): Add has_complex_dflt.
883 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
884 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
885 * cp-tree.def: Add TRAIT_EXPR.
886 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
887 * lex.c (struct resword): Add __has_nothrow_assign,
888 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
889 __has_trivial_constructor, __has_trivial_copy,
890 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
891 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
892 __is_pod, __is_polymorphic, __is_union.
893 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
894 (cp_parser_trait_expr): New.
895 * semantics.c (finish_trait_expr, trait_expr_value
896 classtype_has_nothrow_copy_or_assign_p): New.
897 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
899 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
900 * class.c (check_bases, check_field_decl, check_bases_and_members):
901 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
902 * pt.c (uses_template_parms, tsubst_copy_and_build,
903 value_dependent_expression_p, type_dependent_expression_p): Deal with
905 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
907 2007-03-29 Richard Guenther <rguenther@suse.de>
909 * tree.c (cp_walk_subtrees): Do not set input_location.
911 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
914 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
917 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
919 * parser.c (struct cp_parser): Update comment for
920 greater_than_is_operator_p.
921 (cp_parser_primary_expression): In C++0x mode, a cast operator can
922 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
923 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
924 !GREATER_THAN_IS_OPERATOR_P.
925 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
926 `>>' operators that will become two `>' tokens in C++0x.
927 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
928 mode, allowing it to terminate default arguments.
929 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
930 `>>' like two consecutive `>' tokens.
931 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
932 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
933 ends a template argument.
935 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
937 * decl.c (redeclaration_error_message): Complain when redeclaring
938 a friend function with default template arguments (C++0x mode only).
939 * cp-tree.h (check_default_tmpl_args): Declare.
940 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
941 template arguments in function templates. Add support for checking
942 the default template arguments of friend templates.
943 (push_template_decl_real): Fix call to check_default_tmpl_args.
944 (type_unification_real): If a template parameter has not been
945 deduced but provides a default template argument, substitute into
946 that default template argument.
947 * parser.c (cp_parser_init_declarator): When declaring (but not
948 defining!) a function template in C++0x mode, check for default
951 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
954 * decl.c (grokdeclarator): Deal with cv-qualified function type
955 typedefs in the same way for member and non-member functions.
957 2007-03-26 Dirk Mueller <dmueller@suse.de>
959 * parser.c (cp_parser_member_declaration): Pedwarn
960 about stray semicolons after member declarations.
962 2007-03-26 Paolo Carlini <pcarlini@suse.de>
965 * pt.c (instantiate_decl): Set in_system_header.
967 2007-03-22 Mark Mitchell <mark@codesourcery.com>
969 * cp-tree.h (current_tempalte_parms): Improve documentation.
970 * pt.c (current_template_args): Likewise.
973 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
974 not consume tokens when failing.
976 2007-03-22 Jim Wilson <wilson@specifix.com>
977 Mark Mitchell <mark@codesourcery.com>
980 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
981 consistent with FROM.
983 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
985 * error.c (dump_expr): Handle dependent names that designate types.
986 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
988 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
990 * cp-tree.def, parser.c, pt.c: Fix comment typos.
992 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
994 * cvt.c (cp_convert_and_check) : Define.
995 * cp-tree.h (cp_convert_and_check): Declare.
996 * call.c (convert_conversion_warnings): Rename to
997 conversion_null_warnings. The warning for floating-point to
998 integer is handled by convert_and_check in convert_like_real.
999 (convert_like_real): convert_conversion_warnings was renamed as
1000 conversion_null_warnings.
1001 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
1002 overflow and changes of value during conversion.
1004 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1007 * parser.c (cp_parser_statement): If 'namespace' is found, this
1008 only can be a namespace alias definition, so parse it now.
1009 (cp_parser_namespace_alias_definition): if we find an open brace
1010 instead of '=', then this is actually a misplaced namespace
1013 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1016 * decl.c (cxx_init_decl_processing): Move command-line options
1017 processing to c-opts.c.
1019 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
1021 * ptree.c (cxx_print_type): Use formatting markup for integers
1022 when printing template parameter index/level/orig level.
1023 (cxx_print_xnode): Ditto.
1024 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
1025 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
1026 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
1028 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
1029 rather than a HOST_WIDE_INT.
1030 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
1031 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
1033 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
1034 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
1035 IN_BASE_INITIALIZER bool bitfields.
1036 (struct cp_declarator): Make KIND a 4-bit field. Make
1037 PARAMETER_PACK_P a bool bitfield just after KIND.
1038 * pt.c (uses_parameter_packs): Destroy the pointer set.
1039 (make_pack_expansion): Ditto.
1040 (check_for_bare_parameter_packs): Ditto.
1041 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
1043 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
1046 * call.c (convert_default_arg): Instead of copying the node,
1049 2007-03-15 Dirk Mueller <dmueller@suse.de>
1052 * call.c (convert_conversion_warnings): New..
1053 (convert_like_real): .. factored out from here.
1054 (convert_conversion_warnings): Add warning about
1055 false being converted to NULL in argument passing.
1057 2007-03-14 Dirk Mueller <dmueller@suse.de>
1059 * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
1060 (finish_do_body): Warn about empty body in do/while statement.
1062 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1064 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
1066 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1069 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
1072 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
1074 * cp/repo.c (init_repo): Initialize random_seed saved options.
1075 (finish_repo): Adjust.
1077 2007-03-13 Mark Mitchell <mark@codesourcery.com>
1080 * Make-lang.in (doc/g++.1): Use $< to specify the location from
1083 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
1085 * decl.c (compute_array_index_type): New warning flag warn_vla.
1087 2007-03-12 Mark Mitchell <mark@codesourcery.com>
1090 * call.c (convert_default_arg): Copy non-constant arguments.
1092 2007-03-11 Mark Mitchell <mark@codesourcery.com>
1095 * parser.c (cp_parser_postfix_expression): Disallow compound
1096 literals in constant expressions.
1099 * semantics.c (finish_typeof): Use unlowered_expr_type.
1101 2007-03-10 Mark Mitchell <mark@codesourcery.com>
1104 * cp-tree.h (unlowered_expr_type): New function.
1105 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
1106 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
1107 (unlowered_expr_type): New function.
1108 (build_unary_op): Disallow predecrements of bool bitfields.
1109 * call.c (build_conditional_expr): Use unlowered_expr_type.
1110 * pt.c (type_unification_real): Likewise.
1112 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
1115 * typeck.c (check_return_expr): Check for bare parameter packs.
1116 (comptypes): Compare template parameter packs and
1117 type pack expansions.
1118 * decl.c (grokdeclarator): Deal with the declaration of function
1120 (grokparms): Verify that the (optional) function parameter pack is
1121 at the end of the parameter list.
1122 (xref_basetypes): Handle pack expansions in the base class.
1123 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
1124 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
1125 (NONTYPE_ARGUMENT_PACK): New.
1126 (TYPE_PACK_EXPANSION): New.
1127 (EXPR_PACK_EXPANSION): New.
1128 (ARGUMENT_PACK_SELECT): New.
1129 * cp-objcp-common.c (cp_tree_size): Compute size of
1130 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
1131 ARGUMENT_PACK_SELECT.
1132 * error.c (dump_template_argument): Print template argument packs.
1133 (dump_template_argument_list): Ditto.
1134 (dump_template_parameter): Dump `...' for template type parameter
1136 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
1137 (dump_parameters): Print function parameter packs.
1138 (dump_template_parms): Print template argument packs.
1139 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
1140 (maybe_warn_variadic_templates): New.
1141 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
1142 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1143 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1145 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
1146 (write_template_arg): Write argument packs as separate arguments.
1147 * cp-tree.h (struct template_parm_index_s): Add flag that
1148 indicates that the template parameter is actually a parameter
1150 (struct tree_argument_pack_select): New.
1151 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
1152 (union lang_tree_node): Add argument_pack_select.
1153 (FUNCTION_PARAMETER_PACK_P): New.
1154 (PACK_EXPANSION_P): New.
1155 (PACK_EXPANSION_PATTERN): New.
1156 (SET_PACK_EXPANSION_PATTERN): New.
1157 (PACK_EXPANSION_PARAMETER_PACKS): New.
1158 (ARGUMENT_PACK_P): New.
1159 (ARGUMENT_PACK_ARGS): New.
1160 (SET_ARGUMENT_PACK_ARGS): New.
1161 (ARGUMENT_PACK_INCOMPLETE_P): New.
1162 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
1163 (TEMPLATE_PARM_PARAMETER_PACK): New.
1164 (TEMPLATE_TYPE_PARAMETER_PACK): New.
1165 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
1166 (ARGUMENT_PACK_SELECT_INDEX): New.
1167 (ARGUMENT_PACK_SELECT_ARG): New.
1168 (struct cp_declarator): Add parameter_pack_p flag.
1169 (maybe_warn_variadic_templates): Declare.
1170 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
1171 indicate a template parameter pack.
1172 (uses_parameter_packs): Declare.
1173 (template_parameter_pack_p): Declare.
1174 (template_parms_variadic_p): Declare.
1175 (make_pack_expansion): Declare.
1176 (check_for_bare_parameter_packs): Declare.
1177 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
1178 sizeof... expressions.
1179 (pp_cxx_expression): Print pack expansions and non-type argument
1181 (pp_cxx_exception_specification): Print pack expansions.
1182 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
1183 (pp_cxx_ctor_initializer): Print pack expansions.
1184 (pp_cxx_type_id): Print pack expansions.
1185 (pp_cxx_template_argument_list): Print argument packs.
1186 (pp_cxx_template_parameter): Print ellipsis for template parameter
1188 * pt.c (comp_template_parms): Compare template parameter packs.
1189 (template_parameter_pack_p): New.
1190 (template_parms_variadic_p): New.
1191 (template_args_variadic_p): New.
1192 (make_ith_pack_parameter_name): New.
1193 (struct find_parameter_pack_data): New.
1194 (find_parameter_packs_r): New.
1195 (uses_parameter_packs): New.
1196 (make_pack_expansion): New.
1197 (check_for_bare_parameter_packs): New.
1198 (expand_template_argument_pack): New.
1199 (reduce_template_parm_level): Propagate parameter pack flag.
1200 (process_template_parm): Add is_parameter_pack parameter to state
1201 when the parameter is actually a parameter pack. Create template
1202 parameter packs when is_parameter_pack is true.
1203 (current_template_args): The argument for a template parameter
1204 pack is an argument pack containing a single pack expansion.
1205 (process_partial_specialization): When checking that non-type
1206 argument expressions do not involve template parameters, loop over
1207 the arguments in argument packs separately.
1208 (push_template_decl_real): Check that the type of the declaration
1209 does not have any bare parameter packs. Check that primary
1210 templates have no more than one parameter pack, and that it comes
1211 at the end of the template parameter list.
1212 (convert_template_argument): Handle coercions for pack expansion
1213 expressions by coercing the pattern then rebuilding the expansion.
1214 (coerce_template_parms): When coercing the arguments for a
1215 variadic template, pack "extra" arguments into an argument pack.
1216 (coerce_template_template_parms): Cannot coerce between parameter
1217 packs and non-pack parameters.
1218 (template_args_equal): Compare PACK_EXPANSION_P expressions.
1219 (comp_template_args): Expand all template arguments packs before
1220 comparing template argument lists.
1221 (mangle_class_name_for_template): Make argument packs as separate
1223 (for_each_template_parm_r): No need to handle BASELINK.
1224 (instantiate_class_template): Handle pack expansions in the base
1226 (tsubst_pack_expansion): New.
1227 (tsubst_template_args): Handle substitutions of argument packs and
1228 pack expansion into template argument lists.
1229 (tsubst_decl): Expand function parameter packs into separate
1230 function parameters.
1231 (tsubst_arg_types): Expand a type pack expansion into separate
1233 (tsubst_exception_specification): Handle pack expansions in
1234 exception specifiers.
1235 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
1236 replacing a template parameter with its argument. If we encounter
1237 a substitution for an argument pack, just return the parameter
1239 (tsubst_copy): sizeof(X...) returns the number of elements in
1240 parameter pack X. See through ARGUMENT_PACK_SELECT when the
1241 PARM_DECL is a parameter pack.
1242 (tsubst_expr): Expression pack expansions and argument packs
1243 cannot show up here; they will all be handled through function
1244 calls, sizeof, and template argument lists.
1245 (tsubst_copy_and_build): sizeof(X...) returns the number of
1246 elements in parameter pack X. Handle pack expansions in TREE_LIST
1247 and CONSTRUCTOR nodes.
1248 (fn_type_unification): Handle "incomplete" explicit template
1249 argument lists that specify some of the arguments for a template
1251 (type_unification_real): Unify arguments against pack expansions.
1252 (template_parm_level_and_index): New, helper function.
1253 (unify_pack_expansion): New.
1254 (unify): Unify argument packs on an argument-by-argument basis,
1255 handling variadic argument packs as well.
1256 (more_specialized_fn): Handle unification of function parameter
1257 packs. All things being equal, prefer non-variadic function
1258 templates to variadic function templates.
1259 (more_specialized_class): Prefer the variadic class template
1260 partial specialization that binds fewer arguments to a parameter
1262 (regenerate_decl_from_template): Expand function parameter packs
1263 into separate parameters.
1264 (instantiate_decl): Ditto.
1265 (tsubst_initializer_list): Handle pack expansions for base-class
1267 (dependent_type_p_r): Determine dependent types in argument packs
1268 and pack expansions.
1269 (value_dependent_expression_p): Determine value-dependence of
1270 non-type argument packs.
1271 (dependent_template_arg_p): Handle argument packs.
1272 * semantics.c (finish_cond): Check for bare parameter packs.
1273 (finish_expr_stmt): Ditto.
1274 (finish_for_expr): Ditto.
1275 (finish_switch_cond): Ditto.
1276 (finish_mem_initializers): Ditto.
1277 * name-lookup.c (arg_assoc_type): Handle pack expansions and
1279 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
1280 * parser.c (make_declarator): Declarator is not an expansion.
1281 (make_pointer_declarator): Transfer parameter pack flag to outer
1283 (make_reference_declarator): Ditto.
1284 (make_ptrmem_declarator): Ditto.
1285 (make_call_declarator): Ditto.
1286 (make_array_declarator): Ditto.
1287 (cp_parser_postfix_expression): Allow pack expansion expressions
1288 in the argument list for a call expression.
1289 (cp_parser_parenthesized_expression_list): Add new parameter
1290 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
1291 into separate arguments."
1292 (cp_parser_new_placement): Allow pack expansion expressions.
1293 (cp_parser_new_initializer): Ditto.
1294 (cp_parser_mem_initializer_list): Allow ellipsis to create a
1295 base-class initializer expansion.
1296 (cp_parser_mem_initializer): Ditto.
1297 (cp_parser_template_parameter_list): Keep track of whether the
1298 template parameter is a template parameter pack.
1299 (cp_parser_template_parameter): Parse the ellipsis to indicate a
1300 template parameter pack.
1301 (cp_parser_type_parameter): Ditto.
1302 (cp_parser_template_argument_list): Parse the ellipsis to indicate
1304 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
1305 this declarator is a parameter pack.
1306 (cp_parser_parameter_declaration): The ellipsis does not end the
1307 parameter declaration, because it might be a parameter pack. Parse
1308 the ellipsis to indicate a parameter pack.
1309 (cp_parser_initializer): Allow pack expansions.
1310 (cp_parser_initializer_list): Allow ellipsis to create an
1311 initializer expansion.
1312 (cp_parser_base_clause): Allow ellipsis to create a base specifier
1314 (cp_parser_type_id_list): Allow ellipsis to create an exception
1315 specifier expansion.
1316 (cp_parser_attribute_list): Don't allow pack expansions.
1317 (cp_parser_functional_cast): Allow pack expansions.
1318 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
1319 compute the length of a parameter pack.
1320 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
1321 end a template argument.
1322 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1323 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1326 2007-03-09 Dirk Mueller <dmueller@suse.de>
1328 * cp/call.c (build_new_op): Call warn_logical_operator.
1330 2007-03-08 Volker Reichelt <reichelt@netcologne.de>
1333 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
1336 * pt.c (any_template_arguments_need_structural_equality_p):
1339 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
1341 * decl.c (grokdeclarator): Disable warnings for anonymous
1344 2007-03-05 Volker Reichelt <reichelt@netcologne.de>
1346 * typeck2.c (readonly_error): Always emit a hard error.
1347 Remove last argument.
1348 * cp-tree.h (readonly_error): Adjust prototype.
1349 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
1350 * typeck.c (build_unary_op): Likewise.
1351 (build_modify_expr): Likewise.
1353 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
1356 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
1358 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1361 * parser.c (struct cp_parser): New IN_IF_STMT.
1362 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
1363 returning if parsing the body of an 'if' statement or issuing an
1364 error and continuing.
1365 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
1367 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
1369 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
1372 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
1375 2007-03-02 Geoffrey Keating <geoffk@apple.com>
1377 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
1378 Objective-C++. Don't exit early if -shared-libgcc needs to be
1381 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1383 * typeck.c (common_base_type): Delete unused function.
1385 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
1387 * Make-lang.in: Add dummy lang.install-pdf target.
1389 2007-03-01 Simon Baldwin <simonb@google.com>
1392 * decl.c (check_tag_decl): Added new warning for typedef ignored
1393 when it precedes an otherwise valid non-typedef declaration.
1395 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
1397 * typeck.c (build_function_call): Store converted arguments
1398 in a stack-allocated array instead of building a list.
1399 (convert_arguments): Store arguments in the array passed in as an
1400 argument, and return the actual number of arguments.
1401 * call.c (build_call): Delete, and replace with...
1402 (build_call_n, build_call_a): New.
1403 (build_op_delete_call): Rewrite to avoid constructing argument lists.
1404 (build_over_call): Store converted arguments in a stack-allocated
1405 array instead of building a list.
1406 (build_cxx_call): Pass arguments in an array instead of as a list.
1407 (build_java_interface_fn_ref): Rewrite to avoid constructing
1409 * tree.h: Update declarations to reflect above changes.
1410 * method.c (use_thunk): Use a stack-allocated array to hold
1411 the arguments instead of a list.
1412 * rtti.c (throw_bad_cast): Update call to cxx_call.
1413 (throw_bad_typeid): Likewise.
1414 (build_dynamic_cast_1): Likewise.
1415 * init.c (build_builtin_delete_call): Use build_call_n.
1416 * decl.c (expand_static_init): Likewise.
1417 * except.c (cp_protect_cleanup_actions): Likewise.
1418 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
1419 (gimplify_must_not_throw_expr): Likewise.
1420 (cxx_omp_apply_fn): Use build_call_a.
1422 2007-02-26 Mark Mitchell <mark@codesourcery.com>
1424 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
1425 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
1427 2007-02-25 Mark Mitchell <mark@codesourcery.com>
1429 * cp-tree.h (static_ctors): Remove.
1430 * cp-tree.h (static_dtors): Likewise.
1431 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
1432 refactoring of tree_map hierarchy.
1433 (decl_shadowed_for_var_insert): Likewise.
1434 * semantics.c (expand_body): Use c_expand_body.
1435 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
1436 * decl2.c (static_ctors): Remove.
1437 (static_dtors): Likewise.
1438 (generate_ctor_or_dtor_function): Pass NULL_TREE to
1439 objc_generate_static_init_call. Do not call static_[cd]tors.
1440 (generate_ctor_and_dtor_functions_for_priority): Do not check for
1442 (cp_write_global_declarations): Likewise.
1444 2007-02-23 Richard Guenther <rguenther@suse.de>
1446 * class.c (note_name_declared_in_class): Make declaration
1447 changes meaning a pedwarn.
1449 2007-02-22 Michael Matz <matz@suse.de>
1452 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
1453 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
1454 dump_function_decl): Guard emitting outer scopes by new flag.
1455 * cp-lang.c (cxx_dwarf_name): New function.
1456 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
1457 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
1459 (push_template_decl_real, lookup_template_class): Remove calls
1462 2007-02-19 Mark Mitchell <mark@codesourcery.com>
1464 * call.c (build_new_method_call): Ensure that explicit calls of
1465 destructors have type "void".
1467 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1469 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
1470 and -Walways-true with -Waddress.
1471 * cvt.c (convert_to_void): Replace unconditional warning with
1474 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
1476 * decl.c, tree.c: Fix comment typos.
1478 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1481 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
1482 statement expression if we had an error mark node.
1484 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
1485 Brooks Moses <brooks.moses@codesourcery.com>
1486 Lee Millward <lee.millward@codesourcery.com>
1488 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
1489 Change class to tcc_vl_exp.
1491 * call.c (build_call): Use build_call_list instead
1493 (build_over_call): Likewise.
1494 (build_new_method_call): Use build_min_non_dep_call_list
1495 instead of build_min_non_dep.
1497 * error.c (dump_call_expr_args): New function.
1498 (dump_aggr_init_expr_args): New function.
1499 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
1500 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
1502 * cvt.c (convert_to_void): Use build_call_array instead
1503 of build3; use new AGGR_INIT_EXPR accessor macros.
1505 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
1506 instead of TREE_CODE_LENGTH.
1508 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
1509 AGGR_INIT_EXPR accessor macros.
1511 * cp-gimplify.c (cp_gimplify_init_expr): Use
1512 AGGR_INIT_EXPR_SLOT to set the slot operand.
1514 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
1515 (AGGR_INIT_EXPR_SLOT): New macro.
1516 (AGGR_INIT_EXPR_ARG): New macro.
1517 (aggr_init_expr_nargs): New macro.
1518 (AGGR_INIT_EXPR_ARGP): New macro.
1519 (aggr_init_expr_arg_iterator): New.
1520 (init_aggr_init_expr_arg_iterator): New.
1521 (next_aggr_init_expr_arg): New.
1522 (first_aggr_init_expr_arg): New.
1523 (more_aggr_init_expr_args_p): New.
1524 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
1525 (stabilize_aggr_init): New declaration.
1526 (build_min_non_dep_call_list): Likewise.
1528 * tree.c (process_aggr_init_operands): New function.
1529 (build_aggr_init_array) New function.
1530 (build_cplus_new): Update to use new CALL_EXPR and
1531 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
1532 build_aggr_init_array.
1533 (build_min_non_dep_call_list) New function.
1534 (build_min_nt): Assert input code parameter is not a variable
1535 length expression class.
1536 (build_min, build_min_non_dep): Likewise.
1537 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
1538 to check for equality instead of recursing. Handle tcc_vl_exp
1540 (stabilize_call): Update to only handle CALL_EXPRs, not
1541 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
1542 (stabilize_aggr_init): New function.
1543 (stabilize_init): Use it.
1545 * cxx-pretty-print.c (pp_cxx_postfix_expression)
1546 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
1547 AGGR_INIT_EXPR accessor macros and argument iterators.
1549 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
1550 build_vl_exp. Iterate through the operands, recursively
1551 processing each one.
1552 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
1553 CALL_EXPR accessor macros.
1554 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
1555 tree code classes. Use TREE_OPERAND_LENGTH instead of
1558 * semantics.c (finish_call_expr): Use build_nt_call_list
1559 instead of build_nt.
1560 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
1561 accessor macros. Use build_call_array to construct the
1562 CALL_EXPR node instead of build3
1564 * decl2.c (build_offset_ref_call_from_tree): Use
1565 build_nt_call_list and build_min_non_dep_call_list instead
1566 of build_min_nt and build_min_non_dep.
1568 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
1569 Use build_nt_call_list instead of build_min_nt.
1571 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1574 * call.c (build_conditional_expr): Improve error message.
1576 2007-02-13 Dirk Mueller <dmueller@suse.de>
1578 * friend.c (do_friend): Annotate warning about friend
1579 declarations in templates with OPT_Wnon_template_friend.
1580 Convert informal message from warning() to inform().
1582 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
1583 Mark Mitchell <mark@codesourcery.com>
1586 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
1587 instantiations for variables.
1589 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1592 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
1593 Check warn_unused_value just once.
1595 2007-02-11 Mark Mitchell <mark@codesourcery.com>
1598 * pt.c (determine_specialization): Use skip_artificial_parms_for.
1599 (fn_type_unificiation): Likewise.
1600 (get_bindings): Likewise.
1602 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
1605 * decl.c (finish_function): Use DECL_REPLACEABLE.
1606 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1608 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
1610 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
1612 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
1614 * decl.c (grokvardecl): Don't error if !have_tls.
1615 (grokdeclarator): Likewise.
1616 * parser.c (cp_parser_omp_threadprivate): Likewise.
1618 2007-02-07 Jakub Jelinek <jakub@redhat.com>
1621 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
1622 parameters and result decls in omp clauses.
1623 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
1626 2007-02-05 Dirk Mueller <dmueller@suse.de>
1629 * parser.c (cp_parser_class_specifier): Always initialize bases.
1631 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
1633 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
1634 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
1635 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
1637 * semantics.c (finish_omp_atomic): Store a whole expression node
1638 in operand 1, and integer_zero_node in operand 0, for dependent
1639 OMP_ATOMIC. Rewrite to make flow easier to understand.
1641 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1643 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
1645 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
1647 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
1648 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
1650 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
1652 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
1653 keyword warning to -Wc++0x-compat.
1655 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1657 * decl.c (grokdeclarator): Update documentation.
1659 2007-02-02 Jakub Jelinek <jakub@redhat.com>
1662 * decl.c (grokdeclarator): If __thread is used together with
1663 a storage class other than extern and static, clear thread_p
1664 after issuing diagnostics and fall through to checking the
1667 2007-01-30 Roger Sayle <roger@eyesopen.com>
1669 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
1670 calculating the size of an array (to avoid recursive errors).
1672 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1675 * typeck.c (build_binary_op): Fix logic for warning. Move warning
1677 * call.c (convert_like_real): Don't warn when converting to
1680 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1682 * decl.c (pop_label): Replace warning with call to
1683 warn_for_unused_label.
1685 2007-01-28 Andrew Pinski <pinskia@gmail.com>
1688 * semantics.c (finish_pseudo_destructor_expr): Check the
1689 destrutor name by calling check_dtor_name.
1691 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
1693 * lex.c (D_CPP0X): Rename.
1695 (reswords): D_CPP0X -> D_CXX0X.
1696 (init_reswords): Ditto.
1697 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
1698 of C++0x keywords as identifiers.
1700 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
1703 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
1706 2007-01-23 Ian Lance Taylor <iant@google.com>
1708 * typeck.c (convert_for_assignment): Only warn about a = b = c
1709 when converting to bool.
1711 2007-01-23 Roger Sayle <roger@eyesopen.com>
1713 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
1715 * typeck.c (ignore_overflows): Remove the remaining uses of
1716 TREE_CONSTANT_OVERFLOW.
1718 2007-01-20 Jan Hubicka <jh@suse.cz>
1720 * decl2.c (start_objects, start_static_storage_duration_function):
1721 Do not make the functions uninlinable.
1723 2007-01-17 Ian Lance Taylor <iant@google.com>
1725 * class.c (add_method): Call VEC_reserve_exact rather than passing
1726 a negative size to VEC_reserve.
1728 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
1731 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
1733 2007-01-10 Mark Mitchell <mark@codesourcery.com>
1736 * decl.c (make_typename_type): If the qualified name is not a
1737 type, issue an error.
1738 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
1741 2007-01-08 Geoffrey Keating <geoffk@apple.com>
1743 * rtti.c: Include target.h.
1744 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
1745 don't emit typeinfo for fundamental types as weak.
1746 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
1748 2007-01-08 Richard Guenther <rguenther@suse.de>
1750 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
1752 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
1754 * call.c (standard_conversion): Pass flag to
1755 vector_types_convertible_p to disallow emission of note.
1756 * typeck.c (convert_for_assignment): Pass flag to
1757 vector_types_convertible_p to allow emission of note.
1758 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
1759 to disallow emission of note.
1761 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1764 * typeck.c (build_binary_op): Call overflow_warning if
1765 TREE_OVERFLOW_P is true for the result and not for any of the
1768 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
1771 * class.c (add_method): Don't wait until template
1772 instantiation time to complain about duplicate methods.
1774 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1777 * semantics.c (finish_unary_op_expr): Warn only if result
1778 overflowed and operands did not.
1780 2007-01-05 Ian Lance Taylor <iant@google.com>
1782 * typeck.c (build_binary_op): Warn about comparing a non-weak
1785 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
1787 * pt.c (tsubst): Propagate the need for structural equality checks
1788 when reducing the level of template parameters.
1790 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
1792 * pt.c: Fix a comment typo.
1794 2007-01-02 Ian Lance Taylor <iant@google.com>
1796 * semantics.c (maybe_convert_cond): Optionally warn when using an
1797 assignment as a condition.
1798 * typeck.c (convert_for_assignment): Optionally warn about
1799 assigning the result of an assignment to a bool.
1801 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
1803 * pt.c (canonical_template_parms): Correct typo in comment.
1805 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
1807 * typeck.c (structural_comptypes): Renamed from "comptypes".
1808 (comptypes): Use canonical type information to perform fast type
1809 comparison. When VERIFY_CANONICAL_TYPES, verify that the
1810 canonical type comparison returns the same results as we would see
1811 from the current, structural check. Support COMPARE_STRUCTURAL
1812 when we need structural checks.
1813 * decl.c (typename_compare): Fix comment.
1814 (build_typename_type): TYPENAME_TYPE nodes require structural
1815 equality checks, because they resolve different based on the
1817 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
1818 require structural equality checks (for now).
1819 (build_ptrmemfunc_type): Build the canonical pointer to member
1821 (compute_array_index_type): Whenever we build a new index type
1822 to represent the size of an array in a template, we need to mark
1823 this index type as requiring structural equality. This goes for
1824 arrays with value-dependent sizes with the current ABI, or all
1826 * tree.c (cplus_array_hash): New.
1827 (struct cplus_array_info): New.
1828 (cplus_array_compare): New.
1829 (cplus_array_htab): New.
1830 (build_cplus_array_type_1): Use a hash table to cache the array
1831 types we build. Build the canonical array type for each array
1833 (cp_build_qualified_type_real): When building a cv-qualified array
1834 type, use the hash table of array types and build canonical array
1836 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
1837 use structural equality (for now).
1838 * cp-tree.h (COMPARE_STRUCTURAL): New.
1839 * pt.c (canonical_template_parms): New.
1840 (canonical_type_parameter): New.
1841 (process_template_parm): Find the canonical type parameter.
1842 (lookup_template_class): When we have named the primary template
1843 type, set the canonical type for our template class to the primary
1844 template type. If any of the template arguments need structural
1845 equality checks, the template class needs structural equality
1847 (tsubst): When reducing the level of a template template
1848 parameter, we require structural equality tests for the resulting
1849 parameter because its template parameters have not had their types
1850 canonicalized. When reducing a template type parameter, find the
1851 canonical reduced type parameter.
1852 (any_template_arguments_need_structural_equality_p): New.