1 2008-09-15 Aldy Hernandez <aldyh@redhat.com>
3 * decl.c (duplicate_decls): Call error_at.
4 (grokfndecl): New location argument. Use location if available.
5 (grokdeclarator): Pass declarator location to grokfndecl.
6 * cp-tree.h (struct cp_declarator): Update comment for id_loc.
7 * decl2.c (check_classfn): Use error_at.
8 * parser.c (cp_parser_init_declarator): Set function_start_locus
10 (cp_parser_member_declaration): Set id_loc for function declarators.
12 2008-09-09 Jan Hubicka <jh@suse.cz>
15 * pt.c (tsubst_decl): Do not copy DECL_STRUCT_FUNCTION pointer.
17 2008-09-09 Jakub Jelinek <jakub@redhat.com>
20 * tree.c (array_type_nelts_top): Add size_one_node instead of
23 2008-09-09 Jason Merrill <jason@redhat.com>
26 * pt.c (tsubst_copy) [PARM_DECL]: Don't abort if the parm has
29 2008-09-09 Jakub Jelinek <jakub@redhat.com>
32 * decl.c (build_enumerator): Handle previous value's DECL_INITIAL
33 being error_operand_p. Don't clear value if it was error_mark_node.
35 2008-09-09 Paolo Bonzini <bonzini@gnu.org>
37 * cp-objcp-common.h (LANG_HOOKS_EXPAND_DECL): Remove.
38 * cp-tree.h: Don't mention DECL_ANON_UNION_ELEMS.
39 * semantics.c (anon_aggr_type_p): Remove.
41 2008-09-06 Jason Merrill <jason@redhat.com>
44 * parser.c (cp_parser_parameter_declaration_list): Process the
45 PARM_DECLs as we go and push them. Return a TREE_LIST.
46 (cp_parser_parameter_declaration_clause): Return a TREE_LIST.
47 (cp_parser_direct_declarator): Create a binding level and
48 suppress deprecated warnings in the parameter list.
49 (make_call_declarator): PARMS is now a tree.
50 * cp-tree.h (struct cp_declarator): Function parms are now a tree.
51 * decl.h (enum deprecated_states, deprecated_state): Move here.
53 (type_is_deprecated): New fn.
54 (grokparms): PARMLIST is a tree now. Warn about parms that
56 * mangle.c (write_expression): Handle PARM_DECL, CALL_EXPR and
58 * pt.c (tsubst) [DECLTYPE_TYPE]: Set skip_evaluation.
59 (tsubst_copy) [PARM_DECL]: Handle a PARM_DECL used outside of a
61 * name-lookup.c (pushtag): Look through function parameter scopes.
62 (pushdecl_maybe_friend): Don't set DECL_CONTEXT on a PARM_DECL
63 when we're parsing a function declarator.
65 2008-09-05 Douglas Gregor <doug.gregor@gmail.com>
68 * tree.c (cp_build_qualified_type_real): Deal with sharing of
69 TYPE_LANG_SPECIFIC in the canonical types of pointer-to-method
72 2008-09-04 Ian Lance Taylor <iant@google.com>
74 * parser.c (check_no_duplicate_clause): Change code parameter to
77 2008-09-03 Jakub Jelinek <jakub@redhat.com>
80 * decl.c (cp_finish_decl): Only set
81 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P if decl is VAR_DECL.
84 * cp-tree.h (defer_mark_used_calls, deferred_mark_used_calls): New
86 * decl2.c (mark_used): If defer_mark_used_calls, push decl into
87 deferred_mark_used_calls vector and exit early.
88 * decl.c (defer_mark_used_calls, deferred_mark_used_calls): New
90 (finish_function): Set defer_mark_used_calls for the duration of the
91 function. Call mark_used on any queued decls.
93 2008-09-02 Jason Merrill <jason@redhat.com>
96 * call.c (build_over_call): Make =delete work with SFINAE.
97 * class.c (resolve_address_of_overloaded_function): Likewise.
99 * cp-tree.h (struct lang_decl_flags): Rename threadprivate_p to
100 threadprivate_or_deleted_p.
101 (CP_DECL_THREADPRIVATE_P): Adjust.
102 (DECL_DELETED_FN): Likewise.
103 (SD_UNINITIALIZED, SD_INITIALIZED, SD_DEFAULTED): New macros.
104 (SD_DELETED): New macro.
105 * parser.c (cp_parser_init_declarator): Use them.
106 * decl.c (start_decl): Use them.
108 * decl2.c (mark_used): Give =deleted error even in sizeof.
110 * typeck2.c (check_narrowing): Downgrade narrowing error to
113 2008-09-02 Aldy Hernandez <aldyh@redhat.com>
115 * typeck.c (build_array_ref): Use new location argument.
116 * class.c (build_vtbl_ref_1): Pass location to build_array_ref.
117 * call.c (build_new_op): Same.
118 * decl2.c (grok_array_decl): Same.
119 * cp-tree.h (build_array_ref): Add location argument to prototype.
121 2008-09-01 Aldy Hernandez <aldyh@redhat.com>
123 * typeck.c (build_x_indirect_ref): Add location argument.
124 * class.c (build_base_path): Pass location to build_indirect_ref.
125 * pt.c (tsubst_copy_and_build): Pass location to
126 finish_label_address_expr.
127 * parser.c (cp_parser_unary_expression): Same.
129 2008-08-31 Jason Merrill <jason@redhat.com>
131 Implement late-specified return type using 'auto'.
132 * cp-tree.h (struct cp_declarator): Add late_return_type field to
134 * parser.c (cp_parser_late_return_type_opt): New fn.
135 (cp_parser_direct_declarator): Use it.
136 (make_call_declarator): Put it in the declarator.
137 * decl.c (grokdeclarator): Splice in late-specified return type.
138 * pt.c (splice_late_return_type): New fn.
140 2008-08-29 Michael Meissner <gnu@the-meissners.org>
142 * decl.c (builtin_function_1): Take a bool argument to decide
143 whether to use pushdecl or pushdecl_top_level.
144 (duplicate_decls): Copy function specific target and optimization
145 options on duplicate declarations.
146 (cxx_builtin_function): Update builtin_function_1 call.
147 (cxx_builtin_function_ext_scope): New function, guarantee that the
148 declaration is done at global scope.
150 * cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE): New
151 macro, define builtin function hook for delayed machine specific
154 * cp-tree.h (cxx_builtin_function_ext_scope): Add declaration.
156 2008-08-30 Jason Merrill <jason@redhat.com>
159 * pt.c (dependent_type_p): Don't abort on auto outside of a template.
161 2008-08-29 Jason Merrill <jason@redhat.com>
163 Implement C++0x 'auto' semantics.
164 * decl.c (start_decl_1): Don't complain about auto being incomplete.
165 (cp_finish_decl): Deduce auto.
166 * init.c (build_new): Handle 'new auto'.
167 * typeck2.c (cxx_incomplete_type_diagnostic): Give a different
168 message for auto than for normal template type parms.
169 * pt.c (type_dependent_expression_p): Handle { }.
170 (make_auto): New function.
171 (listify_autos): New function.
172 (do_auto_deduction): New function.
173 (is_auto): New function.
174 (type_uses_auto): New function.
175 * cp-tree.h: Declare them.
176 * parser.c (cp_parser_decl_specifier_seq): In C++0x mode, don't
177 treat auto as a declspec.
178 (cp_parser_simple_type_specifier): It's a type-specifier.
180 2008-08-29 Mark Mitchell <mark@codesourcery.com>
182 * mangle.c (write_type): Add target-specific manglings for
183 non-fundamental types to the substitution table.
186 2008-08-29 Jakub Jelinek <jakub@redhat.com>
190 * name-lookup.c (do_using_directive, cp_emit_debug_info_for_using):
191 Adjust debug_hooks->imported_module_or_decl callers.
193 2008-08-29 Jan Hubicka <jh@suse.cz>
195 * cp-gimplify.c (cp_gimplify_expr): Add PRED_CONTINUE heuristic.
197 2008-08-28 Paolo Carlini <paolo.carlini@oracle.com>
200 * decl.c (reshape_init_r): Check init for error_mark_node.
202 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
205 * semantics.c (maybe_convert_cond): Call verify_sequence_points.
206 (finish_return_stmt): Likewise.
207 (finish_switch_condition): Likewise.
209 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
211 * cp-tree.h: Fix #error directive.
213 2008-08-26 Douglas Gregor <doug.gregor@gmail.com>
215 * typeck.c (type_after_usual_arithmetic_conversions): Don't do the
216 usual arithmetic conversions on scoped enumeration types.
217 (common_type): Ditto.
218 (default_conversion): Don't perform integral promotions on scoped
220 (build_array_ref): Scoped enumeration types can't be used as
222 * decl.c (start_enum): If building a C++0x scoped enumeration,
223 enter its scope. If provided with an underlying type, check that
224 underlying type and set up the enumeration type accordingly.
225 (finish_enum): Only compute an underlying type if the underlying
226 type isn't already fixed, and only convert the enumerator values
227 now if we've just computed the underlying type. Finish the scope
228 of C++0x scoped enumerations.
229 (build_enumerator): For enumerations with a fixed underlying type,
230 check the enumerator values when the enumerator is defined.
231 (lookup_enumerator): New.
232 * call.c (standard_conversion): Don't allow assignment from
233 integers to scoped enumeration types, even with -fpermissive.
234 Don't convert from scoped enumerations to bool or any arithmetic
236 (build_conditional_expr): Don't per the usual arithmetic
237 conversions for scoped enumeration types.
238 (convert_like_real): Check complain to see if we should
240 * error.c (class_key_or_enum_as_string): Print scoped enums.
241 * cp-tree.h (MAYBE_CLASS_TYPE_P): Check CLASS_TYPE_P, not
243 (INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P): New.
244 (SCOPED_ENUM_P): New.
245 (UNSCOPED_ENUM_P): New.
246 (SET_SCOPED_ENUM_P): New.
247 (ENUM_UNDERLYING_TYPE): New.
248 * pt.c (lookup_template_class): Update the instantiation of enum
249 types to deal with C++0x scoped enumerations and underlying
251 * name-lookup.c (begin_scope): Deal with scoped enumeration
253 (lookup_qualified_name): Deal with lookup into enumeration types.
254 * name-lookup.h (enum scope_kind): Add sk_scoped_enum.
255 * parser.c (cp_parser_class_or_namespace_name): Rename to...
256 (cp_parser_qualifying_entity): ... this. Also, in C++0x mode,
257 parse a type-name that can be an enumeration type.
258 (cp_parser_nested_name_specifier_opt): Update with C++0x grammar.
259 (cp_parser_elaborated_type_specifier): Parse the
260 optional `struct' or `class' following enum (in C++0x).
261 (cp_parser_enum_specifier): Parse C++0x scoped enumerations and
264 2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
266 * typeck.c: Update all calls to pedwarn.
271 * name-lookup.c: Likewise.
272 * parser.c: Likewise.
274 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
277 * parser.c (cp_parser_omp_for_loop): Handle parenthesized
280 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
282 * parser.c: Update all calls to inform.
283 * typeck.c: Likewise.
287 * method.c: Likewise.
288 * friend.c: Likewise.
289 * typeck2.c: Likewise.
291 * name-lookup.c: Likewise.
294 2008-08-19 Jakub Jelinek <jakub@redhat.com>
297 * error.c (cp_print_error_function): Deal with recursive BLOCK trees.
299 2008-08-18 Tomas Bily <tbily@suse.cz>
301 * tree.c (cp_tree_equal): Use CONVERT_EXPR_CODE_P.
303 2008-08-18 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
305 * typeck.c: Update all callers of permerror.
310 * except.c: Likewise.
312 * typeck2.c: Likewise.
314 * semantics.c: Likewise.
315 * name-lookup.c: Likewise.
318 * parser.c: Likewise.
320 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
323 * pt.c (check_template_shadow): Change to return a bool.
324 * name-lookup.c (push_class_level_binding): Early return if
325 check_template_shadow returns false.
326 * cp-tree.h (check_template_shadow): Adjust declaration.
328 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
331 * decl.c (grokdeclarator): In case of extern and initializer, return
332 error_mark_node after the error.
334 2008-08-13 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
337 * decl.c (grokfndecl): Call check_main_parameters_type only if
340 2008-08-12 Paolo Carlini <paolo.carlini@oracle.com>
343 * parser.c (cp_parser_class_head): Early return error_mark_node in
344 case of global qualification of class name or qualified name that
345 does not name a class.
347 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
350 * cvt.c (ocp_convert): Warn for out-of-range conversions to enum.
352 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
355 * cp-tree.h (struct diagnostic_context, struct diagnostic_info):
356 Delete forward declarations. Check that toplev.h has not been
357 included before this file. Include toplev.h and diagnostic.h.
358 * error.c (cp_cpp_error): Use DK_PEDWARN.
359 (cxx_incomplete_type_diagnostic): Update declaration.
360 (cxx_incomplete_type_error): Use DK_ERROR.
361 * typeck2.c (cxx_incomplete_type_diagnostic): Take a diagnostic_t
362 as argument. Use emit_diagnostic.
363 (cxx_incomplete_type_error): Use DK_ERROR.
364 (add_exception_specifier): Use diagnostic_t instead of custom
366 * typeck.c (complete_type_or_else): Update call to
367 cxx_incomplete_type_diagnostic.
368 * init.c (build_delete): Likewise.
369 * call.c (diagnostic_fn_t): Remove unused typedef.
370 (build_temp): Pass a pointer to diagnostic_t.
371 (convert_like_real): Use emit_diagnostic.
372 (joust): Check return value of warning before giving informative
374 * friend.c (do_friend): Check return value of warning
375 before giving informative note.
376 * parser.c (cp_parser_template_id): Likewise.
378 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
381 * class.c (check_bases_and_members): Warn with -Wuninitialized
384 2008-08-08 Volker Reichelt <v.reichelt@netcologne.de>
387 * decl.c (xref_basetypes): Check base for MAYBE_CLASS_TYPE_P,
388 and make sure it is not a union.
390 2008-08-07 H.J. Lu <hongjiu.lu@intel.com>
392 * semantics.c (finish_decltype_type): Initialize type.
394 2008-08-07 Douglas Gregor <doug.gregor@gmail.com>
396 * semantics.c (finish_decltype_type): Handle calls to function
397 pointers and references to functions properly.
399 2008-08-06 Douglas Gregor <doug.gregor@gmail.com>
402 * parser.c (cp_parser_template_argument): Don't assume that '>>'
403 following a type-id is an error when in C++0x mode.
405 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
408 * decl.c (grokdeclarator): Use explicit location with permerror_at.
410 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
413 * typeck.c (cp_build_binary_op): Move code to c-common.c.
415 2008-08-05 Jason Merrill <jason@redhat.com>
418 * decl.c (build_ptrmemfunc_type): Don't require structural
419 comparison of PMF types.
420 * tree.c (cp_build_qualified_type_real): Don't clear
421 a valid TYPE_PTRMEMFUNC_TYPE.
422 * typeck.c (cp_build_unary_op): Still do build_ptrmemfunc in
425 2008-08-04 Jason Merrill <jason@redhat.com>
428 * typeck2.c (check_narrowing): Allow narrowing conversion
429 from an explicit floating-point constant.
432 * pt.c (tsubst_decl): Leave DECL_INITIAL set on deleted
435 2008-08-04 Simon Baldwin <simonb@google.com>
438 * parser.c (cp_parser_elaborated_type_specifier): Warn only when
439 the declaration's id is followed by a semicolon.
441 2008-07-31 Jakub Jelinek <jakub@redhat.com>
444 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Call
445 complete_type_or_else even for UNKNOWN_TYPE to get diagnostics.
447 2008-07-31 Jason Merrill <jason@redhat.com>
450 * init.c (build_new_1): Don't convert pointer to the data type
451 until we're actually going to treat it as that type.
454 * tree.c (build_aggr_init_expr): Split out...
455 (build_cplus_new): ...from here.
456 (stabilize_init): Don't mess with AGGR_INIT_EXPR either.
457 * init.c (build_new_1): new T() means value-initialization,
458 not default-initialization.
459 (build_vec_init): Likewise.
460 (build_value_init_1): Use build_aggr_init_expr.
462 2008-07-30 Dodji Seketeli <dseketel@redhat.com>
465 * decl2.c (fix_temporary_vars_context_r): New function.
466 (one_static_initialization_or_destruction): Make sure temporary
467 variables part of the initialiser have their DECL_CONTEXT()
470 2008-07-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
473 * typeck.c (build_binary_op): Encapsulate code into
476 2008-07-29 Jakub Jelinek <jakub@redhat.com>
479 * tree.c (cplus_array_hash, build_cplus_array_type_1): Hash on
480 TYPE_UID instead of pointers.
482 2008-07-29 Jan Hubicka <jh@suse.cz>
484 * optimize.c (maybe_clone_body): Remove DECL_INLINE.
485 * decl.c (duplicate_decls): Likewise.
486 (grokfndecl): Likewise.
487 (start_method): Likewise.
488 * method.c (make_thunk, make_alias_for, implicitly_declare_fn):
490 * pt.c (register_specialization, regenerate_decl_from_template):
492 * decl2.c (grokfield): Likewise.
494 2008-07-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
497 * decl.c (duplicate_decls): Merge USED flags.
499 2008-07-27 Jason Merrill <jason@redhat.com>
502 * decl.c (reshape_init_r): Allow C++0x initializer lists.
504 2008-07-28 Richard Guenther <rguenther@suse.de>
506 Merge from gimple-tuples-branch.
508 2008-07-22 Aldy Hernandez <aldyh@redhat.com>
510 * cp-gimplify.c (gimplify_if_stmt): Set location on newly created
513 2008-07-18 Jakub Jelinek <jakub@redhat.com>
515 * decl.c (finish_function): Call gimple_body after cp_genericize.
517 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
519 * optimize.c: Include gimple.h instead of tree-gimple.h.
520 * Make-lang.in (cp-gimplify.o): Depend on tree-iterator.h.
521 * cp-gimplify.c: Rename tree-gimple.h to gimple.h. Include
524 2008-07-16 Jakub Jelinek <jakub@redhat.com>
526 * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE for the clone.
528 2008-07-14 Jakub Jelinek <jakub@redhat.com>
530 * cp-gimplify.c (cp_gimplify_expr): Update comment.
532 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
534 * cp-tree.h (union lang_tree_node): Rename GENERIC_NEXT to
536 * cp-gimplify.c (cxx_omp_clause_apply_fn): Rename
537 GIMPLE_MODIFY_STMT to MODIFY_EXPR.
538 (cxx_omp_clause_copy_ctor): Same.
539 (cxx_omp_clause_assign_op): Same.
541 2008-05-28 Jakub Jelinek <jakub@redhat.com>
543 * cp-gimplify.c (cp_gimplify_omp_for): Add pre_p argument. Tuplify.
544 (cp_gimplify_expr): Adjust caller.
546 2008-05-11 Doug Kwan <dougkwan@google.com>
548 * init.c (build_vec_delete): Add type conversion for argument
549 0 of POINTER_PLUS_EXPR.
551 2008-04-29 Doug Kwan <dougkwan@google.com>
553 * decl2 (File): Include "gimple.h"
554 (cp_write_global_declarations): Use gimple_body instead of
556 * Make-lang.in (cp/decl2.o): Add $(GIMPLE_H)
558 2008-04-10 Diego Novillo <dnovillo@google.com>
560 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00913.html
562 * optimize.c (maybe_clone_body): Re-enable call to
564 * cp-gimplify.c (cp_gimplify_omp_for): Mark disabled
565 code with call to gimple_unreachable.
566 (cp_genericize): Fix handling of clone bodies.
568 2008-04-04 Diego Novillo <dnovillo@google.com>
570 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00413.html
572 * optimize.c (maybe_clone_body): Re-enable.
574 2008-02-19 Diego Novillo <dnovillo@google.com>
575 Oleg Ryjkov <olegr@google.com>
577 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
579 * cp-gimplify.c (gimplify_for_stmt): Change gimple_seq
580 argument to gimple_seq *. Update all users.
581 (gimplify_must_not_throw_expr): Likewise.
583 2008-02-04 Oleg Ryjkov <olegr@google.com>
585 * except.c: Include gimple.h
586 (cp_protect_cleanup_actions): Convert to tuples.
587 * Make-lang.in (cp/except.o): Add dependency on gimple.h
589 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
591 * cp-gimplify.c (gimplify_cp_loop): Call tree_annotate_all_with_locus
592 instead of annotating each block manually.
594 2007-10-30 Aldy Hernandez <aldyh@redhat.com>
596 * cp-gimplify.c (gimplify_cp_loop): Tuplify.
597 (gimplify_for_stmt): Same.
598 (gimplify_switch_stmt): Same.
599 (cp_gimplify_expr): [FOR_STMT]: Do not call gimplify_for_stmt. Return
601 [WHILE_STMT]: Return GS_OK.
603 [CONTINUE_STMT]: Same.
605 (cp_genericize): Set gimple_body() of cloned functions when needed.
607 2007-10-29 Aldy Hernandez <aldy@quesejoda.com>
609 * cp-gimplify.c: Move build_gimple_eh_filter_tree here.
610 (cp_gimplify_init_expr): Convert to tuples.
611 (gimplify_must_not_throw_expr): Make function return a
612 gimplify_status and convert to tuples.
614 2007-10-18 Aldy Hernandez <aldy@quesejoda.com>
616 * cp-gimplify.c (genericize_try_block): Enable and do not call
618 (genericize_catch_block): Same.
619 (genericize_eh_spec_block): Same.
620 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
621 (cp_gimplify_expr): Enable TRY_BLOCK, HANDLER, and EH_SPEC_BLOCK.
623 2007-10-16 Aldy Hernandez <aldy@quesejoda.com>
625 * optimize.c (maybe_clone_body): Comment out call to clone_body.
626 * decl.c (finish_function): Use gimple_body instead of
628 * cp-tree.h (cp_gimplify_expr): Last 2 arguments are sequences.
629 * cp-gimplify.c (genericize_try_block): Comment out.
630 (genericize_catch_block): Same.
631 (genericize_eh_spec_block): Same.
632 (gimplify_cp_loop): Comment out calls to gimplify_stmt.
633 (gimplify_for_stmt): Comment out.
634 (gimplify_switch_stmt): Comment out call to gimplify_stmt.
635 (cp_gimplify_omp_for): Same.
636 (gimplify_must_not_throw_expr): Argument pre_p is a sequence.
637 Comment out call to gimplify_stmt and append_to_statement_list.
638 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
639 (cp_gimplify_init_expr): Arguments pre_p and post_p are sequences.
640 (cp_gimplify_expr): Same.
641 Comment out calls to genericize_*_block. Comment out call to
644 2008-07-27 H.J. Lu <hongjiu.lu@intel.com>
647 * class.c (type_has_user_provided_default_constructor): Handle
650 2008-07-27 Paolo Carlini <paolo.carlini@oracle.com>
652 * decl.c (push_library_fn): Add a parameter for the exceptions that
653 the function may throw.
654 (push_void_library_fn, push_throw_library_fn, expand_static_init):
656 (build_library_fn): Change to static.
657 * cp-tree.h: Adjust declarations.
658 * except.c (declare_nothrow_library_fn): New.
659 (do_get_exception_ptr, do_begin_catch, do_free_exception,
660 do_allocate_exception): Use the latter, adjust the declarations
661 (ie, add empty exception-specification), consistently with the
662 actual implementation in libsupc++.
664 2008-07-25 Jan Hubicka <jh@suse.cz>
666 * typeck.c (inline_conversion): Remove.
667 (cp_build_function_call): Do not use inline_conversion.
668 * decl.c (duplicate_decls): Do not insist on inline being declared
670 (start_cleanup_fn): Do not assume that INLINE flags prevent function
671 from being output. We now remove static functions always.
672 (finish_function): Do return warning on all static functions.
673 * call.c (build_over_call): Do not use inline_conversion.
674 * cp-tree.h (possibly_inlined_p): Declare.
675 (inline_conversion): Remove.
676 * pt.c (instantiate_decl): Use possibly_inlined_p predicate.
677 * decl2.c (cp_write_global_declarations): Likewise.
678 (mark_used): Likewise.
679 (possibly_inlined_p): New functions.
681 2008-07-25 Jason Merrill <jason@redhat.com>
683 * class.c (type_has_user_provided_default_constructor): Handle
686 2008-07-23 Jan Hubicka <jh@suse.cz>
688 * decl.c (duplicate_decls): Update comment and unit-at-a-time.
689 (grogfndecl): Drop flag_inline_trees code.
690 * pt.c (instantiate_decl): Drop flag_iline_trees code.
691 * lex.c (cxx_init): Do not set unit-at-a-time.
693 2008-07-23 Jason Merrill <jason@redhat.com>
695 * mangle.c (write_unqualified_name): Avoid infinite recursion when
696 trying to mangle a decl with no name.
698 Implement defaulted/deleted functions as per N2346
699 * cp-tree.h (struct lang_decl_flags): Add defaulted_p bitfield.
700 (DECL_DELETED_FN): New macro.
701 (DECL_DEFAULTED_FN): New macro.
702 * class.c (user_provided_p): New fn.
703 (defaultable_fn_p): New fn.
704 (type_has_user_provided_constructor): New fn.
705 (type_has_user_provided_default_constructor): New fn.
706 (check_methods): A defaulted fn is still trivial.
707 (check_bases_and_members): Likewise.
708 * decl.c (grok_special_member_properties): Likewise.
709 (duplicate_decls): Complain about redeclaring a function as deleted.
710 (start_decl): initialized==2 means deleted.
711 (cp_finish_decl): Handle deleted/defaulted semantics.
712 * decl2.c (grokfield): Likewise.
713 (mark_used): Check DECL_DEFAULTED_FN instead of DECL_ARTIFICIAL.
714 Complain about using a deleted fn.
715 * init.c (build_value_init_1): Use type_has_user_provided_constructor.
716 (perform_member_init): Check for a user-provided default constructor
717 even if TYPE_NEEDS_CONSTRUCTING.
718 (build_new_1): Likewise.
719 * call.c (build_over_call): Don't call mark_used twice.
720 * method.c (implicitly_declare_fn): Set DECL_DEFAULTED_FN.
721 * search.c (check_final_overrider): Check for deleted mismatch.
722 * parser.c (cp_parser_init_declarator): Tell start_decl about =delete.
723 (cp_parser_pure_specifier): Handle =default and =delete.
725 * error.c (maybe_warn_cpp0x): Suggest -std=gnu++0x as well.
727 2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
730 * typeck.c: All calls to pedwarn changed.
731 * decl.c: All calls to pedwarn changed.
732 * call.c: All calls to pedwarn changed.
733 * error.c: All calls to pedwarn changed.
734 * typeck2.c: All calls to pedwarn changed.
735 * pt.c: All calls to pedwarn changed.
736 * name-lookup.c: All calls to pedwarn changed.
737 * parser.c: All calls to pedwarn changed.
739 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
741 * call.c: Fix comment typos.
743 * cp-tree.h: Likewise.
744 * cxx-pretty-print.c: Likewise.
747 * name-lookup.c: Likewise.
748 * operators.def: Likewise.
749 * parser.c: Likewise.
752 * typeck.c: Likewise.
754 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
758 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Only check
759 copy constructors and copy assignment operators proper.
761 2008-07-21 Rafael Ávila de Espíndola <espindola@google.com>
763 * parser.c (cp_token): Remove in_system_header.
764 (eof_token): Remove in_system_header.
765 (cp_lexer_get_preprocessor_token): Don't set in_system_header.
766 (cp_lexer_set_source_position_from_token): Don't set in_system_header.
767 (cp_parser_member_declaration): Use in_system_header_at.
768 * pt.c (lookup_template_class): Don't set DECL_IN_SYSTEM_HEADER.
769 (pop_tinst_level): Don't set in_system_header.
770 (instantiate_class_template): Don't set in_system_header.
771 (instantiate_decl): Don't set in_system_header.
772 (instantiate_pending_templates): Don't set in_system_header.
774 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
777 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Use
778 TYPE_NOTHROW_P, not TREE_NOTHROW.
779 (trait_expr_value): Likewise.
781 2008-07-18 Dodji Seketeli <dseketel@redhat.com>
784 * call.c (convert_like_real): Don't take the error code path
785 when a rvalue or base conversion has the bad_p field set.
787 2008-07-18 Kris Van Hees <kris.van.hees@oracle.com>
789 * rtti.c (emit_support_tinfos): Add char16_type_node and
791 * typeck2.c (digest_init): Support char16_t and char32_t.
793 2008-07-18 Kavih R. Ghazi <ghazi@caip.rutgers.edu>
795 * cvt.c (convert_to_void): Avoid C++ keywords.
796 * decl.c (walk_namespaces_r, wrapup_globals_for_namespace):
798 * friend.c (is_friend): Likewise.
799 * init.c (perform_member_init): Likewise.
800 * mangle.c (write_template_prefix, write_template_template_param):
802 * name-lookup.c (do_namespace_alias, do_using_directive,
803 parse_using_directive, ambiguous_decl, arg_assoc): Likewise.
804 * parser.c (cp_parser_template_id, cp_parser_namespace_definition,
805 cp_parser_objc_typename, cp_parser_objc_method_keyword_params):
807 * pt.c (is_specialization_of_friend, lookup_template_class,
808 push_tinst_level, instantiate_class_template,
809 tsubst_copy_and_build): Likewise.
810 * tree.c (add_stmt_to_compound): Likewise.
811 * typeck.c (finish_class_member_access_expr): Likewise.
813 2008-07-17 Julian Brown <julian@codesourcery.com>
814 Mark Mitchell <mark@codesourcery.com>
816 * decl2.c (determine_visibility): Allow target to override
817 visibility of class data.
819 2008-07-17 Paolo Carlini <paolo.carlini@oracle.com>
822 * semantics.c (trait_expr_value): Update __has_trivial_destructor
823 semantics to the current WP (N2691).
825 2008-07-16 Dodji Seketeli <dseketel@redhat.com>
828 * name-lookup.c (lookup_extern_c_fun_binding_in_all_ns): New function.
829 (pushdecl_maybe_friend): Check if a redeclaration of extern C function
830 complies with exception specification constraints.
832 2008-07-14 Jason Merrill <jason@redhat.com>
834 * lex.c (init_reswords): Always set D_OBJC.
836 2008-07-11 Tom Tromey <tromey@redhat.com>
837 Ian Lance Taylor <iant@google.com>
839 * lex.c (struct resword, reswords): Don't define.
840 (D_EXT, D_ASM, D_OBJC, D_CXX0X): Don't define.
841 (init_reswords): Clarify mask code. Use c_common_reswords rather
844 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
847 * decl.c (grokdeclarator): Warn about initializing variables
848 of storage class 'extern' only after the type of the declarator
849 has been properly computed.
851 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
854 * cp-tree.h (struct cp_decl_specifier_seq): Add a location field. It
855 carries the location of the primary type.
856 * parser.c (cp_parser_check_type_definition): Update documentation.
857 (cp_parser_check_for_definition_in_return_type,
858 cp_parser_check_for_invalid_template_id,
859 cp_parser_set_decl_spec_type,
860 cp_parser_check_for_definition_in_return_type,
861 cp_parser_diagnose_invalid_type_name,
862 cp_parser_new_expression, cp_parser_explicit_instantiation,
863 cp_parser_type_specifier, cp_parser_simple_type_specifier,
864 cp_parser_omp_for_loop, cp_parser_pragma): Use location in error
867 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
871 * semantic.c (qualified_name_lookup_error, finish_id_expression):
872 Add a location_t parameter so that
873 error message can have a more accurate location.
874 * cp-tree.h: Updated prototype
875 * pt.c (tsubst_qualified_id): Use location in error messages.
876 * parser.c (cp_parser_postfix_expression,
877 cp_parser_objc_statement, cp_parser_trait_expr,
878 cp_parser_token_is_class_key,
879 cp_parser_uncommitted_to_tentative_parse_p,
880 cp_parser_check_for_invalid_template_id, cp_parser_is_string_literal,
881 cp_parser_error, cp_parser_name_lookup_error,
882 cp_parser_simulate_error, cp_parser_check_decl_spec,
883 cp_parser_check_decl_spec, cp_parser_non_integral_constant_expression,
884 cp_parser_diagnose_invalid_type_name,
885 cp_parser_parse_and_diagnose_invalid_type_name,
886 cp_parser_require_pragma_eol, cp_parser_make_typename_type,
887 cp_parser_string_literal, cp_parser_primary_expression,
888 cp_parser_primary_expression, cp_parser_unqualified_id,
889 cp_parser_nested_name_specifier_opt, cp_parser_postfix_expression,
890 cp_parser_postfix_dot_deref_expression, cp_parser_new_expression,
891 cp_parser_direct_new_declarator, cp_parser_builtin_offsetof,
892 cp_parser_label_for_labeled_statement, cp_parser_statement_seq_opt,
893 cp_parser_jump_statement, cp_parser_block_declaration,
894 cp_parser_simple_declaration, cp_parser_decl_specifier_seq,
895 cp_parser_function_specifier_opt, cp_parser_decltype,
896 cp_parser_mem_initializer_list, cp_parser_mem_initializer,
897 cp_parser_mem_initializer_id, cp_parser_template_parameter,
898 cp_parser_type_parameter, cp_parser_template_id,
899 cp_parser_template_name, cp_parser_template_argument): Likewise.
901 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
904 * pt.c (tsubst_function_type): Remove warning for type qualifiers
905 on function return type.
907 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
910 * pt.c (tsubst_function_type): Don't warn for type qualifiers
911 on function return type in case of system header.
913 2008-07-09 Raksit Ashok <raksit@google.com>
915 * parser.c (cp_parser_postfix_expression): New warning based on flag
916 warn_disallowed_functions.
918 2008-07-08 Simon Martin <simartin@users.sourceforge.net>
921 * decl.c (grokdeclarator): Reset storage_class and staticp for friend
922 functions declared with a storage class qualifier.
924 2008-07-03 Richard Guenther <rguenther@suse.de>
927 * typeck.c (cp_build_function_call): Move code to verify
928 builtin function arguments ...
929 * call.c (build_cxx_call): ... here.
931 2008-07-02 Jason Merrill <jason@redhat.com>
933 * Make-lang.in (cp/typeck2.o): Add $(REAL_H) dependency.
935 Implement WG21 N2672, Initializer List proposed wording
936 * cp-tree.h (enum cp_tree_index): Add CPTI_INIT_LIST_TYPE.
937 (struct lang_type_class): Add has_list_ctor bitfield.
938 (TYPE_HAS_LIST_CTOR): New macro.
939 (BRACE_ENCLOSED_INITIALIZER_P): Expect init_list_type_node.
940 (CONSTRUCTOR_IS_DIRECT_INIT): New macro.
941 (LOOKUP_NO_NARROWING): New macro.
942 (LOOKUP_NO_COPY_CTOR_CONVERSION): New macro.
943 * parser.c (cp_parse_braced_list): Split out from...
944 (cp_parser_initializer_clause): ...here.
945 (cp_parser_postfix_expression): Build up CONSTRUCTOR for compound
947 (cp_lexer_next_token_is_not_keyword): New fn.
948 (cp_parser_parenthesized_expression_list): Handle { }.
949 (cp_parser_new_expression, cp_parser_new_initializer): Likewise.
950 (cp_parser_assignment_expression, cp_parser_condition): Likewise.
951 (cp_parser_jump_statement, cp_parser_simple_declaration): Likewise.
952 (cp_parser_mem_initializer, cp_parser_init_declarator): Likewise.
953 (cp_parser_initializer, cp_parser_functional_cast): Likewise.
954 (cp_parser_omp_for_loop, cp_parser_cache_group): Likewise.
955 (cp_parser_save_member_function_body): Likewise.
956 * call.c (conversion_kind): Add ck_list, ck_aggr.
957 (struct conversion): Add check_narrowing bitfield, conversion list.
958 (build_list_conv): New fn.
959 (build_aggr_conv): New fn.
960 (implicit_conversion): Call them.
961 (standard_conversion): Set check_narrowing if appropriate.
962 (add_function_candidate): Handle LOOKUP_NO_COPY_CTOR_CONVERSION.
963 (build_user_type_conversion_1): When converting from an init list,
964 we allow additional conversions except when calling a copy ctor.
965 (convert_like_real): Calling an explicit ctor for an init list is
966 ill-formed. Handle ck_list and ck_addr. Check narrowing.
967 (build_new_method_call): If CONSTRUCTOR_IS_DIRECT_INIT is set and
968 class doesn't have a list ctor, break the {} into a TREE_LIST.
969 (compare_ics): ck_list is better than other UDCs.
970 (set_up_extended_ref_temp): Split out from initialize_reference.
971 (is_std_init_list): New fn.
972 (is_list_ctor): New fn.
973 * decl.c (cxx_init_decl_processing): Create init_list_type_node.
974 (reshape_init_array_1): Pass it to build_constructor.
975 (reshape_init_class): Ditto.
976 (initialize_artificial_var): Pass the appropriate type.
977 (build_aggr_init_full_exprs): Split out from...
978 (check_initializer): ...here. Handle new semantics.
979 (build_init_list_var_init): New subroutine of check_initializer.
980 (grokdeclarator): Converting constructors can have more than one parm.
981 (grok_special_member_properties): Set TYPE_HAS_LIST_CTOR.
982 * init.c (expand_default_init): Only do digest_init for aggregates.
983 * rtti.c (tinfo_base_init): Pass init_list_type_node to
984 build_constructor_from_list.
985 (generic_initializer, ptr_initializer): Ditto.
986 (ptm_initializer, class_initializer): Ditto.
987 (get_pseudo_ti_init): Ditto.
988 * error.c (dump_type): Handle init_list_type_node.
989 (maybe_warn_cpp0x): New fn.
990 (maybe_varn_variadic_templates): Call it.
991 * cvt.c (ocp_convert): Handle conversion from { }.
992 * tree.c (build_array_of_n_type): New fn.
993 * typeck2.c (store_init_value): Use init_list_type_node.
994 (digest_init): Likewise.
995 (check_narrowing): New fn.
996 * semantics.c: (finish_compound_literal): Take CONSTRUCTOR instead
997 of vector of constructor elts. Handle non-aggregate types. Make
998 constant literals static.
999 * pt.c: (tsubst_copy_and_build): Adjust.
1000 (unify): Handle { }.
1001 * name-lookup.c (arg_assoc_type): Handle init_list_type_node.
1003 2008-07-01 Daniel Jacobowitz <dan@codesourcery.com>
1005 * typeck.c (comp_ptr_ttypes_real): Use vector_targets_convertible_p.
1006 (comp_ptr_ttypes_const): Likewise.
1008 2008-07-01 Andrew Haley <aph@redhat.com>
1010 * decl.c (finish_constructor_body): Don't set the return value of
1011 the constructor if the constructor is that of a Java type.
1013 2008-06-30 Jakub Jelinek <jakub@redhat.com>
1016 * decl2.c (is_late_template_attribute): If the first attribute
1017 argument is IDENTIFIER_NODE, don't consider it when checking
1018 if arguments are value or type dependent.
1020 2008-06-29 Paolo Carlini <paolo.carlini@oracle.com>
1023 * pt.c (do_type_instantiation): In c++0x mode do not warn for
1026 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1028 * Make-lang.in (cp-warn): Delete $(CXX_COMPAT_WARN).
1030 2008-06-28 Jakub Jelinek <jakub@redhat.com>
1033 * repo.c (repo_emit_p): Put const static data members initialized
1034 by const expr into *.rpo file, just return 2 if IDENTIFIER_REPO_CHOSEN
1037 2008-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1040 * pt.c (do_decl_instantiation): In c++0x mode do not warn for
1043 2008-06-24 Jonathan Wakely <jwakely.gcc@gmail.com>
1046 * typeck.c (cp_build_function_call): Show example syntax in
1049 2008-06-21 Jonathan Wakely <jwakely.gcc@gmail.com>
1051 * typeck.c (composite_pointer_type_r, cxx_sizeof_expr,
1052 cxx_alignof_expr, check_template_keyword, cp_build_binary_op,
1053 pointer_diff, cp_build_unary_op, build_x_compound_expr_from_list,
1054 build_reinterpret_cast_1, cp_build_c_cast, check_return_expr): Change
1055 pedwarn to permerror.
1056 * init.c (perform_member_init, build_new_1, build_new): Likewise.
1057 * decl.c (warn_extern_redeclared_static, duplicate_decls,
1058 * identify_goto, check_previous_goto_1, check_goto, define_label,
1059 check_tag_decl, start_decl, check_class_member_definition_namespace,
1060 grokfndecl, grokdeclarator): Likewise.
1061 * except.c (check_handlers): Likewise.
1062 * typeck2.c (digest_init): Likewise.
1063 * pt.c (check_specialization_namespace,
1064 check_explicit_instantiation_namespace,
1065 maybe_process_partial_specialization, check_explicit_specialization,
1066 convert_template_argument, do_decl_instantiation,
1067 do_type_instantiation, instantiate_decl): Likewise.
1068 * semantics.c (finish_template_type_parm): Likewise.
1069 * name-lookup.c (pushdecl_maybe_friend,
1070 check_for_out_of_scope_variable): Likewise.
1071 * decl2.c (finish_static_data_member_decl, build_anon_union_vars,
1072 coerce_new_type): Likewise.
1073 * parser.c (cp_parser_nested_name_specifier_opt,
1074 cp_parser_mem_initializer, cp_parser_elaborated_type_specifier,
1075 cp_parser_class_head, cp_parser_check_class_key): Likewise.
1076 (cp_parser_parameter_declaration): Check flag_permissive instead of
1077 flag_pedantic_errors.
1078 * call.c (joust): Change pedwarn to warning.
1079 * friend.c (make_friend_class): Likewise.
1081 2008-06-16 Jan Hubicka <jh@suse.cz>
1083 * method.c: Include cgraph.h.
1084 (use_thunk): Use cgraph_add_new_function instead of calling backend
1087 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1089 * parser.c: Fix comment typo.
1091 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1094 * decl2.c (grokbitfield): Receive the list of attributes, pass it to
1095 grokdeclarator and apply it to the created declaration.
1096 * cp-tree.h (grokbitfield): Update prototype.
1097 * parser.c (cp_parser_member_declaration): Don't apply the attributes
1098 since they are now applied in grokbitfield. Adjusted the call to
1100 (cp_parser_objc_class_ivars): Likewise.
1102 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1105 * class.c (type_requires_array_cookie): Do not consider delete[]
1106 operators with an ellipsis as second argument.
1108 2008-06-09 Jakub Jelinek <jakub@redhat.com>
1111 * semantics.c (stmt_expr_value_expr): Don't crash on empty
1114 2008-06-08 Paolo Carlini <paolo.carlini@oracle.com>
1117 * pt.c (maybe_process_partial_specialization): Check the tree
1118 returned by push_template_decl for error_mark_node.
1119 * parser.c (cp_parser_class_head): Likewise, check the tree
1120 returned by the latter.
1122 2008-06-07 Paolo Carlini <paolo.carlini@oracle.com>
1125 * decl.c (grokdeclarator): In case of wrong return type return
1126 immediately error_mark_node.
1128 2008-06-06 Jakub Jelinek <jakub@redhat.com>
1130 * cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
1131 dependent_omp_for_p, begin_omp_task, finish_omp_task,
1132 finish_omp_taskwait): New prototypes.
1133 (cxx_omp_clause_default_ctor): Add outer argument.
1134 (finish_omp_for): Add new clauses argument.
1135 * cp-gimplify.c (cxx_omp_finish_clause): New function.
1136 (cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
1137 (cxx_omp_clause_default_ctor): Add outer argument.
1138 (cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
1139 * cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
1140 * parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
1141 Add par_clauses argument. If decl is present in parallel's
1142 lastprivate clause, change that clause to shared and add
1143 a lastprivate clause for decl to OMP_FOR_CLAUSES.
1144 Fix wording of error messages. Adjust finish_omp_for caller.
1145 Add clauses argument. Parse loops with random access iterators.
1146 (cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
1148 (cp_parser_omp_for, cp_parser_omp_parallel): Adjust
1149 cp_parser_omp_for_loop callers.
1150 (cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
1152 (cp_parser_omp_clause_name): Handle collapse and untied
1154 (cp_parser_omp_clause_schedule): Handle auto schedule.
1155 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
1156 and PRAGMA_OMP_CLAUSE_UNTIED.
1157 (OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
1158 (OMP_TASK_CLAUSE_MASK): Define.
1159 (cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
1160 (cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
1161 (cp_parser_pragma): Handle PRAGMA_OMP_TASK and
1162 PRAGMA_OMP_TASKWAIT.
1163 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
1164 OMP_CLAUSE_UNTIED. Handle OMP_CLAUSE_LASTPRIVATE_STMT.
1165 (tsubst_omp_for_iterator): New function.
1166 (dependent_omp_for_p): New function.
1167 (tsubst_expr) <case OMP_FOR>: Use it. Handle collapsed OMP_FOR
1168 loops. Adjust finish_omp_for caller. Handle loops with random
1169 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR} changes.
1170 (tsubst_expr): Handle OMP_TASK.
1171 * semantics.c (cxx_omp_create_clause_info): New function.
1172 (finish_omp_clauses): Call it. Handle OMP_CLAUSE_UNTIED and
1173 OMP_CLAUSE_COLLAPSE.
1174 (cxx_omp_predetermined_sharing): Removed.
1175 * semantics.c (finish_omp_for): Allow pointer iterators. Use
1176 handle_omp_for_class_iterator and dependent_omp_for_p. Handle
1177 collapsed for loops. Adjust c_finish_omp_for caller. Add new
1178 clauses argument. Fix check for type dependent cond or incr.
1179 Set OMP_FOR_CLAUSES to clauses. Use cp_convert instead of
1180 fold_convert to convert incr amount to difference_type. Only
1181 fold if not in template. If decl is mentioned in lastprivate
1182 clause, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle loops with random
1183 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR}
1185 (finish_omp_threadprivate): Allow static class members of the
1187 (handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
1188 finish_omp_taskwait): New functions.
1190 * parser.c (cp_parser_binary_expression): Add prec argument.
1191 (cp_parser_assignment_expression): Adjust caller.
1192 * cp-tree.h (outer_curly_brace_block): New prototype.
1193 * decl.c (outer_curly_brace_block): No longer static.
1195 2008-06-02 Paolo Carlini <paolo.carlini@oracle.com>
1198 * pt.c (push_template_decl_real): Consistently return error_mark_node
1201 2008-06-02 Tomas Bily <tbily@suse.cz>
1203 * typeck.c (is_bitfield_expr_with_lowered_type): Use CASE_CONVERT.
1204 (cp_build_unary_op): Likewise.
1205 (cp_build_indirect_ref): Use CONVERT_EXPR_P.
1206 (maybe_warn_about_returning_address_of_local): Likewise.
1208 2008-05-29 Paolo Carlini <paolo.carlini@oracle.com>
1211 * pt.c (tsubst_initializer_list): Consistently check the tree
1212 returned by tsubst_pack_expansion for error_mark_node.
1214 2008-05-27 Michael Matz <matz@suse.de>
1217 * call.c (build_new_op): Make warning conditional on
1220 2008-05-27 Alexandre Oliva <aoliva@redhat.com>
1223 * call.c (convert_like_real): Convert bitfield to desired type
1224 before creating temporary.
1226 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
1228 * Makefile.in: Adjusted dependencies on c-incpath.o.
1230 2008-05-23 Jakub Jelinek <jakub@redhat.com>
1233 * cp-gimplify.c (cxx_omp_clause_apply_fn): Call
1234 fold_build_cleanup_point_expr on build_call_a results.
1237 * semantics.c (omp_clause_info_fndecl): New function.
1238 (finish_omp_clauses): Use it.
1240 2008-05-21 Jakub Jelinek <jakub@redhat.com>
1243 * cp-tree.h (check_array_initializer): New prototype.
1244 * decl.c (check_array_initializer): New function.
1245 (check_initializer): Call it.
1246 * semantics.c (finish_compound_literal): Call it for ARRAY_TYPEs.
1248 2008-05-21 Tom Tromey <tromey@redhat.com>
1250 * mangle.c (save_partially_mangled_name): Remove.
1251 (restore_partially_mangled_name): Likewise.
1252 (write_encoding): Update.
1253 (write_unqualified_name): Likewise.
1254 (start_mangling): Always use name_obstack. Remove 'ident_p'
1256 (get_identifier_nocopy): Remove.
1257 (finish_mangling_internal): Rename from finish_mangling.
1258 (finish_mangling): New function.
1259 (finish_mangling_get_identifier): Likewise.
1260 (partially_mangled_name, partially_mangled_name_len): Remove.
1261 (mangle_decl_string): Change return type. Update.
1262 (mangle_decl, mangle_type_string, mangle_special_for_type,
1263 mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
1264 mangle_ref_init_variable): Update.
1266 2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
1269 * semantics.c (begin_class_definition): Extend checks on the first
1272 2008-05-12 Tomas Bily <tbily@suse.cz>
1274 * typeck2.c (digest_init): Use CONVERT_EXPR_P.
1275 * call.c (build_over_call): Likewise.
1276 * error.c (dump_expr): Use CASE_CONVERT.
1277 * class.c (fixed_type_or_null): Likewise.
1279 2008-05-11 Volker Reichelt <v.reichelt@netcologne.de>
1281 * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
1283 (cp_parser_omp_clause_schedule): Remove superfluous "expected"
1286 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
1288 * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
1289 DECL_LOOPING_CONST_OR_PURE_P attributes.
1290 * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
1293 2008-05-02 Simon Baldwin <simonb@google.com>
1296 * typeck.c (build_array_ref): Remove warn_array_subscript_range.
1298 2008-05-01 Simon Baldwin <simonb@google.com>
1300 * typeck.c (build_array_ref): Call warn_array_subscript_range.
1302 2008-04-30 Jakub Jelinek <jakub@redhat.com>
1305 * pt.c (more_specialized_fn): Stop the loop even if there are no
1306 arguments before ellipsis.
1308 2008-04-29 Jakub Jelinek <jakub@redhat.com>
1311 * parser.c (cp_parser_lookup_name): Look through single function
1315 * typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
1316 COMPOUND_EXPR if the second argument would be error_mark_node.
1318 2008-04-28 Jason Merrill <jason@redhat.com>
1319 Liu Guanwei <liu_gw@163.com>
1322 * parser.c (cp_parser_parameter_declaration): Handle < ambiguity
1323 in default arguments.
1325 2008-04-25 Jan Hubicka <jh@suse.cz>
1327 * typeck.c (check_return_expr): Update.
1328 * decl.c (start_preparsed_function): Update.
1329 * method.c (use_thunk): Update.
1331 2008-04-24 Jakub Jelinek <jakub@redhat.com>
1334 * cp-tree.h (cp_reconstruct_complex_type): New prototype.
1335 * cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
1336 * decl2.c (is_late_template_attribute): Only make vector_size
1337 late tmpl attribute if argument is type or value dependent.
1338 (cp_reconstruct_complex_type): New function.
1340 2008-04-24 Richard Guenther <rguenther@suse.de>
1342 * typeck.c (cp_build_function_call): Call
1343 check_builtin_function_arguments.
1345 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1347 * typeck.c (get_member_function_from_ptrfunc): Don't set TREE_INVARIANT.
1348 (build_ptrmemfunc1): Don't set TREE_INVARIANT.
1349 * init.c (build_zero_init): Don't set TREE_INVARIANT.
1350 * class.c (build_base_path): Don't set TREE_INVARIANT.
1351 (build_vtbl_ref_1): Don't set TREE_INVARIANT.
1352 (build_vtbl_initializer): Don't set TREE_INVARIANT.
1353 * decl.c (build_enumerator): Don't set TREE_INVARIANT.
1354 * rtti.c (tinfo_base_init): Don't set TREE_INVARIANT.
1355 (generic_initializer): Don't set TREE_INVARIANT.
1356 (ptr_initializer): Don't set TREE_INVARIANT.
1357 (ptm_initializer): Don't set TREE_INVARIANT.
1358 (class_initializer): Don't set TREE_INVARIANT.
1359 * typeck2.c (process_init_constructor): Don't set TREE_INVARIANT.
1360 * pt.c (push_inline_template_parms_recursive): Don't set TREE_INVARIANT.
1361 (build_template_parm_index): Don't set TREE_INVARIANT.
1362 (reduce_template_parm_level): Don't set TREE_INVARIANT.
1363 (process_template_parm): Don't set TREE_INVARIANT.
1365 2008-04-22 Jason Merrill <jason@redhat.com>
1368 * semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
1369 to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
1370 * typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
1372 2008-04-22 Jakub Jelinek <jakub@redhat.com>
1375 * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
1376 expression is errorneous.
1378 2008-04-21 Jason Merrill <jason@redhat.com>
1381 * tree.c (cp_tree_equal): Handle FIXED_CST.
1384 * pt.c (template_template_parm_bindings_ok_p): Set
1385 processing_template_decl while in this function.
1387 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
1389 * cvt.c (type_promotes_to): Support char16_t and char32_t.
1390 * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
1391 char16_t and char32_t.
1392 * lex.c (reswords): Add char16_t and char32_t (for c++0x).
1393 * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
1394 extended builtin type "u8char{16,32}_t".
1395 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
1397 (cp_lexer_print_token): Support CPP_STRING{16,32}.
1398 (cp_parser_is_string_literal): Idem.
1399 (cp_parser_string_literal): Idem.
1400 (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
1402 (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}.
1403 * tree.c (char_type_p): Support char16_t and char32_t as char types.
1404 * typeck.c (string_conv_p): Support char16_t and char32_t.
1406 2008-04-17 Jason Merrill <jason@redhat.com>
1409 * call.c (build_user_type_conversion_1): Represent second step of
1410 copy-init with an rvalue conversion.
1411 (convert_like_real) [ck_user]: Don't implicitly add it here.
1413 2008-04-15 Jakub Jelinek <jakub@redhat.com>
1416 * decl.c (layout_var_decl): If extern or static var has variable
1417 size, set TREE_TYPE (decl) to error_mark_node.
1419 2008-04-16 Danny Smith <dannysmith@users.sourceforge.net>
1422 * optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
1425 2008-04-09 Jason Merrill <jason@redhat.com>
1428 * semantics.c (finish_compound_literal): Return a TARGET_EXPR,
1429 not a pushed variable.
1431 2008-04-09 Volker Reichelt <v.reichelt@netcologne.de>
1433 * call.c (build_op_delete_call): Fix quotation in warning message.
1434 * decl.c (grokdeclarator): Quote keyword in error message.
1435 * pt.c (check_for_bare_parameter_packs): Fix quotation in error
1438 * parser.c (cp_parser_check_type_definition): Print error string
1439 directly rather than using "%s".
1440 (cp_parser_postfix_expression): Fix quotation.
1441 (cp_parser_decltype): Likewise.
1442 (cp_parser_sizeof_operand): Fix quotation. Simplify.
1444 * parser.c (cp_parser_non_integral_constant_expression): Build error
1445 message with CONCAT rather than using "%s".
1446 (cp_parser_primary_expression): Fix quotation.
1447 (cp_parser_postfix_expression): Likewise.
1448 (cp_parser_postfix_dot_deref_expression): Likewise.
1449 (cp_parser_unary_expression): Likewise.
1450 (cp_parser_new_expression): Likewise.
1451 (cp_parser_delete_expression): Likewise.
1453 * parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
1454 as `)', not as `('. Fix quotation.
1455 (cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
1456 (cp_parser_primary_expression): Likewise.
1457 (cp_parser_nested_name_specifier_opt): Likewise.
1458 (cp_parser_postfix_expression): Likewise.
1459 (cp_parser_postfix_open_square_expression): Likewise.
1460 (cp_parser_parenthesized_expression_list): Likewise.
1461 (cp_parser_pseudo_destructor_name): Likewise.
1462 (cp_parser_new_expression): Likewise.
1463 (cp_parser_direct_new_declarator): Likewise.
1464 (cp_parser_delete_expression): Likewise.
1465 (cp_parser_cast_expression): Likewise.
1466 (cp_parser_question_colon_clause): Likewise.
1467 (cp_parser_builtin_offsetof): Likewise.
1468 (cp_parser_trait_expr): Likewise.
1469 (cp_parser_label_for_labeled_statement): Likewise.
1470 (cp_parser_compound_statement): Likewise.
1471 (cp_parser_selection_statement): Likewise.
1472 (cp_parser_condition): Likewise.
1473 (cp_parser_iteration_statement): Likewise.
1474 (cp_parser_already_scoped_statement): Likewise.
1475 (cp_parser_simple_declaration): Likewise.
1476 (cp_parser_linkage_specification): Likewise.
1477 (cp_parser_static_assert): Likewise.
1478 (cp_parser_decltype): Likewise.
1479 (cp_parser_conversion_function_id): Likewise.
1480 (cp_parser_operator_function_id): Likewise.
1481 (cp_parser_operator): Likewise.
1482 (cp_parser_type_parameter): Likewise.
1483 (cp_parser_template_id): Likewise.
1484 (cp_parser_explicit_instantiation): Likewise.
1485 (cp_parser_explicit_specialization): Likewise.
1486 (cp_parser_enum_specifier): Likewise.
1487 (cp_parser_namespace_definition): Likewise.
1488 (cp_parser_namespace_alias_definition): Likewise.
1489 (cp_parser_using_declaration): Likewise.
1490 (cp_parser_using_directive): Likewise.
1491 (cp_parser_asm_definition): Likewise.
1492 (cp_parser_direct_declarator): Likewise.
1493 (cp_parser_ptr_operator): Likewise.
1494 (cp_parser_parameter_declaration_clause): Likewise.
1495 (cp_parser_initializer_clause): Likewise.
1496 (cp_parser_class_specifier): Likewise.
1497 (cp_parser_member_specification_opt): Likewise.
1498 (cp_parser_member_declaration): Likewise.
1499 (cp_parser_pure_specifier): Likewise.
1500 (cp_parser_constant_initializer): Likewise.
1501 (cp_parser_base_clause): Likewise.
1502 (cp_parser_exception_specification_opt): Likewise.
1503 (cp_parser_try_block): Likewise.
1504 (cp_parser_function_try_block): Likewise.
1505 (cp_parser_handler): Likewise.
1506 (cp_parser_throw_expression): Likewise.
1507 (cp_parser_asm_operand_list): Likewise.
1508 (cp_parser_attributes_opt): Likewise.
1509 (cp_parser_label_declaration): Likewise.
1510 (cp_parser_constructor_declarator_p): Likewise.
1511 (cp_parser_template_declaration_after_export): Likewise.
1512 (cp_parser_single_declaration): Likewise.
1513 (cp_parser_objc_message_expression): Likewise.
1514 (cp_parser_objc_message_args): Likewise.
1515 (cp_parser_objc_encode_expression): Likewise.
1516 (cp_parser_objc_defs_expression): Likewise.
1517 (cp_parser_objc_protocol_expression): Likewise.
1518 (cp_parser_objc_selector_expression): Likewise.
1519 (cp_parser_objc_protocol_refs_opt): Likewise.
1520 (cp_parser_objc_typename): Likewise.
1521 (cp_parser_objc_method_keyword_params): Likewise.
1522 (cp_parser_objc_superclass_or_category): Likewise.
1523 (cp_parser_objc_try_catch_finally_statement): Likewise.
1524 (cp_parser_objc_synchronized_statement): Likewise.
1525 (cp_parser_objc_throw_statement): Likewise.
1526 (cp_parser_omp_var_list_no_open): Likewise.
1527 (cp_parser_omp_clause_default): Likewise.
1528 (cp_parser_omp_clause_if): Likewise.
1529 (cp_parser_omp_clause_num_threads): Likewise.
1530 (cp_parser_omp_clause_reduction): Likewise.
1531 (cp_parser_omp_clause_schedule): Likewise.
1532 (cp_parser_omp_critical): Likewise.
1533 (cp_parser_omp_for_loop): Likewise.
1534 (cp_parser_omp_sections_scope): Likewise.
1536 * parser.c (cp_parser_template_parameter_list): Simplify.
1538 2008-04-07 James E. Wilson <wilson@tuliptree.org>
1540 * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
1542 2008-04-07 Jason Merrill <jason@redhat.com>
1545 * class.c (type_has_user_nondefault_constructor): A template
1546 counts as a nondefault constructor.
1548 2008-04-04 Paolo Bonzini <bonzini@gnu.org>
1550 * decl.c (cxx_push_function_context): Delete.
1551 (cxx_pop_function_context): Delete.
1552 (start_preparsed_function): Merge cxx_push_function_context (!f->decl
1554 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_INIT,
1555 LANG_HOOKS_FUNCTION_FINAL): Delete.
1556 (LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): Rename to
1557 LANG_HOOKS_MISSING_NORETURN_OK_P.
1558 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context):
1560 * semantics.c (current_stmt_tree): Fix comment.
1562 2008-04-03 Jakub Jelinek <jakub@redhat.com>
1565 * semantics.c (finish_offsetof): Undo effect of convert_from_reference
1566 before calling fold_offsetof.
1568 2008-04-03 Tom Tromey <tromey@redhat.com>
1570 * Make-lang.in (c++_OBJS): New variable.
1572 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1574 * optimize.c (clone_body): New, from tree-inline.c.
1576 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1578 * method.c (synthesize_method): Use {push,pop}_function_context.
1579 * name-lookup.c (push_to_top_level): Likewise.
1580 * parser.c (cp_parser_late_parsing_for_member): Likewise.
1582 2008-03-30 Volker Reichelt <v.reichelt@netcologne.de>
1585 * parser.c (cp_parser_decl_specifier_seq): Add location to error
1588 2008-03-27 Tom Tromey <tromey@redhat.com>
1590 * Make-lang.in: Revert automatic dependency patch.
1592 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
1595 * typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
1596 (build_compound_expr): New, for compatibility with C
1597 build_compound_expr.
1598 (cp_build_compound_expr): Renamed from build_compound_expr.
1599 (build_c_cast): New, for compatibility with C build_c_cast.
1600 (cp_build_c_cast): Renamed from build_c_cast.
1601 * init.c (build_vec_delete_1): Fix calls to build_compound_expr.
1602 * decl.c (cxx_maybe_build_cleanup): Ditto.
1603 * cp-tree.h (build_compound_expr): Add C-compatibile prototype.
1604 (cp_build_compound_expr): Renamed from build_compound_expr.
1605 (build_c_cast): Add C-compatible prototype.
1606 (cp_build_c_cast): Renamed from build_c_cast.
1607 * typeck2.c (build_functional_cast): Use cp_build_c_cast.
1608 * parser.c (cp_parser_cast_expression): Fix call to build_c_cast.
1610 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
1612 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Cope with
1613 tsubst_pack_expansion returning a pack expansion, or a TREE_VEC
1614 ending in a pack expansion, both of which can occur when
1615 substituting into a nested template.
1616 (tsubst_copy_and_build) <case SIZEOF_EXPR>: When we're
1617 instantiating the sizeof...(X) form, make tsubst_copy do the work.
1618 * parser.c (cp_parser_template_parameter): Deal with unnamed
1619 non-type template parameter packs identified by pack expansions in
1622 2008-03-26 Jakub Jelinek <jakub@redhat.com>
1625 * pt.c (apply_late_template_attributes): Don't call tsubst on
1626 first attribute argument if it is IDENTIFIER_NODE.
1629 * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
1630 and LTGT_EXPR to pp_expression.
1632 2008-03-26 Douglas Gregor <doug.gregor@gmail.com>
1634 * pt.c (coerce_template_template_parm): Moved the body of the loop
1635 of coerce_template_template_parms here, to make iteration over a
1636 template argument pack simpler.
1637 Also, allow matching of a template parameter pack in the template
1638 template parameter to a template parameter in the template
1640 (coerce_template_template_parms): Deal with variadic template
1641 template parameters. Use coerce_template_template_parm.
1642 (unify): Make sure we coerce the template template argument's
1643 template arguments to the template template parameter's template
1644 parameters, not the other way around.
1646 2008-03-25 Tom Tromey <tromey@redhat.com>
1648 * Make-lang.in: Remove .o targets.
1649 (cp/g++spec.o): Moved to cp/. Reduce to variable setting.
1651 (c++_OBJS): New variable.
1652 (CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
1654 2008-03-25 Douglas Gregor <doug.gregor@gmail.com>
1656 * typeck.c (composite_pointer_type_r): Add SFINAE support.
1657 (composite_pointer_type): Ditto.
1658 (common_type): Fix call to composite_pointer_type.
1659 (cxx_sizeof_nowarn): New; used to be a macro.
1660 (cxx_sizeof_expr): Add SFINAE support.
1661 (cxx_alignof_expr): Ditto.
1662 (decay_conversion): Fix calls for SFINAE support.
1663 (rationalize_conditional_expr): Add SFINAE support.
1664 (build_class_member_access_expr): Ditto.
1665 (finish_class_member_access_expr): Ditto.
1666 (build_x_indirect_ref): Ditto.
1667 (build_indirect_ref): Original version renamed to
1668 cp_build_indirect_ref; new version provides a bridge from
1670 (cp_build_indirect_ref): Was build_indirect_ref; added SFINAE
1672 (get_member_function_from_ptrfunc): Fix calls for SFINAE support.
1673 (build_function_call): Original version renamed to
1674 cp_build_function_call; new version provides a bridge from
1676 (cp_build_function_call): Was build_function_call; added SFINAE
1678 (convert_arguments): Add SFINAE support.
1679 (build_x_binary_op): Ditto.
1680 (build_binary_op): Original version renamed to cp_build_binary_op;
1681 new version provides a bridge from c-common.
1682 (cp_build_binary_op): Was build_binary_op; added SFINAE support.
1683 (pointer_diff): Fix calls for SFINAE.
1684 (build_x_unary_op): Add SFINAE support.
1685 (condition_conversion): Fix calls for SFINAE.
1686 (build_unary_op): Original version renamed to cp_build_unary_op;
1687 new version provides a bridge from c-common.
1688 (cp_build_unary_op): Was build_unary_op; added SFINAE support.
1689 (unary_complex_lvalue): Fix calls for SFINAE.
1690 (build_x_conditional_expr): Add SFINAE support.
1691 (build_x_compound_expr_from_list): Fix calls for SFINAE.
1692 (build_x_compound_expr): Add SFINAE support.
1693 (convert_ptrmem): Fix calls for SFINAE.
1694 (build_static_cast_1): Add SFINAE support.
1695 (build_static_cast): Ditto.
1696 (build_reinterpret_cast_1): Ditto.
1697 (build_reinterpret_cast): Ditto.
1698 (build_const_cast_1): Ditto.
1699 (build_const_cast): Ditto.
1700 (build_c_cast): Ditto.
1701 (build_modify_expr): Original version renamed to
1702 cp_build_modify_expr; new version provides a bridge from c-common.
1703 (cp_build_modify_expr): Was build_modify_expr; added SFINAE
1705 (build_x_modify_expr): Add SFINAE support.
1706 (build_ptrmemfunc): Fix calls for SFINAE.
1707 (convert_for_assignment): Add SFINAE support.
1708 (convert_for_initialization): Ditto.
1709 (check_return_expr): Fix calls for SFINAE.
1710 (lvalue_or_else): Add SFINAE support.
1711 * init.c (perform_member_init): Fix calls for SFINAE.
1712 (emit_mem_initializers): Ditto.
1713 (expand_virtual_init): Ditto.
1714 (expand_cleanup_for_base): Ditto.
1715 (build_aggr_init): Add SFINAE support.
1716 (expand_default_init): Ditto.
1717 (expand_aggr_init_1): Fix calls for SFINAE.
1718 (build_offset_ref): Ditto.
1719 (build_new_1): Add SFINAE support.
1721 (build_vec_delete_1): Fix calls for SFINAE.
1722 (get_temp_regvar): Ditto.
1723 (build_vec_init): Add SFINAE support.
1724 (build_dtor_call): Fix calls for SFINAE.
1725 (build_delete): Ditto.
1726 (push_base_cleanups): Ditto.
1727 (build_vec_delete_1): Ditto.
1728 * class.c (build_base_path): Fix calls for SFINAE.
1729 (build_simple_base_path): Ditto.
1730 (convert_to_base_statically): Ditto.
1731 (build_vfn_ref): Ditto.
1732 (resolve_address_of_overloaded_function): Ditto.
1733 * decl.c (check_initializer): Fix calls for SFINAE.
1734 (register_dtor_fn): Ditto.
1735 (compute_array_index_type): Ditto.
1736 (finish_enum): Ditto.
1737 (start_preparsed_function): Ditto.
1738 (cxx_maybe_build_cleanup): Ditto.
1739 * call.c (convert_like): Add COMPLAIN argument.
1740 (convert_like_with_context): Ditto.
1741 (build_this): Fix calls for SFINAE.
1742 (build_user_type_conversion): Ditto.
1743 (resolve_args): Ditto.
1744 (build_new_function_call): Add SFINAE support.
1745 (build_operator_new_call): Fix calls for SFINAE.
1746 (build_object_call): Add SFINAE support.
1747 (build_conditional_expr): Ditto.
1748 (build_new_op): Ditto.
1749 (build_op_delete_call): Fix calls for SFINAE.
1750 (build_temp): Ditto.
1751 (convert_like_real): Add SFINAE support.
1752 (build_x_va_arg): Fix calls for SFINAE.
1753 (convert_default_arg): Ditto.
1754 (build_over_call): Add SFINAE support.
1755 (build_java_interface_fn_ref): Fix calls for SFINAE.
1756 (build_special_member_call): Add SFINAE support.
1757 (build_new_method_call): Ditto.
1758 (perform_implicit_conversion): Ditto.
1759 (perform_direct_initialization_if_possible): Ditto.
1760 (initialize_reference): Fix calls for SFINAE.
1761 * method.c (do_build_assign_ref): Fix calls for SFINAE.
1762 * rtti.c (build_headof): Fix calls for SFINAE.
1763 (get_tinfo_decl_dynamic): Ditto.
1764 (get_typeid): Ditto.
1765 (build_dynamic_cast_1): Add SFINAE support.
1766 (build_dynamic_cast): Ditto.
1767 (tinfo_base_init): Fix calls for SFINAE.
1768 * except.c (do_get_exception_ptr): Fix calls for SFINAE.
1769 (do_end_catch): Ditto.
1770 (initialize_handler_parm): Ditto.
1771 (expand_start_catch_block): Ditto.
1772 (do_allocate_exception): Ditto.
1773 (do_free_exception): Ditto.
1774 (build_throw): Ditto.
1775 * cvt.c (build_up_reference): Fix calls for SFINAE.
1776 (convert_to_reference): Ditto.
1777 (ocp_convert): Ditto.
1778 (convert_to_void): Add SFINAE support.
1779 * tree.c (build_dummy_object): Fix calls for SFINAE.
1780 (stabilize_expr): Ditto.
1781 * cp-tree.h (build_conditional_expr): Add tsubst_flags_t
1783 (build_new_method_call): Ditto.
1784 (build_special_member_call): Ditto.
1785 (build_new_op): Ditto.
1786 (perform_implicit_conversion): Ditto.
1787 (perform_direct_initialization_if_possible): Ditto.
1788 (convert_to_void): Ditto.
1789 (build_aggr_init): Ditto.
1791 (build_vec_init): Ditto.
1792 (build_dynamic_cast): Ditto.
1793 (finish_call_expr): Ditto
1794 (cxx_sizeof_or_alignof_expr): Add COMPLAIN parameter.
1795 (cxx_sizeof_nowarn): Remove macro; add function declaration.
1796 (build_class_member_access_expr): Add tsubst_flags_t parameter.
1797 (finish_class_member_access_expr): Ditto.
1798 (build_x_indirect_ref): Ditto.
1799 (cp_build_indirect_ref): New.
1800 (cp_build_function_call): Add tsubst_flags_t parameter.
1801 (build_x_unary_op): Ditto.
1802 (cp_build_unary_op): New.
1803 (build_x_conditional_expr): Add tsubst_flags_t parameter.
1804 (build_x_compound_expr): Ditto.
1805 (build_compound_expr): Ditto.
1806 (build_static_cast): Ditto.
1807 (build_reinterpret_cast): Ditto.
1808 (build_const_cast): Ditto.
1809 (build_c_cast): Ditto.
1810 (build_x_modify_expr): Ditto.
1811 (cp_build_modify_expr): New.
1812 (convert_for_initialization): Add tsubst_flags_t parameter.
1813 (cp_build_binary_op): Remove macro; add function declaration.
1814 (invalid_nonstatic_memfn_p): Add tsubst_flags_t parameter.
1815 (lvalue_or_else): Ditto.
1816 (build_functional_cast): Ditto.
1817 * typeck2.c (digest_init): Fix calls for SFINAE.
1818 (process_init_constructor_array): Ditto.
1819 (process_init_constructor_record): Ditto.
1820 (build_x_arrow): Ditto.
1821 (build_m_component_ref): Ditto.
1822 (build_functional_cast): Add SFINAE support.
1823 * pt.c (tsubst_copy_and_build): Add (more) SFINAE support.
1824 * semantics.c (simplify_loop_decl_cond): Fix calls for SFINAE.
1825 (finish_expr_stmt): Ditto.
1826 (finish_for_expr): Ditto.
1827 (finish_asm_stmt): Ditto.
1828 (finish_non_static_data_member): Ditto.
1829 (finish_qualified_id_expr): Ditto.
1830 (finish_call_expr): Add SFINAE support.
1831 (finish_increment_expr): Fix calls for SFINAE.
1832 (finish_unary_op_expr): Ditto.
1833 (simplify_aggr_init_expr): Ditto.
1834 (finish_omp_clauses): Ditto.
1835 (finish_omp_for): Ditto.
1836 (finish_omp_barrier): Ditto.
1837 (finish_omo_flush): Ditto.
1838 * decl2.c (grok_array_decl): Fix calls or SFINAE.
1839 (build_anon_union_vars): Ditto.
1840 (get_guard_cond): Ditto.
1842 (one_static_initialization_or_destruction): Ditto.
1843 (do_static_initialization_or_destruction): Ditto.
1844 (generate_ctor_or_dtor_function): Ditto.
1845 (build_offset_ref_call_from_tree): Ditto.
1846 * parser.c (cp_parser_postfix_expression): Fix calls for SFINAE.
1847 (cp_parser_postfix_dot_deref_expression): Ditto.
1848 (cp_parser_unary_expression): Ditto.
1849 (cp_parser_new_expression): Ditto.
1850 (cp_parser_cast_expression): Ditto.
1851 (cp_parser_binary_expression): Ditto.
1852 (cp_parser_question_colon_clause): Ditto.
1853 (cp_parser_assignment_expression): Ditto.
1854 (cp_parser_expression): Ditto.
1855 (cp_parser_builtin_offsetof): Ditto.
1856 (cp_parser_template_argument): Ditto.
1857 (cp_parser_functional_cast): Ditto.
1859 2008-03-24 Tom Tromey <tromey@redhat.com>
1861 * lex.c (handle_pragma_interface): Don't copy the filename.
1862 (handle_pragma_implementation): Copy filename using xstrdup.
1864 2008-03-21 Paolo Carlini <pcarlini@suse.de>
1866 * cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
1867 (SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
1868 (IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
1869 (PROMOTES_TO_AGGR_TYPE): Remove.
1870 (CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
1871 * typeck.c (unary_complex_lvalue, build_modify_expr,
1872 convert_for_initialization): Adjust.
1873 * init.c (is_aggr_type): Remove.
1874 (is_class_type): Add.
1875 (build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
1876 build_delete): Adjust.
1877 * lex.c (make_aggr_type): Remove.
1878 (make_class_type): Add.
1879 (cxx_make_type): Adjust.
1880 * class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
1882 * decl.c (build_typename_type, make_typename_type,
1883 make_unbound_class_template, cxx_init_decl_processing,
1884 check_tag_decl, groktypename, start_decl_1, layout_var_decl,
1885 check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
1886 grok_op_properties, xref_tag, check_function_type): Adjust.
1887 * call.c (check_dtor_name, standard_conversion, implicit_conversion,
1888 add_builtin_candidate, add_builtin_candidates,
1889 build_user_type_conversion_1, convert_like_real, build_cxx_call,
1890 is_subseq, compare_ics): Adjust.
1891 * method.c (use_thunk): Adjust.
1892 * rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
1893 create_tinfo_types): Adjust.
1894 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
1895 build_up_reference, convert_to_reference, convert_from_reference,
1896 ocp_convert, build_expr_type_conversion): Adjust.
1897 * tree.c (bind_template_template_parm, error_type): Adjust.
1898 * dump.c (cp_dump_tree): Adjust.
1899 * search.c (lookup_member): Adjust.
1900 * friend.c (make_friend_class, do_friend): Adjust.
1901 * typeck2.c (store_init_value, process_init_constructor_array,
1902 process_init_constructor_record, build_x_arrow, build_m_component_ref,
1903 build_functional_cast): Adjust.
1904 * pt.c (finish_member_template_decl, process_template_parm,
1905 lookup_template_class, tsubst_function_type, tsubst,
1906 tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
1908 * semantics.c (begin_class_definition, finish_base_specifier,
1909 finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
1911 * name-lookup.c (constructor_name_p, push_overloaded_decl,
1912 do_class_using_decl, lookup_qualified_name,
1913 maybe_process_template_type_declaration): Adjust.
1914 * decl2.c (grok_array_decl, check_member_template,
1915 constrain_class_visibility): Adjust.
1916 * parser.c (cp_parser_class_name): Adjust.
1918 2008-03-18 Paolo Bonzini <bonzini@gnu.org>
1920 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
1922 2008-03-17 Jason Merrill <jason@redhat.com>
1925 * call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
1926 a temp directly to a reference as per DR391.
1928 2008-03-12 Richard Guenther <rguenther@suse.de>
1932 2008-02-04 Richard Guenther <rguenther@suse.de>
1935 * decl.c (record_builtin_java_type): Make jboolean a
1936 integer type again where its mode doesn't match that of bool.
1938 2008-01-25 Richard Guenther <rguenther@suse.de>
1941 * decl.c (record_builtin_java_type): Make __java_boolean
1943 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
1944 after TYPE_MAIN_VARIANT check.
1946 2008-03-10 Jakub Jelinek <jakub@redhat.com>
1949 * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
1953 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
1954 DECL_P in not a variable and appears more than once error messages.
1956 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
1960 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
1964 * typeck.c (structural_comptypes): Call cp_comptypes.
1965 (comptypes): New; called from the C/C++ common bits to perform
1967 (cp_comptypes): Renamed from comptypes, which is already used,
1968 with a different signature, by the C++ front end.
1969 (build_reinterpret_cast_1): Call cp_comptypes.
1970 (ptr_reasonably_similar): Ditto.
1971 * decl.c (decls_match): Ditto.
1972 * cvt.c (convert_to_reference): Ditto.
1973 * cp-tree.h (same_type_p): Ditto.
1974 (same_or_base_type_p): Ditto.
1975 (comptypes): Rename to cp_comptypes.
1976 * pt.c (canonical_type_parameter): Call cp_comptypes.
1978 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
1980 * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
1981 test for equivalence between pointer and references.
1983 2008-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1986 * class.c (finish_struct_anon): Use permerror instead of pedwarn.
1987 (check_field_decls): Likewise.
1988 (note_name_declared_in_class): Likewise.
1989 * call.c (build_new_op): Likewise.
1990 (convert_like_real): Likewise.
1991 (build_over_call): Likewise.
1992 * lex.c (unqualified_fn_lookup_error): Likewise.
1993 * parser.c (cp_parser_template_id): Likewise.
1994 * cvt.c (warn_ref_binding): Likewise.
1995 (convert_to_reference): Likewise.
1996 (ocp_convert): Likewise.
1997 (convert_to_void): Use error instead of pedwarn.
1998 * error.c (cp_cpp_error): Use pedantic_warning_kind.
1999 * decl.c (compute_array_index_type): Use constant_expression_error.
2001 2008-03-01 Douglas Gregor <doug.gregor@gmail.com>
2003 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
2004 that auto is either a storage class or a simple type specifier,
2005 depending on the dialect.
2006 (cp_parser_decl_specifier_seq): Complain about `auto' as a storage
2007 specifier in C++98 mode, error in C++0x mode (since we don't
2008 support auto as a type specifier, yet).
2009 (cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
2010 storage specifier in C++0x mode.
2011 (cp_parser_simple_type_specifier): Parse `auto' as a
2012 simple-type-specifier, but error because we don't support it yet.
2014 2008-02-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2016 * parser.c (cp_parser_nonclass_name): New.
2017 (cp_parser_pseudo_destructor_name): Use it instead of
2018 cp_parser_type_name.
2019 (cp_parser_type_name): Move code to cp_parser_nonclass_name.
2021 2008-02-29 Tom Tromey <tromey@redhat.com>
2023 * parser.c (struct cp_token) <input_file_stack_index>: Remove.
2024 (cp_lexer_get_preprocessor_token): Update.
2025 (cp_lexer_set_source_position_from_token): Don't call
2026 restore_input_file_stack.
2027 * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
2029 2008-02-28 Richard Guenther <rguenther@suse.de>
2032 2008-02-26 Richard Guenther <rguenther@suse.de>
2034 * decl.c (duplicate_decls): Remove decl from global mapping
2035 before ggc_freeing it.
2037 2008-02-27 Jakub Jelinek <jakub@redhat.com>
2040 * rtti.c: Include c-pragma.h.
2041 (push_abi_namespace, pop_abi_namespace): New functions.
2042 (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
2043 create_tinfo_types, emit_support_tinfos): Use them.
2044 * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
2046 2008-02-26 Jason Merrill <jason@redhat.com>
2049 * decl.c (grokdeclarator): Allow a typedef of an unnamed struct
2050 to name the struct for linkage purposes even if it has attributes.
2051 (start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
2053 2008-02-26 Tom Tromey <tromey@redhat.com>
2055 * parser.c (eof_token): Remove old location code.
2056 (check_empty_body): Remove test of USE_MAPPED_LOCATION.
2057 * decl2.c (generate_ctor_or_dtor_function): Remove old location
2059 (cp_write_global_declarations): Likewise.
2060 * lex.c (cxx_init): Remove old location code.
2061 (handle_pragma_implementation): Remove test of
2062 USE_MAPPED_LOCATION.
2063 * pt.c (tsubst): Remove old location code.
2064 * error.c (cp_print_error_function): Remove test of
2065 USE_MAPPED_LOCATION.
2066 * decl.c (pop_label): Remove old location code.
2067 (finish_function): Likewise.
2069 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2072 * call.c (magic_varargs_p): Remove BUILT_IN_STDARG_START.
2074 2008-02-26 Richard Guenther <rguenther@suse.de>
2076 * decl.c (duplicate_decls): Remove decl from global mapping
2077 before ggc_freeing it.
2079 2008-02-26 Paolo Carlini <pcarlini@suse.de>
2082 * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
2084 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2086 * typeck.c (build_class_member_access_expr): Add appropriate
2087 OPT_W* parameter to warning.
2088 (build_reinterpret_cast_1): Likewise.
2089 * name-lookup.c (push_overloaded_decl): Likewise.
2091 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2094 * error.c (dump_expr): Handle CONJ_EXPR.
2096 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2099 * error.c (dump_type): Handle FIXED_POINT_TYPE.
2100 (dump_expr): Handle FIXED_CST.
2102 2008-02-24 Jason Merrill <jason@redhat.com>
2104 * parser.c (cp_parser_declaration): Handle "inline namespace".
2105 (cp_parser_namespace_definition): Likewise.
2108 * name-lookup.c (arg_assoc_namespace): Look down into inline
2111 2008-02-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2113 * typeck.c (check_for_casting_away_constness): Use 1 single
2114 argument, the type of cast, to decide what diagnostics generate.
2115 (build_static_cast_1): Remove unused code. Update call to
2116 check_for_casting_away_constness.
2117 (build_reinterpret_cast_1): Update call to
2118 check_for_casting_away_constness.
2119 (build_const_cast_1): Likewise.
2121 2008-02-24 Paolo Carlini <pcarlini@suse.de>
2123 * error.c (dump_expr): Don't deal directly with NEW_EXPR (and
2124 VEC_NEW_EXPR), forward to pp_expression.
2125 * cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
2127 2008-02-24 Danny Smith <dannysmith@users.sourceforge.net>
2130 * friend.c (do_friend): Call cplus_decl_attributes earlier.
2132 2008-02-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
2135 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
2136 template decls' function decl.
2138 2008-02-22 Paolo Carlini <pcarlini@suse.de>
2142 2008-02-14 Paolo Carlini <pcarlini@suse.de>
2145 * pt.c (determine_specialization): In case of function templates,
2146 when the type of DECL does not match FN there is no match.
2148 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2151 * typeck.c (build_binary_op): Warn about floating point
2152 comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
2154 2008-02-19 Jason Merrill <jason@redhat.com>
2157 * pt.c (resolve_overloaded_unification): Set processing_template_decl
2158 while we look for possible bindings.
2160 2008-02-19 Jakub Jelinek <jakub@redhat.com>
2163 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
2167 * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
2168 vars. Afterwards ensure v is VAR_DECL.
2171 * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
2172 call cp_finish_decl.
2173 * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
2176 2008-02-15 Douglas Gregor <doug.gregor@gmail.com>
2181 * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
2182 is error_mark_node, return an error early.
2183 (find_parameter_packs_r): Pass the pointer set along to recursive
2184 calls of cp_walk_subtrees; don't try to manage the pointer set
2186 (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
2187 (make_pack_expansion): Ditto.
2188 (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
2189 a second pass through the tree with find_parameter_packs_r; that
2190 second pass no longer does anything.
2191 (push_template_decl_real): If we have an erroneous declaration,
2192 set its type to error_mark_node before returning an error.
2194 2008-02-14 Douglas Gregor <doug.gregor@gmail.com>
2197 * pt.c (tsubst_initializer_list): Deal with the use of
2198 VOID_TYPE_NODE to indicate value-initialization of the bases.
2200 2008-02-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2201 Jason Merrill <jason@redhat.com>
2205 * class.c (type_has_user_nondefault_constructor): New fn.
2206 * cp-tree.h: Declare it.
2207 * init.c (emit_mem_initializers): Use it for -W warning about
2208 missing base initializer.
2210 2008-02-14 Paolo Carlini <pcarlini@suse.de>
2213 * pt.c (determine_specialization): In case of function templates,
2214 when the type of DECL does not match FN there is no match.
2216 2008-02-13 Jakub Jelinek <jakub@redhat.com>
2217 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2220 * parser.c (cp_parser_pseudo_destructor_name): If next tokens
2221 are not identifier :: ~, return before calling cp_parser_type_name.
2223 2008-02-13 Jason Merrill <jason@redhat.com>
2225 PR c++/34962, c++/34937, c++/34939
2226 * decl2.c (is_late_template_attribute): Always defer attributes
2227 vector_size and weak.
2230 * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
2231 of enumerators, too.
2233 2008-02-12 Jason Merrill <jason@redhat.com>
2236 * call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
2237 if we're doing conversions to call a user-defined conversion function.
2239 2008-02-12 Steven Bosscher <steven@gcc.gnu.org>
2242 * semantics.c (finish_qualified_id_expr): Avoid duplicate access
2245 2008-02-12 Jakub Jelinek <jakub@redhat.com>
2248 * init.c (build_new_1): Don't create placement_expr before
2249 constructing alloc_call. Verify that the pointer is passed by
2250 value to operator new.
2252 2008-02-11 Jason Merrill <jason@redhat.com>
2255 * pt.c (tsubst): Don't look up a template typedef in an explicit
2258 2008-02-11 Douglas Gregor <doug.gregor@gmail.com>
2261 * tree.c (cp_build_qualified_type_real): When building a
2262 cv-qualified array type, build it as a unique type with
2263 build_cplus_array_type_1 and then adopt the unqualified type's
2266 2008-02-11 Paolo Carlini <pcarlini@suse.de>
2269 * decl.c (groktypename): Check grokdeclarator return.
2271 2008-02-10 Jason Merrill <jason@redhat.com>
2274 * decl2.c (cp_write_global_declarations): Don't write out static
2275 data members with DECL_IN_AGGR_P set.
2277 2008-02-08 Jason Merrill <jason@redhat.com>
2280 * tree.c (build_target_expr_with_type): Handle void initializer.
2281 (bot_manip): Remap slot before recursing.
2283 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2286 * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
2288 2008-02-06 Alexandre Oliva <aoliva@redhat.com>
2291 * tree.c: Include tree-flow.h.
2292 (build_target_expr): Check type compatibility.
2293 * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
2294 * call.c (convert_like_real): Convert bitfield to expected type.
2296 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
2300 * typeck.c (structural_comptypes): Call cp_comptypes.
2301 (comptypes): New; called from the C/C++ common bits to perform
2303 (cp_comptypes): Renamed from comptypes, which is already used,
2304 with a different signature, by the C++ front end.
2305 (build_reinterpret_cast_1): Call cp_comptypes.
2306 (ptr_reasonably_similar): Ditto.
2307 * decl.c (decls_match): Ditto.
2308 * cvt.c (convert_to_reference): Ditto.
2309 * cp-tree.h (same_type_p): Ditto.
2310 (same_or_base_type_p): Ditto.
2311 (comptypes): Rename to cp_comptypes.
2312 * pt.c (canonical_type_parameter): Call cp_comptypes.
2314 2008-02-05 Jakub Jelinek <jakub@redhat.com>
2317 * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
2318 value dependent expression.
2320 2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
2323 * decl2.c (save_template_attributes): When we're modifying the
2324 TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
2325 all of the other variants to add those same attributes. Otherwise,
2326 the main variant will be inconsistent with those other variants.
2328 2008-02-04 Richard Guenther <rguenther@suse.de>
2331 * decl.c (record_builtin_java_type): Make jboolean a
2332 integer type again where its mode doesn't match that of bool.
2334 2008-02-02 Jason Merrill <jason@redhat.com>
2335 Mark Mitchell <mark@codesourcery.com>
2338 * init.c (build_value_init_1): New function.
2339 (build_value_init): New function.
2340 * typeck2.c (build_functional_cast): Call it.
2341 * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
2343 * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
2344 TYPE_HAS_CONSTRUCTOR.
2345 * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
2346 add_implicitly_declared_members): Adjust.
2347 (check_field_decls): Adjust. Remove warnings about reference/const
2348 in class without constructor.
2349 (check_bases_and_members): Adjust. Give those warnings here instead.
2350 * decl.c (fixup_anonymous_aggr): Adjust.
2351 (check_initializer): Adjust, clarify logic slightly.
2352 (grok_special_member_properties): Adjust, only set if user-provided.
2353 * rtti.c (create_tinfo_types): Don't set.
2354 * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
2355 Use same_type_ignoring_top_level_qualifiers_p.
2356 * pt.c (check_explicit_specialization): Adjust.
2357 (instantiate_class_template): Adjust.
2359 2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
2360 Jakub Jelinek <jakub@redhat.com>
2364 * typeck.c (structural_comptypes): Handle comparisons of
2365 VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
2367 * mangle.c (write_builtin_type): Map down to the canonical type,
2368 which will be one of the predefined type nodes.
2370 2008-01-29 Michael Meissner <michael.meissner@amd.com>
2373 * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
2374 bits to allow for expansion of the number of middle end tree
2377 2008-01-29 Douglas Gregor <doug.gregor@gmail.com>
2388 * typeck.c (check_return_expr): Tweak call to
2389 check_for_bare_parameter_packs.
2390 * class.c (add_method): Be careful with error_mark_nodes.
2391 * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
2393 * pt.c (struct find_parameter_pack_data): Remove
2395 (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
2396 (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
2397 (make_pack_expansion): Ditto.
2398 (check_for_bare_parameter_packs): Parameter is now a tree, not a
2400 (process_template_parm): Tweak call to
2401 check_for_bare_parameter_packs.
2402 (push_template_decl_real): Tweak calls to
2403 check_for_bare_parameter_packs. If bare parameter packs are found
2404 in the list of exceptions, clear out that list after giving an
2406 * semantics.c (finish_cond): Tweak call to
2407 check_for_bare_parameter_packs.
2408 (finish_expr_stmt): Ditto.
2409 (finish_for_expr): Ditto.
2410 (finish_switch_cond): Ditto.
2411 (finish_mem_initializers): Ditto.
2412 (finish_member_declaration): Ditto.
2413 (finish_static_assert): Check for bare parameter packs in the
2415 * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
2416 attributes of a declaration.
2417 * parser.c (cp_parser_using_declaration): Tweak call to
2418 check_for_bare_parameter_packs.
2419 (cp_parser_base_clause): Ditto.
2421 2008-01-28 Jason Merrill <jason@redhat.com>
2424 * class.c (build_base_path): Fix !want_pointer case.
2426 2008-01-27 Jason Merrill <jason@redhat.com>
2429 * class.c (build_base_path): Fix previous change.
2431 2008-01-26 Jakub Jelinek <jakub@redhat.com>
2434 * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
2437 2008-01-26 Richard Guenther <rguenther@suse.de>
2440 * typeck.c (build_binary_op): Remove code to shorten compares.
2442 2008-01-25 Richard Guenther <rguenther@suse.de>
2445 * decl.c (record_builtin_java_type): Make __java_boolean
2447 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
2448 after TYPE_MAIN_VARIANT check.
2450 2008-01-25 Jason Merrill <jason@redhat.com>
2453 * class.c (build_base_path): Don't mess with virtual access if
2455 * call.c (standard_conversion): Don't check whether source type
2458 * decl2.c (is_late_template_attribute): Don't defer attribute
2459 visibility just because the type is dependent.
2461 2008-01-25 Jason Merrill <jason@redhat.com>
2462 Mark Mitchell <mark@codesourcery.com>
2465 * call.c (standard_conversion): Allow conversion from integer/real
2467 (compare_ics): Such a conversion is worse than a normal arithmetic
2470 2008-01-25 Richard Guenther <rguenther@suse.de>
2473 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
2476 2008-01-24 Paolo Carlini <pcarlini@suse.de>
2479 * pt.c (push_template_decl_real): Return error_mark_node in case
2480 of template definition of non-template.
2482 2008-01-24 Jason Merrill <jason@redhat.com>
2485 * decl2.c (is_late_template_attribute): Defer any attribute with
2486 dependent args. Also defer type attributes if the type is dependent.
2488 2008-01-22 Jakub Jelinek <jakub@redhat.com>
2489 Alexandre Oliva <aoliva@redhat.com>
2492 * call.c (reference_binding): For bitfields use the declared bitfield
2494 (add_builtin_candidates): Likewise.
2495 * class.c (layout_class_type): For bitfields copy over the
2496 original type quals.
2498 2008-01-22 Jason Merrill <jason@redhat.com>
2501 * decl.c (groktypename): Also ignore attributes on dependent
2502 possibly-class types.
2505 * friend.c (do_friend): Check for prior declaration of a friend
2506 function of a local class.
2507 * name-lookup.c (lookup_name_innermost_nonclass_level):
2509 * name-lookup.h: Declare it.
2511 2008-01-22 Tom Tromey <tromey@redhat.com>
2514 * init.c (build_new_1): Only disallow Java aggregates.
2516 2008-01-22 Jakub Jelinek <jakub@redhat.com>
2519 * semantics.c (finish_omp_for): Don't call c_finish_omp_for
2520 if decl or init is error_mark_node.
2523 * error.c (dump_expr): Handle VECTOR_CST.
2525 2008-01-21 Jason Merrill <jason@redhat.com>
2528 * pt.c (tsubst_aggr_type): Make sure our context is complete.
2531 * pt.c (retrieve_local_specialization): Robustify.
2532 (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
2535 * pt.c (tsubst): Only call retrieve_local_specialization if the
2536 original typedef was in a function template.
2539 * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
2541 2008-01-21 Richard Guenther <rguenther@suse.de>
2544 * error.c (cp_print_error_function): Deal with recursive
2547 2008-01-20 Paolo Carlini <pcarlini@suse.de>
2550 * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
2552 2008-01-20 Paolo Carlini <pcarlini@suse.de>
2556 * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
2557 on non-IS_AGGR_TYPE scope.
2558 (constructor_name_p): Assert IS_AGGR_TYPE.
2560 2008-01-18 Ian Lance Taylor <iant@google.com>
2563 * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
2564 (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
2565 DECL_IS_OPERATOR_NEW flag.
2567 2008-01-16 Richard Guenther <rguenther@suse.de>
2570 * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
2571 for conversions to type variants.
2573 2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
2575 * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
2576 declaration and code. Update copyright year.
2578 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2581 * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
2582 know we have a class type.
2584 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2587 * pt.c (coerce_template_parameter_pack): When substituting into
2588 the type of a non-type template parameter pack. use the
2589 deduced/substituted arguments.
2590 * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
2591 can be a parameter pack with the ellipsis following it. When we
2592 have an erroneous declaration, allow it to be a parameter pack.
2593 (cp_parser_template_parameter): Complain about default
2594 arguments on non-type template parameter packs, and parse them
2595 using the new cp_parser_default_argument.
2596 (cp_parser_parameter_declaration): Complain about parameter packs
2597 with default arguments. Move parsing of default arguments into a
2598 new function, cp_parser_default_argument.
2599 (cp_parser_default_argument): New; extracted from
2600 cp_parser_parameter_declaration.
2602 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2608 * typeck.c (check_return_expr): If there are bare parameter packs
2609 in the return value, set it to error_mark_node.
2610 * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
2611 * pt.c (find_parameter_packs_r): Look at the type of
2612 IDENTIFIER_NODEs (e.g., for user-defined conversions).
2613 (check_for_bare_parameter_packs): Flip the result: now returns
2614 TRUE when there were bare parameter packs, FALSE otherwise.
2615 (push_template_decl_real): Deal with flipped result of
2616 check_for_bare_parameter_packs.
2617 * semantics.c (finish_cond): If there are bare parameter packs in
2618 the conditional, set it to error_mark_node.
2619 (finish_expr_stmt): If there are bare parameter packs in the
2620 expression, set it to error_mark_node.
2621 (finish_for_expr): Ditto.
2622 (finish_switch_cond): If there are bare parameter packs in
2623 the conditional, set it to error_mark_node.
2624 (finish_mem_initializers): If there are bare parameter packs in
2625 the member initializer, set it to error_mark_node.
2626 (finish_member_declaration): Check the attributes of the
2627 declaration for bare parameter packs, and remove the attributes if
2628 any have bare parameter packs.
2629 * parser.c (cp_parser_using_declaration): Check the using
2630 declaration for bare parameter packs.
2631 (cp_parser_base_clause): If there are bare parameter packs in a
2632 base specifier, don't add it to the chain.
2634 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2637 * error.c (dump_simple_decl): Display ellipsis for template
2638 non-type parameter packs.
2639 (dump_decl): Display ellipsis for template type parameter packs.
2640 (dump_template_decl): Display ellipsis for template template
2642 * pt.c (redeclare_class_template): When redeclaring a class
2643 template, check for collisions between template parameters and
2644 template parameter packs.
2646 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2649 * pt.c (process_partial_specialization): Don't mark template
2650 parameters that occur in non-deduced contexts.
2651 (struct pair_fn_data): Add include_nondeduced_p.
2652 (for_each_template_parm_r): Only visit non-deduced contexts if
2653 include_nondeduced_p is set.
2654 (for_each_template_parm): Added parameter include_nondeduced_p,
2655 which states whether template parameters found in non-deduced
2656 contexts should be visited.
2657 (uses_template_parms): Visit all template parameters, even those
2658 in non-deduced contexts.
2660 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2663 * pt.c (check_default_tmpl_args): Check for parameter packs that
2664 aren't at the end of a primary template.
2665 (push_template_decl_real): Remove check for parameter packs that
2666 aren't at the end of a primary template; that now happens in
2667 check_default_tmpl_args.
2668 * semantics.c (finish_template_template_parm): Use
2669 check_default_tmpl_args to check for errors in the template
2672 2008-01-12 Doug Kwan <dougkwan@google.com>
2674 * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
2675 instead of OPT_Wreturn_type in warning due to ignored return type
2677 * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
2678 instead of OPT_Wreturn_type in warning due to ignored return type
2681 2008-01-08 Jakub Jelinek <jakub@redhat.com>
2684 * semantics.c (finish_omp_for): Don't call
2685 fold_build_cleanup_point_expr if processing_template_decl.
2687 2008-01-04 Paolo Carlini <pcarlini@suse.de>
2688 Jakub Jelinek <jakub@redhat.com>
2691 * error.c (dump_template_argument): Deal with TREE_LIST.
2693 2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
2695 * parser.c (cp_parser_check_decl_spec): Don't warn about "long
2696 long" in C++0x mode; change the warning to note that "long long"
2697 is only unsupported in C++98 mode.
2699 2007-12-20 Jason Merrill <jason@redhat.com>
2702 * call.c (standard_conversion): Derived-to-base is considered a
2703 standard conversion.
2705 2007-12-19 Jakub Jelinek <jakub@redhat.com>
2708 * parser.c (cp_parser_omp_parallel): For non-combined parallel
2709 call cp_parser_statement rather than
2710 cp_parser_already_scoped_statement.
2712 2007-12-18 Jason Merrill <jason@redhat.com>
2715 * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
2717 (dependent_type_p_r): Handle the domain of an array.
2719 2007-12-18 Douglas Gregor <doug.gregor@gmail.com>
2720 Jakub Jelinek <jakub@redhat.com>
2725 * pt.c (template_template_parm_bindings_ok_p): New; verifies
2726 bindings of template template parameters after all template
2727 arguments have been deduced.
2728 (coerce_template_parms): Don't complain when COMPLAIN doesn't
2730 (fn_type_unification): Use template_template_parm_bindings_ok_p.
2731 (unify): Deal with variadic, bound template template parameters.
2732 (get_class_bindings): Use template_template_parm_bindings_ok_p.
2734 2007-12-18 Jakub Jelinek <jakub@redhat.com>
2737 * decl.c (grokdeclarator): Reject friend sfk_constructor
2740 2007-12-17 Jakub Jelinek <jakub@redhat.com>
2743 * parser.c (cp_parser_omp_all_clauses): Accept optional comma
2746 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
2749 * cp-lang.c (cp_classify_record): New.
2750 (LANG_HOOKS_CLASSIFY_RECORD): Override.
2752 2007-12-11 Jakub Jelinek <jakub@redhat.com>
2755 * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
2758 * rtti.c (build_dynamic_cast): Call convert_from_reference even for
2759 dynamic_cast in a template.
2761 2007-12-10 Simon Martin <simartin@users.sourceforge.net>
2764 * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
2765 MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
2767 2007-12-10 Jakub Jelinek <jakub@redhat.com>
2770 * error.c (dump_type_prefix, dump_type_suffix): Handle
2771 TYPE_PACK_EXPANSION.
2774 * error.c (dump_expr): Handle ABS_EXPR.
2776 2007-12-09 Jakub Jelinek <jakub@redhat.com>
2780 * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
2781 in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2782 Return 2 also if DECL_EXPLICIT_INSTANTIATION.
2783 * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
2784 flag_use_repository and repo_emit_p returned 2.
2786 2007-12-06 Jakub Jelinek <jakub@redhat.com>
2789 * tree.c (stabilize_call, stabilize_init): Do nothing if
2790 processing_template_decl.
2792 2007-12-05 Jakub Jelinek <jakub@redhat.com>
2795 * semantics.c (finish_decltype_type): For SCOPE_REF issue an
2796 error instead of assertion failure.
2797 * parser.c (cp_parser_decltype): If closing paren is not found,
2798 return error_mark_node.
2800 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2803 * name-lookup.c (arg_assoc_template_arg): Recurse on argument
2805 (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
2806 since arg_assoc_template_arg will deal with them (better).
2808 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2811 * pt.c (tsubst_exception_specification): Handle substitutions into
2812 member templates, where tsubst_pack_expansion returns a
2813 TYPE_PACK_EXPANSION.
2815 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2818 * pt.c (unify_pack_expansion): If we didn't deduce any actual
2819 bindings for the template parameter pack, don't try to keep the
2820 empty deduced arguments.
2821 (unify): If a parameter is a template-id whose template argument
2822 list contains a pack expansion that is not at the end, then we
2823 cannot unify against that template-id.
2825 2007-12-02 Paolo Carlini <pcarlini@suse.de>
2828 * pt.c (current_template_args): Use error_operand_p.
2830 2007-12-02 Paolo Carlini <pcarlini@suse.de>
2833 * error.c (dump_decl): Handle TREE_BINFO.
2835 2007-12-01 Ollie Wild <aaw@google.com>
2838 * typeck.c (build_binary_op): Add conversion of pointers to function
2839 members appearing as operands to the equality operators.
2841 2007-11-30 Jakub Jelinek <jakub@redhat.com>
2844 * error.c (dump_expr): Handle OBJ_TYPE_REF.
2846 2007-11-29 Jakub Jelinek <jakub@redhat.com>
2849 * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
2851 * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
2856 * parser.c (cp_parser_decltype): Don't call finish_id_expression
2858 * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
2861 2007-11-27 Jakub Jelinek <jakub@redhat.com>
2863 PR tree-optimization/34181
2864 * method.c (use_thunk): Don't inline the call in the thunk.
2867 * tree.c (decl_linkage): Static data members and static member
2868 functions in anonymous ns classes are lk_external.
2870 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
2873 * decl.c (start_preparsed_function): Pass
2874 processing_template_decl for the new allocate_struct_function
2877 2007-11-25 Richard Guenther <rguenther@suse.de>
2879 * decl.c (poplevel): Use BLOCK_CHAIN.
2881 2007-11-24 Ollie Wild <aaw@google.com>
2883 * typeck.c (delta_from_ptrmemfunc): New function.
2884 (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
2885 (build_binary_op): Call delta_from_ptrmemfunc.
2887 2007-11-23 Jakub Jelinek <jakub@redhat.com>
2891 * decl.c (cp_finish_decl): Disallow variable or field
2892 definitions if extern "Java" aggregates.
2893 (grokparms): Disallow parameters with extern "Java"
2895 (check_function_type): Disallow function return values
2896 with extern "Java" aggregates.
2897 * init.c (build_new_1): Disallow placement new with
2898 extern "Java" aggregates.
2900 2007-11-23 Mark Mitchell <mark@codesourcery.com>
2901 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2904 * call.c (convert_like_real): Build a zero constant when __null is
2905 converted to an integer type.
2907 2007-11-22 Jakub Jelinek <jakub@redhat.com>
2910 * decl2.c (cp_write_global_declarations): Issue error about static
2911 data members in anonymous namespace which are declared and used,
2914 2007-11-20 Jakub Jelinek <jakub@redhat.com>
2917 * parser.c (cp_parser_class_head): Reject function template ids.
2920 * tree.c (build_cplus_array_type_1): Don't pass any VLA types
2921 when processing_template_decl to build_array_type.
2924 * pt.c (more_specialized_fn): Don't segfault if one or
2925 both argument list end with ellipsis.
2927 2007-11-18 Jakub Jelinek <jakub@redhat.com>
2930 * semantics.c (finish_call_expr): Set
2931 current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
2932 or OVERLOAD with all noreturn functions.
2934 2007-11-16 Jakub Jelinek <jakub@redhat.com>
2937 * pt.c (apply_late_template_attributes): Do nothing if decl's type is
2940 2007-11-13 Jakub Jelinek <jakub@redhat.com>
2947 * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
2948 set to error_mark_node the outermost POINTER_TYPE to the pack if
2949 it is seen in a POINTER_TYPE.
2950 (push_template_decl_real): If check_for_bare_parameter_packs
2951 fails for function return type, set the return type to
2952 integer_type_node. If check_for_bare_parameter_packs failed
2953 for non-function, return error_mark_node.
2956 * call.c (build_new_op): Call resolve_args before calling
2959 2007-11-11 Tom Tromey <tromey@redhat.com>
2962 * lex.c (handle_pragma_implementation): Use cpp_included_before.
2964 2007-11-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2967 * pt.c (redeclare_class_template): Update error message. Use a
2968 note to show the previous declaration.
2969 (tsubst_friend_class): Use the location of the friend template as
2970 the input location before calling redeclare_class_template.
2972 2007-11-11 Jakub Jelinek <jakub@redhat.com>
2975 * semantics.c (finish_pseudo_destructor_expr): Handle
2976 object == error_mark_node.
2978 2007-11-10 Jakub Jelinek <jakub@redhat.com>
2981 * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
2982 is not scalar type, let finish_class_member_access_expr handle
2983 diagnostics. Pass BIT_NOT_EXPR argument to
2984 finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
2986 2007-11-09 Douglas Gregor <doug.gregor@gmail.com>
2989 * decl.c (cp_complete_array_type): If any of the initializer
2990 elements are pack expansions, don't compute the array size yet.
2992 2007-11-08 Andrew Pinski <pinskia@gmail.com>
2995 * tree.c (decl_linkage): Fields have no linkage.
2997 2007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
2999 * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
3001 2007-11-07 Douglas Gregor <doug.gregor@gmail.com>
3006 * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
3007 Be careful with ERROR_MARK_NODEs.
3008 * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
3011 2007-11-07 Jakub Jelinek <jakub@redhat.com>
3014 * call.c (build_over_call): Don't check TREE_ADDRESSABLE
3017 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
3021 * tree.c (c_build_qualified_type): Define bridge to
3022 cp_build_qualified_type.
3024 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
3035 * typeck.c (check_return_expr): Pass address of retval to
3036 check_for_bare_parameter_packs.
3037 * class.c (build_base_field): Tolerate bases that have no layout
3039 (end_of_base): Ditto.
3040 * tree.c (canonical_type_variant): Be careful with
3042 * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
3044 * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
3045 which states whether parameter packs should be replaced with
3047 (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
3048 possible. If set_packs_to_error is set true, replace the parameter
3049 pack with ERROR_MARK_NODE. Manage our own pointer sets.
3050 (uses_parameter_packs): Don't set parameter packs to
3052 (check_for_bare_parameter_packs): Now takes a pointer to a tree,
3053 which may be modified (if it is a parameter pack). Instructs
3054 find_parameter_packs_r to replace parameter packs with
3055 ERROR_MARK_NODE (so that they won't cause errors later on).
3056 (process_template_parm): Pass pointer to
3057 check_for_bare_parameter_packs.
3058 (process_partial_specialization): Replace pack expansions before
3059 the end of the template argument list with ERROR_MARK_NODE.
3060 (push_template_decl_real): Pass pointer to
3061 check_for_bare_parameter_packs. Replace parameter packs not at the
3062 end of the template parameter list with ERROR_MARK_NODE.
3063 (convert_template_argument): Be more careful about using DECL_NAME
3064 on only declarations.
3065 (unify): Can't unify against ERROR_MARK_NODE.
3066 * semantics.c (finish_cond): Pass pointer to
3067 check_for_bare_parameter_packs.
3068 (finish_expr_stmt): Ditto.
3069 (finish_for_expr): Ditto.
3070 (finish_switch_cond): Pass pointer to
3071 check_for_bare_parameter_packs, and call it before we put the
3072 condition into the statement.
3073 (finish_mem_initializers): Pass pointer to
3074 check_for_bare_parameter_packs.
3075 (finish_member_declaration): Ditto.
3076 * parser.c (cp_parser_base_clause): Ditto.
3078 2007-11-06 Jakub Jelinek <jakub@redhat.com>
3081 * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
3082 with the final TREE_READONLY flag in place. processing_template_decl
3083 is known to be 0 in this part of function.
3086 * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
3087 OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
3088 * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
3089 * semantics.c (finish_omp_atomic): Revert most of the
3090 2007-02-05 changes, just keep the new representation of
3091 OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
3093 2007-11-05 H.J. Lu <hongjiu.lu@intel.com>
3096 * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
3099 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
3104 * typeck.c (merge_types): Don't lose rvalue references when
3106 * call.c (build_over_call): Don't elide move constructors just
3107 because the copy constructor is trivial (!).
3108 (compare_ics): If comparing cv-qualifiers fails, we can still order
3109 based on binding lvalues vs. rvalues.
3111 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
3114 * pt.c (unify_pack_expansion): bring handling of function call
3115 arguments into line with type_unification_real.
3117 2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3119 * typeck.c (build_binary_op): Use pedwarn instead of error for
3122 2007-11-05 Jakub Jelinek <jakub@redhat.com>
3125 * parser.c (cp_parser_unary_expression): For &&label call
3126 cp_parser_non_integral_constant_expression and return error_mark_node
3127 if it returned true.
3130 * decl.c (grokdeclarator): Don't call build_memfn_type if type
3131 is neither FUNCTION_TYPE nor METHOD_TYPE.
3133 2007-11-02 Jakub Jelinek <jakub@redhat.com>
3136 * parser.c (cp_parser_nested_name_specifier_opt): Use
3137 TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
3138 typedef of currently open class.
3140 2007-11-02 Paolo Carlini <pcarlini@suse.de>
3143 * error.c (dump_expr): Deal specially with statements.
3145 2007-11-01 Jason Merrill <jason@redhat.com>
3148 * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
3150 (lookup_template_class): Use it to get the outer template args
3151 for instantiating one.
3154 * pt.c (reduce_template_parm_level): tsubst the parameters
3155 of a template template parm.
3157 2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
3160 * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
3162 2007-11-01 Jakub Jelinek <jakub@redhat.com>
3165 * parser.c (cp_parser_postfix_dot_deref_expression): If
3166 POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
3167 first and if that succeeds and type is SCALAR_TYPE_P, create
3171 * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
3172 (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
3173 as for std::type_info.
3175 2007-10-31 Paolo Carlini <pcarlini@suse.de>
3178 * cxx-pretty-print.c (pp_cxx_typeid_expression,
3179 pp_cxx_delete_expression): Change to static linkage.
3180 * cxx-pretty-print.h: Adjust declarations.
3181 * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
3182 MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
3183 MODOP_EXPR): Forward to pp_expression.
3185 * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
3188 2007-10-31 Christian Bruel <christian.bruel@st.com>
3189 Mark Mitchell <mark@codesourcery.com>
3192 * typeck.c (check_return_expr): Don't set named_return_value_okay_p
3193 if retval is volatile.
3195 2007-10-30 Jakub Jelinek <jakub@redhat.com>
3198 * decl2.c (build_offset_ref_call_from_tree): Call
3199 build_non_dependent_expr on object prior to building ADDR_EXPR from it
3200 if FN is DOTSTAR_EXPR.
3202 2007-10-30 Douglas Gregor <doug.gregor@gmail.com>
3206 * pt.c (find_parameter_packs_r): Fix typo in comment.
3207 (convert_template_argument): Look at the pattern of a pack
3208 expansion to determine what kind of entity we're converting.
3209 (coerce_template_parameter_pack): When we have coerced a non-type
3210 template parameter pack, substitute into the type of that pack.
3211 (tsubst_pack_expansion): When our substitution of a parameter pack
3212 is a "trivial" substitution of itself, just substitute into the
3213 pack expansion rather than actually expanding.
3215 2007-10-29 Jakub Jelinek <jakub@redhat.com>
3218 * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
3219 for non-integral type bitfields. Return true if bitfield is correct, false
3220 error has been diagnosed.
3221 (check_field_decls): If check_bitfield_decl returned false, call also
3224 2007-10-28 Paolo Carlini <pcarlini@suse.de>
3225 Mark Mitchell <mark@codesourcery.com>
3228 * pt.c (do_decl_instantiation): If the VAR_DECL is not a
3229 class member error out and return.
3231 2007-10-27 Jakub Jelinek <jakub@redhat.com>
3233 * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
3234 to current_function_decl rather than 0.
3237 * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
3239 * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
3241 2007-10-27 Jason Merrill <jason@redhat.com>
3244 * call.c (convert_default_arg): Detect recursion.
3246 2007-10-27 Jakub Jelinek <jakub@redhat.com>
3249 * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
3250 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
3252 (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
3254 * error.c (dump_expr): Handle OFFSETOF_EXPR.
3256 2007-10-26 Jason Merrill <jason@redhat.com>
3259 * pt.c (get_template_info): New fn.
3260 (template_class_depth): Use it.
3261 (push_template_decl_real): Check that the template args of the
3262 definition match the args of the previous declaration.
3264 2007-10-26 Paolo Carlini <pcarlini@suse.de>
3267 * decl2.c (coerce_new_type): Do not allow a default argument for
3268 the first parameter.
3270 2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
3273 * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
3274 don't see the leading '('. Only lookup names if we get an
3277 2007-10-26 Jakub Jelinek <jakub@redhat.com>
3280 * parser.c (cp_parser_parenthesized_expression_list): Set
3281 greater_than_is_operator_p to true in between the parens.
3283 2007-10-26 Paolo Carlini <pcarlini@suse.de>
3286 * decl.c (grokdeclarator): In case of conflicting specifiers
3287 just return error_mark_node.
3289 2007-10-26 Ollie Wild <aaw@google.com>
3291 * expr.c (cxx_expand_expr): Removed.
3292 * cp-tree.h (exx_expand_expr): Removed.
3293 * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
3296 2007-10-25 Paolo Carlini <pcarlini@suse.de>
3299 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
3301 2007-10-23 Jason Merrill <jason@redhat.com>
3303 PR c++/25950 (DR 391)
3304 * call.c (struct conversion): Remove check_copy_constructor_p.
3305 (reference_binding): Always bind a reference directly to a
3306 compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during
3308 (check_constructor_callable): Remove.
3309 (convert_like_real): Don't call it.
3310 (initialize_reference): Don't call check_constructor_callable.
3311 (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
3312 LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base
3313 conversions if LOOKUP_NO_TEMP_BIND.
3314 (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
3315 (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
3317 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
3319 2007-10-22 Jakub Jelinek <jakub@redhat.com>
3322 * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
3323 before checking if its type is integral.
3325 2007-10-22 Jason Merrill <jason@redhat.com>
3328 * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
3329 * pt.c (apply_late_template_attributes): Splice out dependent
3330 attributes from DECL_ATTRIBUTES.
3332 * decl.c (cxx_maybe_build_cleanup): Use build_address.
3334 2007-10-17 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3336 * typeck.c (build_binary_op) : Use appropriate warning option
3337 instead of unnamed warning.
3339 2007-10-16 Paolo Carlini <pcarlini@suse.de>
3342 * pt.c (current_template_args): Do not change TREE_LIST elements
3343 with a TREE_VALUE of error_mark_node.
3345 2007-10-16 Mark Mitchell <mark@codesourcery.com>
3347 * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
3348 * decl.c (start_decl): Tidy.
3349 (start_decl_1): Call cp_apply_type_quals_to_decl after completing
3351 (grokdeclarator): Clarify comment.
3353 2007-10-14 Andrew Pinski <pinskia@gmail.com>
3356 * decl.c (grokfndecl): Return NULL after the "definition of
3357 implicitly-declared" error happened.
3359 2007-10-12 Simon Martin <simartin@users.sourceforge.net>
3362 * call.c (build_user_type_conversion_1): Do not consider conversion
3363 functions to convert a (possibly cv-qualified) object to the (possibly
3364 cv-qualified) same object type (or a reference to it), to a (possibly
3365 cv-qualified) base class of that type (or a reference to it).
3367 2007-10-12 Paolo Carlini <pcarlini@suse.de>
3369 * pt.c (tsubst): Use template_parm_level_and_index.
3371 2007-10-12 Jakub Jelinek <jakub@redhat.com>
3374 * parser.c (cp_parser_compound_statement): Handle label-declarations
3375 at the beginning of the compound statement.
3376 (cp_parser_block_declaration): Issue diagnostics about __label__
3377 not at the beginning of a block.
3379 2007-10-11 Paolo Carlini <pcarlini@suse.de>
3382 * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
3383 to convert_template_argument.
3384 (coerce_template_parms): Return error_mark_node after fixed-length
3386 (tsubst_decl): Check for error_mark_node the return value of the
3387 first tsubst in 'case VAR_DECL'.
3389 2007-10-08 Ollie Wild <aaw@google.com>
3391 * typeck2.c (digest_init): Call cplus_expand_constant after
3392 convert_for_initialization.
3393 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
3394 * expr.c (cplus_expand_constant): Updated function description.
3396 2007-10-04 Jason Merrill <jason@redhat.com>
3399 * call.c (initialize_reference): Handle local static reference
3402 2007-10-03 Jason Merrill <jason@redhat.com>
3405 * name-lookup.c (push_namespace_with_attrs): Fold back into...
3406 (push_namespace): Here.
3407 (handle_namespace_attrs): New fn for the attr code.
3408 (leave_scope): Don't pop_visibility.
3409 * name-lookup.h (struct cp_binding_level): Remove has_visibility.
3410 * parser.c (cp_parser_namespace_definition): Call
3411 handle_namespace_attrs and pop_visibility as appropriate.
3414 * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
3416 2007-10-03 Alexandre Oliva <aoliva@redhat.com>
3418 * decl.c (duplicate_decls): Preserve linkage flags for mere
3419 redeclarations of gnu_inline definitions.
3421 2007-10-03 Jason Merrill <jason@redhat.com>
3424 * decl.c (wrap_cleanups_r): New fn.
3425 (wrap_temporary_cleanups): New fn.
3426 (initialize_local_var): Call it.
3428 2007-09-29 Jason Merrill <jason@redhat.com>
3431 * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
3432 constant to not have DECL_EXTERNAL if it's file-local.
3434 2007-09-28 Ollie Wild <aaw@google.com>
3437 2007-09-27 Ollie Wild <aaw@google.com>
3439 * typeck2.c (digest_init): Call cplus_expand_constant after
3440 convert_for_initialization.
3441 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
3442 * expr.c (cplus_expand_constant): Updated function description.
3444 2007-09-28 Jason Merrill <jason@redhat.com>
3447 * class.c (layout_empty_base): Take rli parameter, update
3448 rli->record_align if empty base has user-specified alignment.
3449 (build_base_field): Pass rli to it.
3451 2007-09-28 Paolo Carlini <pcarlini@suse.de>
3454 * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
3456 2007-09-28 Paolo Carlini <pcarlini@suse.de>
3459 * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
3460 (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
3461 (dump_parameters): Just call dump_type for argument packs too.
3463 2007-09-28 Jakub Jelinek <jakub@redhat.com>
3466 * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
3467 qualification by creating qualified PACK_EXPANSION_PATTERN and
3468 then calling make_pack_expansion on it.
3470 2007-09-27 Ollie Wild <aaw@google.com>
3472 * typeck2.c (digest_init): Call cplus_expand_constant after
3473 convert_for_initialization.
3474 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
3475 * expr.c (cplus_expand_constant): Updated function description.
3477 2007-09-27 Jason Merrill <jason@redhat.com>
3480 * decl2.c (is_late_template_attribute): Don't crash on unknown
3483 2007-09-27 Paolo Carlini <pcarlini@suse.de>
3486 * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
3487 * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
3488 spaces in the formatting.
3489 * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
3491 2007-09-27 Jakub Jelinek <jakub@redhat.com>
3493 * error.c (cxx_print_error_function): Add third argument, pass
3494 it over to lhd_print_error_function.
3495 (cp_print_error_function): If diagnostic->abstract_origin, print
3497 * cp-tree.h (struct diagnostic_info): New forward decl.
3498 (cxx_print_error_function): Add third argument.
3500 2007-09-25 Simon Martin <simartin@users.sourceforge.net>
3503 * name-lookup.c (pushtag): Do not create an implicit typedef before
3504 the associated type declaration is known to be valid.
3506 2007-09-25 Jakub Jelinek <jakub@redhat.com>
3508 * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
3509 rather than pointers.
3511 2007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
3514 * search.c (check_final_overrider): Fail if
3515 targetm.comp_type_attributes returns 0.
3517 2007-09-24 Jason Merrill <jason@redhat.com>
3520 * pt.c (resolve_typename_type): Don't look things up in the original
3521 template if it would mean losing template arguments.
3523 2007-09-24 Jakub Jelinek <jakub@redhat.com>
3526 * cp-tree.h (cxx_type_hash_eq): New prototype.
3527 * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
3528 * tree.c (cxx_type_hash_eq): New function.
3530 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
3533 * tree.c (cp_build_qualified_type_real): Build a canonical
3534 ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
3536 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
3540 * tree.c (cplus_array_compare): Compare pointers, not types.
3541 (build_cplus_array_type_1): Store new array type into the hash
3542 table before building the canonical type; build the canonical type
3544 (cp_build_qualified_type_real): Put all of the array types with
3545 cv-qualified element types into the C++ array hash table, built as
3546 variants of the unqualified versions.
3548 2007-09-23 Jason Merrill <jason@redhat.com>
3551 * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
3552 for deprecation warnings.
3554 2007-09-22 Jason Merrill <jason@redhat.com>
3557 * call.c (build_over_call): Warn about deprecated virtuals.
3560 * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
3561 (MAYBE_TAGGED_TYPE_P): Remove.
3562 * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
3563 instead of calling is_late_template_attribute again.
3564 (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
3565 (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
3566 Don't crash on typedefs from non-template classes.
3567 * decl2.c (grokfield): Don't sorry about attrs on template parms.
3568 (is_late_template_attribute): All attributes applied to template
3569 parms or typename types are dependent. Static.
3570 (splice_template_attributes): Pass decl through.
3571 (save_template_attributes): Likewise.
3573 2007-09-20 Jakub Jelinek <jakub@redhat.com>
3576 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
3577 returned from tsubst_pack_expansion.
3578 (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
3579 (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
3581 2007-09-20 Paolo Carlini <pcarlini@suse.de>
3584 * semantics.c (finish_id_expression): Use consistently
3585 context_for_name_lookup.
3586 * decl.c (fixup_anonymous_aggr): Fix error message for
3587 anonymous struct (vs union).
3589 2007-09-19 Jason Merrill <jason@redhat.com>
3592 * pt.c (tsubst): Handle typedefs by looking for the specialization.
3593 (retrieve_specialization): Only tagged types use
3594 DECL_TEMPLATE_INSTANTIATIONS.
3595 (instantiate_class_template): Push nested classes too.
3596 (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
3598 * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
3599 * init.c (is_aggr_type): Remove redundant tests.
3600 * class.c (push_nested_class): Use CLASS_TYPE_P.
3602 2007-09-20 Paolo Carlini <pcarlini@suse.de>
3605 * init.c (build_zero_init): If, recursively, build_zero_init
3606 returns a NULL_TREE, do not append it to the VEC of constructors.
3608 2007-09-18 Jason Merrill <jason@redhat.com>
3611 * pt.c (apply_late_template_attributes): Set processing_template_decl.
3612 (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
3613 ATTR_FLAG_TYPE_IN_PLACE.
3614 (tsubst): Do unqualified lookup to find typedefs from current class.
3615 [ARRAY_TYPE]: Propagate alignment info.
3616 * decl2.c (is_late_template_attribute): Only defer handling of
3617 attribute aligned if the expression is dependent.
3618 (save_template_attributes): If we're deferring any attributes,
3619 make this a naming typedef.
3621 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3623 PR c++/33462 (again)
3624 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
3625 va_arg instead of __builtin_va_arg.
3627 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3630 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
3631 (pp_cxx_primary_expression): Use it.
3632 * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
3633 * error.c (dump_expr): Use it.
3635 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3638 * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
3639 out case TYPEID_EXPR to...
3640 (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
3641 and pp_cxx_right_paren.
3642 * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
3643 * error.c (dump_expr): Use it.
3645 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3648 * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
3649 (pp_cxx_primary_expression): Use it.
3650 * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
3651 * error.c (dump_expr): Use it.
3653 2007-09-16 Paolo Carlini <pcarlini@suse.de>
3656 * init.c (build_new): Remove warning for zero-element
3659 2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
3662 * call.c (maybe_handle_implicit_object): Set this_p, clear
3663 rvaluedness_matches_p.
3664 (compare_ics): Do not compare rvaluedness matching when one of the
3665 operands is an implicit object.
3667 2007-09-14 Jason Merrill <jason@redhat.com>
3669 PR c++/17743, c++/19163
3670 * decl2.c (is_late_template_attribute): New fn.
3671 (splice_template_attributes, save_template_attributes): New fns.
3672 (cplus_decl_attributes): Call save_template_attributes.
3673 * pt.c (apply_late_template_attributes): New fn.
3674 (instantiate_class_template, tsubst_decl): Use it.
3675 * cp-tree.h: Declare is_late_template_attribute.
3677 2007-09-13 Tom Tromey <tromey@redhat.com>
3679 * parser.c (cp_lexer_new_main): Don't use
3680 c_lex_return_raw_strings.
3681 (cp_lexer_get_preprocessor_token): Update. Add special case when
3684 2007-09-11 Jan Hubicka <jh@suse.cz>
3686 * method.c (use_thunk): Use tree_rest_of_compilation
3687 * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
3688 (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
3689 * cp-tree.h (expand_body): Kill.
3690 (emit_associated_thunks): Declare.
3691 * semantics.c (emit_associated_thunks): Export.
3692 (expand_body): Kill.
3694 2007-09-09 David Daney <ddaney@avtrex.com>
3697 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
3698 to calculate cookie_ptr.
3700 2007-09-08 Jason Merrill <jason@redhat.com>
3703 * pt.c (most_specialized_class): Set processing_template_decl
3704 while tsubsting partial spec args.
3706 2007-09-06 Jason Merrill <jason@redhat.com>
3708 * decl2.c (get_guard): Copy visibility from the guarded variable.
3710 2007-09-06 Jan Hubicka <jh@suse.cz>
3712 * semantics.c (expand_body): Do not mark arguments of clones used.
3714 2007-09-06 Paolo Carlini <pcarlini@suse.de>
3717 * decl.c (cp_finish_decl): When processing_template_decl,
3718 deal correctly with init as TREE_LIST.
3720 2007-09-06 Tom Tromey <tromey@redhat.com>
3722 * decl.c (finish_function): Put return's location on line zero of
3725 2007-09-05 Jason Merrill <jason@redhat.com>
3728 * except.c (prepare_eh_type): Use type_decays_to.
3731 * init.c (build_delete): Use build_headof to get the address of the
3732 complete object if we aren't using the deleting destructor.
3733 * rtti.c (build_headof): No longer static.
3734 * cp-tree.h: Declare it.
3736 2007-09-06 Jakub Jelinek <jakub@redhat.com>
3738 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
3739 decl if a prototype for XX is provided with throw().
3742 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
3743 on __*_chk non-__builtin_* decls.
3745 2007-09-05 Paolo Carlini <pcarlini@suse.de>
3748 * semantics.c (finish_id_expression): Use context_for_name_lookup
3749 insted of DECL_CONTEXT, to see through anonymous structs and unions.
3750 * class.c (finish_struct_anon): Deal correctly with anonymous
3751 structs (vs unions, as GNU extension) in error messages.
3753 2007-09-05 Jan Hubicka <jh@suse.cz>
3755 * sematics.c (expand_body): Remove unnecesary import_export_decl
3756 call, DECL_EXTERNAL checks and current_function_decl saving.
3758 2007-09-05 Paolo Carlini <pcarlini@suse.de>
3760 PR c++/29731 (again)
3761 * parser.c (cp_parser_primary_expression): Return error_mark_node
3762 when a statement-expression is found in a template-argument list.
3764 2007-09-04 Jason Merrill <jason@redhat.com>
3766 * except.c (initialize_handler_parm): Use
3767 fold_build_cleanup_point_expr.
3770 * call.c (reference_binding): Don't look for user-defined conversions
3774 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
3775 the MUST_NOT_THROW_EXPR.
3777 2007-09-04 Richard Sandiford <richard@codesourcery.com>
3779 * decl.c (cp_finish_decl): Call determine_visibility before
3780 make_rtl_for_nonlocal_decl.
3782 2007-09-04 Jason Merrill <jason@redhat.com>
3785 * pt.c (most_specialized_class): Substitute outer template
3786 arguments into the arguments of a member template partial
3788 (strip_innermost_template_args): New fn.
3790 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
3792 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
3794 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3796 * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
3797 * decl.c (cp_make_fname_decl): Likewise,
3798 * parser.c (cp_parser_string_literal): Likewise,
3799 * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
3800 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
3803 2007-09-02 Paolo Carlini <pcarlini@suse.de>
3806 * typeck.c (build_unary_op): Fix error message for
3807 Boolean expression as operand to operator--.
3809 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3811 * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
3812 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
3815 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
3818 * init.c (build_default_init): Make extern.
3819 * cp-tree.h (build_default_init): Declare here.
3820 * pt.c (tsubst_expr): When the instantiation of the initializer of
3821 a variable results in an empty list, default-initialize the
3823 (tsubst_copy_and_build): When the instantiation of the initializer
3824 in a new expression results in an empty initializer list,
3825 default-initialize it.
3827 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
3829 * mangle.c (write_type): Change mangling of rvalue reference from
3832 2007-08-31 Jakub Jelinek <jakub@redhat.com>
3834 * decl.c (duplicate_decls): Remove duplicated line.
3836 2007-08-31 Paolo Carlini <pcarlini@suse.de>
3839 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
3840 BOUND_TEMPLATE_TEMPLATE_PARM.
3842 2007-08-31 Paolo Carlini <pcarlini@suse.de>
3845 * search.c (lookup_member): Check the name argument for
3848 2007-08-31 Paolo Carlini <pcarlini@suse.de>
3851 * parser.c (cp_parser_trait_expr): Check rerurn value of
3854 2007-08-30 Ollie Wild <aaw@google.com>
3856 * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
3857 convert_ptrmem for pointer to member conversions.
3858 (convert_to_pointer_force): Update cp_convert_to_pointer call.
3859 (ocp_convert): Update cp_convert_to_pointer call.
3860 * typeck.c (convert_ptrmem): Add conditional for null pointers to
3862 (build_static_cast_1): Check can_convert for conversions in either
3864 (get_delta_difference_1): New function.
3865 (get_delta_difference): Refactor to call get_delta_difference_1.
3867 2007-08-30 Jakub Jelinek <jakub@redhat.com>
3869 * decl.c (start_preparsed_function): Set
3870 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
3872 2007-08-28 Paolo Carlini <pcarlini@suse.de>
3875 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
3876 BOUND_TEMPLATE_TEMPLATE_PARM.
3878 2007-08-28 Jakub Jelinek <jakub@redhat.com>
3882 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
3883 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
3885 2007-08-27 Jason Merrill <jason@redhat.com>
3888 * pt.c (build_non_dependent_expr, type_dependent_expression_p):
3889 Look inside STMT_EXPR.
3890 * semantics.c (stmt_expr_value_expr): New fn.
3891 * cp-tree.h: Declare it.
3894 * decl.c (groktypename): Ignore attributes applied to class type.
3896 2007-08-28 Richard Guenther <rguenther@suse.de>
3898 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
3900 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
3902 * error.c (dump_expr): Handle COMPLEX_CST.
3903 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
3904 (pp_cxx_expression): Likewise.
3906 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
3908 * decl.c (GNU_INLINE_P): New.
3909 (duplicate_decls): Handle gnu_inline. Merge attributes and
3910 some flags in overriding definitions.
3911 (redeclaration_error_message): Handle gnu_inline.
3912 (start_preparsed_function): Likewise.
3914 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3916 * call.c (sufficient_parms_p): Constify.
3917 * class.c (same_signature_p): Likewise.
3918 * cp-gimplify.c (is_invisiref_parm,
3919 cxx_omp_privatize_by_reference): Likewise.
3920 * cp-objcp-common.c (has_c_linkage): Likewise.
3921 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
3922 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
3923 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
3924 num_artificial_parms_for, comp_template_parms,
3925 template_parameter_pack_p, any_dependent_template_arguments_p,
3926 any_type_dependent_arguments_p, any_value_dependent_elements_p,
3927 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
3928 zero_init_p, member_p, cp_lvalue_kind,
3929 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
3930 varargs_function_p, is_dummy_object, special_function_kind,
3931 string_conv_p, type_unknown_p, comp_except_specs, compparms,
3932 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
3933 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
3934 cp_has_mutable_p, at_least_as_qualified_p,
3935 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
3936 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
3937 * except.c (nothrow_libfn_p): Likewise.
3938 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
3940 * pt.c (comp_template_parms, template_parameter_pack_p,
3941 any_type_dependent_arguments_p, any_value_dependent_elements_p,
3942 any_dependent_template_arguments_p): Likewise.
3943 * repo.c (repo_export_class_p): Likewise.
3944 * semantics.c (anon_aggr_type_p): Likewise.
3945 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
3946 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
3947 varargs_function_p, member_p, is_dummy_object, pod_type_p,
3948 zero_init_p, special_function_p): Likewise.
3949 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
3950 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
3951 compparms, invalid_nonstatic_memfn_p,
3952 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
3953 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
3954 cp_has_mutable_p, lvalue_or_else): Likewise.
3956 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
3958 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
3959 * cp-objcp-common.c (cp_tree_size): Ditto.
3960 * tree.c (cp_walk_subtrees): Ditto
3961 * cp-tree.def (TINST_LEVEL): Go away.
3962 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
3963 move together with other non-tree structs.
3964 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
3965 (union lang_tree_node): Eliminate tinst_level field.
3966 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
3967 (current_instantiation, outermost_tinst_level): Return
3968 a "struct tinst_level *".
3970 * error.c (print_instantiation_partial_context): Change second
3971 parameter to a "struct tinst_level *". Replace accessor macros
3973 (print_instantiation_full_context): Likewise.
3974 * lex.c (in_main_input_context): Likewise.
3976 * pt.c (struct pending_templates): New.
3977 (pending_templates, last_pending_template): Use it as a type.
3978 (current_tinst_level): Change typo to "struct tinst_level *"
3979 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
3980 (add_pending_template): Construct a "struct pending_template".
3981 Replace TINST_LEVEL accessor macros with field access.
3982 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
3983 (pop_tinst_level): Likewise.
3984 (instantiate_pending_templates): Likewise. Factor common code used
3985 when an instantiation has been done.
3986 (outermost_tinst_level): Replace tree_last with loop.
3987 (current_instantiation): Return a "struct tinst_level *".
3989 2007-08-24 Ollie Wild <aaw@google.com>
3991 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
3992 * name-lookup.h (cp_binding_level): Remove vtables member.
3994 2007-08-24 Richard Guenther <rguenther@suse.de>
3996 * tree.c (cp_cannot_inline_tree_fn): Remove.
3997 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
3998 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
4001 2007-08-24 Jakub Jelinek <jakub@redhat.com>
4004 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
4005 error_mark_node right away if build_expr_type_conversion
4009 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
4010 is error_mark_node rather than NULL_TREE.
4011 * pt.c (check_explicit_specialization): Likewise.
4014 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
4015 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
4017 2007-08-22 Jason Merrill <jason@redhat.com>
4020 * pt.c (outermost_tinst_level): New function.
4021 * lex.c (in_main_input_context): New function.
4022 * cp-tree.h: Declare it.
4023 * decl2.c (constrain_class_visibility): Use it to avoid warning
4024 about uses of the anonymous namespace in the main input file.
4026 2007-08-21 Jakub Jelinek <jakub@redhat.com>
4028 * init.c (build_new_1): Use get_target_expr instead of save_expr.
4030 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
4033 * class.c (finish_struct_1): Warn when a class has virtual
4034 functions and accessible non-virtual destructor.
4036 2007-08-20 Richard Guenther <rguenther@suse.de>
4040 * call.c (build_new_method_call): Convert initializer to
4042 * init.c (build_aggr_init): Do not fiddle with types.
4043 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
4044 * except.c (build_throw): Do not drop qualifiers for the
4046 * typeck.c (get_member_function_from_ptrfunc): Do not
4047 fiddle with types, instead convert.
4048 (build_ptrmemfunc1): Convert to the target type for
4050 (gfc_trans_allocate): Convert result to target type.
4051 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
4052 pointer-to-member structures shall have alias set zero as well.
4054 2007-08-20 Richard Guenther <rguenther@suse.de>
4056 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
4058 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
4059 (nonstatic_local_decl_p): Likewise.
4060 * tree.c (cp_auto_var_in_fn_p): Remove.
4061 * decl.c (nonstatic_local_decl_p): Remove.
4063 2007-08-20 Richard Guenther <rguenther@suse.de>
4065 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
4067 * tree.h (cp_walk_tree): New define to walk_tree_1 with
4068 cp_walk_subtrees lh parameter.
4069 (cp_walk_tree_without_duplicates): New define to
4070 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
4071 * tree.c (count_trees): Call
4072 cp_walk_tree_without_duplicates.
4073 (verify_stmt_tree): Call cp_walk_tree.
4074 (break_out_target_exprs): Likewise.
4075 (WALK_SUBTREE): Likewise.
4076 * cp-gimplify.c (cp_genericize): Likewise.
4077 * cp-pt.c (find_parameter_packs_r): Likewise.
4078 (uses_parameter_packs): Likewise.
4079 (make_pack_expansion): Likewise.
4080 (check_for_bare_parameter_packs): Likewise.
4081 (for_each_template_parm): Likewise.
4082 * decl.c (check_default_argument): Call
4083 cp_walk_tree_without_duplicates.
4084 * except.c (build_throw): Likewise.
4085 * decl2.c (type_visibility): Likewise.
4086 * semantics.c (expand_or_defer_fn): Likewise.
4087 (finalize_nrv): Call cp_walk_tree.
4089 2007-08-20 Jakub Jelinek <jakub@redhat.com>
4092 * init.c (build_new_1): Rename placement_var variable to placement_expr.
4093 Initialize it with save_expr rather than get_temp_regvar.
4095 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
4098 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
4101 2007-08-17 Ollie Wild <aaw@google.com>
4104 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
4105 declarations into appropriate slots for comparison. Fix type
4108 2007-08-17 Paolo Carlini <pcarlini@suse.de>
4111 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
4112 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
4114 2007-08-17 Paolo Carlini <pcarlini@suse.de>
4117 * parser.c (cp_parser_class_head): Improve error message.
4119 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
4121 * pt.c (instantiate_decl): Set input_location
4122 for the function end.
4124 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4126 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
4128 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
4129 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
4130 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
4131 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
4132 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
4133 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
4134 * typeck.c (cp_type_quals): Likewise.
4135 * typeck2.c (cxx_incomplete_type_diagnostic,
4136 cxx_incomplete_type_error): Likewise.
4138 2007-08-16 Paolo Carlini <pcarlini@suse.de>
4141 * pt.c (tsubst_friend_function): When check_classfn
4142 returns error_mark_node likewise return it.
4144 2007-08-15 Jakub Jelinek <jakub@redhat.com>
4147 * typeck.c (check_return_expr): Don't NRV optimize vars in
4149 * decl.c (finish_function): Comment fix.
4151 2007-08-15 Paolo Carlini <pcarlini@suse.de>
4154 * pt.c (push_template_decl_real): Depending on TYPE_P
4155 use either TYPE_CONTEXT or DECL_CONTEXT.
4157 2007-08-14 Mark Mitchell <mark@codesourcery.com>
4159 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
4160 constructors and destructors return this.
4162 2007-08-14 Paolo Carlini <pcarlini@suse.de>
4165 * decl2.c (check_classfn): Return error_mark_node in case of error;
4166 in that case, do not call add_method.
4167 * decl.c (start_decl): Deal with check_classfn returning
4169 (grokfndecl): Likewise.
4170 * pt.c (tsubst_friend_function): Likewise.
4172 2007-08-14 Andrew Pinski <pinskia@gmail.com>
4175 * typeck.c (build_binary_op): Disallow vector float types with
4176 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
4178 2007-08-11 Ian Lance Taylor <iant@google.com>
4180 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
4182 * cp-tree.h (cxx_get_alias_set): Update declaration.
4184 2007-08-10 Ollie Wild <aaw@google.com>
4186 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
4188 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
4190 (unqualified_namespace_lookup): Fix ambiguous_decl call.
4191 (lookup_using_namespace): Fix ambiguous_decl call.
4192 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
4194 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4196 * call.c (name_as_c_string): Use CONST_CAST.
4197 * decl.c (build_decl): Likewise.
4198 * parser.c (cp_parser_string_literal): Likewise.
4200 2007-08-10 Paolo Carlini <pcarlini@suse.de>
4203 * error.c (dump_expr): Consistently use the *_cxx_*
4204 variants of the pretty-print functions.
4206 2007-08-10 Paolo Carlini <pcarlini@suse.de>
4209 * decl.c (check_special_function_return_type): Just error
4210 on return type specified for conversion operator.
4212 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
4214 * typeck2.c (readonly_error): Handle general expressions.
4215 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
4217 2007-08-06 Dan Hipschman <dsh@google.com>
4219 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
4220 access function name.
4222 2007-08-04 Alfred Minarik <a.minarik@aon.at>
4225 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
4226 * g++spec.c (lang_specific_driver): Check them.
4228 2007-08-06 Paolo Carlini <pcarlini@suse.de>
4231 * pt.c (inline_needs_template_parms): Fix comment; change return type
4234 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
4237 2007-03-26 Dirk Mueller <dmueller@suse.de>
4239 * parser.c (cp_parser_member_declaration): Pedwarn
4240 about stray semicolons after member declarations.
4242 2007-08-02 Lee Millward <lee.millward@gmail.com>
4247 * parser.c (cp_parser_asm_definition): Detect and discard asm
4248 statements with invalid inputs or outputs.
4249 (cp_parser_asm_operand_list): Return error mark node if any
4250 of the operands are invalid. Adjust documentation.
4252 2007-08-02 Nick Clifton <nickc@redhat.com>
4254 * typeck.c: Change copyright header to refer to version 3 of the
4255 GNU General Public License and to point readers at the COPYING3
4256 file and the FSF's license web page.
4257 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
4258 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
4259 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
4260 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
4261 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
4262 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
4263 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
4264 name-lookup.h, parser.c: Likewise.
4266 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4269 * call.c (magic_varargs_p): Honor the "type generic" attribute.
4271 2007-07-30 Paolo Carlini <pcarlini@suse.de>
4274 * semantics.c (finish_label_stmt): Reject the __label__
4275 extension outside function scopes.
4277 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4279 * parser.c (eof_token): Un-constify.
4280 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
4281 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
4284 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
4286 * pt.c, tree.c, typeck2.c: Fix comment typos.
4288 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
4289 Mark Mitchell <mark@codesourcery.com>
4292 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
4293 hidden due to friend declarations in local classes.
4295 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
4297 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
4298 * cp-tree.def (DECLTYPE_TYPE): New.
4299 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
4300 (dump_type_prefix): Ditto.
4301 (dump_type_suffix): Ditto.
4302 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
4303 * mangle.c (write_type): Handle DECLTYPE_TYPE.
4304 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
4306 (DECLTYPE_TYPE_EXPR): New.
4307 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
4308 (finish_declared_type): Declare.
4309 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
4310 DECLTYPE_TYPE nodes.
4311 (pp_cxx_type_id): Ditto.
4312 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
4313 (tsubst): Substitute into a DECLTYPE_TYPE node.
4314 (tsubst_copy): Ditto.
4315 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
4317 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
4318 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
4319 structural equality (because we can't hash the expressions).
4320 (finish_declared_type): New.
4321 * lex.c (reswords): Add "decltype" keyword.
4322 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
4323 (cp_parser_postfix_expression): Add member_access_only_p to
4324 restrict postfix expression to member access expressions.
4325 (cp_parser_unary_expression): Update call to
4326 cp_parser_postfix_expression to reflect new parameter.
4327 (cp_parser_declared_type): New.
4328 (cp_parser_simple_type_specifier): Parse decltype types.
4330 2007-07-27 Mark Mitchell <mark@codesourcery.com>
4333 * call.c (convert_for_arg_passing): Only widen bitfields to their
4334 declared types if necessary.
4336 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4338 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
4341 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4343 * decl.c (typename_hash, typename_compare): Constify.
4344 * mangle.c (hash_type, compare_type): Likewise.
4345 * pt.c (eq_local_specializations, hash_local_specialization):
4347 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
4348 list_hash): Likewise.
4349 * typeck2.c (pat_compare): Likewise.
4351 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
4353 * method.c (implicitly_declare_fn): Increase alignment if member
4354 function pointer format requires it.
4356 2007-07-24 Paolo Carlini <pcarlini@suse.de>
4359 * typeck.c (check_return_expr): Do not pass a null argument
4362 2007-07-24 Paolo Carlini <pcarlini@suse.de>
4365 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
4368 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
4371 * typeck.c (convert_arguments): Only use default args if we have
4375 * typeck.c (structural_comptypes): No need to check
4376 resolve_typename_type return value here.
4377 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
4378 * pt.c (resolve_typename_type): Follow typename typedefs. Return
4379 original type rather than error_mark_node in case of failure.
4380 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
4381 resolve_typename_type result check.
4382 (cp_parser_direct_declarator, cp_parser_head,
4383 cp_parser_constructor_declarator_p): Likewise.
4385 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
4387 * pt.c (template_parms_variadic_p): Remove.
4388 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
4390 2007-07-12 Jakub Jelinek <jakub@redhat.com>
4393 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
4394 argument to dump_aggr_init_expr_args instead of false.
4396 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
4398 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
4399 canonical types; otherwise, fall back to structural type
4400 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
4401 internal compiler error if the canonical types are wrong.
4403 2007-07-11 Paolo Carlini <pcarlini@suse.de>
4406 * parser.c (cp_parser_make_indirect_declarator): When the
4407 the code argument is ERROR_MARK return cp_error_declarator.
4409 2007-07-09 Geoffrey Keating <geoffk@apple.com>
4412 * decl.c (cxx_init_decl_processing): Don't set
4413 force_align_functions_log.
4414 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
4415 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
4416 FUNCTION_DECL, return its alignment.
4418 2007-07-09 Richard Guenther <rguenther@suse.de>
4420 * decl.c (start_preparsed_function): Do not promote return type.
4422 2007-07-08 Paolo Carlini <pcarlini@suse.de>
4425 * pt.c (unify): Never pass error_mark_node to template_decl_level.
4427 2007-07-07 Mark Mitchell <mark@codesourcery.com>
4430 * pt.c (resolve_overloaded_unification): Robustify. Return a
4432 (type_unification_real): Adjust accordingly.
4434 2007-07-06 Richard Guenther <rguenther@suse.de>
4436 * init.c (build_new_1): Use the correct pointer type.
4437 * typeck2.c (build_m_component_ref): Likewise.
4439 2007-07-05 Mark Mitchell <mark@codesourcery.com>
4442 * init.c (build_zero_init): Always build an initializer for
4444 * typeck2.c (build_functional_cast): Use build_zero_init.
4447 * init.c (build_new_1): Always pass the allocation function to
4448 build_op_delete_call.
4449 * call.c (build_op_delete_call): Handle operator delete with a
4450 variable-argument list. Do not issue an error when no matching
4451 deallocation function is available for a new operator.
4454 * cp-tree.h (any_value_dependent_elements_p): Declare it.
4455 * decl.c (value_dependent_init_p): New function.
4456 (cp_finish_decl): Use it.
4457 * pt.c (value_dependent_expression_p): Use
4458 any_value_dependent_elements_p.
4459 * parser.c (cp_parser_primary_expression): Add comment about
4460 treating dependent qualified names as integral
4461 constant-expressions.
4463 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
4465 * decl.c (build_ptrmemfunc_type): Always use structural equality
4466 tests when comparing pointer-to-member-function types, because the
4467 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
4470 2007-07-03 Mark Mitchell <mark@codesourcery.com>
4472 * init.c (build_new): Tweak comment.
4474 2007-06-29 Dave Brolley <brolley@redhat.com>
4477 * parser.c (cp_parser_new_type_id): Don't reduce a named array
4478 type to its base type and number of elements here.
4479 * init.c (build_new): Call complete_type_or_else to ensure that the
4480 type is complete and to issue a diagnostic if it is not.
4481 (build_new_1): Don't call complete_type_or_else here.
4483 2007-07-03 Richard Guenther <rguenther@suse.de>
4486 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
4489 2007-07-02 Simon Baldwin <simonb@google.com>
4491 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
4492 for inner-style nested forward declarations that don't declare
4495 2007-07-02 Jakub Jelinek <jakub@redhat.com>
4498 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
4499 DECL_P in not a variable and appears more than once error messages.
4501 2007-07-01 Ollie Wild <aaw@google.com>
4503 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
4504 (select_decl): Remove function.
4505 (unqualified_namespace_lookup): Populate binding by calling
4506 ambiguous_decl. Remove select_decl call.
4507 (lookup_qualified_name): Remove select_decl call.
4508 * decl.c (lookup_and_check_tag): Check for ambiguous references.
4509 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
4510 generation when name lookup is ambiguous.
4512 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
4515 * init.c (build_new_1): Use structural equality on the copy of the
4518 2007-06-28 Geoffrey Keating <geoffk@apple.com>
4520 * decl2.c (determine_visibility): Implement
4521 flag_visibility_ms_compat effect on type info.
4522 * decl.c (cxx_init_decl_processing): Implement
4523 global effect of flag_visibility_ms_compat.
4525 2007-06-28 Geoffrey Keating <geoffk@apple.com>
4527 * decl2.c (start_objects): Mark constructor-running function
4530 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
4533 * decl.c (grokdeclarator): Reset friendp for member functions declared
4534 friend of their own class.
4536 2007-06-23 Mark Mitchell <mark@codesourcery.com>
4538 * decl2.c (determine_visibility): Don't look for dllexport here.
4539 (determine_visibility_from_class): Tidy.
4541 2007-06-18 Simon Baldwin <simonb@google.com>
4544 * parser.c (cp_parser_single_declaration): Added check for storage
4545 class other than sc_none in parsed declaration, and a flag to indicate
4546 if the call is part of an explicit template specialization parse.
4547 * (cp_parser_explicit_specialization): Specialization check flag added
4548 to call to cp_parser_single_declaration(), set true.
4549 * (cp_parser_template_declaration_after_export): Specialization check
4550 flag added to call to cp_parser_single_declaration(), set false.
4551 * pt.c (check_explicit_specialization): Added code to copy visiblity
4552 and linkage from the templated function to the explicit specialization.
4554 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
4556 * typeck.c (build_binary_op): For templates build the
4557 expression in pieces to avoid the assert in build2_stat.
4558 (get_member_function_from_ptrfunc):
4559 Change over to using POINTER_PLUS_EXPR and convert
4560 the second operand to sizetype.
4561 * typeck2.c (build_m_component_ref): Likewise.
4562 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
4563 instead of PLUS_EXPR for pointers.
4564 (build_new_1): Likewise.
4565 (build_vec_delete_1): Likewise.
4566 (build_vec_delete): Likewise.
4567 * class.c (build_base_path): Likewise.
4568 (build_base_path): Likewise.
4569 (convert_to_base_statically): Likewise.
4570 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
4571 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
4572 instead of PLUS_EXPR.
4573 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
4574 instead of PLUS_EXPR for pointers.
4575 * call.c (build_special_member_call): Likewise.
4576 * rtti.c (build_headof): Likewise.
4577 Use sizetype instead of ptrdiff_type_node.
4578 (tinfo_base_init): Create a POINTER_PLUS_EXPR
4579 instead of PLUS_EXPR for pointers.
4580 * except.c (expand_start_catch_block): Do a
4581 NEGATIVE and then a POINTER_PLUS_EXPR instead
4583 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
4584 PLUS_EXPR on pointer types over to use
4585 POINTER_PLUS_EXPR and remove the conversion
4586 to the pointer types.
4587 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
4588 adding to a pointer type. Use size_int instead of
4589 ssize_int. Convert the index to sizetype before
4590 adding it to the pointer.
4592 2007-06-15 Mark Mitchell <mark@codesourcery.com>
4594 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
4595 (DECL_ANON_UNION_VAR_P): New macro.
4596 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
4597 than DECL_VAR_MARKED_P, to keep track of which variables we have
4599 * decl.c (redeclaration_error_message): Complain about redeclaring
4600 anonymous union members at namespace scope.
4601 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
4603 2007-06-14 Geoff Keating <geoffk@apple.com>
4605 * decl2.c (determine_visibility): Ensure that functions with
4606 hidden types as parameters are hidden.
4609 * decl2.c (determine_visibility): Remove duplicate code for
4612 2007-06-12 Ian Lance Taylor <iant@google.com>
4615 * init.c (avoid_placement_new_aliasing): New static function.
4616 (build_new_1): Call it.
4618 2007-06-11 Rafael Ávila de Espíndola <espindola@google.com>
4620 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
4621 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
4623 2007-06-08 Jakub Jelinek <jakub@redhat.com>
4626 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
4627 on init, the non-decl cond operand and increment value.
4629 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
4632 * decl.c (check_initializer): Report an error when a brace enclosed
4633 initializer is used for a non-aggregate type in C++98.
4634 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
4636 (grokdeclarator): Likewise.
4637 (move_fn_p): Likewise.
4638 * typeck.c (check_return_expr): Likewise.
4639 * call.c (reference_binding): Likewise.
4640 * error.c (cp_cpp_error): Likewise.
4641 * pt.c (check_default_tmpl_args): Likewise.
4643 * lex.c (init_reswords): Likewise.
4644 * parser.c (p_parser_primary_expression): Likewise.
4645 (TOKEN_PRECEDENCE): Likewise.
4646 (cp_parser_init_declarator): Likewise.
4647 (cp_parser_ptr_operator): Likewise.
4648 (cp_parser_parameter_declaration): Likewise.
4649 (cp_parser_enclosed_template_argument_list): Likewise.
4650 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
4651 (cp_parser_next_token_ends_template_argument_p): Likewise.
4653 2007-06-04 Simon Baldwin <simonb@google.com>
4655 * decl.c (grokdeclarator): Readability change. Moved case labels
4656 into direct switch statement scope.
4658 2007-06-04 Paolo Carlini <pcarlini@suse.de>
4660 * call.c (convert_like_real): Remove pointless code.
4662 2007-05-31 Mark Mitchell <mark@codesourcery.com>
4664 * decl.c (get_atexit_fn_ptr_type): New function.
4665 (get_atexit_node): Use it.
4666 (start_cleanup_fn): Likewise.
4667 (register_dtor_fn): Use the object's destructor, instead of a
4668 separate cleanup function, where possible.
4669 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
4670 (atexit_fn_ptr_type_node): New macro.
4671 * decl2.c (build_cleanup): Use build_address.
4673 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
4675 * typeck.c (build_binary_op): Include types in error.
4677 2007-05-31 Jakub Jelinek <jakub@redhat.com>
4680 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
4681 needs runtime initialization.
4683 2007-05-31 Paolo Carlini <pcarlini@suse.de>
4686 * semantics.c (finish_trait_expr): Complete the types.
4688 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
4689 Douglas Gregor <doug.gregor@gmail.com>
4690 Pedro Lamarao <pedro.lamarao@mndfck.org>
4691 Howard Hinnant <howard.hinnant@gmail.com>
4695 * typeck.c (comptypes): Don't consider rvalue and lvalue
4696 reference types to be equivalent.
4697 (check_return_expr): Move from certain lvalues when returning
4699 * decl.c (grokdeclarator): Implement reference collapsing.
4700 (copy_fn_p): Don't consider constructors taking rvalue references
4701 to be copy constructors.
4703 * call.c (conversion): New "rvaluedness_matches_p" member.
4704 (convert_class_to_reference): Require reference type as first
4705 parameter instead of base type.
4706 (reference_binding): Add logic to handle rvalue references.
4707 (implicit_conversion): Update inaccurate comment.
4708 (convert_like_real): Disable creation of temporaries that are
4709 impossible to initialize for types with move constructors.
4710 (build_over_call): Elide move constructors when possible.
4711 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
4712 (maybe_handle_ref_bind): Return conversion instead of type node.
4713 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
4714 determine preferred conversion sequences.
4715 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
4716 (LOOKUP_PREFER_RVALUE): New.
4717 (DECL_MOVE_CONSTRUCTOR_P): New.
4718 (struct cp_declarator): Add "reference" member for reference
4719 types, with new "rvalue_ref" flag.
4720 (cp_build_reference_type): Declare.
4721 (move_fn_p): Declare.
4722 * error.c (dump_type_prefix): Format rvalue reference types
4723 correctly in error messages.
4724 * except.c (build_throw): Move from certain lvalues when
4726 * mangle.c (write_type): Mangle rvalue references differently
4727 than regular references.
4728 * parser.c (make_reference_declarator): Add boolean parameter for
4730 (cp_parser_make_indirect_declarator): New.
4731 (cp_parser_new_declarator_opt): Call
4732 cp_parser_make_indirect_declarator.
4733 (cp_parser_conversion_declarator_opt): Ditto.
4734 (cp_parser_declarator): Ditto.
4735 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
4737 * pt.c (tsubst): Implement reference collapsing.
4738 (maybe_adjust_types_for_deduction): Implement special template
4739 parameter deduction rule for rvalue references.
4740 (type_unification_real): Update calls to
4741 maybe_adjust_types_for_deduction.
4742 (try_one_overload): Ditto.
4743 (unify_pack_expansion): Ditto.
4744 * tree.c (lvalue_p_1): Handle rvalue reference types.
4745 (cp_build_reference_type): New.
4747 2007-05-30 Jakub Jelinek <jakub@redhat.com>
4750 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
4751 variables that need runtime initialization.
4753 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
4756 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
4757 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
4758 case POSTDECREMENT_EXPR>): Return the error_mark_node
4759 if either the real or imaginary parts would an
4762 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
4763 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4766 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
4767 token is a closing brace, false if there are no tokens left.
4768 (cp_parser_namespace_alias_definition): Only consume the next token if
4769 it is a closing brace.
4771 * parser.c (cp_parser_class_specifier): Likewise.
4773 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
4775 * semantics.c (finish_member_declaration): Fix a typo in the
4778 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
4790 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
4791 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
4792 * pt.c (check_for_bare_parameter_packs): Return bool indicated
4793 whether everything was okay. Fix indentation.
4794 (push_template_decl_real): Check for bare parameter packs in
4795 function parameters; where errors occur, mark the parameter types
4796 with ERROR_MARK_NODEs to avert ICEs.
4797 (coerce_template_parameter_pack): New.
4798 (coerce_template_parms): Moved parameter pack coercion into
4799 coerce_template_parameter_pack, and permit it anywhere in the
4800 template parameter list (not just at the end). Parameter and
4801 argument indices can vary (somewhat) separately now, so add
4802 PARM_IDX and ARG_IDX.
4803 (fn_type_unification): Don't set an argument pack as incomplete if
4804 no argument pack was deduced.
4805 (type_unification_real): If a type parameter is a parameter pack
4806 and has not otherwise been deduced, it will be deduced to an empty
4808 (more_specialized_fn): Use the actual lengths of the argument
4809 lists when comparing against expansions.
4810 * semantics.c (finish_member_declaration): If a field's type has
4811 bare parameter packs, error and set its type to ERROR_MARK_NODE.
4813 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
4816 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
4818 2007-05-22 Ollie Wild <aaw@google.com>
4820 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
4821 (unqualified_namespace_lookup): Adds check for hidden types.
4823 2007-05-22 Ollie Wild <aaw@google.com>
4825 * decl.c (duplicate_decls): Verify namespace names are unique.
4827 2007-05-21 Mark Mitchell <mark@codesourcery.com>
4829 * decl.c (cxx_maybe_build_cleanup): Handle
4830 __attribute__((cleanup)).
4832 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4834 * cvt.c (cp_convert_and_check): Don't check warnings if the
4837 2007-05-18 Geoffrey Keating <geoffk@apple.com>
4839 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
4841 2007-05-14 Paolo Carlini <pcarlini@suse.de>
4844 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
4845 type only if is a class type (5.2.8/4).
4847 2007-05-14 Rafael Ávila de Espíndola <espindola@google.com>
4849 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
4850 * decl.c (grokdeclarator): Use unsigned_type_for instead of
4851 c_common_unsigned_type.
4853 2007-05-11 Silvius Rus <rus@google.com>
4855 * typeck.c (build_indirect_ref): Add call to
4856 strict_aliasing_warning.
4857 (build_reinterpret_cast_1): Condition call to
4858 strict_aliasing_warning.
4860 2007-05-11 Jan Hubicka <jh@suse.cz>
4862 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
4863 * decl2.c (start_objects): ctors and dtors are no longer public.
4864 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
4866 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
4868 * typeck.c (build_unary_op): Remove code that used to
4869 handle non lvalue increments/decrements.
4871 2007-05-07 Mike Stump <mrs@apple.com>
4873 * parser.c (check_empty_body): Add.
4874 (cp_parser_iteration_statement): Add call to check_empty_body.
4876 2007-05-05 Geoffrey Keating <geoffk@apple.com>
4879 * mangle.c (write_mangled_name): Mangle static variable names.
4880 (write_unqualified_name): Use local-source-name for
4881 namespace-scope static variables.
4883 2007-05-04 Dirk Mueller <dmueller@suse.de>
4885 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
4888 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
4891 * decl2.c (constrain_class_visibility):
4892 Use strip_pointer_or_array_types instead of strip_array_types.
4894 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
4897 * decl.c (reshape_init_r): Don't reshape the first element if it
4898 is a pointer to member function.
4900 2007-04-27 Simon Baldwin <simonb@google.com>
4902 * decl.c (grokparms): Changed message format from %qD to %qE.
4904 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
4906 * error.c (maybe_warn_variadic_templates): Variadic templates are
4907 now in C++0x, so only warn about them in C++98 mode.
4909 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
4912 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
4913 integeral types from vectors types.
4915 2007-04-26 Jakub Jelinek <jakub@redhat.com>
4918 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
4919 for type dependent OMP_CLAUSE_DECLs.
4921 2007-04-24 Mark Mitchell <mark@codesourcery.com>
4924 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
4925 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
4926 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
4927 * init.c (build_zero_init): Adjust, as
4928 COMPLEX_TYPE is now a SCALAR_TYPE.
4929 * typeck2.c (digest_init): Allow brace-enclosed initializers for
4930 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
4932 2007-04-25 Paolo Carlini <pcarlini@suse.de>
4934 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
4935 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
4936 (trait_expr_value): Adjust.
4938 2007-04-23 Simon Baldwin <simonb@google.com>
4940 * decl.c (grokparms): Added new error for duplicate function
4941 parameters names in function prototypes, to match gcc behavior.
4943 2007-04-23 Jan Hubicka <jh@suse.cz>
4945 * decl2.c (finish_objects): Do not call target constructor/destructor
4948 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
4950 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
4951 instead of checking GIMPLE_STMT_P in chain_next.
4953 2007-04-17 Mark Mitchell <mark@codesourcery.com>
4956 * call.c (convert_for_arg_passing): Convert bitfields to their
4959 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
4962 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
4964 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
4967 * decl2.c (constrain_class_visibility):
4968 Do not warn about the use of anonymous namespace in the main input file.
4970 2007-04-15 Mark Mitchell <mark@codesourcery.com>
4972 * cp-tree.h (current_template_parms): Fix typo in comment.
4974 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
4976 * cp-tree.h, error.c: Fix comment typos.
4978 2007-04-13 Jason Merrill <jason@redhat.com>
4981 * call.c (reference_binding): Add c_cast_p parm. If true,
4982 add quals to TO as needed to make it reference-compatible.
4984 2007-04-11 Jan Hubicka <jh@suse.cz>
4986 * class.c (convert_to_base_statically): Fold produced tree; verify
4987 that we are not processing template_decl.
4989 2007-04-09 Mark Mitchell <mark@codesourcery.com>
4992 * class.c (build_base_path): Ensure that the converted pointer has
4993 the same cv-qualification as the input.
4995 2007-04-09 Paolo Carlini <pcarlini@suse.de>
4997 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
4999 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
5001 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
5003 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
5004 * tree.c (cp_add_pending_fn_decls): Remove.
5005 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
5007 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
5009 Revert change removing staticp.
5011 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
5013 * cp-objcp-common.c (cxx_staticp): Remove.
5014 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
5015 * cp-tree.h (cxx_staticp):
5017 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
5019 * class.c (check_for_override): Don't remove dllmport attribute
5022 2007-04-03 Jakub Jelinek <jakub@redhat.com>
5025 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
5026 type issue error and return early.
5028 2007-03-30 Jason Merrill <jason@redhat.com>
5031 * typeck.c (cp_type_readonly): New fn.
5032 * cp-tree.h: Declare it.
5033 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
5034 (cp_finish_decl): Not here.
5036 2007-03-31 Richard Guenther <rguenther@suse.de>
5038 * optimize.c (maybe_clone_body): Replace splay-tree usage by
5041 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
5046 * parser.c (declarator_can_be_parameter_pack): New.
5047 (cp_parser_template_parameter): Only parse the `...' if the
5048 declarator can be a parameter pack.
5049 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
5051 * pt.c (find_parameter_packs_r): Look into the bounds on integer
5052 types (they could be used as array bounds).
5053 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
5054 (tsubst_pack_expansion): Handle failure to expand parameter
5057 2007-03-30 Paolo Carlini <pcarlini@suse.de>
5060 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
5061 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
5062 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
5063 (CLASS_TYPE_NON_UNION_P): Add.
5064 (struct lang_type_class): Add has_complex_dflt.
5065 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
5066 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
5067 * cp-tree.def: Add TRAIT_EXPR.
5068 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
5069 * lex.c (struct resword): Add __has_nothrow_assign,
5070 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
5071 __has_trivial_constructor, __has_trivial_copy,
5072 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
5073 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
5074 __is_pod, __is_polymorphic, __is_union.
5075 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
5076 (cp_parser_trait_expr): New.
5077 * semantics.c (finish_trait_expr, trait_expr_value
5078 classtype_has_nothrow_copy_or_assign_p): New.
5079 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
5081 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
5082 * class.c (check_bases, check_field_decl, check_bases_and_members):
5083 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
5084 * pt.c (uses_template_parms, tsubst_copy_and_build,
5085 value_dependent_expression_p, type_dependent_expression_p): Deal with
5087 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
5089 2007-03-29 Richard Guenther <rguenther@suse.de>
5091 * tree.c (cp_walk_subtrees): Do not set input_location.
5093 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
5096 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
5099 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5101 * parser.c (struct cp_parser): Update comment for
5102 greater_than_is_operator_p.
5103 (cp_parser_primary_expression): In C++0x mode, a cast operator can
5104 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
5105 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
5106 !GREATER_THAN_IS_OPERATOR_P.
5107 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
5108 `>>' operators that will become two `>' tokens in C++0x.
5109 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
5110 mode, allowing it to terminate default arguments.
5111 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
5112 `>>' like two consecutive `>' tokens.
5113 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
5114 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
5115 ends a template argument.
5117 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5119 * decl.c (redeclaration_error_message): Complain when redeclaring
5120 a friend function with default template arguments (C++0x mode only).
5121 * cp-tree.h (check_default_tmpl_args): Declare.
5122 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
5123 template arguments in function templates. Add support for checking
5124 the default template arguments of friend templates.
5125 (push_template_decl_real): Fix call to check_default_tmpl_args.
5126 (type_unification_real): If a template parameter has not been
5127 deduced but provides a default template argument, substitute into
5128 that default template argument.
5129 * parser.c (cp_parser_init_declarator): When declaring (but not
5130 defining!) a function template in C++0x mode, check for default
5133 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5136 * decl.c (grokdeclarator): Deal with cv-qualified function type
5137 typedefs in the same way for member and non-member functions.
5139 2007-03-26 Dirk Mueller <dmueller@suse.de>
5141 * parser.c (cp_parser_member_declaration): Pedwarn
5142 about stray semicolons after member declarations.
5144 2007-03-26 Paolo Carlini <pcarlini@suse.de>
5147 * pt.c (instantiate_decl): Set in_system_header.
5149 2007-03-22 Mark Mitchell <mark@codesourcery.com>
5151 * cp-tree.h (current_tempalte_parms): Improve documentation.
5152 * pt.c (current_template_args): Likewise.
5155 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
5156 not consume tokens when failing.
5158 2007-03-22 Jim Wilson <wilson@specifix.com>
5159 Mark Mitchell <mark@codesourcery.com>
5162 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
5163 consistent with FROM.
5165 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5167 * error.c (dump_expr): Handle dependent names that designate types.
5168 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
5170 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
5172 * cp-tree.def, parser.c, pt.c: Fix comment typos.
5174 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5176 * cvt.c (cp_convert_and_check) : Define.
5177 * cp-tree.h (cp_convert_and_check): Declare.
5178 * call.c (convert_conversion_warnings): Rename to
5179 conversion_null_warnings. The warning for floating-point to
5180 integer is handled by convert_and_check in convert_like_real.
5181 (convert_like_real): convert_conversion_warnings was renamed as
5182 conversion_null_warnings.
5183 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
5184 overflow and changes of value during conversion.
5186 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5189 * parser.c (cp_parser_statement): If 'namespace' is found, this
5190 only can be a namespace alias definition, so parse it now.
5191 (cp_parser_namespace_alias_definition): if we find an open brace
5192 instead of '=', then this is actually a misplaced namespace
5195 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5198 * decl.c (cxx_init_decl_processing): Move command-line options
5199 processing to c-opts.c.
5201 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
5203 * ptree.c (cxx_print_type): Use formatting markup for integers
5204 when printing template parameter index/level/orig level.
5205 (cxx_print_xnode): Ditto.
5206 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
5207 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
5208 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
5210 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
5211 rather than a HOST_WIDE_INT.
5212 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
5213 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
5215 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
5216 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
5217 IN_BASE_INITIALIZER bool bitfields.
5218 (struct cp_declarator): Make KIND a 4-bit field. Make
5219 PARAMETER_PACK_P a bool bitfield just after KIND.
5220 * pt.c (uses_parameter_packs): Destroy the pointer set.
5221 (make_pack_expansion): Ditto.
5222 (check_for_bare_parameter_packs): Ditto.
5223 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
5225 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
5228 * call.c (convert_default_arg): Instead of copying the node,
5231 2007-03-15 Dirk Mueller <dmueller@suse.de>
5234 * call.c (convert_conversion_warnings): New..
5235 (convert_like_real): .. factored out from here.
5236 (convert_conversion_warnings): Add warning about
5237 false being converted to NULL in argument passing.
5239 2007-03-14 Dirk Mueller <dmueller@suse.de>
5241 * semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
5242 (finish_do_body): Warn about empty body in do/while statement.
5244 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5246 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
5248 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5251 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
5254 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
5256 * repo.c (init_repo): Initialize random_seed saved options.
5257 (finish_repo): Adjust.
5259 2007-03-13 Mark Mitchell <mark@codesourcery.com>
5262 * Make-lang.in (doc/g++.1): Use $< to specify the location from
5265 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
5267 * decl.c (compute_array_index_type): New warning flag warn_vla.
5269 2007-03-12 Mark Mitchell <mark@codesourcery.com>
5272 * call.c (convert_default_arg): Copy non-constant arguments.
5274 2007-03-11 Mark Mitchell <mark@codesourcery.com>
5277 * parser.c (cp_parser_postfix_expression): Disallow compound
5278 literals in constant expressions.
5281 * semantics.c (finish_typeof): Use unlowered_expr_type.
5283 2007-03-10 Mark Mitchell <mark@codesourcery.com>
5286 * cp-tree.h (unlowered_expr_type): New function.
5287 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
5288 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
5289 (unlowered_expr_type): New function.
5290 (build_unary_op): Disallow predecrements of bool bitfields.
5291 * call.c (build_conditional_expr): Use unlowered_expr_type.
5292 * pt.c (type_unification_real): Likewise.
5294 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
5297 * typeck.c (check_return_expr): Check for bare parameter packs.
5298 (comptypes): Compare template parameter packs and
5299 type pack expansions.
5300 * decl.c (grokdeclarator): Deal with the declaration of function
5302 (grokparms): Verify that the (optional) function parameter pack is
5303 at the end of the parameter list.
5304 (xref_basetypes): Handle pack expansions in the base class.
5305 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
5306 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
5307 (NONTYPE_ARGUMENT_PACK): New.
5308 (TYPE_PACK_EXPANSION): New.
5309 (EXPR_PACK_EXPANSION): New.
5310 (ARGUMENT_PACK_SELECT): New.
5311 * cp-objcp-common.c (cp_tree_size): Compute size of
5312 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
5313 ARGUMENT_PACK_SELECT.
5314 * error.c (dump_template_argument): Print template argument packs.
5315 (dump_template_argument_list): Ditto.
5316 (dump_template_parameter): Dump `...' for template type parameter
5318 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
5319 (dump_parameters): Print function parameter packs.
5320 (dump_template_parms): Print template argument packs.
5321 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
5322 (maybe_warn_variadic_templates): New.
5323 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
5324 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
5325 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
5327 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
5328 (write_template_arg): Write argument packs as separate arguments.
5329 * cp-tree.h (struct template_parm_index_s): Add flag that
5330 indicates that the template parameter is actually a parameter
5332 (struct tree_argument_pack_select): New.
5333 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
5334 (union lang_tree_node): Add argument_pack_select.
5335 (FUNCTION_PARAMETER_PACK_P): New.
5336 (PACK_EXPANSION_P): New.
5337 (PACK_EXPANSION_PATTERN): New.
5338 (SET_PACK_EXPANSION_PATTERN): New.
5339 (PACK_EXPANSION_PARAMETER_PACKS): New.
5340 (ARGUMENT_PACK_P): New.
5341 (ARGUMENT_PACK_ARGS): New.
5342 (SET_ARGUMENT_PACK_ARGS): New.
5343 (ARGUMENT_PACK_INCOMPLETE_P): New.
5344 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
5345 (TEMPLATE_PARM_PARAMETER_PACK): New.
5346 (TEMPLATE_TYPE_PARAMETER_PACK): New.
5347 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
5348 (ARGUMENT_PACK_SELECT_INDEX): New.
5349 (ARGUMENT_PACK_SELECT_ARG): New.
5350 (struct cp_declarator): Add parameter_pack_p flag.
5351 (maybe_warn_variadic_templates): Declare.
5352 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
5353 indicate a template parameter pack.
5354 (uses_parameter_packs): Declare.
5355 (template_parameter_pack_p): Declare.
5356 (template_parms_variadic_p): Declare.
5357 (make_pack_expansion): Declare.
5358 (check_for_bare_parameter_packs): Declare.
5359 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
5360 sizeof... expressions.
5361 (pp_cxx_expression): Print pack expansions and non-type argument
5363 (pp_cxx_exception_specification): Print pack expansions.
5364 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
5365 (pp_cxx_ctor_initializer): Print pack expansions.
5366 (pp_cxx_type_id): Print pack expansions.
5367 (pp_cxx_template_argument_list): Print argument packs.
5368 (pp_cxx_template_parameter): Print ellipsis for template parameter
5370 * pt.c (comp_template_parms): Compare template parameter packs.
5371 (template_parameter_pack_p): New.
5372 (template_parms_variadic_p): New.
5373 (template_args_variadic_p): New.
5374 (make_ith_pack_parameter_name): New.
5375 (struct find_parameter_pack_data): New.
5376 (find_parameter_packs_r): New.
5377 (uses_parameter_packs): New.
5378 (make_pack_expansion): New.
5379 (check_for_bare_parameter_packs): New.
5380 (expand_template_argument_pack): New.
5381 (reduce_template_parm_level): Propagate parameter pack flag.
5382 (process_template_parm): Add is_parameter_pack parameter to state
5383 when the parameter is actually a parameter pack. Create template
5384 parameter packs when is_parameter_pack is true.
5385 (current_template_args): The argument for a template parameter
5386 pack is an argument pack containing a single pack expansion.
5387 (process_partial_specialization): When checking that non-type
5388 argument expressions do not involve template parameters, loop over
5389 the arguments in argument packs separately.
5390 (push_template_decl_real): Check that the type of the declaration
5391 does not have any bare parameter packs. Check that primary
5392 templates have no more than one parameter pack, and that it comes
5393 at the end of the template parameter list.
5394 (convert_template_argument): Handle coercions for pack expansion
5395 expressions by coercing the pattern then rebuilding the expansion.
5396 (coerce_template_parms): When coercing the arguments for a
5397 variadic template, pack "extra" arguments into an argument pack.
5398 (coerce_template_template_parms): Cannot coerce between parameter
5399 packs and non-pack parameters.
5400 (template_args_equal): Compare PACK_EXPANSION_P expressions.
5401 (comp_template_args): Expand all template arguments packs before
5402 comparing template argument lists.
5403 (mangle_class_name_for_template): Make argument packs as separate
5405 (for_each_template_parm_r): No need to handle BASELINK.
5406 (instantiate_class_template): Handle pack expansions in the base
5408 (tsubst_pack_expansion): New.
5409 (tsubst_template_args): Handle substitutions of argument packs and
5410 pack expansion into template argument lists.
5411 (tsubst_decl): Expand function parameter packs into separate
5412 function parameters.
5413 (tsubst_arg_types): Expand a type pack expansion into separate
5415 (tsubst_exception_specification): Handle pack expansions in
5416 exception specifiers.
5417 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
5418 replacing a template parameter with its argument. If we encounter
5419 a substitution for an argument pack, just return the parameter
5421 (tsubst_copy): sizeof(X...) returns the number of elements in
5422 parameter pack X. See through ARGUMENT_PACK_SELECT when the
5423 PARM_DECL is a parameter pack.
5424 (tsubst_expr): Expression pack expansions and argument packs
5425 cannot show up here; they will all be handled through function
5426 calls, sizeof, and template argument lists.
5427 (tsubst_copy_and_build): sizeof(X...) returns the number of
5428 elements in parameter pack X. Handle pack expansions in TREE_LIST
5429 and CONSTRUCTOR nodes.
5430 (fn_type_unification): Handle "incomplete" explicit template
5431 argument lists that specify some of the arguments for a template
5433 (type_unification_real): Unify arguments against pack expansions.
5434 (template_parm_level_and_index): New, helper function.
5435 (unify_pack_expansion): New.
5436 (unify): Unify argument packs on an argument-by-argument basis,
5437 handling variadic argument packs as well.
5438 (more_specialized_fn): Handle unification of function parameter
5439 packs. All things being equal, prefer non-variadic function
5440 templates to variadic function templates.
5441 (more_specialized_class): Prefer the variadic class template
5442 partial specialization that binds fewer arguments to a parameter
5444 (regenerate_decl_from_template): Expand function parameter packs
5445 into separate parameters.
5446 (instantiate_decl): Ditto.
5447 (tsubst_initializer_list): Handle pack expansions for base-class
5449 (dependent_type_p_r): Determine dependent types in argument packs
5450 and pack expansions.
5451 (value_dependent_expression_p): Determine value-dependence of
5452 non-type argument packs.
5453 (dependent_template_arg_p): Handle argument packs.
5454 * semantics.c (finish_cond): Check for bare parameter packs.
5455 (finish_expr_stmt): Ditto.
5456 (finish_for_expr): Ditto.
5457 (finish_switch_cond): Ditto.
5458 (finish_mem_initializers): Ditto.
5459 * name-lookup.c (arg_assoc_type): Handle pack expansions and
5461 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
5462 * parser.c (make_declarator): Declarator is not an expansion.
5463 (make_pointer_declarator): Transfer parameter pack flag to outer
5465 (make_reference_declarator): Ditto.
5466 (make_ptrmem_declarator): Ditto.
5467 (make_call_declarator): Ditto.
5468 (make_array_declarator): Ditto.
5469 (cp_parser_postfix_expression): Allow pack expansion expressions
5470 in the argument list for a call expression.
5471 (cp_parser_parenthesized_expression_list): Add new parameter
5472 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
5473 into separate arguments."
5474 (cp_parser_new_placement): Allow pack expansion expressions.
5475 (cp_parser_new_initializer): Ditto.
5476 (cp_parser_mem_initializer_list): Allow ellipsis to create a
5477 base-class initializer expansion.
5478 (cp_parser_mem_initializer): Ditto.
5479 (cp_parser_template_parameter_list): Keep track of whether the
5480 template parameter is a template parameter pack.
5481 (cp_parser_template_parameter): Parse the ellipsis to indicate a
5482 template parameter pack.
5483 (cp_parser_type_parameter): Ditto.
5484 (cp_parser_template_argument_list): Parse the ellipsis to indicate
5486 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
5487 this declarator is a parameter pack.
5488 (cp_parser_parameter_declaration): The ellipsis does not end the
5489 parameter declaration, because it might be a parameter pack. Parse
5490 the ellipsis to indicate a parameter pack.
5491 (cp_parser_initializer): Allow pack expansions.
5492 (cp_parser_initializer_list): Allow ellipsis to create an
5493 initializer expansion.
5494 (cp_parser_base_clause): Allow ellipsis to create a base specifier
5496 (cp_parser_type_id_list): Allow ellipsis to create an exception
5497 specifier expansion.
5498 (cp_parser_attribute_list): Don't allow pack expansions.
5499 (cp_parser_functional_cast): Allow pack expansions.
5500 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
5501 compute the length of a parameter pack.
5502 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
5503 end a template argument.
5504 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
5505 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
5508 2007-03-09 Dirk Mueller <dmueller@suse.de>
5510 * call.c (build_new_op): Call warn_logical_operator.
5512 2007-03-08 Volker Reichelt <v.reichelt@netcologne.de>
5515 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
5518 * pt.c (any_template_arguments_need_structural_equality_p):
5521 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
5523 * decl.c (grokdeclarator): Disable warnings for anonymous
5526 2007-03-05 Volker Reichelt <v.reichelt@netcologne.de>
5528 * typeck2.c (readonly_error): Always emit a hard error.
5529 Remove last argument.
5530 * cp-tree.h (readonly_error): Adjust prototype.
5531 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
5532 * typeck.c (build_unary_op): Likewise.
5533 (build_modify_expr): Likewise.
5535 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
5538 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
5540 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5543 * parser.c (struct cp_parser): New IN_IF_STMT.
5544 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
5545 returning if parsing the body of an 'if' statement or issuing an
5546 error and continuing.
5547 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
5549 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
5551 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
5554 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
5557 2007-03-02 Geoffrey Keating <geoffk@apple.com>
5559 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
5560 Objective-C++. Don't exit early if -shared-libgcc needs to be
5563 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5565 * typeck.c (common_base_type): Delete unused function.
5567 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
5569 * Make-lang.in: Add dummy lang.install-pdf target.
5571 2007-03-01 Simon Baldwin <simonb@google.com>
5574 * decl.c (check_tag_decl): Added new warning for typedef ignored
5575 when it precedes an otherwise valid non-typedef declaration.
5577 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
5579 * typeck.c (build_function_call): Store converted arguments
5580 in a stack-allocated array instead of building a list.
5581 (convert_arguments): Store arguments in the array passed in as an
5582 argument, and return the actual number of arguments.
5583 * call.c (build_call): Delete, and replace with...
5584 (build_call_n, build_call_a): New.
5585 (build_op_delete_call): Rewrite to avoid constructing argument lists.
5586 (build_over_call): Store converted arguments in a stack-allocated
5587 array instead of building a list.
5588 (build_cxx_call): Pass arguments in an array instead of as a list.
5589 (build_java_interface_fn_ref): Rewrite to avoid constructing
5591 * tree.h: Update declarations to reflect above changes.
5592 * method.c (use_thunk): Use a stack-allocated array to hold
5593 the arguments instead of a list.
5594 * rtti.c (throw_bad_cast): Update call to cxx_call.
5595 (throw_bad_typeid): Likewise.
5596 (build_dynamic_cast_1): Likewise.
5597 * init.c (build_builtin_delete_call): Use build_call_n.
5598 * decl.c (expand_static_init): Likewise.
5599 * except.c (cp_protect_cleanup_actions): Likewise.
5600 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
5601 (gimplify_must_not_throw_expr): Likewise.
5602 (cxx_omp_apply_fn): Use build_call_a.
5604 2007-02-26 Mark Mitchell <mark@codesourcery.com>
5606 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
5607 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
5609 2007-02-25 Mark Mitchell <mark@codesourcery.com>
5611 * cp-tree.h (static_ctors): Remove.
5612 * cp-tree.h (static_dtors): Likewise.
5613 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
5614 refactoring of tree_map hierarchy.
5615 (decl_shadowed_for_var_insert): Likewise.
5616 * semantics.c (expand_body): Use c_expand_body.
5617 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
5618 * decl2.c (static_ctors): Remove.
5619 (static_dtors): Likewise.
5620 (generate_ctor_or_dtor_function): Pass NULL_TREE to
5621 objc_generate_static_init_call. Do not call static_[cd]tors.
5622 (generate_ctor_and_dtor_functions_for_priority): Do not check for
5624 (cp_write_global_declarations): Likewise.
5626 2007-02-23 Richard Guenther <rguenther@suse.de>
5628 * class.c (note_name_declared_in_class): Make declaration
5629 changes meaning a pedwarn.
5631 2007-02-22 Michael Matz <matz@suse.de>
5634 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
5635 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
5636 dump_function_decl): Guard emitting outer scopes by new flag.
5637 * cp-lang.c (cxx_dwarf_name): New function.
5638 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
5639 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
5641 (push_template_decl_real, lookup_template_class): Remove calls
5644 2007-02-19 Mark Mitchell <mark@codesourcery.com>
5646 * call.c (build_new_method_call): Ensure that explicit calls of
5647 destructors have type "void".
5649 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5651 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
5652 and -Walways-true with -Waddress.
5653 * cvt.c (convert_to_void): Replace unconditional warning with
5656 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
5658 * decl.c, tree.c: Fix comment typos.
5660 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
5663 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
5664 statement expression if we had an error mark node.
5666 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
5667 Brooks Moses <brooks.moses@codesourcery.com>
5668 Lee Millward <lee.millward@codesourcery.com>
5670 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
5671 Change class to tcc_vl_exp.
5673 * call.c (build_call): Use build_call_list instead
5675 (build_over_call): Likewise.
5676 (build_new_method_call): Use build_min_non_dep_call_list
5677 instead of build_min_non_dep.
5679 * error.c (dump_call_expr_args): New function.
5680 (dump_aggr_init_expr_args): New function.
5681 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
5682 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
5684 * cvt.c (convert_to_void): Use build_call_array instead
5685 of build3; use new AGGR_INIT_EXPR accessor macros.
5687 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
5688 instead of TREE_CODE_LENGTH.
5690 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
5691 AGGR_INIT_EXPR accessor macros.
5693 * cp-gimplify.c (cp_gimplify_init_expr): Use
5694 AGGR_INIT_EXPR_SLOT to set the slot operand.
5696 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
5697 (AGGR_INIT_EXPR_SLOT): New macro.
5698 (AGGR_INIT_EXPR_ARG): New macro.
5699 (aggr_init_expr_nargs): New macro.
5700 (AGGR_INIT_EXPR_ARGP): New macro.
5701 (aggr_init_expr_arg_iterator): New.
5702 (init_aggr_init_expr_arg_iterator): New.
5703 (next_aggr_init_expr_arg): New.
5704 (first_aggr_init_expr_arg): New.
5705 (more_aggr_init_expr_args_p): New.
5706 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
5707 (stabilize_aggr_init): New declaration.
5708 (build_min_non_dep_call_list): Likewise.
5710 * tree.c (process_aggr_init_operands): New function.
5711 (build_aggr_init_array) New function.
5712 (build_cplus_new): Update to use new CALL_EXPR and
5713 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
5714 build_aggr_init_array.
5715 (build_min_non_dep_call_list) New function.
5716 (build_min_nt): Assert input code parameter is not a variable
5717 length expression class.
5718 (build_min, build_min_non_dep): Likewise.
5719 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
5720 to check for equality instead of recursing. Handle tcc_vl_exp
5722 (stabilize_call): Update to only handle CALL_EXPRs, not
5723 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
5724 (stabilize_aggr_init): New function.
5725 (stabilize_init): Use it.
5727 * cxx-pretty-print.c (pp_cxx_postfix_expression)
5728 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
5729 AGGR_INIT_EXPR accessor macros and argument iterators.
5731 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
5732 build_vl_exp. Iterate through the operands, recursively
5733 processing each one.
5734 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
5735 CALL_EXPR accessor macros.
5736 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
5737 tree code classes. Use TREE_OPERAND_LENGTH instead of
5740 * semantics.c (finish_call_expr): Use build_nt_call_list
5741 instead of build_nt.
5742 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
5743 accessor macros. Use build_call_array to construct the
5744 CALL_EXPR node instead of build3
5746 * decl2.c (build_offset_ref_call_from_tree): Use
5747 build_nt_call_list and build_min_non_dep_call_list instead
5748 of build_min_nt and build_min_non_dep.
5750 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
5751 Use build_nt_call_list instead of build_min_nt.
5753 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5756 * call.c (build_conditional_expr): Improve error message.
5758 2007-02-13 Dirk Mueller <dmueller@suse.de>
5760 * friend.c (do_friend): Annotate warning about friend
5761 declarations in templates with OPT_Wnon_template_friend.
5762 Convert informal message from warning() to inform().
5764 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
5765 Mark Mitchell <mark@codesourcery.com>
5768 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
5769 instantiations for variables.
5771 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5774 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
5775 Check warn_unused_value just once.
5777 2007-02-11 Mark Mitchell <mark@codesourcery.com>
5780 * pt.c (determine_specialization): Use skip_artificial_parms_for.
5781 (fn_type_unificiation): Likewise.
5782 (get_bindings): Likewise.
5784 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
5787 * decl.c (finish_function): Use DECL_REPLACEABLE.
5788 * tree.c (cp_cannot_inline_tree_fn): Likewise.
5790 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
5792 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
5794 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
5796 * decl.c (grokvardecl): Don't error if !have_tls.
5797 (grokdeclarator): Likewise.
5798 * parser.c (cp_parser_omp_threadprivate): Likewise.
5800 2007-02-07 Jakub Jelinek <jakub@redhat.com>
5803 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
5804 parameters and result decls in omp clauses.
5805 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
5808 2007-02-05 Dirk Mueller <dmueller@suse.de>
5811 * parser.c (cp_parser_class_specifier): Always initialize bases.
5813 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
5815 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
5816 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
5817 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
5819 * semantics.c (finish_omp_atomic): Store a whole expression node
5820 in operand 1, and integer_zero_node in operand 0, for dependent
5821 OMP_ATOMIC. Rewrite to make flow easier to understand.
5823 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5825 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
5827 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
5829 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
5830 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
5832 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
5834 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
5835 keyword warning to -Wc++0x-compat.
5837 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5839 * decl.c (grokdeclarator): Update documentation.
5841 2007-02-02 Jakub Jelinek <jakub@redhat.com>
5844 * decl.c (grokdeclarator): If __thread is used together with
5845 a storage class other than extern and static, clear thread_p
5846 after issuing diagnostics and fall through to checking the
5849 2007-01-30 Roger Sayle <roger@eyesopen.com>
5851 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
5852 calculating the size of an array (to avoid recursive errors).
5854 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5857 * typeck.c (build_binary_op): Fix logic for warning. Move warning
5859 * call.c (convert_like_real): Don't warn when converting to
5862 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5864 * decl.c (pop_label): Replace warning with call to
5865 warn_for_unused_label.
5867 2007-01-28 Andrew Pinski <pinskia@gmail.com>
5870 * semantics.c (finish_pseudo_destructor_expr): Check the
5871 destrutor name by calling check_dtor_name.
5873 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
5875 * lex.c (D_CPP0X): Rename.
5877 (reswords): D_CPP0X -> D_CXX0X.
5878 (init_reswords): Ditto.
5879 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
5880 of C++0x keywords as identifiers.
5882 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
5885 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
5888 2007-01-23 Ian Lance Taylor <iant@google.com>
5890 * typeck.c (convert_for_assignment): Only warn about a = b = c
5891 when converting to bool.
5893 2007-01-23 Roger Sayle <roger@eyesopen.com>
5895 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
5897 * typeck.c (ignore_overflows): Remove the remaining uses of
5898 TREE_CONSTANT_OVERFLOW.
5900 2007-01-20 Jan Hubicka <jh@suse.cz>
5902 * decl2.c (start_objects, start_static_storage_duration_function):
5903 Do not make the functions uninlinable.
5905 2007-01-17 Ian Lance Taylor <iant@google.com>
5907 * class.c (add_method): Call VEC_reserve_exact rather than passing
5908 a negative size to VEC_reserve.
5910 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
5913 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
5915 2007-01-10 Mark Mitchell <mark@codesourcery.com>
5918 * decl.c (make_typename_type): If the qualified name is not a
5919 type, issue an error.
5920 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
5923 2007-01-08 Geoffrey Keating <geoffk@apple.com>
5925 * rtti.c: Include target.h.
5926 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
5927 don't emit typeinfo for fundamental types as weak.
5928 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
5930 2007-01-08 Richard Guenther <rguenther@suse.de>
5932 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
5934 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
5936 * call.c (standard_conversion): Pass flag to
5937 vector_types_convertible_p to disallow emission of note.
5938 * typeck.c (convert_for_assignment): Pass flag to
5939 vector_types_convertible_p to allow emission of note.
5940 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
5941 to disallow emission of note.
5943 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5946 * typeck.c (build_binary_op): Call overflow_warning if
5947 TREE_OVERFLOW_P is true for the result and not for any of the
5950 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
5953 * class.c (add_method): Don't wait until template
5954 instantiation time to complain about duplicate methods.
5956 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5959 * semantics.c (finish_unary_op_expr): Warn only if result
5960 overflowed and operands did not.
5962 2007-01-05 Ian Lance Taylor <iant@google.com>
5964 * typeck.c (build_binary_op): Warn about comparing a non-weak
5967 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
5969 * pt.c (tsubst): Propagate the need for structural equality checks
5970 when reducing the level of template parameters.
5972 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
5974 * pt.c: Fix a comment typo.
5976 2007-01-02 Ian Lance Taylor <iant@google.com>
5978 * semantics.c (maybe_convert_cond): Optionally warn when using an
5979 assignment as a condition.
5980 * typeck.c (convert_for_assignment): Optionally warn about
5981 assigning the result of an assignment to a bool.
5983 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
5985 * pt.c (canonical_template_parms): Correct typo in comment.
5987 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
5989 * typeck.c (structural_comptypes): Renamed from "comptypes".
5990 (comptypes): Use canonical type information to perform fast type
5991 comparison. When VERIFY_CANONICAL_TYPES, verify that the
5992 canonical type comparison returns the same results as we would see
5993 from the current, structural check. Support COMPARE_STRUCTURAL
5994 when we need structural checks.
5995 * decl.c (typename_compare): Fix comment.
5996 (build_typename_type): TYPENAME_TYPE nodes require structural
5997 equality checks, because they resolve different based on the
5999 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
6000 require structural equality checks (for now).
6001 (build_ptrmemfunc_type): Build the canonical pointer to member
6003 (compute_array_index_type): Whenever we build a new index type
6004 to represent the size of an array in a template, we need to mark
6005 this index type as requiring structural equality. This goes for
6006 arrays with value-dependent sizes with the current ABI, or all
6008 * tree.c (cplus_array_hash): New.
6009 (struct cplus_array_info): New.
6010 (cplus_array_compare): New.
6011 (cplus_array_htab): New.
6012 (build_cplus_array_type_1): Use a hash table to cache the array
6013 types we build. Build the canonical array type for each array
6015 (cp_build_qualified_type_real): When building a cv-qualified array
6016 type, use the hash table of array types and build canonical array
6018 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
6019 use structural equality (for now).
6020 * cp-tree.h (COMPARE_STRUCTURAL): New.
6021 * pt.c (canonical_template_parms): New.
6022 (canonical_type_parameter): New.
6023 (process_template_parm): Find the canonical type parameter.
6024 (lookup_template_class): When we have named the primary template
6025 type, set the canonical type for our template class to the primary
6026 template type. If any of the template arguments need structural
6027 equality checks, the template class needs structural equality
6029 (tsubst): When reducing the level of a template template
6030 parameter, we require structural equality tests for the resulting
6031 parameter because its template parameters have not had their types
6032 canonicalized. When reducing a template type parameter, find the
6033 canonical reduced type parameter.
6034 (any_template_arguments_need_structural_equality_p): New.