1 2007-08-24 Richard Guenther <rguenther@suse.de>
3 * tree.c (cp_cannot_inline_tree_fn): Remove.
4 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
5 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
8 2007-08-24 Jakub Jelinek <jakub@redhat.com>
11 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
12 error_mark_node right away if build_expr_type_conversion
16 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
17 is error_mark_node rather than NULL_TREE.
18 * pt.c (check_explicit_specialization): Likewise.
21 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
22 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
24 2007-08-22 Jason Merrill <jason@redhat.com>
27 * pt.c (outermost_tinst_level): New function.
28 * lex.c (in_main_input_context): New function.
29 * cp-tree.h: Declare it.
30 * decl2.c (constrain_class_visibility): Use it to avoid warning
31 about uses of the anonymous namespace in the main input file.
33 2007-08-21 Jakub Jelinek <jakub@redhat.com>
35 * init.c (build_new_1): Use get_target_expr instead of save_expr.
37 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
40 * class.c (finish_struct_1): Warn when a class has virtual
41 functions and accessible non-virtual destructor.
43 2007-08-20 Richard Guenther <rguenther@suse.de>
47 * call.c (build_new_method_call): Convert initializer to
49 * init.c (build_aggr_init): Do not fiddle with types.
50 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
51 * except.c (build_throw): Do not drop qualifiers for the
53 * typeck.c (get_member_function_from_ptrfunc): Do not
54 fiddle with types, instead convert.
55 (build_ptrmemfunc1): Convert to the target type for
57 (gfc_trans_allocate): Convert result to target type.
58 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
59 pointer-to-member structures shall have alias set zero as well.
61 2007-08-20 Richard Guenther <rguenther@suse.de>
63 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
65 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
66 (nonstatic_local_decl_p): Likewise.
67 * tree.c (cp_auto_var_in_fn_p): Remove.
68 * decl.c (nonstatic_local_decl_p): Remove.
70 2007-08-20 Richard Guenther <rguenther@suse.de>
72 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
74 * tree.h (cp_walk_tree): New define to walk_tree_1 with
75 cp_walk_subtrees lh parameter.
76 (cp_walk_tree_without_duplicates): New define to
77 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
78 * tree.c (count_trees): Call
79 cp_walk_tree_without_duplicates.
80 (verify_stmt_tree): Call cp_walk_tree.
81 (break_out_target_exprs): Likewise.
82 (WALK_SUBTREE): Likewise.
83 * cp-gimplify.c (cp_genericize): Likewise.
84 * cp-pt.c (find_parameter_packs_r): Likewise.
85 (uses_parameter_packs): Likewise.
86 (make_pack_expansion): Likewise.
87 (check_for_bare_parameter_packs): Likewise.
88 (for_each_template_parm): Likewise.
89 * decl.c (check_default_argument): Call
90 cp_walk_tree_without_duplicates.
91 * except.c (build_throw): Likewise.
92 * decl2.c (type_visibility): Likewise.
93 * semantics.c (expand_or_defer_fn): Likewise.
94 (finalize_nrv): Call cp_walk_tree.
96 2007-08-20 Jakub Jelinek <jakub@redhat.com>
99 * init.c (build_new_1): Rename placement_var variable to placement_expr.
100 Initialize it with save_expr rather than get_temp_regvar.
102 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
105 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
108 2007-08-17 Ollie Wild <aaw@google.com>
111 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
112 declarations into appropriate slots for comparison. Fix type
115 2007-08-17 Paolo Carlini <pcarlini@suse.de>
118 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
119 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
121 2007-08-17 Paolo Carlini <pcarlini@suse.de>
124 * parser.c (cp_parser_class_head): Improve error message.
126 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
128 * pt.c (instantiate_decl): Set input_location
129 for the function end.
131 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
133 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
135 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
136 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
137 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
138 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
139 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
140 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
141 * typeck.c (cp_type_quals): Likewise.
142 * typeck2.c (cxx_incomplete_type_diagnostic,
143 cxx_incomplete_type_error): Likewise.
145 2007-08-16 Paolo Carlini <pcarlini@suse.de>
148 * pt.c (tsubst_friend_function): When check_classfn
149 returns error_mark_node likewise return it.
151 2007-08-15 Jakub Jelinek <jakub@redhat.com>
154 * typeck.c (check_return_expr): Don't NRV optimize vars in
156 * decl.c (finish_function): Comment fix.
158 2007-08-15 Paolo Carlini <pcarlini@suse.de>
161 * pt.c (push_template_decl_real): Depending on TYPE_P
162 use either TYPE_CONTEXT or DECL_CONTEXT.
164 2007-08-14 Mark Mitchell <mark@codesourcery.com>
166 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
167 constructors and destructors return this.
169 2007-08-14 Paolo Carlini <pcarlini@suse.de>
172 * decl2.c (check_classfn): Return error_mark_node in case of error;
173 in that case, do not call add_method.
174 * decl.c (start_decl): Deal with check_classfn returning
176 (grokfndecl): Likewise.
177 * pt.c (tsubst_friend_function): Likewise.
179 2007-08-14 Andrew Pinski <pinskia@gmail.com>
182 * typeck.c (build_binary_op): Disallow vector float types with
183 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
185 2007-08-11 Ian Lance Taylor <iant@google.com>
187 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
189 * cp/cp-tree.h (cxx_get_alias_set): Update declaration.
191 2007-08-10 Ollie Wild <aaw@google.com>
193 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
195 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
197 (unqualified_namespace_lookup): Fix ambiguous_decl call.
198 (lookup_using_namespace): Fix ambiguous_decl call.
199 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
201 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
203 * call.c (name_as_c_string): Use CONST_CAST.
204 * decl.c (build_decl): Likewise.
205 * parser.c (cp_parser_string_literal): Likewise.
207 2007-08-10 Paolo Carlini <pcarlini@suse.de>
210 * error.c (dump_expr): Consistently use the *_cxx_*
211 variants of the pretty-print functions.
213 2007-08-10 Paolo Carlini <pcarlini@suse.de>
216 * decl.c (check_special_function_return_type): Just error
217 on return type specified for conversion operator.
219 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
221 * typeck2.c (readonly_error): Handle general expressions.
222 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
224 2007-08-06 Dan Hipschman <dsh@google.com>
226 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
227 access function name.
229 2007-08-04 Alfred Minarik <a.minarik@aon.at>
232 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
233 * g++spec.c (lang_specific_driver): Check them.
235 2007-08-06 Paolo Carlini <pcarlini@suse.de>
238 * pt.c (template_class_depth): Fix comment; change return type
241 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
244 2007-03-26 Dirk Mueller <dmueller@suse.de>
246 * parser.c (cp_parser_member_declaration): Pedwarn
247 about stray semicolons after member declarations.
249 2007-08-02 Lee Millward <lee.millward@gmail.com>
254 * parser.c (cp_parser_asm_definition): Detect and discard asm
255 statements with invalid inputs or outputs.
256 (cp_parser_asm_operand_list): Return error mark node if any
257 of the operands are invalid. Adjust documentation.
259 2007-08-02 Nick Clifton <nickc@redhat.com>
261 * typeck.c: Change copyright header to refer to version 3 of the
262 GNU General Public License and to point readers at the COPYING3
263 file and the FSF's license web page.
264 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
265 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
266 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
267 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
268 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
269 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
270 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
271 name-lookup.h, parser.c: Likewise.
273 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
276 * call.c (magic_varargs_p): Honor the "type generic" attribute.
278 2007-07-30 Paolo Carlini <pcarlini@suse.de>
281 * semantics.c (finish_label_stmt): Reject the __label__
282 extension outside function scopes.
284 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
286 * parser.c (eof_token): Un-constify.
287 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
288 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
291 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
293 * pt.c, tree.c, typeck2.c: Fix comment typos.
295 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
296 Mark Mitchell <mark@codesourcery.com>
299 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
300 hidden due to friend declarations in local classes.
302 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
304 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
305 * cp-tree.def (DECLTYPE_TYPE): New.
306 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
307 (dump_type_prefix): Ditto.
308 (dump_type_suffix): Ditto.
309 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
310 * mangle.c (write_type): Handle DECLTYPE_TYPE.
311 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
313 (DECLTYPE_TYPE_EXPR): New.
314 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
315 (finish_declared_type): Declare.
316 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
318 (pp_cxx_type_id): Ditto.
319 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
320 (tsubst): Substitute into a DECLTYPE_TYPE node.
321 (tsubst_copy): Ditto.
322 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
324 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
325 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
326 structural equality (because we can't hash the expressions).
327 (finish_declared_type): New.
328 * lex.c (reswords): Add "decltype" keyword.
329 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
330 (cp_parser_postfix_expression): Add member_access_only_p to
331 restrict postfix expression to member access expressions.
332 (cp_parser_unary_expression): Update call to
333 cp_parser_postfix_expression to reflect new parameter.
334 (cp_parser_declared_type): New.
335 (cp_parser_simple_type_specifier): Parse decltype types.
337 2007-07-27 Mark Mitchell <mark@codesourcery.com>
340 * call.c (convert_for_arg_passing): Only widen bitfields to their
341 declared types if necessary.
343 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
345 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
348 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
350 * decl.c (typename_hash, typename_compare): Constify.
351 * mangle.c (hash_type, compare_type): Likewise.
352 * pt.c (eq_local_specializations, hash_local_specialization):
354 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
355 list_hash): Likewise.
356 * typeck2.c (pat_compare): Likewise.
358 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
360 * method.c (implicitly_declare_fn): Increase alignment if member
361 function pointer format requires it.
363 2007-07-24 Paolo Carlini <pcarlini@suse.de>
366 * typeck.c (check_return_expr): Do not pass a null argument
369 2007-07-24 Paolo Carlini <pcarlini@suse.de>
372 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
375 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
378 * typeck.c (convert_arguments): Only use default args if we have
382 * typeck.c (structural_comptypes): No need to check
383 resolve_typename_type return value here.
384 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
385 * pt.c (resolve_typename_type): Follow typename typedefs. Return
386 original type rather than error_mark_node in case of failure.
387 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
388 resolve_typename_type result check.
389 (cp_parser_direct_declarator, cp_parser_head,
390 cp_parser_constructor_declarator_p): Likewise.
392 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
394 * pt.c (template_parms_variadic_p): Remove.
395 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
397 2007-07-12 Jakub Jelinek <jakub@redhat.com>
400 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
401 argument to dump_aggr_init_expr_args instead of false.
403 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
405 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
406 canonical types; otherwise, fall back to structural type
407 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
408 internal compiler error if the canonical types are wrong.
410 2007-07-11 Paolo Carlini <pcarlini@suse.de>
413 * parser.c (cp_parser_make_indirect_declarator): When the
414 the code argument is ERROR_MARK return cp_error_declarator.
416 2007-07-09 Geoffrey Keating <geoffk@apple.com>
419 * decl.c (cxx_init_decl_processing): Don't set
420 force_align_functions_log.
421 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
422 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
423 FUNCTION_DECL, return its alignment.
425 2007-07-09 Richard Guenther <rguenther@suse.de>
427 * decl.c (start_preparsed_function): Do not promote return type.
429 2007-07-08 Paolo Carlini <pcarlini@suse.de>
432 * pt.c (unify): Never pass error_mark_node to template_decl_level.
434 2007-07-07 Mark Mitchell <mark@codesourcery.com>
437 * pt.c (resolve_overloaded_unification): Robustify. Return a
439 (type_unification_real): Adjust accordingly.
441 2007-07-06 Richard Guenther <rguenther@suse.de>
443 * init.c (build_new_1): Use the correct pointer type.
444 * typeck2.c (build_m_component_ref): Likewise.
446 2007-07-05 Mark Mitchell <mark@codesourcery.com>
449 * init.c (build_zero_init): Always build an initializer for
451 * typeck2.c (build_functional_cast): Use build_zero_init.
454 * init.c (build_new_1): Always pass the allocation function to
455 build_op_delete_call.
456 * call.c (build_op_delete_call): Handle operator delete with a
457 variable-argument list. Do not issue an error when no matching
458 deallocation function is available for a new operator.
461 * cp-tree.h (any_value_dependent_elements_p): Declare it.
462 * decl.c (value_dependent_init_p): New function.
463 (cp_finish_decl): Use it.
464 * pt.c (value_dependent_expression_p): Use
465 any_value_dependent_elements_p.
466 * parser.c (cp_parser_primary_expression): Add comment about
467 treating dependent qualified names as integral
468 constant-expressions.
470 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
472 * decl.c (build_ptrmemfunc_type): Always use structural equality
473 tests when comparing pointer-to-member-function types, because the
474 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
477 2007-07-03 Mark Mitchell <mark@codesourcery.com>
479 * init.c (build_new): Tweak comment.
481 2007-06-29 Dave Brolley <brolley@redhat.com>
484 * parser.c (cp_parser_new_type_id): Don't reduce a named array
485 type to its base type and number of elements here.
486 * init.c (build_new): Call complete_type_or_else to ensure that the
487 type is complete and to issue a diagnostic if it is not.
488 (build_new_1): Don't call complete_type_or_else here.
490 2007-07-03 Richard Guenther <rguenther@suse.de>
493 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
496 2007-07-02 Simon Baldwin <simonb@google.com>
498 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
499 for inner-style nested forward declarations that don't declare
502 2007-07-02 Jakub Jelinek <jakub@redhat.com>
505 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
506 DECL_P in not a variable and appears more than once error messages.
508 2007-07-01 Ollie Wild <aaw@google.com>
510 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
511 (select_decl): Remove function.
512 (unqualified_namespace_lookup): Populate binding by calling
513 ambiguous_decl. Remove select_decl call.
514 (lookup_qualified_name): Remove select_decl call.
515 * decl.c (lookup_and_check_tag): Check for ambiguous references.
516 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
517 generation when name lookup is ambiguous.
519 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
522 * init.c (build_new_1): Use structural equality on the copy of the
525 2007-06-28 Geoffrey Keating <geoffk@apple.com>
527 * decl2.c (determine_visibility): Implement
528 flag_visibility_ms_compat effect on type info.
529 * decl.c (cxx_init_decl_processing): Implement
530 global effect of flag_visibility_ms_compat.
532 2007-06-28 Geoffrey Keating <geoffk@apple.com>
534 * decl2.c (start_objects): Mark constructor-running function
537 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
540 * decl.c (grokdeclarator): Reset friendp for member functions declared
541 friend of their own class.
543 2007-06-23 Mark Mitchell <mark@codesourcery.com>
545 * decl2.c (determine_visibility): Don't look for dllexport here.
546 (determine_visibility_from_class): Tidy.
548 2007-06-18 Simon Baldwin <simonb@google.com>
551 * parser.c (cp_parser_single_declaration): Added check for storage
552 class other than sc_none in parsed declaration, and a flag to indicate
553 if the call is part of an explicit template specialization parse.
554 * (cp_parser_explicit_specialization): Specialization check flag added
555 to call to cp_parser_single_declaration(), set true.
556 * (cp_parser_template_declaration_after_export): Specialization check
557 flag added to call to cp_parser_single_declaration(), set false.
558 * pt.c (check_explicit_specialization): Added code to copy visiblity
559 and linkage from the templated function to the explicit specialization.
561 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
563 * typeck.c (build_binary_op): For templates build the
564 expression in pieces to avoid the assert in build2_stat.
565 (get_member_function_from_ptrfunc):
566 Change over to using POINTER_PLUS_EXPR and convert
567 the second operand to sizetype.
568 * typeck2.c (build_m_component_ref): Likewise.
569 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
570 instead of PLUS_EXPR for pointers.
571 (build_new_1): Likewise.
572 (build_vec_delete_1): Likewise.
573 (build_vec_delete): Likewise.
574 * class.c (build_base_path): Likewise.
575 (build_base_path): Likewise.
576 (convert_to_base_statically): Likewise.
577 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
578 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
579 instead of PLUS_EXPR.
580 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
581 instead of PLUS_EXPR for pointers.
582 * call.c (build_special_member_call): Likewise.
583 * rtti.c (build_headof): Likewise.
584 Use sizetype instead of ptrdiff_type_node.
585 (tinfo_base_init): Create a POINTER_PLUS_EXPR
586 instead of PLUS_EXPR for pointers.
587 * except.c (expand_start_catch_block): Do a
588 NEGATIVE and then a POINTER_PLUS_EXPR instead
590 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
591 PLUS_EXPR on pointer types over to use
592 POINTER_PLUS_EXPR and remove the conversion
593 to the pointer types.
594 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
595 adding to a pointer type. Use size_int instead of
596 ssize_int. Convert the index to sizetype before
597 adding it to the pointer.
599 2007-06-15 Mark Mitchell <mark@codesourcery.com>
601 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
602 (DECL_ANON_UNION_VAR_P): New macro.
603 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
604 than DECL_VAR_MARKED_P, to keep track of which variables we have
606 * decl.c (redeclaration_error_message): Complain about redeclaring
607 anonymous union members at namespace scope.
608 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
610 2007-06-14 Geoff Keating <geoffk@apple.com>
612 * decl2.c (determine_visibility): Ensure that functions with
613 hidden types as parameters are hidden.
616 * decl2.c (determine_visibility): Remove duplicate code for
619 2007-06-12 Ian Lance Taylor <iant@google.com>
622 * init.c (avoid_placement_new_aliasing): New static function.
623 (build_new_1): Call it.
625 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
627 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
628 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
630 2007-06-08 Jakub Jelinek <jakub@redhat.com>
633 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
634 on init, the non-decl cond operand and increment value.
636 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
639 * decl.c (check_initializer): Report an error when a brace enclosed
640 initializer is used for a non-aggregate type in C++98.
641 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
643 (grokdeclarator): Likewise.
644 (move_fn_p): Likewise.
645 * typeck.c (check_return_expr): Likewise.
646 * call.c (reference_binding): Likewise.
647 * error.c (cp_cpp_error): Likewise.
648 * pt.c (check_default_tmpl_args): Likewise.
650 * lex.c (init_reswords): Likewise.
651 * parser.c (p_parser_primary_expression): Likewise.
652 (TOKEN_PRECEDENCE): Likewise.
653 (cp_parser_init_declarator): Likewise.
654 (cp_parser_ptr_operator): Likewise.
655 (cp_parser_parameter_declaration): Likewise.
656 (cp_parser_enclosed_template_argument_list): Likewise.
657 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
658 (cp_parser_next_token_ends_template_argument_p): Likewise.
660 2007-06-04 Simon Baldwin <simonb@google.com>
662 * decl.c (grokdeclarator): Readability change. Moved case labels
663 into direct switch statement scope.
665 2007-06-04 Paolo Carlini <pcarlini@suse.de>
667 * call.c (convert_like_real): Remove pointless code.
669 2007-05-31 Mark Mitchell <mark@codesourcery.com>
671 * decl.c (get_atexit_fn_ptr_type): New function.
672 (get_atexit_node): Use it.
673 (start_cleanup_fn): Likewise.
674 (register_dtor_fn): Use the object's destructor, instead of a
675 separate cleanup function, where possible.
676 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
677 (atexit_fn_ptr_type_node): New macro.
678 * decl2.c (build_cleanup): Use build_address.
680 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
682 * typeck.c (build_binary_op): Include types in error.
684 2007-05-31 Jakub Jelinek <jakub@redhat.com>
687 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
688 needs runtime initialization.
690 2007-05-31 Paolo Carlini <pcarlini@suse.de>
693 * semantics.c (finish_trait_expr): Complete the types.
695 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
696 Douglas Gregor <doug.gregor@gmail.com>
697 Pedro Lamarao <pedro.lamarao@mndfck.org>
698 Howard Hinnant <howard.hinnant@gmail.com>
702 * typeck.c (comptypes): Don't consider rvalue and lvalue
703 reference types to be equivalent.
704 (check_return_expr): Move from certain lvalues when returning
706 * decl.c (grokdeclarator): Implement reference collapsing.
707 (copy_fn_p): Don't consider constructors taking rvalue references
708 to be copy constructors.
710 * call.c (conversion): New "rvaluedness_matches_p" member.
711 (convert_class_to_reference): Require reference type as first
712 parameter instead of base type.
713 (reference_binding): Add logic to handle rvalue references.
714 (implicit_conversion): Update inaccurate comment.
715 (convert_like_real): Disable creation of temporaries that are
716 impossible to initialize for types with move constructors.
717 (build_over_call): Elide move constructors when possible.
718 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
719 (maybe_handle_ref_bind): Return conversion instead of type node.
720 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
721 determine preferred conversion sequences.
722 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
723 (LOOKUP_PREFER_RVALUE): New.
724 (DECL_MOVE_CONSTRUCTOR_P): New.
725 (struct cp_declarator): Add "reference" member for reference
726 types, with new "rvalue_ref" flag.
727 (cp_build_reference_type): Declare.
728 (move_fn_p): Declare.
729 * error.c (dump_type_prefix): Format rvalue reference types
730 correctly in error messages.
731 * except.c (build_throw): Move from certain lvalues when
733 * mangle.c (write_type): Mangle rvalue references differently
734 than regular references.
735 * parser.c (make_reference_declarator): Add boolean parameter for
737 (cp_parser_make_indirect_declarator): New.
738 (cp_parser_new_declarator_opt): Call
739 cp_parser_make_indirect_declarator.
740 (cp_parser_conversion_declarator_opt): Ditto.
741 (cp_parser_declarator): Ditto.
742 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
744 * pt.c (tsubst): Implement reference collapsing.
745 (maybe_adjust_types_for_deduction): Implement special template
746 parameter deduction rule for rvalue references.
747 (type_unification_real): Update calls to
748 maybe_adjust_types_for_deduction.
749 (try_one_overload): Ditto.
750 (unify_pack_expansion): Ditto.
751 * tree.c (lvalue_p_1): Handle rvalue reference types.
752 (cp_build_reference_type): New.
754 2007-05-30 Jakub Jelinek <jakub@redhat.com>
757 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
758 variables that need runtime initialization.
760 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
763 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
764 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
765 case POSTDECREMENT_EXPR>): Return the error_mark_node
766 if either the real or imaginary parts would an
769 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
770 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
773 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
774 token is a closing brace, false if there are no tokens left.
775 (cp_parser_namespace_alias_definition): Only consume the next token if
776 it is a closing brace.
778 * parser.c (cp_parser_class_specifier): Likewise.
780 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
782 * semantics.c (finish_member_declaration): Fix a typo in the
785 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
797 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
798 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
799 * pt.c (check_for_bare_parameter_packs): Return bool indicated
800 whether everything was okay. Fix indentation.
801 (push_template_decl_real): Check for bare parameter packs in
802 function parameters; where errors occur, mark the parameter types
803 with ERROR_MARK_NODEs to avert ICEs.
804 (coerce_template_parameter_pack): New.
805 (coerce_template_parms): Moved parameter pack coercion into
806 coerce_template_parameter_pack, and permit it anywhere in the
807 template parameter list (not just at the end). Parameter and
808 argument indices can vary (somewhat) separately now, so add
809 PARM_IDX and ARG_IDX.
810 (fn_type_unification): Don't set an argument pack as incomplete if
811 no argument pack was deduced.
812 (type_unification_real): If a type parameter is a parameter pack
813 and has not otherwise been deduced, it will be deduced to an empty
815 (more_specialized_fn): Use the actual lengths of the argument
816 lists when comparing against expansions.
817 * semantics.c (finish_member_declaration): If a field's type has
818 bare parameter packs, error and set its type to ERROR_MARK_NODE.
820 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
823 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
825 2007-05-22 Ollie Wild <aaw@google.com>
827 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
828 (unqualified_namespace_lookup): Adds check for hidden types.
830 2007-05-22 Ollie Wild <aaw@google.com>
832 * decl.c (duplicate_decls): Verify namespace names are unique.
834 2007-05-21 Mark Mitchell <mark@codesourcery.com>
836 * decl.c (cxx_maybe_build_cleanup): Handle
837 __attribute__((cleanup)).
839 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
841 * cvt.c (cp_convert_and_check): Don't check warnings if the
844 2007-05-18 Geoffrey Keating <geoffk@apple.com>
846 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
848 2007-05-14 Paolo Carlini <pcarlini@suse.de>
851 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
852 type only if is a class type (5.2.8/4).
854 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
856 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
857 * decl.c (grokdeclarator): Use unsigned_type_for instead of
858 c_common_unsigned_type.
860 2007-05-11 Silvius Rus <rus@google.com>
862 * cp/typeck.c (build_indirect_ref): Add call to
863 strict_aliasing_warning.
864 (build_reinterpret_cast_1): Condition call to
865 strict_aliasing_warning.
867 2007-05-11 Jan Hubicka <jh@suse.cz>
869 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
870 * decl2.c (start_objects): ctors and dtors are no longer public.
871 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
873 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
875 * typeck.c (build_unary_op): Remove code that used to
876 handle non lvalue increments/decrements.
878 2007-05-07 Mike Stump <mrs@apple.com>
880 * parser.c (check_empty_body): Add.
881 (cp_parser_iteration_statement): Add call to check_empty_body.
883 2007-05-05 Geoffrey Keating <geoffk@apple.com>
886 * mangle.c (write_mangled_name): Mangle static variable names.
887 (write_unqualified_name): Use local-source-name for
888 namespace-scope static variables.
890 2007-05-04 Dirk Mueller <dmueller@suse.de>
892 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
895 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
898 * decl2.c (constrain_class_visibility):
899 Use strip_pointer_or_array_types instead of strip_array_types.
901 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
904 * decl.c (reshape_init_r): Don't reshape the first element if it
905 is a pointer to member function.
907 2007-04-27 Simon Baldwin <simonb@google.com>
909 * decl.c (grokparms): Changed message format from %qD to %qE.
911 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
913 * error.c (maybe_warn_variadic_templates): Variadic templates are
914 now in C++0x, so only warn about them in C++98 mode.
916 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
919 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
920 integeral types from vectors types.
922 2007-04-26 Jakub Jelinek <jakub@redhat.com>
925 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
926 for type dependent OMP_CLAUSE_DECLs.
928 2007-04-24 Mark Mitchell <mark@codesourcery.com>
931 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
932 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
933 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
934 * init.c (build_zero_init): Adjust, as
935 COMPLEX_TYPE is now a SCALAR_TYPE.
936 * typeck2.c (digest_init): Allow brace-enclosed initializers for
937 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
939 2007-04-25 Paolo Carlini <pcarlini@suse.de>
941 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
942 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
943 (trait_expr_value): Adjust.
945 2007-04-23 Simon Baldwin <simonb@google.com>
947 * decl.c (grokparms): Added new error for duplicate function
948 parameters names in function prototypes, to match gcc behavior.
950 2007-04-23 Jan Hubicka <jh@suse.cz>
952 * cp/decl2.c (finish_objects): Do not call target constructor/destructor
955 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
957 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
958 instead of checking GIMPLE_STMT_P in chain_next.
960 2007-04-17 Mark Mitchell <mark@codesourcery.com>
963 * call.c (convert_for_arg_passing): Convert bitfields to their
966 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
969 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
971 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
974 * cp/decl2.c (constrain_class_visibility):
975 Do not warn about the use of anonymous namespace in the main input file.
977 2007-04-15 Mark Mitchell <mark@codesourcery.com>
979 * cp-tree.h (current_template_parms): Fix typo in comment.
981 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
983 * cp-tree.h, error.c: Fix comment typos.
985 2007-04-13 Jason Merrill <jason@redhat.com>
988 * call.c (reference_binding): Add c_cast_p parm. If true,
989 add quals to TO as needed to make it reference-compatible.
991 2007-04-11 Jan Hubicka <jh@suse.cz>
993 * cp/class.c (convert_to_base_statically): Fold produced tree; verify
994 that we are not processing template_decl.
996 2007-04-09 Mark Mitchell <mark@codesourcery.com>
999 * class.c (build_base_path): Ensure that the converted pointer has
1000 the same cv-qualification as the input.
1002 2007-04-09 Paolo Carlini <pcarlini@suse.de>
1004 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
1006 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
1008 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
1010 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
1011 * tree.c (cp_add_pending_fn_decls): Remove.
1012 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
1014 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
1016 Revert change removing staticp.
1018 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
1020 * cp-objcp-common.c (cxx_staticp): Remove.
1021 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
1022 * cp-tree.h (cxx_staticp):
1024 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
1026 * class.c (check_for_override): Don't remove dllmport attribute
1029 2007-04-03 Jakub Jelinek <jakub@redhat.com>
1032 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
1033 type issue error and return early.
1035 2007-03-30 Jason Merrill <jason@redhat.com>
1038 * typeck.c (cp_type_readonly): New fn.
1039 * cp-tree.h: Declare it.
1040 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
1041 (cp_finish_decl): Not here.
1043 2007-03-31 Richard Guenther <rguenther@suse.de>
1045 * optimize.c (maybe_clone_body): Replace splay-tree usage by
1048 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
1053 * parser.c (declarator_can_be_parameter_pack): New.
1054 (cp_parser_template_parameter): Only parse the `...' if the
1055 declarator can be a parameter pack.
1056 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
1058 * pt.c (find_parameter_packs_r): Look into the bounds on integer
1059 types (they could be used as array bounds).
1060 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
1061 (tsubst_pack_expansion): Handle failure to expand parameter
1064 2007-03-30 Paolo Carlini <pcarlini@suse.de>
1067 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
1068 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
1069 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
1070 (CLASS_TYPE_NON_UNION_P): Add.
1071 (struct lang_type_class): Add has_complex_dflt.
1072 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
1073 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
1074 * cp-tree.def: Add TRAIT_EXPR.
1075 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
1076 * lex.c (struct resword): Add __has_nothrow_assign,
1077 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
1078 __has_trivial_constructor, __has_trivial_copy,
1079 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
1080 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
1081 __is_pod, __is_polymorphic, __is_union.
1082 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
1083 (cp_parser_trait_expr): New.
1084 * semantics.c (finish_trait_expr, trait_expr_value
1085 classtype_has_nothrow_copy_or_assign_p): New.
1086 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
1088 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
1089 * class.c (check_bases, check_field_decl, check_bases_and_members):
1090 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
1091 * pt.c (uses_template_parms, tsubst_copy_and_build,
1092 value_dependent_expression_p, type_dependent_expression_p): Deal with
1094 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
1096 2007-03-29 Richard Guenther <rguenther@suse.de>
1098 * tree.c (cp_walk_subtrees): Do not set input_location.
1100 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
1103 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
1106 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1108 * parser.c (struct cp_parser): Update comment for
1109 greater_than_is_operator_p.
1110 (cp_parser_primary_expression): In C++0x mode, a cast operator can
1111 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
1112 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
1113 !GREATER_THAN_IS_OPERATOR_P.
1114 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
1115 `>>' operators that will become two `>' tokens in C++0x.
1116 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
1117 mode, allowing it to terminate default arguments.
1118 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
1119 `>>' like two consecutive `>' tokens.
1120 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
1121 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
1122 ends a template argument.
1124 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1126 * decl.c (redeclaration_error_message): Complain when redeclaring
1127 a friend function with default template arguments (C++0x mode only).
1128 * cp-tree.h (check_default_tmpl_args): Declare.
1129 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
1130 template arguments in function templates. Add support for checking
1131 the default template arguments of friend templates.
1132 (push_template_decl_real): Fix call to check_default_tmpl_args.
1133 (type_unification_real): If a template parameter has not been
1134 deduced but provides a default template argument, substitute into
1135 that default template argument.
1136 * parser.c (cp_parser_init_declarator): When declaring (but not
1137 defining!) a function template in C++0x mode, check for default
1140 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1143 * decl.c (grokdeclarator): Deal with cv-qualified function type
1144 typedefs in the same way for member and non-member functions.
1146 2007-03-26 Dirk Mueller <dmueller@suse.de>
1148 * parser.c (cp_parser_member_declaration): Pedwarn
1149 about stray semicolons after member declarations.
1151 2007-03-26 Paolo Carlini <pcarlini@suse.de>
1154 * pt.c (instantiate_decl): Set in_system_header.
1156 2007-03-22 Mark Mitchell <mark@codesourcery.com>
1158 * cp-tree.h (current_tempalte_parms): Improve documentation.
1159 * pt.c (current_template_args): Likewise.
1162 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
1163 not consume tokens when failing.
1165 2007-03-22 Jim Wilson <wilson@specifix.com>
1166 Mark Mitchell <mark@codesourcery.com>
1169 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
1170 consistent with FROM.
1172 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1174 * error.c (dump_expr): Handle dependent names that designate types.
1175 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
1177 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
1179 * cp-tree.def, parser.c, pt.c: Fix comment typos.
1181 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1183 * cvt.c (cp_convert_and_check) : Define.
1184 * cp-tree.h (cp_convert_and_check): Declare.
1185 * call.c (convert_conversion_warnings): Rename to
1186 conversion_null_warnings. The warning for floating-point to
1187 integer is handled by convert_and_check in convert_like_real.
1188 (convert_like_real): convert_conversion_warnings was renamed as
1189 conversion_null_warnings.
1190 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
1191 overflow and changes of value during conversion.
1193 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1196 * parser.c (cp_parser_statement): If 'namespace' is found, this
1197 only can be a namespace alias definition, so parse it now.
1198 (cp_parser_namespace_alias_definition): if we find an open brace
1199 instead of '=', then this is actually a misplaced namespace
1202 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1205 * decl.c (cxx_init_decl_processing): Move command-line options
1206 processing to c-opts.c.
1208 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
1210 * ptree.c (cxx_print_type): Use formatting markup for integers
1211 when printing template parameter index/level/orig level.
1212 (cxx_print_xnode): Ditto.
1213 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
1214 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
1215 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
1217 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
1218 rather than a HOST_WIDE_INT.
1219 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
1220 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
1222 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
1223 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
1224 IN_BASE_INITIALIZER bool bitfields.
1225 (struct cp_declarator): Make KIND a 4-bit field. Make
1226 PARAMETER_PACK_P a bool bitfield just after KIND.
1227 * pt.c (uses_parameter_packs): Destroy the pointer set.
1228 (make_pack_expansion): Ditto.
1229 (check_for_bare_parameter_packs): Ditto.
1230 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
1232 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
1235 * call.c (convert_default_arg): Instead of copying the node,
1238 2007-03-15 Dirk Mueller <dmueller@suse.de>
1241 * call.c (convert_conversion_warnings): New..
1242 (convert_like_real): .. factored out from here.
1243 (convert_conversion_warnings): Add warning about
1244 false being converted to NULL in argument passing.
1246 2007-03-14 Dirk Mueller <dmueller@suse.de>
1248 * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
1249 (finish_do_body): Warn about empty body in do/while statement.
1251 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1253 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
1255 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1258 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
1261 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
1263 * cp/repo.c (init_repo): Initialize random_seed saved options.
1264 (finish_repo): Adjust.
1266 2007-03-13 Mark Mitchell <mark@codesourcery.com>
1269 * Make-lang.in (doc/g++.1): Use $< to specify the location from
1272 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
1274 * decl.c (compute_array_index_type): New warning flag warn_vla.
1276 2007-03-12 Mark Mitchell <mark@codesourcery.com>
1279 * call.c (convert_default_arg): Copy non-constant arguments.
1281 2007-03-11 Mark Mitchell <mark@codesourcery.com>
1284 * parser.c (cp_parser_postfix_expression): Disallow compound
1285 literals in constant expressions.
1288 * semantics.c (finish_typeof): Use unlowered_expr_type.
1290 2007-03-10 Mark Mitchell <mark@codesourcery.com>
1293 * cp-tree.h (unlowered_expr_type): New function.
1294 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
1295 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
1296 (unlowered_expr_type): New function.
1297 (build_unary_op): Disallow predecrements of bool bitfields.
1298 * call.c (build_conditional_expr): Use unlowered_expr_type.
1299 * pt.c (type_unification_real): Likewise.
1301 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
1304 * typeck.c (check_return_expr): Check for bare parameter packs.
1305 (comptypes): Compare template parameter packs and
1306 type pack expansions.
1307 * decl.c (grokdeclarator): Deal with the declaration of function
1309 (grokparms): Verify that the (optional) function parameter pack is
1310 at the end of the parameter list.
1311 (xref_basetypes): Handle pack expansions in the base class.
1312 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
1313 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
1314 (NONTYPE_ARGUMENT_PACK): New.
1315 (TYPE_PACK_EXPANSION): New.
1316 (EXPR_PACK_EXPANSION): New.
1317 (ARGUMENT_PACK_SELECT): New.
1318 * cp-objcp-common.c (cp_tree_size): Compute size of
1319 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
1320 ARGUMENT_PACK_SELECT.
1321 * error.c (dump_template_argument): Print template argument packs.
1322 (dump_template_argument_list): Ditto.
1323 (dump_template_parameter): Dump `...' for template type parameter
1325 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
1326 (dump_parameters): Print function parameter packs.
1327 (dump_template_parms): Print template argument packs.
1328 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
1329 (maybe_warn_variadic_templates): New.
1330 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
1331 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1332 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1334 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
1335 (write_template_arg): Write argument packs as separate arguments.
1336 * cp-tree.h (struct template_parm_index_s): Add flag that
1337 indicates that the template parameter is actually a parameter
1339 (struct tree_argument_pack_select): New.
1340 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
1341 (union lang_tree_node): Add argument_pack_select.
1342 (FUNCTION_PARAMETER_PACK_P): New.
1343 (PACK_EXPANSION_P): New.
1344 (PACK_EXPANSION_PATTERN): New.
1345 (SET_PACK_EXPANSION_PATTERN): New.
1346 (PACK_EXPANSION_PARAMETER_PACKS): New.
1347 (ARGUMENT_PACK_P): New.
1348 (ARGUMENT_PACK_ARGS): New.
1349 (SET_ARGUMENT_PACK_ARGS): New.
1350 (ARGUMENT_PACK_INCOMPLETE_P): New.
1351 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
1352 (TEMPLATE_PARM_PARAMETER_PACK): New.
1353 (TEMPLATE_TYPE_PARAMETER_PACK): New.
1354 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
1355 (ARGUMENT_PACK_SELECT_INDEX): New.
1356 (ARGUMENT_PACK_SELECT_ARG): New.
1357 (struct cp_declarator): Add parameter_pack_p flag.
1358 (maybe_warn_variadic_templates): Declare.
1359 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
1360 indicate a template parameter pack.
1361 (uses_parameter_packs): Declare.
1362 (template_parameter_pack_p): Declare.
1363 (template_parms_variadic_p): Declare.
1364 (make_pack_expansion): Declare.
1365 (check_for_bare_parameter_packs): Declare.
1366 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
1367 sizeof... expressions.
1368 (pp_cxx_expression): Print pack expansions and non-type argument
1370 (pp_cxx_exception_specification): Print pack expansions.
1371 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
1372 (pp_cxx_ctor_initializer): Print pack expansions.
1373 (pp_cxx_type_id): Print pack expansions.
1374 (pp_cxx_template_argument_list): Print argument packs.
1375 (pp_cxx_template_parameter): Print ellipsis for template parameter
1377 * pt.c (comp_template_parms): Compare template parameter packs.
1378 (template_parameter_pack_p): New.
1379 (template_parms_variadic_p): New.
1380 (template_args_variadic_p): New.
1381 (make_ith_pack_parameter_name): New.
1382 (struct find_parameter_pack_data): New.
1383 (find_parameter_packs_r): New.
1384 (uses_parameter_packs): New.
1385 (make_pack_expansion): New.
1386 (check_for_bare_parameter_packs): New.
1387 (expand_template_argument_pack): New.
1388 (reduce_template_parm_level): Propagate parameter pack flag.
1389 (process_template_parm): Add is_parameter_pack parameter to state
1390 when the parameter is actually a parameter pack. Create template
1391 parameter packs when is_parameter_pack is true.
1392 (current_template_args): The argument for a template parameter
1393 pack is an argument pack containing a single pack expansion.
1394 (process_partial_specialization): When checking that non-type
1395 argument expressions do not involve template parameters, loop over
1396 the arguments in argument packs separately.
1397 (push_template_decl_real): Check that the type of the declaration
1398 does not have any bare parameter packs. Check that primary
1399 templates have no more than one parameter pack, and that it comes
1400 at the end of the template parameter list.
1401 (convert_template_argument): Handle coercions for pack expansion
1402 expressions by coercing the pattern then rebuilding the expansion.
1403 (coerce_template_parms): When coercing the arguments for a
1404 variadic template, pack "extra" arguments into an argument pack.
1405 (coerce_template_template_parms): Cannot coerce between parameter
1406 packs and non-pack parameters.
1407 (template_args_equal): Compare PACK_EXPANSION_P expressions.
1408 (comp_template_args): Expand all template arguments packs before
1409 comparing template argument lists.
1410 (mangle_class_name_for_template): Make argument packs as separate
1412 (for_each_template_parm_r): No need to handle BASELINK.
1413 (instantiate_class_template): Handle pack expansions in the base
1415 (tsubst_pack_expansion): New.
1416 (tsubst_template_args): Handle substitutions of argument packs and
1417 pack expansion into template argument lists.
1418 (tsubst_decl): Expand function parameter packs into separate
1419 function parameters.
1420 (tsubst_arg_types): Expand a type pack expansion into separate
1422 (tsubst_exception_specification): Handle pack expansions in
1423 exception specifiers.
1424 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
1425 replacing a template parameter with its argument. If we encounter
1426 a substitution for an argument pack, just return the parameter
1428 (tsubst_copy): sizeof(X...) returns the number of elements in
1429 parameter pack X. See through ARGUMENT_PACK_SELECT when the
1430 PARM_DECL is a parameter pack.
1431 (tsubst_expr): Expression pack expansions and argument packs
1432 cannot show up here; they will all be handled through function
1433 calls, sizeof, and template argument lists.
1434 (tsubst_copy_and_build): sizeof(X...) returns the number of
1435 elements in parameter pack X. Handle pack expansions in TREE_LIST
1436 and CONSTRUCTOR nodes.
1437 (fn_type_unification): Handle "incomplete" explicit template
1438 argument lists that specify some of the arguments for a template
1440 (type_unification_real): Unify arguments against pack expansions.
1441 (template_parm_level_and_index): New, helper function.
1442 (unify_pack_expansion): New.
1443 (unify): Unify argument packs on an argument-by-argument basis,
1444 handling variadic argument packs as well.
1445 (more_specialized_fn): Handle unification of function parameter
1446 packs. All things being equal, prefer non-variadic function
1447 templates to variadic function templates.
1448 (more_specialized_class): Prefer the variadic class template
1449 partial specialization that binds fewer arguments to a parameter
1451 (regenerate_decl_from_template): Expand function parameter packs
1452 into separate parameters.
1453 (instantiate_decl): Ditto.
1454 (tsubst_initializer_list): Handle pack expansions for base-class
1456 (dependent_type_p_r): Determine dependent types in argument packs
1457 and pack expansions.
1458 (value_dependent_expression_p): Determine value-dependence of
1459 non-type argument packs.
1460 (dependent_template_arg_p): Handle argument packs.
1461 * semantics.c (finish_cond): Check for bare parameter packs.
1462 (finish_expr_stmt): Ditto.
1463 (finish_for_expr): Ditto.
1464 (finish_switch_cond): Ditto.
1465 (finish_mem_initializers): Ditto.
1466 * name-lookup.c (arg_assoc_type): Handle pack expansions and
1468 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
1469 * parser.c (make_declarator): Declarator is not an expansion.
1470 (make_pointer_declarator): Transfer parameter pack flag to outer
1472 (make_reference_declarator): Ditto.
1473 (make_ptrmem_declarator): Ditto.
1474 (make_call_declarator): Ditto.
1475 (make_array_declarator): Ditto.
1476 (cp_parser_postfix_expression): Allow pack expansion expressions
1477 in the argument list for a call expression.
1478 (cp_parser_parenthesized_expression_list): Add new parameter
1479 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
1480 into separate arguments."
1481 (cp_parser_new_placement): Allow pack expansion expressions.
1482 (cp_parser_new_initializer): Ditto.
1483 (cp_parser_mem_initializer_list): Allow ellipsis to create a
1484 base-class initializer expansion.
1485 (cp_parser_mem_initializer): Ditto.
1486 (cp_parser_template_parameter_list): Keep track of whether the
1487 template parameter is a template parameter pack.
1488 (cp_parser_template_parameter): Parse the ellipsis to indicate a
1489 template parameter pack.
1490 (cp_parser_type_parameter): Ditto.
1491 (cp_parser_template_argument_list): Parse the ellipsis to indicate
1493 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
1494 this declarator is a parameter pack.
1495 (cp_parser_parameter_declaration): The ellipsis does not end the
1496 parameter declaration, because it might be a parameter pack. Parse
1497 the ellipsis to indicate a parameter pack.
1498 (cp_parser_initializer): Allow pack expansions.
1499 (cp_parser_initializer_list): Allow ellipsis to create an
1500 initializer expansion.
1501 (cp_parser_base_clause): Allow ellipsis to create a base specifier
1503 (cp_parser_type_id_list): Allow ellipsis to create an exception
1504 specifier expansion.
1505 (cp_parser_attribute_list): Don't allow pack expansions.
1506 (cp_parser_functional_cast): Allow pack expansions.
1507 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
1508 compute the length of a parameter pack.
1509 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
1510 end a template argument.
1511 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1512 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1515 2007-03-09 Dirk Mueller <dmueller@suse.de>
1517 * cp/call.c (build_new_op): Call warn_logical_operator.
1519 2007-03-08 Volker Reichelt <reichelt@netcologne.de>
1522 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
1525 * pt.c (any_template_arguments_need_structural_equality_p):
1528 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
1530 * decl.c (grokdeclarator): Disable warnings for anonymous
1533 2007-03-05 Volker Reichelt <reichelt@netcologne.de>
1535 * typeck2.c (readonly_error): Always emit a hard error.
1536 Remove last argument.
1537 * cp-tree.h (readonly_error): Adjust prototype.
1538 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
1539 * typeck.c (build_unary_op): Likewise.
1540 (build_modify_expr): Likewise.
1542 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
1545 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
1547 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1550 * parser.c (struct cp_parser): New IN_IF_STMT.
1551 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
1552 returning if parsing the body of an 'if' statement or issuing an
1553 error and continuing.
1554 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
1556 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
1558 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
1561 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
1564 2007-03-02 Geoffrey Keating <geoffk@apple.com>
1566 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
1567 Objective-C++. Don't exit early if -shared-libgcc needs to be
1570 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1572 * typeck.c (common_base_type): Delete unused function.
1574 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
1576 * Make-lang.in: Add dummy lang.install-pdf target.
1578 2007-03-01 Simon Baldwin <simonb@google.com>
1581 * decl.c (check_tag_decl): Added new warning for typedef ignored
1582 when it precedes an otherwise valid non-typedef declaration.
1584 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
1586 * typeck.c (build_function_call): Store converted arguments
1587 in a stack-allocated array instead of building a list.
1588 (convert_arguments): Store arguments in the array passed in as an
1589 argument, and return the actual number of arguments.
1590 * call.c (build_call): Delete, and replace with...
1591 (build_call_n, build_call_a): New.
1592 (build_op_delete_call): Rewrite to avoid constructing argument lists.
1593 (build_over_call): Store converted arguments in a stack-allocated
1594 array instead of building a list.
1595 (build_cxx_call): Pass arguments in an array instead of as a list.
1596 (build_java_interface_fn_ref): Rewrite to avoid constructing
1598 * tree.h: Update declarations to reflect above changes.
1599 * method.c (use_thunk): Use a stack-allocated array to hold
1600 the arguments instead of a list.
1601 * rtti.c (throw_bad_cast): Update call to cxx_call.
1602 (throw_bad_typeid): Likewise.
1603 (build_dynamic_cast_1): Likewise.
1604 * init.c (build_builtin_delete_call): Use build_call_n.
1605 * decl.c (expand_static_init): Likewise.
1606 * except.c (cp_protect_cleanup_actions): Likewise.
1607 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
1608 (gimplify_must_not_throw_expr): Likewise.
1609 (cxx_omp_apply_fn): Use build_call_a.
1611 2007-02-26 Mark Mitchell <mark@codesourcery.com>
1613 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
1614 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
1616 2007-02-25 Mark Mitchell <mark@codesourcery.com>
1618 * cp-tree.h (static_ctors): Remove.
1619 * cp-tree.h (static_dtors): Likewise.
1620 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
1621 refactoring of tree_map hierarchy.
1622 (decl_shadowed_for_var_insert): Likewise.
1623 * semantics.c (expand_body): Use c_expand_body.
1624 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
1625 * decl2.c (static_ctors): Remove.
1626 (static_dtors): Likewise.
1627 (generate_ctor_or_dtor_function): Pass NULL_TREE to
1628 objc_generate_static_init_call. Do not call static_[cd]tors.
1629 (generate_ctor_and_dtor_functions_for_priority): Do not check for
1631 (cp_write_global_declarations): Likewise.
1633 2007-02-23 Richard Guenther <rguenther@suse.de>
1635 * class.c (note_name_declared_in_class): Make declaration
1636 changes meaning a pedwarn.
1638 2007-02-22 Michael Matz <matz@suse.de>
1641 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
1642 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
1643 dump_function_decl): Guard emitting outer scopes by new flag.
1644 * cp-lang.c (cxx_dwarf_name): New function.
1645 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
1646 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
1648 (push_template_decl_real, lookup_template_class): Remove calls
1651 2007-02-19 Mark Mitchell <mark@codesourcery.com>
1653 * call.c (build_new_method_call): Ensure that explicit calls of
1654 destructors have type "void".
1656 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1658 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
1659 and -Walways-true with -Waddress.
1660 * cvt.c (convert_to_void): Replace unconditional warning with
1663 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
1665 * decl.c, tree.c: Fix comment typos.
1667 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1670 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
1671 statement expression if we had an error mark node.
1673 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
1674 Brooks Moses <brooks.moses@codesourcery.com>
1675 Lee Millward <lee.millward@codesourcery.com>
1677 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
1678 Change class to tcc_vl_exp.
1680 * call.c (build_call): Use build_call_list instead
1682 (build_over_call): Likewise.
1683 (build_new_method_call): Use build_min_non_dep_call_list
1684 instead of build_min_non_dep.
1686 * error.c (dump_call_expr_args): New function.
1687 (dump_aggr_init_expr_args): New function.
1688 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
1689 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
1691 * cvt.c (convert_to_void): Use build_call_array instead
1692 of build3; use new AGGR_INIT_EXPR accessor macros.
1694 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
1695 instead of TREE_CODE_LENGTH.
1697 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
1698 AGGR_INIT_EXPR accessor macros.
1700 * cp-gimplify.c (cp_gimplify_init_expr): Use
1701 AGGR_INIT_EXPR_SLOT to set the slot operand.
1703 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
1704 (AGGR_INIT_EXPR_SLOT): New macro.
1705 (AGGR_INIT_EXPR_ARG): New macro.
1706 (aggr_init_expr_nargs): New macro.
1707 (AGGR_INIT_EXPR_ARGP): New macro.
1708 (aggr_init_expr_arg_iterator): New.
1709 (init_aggr_init_expr_arg_iterator): New.
1710 (next_aggr_init_expr_arg): New.
1711 (first_aggr_init_expr_arg): New.
1712 (more_aggr_init_expr_args_p): New.
1713 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
1714 (stabilize_aggr_init): New declaration.
1715 (build_min_non_dep_call_list): Likewise.
1717 * tree.c (process_aggr_init_operands): New function.
1718 (build_aggr_init_array) New function.
1719 (build_cplus_new): Update to use new CALL_EXPR and
1720 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
1721 build_aggr_init_array.
1722 (build_min_non_dep_call_list) New function.
1723 (build_min_nt): Assert input code parameter is not a variable
1724 length expression class.
1725 (build_min, build_min_non_dep): Likewise.
1726 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
1727 to check for equality instead of recursing. Handle tcc_vl_exp
1729 (stabilize_call): Update to only handle CALL_EXPRs, not
1730 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
1731 (stabilize_aggr_init): New function.
1732 (stabilize_init): Use it.
1734 * cxx-pretty-print.c (pp_cxx_postfix_expression)
1735 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
1736 AGGR_INIT_EXPR accessor macros and argument iterators.
1738 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
1739 build_vl_exp. Iterate through the operands, recursively
1740 processing each one.
1741 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
1742 CALL_EXPR accessor macros.
1743 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
1744 tree code classes. Use TREE_OPERAND_LENGTH instead of
1747 * semantics.c (finish_call_expr): Use build_nt_call_list
1748 instead of build_nt.
1749 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
1750 accessor macros. Use build_call_array to construct the
1751 CALL_EXPR node instead of build3
1753 * decl2.c (build_offset_ref_call_from_tree): Use
1754 build_nt_call_list and build_min_non_dep_call_list instead
1755 of build_min_nt and build_min_non_dep.
1757 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
1758 Use build_nt_call_list instead of build_min_nt.
1760 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1763 * call.c (build_conditional_expr): Improve error message.
1765 2007-02-13 Dirk Mueller <dmueller@suse.de>
1767 * friend.c (do_friend): Annotate warning about friend
1768 declarations in templates with OPT_Wnon_template_friend.
1769 Convert informal message from warning() to inform().
1771 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
1772 Mark Mitchell <mark@codesourcery.com>
1775 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
1776 instantiations for variables.
1778 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1781 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
1782 Check warn_unused_value just once.
1784 2007-02-11 Mark Mitchell <mark@codesourcery.com>
1787 * pt.c (determine_specialization): Use skip_artificial_parms_for.
1788 (fn_type_unificiation): Likewise.
1789 (get_bindings): Likewise.
1791 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
1794 * decl.c (finish_function): Use DECL_REPLACEABLE.
1795 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1797 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
1799 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
1801 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
1803 * decl.c (grokvardecl): Don't error if !have_tls.
1804 (grokdeclarator): Likewise.
1805 * parser.c (cp_parser_omp_threadprivate): Likewise.
1807 2007-02-07 Jakub Jelinek <jakub@redhat.com>
1810 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
1811 parameters and result decls in omp clauses.
1812 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
1815 2007-02-05 Dirk Mueller <dmueller@suse.de>
1818 * parser.c (cp_parser_class_specifier): Always initialize bases.
1820 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
1822 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
1823 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
1824 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
1826 * semantics.c (finish_omp_atomic): Store a whole expression node
1827 in operand 1, and integer_zero_node in operand 0, for dependent
1828 OMP_ATOMIC. Rewrite to make flow easier to understand.
1830 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1832 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
1834 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
1836 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
1837 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
1839 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
1841 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
1842 keyword warning to -Wc++0x-compat.
1844 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1846 * decl.c (grokdeclarator): Update documentation.
1848 2007-02-02 Jakub Jelinek <jakub@redhat.com>
1851 * decl.c (grokdeclarator): If __thread is used together with
1852 a storage class other than extern and static, clear thread_p
1853 after issuing diagnostics and fall through to checking the
1856 2007-01-30 Roger Sayle <roger@eyesopen.com>
1858 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
1859 calculating the size of an array (to avoid recursive errors).
1861 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1864 * typeck.c (build_binary_op): Fix logic for warning. Move warning
1866 * call.c (convert_like_real): Don't warn when converting to
1869 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1871 * decl.c (pop_label): Replace warning with call to
1872 warn_for_unused_label.
1874 2007-01-28 Andrew Pinski <pinskia@gmail.com>
1877 * semantics.c (finish_pseudo_destructor_expr): Check the
1878 destrutor name by calling check_dtor_name.
1880 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
1882 * lex.c (D_CPP0X): Rename.
1884 (reswords): D_CPP0X -> D_CXX0X.
1885 (init_reswords): Ditto.
1886 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
1887 of C++0x keywords as identifiers.
1889 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
1892 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
1895 2007-01-23 Ian Lance Taylor <iant@google.com>
1897 * typeck.c (convert_for_assignment): Only warn about a = b = c
1898 when converting to bool.
1900 2007-01-23 Roger Sayle <roger@eyesopen.com>
1902 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
1904 * typeck.c (ignore_overflows): Remove the remaining uses of
1905 TREE_CONSTANT_OVERFLOW.
1907 2007-01-20 Jan Hubicka <jh@suse.cz>
1909 * decl2.c (start_objects, start_static_storage_duration_function):
1910 Do not make the functions uninlinable.
1912 2007-01-17 Ian Lance Taylor <iant@google.com>
1914 * class.c (add_method): Call VEC_reserve_exact rather than passing
1915 a negative size to VEC_reserve.
1917 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
1920 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
1922 2007-01-10 Mark Mitchell <mark@codesourcery.com>
1925 * decl.c (make_typename_type): If the qualified name is not a
1926 type, issue an error.
1927 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
1930 2007-01-08 Geoffrey Keating <geoffk@apple.com>
1932 * rtti.c: Include target.h.
1933 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
1934 don't emit typeinfo for fundamental types as weak.
1935 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
1937 2007-01-08 Richard Guenther <rguenther@suse.de>
1939 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
1941 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
1943 * call.c (standard_conversion): Pass flag to
1944 vector_types_convertible_p to disallow emission of note.
1945 * typeck.c (convert_for_assignment): Pass flag to
1946 vector_types_convertible_p to allow emission of note.
1947 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
1948 to disallow emission of note.
1950 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1953 * typeck.c (build_binary_op): Call overflow_warning if
1954 TREE_OVERFLOW_P is true for the result and not for any of the
1957 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
1960 * class.c (add_method): Don't wait until template
1961 instantiation time to complain about duplicate methods.
1963 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1966 * semantics.c (finish_unary_op_expr): Warn only if result
1967 overflowed and operands did not.
1969 2007-01-05 Ian Lance Taylor <iant@google.com>
1971 * typeck.c (build_binary_op): Warn about comparing a non-weak
1974 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
1976 * pt.c (tsubst): Propagate the need for structural equality checks
1977 when reducing the level of template parameters.
1979 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
1981 * pt.c: Fix a comment typo.
1983 2007-01-02 Ian Lance Taylor <iant@google.com>
1985 * semantics.c (maybe_convert_cond): Optionally warn when using an
1986 assignment as a condition.
1987 * typeck.c (convert_for_assignment): Optionally warn about
1988 assigning the result of an assignment to a bool.
1990 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
1992 * pt.c (canonical_template_parms): Correct typo in comment.
1994 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
1996 * typeck.c (structural_comptypes): Renamed from "comptypes".
1997 (comptypes): Use canonical type information to perform fast type
1998 comparison. When VERIFY_CANONICAL_TYPES, verify that the
1999 canonical type comparison returns the same results as we would see
2000 from the current, structural check. Support COMPARE_STRUCTURAL
2001 when we need structural checks.
2002 * decl.c (typename_compare): Fix comment.
2003 (build_typename_type): TYPENAME_TYPE nodes require structural
2004 equality checks, because they resolve different based on the
2006 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
2007 require structural equality checks (for now).
2008 (build_ptrmemfunc_type): Build the canonical pointer to member
2010 (compute_array_index_type): Whenever we build a new index type
2011 to represent the size of an array in a template, we need to mark
2012 this index type as requiring structural equality. This goes for
2013 arrays with value-dependent sizes with the current ABI, or all
2015 * tree.c (cplus_array_hash): New.
2016 (struct cplus_array_info): New.
2017 (cplus_array_compare): New.
2018 (cplus_array_htab): New.
2019 (build_cplus_array_type_1): Use a hash table to cache the array
2020 types we build. Build the canonical array type for each array
2022 (cp_build_qualified_type_real): When building a cv-qualified array
2023 type, use the hash table of array types and build canonical array
2025 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
2026 use structural equality (for now).
2027 * cp-tree.h (COMPARE_STRUCTURAL): New.
2028 * pt.c (canonical_template_parms): New.
2029 (canonical_type_parameter): New.
2030 (process_template_parm): Find the canonical type parameter.
2031 (lookup_template_class): When we have named the primary template
2032 type, set the canonical type for our template class to the primary
2033 template type. If any of the template arguments need structural
2034 equality checks, the template class needs structural equality
2036 (tsubst): When reducing the level of a template template
2037 parameter, we require structural equality tests for the resulting
2038 parameter because its template parameters have not had their types
2039 canonicalized. When reducing a template type parameter, find the
2040 canonical reduced type parameter.
2041 (any_template_arguments_need_structural_equality_p): New.