1 2007-08-14 Andrew Pinski <pinskia@gmail.com>
4 * typeck.c (build_binary_op): Disallow vector float types with
5 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
7 2007-08-11 Ian Lance Taylor <iant@google.com>
9 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
11 * cp/cp-tree.h (cxx_get_alias_set): Update declaration.
13 2007-08-10 Ollie Wild <aaw@google.com>
15 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
17 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
19 (unqualified_namespace_lookup): Fix ambiguous_decl call.
20 (lookup_using_namespace): Fix ambiguous_decl call.
21 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
23 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
25 * call.c (name_as_c_string): Use CONST_CAST.
26 * decl.c (build_decl): Likewise.
27 * parser.c (cp_parser_string_literal): Likewise.
29 2007-08-10 Paolo Carlini <pcarlini@suse.de>
32 * error.c (dump_expr): Consistently use the *_cxx_*
33 variants of the pretty-print functions.
35 2007-08-10 Paolo Carlini <pcarlini@suse.de>
38 * decl.c (check_special_function_return_type): Just error
39 on return type specified for conversion operator.
41 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
43 * typeck2.c (readonly_error): Handle general expressions.
44 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
46 2007-08-06 Dan Hipschman <dsh@google.com>
48 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
51 2007-08-04 Alfred Minarik <a.minarik@aon.at>
54 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
55 * g++spec.c (lang_specific_driver): Check them.
57 2007-08-06 Paolo Carlini <pcarlini@suse.de>
60 * pt.c (template_class_depth): Fix comment; change return type
63 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
66 2007-03-26 Dirk Mueller <dmueller@suse.de>
68 * parser.c (cp_parser_member_declaration): Pedwarn
69 about stray semicolons after member declarations.
71 2007-08-02 Lee Millward <lee.millward@gmail.com>
76 * parser.c (cp_parser_asm_definition): Detect and discard asm
77 statements with invalid inputs or outputs.
78 (cp_parser_asm_operand_list): Return error mark node if any
79 of the operands are invalid. Adjust documentation.
81 2007-08-02 Nick Clifton <nickc@redhat.com>
83 * typeck.c: Change copyright header to refer to version 3 of the
84 GNU General Public License and to point readers at the COPYING3
85 file and the FSF's license web page.
86 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
87 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
88 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
89 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
90 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
91 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
92 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
93 name-lookup.h, parser.c: Likewise.
95 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
98 * call.c (magic_varargs_p): Honor the "type generic" attribute.
100 2007-07-30 Paolo Carlini <pcarlini@suse.de>
103 * semantics.c (finish_label_stmt): Reject the __label__
104 extension outside function scopes.
106 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
108 * parser.c (eof_token): Un-constify.
109 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
110 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
113 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
115 * pt.c, tree.c, typeck2.c: Fix comment typos.
117 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
118 Mark Mitchell <mark@codesourcery.com>
121 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
122 hidden due to friend declarations in local classes.
124 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
126 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
127 * cp-tree.def (DECLTYPE_TYPE): New.
128 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
129 (dump_type_prefix): Ditto.
130 (dump_type_suffix): Ditto.
131 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
132 * mangle.c (write_type): Handle DECLTYPE_TYPE.
133 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
135 (DECLTYPE_TYPE_EXPR): New.
136 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
137 (finish_declared_type): Declare.
138 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
140 (pp_cxx_type_id): Ditto.
141 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
142 (tsubst): Substitute into a DECLTYPE_TYPE node.
143 (tsubst_copy): Ditto.
144 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
146 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
147 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
148 structural equality (because we can't hash the expressions).
149 (finish_declared_type): New.
150 * lex.c (reswords): Add "decltype" keyword.
151 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
152 (cp_parser_postfix_expression): Add member_access_only_p to
153 restrict postfix expression to member access expressions.
154 (cp_parser_unary_expression): Update call to
155 cp_parser_postfix_expression to reflect new parameter.
156 (cp_parser_declared_type): New.
157 (cp_parser_simple_type_specifier): Parse decltype types.
159 2007-07-27 Mark Mitchell <mark@codesourcery.com>
162 * call.c (convert_for_arg_passing): Only widen bitfields to their
163 declared types if necessary.
165 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
167 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
170 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
172 * decl.c (typename_hash, typename_compare): Constify.
173 * mangle.c (hash_type, compare_type): Likewise.
174 * pt.c (eq_local_specializations, hash_local_specialization):
176 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
177 list_hash): Likewise.
178 * typeck2.c (pat_compare): Likewise.
180 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
182 * method.c (implicitly_declare_fn): Increase alignment if member
183 function pointer format requires it.
185 2007-07-24 Paolo Carlini <pcarlini@suse.de>
188 * typeck.c (check_return_expr): Do not pass a null argument
191 2007-07-24 Paolo Carlini <pcarlini@suse.de>
194 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
197 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
200 * typeck.c (convert_arguments): Only use default args if we have
204 * typeck.c (structural_comptypes): No need to check
205 resolve_typename_type return value here.
206 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
207 * pt.c (resolve_typename_type): Follow typename typedefs. Return
208 original type rather than error_mark_node in case of failure.
209 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
210 resolve_typename_type result check.
211 (cp_parser_direct_declarator, cp_parser_head,
212 cp_parser_constructor_declarator_p): Likewise.
214 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
216 * pt.c (template_parms_variadic_p): Remove.
217 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
219 2007-07-12 Jakub Jelinek <jakub@redhat.com>
222 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
223 argument to dump_aggr_init_expr_args instead of false.
225 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
227 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
228 canonical types; otherwise, fall back to structural type
229 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
230 internal compiler error if the canonical types are wrong.
232 2007-07-11 Paolo Carlini <pcarlini@suse.de>
235 * parser.c (cp_parser_make_indirect_declarator): When the
236 the code argument is ERROR_MARK return cp_error_declarator.
238 2007-07-09 Geoffrey Keating <geoffk@apple.com>
241 * decl.c (cxx_init_decl_processing): Don't set
242 force_align_functions_log.
243 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
244 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
245 FUNCTION_DECL, return its alignment.
247 2007-07-09 Richard Guenther <rguenther@suse.de>
249 * decl.c (start_preparsed_function): Do not promote return type.
251 2007-07-08 Paolo Carlini <pcarlini@suse.de>
254 * pt.c (unify): Never pass error_mark_node to template_decl_level.
256 2007-07-07 Mark Mitchell <mark@codesourcery.com>
259 * pt.c (resolve_overloaded_unification): Robustify. Return a
261 (type_unification_real): Adjust accordingly.
263 2007-07-06 Richard Guenther <rguenther@suse.de>
265 * init.c (build_new_1): Use the correct pointer type.
266 * typeck2.c (build_m_component_ref): Likewise.
268 2007-07-05 Mark Mitchell <mark@codesourcery.com>
271 * init.c (build_zero_init): Always build an initializer for
273 * typeck2.c (build_functional_cast): Use build_zero_init.
276 * init.c (build_new_1): Always pass the allocation function to
277 build_op_delete_call.
278 * call.c (build_op_delete_call): Handle operator delete with a
279 variable-argument list. Do not issue an error when no matching
280 deallocation function is available for a new operator.
283 * cp-tree.h (any_value_dependent_elements_p): Declare it.
284 * decl.c (value_dependent_init_p): New function.
285 (cp_finish_decl): Use it.
286 * pt.c (value_dependent_expression_p): Use
287 any_value_dependent_elements_p.
288 * parser.c (cp_parser_primary_expression): Add comment about
289 treating dependent qualified names as integral
290 constant-expressions.
292 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
294 * decl.c (build_ptrmemfunc_type): Always use structural equality
295 tests when comparing pointer-to-member-function types, because the
296 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
299 2007-07-03 Mark Mitchell <mark@codesourcery.com>
301 * init.c (build_new): Tweak comment.
303 2007-06-29 Dave Brolley <brolley@redhat.com>
306 * parser.c (cp_parser_new_type_id): Don't reduce a named array
307 type to its base type and number of elements here.
308 * init.c (build_new): Call complete_type_or_else to ensure that the
309 type is complete and to issue a diagnostic if it is not.
310 (build_new_1): Don't call complete_type_or_else here.
312 2007-07-03 Richard Guenther <rguenther@suse.de>
315 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
318 2007-07-02 Simon Baldwin <simonb@google.com>
320 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
321 for inner-style nested forward declarations that don't declare
324 2007-07-02 Jakub Jelinek <jakub@redhat.com>
327 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
328 DECL_P in not a variable and appears more than once error messages.
330 2007-07-01 Ollie Wild <aaw@google.com>
332 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
333 (select_decl): Remove function.
334 (unqualified_namespace_lookup): Populate binding by calling
335 ambiguous_decl. Remove select_decl call.
336 (lookup_qualified_name): Remove select_decl call.
337 * decl.c (lookup_and_check_tag): Check for ambiguous references.
338 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
339 generation when name lookup is ambiguous.
341 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
344 * init.c (build_new_1): Use structural equality on the copy of the
347 2007-06-28 Geoffrey Keating <geoffk@apple.com>
349 * decl2.c (determine_visibility): Implement
350 flag_visibility_ms_compat effect on type info.
351 * decl.c (cxx_init_decl_processing): Implement
352 global effect of flag_visibility_ms_compat.
354 2007-06-28 Geoffrey Keating <geoffk@apple.com>
356 * decl2.c (start_objects): Mark constructor-running function
359 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
362 * decl.c (grokdeclarator): Reset friendp for member functions declared
363 friend of their own class.
365 2007-06-23 Mark Mitchell <mark@codesourcery.com>
367 * decl2.c (determine_visibility): Don't look for dllexport here.
368 (determine_visibility_from_class): Tidy.
370 2007-06-18 Simon Baldwin <simonb@google.com>
373 * parser.c (cp_parser_single_declaration): Added check for storage
374 class other than sc_none in parsed declaration, and a flag to indicate
375 if the call is part of an explicit template specialization parse.
376 * (cp_parser_explicit_specialization): Specialization check flag added
377 to call to cp_parser_single_declaration(), set true.
378 * (cp_parser_template_declaration_after_export): Specialization check
379 flag added to call to cp_parser_single_declaration(), set false.
380 * pt.c (check_explicit_specialization): Added code to copy visiblity
381 and linkage from the templated function to the explicit specialization.
383 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
385 * typeck.c (build_binary_op): For templates build the
386 expression in pieces to avoid the assert in build2_stat.
387 (get_member_function_from_ptrfunc):
388 Change over to using POINTER_PLUS_EXPR and convert
389 the second operand to sizetype.
390 * typeck2.c (build_m_component_ref): Likewise.
391 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
392 instead of PLUS_EXPR for pointers.
393 (build_new_1): Likewise.
394 (build_vec_delete_1): Likewise.
395 (build_vec_delete): Likewise.
396 * class.c (build_base_path): Likewise.
397 (build_base_path): Likewise.
398 (convert_to_base_statically): Likewise.
399 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
400 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
401 instead of PLUS_EXPR.
402 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
403 instead of PLUS_EXPR for pointers.
404 * call.c (build_special_member_call): Likewise.
405 * rtti.c (build_headof): Likewise.
406 Use sizetype instead of ptrdiff_type_node.
407 (tinfo_base_init): Create a POINTER_PLUS_EXPR
408 instead of PLUS_EXPR for pointers.
409 * except.c (expand_start_catch_block): Do a
410 NEGATIVE and then a POINTER_PLUS_EXPR instead
412 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
413 PLUS_EXPR on pointer types over to use
414 POINTER_PLUS_EXPR and remove the conversion
415 to the pointer types.
416 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
417 adding to a pointer type. Use size_int instead of
418 ssize_int. Convert the index to sizetype before
419 adding it to the pointer.
421 2007-06-15 Mark Mitchell <mark@codesourcery.com>
423 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
424 (DECL_ANON_UNION_VAR_P): New macro.
425 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
426 than DECL_VAR_MARKED_P, to keep track of which variables we have
428 * decl.c (redeclaration_error_message): Complain about redeclaring
429 anonymous union members at namespace scope.
430 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
432 2007-06-14 Geoff Keating <geoffk@apple.com>
434 * decl2.c (determine_visibility): Ensure that functions with
435 hidden types as parameters are hidden.
438 * decl2.c (determine_visibility): Remove duplicate code for
441 2007-06-12 Ian Lance Taylor <iant@google.com>
444 * init.c (avoid_placement_new_aliasing): New static function.
445 (build_new_1): Call it.
447 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
449 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
450 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
452 2007-06-08 Jakub Jelinek <jakub@redhat.com>
455 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
456 on init, the non-decl cond operand and increment value.
458 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
461 * decl.c (check_initializer): Report an error when a brace enclosed
462 initializer is used for a non-aggregate type in C++98.
463 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
465 (grokdeclarator): Likewise.
466 (move_fn_p): Likewise.
467 * typeck.c (check_return_expr): Likewise.
468 * call.c (reference_binding): Likewise.
469 * error.c (cp_cpp_error): Likewise.
470 * pt.c (check_default_tmpl_args): Likewise.
472 * lex.c (init_reswords): Likewise.
473 * parser.c (p_parser_primary_expression): Likewise.
474 (TOKEN_PRECEDENCE): Likewise.
475 (cp_parser_init_declarator): Likewise.
476 (cp_parser_ptr_operator): Likewise.
477 (cp_parser_parameter_declaration): Likewise.
478 (cp_parser_enclosed_template_argument_list): Likewise.
479 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
480 (cp_parser_next_token_ends_template_argument_p): Likewise.
482 2007-06-04 Simon Baldwin <simonb@google.com>
484 * decl.c (grokdeclarator): Readability change. Moved case labels
485 into direct switch statement scope.
487 2007-06-04 Paolo Carlini <pcarlini@suse.de>
489 * call.c (convert_like_real): Remove pointless code.
491 2007-05-31 Mark Mitchell <mark@codesourcery.com>
493 * decl.c (get_atexit_fn_ptr_type): New function.
494 (get_atexit_node): Use it.
495 (start_cleanup_fn): Likewise.
496 (register_dtor_fn): Use the object's destructor, instead of a
497 separate cleanup function, where possible.
498 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
499 (atexit_fn_ptr_type_node): New macro.
500 * decl2.c (build_cleanup): Use build_address.
502 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
504 * typeck.c (build_binary_op): Include types in error.
506 2007-05-31 Jakub Jelinek <jakub@redhat.com>
509 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
510 needs runtime initialization.
512 2007-05-31 Paolo Carlini <pcarlini@suse.de>
515 * semantics.c (finish_trait_expr): Complete the types.
517 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
518 Douglas Gregor <doug.gregor@gmail.com>
519 Pedro Lamarao <pedro.lamarao@mndfck.org>
520 Howard Hinnant <howard.hinnant@gmail.com>
524 * typeck.c (comptypes): Don't consider rvalue and lvalue
525 reference types to be equivalent.
526 (check_return_expr): Move from certain lvalues when returning
528 * decl.c (grokdeclarator): Implement reference collapsing.
529 (copy_fn_p): Don't consider constructors taking rvalue references
530 to be copy constructors.
532 * call.c (conversion): New "rvaluedness_matches_p" member.
533 (convert_class_to_reference): Require reference type as first
534 parameter instead of base type.
535 (reference_binding): Add logic to handle rvalue references.
536 (implicit_conversion): Update inaccurate comment.
537 (convert_like_real): Disable creation of temporaries that are
538 impossible to initialize for types with move constructors.
539 (build_over_call): Elide move constructors when possible.
540 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
541 (maybe_handle_ref_bind): Return conversion instead of type node.
542 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
543 determine preferred conversion sequences.
544 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
545 (LOOKUP_PREFER_RVALUE): New.
546 (DECL_MOVE_CONSTRUCTOR_P): New.
547 (struct cp_declarator): Add "reference" member for reference
548 types, with new "rvalue_ref" flag.
549 (cp_build_reference_type): Declare.
550 (move_fn_p): Declare.
551 * error.c (dump_type_prefix): Format rvalue reference types
552 correctly in error messages.
553 * except.c (build_throw): Move from certain lvalues when
555 * mangle.c (write_type): Mangle rvalue references differently
556 than regular references.
557 * parser.c (make_reference_declarator): Add boolean parameter for
559 (cp_parser_make_indirect_declarator): New.
560 (cp_parser_new_declarator_opt): Call
561 cp_parser_make_indirect_declarator.
562 (cp_parser_conversion_declarator_opt): Ditto.
563 (cp_parser_declarator): Ditto.
564 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
566 * pt.c (tsubst): Implement reference collapsing.
567 (maybe_adjust_types_for_deduction): Implement special template
568 parameter deduction rule for rvalue references.
569 (type_unification_real): Update calls to
570 maybe_adjust_types_for_deduction.
571 (try_one_overload): Ditto.
572 (unify_pack_expansion): Ditto.
573 * tree.c (lvalue_p_1): Handle rvalue reference types.
574 (cp_build_reference_type): New.
576 2007-05-30 Jakub Jelinek <jakub@redhat.com>
579 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
580 variables that need runtime initialization.
582 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
585 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
586 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
587 case POSTDECREMENT_EXPR>): Return the error_mark_node
588 if either the real or imaginary parts would an
591 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
592 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
595 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
596 token is a closing brace, false if there are no tokens left.
597 (cp_parser_namespace_alias_definition): Only consume the next token if
598 it is a closing brace.
600 * parser.c (cp_parser_class_specifier): Likewise.
602 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
604 * semantics.c (finish_member_declaration): Fix a typo in the
607 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
619 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
620 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
621 * pt.c (check_for_bare_parameter_packs): Return bool indicated
622 whether everything was okay. Fix indentation.
623 (push_template_decl_real): Check for bare parameter packs in
624 function parameters; where errors occur, mark the parameter types
625 with ERROR_MARK_NODEs to avert ICEs.
626 (coerce_template_parameter_pack): New.
627 (coerce_template_parms): Moved parameter pack coercion into
628 coerce_template_parameter_pack, and permit it anywhere in the
629 template parameter list (not just at the end). Parameter and
630 argument indices can vary (somewhat) separately now, so add
631 PARM_IDX and ARG_IDX.
632 (fn_type_unification): Don't set an argument pack as incomplete if
633 no argument pack was deduced.
634 (type_unification_real): If a type parameter is a parameter pack
635 and has not otherwise been deduced, it will be deduced to an empty
637 (more_specialized_fn): Use the actual lengths of the argument
638 lists when comparing against expansions.
639 * semantics.c (finish_member_declaration): If a field's type has
640 bare parameter packs, error and set its type to ERROR_MARK_NODE.
642 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
645 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
647 2007-05-22 Ollie Wild <aaw@google.com>
649 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
650 (unqualified_namespace_lookup): Adds check for hidden types.
652 2007-05-22 Ollie Wild <aaw@google.com>
654 * decl.c (duplicate_decls): Verify namespace names are unique.
656 2007-05-21 Mark Mitchell <mark@codesourcery.com>
658 * decl.c (cxx_maybe_build_cleanup): Handle
659 __attribute__((cleanup)).
661 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
663 * cvt.c (cp_convert_and_check): Don't check warnings if the
666 2007-05-18 Geoffrey Keating <geoffk@apple.com>
668 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
670 2007-05-14 Paolo Carlini <pcarlini@suse.de>
673 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
674 type only if is a class type (5.2.8/4).
676 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
678 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
679 * decl.c (grokdeclarator): Use unsigned_type_for instead of
680 c_common_unsigned_type.
682 2007-05-11 Silvius Rus <rus@google.com>
684 * cp/typeck.c (build_indirect_ref): Add call to
685 strict_aliasing_warning.
686 (build_reinterpret_cast_1): Condition call to
687 strict_aliasing_warning.
689 2007-05-11 Jan Hubicka <jh@suse.cz>
691 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
692 * decl2.c (start_objects): ctors and dtors are no longer public.
693 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
695 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
697 * typeck.c (build_unary_op): Remove code that used to
698 handle non lvalue increments/decrements.
700 2007-05-07 Mike Stump <mrs@apple.com>
702 * parser.c (check_empty_body): Add.
703 (cp_parser_iteration_statement): Add call to check_empty_body.
705 2007-05-05 Geoffrey Keating <geoffk@apple.com>
708 * mangle.c (write_mangled_name): Mangle static variable names.
709 (write_unqualified_name): Use local-source-name for
710 namespace-scope static variables.
712 2007-05-04 Dirk Mueller <dmueller@suse.de>
714 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
717 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
720 * decl2.c (constrain_class_visibility):
721 Use strip_pointer_or_array_types instead of strip_array_types.
723 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
726 * decl.c (reshape_init_r): Don't reshape the first element if it
727 is a pointer to member function.
729 2007-04-27 Simon Baldwin <simonb@google.com>
731 * decl.c (grokparms): Changed message format from %qD to %qE.
733 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
735 * error.c (maybe_warn_variadic_templates): Variadic templates are
736 now in C++0x, so only warn about them in C++98 mode.
738 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
741 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
742 integeral types from vectors types.
744 2007-04-26 Jakub Jelinek <jakub@redhat.com>
747 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
748 for type dependent OMP_CLAUSE_DECLs.
750 2007-04-24 Mark Mitchell <mark@codesourcery.com>
753 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
754 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
755 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
756 * init.c (build_zero_init): Adjust, as
757 COMPLEX_TYPE is now a SCALAR_TYPE.
758 * typeck2.c (digest_init): Allow brace-enclosed initializers for
759 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
761 2007-04-25 Paolo Carlini <pcarlini@suse.de>
763 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
764 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
765 (trait_expr_value): Adjust.
767 2007-04-23 Simon Baldwin <simonb@google.com>
769 * decl.c (grokparms): Added new error for duplicate function
770 parameters names in function prototypes, to match gcc behavior.
772 2007-04-23 Jan Hubicka <jh@suse.cz>
774 * cp/decl2.c (finish_objects): Do not call target constructor/destructor
777 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
779 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
780 instead of checking GIMPLE_STMT_P in chain_next.
782 2007-04-17 Mark Mitchell <mark@codesourcery.com>
785 * call.c (convert_for_arg_passing): Convert bitfields to their
788 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
791 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
793 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
797 * cp/decl2.c (constrain_class_visibility):
798 Do not warn about the use of anonymous namespace in the main input file.
800 2007-04-15 Mark Mitchell <mark@codesourcery.com>
802 * cp-tree.h (current_template_parms): Fix typo in comment.
804 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
806 * cp-tree.h, error.c: Fix comment typos.
808 2007-04-13 Jason Merrill <jason@redhat.com>
811 * call.c (reference_binding): Add c_cast_p parm. If true,
812 add quals to TO as needed to make it reference-compatible.
814 2007-04-11 Jan Hubicka <jh@suse.cz>
816 * cp/class.c (convert_to_base_statically): Fold produced tree; verify
817 that we are not processing template_decl.
819 2007-04-09 Mark Mitchell <mark@codesourcery.com>
822 * class.c (build_base_path): Ensure that the converted pointer has
823 the same cv-qualification as the input.
825 2007-04-09 Paolo Carlini <pcarlini@suse.de>
827 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
829 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
831 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
833 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
834 * tree.c (cp_add_pending_fn_decls): Remove.
835 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
837 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
839 Revert change removing staticp.
841 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
843 * cp-objcp-common.c (cxx_staticp): Remove.
844 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
845 * cp-tree.h (cxx_staticp):
847 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
849 * class.c (check_for_override): Don't remove dllmport attribute
852 2007-04-03 Jakub Jelinek <jakub@redhat.com>
855 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
856 type issue error and return early.
858 2007-03-30 Jason Merrill <jason@redhat.com>
861 * typeck.c (cp_type_readonly): New fn.
862 * cp-tree.h: Declare it.
863 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
864 (cp_finish_decl): Not here.
866 2007-03-31 Richard Guenther <rguenther@suse.de>
868 * optimize.c (maybe_clone_body): Replace splay-tree usage by
871 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
876 * parser.c (declarator_can_be_parameter_pack): New.
877 (cp_parser_template_parameter): Only parse the `...' if the
878 declarator can be a parameter pack.
879 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
881 * pt.c (find_parameter_packs_r): Look into the bounds on integer
882 types (they could be used as array bounds).
883 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
884 (tsubst_pack_expansion): Handle failure to expand parameter
887 2007-03-30 Paolo Carlini <pcarlini@suse.de>
890 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
891 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
892 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
893 (CLASS_TYPE_NON_UNION_P): Add.
894 (struct lang_type_class): Add has_complex_dflt.
895 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
896 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
897 * cp-tree.def: Add TRAIT_EXPR.
898 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
899 * lex.c (struct resword): Add __has_nothrow_assign,
900 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
901 __has_trivial_constructor, __has_trivial_copy,
902 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
903 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
904 __is_pod, __is_polymorphic, __is_union.
905 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
906 (cp_parser_trait_expr): New.
907 * semantics.c (finish_trait_expr, trait_expr_value
908 classtype_has_nothrow_copy_or_assign_p): New.
909 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
911 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
912 * class.c (check_bases, check_field_decl, check_bases_and_members):
913 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
914 * pt.c (uses_template_parms, tsubst_copy_and_build,
915 value_dependent_expression_p, type_dependent_expression_p): Deal with
917 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
919 2007-03-29 Richard Guenther <rguenther@suse.de>
921 * tree.c (cp_walk_subtrees): Do not set input_location.
923 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
926 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
929 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
931 * parser.c (struct cp_parser): Update comment for
932 greater_than_is_operator_p.
933 (cp_parser_primary_expression): In C++0x mode, a cast operator can
934 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
935 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
936 !GREATER_THAN_IS_OPERATOR_P.
937 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
938 `>>' operators that will become two `>' tokens in C++0x.
939 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
940 mode, allowing it to terminate default arguments.
941 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
942 `>>' like two consecutive `>' tokens.
943 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
944 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
945 ends a template argument.
947 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
949 * decl.c (redeclaration_error_message): Complain when redeclaring
950 a friend function with default template arguments (C++0x mode only).
951 * cp-tree.h (check_default_tmpl_args): Declare.
952 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
953 template arguments in function templates. Add support for checking
954 the default template arguments of friend templates.
955 (push_template_decl_real): Fix call to check_default_tmpl_args.
956 (type_unification_real): If a template parameter has not been
957 deduced but provides a default template argument, substitute into
958 that default template argument.
959 * parser.c (cp_parser_init_declarator): When declaring (but not
960 defining!) a function template in C++0x mode, check for default
963 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
966 * decl.c (grokdeclarator): Deal with cv-qualified function type
967 typedefs in the same way for member and non-member functions.
969 2007-03-26 Dirk Mueller <dmueller@suse.de>
971 * parser.c (cp_parser_member_declaration): Pedwarn
972 about stray semicolons after member declarations.
974 2007-03-26 Paolo Carlini <pcarlini@suse.de>
977 * pt.c (instantiate_decl): Set in_system_header.
979 2007-03-22 Mark Mitchell <mark@codesourcery.com>
981 * cp-tree.h (current_tempalte_parms): Improve documentation.
982 * pt.c (current_template_args): Likewise.
985 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
986 not consume tokens when failing.
988 2007-03-22 Jim Wilson <wilson@specifix.com>
989 Mark Mitchell <mark@codesourcery.com>
992 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
993 consistent with FROM.
995 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
997 * error.c (dump_expr): Handle dependent names that designate types.
998 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
1000 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
1002 * cp-tree.def, parser.c, pt.c: Fix comment typos.
1004 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1006 * cvt.c (cp_convert_and_check) : Define.
1007 * cp-tree.h (cp_convert_and_check): Declare.
1008 * call.c (convert_conversion_warnings): Rename to
1009 conversion_null_warnings. The warning for floating-point to
1010 integer is handled by convert_and_check in convert_like_real.
1011 (convert_like_real): convert_conversion_warnings was renamed as
1012 conversion_null_warnings.
1013 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
1014 overflow and changes of value during conversion.
1016 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1019 * parser.c (cp_parser_statement): If 'namespace' is found, this
1020 only can be a namespace alias definition, so parse it now.
1021 (cp_parser_namespace_alias_definition): if we find an open brace
1022 instead of '=', then this is actually a misplaced namespace
1025 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1028 * decl.c (cxx_init_decl_processing): Move command-line options
1029 processing to c-opts.c.
1031 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
1033 * ptree.c (cxx_print_type): Use formatting markup for integers
1034 when printing template parameter index/level/orig level.
1035 (cxx_print_xnode): Ditto.
1036 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
1037 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
1038 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
1040 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
1041 rather than a HOST_WIDE_INT.
1042 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
1043 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
1045 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
1046 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
1047 IN_BASE_INITIALIZER bool bitfields.
1048 (struct cp_declarator): Make KIND a 4-bit field. Make
1049 PARAMETER_PACK_P a bool bitfield just after KIND.
1050 * pt.c (uses_parameter_packs): Destroy the pointer set.
1051 (make_pack_expansion): Ditto.
1052 (check_for_bare_parameter_packs): Ditto.
1053 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
1055 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
1058 * call.c (convert_default_arg): Instead of copying the node,
1061 2007-03-15 Dirk Mueller <dmueller@suse.de>
1064 * call.c (convert_conversion_warnings): New..
1065 (convert_like_real): .. factored out from here.
1066 (convert_conversion_warnings): Add warning about
1067 false being converted to NULL in argument passing.
1069 2007-03-14 Dirk Mueller <dmueller@suse.de>
1071 * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
1072 (finish_do_body): Warn about empty body in do/while statement.
1074 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1076 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
1078 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1081 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
1084 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
1086 * cp/repo.c (init_repo): Initialize random_seed saved options.
1087 (finish_repo): Adjust.
1089 2007-03-13 Mark Mitchell <mark@codesourcery.com>
1092 * Make-lang.in (doc/g++.1): Use $< to specify the location from
1095 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
1097 * decl.c (compute_array_index_type): New warning flag warn_vla.
1099 2007-03-12 Mark Mitchell <mark@codesourcery.com>
1102 * call.c (convert_default_arg): Copy non-constant arguments.
1104 2007-03-11 Mark Mitchell <mark@codesourcery.com>
1107 * parser.c (cp_parser_postfix_expression): Disallow compound
1108 literals in constant expressions.
1111 * semantics.c (finish_typeof): Use unlowered_expr_type.
1113 2007-03-10 Mark Mitchell <mark@codesourcery.com>
1116 * cp-tree.h (unlowered_expr_type): New function.
1117 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
1118 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
1119 (unlowered_expr_type): New function.
1120 (build_unary_op): Disallow predecrements of bool bitfields.
1121 * call.c (build_conditional_expr): Use unlowered_expr_type.
1122 * pt.c (type_unification_real): Likewise.
1124 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
1127 * typeck.c (check_return_expr): Check for bare parameter packs.
1128 (comptypes): Compare template parameter packs and
1129 type pack expansions.
1130 * decl.c (grokdeclarator): Deal with the declaration of function
1132 (grokparms): Verify that the (optional) function parameter pack is
1133 at the end of the parameter list.
1134 (xref_basetypes): Handle pack expansions in the base class.
1135 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
1136 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
1137 (NONTYPE_ARGUMENT_PACK): New.
1138 (TYPE_PACK_EXPANSION): New.
1139 (EXPR_PACK_EXPANSION): New.
1140 (ARGUMENT_PACK_SELECT): New.
1141 * cp-objcp-common.c (cp_tree_size): Compute size of
1142 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
1143 ARGUMENT_PACK_SELECT.
1144 * error.c (dump_template_argument): Print template argument packs.
1145 (dump_template_argument_list): Ditto.
1146 (dump_template_parameter): Dump `...' for template type parameter
1148 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
1149 (dump_parameters): Print function parameter packs.
1150 (dump_template_parms): Print template argument packs.
1151 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
1152 (maybe_warn_variadic_templates): New.
1153 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
1154 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1155 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1157 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
1158 (write_template_arg): Write argument packs as separate arguments.
1159 * cp-tree.h (struct template_parm_index_s): Add flag that
1160 indicates that the template parameter is actually a parameter
1162 (struct tree_argument_pack_select): New.
1163 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
1164 (union lang_tree_node): Add argument_pack_select.
1165 (FUNCTION_PARAMETER_PACK_P): New.
1166 (PACK_EXPANSION_P): New.
1167 (PACK_EXPANSION_PATTERN): New.
1168 (SET_PACK_EXPANSION_PATTERN): New.
1169 (PACK_EXPANSION_PARAMETER_PACKS): New.
1170 (ARGUMENT_PACK_P): New.
1171 (ARGUMENT_PACK_ARGS): New.
1172 (SET_ARGUMENT_PACK_ARGS): New.
1173 (ARGUMENT_PACK_INCOMPLETE_P): New.
1174 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
1175 (TEMPLATE_PARM_PARAMETER_PACK): New.
1176 (TEMPLATE_TYPE_PARAMETER_PACK): New.
1177 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
1178 (ARGUMENT_PACK_SELECT_INDEX): New.
1179 (ARGUMENT_PACK_SELECT_ARG): New.
1180 (struct cp_declarator): Add parameter_pack_p flag.
1181 (maybe_warn_variadic_templates): Declare.
1182 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
1183 indicate a template parameter pack.
1184 (uses_parameter_packs): Declare.
1185 (template_parameter_pack_p): Declare.
1186 (template_parms_variadic_p): Declare.
1187 (make_pack_expansion): Declare.
1188 (check_for_bare_parameter_packs): Declare.
1189 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
1190 sizeof... expressions.
1191 (pp_cxx_expression): Print pack expansions and non-type argument
1193 (pp_cxx_exception_specification): Print pack expansions.
1194 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
1195 (pp_cxx_ctor_initializer): Print pack expansions.
1196 (pp_cxx_type_id): Print pack expansions.
1197 (pp_cxx_template_argument_list): Print argument packs.
1198 (pp_cxx_template_parameter): Print ellipsis for template parameter
1200 * pt.c (comp_template_parms): Compare template parameter packs.
1201 (template_parameter_pack_p): New.
1202 (template_parms_variadic_p): New.
1203 (template_args_variadic_p): New.
1204 (make_ith_pack_parameter_name): New.
1205 (struct find_parameter_pack_data): New.
1206 (find_parameter_packs_r): New.
1207 (uses_parameter_packs): New.
1208 (make_pack_expansion): New.
1209 (check_for_bare_parameter_packs): New.
1210 (expand_template_argument_pack): New.
1211 (reduce_template_parm_level): Propagate parameter pack flag.
1212 (process_template_parm): Add is_parameter_pack parameter to state
1213 when the parameter is actually a parameter pack. Create template
1214 parameter packs when is_parameter_pack is true.
1215 (current_template_args): The argument for a template parameter
1216 pack is an argument pack containing a single pack expansion.
1217 (process_partial_specialization): When checking that non-type
1218 argument expressions do not involve template parameters, loop over
1219 the arguments in argument packs separately.
1220 (push_template_decl_real): Check that the type of the declaration
1221 does not have any bare parameter packs. Check that primary
1222 templates have no more than one parameter pack, and that it comes
1223 at the end of the template parameter list.
1224 (convert_template_argument): Handle coercions for pack expansion
1225 expressions by coercing the pattern then rebuilding the expansion.
1226 (coerce_template_parms): When coercing the arguments for a
1227 variadic template, pack "extra" arguments into an argument pack.
1228 (coerce_template_template_parms): Cannot coerce between parameter
1229 packs and non-pack parameters.
1230 (template_args_equal): Compare PACK_EXPANSION_P expressions.
1231 (comp_template_args): Expand all template arguments packs before
1232 comparing template argument lists.
1233 (mangle_class_name_for_template): Make argument packs as separate
1235 (for_each_template_parm_r): No need to handle BASELINK.
1236 (instantiate_class_template): Handle pack expansions in the base
1238 (tsubst_pack_expansion): New.
1239 (tsubst_template_args): Handle substitutions of argument packs and
1240 pack expansion into template argument lists.
1241 (tsubst_decl): Expand function parameter packs into separate
1242 function parameters.
1243 (tsubst_arg_types): Expand a type pack expansion into separate
1245 (tsubst_exception_specification): Handle pack expansions in
1246 exception specifiers.
1247 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
1248 replacing a template parameter with its argument. If we encounter
1249 a substitution for an argument pack, just return the parameter
1251 (tsubst_copy): sizeof(X...) returns the number of elements in
1252 parameter pack X. See through ARGUMENT_PACK_SELECT when the
1253 PARM_DECL is a parameter pack.
1254 (tsubst_expr): Expression pack expansions and argument packs
1255 cannot show up here; they will all be handled through function
1256 calls, sizeof, and template argument lists.
1257 (tsubst_copy_and_build): sizeof(X...) returns the number of
1258 elements in parameter pack X. Handle pack expansions in TREE_LIST
1259 and CONSTRUCTOR nodes.
1260 (fn_type_unification): Handle "incomplete" explicit template
1261 argument lists that specify some of the arguments for a template
1263 (type_unification_real): Unify arguments against pack expansions.
1264 (template_parm_level_and_index): New, helper function.
1265 (unify_pack_expansion): New.
1266 (unify): Unify argument packs on an argument-by-argument basis,
1267 handling variadic argument packs as well.
1268 (more_specialized_fn): Handle unification of function parameter
1269 packs. All things being equal, prefer non-variadic function
1270 templates to variadic function templates.
1271 (more_specialized_class): Prefer the variadic class template
1272 partial specialization that binds fewer arguments to a parameter
1274 (regenerate_decl_from_template): Expand function parameter packs
1275 into separate parameters.
1276 (instantiate_decl): Ditto.
1277 (tsubst_initializer_list): Handle pack expansions for base-class
1279 (dependent_type_p_r): Determine dependent types in argument packs
1280 and pack expansions.
1281 (value_dependent_expression_p): Determine value-dependence of
1282 non-type argument packs.
1283 (dependent_template_arg_p): Handle argument packs.
1284 * semantics.c (finish_cond): Check for bare parameter packs.
1285 (finish_expr_stmt): Ditto.
1286 (finish_for_expr): Ditto.
1287 (finish_switch_cond): Ditto.
1288 (finish_mem_initializers): Ditto.
1289 * name-lookup.c (arg_assoc_type): Handle pack expansions and
1291 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
1292 * parser.c (make_declarator): Declarator is not an expansion.
1293 (make_pointer_declarator): Transfer parameter pack flag to outer
1295 (make_reference_declarator): Ditto.
1296 (make_ptrmem_declarator): Ditto.
1297 (make_call_declarator): Ditto.
1298 (make_array_declarator): Ditto.
1299 (cp_parser_postfix_expression): Allow pack expansion expressions
1300 in the argument list for a call expression.
1301 (cp_parser_parenthesized_expression_list): Add new parameter
1302 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
1303 into separate arguments."
1304 (cp_parser_new_placement): Allow pack expansion expressions.
1305 (cp_parser_new_initializer): Ditto.
1306 (cp_parser_mem_initializer_list): Allow ellipsis to create a
1307 base-class initializer expansion.
1308 (cp_parser_mem_initializer): Ditto.
1309 (cp_parser_template_parameter_list): Keep track of whether the
1310 template parameter is a template parameter pack.
1311 (cp_parser_template_parameter): Parse the ellipsis to indicate a
1312 template parameter pack.
1313 (cp_parser_type_parameter): Ditto.
1314 (cp_parser_template_argument_list): Parse the ellipsis to indicate
1316 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
1317 this declarator is a parameter pack.
1318 (cp_parser_parameter_declaration): The ellipsis does not end the
1319 parameter declaration, because it might be a parameter pack. Parse
1320 the ellipsis to indicate a parameter pack.
1321 (cp_parser_initializer): Allow pack expansions.
1322 (cp_parser_initializer_list): Allow ellipsis to create an
1323 initializer expansion.
1324 (cp_parser_base_clause): Allow ellipsis to create a base specifier
1326 (cp_parser_type_id_list): Allow ellipsis to create an exception
1327 specifier expansion.
1328 (cp_parser_attribute_list): Don't allow pack expansions.
1329 (cp_parser_functional_cast): Allow pack expansions.
1330 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
1331 compute the length of a parameter pack.
1332 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
1333 end a template argument.
1334 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1335 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1338 2007-03-09 Dirk Mueller <dmueller@suse.de>
1340 * cp/call.c (build_new_op): Call warn_logical_operator.
1342 2007-03-08 Volker Reichelt <reichelt@netcologne.de>
1345 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
1348 * pt.c (any_template_arguments_need_structural_equality_p):
1351 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
1353 * decl.c (grokdeclarator): Disable warnings for anonymous
1356 2007-03-05 Volker Reichelt <reichelt@netcologne.de>
1358 * typeck2.c (readonly_error): Always emit a hard error.
1359 Remove last argument.
1360 * cp-tree.h (readonly_error): Adjust prototype.
1361 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
1362 * typeck.c (build_unary_op): Likewise.
1363 (build_modify_expr): Likewise.
1365 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
1368 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
1370 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1373 * parser.c (struct cp_parser): New IN_IF_STMT.
1374 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
1375 returning if parsing the body of an 'if' statement or issuing an
1376 error and continuing.
1377 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
1379 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
1381 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
1384 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
1387 2007-03-02 Geoffrey Keating <geoffk@apple.com>
1389 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
1390 Objective-C++. Don't exit early if -shared-libgcc needs to be
1393 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1395 * typeck.c (common_base_type): Delete unused function.
1397 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
1399 * Make-lang.in: Add dummy lang.install-pdf target.
1401 2007-03-01 Simon Baldwin <simonb@google.com>
1404 * decl.c (check_tag_decl): Added new warning for typedef ignored
1405 when it precedes an otherwise valid non-typedef declaration.
1407 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
1409 * typeck.c (build_function_call): Store converted arguments
1410 in a stack-allocated array instead of building a list.
1411 (convert_arguments): Store arguments in the array passed in as an
1412 argument, and return the actual number of arguments.
1413 * call.c (build_call): Delete, and replace with...
1414 (build_call_n, build_call_a): New.
1415 (build_op_delete_call): Rewrite to avoid constructing argument lists.
1416 (build_over_call): Store converted arguments in a stack-allocated
1417 array instead of building a list.
1418 (build_cxx_call): Pass arguments in an array instead of as a list.
1419 (build_java_interface_fn_ref): Rewrite to avoid constructing
1421 * tree.h: Update declarations to reflect above changes.
1422 * method.c (use_thunk): Use a stack-allocated array to hold
1423 the arguments instead of a list.
1424 * rtti.c (throw_bad_cast): Update call to cxx_call.
1425 (throw_bad_typeid): Likewise.
1426 (build_dynamic_cast_1): Likewise.
1427 * init.c (build_builtin_delete_call): Use build_call_n.
1428 * decl.c (expand_static_init): Likewise.
1429 * except.c (cp_protect_cleanup_actions): Likewise.
1430 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
1431 (gimplify_must_not_throw_expr): Likewise.
1432 (cxx_omp_apply_fn): Use build_call_a.
1434 2007-02-26 Mark Mitchell <mark@codesourcery.com>
1436 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
1437 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
1439 2007-02-25 Mark Mitchell <mark@codesourcery.com>
1441 * cp-tree.h (static_ctors): Remove.
1442 * cp-tree.h (static_dtors): Likewise.
1443 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
1444 refactoring of tree_map hierarchy.
1445 (decl_shadowed_for_var_insert): Likewise.
1446 * semantics.c (expand_body): Use c_expand_body.
1447 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
1448 * decl2.c (static_ctors): Remove.
1449 (static_dtors): Likewise.
1450 (generate_ctor_or_dtor_function): Pass NULL_TREE to
1451 objc_generate_static_init_call. Do not call static_[cd]tors.
1452 (generate_ctor_and_dtor_functions_for_priority): Do not check for
1454 (cp_write_global_declarations): Likewise.
1456 2007-02-23 Richard Guenther <rguenther@suse.de>
1458 * class.c (note_name_declared_in_class): Make declaration
1459 changes meaning a pedwarn.
1461 2007-02-22 Michael Matz <matz@suse.de>
1464 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
1465 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
1466 dump_function_decl): Guard emitting outer scopes by new flag.
1467 * cp-lang.c (cxx_dwarf_name): New function.
1468 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
1469 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
1471 (push_template_decl_real, lookup_template_class): Remove calls
1474 2007-02-19 Mark Mitchell <mark@codesourcery.com>
1476 * call.c (build_new_method_call): Ensure that explicit calls of
1477 destructors have type "void".
1479 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1481 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
1482 and -Walways-true with -Waddress.
1483 * cvt.c (convert_to_void): Replace unconditional warning with
1486 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
1488 * decl.c, tree.c: Fix comment typos.
1490 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1493 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
1494 statement expression if we had an error mark node.
1496 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
1497 Brooks Moses <brooks.moses@codesourcery.com>
1498 Lee Millward <lee.millward@codesourcery.com>
1500 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
1501 Change class to tcc_vl_exp.
1503 * call.c (build_call): Use build_call_list instead
1505 (build_over_call): Likewise.
1506 (build_new_method_call): Use build_min_non_dep_call_list
1507 instead of build_min_non_dep.
1509 * error.c (dump_call_expr_args): New function.
1510 (dump_aggr_init_expr_args): New function.
1511 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
1512 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
1514 * cvt.c (convert_to_void): Use build_call_array instead
1515 of build3; use new AGGR_INIT_EXPR accessor macros.
1517 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
1518 instead of TREE_CODE_LENGTH.
1520 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
1521 AGGR_INIT_EXPR accessor macros.
1523 * cp-gimplify.c (cp_gimplify_init_expr): Use
1524 AGGR_INIT_EXPR_SLOT to set the slot operand.
1526 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
1527 (AGGR_INIT_EXPR_SLOT): New macro.
1528 (AGGR_INIT_EXPR_ARG): New macro.
1529 (aggr_init_expr_nargs): New macro.
1530 (AGGR_INIT_EXPR_ARGP): New macro.
1531 (aggr_init_expr_arg_iterator): New.
1532 (init_aggr_init_expr_arg_iterator): New.
1533 (next_aggr_init_expr_arg): New.
1534 (first_aggr_init_expr_arg): New.
1535 (more_aggr_init_expr_args_p): New.
1536 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
1537 (stabilize_aggr_init): New declaration.
1538 (build_min_non_dep_call_list): Likewise.
1540 * tree.c (process_aggr_init_operands): New function.
1541 (build_aggr_init_array) New function.
1542 (build_cplus_new): Update to use new CALL_EXPR and
1543 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
1544 build_aggr_init_array.
1545 (build_min_non_dep_call_list) New function.
1546 (build_min_nt): Assert input code parameter is not a variable
1547 length expression class.
1548 (build_min, build_min_non_dep): Likewise.
1549 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
1550 to check for equality instead of recursing. Handle tcc_vl_exp
1552 (stabilize_call): Update to only handle CALL_EXPRs, not
1553 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
1554 (stabilize_aggr_init): New function.
1555 (stabilize_init): Use it.
1557 * cxx-pretty-print.c (pp_cxx_postfix_expression)
1558 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
1559 AGGR_INIT_EXPR accessor macros and argument iterators.
1561 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
1562 build_vl_exp. Iterate through the operands, recursively
1563 processing each one.
1564 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
1565 CALL_EXPR accessor macros.
1566 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
1567 tree code classes. Use TREE_OPERAND_LENGTH instead of
1570 * semantics.c (finish_call_expr): Use build_nt_call_list
1571 instead of build_nt.
1572 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
1573 accessor macros. Use build_call_array to construct the
1574 CALL_EXPR node instead of build3
1576 * decl2.c (build_offset_ref_call_from_tree): Use
1577 build_nt_call_list and build_min_non_dep_call_list instead
1578 of build_min_nt and build_min_non_dep.
1580 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
1581 Use build_nt_call_list instead of build_min_nt.
1583 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1586 * call.c (build_conditional_expr): Improve error message.
1588 2007-02-13 Dirk Mueller <dmueller@suse.de>
1590 * friend.c (do_friend): Annotate warning about friend
1591 declarations in templates with OPT_Wnon_template_friend.
1592 Convert informal message from warning() to inform().
1594 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
1595 Mark Mitchell <mark@codesourcery.com>
1598 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
1599 instantiations for variables.
1601 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1604 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
1605 Check warn_unused_value just once.
1607 2007-02-11 Mark Mitchell <mark@codesourcery.com>
1610 * pt.c (determine_specialization): Use skip_artificial_parms_for.
1611 (fn_type_unificiation): Likewise.
1612 (get_bindings): Likewise.
1614 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
1617 * decl.c (finish_function): Use DECL_REPLACEABLE.
1618 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1620 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
1622 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
1624 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
1626 * decl.c (grokvardecl): Don't error if !have_tls.
1627 (grokdeclarator): Likewise.
1628 * parser.c (cp_parser_omp_threadprivate): Likewise.
1630 2007-02-07 Jakub Jelinek <jakub@redhat.com>
1633 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
1634 parameters and result decls in omp clauses.
1635 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
1638 2007-02-05 Dirk Mueller <dmueller@suse.de>
1641 * parser.c (cp_parser_class_specifier): Always initialize bases.
1643 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
1645 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
1646 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
1647 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
1649 * semantics.c (finish_omp_atomic): Store a whole expression node
1650 in operand 1, and integer_zero_node in operand 0, for dependent
1651 OMP_ATOMIC. Rewrite to make flow easier to understand.
1653 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1655 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
1657 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
1659 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
1660 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
1662 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
1664 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
1665 keyword warning to -Wc++0x-compat.
1667 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1669 * decl.c (grokdeclarator): Update documentation.
1671 2007-02-02 Jakub Jelinek <jakub@redhat.com>
1674 * decl.c (grokdeclarator): If __thread is used together with
1675 a storage class other than extern and static, clear thread_p
1676 after issuing diagnostics and fall through to checking the
1679 2007-01-30 Roger Sayle <roger@eyesopen.com>
1681 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
1682 calculating the size of an array (to avoid recursive errors).
1684 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1687 * typeck.c (build_binary_op): Fix logic for warning. Move warning
1689 * call.c (convert_like_real): Don't warn when converting to
1692 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1694 * decl.c (pop_label): Replace warning with call to
1695 warn_for_unused_label.
1697 2007-01-28 Andrew Pinski <pinskia@gmail.com>
1700 * semantics.c (finish_pseudo_destructor_expr): Check the
1701 destrutor name by calling check_dtor_name.
1703 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
1705 * lex.c (D_CPP0X): Rename.
1707 (reswords): D_CPP0X -> D_CXX0X.
1708 (init_reswords): Ditto.
1709 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
1710 of C++0x keywords as identifiers.
1712 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
1715 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
1718 2007-01-23 Ian Lance Taylor <iant@google.com>
1720 * typeck.c (convert_for_assignment): Only warn about a = b = c
1721 when converting to bool.
1723 2007-01-23 Roger Sayle <roger@eyesopen.com>
1725 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
1727 * typeck.c (ignore_overflows): Remove the remaining uses of
1728 TREE_CONSTANT_OVERFLOW.
1730 2007-01-20 Jan Hubicka <jh@suse.cz>
1732 * decl2.c (start_objects, start_static_storage_duration_function):
1733 Do not make the functions uninlinable.
1735 2007-01-17 Ian Lance Taylor <iant@google.com>
1737 * class.c (add_method): Call VEC_reserve_exact rather than passing
1738 a negative size to VEC_reserve.
1740 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
1743 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
1745 2007-01-10 Mark Mitchell <mark@codesourcery.com>
1748 * decl.c (make_typename_type): If the qualified name is not a
1749 type, issue an error.
1750 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
1753 2007-01-08 Geoffrey Keating <geoffk@apple.com>
1755 * rtti.c: Include target.h.
1756 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
1757 don't emit typeinfo for fundamental types as weak.
1758 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
1760 2007-01-08 Richard Guenther <rguenther@suse.de>
1762 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
1764 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
1766 * call.c (standard_conversion): Pass flag to
1767 vector_types_convertible_p to disallow emission of note.
1768 * typeck.c (convert_for_assignment): Pass flag to
1769 vector_types_convertible_p to allow emission of note.
1770 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
1771 to disallow emission of note.
1773 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1776 * typeck.c (build_binary_op): Call overflow_warning if
1777 TREE_OVERFLOW_P is true for the result and not for any of the
1780 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
1783 * class.c (add_method): Don't wait until template
1784 instantiation time to complain about duplicate methods.
1786 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1789 * semantics.c (finish_unary_op_expr): Warn only if result
1790 overflowed and operands did not.
1792 2007-01-05 Ian Lance Taylor <iant@google.com>
1794 * typeck.c (build_binary_op): Warn about comparing a non-weak
1797 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
1799 * pt.c (tsubst): Propagate the need for structural equality checks
1800 when reducing the level of template parameters.
1802 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
1804 * pt.c: Fix a comment typo.
1806 2007-01-02 Ian Lance Taylor <iant@google.com>
1808 * semantics.c (maybe_convert_cond): Optionally warn when using an
1809 assignment as a condition.
1810 * typeck.c (convert_for_assignment): Optionally warn about
1811 assigning the result of an assignment to a bool.
1813 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
1815 * pt.c (canonical_template_parms): Correct typo in comment.
1817 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
1819 * typeck.c (structural_comptypes): Renamed from "comptypes".
1820 (comptypes): Use canonical type information to perform fast type
1821 comparison. When VERIFY_CANONICAL_TYPES, verify that the
1822 canonical type comparison returns the same results as we would see
1823 from the current, structural check. Support COMPARE_STRUCTURAL
1824 when we need structural checks.
1825 * decl.c (typename_compare): Fix comment.
1826 (build_typename_type): TYPENAME_TYPE nodes require structural
1827 equality checks, because they resolve different based on the
1829 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
1830 require structural equality checks (for now).
1831 (build_ptrmemfunc_type): Build the canonical pointer to member
1833 (compute_array_index_type): Whenever we build a new index type
1834 to represent the size of an array in a template, we need to mark
1835 this index type as requiring structural equality. This goes for
1836 arrays with value-dependent sizes with the current ABI, or all
1838 * tree.c (cplus_array_hash): New.
1839 (struct cplus_array_info): New.
1840 (cplus_array_compare): New.
1841 (cplus_array_htab): New.
1842 (build_cplus_array_type_1): Use a hash table to cache the array
1843 types we build. Build the canonical array type for each array
1845 (cp_build_qualified_type_real): When building a cv-qualified array
1846 type, use the hash table of array types and build canonical array
1848 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
1849 use structural equality (for now).
1850 * cp-tree.h (COMPARE_STRUCTURAL): New.
1851 * pt.c (canonical_template_parms): New.
1852 (canonical_type_parameter): New.
1853 (process_template_parm): Find the canonical type parameter.
1854 (lookup_template_class): When we have named the primary template
1855 type, set the canonical type for our template class to the primary
1856 template type. If any of the template arguments need structural
1857 equality checks, the template class needs structural equality
1859 (tsubst): When reducing the level of a template template
1860 parameter, we require structural equality tests for the resulting
1861 parameter because its template parameters have not had their types
1862 canonicalized. When reducing a template type parameter, find the
1863 canonical reduced type parameter.
1864 (any_template_arguments_need_structural_equality_p): New.