1 2007-08-11 Ian Lance Taylor <iant@google.com>
3 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
5 * cp/cp-tree.h (cxx_get_alias_set): Update declaration.
7 2007-08-10 Ollie Wild <aaw@google.com>
9 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
11 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
13 (unqualified_namespace_lookup): Fix ambiguous_decl call.
14 (lookup_using_namespace): Fix ambiguous_decl call.
15 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
17 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19 * call.c (name_as_c_string): Use CONST_CAST.
20 * decl.c (build_decl): Likewise.
21 * parser.c (cp_parser_string_literal): Likewise.
23 2007-08-10 Paolo Carlini <pcarlini@suse.de>
26 * error.c (dump_expr): Consistently use the *_cxx_*
27 variants of the pretty-print functions.
29 2007-08-10 Paolo Carlini <pcarlini@suse.de>
32 * decl.c (check_special_function_return_type): Just error
33 on return type specified for conversion operator.
35 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
37 * typeck2.c (readonly_error): Handle general expressions.
38 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
40 2007-08-06 Dan Hipschman <dsh@google.com>
42 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
45 2007-08-04 Alfred Minarik <a.minarik@aon.at>
48 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
49 * g++spec.c (lang_specific_driver): Check them.
51 2007-08-06 Paolo Carlini <pcarlini@suse.de>
54 * pt.c (template_class_depth): Fix comment; change return type
57 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
60 2007-03-26 Dirk Mueller <dmueller@suse.de>
62 * parser.c (cp_parser_member_declaration): Pedwarn
63 about stray semicolons after member declarations.
65 2007-08-02 Lee Millward <lee.millward@gmail.com>
70 * parser.c (cp_parser_asm_definition): Detect and discard asm
71 statements with invalid inputs or outputs.
72 (cp_parser_asm_operand_list): Return error mark node if any
73 of the operands are invalid. Adjust documentation.
75 2007-08-02 Nick Clifton <nickc@redhat.com>
77 * typeck.c: Change copyright header to refer to version 3 of the
78 GNU General Public License and to point readers at the COPYING3
79 file and the FSF's license web page.
80 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
81 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
82 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
83 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
84 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
85 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
86 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
87 name-lookup.h, parser.c: Likewise.
89 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
92 * call.c (magic_varargs_p): Honor the "type generic" attribute.
94 2007-07-30 Paolo Carlini <pcarlini@suse.de>
97 * semantics.c (finish_label_stmt): Reject the __label__
98 extension outside function scopes.
100 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
102 * parser.c (eof_token): Un-constify.
103 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
104 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
107 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
109 * pt.c, tree.c, typeck2.c: Fix comment typos.
111 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
112 Mark Mitchell <mark@codesourcery.com>
115 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
116 hidden due to friend declarations in local classes.
118 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
120 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
121 * cp-tree.def (DECLTYPE_TYPE): New.
122 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
123 (dump_type_prefix): Ditto.
124 (dump_type_suffix): Ditto.
125 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
126 * mangle.c (write_type): Handle DECLTYPE_TYPE.
127 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
129 (DECLTYPE_TYPE_EXPR): New.
130 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
131 (finish_declared_type): Declare.
132 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
134 (pp_cxx_type_id): Ditto.
135 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
136 (tsubst): Substitute into a DECLTYPE_TYPE node.
137 (tsubst_copy): Ditto.
138 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
140 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
141 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
142 structural equality (because we can't hash the expressions).
143 (finish_declared_type): New.
144 * lex.c (reswords): Add "decltype" keyword.
145 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
146 (cp_parser_postfix_expression): Add member_access_only_p to
147 restrict postfix expression to member access expressions.
148 (cp_parser_unary_expression): Update call to
149 cp_parser_postfix_expression to reflect new parameter.
150 (cp_parser_declared_type): New.
151 (cp_parser_simple_type_specifier): Parse decltype types.
153 2007-07-27 Mark Mitchell <mark@codesourcery.com>
156 * call.c (convert_for_arg_passing): Only widen bitfields to their
157 declared types if necessary.
159 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
161 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
164 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
166 * decl.c (typename_hash, typename_compare): Constify.
167 * mangle.c (hash_type, compare_type): Likewise.
168 * pt.c (eq_local_specializations, hash_local_specialization):
170 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
171 list_hash): Likewise.
172 * typeck2.c (pat_compare): Likewise.
174 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
176 * method.c (implicitly_declare_fn): Increase alignment if member
177 function pointer format requires it.
179 2007-07-24 Paolo Carlini <pcarlini@suse.de>
182 * typeck.c (check_return_expr): Do not pass a null argument
185 2007-07-24 Paolo Carlini <pcarlini@suse.de>
188 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
191 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
194 * typeck.c (convert_arguments): Only use default args if we have
198 * typeck.c (structural_comptypes): No need to check
199 resolve_typename_type return value here.
200 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
201 * pt.c (resolve_typename_type): Follow typename typedefs. Return
202 original type rather than error_mark_node in case of failure.
203 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
204 resolve_typename_type result check.
205 (cp_parser_direct_declarator, cp_parser_head,
206 cp_parser_constructor_declarator_p): Likewise.
208 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
210 * pt.c (template_parms_variadic_p): Remove.
211 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
213 2007-07-12 Jakub Jelinek <jakub@redhat.com>
216 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
217 argument to dump_aggr_init_expr_args instead of false.
219 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
221 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
222 canonical types; otherwise, fall back to structural type
223 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
224 internal compiler error if the canonical types are wrong.
226 2007-07-11 Paolo Carlini <pcarlini@suse.de>
229 * parser.c (cp_parser_make_indirect_declarator): When the
230 the code argument is ERROR_MARK return cp_error_declarator.
232 2007-07-09 Geoffrey Keating <geoffk@apple.com>
235 * decl.c (cxx_init_decl_processing): Don't set
236 force_align_functions_log.
237 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
238 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
239 FUNCTION_DECL, return its alignment.
241 2007-07-09 Richard Guenther <rguenther@suse.de>
243 * decl.c (start_preparsed_function): Do not promote return type.
245 2007-07-08 Paolo Carlini <pcarlini@suse.de>
248 * pt.c (unify): Never pass error_mark_node to template_decl_level.
250 2007-07-07 Mark Mitchell <mark@codesourcery.com>
253 * pt.c (resolve_overloaded_unification): Robustify. Return a
255 (type_unification_real): Adjust accordingly.
257 2007-07-06 Richard Guenther <rguenther@suse.de>
259 * init.c (build_new_1): Use the correct pointer type.
260 * typeck2.c (build_m_component_ref): Likewise.
262 2007-07-05 Mark Mitchell <mark@codesourcery.com>
265 * init.c (build_zero_init): Always build an initializer for
267 * typeck2.c (build_functional_cast): Use build_zero_init.
270 * init.c (build_new_1): Always pass the allocation function to
271 build_op_delete_call.
272 * call.c (build_op_delete_call): Handle operator delete with a
273 variable-argument list. Do not issue an error when no matching
274 deallocation function is available for a new operator.
277 * cp-tree.h (any_value_dependent_elements_p): Declare it.
278 * decl.c (value_dependent_init_p): New function.
279 (cp_finish_decl): Use it.
280 * pt.c (value_dependent_expression_p): Use
281 any_value_dependent_elements_p.
282 * parser.c (cp_parser_primary_expression): Add comment about
283 treating dependent qualified names as integral
284 constant-expressions.
286 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
288 * decl.c (build_ptrmemfunc_type): Always use structural equality
289 tests when comparing pointer-to-member-function types, because the
290 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
293 2007-07-03 Mark Mitchell <mark@codesourcery.com>
295 * init.c (build_new): Tweak comment.
297 2007-06-29 Dave Brolley <brolley@redhat.com>
300 * parser.c (cp_parser_new_type_id): Don't reduce a named array
301 type to its base type and number of elements here.
302 * init.c (build_new): Call complete_type_or_else to ensure that the
303 type is complete and to issue a diagnostic if it is not.
304 (build_new_1): Don't call complete_type_or_else here.
306 2007-07-03 Richard Guenther <rguenther@suse.de>
309 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
312 2007-07-02 Simon Baldwin <simonb@google.com>
314 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
315 for inner-style nested forward declarations that don't declare
318 2007-07-02 Jakub Jelinek <jakub@redhat.com>
321 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
322 DECL_P in not a variable and appears more than once error messages.
324 2007-07-01 Ollie Wild <aaw@google.com>
326 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
327 (select_decl): Remove function.
328 (unqualified_namespace_lookup): Populate binding by calling
329 ambiguous_decl. Remove select_decl call.
330 (lookup_qualified_name): Remove select_decl call.
331 * decl.c (lookup_and_check_tag): Check for ambiguous references.
332 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
333 generation when name lookup is ambiguous.
335 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
338 * init.c (build_new_1): Use structural equality on the copy of the
341 2007-06-28 Geoffrey Keating <geoffk@apple.com>
343 * decl2.c (determine_visibility): Implement
344 flag_visibility_ms_compat effect on type info.
345 * decl.c (cxx_init_decl_processing): Implement
346 global effect of flag_visibility_ms_compat.
348 2007-06-28 Geoffrey Keating <geoffk@apple.com>
350 * decl2.c (start_objects): Mark constructor-running function
353 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
356 * decl.c (grokdeclarator): Reset friendp for member functions declared
357 friend of their own class.
359 2007-06-23 Mark Mitchell <mark@codesourcery.com>
361 * decl2.c (determine_visibility): Don't look for dllexport here.
362 (determine_visibility_from_class): Tidy.
364 2007-06-18 Simon Baldwin <simonb@google.com>
367 * parser.c (cp_parser_single_declaration): Added check for storage
368 class other than sc_none in parsed declaration, and a flag to indicate
369 if the call is part of an explicit template specialization parse.
370 * (cp_parser_explicit_specialization): Specialization check flag added
371 to call to cp_parser_single_declaration(), set true.
372 * (cp_parser_template_declaration_after_export): Specialization check
373 flag added to call to cp_parser_single_declaration(), set false.
374 * pt.c (check_explicit_specialization): Added code to copy visiblity
375 and linkage from the templated function to the explicit specialization.
377 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
379 * typeck.c (build_binary_op): For templates build the
380 expression in pieces to avoid the assert in build2_stat.
381 (get_member_function_from_ptrfunc):
382 Change over to using POINTER_PLUS_EXPR and convert
383 the second operand to sizetype.
384 * typeck2.c (build_m_component_ref): Likewise.
385 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
386 instead of PLUS_EXPR for pointers.
387 (build_new_1): Likewise.
388 (build_vec_delete_1): Likewise.
389 (build_vec_delete): Likewise.
390 * class.c (build_base_path): Likewise.
391 (build_base_path): Likewise.
392 (convert_to_base_statically): Likewise.
393 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
394 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
395 instead of PLUS_EXPR.
396 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
397 instead of PLUS_EXPR for pointers.
398 * call.c (build_special_member_call): Likewise.
399 * rtti.c (build_headof): Likewise.
400 Use sizetype instead of ptrdiff_type_node.
401 (tinfo_base_init): Create a POINTER_PLUS_EXPR
402 instead of PLUS_EXPR for pointers.
403 * except.c (expand_start_catch_block): Do a
404 NEGATIVE and then a POINTER_PLUS_EXPR instead
406 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
407 PLUS_EXPR on pointer types over to use
408 POINTER_PLUS_EXPR and remove the conversion
409 to the pointer types.
410 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
411 adding to a pointer type. Use size_int instead of
412 ssize_int. Convert the index to sizetype before
413 adding it to the pointer.
415 2007-06-15 Mark Mitchell <mark@codesourcery.com>
417 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
418 (DECL_ANON_UNION_VAR_P): New macro.
419 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
420 than DECL_VAR_MARKED_P, to keep track of which variables we have
422 * decl.c (redeclaration_error_message): Complain about redeclaring
423 anonymous union members at namespace scope.
424 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
426 2007-06-14 Geoff Keating <geoffk@apple.com>
428 * decl2.c (determine_visibility): Ensure that functions with
429 hidden types as parameters are hidden.
432 * decl2.c (determine_visibility): Remove duplicate code for
435 2007-06-12 Ian Lance Taylor <iant@google.com>
438 * init.c (avoid_placement_new_aliasing): New static function.
439 (build_new_1): Call it.
441 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
443 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
444 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
446 2007-06-08 Jakub Jelinek <jakub@redhat.com>
449 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
450 on init, the non-decl cond operand and increment value.
452 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
455 * decl.c (check_initializer): Report an error when a brace enclosed
456 initializer is used for a non-aggregate type in C++98.
457 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
459 (grokdeclarator): Likewise.
460 (move_fn_p): Likewise.
461 * typeck.c (check_return_expr): Likewise.
462 * call.c (reference_binding): Likewise.
463 * error.c (cp_cpp_error): Likewise.
464 * pt.c (check_default_tmpl_args): Likewise.
466 * lex.c (init_reswords): Likewise.
467 * parser.c (p_parser_primary_expression): Likewise.
468 (TOKEN_PRECEDENCE): Likewise.
469 (cp_parser_init_declarator): Likewise.
470 (cp_parser_ptr_operator): Likewise.
471 (cp_parser_parameter_declaration): Likewise.
472 (cp_parser_enclosed_template_argument_list): Likewise.
473 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
474 (cp_parser_next_token_ends_template_argument_p): Likewise.
476 2007-06-04 Simon Baldwin <simonb@google.com>
478 * decl.c (grokdeclarator): Readability change. Moved case labels
479 into direct switch statement scope.
481 2007-06-04 Paolo Carlini <pcarlini@suse.de>
483 * call.c (convert_like_real): Remove pointless code.
485 2007-05-31 Mark Mitchell <mark@codesourcery.com>
487 * decl.c (get_atexit_fn_ptr_type): New function.
488 (get_atexit_node): Use it.
489 (start_cleanup_fn): Likewise.
490 (register_dtor_fn): Use the object's destructor, instead of a
491 separate cleanup function, where possible.
492 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
493 (atexit_fn_ptr_type_node): New macro.
494 * decl2.c (build_cleanup): Use build_address.
496 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
498 * typeck.c (build_binary_op): Include types in error.
500 2007-05-31 Jakub Jelinek <jakub@redhat.com>
503 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
504 needs runtime initialization.
506 2007-05-31 Paolo Carlini <pcarlini@suse.de>
509 * semantics.c (finish_trait_expr): Complete the types.
511 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
512 Douglas Gregor <doug.gregor@gmail.com>
513 Pedro Lamarao <pedro.lamarao@mndfck.org>
514 Howard Hinnant <howard.hinnant@gmail.com>
518 * typeck.c (comptypes): Don't consider rvalue and lvalue
519 reference types to be equivalent.
520 (check_return_expr): Move from certain lvalues when returning
522 * decl.c (grokdeclarator): Implement reference collapsing.
523 (copy_fn_p): Don't consider constructors taking rvalue references
524 to be copy constructors.
526 * call.c (conversion): New "rvaluedness_matches_p" member.
527 (convert_class_to_reference): Require reference type as first
528 parameter instead of base type.
529 (reference_binding): Add logic to handle rvalue references.
530 (implicit_conversion): Update inaccurate comment.
531 (convert_like_real): Disable creation of temporaries that are
532 impossible to initialize for types with move constructors.
533 (build_over_call): Elide move constructors when possible.
534 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
535 (maybe_handle_ref_bind): Return conversion instead of type node.
536 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
537 determine preferred conversion sequences.
538 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
539 (LOOKUP_PREFER_RVALUE): New.
540 (DECL_MOVE_CONSTRUCTOR_P): New.
541 (struct cp_declarator): Add "reference" member for reference
542 types, with new "rvalue_ref" flag.
543 (cp_build_reference_type): Declare.
544 (move_fn_p): Declare.
545 * error.c (dump_type_prefix): Format rvalue reference types
546 correctly in error messages.
547 * except.c (build_throw): Move from certain lvalues when
549 * mangle.c (write_type): Mangle rvalue references differently
550 than regular references.
551 * parser.c (make_reference_declarator): Add boolean parameter for
553 (cp_parser_make_indirect_declarator): New.
554 (cp_parser_new_declarator_opt): Call
555 cp_parser_make_indirect_declarator.
556 (cp_parser_conversion_declarator_opt): Ditto.
557 (cp_parser_declarator): Ditto.
558 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
560 * pt.c (tsubst): Implement reference collapsing.
561 (maybe_adjust_types_for_deduction): Implement special template
562 parameter deduction rule for rvalue references.
563 (type_unification_real): Update calls to
564 maybe_adjust_types_for_deduction.
565 (try_one_overload): Ditto.
566 (unify_pack_expansion): Ditto.
567 * tree.c (lvalue_p_1): Handle rvalue reference types.
568 (cp_build_reference_type): New.
570 2007-05-30 Jakub Jelinek <jakub@redhat.com>
573 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
574 variables that need runtime initialization.
576 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
579 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
580 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
581 case POSTDECREMENT_EXPR>): Return the error_mark_node
582 if either the real or imaginary parts would an
585 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
586 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
589 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
590 token is a closing brace, false if there are no tokens left.
591 (cp_parser_namespace_alias_definition): Only consume the next token if
592 it is a closing brace.
594 * parser.c (cp_parser_class_specifier): Likewise.
596 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
598 * semantics.c (finish_member_declaration): Fix a typo in the
601 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
613 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
614 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
615 * pt.c (check_for_bare_parameter_packs): Return bool indicated
616 whether everything was okay. Fix indentation.
617 (push_template_decl_real): Check for bare parameter packs in
618 function parameters; where errors occur, mark the parameter types
619 with ERROR_MARK_NODEs to avert ICEs.
620 (coerce_template_parameter_pack): New.
621 (coerce_template_parms): Moved parameter pack coercion into
622 coerce_template_parameter_pack, and permit it anywhere in the
623 template parameter list (not just at the end). Parameter and
624 argument indices can vary (somewhat) separately now, so add
625 PARM_IDX and ARG_IDX.
626 (fn_type_unification): Don't set an argument pack as incomplete if
627 no argument pack was deduced.
628 (type_unification_real): If a type parameter is a parameter pack
629 and has not otherwise been deduced, it will be deduced to an empty
631 (more_specialized_fn): Use the actual lengths of the argument
632 lists when comparing against expansions.
633 * semantics.c (finish_member_declaration): If a field's type has
634 bare parameter packs, error and set its type to ERROR_MARK_NODE.
636 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
639 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
641 2007-05-22 Ollie Wild <aaw@google.com>
643 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
644 (unqualified_namespace_lookup): Adds check for hidden types.
646 2007-05-22 Ollie Wild <aaw@google.com>
648 * decl.c (duplicate_decls): Verify namespace names are unique.
650 2007-05-21 Mark Mitchell <mark@codesourcery.com>
652 * decl.c (cxx_maybe_build_cleanup): Handle
653 __attribute__((cleanup)).
655 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
657 * cvt.c (cp_convert_and_check): Don't check warnings if the
660 2007-05-18 Geoffrey Keating <geoffk@apple.com>
662 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
664 2007-05-14 Paolo Carlini <pcarlini@suse.de>
667 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
668 type only if is a class type (5.2.8/4).
670 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
672 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
673 * decl.c (grokdeclarator): Use unsigned_type_for instead of
674 c_common_unsigned_type.
676 2007-05-11 Silvius Rus <rus@google.com>
678 * cp/typeck.c (build_indirect_ref): Add call to
679 strict_aliasing_warning.
680 (build_reinterpret_cast_1): Condition call to
681 strict_aliasing_warning.
683 2007-05-11 Jan Hubicka <jh@suse.cz>
685 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
686 * decl2.c (start_objects): ctors and dtors are no longer public.
687 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
689 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
691 * typeck.c (build_unary_op): Remove code that used to
692 handle non lvalue increments/decrements.
694 2007-05-07 Mike Stump <mrs@apple.com>
696 * parser.c (check_empty_body): Add.
697 (cp_parser_iteration_statement): Add call to check_empty_body.
699 2007-05-05 Geoffrey Keating <geoffk@apple.com>
702 * mangle.c (write_mangled_name): Mangle static variable names.
703 (write_unqualified_name): Use local-source-name for
704 namespace-scope static variables.
706 2007-05-04 Dirk Mueller <dmueller@suse.de>
708 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
711 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
714 * decl2.c (constrain_class_visibility):
715 Use strip_pointer_or_array_types instead of strip_array_types.
717 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
720 * decl.c (reshape_init_r): Don't reshape the first element if it
721 is a pointer to member function.
723 2007-04-27 Simon Baldwin <simonb@google.com>
725 * decl.c (grokparms): Changed message format from %qD to %qE.
727 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
729 * error.c (maybe_warn_variadic_templates): Variadic templates are
730 now in C++0x, so only warn about them in C++98 mode.
732 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
735 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
736 integeral types from vectors types.
738 2007-04-26 Jakub Jelinek <jakub@redhat.com>
741 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
742 for type dependent OMP_CLAUSE_DECLs.
744 2007-04-24 Mark Mitchell <mark@codesourcery.com>
747 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
748 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
749 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
750 * init.c (build_zero_init): Adjust, as
751 COMPLEX_TYPE is now a SCALAR_TYPE.
752 * typeck2.c (digest_init): Allow brace-enclosed initializers for
753 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
755 2007-04-25 Paolo Carlini <pcarlini@suse.de>
757 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
758 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
759 (trait_expr_value): Adjust.
761 2007-04-23 Simon Baldwin <simonb@google.com>
763 * decl.c (grokparms): Added new error for duplicate function
764 parameters names in function prototypes, to match gcc behavior.
766 2007-04-23 Jan Hubicka <jh@suse.cz>
768 * cp/decl2.c (finish_objects): Do not call target constructor/destructor
771 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
773 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
774 instead of checking GIMPLE_STMT_P in chain_next.
776 2007-04-17 Mark Mitchell <mark@codesourcery.com>
779 * call.c (convert_for_arg_passing): Convert bitfields to their
782 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
785 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
787 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
791 * cp/decl2.c (constrain_class_visibility):
792 Do not warn about the use of anonymous namespace in the main input file.
794 2007-04-15 Mark Mitchell <mark@codesourcery.com>
796 * cp-tree.h (current_template_parms): Fix typo in comment.
798 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
800 * cp-tree.h, error.c: Fix comment typos.
802 2007-04-13 Jason Merrill <jason@redhat.com>
805 * call.c (reference_binding): Add c_cast_p parm. If true,
806 add quals to TO as needed to make it reference-compatible.
808 2007-04-11 Jan Hubicka <jh@suse.cz>
810 * cp/class.c (convert_to_base_statically): Fold produced tree; verify
811 that we are not processing template_decl.
813 2007-04-09 Mark Mitchell <mark@codesourcery.com>
816 * class.c (build_base_path): Ensure that the converted pointer has
817 the same cv-qualification as the input.
819 2007-04-09 Paolo Carlini <pcarlini@suse.de>
821 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
823 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
825 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
827 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
828 * tree.c (cp_add_pending_fn_decls): Remove.
829 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
831 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
833 Revert change removing staticp.
835 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
837 * cp-objcp-common.c (cxx_staticp): Remove.
838 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
839 * cp-tree.h (cxx_staticp):
841 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
843 * class.c (check_for_override): Don't remove dllmport attribute
846 2007-04-03 Jakub Jelinek <jakub@redhat.com>
849 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
850 type issue error and return early.
852 2007-03-30 Jason Merrill <jason@redhat.com>
855 * typeck.c (cp_type_readonly): New fn.
856 * cp-tree.h: Declare it.
857 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
858 (cp_finish_decl): Not here.
860 2007-03-31 Richard Guenther <rguenther@suse.de>
862 * optimize.c (maybe_clone_body): Replace splay-tree usage by
865 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
870 * parser.c (declarator_can_be_parameter_pack): New.
871 (cp_parser_template_parameter): Only parse the `...' if the
872 declarator can be a parameter pack.
873 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
875 * pt.c (find_parameter_packs_r): Look into the bounds on integer
876 types (they could be used as array bounds).
877 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
878 (tsubst_pack_expansion): Handle failure to expand parameter
881 2007-03-30 Paolo Carlini <pcarlini@suse.de>
884 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
885 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
886 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
887 (CLASS_TYPE_NON_UNION_P): Add.
888 (struct lang_type_class): Add has_complex_dflt.
889 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
890 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
891 * cp-tree.def: Add TRAIT_EXPR.
892 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
893 * lex.c (struct resword): Add __has_nothrow_assign,
894 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
895 __has_trivial_constructor, __has_trivial_copy,
896 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
897 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
898 __is_pod, __is_polymorphic, __is_union.
899 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
900 (cp_parser_trait_expr): New.
901 * semantics.c (finish_trait_expr, trait_expr_value
902 classtype_has_nothrow_copy_or_assign_p): New.
903 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
905 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
906 * class.c (check_bases, check_field_decl, check_bases_and_members):
907 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
908 * pt.c (uses_template_parms, tsubst_copy_and_build,
909 value_dependent_expression_p, type_dependent_expression_p): Deal with
911 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
913 2007-03-29 Richard Guenther <rguenther@suse.de>
915 * tree.c (cp_walk_subtrees): Do not set input_location.
917 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
920 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
923 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
925 * parser.c (struct cp_parser): Update comment for
926 greater_than_is_operator_p.
927 (cp_parser_primary_expression): In C++0x mode, a cast operator can
928 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
929 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
930 !GREATER_THAN_IS_OPERATOR_P.
931 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
932 `>>' operators that will become two `>' tokens in C++0x.
933 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
934 mode, allowing it to terminate default arguments.
935 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
936 `>>' like two consecutive `>' tokens.
937 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
938 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
939 ends a template argument.
941 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
943 * decl.c (redeclaration_error_message): Complain when redeclaring
944 a friend function with default template arguments (C++0x mode only).
945 * cp-tree.h (check_default_tmpl_args): Declare.
946 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
947 template arguments in function templates. Add support for checking
948 the default template arguments of friend templates.
949 (push_template_decl_real): Fix call to check_default_tmpl_args.
950 (type_unification_real): If a template parameter has not been
951 deduced but provides a default template argument, substitute into
952 that default template argument.
953 * parser.c (cp_parser_init_declarator): When declaring (but not
954 defining!) a function template in C++0x mode, check for default
957 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
960 * decl.c (grokdeclarator): Deal with cv-qualified function type
961 typedefs in the same way for member and non-member functions.
963 2007-03-26 Dirk Mueller <dmueller@suse.de>
965 * parser.c (cp_parser_member_declaration): Pedwarn
966 about stray semicolons after member declarations.
968 2007-03-26 Paolo Carlini <pcarlini@suse.de>
971 * pt.c (instantiate_decl): Set in_system_header.
973 2007-03-22 Mark Mitchell <mark@codesourcery.com>
975 * cp-tree.h (current_tempalte_parms): Improve documentation.
976 * pt.c (current_template_args): Likewise.
979 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
980 not consume tokens when failing.
982 2007-03-22 Jim Wilson <wilson@specifix.com>
983 Mark Mitchell <mark@codesourcery.com>
986 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
987 consistent with FROM.
989 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
991 * error.c (dump_expr): Handle dependent names that designate types.
992 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
994 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
996 * cp-tree.def, parser.c, pt.c: Fix comment typos.
998 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1000 * cvt.c (cp_convert_and_check) : Define.
1001 * cp-tree.h (cp_convert_and_check): Declare.
1002 * call.c (convert_conversion_warnings): Rename to
1003 conversion_null_warnings. The warning for floating-point to
1004 integer is handled by convert_and_check in convert_like_real.
1005 (convert_like_real): convert_conversion_warnings was renamed as
1006 conversion_null_warnings.
1007 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
1008 overflow and changes of value during conversion.
1010 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1013 * parser.c (cp_parser_statement): If 'namespace' is found, this
1014 only can be a namespace alias definition, so parse it now.
1015 (cp_parser_namespace_alias_definition): if we find an open brace
1016 instead of '=', then this is actually a misplaced namespace
1019 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1022 * decl.c (cxx_init_decl_processing): Move command-line options
1023 processing to c-opts.c.
1025 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
1027 * ptree.c (cxx_print_type): Use formatting markup for integers
1028 when printing template parameter index/level/orig level.
1029 (cxx_print_xnode): Ditto.
1030 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
1031 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
1032 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
1034 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
1035 rather than a HOST_WIDE_INT.
1036 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
1037 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
1039 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
1040 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
1041 IN_BASE_INITIALIZER bool bitfields.
1042 (struct cp_declarator): Make KIND a 4-bit field. Make
1043 PARAMETER_PACK_P a bool bitfield just after KIND.
1044 * pt.c (uses_parameter_packs): Destroy the pointer set.
1045 (make_pack_expansion): Ditto.
1046 (check_for_bare_parameter_packs): Ditto.
1047 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
1049 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
1052 * call.c (convert_default_arg): Instead of copying the node,
1055 2007-03-15 Dirk Mueller <dmueller@suse.de>
1058 * call.c (convert_conversion_warnings): New..
1059 (convert_like_real): .. factored out from here.
1060 (convert_conversion_warnings): Add warning about
1061 false being converted to NULL in argument passing.
1063 2007-03-14 Dirk Mueller <dmueller@suse.de>
1065 * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
1066 (finish_do_body): Warn about empty body in do/while statement.
1068 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1070 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
1072 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1075 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
1078 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
1080 * cp/repo.c (init_repo): Initialize random_seed saved options.
1081 (finish_repo): Adjust.
1083 2007-03-13 Mark Mitchell <mark@codesourcery.com>
1086 * Make-lang.in (doc/g++.1): Use $< to specify the location from
1089 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
1091 * decl.c (compute_array_index_type): New warning flag warn_vla.
1093 2007-03-12 Mark Mitchell <mark@codesourcery.com>
1096 * call.c (convert_default_arg): Copy non-constant arguments.
1098 2007-03-11 Mark Mitchell <mark@codesourcery.com>
1101 * parser.c (cp_parser_postfix_expression): Disallow compound
1102 literals in constant expressions.
1105 * semantics.c (finish_typeof): Use unlowered_expr_type.
1107 2007-03-10 Mark Mitchell <mark@codesourcery.com>
1110 * cp-tree.h (unlowered_expr_type): New function.
1111 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
1112 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
1113 (unlowered_expr_type): New function.
1114 (build_unary_op): Disallow predecrements of bool bitfields.
1115 * call.c (build_conditional_expr): Use unlowered_expr_type.
1116 * pt.c (type_unification_real): Likewise.
1118 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
1121 * typeck.c (check_return_expr): Check for bare parameter packs.
1122 (comptypes): Compare template parameter packs and
1123 type pack expansions.
1124 * decl.c (grokdeclarator): Deal with the declaration of function
1126 (grokparms): Verify that the (optional) function parameter pack is
1127 at the end of the parameter list.
1128 (xref_basetypes): Handle pack expansions in the base class.
1129 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
1130 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
1131 (NONTYPE_ARGUMENT_PACK): New.
1132 (TYPE_PACK_EXPANSION): New.
1133 (EXPR_PACK_EXPANSION): New.
1134 (ARGUMENT_PACK_SELECT): New.
1135 * cp-objcp-common.c (cp_tree_size): Compute size of
1136 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
1137 ARGUMENT_PACK_SELECT.
1138 * error.c (dump_template_argument): Print template argument packs.
1139 (dump_template_argument_list): Ditto.
1140 (dump_template_parameter): Dump `...' for template type parameter
1142 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
1143 (dump_parameters): Print function parameter packs.
1144 (dump_template_parms): Print template argument packs.
1145 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
1146 (maybe_warn_variadic_templates): New.
1147 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
1148 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1149 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1151 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
1152 (write_template_arg): Write argument packs as separate arguments.
1153 * cp-tree.h (struct template_parm_index_s): Add flag that
1154 indicates that the template parameter is actually a parameter
1156 (struct tree_argument_pack_select): New.
1157 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
1158 (union lang_tree_node): Add argument_pack_select.
1159 (FUNCTION_PARAMETER_PACK_P): New.
1160 (PACK_EXPANSION_P): New.
1161 (PACK_EXPANSION_PATTERN): New.
1162 (SET_PACK_EXPANSION_PATTERN): New.
1163 (PACK_EXPANSION_PARAMETER_PACKS): New.
1164 (ARGUMENT_PACK_P): New.
1165 (ARGUMENT_PACK_ARGS): New.
1166 (SET_ARGUMENT_PACK_ARGS): New.
1167 (ARGUMENT_PACK_INCOMPLETE_P): New.
1168 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
1169 (TEMPLATE_PARM_PARAMETER_PACK): New.
1170 (TEMPLATE_TYPE_PARAMETER_PACK): New.
1171 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
1172 (ARGUMENT_PACK_SELECT_INDEX): New.
1173 (ARGUMENT_PACK_SELECT_ARG): New.
1174 (struct cp_declarator): Add parameter_pack_p flag.
1175 (maybe_warn_variadic_templates): Declare.
1176 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
1177 indicate a template parameter pack.
1178 (uses_parameter_packs): Declare.
1179 (template_parameter_pack_p): Declare.
1180 (template_parms_variadic_p): Declare.
1181 (make_pack_expansion): Declare.
1182 (check_for_bare_parameter_packs): Declare.
1183 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
1184 sizeof... expressions.
1185 (pp_cxx_expression): Print pack expansions and non-type argument
1187 (pp_cxx_exception_specification): Print pack expansions.
1188 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
1189 (pp_cxx_ctor_initializer): Print pack expansions.
1190 (pp_cxx_type_id): Print pack expansions.
1191 (pp_cxx_template_argument_list): Print argument packs.
1192 (pp_cxx_template_parameter): Print ellipsis for template parameter
1194 * pt.c (comp_template_parms): Compare template parameter packs.
1195 (template_parameter_pack_p): New.
1196 (template_parms_variadic_p): New.
1197 (template_args_variadic_p): New.
1198 (make_ith_pack_parameter_name): New.
1199 (struct find_parameter_pack_data): New.
1200 (find_parameter_packs_r): New.
1201 (uses_parameter_packs): New.
1202 (make_pack_expansion): New.
1203 (check_for_bare_parameter_packs): New.
1204 (expand_template_argument_pack): New.
1205 (reduce_template_parm_level): Propagate parameter pack flag.
1206 (process_template_parm): Add is_parameter_pack parameter to state
1207 when the parameter is actually a parameter pack. Create template
1208 parameter packs when is_parameter_pack is true.
1209 (current_template_args): The argument for a template parameter
1210 pack is an argument pack containing a single pack expansion.
1211 (process_partial_specialization): When checking that non-type
1212 argument expressions do not involve template parameters, loop over
1213 the arguments in argument packs separately.
1214 (push_template_decl_real): Check that the type of the declaration
1215 does not have any bare parameter packs. Check that primary
1216 templates have no more than one parameter pack, and that it comes
1217 at the end of the template parameter list.
1218 (convert_template_argument): Handle coercions for pack expansion
1219 expressions by coercing the pattern then rebuilding the expansion.
1220 (coerce_template_parms): When coercing the arguments for a
1221 variadic template, pack "extra" arguments into an argument pack.
1222 (coerce_template_template_parms): Cannot coerce between parameter
1223 packs and non-pack parameters.
1224 (template_args_equal): Compare PACK_EXPANSION_P expressions.
1225 (comp_template_args): Expand all template arguments packs before
1226 comparing template argument lists.
1227 (mangle_class_name_for_template): Make argument packs as separate
1229 (for_each_template_parm_r): No need to handle BASELINK.
1230 (instantiate_class_template): Handle pack expansions in the base
1232 (tsubst_pack_expansion): New.
1233 (tsubst_template_args): Handle substitutions of argument packs and
1234 pack expansion into template argument lists.
1235 (tsubst_decl): Expand function parameter packs into separate
1236 function parameters.
1237 (tsubst_arg_types): Expand a type pack expansion into separate
1239 (tsubst_exception_specification): Handle pack expansions in
1240 exception specifiers.
1241 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
1242 replacing a template parameter with its argument. If we encounter
1243 a substitution for an argument pack, just return the parameter
1245 (tsubst_copy): sizeof(X...) returns the number of elements in
1246 parameter pack X. See through ARGUMENT_PACK_SELECT when the
1247 PARM_DECL is a parameter pack.
1248 (tsubst_expr): Expression pack expansions and argument packs
1249 cannot show up here; they will all be handled through function
1250 calls, sizeof, and template argument lists.
1251 (tsubst_copy_and_build): sizeof(X...) returns the number of
1252 elements in parameter pack X. Handle pack expansions in TREE_LIST
1253 and CONSTRUCTOR nodes.
1254 (fn_type_unification): Handle "incomplete" explicit template
1255 argument lists that specify some of the arguments for a template
1257 (type_unification_real): Unify arguments against pack expansions.
1258 (template_parm_level_and_index): New, helper function.
1259 (unify_pack_expansion): New.
1260 (unify): Unify argument packs on an argument-by-argument basis,
1261 handling variadic argument packs as well.
1262 (more_specialized_fn): Handle unification of function parameter
1263 packs. All things being equal, prefer non-variadic function
1264 templates to variadic function templates.
1265 (more_specialized_class): Prefer the variadic class template
1266 partial specialization that binds fewer arguments to a parameter
1268 (regenerate_decl_from_template): Expand function parameter packs
1269 into separate parameters.
1270 (instantiate_decl): Ditto.
1271 (tsubst_initializer_list): Handle pack expansions for base-class
1273 (dependent_type_p_r): Determine dependent types in argument packs
1274 and pack expansions.
1275 (value_dependent_expression_p): Determine value-dependence of
1276 non-type argument packs.
1277 (dependent_template_arg_p): Handle argument packs.
1278 * semantics.c (finish_cond): Check for bare parameter packs.
1279 (finish_expr_stmt): Ditto.
1280 (finish_for_expr): Ditto.
1281 (finish_switch_cond): Ditto.
1282 (finish_mem_initializers): Ditto.
1283 * name-lookup.c (arg_assoc_type): Handle pack expansions and
1285 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
1286 * parser.c (make_declarator): Declarator is not an expansion.
1287 (make_pointer_declarator): Transfer parameter pack flag to outer
1289 (make_reference_declarator): Ditto.
1290 (make_ptrmem_declarator): Ditto.
1291 (make_call_declarator): Ditto.
1292 (make_array_declarator): Ditto.
1293 (cp_parser_postfix_expression): Allow pack expansion expressions
1294 in the argument list for a call expression.
1295 (cp_parser_parenthesized_expression_list): Add new parameter
1296 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
1297 into separate arguments."
1298 (cp_parser_new_placement): Allow pack expansion expressions.
1299 (cp_parser_new_initializer): Ditto.
1300 (cp_parser_mem_initializer_list): Allow ellipsis to create a
1301 base-class initializer expansion.
1302 (cp_parser_mem_initializer): Ditto.
1303 (cp_parser_template_parameter_list): Keep track of whether the
1304 template parameter is a template parameter pack.
1305 (cp_parser_template_parameter): Parse the ellipsis to indicate a
1306 template parameter pack.
1307 (cp_parser_type_parameter): Ditto.
1308 (cp_parser_template_argument_list): Parse the ellipsis to indicate
1310 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
1311 this declarator is a parameter pack.
1312 (cp_parser_parameter_declaration): The ellipsis does not end the
1313 parameter declaration, because it might be a parameter pack. Parse
1314 the ellipsis to indicate a parameter pack.
1315 (cp_parser_initializer): Allow pack expansions.
1316 (cp_parser_initializer_list): Allow ellipsis to create an
1317 initializer expansion.
1318 (cp_parser_base_clause): Allow ellipsis to create a base specifier
1320 (cp_parser_type_id_list): Allow ellipsis to create an exception
1321 specifier expansion.
1322 (cp_parser_attribute_list): Don't allow pack expansions.
1323 (cp_parser_functional_cast): Allow pack expansions.
1324 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
1325 compute the length of a parameter pack.
1326 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
1327 end a template argument.
1328 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1329 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1332 2007-03-09 Dirk Mueller <dmueller@suse.de>
1334 * cp/call.c (build_new_op): Call warn_logical_operator.
1336 2007-03-08 Volker Reichelt <reichelt@netcologne.de>
1339 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
1342 * pt.c (any_template_arguments_need_structural_equality_p):
1345 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
1347 * decl.c (grokdeclarator): Disable warnings for anonymous
1350 2007-03-05 Volker Reichelt <reichelt@netcologne.de>
1352 * typeck2.c (readonly_error): Always emit a hard error.
1353 Remove last argument.
1354 * cp-tree.h (readonly_error): Adjust prototype.
1355 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
1356 * typeck.c (build_unary_op): Likewise.
1357 (build_modify_expr): Likewise.
1359 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
1362 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
1364 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1367 * parser.c (struct cp_parser): New IN_IF_STMT.
1368 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
1369 returning if parsing the body of an 'if' statement or issuing an
1370 error and continuing.
1371 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
1373 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
1375 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
1378 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
1381 2007-03-02 Geoffrey Keating <geoffk@apple.com>
1383 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
1384 Objective-C++. Don't exit early if -shared-libgcc needs to be
1387 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1389 * typeck.c (common_base_type): Delete unused function.
1391 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
1393 * Make-lang.in: Add dummy lang.install-pdf target.
1395 2007-03-01 Simon Baldwin <simonb@google.com>
1398 * decl.c (check_tag_decl): Added new warning for typedef ignored
1399 when it precedes an otherwise valid non-typedef declaration.
1401 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
1403 * typeck.c (build_function_call): Store converted arguments
1404 in a stack-allocated array instead of building a list.
1405 (convert_arguments): Store arguments in the array passed in as an
1406 argument, and return the actual number of arguments.
1407 * call.c (build_call): Delete, and replace with...
1408 (build_call_n, build_call_a): New.
1409 (build_op_delete_call): Rewrite to avoid constructing argument lists.
1410 (build_over_call): Store converted arguments in a stack-allocated
1411 array instead of building a list.
1412 (build_cxx_call): Pass arguments in an array instead of as a list.
1413 (build_java_interface_fn_ref): Rewrite to avoid constructing
1415 * tree.h: Update declarations to reflect above changes.
1416 * method.c (use_thunk): Use a stack-allocated array to hold
1417 the arguments instead of a list.
1418 * rtti.c (throw_bad_cast): Update call to cxx_call.
1419 (throw_bad_typeid): Likewise.
1420 (build_dynamic_cast_1): Likewise.
1421 * init.c (build_builtin_delete_call): Use build_call_n.
1422 * decl.c (expand_static_init): Likewise.
1423 * except.c (cp_protect_cleanup_actions): Likewise.
1424 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
1425 (gimplify_must_not_throw_expr): Likewise.
1426 (cxx_omp_apply_fn): Use build_call_a.
1428 2007-02-26 Mark Mitchell <mark@codesourcery.com>
1430 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
1431 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
1433 2007-02-25 Mark Mitchell <mark@codesourcery.com>
1435 * cp-tree.h (static_ctors): Remove.
1436 * cp-tree.h (static_dtors): Likewise.
1437 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
1438 refactoring of tree_map hierarchy.
1439 (decl_shadowed_for_var_insert): Likewise.
1440 * semantics.c (expand_body): Use c_expand_body.
1441 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
1442 * decl2.c (static_ctors): Remove.
1443 (static_dtors): Likewise.
1444 (generate_ctor_or_dtor_function): Pass NULL_TREE to
1445 objc_generate_static_init_call. Do not call static_[cd]tors.
1446 (generate_ctor_and_dtor_functions_for_priority): Do not check for
1448 (cp_write_global_declarations): Likewise.
1450 2007-02-23 Richard Guenther <rguenther@suse.de>
1452 * class.c (note_name_declared_in_class): Make declaration
1453 changes meaning a pedwarn.
1455 2007-02-22 Michael Matz <matz@suse.de>
1458 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
1459 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
1460 dump_function_decl): Guard emitting outer scopes by new flag.
1461 * cp-lang.c (cxx_dwarf_name): New function.
1462 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
1463 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
1465 (push_template_decl_real, lookup_template_class): Remove calls
1468 2007-02-19 Mark Mitchell <mark@codesourcery.com>
1470 * call.c (build_new_method_call): Ensure that explicit calls of
1471 destructors have type "void".
1473 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1475 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
1476 and -Walways-true with -Waddress.
1477 * cvt.c (convert_to_void): Replace unconditional warning with
1480 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
1482 * decl.c, tree.c: Fix comment typos.
1484 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1487 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
1488 statement expression if we had an error mark node.
1490 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
1491 Brooks Moses <brooks.moses@codesourcery.com>
1492 Lee Millward <lee.millward@codesourcery.com>
1494 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
1495 Change class to tcc_vl_exp.
1497 * call.c (build_call): Use build_call_list instead
1499 (build_over_call): Likewise.
1500 (build_new_method_call): Use build_min_non_dep_call_list
1501 instead of build_min_non_dep.
1503 * error.c (dump_call_expr_args): New function.
1504 (dump_aggr_init_expr_args): New function.
1505 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
1506 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
1508 * cvt.c (convert_to_void): Use build_call_array instead
1509 of build3; use new AGGR_INIT_EXPR accessor macros.
1511 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
1512 instead of TREE_CODE_LENGTH.
1514 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
1515 AGGR_INIT_EXPR accessor macros.
1517 * cp-gimplify.c (cp_gimplify_init_expr): Use
1518 AGGR_INIT_EXPR_SLOT to set the slot operand.
1520 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
1521 (AGGR_INIT_EXPR_SLOT): New macro.
1522 (AGGR_INIT_EXPR_ARG): New macro.
1523 (aggr_init_expr_nargs): New macro.
1524 (AGGR_INIT_EXPR_ARGP): New macro.
1525 (aggr_init_expr_arg_iterator): New.
1526 (init_aggr_init_expr_arg_iterator): New.
1527 (next_aggr_init_expr_arg): New.
1528 (first_aggr_init_expr_arg): New.
1529 (more_aggr_init_expr_args_p): New.
1530 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
1531 (stabilize_aggr_init): New declaration.
1532 (build_min_non_dep_call_list): Likewise.
1534 * tree.c (process_aggr_init_operands): New function.
1535 (build_aggr_init_array) New function.
1536 (build_cplus_new): Update to use new CALL_EXPR and
1537 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
1538 build_aggr_init_array.
1539 (build_min_non_dep_call_list) New function.
1540 (build_min_nt): Assert input code parameter is not a variable
1541 length expression class.
1542 (build_min, build_min_non_dep): Likewise.
1543 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
1544 to check for equality instead of recursing. Handle tcc_vl_exp
1546 (stabilize_call): Update to only handle CALL_EXPRs, not
1547 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
1548 (stabilize_aggr_init): New function.
1549 (stabilize_init): Use it.
1551 * cxx-pretty-print.c (pp_cxx_postfix_expression)
1552 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
1553 AGGR_INIT_EXPR accessor macros and argument iterators.
1555 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
1556 build_vl_exp. Iterate through the operands, recursively
1557 processing each one.
1558 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
1559 CALL_EXPR accessor macros.
1560 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
1561 tree code classes. Use TREE_OPERAND_LENGTH instead of
1564 * semantics.c (finish_call_expr): Use build_nt_call_list
1565 instead of build_nt.
1566 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
1567 accessor macros. Use build_call_array to construct the
1568 CALL_EXPR node instead of build3
1570 * decl2.c (build_offset_ref_call_from_tree): Use
1571 build_nt_call_list and build_min_non_dep_call_list instead
1572 of build_min_nt and build_min_non_dep.
1574 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
1575 Use build_nt_call_list instead of build_min_nt.
1577 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1580 * call.c (build_conditional_expr): Improve error message.
1582 2007-02-13 Dirk Mueller <dmueller@suse.de>
1584 * friend.c (do_friend): Annotate warning about friend
1585 declarations in templates with OPT_Wnon_template_friend.
1586 Convert informal message from warning() to inform().
1588 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
1589 Mark Mitchell <mark@codesourcery.com>
1592 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
1593 instantiations for variables.
1595 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1598 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
1599 Check warn_unused_value just once.
1601 2007-02-11 Mark Mitchell <mark@codesourcery.com>
1604 * pt.c (determine_specialization): Use skip_artificial_parms_for.
1605 (fn_type_unificiation): Likewise.
1606 (get_bindings): Likewise.
1608 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
1611 * decl.c (finish_function): Use DECL_REPLACEABLE.
1612 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1614 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
1616 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
1618 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
1620 * decl.c (grokvardecl): Don't error if !have_tls.
1621 (grokdeclarator): Likewise.
1622 * parser.c (cp_parser_omp_threadprivate): Likewise.
1624 2007-02-07 Jakub Jelinek <jakub@redhat.com>
1627 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
1628 parameters and result decls in omp clauses.
1629 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
1632 2007-02-05 Dirk Mueller <dmueller@suse.de>
1635 * parser.c (cp_parser_class_specifier): Always initialize bases.
1637 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
1639 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
1640 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
1641 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
1643 * semantics.c (finish_omp_atomic): Store a whole expression node
1644 in operand 1, and integer_zero_node in operand 0, for dependent
1645 OMP_ATOMIC. Rewrite to make flow easier to understand.
1647 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1649 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
1651 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
1653 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
1654 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
1656 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
1658 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
1659 keyword warning to -Wc++0x-compat.
1661 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1663 * decl.c (grokdeclarator): Update documentation.
1665 2007-02-02 Jakub Jelinek <jakub@redhat.com>
1668 * decl.c (grokdeclarator): If __thread is used together with
1669 a storage class other than extern and static, clear thread_p
1670 after issuing diagnostics and fall through to checking the
1673 2007-01-30 Roger Sayle <roger@eyesopen.com>
1675 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
1676 calculating the size of an array (to avoid recursive errors).
1678 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1681 * typeck.c (build_binary_op): Fix logic for warning. Move warning
1683 * call.c (convert_like_real): Don't warn when converting to
1686 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1688 * decl.c (pop_label): Replace warning with call to
1689 warn_for_unused_label.
1691 2007-01-28 Andrew Pinski <pinskia@gmail.com>
1694 * semantics.c (finish_pseudo_destructor_expr): Check the
1695 destrutor name by calling check_dtor_name.
1697 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
1699 * lex.c (D_CPP0X): Rename.
1701 (reswords): D_CPP0X -> D_CXX0X.
1702 (init_reswords): Ditto.
1703 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
1704 of C++0x keywords as identifiers.
1706 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
1709 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
1712 2007-01-23 Ian Lance Taylor <iant@google.com>
1714 * typeck.c (convert_for_assignment): Only warn about a = b = c
1715 when converting to bool.
1717 2007-01-23 Roger Sayle <roger@eyesopen.com>
1719 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
1721 * typeck.c (ignore_overflows): Remove the remaining uses of
1722 TREE_CONSTANT_OVERFLOW.
1724 2007-01-20 Jan Hubicka <jh@suse.cz>
1726 * decl2.c (start_objects, start_static_storage_duration_function):
1727 Do not make the functions uninlinable.
1729 2007-01-17 Ian Lance Taylor <iant@google.com>
1731 * class.c (add_method): Call VEC_reserve_exact rather than passing
1732 a negative size to VEC_reserve.
1734 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
1737 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
1739 2007-01-10 Mark Mitchell <mark@codesourcery.com>
1742 * decl.c (make_typename_type): If the qualified name is not a
1743 type, issue an error.
1744 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
1747 2007-01-08 Geoffrey Keating <geoffk@apple.com>
1749 * rtti.c: Include target.h.
1750 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
1751 don't emit typeinfo for fundamental types as weak.
1752 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
1754 2007-01-08 Richard Guenther <rguenther@suse.de>
1756 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
1758 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
1760 * call.c (standard_conversion): Pass flag to
1761 vector_types_convertible_p to disallow emission of note.
1762 * typeck.c (convert_for_assignment): Pass flag to
1763 vector_types_convertible_p to allow emission of note.
1764 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
1765 to disallow emission of note.
1767 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1770 * typeck.c (build_binary_op): Call overflow_warning if
1771 TREE_OVERFLOW_P is true for the result and not for any of the
1774 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
1777 * class.c (add_method): Don't wait until template
1778 instantiation time to complain about duplicate methods.
1780 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1783 * semantics.c (finish_unary_op_expr): Warn only if result
1784 overflowed and operands did not.
1786 2007-01-05 Ian Lance Taylor <iant@google.com>
1788 * typeck.c (build_binary_op): Warn about comparing a non-weak
1791 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
1793 * pt.c (tsubst): Propagate the need for structural equality checks
1794 when reducing the level of template parameters.
1796 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
1798 * pt.c: Fix a comment typo.
1800 2007-01-02 Ian Lance Taylor <iant@google.com>
1802 * semantics.c (maybe_convert_cond): Optionally warn when using an
1803 assignment as a condition.
1804 * typeck.c (convert_for_assignment): Optionally warn about
1805 assigning the result of an assignment to a bool.
1807 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
1809 * pt.c (canonical_template_parms): Correct typo in comment.
1811 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
1813 * typeck.c (structural_comptypes): Renamed from "comptypes".
1814 (comptypes): Use canonical type information to perform fast type
1815 comparison. When VERIFY_CANONICAL_TYPES, verify that the
1816 canonical type comparison returns the same results as we would see
1817 from the current, structural check. Support COMPARE_STRUCTURAL
1818 when we need structural checks.
1819 * decl.c (typename_compare): Fix comment.
1820 (build_typename_type): TYPENAME_TYPE nodes require structural
1821 equality checks, because they resolve different based on the
1823 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
1824 require structural equality checks (for now).
1825 (build_ptrmemfunc_type): Build the canonical pointer to member
1827 (compute_array_index_type): Whenever we build a new index type
1828 to represent the size of an array in a template, we need to mark
1829 this index type as requiring structural equality. This goes for
1830 arrays with value-dependent sizes with the current ABI, or all
1832 * tree.c (cplus_array_hash): New.
1833 (struct cplus_array_info): New.
1834 (cplus_array_compare): New.
1835 (cplus_array_htab): New.
1836 (build_cplus_array_type_1): Use a hash table to cache the array
1837 types we build. Build the canonical array type for each array
1839 (cp_build_qualified_type_real): When building a cv-qualified array
1840 type, use the hash table of array types and build canonical array
1842 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
1843 use structural equality (for now).
1844 * cp-tree.h (COMPARE_STRUCTURAL): New.
1845 * pt.c (canonical_template_parms): New.
1846 (canonical_type_parameter): New.
1847 (process_template_parm): Find the canonical type parameter.
1848 (lookup_template_class): When we have named the primary template
1849 type, set the canonical type for our template class to the primary
1850 template type. If any of the template arguments need structural
1851 equality checks, the template class needs structural equality
1853 (tsubst): When reducing the level of a template template
1854 parameter, we require structural equality tests for the resulting
1855 parameter because its template parameters have not had their types
1856 canonicalized. When reducing a template type parameter, find the
1857 canonical reduced type parameter.
1858 (any_template_arguments_need_structural_equality_p): New.