1 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
3 * pt.c (instantiate_decl): Set input_location
6 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
10 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
11 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
12 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
13 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
14 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
15 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
16 * typeck.c (cp_type_quals): Likewise.
17 * typeck2.c (cxx_incomplete_type_diagnostic,
18 cxx_incomplete_type_error): Likewise.
20 2007-08-16 Paolo Carlini <pcarlini@suse.de>
23 * pt.c (tsubst_friend_function): When check_classfn
24 returns error_mark_node likewise return it.
26 2007-08-15 Jakub Jelinek <jakub@redhat.com>
29 * typeck.c (check_return_expr): Don't NRV optimize vars in
31 * decl.c (finish_function): Comment fix.
33 2007-08-15 Paolo Carlini <pcarlini@suse.de>
36 * pt.c (push_template_decl_real): Depending on TYPE_P
37 use either TYPE_CONTEXT or DECL_CONTEXT.
39 2007-08-14 Mark Mitchell <mark@codesourcery.com>
41 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
42 constructors and destructors return this.
44 2007-08-14 Paolo Carlini <pcarlini@suse.de>
47 * decl2.c (check_classfn): Return error_mark_node in case of error;
48 in that case, do not call add_method.
49 * decl.c (start_decl): Deal with check_classfn returning
51 (grokfndecl): Likewise.
52 * pt.c (tsubst_friend_function): Likewise.
54 2007-08-14 Andrew Pinski <pinskia@gmail.com>
57 * typeck.c (build_binary_op): Disallow vector float types with
58 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
60 2007-08-11 Ian Lance Taylor <iant@google.com>
62 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
64 * cp/cp-tree.h (cxx_get_alias_set): Update declaration.
66 2007-08-10 Ollie Wild <aaw@google.com>
68 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
70 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
72 (unqualified_namespace_lookup): Fix ambiguous_decl call.
73 (lookup_using_namespace): Fix ambiguous_decl call.
74 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
76 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
78 * call.c (name_as_c_string): Use CONST_CAST.
79 * decl.c (build_decl): Likewise.
80 * parser.c (cp_parser_string_literal): Likewise.
82 2007-08-10 Paolo Carlini <pcarlini@suse.de>
85 * error.c (dump_expr): Consistently use the *_cxx_*
86 variants of the pretty-print functions.
88 2007-08-10 Paolo Carlini <pcarlini@suse.de>
91 * decl.c (check_special_function_return_type): Just error
92 on return type specified for conversion operator.
94 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
96 * typeck2.c (readonly_error): Handle general expressions.
97 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
99 2007-08-06 Dan Hipschman <dsh@google.com>
101 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
102 access function name.
104 2007-08-04 Alfred Minarik <a.minarik@aon.at>
107 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
108 * g++spec.c (lang_specific_driver): Check them.
110 2007-08-06 Paolo Carlini <pcarlini@suse.de>
113 * pt.c (template_class_depth): Fix comment; change return type
116 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
119 2007-03-26 Dirk Mueller <dmueller@suse.de>
121 * parser.c (cp_parser_member_declaration): Pedwarn
122 about stray semicolons after member declarations.
124 2007-08-02 Lee Millward <lee.millward@gmail.com>
129 * parser.c (cp_parser_asm_definition): Detect and discard asm
130 statements with invalid inputs or outputs.
131 (cp_parser_asm_operand_list): Return error mark node if any
132 of the operands are invalid. Adjust documentation.
134 2007-08-02 Nick Clifton <nickc@redhat.com>
136 * typeck.c: Change copyright header to refer to version 3 of the
137 GNU General Public License and to point readers at the COPYING3
138 file and the FSF's license web page.
139 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
140 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
141 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
142 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
143 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
144 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
145 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
146 name-lookup.h, parser.c: Likewise.
148 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
151 * call.c (magic_varargs_p): Honor the "type generic" attribute.
153 2007-07-30 Paolo Carlini <pcarlini@suse.de>
156 * semantics.c (finish_label_stmt): Reject the __label__
157 extension outside function scopes.
159 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
161 * parser.c (eof_token): Un-constify.
162 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
163 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
166 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
168 * pt.c, tree.c, typeck2.c: Fix comment typos.
170 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
171 Mark Mitchell <mark@codesourcery.com>
174 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
175 hidden due to friend declarations in local classes.
177 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
179 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
180 * cp-tree.def (DECLTYPE_TYPE): New.
181 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
182 (dump_type_prefix): Ditto.
183 (dump_type_suffix): Ditto.
184 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
185 * mangle.c (write_type): Handle DECLTYPE_TYPE.
186 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
188 (DECLTYPE_TYPE_EXPR): New.
189 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
190 (finish_declared_type): Declare.
191 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
193 (pp_cxx_type_id): Ditto.
194 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
195 (tsubst): Substitute into a DECLTYPE_TYPE node.
196 (tsubst_copy): Ditto.
197 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
199 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
200 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
201 structural equality (because we can't hash the expressions).
202 (finish_declared_type): New.
203 * lex.c (reswords): Add "decltype" keyword.
204 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
205 (cp_parser_postfix_expression): Add member_access_only_p to
206 restrict postfix expression to member access expressions.
207 (cp_parser_unary_expression): Update call to
208 cp_parser_postfix_expression to reflect new parameter.
209 (cp_parser_declared_type): New.
210 (cp_parser_simple_type_specifier): Parse decltype types.
212 2007-07-27 Mark Mitchell <mark@codesourcery.com>
215 * call.c (convert_for_arg_passing): Only widen bitfields to their
216 declared types if necessary.
218 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
220 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
223 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
225 * decl.c (typename_hash, typename_compare): Constify.
226 * mangle.c (hash_type, compare_type): Likewise.
227 * pt.c (eq_local_specializations, hash_local_specialization):
229 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
230 list_hash): Likewise.
231 * typeck2.c (pat_compare): Likewise.
233 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
235 * method.c (implicitly_declare_fn): Increase alignment if member
236 function pointer format requires it.
238 2007-07-24 Paolo Carlini <pcarlini@suse.de>
241 * typeck.c (check_return_expr): Do not pass a null argument
244 2007-07-24 Paolo Carlini <pcarlini@suse.de>
247 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
250 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
253 * typeck.c (convert_arguments): Only use default args if we have
257 * typeck.c (structural_comptypes): No need to check
258 resolve_typename_type return value here.
259 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
260 * pt.c (resolve_typename_type): Follow typename typedefs. Return
261 original type rather than error_mark_node in case of failure.
262 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
263 resolve_typename_type result check.
264 (cp_parser_direct_declarator, cp_parser_head,
265 cp_parser_constructor_declarator_p): Likewise.
267 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
269 * pt.c (template_parms_variadic_p): Remove.
270 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
272 2007-07-12 Jakub Jelinek <jakub@redhat.com>
275 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
276 argument to dump_aggr_init_expr_args instead of false.
278 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
280 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
281 canonical types; otherwise, fall back to structural type
282 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
283 internal compiler error if the canonical types are wrong.
285 2007-07-11 Paolo Carlini <pcarlini@suse.de>
288 * parser.c (cp_parser_make_indirect_declarator): When the
289 the code argument is ERROR_MARK return cp_error_declarator.
291 2007-07-09 Geoffrey Keating <geoffk@apple.com>
294 * decl.c (cxx_init_decl_processing): Don't set
295 force_align_functions_log.
296 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
297 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
298 FUNCTION_DECL, return its alignment.
300 2007-07-09 Richard Guenther <rguenther@suse.de>
302 * decl.c (start_preparsed_function): Do not promote return type.
304 2007-07-08 Paolo Carlini <pcarlini@suse.de>
307 * pt.c (unify): Never pass error_mark_node to template_decl_level.
309 2007-07-07 Mark Mitchell <mark@codesourcery.com>
312 * pt.c (resolve_overloaded_unification): Robustify. Return a
314 (type_unification_real): Adjust accordingly.
316 2007-07-06 Richard Guenther <rguenther@suse.de>
318 * init.c (build_new_1): Use the correct pointer type.
319 * typeck2.c (build_m_component_ref): Likewise.
321 2007-07-05 Mark Mitchell <mark@codesourcery.com>
324 * init.c (build_zero_init): Always build an initializer for
326 * typeck2.c (build_functional_cast): Use build_zero_init.
329 * init.c (build_new_1): Always pass the allocation function to
330 build_op_delete_call.
331 * call.c (build_op_delete_call): Handle operator delete with a
332 variable-argument list. Do not issue an error when no matching
333 deallocation function is available for a new operator.
336 * cp-tree.h (any_value_dependent_elements_p): Declare it.
337 * decl.c (value_dependent_init_p): New function.
338 (cp_finish_decl): Use it.
339 * pt.c (value_dependent_expression_p): Use
340 any_value_dependent_elements_p.
341 * parser.c (cp_parser_primary_expression): Add comment about
342 treating dependent qualified names as integral
343 constant-expressions.
345 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
347 * decl.c (build_ptrmemfunc_type): Always use structural equality
348 tests when comparing pointer-to-member-function types, because the
349 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
352 2007-07-03 Mark Mitchell <mark@codesourcery.com>
354 * init.c (build_new): Tweak comment.
356 2007-06-29 Dave Brolley <brolley@redhat.com>
359 * parser.c (cp_parser_new_type_id): Don't reduce a named array
360 type to its base type and number of elements here.
361 * init.c (build_new): Call complete_type_or_else to ensure that the
362 type is complete and to issue a diagnostic if it is not.
363 (build_new_1): Don't call complete_type_or_else here.
365 2007-07-03 Richard Guenther <rguenther@suse.de>
368 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
371 2007-07-02 Simon Baldwin <simonb@google.com>
373 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
374 for inner-style nested forward declarations that don't declare
377 2007-07-02 Jakub Jelinek <jakub@redhat.com>
380 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
381 DECL_P in not a variable and appears more than once error messages.
383 2007-07-01 Ollie Wild <aaw@google.com>
385 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
386 (select_decl): Remove function.
387 (unqualified_namespace_lookup): Populate binding by calling
388 ambiguous_decl. Remove select_decl call.
389 (lookup_qualified_name): Remove select_decl call.
390 * decl.c (lookup_and_check_tag): Check for ambiguous references.
391 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
392 generation when name lookup is ambiguous.
394 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
397 * init.c (build_new_1): Use structural equality on the copy of the
400 2007-06-28 Geoffrey Keating <geoffk@apple.com>
402 * decl2.c (determine_visibility): Implement
403 flag_visibility_ms_compat effect on type info.
404 * decl.c (cxx_init_decl_processing): Implement
405 global effect of flag_visibility_ms_compat.
407 2007-06-28 Geoffrey Keating <geoffk@apple.com>
409 * decl2.c (start_objects): Mark constructor-running function
412 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
415 * decl.c (grokdeclarator): Reset friendp for member functions declared
416 friend of their own class.
418 2007-06-23 Mark Mitchell <mark@codesourcery.com>
420 * decl2.c (determine_visibility): Don't look for dllexport here.
421 (determine_visibility_from_class): Tidy.
423 2007-06-18 Simon Baldwin <simonb@google.com>
426 * parser.c (cp_parser_single_declaration): Added check for storage
427 class other than sc_none in parsed declaration, and a flag to indicate
428 if the call is part of an explicit template specialization parse.
429 * (cp_parser_explicit_specialization): Specialization check flag added
430 to call to cp_parser_single_declaration(), set true.
431 * (cp_parser_template_declaration_after_export): Specialization check
432 flag added to call to cp_parser_single_declaration(), set false.
433 * pt.c (check_explicit_specialization): Added code to copy visiblity
434 and linkage from the templated function to the explicit specialization.
436 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
438 * typeck.c (build_binary_op): For templates build the
439 expression in pieces to avoid the assert in build2_stat.
440 (get_member_function_from_ptrfunc):
441 Change over to using POINTER_PLUS_EXPR and convert
442 the second operand to sizetype.
443 * typeck2.c (build_m_component_ref): Likewise.
444 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
445 instead of PLUS_EXPR for pointers.
446 (build_new_1): Likewise.
447 (build_vec_delete_1): Likewise.
448 (build_vec_delete): Likewise.
449 * class.c (build_base_path): Likewise.
450 (build_base_path): Likewise.
451 (convert_to_base_statically): Likewise.
452 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
453 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
454 instead of PLUS_EXPR.
455 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
456 instead of PLUS_EXPR for pointers.
457 * call.c (build_special_member_call): Likewise.
458 * rtti.c (build_headof): Likewise.
459 Use sizetype instead of ptrdiff_type_node.
460 (tinfo_base_init): Create a POINTER_PLUS_EXPR
461 instead of PLUS_EXPR for pointers.
462 * except.c (expand_start_catch_block): Do a
463 NEGATIVE and then a POINTER_PLUS_EXPR instead
465 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
466 PLUS_EXPR on pointer types over to use
467 POINTER_PLUS_EXPR and remove the conversion
468 to the pointer types.
469 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
470 adding to a pointer type. Use size_int instead of
471 ssize_int. Convert the index to sizetype before
472 adding it to the pointer.
474 2007-06-15 Mark Mitchell <mark@codesourcery.com>
476 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
477 (DECL_ANON_UNION_VAR_P): New macro.
478 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
479 than DECL_VAR_MARKED_P, to keep track of which variables we have
481 * decl.c (redeclaration_error_message): Complain about redeclaring
482 anonymous union members at namespace scope.
483 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
485 2007-06-14 Geoff Keating <geoffk@apple.com>
487 * decl2.c (determine_visibility): Ensure that functions with
488 hidden types as parameters are hidden.
491 * decl2.c (determine_visibility): Remove duplicate code for
494 2007-06-12 Ian Lance Taylor <iant@google.com>
497 * init.c (avoid_placement_new_aliasing): New static function.
498 (build_new_1): Call it.
500 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
502 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
503 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
505 2007-06-08 Jakub Jelinek <jakub@redhat.com>
508 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
509 on init, the non-decl cond operand and increment value.
511 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
514 * decl.c (check_initializer): Report an error when a brace enclosed
515 initializer is used for a non-aggregate type in C++98.
516 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
518 (grokdeclarator): Likewise.
519 (move_fn_p): Likewise.
520 * typeck.c (check_return_expr): Likewise.
521 * call.c (reference_binding): Likewise.
522 * error.c (cp_cpp_error): Likewise.
523 * pt.c (check_default_tmpl_args): Likewise.
525 * lex.c (init_reswords): Likewise.
526 * parser.c (p_parser_primary_expression): Likewise.
527 (TOKEN_PRECEDENCE): Likewise.
528 (cp_parser_init_declarator): Likewise.
529 (cp_parser_ptr_operator): Likewise.
530 (cp_parser_parameter_declaration): Likewise.
531 (cp_parser_enclosed_template_argument_list): Likewise.
532 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
533 (cp_parser_next_token_ends_template_argument_p): Likewise.
535 2007-06-04 Simon Baldwin <simonb@google.com>
537 * decl.c (grokdeclarator): Readability change. Moved case labels
538 into direct switch statement scope.
540 2007-06-04 Paolo Carlini <pcarlini@suse.de>
542 * call.c (convert_like_real): Remove pointless code.
544 2007-05-31 Mark Mitchell <mark@codesourcery.com>
546 * decl.c (get_atexit_fn_ptr_type): New function.
547 (get_atexit_node): Use it.
548 (start_cleanup_fn): Likewise.
549 (register_dtor_fn): Use the object's destructor, instead of a
550 separate cleanup function, where possible.
551 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
552 (atexit_fn_ptr_type_node): New macro.
553 * decl2.c (build_cleanup): Use build_address.
555 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
557 * typeck.c (build_binary_op): Include types in error.
559 2007-05-31 Jakub Jelinek <jakub@redhat.com>
562 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
563 needs runtime initialization.
565 2007-05-31 Paolo Carlini <pcarlini@suse.de>
568 * semantics.c (finish_trait_expr): Complete the types.
570 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
571 Douglas Gregor <doug.gregor@gmail.com>
572 Pedro Lamarao <pedro.lamarao@mndfck.org>
573 Howard Hinnant <howard.hinnant@gmail.com>
577 * typeck.c (comptypes): Don't consider rvalue and lvalue
578 reference types to be equivalent.
579 (check_return_expr): Move from certain lvalues when returning
581 * decl.c (grokdeclarator): Implement reference collapsing.
582 (copy_fn_p): Don't consider constructors taking rvalue references
583 to be copy constructors.
585 * call.c (conversion): New "rvaluedness_matches_p" member.
586 (convert_class_to_reference): Require reference type as first
587 parameter instead of base type.
588 (reference_binding): Add logic to handle rvalue references.
589 (implicit_conversion): Update inaccurate comment.
590 (convert_like_real): Disable creation of temporaries that are
591 impossible to initialize for types with move constructors.
592 (build_over_call): Elide move constructors when possible.
593 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
594 (maybe_handle_ref_bind): Return conversion instead of type node.
595 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
596 determine preferred conversion sequences.
597 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
598 (LOOKUP_PREFER_RVALUE): New.
599 (DECL_MOVE_CONSTRUCTOR_P): New.
600 (struct cp_declarator): Add "reference" member for reference
601 types, with new "rvalue_ref" flag.
602 (cp_build_reference_type): Declare.
603 (move_fn_p): Declare.
604 * error.c (dump_type_prefix): Format rvalue reference types
605 correctly in error messages.
606 * except.c (build_throw): Move from certain lvalues when
608 * mangle.c (write_type): Mangle rvalue references differently
609 than regular references.
610 * parser.c (make_reference_declarator): Add boolean parameter for
612 (cp_parser_make_indirect_declarator): New.
613 (cp_parser_new_declarator_opt): Call
614 cp_parser_make_indirect_declarator.
615 (cp_parser_conversion_declarator_opt): Ditto.
616 (cp_parser_declarator): Ditto.
617 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
619 * pt.c (tsubst): Implement reference collapsing.
620 (maybe_adjust_types_for_deduction): Implement special template
621 parameter deduction rule for rvalue references.
622 (type_unification_real): Update calls to
623 maybe_adjust_types_for_deduction.
624 (try_one_overload): Ditto.
625 (unify_pack_expansion): Ditto.
626 * tree.c (lvalue_p_1): Handle rvalue reference types.
627 (cp_build_reference_type): New.
629 2007-05-30 Jakub Jelinek <jakub@redhat.com>
632 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
633 variables that need runtime initialization.
635 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
638 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
639 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
640 case POSTDECREMENT_EXPR>): Return the error_mark_node
641 if either the real or imaginary parts would an
644 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
645 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
648 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
649 token is a closing brace, false if there are no tokens left.
650 (cp_parser_namespace_alias_definition): Only consume the next token if
651 it is a closing brace.
653 * parser.c (cp_parser_class_specifier): Likewise.
655 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
657 * semantics.c (finish_member_declaration): Fix a typo in the
660 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
672 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
673 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
674 * pt.c (check_for_bare_parameter_packs): Return bool indicated
675 whether everything was okay. Fix indentation.
676 (push_template_decl_real): Check for bare parameter packs in
677 function parameters; where errors occur, mark the parameter types
678 with ERROR_MARK_NODEs to avert ICEs.
679 (coerce_template_parameter_pack): New.
680 (coerce_template_parms): Moved parameter pack coercion into
681 coerce_template_parameter_pack, and permit it anywhere in the
682 template parameter list (not just at the end). Parameter and
683 argument indices can vary (somewhat) separately now, so add
684 PARM_IDX and ARG_IDX.
685 (fn_type_unification): Don't set an argument pack as incomplete if
686 no argument pack was deduced.
687 (type_unification_real): If a type parameter is a parameter pack
688 and has not otherwise been deduced, it will be deduced to an empty
690 (more_specialized_fn): Use the actual lengths of the argument
691 lists when comparing against expansions.
692 * semantics.c (finish_member_declaration): If a field's type has
693 bare parameter packs, error and set its type to ERROR_MARK_NODE.
695 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
698 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
700 2007-05-22 Ollie Wild <aaw@google.com>
702 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
703 (unqualified_namespace_lookup): Adds check for hidden types.
705 2007-05-22 Ollie Wild <aaw@google.com>
707 * decl.c (duplicate_decls): Verify namespace names are unique.
709 2007-05-21 Mark Mitchell <mark@codesourcery.com>
711 * decl.c (cxx_maybe_build_cleanup): Handle
712 __attribute__((cleanup)).
714 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
716 * cvt.c (cp_convert_and_check): Don't check warnings if the
719 2007-05-18 Geoffrey Keating <geoffk@apple.com>
721 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
723 2007-05-14 Paolo Carlini <pcarlini@suse.de>
726 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
727 type only if is a class type (5.2.8/4).
729 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
731 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
732 * decl.c (grokdeclarator): Use unsigned_type_for instead of
733 c_common_unsigned_type.
735 2007-05-11 Silvius Rus <rus@google.com>
737 * cp/typeck.c (build_indirect_ref): Add call to
738 strict_aliasing_warning.
739 (build_reinterpret_cast_1): Condition call to
740 strict_aliasing_warning.
742 2007-05-11 Jan Hubicka <jh@suse.cz>
744 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
745 * decl2.c (start_objects): ctors and dtors are no longer public.
746 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
748 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
750 * typeck.c (build_unary_op): Remove code that used to
751 handle non lvalue increments/decrements.
753 2007-05-07 Mike Stump <mrs@apple.com>
755 * parser.c (check_empty_body): Add.
756 (cp_parser_iteration_statement): Add call to check_empty_body.
758 2007-05-05 Geoffrey Keating <geoffk@apple.com>
761 * mangle.c (write_mangled_name): Mangle static variable names.
762 (write_unqualified_name): Use local-source-name for
763 namespace-scope static variables.
765 2007-05-04 Dirk Mueller <dmueller@suse.de>
767 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
770 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
773 * decl2.c (constrain_class_visibility):
774 Use strip_pointer_or_array_types instead of strip_array_types.
776 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
779 * decl.c (reshape_init_r): Don't reshape the first element if it
780 is a pointer to member function.
782 2007-04-27 Simon Baldwin <simonb@google.com>
784 * decl.c (grokparms): Changed message format from %qD to %qE.
786 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
788 * error.c (maybe_warn_variadic_templates): Variadic templates are
789 now in C++0x, so only warn about them in C++98 mode.
791 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
794 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
795 integeral types from vectors types.
797 2007-04-26 Jakub Jelinek <jakub@redhat.com>
800 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
801 for type dependent OMP_CLAUSE_DECLs.
803 2007-04-24 Mark Mitchell <mark@codesourcery.com>
806 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
807 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
808 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
809 * init.c (build_zero_init): Adjust, as
810 COMPLEX_TYPE is now a SCALAR_TYPE.
811 * typeck2.c (digest_init): Allow brace-enclosed initializers for
812 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
814 2007-04-25 Paolo Carlini <pcarlini@suse.de>
816 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
817 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
818 (trait_expr_value): Adjust.
820 2007-04-23 Simon Baldwin <simonb@google.com>
822 * decl.c (grokparms): Added new error for duplicate function
823 parameters names in function prototypes, to match gcc behavior.
825 2007-04-23 Jan Hubicka <jh@suse.cz>
827 * cp/decl2.c (finish_objects): Do not call target constructor/destructor
830 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
832 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
833 instead of checking GIMPLE_STMT_P in chain_next.
835 2007-04-17 Mark Mitchell <mark@codesourcery.com>
838 * call.c (convert_for_arg_passing): Convert bitfields to their
841 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
844 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
846 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
850 * cp/decl2.c (constrain_class_visibility):
851 Do not warn about the use of anonymous namespace in the main input file.
853 2007-04-15 Mark Mitchell <mark@codesourcery.com>
855 * cp-tree.h (current_template_parms): Fix typo in comment.
857 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
859 * cp-tree.h, error.c: Fix comment typos.
861 2007-04-13 Jason Merrill <jason@redhat.com>
864 * call.c (reference_binding): Add c_cast_p parm. If true,
865 add quals to TO as needed to make it reference-compatible.
867 2007-04-11 Jan Hubicka <jh@suse.cz>
869 * cp/class.c (convert_to_base_statically): Fold produced tree; verify
870 that we are not processing template_decl.
872 2007-04-09 Mark Mitchell <mark@codesourcery.com>
875 * class.c (build_base_path): Ensure that the converted pointer has
876 the same cv-qualification as the input.
878 2007-04-09 Paolo Carlini <pcarlini@suse.de>
880 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
882 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
884 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
886 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
887 * tree.c (cp_add_pending_fn_decls): Remove.
888 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
890 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
892 Revert change removing staticp.
894 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
896 * cp-objcp-common.c (cxx_staticp): Remove.
897 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
898 * cp-tree.h (cxx_staticp):
900 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
902 * class.c (check_for_override): Don't remove dllmport attribute
905 2007-04-03 Jakub Jelinek <jakub@redhat.com>
908 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
909 type issue error and return early.
911 2007-03-30 Jason Merrill <jason@redhat.com>
914 * typeck.c (cp_type_readonly): New fn.
915 * cp-tree.h: Declare it.
916 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
917 (cp_finish_decl): Not here.
919 2007-03-31 Richard Guenther <rguenther@suse.de>
921 * optimize.c (maybe_clone_body): Replace splay-tree usage by
924 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
929 * parser.c (declarator_can_be_parameter_pack): New.
930 (cp_parser_template_parameter): Only parse the `...' if the
931 declarator can be a parameter pack.
932 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
934 * pt.c (find_parameter_packs_r): Look into the bounds on integer
935 types (they could be used as array bounds).
936 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
937 (tsubst_pack_expansion): Handle failure to expand parameter
940 2007-03-30 Paolo Carlini <pcarlini@suse.de>
943 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
944 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
945 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
946 (CLASS_TYPE_NON_UNION_P): Add.
947 (struct lang_type_class): Add has_complex_dflt.
948 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
949 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
950 * cp-tree.def: Add TRAIT_EXPR.
951 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
952 * lex.c (struct resword): Add __has_nothrow_assign,
953 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
954 __has_trivial_constructor, __has_trivial_copy,
955 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
956 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
957 __is_pod, __is_polymorphic, __is_union.
958 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
959 (cp_parser_trait_expr): New.
960 * semantics.c (finish_trait_expr, trait_expr_value
961 classtype_has_nothrow_copy_or_assign_p): New.
962 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
964 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
965 * class.c (check_bases, check_field_decl, check_bases_and_members):
966 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
967 * pt.c (uses_template_parms, tsubst_copy_and_build,
968 value_dependent_expression_p, type_dependent_expression_p): Deal with
970 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
972 2007-03-29 Richard Guenther <rguenther@suse.de>
974 * tree.c (cp_walk_subtrees): Do not set input_location.
976 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
979 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
982 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
984 * parser.c (struct cp_parser): Update comment for
985 greater_than_is_operator_p.
986 (cp_parser_primary_expression): In C++0x mode, a cast operator can
987 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
988 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
989 !GREATER_THAN_IS_OPERATOR_P.
990 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
991 `>>' operators that will become two `>' tokens in C++0x.
992 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
993 mode, allowing it to terminate default arguments.
994 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
995 `>>' like two consecutive `>' tokens.
996 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
997 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
998 ends a template argument.
1000 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1002 * decl.c (redeclaration_error_message): Complain when redeclaring
1003 a friend function with default template arguments (C++0x mode only).
1004 * cp-tree.h (check_default_tmpl_args): Declare.
1005 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
1006 template arguments in function templates. Add support for checking
1007 the default template arguments of friend templates.
1008 (push_template_decl_real): Fix call to check_default_tmpl_args.
1009 (type_unification_real): If a template parameter has not been
1010 deduced but provides a default template argument, substitute into
1011 that default template argument.
1012 * parser.c (cp_parser_init_declarator): When declaring (but not
1013 defining!) a function template in C++0x mode, check for default
1016 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1019 * decl.c (grokdeclarator): Deal with cv-qualified function type
1020 typedefs in the same way for member and non-member functions.
1022 2007-03-26 Dirk Mueller <dmueller@suse.de>
1024 * parser.c (cp_parser_member_declaration): Pedwarn
1025 about stray semicolons after member declarations.
1027 2007-03-26 Paolo Carlini <pcarlini@suse.de>
1030 * pt.c (instantiate_decl): Set in_system_header.
1032 2007-03-22 Mark Mitchell <mark@codesourcery.com>
1034 * cp-tree.h (current_tempalte_parms): Improve documentation.
1035 * pt.c (current_template_args): Likewise.
1038 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
1039 not consume tokens when failing.
1041 2007-03-22 Jim Wilson <wilson@specifix.com>
1042 Mark Mitchell <mark@codesourcery.com>
1045 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
1046 consistent with FROM.
1048 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1050 * error.c (dump_expr): Handle dependent names that designate types.
1051 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
1053 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
1055 * cp-tree.def, parser.c, pt.c: Fix comment typos.
1057 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1059 * cvt.c (cp_convert_and_check) : Define.
1060 * cp-tree.h (cp_convert_and_check): Declare.
1061 * call.c (convert_conversion_warnings): Rename to
1062 conversion_null_warnings. The warning for floating-point to
1063 integer is handled by convert_and_check in convert_like_real.
1064 (convert_like_real): convert_conversion_warnings was renamed as
1065 conversion_null_warnings.
1066 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
1067 overflow and changes of value during conversion.
1069 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1072 * parser.c (cp_parser_statement): If 'namespace' is found, this
1073 only can be a namespace alias definition, so parse it now.
1074 (cp_parser_namespace_alias_definition): if we find an open brace
1075 instead of '=', then this is actually a misplaced namespace
1078 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1081 * decl.c (cxx_init_decl_processing): Move command-line options
1082 processing to c-opts.c.
1084 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
1086 * ptree.c (cxx_print_type): Use formatting markup for integers
1087 when printing template parameter index/level/orig level.
1088 (cxx_print_xnode): Ditto.
1089 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
1090 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
1091 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
1093 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
1094 rather than a HOST_WIDE_INT.
1095 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
1096 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
1098 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
1099 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
1100 IN_BASE_INITIALIZER bool bitfields.
1101 (struct cp_declarator): Make KIND a 4-bit field. Make
1102 PARAMETER_PACK_P a bool bitfield just after KIND.
1103 * pt.c (uses_parameter_packs): Destroy the pointer set.
1104 (make_pack_expansion): Ditto.
1105 (check_for_bare_parameter_packs): Ditto.
1106 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
1108 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
1111 * call.c (convert_default_arg): Instead of copying the node,
1114 2007-03-15 Dirk Mueller <dmueller@suse.de>
1117 * call.c (convert_conversion_warnings): New..
1118 (convert_like_real): .. factored out from here.
1119 (convert_conversion_warnings): Add warning about
1120 false being converted to NULL in argument passing.
1122 2007-03-14 Dirk Mueller <dmueller@suse.de>
1124 * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
1125 (finish_do_body): Warn about empty body in do/while statement.
1127 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1129 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
1131 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1134 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
1137 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
1139 * cp/repo.c (init_repo): Initialize random_seed saved options.
1140 (finish_repo): Adjust.
1142 2007-03-13 Mark Mitchell <mark@codesourcery.com>
1145 * Make-lang.in (doc/g++.1): Use $< to specify the location from
1148 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
1150 * decl.c (compute_array_index_type): New warning flag warn_vla.
1152 2007-03-12 Mark Mitchell <mark@codesourcery.com>
1155 * call.c (convert_default_arg): Copy non-constant arguments.
1157 2007-03-11 Mark Mitchell <mark@codesourcery.com>
1160 * parser.c (cp_parser_postfix_expression): Disallow compound
1161 literals in constant expressions.
1164 * semantics.c (finish_typeof): Use unlowered_expr_type.
1166 2007-03-10 Mark Mitchell <mark@codesourcery.com>
1169 * cp-tree.h (unlowered_expr_type): New function.
1170 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
1171 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
1172 (unlowered_expr_type): New function.
1173 (build_unary_op): Disallow predecrements of bool bitfields.
1174 * call.c (build_conditional_expr): Use unlowered_expr_type.
1175 * pt.c (type_unification_real): Likewise.
1177 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
1180 * typeck.c (check_return_expr): Check for bare parameter packs.
1181 (comptypes): Compare template parameter packs and
1182 type pack expansions.
1183 * decl.c (grokdeclarator): Deal with the declaration of function
1185 (grokparms): Verify that the (optional) function parameter pack is
1186 at the end of the parameter list.
1187 (xref_basetypes): Handle pack expansions in the base class.
1188 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
1189 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
1190 (NONTYPE_ARGUMENT_PACK): New.
1191 (TYPE_PACK_EXPANSION): New.
1192 (EXPR_PACK_EXPANSION): New.
1193 (ARGUMENT_PACK_SELECT): New.
1194 * cp-objcp-common.c (cp_tree_size): Compute size of
1195 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
1196 ARGUMENT_PACK_SELECT.
1197 * error.c (dump_template_argument): Print template argument packs.
1198 (dump_template_argument_list): Ditto.
1199 (dump_template_parameter): Dump `...' for template type parameter
1201 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
1202 (dump_parameters): Print function parameter packs.
1203 (dump_template_parms): Print template argument packs.
1204 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
1205 (maybe_warn_variadic_templates): New.
1206 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
1207 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1208 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1210 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
1211 (write_template_arg): Write argument packs as separate arguments.
1212 * cp-tree.h (struct template_parm_index_s): Add flag that
1213 indicates that the template parameter is actually a parameter
1215 (struct tree_argument_pack_select): New.
1216 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
1217 (union lang_tree_node): Add argument_pack_select.
1218 (FUNCTION_PARAMETER_PACK_P): New.
1219 (PACK_EXPANSION_P): New.
1220 (PACK_EXPANSION_PATTERN): New.
1221 (SET_PACK_EXPANSION_PATTERN): New.
1222 (PACK_EXPANSION_PARAMETER_PACKS): New.
1223 (ARGUMENT_PACK_P): New.
1224 (ARGUMENT_PACK_ARGS): New.
1225 (SET_ARGUMENT_PACK_ARGS): New.
1226 (ARGUMENT_PACK_INCOMPLETE_P): New.
1227 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
1228 (TEMPLATE_PARM_PARAMETER_PACK): New.
1229 (TEMPLATE_TYPE_PARAMETER_PACK): New.
1230 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
1231 (ARGUMENT_PACK_SELECT_INDEX): New.
1232 (ARGUMENT_PACK_SELECT_ARG): New.
1233 (struct cp_declarator): Add parameter_pack_p flag.
1234 (maybe_warn_variadic_templates): Declare.
1235 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
1236 indicate a template parameter pack.
1237 (uses_parameter_packs): Declare.
1238 (template_parameter_pack_p): Declare.
1239 (template_parms_variadic_p): Declare.
1240 (make_pack_expansion): Declare.
1241 (check_for_bare_parameter_packs): Declare.
1242 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
1243 sizeof... expressions.
1244 (pp_cxx_expression): Print pack expansions and non-type argument
1246 (pp_cxx_exception_specification): Print pack expansions.
1247 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
1248 (pp_cxx_ctor_initializer): Print pack expansions.
1249 (pp_cxx_type_id): Print pack expansions.
1250 (pp_cxx_template_argument_list): Print argument packs.
1251 (pp_cxx_template_parameter): Print ellipsis for template parameter
1253 * pt.c (comp_template_parms): Compare template parameter packs.
1254 (template_parameter_pack_p): New.
1255 (template_parms_variadic_p): New.
1256 (template_args_variadic_p): New.
1257 (make_ith_pack_parameter_name): New.
1258 (struct find_parameter_pack_data): New.
1259 (find_parameter_packs_r): New.
1260 (uses_parameter_packs): New.
1261 (make_pack_expansion): New.
1262 (check_for_bare_parameter_packs): New.
1263 (expand_template_argument_pack): New.
1264 (reduce_template_parm_level): Propagate parameter pack flag.
1265 (process_template_parm): Add is_parameter_pack parameter to state
1266 when the parameter is actually a parameter pack. Create template
1267 parameter packs when is_parameter_pack is true.
1268 (current_template_args): The argument for a template parameter
1269 pack is an argument pack containing a single pack expansion.
1270 (process_partial_specialization): When checking that non-type
1271 argument expressions do not involve template parameters, loop over
1272 the arguments in argument packs separately.
1273 (push_template_decl_real): Check that the type of the declaration
1274 does not have any bare parameter packs. Check that primary
1275 templates have no more than one parameter pack, and that it comes
1276 at the end of the template parameter list.
1277 (convert_template_argument): Handle coercions for pack expansion
1278 expressions by coercing the pattern then rebuilding the expansion.
1279 (coerce_template_parms): When coercing the arguments for a
1280 variadic template, pack "extra" arguments into an argument pack.
1281 (coerce_template_template_parms): Cannot coerce between parameter
1282 packs and non-pack parameters.
1283 (template_args_equal): Compare PACK_EXPANSION_P expressions.
1284 (comp_template_args): Expand all template arguments packs before
1285 comparing template argument lists.
1286 (mangle_class_name_for_template): Make argument packs as separate
1288 (for_each_template_parm_r): No need to handle BASELINK.
1289 (instantiate_class_template): Handle pack expansions in the base
1291 (tsubst_pack_expansion): New.
1292 (tsubst_template_args): Handle substitutions of argument packs and
1293 pack expansion into template argument lists.
1294 (tsubst_decl): Expand function parameter packs into separate
1295 function parameters.
1296 (tsubst_arg_types): Expand a type pack expansion into separate
1298 (tsubst_exception_specification): Handle pack expansions in
1299 exception specifiers.
1300 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
1301 replacing a template parameter with its argument. If we encounter
1302 a substitution for an argument pack, just return the parameter
1304 (tsubst_copy): sizeof(X...) returns the number of elements in
1305 parameter pack X. See through ARGUMENT_PACK_SELECT when the
1306 PARM_DECL is a parameter pack.
1307 (tsubst_expr): Expression pack expansions and argument packs
1308 cannot show up here; they will all be handled through function
1309 calls, sizeof, and template argument lists.
1310 (tsubst_copy_and_build): sizeof(X...) returns the number of
1311 elements in parameter pack X. Handle pack expansions in TREE_LIST
1312 and CONSTRUCTOR nodes.
1313 (fn_type_unification): Handle "incomplete" explicit template
1314 argument lists that specify some of the arguments for a template
1316 (type_unification_real): Unify arguments against pack expansions.
1317 (template_parm_level_and_index): New, helper function.
1318 (unify_pack_expansion): New.
1319 (unify): Unify argument packs on an argument-by-argument basis,
1320 handling variadic argument packs as well.
1321 (more_specialized_fn): Handle unification of function parameter
1322 packs. All things being equal, prefer non-variadic function
1323 templates to variadic function templates.
1324 (more_specialized_class): Prefer the variadic class template
1325 partial specialization that binds fewer arguments to a parameter
1327 (regenerate_decl_from_template): Expand function parameter packs
1328 into separate parameters.
1329 (instantiate_decl): Ditto.
1330 (tsubst_initializer_list): Handle pack expansions for base-class
1332 (dependent_type_p_r): Determine dependent types in argument packs
1333 and pack expansions.
1334 (value_dependent_expression_p): Determine value-dependence of
1335 non-type argument packs.
1336 (dependent_template_arg_p): Handle argument packs.
1337 * semantics.c (finish_cond): Check for bare parameter packs.
1338 (finish_expr_stmt): Ditto.
1339 (finish_for_expr): Ditto.
1340 (finish_switch_cond): Ditto.
1341 (finish_mem_initializers): Ditto.
1342 * name-lookup.c (arg_assoc_type): Handle pack expansions and
1344 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
1345 * parser.c (make_declarator): Declarator is not an expansion.
1346 (make_pointer_declarator): Transfer parameter pack flag to outer
1348 (make_reference_declarator): Ditto.
1349 (make_ptrmem_declarator): Ditto.
1350 (make_call_declarator): Ditto.
1351 (make_array_declarator): Ditto.
1352 (cp_parser_postfix_expression): Allow pack expansion expressions
1353 in the argument list for a call expression.
1354 (cp_parser_parenthesized_expression_list): Add new parameter
1355 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
1356 into separate arguments."
1357 (cp_parser_new_placement): Allow pack expansion expressions.
1358 (cp_parser_new_initializer): Ditto.
1359 (cp_parser_mem_initializer_list): Allow ellipsis to create a
1360 base-class initializer expansion.
1361 (cp_parser_mem_initializer): Ditto.
1362 (cp_parser_template_parameter_list): Keep track of whether the
1363 template parameter is a template parameter pack.
1364 (cp_parser_template_parameter): Parse the ellipsis to indicate a
1365 template parameter pack.
1366 (cp_parser_type_parameter): Ditto.
1367 (cp_parser_template_argument_list): Parse the ellipsis to indicate
1369 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
1370 this declarator is a parameter pack.
1371 (cp_parser_parameter_declaration): The ellipsis does not end the
1372 parameter declaration, because it might be a parameter pack. Parse
1373 the ellipsis to indicate a parameter pack.
1374 (cp_parser_initializer): Allow pack expansions.
1375 (cp_parser_initializer_list): Allow ellipsis to create an
1376 initializer expansion.
1377 (cp_parser_base_clause): Allow ellipsis to create a base specifier
1379 (cp_parser_type_id_list): Allow ellipsis to create an exception
1380 specifier expansion.
1381 (cp_parser_attribute_list): Don't allow pack expansions.
1382 (cp_parser_functional_cast): Allow pack expansions.
1383 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
1384 compute the length of a parameter pack.
1385 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
1386 end a template argument.
1387 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1388 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1391 2007-03-09 Dirk Mueller <dmueller@suse.de>
1393 * cp/call.c (build_new_op): Call warn_logical_operator.
1395 2007-03-08 Volker Reichelt <reichelt@netcologne.de>
1398 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
1401 * pt.c (any_template_arguments_need_structural_equality_p):
1404 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
1406 * decl.c (grokdeclarator): Disable warnings for anonymous
1409 2007-03-05 Volker Reichelt <reichelt@netcologne.de>
1411 * typeck2.c (readonly_error): Always emit a hard error.
1412 Remove last argument.
1413 * cp-tree.h (readonly_error): Adjust prototype.
1414 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
1415 * typeck.c (build_unary_op): Likewise.
1416 (build_modify_expr): Likewise.
1418 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
1421 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
1423 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1426 * parser.c (struct cp_parser): New IN_IF_STMT.
1427 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
1428 returning if parsing the body of an 'if' statement or issuing an
1429 error and continuing.
1430 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
1432 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
1434 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
1437 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
1440 2007-03-02 Geoffrey Keating <geoffk@apple.com>
1442 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
1443 Objective-C++. Don't exit early if -shared-libgcc needs to be
1446 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1448 * typeck.c (common_base_type): Delete unused function.
1450 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
1452 * Make-lang.in: Add dummy lang.install-pdf target.
1454 2007-03-01 Simon Baldwin <simonb@google.com>
1457 * decl.c (check_tag_decl): Added new warning for typedef ignored
1458 when it precedes an otherwise valid non-typedef declaration.
1460 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
1462 * typeck.c (build_function_call): Store converted arguments
1463 in a stack-allocated array instead of building a list.
1464 (convert_arguments): Store arguments in the array passed in as an
1465 argument, and return the actual number of arguments.
1466 * call.c (build_call): Delete, and replace with...
1467 (build_call_n, build_call_a): New.
1468 (build_op_delete_call): Rewrite to avoid constructing argument lists.
1469 (build_over_call): Store converted arguments in a stack-allocated
1470 array instead of building a list.
1471 (build_cxx_call): Pass arguments in an array instead of as a list.
1472 (build_java_interface_fn_ref): Rewrite to avoid constructing
1474 * tree.h: Update declarations to reflect above changes.
1475 * method.c (use_thunk): Use a stack-allocated array to hold
1476 the arguments instead of a list.
1477 * rtti.c (throw_bad_cast): Update call to cxx_call.
1478 (throw_bad_typeid): Likewise.
1479 (build_dynamic_cast_1): Likewise.
1480 * init.c (build_builtin_delete_call): Use build_call_n.
1481 * decl.c (expand_static_init): Likewise.
1482 * except.c (cp_protect_cleanup_actions): Likewise.
1483 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
1484 (gimplify_must_not_throw_expr): Likewise.
1485 (cxx_omp_apply_fn): Use build_call_a.
1487 2007-02-26 Mark Mitchell <mark@codesourcery.com>
1489 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
1490 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
1492 2007-02-25 Mark Mitchell <mark@codesourcery.com>
1494 * cp-tree.h (static_ctors): Remove.
1495 * cp-tree.h (static_dtors): Likewise.
1496 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
1497 refactoring of tree_map hierarchy.
1498 (decl_shadowed_for_var_insert): Likewise.
1499 * semantics.c (expand_body): Use c_expand_body.
1500 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
1501 * decl2.c (static_ctors): Remove.
1502 (static_dtors): Likewise.
1503 (generate_ctor_or_dtor_function): Pass NULL_TREE to
1504 objc_generate_static_init_call. Do not call static_[cd]tors.
1505 (generate_ctor_and_dtor_functions_for_priority): Do not check for
1507 (cp_write_global_declarations): Likewise.
1509 2007-02-23 Richard Guenther <rguenther@suse.de>
1511 * class.c (note_name_declared_in_class): Make declaration
1512 changes meaning a pedwarn.
1514 2007-02-22 Michael Matz <matz@suse.de>
1517 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
1518 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
1519 dump_function_decl): Guard emitting outer scopes by new flag.
1520 * cp-lang.c (cxx_dwarf_name): New function.
1521 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
1522 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
1524 (push_template_decl_real, lookup_template_class): Remove calls
1527 2007-02-19 Mark Mitchell <mark@codesourcery.com>
1529 * call.c (build_new_method_call): Ensure that explicit calls of
1530 destructors have type "void".
1532 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1534 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
1535 and -Walways-true with -Waddress.
1536 * cvt.c (convert_to_void): Replace unconditional warning with
1539 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
1541 * decl.c, tree.c: Fix comment typos.
1543 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1546 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
1547 statement expression if we had an error mark node.
1549 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
1550 Brooks Moses <brooks.moses@codesourcery.com>
1551 Lee Millward <lee.millward@codesourcery.com>
1553 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
1554 Change class to tcc_vl_exp.
1556 * call.c (build_call): Use build_call_list instead
1558 (build_over_call): Likewise.
1559 (build_new_method_call): Use build_min_non_dep_call_list
1560 instead of build_min_non_dep.
1562 * error.c (dump_call_expr_args): New function.
1563 (dump_aggr_init_expr_args): New function.
1564 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
1565 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
1567 * cvt.c (convert_to_void): Use build_call_array instead
1568 of build3; use new AGGR_INIT_EXPR accessor macros.
1570 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
1571 instead of TREE_CODE_LENGTH.
1573 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
1574 AGGR_INIT_EXPR accessor macros.
1576 * cp-gimplify.c (cp_gimplify_init_expr): Use
1577 AGGR_INIT_EXPR_SLOT to set the slot operand.
1579 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
1580 (AGGR_INIT_EXPR_SLOT): New macro.
1581 (AGGR_INIT_EXPR_ARG): New macro.
1582 (aggr_init_expr_nargs): New macro.
1583 (AGGR_INIT_EXPR_ARGP): New macro.
1584 (aggr_init_expr_arg_iterator): New.
1585 (init_aggr_init_expr_arg_iterator): New.
1586 (next_aggr_init_expr_arg): New.
1587 (first_aggr_init_expr_arg): New.
1588 (more_aggr_init_expr_args_p): New.
1589 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
1590 (stabilize_aggr_init): New declaration.
1591 (build_min_non_dep_call_list): Likewise.
1593 * tree.c (process_aggr_init_operands): New function.
1594 (build_aggr_init_array) New function.
1595 (build_cplus_new): Update to use new CALL_EXPR and
1596 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
1597 build_aggr_init_array.
1598 (build_min_non_dep_call_list) New function.
1599 (build_min_nt): Assert input code parameter is not a variable
1600 length expression class.
1601 (build_min, build_min_non_dep): Likewise.
1602 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
1603 to check for equality instead of recursing. Handle tcc_vl_exp
1605 (stabilize_call): Update to only handle CALL_EXPRs, not
1606 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
1607 (stabilize_aggr_init): New function.
1608 (stabilize_init): Use it.
1610 * cxx-pretty-print.c (pp_cxx_postfix_expression)
1611 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
1612 AGGR_INIT_EXPR accessor macros and argument iterators.
1614 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
1615 build_vl_exp. Iterate through the operands, recursively
1616 processing each one.
1617 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
1618 CALL_EXPR accessor macros.
1619 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
1620 tree code classes. Use TREE_OPERAND_LENGTH instead of
1623 * semantics.c (finish_call_expr): Use build_nt_call_list
1624 instead of build_nt.
1625 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
1626 accessor macros. Use build_call_array to construct the
1627 CALL_EXPR node instead of build3
1629 * decl2.c (build_offset_ref_call_from_tree): Use
1630 build_nt_call_list and build_min_non_dep_call_list instead
1631 of build_min_nt and build_min_non_dep.
1633 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
1634 Use build_nt_call_list instead of build_min_nt.
1636 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1639 * call.c (build_conditional_expr): Improve error message.
1641 2007-02-13 Dirk Mueller <dmueller@suse.de>
1643 * friend.c (do_friend): Annotate warning about friend
1644 declarations in templates with OPT_Wnon_template_friend.
1645 Convert informal message from warning() to inform().
1647 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
1648 Mark Mitchell <mark@codesourcery.com>
1651 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
1652 instantiations for variables.
1654 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1657 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
1658 Check warn_unused_value just once.
1660 2007-02-11 Mark Mitchell <mark@codesourcery.com>
1663 * pt.c (determine_specialization): Use skip_artificial_parms_for.
1664 (fn_type_unificiation): Likewise.
1665 (get_bindings): Likewise.
1667 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
1670 * decl.c (finish_function): Use DECL_REPLACEABLE.
1671 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1673 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
1675 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
1677 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
1679 * decl.c (grokvardecl): Don't error if !have_tls.
1680 (grokdeclarator): Likewise.
1681 * parser.c (cp_parser_omp_threadprivate): Likewise.
1683 2007-02-07 Jakub Jelinek <jakub@redhat.com>
1686 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
1687 parameters and result decls in omp clauses.
1688 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
1691 2007-02-05 Dirk Mueller <dmueller@suse.de>
1694 * parser.c (cp_parser_class_specifier): Always initialize bases.
1696 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
1698 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
1699 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
1700 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
1702 * semantics.c (finish_omp_atomic): Store a whole expression node
1703 in operand 1, and integer_zero_node in operand 0, for dependent
1704 OMP_ATOMIC. Rewrite to make flow easier to understand.
1706 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1708 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
1710 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
1712 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
1713 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
1715 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
1717 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
1718 keyword warning to -Wc++0x-compat.
1720 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1722 * decl.c (grokdeclarator): Update documentation.
1724 2007-02-02 Jakub Jelinek <jakub@redhat.com>
1727 * decl.c (grokdeclarator): If __thread is used together with
1728 a storage class other than extern and static, clear thread_p
1729 after issuing diagnostics and fall through to checking the
1732 2007-01-30 Roger Sayle <roger@eyesopen.com>
1734 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
1735 calculating the size of an array (to avoid recursive errors).
1737 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1740 * typeck.c (build_binary_op): Fix logic for warning. Move warning
1742 * call.c (convert_like_real): Don't warn when converting to
1745 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1747 * decl.c (pop_label): Replace warning with call to
1748 warn_for_unused_label.
1750 2007-01-28 Andrew Pinski <pinskia@gmail.com>
1753 * semantics.c (finish_pseudo_destructor_expr): Check the
1754 destrutor name by calling check_dtor_name.
1756 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
1758 * lex.c (D_CPP0X): Rename.
1760 (reswords): D_CPP0X -> D_CXX0X.
1761 (init_reswords): Ditto.
1762 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
1763 of C++0x keywords as identifiers.
1765 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
1768 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
1771 2007-01-23 Ian Lance Taylor <iant@google.com>
1773 * typeck.c (convert_for_assignment): Only warn about a = b = c
1774 when converting to bool.
1776 2007-01-23 Roger Sayle <roger@eyesopen.com>
1778 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
1780 * typeck.c (ignore_overflows): Remove the remaining uses of
1781 TREE_CONSTANT_OVERFLOW.
1783 2007-01-20 Jan Hubicka <jh@suse.cz>
1785 * decl2.c (start_objects, start_static_storage_duration_function):
1786 Do not make the functions uninlinable.
1788 2007-01-17 Ian Lance Taylor <iant@google.com>
1790 * class.c (add_method): Call VEC_reserve_exact rather than passing
1791 a negative size to VEC_reserve.
1793 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
1796 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
1798 2007-01-10 Mark Mitchell <mark@codesourcery.com>
1801 * decl.c (make_typename_type): If the qualified name is not a
1802 type, issue an error.
1803 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
1806 2007-01-08 Geoffrey Keating <geoffk@apple.com>
1808 * rtti.c: Include target.h.
1809 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
1810 don't emit typeinfo for fundamental types as weak.
1811 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
1813 2007-01-08 Richard Guenther <rguenther@suse.de>
1815 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
1817 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
1819 * call.c (standard_conversion): Pass flag to
1820 vector_types_convertible_p to disallow emission of note.
1821 * typeck.c (convert_for_assignment): Pass flag to
1822 vector_types_convertible_p to allow emission of note.
1823 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
1824 to disallow emission of note.
1826 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1829 * typeck.c (build_binary_op): Call overflow_warning if
1830 TREE_OVERFLOW_P is true for the result and not for any of the
1833 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
1836 * class.c (add_method): Don't wait until template
1837 instantiation time to complain about duplicate methods.
1839 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1842 * semantics.c (finish_unary_op_expr): Warn only if result
1843 overflowed and operands did not.
1845 2007-01-05 Ian Lance Taylor <iant@google.com>
1847 * typeck.c (build_binary_op): Warn about comparing a non-weak
1850 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
1852 * pt.c (tsubst): Propagate the need for structural equality checks
1853 when reducing the level of template parameters.
1855 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
1857 * pt.c: Fix a comment typo.
1859 2007-01-02 Ian Lance Taylor <iant@google.com>
1861 * semantics.c (maybe_convert_cond): Optionally warn when using an
1862 assignment as a condition.
1863 * typeck.c (convert_for_assignment): Optionally warn about
1864 assigning the result of an assignment to a bool.
1866 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
1868 * pt.c (canonical_template_parms): Correct typo in comment.
1870 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
1872 * typeck.c (structural_comptypes): Renamed from "comptypes".
1873 (comptypes): Use canonical type information to perform fast type
1874 comparison. When VERIFY_CANONICAL_TYPES, verify that the
1875 canonical type comparison returns the same results as we would see
1876 from the current, structural check. Support COMPARE_STRUCTURAL
1877 when we need structural checks.
1878 * decl.c (typename_compare): Fix comment.
1879 (build_typename_type): TYPENAME_TYPE nodes require structural
1880 equality checks, because they resolve different based on the
1882 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
1883 require structural equality checks (for now).
1884 (build_ptrmemfunc_type): Build the canonical pointer to member
1886 (compute_array_index_type): Whenever we build a new index type
1887 to represent the size of an array in a template, we need to mark
1888 this index type as requiring structural equality. This goes for
1889 arrays with value-dependent sizes with the current ABI, or all
1891 * tree.c (cplus_array_hash): New.
1892 (struct cplus_array_info): New.
1893 (cplus_array_compare): New.
1894 (cplus_array_htab): New.
1895 (build_cplus_array_type_1): Use a hash table to cache the array
1896 types we build. Build the canonical array type for each array
1898 (cp_build_qualified_type_real): When building a cv-qualified array
1899 type, use the hash table of array types and build canonical array
1901 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
1902 use structural equality (for now).
1903 * cp-tree.h (COMPARE_STRUCTURAL): New.
1904 * pt.c (canonical_template_parms): New.
1905 (canonical_type_parameter): New.
1906 (process_template_parm): Find the canonical type parameter.
1907 (lookup_template_class): When we have named the primary template
1908 type, set the canonical type for our template class to the primary
1909 template type. If any of the template arguments need structural
1910 equality checks, the template class needs structural equality
1912 (tsubst): When reducing the level of a template template
1913 parameter, we require structural equality tests for the resulting
1914 parameter because its template parameters have not had their types
1915 canonicalized. When reducing a template type parameter, find the
1916 canonical reduced type parameter.
1917 (any_template_arguments_need_structural_equality_p): New.