1 2007-08-20 Richard Guenther <rguenther@suse.de>
5 * call.c (build_new_method_call): Convert initializer to
7 * init.c (build_aggr_init): Do not fiddle with types.
8 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
9 * except.c (build_throw): Do not drop qualifiers for the
11 * typeck.c (get_member_function_from_ptrfunc): Do not
12 fiddle with types, instead convert.
13 (build_ptrmemfunc1): Convert to the target type for
15 (gfc_trans_allocate): Convert result to target type.
16 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
17 pointer-to-member structures shall have alias set zero as well.
19 2007-08-20 Richard Guenther <rguenther@suse.de>
21 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
23 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
24 (nonstatic_local_decl_p): Likewise.
25 * tree.c (cp_auto_var_in_fn_p): Remove.
26 * decl.c (nonstatic_local_decl_p): Remove.
28 2007-08-20 Richard Guenther <rguenther@suse.de>
30 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
32 * tree.h (cp_walk_tree): New define to walk_tree_1 with
33 cp_walk_subtrees lh parameter.
34 (cp_walk_tree_without_duplicates): New define to
35 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
36 * tree.c (count_trees): Call
37 cp_walk_tree_without_duplicates.
38 (verify_stmt_tree): Call cp_walk_tree.
39 (break_out_target_exprs): Likewise.
40 (WALK_SUBTREE): Likewise.
41 * cp-gimplify.c (cp_genericize): Likewise.
42 * cp-pt.c (find_parameter_packs_r): Likewise.
43 (uses_parameter_packs): Likewise.
44 (make_pack_expansion): Likewise.
45 (check_for_bare_parameter_packs): Likewise.
46 (for_each_template_parm): Likewise.
47 * decl.c (check_default_argument): Call
48 cp_walk_tree_without_duplicates.
49 * except.c (build_throw): Likewise.
50 * decl2.c (type_visibility): Likewise.
51 * semantics.c (expand_or_defer_fn): Likewise.
52 (finalize_nrv): Call cp_walk_tree.
54 2007-08-20 Jakub Jelinek <jakub@redhat.com>
57 * init.c (build_new_1): Rename placement_var variable to placement_expr.
58 Initialize it with save_expr rather than get_temp_regvar.
60 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
63 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
66 2007-08-17 Ollie Wild <aaw@google.com>
69 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
70 declarations into appropriate slots for comparison. Fix type
73 2007-08-17 Paolo Carlini <pcarlini@suse.de>
76 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
77 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
79 2007-08-17 Paolo Carlini <pcarlini@suse.de>
82 * parser.c (cp_parser_class_head): Improve error message.
84 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
86 * pt.c (instantiate_decl): Set input_location
89 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
91 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
93 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
94 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
95 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
96 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
97 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
98 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
99 * typeck.c (cp_type_quals): Likewise.
100 * typeck2.c (cxx_incomplete_type_diagnostic,
101 cxx_incomplete_type_error): Likewise.
103 2007-08-16 Paolo Carlini <pcarlini@suse.de>
106 * pt.c (tsubst_friend_function): When check_classfn
107 returns error_mark_node likewise return it.
109 2007-08-15 Jakub Jelinek <jakub@redhat.com>
112 * typeck.c (check_return_expr): Don't NRV optimize vars in
114 * decl.c (finish_function): Comment fix.
116 2007-08-15 Paolo Carlini <pcarlini@suse.de>
119 * pt.c (push_template_decl_real): Depending on TYPE_P
120 use either TYPE_CONTEXT or DECL_CONTEXT.
122 2007-08-14 Mark Mitchell <mark@codesourcery.com>
124 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
125 constructors and destructors return this.
127 2007-08-14 Paolo Carlini <pcarlini@suse.de>
130 * decl2.c (check_classfn): Return error_mark_node in case of error;
131 in that case, do not call add_method.
132 * decl.c (start_decl): Deal with check_classfn returning
134 (grokfndecl): Likewise.
135 * pt.c (tsubst_friend_function): Likewise.
137 2007-08-14 Andrew Pinski <pinskia@gmail.com>
140 * typeck.c (build_binary_op): Disallow vector float types with
141 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
143 2007-08-11 Ian Lance Taylor <iant@google.com>
145 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
147 * cp/cp-tree.h (cxx_get_alias_set): Update declaration.
149 2007-08-10 Ollie Wild <aaw@google.com>
151 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
153 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
155 (unqualified_namespace_lookup): Fix ambiguous_decl call.
156 (lookup_using_namespace): Fix ambiguous_decl call.
157 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
159 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
161 * call.c (name_as_c_string): Use CONST_CAST.
162 * decl.c (build_decl): Likewise.
163 * parser.c (cp_parser_string_literal): Likewise.
165 2007-08-10 Paolo Carlini <pcarlini@suse.de>
168 * error.c (dump_expr): Consistently use the *_cxx_*
169 variants of the pretty-print functions.
171 2007-08-10 Paolo Carlini <pcarlini@suse.de>
174 * decl.c (check_special_function_return_type): Just error
175 on return type specified for conversion operator.
177 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
179 * typeck2.c (readonly_error): Handle general expressions.
180 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
182 2007-08-06 Dan Hipschman <dsh@google.com>
184 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
185 access function name.
187 2007-08-04 Alfred Minarik <a.minarik@aon.at>
190 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
191 * g++spec.c (lang_specific_driver): Check them.
193 2007-08-06 Paolo Carlini <pcarlini@suse.de>
196 * pt.c (template_class_depth): Fix comment; change return type
199 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
202 2007-03-26 Dirk Mueller <dmueller@suse.de>
204 * parser.c (cp_parser_member_declaration): Pedwarn
205 about stray semicolons after member declarations.
207 2007-08-02 Lee Millward <lee.millward@gmail.com>
212 * parser.c (cp_parser_asm_definition): Detect and discard asm
213 statements with invalid inputs or outputs.
214 (cp_parser_asm_operand_list): Return error mark node if any
215 of the operands are invalid. Adjust documentation.
217 2007-08-02 Nick Clifton <nickc@redhat.com>
219 * typeck.c: Change copyright header to refer to version 3 of the
220 GNU General Public License and to point readers at the COPYING3
221 file and the FSF's license web page.
222 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
223 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
224 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
225 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
226 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
227 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
228 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
229 name-lookup.h, parser.c: Likewise.
231 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
234 * call.c (magic_varargs_p): Honor the "type generic" attribute.
236 2007-07-30 Paolo Carlini <pcarlini@suse.de>
239 * semantics.c (finish_label_stmt): Reject the __label__
240 extension outside function scopes.
242 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
244 * parser.c (eof_token): Un-constify.
245 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
246 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
249 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
251 * pt.c, tree.c, typeck2.c: Fix comment typos.
253 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
254 Mark Mitchell <mark@codesourcery.com>
257 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
258 hidden due to friend declarations in local classes.
260 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
262 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
263 * cp-tree.def (DECLTYPE_TYPE): New.
264 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
265 (dump_type_prefix): Ditto.
266 (dump_type_suffix): Ditto.
267 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
268 * mangle.c (write_type): Handle DECLTYPE_TYPE.
269 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
271 (DECLTYPE_TYPE_EXPR): New.
272 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
273 (finish_declared_type): Declare.
274 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
276 (pp_cxx_type_id): Ditto.
277 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
278 (tsubst): Substitute into a DECLTYPE_TYPE node.
279 (tsubst_copy): Ditto.
280 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
282 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
283 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
284 structural equality (because we can't hash the expressions).
285 (finish_declared_type): New.
286 * lex.c (reswords): Add "decltype" keyword.
287 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
288 (cp_parser_postfix_expression): Add member_access_only_p to
289 restrict postfix expression to member access expressions.
290 (cp_parser_unary_expression): Update call to
291 cp_parser_postfix_expression to reflect new parameter.
292 (cp_parser_declared_type): New.
293 (cp_parser_simple_type_specifier): Parse decltype types.
295 2007-07-27 Mark Mitchell <mark@codesourcery.com>
298 * call.c (convert_for_arg_passing): Only widen bitfields to their
299 declared types if necessary.
301 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
303 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
306 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
308 * decl.c (typename_hash, typename_compare): Constify.
309 * mangle.c (hash_type, compare_type): Likewise.
310 * pt.c (eq_local_specializations, hash_local_specialization):
312 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
313 list_hash): Likewise.
314 * typeck2.c (pat_compare): Likewise.
316 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
318 * method.c (implicitly_declare_fn): Increase alignment if member
319 function pointer format requires it.
321 2007-07-24 Paolo Carlini <pcarlini@suse.de>
324 * typeck.c (check_return_expr): Do not pass a null argument
327 2007-07-24 Paolo Carlini <pcarlini@suse.de>
330 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
333 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
336 * typeck.c (convert_arguments): Only use default args if we have
340 * typeck.c (structural_comptypes): No need to check
341 resolve_typename_type return value here.
342 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
343 * pt.c (resolve_typename_type): Follow typename typedefs. Return
344 original type rather than error_mark_node in case of failure.
345 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
346 resolve_typename_type result check.
347 (cp_parser_direct_declarator, cp_parser_head,
348 cp_parser_constructor_declarator_p): Likewise.
350 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
352 * pt.c (template_parms_variadic_p): Remove.
353 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
355 2007-07-12 Jakub Jelinek <jakub@redhat.com>
358 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
359 argument to dump_aggr_init_expr_args instead of false.
361 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
363 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
364 canonical types; otherwise, fall back to structural type
365 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
366 internal compiler error if the canonical types are wrong.
368 2007-07-11 Paolo Carlini <pcarlini@suse.de>
371 * parser.c (cp_parser_make_indirect_declarator): When the
372 the code argument is ERROR_MARK return cp_error_declarator.
374 2007-07-09 Geoffrey Keating <geoffk@apple.com>
377 * decl.c (cxx_init_decl_processing): Don't set
378 force_align_functions_log.
379 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
380 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
381 FUNCTION_DECL, return its alignment.
383 2007-07-09 Richard Guenther <rguenther@suse.de>
385 * decl.c (start_preparsed_function): Do not promote return type.
387 2007-07-08 Paolo Carlini <pcarlini@suse.de>
390 * pt.c (unify): Never pass error_mark_node to template_decl_level.
392 2007-07-07 Mark Mitchell <mark@codesourcery.com>
395 * pt.c (resolve_overloaded_unification): Robustify. Return a
397 (type_unification_real): Adjust accordingly.
399 2007-07-06 Richard Guenther <rguenther@suse.de>
401 * init.c (build_new_1): Use the correct pointer type.
402 * typeck2.c (build_m_component_ref): Likewise.
404 2007-07-05 Mark Mitchell <mark@codesourcery.com>
407 * init.c (build_zero_init): Always build an initializer for
409 * typeck2.c (build_functional_cast): Use build_zero_init.
412 * init.c (build_new_1): Always pass the allocation function to
413 build_op_delete_call.
414 * call.c (build_op_delete_call): Handle operator delete with a
415 variable-argument list. Do not issue an error when no matching
416 deallocation function is available for a new operator.
419 * cp-tree.h (any_value_dependent_elements_p): Declare it.
420 * decl.c (value_dependent_init_p): New function.
421 (cp_finish_decl): Use it.
422 * pt.c (value_dependent_expression_p): Use
423 any_value_dependent_elements_p.
424 * parser.c (cp_parser_primary_expression): Add comment about
425 treating dependent qualified names as integral
426 constant-expressions.
428 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
430 * decl.c (build_ptrmemfunc_type): Always use structural equality
431 tests when comparing pointer-to-member-function types, because the
432 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
435 2007-07-03 Mark Mitchell <mark@codesourcery.com>
437 * init.c (build_new): Tweak comment.
439 2007-06-29 Dave Brolley <brolley@redhat.com>
442 * parser.c (cp_parser_new_type_id): Don't reduce a named array
443 type to its base type and number of elements here.
444 * init.c (build_new): Call complete_type_or_else to ensure that the
445 type is complete and to issue a diagnostic if it is not.
446 (build_new_1): Don't call complete_type_or_else here.
448 2007-07-03 Richard Guenther <rguenther@suse.de>
451 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
454 2007-07-02 Simon Baldwin <simonb@google.com>
456 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
457 for inner-style nested forward declarations that don't declare
460 2007-07-02 Jakub Jelinek <jakub@redhat.com>
463 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
464 DECL_P in not a variable and appears more than once error messages.
466 2007-07-01 Ollie Wild <aaw@google.com>
468 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
469 (select_decl): Remove function.
470 (unqualified_namespace_lookup): Populate binding by calling
471 ambiguous_decl. Remove select_decl call.
472 (lookup_qualified_name): Remove select_decl call.
473 * decl.c (lookup_and_check_tag): Check for ambiguous references.
474 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
475 generation when name lookup is ambiguous.
477 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
480 * init.c (build_new_1): Use structural equality on the copy of the
483 2007-06-28 Geoffrey Keating <geoffk@apple.com>
485 * decl2.c (determine_visibility): Implement
486 flag_visibility_ms_compat effect on type info.
487 * decl.c (cxx_init_decl_processing): Implement
488 global effect of flag_visibility_ms_compat.
490 2007-06-28 Geoffrey Keating <geoffk@apple.com>
492 * decl2.c (start_objects): Mark constructor-running function
495 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
498 * decl.c (grokdeclarator): Reset friendp for member functions declared
499 friend of their own class.
501 2007-06-23 Mark Mitchell <mark@codesourcery.com>
503 * decl2.c (determine_visibility): Don't look for dllexport here.
504 (determine_visibility_from_class): Tidy.
506 2007-06-18 Simon Baldwin <simonb@google.com>
509 * parser.c (cp_parser_single_declaration): Added check for storage
510 class other than sc_none in parsed declaration, and a flag to indicate
511 if the call is part of an explicit template specialization parse.
512 * (cp_parser_explicit_specialization): Specialization check flag added
513 to call to cp_parser_single_declaration(), set true.
514 * (cp_parser_template_declaration_after_export): Specialization check
515 flag added to call to cp_parser_single_declaration(), set false.
516 * pt.c (check_explicit_specialization): Added code to copy visiblity
517 and linkage from the templated function to the explicit specialization.
519 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
521 * typeck.c (build_binary_op): For templates build the
522 expression in pieces to avoid the assert in build2_stat.
523 (get_member_function_from_ptrfunc):
524 Change over to using POINTER_PLUS_EXPR and convert
525 the second operand to sizetype.
526 * typeck2.c (build_m_component_ref): Likewise.
527 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
528 instead of PLUS_EXPR for pointers.
529 (build_new_1): Likewise.
530 (build_vec_delete_1): Likewise.
531 (build_vec_delete): Likewise.
532 * class.c (build_base_path): Likewise.
533 (build_base_path): Likewise.
534 (convert_to_base_statically): Likewise.
535 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
536 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
537 instead of PLUS_EXPR.
538 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
539 instead of PLUS_EXPR for pointers.
540 * call.c (build_special_member_call): Likewise.
541 * rtti.c (build_headof): Likewise.
542 Use sizetype instead of ptrdiff_type_node.
543 (tinfo_base_init): Create a POINTER_PLUS_EXPR
544 instead of PLUS_EXPR for pointers.
545 * except.c (expand_start_catch_block): Do a
546 NEGATIVE and then a POINTER_PLUS_EXPR instead
548 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
549 PLUS_EXPR on pointer types over to use
550 POINTER_PLUS_EXPR and remove the conversion
551 to the pointer types.
552 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
553 adding to a pointer type. Use size_int instead of
554 ssize_int. Convert the index to sizetype before
555 adding it to the pointer.
557 2007-06-15 Mark Mitchell <mark@codesourcery.com>
559 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
560 (DECL_ANON_UNION_VAR_P): New macro.
561 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
562 than DECL_VAR_MARKED_P, to keep track of which variables we have
564 * decl.c (redeclaration_error_message): Complain about redeclaring
565 anonymous union members at namespace scope.
566 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
568 2007-06-14 Geoff Keating <geoffk@apple.com>
570 * decl2.c (determine_visibility): Ensure that functions with
571 hidden types as parameters are hidden.
574 * decl2.c (determine_visibility): Remove duplicate code for
577 2007-06-12 Ian Lance Taylor <iant@google.com>
580 * init.c (avoid_placement_new_aliasing): New static function.
581 (build_new_1): Call it.
583 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
585 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
586 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
588 2007-06-08 Jakub Jelinek <jakub@redhat.com>
591 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
592 on init, the non-decl cond operand and increment value.
594 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
597 * decl.c (check_initializer): Report an error when a brace enclosed
598 initializer is used for a non-aggregate type in C++98.
599 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
601 (grokdeclarator): Likewise.
602 (move_fn_p): Likewise.
603 * typeck.c (check_return_expr): Likewise.
604 * call.c (reference_binding): Likewise.
605 * error.c (cp_cpp_error): Likewise.
606 * pt.c (check_default_tmpl_args): Likewise.
608 * lex.c (init_reswords): Likewise.
609 * parser.c (p_parser_primary_expression): Likewise.
610 (TOKEN_PRECEDENCE): Likewise.
611 (cp_parser_init_declarator): Likewise.
612 (cp_parser_ptr_operator): Likewise.
613 (cp_parser_parameter_declaration): Likewise.
614 (cp_parser_enclosed_template_argument_list): Likewise.
615 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
616 (cp_parser_next_token_ends_template_argument_p): Likewise.
618 2007-06-04 Simon Baldwin <simonb@google.com>
620 * decl.c (grokdeclarator): Readability change. Moved case labels
621 into direct switch statement scope.
623 2007-06-04 Paolo Carlini <pcarlini@suse.de>
625 * call.c (convert_like_real): Remove pointless code.
627 2007-05-31 Mark Mitchell <mark@codesourcery.com>
629 * decl.c (get_atexit_fn_ptr_type): New function.
630 (get_atexit_node): Use it.
631 (start_cleanup_fn): Likewise.
632 (register_dtor_fn): Use the object's destructor, instead of a
633 separate cleanup function, where possible.
634 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
635 (atexit_fn_ptr_type_node): New macro.
636 * decl2.c (build_cleanup): Use build_address.
638 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
640 * typeck.c (build_binary_op): Include types in error.
642 2007-05-31 Jakub Jelinek <jakub@redhat.com>
645 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
646 needs runtime initialization.
648 2007-05-31 Paolo Carlini <pcarlini@suse.de>
651 * semantics.c (finish_trait_expr): Complete the types.
653 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
654 Douglas Gregor <doug.gregor@gmail.com>
655 Pedro Lamarao <pedro.lamarao@mndfck.org>
656 Howard Hinnant <howard.hinnant@gmail.com>
660 * typeck.c (comptypes): Don't consider rvalue and lvalue
661 reference types to be equivalent.
662 (check_return_expr): Move from certain lvalues when returning
664 * decl.c (grokdeclarator): Implement reference collapsing.
665 (copy_fn_p): Don't consider constructors taking rvalue references
666 to be copy constructors.
668 * call.c (conversion): New "rvaluedness_matches_p" member.
669 (convert_class_to_reference): Require reference type as first
670 parameter instead of base type.
671 (reference_binding): Add logic to handle rvalue references.
672 (implicit_conversion): Update inaccurate comment.
673 (convert_like_real): Disable creation of temporaries that are
674 impossible to initialize for types with move constructors.
675 (build_over_call): Elide move constructors when possible.
676 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
677 (maybe_handle_ref_bind): Return conversion instead of type node.
678 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
679 determine preferred conversion sequences.
680 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
681 (LOOKUP_PREFER_RVALUE): New.
682 (DECL_MOVE_CONSTRUCTOR_P): New.
683 (struct cp_declarator): Add "reference" member for reference
684 types, with new "rvalue_ref" flag.
685 (cp_build_reference_type): Declare.
686 (move_fn_p): Declare.
687 * error.c (dump_type_prefix): Format rvalue reference types
688 correctly in error messages.
689 * except.c (build_throw): Move from certain lvalues when
691 * mangle.c (write_type): Mangle rvalue references differently
692 than regular references.
693 * parser.c (make_reference_declarator): Add boolean parameter for
695 (cp_parser_make_indirect_declarator): New.
696 (cp_parser_new_declarator_opt): Call
697 cp_parser_make_indirect_declarator.
698 (cp_parser_conversion_declarator_opt): Ditto.
699 (cp_parser_declarator): Ditto.
700 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
702 * pt.c (tsubst): Implement reference collapsing.
703 (maybe_adjust_types_for_deduction): Implement special template
704 parameter deduction rule for rvalue references.
705 (type_unification_real): Update calls to
706 maybe_adjust_types_for_deduction.
707 (try_one_overload): Ditto.
708 (unify_pack_expansion): Ditto.
709 * tree.c (lvalue_p_1): Handle rvalue reference types.
710 (cp_build_reference_type): New.
712 2007-05-30 Jakub Jelinek <jakub@redhat.com>
715 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
716 variables that need runtime initialization.
718 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
721 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
722 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
723 case POSTDECREMENT_EXPR>): Return the error_mark_node
724 if either the real or imaginary parts would an
727 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
728 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
731 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
732 token is a closing brace, false if there are no tokens left.
733 (cp_parser_namespace_alias_definition): Only consume the next token if
734 it is a closing brace.
736 * parser.c (cp_parser_class_specifier): Likewise.
738 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
740 * semantics.c (finish_member_declaration): Fix a typo in the
743 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
755 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
756 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
757 * pt.c (check_for_bare_parameter_packs): Return bool indicated
758 whether everything was okay. Fix indentation.
759 (push_template_decl_real): Check for bare parameter packs in
760 function parameters; where errors occur, mark the parameter types
761 with ERROR_MARK_NODEs to avert ICEs.
762 (coerce_template_parameter_pack): New.
763 (coerce_template_parms): Moved parameter pack coercion into
764 coerce_template_parameter_pack, and permit it anywhere in the
765 template parameter list (not just at the end). Parameter and
766 argument indices can vary (somewhat) separately now, so add
767 PARM_IDX and ARG_IDX.
768 (fn_type_unification): Don't set an argument pack as incomplete if
769 no argument pack was deduced.
770 (type_unification_real): If a type parameter is a parameter pack
771 and has not otherwise been deduced, it will be deduced to an empty
773 (more_specialized_fn): Use the actual lengths of the argument
774 lists when comparing against expansions.
775 * semantics.c (finish_member_declaration): If a field's type has
776 bare parameter packs, error and set its type to ERROR_MARK_NODE.
778 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
781 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
783 2007-05-22 Ollie Wild <aaw@google.com>
785 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
786 (unqualified_namespace_lookup): Adds check for hidden types.
788 2007-05-22 Ollie Wild <aaw@google.com>
790 * decl.c (duplicate_decls): Verify namespace names are unique.
792 2007-05-21 Mark Mitchell <mark@codesourcery.com>
794 * decl.c (cxx_maybe_build_cleanup): Handle
795 __attribute__((cleanup)).
797 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
799 * cvt.c (cp_convert_and_check): Don't check warnings if the
802 2007-05-18 Geoffrey Keating <geoffk@apple.com>
804 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
806 2007-05-14 Paolo Carlini <pcarlini@suse.de>
809 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
810 type only if is a class type (5.2.8/4).
812 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
814 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
815 * decl.c (grokdeclarator): Use unsigned_type_for instead of
816 c_common_unsigned_type.
818 2007-05-11 Silvius Rus <rus@google.com>
820 * cp/typeck.c (build_indirect_ref): Add call to
821 strict_aliasing_warning.
822 (build_reinterpret_cast_1): Condition call to
823 strict_aliasing_warning.
825 2007-05-11 Jan Hubicka <jh@suse.cz>
827 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
828 * decl2.c (start_objects): ctors and dtors are no longer public.
829 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
831 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
833 * typeck.c (build_unary_op): Remove code that used to
834 handle non lvalue increments/decrements.
836 2007-05-07 Mike Stump <mrs@apple.com>
838 * parser.c (check_empty_body): Add.
839 (cp_parser_iteration_statement): Add call to check_empty_body.
841 2007-05-05 Geoffrey Keating <geoffk@apple.com>
844 * mangle.c (write_mangled_name): Mangle static variable names.
845 (write_unqualified_name): Use local-source-name for
846 namespace-scope static variables.
848 2007-05-04 Dirk Mueller <dmueller@suse.de>
850 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
853 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
856 * decl2.c (constrain_class_visibility):
857 Use strip_pointer_or_array_types instead of strip_array_types.
859 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
862 * decl.c (reshape_init_r): Don't reshape the first element if it
863 is a pointer to member function.
865 2007-04-27 Simon Baldwin <simonb@google.com>
867 * decl.c (grokparms): Changed message format from %qD to %qE.
869 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
871 * error.c (maybe_warn_variadic_templates): Variadic templates are
872 now in C++0x, so only warn about them in C++98 mode.
874 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
877 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
878 integeral types from vectors types.
880 2007-04-26 Jakub Jelinek <jakub@redhat.com>
883 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
884 for type dependent OMP_CLAUSE_DECLs.
886 2007-04-24 Mark Mitchell <mark@codesourcery.com>
889 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
890 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
891 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
892 * init.c (build_zero_init): Adjust, as
893 COMPLEX_TYPE is now a SCALAR_TYPE.
894 * typeck2.c (digest_init): Allow brace-enclosed initializers for
895 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
897 2007-04-25 Paolo Carlini <pcarlini@suse.de>
899 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
900 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
901 (trait_expr_value): Adjust.
903 2007-04-23 Simon Baldwin <simonb@google.com>
905 * decl.c (grokparms): Added new error for duplicate function
906 parameters names in function prototypes, to match gcc behavior.
908 2007-04-23 Jan Hubicka <jh@suse.cz>
910 * cp/decl2.c (finish_objects): Do not call target constructor/destructor
913 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
915 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
916 instead of checking GIMPLE_STMT_P in chain_next.
918 2007-04-17 Mark Mitchell <mark@codesourcery.com>
921 * call.c (convert_for_arg_passing): Convert bitfields to their
924 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
927 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
929 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
933 * cp/decl2.c (constrain_class_visibility):
934 Do not warn about the use of anonymous namespace in the main input file.
936 2007-04-15 Mark Mitchell <mark@codesourcery.com>
938 * cp-tree.h (current_template_parms): Fix typo in comment.
940 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
942 * cp-tree.h, error.c: Fix comment typos.
944 2007-04-13 Jason Merrill <jason@redhat.com>
947 * call.c (reference_binding): Add c_cast_p parm. If true,
948 add quals to TO as needed to make it reference-compatible.
950 2007-04-11 Jan Hubicka <jh@suse.cz>
952 * cp/class.c (convert_to_base_statically): Fold produced tree; verify
953 that we are not processing template_decl.
955 2007-04-09 Mark Mitchell <mark@codesourcery.com>
958 * class.c (build_base_path): Ensure that the converted pointer has
959 the same cv-qualification as the input.
961 2007-04-09 Paolo Carlini <pcarlini@suse.de>
963 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
965 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
967 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
969 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
970 * tree.c (cp_add_pending_fn_decls): Remove.
971 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
973 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
975 Revert change removing staticp.
977 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
979 * cp-objcp-common.c (cxx_staticp): Remove.
980 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
981 * cp-tree.h (cxx_staticp):
983 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
985 * class.c (check_for_override): Don't remove dllmport attribute
988 2007-04-03 Jakub Jelinek <jakub@redhat.com>
991 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
992 type issue error and return early.
994 2007-03-30 Jason Merrill <jason@redhat.com>
997 * typeck.c (cp_type_readonly): New fn.
998 * cp-tree.h: Declare it.
999 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
1000 (cp_finish_decl): Not here.
1002 2007-03-31 Richard Guenther <rguenther@suse.de>
1004 * optimize.c (maybe_clone_body): Replace splay-tree usage by
1007 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
1012 * parser.c (declarator_can_be_parameter_pack): New.
1013 (cp_parser_template_parameter): Only parse the `...' if the
1014 declarator can be a parameter pack.
1015 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
1017 * pt.c (find_parameter_packs_r): Look into the bounds on integer
1018 types (they could be used as array bounds).
1019 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
1020 (tsubst_pack_expansion): Handle failure to expand parameter
1023 2007-03-30 Paolo Carlini <pcarlini@suse.de>
1026 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
1027 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
1028 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
1029 (CLASS_TYPE_NON_UNION_P): Add.
1030 (struct lang_type_class): Add has_complex_dflt.
1031 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
1032 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
1033 * cp-tree.def: Add TRAIT_EXPR.
1034 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
1035 * lex.c (struct resword): Add __has_nothrow_assign,
1036 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
1037 __has_trivial_constructor, __has_trivial_copy,
1038 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
1039 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
1040 __is_pod, __is_polymorphic, __is_union.
1041 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
1042 (cp_parser_trait_expr): New.
1043 * semantics.c (finish_trait_expr, trait_expr_value
1044 classtype_has_nothrow_copy_or_assign_p): New.
1045 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
1047 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
1048 * class.c (check_bases, check_field_decl, check_bases_and_members):
1049 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
1050 * pt.c (uses_template_parms, tsubst_copy_and_build,
1051 value_dependent_expression_p, type_dependent_expression_p): Deal with
1053 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
1055 2007-03-29 Richard Guenther <rguenther@suse.de>
1057 * tree.c (cp_walk_subtrees): Do not set input_location.
1059 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
1062 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
1065 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1067 * parser.c (struct cp_parser): Update comment for
1068 greater_than_is_operator_p.
1069 (cp_parser_primary_expression): In C++0x mode, a cast operator can
1070 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
1071 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
1072 !GREATER_THAN_IS_OPERATOR_P.
1073 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
1074 `>>' operators that will become two `>' tokens in C++0x.
1075 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
1076 mode, allowing it to terminate default arguments.
1077 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
1078 `>>' like two consecutive `>' tokens.
1079 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
1080 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
1081 ends a template argument.
1083 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1085 * decl.c (redeclaration_error_message): Complain when redeclaring
1086 a friend function with default template arguments (C++0x mode only).
1087 * cp-tree.h (check_default_tmpl_args): Declare.
1088 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
1089 template arguments in function templates. Add support for checking
1090 the default template arguments of friend templates.
1091 (push_template_decl_real): Fix call to check_default_tmpl_args.
1092 (type_unification_real): If a template parameter has not been
1093 deduced but provides a default template argument, substitute into
1094 that default template argument.
1095 * parser.c (cp_parser_init_declarator): When declaring (but not
1096 defining!) a function template in C++0x mode, check for default
1099 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1102 * decl.c (grokdeclarator): Deal with cv-qualified function type
1103 typedefs in the same way for member and non-member functions.
1105 2007-03-26 Dirk Mueller <dmueller@suse.de>
1107 * parser.c (cp_parser_member_declaration): Pedwarn
1108 about stray semicolons after member declarations.
1110 2007-03-26 Paolo Carlini <pcarlini@suse.de>
1113 * pt.c (instantiate_decl): Set in_system_header.
1115 2007-03-22 Mark Mitchell <mark@codesourcery.com>
1117 * cp-tree.h (current_tempalte_parms): Improve documentation.
1118 * pt.c (current_template_args): Likewise.
1121 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
1122 not consume tokens when failing.
1124 2007-03-22 Jim Wilson <wilson@specifix.com>
1125 Mark Mitchell <mark@codesourcery.com>
1128 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
1129 consistent with FROM.
1131 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1133 * error.c (dump_expr): Handle dependent names that designate types.
1134 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
1136 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
1138 * cp-tree.def, parser.c, pt.c: Fix comment typos.
1140 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1142 * cvt.c (cp_convert_and_check) : Define.
1143 * cp-tree.h (cp_convert_and_check): Declare.
1144 * call.c (convert_conversion_warnings): Rename to
1145 conversion_null_warnings. The warning for floating-point to
1146 integer is handled by convert_and_check in convert_like_real.
1147 (convert_like_real): convert_conversion_warnings was renamed as
1148 conversion_null_warnings.
1149 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
1150 overflow and changes of value during conversion.
1152 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1155 * parser.c (cp_parser_statement): If 'namespace' is found, this
1156 only can be a namespace alias definition, so parse it now.
1157 (cp_parser_namespace_alias_definition): if we find an open brace
1158 instead of '=', then this is actually a misplaced namespace
1161 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1164 * decl.c (cxx_init_decl_processing): Move command-line options
1165 processing to c-opts.c.
1167 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
1169 * ptree.c (cxx_print_type): Use formatting markup for integers
1170 when printing template parameter index/level/orig level.
1171 (cxx_print_xnode): Ditto.
1172 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
1173 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
1174 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
1176 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
1177 rather than a HOST_WIDE_INT.
1178 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
1179 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
1181 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
1182 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
1183 IN_BASE_INITIALIZER bool bitfields.
1184 (struct cp_declarator): Make KIND a 4-bit field. Make
1185 PARAMETER_PACK_P a bool bitfield just after KIND.
1186 * pt.c (uses_parameter_packs): Destroy the pointer set.
1187 (make_pack_expansion): Ditto.
1188 (check_for_bare_parameter_packs): Ditto.
1189 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
1191 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
1194 * call.c (convert_default_arg): Instead of copying the node,
1197 2007-03-15 Dirk Mueller <dmueller@suse.de>
1200 * call.c (convert_conversion_warnings): New..
1201 (convert_like_real): .. factored out from here.
1202 (convert_conversion_warnings): Add warning about
1203 false being converted to NULL in argument passing.
1205 2007-03-14 Dirk Mueller <dmueller@suse.de>
1207 * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
1208 (finish_do_body): Warn about empty body in do/while statement.
1210 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1212 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
1214 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1217 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
1220 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
1222 * cp/repo.c (init_repo): Initialize random_seed saved options.
1223 (finish_repo): Adjust.
1225 2007-03-13 Mark Mitchell <mark@codesourcery.com>
1228 * Make-lang.in (doc/g++.1): Use $< to specify the location from
1231 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
1233 * decl.c (compute_array_index_type): New warning flag warn_vla.
1235 2007-03-12 Mark Mitchell <mark@codesourcery.com>
1238 * call.c (convert_default_arg): Copy non-constant arguments.
1240 2007-03-11 Mark Mitchell <mark@codesourcery.com>
1243 * parser.c (cp_parser_postfix_expression): Disallow compound
1244 literals in constant expressions.
1247 * semantics.c (finish_typeof): Use unlowered_expr_type.
1249 2007-03-10 Mark Mitchell <mark@codesourcery.com>
1252 * cp-tree.h (unlowered_expr_type): New function.
1253 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
1254 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
1255 (unlowered_expr_type): New function.
1256 (build_unary_op): Disallow predecrements of bool bitfields.
1257 * call.c (build_conditional_expr): Use unlowered_expr_type.
1258 * pt.c (type_unification_real): Likewise.
1260 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
1263 * typeck.c (check_return_expr): Check for bare parameter packs.
1264 (comptypes): Compare template parameter packs and
1265 type pack expansions.
1266 * decl.c (grokdeclarator): Deal with the declaration of function
1268 (grokparms): Verify that the (optional) function parameter pack is
1269 at the end of the parameter list.
1270 (xref_basetypes): Handle pack expansions in the base class.
1271 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
1272 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
1273 (NONTYPE_ARGUMENT_PACK): New.
1274 (TYPE_PACK_EXPANSION): New.
1275 (EXPR_PACK_EXPANSION): New.
1276 (ARGUMENT_PACK_SELECT): New.
1277 * cp-objcp-common.c (cp_tree_size): Compute size of
1278 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
1279 ARGUMENT_PACK_SELECT.
1280 * error.c (dump_template_argument): Print template argument packs.
1281 (dump_template_argument_list): Ditto.
1282 (dump_template_parameter): Dump `...' for template type parameter
1284 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
1285 (dump_parameters): Print function parameter packs.
1286 (dump_template_parms): Print template argument packs.
1287 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
1288 (maybe_warn_variadic_templates): New.
1289 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
1290 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1291 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1293 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
1294 (write_template_arg): Write argument packs as separate arguments.
1295 * cp-tree.h (struct template_parm_index_s): Add flag that
1296 indicates that the template parameter is actually a parameter
1298 (struct tree_argument_pack_select): New.
1299 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
1300 (union lang_tree_node): Add argument_pack_select.
1301 (FUNCTION_PARAMETER_PACK_P): New.
1302 (PACK_EXPANSION_P): New.
1303 (PACK_EXPANSION_PATTERN): New.
1304 (SET_PACK_EXPANSION_PATTERN): New.
1305 (PACK_EXPANSION_PARAMETER_PACKS): New.
1306 (ARGUMENT_PACK_P): New.
1307 (ARGUMENT_PACK_ARGS): New.
1308 (SET_ARGUMENT_PACK_ARGS): New.
1309 (ARGUMENT_PACK_INCOMPLETE_P): New.
1310 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
1311 (TEMPLATE_PARM_PARAMETER_PACK): New.
1312 (TEMPLATE_TYPE_PARAMETER_PACK): New.
1313 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
1314 (ARGUMENT_PACK_SELECT_INDEX): New.
1315 (ARGUMENT_PACK_SELECT_ARG): New.
1316 (struct cp_declarator): Add parameter_pack_p flag.
1317 (maybe_warn_variadic_templates): Declare.
1318 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
1319 indicate a template parameter pack.
1320 (uses_parameter_packs): Declare.
1321 (template_parameter_pack_p): Declare.
1322 (template_parms_variadic_p): Declare.
1323 (make_pack_expansion): Declare.
1324 (check_for_bare_parameter_packs): Declare.
1325 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
1326 sizeof... expressions.
1327 (pp_cxx_expression): Print pack expansions and non-type argument
1329 (pp_cxx_exception_specification): Print pack expansions.
1330 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
1331 (pp_cxx_ctor_initializer): Print pack expansions.
1332 (pp_cxx_type_id): Print pack expansions.
1333 (pp_cxx_template_argument_list): Print argument packs.
1334 (pp_cxx_template_parameter): Print ellipsis for template parameter
1336 * pt.c (comp_template_parms): Compare template parameter packs.
1337 (template_parameter_pack_p): New.
1338 (template_parms_variadic_p): New.
1339 (template_args_variadic_p): New.
1340 (make_ith_pack_parameter_name): New.
1341 (struct find_parameter_pack_data): New.
1342 (find_parameter_packs_r): New.
1343 (uses_parameter_packs): New.
1344 (make_pack_expansion): New.
1345 (check_for_bare_parameter_packs): New.
1346 (expand_template_argument_pack): New.
1347 (reduce_template_parm_level): Propagate parameter pack flag.
1348 (process_template_parm): Add is_parameter_pack parameter to state
1349 when the parameter is actually a parameter pack. Create template
1350 parameter packs when is_parameter_pack is true.
1351 (current_template_args): The argument for a template parameter
1352 pack is an argument pack containing a single pack expansion.
1353 (process_partial_specialization): When checking that non-type
1354 argument expressions do not involve template parameters, loop over
1355 the arguments in argument packs separately.
1356 (push_template_decl_real): Check that the type of the declaration
1357 does not have any bare parameter packs. Check that primary
1358 templates have no more than one parameter pack, and that it comes
1359 at the end of the template parameter list.
1360 (convert_template_argument): Handle coercions for pack expansion
1361 expressions by coercing the pattern then rebuilding the expansion.
1362 (coerce_template_parms): When coercing the arguments for a
1363 variadic template, pack "extra" arguments into an argument pack.
1364 (coerce_template_template_parms): Cannot coerce between parameter
1365 packs and non-pack parameters.
1366 (template_args_equal): Compare PACK_EXPANSION_P expressions.
1367 (comp_template_args): Expand all template arguments packs before
1368 comparing template argument lists.
1369 (mangle_class_name_for_template): Make argument packs as separate
1371 (for_each_template_parm_r): No need to handle BASELINK.
1372 (instantiate_class_template): Handle pack expansions in the base
1374 (tsubst_pack_expansion): New.
1375 (tsubst_template_args): Handle substitutions of argument packs and
1376 pack expansion into template argument lists.
1377 (tsubst_decl): Expand function parameter packs into separate
1378 function parameters.
1379 (tsubst_arg_types): Expand a type pack expansion into separate
1381 (tsubst_exception_specification): Handle pack expansions in
1382 exception specifiers.
1383 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
1384 replacing a template parameter with its argument. If we encounter
1385 a substitution for an argument pack, just return the parameter
1387 (tsubst_copy): sizeof(X...) returns the number of elements in
1388 parameter pack X. See through ARGUMENT_PACK_SELECT when the
1389 PARM_DECL is a parameter pack.
1390 (tsubst_expr): Expression pack expansions and argument packs
1391 cannot show up here; they will all be handled through function
1392 calls, sizeof, and template argument lists.
1393 (tsubst_copy_and_build): sizeof(X...) returns the number of
1394 elements in parameter pack X. Handle pack expansions in TREE_LIST
1395 and CONSTRUCTOR nodes.
1396 (fn_type_unification): Handle "incomplete" explicit template
1397 argument lists that specify some of the arguments for a template
1399 (type_unification_real): Unify arguments against pack expansions.
1400 (template_parm_level_and_index): New, helper function.
1401 (unify_pack_expansion): New.
1402 (unify): Unify argument packs on an argument-by-argument basis,
1403 handling variadic argument packs as well.
1404 (more_specialized_fn): Handle unification of function parameter
1405 packs. All things being equal, prefer non-variadic function
1406 templates to variadic function templates.
1407 (more_specialized_class): Prefer the variadic class template
1408 partial specialization that binds fewer arguments to a parameter
1410 (regenerate_decl_from_template): Expand function parameter packs
1411 into separate parameters.
1412 (instantiate_decl): Ditto.
1413 (tsubst_initializer_list): Handle pack expansions for base-class
1415 (dependent_type_p_r): Determine dependent types in argument packs
1416 and pack expansions.
1417 (value_dependent_expression_p): Determine value-dependence of
1418 non-type argument packs.
1419 (dependent_template_arg_p): Handle argument packs.
1420 * semantics.c (finish_cond): Check for bare parameter packs.
1421 (finish_expr_stmt): Ditto.
1422 (finish_for_expr): Ditto.
1423 (finish_switch_cond): Ditto.
1424 (finish_mem_initializers): Ditto.
1425 * name-lookup.c (arg_assoc_type): Handle pack expansions and
1427 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
1428 * parser.c (make_declarator): Declarator is not an expansion.
1429 (make_pointer_declarator): Transfer parameter pack flag to outer
1431 (make_reference_declarator): Ditto.
1432 (make_ptrmem_declarator): Ditto.
1433 (make_call_declarator): Ditto.
1434 (make_array_declarator): Ditto.
1435 (cp_parser_postfix_expression): Allow pack expansion expressions
1436 in the argument list for a call expression.
1437 (cp_parser_parenthesized_expression_list): Add new parameter
1438 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
1439 into separate arguments."
1440 (cp_parser_new_placement): Allow pack expansion expressions.
1441 (cp_parser_new_initializer): Ditto.
1442 (cp_parser_mem_initializer_list): Allow ellipsis to create a
1443 base-class initializer expansion.
1444 (cp_parser_mem_initializer): Ditto.
1445 (cp_parser_template_parameter_list): Keep track of whether the
1446 template parameter is a template parameter pack.
1447 (cp_parser_template_parameter): Parse the ellipsis to indicate a
1448 template parameter pack.
1449 (cp_parser_type_parameter): Ditto.
1450 (cp_parser_template_argument_list): Parse the ellipsis to indicate
1452 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
1453 this declarator is a parameter pack.
1454 (cp_parser_parameter_declaration): The ellipsis does not end the
1455 parameter declaration, because it might be a parameter pack. Parse
1456 the ellipsis to indicate a parameter pack.
1457 (cp_parser_initializer): Allow pack expansions.
1458 (cp_parser_initializer_list): Allow ellipsis to create an
1459 initializer expansion.
1460 (cp_parser_base_clause): Allow ellipsis to create a base specifier
1462 (cp_parser_type_id_list): Allow ellipsis to create an exception
1463 specifier expansion.
1464 (cp_parser_attribute_list): Don't allow pack expansions.
1465 (cp_parser_functional_cast): Allow pack expansions.
1466 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
1467 compute the length of a parameter pack.
1468 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
1469 end a template argument.
1470 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1471 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1474 2007-03-09 Dirk Mueller <dmueller@suse.de>
1476 * cp/call.c (build_new_op): Call warn_logical_operator.
1478 2007-03-08 Volker Reichelt <reichelt@netcologne.de>
1481 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
1484 * pt.c (any_template_arguments_need_structural_equality_p):
1487 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
1489 * decl.c (grokdeclarator): Disable warnings for anonymous
1492 2007-03-05 Volker Reichelt <reichelt@netcologne.de>
1494 * typeck2.c (readonly_error): Always emit a hard error.
1495 Remove last argument.
1496 * cp-tree.h (readonly_error): Adjust prototype.
1497 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
1498 * typeck.c (build_unary_op): Likewise.
1499 (build_modify_expr): Likewise.
1501 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
1504 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
1506 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1509 * parser.c (struct cp_parser): New IN_IF_STMT.
1510 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
1511 returning if parsing the body of an 'if' statement or issuing an
1512 error and continuing.
1513 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
1515 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
1517 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
1520 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
1523 2007-03-02 Geoffrey Keating <geoffk@apple.com>
1525 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
1526 Objective-C++. Don't exit early if -shared-libgcc needs to be
1529 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1531 * typeck.c (common_base_type): Delete unused function.
1533 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
1535 * Make-lang.in: Add dummy lang.install-pdf target.
1537 2007-03-01 Simon Baldwin <simonb@google.com>
1540 * decl.c (check_tag_decl): Added new warning for typedef ignored
1541 when it precedes an otherwise valid non-typedef declaration.
1543 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
1545 * typeck.c (build_function_call): Store converted arguments
1546 in a stack-allocated array instead of building a list.
1547 (convert_arguments): Store arguments in the array passed in as an
1548 argument, and return the actual number of arguments.
1549 * call.c (build_call): Delete, and replace with...
1550 (build_call_n, build_call_a): New.
1551 (build_op_delete_call): Rewrite to avoid constructing argument lists.
1552 (build_over_call): Store converted arguments in a stack-allocated
1553 array instead of building a list.
1554 (build_cxx_call): Pass arguments in an array instead of as a list.
1555 (build_java_interface_fn_ref): Rewrite to avoid constructing
1557 * tree.h: Update declarations to reflect above changes.
1558 * method.c (use_thunk): Use a stack-allocated array to hold
1559 the arguments instead of a list.
1560 * rtti.c (throw_bad_cast): Update call to cxx_call.
1561 (throw_bad_typeid): Likewise.
1562 (build_dynamic_cast_1): Likewise.
1563 * init.c (build_builtin_delete_call): Use build_call_n.
1564 * decl.c (expand_static_init): Likewise.
1565 * except.c (cp_protect_cleanup_actions): Likewise.
1566 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
1567 (gimplify_must_not_throw_expr): Likewise.
1568 (cxx_omp_apply_fn): Use build_call_a.
1570 2007-02-26 Mark Mitchell <mark@codesourcery.com>
1572 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
1573 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
1575 2007-02-25 Mark Mitchell <mark@codesourcery.com>
1577 * cp-tree.h (static_ctors): Remove.
1578 * cp-tree.h (static_dtors): Likewise.
1579 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
1580 refactoring of tree_map hierarchy.
1581 (decl_shadowed_for_var_insert): Likewise.
1582 * semantics.c (expand_body): Use c_expand_body.
1583 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
1584 * decl2.c (static_ctors): Remove.
1585 (static_dtors): Likewise.
1586 (generate_ctor_or_dtor_function): Pass NULL_TREE to
1587 objc_generate_static_init_call. Do not call static_[cd]tors.
1588 (generate_ctor_and_dtor_functions_for_priority): Do not check for
1590 (cp_write_global_declarations): Likewise.
1592 2007-02-23 Richard Guenther <rguenther@suse.de>
1594 * class.c (note_name_declared_in_class): Make declaration
1595 changes meaning a pedwarn.
1597 2007-02-22 Michael Matz <matz@suse.de>
1600 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
1601 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
1602 dump_function_decl): Guard emitting outer scopes by new flag.
1603 * cp-lang.c (cxx_dwarf_name): New function.
1604 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
1605 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
1607 (push_template_decl_real, lookup_template_class): Remove calls
1610 2007-02-19 Mark Mitchell <mark@codesourcery.com>
1612 * call.c (build_new_method_call): Ensure that explicit calls of
1613 destructors have type "void".
1615 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1617 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
1618 and -Walways-true with -Waddress.
1619 * cvt.c (convert_to_void): Replace unconditional warning with
1622 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
1624 * decl.c, tree.c: Fix comment typos.
1626 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1629 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
1630 statement expression if we had an error mark node.
1632 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
1633 Brooks Moses <brooks.moses@codesourcery.com>
1634 Lee Millward <lee.millward@codesourcery.com>
1636 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
1637 Change class to tcc_vl_exp.
1639 * call.c (build_call): Use build_call_list instead
1641 (build_over_call): Likewise.
1642 (build_new_method_call): Use build_min_non_dep_call_list
1643 instead of build_min_non_dep.
1645 * error.c (dump_call_expr_args): New function.
1646 (dump_aggr_init_expr_args): New function.
1647 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
1648 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
1650 * cvt.c (convert_to_void): Use build_call_array instead
1651 of build3; use new AGGR_INIT_EXPR accessor macros.
1653 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
1654 instead of TREE_CODE_LENGTH.
1656 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
1657 AGGR_INIT_EXPR accessor macros.
1659 * cp-gimplify.c (cp_gimplify_init_expr): Use
1660 AGGR_INIT_EXPR_SLOT to set the slot operand.
1662 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
1663 (AGGR_INIT_EXPR_SLOT): New macro.
1664 (AGGR_INIT_EXPR_ARG): New macro.
1665 (aggr_init_expr_nargs): New macro.
1666 (AGGR_INIT_EXPR_ARGP): New macro.
1667 (aggr_init_expr_arg_iterator): New.
1668 (init_aggr_init_expr_arg_iterator): New.
1669 (next_aggr_init_expr_arg): New.
1670 (first_aggr_init_expr_arg): New.
1671 (more_aggr_init_expr_args_p): New.
1672 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
1673 (stabilize_aggr_init): New declaration.
1674 (build_min_non_dep_call_list): Likewise.
1676 * tree.c (process_aggr_init_operands): New function.
1677 (build_aggr_init_array) New function.
1678 (build_cplus_new): Update to use new CALL_EXPR and
1679 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
1680 build_aggr_init_array.
1681 (build_min_non_dep_call_list) New function.
1682 (build_min_nt): Assert input code parameter is not a variable
1683 length expression class.
1684 (build_min, build_min_non_dep): Likewise.
1685 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
1686 to check for equality instead of recursing. Handle tcc_vl_exp
1688 (stabilize_call): Update to only handle CALL_EXPRs, not
1689 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
1690 (stabilize_aggr_init): New function.
1691 (stabilize_init): Use it.
1693 * cxx-pretty-print.c (pp_cxx_postfix_expression)
1694 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
1695 AGGR_INIT_EXPR accessor macros and argument iterators.
1697 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
1698 build_vl_exp. Iterate through the operands, recursively
1699 processing each one.
1700 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
1701 CALL_EXPR accessor macros.
1702 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
1703 tree code classes. Use TREE_OPERAND_LENGTH instead of
1706 * semantics.c (finish_call_expr): Use build_nt_call_list
1707 instead of build_nt.
1708 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
1709 accessor macros. Use build_call_array to construct the
1710 CALL_EXPR node instead of build3
1712 * decl2.c (build_offset_ref_call_from_tree): Use
1713 build_nt_call_list and build_min_non_dep_call_list instead
1714 of build_min_nt and build_min_non_dep.
1716 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
1717 Use build_nt_call_list instead of build_min_nt.
1719 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1722 * call.c (build_conditional_expr): Improve error message.
1724 2007-02-13 Dirk Mueller <dmueller@suse.de>
1726 * friend.c (do_friend): Annotate warning about friend
1727 declarations in templates with OPT_Wnon_template_friend.
1728 Convert informal message from warning() to inform().
1730 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
1731 Mark Mitchell <mark@codesourcery.com>
1734 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
1735 instantiations for variables.
1737 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1740 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
1741 Check warn_unused_value just once.
1743 2007-02-11 Mark Mitchell <mark@codesourcery.com>
1746 * pt.c (determine_specialization): Use skip_artificial_parms_for.
1747 (fn_type_unificiation): Likewise.
1748 (get_bindings): Likewise.
1750 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
1753 * decl.c (finish_function): Use DECL_REPLACEABLE.
1754 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1756 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
1758 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
1760 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
1762 * decl.c (grokvardecl): Don't error if !have_tls.
1763 (grokdeclarator): Likewise.
1764 * parser.c (cp_parser_omp_threadprivate): Likewise.
1766 2007-02-07 Jakub Jelinek <jakub@redhat.com>
1769 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
1770 parameters and result decls in omp clauses.
1771 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
1774 2007-02-05 Dirk Mueller <dmueller@suse.de>
1777 * parser.c (cp_parser_class_specifier): Always initialize bases.
1779 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
1781 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
1782 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
1783 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
1785 * semantics.c (finish_omp_atomic): Store a whole expression node
1786 in operand 1, and integer_zero_node in operand 0, for dependent
1787 OMP_ATOMIC. Rewrite to make flow easier to understand.
1789 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1791 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
1793 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
1795 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
1796 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
1798 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
1800 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
1801 keyword warning to -Wc++0x-compat.
1803 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1805 * decl.c (grokdeclarator): Update documentation.
1807 2007-02-02 Jakub Jelinek <jakub@redhat.com>
1810 * decl.c (grokdeclarator): If __thread is used together with
1811 a storage class other than extern and static, clear thread_p
1812 after issuing diagnostics and fall through to checking the
1815 2007-01-30 Roger Sayle <roger@eyesopen.com>
1817 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
1818 calculating the size of an array (to avoid recursive errors).
1820 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1823 * typeck.c (build_binary_op): Fix logic for warning. Move warning
1825 * call.c (convert_like_real): Don't warn when converting to
1828 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1830 * decl.c (pop_label): Replace warning with call to
1831 warn_for_unused_label.
1833 2007-01-28 Andrew Pinski <pinskia@gmail.com>
1836 * semantics.c (finish_pseudo_destructor_expr): Check the
1837 destrutor name by calling check_dtor_name.
1839 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
1841 * lex.c (D_CPP0X): Rename.
1843 (reswords): D_CPP0X -> D_CXX0X.
1844 (init_reswords): Ditto.
1845 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
1846 of C++0x keywords as identifiers.
1848 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
1851 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
1854 2007-01-23 Ian Lance Taylor <iant@google.com>
1856 * typeck.c (convert_for_assignment): Only warn about a = b = c
1857 when converting to bool.
1859 2007-01-23 Roger Sayle <roger@eyesopen.com>
1861 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
1863 * typeck.c (ignore_overflows): Remove the remaining uses of
1864 TREE_CONSTANT_OVERFLOW.
1866 2007-01-20 Jan Hubicka <jh@suse.cz>
1868 * decl2.c (start_objects, start_static_storage_duration_function):
1869 Do not make the functions uninlinable.
1871 2007-01-17 Ian Lance Taylor <iant@google.com>
1873 * class.c (add_method): Call VEC_reserve_exact rather than passing
1874 a negative size to VEC_reserve.
1876 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
1879 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
1881 2007-01-10 Mark Mitchell <mark@codesourcery.com>
1884 * decl.c (make_typename_type): If the qualified name is not a
1885 type, issue an error.
1886 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
1889 2007-01-08 Geoffrey Keating <geoffk@apple.com>
1891 * rtti.c: Include target.h.
1892 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
1893 don't emit typeinfo for fundamental types as weak.
1894 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
1896 2007-01-08 Richard Guenther <rguenther@suse.de>
1898 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
1900 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
1902 * call.c (standard_conversion): Pass flag to
1903 vector_types_convertible_p to disallow emission of note.
1904 * typeck.c (convert_for_assignment): Pass flag to
1905 vector_types_convertible_p to allow emission of note.
1906 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
1907 to disallow emission of note.
1909 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1912 * typeck.c (build_binary_op): Call overflow_warning if
1913 TREE_OVERFLOW_P is true for the result and not for any of the
1916 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
1919 * class.c (add_method): Don't wait until template
1920 instantiation time to complain about duplicate methods.
1922 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1925 * semantics.c (finish_unary_op_expr): Warn only if result
1926 overflowed and operands did not.
1928 2007-01-05 Ian Lance Taylor <iant@google.com>
1930 * typeck.c (build_binary_op): Warn about comparing a non-weak
1933 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
1935 * pt.c (tsubst): Propagate the need for structural equality checks
1936 when reducing the level of template parameters.
1938 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
1940 * pt.c: Fix a comment typo.
1942 2007-01-02 Ian Lance Taylor <iant@google.com>
1944 * semantics.c (maybe_convert_cond): Optionally warn when using an
1945 assignment as a condition.
1946 * typeck.c (convert_for_assignment): Optionally warn about
1947 assigning the result of an assignment to a bool.
1949 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
1951 * pt.c (canonical_template_parms): Correct typo in comment.
1953 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
1955 * typeck.c (structural_comptypes): Renamed from "comptypes".
1956 (comptypes): Use canonical type information to perform fast type
1957 comparison. When VERIFY_CANONICAL_TYPES, verify that the
1958 canonical type comparison returns the same results as we would see
1959 from the current, structural check. Support COMPARE_STRUCTURAL
1960 when we need structural checks.
1961 * decl.c (typename_compare): Fix comment.
1962 (build_typename_type): TYPENAME_TYPE nodes require structural
1963 equality checks, because they resolve different based on the
1965 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
1966 require structural equality checks (for now).
1967 (build_ptrmemfunc_type): Build the canonical pointer to member
1969 (compute_array_index_type): Whenever we build a new index type
1970 to represent the size of an array in a template, we need to mark
1971 this index type as requiring structural equality. This goes for
1972 arrays with value-dependent sizes with the current ABI, or all
1974 * tree.c (cplus_array_hash): New.
1975 (struct cplus_array_info): New.
1976 (cplus_array_compare): New.
1977 (cplus_array_htab): New.
1978 (build_cplus_array_type_1): Use a hash table to cache the array
1979 types we build. Build the canonical array type for each array
1981 (cp_build_qualified_type_real): When building a cv-qualified array
1982 type, use the hash table of array types and build canonical array
1984 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
1985 use structural equality (for now).
1986 * cp-tree.h (COMPARE_STRUCTURAL): New.
1987 * pt.c (canonical_template_parms): New.
1988 (canonical_type_parameter): New.
1989 (process_template_parm): Find the canonical type parameter.
1990 (lookup_template_class): When we have named the primary template
1991 type, set the canonical type for our template class to the primary
1992 template type. If any of the template arguments need structural
1993 equality checks, the template class needs structural equality
1995 (tsubst): When reducing the level of a template template
1996 parameter, we require structural equality tests for the resulting
1997 parameter because its template parameters have not had their types
1998 canonicalized. When reducing a template type parameter, find the
1999 canonical reduced type parameter.
2000 (any_template_arguments_need_structural_equality_p): New.