1 2007-08-17 Ollie Wild <aaw@google.com>
4 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
5 declarations into appropriate slots for comparison. Fix type
8 2007-08-17 Paolo Carlini <pcarlini@suse.de>
11 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
12 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
14 2007-08-17 Paolo Carlini <pcarlini@suse.de>
17 * parser.c (cp_parser_class_head): Improve error message.
19 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
21 * pt.c (instantiate_decl): Set input_location
24 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
26 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
28 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
29 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
30 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
31 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
32 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
33 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
34 * typeck.c (cp_type_quals): Likewise.
35 * typeck2.c (cxx_incomplete_type_diagnostic,
36 cxx_incomplete_type_error): Likewise.
38 2007-08-16 Paolo Carlini <pcarlini@suse.de>
41 * pt.c (tsubst_friend_function): When check_classfn
42 returns error_mark_node likewise return it.
44 2007-08-15 Jakub Jelinek <jakub@redhat.com>
47 * typeck.c (check_return_expr): Don't NRV optimize vars in
49 * decl.c (finish_function): Comment fix.
51 2007-08-15 Paolo Carlini <pcarlini@suse.de>
54 * pt.c (push_template_decl_real): Depending on TYPE_P
55 use either TYPE_CONTEXT or DECL_CONTEXT.
57 2007-08-14 Mark Mitchell <mark@codesourcery.com>
59 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
60 constructors and destructors return this.
62 2007-08-14 Paolo Carlini <pcarlini@suse.de>
65 * decl2.c (check_classfn): Return error_mark_node in case of error;
66 in that case, do not call add_method.
67 * decl.c (start_decl): Deal with check_classfn returning
69 (grokfndecl): Likewise.
70 * pt.c (tsubst_friend_function): Likewise.
72 2007-08-14 Andrew Pinski <pinskia@gmail.com>
75 * typeck.c (build_binary_op): Disallow vector float types with
76 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
78 2007-08-11 Ian Lance Taylor <iant@google.com>
80 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
82 * cp/cp-tree.h (cxx_get_alias_set): Update declaration.
84 2007-08-10 Ollie Wild <aaw@google.com>
86 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
88 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
90 (unqualified_namespace_lookup): Fix ambiguous_decl call.
91 (lookup_using_namespace): Fix ambiguous_decl call.
92 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
94 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
96 * call.c (name_as_c_string): Use CONST_CAST.
97 * decl.c (build_decl): Likewise.
98 * parser.c (cp_parser_string_literal): Likewise.
100 2007-08-10 Paolo Carlini <pcarlini@suse.de>
103 * error.c (dump_expr): Consistently use the *_cxx_*
104 variants of the pretty-print functions.
106 2007-08-10 Paolo Carlini <pcarlini@suse.de>
109 * decl.c (check_special_function_return_type): Just error
110 on return type specified for conversion operator.
112 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
114 * typeck2.c (readonly_error): Handle general expressions.
115 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
117 2007-08-06 Dan Hipschman <dsh@google.com>
119 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
120 access function name.
122 2007-08-04 Alfred Minarik <a.minarik@aon.at>
125 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
126 * g++spec.c (lang_specific_driver): Check them.
128 2007-08-06 Paolo Carlini <pcarlini@suse.de>
131 * pt.c (template_class_depth): Fix comment; change return type
134 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
137 2007-03-26 Dirk Mueller <dmueller@suse.de>
139 * parser.c (cp_parser_member_declaration): Pedwarn
140 about stray semicolons after member declarations.
142 2007-08-02 Lee Millward <lee.millward@gmail.com>
147 * parser.c (cp_parser_asm_definition): Detect and discard asm
148 statements with invalid inputs or outputs.
149 (cp_parser_asm_operand_list): Return error mark node if any
150 of the operands are invalid. Adjust documentation.
152 2007-08-02 Nick Clifton <nickc@redhat.com>
154 * typeck.c: Change copyright header to refer to version 3 of the
155 GNU General Public License and to point readers at the COPYING3
156 file and the FSF's license web page.
157 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
158 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
159 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
160 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
161 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
162 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
163 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
164 name-lookup.h, parser.c: Likewise.
166 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
169 * call.c (magic_varargs_p): Honor the "type generic" attribute.
171 2007-07-30 Paolo Carlini <pcarlini@suse.de>
174 * semantics.c (finish_label_stmt): Reject the __label__
175 extension outside function scopes.
177 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
179 * parser.c (eof_token): Un-constify.
180 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
181 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
184 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
186 * pt.c, tree.c, typeck2.c: Fix comment typos.
188 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
189 Mark Mitchell <mark@codesourcery.com>
192 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
193 hidden due to friend declarations in local classes.
195 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
197 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
198 * cp-tree.def (DECLTYPE_TYPE): New.
199 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
200 (dump_type_prefix): Ditto.
201 (dump_type_suffix): Ditto.
202 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
203 * mangle.c (write_type): Handle DECLTYPE_TYPE.
204 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
206 (DECLTYPE_TYPE_EXPR): New.
207 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
208 (finish_declared_type): Declare.
209 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
211 (pp_cxx_type_id): Ditto.
212 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
213 (tsubst): Substitute into a DECLTYPE_TYPE node.
214 (tsubst_copy): Ditto.
215 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
217 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
218 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
219 structural equality (because we can't hash the expressions).
220 (finish_declared_type): New.
221 * lex.c (reswords): Add "decltype" keyword.
222 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
223 (cp_parser_postfix_expression): Add member_access_only_p to
224 restrict postfix expression to member access expressions.
225 (cp_parser_unary_expression): Update call to
226 cp_parser_postfix_expression to reflect new parameter.
227 (cp_parser_declared_type): New.
228 (cp_parser_simple_type_specifier): Parse decltype types.
230 2007-07-27 Mark Mitchell <mark@codesourcery.com>
233 * call.c (convert_for_arg_passing): Only widen bitfields to their
234 declared types if necessary.
236 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
238 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
241 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
243 * decl.c (typename_hash, typename_compare): Constify.
244 * mangle.c (hash_type, compare_type): Likewise.
245 * pt.c (eq_local_specializations, hash_local_specialization):
247 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
248 list_hash): Likewise.
249 * typeck2.c (pat_compare): Likewise.
251 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
253 * method.c (implicitly_declare_fn): Increase alignment if member
254 function pointer format requires it.
256 2007-07-24 Paolo Carlini <pcarlini@suse.de>
259 * typeck.c (check_return_expr): Do not pass a null argument
262 2007-07-24 Paolo Carlini <pcarlini@suse.de>
265 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
268 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
271 * typeck.c (convert_arguments): Only use default args if we have
275 * typeck.c (structural_comptypes): No need to check
276 resolve_typename_type return value here.
277 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
278 * pt.c (resolve_typename_type): Follow typename typedefs. Return
279 original type rather than error_mark_node in case of failure.
280 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
281 resolve_typename_type result check.
282 (cp_parser_direct_declarator, cp_parser_head,
283 cp_parser_constructor_declarator_p): Likewise.
285 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
287 * pt.c (template_parms_variadic_p): Remove.
288 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
290 2007-07-12 Jakub Jelinek <jakub@redhat.com>
293 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
294 argument to dump_aggr_init_expr_args instead of false.
296 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
298 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
299 canonical types; otherwise, fall back to structural type
300 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
301 internal compiler error if the canonical types are wrong.
303 2007-07-11 Paolo Carlini <pcarlini@suse.de>
306 * parser.c (cp_parser_make_indirect_declarator): When the
307 the code argument is ERROR_MARK return cp_error_declarator.
309 2007-07-09 Geoffrey Keating <geoffk@apple.com>
312 * decl.c (cxx_init_decl_processing): Don't set
313 force_align_functions_log.
314 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
315 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
316 FUNCTION_DECL, return its alignment.
318 2007-07-09 Richard Guenther <rguenther@suse.de>
320 * decl.c (start_preparsed_function): Do not promote return type.
322 2007-07-08 Paolo Carlini <pcarlini@suse.de>
325 * pt.c (unify): Never pass error_mark_node to template_decl_level.
327 2007-07-07 Mark Mitchell <mark@codesourcery.com>
330 * pt.c (resolve_overloaded_unification): Robustify. Return a
332 (type_unification_real): Adjust accordingly.
334 2007-07-06 Richard Guenther <rguenther@suse.de>
336 * init.c (build_new_1): Use the correct pointer type.
337 * typeck2.c (build_m_component_ref): Likewise.
339 2007-07-05 Mark Mitchell <mark@codesourcery.com>
342 * init.c (build_zero_init): Always build an initializer for
344 * typeck2.c (build_functional_cast): Use build_zero_init.
347 * init.c (build_new_1): Always pass the allocation function to
348 build_op_delete_call.
349 * call.c (build_op_delete_call): Handle operator delete with a
350 variable-argument list. Do not issue an error when no matching
351 deallocation function is available for a new operator.
354 * cp-tree.h (any_value_dependent_elements_p): Declare it.
355 * decl.c (value_dependent_init_p): New function.
356 (cp_finish_decl): Use it.
357 * pt.c (value_dependent_expression_p): Use
358 any_value_dependent_elements_p.
359 * parser.c (cp_parser_primary_expression): Add comment about
360 treating dependent qualified names as integral
361 constant-expressions.
363 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
365 * decl.c (build_ptrmemfunc_type): Always use structural equality
366 tests when comparing pointer-to-member-function types, because the
367 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
370 2007-07-03 Mark Mitchell <mark@codesourcery.com>
372 * init.c (build_new): Tweak comment.
374 2007-06-29 Dave Brolley <brolley@redhat.com>
377 * parser.c (cp_parser_new_type_id): Don't reduce a named array
378 type to its base type and number of elements here.
379 * init.c (build_new): Call complete_type_or_else to ensure that the
380 type is complete and to issue a diagnostic if it is not.
381 (build_new_1): Don't call complete_type_or_else here.
383 2007-07-03 Richard Guenther <rguenther@suse.de>
386 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
389 2007-07-02 Simon Baldwin <simonb@google.com>
391 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
392 for inner-style nested forward declarations that don't declare
395 2007-07-02 Jakub Jelinek <jakub@redhat.com>
398 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
399 DECL_P in not a variable and appears more than once error messages.
401 2007-07-01 Ollie Wild <aaw@google.com>
403 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
404 (select_decl): Remove function.
405 (unqualified_namespace_lookup): Populate binding by calling
406 ambiguous_decl. Remove select_decl call.
407 (lookup_qualified_name): Remove select_decl call.
408 * decl.c (lookup_and_check_tag): Check for ambiguous references.
409 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
410 generation when name lookup is ambiguous.
412 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
415 * init.c (build_new_1): Use structural equality on the copy of the
418 2007-06-28 Geoffrey Keating <geoffk@apple.com>
420 * decl2.c (determine_visibility): Implement
421 flag_visibility_ms_compat effect on type info.
422 * decl.c (cxx_init_decl_processing): Implement
423 global effect of flag_visibility_ms_compat.
425 2007-06-28 Geoffrey Keating <geoffk@apple.com>
427 * decl2.c (start_objects): Mark constructor-running function
430 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
433 * decl.c (grokdeclarator): Reset friendp for member functions declared
434 friend of their own class.
436 2007-06-23 Mark Mitchell <mark@codesourcery.com>
438 * decl2.c (determine_visibility): Don't look for dllexport here.
439 (determine_visibility_from_class): Tidy.
441 2007-06-18 Simon Baldwin <simonb@google.com>
444 * parser.c (cp_parser_single_declaration): Added check for storage
445 class other than sc_none in parsed declaration, and a flag to indicate
446 if the call is part of an explicit template specialization parse.
447 * (cp_parser_explicit_specialization): Specialization check flag added
448 to call to cp_parser_single_declaration(), set true.
449 * (cp_parser_template_declaration_after_export): Specialization check
450 flag added to call to cp_parser_single_declaration(), set false.
451 * pt.c (check_explicit_specialization): Added code to copy visiblity
452 and linkage from the templated function to the explicit specialization.
454 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
456 * typeck.c (build_binary_op): For templates build the
457 expression in pieces to avoid the assert in build2_stat.
458 (get_member_function_from_ptrfunc):
459 Change over to using POINTER_PLUS_EXPR and convert
460 the second operand to sizetype.
461 * typeck2.c (build_m_component_ref): Likewise.
462 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
463 instead of PLUS_EXPR for pointers.
464 (build_new_1): Likewise.
465 (build_vec_delete_1): Likewise.
466 (build_vec_delete): Likewise.
467 * class.c (build_base_path): Likewise.
468 (build_base_path): Likewise.
469 (convert_to_base_statically): Likewise.
470 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
471 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
472 instead of PLUS_EXPR.
473 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
474 instead of PLUS_EXPR for pointers.
475 * call.c (build_special_member_call): Likewise.
476 * rtti.c (build_headof): Likewise.
477 Use sizetype instead of ptrdiff_type_node.
478 (tinfo_base_init): Create a POINTER_PLUS_EXPR
479 instead of PLUS_EXPR for pointers.
480 * except.c (expand_start_catch_block): Do a
481 NEGATIVE and then a POINTER_PLUS_EXPR instead
483 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
484 PLUS_EXPR on pointer types over to use
485 POINTER_PLUS_EXPR and remove the conversion
486 to the pointer types.
487 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
488 adding to a pointer type. Use size_int instead of
489 ssize_int. Convert the index to sizetype before
490 adding it to the pointer.
492 2007-06-15 Mark Mitchell <mark@codesourcery.com>
494 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
495 (DECL_ANON_UNION_VAR_P): New macro.
496 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
497 than DECL_VAR_MARKED_P, to keep track of which variables we have
499 * decl.c (redeclaration_error_message): Complain about redeclaring
500 anonymous union members at namespace scope.
501 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
503 2007-06-14 Geoff Keating <geoffk@apple.com>
505 * decl2.c (determine_visibility): Ensure that functions with
506 hidden types as parameters are hidden.
509 * decl2.c (determine_visibility): Remove duplicate code for
512 2007-06-12 Ian Lance Taylor <iant@google.com>
515 * init.c (avoid_placement_new_aliasing): New static function.
516 (build_new_1): Call it.
518 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
520 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
521 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
523 2007-06-08 Jakub Jelinek <jakub@redhat.com>
526 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
527 on init, the non-decl cond operand and increment value.
529 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
532 * decl.c (check_initializer): Report an error when a brace enclosed
533 initializer is used for a non-aggregate type in C++98.
534 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
536 (grokdeclarator): Likewise.
537 (move_fn_p): Likewise.
538 * typeck.c (check_return_expr): Likewise.
539 * call.c (reference_binding): Likewise.
540 * error.c (cp_cpp_error): Likewise.
541 * pt.c (check_default_tmpl_args): Likewise.
543 * lex.c (init_reswords): Likewise.
544 * parser.c (p_parser_primary_expression): Likewise.
545 (TOKEN_PRECEDENCE): Likewise.
546 (cp_parser_init_declarator): Likewise.
547 (cp_parser_ptr_operator): Likewise.
548 (cp_parser_parameter_declaration): Likewise.
549 (cp_parser_enclosed_template_argument_list): Likewise.
550 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
551 (cp_parser_next_token_ends_template_argument_p): Likewise.
553 2007-06-04 Simon Baldwin <simonb@google.com>
555 * decl.c (grokdeclarator): Readability change. Moved case labels
556 into direct switch statement scope.
558 2007-06-04 Paolo Carlini <pcarlini@suse.de>
560 * call.c (convert_like_real): Remove pointless code.
562 2007-05-31 Mark Mitchell <mark@codesourcery.com>
564 * decl.c (get_atexit_fn_ptr_type): New function.
565 (get_atexit_node): Use it.
566 (start_cleanup_fn): Likewise.
567 (register_dtor_fn): Use the object's destructor, instead of a
568 separate cleanup function, where possible.
569 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
570 (atexit_fn_ptr_type_node): New macro.
571 * decl2.c (build_cleanup): Use build_address.
573 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
575 * typeck.c (build_binary_op): Include types in error.
577 2007-05-31 Jakub Jelinek <jakub@redhat.com>
580 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
581 needs runtime initialization.
583 2007-05-31 Paolo Carlini <pcarlini@suse.de>
586 * semantics.c (finish_trait_expr): Complete the types.
588 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
589 Douglas Gregor <doug.gregor@gmail.com>
590 Pedro Lamarao <pedro.lamarao@mndfck.org>
591 Howard Hinnant <howard.hinnant@gmail.com>
595 * typeck.c (comptypes): Don't consider rvalue and lvalue
596 reference types to be equivalent.
597 (check_return_expr): Move from certain lvalues when returning
599 * decl.c (grokdeclarator): Implement reference collapsing.
600 (copy_fn_p): Don't consider constructors taking rvalue references
601 to be copy constructors.
603 * call.c (conversion): New "rvaluedness_matches_p" member.
604 (convert_class_to_reference): Require reference type as first
605 parameter instead of base type.
606 (reference_binding): Add logic to handle rvalue references.
607 (implicit_conversion): Update inaccurate comment.
608 (convert_like_real): Disable creation of temporaries that are
609 impossible to initialize for types with move constructors.
610 (build_over_call): Elide move constructors when possible.
611 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
612 (maybe_handle_ref_bind): Return conversion instead of type node.
613 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
614 determine preferred conversion sequences.
615 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
616 (LOOKUP_PREFER_RVALUE): New.
617 (DECL_MOVE_CONSTRUCTOR_P): New.
618 (struct cp_declarator): Add "reference" member for reference
619 types, with new "rvalue_ref" flag.
620 (cp_build_reference_type): Declare.
621 (move_fn_p): Declare.
622 * error.c (dump_type_prefix): Format rvalue reference types
623 correctly in error messages.
624 * except.c (build_throw): Move from certain lvalues when
626 * mangle.c (write_type): Mangle rvalue references differently
627 than regular references.
628 * parser.c (make_reference_declarator): Add boolean parameter for
630 (cp_parser_make_indirect_declarator): New.
631 (cp_parser_new_declarator_opt): Call
632 cp_parser_make_indirect_declarator.
633 (cp_parser_conversion_declarator_opt): Ditto.
634 (cp_parser_declarator): Ditto.
635 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
637 * pt.c (tsubst): Implement reference collapsing.
638 (maybe_adjust_types_for_deduction): Implement special template
639 parameter deduction rule for rvalue references.
640 (type_unification_real): Update calls to
641 maybe_adjust_types_for_deduction.
642 (try_one_overload): Ditto.
643 (unify_pack_expansion): Ditto.
644 * tree.c (lvalue_p_1): Handle rvalue reference types.
645 (cp_build_reference_type): New.
647 2007-05-30 Jakub Jelinek <jakub@redhat.com>
650 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
651 variables that need runtime initialization.
653 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
656 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
657 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
658 case POSTDECREMENT_EXPR>): Return the error_mark_node
659 if either the real or imaginary parts would an
662 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
663 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
666 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
667 token is a closing brace, false if there are no tokens left.
668 (cp_parser_namespace_alias_definition): Only consume the next token if
669 it is a closing brace.
671 * parser.c (cp_parser_class_specifier): Likewise.
673 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
675 * semantics.c (finish_member_declaration): Fix a typo in the
678 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
690 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
691 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
692 * pt.c (check_for_bare_parameter_packs): Return bool indicated
693 whether everything was okay. Fix indentation.
694 (push_template_decl_real): Check for bare parameter packs in
695 function parameters; where errors occur, mark the parameter types
696 with ERROR_MARK_NODEs to avert ICEs.
697 (coerce_template_parameter_pack): New.
698 (coerce_template_parms): Moved parameter pack coercion into
699 coerce_template_parameter_pack, and permit it anywhere in the
700 template parameter list (not just at the end). Parameter and
701 argument indices can vary (somewhat) separately now, so add
702 PARM_IDX and ARG_IDX.
703 (fn_type_unification): Don't set an argument pack as incomplete if
704 no argument pack was deduced.
705 (type_unification_real): If a type parameter is a parameter pack
706 and has not otherwise been deduced, it will be deduced to an empty
708 (more_specialized_fn): Use the actual lengths of the argument
709 lists when comparing against expansions.
710 * semantics.c (finish_member_declaration): If a field's type has
711 bare parameter packs, error and set its type to ERROR_MARK_NODE.
713 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
716 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
718 2007-05-22 Ollie Wild <aaw@google.com>
720 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
721 (unqualified_namespace_lookup): Adds check for hidden types.
723 2007-05-22 Ollie Wild <aaw@google.com>
725 * decl.c (duplicate_decls): Verify namespace names are unique.
727 2007-05-21 Mark Mitchell <mark@codesourcery.com>
729 * decl.c (cxx_maybe_build_cleanup): Handle
730 __attribute__((cleanup)).
732 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
734 * cvt.c (cp_convert_and_check): Don't check warnings if the
737 2007-05-18 Geoffrey Keating <geoffk@apple.com>
739 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
741 2007-05-14 Paolo Carlini <pcarlini@suse.de>
744 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
745 type only if is a class type (5.2.8/4).
747 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
749 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
750 * decl.c (grokdeclarator): Use unsigned_type_for instead of
751 c_common_unsigned_type.
753 2007-05-11 Silvius Rus <rus@google.com>
755 * cp/typeck.c (build_indirect_ref): Add call to
756 strict_aliasing_warning.
757 (build_reinterpret_cast_1): Condition call to
758 strict_aliasing_warning.
760 2007-05-11 Jan Hubicka <jh@suse.cz>
762 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
763 * decl2.c (start_objects): ctors and dtors are no longer public.
764 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
766 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
768 * typeck.c (build_unary_op): Remove code that used to
769 handle non lvalue increments/decrements.
771 2007-05-07 Mike Stump <mrs@apple.com>
773 * parser.c (check_empty_body): Add.
774 (cp_parser_iteration_statement): Add call to check_empty_body.
776 2007-05-05 Geoffrey Keating <geoffk@apple.com>
779 * mangle.c (write_mangled_name): Mangle static variable names.
780 (write_unqualified_name): Use local-source-name for
781 namespace-scope static variables.
783 2007-05-04 Dirk Mueller <dmueller@suse.de>
785 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
788 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
791 * decl2.c (constrain_class_visibility):
792 Use strip_pointer_or_array_types instead of strip_array_types.
794 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
797 * decl.c (reshape_init_r): Don't reshape the first element if it
798 is a pointer to member function.
800 2007-04-27 Simon Baldwin <simonb@google.com>
802 * decl.c (grokparms): Changed message format from %qD to %qE.
804 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
806 * error.c (maybe_warn_variadic_templates): Variadic templates are
807 now in C++0x, so only warn about them in C++98 mode.
809 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
812 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
813 integeral types from vectors types.
815 2007-04-26 Jakub Jelinek <jakub@redhat.com>
818 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
819 for type dependent OMP_CLAUSE_DECLs.
821 2007-04-24 Mark Mitchell <mark@codesourcery.com>
824 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
825 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
826 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
827 * init.c (build_zero_init): Adjust, as
828 COMPLEX_TYPE is now a SCALAR_TYPE.
829 * typeck2.c (digest_init): Allow brace-enclosed initializers for
830 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
832 2007-04-25 Paolo Carlini <pcarlini@suse.de>
834 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
835 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
836 (trait_expr_value): Adjust.
838 2007-04-23 Simon Baldwin <simonb@google.com>
840 * decl.c (grokparms): Added new error for duplicate function
841 parameters names in function prototypes, to match gcc behavior.
843 2007-04-23 Jan Hubicka <jh@suse.cz>
845 * cp/decl2.c (finish_objects): Do not call target constructor/destructor
848 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
850 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
851 instead of checking GIMPLE_STMT_P in chain_next.
853 2007-04-17 Mark Mitchell <mark@codesourcery.com>
856 * call.c (convert_for_arg_passing): Convert bitfields to their
859 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
862 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
864 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
868 * cp/decl2.c (constrain_class_visibility):
869 Do not warn about the use of anonymous namespace in the main input file.
871 2007-04-15 Mark Mitchell <mark@codesourcery.com>
873 * cp-tree.h (current_template_parms): Fix typo in comment.
875 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
877 * cp-tree.h, error.c: Fix comment typos.
879 2007-04-13 Jason Merrill <jason@redhat.com>
882 * call.c (reference_binding): Add c_cast_p parm. If true,
883 add quals to TO as needed to make it reference-compatible.
885 2007-04-11 Jan Hubicka <jh@suse.cz>
887 * cp/class.c (convert_to_base_statically): Fold produced tree; verify
888 that we are not processing template_decl.
890 2007-04-09 Mark Mitchell <mark@codesourcery.com>
893 * class.c (build_base_path): Ensure that the converted pointer has
894 the same cv-qualification as the input.
896 2007-04-09 Paolo Carlini <pcarlini@suse.de>
898 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
900 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
902 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
904 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
905 * tree.c (cp_add_pending_fn_decls): Remove.
906 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
908 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
910 Revert change removing staticp.
912 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
914 * cp-objcp-common.c (cxx_staticp): Remove.
915 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
916 * cp-tree.h (cxx_staticp):
918 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
920 * class.c (check_for_override): Don't remove dllmport attribute
923 2007-04-03 Jakub Jelinek <jakub@redhat.com>
926 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
927 type issue error and return early.
929 2007-03-30 Jason Merrill <jason@redhat.com>
932 * typeck.c (cp_type_readonly): New fn.
933 * cp-tree.h: Declare it.
934 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
935 (cp_finish_decl): Not here.
937 2007-03-31 Richard Guenther <rguenther@suse.de>
939 * optimize.c (maybe_clone_body): Replace splay-tree usage by
942 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
947 * parser.c (declarator_can_be_parameter_pack): New.
948 (cp_parser_template_parameter): Only parse the `...' if the
949 declarator can be a parameter pack.
950 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
952 * pt.c (find_parameter_packs_r): Look into the bounds on integer
953 types (they could be used as array bounds).
954 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
955 (tsubst_pack_expansion): Handle failure to expand parameter
958 2007-03-30 Paolo Carlini <pcarlini@suse.de>
961 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
962 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
963 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
964 (CLASS_TYPE_NON_UNION_P): Add.
965 (struct lang_type_class): Add has_complex_dflt.
966 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
967 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
968 * cp-tree.def: Add TRAIT_EXPR.
969 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
970 * lex.c (struct resword): Add __has_nothrow_assign,
971 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
972 __has_trivial_constructor, __has_trivial_copy,
973 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
974 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
975 __is_pod, __is_polymorphic, __is_union.
976 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
977 (cp_parser_trait_expr): New.
978 * semantics.c (finish_trait_expr, trait_expr_value
979 classtype_has_nothrow_copy_or_assign_p): New.
980 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
982 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
983 * class.c (check_bases, check_field_decl, check_bases_and_members):
984 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
985 * pt.c (uses_template_parms, tsubst_copy_and_build,
986 value_dependent_expression_p, type_dependent_expression_p): Deal with
988 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
990 2007-03-29 Richard Guenther <rguenther@suse.de>
992 * tree.c (cp_walk_subtrees): Do not set input_location.
994 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
997 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
1000 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1002 * parser.c (struct cp_parser): Update comment for
1003 greater_than_is_operator_p.
1004 (cp_parser_primary_expression): In C++0x mode, a cast operator can
1005 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
1006 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
1007 !GREATER_THAN_IS_OPERATOR_P.
1008 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
1009 `>>' operators that will become two `>' tokens in C++0x.
1010 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
1011 mode, allowing it to terminate default arguments.
1012 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
1013 `>>' like two consecutive `>' tokens.
1014 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
1015 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
1016 ends a template argument.
1018 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1020 * decl.c (redeclaration_error_message): Complain when redeclaring
1021 a friend function with default template arguments (C++0x mode only).
1022 * cp-tree.h (check_default_tmpl_args): Declare.
1023 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
1024 template arguments in function templates. Add support for checking
1025 the default template arguments of friend templates.
1026 (push_template_decl_real): Fix call to check_default_tmpl_args.
1027 (type_unification_real): If a template parameter has not been
1028 deduced but provides a default template argument, substitute into
1029 that default template argument.
1030 * parser.c (cp_parser_init_declarator): When declaring (but not
1031 defining!) a function template in C++0x mode, check for default
1034 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1037 * decl.c (grokdeclarator): Deal with cv-qualified function type
1038 typedefs in the same way for member and non-member functions.
1040 2007-03-26 Dirk Mueller <dmueller@suse.de>
1042 * parser.c (cp_parser_member_declaration): Pedwarn
1043 about stray semicolons after member declarations.
1045 2007-03-26 Paolo Carlini <pcarlini@suse.de>
1048 * pt.c (instantiate_decl): Set in_system_header.
1050 2007-03-22 Mark Mitchell <mark@codesourcery.com>
1052 * cp-tree.h (current_tempalte_parms): Improve documentation.
1053 * pt.c (current_template_args): Likewise.
1056 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
1057 not consume tokens when failing.
1059 2007-03-22 Jim Wilson <wilson@specifix.com>
1060 Mark Mitchell <mark@codesourcery.com>
1063 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
1064 consistent with FROM.
1066 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1068 * error.c (dump_expr): Handle dependent names that designate types.
1069 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
1071 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
1073 * cp-tree.def, parser.c, pt.c: Fix comment typos.
1075 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1077 * cvt.c (cp_convert_and_check) : Define.
1078 * cp-tree.h (cp_convert_and_check): Declare.
1079 * call.c (convert_conversion_warnings): Rename to
1080 conversion_null_warnings. The warning for floating-point to
1081 integer is handled by convert_and_check in convert_like_real.
1082 (convert_like_real): convert_conversion_warnings was renamed as
1083 conversion_null_warnings.
1084 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
1085 overflow and changes of value during conversion.
1087 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1090 * parser.c (cp_parser_statement): If 'namespace' is found, this
1091 only can be a namespace alias definition, so parse it now.
1092 (cp_parser_namespace_alias_definition): if we find an open brace
1093 instead of '=', then this is actually a misplaced namespace
1096 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1099 * decl.c (cxx_init_decl_processing): Move command-line options
1100 processing to c-opts.c.
1102 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
1104 * ptree.c (cxx_print_type): Use formatting markup for integers
1105 when printing template parameter index/level/orig level.
1106 (cxx_print_xnode): Ditto.
1107 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
1108 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
1109 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
1111 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
1112 rather than a HOST_WIDE_INT.
1113 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
1114 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
1116 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
1117 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
1118 IN_BASE_INITIALIZER bool bitfields.
1119 (struct cp_declarator): Make KIND a 4-bit field. Make
1120 PARAMETER_PACK_P a bool bitfield just after KIND.
1121 * pt.c (uses_parameter_packs): Destroy the pointer set.
1122 (make_pack_expansion): Ditto.
1123 (check_for_bare_parameter_packs): Ditto.
1124 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
1126 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
1129 * call.c (convert_default_arg): Instead of copying the node,
1132 2007-03-15 Dirk Mueller <dmueller@suse.de>
1135 * call.c (convert_conversion_warnings): New..
1136 (convert_like_real): .. factored out from here.
1137 (convert_conversion_warnings): Add warning about
1138 false being converted to NULL in argument passing.
1140 2007-03-14 Dirk Mueller <dmueller@suse.de>
1142 * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
1143 (finish_do_body): Warn about empty body in do/while statement.
1145 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1147 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
1149 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1152 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
1155 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
1157 * cp/repo.c (init_repo): Initialize random_seed saved options.
1158 (finish_repo): Adjust.
1160 2007-03-13 Mark Mitchell <mark@codesourcery.com>
1163 * Make-lang.in (doc/g++.1): Use $< to specify the location from
1166 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
1168 * decl.c (compute_array_index_type): New warning flag warn_vla.
1170 2007-03-12 Mark Mitchell <mark@codesourcery.com>
1173 * call.c (convert_default_arg): Copy non-constant arguments.
1175 2007-03-11 Mark Mitchell <mark@codesourcery.com>
1178 * parser.c (cp_parser_postfix_expression): Disallow compound
1179 literals in constant expressions.
1182 * semantics.c (finish_typeof): Use unlowered_expr_type.
1184 2007-03-10 Mark Mitchell <mark@codesourcery.com>
1187 * cp-tree.h (unlowered_expr_type): New function.
1188 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
1189 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
1190 (unlowered_expr_type): New function.
1191 (build_unary_op): Disallow predecrements of bool bitfields.
1192 * call.c (build_conditional_expr): Use unlowered_expr_type.
1193 * pt.c (type_unification_real): Likewise.
1195 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
1198 * typeck.c (check_return_expr): Check for bare parameter packs.
1199 (comptypes): Compare template parameter packs and
1200 type pack expansions.
1201 * decl.c (grokdeclarator): Deal with the declaration of function
1203 (grokparms): Verify that the (optional) function parameter pack is
1204 at the end of the parameter list.
1205 (xref_basetypes): Handle pack expansions in the base class.
1206 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
1207 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
1208 (NONTYPE_ARGUMENT_PACK): New.
1209 (TYPE_PACK_EXPANSION): New.
1210 (EXPR_PACK_EXPANSION): New.
1211 (ARGUMENT_PACK_SELECT): New.
1212 * cp-objcp-common.c (cp_tree_size): Compute size of
1213 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
1214 ARGUMENT_PACK_SELECT.
1215 * error.c (dump_template_argument): Print template argument packs.
1216 (dump_template_argument_list): Ditto.
1217 (dump_template_parameter): Dump `...' for template type parameter
1219 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
1220 (dump_parameters): Print function parameter packs.
1221 (dump_template_parms): Print template argument packs.
1222 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
1223 (maybe_warn_variadic_templates): New.
1224 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
1225 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1226 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1228 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
1229 (write_template_arg): Write argument packs as separate arguments.
1230 * cp-tree.h (struct template_parm_index_s): Add flag that
1231 indicates that the template parameter is actually a parameter
1233 (struct tree_argument_pack_select): New.
1234 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
1235 (union lang_tree_node): Add argument_pack_select.
1236 (FUNCTION_PARAMETER_PACK_P): New.
1237 (PACK_EXPANSION_P): New.
1238 (PACK_EXPANSION_PATTERN): New.
1239 (SET_PACK_EXPANSION_PATTERN): New.
1240 (PACK_EXPANSION_PARAMETER_PACKS): New.
1241 (ARGUMENT_PACK_P): New.
1242 (ARGUMENT_PACK_ARGS): New.
1243 (SET_ARGUMENT_PACK_ARGS): New.
1244 (ARGUMENT_PACK_INCOMPLETE_P): New.
1245 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
1246 (TEMPLATE_PARM_PARAMETER_PACK): New.
1247 (TEMPLATE_TYPE_PARAMETER_PACK): New.
1248 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
1249 (ARGUMENT_PACK_SELECT_INDEX): New.
1250 (ARGUMENT_PACK_SELECT_ARG): New.
1251 (struct cp_declarator): Add parameter_pack_p flag.
1252 (maybe_warn_variadic_templates): Declare.
1253 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
1254 indicate a template parameter pack.
1255 (uses_parameter_packs): Declare.
1256 (template_parameter_pack_p): Declare.
1257 (template_parms_variadic_p): Declare.
1258 (make_pack_expansion): Declare.
1259 (check_for_bare_parameter_packs): Declare.
1260 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
1261 sizeof... expressions.
1262 (pp_cxx_expression): Print pack expansions and non-type argument
1264 (pp_cxx_exception_specification): Print pack expansions.
1265 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
1266 (pp_cxx_ctor_initializer): Print pack expansions.
1267 (pp_cxx_type_id): Print pack expansions.
1268 (pp_cxx_template_argument_list): Print argument packs.
1269 (pp_cxx_template_parameter): Print ellipsis for template parameter
1271 * pt.c (comp_template_parms): Compare template parameter packs.
1272 (template_parameter_pack_p): New.
1273 (template_parms_variadic_p): New.
1274 (template_args_variadic_p): New.
1275 (make_ith_pack_parameter_name): New.
1276 (struct find_parameter_pack_data): New.
1277 (find_parameter_packs_r): New.
1278 (uses_parameter_packs): New.
1279 (make_pack_expansion): New.
1280 (check_for_bare_parameter_packs): New.
1281 (expand_template_argument_pack): New.
1282 (reduce_template_parm_level): Propagate parameter pack flag.
1283 (process_template_parm): Add is_parameter_pack parameter to state
1284 when the parameter is actually a parameter pack. Create template
1285 parameter packs when is_parameter_pack is true.
1286 (current_template_args): The argument for a template parameter
1287 pack is an argument pack containing a single pack expansion.
1288 (process_partial_specialization): When checking that non-type
1289 argument expressions do not involve template parameters, loop over
1290 the arguments in argument packs separately.
1291 (push_template_decl_real): Check that the type of the declaration
1292 does not have any bare parameter packs. Check that primary
1293 templates have no more than one parameter pack, and that it comes
1294 at the end of the template parameter list.
1295 (convert_template_argument): Handle coercions for pack expansion
1296 expressions by coercing the pattern then rebuilding the expansion.
1297 (coerce_template_parms): When coercing the arguments for a
1298 variadic template, pack "extra" arguments into an argument pack.
1299 (coerce_template_template_parms): Cannot coerce between parameter
1300 packs and non-pack parameters.
1301 (template_args_equal): Compare PACK_EXPANSION_P expressions.
1302 (comp_template_args): Expand all template arguments packs before
1303 comparing template argument lists.
1304 (mangle_class_name_for_template): Make argument packs as separate
1306 (for_each_template_parm_r): No need to handle BASELINK.
1307 (instantiate_class_template): Handle pack expansions in the base
1309 (tsubst_pack_expansion): New.
1310 (tsubst_template_args): Handle substitutions of argument packs and
1311 pack expansion into template argument lists.
1312 (tsubst_decl): Expand function parameter packs into separate
1313 function parameters.
1314 (tsubst_arg_types): Expand a type pack expansion into separate
1316 (tsubst_exception_specification): Handle pack expansions in
1317 exception specifiers.
1318 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
1319 replacing a template parameter with its argument. If we encounter
1320 a substitution for an argument pack, just return the parameter
1322 (tsubst_copy): sizeof(X...) returns the number of elements in
1323 parameter pack X. See through ARGUMENT_PACK_SELECT when the
1324 PARM_DECL is a parameter pack.
1325 (tsubst_expr): Expression pack expansions and argument packs
1326 cannot show up here; they will all be handled through function
1327 calls, sizeof, and template argument lists.
1328 (tsubst_copy_and_build): sizeof(X...) returns the number of
1329 elements in parameter pack X. Handle pack expansions in TREE_LIST
1330 and CONSTRUCTOR nodes.
1331 (fn_type_unification): Handle "incomplete" explicit template
1332 argument lists that specify some of the arguments for a template
1334 (type_unification_real): Unify arguments against pack expansions.
1335 (template_parm_level_and_index): New, helper function.
1336 (unify_pack_expansion): New.
1337 (unify): Unify argument packs on an argument-by-argument basis,
1338 handling variadic argument packs as well.
1339 (more_specialized_fn): Handle unification of function parameter
1340 packs. All things being equal, prefer non-variadic function
1341 templates to variadic function templates.
1342 (more_specialized_class): Prefer the variadic class template
1343 partial specialization that binds fewer arguments to a parameter
1345 (regenerate_decl_from_template): Expand function parameter packs
1346 into separate parameters.
1347 (instantiate_decl): Ditto.
1348 (tsubst_initializer_list): Handle pack expansions for base-class
1350 (dependent_type_p_r): Determine dependent types in argument packs
1351 and pack expansions.
1352 (value_dependent_expression_p): Determine value-dependence of
1353 non-type argument packs.
1354 (dependent_template_arg_p): Handle argument packs.
1355 * semantics.c (finish_cond): Check for bare parameter packs.
1356 (finish_expr_stmt): Ditto.
1357 (finish_for_expr): Ditto.
1358 (finish_switch_cond): Ditto.
1359 (finish_mem_initializers): Ditto.
1360 * name-lookup.c (arg_assoc_type): Handle pack expansions and
1362 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
1363 * parser.c (make_declarator): Declarator is not an expansion.
1364 (make_pointer_declarator): Transfer parameter pack flag to outer
1366 (make_reference_declarator): Ditto.
1367 (make_ptrmem_declarator): Ditto.
1368 (make_call_declarator): Ditto.
1369 (make_array_declarator): Ditto.
1370 (cp_parser_postfix_expression): Allow pack expansion expressions
1371 in the argument list for a call expression.
1372 (cp_parser_parenthesized_expression_list): Add new parameter
1373 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
1374 into separate arguments."
1375 (cp_parser_new_placement): Allow pack expansion expressions.
1376 (cp_parser_new_initializer): Ditto.
1377 (cp_parser_mem_initializer_list): Allow ellipsis to create a
1378 base-class initializer expansion.
1379 (cp_parser_mem_initializer): Ditto.
1380 (cp_parser_template_parameter_list): Keep track of whether the
1381 template parameter is a template parameter pack.
1382 (cp_parser_template_parameter): Parse the ellipsis to indicate a
1383 template parameter pack.
1384 (cp_parser_type_parameter): Ditto.
1385 (cp_parser_template_argument_list): Parse the ellipsis to indicate
1387 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
1388 this declarator is a parameter pack.
1389 (cp_parser_parameter_declaration): The ellipsis does not end the
1390 parameter declaration, because it might be a parameter pack. Parse
1391 the ellipsis to indicate a parameter pack.
1392 (cp_parser_initializer): Allow pack expansions.
1393 (cp_parser_initializer_list): Allow ellipsis to create an
1394 initializer expansion.
1395 (cp_parser_base_clause): Allow ellipsis to create a base specifier
1397 (cp_parser_type_id_list): Allow ellipsis to create an exception
1398 specifier expansion.
1399 (cp_parser_attribute_list): Don't allow pack expansions.
1400 (cp_parser_functional_cast): Allow pack expansions.
1401 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
1402 compute the length of a parameter pack.
1403 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
1404 end a template argument.
1405 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1406 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1409 2007-03-09 Dirk Mueller <dmueller@suse.de>
1411 * cp/call.c (build_new_op): Call warn_logical_operator.
1413 2007-03-08 Volker Reichelt <reichelt@netcologne.de>
1416 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
1419 * pt.c (any_template_arguments_need_structural_equality_p):
1422 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
1424 * decl.c (grokdeclarator): Disable warnings for anonymous
1427 2007-03-05 Volker Reichelt <reichelt@netcologne.de>
1429 * typeck2.c (readonly_error): Always emit a hard error.
1430 Remove last argument.
1431 * cp-tree.h (readonly_error): Adjust prototype.
1432 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
1433 * typeck.c (build_unary_op): Likewise.
1434 (build_modify_expr): Likewise.
1436 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
1439 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
1441 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1444 * parser.c (struct cp_parser): New IN_IF_STMT.
1445 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
1446 returning if parsing the body of an 'if' statement or issuing an
1447 error and continuing.
1448 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
1450 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
1452 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
1455 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
1458 2007-03-02 Geoffrey Keating <geoffk@apple.com>
1460 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
1461 Objective-C++. Don't exit early if -shared-libgcc needs to be
1464 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1466 * typeck.c (common_base_type): Delete unused function.
1468 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
1470 * Make-lang.in: Add dummy lang.install-pdf target.
1472 2007-03-01 Simon Baldwin <simonb@google.com>
1475 * decl.c (check_tag_decl): Added new warning for typedef ignored
1476 when it precedes an otherwise valid non-typedef declaration.
1478 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
1480 * typeck.c (build_function_call): Store converted arguments
1481 in a stack-allocated array instead of building a list.
1482 (convert_arguments): Store arguments in the array passed in as an
1483 argument, and return the actual number of arguments.
1484 * call.c (build_call): Delete, and replace with...
1485 (build_call_n, build_call_a): New.
1486 (build_op_delete_call): Rewrite to avoid constructing argument lists.
1487 (build_over_call): Store converted arguments in a stack-allocated
1488 array instead of building a list.
1489 (build_cxx_call): Pass arguments in an array instead of as a list.
1490 (build_java_interface_fn_ref): Rewrite to avoid constructing
1492 * tree.h: Update declarations to reflect above changes.
1493 * method.c (use_thunk): Use a stack-allocated array to hold
1494 the arguments instead of a list.
1495 * rtti.c (throw_bad_cast): Update call to cxx_call.
1496 (throw_bad_typeid): Likewise.
1497 (build_dynamic_cast_1): Likewise.
1498 * init.c (build_builtin_delete_call): Use build_call_n.
1499 * decl.c (expand_static_init): Likewise.
1500 * except.c (cp_protect_cleanup_actions): Likewise.
1501 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
1502 (gimplify_must_not_throw_expr): Likewise.
1503 (cxx_omp_apply_fn): Use build_call_a.
1505 2007-02-26 Mark Mitchell <mark@codesourcery.com>
1507 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
1508 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
1510 2007-02-25 Mark Mitchell <mark@codesourcery.com>
1512 * cp-tree.h (static_ctors): Remove.
1513 * cp-tree.h (static_dtors): Likewise.
1514 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
1515 refactoring of tree_map hierarchy.
1516 (decl_shadowed_for_var_insert): Likewise.
1517 * semantics.c (expand_body): Use c_expand_body.
1518 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
1519 * decl2.c (static_ctors): Remove.
1520 (static_dtors): Likewise.
1521 (generate_ctor_or_dtor_function): Pass NULL_TREE to
1522 objc_generate_static_init_call. Do not call static_[cd]tors.
1523 (generate_ctor_and_dtor_functions_for_priority): Do not check for
1525 (cp_write_global_declarations): Likewise.
1527 2007-02-23 Richard Guenther <rguenther@suse.de>
1529 * class.c (note_name_declared_in_class): Make declaration
1530 changes meaning a pedwarn.
1532 2007-02-22 Michael Matz <matz@suse.de>
1535 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
1536 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
1537 dump_function_decl): Guard emitting outer scopes by new flag.
1538 * cp-lang.c (cxx_dwarf_name): New function.
1539 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
1540 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
1542 (push_template_decl_real, lookup_template_class): Remove calls
1545 2007-02-19 Mark Mitchell <mark@codesourcery.com>
1547 * call.c (build_new_method_call): Ensure that explicit calls of
1548 destructors have type "void".
1550 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1552 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
1553 and -Walways-true with -Waddress.
1554 * cvt.c (convert_to_void): Replace unconditional warning with
1557 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
1559 * decl.c, tree.c: Fix comment typos.
1561 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1564 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
1565 statement expression if we had an error mark node.
1567 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
1568 Brooks Moses <brooks.moses@codesourcery.com>
1569 Lee Millward <lee.millward@codesourcery.com>
1571 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
1572 Change class to tcc_vl_exp.
1574 * call.c (build_call): Use build_call_list instead
1576 (build_over_call): Likewise.
1577 (build_new_method_call): Use build_min_non_dep_call_list
1578 instead of build_min_non_dep.
1580 * error.c (dump_call_expr_args): New function.
1581 (dump_aggr_init_expr_args): New function.
1582 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
1583 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
1585 * cvt.c (convert_to_void): Use build_call_array instead
1586 of build3; use new AGGR_INIT_EXPR accessor macros.
1588 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
1589 instead of TREE_CODE_LENGTH.
1591 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
1592 AGGR_INIT_EXPR accessor macros.
1594 * cp-gimplify.c (cp_gimplify_init_expr): Use
1595 AGGR_INIT_EXPR_SLOT to set the slot operand.
1597 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
1598 (AGGR_INIT_EXPR_SLOT): New macro.
1599 (AGGR_INIT_EXPR_ARG): New macro.
1600 (aggr_init_expr_nargs): New macro.
1601 (AGGR_INIT_EXPR_ARGP): New macro.
1602 (aggr_init_expr_arg_iterator): New.
1603 (init_aggr_init_expr_arg_iterator): New.
1604 (next_aggr_init_expr_arg): New.
1605 (first_aggr_init_expr_arg): New.
1606 (more_aggr_init_expr_args_p): New.
1607 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
1608 (stabilize_aggr_init): New declaration.
1609 (build_min_non_dep_call_list): Likewise.
1611 * tree.c (process_aggr_init_operands): New function.
1612 (build_aggr_init_array) New function.
1613 (build_cplus_new): Update to use new CALL_EXPR and
1614 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
1615 build_aggr_init_array.
1616 (build_min_non_dep_call_list) New function.
1617 (build_min_nt): Assert input code parameter is not a variable
1618 length expression class.
1619 (build_min, build_min_non_dep): Likewise.
1620 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
1621 to check for equality instead of recursing. Handle tcc_vl_exp
1623 (stabilize_call): Update to only handle CALL_EXPRs, not
1624 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
1625 (stabilize_aggr_init): New function.
1626 (stabilize_init): Use it.
1628 * cxx-pretty-print.c (pp_cxx_postfix_expression)
1629 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
1630 AGGR_INIT_EXPR accessor macros and argument iterators.
1632 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
1633 build_vl_exp. Iterate through the operands, recursively
1634 processing each one.
1635 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
1636 CALL_EXPR accessor macros.
1637 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
1638 tree code classes. Use TREE_OPERAND_LENGTH instead of
1641 * semantics.c (finish_call_expr): Use build_nt_call_list
1642 instead of build_nt.
1643 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
1644 accessor macros. Use build_call_array to construct the
1645 CALL_EXPR node instead of build3
1647 * decl2.c (build_offset_ref_call_from_tree): Use
1648 build_nt_call_list and build_min_non_dep_call_list instead
1649 of build_min_nt and build_min_non_dep.
1651 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
1652 Use build_nt_call_list instead of build_min_nt.
1654 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1657 * call.c (build_conditional_expr): Improve error message.
1659 2007-02-13 Dirk Mueller <dmueller@suse.de>
1661 * friend.c (do_friend): Annotate warning about friend
1662 declarations in templates with OPT_Wnon_template_friend.
1663 Convert informal message from warning() to inform().
1665 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
1666 Mark Mitchell <mark@codesourcery.com>
1669 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
1670 instantiations for variables.
1672 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1675 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
1676 Check warn_unused_value just once.
1678 2007-02-11 Mark Mitchell <mark@codesourcery.com>
1681 * pt.c (determine_specialization): Use skip_artificial_parms_for.
1682 (fn_type_unificiation): Likewise.
1683 (get_bindings): Likewise.
1685 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
1688 * decl.c (finish_function): Use DECL_REPLACEABLE.
1689 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1691 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
1693 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
1695 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
1697 * decl.c (grokvardecl): Don't error if !have_tls.
1698 (grokdeclarator): Likewise.
1699 * parser.c (cp_parser_omp_threadprivate): Likewise.
1701 2007-02-07 Jakub Jelinek <jakub@redhat.com>
1704 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
1705 parameters and result decls in omp clauses.
1706 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
1709 2007-02-05 Dirk Mueller <dmueller@suse.de>
1712 * parser.c (cp_parser_class_specifier): Always initialize bases.
1714 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
1716 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
1717 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
1718 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
1720 * semantics.c (finish_omp_atomic): Store a whole expression node
1721 in operand 1, and integer_zero_node in operand 0, for dependent
1722 OMP_ATOMIC. Rewrite to make flow easier to understand.
1724 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1726 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
1728 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
1730 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
1731 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
1733 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
1735 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
1736 keyword warning to -Wc++0x-compat.
1738 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1740 * decl.c (grokdeclarator): Update documentation.
1742 2007-02-02 Jakub Jelinek <jakub@redhat.com>
1745 * decl.c (grokdeclarator): If __thread is used together with
1746 a storage class other than extern and static, clear thread_p
1747 after issuing diagnostics and fall through to checking the
1750 2007-01-30 Roger Sayle <roger@eyesopen.com>
1752 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
1753 calculating the size of an array (to avoid recursive errors).
1755 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1758 * typeck.c (build_binary_op): Fix logic for warning. Move warning
1760 * call.c (convert_like_real): Don't warn when converting to
1763 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1765 * decl.c (pop_label): Replace warning with call to
1766 warn_for_unused_label.
1768 2007-01-28 Andrew Pinski <pinskia@gmail.com>
1771 * semantics.c (finish_pseudo_destructor_expr): Check the
1772 destrutor name by calling check_dtor_name.
1774 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
1776 * lex.c (D_CPP0X): Rename.
1778 (reswords): D_CPP0X -> D_CXX0X.
1779 (init_reswords): Ditto.
1780 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
1781 of C++0x keywords as identifiers.
1783 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
1786 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
1789 2007-01-23 Ian Lance Taylor <iant@google.com>
1791 * typeck.c (convert_for_assignment): Only warn about a = b = c
1792 when converting to bool.
1794 2007-01-23 Roger Sayle <roger@eyesopen.com>
1796 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
1798 * typeck.c (ignore_overflows): Remove the remaining uses of
1799 TREE_CONSTANT_OVERFLOW.
1801 2007-01-20 Jan Hubicka <jh@suse.cz>
1803 * decl2.c (start_objects, start_static_storage_duration_function):
1804 Do not make the functions uninlinable.
1806 2007-01-17 Ian Lance Taylor <iant@google.com>
1808 * class.c (add_method): Call VEC_reserve_exact rather than passing
1809 a negative size to VEC_reserve.
1811 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
1814 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
1816 2007-01-10 Mark Mitchell <mark@codesourcery.com>
1819 * decl.c (make_typename_type): If the qualified name is not a
1820 type, issue an error.
1821 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
1824 2007-01-08 Geoffrey Keating <geoffk@apple.com>
1826 * rtti.c: Include target.h.
1827 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
1828 don't emit typeinfo for fundamental types as weak.
1829 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
1831 2007-01-08 Richard Guenther <rguenther@suse.de>
1833 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
1835 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
1837 * call.c (standard_conversion): Pass flag to
1838 vector_types_convertible_p to disallow emission of note.
1839 * typeck.c (convert_for_assignment): Pass flag to
1840 vector_types_convertible_p to allow emission of note.
1841 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
1842 to disallow emission of note.
1844 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1847 * typeck.c (build_binary_op): Call overflow_warning if
1848 TREE_OVERFLOW_P is true for the result and not for any of the
1851 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
1854 * class.c (add_method): Don't wait until template
1855 instantiation time to complain about duplicate methods.
1857 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1860 * semantics.c (finish_unary_op_expr): Warn only if result
1861 overflowed and operands did not.
1863 2007-01-05 Ian Lance Taylor <iant@google.com>
1865 * typeck.c (build_binary_op): Warn about comparing a non-weak
1868 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
1870 * pt.c (tsubst): Propagate the need for structural equality checks
1871 when reducing the level of template parameters.
1873 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
1875 * pt.c: Fix a comment typo.
1877 2007-01-02 Ian Lance Taylor <iant@google.com>
1879 * semantics.c (maybe_convert_cond): Optionally warn when using an
1880 assignment as a condition.
1881 * typeck.c (convert_for_assignment): Optionally warn about
1882 assigning the result of an assignment to a bool.
1884 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
1886 * pt.c (canonical_template_parms): Correct typo in comment.
1888 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
1890 * typeck.c (structural_comptypes): Renamed from "comptypes".
1891 (comptypes): Use canonical type information to perform fast type
1892 comparison. When VERIFY_CANONICAL_TYPES, verify that the
1893 canonical type comparison returns the same results as we would see
1894 from the current, structural check. Support COMPARE_STRUCTURAL
1895 when we need structural checks.
1896 * decl.c (typename_compare): Fix comment.
1897 (build_typename_type): TYPENAME_TYPE nodes require structural
1898 equality checks, because they resolve different based on the
1900 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
1901 require structural equality checks (for now).
1902 (build_ptrmemfunc_type): Build the canonical pointer to member
1904 (compute_array_index_type): Whenever we build a new index type
1905 to represent the size of an array in a template, we need to mark
1906 this index type as requiring structural equality. This goes for
1907 arrays with value-dependent sizes with the current ABI, or all
1909 * tree.c (cplus_array_hash): New.
1910 (struct cplus_array_info): New.
1911 (cplus_array_compare): New.
1912 (cplus_array_htab): New.
1913 (build_cplus_array_type_1): Use a hash table to cache the array
1914 types we build. Build the canonical array type for each array
1916 (cp_build_qualified_type_real): When building a cv-qualified array
1917 type, use the hash table of array types and build canonical array
1919 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
1920 use structural equality (for now).
1921 * cp-tree.h (COMPARE_STRUCTURAL): New.
1922 * pt.c (canonical_template_parms): New.
1923 (canonical_type_parameter): New.
1924 (process_template_parm): Find the canonical type parameter.
1925 (lookup_template_class): When we have named the primary template
1926 type, set the canonical type for our template class to the primary
1927 template type. If any of the template arguments need structural
1928 equality checks, the template class needs structural equality
1930 (tsubst): When reducing the level of a template template
1931 parameter, we require structural equality tests for the resulting
1932 parameter because its template parameters have not had their types
1933 canonicalized. When reducing a template type parameter, find the
1934 canonical reduced type parameter.
1935 (any_template_arguments_need_structural_equality_p): New.