1 2007-08-22 Jason Merrill <jason@redhat.com>
4 * pt.c (outermost_tinst_level): New function.
5 * lex.c (in_main_input_context): New function.
6 * cp-tree.h: Declare it.
7 * decl2.c (constrain_class_visibility): Use it to avoid warning
8 about uses of the anonymous namespace in the main input file.
10 2007-08-21 Jakub Jelinek <jakub@redhat.com>
12 * init.c (build_new_1): Use get_target_expr instead of save_expr.
14 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
17 * class.c (finish_struct_1): Warn when a class has virtual
18 functions and accessible non-virtual destructor.
20 2007-08-20 Richard Guenther <rguenther@suse.de>
24 * call.c (build_new_method_call): Convert initializer to
26 * init.c (build_aggr_init): Do not fiddle with types.
27 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
28 * except.c (build_throw): Do not drop qualifiers for the
30 * typeck.c (get_member_function_from_ptrfunc): Do not
31 fiddle with types, instead convert.
32 (build_ptrmemfunc1): Convert to the target type for
34 (gfc_trans_allocate): Convert result to target type.
35 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
36 pointer-to-member structures shall have alias set zero as well.
38 2007-08-20 Richard Guenther <rguenther@suse.de>
40 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
42 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
43 (nonstatic_local_decl_p): Likewise.
44 * tree.c (cp_auto_var_in_fn_p): Remove.
45 * decl.c (nonstatic_local_decl_p): Remove.
47 2007-08-20 Richard Guenther <rguenther@suse.de>
49 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
51 * tree.h (cp_walk_tree): New define to walk_tree_1 with
52 cp_walk_subtrees lh parameter.
53 (cp_walk_tree_without_duplicates): New define to
54 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
55 * tree.c (count_trees): Call
56 cp_walk_tree_without_duplicates.
57 (verify_stmt_tree): Call cp_walk_tree.
58 (break_out_target_exprs): Likewise.
59 (WALK_SUBTREE): Likewise.
60 * cp-gimplify.c (cp_genericize): Likewise.
61 * cp-pt.c (find_parameter_packs_r): Likewise.
62 (uses_parameter_packs): Likewise.
63 (make_pack_expansion): Likewise.
64 (check_for_bare_parameter_packs): Likewise.
65 (for_each_template_parm): Likewise.
66 * decl.c (check_default_argument): Call
67 cp_walk_tree_without_duplicates.
68 * except.c (build_throw): Likewise.
69 * decl2.c (type_visibility): Likewise.
70 * semantics.c (expand_or_defer_fn): Likewise.
71 (finalize_nrv): Call cp_walk_tree.
73 2007-08-20 Jakub Jelinek <jakub@redhat.com>
76 * init.c (build_new_1): Rename placement_var variable to placement_expr.
77 Initialize it with save_expr rather than get_temp_regvar.
79 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
82 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
85 2007-08-17 Ollie Wild <aaw@google.com>
88 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
89 declarations into appropriate slots for comparison. Fix type
92 2007-08-17 Paolo Carlini <pcarlini@suse.de>
95 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
96 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
98 2007-08-17 Paolo Carlini <pcarlini@suse.de>
101 * parser.c (cp_parser_class_head): Improve error message.
103 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
105 * pt.c (instantiate_decl): Set input_location
106 for the function end.
108 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
110 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
112 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
113 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
114 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
115 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
116 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
117 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
118 * typeck.c (cp_type_quals): Likewise.
119 * typeck2.c (cxx_incomplete_type_diagnostic,
120 cxx_incomplete_type_error): Likewise.
122 2007-08-16 Paolo Carlini <pcarlini@suse.de>
125 * pt.c (tsubst_friend_function): When check_classfn
126 returns error_mark_node likewise return it.
128 2007-08-15 Jakub Jelinek <jakub@redhat.com>
131 * typeck.c (check_return_expr): Don't NRV optimize vars in
133 * decl.c (finish_function): Comment fix.
135 2007-08-15 Paolo Carlini <pcarlini@suse.de>
138 * pt.c (push_template_decl_real): Depending on TYPE_P
139 use either TYPE_CONTEXT or DECL_CONTEXT.
141 2007-08-14 Mark Mitchell <mark@codesourcery.com>
143 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
144 constructors and destructors return this.
146 2007-08-14 Paolo Carlini <pcarlini@suse.de>
149 * decl2.c (check_classfn): Return error_mark_node in case of error;
150 in that case, do not call add_method.
151 * decl.c (start_decl): Deal with check_classfn returning
153 (grokfndecl): Likewise.
154 * pt.c (tsubst_friend_function): Likewise.
156 2007-08-14 Andrew Pinski <pinskia@gmail.com>
159 * typeck.c (build_binary_op): Disallow vector float types with
160 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
162 2007-08-11 Ian Lance Taylor <iant@google.com>
164 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
166 * cp/cp-tree.h (cxx_get_alias_set): Update declaration.
168 2007-08-10 Ollie Wild <aaw@google.com>
170 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
172 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
174 (unqualified_namespace_lookup): Fix ambiguous_decl call.
175 (lookup_using_namespace): Fix ambiguous_decl call.
176 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
178 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
180 * call.c (name_as_c_string): Use CONST_CAST.
181 * decl.c (build_decl): Likewise.
182 * parser.c (cp_parser_string_literal): Likewise.
184 2007-08-10 Paolo Carlini <pcarlini@suse.de>
187 * error.c (dump_expr): Consistently use the *_cxx_*
188 variants of the pretty-print functions.
190 2007-08-10 Paolo Carlini <pcarlini@suse.de>
193 * decl.c (check_special_function_return_type): Just error
194 on return type specified for conversion operator.
196 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
198 * typeck2.c (readonly_error): Handle general expressions.
199 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
201 2007-08-06 Dan Hipschman <dsh@google.com>
203 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
204 access function name.
206 2007-08-04 Alfred Minarik <a.minarik@aon.at>
209 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
210 * g++spec.c (lang_specific_driver): Check them.
212 2007-08-06 Paolo Carlini <pcarlini@suse.de>
215 * pt.c (template_class_depth): Fix comment; change return type
218 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
221 2007-03-26 Dirk Mueller <dmueller@suse.de>
223 * parser.c (cp_parser_member_declaration): Pedwarn
224 about stray semicolons after member declarations.
226 2007-08-02 Lee Millward <lee.millward@gmail.com>
231 * parser.c (cp_parser_asm_definition): Detect and discard asm
232 statements with invalid inputs or outputs.
233 (cp_parser_asm_operand_list): Return error mark node if any
234 of the operands are invalid. Adjust documentation.
236 2007-08-02 Nick Clifton <nickc@redhat.com>
238 * typeck.c: Change copyright header to refer to version 3 of the
239 GNU General Public License and to point readers at the COPYING3
240 file and the FSF's license web page.
241 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
242 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
243 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
244 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
245 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
246 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
247 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
248 name-lookup.h, parser.c: Likewise.
250 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
253 * call.c (magic_varargs_p): Honor the "type generic" attribute.
255 2007-07-30 Paolo Carlini <pcarlini@suse.de>
258 * semantics.c (finish_label_stmt): Reject the __label__
259 extension outside function scopes.
261 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
263 * parser.c (eof_token): Un-constify.
264 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
265 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
268 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
270 * pt.c, tree.c, typeck2.c: Fix comment typos.
272 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
273 Mark Mitchell <mark@codesourcery.com>
276 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
277 hidden due to friend declarations in local classes.
279 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
281 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
282 * cp-tree.def (DECLTYPE_TYPE): New.
283 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
284 (dump_type_prefix): Ditto.
285 (dump_type_suffix): Ditto.
286 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
287 * mangle.c (write_type): Handle DECLTYPE_TYPE.
288 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
290 (DECLTYPE_TYPE_EXPR): New.
291 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
292 (finish_declared_type): Declare.
293 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
295 (pp_cxx_type_id): Ditto.
296 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
297 (tsubst): Substitute into a DECLTYPE_TYPE node.
298 (tsubst_copy): Ditto.
299 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
301 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
302 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
303 structural equality (because we can't hash the expressions).
304 (finish_declared_type): New.
305 * lex.c (reswords): Add "decltype" keyword.
306 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
307 (cp_parser_postfix_expression): Add member_access_only_p to
308 restrict postfix expression to member access expressions.
309 (cp_parser_unary_expression): Update call to
310 cp_parser_postfix_expression to reflect new parameter.
311 (cp_parser_declared_type): New.
312 (cp_parser_simple_type_specifier): Parse decltype types.
314 2007-07-27 Mark Mitchell <mark@codesourcery.com>
317 * call.c (convert_for_arg_passing): Only widen bitfields to their
318 declared types if necessary.
320 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
322 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
325 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
327 * decl.c (typename_hash, typename_compare): Constify.
328 * mangle.c (hash_type, compare_type): Likewise.
329 * pt.c (eq_local_specializations, hash_local_specialization):
331 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
332 list_hash): Likewise.
333 * typeck2.c (pat_compare): Likewise.
335 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
337 * method.c (implicitly_declare_fn): Increase alignment if member
338 function pointer format requires it.
340 2007-07-24 Paolo Carlini <pcarlini@suse.de>
343 * typeck.c (check_return_expr): Do not pass a null argument
346 2007-07-24 Paolo Carlini <pcarlini@suse.de>
349 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
352 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
355 * typeck.c (convert_arguments): Only use default args if we have
359 * typeck.c (structural_comptypes): No need to check
360 resolve_typename_type return value here.
361 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
362 * pt.c (resolve_typename_type): Follow typename typedefs. Return
363 original type rather than error_mark_node in case of failure.
364 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
365 resolve_typename_type result check.
366 (cp_parser_direct_declarator, cp_parser_head,
367 cp_parser_constructor_declarator_p): Likewise.
369 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
371 * pt.c (template_parms_variadic_p): Remove.
372 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
374 2007-07-12 Jakub Jelinek <jakub@redhat.com>
377 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
378 argument to dump_aggr_init_expr_args instead of false.
380 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
382 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
383 canonical types; otherwise, fall back to structural type
384 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
385 internal compiler error if the canonical types are wrong.
387 2007-07-11 Paolo Carlini <pcarlini@suse.de>
390 * parser.c (cp_parser_make_indirect_declarator): When the
391 the code argument is ERROR_MARK return cp_error_declarator.
393 2007-07-09 Geoffrey Keating <geoffk@apple.com>
396 * decl.c (cxx_init_decl_processing): Don't set
397 force_align_functions_log.
398 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
399 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
400 FUNCTION_DECL, return its alignment.
402 2007-07-09 Richard Guenther <rguenther@suse.de>
404 * decl.c (start_preparsed_function): Do not promote return type.
406 2007-07-08 Paolo Carlini <pcarlini@suse.de>
409 * pt.c (unify): Never pass error_mark_node to template_decl_level.
411 2007-07-07 Mark Mitchell <mark@codesourcery.com>
414 * pt.c (resolve_overloaded_unification): Robustify. Return a
416 (type_unification_real): Adjust accordingly.
418 2007-07-06 Richard Guenther <rguenther@suse.de>
420 * init.c (build_new_1): Use the correct pointer type.
421 * typeck2.c (build_m_component_ref): Likewise.
423 2007-07-05 Mark Mitchell <mark@codesourcery.com>
426 * init.c (build_zero_init): Always build an initializer for
428 * typeck2.c (build_functional_cast): Use build_zero_init.
431 * init.c (build_new_1): Always pass the allocation function to
432 build_op_delete_call.
433 * call.c (build_op_delete_call): Handle operator delete with a
434 variable-argument list. Do not issue an error when no matching
435 deallocation function is available for a new operator.
438 * cp-tree.h (any_value_dependent_elements_p): Declare it.
439 * decl.c (value_dependent_init_p): New function.
440 (cp_finish_decl): Use it.
441 * pt.c (value_dependent_expression_p): Use
442 any_value_dependent_elements_p.
443 * parser.c (cp_parser_primary_expression): Add comment about
444 treating dependent qualified names as integral
445 constant-expressions.
447 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
449 * decl.c (build_ptrmemfunc_type): Always use structural equality
450 tests when comparing pointer-to-member-function types, because the
451 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
454 2007-07-03 Mark Mitchell <mark@codesourcery.com>
456 * init.c (build_new): Tweak comment.
458 2007-06-29 Dave Brolley <brolley@redhat.com>
461 * parser.c (cp_parser_new_type_id): Don't reduce a named array
462 type to its base type and number of elements here.
463 * init.c (build_new): Call complete_type_or_else to ensure that the
464 type is complete and to issue a diagnostic if it is not.
465 (build_new_1): Don't call complete_type_or_else here.
467 2007-07-03 Richard Guenther <rguenther@suse.de>
470 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
473 2007-07-02 Simon Baldwin <simonb@google.com>
475 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
476 for inner-style nested forward declarations that don't declare
479 2007-07-02 Jakub Jelinek <jakub@redhat.com>
482 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
483 DECL_P in not a variable and appears more than once error messages.
485 2007-07-01 Ollie Wild <aaw@google.com>
487 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
488 (select_decl): Remove function.
489 (unqualified_namespace_lookup): Populate binding by calling
490 ambiguous_decl. Remove select_decl call.
491 (lookup_qualified_name): Remove select_decl call.
492 * decl.c (lookup_and_check_tag): Check for ambiguous references.
493 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
494 generation when name lookup is ambiguous.
496 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
499 * init.c (build_new_1): Use structural equality on the copy of the
502 2007-06-28 Geoffrey Keating <geoffk@apple.com>
504 * decl2.c (determine_visibility): Implement
505 flag_visibility_ms_compat effect on type info.
506 * decl.c (cxx_init_decl_processing): Implement
507 global effect of flag_visibility_ms_compat.
509 2007-06-28 Geoffrey Keating <geoffk@apple.com>
511 * decl2.c (start_objects): Mark constructor-running function
514 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
517 * decl.c (grokdeclarator): Reset friendp for member functions declared
518 friend of their own class.
520 2007-06-23 Mark Mitchell <mark@codesourcery.com>
522 * decl2.c (determine_visibility): Don't look for dllexport here.
523 (determine_visibility_from_class): Tidy.
525 2007-06-18 Simon Baldwin <simonb@google.com>
528 * parser.c (cp_parser_single_declaration): Added check for storage
529 class other than sc_none in parsed declaration, and a flag to indicate
530 if the call is part of an explicit template specialization parse.
531 * (cp_parser_explicit_specialization): Specialization check flag added
532 to call to cp_parser_single_declaration(), set true.
533 * (cp_parser_template_declaration_after_export): Specialization check
534 flag added to call to cp_parser_single_declaration(), set false.
535 * pt.c (check_explicit_specialization): Added code to copy visiblity
536 and linkage from the templated function to the explicit specialization.
538 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
540 * typeck.c (build_binary_op): For templates build the
541 expression in pieces to avoid the assert in build2_stat.
542 (get_member_function_from_ptrfunc):
543 Change over to using POINTER_PLUS_EXPR and convert
544 the second operand to sizetype.
545 * typeck2.c (build_m_component_ref): Likewise.
546 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
547 instead of PLUS_EXPR for pointers.
548 (build_new_1): Likewise.
549 (build_vec_delete_1): Likewise.
550 (build_vec_delete): Likewise.
551 * class.c (build_base_path): Likewise.
552 (build_base_path): Likewise.
553 (convert_to_base_statically): Likewise.
554 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
555 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
556 instead of PLUS_EXPR.
557 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
558 instead of PLUS_EXPR for pointers.
559 * call.c (build_special_member_call): Likewise.
560 * rtti.c (build_headof): Likewise.
561 Use sizetype instead of ptrdiff_type_node.
562 (tinfo_base_init): Create a POINTER_PLUS_EXPR
563 instead of PLUS_EXPR for pointers.
564 * except.c (expand_start_catch_block): Do a
565 NEGATIVE and then a POINTER_PLUS_EXPR instead
567 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
568 PLUS_EXPR on pointer types over to use
569 POINTER_PLUS_EXPR and remove the conversion
570 to the pointer types.
571 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
572 adding to a pointer type. Use size_int instead of
573 ssize_int. Convert the index to sizetype before
574 adding it to the pointer.
576 2007-06-15 Mark Mitchell <mark@codesourcery.com>
578 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
579 (DECL_ANON_UNION_VAR_P): New macro.
580 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
581 than DECL_VAR_MARKED_P, to keep track of which variables we have
583 * decl.c (redeclaration_error_message): Complain about redeclaring
584 anonymous union members at namespace scope.
585 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
587 2007-06-14 Geoff Keating <geoffk@apple.com>
589 * decl2.c (determine_visibility): Ensure that functions with
590 hidden types as parameters are hidden.
593 * decl2.c (determine_visibility): Remove duplicate code for
596 2007-06-12 Ian Lance Taylor <iant@google.com>
599 * init.c (avoid_placement_new_aliasing): New static function.
600 (build_new_1): Call it.
602 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
604 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
605 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
607 2007-06-08 Jakub Jelinek <jakub@redhat.com>
610 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
611 on init, the non-decl cond operand and increment value.
613 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
616 * decl.c (check_initializer): Report an error when a brace enclosed
617 initializer is used for a non-aggregate type in C++98.
618 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
620 (grokdeclarator): Likewise.
621 (move_fn_p): Likewise.
622 * typeck.c (check_return_expr): Likewise.
623 * call.c (reference_binding): Likewise.
624 * error.c (cp_cpp_error): Likewise.
625 * pt.c (check_default_tmpl_args): Likewise.
627 * lex.c (init_reswords): Likewise.
628 * parser.c (p_parser_primary_expression): Likewise.
629 (TOKEN_PRECEDENCE): Likewise.
630 (cp_parser_init_declarator): Likewise.
631 (cp_parser_ptr_operator): Likewise.
632 (cp_parser_parameter_declaration): Likewise.
633 (cp_parser_enclosed_template_argument_list): Likewise.
634 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
635 (cp_parser_next_token_ends_template_argument_p): Likewise.
637 2007-06-04 Simon Baldwin <simonb@google.com>
639 * decl.c (grokdeclarator): Readability change. Moved case labels
640 into direct switch statement scope.
642 2007-06-04 Paolo Carlini <pcarlini@suse.de>
644 * call.c (convert_like_real): Remove pointless code.
646 2007-05-31 Mark Mitchell <mark@codesourcery.com>
648 * decl.c (get_atexit_fn_ptr_type): New function.
649 (get_atexit_node): Use it.
650 (start_cleanup_fn): Likewise.
651 (register_dtor_fn): Use the object's destructor, instead of a
652 separate cleanup function, where possible.
653 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
654 (atexit_fn_ptr_type_node): New macro.
655 * decl2.c (build_cleanup): Use build_address.
657 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
659 * typeck.c (build_binary_op): Include types in error.
661 2007-05-31 Jakub Jelinek <jakub@redhat.com>
664 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
665 needs runtime initialization.
667 2007-05-31 Paolo Carlini <pcarlini@suse.de>
670 * semantics.c (finish_trait_expr): Complete the types.
672 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
673 Douglas Gregor <doug.gregor@gmail.com>
674 Pedro Lamarao <pedro.lamarao@mndfck.org>
675 Howard Hinnant <howard.hinnant@gmail.com>
679 * typeck.c (comptypes): Don't consider rvalue and lvalue
680 reference types to be equivalent.
681 (check_return_expr): Move from certain lvalues when returning
683 * decl.c (grokdeclarator): Implement reference collapsing.
684 (copy_fn_p): Don't consider constructors taking rvalue references
685 to be copy constructors.
687 * call.c (conversion): New "rvaluedness_matches_p" member.
688 (convert_class_to_reference): Require reference type as first
689 parameter instead of base type.
690 (reference_binding): Add logic to handle rvalue references.
691 (implicit_conversion): Update inaccurate comment.
692 (convert_like_real): Disable creation of temporaries that are
693 impossible to initialize for types with move constructors.
694 (build_over_call): Elide move constructors when possible.
695 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
696 (maybe_handle_ref_bind): Return conversion instead of type node.
697 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
698 determine preferred conversion sequences.
699 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
700 (LOOKUP_PREFER_RVALUE): New.
701 (DECL_MOVE_CONSTRUCTOR_P): New.
702 (struct cp_declarator): Add "reference" member for reference
703 types, with new "rvalue_ref" flag.
704 (cp_build_reference_type): Declare.
705 (move_fn_p): Declare.
706 * error.c (dump_type_prefix): Format rvalue reference types
707 correctly in error messages.
708 * except.c (build_throw): Move from certain lvalues when
710 * mangle.c (write_type): Mangle rvalue references differently
711 than regular references.
712 * parser.c (make_reference_declarator): Add boolean parameter for
714 (cp_parser_make_indirect_declarator): New.
715 (cp_parser_new_declarator_opt): Call
716 cp_parser_make_indirect_declarator.
717 (cp_parser_conversion_declarator_opt): Ditto.
718 (cp_parser_declarator): Ditto.
719 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
721 * pt.c (tsubst): Implement reference collapsing.
722 (maybe_adjust_types_for_deduction): Implement special template
723 parameter deduction rule for rvalue references.
724 (type_unification_real): Update calls to
725 maybe_adjust_types_for_deduction.
726 (try_one_overload): Ditto.
727 (unify_pack_expansion): Ditto.
728 * tree.c (lvalue_p_1): Handle rvalue reference types.
729 (cp_build_reference_type): New.
731 2007-05-30 Jakub Jelinek <jakub@redhat.com>
734 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
735 variables that need runtime initialization.
737 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
740 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
741 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
742 case POSTDECREMENT_EXPR>): Return the error_mark_node
743 if either the real or imaginary parts would an
746 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
747 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
750 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
751 token is a closing brace, false if there are no tokens left.
752 (cp_parser_namespace_alias_definition): Only consume the next token if
753 it is a closing brace.
755 * parser.c (cp_parser_class_specifier): Likewise.
757 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
759 * semantics.c (finish_member_declaration): Fix a typo in the
762 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
774 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
775 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
776 * pt.c (check_for_bare_parameter_packs): Return bool indicated
777 whether everything was okay. Fix indentation.
778 (push_template_decl_real): Check for bare parameter packs in
779 function parameters; where errors occur, mark the parameter types
780 with ERROR_MARK_NODEs to avert ICEs.
781 (coerce_template_parameter_pack): New.
782 (coerce_template_parms): Moved parameter pack coercion into
783 coerce_template_parameter_pack, and permit it anywhere in the
784 template parameter list (not just at the end). Parameter and
785 argument indices can vary (somewhat) separately now, so add
786 PARM_IDX and ARG_IDX.
787 (fn_type_unification): Don't set an argument pack as incomplete if
788 no argument pack was deduced.
789 (type_unification_real): If a type parameter is a parameter pack
790 and has not otherwise been deduced, it will be deduced to an empty
792 (more_specialized_fn): Use the actual lengths of the argument
793 lists when comparing against expansions.
794 * semantics.c (finish_member_declaration): If a field's type has
795 bare parameter packs, error and set its type to ERROR_MARK_NODE.
797 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
800 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
802 2007-05-22 Ollie Wild <aaw@google.com>
804 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
805 (unqualified_namespace_lookup): Adds check for hidden types.
807 2007-05-22 Ollie Wild <aaw@google.com>
809 * decl.c (duplicate_decls): Verify namespace names are unique.
811 2007-05-21 Mark Mitchell <mark@codesourcery.com>
813 * decl.c (cxx_maybe_build_cleanup): Handle
814 __attribute__((cleanup)).
816 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
818 * cvt.c (cp_convert_and_check): Don't check warnings if the
821 2007-05-18 Geoffrey Keating <geoffk@apple.com>
823 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
825 2007-05-14 Paolo Carlini <pcarlini@suse.de>
828 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
829 type only if is a class type (5.2.8/4).
831 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
833 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
834 * decl.c (grokdeclarator): Use unsigned_type_for instead of
835 c_common_unsigned_type.
837 2007-05-11 Silvius Rus <rus@google.com>
839 * cp/typeck.c (build_indirect_ref): Add call to
840 strict_aliasing_warning.
841 (build_reinterpret_cast_1): Condition call to
842 strict_aliasing_warning.
844 2007-05-11 Jan Hubicka <jh@suse.cz>
846 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
847 * decl2.c (start_objects): ctors and dtors are no longer public.
848 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
850 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
852 * typeck.c (build_unary_op): Remove code that used to
853 handle non lvalue increments/decrements.
855 2007-05-07 Mike Stump <mrs@apple.com>
857 * parser.c (check_empty_body): Add.
858 (cp_parser_iteration_statement): Add call to check_empty_body.
860 2007-05-05 Geoffrey Keating <geoffk@apple.com>
863 * mangle.c (write_mangled_name): Mangle static variable names.
864 (write_unqualified_name): Use local-source-name for
865 namespace-scope static variables.
867 2007-05-04 Dirk Mueller <dmueller@suse.de>
869 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
872 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
875 * decl2.c (constrain_class_visibility):
876 Use strip_pointer_or_array_types instead of strip_array_types.
878 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
881 * decl.c (reshape_init_r): Don't reshape the first element if it
882 is a pointer to member function.
884 2007-04-27 Simon Baldwin <simonb@google.com>
886 * decl.c (grokparms): Changed message format from %qD to %qE.
888 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
890 * error.c (maybe_warn_variadic_templates): Variadic templates are
891 now in C++0x, so only warn about them in C++98 mode.
893 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
896 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
897 integeral types from vectors types.
899 2007-04-26 Jakub Jelinek <jakub@redhat.com>
902 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
903 for type dependent OMP_CLAUSE_DECLs.
905 2007-04-24 Mark Mitchell <mark@codesourcery.com>
908 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
909 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
910 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
911 * init.c (build_zero_init): Adjust, as
912 COMPLEX_TYPE is now a SCALAR_TYPE.
913 * typeck2.c (digest_init): Allow brace-enclosed initializers for
914 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
916 2007-04-25 Paolo Carlini <pcarlini@suse.de>
918 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
919 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
920 (trait_expr_value): Adjust.
922 2007-04-23 Simon Baldwin <simonb@google.com>
924 * decl.c (grokparms): Added new error for duplicate function
925 parameters names in function prototypes, to match gcc behavior.
927 2007-04-23 Jan Hubicka <jh@suse.cz>
929 * cp/decl2.c (finish_objects): Do not call target constructor/destructor
932 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
934 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
935 instead of checking GIMPLE_STMT_P in chain_next.
937 2007-04-17 Mark Mitchell <mark@codesourcery.com>
940 * call.c (convert_for_arg_passing): Convert bitfields to their
943 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
946 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
948 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
951 * cp/decl2.c (constrain_class_visibility):
952 Do not warn about the use of anonymous namespace in the main input file.
954 2007-04-15 Mark Mitchell <mark@codesourcery.com>
956 * cp-tree.h (current_template_parms): Fix typo in comment.
958 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
960 * cp-tree.h, error.c: Fix comment typos.
962 2007-04-13 Jason Merrill <jason@redhat.com>
965 * call.c (reference_binding): Add c_cast_p parm. If true,
966 add quals to TO as needed to make it reference-compatible.
968 2007-04-11 Jan Hubicka <jh@suse.cz>
970 * cp/class.c (convert_to_base_statically): Fold produced tree; verify
971 that we are not processing template_decl.
973 2007-04-09 Mark Mitchell <mark@codesourcery.com>
976 * class.c (build_base_path): Ensure that the converted pointer has
977 the same cv-qualification as the input.
979 2007-04-09 Paolo Carlini <pcarlini@suse.de>
981 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
983 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
985 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
987 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
988 * tree.c (cp_add_pending_fn_decls): Remove.
989 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
991 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
993 Revert change removing staticp.
995 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
997 * cp-objcp-common.c (cxx_staticp): Remove.
998 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
999 * cp-tree.h (cxx_staticp):
1001 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
1003 * class.c (check_for_override): Don't remove dllmport attribute
1006 2007-04-03 Jakub Jelinek <jakub@redhat.com>
1009 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
1010 type issue error and return early.
1012 2007-03-30 Jason Merrill <jason@redhat.com>
1015 * typeck.c (cp_type_readonly): New fn.
1016 * cp-tree.h: Declare it.
1017 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
1018 (cp_finish_decl): Not here.
1020 2007-03-31 Richard Guenther <rguenther@suse.de>
1022 * optimize.c (maybe_clone_body): Replace splay-tree usage by
1025 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
1030 * parser.c (declarator_can_be_parameter_pack): New.
1031 (cp_parser_template_parameter): Only parse the `...' if the
1032 declarator can be a parameter pack.
1033 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
1035 * pt.c (find_parameter_packs_r): Look into the bounds on integer
1036 types (they could be used as array bounds).
1037 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
1038 (tsubst_pack_expansion): Handle failure to expand parameter
1041 2007-03-30 Paolo Carlini <pcarlini@suse.de>
1044 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
1045 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
1046 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
1047 (CLASS_TYPE_NON_UNION_P): Add.
1048 (struct lang_type_class): Add has_complex_dflt.
1049 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
1050 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
1051 * cp-tree.def: Add TRAIT_EXPR.
1052 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
1053 * lex.c (struct resword): Add __has_nothrow_assign,
1054 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
1055 __has_trivial_constructor, __has_trivial_copy,
1056 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
1057 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
1058 __is_pod, __is_polymorphic, __is_union.
1059 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
1060 (cp_parser_trait_expr): New.
1061 * semantics.c (finish_trait_expr, trait_expr_value
1062 classtype_has_nothrow_copy_or_assign_p): New.
1063 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
1065 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
1066 * class.c (check_bases, check_field_decl, check_bases_and_members):
1067 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
1068 * pt.c (uses_template_parms, tsubst_copy_and_build,
1069 value_dependent_expression_p, type_dependent_expression_p): Deal with
1071 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
1073 2007-03-29 Richard Guenther <rguenther@suse.de>
1075 * tree.c (cp_walk_subtrees): Do not set input_location.
1077 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
1080 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
1083 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1085 * parser.c (struct cp_parser): Update comment for
1086 greater_than_is_operator_p.
1087 (cp_parser_primary_expression): In C++0x mode, a cast operator can
1088 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
1089 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
1090 !GREATER_THAN_IS_OPERATOR_P.
1091 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
1092 `>>' operators that will become two `>' tokens in C++0x.
1093 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
1094 mode, allowing it to terminate default arguments.
1095 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
1096 `>>' like two consecutive `>' tokens.
1097 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
1098 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
1099 ends a template argument.
1101 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1103 * decl.c (redeclaration_error_message): Complain when redeclaring
1104 a friend function with default template arguments (C++0x mode only).
1105 * cp-tree.h (check_default_tmpl_args): Declare.
1106 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
1107 template arguments in function templates. Add support for checking
1108 the default template arguments of friend templates.
1109 (push_template_decl_real): Fix call to check_default_tmpl_args.
1110 (type_unification_real): If a template parameter has not been
1111 deduced but provides a default template argument, substitute into
1112 that default template argument.
1113 * parser.c (cp_parser_init_declarator): When declaring (but not
1114 defining!) a function template in C++0x mode, check for default
1117 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1120 * decl.c (grokdeclarator): Deal with cv-qualified function type
1121 typedefs in the same way for member and non-member functions.
1123 2007-03-26 Dirk Mueller <dmueller@suse.de>
1125 * parser.c (cp_parser_member_declaration): Pedwarn
1126 about stray semicolons after member declarations.
1128 2007-03-26 Paolo Carlini <pcarlini@suse.de>
1131 * pt.c (instantiate_decl): Set in_system_header.
1133 2007-03-22 Mark Mitchell <mark@codesourcery.com>
1135 * cp-tree.h (current_tempalte_parms): Improve documentation.
1136 * pt.c (current_template_args): Likewise.
1139 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
1140 not consume tokens when failing.
1142 2007-03-22 Jim Wilson <wilson@specifix.com>
1143 Mark Mitchell <mark@codesourcery.com>
1146 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
1147 consistent with FROM.
1149 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1151 * error.c (dump_expr): Handle dependent names that designate types.
1152 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
1154 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
1156 * cp-tree.def, parser.c, pt.c: Fix comment typos.
1158 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1160 * cvt.c (cp_convert_and_check) : Define.
1161 * cp-tree.h (cp_convert_and_check): Declare.
1162 * call.c (convert_conversion_warnings): Rename to
1163 conversion_null_warnings. The warning for floating-point to
1164 integer is handled by convert_and_check in convert_like_real.
1165 (convert_like_real): convert_conversion_warnings was renamed as
1166 conversion_null_warnings.
1167 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
1168 overflow and changes of value during conversion.
1170 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1173 * parser.c (cp_parser_statement): If 'namespace' is found, this
1174 only can be a namespace alias definition, so parse it now.
1175 (cp_parser_namespace_alias_definition): if we find an open brace
1176 instead of '=', then this is actually a misplaced namespace
1179 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1182 * decl.c (cxx_init_decl_processing): Move command-line options
1183 processing to c-opts.c.
1185 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
1187 * ptree.c (cxx_print_type): Use formatting markup for integers
1188 when printing template parameter index/level/orig level.
1189 (cxx_print_xnode): Ditto.
1190 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
1191 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
1192 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
1194 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
1195 rather than a HOST_WIDE_INT.
1196 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
1197 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
1199 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
1200 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
1201 IN_BASE_INITIALIZER bool bitfields.
1202 (struct cp_declarator): Make KIND a 4-bit field. Make
1203 PARAMETER_PACK_P a bool bitfield just after KIND.
1204 * pt.c (uses_parameter_packs): Destroy the pointer set.
1205 (make_pack_expansion): Ditto.
1206 (check_for_bare_parameter_packs): Ditto.
1207 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
1209 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
1212 * call.c (convert_default_arg): Instead of copying the node,
1215 2007-03-15 Dirk Mueller <dmueller@suse.de>
1218 * call.c (convert_conversion_warnings): New..
1219 (convert_like_real): .. factored out from here.
1220 (convert_conversion_warnings): Add warning about
1221 false being converted to NULL in argument passing.
1223 2007-03-14 Dirk Mueller <dmueller@suse.de>
1225 * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
1226 (finish_do_body): Warn about empty body in do/while statement.
1228 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1230 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
1232 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1235 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
1238 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
1240 * cp/repo.c (init_repo): Initialize random_seed saved options.
1241 (finish_repo): Adjust.
1243 2007-03-13 Mark Mitchell <mark@codesourcery.com>
1246 * Make-lang.in (doc/g++.1): Use $< to specify the location from
1249 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
1251 * decl.c (compute_array_index_type): New warning flag warn_vla.
1253 2007-03-12 Mark Mitchell <mark@codesourcery.com>
1256 * call.c (convert_default_arg): Copy non-constant arguments.
1258 2007-03-11 Mark Mitchell <mark@codesourcery.com>
1261 * parser.c (cp_parser_postfix_expression): Disallow compound
1262 literals in constant expressions.
1265 * semantics.c (finish_typeof): Use unlowered_expr_type.
1267 2007-03-10 Mark Mitchell <mark@codesourcery.com>
1270 * cp-tree.h (unlowered_expr_type): New function.
1271 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
1272 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
1273 (unlowered_expr_type): New function.
1274 (build_unary_op): Disallow predecrements of bool bitfields.
1275 * call.c (build_conditional_expr): Use unlowered_expr_type.
1276 * pt.c (type_unification_real): Likewise.
1278 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
1281 * typeck.c (check_return_expr): Check for bare parameter packs.
1282 (comptypes): Compare template parameter packs and
1283 type pack expansions.
1284 * decl.c (grokdeclarator): Deal with the declaration of function
1286 (grokparms): Verify that the (optional) function parameter pack is
1287 at the end of the parameter list.
1288 (xref_basetypes): Handle pack expansions in the base class.
1289 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
1290 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
1291 (NONTYPE_ARGUMENT_PACK): New.
1292 (TYPE_PACK_EXPANSION): New.
1293 (EXPR_PACK_EXPANSION): New.
1294 (ARGUMENT_PACK_SELECT): New.
1295 * cp-objcp-common.c (cp_tree_size): Compute size of
1296 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
1297 ARGUMENT_PACK_SELECT.
1298 * error.c (dump_template_argument): Print template argument packs.
1299 (dump_template_argument_list): Ditto.
1300 (dump_template_parameter): Dump `...' for template type parameter
1302 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
1303 (dump_parameters): Print function parameter packs.
1304 (dump_template_parms): Print template argument packs.
1305 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
1306 (maybe_warn_variadic_templates): New.
1307 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
1308 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1309 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1311 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
1312 (write_template_arg): Write argument packs as separate arguments.
1313 * cp-tree.h (struct template_parm_index_s): Add flag that
1314 indicates that the template parameter is actually a parameter
1316 (struct tree_argument_pack_select): New.
1317 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
1318 (union lang_tree_node): Add argument_pack_select.
1319 (FUNCTION_PARAMETER_PACK_P): New.
1320 (PACK_EXPANSION_P): New.
1321 (PACK_EXPANSION_PATTERN): New.
1322 (SET_PACK_EXPANSION_PATTERN): New.
1323 (PACK_EXPANSION_PARAMETER_PACKS): New.
1324 (ARGUMENT_PACK_P): New.
1325 (ARGUMENT_PACK_ARGS): New.
1326 (SET_ARGUMENT_PACK_ARGS): New.
1327 (ARGUMENT_PACK_INCOMPLETE_P): New.
1328 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
1329 (TEMPLATE_PARM_PARAMETER_PACK): New.
1330 (TEMPLATE_TYPE_PARAMETER_PACK): New.
1331 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
1332 (ARGUMENT_PACK_SELECT_INDEX): New.
1333 (ARGUMENT_PACK_SELECT_ARG): New.
1334 (struct cp_declarator): Add parameter_pack_p flag.
1335 (maybe_warn_variadic_templates): Declare.
1336 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
1337 indicate a template parameter pack.
1338 (uses_parameter_packs): Declare.
1339 (template_parameter_pack_p): Declare.
1340 (template_parms_variadic_p): Declare.
1341 (make_pack_expansion): Declare.
1342 (check_for_bare_parameter_packs): Declare.
1343 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
1344 sizeof... expressions.
1345 (pp_cxx_expression): Print pack expansions and non-type argument
1347 (pp_cxx_exception_specification): Print pack expansions.
1348 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
1349 (pp_cxx_ctor_initializer): Print pack expansions.
1350 (pp_cxx_type_id): Print pack expansions.
1351 (pp_cxx_template_argument_list): Print argument packs.
1352 (pp_cxx_template_parameter): Print ellipsis for template parameter
1354 * pt.c (comp_template_parms): Compare template parameter packs.
1355 (template_parameter_pack_p): New.
1356 (template_parms_variadic_p): New.
1357 (template_args_variadic_p): New.
1358 (make_ith_pack_parameter_name): New.
1359 (struct find_parameter_pack_data): New.
1360 (find_parameter_packs_r): New.
1361 (uses_parameter_packs): New.
1362 (make_pack_expansion): New.
1363 (check_for_bare_parameter_packs): New.
1364 (expand_template_argument_pack): New.
1365 (reduce_template_parm_level): Propagate parameter pack flag.
1366 (process_template_parm): Add is_parameter_pack parameter to state
1367 when the parameter is actually a parameter pack. Create template
1368 parameter packs when is_parameter_pack is true.
1369 (current_template_args): The argument for a template parameter
1370 pack is an argument pack containing a single pack expansion.
1371 (process_partial_specialization): When checking that non-type
1372 argument expressions do not involve template parameters, loop over
1373 the arguments in argument packs separately.
1374 (push_template_decl_real): Check that the type of the declaration
1375 does not have any bare parameter packs. Check that primary
1376 templates have no more than one parameter pack, and that it comes
1377 at the end of the template parameter list.
1378 (convert_template_argument): Handle coercions for pack expansion
1379 expressions by coercing the pattern then rebuilding the expansion.
1380 (coerce_template_parms): When coercing the arguments for a
1381 variadic template, pack "extra" arguments into an argument pack.
1382 (coerce_template_template_parms): Cannot coerce between parameter
1383 packs and non-pack parameters.
1384 (template_args_equal): Compare PACK_EXPANSION_P expressions.
1385 (comp_template_args): Expand all template arguments packs before
1386 comparing template argument lists.
1387 (mangle_class_name_for_template): Make argument packs as separate
1389 (for_each_template_parm_r): No need to handle BASELINK.
1390 (instantiate_class_template): Handle pack expansions in the base
1392 (tsubst_pack_expansion): New.
1393 (tsubst_template_args): Handle substitutions of argument packs and
1394 pack expansion into template argument lists.
1395 (tsubst_decl): Expand function parameter packs into separate
1396 function parameters.
1397 (tsubst_arg_types): Expand a type pack expansion into separate
1399 (tsubst_exception_specification): Handle pack expansions in
1400 exception specifiers.
1401 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
1402 replacing a template parameter with its argument. If we encounter
1403 a substitution for an argument pack, just return the parameter
1405 (tsubst_copy): sizeof(X...) returns the number of elements in
1406 parameter pack X. See through ARGUMENT_PACK_SELECT when the
1407 PARM_DECL is a parameter pack.
1408 (tsubst_expr): Expression pack expansions and argument packs
1409 cannot show up here; they will all be handled through function
1410 calls, sizeof, and template argument lists.
1411 (tsubst_copy_and_build): sizeof(X...) returns the number of
1412 elements in parameter pack X. Handle pack expansions in TREE_LIST
1413 and CONSTRUCTOR nodes.
1414 (fn_type_unification): Handle "incomplete" explicit template
1415 argument lists that specify some of the arguments for a template
1417 (type_unification_real): Unify arguments against pack expansions.
1418 (template_parm_level_and_index): New, helper function.
1419 (unify_pack_expansion): New.
1420 (unify): Unify argument packs on an argument-by-argument basis,
1421 handling variadic argument packs as well.
1422 (more_specialized_fn): Handle unification of function parameter
1423 packs. All things being equal, prefer non-variadic function
1424 templates to variadic function templates.
1425 (more_specialized_class): Prefer the variadic class template
1426 partial specialization that binds fewer arguments to a parameter
1428 (regenerate_decl_from_template): Expand function parameter packs
1429 into separate parameters.
1430 (instantiate_decl): Ditto.
1431 (tsubst_initializer_list): Handle pack expansions for base-class
1433 (dependent_type_p_r): Determine dependent types in argument packs
1434 and pack expansions.
1435 (value_dependent_expression_p): Determine value-dependence of
1436 non-type argument packs.
1437 (dependent_template_arg_p): Handle argument packs.
1438 * semantics.c (finish_cond): Check for bare parameter packs.
1439 (finish_expr_stmt): Ditto.
1440 (finish_for_expr): Ditto.
1441 (finish_switch_cond): Ditto.
1442 (finish_mem_initializers): Ditto.
1443 * name-lookup.c (arg_assoc_type): Handle pack expansions and
1445 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
1446 * parser.c (make_declarator): Declarator is not an expansion.
1447 (make_pointer_declarator): Transfer parameter pack flag to outer
1449 (make_reference_declarator): Ditto.
1450 (make_ptrmem_declarator): Ditto.
1451 (make_call_declarator): Ditto.
1452 (make_array_declarator): Ditto.
1453 (cp_parser_postfix_expression): Allow pack expansion expressions
1454 in the argument list for a call expression.
1455 (cp_parser_parenthesized_expression_list): Add new parameter
1456 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
1457 into separate arguments."
1458 (cp_parser_new_placement): Allow pack expansion expressions.
1459 (cp_parser_new_initializer): Ditto.
1460 (cp_parser_mem_initializer_list): Allow ellipsis to create a
1461 base-class initializer expansion.
1462 (cp_parser_mem_initializer): Ditto.
1463 (cp_parser_template_parameter_list): Keep track of whether the
1464 template parameter is a template parameter pack.
1465 (cp_parser_template_parameter): Parse the ellipsis to indicate a
1466 template parameter pack.
1467 (cp_parser_type_parameter): Ditto.
1468 (cp_parser_template_argument_list): Parse the ellipsis to indicate
1470 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
1471 this declarator is a parameter pack.
1472 (cp_parser_parameter_declaration): The ellipsis does not end the
1473 parameter declaration, because it might be a parameter pack. Parse
1474 the ellipsis to indicate a parameter pack.
1475 (cp_parser_initializer): Allow pack expansions.
1476 (cp_parser_initializer_list): Allow ellipsis to create an
1477 initializer expansion.
1478 (cp_parser_base_clause): Allow ellipsis to create a base specifier
1480 (cp_parser_type_id_list): Allow ellipsis to create an exception
1481 specifier expansion.
1482 (cp_parser_attribute_list): Don't allow pack expansions.
1483 (cp_parser_functional_cast): Allow pack expansions.
1484 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
1485 compute the length of a parameter pack.
1486 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
1487 end a template argument.
1488 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1489 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1492 2007-03-09 Dirk Mueller <dmueller@suse.de>
1494 * cp/call.c (build_new_op): Call warn_logical_operator.
1496 2007-03-08 Volker Reichelt <reichelt@netcologne.de>
1499 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
1502 * pt.c (any_template_arguments_need_structural_equality_p):
1505 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
1507 * decl.c (grokdeclarator): Disable warnings for anonymous
1510 2007-03-05 Volker Reichelt <reichelt@netcologne.de>
1512 * typeck2.c (readonly_error): Always emit a hard error.
1513 Remove last argument.
1514 * cp-tree.h (readonly_error): Adjust prototype.
1515 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
1516 * typeck.c (build_unary_op): Likewise.
1517 (build_modify_expr): Likewise.
1519 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
1522 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
1524 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1527 * parser.c (struct cp_parser): New IN_IF_STMT.
1528 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
1529 returning if parsing the body of an 'if' statement or issuing an
1530 error and continuing.
1531 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
1533 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
1535 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
1538 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
1541 2007-03-02 Geoffrey Keating <geoffk@apple.com>
1543 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
1544 Objective-C++. Don't exit early if -shared-libgcc needs to be
1547 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1549 * typeck.c (common_base_type): Delete unused function.
1551 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
1553 * Make-lang.in: Add dummy lang.install-pdf target.
1555 2007-03-01 Simon Baldwin <simonb@google.com>
1558 * decl.c (check_tag_decl): Added new warning for typedef ignored
1559 when it precedes an otherwise valid non-typedef declaration.
1561 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
1563 * typeck.c (build_function_call): Store converted arguments
1564 in a stack-allocated array instead of building a list.
1565 (convert_arguments): Store arguments in the array passed in as an
1566 argument, and return the actual number of arguments.
1567 * call.c (build_call): Delete, and replace with...
1568 (build_call_n, build_call_a): New.
1569 (build_op_delete_call): Rewrite to avoid constructing argument lists.
1570 (build_over_call): Store converted arguments in a stack-allocated
1571 array instead of building a list.
1572 (build_cxx_call): Pass arguments in an array instead of as a list.
1573 (build_java_interface_fn_ref): Rewrite to avoid constructing
1575 * tree.h: Update declarations to reflect above changes.
1576 * method.c (use_thunk): Use a stack-allocated array to hold
1577 the arguments instead of a list.
1578 * rtti.c (throw_bad_cast): Update call to cxx_call.
1579 (throw_bad_typeid): Likewise.
1580 (build_dynamic_cast_1): Likewise.
1581 * init.c (build_builtin_delete_call): Use build_call_n.
1582 * decl.c (expand_static_init): Likewise.
1583 * except.c (cp_protect_cleanup_actions): Likewise.
1584 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
1585 (gimplify_must_not_throw_expr): Likewise.
1586 (cxx_omp_apply_fn): Use build_call_a.
1588 2007-02-26 Mark Mitchell <mark@codesourcery.com>
1590 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
1591 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
1593 2007-02-25 Mark Mitchell <mark@codesourcery.com>
1595 * cp-tree.h (static_ctors): Remove.
1596 * cp-tree.h (static_dtors): Likewise.
1597 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
1598 refactoring of tree_map hierarchy.
1599 (decl_shadowed_for_var_insert): Likewise.
1600 * semantics.c (expand_body): Use c_expand_body.
1601 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
1602 * decl2.c (static_ctors): Remove.
1603 (static_dtors): Likewise.
1604 (generate_ctor_or_dtor_function): Pass NULL_TREE to
1605 objc_generate_static_init_call. Do not call static_[cd]tors.
1606 (generate_ctor_and_dtor_functions_for_priority): Do not check for
1608 (cp_write_global_declarations): Likewise.
1610 2007-02-23 Richard Guenther <rguenther@suse.de>
1612 * class.c (note_name_declared_in_class): Make declaration
1613 changes meaning a pedwarn.
1615 2007-02-22 Michael Matz <matz@suse.de>
1618 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
1619 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
1620 dump_function_decl): Guard emitting outer scopes by new flag.
1621 * cp-lang.c (cxx_dwarf_name): New function.
1622 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
1623 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
1625 (push_template_decl_real, lookup_template_class): Remove calls
1628 2007-02-19 Mark Mitchell <mark@codesourcery.com>
1630 * call.c (build_new_method_call): Ensure that explicit calls of
1631 destructors have type "void".
1633 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1635 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
1636 and -Walways-true with -Waddress.
1637 * cvt.c (convert_to_void): Replace unconditional warning with
1640 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
1642 * decl.c, tree.c: Fix comment typos.
1644 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1647 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
1648 statement expression if we had an error mark node.
1650 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
1651 Brooks Moses <brooks.moses@codesourcery.com>
1652 Lee Millward <lee.millward@codesourcery.com>
1654 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
1655 Change class to tcc_vl_exp.
1657 * call.c (build_call): Use build_call_list instead
1659 (build_over_call): Likewise.
1660 (build_new_method_call): Use build_min_non_dep_call_list
1661 instead of build_min_non_dep.
1663 * error.c (dump_call_expr_args): New function.
1664 (dump_aggr_init_expr_args): New function.
1665 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
1666 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
1668 * cvt.c (convert_to_void): Use build_call_array instead
1669 of build3; use new AGGR_INIT_EXPR accessor macros.
1671 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
1672 instead of TREE_CODE_LENGTH.
1674 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
1675 AGGR_INIT_EXPR accessor macros.
1677 * cp-gimplify.c (cp_gimplify_init_expr): Use
1678 AGGR_INIT_EXPR_SLOT to set the slot operand.
1680 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
1681 (AGGR_INIT_EXPR_SLOT): New macro.
1682 (AGGR_INIT_EXPR_ARG): New macro.
1683 (aggr_init_expr_nargs): New macro.
1684 (AGGR_INIT_EXPR_ARGP): New macro.
1685 (aggr_init_expr_arg_iterator): New.
1686 (init_aggr_init_expr_arg_iterator): New.
1687 (next_aggr_init_expr_arg): New.
1688 (first_aggr_init_expr_arg): New.
1689 (more_aggr_init_expr_args_p): New.
1690 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
1691 (stabilize_aggr_init): New declaration.
1692 (build_min_non_dep_call_list): Likewise.
1694 * tree.c (process_aggr_init_operands): New function.
1695 (build_aggr_init_array) New function.
1696 (build_cplus_new): Update to use new CALL_EXPR and
1697 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
1698 build_aggr_init_array.
1699 (build_min_non_dep_call_list) New function.
1700 (build_min_nt): Assert input code parameter is not a variable
1701 length expression class.
1702 (build_min, build_min_non_dep): Likewise.
1703 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
1704 to check for equality instead of recursing. Handle tcc_vl_exp
1706 (stabilize_call): Update to only handle CALL_EXPRs, not
1707 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
1708 (stabilize_aggr_init): New function.
1709 (stabilize_init): Use it.
1711 * cxx-pretty-print.c (pp_cxx_postfix_expression)
1712 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
1713 AGGR_INIT_EXPR accessor macros and argument iterators.
1715 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
1716 build_vl_exp. Iterate through the operands, recursively
1717 processing each one.
1718 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
1719 CALL_EXPR accessor macros.
1720 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
1721 tree code classes. Use TREE_OPERAND_LENGTH instead of
1724 * semantics.c (finish_call_expr): Use build_nt_call_list
1725 instead of build_nt.
1726 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
1727 accessor macros. Use build_call_array to construct the
1728 CALL_EXPR node instead of build3
1730 * decl2.c (build_offset_ref_call_from_tree): Use
1731 build_nt_call_list and build_min_non_dep_call_list instead
1732 of build_min_nt and build_min_non_dep.
1734 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
1735 Use build_nt_call_list instead of build_min_nt.
1737 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1740 * call.c (build_conditional_expr): Improve error message.
1742 2007-02-13 Dirk Mueller <dmueller@suse.de>
1744 * friend.c (do_friend): Annotate warning about friend
1745 declarations in templates with OPT_Wnon_template_friend.
1746 Convert informal message from warning() to inform().
1748 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
1749 Mark Mitchell <mark@codesourcery.com>
1752 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
1753 instantiations for variables.
1755 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1758 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
1759 Check warn_unused_value just once.
1761 2007-02-11 Mark Mitchell <mark@codesourcery.com>
1764 * pt.c (determine_specialization): Use skip_artificial_parms_for.
1765 (fn_type_unificiation): Likewise.
1766 (get_bindings): Likewise.
1768 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
1771 * decl.c (finish_function): Use DECL_REPLACEABLE.
1772 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1774 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
1776 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
1778 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
1780 * decl.c (grokvardecl): Don't error if !have_tls.
1781 (grokdeclarator): Likewise.
1782 * parser.c (cp_parser_omp_threadprivate): Likewise.
1784 2007-02-07 Jakub Jelinek <jakub@redhat.com>
1787 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
1788 parameters and result decls in omp clauses.
1789 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
1792 2007-02-05 Dirk Mueller <dmueller@suse.de>
1795 * parser.c (cp_parser_class_specifier): Always initialize bases.
1797 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
1799 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
1800 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
1801 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
1803 * semantics.c (finish_omp_atomic): Store a whole expression node
1804 in operand 1, and integer_zero_node in operand 0, for dependent
1805 OMP_ATOMIC. Rewrite to make flow easier to understand.
1807 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1809 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
1811 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
1813 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
1814 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
1816 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
1818 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
1819 keyword warning to -Wc++0x-compat.
1821 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1823 * decl.c (grokdeclarator): Update documentation.
1825 2007-02-02 Jakub Jelinek <jakub@redhat.com>
1828 * decl.c (grokdeclarator): If __thread is used together with
1829 a storage class other than extern and static, clear thread_p
1830 after issuing diagnostics and fall through to checking the
1833 2007-01-30 Roger Sayle <roger@eyesopen.com>
1835 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
1836 calculating the size of an array (to avoid recursive errors).
1838 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1841 * typeck.c (build_binary_op): Fix logic for warning. Move warning
1843 * call.c (convert_like_real): Don't warn when converting to
1846 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1848 * decl.c (pop_label): Replace warning with call to
1849 warn_for_unused_label.
1851 2007-01-28 Andrew Pinski <pinskia@gmail.com>
1854 * semantics.c (finish_pseudo_destructor_expr): Check the
1855 destrutor name by calling check_dtor_name.
1857 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
1859 * lex.c (D_CPP0X): Rename.
1861 (reswords): D_CPP0X -> D_CXX0X.
1862 (init_reswords): Ditto.
1863 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
1864 of C++0x keywords as identifiers.
1866 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
1869 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
1872 2007-01-23 Ian Lance Taylor <iant@google.com>
1874 * typeck.c (convert_for_assignment): Only warn about a = b = c
1875 when converting to bool.
1877 2007-01-23 Roger Sayle <roger@eyesopen.com>
1879 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
1881 * typeck.c (ignore_overflows): Remove the remaining uses of
1882 TREE_CONSTANT_OVERFLOW.
1884 2007-01-20 Jan Hubicka <jh@suse.cz>
1886 * decl2.c (start_objects, start_static_storage_duration_function):
1887 Do not make the functions uninlinable.
1889 2007-01-17 Ian Lance Taylor <iant@google.com>
1891 * class.c (add_method): Call VEC_reserve_exact rather than passing
1892 a negative size to VEC_reserve.
1894 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
1897 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
1899 2007-01-10 Mark Mitchell <mark@codesourcery.com>
1902 * decl.c (make_typename_type): If the qualified name is not a
1903 type, issue an error.
1904 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
1907 2007-01-08 Geoffrey Keating <geoffk@apple.com>
1909 * rtti.c: Include target.h.
1910 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
1911 don't emit typeinfo for fundamental types as weak.
1912 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
1914 2007-01-08 Richard Guenther <rguenther@suse.de>
1916 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
1918 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
1920 * call.c (standard_conversion): Pass flag to
1921 vector_types_convertible_p to disallow emission of note.
1922 * typeck.c (convert_for_assignment): Pass flag to
1923 vector_types_convertible_p to allow emission of note.
1924 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
1925 to disallow emission of note.
1927 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1930 * typeck.c (build_binary_op): Call overflow_warning if
1931 TREE_OVERFLOW_P is true for the result and not for any of the
1934 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
1937 * class.c (add_method): Don't wait until template
1938 instantiation time to complain about duplicate methods.
1940 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1943 * semantics.c (finish_unary_op_expr): Warn only if result
1944 overflowed and operands did not.
1946 2007-01-05 Ian Lance Taylor <iant@google.com>
1948 * typeck.c (build_binary_op): Warn about comparing a non-weak
1951 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
1953 * pt.c (tsubst): Propagate the need for structural equality checks
1954 when reducing the level of template parameters.
1956 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
1958 * pt.c: Fix a comment typo.
1960 2007-01-02 Ian Lance Taylor <iant@google.com>
1962 * semantics.c (maybe_convert_cond): Optionally warn when using an
1963 assignment as a condition.
1964 * typeck.c (convert_for_assignment): Optionally warn about
1965 assigning the result of an assignment to a bool.
1967 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
1969 * pt.c (canonical_template_parms): Correct typo in comment.
1971 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
1973 * typeck.c (structural_comptypes): Renamed from "comptypes".
1974 (comptypes): Use canonical type information to perform fast type
1975 comparison. When VERIFY_CANONICAL_TYPES, verify that the
1976 canonical type comparison returns the same results as we would see
1977 from the current, structural check. Support COMPARE_STRUCTURAL
1978 when we need structural checks.
1979 * decl.c (typename_compare): Fix comment.
1980 (build_typename_type): TYPENAME_TYPE nodes require structural
1981 equality checks, because they resolve different based on the
1983 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
1984 require structural equality checks (for now).
1985 (build_ptrmemfunc_type): Build the canonical pointer to member
1987 (compute_array_index_type): Whenever we build a new index type
1988 to represent the size of an array in a template, we need to mark
1989 this index type as requiring structural equality. This goes for
1990 arrays with value-dependent sizes with the current ABI, or all
1992 * tree.c (cplus_array_hash): New.
1993 (struct cplus_array_info): New.
1994 (cplus_array_compare): New.
1995 (cplus_array_htab): New.
1996 (build_cplus_array_type_1): Use a hash table to cache the array
1997 types we build. Build the canonical array type for each array
1999 (cp_build_qualified_type_real): When building a cv-qualified array
2000 type, use the hash table of array types and build canonical array
2002 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
2003 use structural equality (for now).
2004 * cp-tree.h (COMPARE_STRUCTURAL): New.
2005 * pt.c (canonical_template_parms): New.
2006 (canonical_type_parameter): New.
2007 (process_template_parm): Find the canonical type parameter.
2008 (lookup_template_class): When we have named the primary template
2009 type, set the canonical type for our template class to the primary
2010 template type. If any of the template arguments need structural
2011 equality checks, the template class needs structural equality
2013 (tsubst): When reducing the level of a template template
2014 parameter, we require structural equality tests for the resulting
2015 parameter because its template parameters have not had their types
2016 canonicalized. When reducing a template type parameter, find the
2017 canonical reduced type parameter.
2018 (any_template_arguments_need_structural_equality_p): New.