1 2007-08-20 Richard Guenther <rguenther@suse.de>
3 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
5 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
6 (nonstatic_local_decl_p): Likewise.
7 * tree.c (cp_auto_var_in_fn_p): Remove.
8 * decl.c (nonstatic_local_decl_p): Remove.
10 2007-08-20 Richard Guenther <rguenther@suse.de>
12 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
14 * tree.h (cp_walk_tree): New define to walk_tree_1 with
15 cp_walk_subtrees lh parameter.
16 (cp_walk_tree_without_duplicates): New define to
17 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
18 * tree.c (count_trees): Call
19 cp_walk_tree_without_duplicates.
20 (verify_stmt_tree): Call cp_walk_tree.
21 (break_out_target_exprs): Likewise.
22 (WALK_SUBTREE): Likewise.
23 * cp-gimplify.c (cp_genericize): Likewise.
24 * cp-pt.c (find_parameter_packs_r): Likewise.
25 (uses_parameter_packs): Likewise.
26 (make_pack_expansion): Likewise.
27 (check_for_bare_parameter_packs): Likewise.
28 (for_each_template_parm): Likewise.
29 * decl.c (check_default_argument): Call
30 cp_walk_tree_without_duplicates.
31 * except.c (build_throw): Likewise.
32 * decl2.c (type_visibility): Likewise.
33 * semantics.c (expand_or_defer_fn): Likewise.
34 (finalize_nrv): Call cp_walk_tree.
36 2007-08-20 Jakub Jelinek <jakub@redhat.com>
39 * init.c (build_new_1): Rename placement_var variable to placement_expr.
40 Initialize it with save_expr rather than get_temp_regvar.
42 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
45 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
48 2007-08-17 Ollie Wild <aaw@google.com>
51 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
52 declarations into appropriate slots for comparison. Fix type
55 2007-08-17 Paolo Carlini <pcarlini@suse.de>
58 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
59 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
61 2007-08-17 Paolo Carlini <pcarlini@suse.de>
64 * parser.c (cp_parser_class_head): Improve error message.
66 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
68 * pt.c (instantiate_decl): Set input_location
71 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
73 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
75 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
76 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
77 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
78 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
79 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
80 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
81 * typeck.c (cp_type_quals): Likewise.
82 * typeck2.c (cxx_incomplete_type_diagnostic,
83 cxx_incomplete_type_error): Likewise.
85 2007-08-16 Paolo Carlini <pcarlini@suse.de>
88 * pt.c (tsubst_friend_function): When check_classfn
89 returns error_mark_node likewise return it.
91 2007-08-15 Jakub Jelinek <jakub@redhat.com>
94 * typeck.c (check_return_expr): Don't NRV optimize vars in
96 * decl.c (finish_function): Comment fix.
98 2007-08-15 Paolo Carlini <pcarlini@suse.de>
101 * pt.c (push_template_decl_real): Depending on TYPE_P
102 use either TYPE_CONTEXT or DECL_CONTEXT.
104 2007-08-14 Mark Mitchell <mark@codesourcery.com>
106 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
107 constructors and destructors return this.
109 2007-08-14 Paolo Carlini <pcarlini@suse.de>
112 * decl2.c (check_classfn): Return error_mark_node in case of error;
113 in that case, do not call add_method.
114 * decl.c (start_decl): Deal with check_classfn returning
116 (grokfndecl): Likewise.
117 * pt.c (tsubst_friend_function): Likewise.
119 2007-08-14 Andrew Pinski <pinskia@gmail.com>
122 * typeck.c (build_binary_op): Disallow vector float types with
123 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
125 2007-08-11 Ian Lance Taylor <iant@google.com>
127 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
129 * cp/cp-tree.h (cxx_get_alias_set): Update declaration.
131 2007-08-10 Ollie Wild <aaw@google.com>
133 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
135 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
137 (unqualified_namespace_lookup): Fix ambiguous_decl call.
138 (lookup_using_namespace): Fix ambiguous_decl call.
139 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
141 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
143 * call.c (name_as_c_string): Use CONST_CAST.
144 * decl.c (build_decl): Likewise.
145 * parser.c (cp_parser_string_literal): Likewise.
147 2007-08-10 Paolo Carlini <pcarlini@suse.de>
150 * error.c (dump_expr): Consistently use the *_cxx_*
151 variants of the pretty-print functions.
153 2007-08-10 Paolo Carlini <pcarlini@suse.de>
156 * decl.c (check_special_function_return_type): Just error
157 on return type specified for conversion operator.
159 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
161 * typeck2.c (readonly_error): Handle general expressions.
162 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
164 2007-08-06 Dan Hipschman <dsh@google.com>
166 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
167 access function name.
169 2007-08-04 Alfred Minarik <a.minarik@aon.at>
172 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
173 * g++spec.c (lang_specific_driver): Check them.
175 2007-08-06 Paolo Carlini <pcarlini@suse.de>
178 * pt.c (template_class_depth): Fix comment; change return type
181 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
184 2007-03-26 Dirk Mueller <dmueller@suse.de>
186 * parser.c (cp_parser_member_declaration): Pedwarn
187 about stray semicolons after member declarations.
189 2007-08-02 Lee Millward <lee.millward@gmail.com>
194 * parser.c (cp_parser_asm_definition): Detect and discard asm
195 statements with invalid inputs or outputs.
196 (cp_parser_asm_operand_list): Return error mark node if any
197 of the operands are invalid. Adjust documentation.
199 2007-08-02 Nick Clifton <nickc@redhat.com>
201 * typeck.c: Change copyright header to refer to version 3 of the
202 GNU General Public License and to point readers at the COPYING3
203 file and the FSF's license web page.
204 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
205 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
206 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
207 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
208 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
209 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
210 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
211 name-lookup.h, parser.c: Likewise.
213 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
216 * call.c (magic_varargs_p): Honor the "type generic" attribute.
218 2007-07-30 Paolo Carlini <pcarlini@suse.de>
221 * semantics.c (finish_label_stmt): Reject the __label__
222 extension outside function scopes.
224 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
226 * parser.c (eof_token): Un-constify.
227 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
228 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
231 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
233 * pt.c, tree.c, typeck2.c: Fix comment typos.
235 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
236 Mark Mitchell <mark@codesourcery.com>
239 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
240 hidden due to friend declarations in local classes.
242 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
244 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
245 * cp-tree.def (DECLTYPE_TYPE): New.
246 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
247 (dump_type_prefix): Ditto.
248 (dump_type_suffix): Ditto.
249 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
250 * mangle.c (write_type): Handle DECLTYPE_TYPE.
251 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
253 (DECLTYPE_TYPE_EXPR): New.
254 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
255 (finish_declared_type): Declare.
256 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
258 (pp_cxx_type_id): Ditto.
259 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
260 (tsubst): Substitute into a DECLTYPE_TYPE node.
261 (tsubst_copy): Ditto.
262 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
264 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
265 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
266 structural equality (because we can't hash the expressions).
267 (finish_declared_type): New.
268 * lex.c (reswords): Add "decltype" keyword.
269 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
270 (cp_parser_postfix_expression): Add member_access_only_p to
271 restrict postfix expression to member access expressions.
272 (cp_parser_unary_expression): Update call to
273 cp_parser_postfix_expression to reflect new parameter.
274 (cp_parser_declared_type): New.
275 (cp_parser_simple_type_specifier): Parse decltype types.
277 2007-07-27 Mark Mitchell <mark@codesourcery.com>
280 * call.c (convert_for_arg_passing): Only widen bitfields to their
281 declared types if necessary.
283 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
285 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
288 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
290 * decl.c (typename_hash, typename_compare): Constify.
291 * mangle.c (hash_type, compare_type): Likewise.
292 * pt.c (eq_local_specializations, hash_local_specialization):
294 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
295 list_hash): Likewise.
296 * typeck2.c (pat_compare): Likewise.
298 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
300 * method.c (implicitly_declare_fn): Increase alignment if member
301 function pointer format requires it.
303 2007-07-24 Paolo Carlini <pcarlini@suse.de>
306 * typeck.c (check_return_expr): Do not pass a null argument
309 2007-07-24 Paolo Carlini <pcarlini@suse.de>
312 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
315 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
318 * typeck.c (convert_arguments): Only use default args if we have
322 * typeck.c (structural_comptypes): No need to check
323 resolve_typename_type return value here.
324 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
325 * pt.c (resolve_typename_type): Follow typename typedefs. Return
326 original type rather than error_mark_node in case of failure.
327 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
328 resolve_typename_type result check.
329 (cp_parser_direct_declarator, cp_parser_head,
330 cp_parser_constructor_declarator_p): Likewise.
332 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
334 * pt.c (template_parms_variadic_p): Remove.
335 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
337 2007-07-12 Jakub Jelinek <jakub@redhat.com>
340 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
341 argument to dump_aggr_init_expr_args instead of false.
343 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
345 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
346 canonical types; otherwise, fall back to structural type
347 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
348 internal compiler error if the canonical types are wrong.
350 2007-07-11 Paolo Carlini <pcarlini@suse.de>
353 * parser.c (cp_parser_make_indirect_declarator): When the
354 the code argument is ERROR_MARK return cp_error_declarator.
356 2007-07-09 Geoffrey Keating <geoffk@apple.com>
359 * decl.c (cxx_init_decl_processing): Don't set
360 force_align_functions_log.
361 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
362 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
363 FUNCTION_DECL, return its alignment.
365 2007-07-09 Richard Guenther <rguenther@suse.de>
367 * decl.c (start_preparsed_function): Do not promote return type.
369 2007-07-08 Paolo Carlini <pcarlini@suse.de>
372 * pt.c (unify): Never pass error_mark_node to template_decl_level.
374 2007-07-07 Mark Mitchell <mark@codesourcery.com>
377 * pt.c (resolve_overloaded_unification): Robustify. Return a
379 (type_unification_real): Adjust accordingly.
381 2007-07-06 Richard Guenther <rguenther@suse.de>
383 * init.c (build_new_1): Use the correct pointer type.
384 * typeck2.c (build_m_component_ref): Likewise.
386 2007-07-05 Mark Mitchell <mark@codesourcery.com>
389 * init.c (build_zero_init): Always build an initializer for
391 * typeck2.c (build_functional_cast): Use build_zero_init.
394 * init.c (build_new_1): Always pass the allocation function to
395 build_op_delete_call.
396 * call.c (build_op_delete_call): Handle operator delete with a
397 variable-argument list. Do not issue an error when no matching
398 deallocation function is available for a new operator.
401 * cp-tree.h (any_value_dependent_elements_p): Declare it.
402 * decl.c (value_dependent_init_p): New function.
403 (cp_finish_decl): Use it.
404 * pt.c (value_dependent_expression_p): Use
405 any_value_dependent_elements_p.
406 * parser.c (cp_parser_primary_expression): Add comment about
407 treating dependent qualified names as integral
408 constant-expressions.
410 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
412 * decl.c (build_ptrmemfunc_type): Always use structural equality
413 tests when comparing pointer-to-member-function types, because the
414 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
417 2007-07-03 Mark Mitchell <mark@codesourcery.com>
419 * init.c (build_new): Tweak comment.
421 2007-06-29 Dave Brolley <brolley@redhat.com>
424 * parser.c (cp_parser_new_type_id): Don't reduce a named array
425 type to its base type and number of elements here.
426 * init.c (build_new): Call complete_type_or_else to ensure that the
427 type is complete and to issue a diagnostic if it is not.
428 (build_new_1): Don't call complete_type_or_else here.
430 2007-07-03 Richard Guenther <rguenther@suse.de>
433 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
436 2007-07-02 Simon Baldwin <simonb@google.com>
438 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
439 for inner-style nested forward declarations that don't declare
442 2007-07-02 Jakub Jelinek <jakub@redhat.com>
445 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
446 DECL_P in not a variable and appears more than once error messages.
448 2007-07-01 Ollie Wild <aaw@google.com>
450 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
451 (select_decl): Remove function.
452 (unqualified_namespace_lookup): Populate binding by calling
453 ambiguous_decl. Remove select_decl call.
454 (lookup_qualified_name): Remove select_decl call.
455 * decl.c (lookup_and_check_tag): Check for ambiguous references.
456 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
457 generation when name lookup is ambiguous.
459 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
462 * init.c (build_new_1): Use structural equality on the copy of the
465 2007-06-28 Geoffrey Keating <geoffk@apple.com>
467 * decl2.c (determine_visibility): Implement
468 flag_visibility_ms_compat effect on type info.
469 * decl.c (cxx_init_decl_processing): Implement
470 global effect of flag_visibility_ms_compat.
472 2007-06-28 Geoffrey Keating <geoffk@apple.com>
474 * decl2.c (start_objects): Mark constructor-running function
477 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
480 * decl.c (grokdeclarator): Reset friendp for member functions declared
481 friend of their own class.
483 2007-06-23 Mark Mitchell <mark@codesourcery.com>
485 * decl2.c (determine_visibility): Don't look for dllexport here.
486 (determine_visibility_from_class): Tidy.
488 2007-06-18 Simon Baldwin <simonb@google.com>
491 * parser.c (cp_parser_single_declaration): Added check for storage
492 class other than sc_none in parsed declaration, and a flag to indicate
493 if the call is part of an explicit template specialization parse.
494 * (cp_parser_explicit_specialization): Specialization check flag added
495 to call to cp_parser_single_declaration(), set true.
496 * (cp_parser_template_declaration_after_export): Specialization check
497 flag added to call to cp_parser_single_declaration(), set false.
498 * pt.c (check_explicit_specialization): Added code to copy visiblity
499 and linkage from the templated function to the explicit specialization.
501 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
503 * typeck.c (build_binary_op): For templates build the
504 expression in pieces to avoid the assert in build2_stat.
505 (get_member_function_from_ptrfunc):
506 Change over to using POINTER_PLUS_EXPR and convert
507 the second operand to sizetype.
508 * typeck2.c (build_m_component_ref): Likewise.
509 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
510 instead of PLUS_EXPR for pointers.
511 (build_new_1): Likewise.
512 (build_vec_delete_1): Likewise.
513 (build_vec_delete): Likewise.
514 * class.c (build_base_path): Likewise.
515 (build_base_path): Likewise.
516 (convert_to_base_statically): Likewise.
517 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
518 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
519 instead of PLUS_EXPR.
520 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
521 instead of PLUS_EXPR for pointers.
522 * call.c (build_special_member_call): Likewise.
523 * rtti.c (build_headof): Likewise.
524 Use sizetype instead of ptrdiff_type_node.
525 (tinfo_base_init): Create a POINTER_PLUS_EXPR
526 instead of PLUS_EXPR for pointers.
527 * except.c (expand_start_catch_block): Do a
528 NEGATIVE and then a POINTER_PLUS_EXPR instead
530 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
531 PLUS_EXPR on pointer types over to use
532 POINTER_PLUS_EXPR and remove the conversion
533 to the pointer types.
534 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
535 adding to a pointer type. Use size_int instead of
536 ssize_int. Convert the index to sizetype before
537 adding it to the pointer.
539 2007-06-15 Mark Mitchell <mark@codesourcery.com>
541 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
542 (DECL_ANON_UNION_VAR_P): New macro.
543 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
544 than DECL_VAR_MARKED_P, to keep track of which variables we have
546 * decl.c (redeclaration_error_message): Complain about redeclaring
547 anonymous union members at namespace scope.
548 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
550 2007-06-14 Geoff Keating <geoffk@apple.com>
552 * decl2.c (determine_visibility): Ensure that functions with
553 hidden types as parameters are hidden.
556 * decl2.c (determine_visibility): Remove duplicate code for
559 2007-06-12 Ian Lance Taylor <iant@google.com>
562 * init.c (avoid_placement_new_aliasing): New static function.
563 (build_new_1): Call it.
565 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
567 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
568 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
570 2007-06-08 Jakub Jelinek <jakub@redhat.com>
573 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
574 on init, the non-decl cond operand and increment value.
576 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
579 * decl.c (check_initializer): Report an error when a brace enclosed
580 initializer is used for a non-aggregate type in C++98.
581 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
583 (grokdeclarator): Likewise.
584 (move_fn_p): Likewise.
585 * typeck.c (check_return_expr): Likewise.
586 * call.c (reference_binding): Likewise.
587 * error.c (cp_cpp_error): Likewise.
588 * pt.c (check_default_tmpl_args): Likewise.
590 * lex.c (init_reswords): Likewise.
591 * parser.c (p_parser_primary_expression): Likewise.
592 (TOKEN_PRECEDENCE): Likewise.
593 (cp_parser_init_declarator): Likewise.
594 (cp_parser_ptr_operator): Likewise.
595 (cp_parser_parameter_declaration): Likewise.
596 (cp_parser_enclosed_template_argument_list): Likewise.
597 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
598 (cp_parser_next_token_ends_template_argument_p): Likewise.
600 2007-06-04 Simon Baldwin <simonb@google.com>
602 * decl.c (grokdeclarator): Readability change. Moved case labels
603 into direct switch statement scope.
605 2007-06-04 Paolo Carlini <pcarlini@suse.de>
607 * call.c (convert_like_real): Remove pointless code.
609 2007-05-31 Mark Mitchell <mark@codesourcery.com>
611 * decl.c (get_atexit_fn_ptr_type): New function.
612 (get_atexit_node): Use it.
613 (start_cleanup_fn): Likewise.
614 (register_dtor_fn): Use the object's destructor, instead of a
615 separate cleanup function, where possible.
616 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
617 (atexit_fn_ptr_type_node): New macro.
618 * decl2.c (build_cleanup): Use build_address.
620 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
622 * typeck.c (build_binary_op): Include types in error.
624 2007-05-31 Jakub Jelinek <jakub@redhat.com>
627 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
628 needs runtime initialization.
630 2007-05-31 Paolo Carlini <pcarlini@suse.de>
633 * semantics.c (finish_trait_expr): Complete the types.
635 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
636 Douglas Gregor <doug.gregor@gmail.com>
637 Pedro Lamarao <pedro.lamarao@mndfck.org>
638 Howard Hinnant <howard.hinnant@gmail.com>
642 * typeck.c (comptypes): Don't consider rvalue and lvalue
643 reference types to be equivalent.
644 (check_return_expr): Move from certain lvalues when returning
646 * decl.c (grokdeclarator): Implement reference collapsing.
647 (copy_fn_p): Don't consider constructors taking rvalue references
648 to be copy constructors.
650 * call.c (conversion): New "rvaluedness_matches_p" member.
651 (convert_class_to_reference): Require reference type as first
652 parameter instead of base type.
653 (reference_binding): Add logic to handle rvalue references.
654 (implicit_conversion): Update inaccurate comment.
655 (convert_like_real): Disable creation of temporaries that are
656 impossible to initialize for types with move constructors.
657 (build_over_call): Elide move constructors when possible.
658 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
659 (maybe_handle_ref_bind): Return conversion instead of type node.
660 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
661 determine preferred conversion sequences.
662 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
663 (LOOKUP_PREFER_RVALUE): New.
664 (DECL_MOVE_CONSTRUCTOR_P): New.
665 (struct cp_declarator): Add "reference" member for reference
666 types, with new "rvalue_ref" flag.
667 (cp_build_reference_type): Declare.
668 (move_fn_p): Declare.
669 * error.c (dump_type_prefix): Format rvalue reference types
670 correctly in error messages.
671 * except.c (build_throw): Move from certain lvalues when
673 * mangle.c (write_type): Mangle rvalue references differently
674 than regular references.
675 * parser.c (make_reference_declarator): Add boolean parameter for
677 (cp_parser_make_indirect_declarator): New.
678 (cp_parser_new_declarator_opt): Call
679 cp_parser_make_indirect_declarator.
680 (cp_parser_conversion_declarator_opt): Ditto.
681 (cp_parser_declarator): Ditto.
682 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
684 * pt.c (tsubst): Implement reference collapsing.
685 (maybe_adjust_types_for_deduction): Implement special template
686 parameter deduction rule for rvalue references.
687 (type_unification_real): Update calls to
688 maybe_adjust_types_for_deduction.
689 (try_one_overload): Ditto.
690 (unify_pack_expansion): Ditto.
691 * tree.c (lvalue_p_1): Handle rvalue reference types.
692 (cp_build_reference_type): New.
694 2007-05-30 Jakub Jelinek <jakub@redhat.com>
697 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
698 variables that need runtime initialization.
700 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
703 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
704 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
705 case POSTDECREMENT_EXPR>): Return the error_mark_node
706 if either the real or imaginary parts would an
709 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
710 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
713 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
714 token is a closing brace, false if there are no tokens left.
715 (cp_parser_namespace_alias_definition): Only consume the next token if
716 it is a closing brace.
718 * parser.c (cp_parser_class_specifier): Likewise.
720 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
722 * semantics.c (finish_member_declaration): Fix a typo in the
725 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
737 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
738 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
739 * pt.c (check_for_bare_parameter_packs): Return bool indicated
740 whether everything was okay. Fix indentation.
741 (push_template_decl_real): Check for bare parameter packs in
742 function parameters; where errors occur, mark the parameter types
743 with ERROR_MARK_NODEs to avert ICEs.
744 (coerce_template_parameter_pack): New.
745 (coerce_template_parms): Moved parameter pack coercion into
746 coerce_template_parameter_pack, and permit it anywhere in the
747 template parameter list (not just at the end). Parameter and
748 argument indices can vary (somewhat) separately now, so add
749 PARM_IDX and ARG_IDX.
750 (fn_type_unification): Don't set an argument pack as incomplete if
751 no argument pack was deduced.
752 (type_unification_real): If a type parameter is a parameter pack
753 and has not otherwise been deduced, it will be deduced to an empty
755 (more_specialized_fn): Use the actual lengths of the argument
756 lists when comparing against expansions.
757 * semantics.c (finish_member_declaration): If a field's type has
758 bare parameter packs, error and set its type to ERROR_MARK_NODE.
760 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
763 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
765 2007-05-22 Ollie Wild <aaw@google.com>
767 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
768 (unqualified_namespace_lookup): Adds check for hidden types.
770 2007-05-22 Ollie Wild <aaw@google.com>
772 * decl.c (duplicate_decls): Verify namespace names are unique.
774 2007-05-21 Mark Mitchell <mark@codesourcery.com>
776 * decl.c (cxx_maybe_build_cleanup): Handle
777 __attribute__((cleanup)).
779 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
781 * cvt.c (cp_convert_and_check): Don't check warnings if the
784 2007-05-18 Geoffrey Keating <geoffk@apple.com>
786 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
788 2007-05-14 Paolo Carlini <pcarlini@suse.de>
791 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
792 type only if is a class type (5.2.8/4).
794 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
796 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
797 * decl.c (grokdeclarator): Use unsigned_type_for instead of
798 c_common_unsigned_type.
800 2007-05-11 Silvius Rus <rus@google.com>
802 * cp/typeck.c (build_indirect_ref): Add call to
803 strict_aliasing_warning.
804 (build_reinterpret_cast_1): Condition call to
805 strict_aliasing_warning.
807 2007-05-11 Jan Hubicka <jh@suse.cz>
809 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
810 * decl2.c (start_objects): ctors and dtors are no longer public.
811 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
813 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
815 * typeck.c (build_unary_op): Remove code that used to
816 handle non lvalue increments/decrements.
818 2007-05-07 Mike Stump <mrs@apple.com>
820 * parser.c (check_empty_body): Add.
821 (cp_parser_iteration_statement): Add call to check_empty_body.
823 2007-05-05 Geoffrey Keating <geoffk@apple.com>
826 * mangle.c (write_mangled_name): Mangle static variable names.
827 (write_unqualified_name): Use local-source-name for
828 namespace-scope static variables.
830 2007-05-04 Dirk Mueller <dmueller@suse.de>
832 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
835 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
838 * decl2.c (constrain_class_visibility):
839 Use strip_pointer_or_array_types instead of strip_array_types.
841 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
844 * decl.c (reshape_init_r): Don't reshape the first element if it
845 is a pointer to member function.
847 2007-04-27 Simon Baldwin <simonb@google.com>
849 * decl.c (grokparms): Changed message format from %qD to %qE.
851 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
853 * error.c (maybe_warn_variadic_templates): Variadic templates are
854 now in C++0x, so only warn about them in C++98 mode.
856 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
859 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
860 integeral types from vectors types.
862 2007-04-26 Jakub Jelinek <jakub@redhat.com>
865 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
866 for type dependent OMP_CLAUSE_DECLs.
868 2007-04-24 Mark Mitchell <mark@codesourcery.com>
871 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
872 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
873 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
874 * init.c (build_zero_init): Adjust, as
875 COMPLEX_TYPE is now a SCALAR_TYPE.
876 * typeck2.c (digest_init): Allow brace-enclosed initializers for
877 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
879 2007-04-25 Paolo Carlini <pcarlini@suse.de>
881 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
882 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
883 (trait_expr_value): Adjust.
885 2007-04-23 Simon Baldwin <simonb@google.com>
887 * decl.c (grokparms): Added new error for duplicate function
888 parameters names in function prototypes, to match gcc behavior.
890 2007-04-23 Jan Hubicka <jh@suse.cz>
892 * cp/decl2.c (finish_objects): Do not call target constructor/destructor
895 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
897 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
898 instead of checking GIMPLE_STMT_P in chain_next.
900 2007-04-17 Mark Mitchell <mark@codesourcery.com>
903 * call.c (convert_for_arg_passing): Convert bitfields to their
906 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
909 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
911 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
915 * cp/decl2.c (constrain_class_visibility):
916 Do not warn about the use of anonymous namespace in the main input file.
918 2007-04-15 Mark Mitchell <mark@codesourcery.com>
920 * cp-tree.h (current_template_parms): Fix typo in comment.
922 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
924 * cp-tree.h, error.c: Fix comment typos.
926 2007-04-13 Jason Merrill <jason@redhat.com>
929 * call.c (reference_binding): Add c_cast_p parm. If true,
930 add quals to TO as needed to make it reference-compatible.
932 2007-04-11 Jan Hubicka <jh@suse.cz>
934 * cp/class.c (convert_to_base_statically): Fold produced tree; verify
935 that we are not processing template_decl.
937 2007-04-09 Mark Mitchell <mark@codesourcery.com>
940 * class.c (build_base_path): Ensure that the converted pointer has
941 the same cv-qualification as the input.
943 2007-04-09 Paolo Carlini <pcarlini@suse.de>
945 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
947 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
949 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
951 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
952 * tree.c (cp_add_pending_fn_decls): Remove.
953 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
955 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
957 Revert change removing staticp.
959 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
961 * cp-objcp-common.c (cxx_staticp): Remove.
962 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
963 * cp-tree.h (cxx_staticp):
965 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
967 * class.c (check_for_override): Don't remove dllmport attribute
970 2007-04-03 Jakub Jelinek <jakub@redhat.com>
973 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
974 type issue error and return early.
976 2007-03-30 Jason Merrill <jason@redhat.com>
979 * typeck.c (cp_type_readonly): New fn.
980 * cp-tree.h: Declare it.
981 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
982 (cp_finish_decl): Not here.
984 2007-03-31 Richard Guenther <rguenther@suse.de>
986 * optimize.c (maybe_clone_body): Replace splay-tree usage by
989 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
994 * parser.c (declarator_can_be_parameter_pack): New.
995 (cp_parser_template_parameter): Only parse the `...' if the
996 declarator can be a parameter pack.
997 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
999 * pt.c (find_parameter_packs_r): Look into the bounds on integer
1000 types (they could be used as array bounds).
1001 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
1002 (tsubst_pack_expansion): Handle failure to expand parameter
1005 2007-03-30 Paolo Carlini <pcarlini@suse.de>
1008 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
1009 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
1010 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
1011 (CLASS_TYPE_NON_UNION_P): Add.
1012 (struct lang_type_class): Add has_complex_dflt.
1013 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
1014 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
1015 * cp-tree.def: Add TRAIT_EXPR.
1016 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
1017 * lex.c (struct resword): Add __has_nothrow_assign,
1018 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
1019 __has_trivial_constructor, __has_trivial_copy,
1020 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
1021 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
1022 __is_pod, __is_polymorphic, __is_union.
1023 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
1024 (cp_parser_trait_expr): New.
1025 * semantics.c (finish_trait_expr, trait_expr_value
1026 classtype_has_nothrow_copy_or_assign_p): New.
1027 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
1029 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
1030 * class.c (check_bases, check_field_decl, check_bases_and_members):
1031 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
1032 * pt.c (uses_template_parms, tsubst_copy_and_build,
1033 value_dependent_expression_p, type_dependent_expression_p): Deal with
1035 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
1037 2007-03-29 Richard Guenther <rguenther@suse.de>
1039 * tree.c (cp_walk_subtrees): Do not set input_location.
1041 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
1044 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
1047 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1049 * parser.c (struct cp_parser): Update comment for
1050 greater_than_is_operator_p.
1051 (cp_parser_primary_expression): In C++0x mode, a cast operator can
1052 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
1053 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
1054 !GREATER_THAN_IS_OPERATOR_P.
1055 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
1056 `>>' operators that will become two `>' tokens in C++0x.
1057 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
1058 mode, allowing it to terminate default arguments.
1059 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
1060 `>>' like two consecutive `>' tokens.
1061 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
1062 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
1063 ends a template argument.
1065 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1067 * decl.c (redeclaration_error_message): Complain when redeclaring
1068 a friend function with default template arguments (C++0x mode only).
1069 * cp-tree.h (check_default_tmpl_args): Declare.
1070 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
1071 template arguments in function templates. Add support for checking
1072 the default template arguments of friend templates.
1073 (push_template_decl_real): Fix call to check_default_tmpl_args.
1074 (type_unification_real): If a template parameter has not been
1075 deduced but provides a default template argument, substitute into
1076 that default template argument.
1077 * parser.c (cp_parser_init_declarator): When declaring (but not
1078 defining!) a function template in C++0x mode, check for default
1081 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1084 * decl.c (grokdeclarator): Deal with cv-qualified function type
1085 typedefs in the same way for member and non-member functions.
1087 2007-03-26 Dirk Mueller <dmueller@suse.de>
1089 * parser.c (cp_parser_member_declaration): Pedwarn
1090 about stray semicolons after member declarations.
1092 2007-03-26 Paolo Carlini <pcarlini@suse.de>
1095 * pt.c (instantiate_decl): Set in_system_header.
1097 2007-03-22 Mark Mitchell <mark@codesourcery.com>
1099 * cp-tree.h (current_tempalte_parms): Improve documentation.
1100 * pt.c (current_template_args): Likewise.
1103 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
1104 not consume tokens when failing.
1106 2007-03-22 Jim Wilson <wilson@specifix.com>
1107 Mark Mitchell <mark@codesourcery.com>
1110 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
1111 consistent with FROM.
1113 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1115 * error.c (dump_expr): Handle dependent names that designate types.
1116 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
1118 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
1120 * cp-tree.def, parser.c, pt.c: Fix comment typos.
1122 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1124 * cvt.c (cp_convert_and_check) : Define.
1125 * cp-tree.h (cp_convert_and_check): Declare.
1126 * call.c (convert_conversion_warnings): Rename to
1127 conversion_null_warnings. The warning for floating-point to
1128 integer is handled by convert_and_check in convert_like_real.
1129 (convert_like_real): convert_conversion_warnings was renamed as
1130 conversion_null_warnings.
1131 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
1132 overflow and changes of value during conversion.
1134 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1137 * parser.c (cp_parser_statement): If 'namespace' is found, this
1138 only can be a namespace alias definition, so parse it now.
1139 (cp_parser_namespace_alias_definition): if we find an open brace
1140 instead of '=', then this is actually a misplaced namespace
1143 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1146 * decl.c (cxx_init_decl_processing): Move command-line options
1147 processing to c-opts.c.
1149 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
1151 * ptree.c (cxx_print_type): Use formatting markup for integers
1152 when printing template parameter index/level/orig level.
1153 (cxx_print_xnode): Ditto.
1154 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
1155 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
1156 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
1158 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
1159 rather than a HOST_WIDE_INT.
1160 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
1161 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
1163 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
1164 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
1165 IN_BASE_INITIALIZER bool bitfields.
1166 (struct cp_declarator): Make KIND a 4-bit field. Make
1167 PARAMETER_PACK_P a bool bitfield just after KIND.
1168 * pt.c (uses_parameter_packs): Destroy the pointer set.
1169 (make_pack_expansion): Ditto.
1170 (check_for_bare_parameter_packs): Ditto.
1171 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
1173 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
1176 * call.c (convert_default_arg): Instead of copying the node,
1179 2007-03-15 Dirk Mueller <dmueller@suse.de>
1182 * call.c (convert_conversion_warnings): New..
1183 (convert_like_real): .. factored out from here.
1184 (convert_conversion_warnings): Add warning about
1185 false being converted to NULL in argument passing.
1187 2007-03-14 Dirk Mueller <dmueller@suse.de>
1189 * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
1190 (finish_do_body): Warn about empty body in do/while statement.
1192 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1194 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
1196 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1199 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
1202 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
1204 * cp/repo.c (init_repo): Initialize random_seed saved options.
1205 (finish_repo): Adjust.
1207 2007-03-13 Mark Mitchell <mark@codesourcery.com>
1210 * Make-lang.in (doc/g++.1): Use $< to specify the location from
1213 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
1215 * decl.c (compute_array_index_type): New warning flag warn_vla.
1217 2007-03-12 Mark Mitchell <mark@codesourcery.com>
1220 * call.c (convert_default_arg): Copy non-constant arguments.
1222 2007-03-11 Mark Mitchell <mark@codesourcery.com>
1225 * parser.c (cp_parser_postfix_expression): Disallow compound
1226 literals in constant expressions.
1229 * semantics.c (finish_typeof): Use unlowered_expr_type.
1231 2007-03-10 Mark Mitchell <mark@codesourcery.com>
1234 * cp-tree.h (unlowered_expr_type): New function.
1235 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
1236 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
1237 (unlowered_expr_type): New function.
1238 (build_unary_op): Disallow predecrements of bool bitfields.
1239 * call.c (build_conditional_expr): Use unlowered_expr_type.
1240 * pt.c (type_unification_real): Likewise.
1242 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
1245 * typeck.c (check_return_expr): Check for bare parameter packs.
1246 (comptypes): Compare template parameter packs and
1247 type pack expansions.
1248 * decl.c (grokdeclarator): Deal with the declaration of function
1250 (grokparms): Verify that the (optional) function parameter pack is
1251 at the end of the parameter list.
1252 (xref_basetypes): Handle pack expansions in the base class.
1253 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
1254 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
1255 (NONTYPE_ARGUMENT_PACK): New.
1256 (TYPE_PACK_EXPANSION): New.
1257 (EXPR_PACK_EXPANSION): New.
1258 (ARGUMENT_PACK_SELECT): New.
1259 * cp-objcp-common.c (cp_tree_size): Compute size of
1260 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
1261 ARGUMENT_PACK_SELECT.
1262 * error.c (dump_template_argument): Print template argument packs.
1263 (dump_template_argument_list): Ditto.
1264 (dump_template_parameter): Dump `...' for template type parameter
1266 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
1267 (dump_parameters): Print function parameter packs.
1268 (dump_template_parms): Print template argument packs.
1269 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
1270 (maybe_warn_variadic_templates): New.
1271 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
1272 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1273 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1275 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
1276 (write_template_arg): Write argument packs as separate arguments.
1277 * cp-tree.h (struct template_parm_index_s): Add flag that
1278 indicates that the template parameter is actually a parameter
1280 (struct tree_argument_pack_select): New.
1281 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
1282 (union lang_tree_node): Add argument_pack_select.
1283 (FUNCTION_PARAMETER_PACK_P): New.
1284 (PACK_EXPANSION_P): New.
1285 (PACK_EXPANSION_PATTERN): New.
1286 (SET_PACK_EXPANSION_PATTERN): New.
1287 (PACK_EXPANSION_PARAMETER_PACKS): New.
1288 (ARGUMENT_PACK_P): New.
1289 (ARGUMENT_PACK_ARGS): New.
1290 (SET_ARGUMENT_PACK_ARGS): New.
1291 (ARGUMENT_PACK_INCOMPLETE_P): New.
1292 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
1293 (TEMPLATE_PARM_PARAMETER_PACK): New.
1294 (TEMPLATE_TYPE_PARAMETER_PACK): New.
1295 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
1296 (ARGUMENT_PACK_SELECT_INDEX): New.
1297 (ARGUMENT_PACK_SELECT_ARG): New.
1298 (struct cp_declarator): Add parameter_pack_p flag.
1299 (maybe_warn_variadic_templates): Declare.
1300 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
1301 indicate a template parameter pack.
1302 (uses_parameter_packs): Declare.
1303 (template_parameter_pack_p): Declare.
1304 (template_parms_variadic_p): Declare.
1305 (make_pack_expansion): Declare.
1306 (check_for_bare_parameter_packs): Declare.
1307 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
1308 sizeof... expressions.
1309 (pp_cxx_expression): Print pack expansions and non-type argument
1311 (pp_cxx_exception_specification): Print pack expansions.
1312 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
1313 (pp_cxx_ctor_initializer): Print pack expansions.
1314 (pp_cxx_type_id): Print pack expansions.
1315 (pp_cxx_template_argument_list): Print argument packs.
1316 (pp_cxx_template_parameter): Print ellipsis for template parameter
1318 * pt.c (comp_template_parms): Compare template parameter packs.
1319 (template_parameter_pack_p): New.
1320 (template_parms_variadic_p): New.
1321 (template_args_variadic_p): New.
1322 (make_ith_pack_parameter_name): New.
1323 (struct find_parameter_pack_data): New.
1324 (find_parameter_packs_r): New.
1325 (uses_parameter_packs): New.
1326 (make_pack_expansion): New.
1327 (check_for_bare_parameter_packs): New.
1328 (expand_template_argument_pack): New.
1329 (reduce_template_parm_level): Propagate parameter pack flag.
1330 (process_template_parm): Add is_parameter_pack parameter to state
1331 when the parameter is actually a parameter pack. Create template
1332 parameter packs when is_parameter_pack is true.
1333 (current_template_args): The argument for a template parameter
1334 pack is an argument pack containing a single pack expansion.
1335 (process_partial_specialization): When checking that non-type
1336 argument expressions do not involve template parameters, loop over
1337 the arguments in argument packs separately.
1338 (push_template_decl_real): Check that the type of the declaration
1339 does not have any bare parameter packs. Check that primary
1340 templates have no more than one parameter pack, and that it comes
1341 at the end of the template parameter list.
1342 (convert_template_argument): Handle coercions for pack expansion
1343 expressions by coercing the pattern then rebuilding the expansion.
1344 (coerce_template_parms): When coercing the arguments for a
1345 variadic template, pack "extra" arguments into an argument pack.
1346 (coerce_template_template_parms): Cannot coerce between parameter
1347 packs and non-pack parameters.
1348 (template_args_equal): Compare PACK_EXPANSION_P expressions.
1349 (comp_template_args): Expand all template arguments packs before
1350 comparing template argument lists.
1351 (mangle_class_name_for_template): Make argument packs as separate
1353 (for_each_template_parm_r): No need to handle BASELINK.
1354 (instantiate_class_template): Handle pack expansions in the base
1356 (tsubst_pack_expansion): New.
1357 (tsubst_template_args): Handle substitutions of argument packs and
1358 pack expansion into template argument lists.
1359 (tsubst_decl): Expand function parameter packs into separate
1360 function parameters.
1361 (tsubst_arg_types): Expand a type pack expansion into separate
1363 (tsubst_exception_specification): Handle pack expansions in
1364 exception specifiers.
1365 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
1366 replacing a template parameter with its argument. If we encounter
1367 a substitution for an argument pack, just return the parameter
1369 (tsubst_copy): sizeof(X...) returns the number of elements in
1370 parameter pack X. See through ARGUMENT_PACK_SELECT when the
1371 PARM_DECL is a parameter pack.
1372 (tsubst_expr): Expression pack expansions and argument packs
1373 cannot show up here; they will all be handled through function
1374 calls, sizeof, and template argument lists.
1375 (tsubst_copy_and_build): sizeof(X...) returns the number of
1376 elements in parameter pack X. Handle pack expansions in TREE_LIST
1377 and CONSTRUCTOR nodes.
1378 (fn_type_unification): Handle "incomplete" explicit template
1379 argument lists that specify some of the arguments for a template
1381 (type_unification_real): Unify arguments against pack expansions.
1382 (template_parm_level_and_index): New, helper function.
1383 (unify_pack_expansion): New.
1384 (unify): Unify argument packs on an argument-by-argument basis,
1385 handling variadic argument packs as well.
1386 (more_specialized_fn): Handle unification of function parameter
1387 packs. All things being equal, prefer non-variadic function
1388 templates to variadic function templates.
1389 (more_specialized_class): Prefer the variadic class template
1390 partial specialization that binds fewer arguments to a parameter
1392 (regenerate_decl_from_template): Expand function parameter packs
1393 into separate parameters.
1394 (instantiate_decl): Ditto.
1395 (tsubst_initializer_list): Handle pack expansions for base-class
1397 (dependent_type_p_r): Determine dependent types in argument packs
1398 and pack expansions.
1399 (value_dependent_expression_p): Determine value-dependence of
1400 non-type argument packs.
1401 (dependent_template_arg_p): Handle argument packs.
1402 * semantics.c (finish_cond): Check for bare parameter packs.
1403 (finish_expr_stmt): Ditto.
1404 (finish_for_expr): Ditto.
1405 (finish_switch_cond): Ditto.
1406 (finish_mem_initializers): Ditto.
1407 * name-lookup.c (arg_assoc_type): Handle pack expansions and
1409 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
1410 * parser.c (make_declarator): Declarator is not an expansion.
1411 (make_pointer_declarator): Transfer parameter pack flag to outer
1413 (make_reference_declarator): Ditto.
1414 (make_ptrmem_declarator): Ditto.
1415 (make_call_declarator): Ditto.
1416 (make_array_declarator): Ditto.
1417 (cp_parser_postfix_expression): Allow pack expansion expressions
1418 in the argument list for a call expression.
1419 (cp_parser_parenthesized_expression_list): Add new parameter
1420 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
1421 into separate arguments."
1422 (cp_parser_new_placement): Allow pack expansion expressions.
1423 (cp_parser_new_initializer): Ditto.
1424 (cp_parser_mem_initializer_list): Allow ellipsis to create a
1425 base-class initializer expansion.
1426 (cp_parser_mem_initializer): Ditto.
1427 (cp_parser_template_parameter_list): Keep track of whether the
1428 template parameter is a template parameter pack.
1429 (cp_parser_template_parameter): Parse the ellipsis to indicate a
1430 template parameter pack.
1431 (cp_parser_type_parameter): Ditto.
1432 (cp_parser_template_argument_list): Parse the ellipsis to indicate
1434 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
1435 this declarator is a parameter pack.
1436 (cp_parser_parameter_declaration): The ellipsis does not end the
1437 parameter declaration, because it might be a parameter pack. Parse
1438 the ellipsis to indicate a parameter pack.
1439 (cp_parser_initializer): Allow pack expansions.
1440 (cp_parser_initializer_list): Allow ellipsis to create an
1441 initializer expansion.
1442 (cp_parser_base_clause): Allow ellipsis to create a base specifier
1444 (cp_parser_type_id_list): Allow ellipsis to create an exception
1445 specifier expansion.
1446 (cp_parser_attribute_list): Don't allow pack expansions.
1447 (cp_parser_functional_cast): Allow pack expansions.
1448 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
1449 compute the length of a parameter pack.
1450 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
1451 end a template argument.
1452 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1453 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1456 2007-03-09 Dirk Mueller <dmueller@suse.de>
1458 * cp/call.c (build_new_op): Call warn_logical_operator.
1460 2007-03-08 Volker Reichelt <reichelt@netcologne.de>
1463 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
1466 * pt.c (any_template_arguments_need_structural_equality_p):
1469 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
1471 * decl.c (grokdeclarator): Disable warnings for anonymous
1474 2007-03-05 Volker Reichelt <reichelt@netcologne.de>
1476 * typeck2.c (readonly_error): Always emit a hard error.
1477 Remove last argument.
1478 * cp-tree.h (readonly_error): Adjust prototype.
1479 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
1480 * typeck.c (build_unary_op): Likewise.
1481 (build_modify_expr): Likewise.
1483 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
1486 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
1488 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1491 * parser.c (struct cp_parser): New IN_IF_STMT.
1492 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
1493 returning if parsing the body of an 'if' statement or issuing an
1494 error and continuing.
1495 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
1497 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
1499 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
1502 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
1505 2007-03-02 Geoffrey Keating <geoffk@apple.com>
1507 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
1508 Objective-C++. Don't exit early if -shared-libgcc needs to be
1511 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1513 * typeck.c (common_base_type): Delete unused function.
1515 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
1517 * Make-lang.in: Add dummy lang.install-pdf target.
1519 2007-03-01 Simon Baldwin <simonb@google.com>
1522 * decl.c (check_tag_decl): Added new warning for typedef ignored
1523 when it precedes an otherwise valid non-typedef declaration.
1525 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
1527 * typeck.c (build_function_call): Store converted arguments
1528 in a stack-allocated array instead of building a list.
1529 (convert_arguments): Store arguments in the array passed in as an
1530 argument, and return the actual number of arguments.
1531 * call.c (build_call): Delete, and replace with...
1532 (build_call_n, build_call_a): New.
1533 (build_op_delete_call): Rewrite to avoid constructing argument lists.
1534 (build_over_call): Store converted arguments in a stack-allocated
1535 array instead of building a list.
1536 (build_cxx_call): Pass arguments in an array instead of as a list.
1537 (build_java_interface_fn_ref): Rewrite to avoid constructing
1539 * tree.h: Update declarations to reflect above changes.
1540 * method.c (use_thunk): Use a stack-allocated array to hold
1541 the arguments instead of a list.
1542 * rtti.c (throw_bad_cast): Update call to cxx_call.
1543 (throw_bad_typeid): Likewise.
1544 (build_dynamic_cast_1): Likewise.
1545 * init.c (build_builtin_delete_call): Use build_call_n.
1546 * decl.c (expand_static_init): Likewise.
1547 * except.c (cp_protect_cleanup_actions): Likewise.
1548 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
1549 (gimplify_must_not_throw_expr): Likewise.
1550 (cxx_omp_apply_fn): Use build_call_a.
1552 2007-02-26 Mark Mitchell <mark@codesourcery.com>
1554 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
1555 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
1557 2007-02-25 Mark Mitchell <mark@codesourcery.com>
1559 * cp-tree.h (static_ctors): Remove.
1560 * cp-tree.h (static_dtors): Likewise.
1561 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
1562 refactoring of tree_map hierarchy.
1563 (decl_shadowed_for_var_insert): Likewise.
1564 * semantics.c (expand_body): Use c_expand_body.
1565 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
1566 * decl2.c (static_ctors): Remove.
1567 (static_dtors): Likewise.
1568 (generate_ctor_or_dtor_function): Pass NULL_TREE to
1569 objc_generate_static_init_call. Do not call static_[cd]tors.
1570 (generate_ctor_and_dtor_functions_for_priority): Do not check for
1572 (cp_write_global_declarations): Likewise.
1574 2007-02-23 Richard Guenther <rguenther@suse.de>
1576 * class.c (note_name_declared_in_class): Make declaration
1577 changes meaning a pedwarn.
1579 2007-02-22 Michael Matz <matz@suse.de>
1582 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
1583 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
1584 dump_function_decl): Guard emitting outer scopes by new flag.
1585 * cp-lang.c (cxx_dwarf_name): New function.
1586 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
1587 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
1589 (push_template_decl_real, lookup_template_class): Remove calls
1592 2007-02-19 Mark Mitchell <mark@codesourcery.com>
1594 * call.c (build_new_method_call): Ensure that explicit calls of
1595 destructors have type "void".
1597 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1599 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
1600 and -Walways-true with -Waddress.
1601 * cvt.c (convert_to_void): Replace unconditional warning with
1604 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
1606 * decl.c, tree.c: Fix comment typos.
1608 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1611 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
1612 statement expression if we had an error mark node.
1614 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
1615 Brooks Moses <brooks.moses@codesourcery.com>
1616 Lee Millward <lee.millward@codesourcery.com>
1618 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
1619 Change class to tcc_vl_exp.
1621 * call.c (build_call): Use build_call_list instead
1623 (build_over_call): Likewise.
1624 (build_new_method_call): Use build_min_non_dep_call_list
1625 instead of build_min_non_dep.
1627 * error.c (dump_call_expr_args): New function.
1628 (dump_aggr_init_expr_args): New function.
1629 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
1630 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
1632 * cvt.c (convert_to_void): Use build_call_array instead
1633 of build3; use new AGGR_INIT_EXPR accessor macros.
1635 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
1636 instead of TREE_CODE_LENGTH.
1638 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
1639 AGGR_INIT_EXPR accessor macros.
1641 * cp-gimplify.c (cp_gimplify_init_expr): Use
1642 AGGR_INIT_EXPR_SLOT to set the slot operand.
1644 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
1645 (AGGR_INIT_EXPR_SLOT): New macro.
1646 (AGGR_INIT_EXPR_ARG): New macro.
1647 (aggr_init_expr_nargs): New macro.
1648 (AGGR_INIT_EXPR_ARGP): New macro.
1649 (aggr_init_expr_arg_iterator): New.
1650 (init_aggr_init_expr_arg_iterator): New.
1651 (next_aggr_init_expr_arg): New.
1652 (first_aggr_init_expr_arg): New.
1653 (more_aggr_init_expr_args_p): New.
1654 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
1655 (stabilize_aggr_init): New declaration.
1656 (build_min_non_dep_call_list): Likewise.
1658 * tree.c (process_aggr_init_operands): New function.
1659 (build_aggr_init_array) New function.
1660 (build_cplus_new): Update to use new CALL_EXPR and
1661 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
1662 build_aggr_init_array.
1663 (build_min_non_dep_call_list) New function.
1664 (build_min_nt): Assert input code parameter is not a variable
1665 length expression class.
1666 (build_min, build_min_non_dep): Likewise.
1667 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
1668 to check for equality instead of recursing. Handle tcc_vl_exp
1670 (stabilize_call): Update to only handle CALL_EXPRs, not
1671 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
1672 (stabilize_aggr_init): New function.
1673 (stabilize_init): Use it.
1675 * cxx-pretty-print.c (pp_cxx_postfix_expression)
1676 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
1677 AGGR_INIT_EXPR accessor macros and argument iterators.
1679 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
1680 build_vl_exp. Iterate through the operands, recursively
1681 processing each one.
1682 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
1683 CALL_EXPR accessor macros.
1684 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
1685 tree code classes. Use TREE_OPERAND_LENGTH instead of
1688 * semantics.c (finish_call_expr): Use build_nt_call_list
1689 instead of build_nt.
1690 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
1691 accessor macros. Use build_call_array to construct the
1692 CALL_EXPR node instead of build3
1694 * decl2.c (build_offset_ref_call_from_tree): Use
1695 build_nt_call_list and build_min_non_dep_call_list instead
1696 of build_min_nt and build_min_non_dep.
1698 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
1699 Use build_nt_call_list instead of build_min_nt.
1701 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1704 * call.c (build_conditional_expr): Improve error message.
1706 2007-02-13 Dirk Mueller <dmueller@suse.de>
1708 * friend.c (do_friend): Annotate warning about friend
1709 declarations in templates with OPT_Wnon_template_friend.
1710 Convert informal message from warning() to inform().
1712 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
1713 Mark Mitchell <mark@codesourcery.com>
1716 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
1717 instantiations for variables.
1719 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1722 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
1723 Check warn_unused_value just once.
1725 2007-02-11 Mark Mitchell <mark@codesourcery.com>
1728 * pt.c (determine_specialization): Use skip_artificial_parms_for.
1729 (fn_type_unificiation): Likewise.
1730 (get_bindings): Likewise.
1732 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
1735 * decl.c (finish_function): Use DECL_REPLACEABLE.
1736 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1738 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
1740 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
1742 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
1744 * decl.c (grokvardecl): Don't error if !have_tls.
1745 (grokdeclarator): Likewise.
1746 * parser.c (cp_parser_omp_threadprivate): Likewise.
1748 2007-02-07 Jakub Jelinek <jakub@redhat.com>
1751 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
1752 parameters and result decls in omp clauses.
1753 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
1756 2007-02-05 Dirk Mueller <dmueller@suse.de>
1759 * parser.c (cp_parser_class_specifier): Always initialize bases.
1761 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
1763 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
1764 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
1765 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
1767 * semantics.c (finish_omp_atomic): Store a whole expression node
1768 in operand 1, and integer_zero_node in operand 0, for dependent
1769 OMP_ATOMIC. Rewrite to make flow easier to understand.
1771 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1773 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
1775 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
1777 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
1778 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
1780 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
1782 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
1783 keyword warning to -Wc++0x-compat.
1785 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1787 * decl.c (grokdeclarator): Update documentation.
1789 2007-02-02 Jakub Jelinek <jakub@redhat.com>
1792 * decl.c (grokdeclarator): If __thread is used together with
1793 a storage class other than extern and static, clear thread_p
1794 after issuing diagnostics and fall through to checking the
1797 2007-01-30 Roger Sayle <roger@eyesopen.com>
1799 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
1800 calculating the size of an array (to avoid recursive errors).
1802 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1805 * typeck.c (build_binary_op): Fix logic for warning. Move warning
1807 * call.c (convert_like_real): Don't warn when converting to
1810 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1812 * decl.c (pop_label): Replace warning with call to
1813 warn_for_unused_label.
1815 2007-01-28 Andrew Pinski <pinskia@gmail.com>
1818 * semantics.c (finish_pseudo_destructor_expr): Check the
1819 destrutor name by calling check_dtor_name.
1821 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
1823 * lex.c (D_CPP0X): Rename.
1825 (reswords): D_CPP0X -> D_CXX0X.
1826 (init_reswords): Ditto.
1827 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
1828 of C++0x keywords as identifiers.
1830 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
1833 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
1836 2007-01-23 Ian Lance Taylor <iant@google.com>
1838 * typeck.c (convert_for_assignment): Only warn about a = b = c
1839 when converting to bool.
1841 2007-01-23 Roger Sayle <roger@eyesopen.com>
1843 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
1845 * typeck.c (ignore_overflows): Remove the remaining uses of
1846 TREE_CONSTANT_OVERFLOW.
1848 2007-01-20 Jan Hubicka <jh@suse.cz>
1850 * decl2.c (start_objects, start_static_storage_duration_function):
1851 Do not make the functions uninlinable.
1853 2007-01-17 Ian Lance Taylor <iant@google.com>
1855 * class.c (add_method): Call VEC_reserve_exact rather than passing
1856 a negative size to VEC_reserve.
1858 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
1861 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
1863 2007-01-10 Mark Mitchell <mark@codesourcery.com>
1866 * decl.c (make_typename_type): If the qualified name is not a
1867 type, issue an error.
1868 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
1871 2007-01-08 Geoffrey Keating <geoffk@apple.com>
1873 * rtti.c: Include target.h.
1874 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
1875 don't emit typeinfo for fundamental types as weak.
1876 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
1878 2007-01-08 Richard Guenther <rguenther@suse.de>
1880 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
1882 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
1884 * call.c (standard_conversion): Pass flag to
1885 vector_types_convertible_p to disallow emission of note.
1886 * typeck.c (convert_for_assignment): Pass flag to
1887 vector_types_convertible_p to allow emission of note.
1888 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
1889 to disallow emission of note.
1891 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1894 * typeck.c (build_binary_op): Call overflow_warning if
1895 TREE_OVERFLOW_P is true for the result and not for any of the
1898 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
1901 * class.c (add_method): Don't wait until template
1902 instantiation time to complain about duplicate methods.
1904 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1907 * semantics.c (finish_unary_op_expr): Warn only if result
1908 overflowed and operands did not.
1910 2007-01-05 Ian Lance Taylor <iant@google.com>
1912 * typeck.c (build_binary_op): Warn about comparing a non-weak
1915 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
1917 * pt.c (tsubst): Propagate the need for structural equality checks
1918 when reducing the level of template parameters.
1920 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
1922 * pt.c: Fix a comment typo.
1924 2007-01-02 Ian Lance Taylor <iant@google.com>
1926 * semantics.c (maybe_convert_cond): Optionally warn when using an
1927 assignment as a condition.
1928 * typeck.c (convert_for_assignment): Optionally warn about
1929 assigning the result of an assignment to a bool.
1931 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
1933 * pt.c (canonical_template_parms): Correct typo in comment.
1935 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
1937 * typeck.c (structural_comptypes): Renamed from "comptypes".
1938 (comptypes): Use canonical type information to perform fast type
1939 comparison. When VERIFY_CANONICAL_TYPES, verify that the
1940 canonical type comparison returns the same results as we would see
1941 from the current, structural check. Support COMPARE_STRUCTURAL
1942 when we need structural checks.
1943 * decl.c (typename_compare): Fix comment.
1944 (build_typename_type): TYPENAME_TYPE nodes require structural
1945 equality checks, because they resolve different based on the
1947 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
1948 require structural equality checks (for now).
1949 (build_ptrmemfunc_type): Build the canonical pointer to member
1951 (compute_array_index_type): Whenever we build a new index type
1952 to represent the size of an array in a template, we need to mark
1953 this index type as requiring structural equality. This goes for
1954 arrays with value-dependent sizes with the current ABI, or all
1956 * tree.c (cplus_array_hash): New.
1957 (struct cplus_array_info): New.
1958 (cplus_array_compare): New.
1959 (cplus_array_htab): New.
1960 (build_cplus_array_type_1): Use a hash table to cache the array
1961 types we build. Build the canonical array type for each array
1963 (cp_build_qualified_type_real): When building a cv-qualified array
1964 type, use the hash table of array types and build canonical array
1966 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
1967 use structural equality (for now).
1968 * cp-tree.h (COMPARE_STRUCTURAL): New.
1969 * pt.c (canonical_template_parms): New.
1970 (canonical_type_parameter): New.
1971 (process_template_parm): Find the canonical type parameter.
1972 (lookup_template_class): When we have named the primary template
1973 type, set the canonical type for our template class to the primary
1974 template type. If any of the template arguments need structural
1975 equality checks, the template class needs structural equality
1977 (tsubst): When reducing the level of a template template
1978 parameter, we require structural equality tests for the resulting
1979 parameter because its template parameters have not had their types
1980 canonicalized. When reducing a template type parameter, find the
1981 canonical reduced type parameter.
1982 (any_template_arguments_need_structural_equality_p): New.