1 2008-09-25 Paolo Carlini <paolo.carlini@oracle.com>
4 * name-lookup.c (maybe_process_template_type_declaration): Check
5 return value of push_template_decl_real for error_mark_node.
7 2008-09-24 Aldy Hernandez <aldyh@redhat.com>
9 * semantics.c (finish_fname): Pass location to fname_decl.
11 2008-09-23 Jakub Jelinek <jakub@redhat.com>
14 * semantics.c (finish_omp_for): If processing_template_decl, just build
15 MODIFY_EXPR for init instead of calling cp_build_modify_expr.
17 2008-09-23 Aldy Hernandez <aldyh@redhat.com>
19 * typeck.c (build_array_ref): Pass location to cp_build_binary_op.
20 (get_member_function_from_ptrfunc): Same.
21 (build_x_binary_op): Same.
22 (build_binary_op): Same.
23 (cp_build_binary_op): New location argument.
24 (pointer_diff): Pass location to cp_build_binary_op.
25 (cp_truthvalue_conversion): Pass location to build_binary_op.
26 (convert_ptrmem): Pass location to cp_build_binary_op.
27 (cp_build_modify_expr): Same.
28 (build_ptrmemfunc): Same.
29 * init.c (expand_cleanup_for_base): Pass location to
30 c_common_truthvalue_conversion.
31 (build_new_1): Pass location to cp_build_binary_op.
32 (build_vec_delete_1): Pass location to *build_binary_op,
33 c_common_truthvalue_conversion.
34 (build_vec_init): Same.
36 * decl.c (compute_array_index_type): Same.
37 * call.c (build_new_op): Same.
38 * rtti.c (build_dynamic_cast_1): Same.
39 * cp-tree.h: Add argument to cp_build_binary_op.
40 * semantics.c (handle_omp_for_class_iterator): Pass location to
41 *build_binary_op, c_common_truthvalue_conversion.
42 * decl2.c (get_guard_cond): Same.
44 2008-09-17 Richard Guenther <rguenther@suse.de>
47 * rtti.c (build_dynamic_cast_1): Convert the COND_EXPR
48 result to the correct type.
50 2008-09-17 H.J. Lu <hongjiu.lu@intel.com>
53 * name-lookup.c (pushdecl_maybe_friend): Don't return the old
54 parameter for duplicate.
56 2008-09-17 Jason Merrill <jason@redhat.com>
59 * name-lookup.c (lookup_type_scope): Look through sk_function_parms.
61 2008-09-17 Jakub Jelinek <jakub@redhat.com>
64 * typeck.c (build_array_ref): Use protected_set_expr_location instead
65 of SET_EXPR_LOCATION when ret might not be an expression.
67 2008-09-17 Jan Hubicka <jh@suse.cz>
70 * cp/decl.c (start_method): Set DECL_NO_INLINE_WARNING_P.
72 2008-09-16 Jakub Jelinek <jakub@redhat.com>
75 * semantics.c (finish_compound_literal): Return error_mark_node if
79 * lex.c (init_reswords): Don't populate ridpointers for D_CONLY
82 2008-09-15 Aldy Hernandez <aldyh@redhat.com>
84 * decl.c (duplicate_decls): Call error_at.
85 (grokfndecl): New location argument. Use location if available.
86 (grokdeclarator): Pass declarator location to grokfndecl.
87 * cp-tree.h (struct cp_declarator): Update comment for id_loc.
88 * decl2.c (check_classfn): Use error_at.
89 * parser.c (cp_parser_init_declarator): Set function_start_locus
91 (cp_parser_member_declaration): Set id_loc for function declarators.
93 2008-09-09 Jan Hubicka <jh@suse.cz>
96 * pt.c (tsubst_decl): Do not copy DECL_STRUCT_FUNCTION pointer.
98 2008-09-09 Jakub Jelinek <jakub@redhat.com>
101 * tree.c (array_type_nelts_top): Add size_one_node instead of
104 2008-09-09 Jason Merrill <jason@redhat.com>
107 * pt.c (tsubst_copy) [PARM_DECL]: Don't abort if the parm has
110 2008-09-09 Jakub Jelinek <jakub@redhat.com>
113 * decl.c (build_enumerator): Handle previous value's DECL_INITIAL
114 being error_operand_p. Don't clear value if it was error_mark_node.
116 2008-09-09 Paolo Bonzini <bonzini@gnu.org>
118 * cp-objcp-common.h (LANG_HOOKS_EXPAND_DECL): Remove.
119 * cp-tree.h: Don't mention DECL_ANON_UNION_ELEMS.
120 * semantics.c (anon_aggr_type_p): Remove.
122 2008-09-06 Jason Merrill <jason@redhat.com>
125 * parser.c (cp_parser_parameter_declaration_list): Process the
126 PARM_DECLs as we go and push them. Return a TREE_LIST.
127 (cp_parser_parameter_declaration_clause): Return a TREE_LIST.
128 (cp_parser_direct_declarator): Create a binding level and
129 suppress deprecated warnings in the parameter list.
130 (make_call_declarator): PARMS is now a tree.
131 * cp-tree.h (struct cp_declarator): Function parms are now a tree.
132 * decl.h (enum deprecated_states, deprecated_state): Move here.
134 (type_is_deprecated): New fn.
135 (grokparms): PARMLIST is a tree now. Warn about parms that
136 use deprecated types.
137 * mangle.c (write_expression): Handle PARM_DECL, CALL_EXPR and
139 * pt.c (tsubst) [DECLTYPE_TYPE]: Set skip_evaluation.
140 (tsubst_copy) [PARM_DECL]: Handle a PARM_DECL used outside of a
142 * name-lookup.c (pushtag): Look through function parameter scopes.
143 (pushdecl_maybe_friend): Don't set DECL_CONTEXT on a PARM_DECL
144 when we're parsing a function declarator.
146 2008-09-05 Douglas Gregor <doug.gregor@gmail.com>
149 * tree.c (cp_build_qualified_type_real): Deal with sharing of
150 TYPE_LANG_SPECIFIC in the canonical types of pointer-to-method
153 2008-09-04 Ian Lance Taylor <iant@google.com>
155 * parser.c (check_no_duplicate_clause): Change code parameter to
156 enum omp_clause_code.
158 2008-09-03 Jakub Jelinek <jakub@redhat.com>
161 * decl.c (cp_finish_decl): Only set
162 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P if decl is VAR_DECL.
165 * cp-tree.h (defer_mark_used_calls, deferred_mark_used_calls): New
167 * decl2.c (mark_used): If defer_mark_used_calls, push decl into
168 deferred_mark_used_calls vector and exit early.
169 * decl.c (defer_mark_used_calls, deferred_mark_used_calls): New
171 (finish_function): Set defer_mark_used_calls for the duration of the
172 function. Call mark_used on any queued decls.
174 2008-09-02 Jason Merrill <jason@redhat.com>
177 * call.c (build_over_call): Make =delete work with SFINAE.
178 * class.c (resolve_address_of_overloaded_function): Likewise.
180 * cp-tree.h (struct lang_decl_flags): Rename threadprivate_p to
181 threadprivate_or_deleted_p.
182 (CP_DECL_THREADPRIVATE_P): Adjust.
183 (DECL_DELETED_FN): Likewise.
184 (SD_UNINITIALIZED, SD_INITIALIZED, SD_DEFAULTED): New macros.
185 (SD_DELETED): New macro.
186 * parser.c (cp_parser_init_declarator): Use them.
187 * decl.c (start_decl): Use them.
189 * decl2.c (mark_used): Give =deleted error even in sizeof.
191 * typeck2.c (check_narrowing): Downgrade narrowing error to
194 2008-09-02 Aldy Hernandez <aldyh@redhat.com>
196 * typeck.c (build_array_ref): Use new location argument.
197 * class.c (build_vtbl_ref_1): Pass location to build_array_ref.
198 * call.c (build_new_op): Same.
199 * decl2.c (grok_array_decl): Same.
200 * cp-tree.h (build_array_ref): Add location argument to prototype.
202 2008-09-01 Aldy Hernandez <aldyh@redhat.com>
204 * typeck.c (build_x_indirect_ref): Add location argument.
205 * class.c (build_base_path): Pass location to build_indirect_ref.
206 * pt.c (tsubst_copy_and_build): Pass location to
207 finish_label_address_expr.
208 * parser.c (cp_parser_unary_expression): Same.
210 2008-08-31 Jason Merrill <jason@redhat.com>
212 Implement late-specified return type using 'auto'.
213 * cp-tree.h (struct cp_declarator): Add late_return_type field to
215 * parser.c (cp_parser_late_return_type_opt): New fn.
216 (cp_parser_direct_declarator): Use it.
217 (make_call_declarator): Put it in the declarator.
218 * decl.c (grokdeclarator): Splice in late-specified return type.
219 * pt.c (splice_late_return_type): New fn.
221 2008-08-29 Michael Meissner <gnu@the-meissners.org>
223 * decl.c (builtin_function_1): Take a bool argument to decide
224 whether to use pushdecl or pushdecl_top_level.
225 (duplicate_decls): Copy function specific target and optimization
226 options on duplicate declarations.
227 (cxx_builtin_function): Update builtin_function_1 call.
228 (cxx_builtin_function_ext_scope): New function, guarantee that the
229 declaration is done at global scope.
231 * cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE): New
232 macro, define builtin function hook for delayed machine specific
235 * cp-tree.h (cxx_builtin_function_ext_scope): Add declaration.
237 2008-08-30 Jason Merrill <jason@redhat.com>
240 * pt.c (dependent_type_p): Don't abort on auto outside of a template.
242 2008-08-29 Jason Merrill <jason@redhat.com>
244 Implement C++0x 'auto' semantics.
245 * decl.c (start_decl_1): Don't complain about auto being incomplete.
246 (cp_finish_decl): Deduce auto.
247 * init.c (build_new): Handle 'new auto'.
248 * typeck2.c (cxx_incomplete_type_diagnostic): Give a different
249 message for auto than for normal template type parms.
250 * pt.c (type_dependent_expression_p): Handle { }.
251 (make_auto): New function.
252 (listify_autos): New function.
253 (do_auto_deduction): New function.
254 (is_auto): New function.
255 (type_uses_auto): New function.
256 * cp-tree.h: Declare them.
257 * parser.c (cp_parser_decl_specifier_seq): In C++0x mode, don't
258 treat auto as a declspec.
259 (cp_parser_simple_type_specifier): It's a type-specifier.
261 2008-08-29 Mark Mitchell <mark@codesourcery.com>
263 * mangle.c (write_type): Add target-specific manglings for
264 non-fundamental types to the substitution table.
267 2008-08-29 Jakub Jelinek <jakub@redhat.com>
271 * name-lookup.c (do_using_directive, cp_emit_debug_info_for_using):
272 Adjust debug_hooks->imported_module_or_decl callers.
274 2008-08-29 Jan Hubicka <jh@suse.cz>
276 * cp-gimplify.c (cp_gimplify_expr): Add PRED_CONTINUE heuristic.
278 2008-08-28 Paolo Carlini <paolo.carlini@oracle.com>
281 * decl.c (reshape_init_r): Check init for error_mark_node.
283 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
286 * semantics.c (maybe_convert_cond): Call verify_sequence_points.
287 (finish_return_stmt): Likewise.
288 (finish_switch_condition): Likewise.
290 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
292 * cp-tree.h: Fix #error directive.
294 2008-08-26 Douglas Gregor <doug.gregor@gmail.com>
296 * typeck.c (type_after_usual_arithmetic_conversions): Don't do the
297 usual arithmetic conversions on scoped enumeration types.
298 (common_type): Ditto.
299 (default_conversion): Don't perform integral promotions on scoped
301 (build_array_ref): Scoped enumeration types can't be used as
303 * decl.c (start_enum): If building a C++0x scoped enumeration,
304 enter its scope. If provided with an underlying type, check that
305 underlying type and set up the enumeration type accordingly.
306 (finish_enum): Only compute an underlying type if the underlying
307 type isn't already fixed, and only convert the enumerator values
308 now if we've just computed the underlying type. Finish the scope
309 of C++0x scoped enumerations.
310 (build_enumerator): For enumerations with a fixed underlying type,
311 check the enumerator values when the enumerator is defined.
312 (lookup_enumerator): New.
313 * call.c (standard_conversion): Don't allow assignment from
314 integers to scoped enumeration types, even with -fpermissive.
315 Don't convert from scoped enumerations to bool or any arithmetic
317 (build_conditional_expr): Don't per the usual arithmetic
318 conversions for scoped enumeration types.
319 (convert_like_real): Check complain to see if we should
321 * error.c (class_key_or_enum_as_string): Print scoped enums.
322 * cp-tree.h (MAYBE_CLASS_TYPE_P): Check CLASS_TYPE_P, not
324 (INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P): New.
325 (SCOPED_ENUM_P): New.
326 (UNSCOPED_ENUM_P): New.
327 (SET_SCOPED_ENUM_P): New.
328 (ENUM_UNDERLYING_TYPE): New.
329 * pt.c (lookup_template_class): Update the instantiation of enum
330 types to deal with C++0x scoped enumerations and underlying
332 * name-lookup.c (begin_scope): Deal with scoped enumeration
334 (lookup_qualified_name): Deal with lookup into enumeration types.
335 * name-lookup.h (enum scope_kind): Add sk_scoped_enum.
336 * parser.c (cp_parser_class_or_namespace_name): Rename to...
337 (cp_parser_qualifying_entity): ... this. Also, in C++0x mode,
338 parse a type-name that can be an enumeration type.
339 (cp_parser_nested_name_specifier_opt): Update with C++0x grammar.
340 (cp_parser_elaborated_type_specifier): Parse the
341 optional `struct' or `class' following enum (in C++0x).
342 (cp_parser_enum_specifier): Parse C++0x scoped enumerations and
345 2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
347 * typeck.c: Update all calls to pedwarn.
352 * name-lookup.c: Likewise.
353 * parser.c: Likewise.
355 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
358 * parser.c (cp_parser_omp_for_loop): Handle parenthesized
361 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
363 * parser.c: Update all calls to inform.
364 * typeck.c: Likewise.
368 * method.c: Likewise.
369 * friend.c: Likewise.
370 * typeck2.c: Likewise.
372 * name-lookup.c: Likewise.
375 2008-08-19 Jakub Jelinek <jakub@redhat.com>
378 * error.c (cp_print_error_function): Deal with recursive BLOCK trees.
380 2008-08-18 Tomas Bily <tbily@suse.cz>
382 * tree.c (cp_tree_equal): Use CONVERT_EXPR_CODE_P.
384 2008-08-18 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
386 * typeck.c: Update all callers of permerror.
391 * except.c: Likewise.
393 * typeck2.c: Likewise.
395 * semantics.c: Likewise.
396 * name-lookup.c: Likewise.
399 * parser.c: Likewise.
401 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
404 * pt.c (check_template_shadow): Change to return a bool.
405 * name-lookup.c (push_class_level_binding): Early return if
406 check_template_shadow returns false.
407 * cp-tree.h (check_template_shadow): Adjust declaration.
409 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
412 * decl.c (grokdeclarator): In case of extern and initializer, return
413 error_mark_node after the error.
415 2008-08-13 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
418 * decl.c (grokfndecl): Call check_main_parameters_type only if
421 2008-08-12 Paolo Carlini <paolo.carlini@oracle.com>
424 * parser.c (cp_parser_class_head): Early return error_mark_node in
425 case of global qualification of class name or qualified name that
426 does not name a class.
428 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
431 * cvt.c (ocp_convert): Warn for out-of-range conversions to enum.
433 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
436 * cp-tree.h (struct diagnostic_context, struct diagnostic_info):
437 Delete forward declarations. Check that toplev.h has not been
438 included before this file. Include toplev.h and diagnostic.h.
439 * error.c (cp_cpp_error): Use DK_PEDWARN.
440 (cxx_incomplete_type_diagnostic): Update declaration.
441 (cxx_incomplete_type_error): Use DK_ERROR.
442 * typeck2.c (cxx_incomplete_type_diagnostic): Take a diagnostic_t
443 as argument. Use emit_diagnostic.
444 (cxx_incomplete_type_error): Use DK_ERROR.
445 (add_exception_specifier): Use diagnostic_t instead of custom
447 * typeck.c (complete_type_or_else): Update call to
448 cxx_incomplete_type_diagnostic.
449 * init.c (build_delete): Likewise.
450 * call.c (diagnostic_fn_t): Remove unused typedef.
451 (build_temp): Pass a pointer to diagnostic_t.
452 (convert_like_real): Use emit_diagnostic.
453 (joust): Check return value of warning before giving informative
455 * friend.c (do_friend): Check return value of warning
456 before giving informative note.
457 * parser.c (cp_parser_template_id): Likewise.
459 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
462 * class.c (check_bases_and_members): Warn with -Wuninitialized
465 2008-08-08 Volker Reichelt <v.reichelt@netcologne.de>
468 * decl.c (xref_basetypes): Check base for MAYBE_CLASS_TYPE_P,
469 and make sure it is not a union.
471 2008-08-07 H.J. Lu <hongjiu.lu@intel.com>
473 * semantics.c (finish_decltype_type): Initialize type.
475 2008-08-07 Douglas Gregor <doug.gregor@gmail.com>
477 * semantics.c (finish_decltype_type): Handle calls to function
478 pointers and references to functions properly.
480 2008-08-06 Douglas Gregor <doug.gregor@gmail.com>
483 * parser.c (cp_parser_template_argument): Don't assume that '>>'
484 following a type-id is an error when in C++0x mode.
486 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
489 * decl.c (grokdeclarator): Use explicit location with permerror_at.
491 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
494 * typeck.c (cp_build_binary_op): Move code to c-common.c.
496 2008-08-05 Jason Merrill <jason@redhat.com>
499 * decl.c (build_ptrmemfunc_type): Don't require structural
500 comparison of PMF types.
501 * tree.c (cp_build_qualified_type_real): Don't clear
502 a valid TYPE_PTRMEMFUNC_TYPE.
503 * typeck.c (cp_build_unary_op): Still do build_ptrmemfunc in
506 2008-08-04 Jason Merrill <jason@redhat.com>
509 * typeck2.c (check_narrowing): Allow narrowing conversion
510 from an explicit floating-point constant.
513 * pt.c (tsubst_decl): Leave DECL_INITIAL set on deleted
516 2008-08-04 Simon Baldwin <simonb@google.com>
519 * parser.c (cp_parser_elaborated_type_specifier): Warn only when
520 the declaration's id is followed by a semicolon.
522 2008-07-31 Jakub Jelinek <jakub@redhat.com>
525 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Call
526 complete_type_or_else even for UNKNOWN_TYPE to get diagnostics.
528 2008-07-31 Jason Merrill <jason@redhat.com>
531 * init.c (build_new_1): Don't convert pointer to the data type
532 until we're actually going to treat it as that type.
535 * tree.c (build_aggr_init_expr): Split out...
536 (build_cplus_new): ...from here.
537 (stabilize_init): Don't mess with AGGR_INIT_EXPR either.
538 * init.c (build_new_1): new T() means value-initialization,
539 not default-initialization.
540 (build_vec_init): Likewise.
541 (build_value_init_1): Use build_aggr_init_expr.
543 2008-07-30 Dodji Seketeli <dseketel@redhat.com>
546 * decl2.c (fix_temporary_vars_context_r): New function.
547 (one_static_initialization_or_destruction): Make sure temporary
548 variables part of the initialiser have their DECL_CONTEXT()
551 2008-07-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
554 * typeck.c (build_binary_op): Encapsulate code into
557 2008-07-29 Jakub Jelinek <jakub@redhat.com>
560 * tree.c (cplus_array_hash, build_cplus_array_type_1): Hash on
561 TYPE_UID instead of pointers.
563 2008-07-29 Jan Hubicka <jh@suse.cz>
565 * optimize.c (maybe_clone_body): Remove DECL_INLINE.
566 * decl.c (duplicate_decls): Likewise.
567 (grokfndecl): Likewise.
568 (start_method): Likewise.
569 * method.c (make_thunk, make_alias_for, implicitly_declare_fn):
571 * pt.c (register_specialization, regenerate_decl_from_template):
573 * decl2.c (grokfield): Likewise.
575 2008-07-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
578 * decl.c (duplicate_decls): Merge USED flags.
580 2008-07-27 Jason Merrill <jason@redhat.com>
583 * decl.c (reshape_init_r): Allow C++0x initializer lists.
585 2008-07-28 Richard Guenther <rguenther@suse.de>
587 Merge from gimple-tuples-branch.
589 2008-07-22 Aldy Hernandez <aldyh@redhat.com>
591 * cp-gimplify.c (gimplify_if_stmt): Set location on newly created
594 2008-07-18 Jakub Jelinek <jakub@redhat.com>
596 * decl.c (finish_function): Call gimple_body after cp_genericize.
598 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
600 * optimize.c: Include gimple.h instead of tree-gimple.h.
601 * Make-lang.in (cp-gimplify.o): Depend on tree-iterator.h.
602 * cp-gimplify.c: Rename tree-gimple.h to gimple.h. Include
605 2008-07-16 Jakub Jelinek <jakub@redhat.com>
607 * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE for the clone.
609 2008-07-14 Jakub Jelinek <jakub@redhat.com>
611 * cp-gimplify.c (cp_gimplify_expr): Update comment.
613 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
615 * cp-tree.h (union lang_tree_node): Rename GENERIC_NEXT to
617 * cp-gimplify.c (cxx_omp_clause_apply_fn): Rename
618 GIMPLE_MODIFY_STMT to MODIFY_EXPR.
619 (cxx_omp_clause_copy_ctor): Same.
620 (cxx_omp_clause_assign_op): Same.
622 2008-05-28 Jakub Jelinek <jakub@redhat.com>
624 * cp-gimplify.c (cp_gimplify_omp_for): Add pre_p argument. Tuplify.
625 (cp_gimplify_expr): Adjust caller.
627 2008-05-11 Doug Kwan <dougkwan@google.com>
629 * init.c (build_vec_delete): Add type conversion for argument
630 0 of POINTER_PLUS_EXPR.
632 2008-04-29 Doug Kwan <dougkwan@google.com>
634 * decl2 (File): Include "gimple.h"
635 (cp_write_global_declarations): Use gimple_body instead of
637 * Make-lang.in (cp/decl2.o): Add $(GIMPLE_H)
639 2008-04-10 Diego Novillo <dnovillo@google.com>
641 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00913.html
643 * optimize.c (maybe_clone_body): Re-enable call to
645 * cp-gimplify.c (cp_gimplify_omp_for): Mark disabled
646 code with call to gimple_unreachable.
647 (cp_genericize): Fix handling of clone bodies.
649 2008-04-04 Diego Novillo <dnovillo@google.com>
651 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00413.html
653 * optimize.c (maybe_clone_body): Re-enable.
655 2008-02-19 Diego Novillo <dnovillo@google.com>
656 Oleg Ryjkov <olegr@google.com>
658 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
660 * cp-gimplify.c (gimplify_for_stmt): Change gimple_seq
661 argument to gimple_seq *. Update all users.
662 (gimplify_must_not_throw_expr): Likewise.
664 2008-02-04 Oleg Ryjkov <olegr@google.com>
666 * except.c: Include gimple.h
667 (cp_protect_cleanup_actions): Convert to tuples.
668 * Make-lang.in (cp/except.o): Add dependency on gimple.h
670 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
672 * cp-gimplify.c (gimplify_cp_loop): Call tree_annotate_all_with_locus
673 instead of annotating each block manually.
675 2007-10-30 Aldy Hernandez <aldyh@redhat.com>
677 * cp-gimplify.c (gimplify_cp_loop): Tuplify.
678 (gimplify_for_stmt): Same.
679 (gimplify_switch_stmt): Same.
680 (cp_gimplify_expr): [FOR_STMT]: Do not call gimplify_for_stmt. Return
682 [WHILE_STMT]: Return GS_OK.
684 [CONTINUE_STMT]: Same.
686 (cp_genericize): Set gimple_body() of cloned functions when needed.
688 2007-10-29 Aldy Hernandez <aldy@quesejoda.com>
690 * cp-gimplify.c: Move build_gimple_eh_filter_tree here.
691 (cp_gimplify_init_expr): Convert to tuples.
692 (gimplify_must_not_throw_expr): Make function return a
693 gimplify_status and convert to tuples.
695 2007-10-18 Aldy Hernandez <aldy@quesejoda.com>
697 * cp-gimplify.c (genericize_try_block): Enable and do not call
699 (genericize_catch_block): Same.
700 (genericize_eh_spec_block): Same.
701 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
702 (cp_gimplify_expr): Enable TRY_BLOCK, HANDLER, and EH_SPEC_BLOCK.
704 2007-10-16 Aldy Hernandez <aldy@quesejoda.com>
706 * optimize.c (maybe_clone_body): Comment out call to clone_body.
707 * decl.c (finish_function): Use gimple_body instead of
709 * cp-tree.h (cp_gimplify_expr): Last 2 arguments are sequences.
710 * cp-gimplify.c (genericize_try_block): Comment out.
711 (genericize_catch_block): Same.
712 (genericize_eh_spec_block): Same.
713 (gimplify_cp_loop): Comment out calls to gimplify_stmt.
714 (gimplify_for_stmt): Comment out.
715 (gimplify_switch_stmt): Comment out call to gimplify_stmt.
716 (cp_gimplify_omp_for): Same.
717 (gimplify_must_not_throw_expr): Argument pre_p is a sequence.
718 Comment out call to gimplify_stmt and append_to_statement_list.
719 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
720 (cp_gimplify_init_expr): Arguments pre_p and post_p are sequences.
721 (cp_gimplify_expr): Same.
722 Comment out calls to genericize_*_block. Comment out call to
725 2008-07-27 H.J. Lu <hongjiu.lu@intel.com>
728 * class.c (type_has_user_provided_default_constructor): Handle
731 2008-07-27 Paolo Carlini <paolo.carlini@oracle.com>
733 * decl.c (push_library_fn): Add a parameter for the exceptions that
734 the function may throw.
735 (push_void_library_fn, push_throw_library_fn, expand_static_init):
737 (build_library_fn): Change to static.
738 * cp-tree.h: Adjust declarations.
739 * except.c (declare_nothrow_library_fn): New.
740 (do_get_exception_ptr, do_begin_catch, do_free_exception,
741 do_allocate_exception): Use the latter, adjust the declarations
742 (ie, add empty exception-specification), consistently with the
743 actual implementation in libsupc++.
745 2008-07-25 Jan Hubicka <jh@suse.cz>
747 * typeck.c (inline_conversion): Remove.
748 (cp_build_function_call): Do not use inline_conversion.
749 * decl.c (duplicate_decls): Do not insist on inline being declared
751 (start_cleanup_fn): Do not assume that INLINE flags prevent function
752 from being output. We now remove static functions always.
753 (finish_function): Do return warning on all static functions.
754 * call.c (build_over_call): Do not use inline_conversion.
755 * cp-tree.h (possibly_inlined_p): Declare.
756 (inline_conversion): Remove.
757 * pt.c (instantiate_decl): Use possibly_inlined_p predicate.
758 * decl2.c (cp_write_global_declarations): Likewise.
759 (mark_used): Likewise.
760 (possibly_inlined_p): New functions.
762 2008-07-25 Jason Merrill <jason@redhat.com>
764 * class.c (type_has_user_provided_default_constructor): Handle
767 2008-07-23 Jan Hubicka <jh@suse.cz>
769 * decl.c (duplicate_decls): Update comment and unit-at-a-time.
770 (grogfndecl): Drop flag_inline_trees code.
771 * pt.c (instantiate_decl): Drop flag_iline_trees code.
772 * lex.c (cxx_init): Do not set unit-at-a-time.
774 2008-07-23 Jason Merrill <jason@redhat.com>
776 * mangle.c (write_unqualified_name): Avoid infinite recursion when
777 trying to mangle a decl with no name.
779 Implement defaulted/deleted functions as per N2346
780 * cp-tree.h (struct lang_decl_flags): Add defaulted_p bitfield.
781 (DECL_DELETED_FN): New macro.
782 (DECL_DEFAULTED_FN): New macro.
783 * class.c (user_provided_p): New fn.
784 (defaultable_fn_p): New fn.
785 (type_has_user_provided_constructor): New fn.
786 (type_has_user_provided_default_constructor): New fn.
787 (check_methods): A defaulted fn is still trivial.
788 (check_bases_and_members): Likewise.
789 * decl.c (grok_special_member_properties): Likewise.
790 (duplicate_decls): Complain about redeclaring a function as deleted.
791 (start_decl): initialized==2 means deleted.
792 (cp_finish_decl): Handle deleted/defaulted semantics.
793 * decl2.c (grokfield): Likewise.
794 (mark_used): Check DECL_DEFAULTED_FN instead of DECL_ARTIFICIAL.
795 Complain about using a deleted fn.
796 * init.c (build_value_init_1): Use type_has_user_provided_constructor.
797 (perform_member_init): Check for a user-provided default constructor
798 even if TYPE_NEEDS_CONSTRUCTING.
799 (build_new_1): Likewise.
800 * call.c (build_over_call): Don't call mark_used twice.
801 * method.c (implicitly_declare_fn): Set DECL_DEFAULTED_FN.
802 * search.c (check_final_overrider): Check for deleted mismatch.
803 * parser.c (cp_parser_init_declarator): Tell start_decl about =delete.
804 (cp_parser_pure_specifier): Handle =default and =delete.
806 * error.c (maybe_warn_cpp0x): Suggest -std=gnu++0x as well.
808 2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
811 * typeck.c: All calls to pedwarn changed.
812 * decl.c: All calls to pedwarn changed.
813 * call.c: All calls to pedwarn changed.
814 * error.c: All calls to pedwarn changed.
815 * typeck2.c: All calls to pedwarn changed.
816 * pt.c: All calls to pedwarn changed.
817 * name-lookup.c: All calls to pedwarn changed.
818 * parser.c: All calls to pedwarn changed.
820 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
822 * call.c: Fix comment typos.
824 * cp-tree.h: Likewise.
825 * cxx-pretty-print.c: Likewise.
828 * name-lookup.c: Likewise.
829 * operators.def: Likewise.
830 * parser.c: Likewise.
833 * typeck.c: Likewise.
835 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
839 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Only check
840 copy constructors and copy assignment operators proper.
842 2008-07-21 Rafael Ávila de Espíndola <espindola@google.com>
844 * parser.c (cp_token): Remove in_system_header.
845 (eof_token): Remove in_system_header.
846 (cp_lexer_get_preprocessor_token): Don't set in_system_header.
847 (cp_lexer_set_source_position_from_token): Don't set in_system_header.
848 (cp_parser_member_declaration): Use in_system_header_at.
849 * pt.c (lookup_template_class): Don't set DECL_IN_SYSTEM_HEADER.
850 (pop_tinst_level): Don't set in_system_header.
851 (instantiate_class_template): Don't set in_system_header.
852 (instantiate_decl): Don't set in_system_header.
853 (instantiate_pending_templates): Don't set in_system_header.
855 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
858 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Use
859 TYPE_NOTHROW_P, not TREE_NOTHROW.
860 (trait_expr_value): Likewise.
862 2008-07-18 Dodji Seketeli <dseketel@redhat.com>
865 * call.c (convert_like_real): Don't take the error code path
866 when a rvalue or base conversion has the bad_p field set.
868 2008-07-18 Kris Van Hees <kris.van.hees@oracle.com>
870 * rtti.c (emit_support_tinfos): Add char16_type_node and
872 * typeck2.c (digest_init): Support char16_t and char32_t.
874 2008-07-18 Kavih R. Ghazi <ghazi@caip.rutgers.edu>
876 * cvt.c (convert_to_void): Avoid C++ keywords.
877 * decl.c (walk_namespaces_r, wrapup_globals_for_namespace):
879 * friend.c (is_friend): Likewise.
880 * init.c (perform_member_init): Likewise.
881 * mangle.c (write_template_prefix, write_template_template_param):
883 * name-lookup.c (do_namespace_alias, do_using_directive,
884 parse_using_directive, ambiguous_decl, arg_assoc): Likewise.
885 * parser.c (cp_parser_template_id, cp_parser_namespace_definition,
886 cp_parser_objc_typename, cp_parser_objc_method_keyword_params):
888 * pt.c (is_specialization_of_friend, lookup_template_class,
889 push_tinst_level, instantiate_class_template,
890 tsubst_copy_and_build): Likewise.
891 * tree.c (add_stmt_to_compound): Likewise.
892 * typeck.c (finish_class_member_access_expr): Likewise.
894 2008-07-17 Julian Brown <julian@codesourcery.com>
895 Mark Mitchell <mark@codesourcery.com>
897 * decl2.c (determine_visibility): Allow target to override
898 visibility of class data.
900 2008-07-17 Paolo Carlini <paolo.carlini@oracle.com>
903 * semantics.c (trait_expr_value): Update __has_trivial_destructor
904 semantics to the current WP (N2691).
906 2008-07-16 Dodji Seketeli <dseketel@redhat.com>
909 * name-lookup.c (lookup_extern_c_fun_binding_in_all_ns): New function.
910 (pushdecl_maybe_friend): Check if a redeclaration of extern C function
911 complies with exception specification constraints.
913 2008-07-14 Jason Merrill <jason@redhat.com>
915 * lex.c (init_reswords): Always set D_OBJC.
917 2008-07-11 Tom Tromey <tromey@redhat.com>
918 Ian Lance Taylor <iant@google.com>
920 * lex.c (struct resword, reswords): Don't define.
921 (D_EXT, D_ASM, D_OBJC, D_CXX0X): Don't define.
922 (init_reswords): Clarify mask code. Use c_common_reswords rather
925 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
928 * decl.c (grokdeclarator): Warn about initializing variables
929 of storage class 'extern' only after the type of the declarator
930 has been properly computed.
932 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
935 * cp-tree.h (struct cp_decl_specifier_seq): Add a location field. It
936 carries the location of the primary type.
937 * parser.c (cp_parser_check_type_definition): Update documentation.
938 (cp_parser_check_for_definition_in_return_type,
939 cp_parser_check_for_invalid_template_id,
940 cp_parser_set_decl_spec_type,
941 cp_parser_check_for_definition_in_return_type,
942 cp_parser_diagnose_invalid_type_name,
943 cp_parser_new_expression, cp_parser_explicit_instantiation,
944 cp_parser_type_specifier, cp_parser_simple_type_specifier,
945 cp_parser_omp_for_loop, cp_parser_pragma): Use location in error
948 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
952 * semantic.c (qualified_name_lookup_error, finish_id_expression):
953 Add a location_t parameter so that
954 error message can have a more accurate location.
955 * cp-tree.h: Updated prototype
956 * pt.c (tsubst_qualified_id): Use location in error messages.
957 * parser.c (cp_parser_postfix_expression,
958 cp_parser_objc_statement, cp_parser_trait_expr,
959 cp_parser_token_is_class_key,
960 cp_parser_uncommitted_to_tentative_parse_p,
961 cp_parser_check_for_invalid_template_id, cp_parser_is_string_literal,
962 cp_parser_error, cp_parser_name_lookup_error,
963 cp_parser_simulate_error, cp_parser_check_decl_spec,
964 cp_parser_check_decl_spec, cp_parser_non_integral_constant_expression,
965 cp_parser_diagnose_invalid_type_name,
966 cp_parser_parse_and_diagnose_invalid_type_name,
967 cp_parser_require_pragma_eol, cp_parser_make_typename_type,
968 cp_parser_string_literal, cp_parser_primary_expression,
969 cp_parser_primary_expression, cp_parser_unqualified_id,
970 cp_parser_nested_name_specifier_opt, cp_parser_postfix_expression,
971 cp_parser_postfix_dot_deref_expression, cp_parser_new_expression,
972 cp_parser_direct_new_declarator, cp_parser_builtin_offsetof,
973 cp_parser_label_for_labeled_statement, cp_parser_statement_seq_opt,
974 cp_parser_jump_statement, cp_parser_block_declaration,
975 cp_parser_simple_declaration, cp_parser_decl_specifier_seq,
976 cp_parser_function_specifier_opt, cp_parser_decltype,
977 cp_parser_mem_initializer_list, cp_parser_mem_initializer,
978 cp_parser_mem_initializer_id, cp_parser_template_parameter,
979 cp_parser_type_parameter, cp_parser_template_id,
980 cp_parser_template_name, cp_parser_template_argument): Likewise.
982 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
985 * pt.c (tsubst_function_type): Remove warning for type qualifiers
986 on function return type.
988 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
991 * pt.c (tsubst_function_type): Don't warn for type qualifiers
992 on function return type in case of system header.
994 2008-07-09 Raksit Ashok <raksit@google.com>
996 * parser.c (cp_parser_postfix_expression): New warning based on flag
997 warn_disallowed_functions.
999 2008-07-08 Simon Martin <simartin@users.sourceforge.net>
1002 * decl.c (grokdeclarator): Reset storage_class and staticp for friend
1003 functions declared with a storage class qualifier.
1005 2008-07-03 Richard Guenther <rguenther@suse.de>
1008 * typeck.c (cp_build_function_call): Move code to verify
1009 builtin function arguments ...
1010 * call.c (build_cxx_call): ... here.
1012 2008-07-02 Jason Merrill <jason@redhat.com>
1014 * Make-lang.in (cp/typeck2.o): Add $(REAL_H) dependency.
1016 Implement WG21 N2672, Initializer List proposed wording
1017 * cp-tree.h (enum cp_tree_index): Add CPTI_INIT_LIST_TYPE.
1018 (struct lang_type_class): Add has_list_ctor bitfield.
1019 (TYPE_HAS_LIST_CTOR): New macro.
1020 (BRACE_ENCLOSED_INITIALIZER_P): Expect init_list_type_node.
1021 (CONSTRUCTOR_IS_DIRECT_INIT): New macro.
1022 (LOOKUP_NO_NARROWING): New macro.
1023 (LOOKUP_NO_COPY_CTOR_CONVERSION): New macro.
1024 * parser.c (cp_parse_braced_list): Split out from...
1025 (cp_parser_initializer_clause): ...here.
1026 (cp_parser_postfix_expression): Build up CONSTRUCTOR for compound
1028 (cp_lexer_next_token_is_not_keyword): New fn.
1029 (cp_parser_parenthesized_expression_list): Handle { }.
1030 (cp_parser_new_expression, cp_parser_new_initializer): Likewise.
1031 (cp_parser_assignment_expression, cp_parser_condition): Likewise.
1032 (cp_parser_jump_statement, cp_parser_simple_declaration): Likewise.
1033 (cp_parser_mem_initializer, cp_parser_init_declarator): Likewise.
1034 (cp_parser_initializer, cp_parser_functional_cast): Likewise.
1035 (cp_parser_omp_for_loop, cp_parser_cache_group): Likewise.
1036 (cp_parser_save_member_function_body): Likewise.
1037 * call.c (conversion_kind): Add ck_list, ck_aggr.
1038 (struct conversion): Add check_narrowing bitfield, conversion list.
1039 (build_list_conv): New fn.
1040 (build_aggr_conv): New fn.
1041 (implicit_conversion): Call them.
1042 (standard_conversion): Set check_narrowing if appropriate.
1043 (add_function_candidate): Handle LOOKUP_NO_COPY_CTOR_CONVERSION.
1044 (build_user_type_conversion_1): When converting from an init list,
1045 we allow additional conversions except when calling a copy ctor.
1046 (convert_like_real): Calling an explicit ctor for an init list is
1047 ill-formed. Handle ck_list and ck_addr. Check narrowing.
1048 (build_new_method_call): If CONSTRUCTOR_IS_DIRECT_INIT is set and
1049 class doesn't have a list ctor, break the {} into a TREE_LIST.
1050 (compare_ics): ck_list is better than other UDCs.
1051 (set_up_extended_ref_temp): Split out from initialize_reference.
1052 (is_std_init_list): New fn.
1053 (is_list_ctor): New fn.
1054 * decl.c (cxx_init_decl_processing): Create init_list_type_node.
1055 (reshape_init_array_1): Pass it to build_constructor.
1056 (reshape_init_class): Ditto.
1057 (initialize_artificial_var): Pass the appropriate type.
1058 (build_aggr_init_full_exprs): Split out from...
1059 (check_initializer): ...here. Handle new semantics.
1060 (build_init_list_var_init): New subroutine of check_initializer.
1061 (grokdeclarator): Converting constructors can have more than one parm.
1062 (grok_special_member_properties): Set TYPE_HAS_LIST_CTOR.
1063 * init.c (expand_default_init): Only do digest_init for aggregates.
1064 * rtti.c (tinfo_base_init): Pass init_list_type_node to
1065 build_constructor_from_list.
1066 (generic_initializer, ptr_initializer): Ditto.
1067 (ptm_initializer, class_initializer): Ditto.
1068 (get_pseudo_ti_init): Ditto.
1069 * error.c (dump_type): Handle init_list_type_node.
1070 (maybe_warn_cpp0x): New fn.
1071 (maybe_varn_variadic_templates): Call it.
1072 * cvt.c (ocp_convert): Handle conversion from { }.
1073 * tree.c (build_array_of_n_type): New fn.
1074 * typeck2.c (store_init_value): Use init_list_type_node.
1075 (digest_init): Likewise.
1076 (check_narrowing): New fn.
1077 * semantics.c: (finish_compound_literal): Take CONSTRUCTOR instead
1078 of vector of constructor elts. Handle non-aggregate types. Make
1079 constant literals static.
1080 * pt.c: (tsubst_copy_and_build): Adjust.
1081 (unify): Handle { }.
1082 * name-lookup.c (arg_assoc_type): Handle init_list_type_node.
1084 2008-07-01 Daniel Jacobowitz <dan@codesourcery.com>
1086 * typeck.c (comp_ptr_ttypes_real): Use vector_targets_convertible_p.
1087 (comp_ptr_ttypes_const): Likewise.
1089 2008-07-01 Andrew Haley <aph@redhat.com>
1091 * decl.c (finish_constructor_body): Don't set the return value of
1092 the constructor if the constructor is that of a Java type.
1094 2008-06-30 Jakub Jelinek <jakub@redhat.com>
1097 * decl2.c (is_late_template_attribute): If the first attribute
1098 argument is IDENTIFIER_NODE, don't consider it when checking
1099 if arguments are value or type dependent.
1101 2008-06-29 Paolo Carlini <paolo.carlini@oracle.com>
1104 * pt.c (do_type_instantiation): In c++0x mode do not warn for
1107 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1109 * Make-lang.in (cp-warn): Delete $(CXX_COMPAT_WARN).
1111 2008-06-28 Jakub Jelinek <jakub@redhat.com>
1114 * repo.c (repo_emit_p): Put const static data members initialized
1115 by const expr into *.rpo file, just return 2 if IDENTIFIER_REPO_CHOSEN
1118 2008-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1121 * pt.c (do_decl_instantiation): In c++0x mode do not warn for
1124 2008-06-24 Jonathan Wakely <jwakely.gcc@gmail.com>
1127 * typeck.c (cp_build_function_call): Show example syntax in
1130 2008-06-21 Jonathan Wakely <jwakely.gcc@gmail.com>
1132 * typeck.c (composite_pointer_type_r, cxx_sizeof_expr,
1133 cxx_alignof_expr, check_template_keyword, cp_build_binary_op,
1134 pointer_diff, cp_build_unary_op, build_x_compound_expr_from_list,
1135 build_reinterpret_cast_1, cp_build_c_cast, check_return_expr): Change
1136 pedwarn to permerror.
1137 * init.c (perform_member_init, build_new_1, build_new): Likewise.
1138 * decl.c (warn_extern_redeclared_static, duplicate_decls,
1139 * identify_goto, check_previous_goto_1, check_goto, define_label,
1140 check_tag_decl, start_decl, check_class_member_definition_namespace,
1141 grokfndecl, grokdeclarator): Likewise.
1142 * except.c (check_handlers): Likewise.
1143 * typeck2.c (digest_init): Likewise.
1144 * pt.c (check_specialization_namespace,
1145 check_explicit_instantiation_namespace,
1146 maybe_process_partial_specialization, check_explicit_specialization,
1147 convert_template_argument, do_decl_instantiation,
1148 do_type_instantiation, instantiate_decl): Likewise.
1149 * semantics.c (finish_template_type_parm): Likewise.
1150 * name-lookup.c (pushdecl_maybe_friend,
1151 check_for_out_of_scope_variable): Likewise.
1152 * decl2.c (finish_static_data_member_decl, build_anon_union_vars,
1153 coerce_new_type): Likewise.
1154 * parser.c (cp_parser_nested_name_specifier_opt,
1155 cp_parser_mem_initializer, cp_parser_elaborated_type_specifier,
1156 cp_parser_class_head, cp_parser_check_class_key): Likewise.
1157 (cp_parser_parameter_declaration): Check flag_permissive instead of
1158 flag_pedantic_errors.
1159 * call.c (joust): Change pedwarn to warning.
1160 * friend.c (make_friend_class): Likewise.
1162 2008-06-16 Jan Hubicka <jh@suse.cz>
1164 * method.c: Include cgraph.h.
1165 (use_thunk): Use cgraph_add_new_function instead of calling backend
1168 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1170 * parser.c: Fix comment typo.
1172 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1175 * decl2.c (grokbitfield): Receive the list of attributes, pass it to
1176 grokdeclarator and apply it to the created declaration.
1177 * cp-tree.h (grokbitfield): Update prototype.
1178 * parser.c (cp_parser_member_declaration): Don't apply the attributes
1179 since they are now applied in grokbitfield. Adjusted the call to
1181 (cp_parser_objc_class_ivars): Likewise.
1183 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1186 * class.c (type_requires_array_cookie): Do not consider delete[]
1187 operators with an ellipsis as second argument.
1189 2008-06-09 Jakub Jelinek <jakub@redhat.com>
1192 * semantics.c (stmt_expr_value_expr): Don't crash on empty
1195 2008-06-08 Paolo Carlini <paolo.carlini@oracle.com>
1198 * pt.c (maybe_process_partial_specialization): Check the tree
1199 returned by push_template_decl for error_mark_node.
1200 * parser.c (cp_parser_class_head): Likewise, check the tree
1201 returned by the latter.
1203 2008-06-07 Paolo Carlini <paolo.carlini@oracle.com>
1206 * decl.c (grokdeclarator): In case of wrong return type return
1207 immediately error_mark_node.
1209 2008-06-06 Jakub Jelinek <jakub@redhat.com>
1211 * cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
1212 dependent_omp_for_p, begin_omp_task, finish_omp_task,
1213 finish_omp_taskwait): New prototypes.
1214 (cxx_omp_clause_default_ctor): Add outer argument.
1215 (finish_omp_for): Add new clauses argument.
1216 * cp-gimplify.c (cxx_omp_finish_clause): New function.
1217 (cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
1218 (cxx_omp_clause_default_ctor): Add outer argument.
1219 (cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
1220 * cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
1221 * parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
1222 Add par_clauses argument. If decl is present in parallel's
1223 lastprivate clause, change that clause to shared and add
1224 a lastprivate clause for decl to OMP_FOR_CLAUSES.
1225 Fix wording of error messages. Adjust finish_omp_for caller.
1226 Add clauses argument. Parse loops with random access iterators.
1227 (cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
1229 (cp_parser_omp_for, cp_parser_omp_parallel): Adjust
1230 cp_parser_omp_for_loop callers.
1231 (cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
1233 (cp_parser_omp_clause_name): Handle collapse and untied
1235 (cp_parser_omp_clause_schedule): Handle auto schedule.
1236 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
1237 and PRAGMA_OMP_CLAUSE_UNTIED.
1238 (OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
1239 (OMP_TASK_CLAUSE_MASK): Define.
1240 (cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
1241 (cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
1242 (cp_parser_pragma): Handle PRAGMA_OMP_TASK and
1243 PRAGMA_OMP_TASKWAIT.
1244 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
1245 OMP_CLAUSE_UNTIED. Handle OMP_CLAUSE_LASTPRIVATE_STMT.
1246 (tsubst_omp_for_iterator): New function.
1247 (dependent_omp_for_p): New function.
1248 (tsubst_expr) <case OMP_FOR>: Use it. Handle collapsed OMP_FOR
1249 loops. Adjust finish_omp_for caller. Handle loops with random
1250 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR} changes.
1251 (tsubst_expr): Handle OMP_TASK.
1252 * semantics.c (cxx_omp_create_clause_info): New function.
1253 (finish_omp_clauses): Call it. Handle OMP_CLAUSE_UNTIED and
1254 OMP_CLAUSE_COLLAPSE.
1255 (cxx_omp_predetermined_sharing): Removed.
1256 * semantics.c (finish_omp_for): Allow pointer iterators. Use
1257 handle_omp_for_class_iterator and dependent_omp_for_p. Handle
1258 collapsed for loops. Adjust c_finish_omp_for caller. Add new
1259 clauses argument. Fix check for type dependent cond or incr.
1260 Set OMP_FOR_CLAUSES to clauses. Use cp_convert instead of
1261 fold_convert to convert incr amount to difference_type. Only
1262 fold if not in template. If decl is mentioned in lastprivate
1263 clause, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle loops with random
1264 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR}
1266 (finish_omp_threadprivate): Allow static class members of the
1268 (handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
1269 finish_omp_taskwait): New functions.
1271 * parser.c (cp_parser_binary_expression): Add prec argument.
1272 (cp_parser_assignment_expression): Adjust caller.
1273 * cp-tree.h (outer_curly_brace_block): New prototype.
1274 * decl.c (outer_curly_brace_block): No longer static.
1276 2008-06-02 Paolo Carlini <paolo.carlini@oracle.com>
1279 * pt.c (push_template_decl_real): Consistently return error_mark_node
1282 2008-06-02 Tomas Bily <tbily@suse.cz>
1284 * typeck.c (is_bitfield_expr_with_lowered_type): Use CASE_CONVERT.
1285 (cp_build_unary_op): Likewise.
1286 (cp_build_indirect_ref): Use CONVERT_EXPR_P.
1287 (maybe_warn_about_returning_address_of_local): Likewise.
1289 2008-05-29 Paolo Carlini <paolo.carlini@oracle.com>
1292 * pt.c (tsubst_initializer_list): Consistently check the tree
1293 returned by tsubst_pack_expansion for error_mark_node.
1295 2008-05-27 Michael Matz <matz@suse.de>
1298 * call.c (build_new_op): Make warning conditional on
1301 2008-05-27 Alexandre Oliva <aoliva@redhat.com>
1304 * call.c (convert_like_real): Convert bitfield to desired type
1305 before creating temporary.
1307 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
1309 * Makefile.in: Adjusted dependencies on c-incpath.o.
1311 2008-05-23 Jakub Jelinek <jakub@redhat.com>
1314 * cp-gimplify.c (cxx_omp_clause_apply_fn): Call
1315 fold_build_cleanup_point_expr on build_call_a results.
1318 * semantics.c (omp_clause_info_fndecl): New function.
1319 (finish_omp_clauses): Use it.
1321 2008-05-21 Jakub Jelinek <jakub@redhat.com>
1324 * cp-tree.h (check_array_initializer): New prototype.
1325 * decl.c (check_array_initializer): New function.
1326 (check_initializer): Call it.
1327 * semantics.c (finish_compound_literal): Call it for ARRAY_TYPEs.
1329 2008-05-21 Tom Tromey <tromey@redhat.com>
1331 * mangle.c (save_partially_mangled_name): Remove.
1332 (restore_partially_mangled_name): Likewise.
1333 (write_encoding): Update.
1334 (write_unqualified_name): Likewise.
1335 (start_mangling): Always use name_obstack. Remove 'ident_p'
1337 (get_identifier_nocopy): Remove.
1338 (finish_mangling_internal): Rename from finish_mangling.
1339 (finish_mangling): New function.
1340 (finish_mangling_get_identifier): Likewise.
1341 (partially_mangled_name, partially_mangled_name_len): Remove.
1342 (mangle_decl_string): Change return type. Update.
1343 (mangle_decl, mangle_type_string, mangle_special_for_type,
1344 mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
1345 mangle_ref_init_variable): Update.
1347 2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
1350 * semantics.c (begin_class_definition): Extend checks on the first
1353 2008-05-12 Tomas Bily <tbily@suse.cz>
1355 * typeck2.c (digest_init): Use CONVERT_EXPR_P.
1356 * call.c (build_over_call): Likewise.
1357 * error.c (dump_expr): Use CASE_CONVERT.
1358 * class.c (fixed_type_or_null): Likewise.
1360 2008-05-11 Volker Reichelt <v.reichelt@netcologne.de>
1362 * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
1364 (cp_parser_omp_clause_schedule): Remove superfluous "expected"
1367 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
1369 * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
1370 DECL_LOOPING_CONST_OR_PURE_P attributes.
1371 * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
1374 2008-05-02 Simon Baldwin <simonb@google.com>
1377 * typeck.c (build_array_ref): Remove warn_array_subscript_range.
1379 2008-05-01 Simon Baldwin <simonb@google.com>
1381 * typeck.c (build_array_ref): Call warn_array_subscript_range.
1383 2008-04-30 Jakub Jelinek <jakub@redhat.com>
1386 * pt.c (more_specialized_fn): Stop the loop even if there are no
1387 arguments before ellipsis.
1389 2008-04-29 Jakub Jelinek <jakub@redhat.com>
1392 * parser.c (cp_parser_lookup_name): Look through single function
1396 * typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
1397 COMPOUND_EXPR if the second argument would be error_mark_node.
1399 2008-04-28 Jason Merrill <jason@redhat.com>
1400 Liu Guanwei <liu_gw@163.com>
1403 * parser.c (cp_parser_parameter_declaration): Handle < ambiguity
1404 in default arguments.
1406 2008-04-25 Jan Hubicka <jh@suse.cz>
1408 * typeck.c (check_return_expr): Update.
1409 * decl.c (start_preparsed_function): Update.
1410 * method.c (use_thunk): Update.
1412 2008-04-24 Jakub Jelinek <jakub@redhat.com>
1415 * cp-tree.h (cp_reconstruct_complex_type): New prototype.
1416 * cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
1417 * decl2.c (is_late_template_attribute): Only make vector_size
1418 late tmpl attribute if argument is type or value dependent.
1419 (cp_reconstruct_complex_type): New function.
1421 2008-04-24 Richard Guenther <rguenther@suse.de>
1423 * typeck.c (cp_build_function_call): Call
1424 check_builtin_function_arguments.
1426 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1428 * typeck.c (get_member_function_from_ptrfunc): Don't set TREE_INVARIANT.
1429 (build_ptrmemfunc1): Don't set TREE_INVARIANT.
1430 * init.c (build_zero_init): Don't set TREE_INVARIANT.
1431 * class.c (build_base_path): Don't set TREE_INVARIANT.
1432 (build_vtbl_ref_1): Don't set TREE_INVARIANT.
1433 (build_vtbl_initializer): Don't set TREE_INVARIANT.
1434 * decl.c (build_enumerator): Don't set TREE_INVARIANT.
1435 * rtti.c (tinfo_base_init): Don't set TREE_INVARIANT.
1436 (generic_initializer): Don't set TREE_INVARIANT.
1437 (ptr_initializer): Don't set TREE_INVARIANT.
1438 (ptm_initializer): Don't set TREE_INVARIANT.
1439 (class_initializer): Don't set TREE_INVARIANT.
1440 * typeck2.c (process_init_constructor): Don't set TREE_INVARIANT.
1441 * pt.c (push_inline_template_parms_recursive): Don't set TREE_INVARIANT.
1442 (build_template_parm_index): Don't set TREE_INVARIANT.
1443 (reduce_template_parm_level): Don't set TREE_INVARIANT.
1444 (process_template_parm): Don't set TREE_INVARIANT.
1446 2008-04-22 Jason Merrill <jason@redhat.com>
1449 * semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
1450 to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
1451 * typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
1453 2008-04-22 Jakub Jelinek <jakub@redhat.com>
1456 * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
1457 expression is errorneous.
1459 2008-04-21 Jason Merrill <jason@redhat.com>
1462 * tree.c (cp_tree_equal): Handle FIXED_CST.
1465 * pt.c (template_template_parm_bindings_ok_p): Set
1466 processing_template_decl while in this function.
1468 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
1470 * cvt.c (type_promotes_to): Support char16_t and char32_t.
1471 * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
1472 char16_t and char32_t.
1473 * lex.c (reswords): Add char16_t and char32_t (for c++0x).
1474 * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
1475 extended builtin type "u8char{16,32}_t".
1476 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
1478 (cp_lexer_print_token): Support CPP_STRING{16,32}.
1479 (cp_parser_is_string_literal): Idem.
1480 (cp_parser_string_literal): Idem.
1481 (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
1483 (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}.
1484 * tree.c (char_type_p): Support char16_t and char32_t as char types.
1485 * typeck.c (string_conv_p): Support char16_t and char32_t.
1487 2008-04-17 Jason Merrill <jason@redhat.com>
1490 * call.c (build_user_type_conversion_1): Represent second step of
1491 copy-init with an rvalue conversion.
1492 (convert_like_real) [ck_user]: Don't implicitly add it here.
1494 2008-04-15 Jakub Jelinek <jakub@redhat.com>
1497 * decl.c (layout_var_decl): If extern or static var has variable
1498 size, set TREE_TYPE (decl) to error_mark_node.
1500 2008-04-16 Danny Smith <dannysmith@users.sourceforge.net>
1503 * optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
1506 2008-04-09 Jason Merrill <jason@redhat.com>
1509 * semantics.c (finish_compound_literal): Return a TARGET_EXPR,
1510 not a pushed variable.
1512 2008-04-09 Volker Reichelt <v.reichelt@netcologne.de>
1514 * call.c (build_op_delete_call): Fix quotation in warning message.
1515 * decl.c (grokdeclarator): Quote keyword in error message.
1516 * pt.c (check_for_bare_parameter_packs): Fix quotation in error
1519 * parser.c (cp_parser_check_type_definition): Print error string
1520 directly rather than using "%s".
1521 (cp_parser_postfix_expression): Fix quotation.
1522 (cp_parser_decltype): Likewise.
1523 (cp_parser_sizeof_operand): Fix quotation. Simplify.
1525 * parser.c (cp_parser_non_integral_constant_expression): Build error
1526 message with CONCAT rather than using "%s".
1527 (cp_parser_primary_expression): Fix quotation.
1528 (cp_parser_postfix_expression): Likewise.
1529 (cp_parser_postfix_dot_deref_expression): Likewise.
1530 (cp_parser_unary_expression): Likewise.
1531 (cp_parser_new_expression): Likewise.
1532 (cp_parser_delete_expression): Likewise.
1534 * parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
1535 as `)', not as `('. Fix quotation.
1536 (cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
1537 (cp_parser_primary_expression): Likewise.
1538 (cp_parser_nested_name_specifier_opt): Likewise.
1539 (cp_parser_postfix_expression): Likewise.
1540 (cp_parser_postfix_open_square_expression): Likewise.
1541 (cp_parser_parenthesized_expression_list): Likewise.
1542 (cp_parser_pseudo_destructor_name): Likewise.
1543 (cp_parser_new_expression): Likewise.
1544 (cp_parser_direct_new_declarator): Likewise.
1545 (cp_parser_delete_expression): Likewise.
1546 (cp_parser_cast_expression): Likewise.
1547 (cp_parser_question_colon_clause): Likewise.
1548 (cp_parser_builtin_offsetof): Likewise.
1549 (cp_parser_trait_expr): Likewise.
1550 (cp_parser_label_for_labeled_statement): Likewise.
1551 (cp_parser_compound_statement): Likewise.
1552 (cp_parser_selection_statement): Likewise.
1553 (cp_parser_condition): Likewise.
1554 (cp_parser_iteration_statement): Likewise.
1555 (cp_parser_already_scoped_statement): Likewise.
1556 (cp_parser_simple_declaration): Likewise.
1557 (cp_parser_linkage_specification): Likewise.
1558 (cp_parser_static_assert): Likewise.
1559 (cp_parser_decltype): Likewise.
1560 (cp_parser_conversion_function_id): Likewise.
1561 (cp_parser_operator_function_id): Likewise.
1562 (cp_parser_operator): Likewise.
1563 (cp_parser_type_parameter): Likewise.
1564 (cp_parser_template_id): Likewise.
1565 (cp_parser_explicit_instantiation): Likewise.
1566 (cp_parser_explicit_specialization): Likewise.
1567 (cp_parser_enum_specifier): Likewise.
1568 (cp_parser_namespace_definition): Likewise.
1569 (cp_parser_namespace_alias_definition): Likewise.
1570 (cp_parser_using_declaration): Likewise.
1571 (cp_parser_using_directive): Likewise.
1572 (cp_parser_asm_definition): Likewise.
1573 (cp_parser_direct_declarator): Likewise.
1574 (cp_parser_ptr_operator): Likewise.
1575 (cp_parser_parameter_declaration_clause): Likewise.
1576 (cp_parser_initializer_clause): Likewise.
1577 (cp_parser_class_specifier): Likewise.
1578 (cp_parser_member_specification_opt): Likewise.
1579 (cp_parser_member_declaration): Likewise.
1580 (cp_parser_pure_specifier): Likewise.
1581 (cp_parser_constant_initializer): Likewise.
1582 (cp_parser_base_clause): Likewise.
1583 (cp_parser_exception_specification_opt): Likewise.
1584 (cp_parser_try_block): Likewise.
1585 (cp_parser_function_try_block): Likewise.
1586 (cp_parser_handler): Likewise.
1587 (cp_parser_throw_expression): Likewise.
1588 (cp_parser_asm_operand_list): Likewise.
1589 (cp_parser_attributes_opt): Likewise.
1590 (cp_parser_label_declaration): Likewise.
1591 (cp_parser_constructor_declarator_p): Likewise.
1592 (cp_parser_template_declaration_after_export): Likewise.
1593 (cp_parser_single_declaration): Likewise.
1594 (cp_parser_objc_message_expression): Likewise.
1595 (cp_parser_objc_message_args): Likewise.
1596 (cp_parser_objc_encode_expression): Likewise.
1597 (cp_parser_objc_defs_expression): Likewise.
1598 (cp_parser_objc_protocol_expression): Likewise.
1599 (cp_parser_objc_selector_expression): Likewise.
1600 (cp_parser_objc_protocol_refs_opt): Likewise.
1601 (cp_parser_objc_typename): Likewise.
1602 (cp_parser_objc_method_keyword_params): Likewise.
1603 (cp_parser_objc_superclass_or_category): Likewise.
1604 (cp_parser_objc_try_catch_finally_statement): Likewise.
1605 (cp_parser_objc_synchronized_statement): Likewise.
1606 (cp_parser_objc_throw_statement): Likewise.
1607 (cp_parser_omp_var_list_no_open): Likewise.
1608 (cp_parser_omp_clause_default): Likewise.
1609 (cp_parser_omp_clause_if): Likewise.
1610 (cp_parser_omp_clause_num_threads): Likewise.
1611 (cp_parser_omp_clause_reduction): Likewise.
1612 (cp_parser_omp_clause_schedule): Likewise.
1613 (cp_parser_omp_critical): Likewise.
1614 (cp_parser_omp_for_loop): Likewise.
1615 (cp_parser_omp_sections_scope): Likewise.
1617 * parser.c (cp_parser_template_parameter_list): Simplify.
1619 2008-04-07 James E. Wilson <wilson@tuliptree.org>
1621 * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
1623 2008-04-07 Jason Merrill <jason@redhat.com>
1626 * class.c (type_has_user_nondefault_constructor): A template
1627 counts as a nondefault constructor.
1629 2008-04-04 Paolo Bonzini <bonzini@gnu.org>
1631 * decl.c (cxx_push_function_context): Delete.
1632 (cxx_pop_function_context): Delete.
1633 (start_preparsed_function): Merge cxx_push_function_context (!f->decl
1635 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_INIT,
1636 LANG_HOOKS_FUNCTION_FINAL): Delete.
1637 (LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): Rename to
1638 LANG_HOOKS_MISSING_NORETURN_OK_P.
1639 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context):
1641 * semantics.c (current_stmt_tree): Fix comment.
1643 2008-04-03 Jakub Jelinek <jakub@redhat.com>
1646 * semantics.c (finish_offsetof): Undo effect of convert_from_reference
1647 before calling fold_offsetof.
1649 2008-04-03 Tom Tromey <tromey@redhat.com>
1651 * Make-lang.in (c++_OBJS): New variable.
1653 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1655 * optimize.c (clone_body): New, from tree-inline.c.
1657 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1659 * method.c (synthesize_method): Use {push,pop}_function_context.
1660 * name-lookup.c (push_to_top_level): Likewise.
1661 * parser.c (cp_parser_late_parsing_for_member): Likewise.
1663 2008-03-30 Volker Reichelt <v.reichelt@netcologne.de>
1666 * parser.c (cp_parser_decl_specifier_seq): Add location to error
1669 2008-03-27 Tom Tromey <tromey@redhat.com>
1671 * Make-lang.in: Revert automatic dependency patch.
1673 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
1676 * typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
1677 (build_compound_expr): New, for compatibility with C
1678 build_compound_expr.
1679 (cp_build_compound_expr): Renamed from build_compound_expr.
1680 (build_c_cast): New, for compatibility with C build_c_cast.
1681 (cp_build_c_cast): Renamed from build_c_cast.
1682 * init.c (build_vec_delete_1): Fix calls to build_compound_expr.
1683 * decl.c (cxx_maybe_build_cleanup): Ditto.
1684 * cp-tree.h (build_compound_expr): Add C-compatibile prototype.
1685 (cp_build_compound_expr): Renamed from build_compound_expr.
1686 (build_c_cast): Add C-compatible prototype.
1687 (cp_build_c_cast): Renamed from build_c_cast.
1688 * typeck2.c (build_functional_cast): Use cp_build_c_cast.
1689 * parser.c (cp_parser_cast_expression): Fix call to build_c_cast.
1691 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
1693 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Cope with
1694 tsubst_pack_expansion returning a pack expansion, or a TREE_VEC
1695 ending in a pack expansion, both of which can occur when
1696 substituting into a nested template.
1697 (tsubst_copy_and_build) <case SIZEOF_EXPR>: When we're
1698 instantiating the sizeof...(X) form, make tsubst_copy do the work.
1699 * parser.c (cp_parser_template_parameter): Deal with unnamed
1700 non-type template parameter packs identified by pack expansions in
1703 2008-03-26 Jakub Jelinek <jakub@redhat.com>
1706 * pt.c (apply_late_template_attributes): Don't call tsubst on
1707 first attribute argument if it is IDENTIFIER_NODE.
1710 * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
1711 and LTGT_EXPR to pp_expression.
1713 2008-03-26 Douglas Gregor <doug.gregor@gmail.com>
1715 * pt.c (coerce_template_template_parm): Moved the body of the loop
1716 of coerce_template_template_parms here, to make iteration over a
1717 template argument pack simpler.
1718 Also, allow matching of a template parameter pack in the template
1719 template parameter to a template parameter in the template
1721 (coerce_template_template_parms): Deal with variadic template
1722 template parameters. Use coerce_template_template_parm.
1723 (unify): Make sure we coerce the template template argument's
1724 template arguments to the template template parameter's template
1725 parameters, not the other way around.
1727 2008-03-25 Tom Tromey <tromey@redhat.com>
1729 * Make-lang.in: Remove .o targets.
1730 (cp/g++spec.o): Moved to cp/. Reduce to variable setting.
1732 (c++_OBJS): New variable.
1733 (CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
1735 2008-03-25 Douglas Gregor <doug.gregor@gmail.com>
1737 * typeck.c (composite_pointer_type_r): Add SFINAE support.
1738 (composite_pointer_type): Ditto.
1739 (common_type): Fix call to composite_pointer_type.
1740 (cxx_sizeof_nowarn): New; used to be a macro.
1741 (cxx_sizeof_expr): Add SFINAE support.
1742 (cxx_alignof_expr): Ditto.
1743 (decay_conversion): Fix calls for SFINAE support.
1744 (rationalize_conditional_expr): Add SFINAE support.
1745 (build_class_member_access_expr): Ditto.
1746 (finish_class_member_access_expr): Ditto.
1747 (build_x_indirect_ref): Ditto.
1748 (build_indirect_ref): Original version renamed to
1749 cp_build_indirect_ref; new version provides a bridge from
1751 (cp_build_indirect_ref): Was build_indirect_ref; added SFINAE
1753 (get_member_function_from_ptrfunc): Fix calls for SFINAE support.
1754 (build_function_call): Original version renamed to
1755 cp_build_function_call; new version provides a bridge from
1757 (cp_build_function_call): Was build_function_call; added SFINAE
1759 (convert_arguments): Add SFINAE support.
1760 (build_x_binary_op): Ditto.
1761 (build_binary_op): Original version renamed to cp_build_binary_op;
1762 new version provides a bridge from c-common.
1763 (cp_build_binary_op): Was build_binary_op; added SFINAE support.
1764 (pointer_diff): Fix calls for SFINAE.
1765 (build_x_unary_op): Add SFINAE support.
1766 (condition_conversion): Fix calls for SFINAE.
1767 (build_unary_op): Original version renamed to cp_build_unary_op;
1768 new version provides a bridge from c-common.
1769 (cp_build_unary_op): Was build_unary_op; added SFINAE support.
1770 (unary_complex_lvalue): Fix calls for SFINAE.
1771 (build_x_conditional_expr): Add SFINAE support.
1772 (build_x_compound_expr_from_list): Fix calls for SFINAE.
1773 (build_x_compound_expr): Add SFINAE support.
1774 (convert_ptrmem): Fix calls for SFINAE.
1775 (build_static_cast_1): Add SFINAE support.
1776 (build_static_cast): Ditto.
1777 (build_reinterpret_cast_1): Ditto.
1778 (build_reinterpret_cast): Ditto.
1779 (build_const_cast_1): Ditto.
1780 (build_const_cast): Ditto.
1781 (build_c_cast): Ditto.
1782 (build_modify_expr): Original version renamed to
1783 cp_build_modify_expr; new version provides a bridge from c-common.
1784 (cp_build_modify_expr): Was build_modify_expr; added SFINAE
1786 (build_x_modify_expr): Add SFINAE support.
1787 (build_ptrmemfunc): Fix calls for SFINAE.
1788 (convert_for_assignment): Add SFINAE support.
1789 (convert_for_initialization): Ditto.
1790 (check_return_expr): Fix calls for SFINAE.
1791 (lvalue_or_else): Add SFINAE support.
1792 * init.c (perform_member_init): Fix calls for SFINAE.
1793 (emit_mem_initializers): Ditto.
1794 (expand_virtual_init): Ditto.
1795 (expand_cleanup_for_base): Ditto.
1796 (build_aggr_init): Add SFINAE support.
1797 (expand_default_init): Ditto.
1798 (expand_aggr_init_1): Fix calls for SFINAE.
1799 (build_offset_ref): Ditto.
1800 (build_new_1): Add SFINAE support.
1802 (build_vec_delete_1): Fix calls for SFINAE.
1803 (get_temp_regvar): Ditto.
1804 (build_vec_init): Add SFINAE support.
1805 (build_dtor_call): Fix calls for SFINAE.
1806 (build_delete): Ditto.
1807 (push_base_cleanups): Ditto.
1808 (build_vec_delete_1): Ditto.
1809 * class.c (build_base_path): Fix calls for SFINAE.
1810 (build_simple_base_path): Ditto.
1811 (convert_to_base_statically): Ditto.
1812 (build_vfn_ref): Ditto.
1813 (resolve_address_of_overloaded_function): Ditto.
1814 * decl.c (check_initializer): Fix calls for SFINAE.
1815 (register_dtor_fn): Ditto.
1816 (compute_array_index_type): Ditto.
1817 (finish_enum): Ditto.
1818 (start_preparsed_function): Ditto.
1819 (cxx_maybe_build_cleanup): Ditto.
1820 * call.c (convert_like): Add COMPLAIN argument.
1821 (convert_like_with_context): Ditto.
1822 (build_this): Fix calls for SFINAE.
1823 (build_user_type_conversion): Ditto.
1824 (resolve_args): Ditto.
1825 (build_new_function_call): Add SFINAE support.
1826 (build_operator_new_call): Fix calls for SFINAE.
1827 (build_object_call): Add SFINAE support.
1828 (build_conditional_expr): Ditto.
1829 (build_new_op): Ditto.
1830 (build_op_delete_call): Fix calls for SFINAE.
1831 (build_temp): Ditto.
1832 (convert_like_real): Add SFINAE support.
1833 (build_x_va_arg): Fix calls for SFINAE.
1834 (convert_default_arg): Ditto.
1835 (build_over_call): Add SFINAE support.
1836 (build_java_interface_fn_ref): Fix calls for SFINAE.
1837 (build_special_member_call): Add SFINAE support.
1838 (build_new_method_call): Ditto.
1839 (perform_implicit_conversion): Ditto.
1840 (perform_direct_initialization_if_possible): Ditto.
1841 (initialize_reference): Fix calls for SFINAE.
1842 * method.c (do_build_assign_ref): Fix calls for SFINAE.
1843 * rtti.c (build_headof): Fix calls for SFINAE.
1844 (get_tinfo_decl_dynamic): Ditto.
1845 (get_typeid): Ditto.
1846 (build_dynamic_cast_1): Add SFINAE support.
1847 (build_dynamic_cast): Ditto.
1848 (tinfo_base_init): Fix calls for SFINAE.
1849 * except.c (do_get_exception_ptr): Fix calls for SFINAE.
1850 (do_end_catch): Ditto.
1851 (initialize_handler_parm): Ditto.
1852 (expand_start_catch_block): Ditto.
1853 (do_allocate_exception): Ditto.
1854 (do_free_exception): Ditto.
1855 (build_throw): Ditto.
1856 * cvt.c (build_up_reference): Fix calls for SFINAE.
1857 (convert_to_reference): Ditto.
1858 (ocp_convert): Ditto.
1859 (convert_to_void): Add SFINAE support.
1860 * tree.c (build_dummy_object): Fix calls for SFINAE.
1861 (stabilize_expr): Ditto.
1862 * cp-tree.h (build_conditional_expr): Add tsubst_flags_t
1864 (build_new_method_call): Ditto.
1865 (build_special_member_call): Ditto.
1866 (build_new_op): Ditto.
1867 (perform_implicit_conversion): Ditto.
1868 (perform_direct_initialization_if_possible): Ditto.
1869 (convert_to_void): Ditto.
1870 (build_aggr_init): Ditto.
1872 (build_vec_init): Ditto.
1873 (build_dynamic_cast): Ditto.
1874 (finish_call_expr): Ditto
1875 (cxx_sizeof_or_alignof_expr): Add COMPLAIN parameter.
1876 (cxx_sizeof_nowarn): Remove macro; add function declaration.
1877 (build_class_member_access_expr): Add tsubst_flags_t parameter.
1878 (finish_class_member_access_expr): Ditto.
1879 (build_x_indirect_ref): Ditto.
1880 (cp_build_indirect_ref): New.
1881 (cp_build_function_call): Add tsubst_flags_t parameter.
1882 (build_x_unary_op): Ditto.
1883 (cp_build_unary_op): New.
1884 (build_x_conditional_expr): Add tsubst_flags_t parameter.
1885 (build_x_compound_expr): Ditto.
1886 (build_compound_expr): Ditto.
1887 (build_static_cast): Ditto.
1888 (build_reinterpret_cast): Ditto.
1889 (build_const_cast): Ditto.
1890 (build_c_cast): Ditto.
1891 (build_x_modify_expr): Ditto.
1892 (cp_build_modify_expr): New.
1893 (convert_for_initialization): Add tsubst_flags_t parameter.
1894 (cp_build_binary_op): Remove macro; add function declaration.
1895 (invalid_nonstatic_memfn_p): Add tsubst_flags_t parameter.
1896 (lvalue_or_else): Ditto.
1897 (build_functional_cast): Ditto.
1898 * typeck2.c (digest_init): Fix calls for SFINAE.
1899 (process_init_constructor_array): Ditto.
1900 (process_init_constructor_record): Ditto.
1901 (build_x_arrow): Ditto.
1902 (build_m_component_ref): Ditto.
1903 (build_functional_cast): Add SFINAE support.
1904 * pt.c (tsubst_copy_and_build): Add (more) SFINAE support.
1905 * semantics.c (simplify_loop_decl_cond): Fix calls for SFINAE.
1906 (finish_expr_stmt): Ditto.
1907 (finish_for_expr): Ditto.
1908 (finish_asm_stmt): Ditto.
1909 (finish_non_static_data_member): Ditto.
1910 (finish_qualified_id_expr): Ditto.
1911 (finish_call_expr): Add SFINAE support.
1912 (finish_increment_expr): Fix calls for SFINAE.
1913 (finish_unary_op_expr): Ditto.
1914 (simplify_aggr_init_expr): Ditto.
1915 (finish_omp_clauses): Ditto.
1916 (finish_omp_for): Ditto.
1917 (finish_omp_barrier): Ditto.
1918 (finish_omo_flush): Ditto.
1919 * decl2.c (grok_array_decl): Fix calls or SFINAE.
1920 (build_anon_union_vars): Ditto.
1921 (get_guard_cond): Ditto.
1923 (one_static_initialization_or_destruction): Ditto.
1924 (do_static_initialization_or_destruction): Ditto.
1925 (generate_ctor_or_dtor_function): Ditto.
1926 (build_offset_ref_call_from_tree): Ditto.
1927 * parser.c (cp_parser_postfix_expression): Fix calls for SFINAE.
1928 (cp_parser_postfix_dot_deref_expression): Ditto.
1929 (cp_parser_unary_expression): Ditto.
1930 (cp_parser_new_expression): Ditto.
1931 (cp_parser_cast_expression): Ditto.
1932 (cp_parser_binary_expression): Ditto.
1933 (cp_parser_question_colon_clause): Ditto.
1934 (cp_parser_assignment_expression): Ditto.
1935 (cp_parser_expression): Ditto.
1936 (cp_parser_builtin_offsetof): Ditto.
1937 (cp_parser_template_argument): Ditto.
1938 (cp_parser_functional_cast): Ditto.
1940 2008-03-24 Tom Tromey <tromey@redhat.com>
1942 * lex.c (handle_pragma_interface): Don't copy the filename.
1943 (handle_pragma_implementation): Copy filename using xstrdup.
1945 2008-03-21 Paolo Carlini <pcarlini@suse.de>
1947 * cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
1948 (SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
1949 (IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
1950 (PROMOTES_TO_AGGR_TYPE): Remove.
1951 (CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
1952 * typeck.c (unary_complex_lvalue, build_modify_expr,
1953 convert_for_initialization): Adjust.
1954 * init.c (is_aggr_type): Remove.
1955 (is_class_type): Add.
1956 (build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
1957 build_delete): Adjust.
1958 * lex.c (make_aggr_type): Remove.
1959 (make_class_type): Add.
1960 (cxx_make_type): Adjust.
1961 * class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
1963 * decl.c (build_typename_type, make_typename_type,
1964 make_unbound_class_template, cxx_init_decl_processing,
1965 check_tag_decl, groktypename, start_decl_1, layout_var_decl,
1966 check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
1967 grok_op_properties, xref_tag, check_function_type): Adjust.
1968 * call.c (check_dtor_name, standard_conversion, implicit_conversion,
1969 add_builtin_candidate, add_builtin_candidates,
1970 build_user_type_conversion_1, convert_like_real, build_cxx_call,
1971 is_subseq, compare_ics): Adjust.
1972 * method.c (use_thunk): Adjust.
1973 * rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
1974 create_tinfo_types): Adjust.
1975 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
1976 build_up_reference, convert_to_reference, convert_from_reference,
1977 ocp_convert, build_expr_type_conversion): Adjust.
1978 * tree.c (bind_template_template_parm, error_type): Adjust.
1979 * dump.c (cp_dump_tree): Adjust.
1980 * search.c (lookup_member): Adjust.
1981 * friend.c (make_friend_class, do_friend): Adjust.
1982 * typeck2.c (store_init_value, process_init_constructor_array,
1983 process_init_constructor_record, build_x_arrow, build_m_component_ref,
1984 build_functional_cast): Adjust.
1985 * pt.c (finish_member_template_decl, process_template_parm,
1986 lookup_template_class, tsubst_function_type, tsubst,
1987 tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
1989 * semantics.c (begin_class_definition, finish_base_specifier,
1990 finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
1992 * name-lookup.c (constructor_name_p, push_overloaded_decl,
1993 do_class_using_decl, lookup_qualified_name,
1994 maybe_process_template_type_declaration): Adjust.
1995 * decl2.c (grok_array_decl, check_member_template,
1996 constrain_class_visibility): Adjust.
1997 * parser.c (cp_parser_class_name): Adjust.
1999 2008-03-18 Paolo Bonzini <bonzini@gnu.org>
2001 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
2003 2008-03-17 Jason Merrill <jason@redhat.com>
2006 * call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
2007 a temp directly to a reference as per DR391.
2009 2008-03-12 Richard Guenther <rguenther@suse.de>
2013 2008-02-04 Richard Guenther <rguenther@suse.de>
2016 * decl.c (record_builtin_java_type): Make jboolean a
2017 integer type again where its mode doesn't match that of bool.
2019 2008-01-25 Richard Guenther <rguenther@suse.de>
2022 * decl.c (record_builtin_java_type): Make __java_boolean
2024 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
2025 after TYPE_MAIN_VARIANT check.
2027 2008-03-10 Jakub Jelinek <jakub@redhat.com>
2030 * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
2034 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
2035 DECL_P in not a variable and appears more than once error messages.
2037 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
2041 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
2045 * typeck.c (structural_comptypes): Call cp_comptypes.
2046 (comptypes): New; called from the C/C++ common bits to perform
2048 (cp_comptypes): Renamed from comptypes, which is already used,
2049 with a different signature, by the C++ front end.
2050 (build_reinterpret_cast_1): Call cp_comptypes.
2051 (ptr_reasonably_similar): Ditto.
2052 * decl.c (decls_match): Ditto.
2053 * cvt.c (convert_to_reference): Ditto.
2054 * cp-tree.h (same_type_p): Ditto.
2055 (same_or_base_type_p): Ditto.
2056 (comptypes): Rename to cp_comptypes.
2057 * pt.c (canonical_type_parameter): Call cp_comptypes.
2059 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
2061 * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
2062 test for equivalence between pointer and references.
2064 2008-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2067 * class.c (finish_struct_anon): Use permerror instead of pedwarn.
2068 (check_field_decls): Likewise.
2069 (note_name_declared_in_class): Likewise.
2070 * call.c (build_new_op): Likewise.
2071 (convert_like_real): Likewise.
2072 (build_over_call): Likewise.
2073 * lex.c (unqualified_fn_lookup_error): Likewise.
2074 * parser.c (cp_parser_template_id): Likewise.
2075 * cvt.c (warn_ref_binding): Likewise.
2076 (convert_to_reference): Likewise.
2077 (ocp_convert): Likewise.
2078 (convert_to_void): Use error instead of pedwarn.
2079 * error.c (cp_cpp_error): Use pedantic_warning_kind.
2080 * decl.c (compute_array_index_type): Use constant_expression_error.
2082 2008-03-01 Douglas Gregor <doug.gregor@gmail.com>
2084 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
2085 that auto is either a storage class or a simple type specifier,
2086 depending on the dialect.
2087 (cp_parser_decl_specifier_seq): Complain about `auto' as a storage
2088 specifier in C++98 mode, error in C++0x mode (since we don't
2089 support auto as a type specifier, yet).
2090 (cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
2091 storage specifier in C++0x mode.
2092 (cp_parser_simple_type_specifier): Parse `auto' as a
2093 simple-type-specifier, but error because we don't support it yet.
2095 2008-02-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2097 * parser.c (cp_parser_nonclass_name): New.
2098 (cp_parser_pseudo_destructor_name): Use it instead of
2099 cp_parser_type_name.
2100 (cp_parser_type_name): Move code to cp_parser_nonclass_name.
2102 2008-02-29 Tom Tromey <tromey@redhat.com>
2104 * parser.c (struct cp_token) <input_file_stack_index>: Remove.
2105 (cp_lexer_get_preprocessor_token): Update.
2106 (cp_lexer_set_source_position_from_token): Don't call
2107 restore_input_file_stack.
2108 * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
2110 2008-02-28 Richard Guenther <rguenther@suse.de>
2113 2008-02-26 Richard Guenther <rguenther@suse.de>
2115 * decl.c (duplicate_decls): Remove decl from global mapping
2116 before ggc_freeing it.
2118 2008-02-27 Jakub Jelinek <jakub@redhat.com>
2121 * rtti.c: Include c-pragma.h.
2122 (push_abi_namespace, pop_abi_namespace): New functions.
2123 (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
2124 create_tinfo_types, emit_support_tinfos): Use them.
2125 * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
2127 2008-02-26 Jason Merrill <jason@redhat.com>
2130 * decl.c (grokdeclarator): Allow a typedef of an unnamed struct
2131 to name the struct for linkage purposes even if it has attributes.
2132 (start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
2134 2008-02-26 Tom Tromey <tromey@redhat.com>
2136 * parser.c (eof_token): Remove old location code.
2137 (check_empty_body): Remove test of USE_MAPPED_LOCATION.
2138 * decl2.c (generate_ctor_or_dtor_function): Remove old location
2140 (cp_write_global_declarations): Likewise.
2141 * lex.c (cxx_init): Remove old location code.
2142 (handle_pragma_implementation): Remove test of
2143 USE_MAPPED_LOCATION.
2144 * pt.c (tsubst): Remove old location code.
2145 * error.c (cp_print_error_function): Remove test of
2146 USE_MAPPED_LOCATION.
2147 * decl.c (pop_label): Remove old location code.
2148 (finish_function): Likewise.
2150 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2153 * call.c (magic_varargs_p): Remove BUILT_IN_STDARG_START.
2155 2008-02-26 Richard Guenther <rguenther@suse.de>
2157 * decl.c (duplicate_decls): Remove decl from global mapping
2158 before ggc_freeing it.
2160 2008-02-26 Paolo Carlini <pcarlini@suse.de>
2163 * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
2165 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2167 * typeck.c (build_class_member_access_expr): Add appropriate
2168 OPT_W* parameter to warning.
2169 (build_reinterpret_cast_1): Likewise.
2170 * name-lookup.c (push_overloaded_decl): Likewise.
2172 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2175 * error.c (dump_expr): Handle CONJ_EXPR.
2177 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2180 * error.c (dump_type): Handle FIXED_POINT_TYPE.
2181 (dump_expr): Handle FIXED_CST.
2183 2008-02-24 Jason Merrill <jason@redhat.com>
2185 * parser.c (cp_parser_declaration): Handle "inline namespace".
2186 (cp_parser_namespace_definition): Likewise.
2189 * name-lookup.c (arg_assoc_namespace): Look down into inline
2192 2008-02-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2194 * typeck.c (check_for_casting_away_constness): Use 1 single
2195 argument, the type of cast, to decide what diagnostics generate.
2196 (build_static_cast_1): Remove unused code. Update call to
2197 check_for_casting_away_constness.
2198 (build_reinterpret_cast_1): Update call to
2199 check_for_casting_away_constness.
2200 (build_const_cast_1): Likewise.
2202 2008-02-24 Paolo Carlini <pcarlini@suse.de>
2204 * error.c (dump_expr): Don't deal directly with NEW_EXPR (and
2205 VEC_NEW_EXPR), forward to pp_expression.
2206 * cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
2208 2008-02-24 Danny Smith <dannysmith@users.sourceforge.net>
2211 * friend.c (do_friend): Call cplus_decl_attributes earlier.
2213 2008-02-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
2216 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
2217 template decls' function decl.
2219 2008-02-22 Paolo Carlini <pcarlini@suse.de>
2223 2008-02-14 Paolo Carlini <pcarlini@suse.de>
2226 * pt.c (determine_specialization): In case of function templates,
2227 when the type of DECL does not match FN there is no match.
2229 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2232 * typeck.c (build_binary_op): Warn about floating point
2233 comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
2235 2008-02-19 Jason Merrill <jason@redhat.com>
2238 * pt.c (resolve_overloaded_unification): Set processing_template_decl
2239 while we look for possible bindings.
2241 2008-02-19 Jakub Jelinek <jakub@redhat.com>
2244 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
2248 * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
2249 vars. Afterwards ensure v is VAR_DECL.
2252 * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
2253 call cp_finish_decl.
2254 * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
2257 2008-02-15 Douglas Gregor <doug.gregor@gmail.com>
2262 * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
2263 is error_mark_node, return an error early.
2264 (find_parameter_packs_r): Pass the pointer set along to recursive
2265 calls of cp_walk_subtrees; don't try to manage the pointer set
2267 (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
2268 (make_pack_expansion): Ditto.
2269 (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
2270 a second pass through the tree with find_parameter_packs_r; that
2271 second pass no longer does anything.
2272 (push_template_decl_real): If we have an erroneous declaration,
2273 set its type to error_mark_node before returning an error.
2275 2008-02-14 Douglas Gregor <doug.gregor@gmail.com>
2278 * pt.c (tsubst_initializer_list): Deal with the use of
2279 VOID_TYPE_NODE to indicate value-initialization of the bases.
2281 2008-02-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2282 Jason Merrill <jason@redhat.com>
2286 * class.c (type_has_user_nondefault_constructor): New fn.
2287 * cp-tree.h: Declare it.
2288 * init.c (emit_mem_initializers): Use it for -W warning about
2289 missing base initializer.
2291 2008-02-14 Paolo Carlini <pcarlini@suse.de>
2294 * pt.c (determine_specialization): In case of function templates,
2295 when the type of DECL does not match FN there is no match.
2297 2008-02-13 Jakub Jelinek <jakub@redhat.com>
2298 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2301 * parser.c (cp_parser_pseudo_destructor_name): If next tokens
2302 are not identifier :: ~, return before calling cp_parser_type_name.
2304 2008-02-13 Jason Merrill <jason@redhat.com>
2306 PR c++/34962, c++/34937, c++/34939
2307 * decl2.c (is_late_template_attribute): Always defer attributes
2308 vector_size and weak.
2311 * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
2312 of enumerators, too.
2314 2008-02-12 Jason Merrill <jason@redhat.com>
2317 * call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
2318 if we're doing conversions to call a user-defined conversion function.
2320 2008-02-12 Steven Bosscher <steven@gcc.gnu.org>
2323 * semantics.c (finish_qualified_id_expr): Avoid duplicate access
2326 2008-02-12 Jakub Jelinek <jakub@redhat.com>
2329 * init.c (build_new_1): Don't create placement_expr before
2330 constructing alloc_call. Verify that the pointer is passed by
2331 value to operator new.
2333 2008-02-11 Jason Merrill <jason@redhat.com>
2336 * pt.c (tsubst): Don't look up a template typedef in an explicit
2339 2008-02-11 Douglas Gregor <doug.gregor@gmail.com>
2342 * tree.c (cp_build_qualified_type_real): When building a
2343 cv-qualified array type, build it as a unique type with
2344 build_cplus_array_type_1 and then adopt the unqualified type's
2347 2008-02-11 Paolo Carlini <pcarlini@suse.de>
2350 * decl.c (groktypename): Check grokdeclarator return.
2352 2008-02-10 Jason Merrill <jason@redhat.com>
2355 * decl2.c (cp_write_global_declarations): Don't write out static
2356 data members with DECL_IN_AGGR_P set.
2358 2008-02-08 Jason Merrill <jason@redhat.com>
2361 * tree.c (build_target_expr_with_type): Handle void initializer.
2362 (bot_manip): Remap slot before recursing.
2364 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2367 * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
2369 2008-02-06 Alexandre Oliva <aoliva@redhat.com>
2372 * tree.c: Include tree-flow.h.
2373 (build_target_expr): Check type compatibility.
2374 * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
2375 * call.c (convert_like_real): Convert bitfield to expected type.
2377 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
2381 * typeck.c (structural_comptypes): Call cp_comptypes.
2382 (comptypes): New; called from the C/C++ common bits to perform
2384 (cp_comptypes): Renamed from comptypes, which is already used,
2385 with a different signature, by the C++ front end.
2386 (build_reinterpret_cast_1): Call cp_comptypes.
2387 (ptr_reasonably_similar): Ditto.
2388 * decl.c (decls_match): Ditto.
2389 * cvt.c (convert_to_reference): Ditto.
2390 * cp-tree.h (same_type_p): Ditto.
2391 (same_or_base_type_p): Ditto.
2392 (comptypes): Rename to cp_comptypes.
2393 * pt.c (canonical_type_parameter): Call cp_comptypes.
2395 2008-02-05 Jakub Jelinek <jakub@redhat.com>
2398 * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
2399 value dependent expression.
2401 2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
2404 * decl2.c (save_template_attributes): When we're modifying the
2405 TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
2406 all of the other variants to add those same attributes. Otherwise,
2407 the main variant will be inconsistent with those other variants.
2409 2008-02-04 Richard Guenther <rguenther@suse.de>
2412 * decl.c (record_builtin_java_type): Make jboolean a
2413 integer type again where its mode doesn't match that of bool.
2415 2008-02-02 Jason Merrill <jason@redhat.com>
2416 Mark Mitchell <mark@codesourcery.com>
2419 * init.c (build_value_init_1): New function.
2420 (build_value_init): New function.
2421 * typeck2.c (build_functional_cast): Call it.
2422 * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
2424 * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
2425 TYPE_HAS_CONSTRUCTOR.
2426 * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
2427 add_implicitly_declared_members): Adjust.
2428 (check_field_decls): Adjust. Remove warnings about reference/const
2429 in class without constructor.
2430 (check_bases_and_members): Adjust. Give those warnings here instead.
2431 * decl.c (fixup_anonymous_aggr): Adjust.
2432 (check_initializer): Adjust, clarify logic slightly.
2433 (grok_special_member_properties): Adjust, only set if user-provided.
2434 * rtti.c (create_tinfo_types): Don't set.
2435 * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
2436 Use same_type_ignoring_top_level_qualifiers_p.
2437 * pt.c (check_explicit_specialization): Adjust.
2438 (instantiate_class_template): Adjust.
2440 2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
2441 Jakub Jelinek <jakub@redhat.com>
2445 * typeck.c (structural_comptypes): Handle comparisons of
2446 VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
2448 * mangle.c (write_builtin_type): Map down to the canonical type,
2449 which will be one of the predefined type nodes.
2451 2008-01-29 Michael Meissner <michael.meissner@amd.com>
2454 * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
2455 bits to allow for expansion of the number of middle end tree
2458 2008-01-29 Douglas Gregor <doug.gregor@gmail.com>
2469 * typeck.c (check_return_expr): Tweak call to
2470 check_for_bare_parameter_packs.
2471 * class.c (add_method): Be careful with error_mark_nodes.
2472 * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
2474 * pt.c (struct find_parameter_pack_data): Remove
2476 (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
2477 (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
2478 (make_pack_expansion): Ditto.
2479 (check_for_bare_parameter_packs): Parameter is now a tree, not a
2481 (process_template_parm): Tweak call to
2482 check_for_bare_parameter_packs.
2483 (push_template_decl_real): Tweak calls to
2484 check_for_bare_parameter_packs. If bare parameter packs are found
2485 in the list of exceptions, clear out that list after giving an
2487 * semantics.c (finish_cond): Tweak call to
2488 check_for_bare_parameter_packs.
2489 (finish_expr_stmt): Ditto.
2490 (finish_for_expr): Ditto.
2491 (finish_switch_cond): Ditto.
2492 (finish_mem_initializers): Ditto.
2493 (finish_member_declaration): Ditto.
2494 (finish_static_assert): Check for bare parameter packs in the
2496 * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
2497 attributes of a declaration.
2498 * parser.c (cp_parser_using_declaration): Tweak call to
2499 check_for_bare_parameter_packs.
2500 (cp_parser_base_clause): Ditto.
2502 2008-01-28 Jason Merrill <jason@redhat.com>
2505 * class.c (build_base_path): Fix !want_pointer case.
2507 2008-01-27 Jason Merrill <jason@redhat.com>
2510 * class.c (build_base_path): Fix previous change.
2512 2008-01-26 Jakub Jelinek <jakub@redhat.com>
2515 * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
2518 2008-01-26 Richard Guenther <rguenther@suse.de>
2521 * typeck.c (build_binary_op): Remove code to shorten compares.
2523 2008-01-25 Richard Guenther <rguenther@suse.de>
2526 * decl.c (record_builtin_java_type): Make __java_boolean
2528 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
2529 after TYPE_MAIN_VARIANT check.
2531 2008-01-25 Jason Merrill <jason@redhat.com>
2534 * class.c (build_base_path): Don't mess with virtual access if
2536 * call.c (standard_conversion): Don't check whether source type
2539 * decl2.c (is_late_template_attribute): Don't defer attribute
2540 visibility just because the type is dependent.
2542 2008-01-25 Jason Merrill <jason@redhat.com>
2543 Mark Mitchell <mark@codesourcery.com>
2546 * call.c (standard_conversion): Allow conversion from integer/real
2548 (compare_ics): Such a conversion is worse than a normal arithmetic
2551 2008-01-25 Richard Guenther <rguenther@suse.de>
2554 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
2557 2008-01-24 Paolo Carlini <pcarlini@suse.de>
2560 * pt.c (push_template_decl_real): Return error_mark_node in case
2561 of template definition of non-template.
2563 2008-01-24 Jason Merrill <jason@redhat.com>
2566 * decl2.c (is_late_template_attribute): Defer any attribute with
2567 dependent args. Also defer type attributes if the type is dependent.
2569 2008-01-22 Jakub Jelinek <jakub@redhat.com>
2570 Alexandre Oliva <aoliva@redhat.com>
2573 * call.c (reference_binding): For bitfields use the declared bitfield
2575 (add_builtin_candidates): Likewise.
2576 * class.c (layout_class_type): For bitfields copy over the
2577 original type quals.
2579 2008-01-22 Jason Merrill <jason@redhat.com>
2582 * decl.c (groktypename): Also ignore attributes on dependent
2583 possibly-class types.
2586 * friend.c (do_friend): Check for prior declaration of a friend
2587 function of a local class.
2588 * name-lookup.c (lookup_name_innermost_nonclass_level):
2590 * name-lookup.h: Declare it.
2592 2008-01-22 Tom Tromey <tromey@redhat.com>
2595 * init.c (build_new_1): Only disallow Java aggregates.
2597 2008-01-22 Jakub Jelinek <jakub@redhat.com>
2600 * semantics.c (finish_omp_for): Don't call c_finish_omp_for
2601 if decl or init is error_mark_node.
2604 * error.c (dump_expr): Handle VECTOR_CST.
2606 2008-01-21 Jason Merrill <jason@redhat.com>
2609 * pt.c (tsubst_aggr_type): Make sure our context is complete.
2612 * pt.c (retrieve_local_specialization): Robustify.
2613 (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
2616 * pt.c (tsubst): Only call retrieve_local_specialization if the
2617 original typedef was in a function template.
2620 * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
2622 2008-01-21 Richard Guenther <rguenther@suse.de>
2625 * error.c (cp_print_error_function): Deal with recursive
2628 2008-01-20 Paolo Carlini <pcarlini@suse.de>
2631 * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
2633 2008-01-20 Paolo Carlini <pcarlini@suse.de>
2637 * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
2638 on non-IS_AGGR_TYPE scope.
2639 (constructor_name_p): Assert IS_AGGR_TYPE.
2641 2008-01-18 Ian Lance Taylor <iant@google.com>
2644 * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
2645 (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
2646 DECL_IS_OPERATOR_NEW flag.
2648 2008-01-16 Richard Guenther <rguenther@suse.de>
2651 * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
2652 for conversions to type variants.
2654 2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
2656 * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
2657 declaration and code. Update copyright year.
2659 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2662 * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
2663 know we have a class type.
2665 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2668 * pt.c (coerce_template_parameter_pack): When substituting into
2669 the type of a non-type template parameter pack. use the
2670 deduced/substituted arguments.
2671 * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
2672 can be a parameter pack with the ellipsis following it. When we
2673 have an erroneous declaration, allow it to be a parameter pack.
2674 (cp_parser_template_parameter): Complain about default
2675 arguments on non-type template parameter packs, and parse them
2676 using the new cp_parser_default_argument.
2677 (cp_parser_parameter_declaration): Complain about parameter packs
2678 with default arguments. Move parsing of default arguments into a
2679 new function, cp_parser_default_argument.
2680 (cp_parser_default_argument): New; extracted from
2681 cp_parser_parameter_declaration.
2683 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2689 * typeck.c (check_return_expr): If there are bare parameter packs
2690 in the return value, set it to error_mark_node.
2691 * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
2692 * pt.c (find_parameter_packs_r): Look at the type of
2693 IDENTIFIER_NODEs (e.g., for user-defined conversions).
2694 (check_for_bare_parameter_packs): Flip the result: now returns
2695 TRUE when there were bare parameter packs, FALSE otherwise.
2696 (push_template_decl_real): Deal with flipped result of
2697 check_for_bare_parameter_packs.
2698 * semantics.c (finish_cond): If there are bare parameter packs in
2699 the conditional, set it to error_mark_node.
2700 (finish_expr_stmt): If there are bare parameter packs in the
2701 expression, set it to error_mark_node.
2702 (finish_for_expr): Ditto.
2703 (finish_switch_cond): If there are bare parameter packs in
2704 the conditional, set it to error_mark_node.
2705 (finish_mem_initializers): If there are bare parameter packs in
2706 the member initializer, set it to error_mark_node.
2707 (finish_member_declaration): Check the attributes of the
2708 declaration for bare parameter packs, and remove the attributes if
2709 any have bare parameter packs.
2710 * parser.c (cp_parser_using_declaration): Check the using
2711 declaration for bare parameter packs.
2712 (cp_parser_base_clause): If there are bare parameter packs in a
2713 base specifier, don't add it to the chain.
2715 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2718 * error.c (dump_simple_decl): Display ellipsis for template
2719 non-type parameter packs.
2720 (dump_decl): Display ellipsis for template type parameter packs.
2721 (dump_template_decl): Display ellipsis for template template
2723 * pt.c (redeclare_class_template): When redeclaring a class
2724 template, check for collisions between template parameters and
2725 template parameter packs.
2727 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2730 * pt.c (process_partial_specialization): Don't mark template
2731 parameters that occur in non-deduced contexts.
2732 (struct pair_fn_data): Add include_nondeduced_p.
2733 (for_each_template_parm_r): Only visit non-deduced contexts if
2734 include_nondeduced_p is set.
2735 (for_each_template_parm): Added parameter include_nondeduced_p,
2736 which states whether template parameters found in non-deduced
2737 contexts should be visited.
2738 (uses_template_parms): Visit all template parameters, even those
2739 in non-deduced contexts.
2741 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2744 * pt.c (check_default_tmpl_args): Check for parameter packs that
2745 aren't at the end of a primary template.
2746 (push_template_decl_real): Remove check for parameter packs that
2747 aren't at the end of a primary template; that now happens in
2748 check_default_tmpl_args.
2749 * semantics.c (finish_template_template_parm): Use
2750 check_default_tmpl_args to check for errors in the template
2753 2008-01-12 Doug Kwan <dougkwan@google.com>
2755 * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
2756 instead of OPT_Wreturn_type in warning due to ignored return type
2758 * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
2759 instead of OPT_Wreturn_type in warning due to ignored return type
2762 2008-01-08 Jakub Jelinek <jakub@redhat.com>
2765 * semantics.c (finish_omp_for): Don't call
2766 fold_build_cleanup_point_expr if processing_template_decl.
2768 2008-01-04 Paolo Carlini <pcarlini@suse.de>
2769 Jakub Jelinek <jakub@redhat.com>
2772 * error.c (dump_template_argument): Deal with TREE_LIST.
2774 2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
2776 * parser.c (cp_parser_check_decl_spec): Don't warn about "long
2777 long" in C++0x mode; change the warning to note that "long long"
2778 is only unsupported in C++98 mode.
2780 2007-12-20 Jason Merrill <jason@redhat.com>
2783 * call.c (standard_conversion): Derived-to-base is considered a
2784 standard conversion.
2786 2007-12-19 Jakub Jelinek <jakub@redhat.com>
2789 * parser.c (cp_parser_omp_parallel): For non-combined parallel
2790 call cp_parser_statement rather than
2791 cp_parser_already_scoped_statement.
2793 2007-12-18 Jason Merrill <jason@redhat.com>
2796 * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
2798 (dependent_type_p_r): Handle the domain of an array.
2800 2007-12-18 Douglas Gregor <doug.gregor@gmail.com>
2801 Jakub Jelinek <jakub@redhat.com>
2806 * pt.c (template_template_parm_bindings_ok_p): New; verifies
2807 bindings of template template parameters after all template
2808 arguments have been deduced.
2809 (coerce_template_parms): Don't complain when COMPLAIN doesn't
2811 (fn_type_unification): Use template_template_parm_bindings_ok_p.
2812 (unify): Deal with variadic, bound template template parameters.
2813 (get_class_bindings): Use template_template_parm_bindings_ok_p.
2815 2007-12-18 Jakub Jelinek <jakub@redhat.com>
2818 * decl.c (grokdeclarator): Reject friend sfk_constructor
2821 2007-12-17 Jakub Jelinek <jakub@redhat.com>
2824 * parser.c (cp_parser_omp_all_clauses): Accept optional comma
2827 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
2830 * cp-lang.c (cp_classify_record): New.
2831 (LANG_HOOKS_CLASSIFY_RECORD): Override.
2833 2007-12-11 Jakub Jelinek <jakub@redhat.com>
2836 * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
2839 * rtti.c (build_dynamic_cast): Call convert_from_reference even for
2840 dynamic_cast in a template.
2842 2007-12-10 Simon Martin <simartin@users.sourceforge.net>
2845 * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
2846 MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
2848 2007-12-10 Jakub Jelinek <jakub@redhat.com>
2851 * error.c (dump_type_prefix, dump_type_suffix): Handle
2852 TYPE_PACK_EXPANSION.
2855 * error.c (dump_expr): Handle ABS_EXPR.
2857 2007-12-09 Jakub Jelinek <jakub@redhat.com>
2861 * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
2862 in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2863 Return 2 also if DECL_EXPLICIT_INSTANTIATION.
2864 * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
2865 flag_use_repository and repo_emit_p returned 2.
2867 2007-12-06 Jakub Jelinek <jakub@redhat.com>
2870 * tree.c (stabilize_call, stabilize_init): Do nothing if
2871 processing_template_decl.
2873 2007-12-05 Jakub Jelinek <jakub@redhat.com>
2876 * semantics.c (finish_decltype_type): For SCOPE_REF issue an
2877 error instead of assertion failure.
2878 * parser.c (cp_parser_decltype): If closing paren is not found,
2879 return error_mark_node.
2881 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2884 * name-lookup.c (arg_assoc_template_arg): Recurse on argument
2886 (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
2887 since arg_assoc_template_arg will deal with them (better).
2889 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2892 * pt.c (tsubst_exception_specification): Handle substitutions into
2893 member templates, where tsubst_pack_expansion returns a
2894 TYPE_PACK_EXPANSION.
2896 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2899 * pt.c (unify_pack_expansion): If we didn't deduce any actual
2900 bindings for the template parameter pack, don't try to keep the
2901 empty deduced arguments.
2902 (unify): If a parameter is a template-id whose template argument
2903 list contains a pack expansion that is not at the end, then we
2904 cannot unify against that template-id.
2906 2007-12-02 Paolo Carlini <pcarlini@suse.de>
2909 * pt.c (current_template_args): Use error_operand_p.
2911 2007-12-02 Paolo Carlini <pcarlini@suse.de>
2914 * error.c (dump_decl): Handle TREE_BINFO.
2916 2007-12-01 Ollie Wild <aaw@google.com>
2919 * typeck.c (build_binary_op): Add conversion of pointers to function
2920 members appearing as operands to the equality operators.
2922 2007-11-30 Jakub Jelinek <jakub@redhat.com>
2925 * error.c (dump_expr): Handle OBJ_TYPE_REF.
2927 2007-11-29 Jakub Jelinek <jakub@redhat.com>
2930 * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
2932 * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
2937 * parser.c (cp_parser_decltype): Don't call finish_id_expression
2939 * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
2942 2007-11-27 Jakub Jelinek <jakub@redhat.com>
2944 PR tree-optimization/34181
2945 * method.c (use_thunk): Don't inline the call in the thunk.
2948 * tree.c (decl_linkage): Static data members and static member
2949 functions in anonymous ns classes are lk_external.
2951 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
2954 * decl.c (start_preparsed_function): Pass
2955 processing_template_decl for the new allocate_struct_function
2958 2007-11-25 Richard Guenther <rguenther@suse.de>
2960 * decl.c (poplevel): Use BLOCK_CHAIN.
2962 2007-11-24 Ollie Wild <aaw@google.com>
2964 * typeck.c (delta_from_ptrmemfunc): New function.
2965 (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
2966 (build_binary_op): Call delta_from_ptrmemfunc.
2968 2007-11-23 Jakub Jelinek <jakub@redhat.com>
2972 * decl.c (cp_finish_decl): Disallow variable or field
2973 definitions if extern "Java" aggregates.
2974 (grokparms): Disallow parameters with extern "Java"
2976 (check_function_type): Disallow function return values
2977 with extern "Java" aggregates.
2978 * init.c (build_new_1): Disallow placement new with
2979 extern "Java" aggregates.
2981 2007-11-23 Mark Mitchell <mark@codesourcery.com>
2982 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2985 * call.c (convert_like_real): Build a zero constant when __null is
2986 converted to an integer type.
2988 2007-11-22 Jakub Jelinek <jakub@redhat.com>
2991 * decl2.c (cp_write_global_declarations): Issue error about static
2992 data members in anonymous namespace which are declared and used,
2995 2007-11-20 Jakub Jelinek <jakub@redhat.com>
2998 * parser.c (cp_parser_class_head): Reject function template ids.
3001 * tree.c (build_cplus_array_type_1): Don't pass any VLA types
3002 when processing_template_decl to build_array_type.
3005 * pt.c (more_specialized_fn): Don't segfault if one or
3006 both argument list end with ellipsis.
3008 2007-11-18 Jakub Jelinek <jakub@redhat.com>
3011 * semantics.c (finish_call_expr): Set
3012 current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
3013 or OVERLOAD with all noreturn functions.
3015 2007-11-16 Jakub Jelinek <jakub@redhat.com>
3018 * pt.c (apply_late_template_attributes): Do nothing if decl's type is
3021 2007-11-13 Jakub Jelinek <jakub@redhat.com>
3028 * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
3029 set to error_mark_node the outermost POINTER_TYPE to the pack if
3030 it is seen in a POINTER_TYPE.
3031 (push_template_decl_real): If check_for_bare_parameter_packs
3032 fails for function return type, set the return type to
3033 integer_type_node. If check_for_bare_parameter_packs failed
3034 for non-function, return error_mark_node.
3037 * call.c (build_new_op): Call resolve_args before calling
3040 2007-11-11 Tom Tromey <tromey@redhat.com>
3043 * lex.c (handle_pragma_implementation): Use cpp_included_before.
3045 2007-11-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3048 * pt.c (redeclare_class_template): Update error message. Use a
3049 note to show the previous declaration.
3050 (tsubst_friend_class): Use the location of the friend template as
3051 the input location before calling redeclare_class_template.
3053 2007-11-11 Jakub Jelinek <jakub@redhat.com>
3056 * semantics.c (finish_pseudo_destructor_expr): Handle
3057 object == error_mark_node.
3059 2007-11-10 Jakub Jelinek <jakub@redhat.com>
3062 * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
3063 is not scalar type, let finish_class_member_access_expr handle
3064 diagnostics. Pass BIT_NOT_EXPR argument to
3065 finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
3067 2007-11-09 Douglas Gregor <doug.gregor@gmail.com>
3070 * decl.c (cp_complete_array_type): If any of the initializer
3071 elements are pack expansions, don't compute the array size yet.
3073 2007-11-08 Andrew Pinski <pinskia@gmail.com>
3076 * tree.c (decl_linkage): Fields have no linkage.
3078 2007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
3080 * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
3082 2007-11-07 Douglas Gregor <doug.gregor@gmail.com>
3087 * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
3088 Be careful with ERROR_MARK_NODEs.
3089 * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
3092 2007-11-07 Jakub Jelinek <jakub@redhat.com>
3095 * call.c (build_over_call): Don't check TREE_ADDRESSABLE
3098 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
3102 * tree.c (c_build_qualified_type): Define bridge to
3103 cp_build_qualified_type.
3105 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
3116 * typeck.c (check_return_expr): Pass address of retval to
3117 check_for_bare_parameter_packs.
3118 * class.c (build_base_field): Tolerate bases that have no layout
3120 (end_of_base): Ditto.
3121 * tree.c (canonical_type_variant): Be careful with
3123 * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
3125 * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
3126 which states whether parameter packs should be replaced with
3128 (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
3129 possible. If set_packs_to_error is set true, replace the parameter
3130 pack with ERROR_MARK_NODE. Manage our own pointer sets.
3131 (uses_parameter_packs): Don't set parameter packs to
3133 (check_for_bare_parameter_packs): Now takes a pointer to a tree,
3134 which may be modified (if it is a parameter pack). Instructs
3135 find_parameter_packs_r to replace parameter packs with
3136 ERROR_MARK_NODE (so that they won't cause errors later on).
3137 (process_template_parm): Pass pointer to
3138 check_for_bare_parameter_packs.
3139 (process_partial_specialization): Replace pack expansions before
3140 the end of the template argument list with ERROR_MARK_NODE.
3141 (push_template_decl_real): Pass pointer to
3142 check_for_bare_parameter_packs. Replace parameter packs not at the
3143 end of the template parameter list with ERROR_MARK_NODE.
3144 (convert_template_argument): Be more careful about using DECL_NAME
3145 on only declarations.
3146 (unify): Can't unify against ERROR_MARK_NODE.
3147 * semantics.c (finish_cond): Pass pointer to
3148 check_for_bare_parameter_packs.
3149 (finish_expr_stmt): Ditto.
3150 (finish_for_expr): Ditto.
3151 (finish_switch_cond): Pass pointer to
3152 check_for_bare_parameter_packs, and call it before we put the
3153 condition into the statement.
3154 (finish_mem_initializers): Pass pointer to
3155 check_for_bare_parameter_packs.
3156 (finish_member_declaration): Ditto.
3157 * parser.c (cp_parser_base_clause): Ditto.
3159 2007-11-06 Jakub Jelinek <jakub@redhat.com>
3162 * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
3163 with the final TREE_READONLY flag in place. processing_template_decl
3164 is known to be 0 in this part of function.
3167 * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
3168 OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
3169 * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
3170 * semantics.c (finish_omp_atomic): Revert most of the
3171 2007-02-05 changes, just keep the new representation of
3172 OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
3174 2007-11-05 H.J. Lu <hongjiu.lu@intel.com>
3177 * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
3180 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
3185 * typeck.c (merge_types): Don't lose rvalue references when
3187 * call.c (build_over_call): Don't elide move constructors just
3188 because the copy constructor is trivial (!).
3189 (compare_ics): If comparing cv-qualifiers fails, we can still order
3190 based on binding lvalues vs. rvalues.
3192 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
3195 * pt.c (unify_pack_expansion): bring handling of function call
3196 arguments into line with type_unification_real.
3198 2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3200 * typeck.c (build_binary_op): Use pedwarn instead of error for
3203 2007-11-05 Jakub Jelinek <jakub@redhat.com>
3206 * parser.c (cp_parser_unary_expression): For &&label call
3207 cp_parser_non_integral_constant_expression and return error_mark_node
3208 if it returned true.
3211 * decl.c (grokdeclarator): Don't call build_memfn_type if type
3212 is neither FUNCTION_TYPE nor METHOD_TYPE.
3214 2007-11-02 Jakub Jelinek <jakub@redhat.com>
3217 * parser.c (cp_parser_nested_name_specifier_opt): Use
3218 TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
3219 typedef of currently open class.
3221 2007-11-02 Paolo Carlini <pcarlini@suse.de>
3224 * error.c (dump_expr): Deal specially with statements.
3226 2007-11-01 Jason Merrill <jason@redhat.com>
3229 * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
3231 (lookup_template_class): Use it to get the outer template args
3232 for instantiating one.
3235 * pt.c (reduce_template_parm_level): tsubst the parameters
3236 of a template template parm.
3238 2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
3241 * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
3243 2007-11-01 Jakub Jelinek <jakub@redhat.com>
3246 * parser.c (cp_parser_postfix_dot_deref_expression): If
3247 POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
3248 first and if that succeeds and type is SCALAR_TYPE_P, create
3252 * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
3253 (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
3254 as for std::type_info.
3256 2007-10-31 Paolo Carlini <pcarlini@suse.de>
3259 * cxx-pretty-print.c (pp_cxx_typeid_expression,
3260 pp_cxx_delete_expression): Change to static linkage.
3261 * cxx-pretty-print.h: Adjust declarations.
3262 * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
3263 MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
3264 MODOP_EXPR): Forward to pp_expression.
3266 * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
3269 2007-10-31 Christian Bruel <christian.bruel@st.com>
3270 Mark Mitchell <mark@codesourcery.com>
3273 * typeck.c (check_return_expr): Don't set named_return_value_okay_p
3274 if retval is volatile.
3276 2007-10-30 Jakub Jelinek <jakub@redhat.com>
3279 * decl2.c (build_offset_ref_call_from_tree): Call
3280 build_non_dependent_expr on object prior to building ADDR_EXPR from it
3281 if FN is DOTSTAR_EXPR.
3283 2007-10-30 Douglas Gregor <doug.gregor@gmail.com>
3287 * pt.c (find_parameter_packs_r): Fix typo in comment.
3288 (convert_template_argument): Look at the pattern of a pack
3289 expansion to determine what kind of entity we're converting.
3290 (coerce_template_parameter_pack): When we have coerced a non-type
3291 template parameter pack, substitute into the type of that pack.
3292 (tsubst_pack_expansion): When our substitution of a parameter pack
3293 is a "trivial" substitution of itself, just substitute into the
3294 pack expansion rather than actually expanding.
3296 2007-10-29 Jakub Jelinek <jakub@redhat.com>
3299 * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
3300 for non-integral type bitfields. Return true if bitfield is correct, false
3301 error has been diagnosed.
3302 (check_field_decls): If check_bitfield_decl returned false, call also
3305 2007-10-28 Paolo Carlini <pcarlini@suse.de>
3306 Mark Mitchell <mark@codesourcery.com>
3309 * pt.c (do_decl_instantiation): If the VAR_DECL is not a
3310 class member error out and return.
3312 2007-10-27 Jakub Jelinek <jakub@redhat.com>
3314 * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
3315 to current_function_decl rather than 0.
3318 * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
3320 * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
3322 2007-10-27 Jason Merrill <jason@redhat.com>
3325 * call.c (convert_default_arg): Detect recursion.
3327 2007-10-27 Jakub Jelinek <jakub@redhat.com>
3330 * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
3331 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
3333 (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
3335 * error.c (dump_expr): Handle OFFSETOF_EXPR.
3337 2007-10-26 Jason Merrill <jason@redhat.com>
3340 * pt.c (get_template_info): New fn.
3341 (template_class_depth): Use it.
3342 (push_template_decl_real): Check that the template args of the
3343 definition match the args of the previous declaration.
3345 2007-10-26 Paolo Carlini <pcarlini@suse.de>
3348 * decl2.c (coerce_new_type): Do not allow a default argument for
3349 the first parameter.
3351 2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
3354 * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
3355 don't see the leading '('. Only lookup names if we get an
3358 2007-10-26 Jakub Jelinek <jakub@redhat.com>
3361 * parser.c (cp_parser_parenthesized_expression_list): Set
3362 greater_than_is_operator_p to true in between the parens.
3364 2007-10-26 Paolo Carlini <pcarlini@suse.de>
3367 * decl.c (grokdeclarator): In case of conflicting specifiers
3368 just return error_mark_node.
3370 2007-10-26 Ollie Wild <aaw@google.com>
3372 * expr.c (cxx_expand_expr): Removed.
3373 * cp-tree.h (exx_expand_expr): Removed.
3374 * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
3377 2007-10-25 Paolo Carlini <pcarlini@suse.de>
3380 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
3382 2007-10-23 Jason Merrill <jason@redhat.com>
3384 PR c++/25950 (DR 391)
3385 * call.c (struct conversion): Remove check_copy_constructor_p.
3386 (reference_binding): Always bind a reference directly to a
3387 compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during
3389 (check_constructor_callable): Remove.
3390 (convert_like_real): Don't call it.
3391 (initialize_reference): Don't call check_constructor_callable.
3392 (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
3393 LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base
3394 conversions if LOOKUP_NO_TEMP_BIND.
3395 (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
3396 (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
3398 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
3400 2007-10-22 Jakub Jelinek <jakub@redhat.com>
3403 * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
3404 before checking if its type is integral.
3406 2007-10-22 Jason Merrill <jason@redhat.com>
3409 * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
3410 * pt.c (apply_late_template_attributes): Splice out dependent
3411 attributes from DECL_ATTRIBUTES.
3413 * decl.c (cxx_maybe_build_cleanup): Use build_address.
3415 2007-10-17 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3417 * typeck.c (build_binary_op) : Use appropriate warning option
3418 instead of unnamed warning.
3420 2007-10-16 Paolo Carlini <pcarlini@suse.de>
3423 * pt.c (current_template_args): Do not change TREE_LIST elements
3424 with a TREE_VALUE of error_mark_node.
3426 2007-10-16 Mark Mitchell <mark@codesourcery.com>
3428 * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
3429 * decl.c (start_decl): Tidy.
3430 (start_decl_1): Call cp_apply_type_quals_to_decl after completing
3432 (grokdeclarator): Clarify comment.
3434 2007-10-14 Andrew Pinski <pinskia@gmail.com>
3437 * decl.c (grokfndecl): Return NULL after the "definition of
3438 implicitly-declared" error happened.
3440 2007-10-12 Simon Martin <simartin@users.sourceforge.net>
3443 * call.c (build_user_type_conversion_1): Do not consider conversion
3444 functions to convert a (possibly cv-qualified) object to the (possibly
3445 cv-qualified) same object type (or a reference to it), to a (possibly
3446 cv-qualified) base class of that type (or a reference to it).
3448 2007-10-12 Paolo Carlini <pcarlini@suse.de>
3450 * pt.c (tsubst): Use template_parm_level_and_index.
3452 2007-10-12 Jakub Jelinek <jakub@redhat.com>
3455 * parser.c (cp_parser_compound_statement): Handle label-declarations
3456 at the beginning of the compound statement.
3457 (cp_parser_block_declaration): Issue diagnostics about __label__
3458 not at the beginning of a block.
3460 2007-10-11 Paolo Carlini <pcarlini@suse.de>
3463 * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
3464 to convert_template_argument.
3465 (coerce_template_parms): Return error_mark_node after fixed-length
3467 (tsubst_decl): Check for error_mark_node the return value of the
3468 first tsubst in 'case VAR_DECL'.
3470 2007-10-08 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-10-04 Jason Merrill <jason@redhat.com>
3480 * call.c (initialize_reference): Handle local static reference
3483 2007-10-03 Jason Merrill <jason@redhat.com>
3486 * name-lookup.c (push_namespace_with_attrs): Fold back into...
3487 (push_namespace): Here.
3488 (handle_namespace_attrs): New fn for the attr code.
3489 (leave_scope): Don't pop_visibility.
3490 * name-lookup.h (struct cp_binding_level): Remove has_visibility.
3491 * parser.c (cp_parser_namespace_definition): Call
3492 handle_namespace_attrs and pop_visibility as appropriate.
3495 * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
3497 2007-10-03 Alexandre Oliva <aoliva@redhat.com>
3499 * decl.c (duplicate_decls): Preserve linkage flags for mere
3500 redeclarations of gnu_inline definitions.
3502 2007-10-03 Jason Merrill <jason@redhat.com>
3505 * decl.c (wrap_cleanups_r): New fn.
3506 (wrap_temporary_cleanups): New fn.
3507 (initialize_local_var): Call it.
3509 2007-09-29 Jason Merrill <jason@redhat.com>
3512 * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
3513 constant to not have DECL_EXTERNAL if it's file-local.
3515 2007-09-28 Ollie Wild <aaw@google.com>
3518 2007-09-27 Ollie Wild <aaw@google.com>
3520 * typeck2.c (digest_init): Call cplus_expand_constant after
3521 convert_for_initialization.
3522 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
3523 * expr.c (cplus_expand_constant): Updated function description.
3525 2007-09-28 Jason Merrill <jason@redhat.com>
3528 * class.c (layout_empty_base): Take rli parameter, update
3529 rli->record_align if empty base has user-specified alignment.
3530 (build_base_field): Pass rli to it.
3532 2007-09-28 Paolo Carlini <pcarlini@suse.de>
3535 * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
3537 2007-09-28 Paolo Carlini <pcarlini@suse.de>
3540 * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
3541 (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
3542 (dump_parameters): Just call dump_type for argument packs too.
3544 2007-09-28 Jakub Jelinek <jakub@redhat.com>
3547 * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
3548 qualification by creating qualified PACK_EXPANSION_PATTERN and
3549 then calling make_pack_expansion on it.
3551 2007-09-27 Ollie Wild <aaw@google.com>
3553 * typeck2.c (digest_init): Call cplus_expand_constant after
3554 convert_for_initialization.
3555 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
3556 * expr.c (cplus_expand_constant): Updated function description.
3558 2007-09-27 Jason Merrill <jason@redhat.com>
3561 * decl2.c (is_late_template_attribute): Don't crash on unknown
3564 2007-09-27 Paolo Carlini <pcarlini@suse.de>
3567 * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
3568 * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
3569 spaces in the formatting.
3570 * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
3572 2007-09-27 Jakub Jelinek <jakub@redhat.com>
3574 * error.c (cxx_print_error_function): Add third argument, pass
3575 it over to lhd_print_error_function.
3576 (cp_print_error_function): If diagnostic->abstract_origin, print
3578 * cp-tree.h (struct diagnostic_info): New forward decl.
3579 (cxx_print_error_function): Add third argument.
3581 2007-09-25 Simon Martin <simartin@users.sourceforge.net>
3584 * name-lookup.c (pushtag): Do not create an implicit typedef before
3585 the associated type declaration is known to be valid.
3587 2007-09-25 Jakub Jelinek <jakub@redhat.com>
3589 * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
3590 rather than pointers.
3592 2007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
3595 * search.c (check_final_overrider): Fail if
3596 targetm.comp_type_attributes returns 0.
3598 2007-09-24 Jason Merrill <jason@redhat.com>
3601 * pt.c (resolve_typename_type): Don't look things up in the original
3602 template if it would mean losing template arguments.
3604 2007-09-24 Jakub Jelinek <jakub@redhat.com>
3607 * cp-tree.h (cxx_type_hash_eq): New prototype.
3608 * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
3609 * tree.c (cxx_type_hash_eq): New function.
3611 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
3614 * tree.c (cp_build_qualified_type_real): Build a canonical
3615 ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
3617 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
3621 * tree.c (cplus_array_compare): Compare pointers, not types.
3622 (build_cplus_array_type_1): Store new array type into the hash
3623 table before building the canonical type; build the canonical type
3625 (cp_build_qualified_type_real): Put all of the array types with
3626 cv-qualified element types into the C++ array hash table, built as
3627 variants of the unqualified versions.
3629 2007-09-23 Jason Merrill <jason@redhat.com>
3632 * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
3633 for deprecation warnings.
3635 2007-09-22 Jason Merrill <jason@redhat.com>
3638 * call.c (build_over_call): Warn about deprecated virtuals.
3641 * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
3642 (MAYBE_TAGGED_TYPE_P): Remove.
3643 * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
3644 instead of calling is_late_template_attribute again.
3645 (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
3646 (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
3647 Don't crash on typedefs from non-template classes.
3648 * decl2.c (grokfield): Don't sorry about attrs on template parms.
3649 (is_late_template_attribute): All attributes applied to template
3650 parms or typename types are dependent. Static.
3651 (splice_template_attributes): Pass decl through.
3652 (save_template_attributes): Likewise.
3654 2007-09-20 Jakub Jelinek <jakub@redhat.com>
3657 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
3658 returned from tsubst_pack_expansion.
3659 (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
3660 (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
3662 2007-09-20 Paolo Carlini <pcarlini@suse.de>
3665 * semantics.c (finish_id_expression): Use consistently
3666 context_for_name_lookup.
3667 * decl.c (fixup_anonymous_aggr): Fix error message for
3668 anonymous struct (vs union).
3670 2007-09-19 Jason Merrill <jason@redhat.com>
3673 * pt.c (tsubst): Handle typedefs by looking for the specialization.
3674 (retrieve_specialization): Only tagged types use
3675 DECL_TEMPLATE_INSTANTIATIONS.
3676 (instantiate_class_template): Push nested classes too.
3677 (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
3679 * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
3680 * init.c (is_aggr_type): Remove redundant tests.
3681 * class.c (push_nested_class): Use CLASS_TYPE_P.
3683 2007-09-20 Paolo Carlini <pcarlini@suse.de>
3686 * init.c (build_zero_init): If, recursively, build_zero_init
3687 returns a NULL_TREE, do not append it to the VEC of constructors.
3689 2007-09-18 Jason Merrill <jason@redhat.com>
3692 * pt.c (apply_late_template_attributes): Set processing_template_decl.
3693 (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
3694 ATTR_FLAG_TYPE_IN_PLACE.
3695 (tsubst): Do unqualified lookup to find typedefs from current class.
3696 [ARRAY_TYPE]: Propagate alignment info.
3697 * decl2.c (is_late_template_attribute): Only defer handling of
3698 attribute aligned if the expression is dependent.
3699 (save_template_attributes): If we're deferring any attributes,
3700 make this a naming typedef.
3702 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3704 PR c++/33462 (again)
3705 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
3706 va_arg instead of __builtin_va_arg.
3708 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3711 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
3712 (pp_cxx_primary_expression): Use it.
3713 * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
3714 * error.c (dump_expr): Use it.
3716 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3719 * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
3720 out case TYPEID_EXPR to...
3721 (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
3722 and pp_cxx_right_paren.
3723 * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
3724 * error.c (dump_expr): Use it.
3726 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3729 * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
3730 (pp_cxx_primary_expression): Use it.
3731 * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
3732 * error.c (dump_expr): Use it.
3734 2007-09-16 Paolo Carlini <pcarlini@suse.de>
3737 * init.c (build_new): Remove warning for zero-element
3740 2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
3743 * call.c (maybe_handle_implicit_object): Set this_p, clear
3744 rvaluedness_matches_p.
3745 (compare_ics): Do not compare rvaluedness matching when one of the
3746 operands is an implicit object.
3748 2007-09-14 Jason Merrill <jason@redhat.com>
3750 PR c++/17743, c++/19163
3751 * decl2.c (is_late_template_attribute): New fn.
3752 (splice_template_attributes, save_template_attributes): New fns.
3753 (cplus_decl_attributes): Call save_template_attributes.
3754 * pt.c (apply_late_template_attributes): New fn.
3755 (instantiate_class_template, tsubst_decl): Use it.
3756 * cp-tree.h: Declare is_late_template_attribute.
3758 2007-09-13 Tom Tromey <tromey@redhat.com>
3760 * parser.c (cp_lexer_new_main): Don't use
3761 c_lex_return_raw_strings.
3762 (cp_lexer_get_preprocessor_token): Update. Add special case when
3765 2007-09-11 Jan Hubicka <jh@suse.cz>
3767 * method.c (use_thunk): Use tree_rest_of_compilation
3768 * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
3769 (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
3770 * cp-tree.h (expand_body): Kill.
3771 (emit_associated_thunks): Declare.
3772 * semantics.c (emit_associated_thunks): Export.
3773 (expand_body): Kill.
3775 2007-09-09 David Daney <ddaney@avtrex.com>
3778 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
3779 to calculate cookie_ptr.
3781 2007-09-08 Jason Merrill <jason@redhat.com>
3784 * pt.c (most_specialized_class): Set processing_template_decl
3785 while tsubsting partial spec args.
3787 2007-09-06 Jason Merrill <jason@redhat.com>
3789 * decl2.c (get_guard): Copy visibility from the guarded variable.
3791 2007-09-06 Jan Hubicka <jh@suse.cz>
3793 * semantics.c (expand_body): Do not mark arguments of clones used.
3795 2007-09-06 Paolo Carlini <pcarlini@suse.de>
3798 * decl.c (cp_finish_decl): When processing_template_decl,
3799 deal correctly with init as TREE_LIST.
3801 2007-09-06 Tom Tromey <tromey@redhat.com>
3803 * decl.c (finish_function): Put return's location on line zero of
3806 2007-09-05 Jason Merrill <jason@redhat.com>
3809 * except.c (prepare_eh_type): Use type_decays_to.
3812 * init.c (build_delete): Use build_headof to get the address of the
3813 complete object if we aren't using the deleting destructor.
3814 * rtti.c (build_headof): No longer static.
3815 * cp-tree.h: Declare it.
3817 2007-09-06 Jakub Jelinek <jakub@redhat.com>
3819 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
3820 decl if a prototype for XX is provided with throw().
3823 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
3824 on __*_chk non-__builtin_* decls.
3826 2007-09-05 Paolo Carlini <pcarlini@suse.de>
3829 * semantics.c (finish_id_expression): Use context_for_name_lookup
3830 insted of DECL_CONTEXT, to see through anonymous structs and unions.
3831 * class.c (finish_struct_anon): Deal correctly with anonymous
3832 structs (vs unions, as GNU extension) in error messages.
3834 2007-09-05 Jan Hubicka <jh@suse.cz>
3836 * sematics.c (expand_body): Remove unnecesary import_export_decl
3837 call, DECL_EXTERNAL checks and current_function_decl saving.
3839 2007-09-05 Paolo Carlini <pcarlini@suse.de>
3841 PR c++/29731 (again)
3842 * parser.c (cp_parser_primary_expression): Return error_mark_node
3843 when a statement-expression is found in a template-argument list.
3845 2007-09-04 Jason Merrill <jason@redhat.com>
3847 * except.c (initialize_handler_parm): Use
3848 fold_build_cleanup_point_expr.
3851 * call.c (reference_binding): Don't look for user-defined conversions
3855 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
3856 the MUST_NOT_THROW_EXPR.
3858 2007-09-04 Richard Sandiford <richard@codesourcery.com>
3860 * decl.c (cp_finish_decl): Call determine_visibility before
3861 make_rtl_for_nonlocal_decl.
3863 2007-09-04 Jason Merrill <jason@redhat.com>
3866 * pt.c (most_specialized_class): Substitute outer template
3867 arguments into the arguments of a member template partial
3869 (strip_innermost_template_args): New fn.
3871 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
3873 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
3875 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3877 * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
3878 * decl.c (cp_make_fname_decl): Likewise,
3879 * parser.c (cp_parser_string_literal): Likewise,
3880 * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
3881 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
3884 2007-09-02 Paolo Carlini <pcarlini@suse.de>
3887 * typeck.c (build_unary_op): Fix error message for
3888 Boolean expression as operand to operator--.
3890 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3892 * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
3893 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
3896 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
3899 * init.c (build_default_init): Make extern.
3900 * cp-tree.h (build_default_init): Declare here.
3901 * pt.c (tsubst_expr): When the instantiation of the initializer of
3902 a variable results in an empty list, default-initialize the
3904 (tsubst_copy_and_build): When the instantiation of the initializer
3905 in a new expression results in an empty initializer list,
3906 default-initialize it.
3908 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
3910 * mangle.c (write_type): Change mangling of rvalue reference from
3913 2007-08-31 Jakub Jelinek <jakub@redhat.com>
3915 * decl.c (duplicate_decls): Remove duplicated line.
3917 2007-08-31 Paolo Carlini <pcarlini@suse.de>
3920 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
3921 BOUND_TEMPLATE_TEMPLATE_PARM.
3923 2007-08-31 Paolo Carlini <pcarlini@suse.de>
3926 * search.c (lookup_member): Check the name argument for
3929 2007-08-31 Paolo Carlini <pcarlini@suse.de>
3932 * parser.c (cp_parser_trait_expr): Check rerurn value of
3935 2007-08-30 Ollie Wild <aaw@google.com>
3937 * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
3938 convert_ptrmem for pointer to member conversions.
3939 (convert_to_pointer_force): Update cp_convert_to_pointer call.
3940 (ocp_convert): Update cp_convert_to_pointer call.
3941 * typeck.c (convert_ptrmem): Add conditional for null pointers to
3943 (build_static_cast_1): Check can_convert for conversions in either
3945 (get_delta_difference_1): New function.
3946 (get_delta_difference): Refactor to call get_delta_difference_1.
3948 2007-08-30 Jakub Jelinek <jakub@redhat.com>
3950 * decl.c (start_preparsed_function): Set
3951 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
3953 2007-08-28 Paolo Carlini <pcarlini@suse.de>
3956 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
3957 BOUND_TEMPLATE_TEMPLATE_PARM.
3959 2007-08-28 Jakub Jelinek <jakub@redhat.com>
3963 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
3964 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
3966 2007-08-27 Jason Merrill <jason@redhat.com>
3969 * pt.c (build_non_dependent_expr, type_dependent_expression_p):
3970 Look inside STMT_EXPR.
3971 * semantics.c (stmt_expr_value_expr): New fn.
3972 * cp-tree.h: Declare it.
3975 * decl.c (groktypename): Ignore attributes applied to class type.
3977 2007-08-28 Richard Guenther <rguenther@suse.de>
3979 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
3981 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
3983 * error.c (dump_expr): Handle COMPLEX_CST.
3984 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
3985 (pp_cxx_expression): Likewise.
3987 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
3989 * decl.c (GNU_INLINE_P): New.
3990 (duplicate_decls): Handle gnu_inline. Merge attributes and
3991 some flags in overriding definitions.
3992 (redeclaration_error_message): Handle gnu_inline.
3993 (start_preparsed_function): Likewise.
3995 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3997 * call.c (sufficient_parms_p): Constify.
3998 * class.c (same_signature_p): Likewise.
3999 * cp-gimplify.c (is_invisiref_parm,
4000 cxx_omp_privatize_by_reference): Likewise.
4001 * cp-objcp-common.c (has_c_linkage): Likewise.
4002 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
4003 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
4004 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
4005 num_artificial_parms_for, comp_template_parms,
4006 template_parameter_pack_p, any_dependent_template_arguments_p,
4007 any_type_dependent_arguments_p, any_value_dependent_elements_p,
4008 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
4009 zero_init_p, member_p, cp_lvalue_kind,
4010 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
4011 varargs_function_p, is_dummy_object, special_function_kind,
4012 string_conv_p, type_unknown_p, comp_except_specs, compparms,
4013 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
4014 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
4015 cp_has_mutable_p, at_least_as_qualified_p,
4016 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
4017 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
4018 * except.c (nothrow_libfn_p): Likewise.
4019 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
4021 * pt.c (comp_template_parms, template_parameter_pack_p,
4022 any_type_dependent_arguments_p, any_value_dependent_elements_p,
4023 any_dependent_template_arguments_p): Likewise.
4024 * repo.c (repo_export_class_p): Likewise.
4025 * semantics.c (anon_aggr_type_p): Likewise.
4026 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
4027 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
4028 varargs_function_p, member_p, is_dummy_object, pod_type_p,
4029 zero_init_p, special_function_p): Likewise.
4030 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
4031 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
4032 compparms, invalid_nonstatic_memfn_p,
4033 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
4034 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
4035 cp_has_mutable_p, lvalue_or_else): Likewise.
4037 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
4039 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
4040 * cp-objcp-common.c (cp_tree_size): Ditto.
4041 * tree.c (cp_walk_subtrees): Ditto
4042 * cp-tree.def (TINST_LEVEL): Go away.
4043 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
4044 move together with other non-tree structs.
4045 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
4046 (union lang_tree_node): Eliminate tinst_level field.
4047 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
4048 (current_instantiation, outermost_tinst_level): Return
4049 a "struct tinst_level *".
4051 * error.c (print_instantiation_partial_context): Change second
4052 parameter to a "struct tinst_level *". Replace accessor macros
4054 (print_instantiation_full_context): Likewise.
4055 * lex.c (in_main_input_context): Likewise.
4057 * pt.c (struct pending_templates): New.
4058 (pending_templates, last_pending_template): Use it as a type.
4059 (current_tinst_level): Change typo to "struct tinst_level *"
4060 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
4061 (add_pending_template): Construct a "struct pending_template".
4062 Replace TINST_LEVEL accessor macros with field access.
4063 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
4064 (pop_tinst_level): Likewise.
4065 (instantiate_pending_templates): Likewise. Factor common code used
4066 when an instantiation has been done.
4067 (outermost_tinst_level): Replace tree_last with loop.
4068 (current_instantiation): Return a "struct tinst_level *".
4070 2007-08-24 Ollie Wild <aaw@google.com>
4072 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
4073 * name-lookup.h (cp_binding_level): Remove vtables member.
4075 2007-08-24 Richard Guenther <rguenther@suse.de>
4077 * tree.c (cp_cannot_inline_tree_fn): Remove.
4078 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
4079 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
4082 2007-08-24 Jakub Jelinek <jakub@redhat.com>
4085 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
4086 error_mark_node right away if build_expr_type_conversion
4090 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
4091 is error_mark_node rather than NULL_TREE.
4092 * pt.c (check_explicit_specialization): Likewise.
4095 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
4096 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
4098 2007-08-22 Jason Merrill <jason@redhat.com>
4101 * pt.c (outermost_tinst_level): New function.
4102 * lex.c (in_main_input_context): New function.
4103 * cp-tree.h: Declare it.
4104 * decl2.c (constrain_class_visibility): Use it to avoid warning
4105 about uses of the anonymous namespace in the main input file.
4107 2007-08-21 Jakub Jelinek <jakub@redhat.com>
4109 * init.c (build_new_1): Use get_target_expr instead of save_expr.
4111 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
4114 * class.c (finish_struct_1): Warn when a class has virtual
4115 functions and accessible non-virtual destructor.
4117 2007-08-20 Richard Guenther <rguenther@suse.de>
4121 * call.c (build_new_method_call): Convert initializer to
4123 * init.c (build_aggr_init): Do not fiddle with types.
4124 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
4125 * except.c (build_throw): Do not drop qualifiers for the
4127 * typeck.c (get_member_function_from_ptrfunc): Do not
4128 fiddle with types, instead convert.
4129 (build_ptrmemfunc1): Convert to the target type for
4131 (gfc_trans_allocate): Convert result to target type.
4132 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
4133 pointer-to-member structures shall have alias set zero as well.
4135 2007-08-20 Richard Guenther <rguenther@suse.de>
4137 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
4139 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
4140 (nonstatic_local_decl_p): Likewise.
4141 * tree.c (cp_auto_var_in_fn_p): Remove.
4142 * decl.c (nonstatic_local_decl_p): Remove.
4144 2007-08-20 Richard Guenther <rguenther@suse.de>
4146 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
4148 * tree.h (cp_walk_tree): New define to walk_tree_1 with
4149 cp_walk_subtrees lh parameter.
4150 (cp_walk_tree_without_duplicates): New define to
4151 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
4152 * tree.c (count_trees): Call
4153 cp_walk_tree_without_duplicates.
4154 (verify_stmt_tree): Call cp_walk_tree.
4155 (break_out_target_exprs): Likewise.
4156 (WALK_SUBTREE): Likewise.
4157 * cp-gimplify.c (cp_genericize): Likewise.
4158 * cp-pt.c (find_parameter_packs_r): Likewise.
4159 (uses_parameter_packs): Likewise.
4160 (make_pack_expansion): Likewise.
4161 (check_for_bare_parameter_packs): Likewise.
4162 (for_each_template_parm): Likewise.
4163 * decl.c (check_default_argument): Call
4164 cp_walk_tree_without_duplicates.
4165 * except.c (build_throw): Likewise.
4166 * decl2.c (type_visibility): Likewise.
4167 * semantics.c (expand_or_defer_fn): Likewise.
4168 (finalize_nrv): Call cp_walk_tree.
4170 2007-08-20 Jakub Jelinek <jakub@redhat.com>
4173 * init.c (build_new_1): Rename placement_var variable to placement_expr.
4174 Initialize it with save_expr rather than get_temp_regvar.
4176 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
4179 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
4182 2007-08-17 Ollie Wild <aaw@google.com>
4185 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
4186 declarations into appropriate slots for comparison. Fix type
4189 2007-08-17 Paolo Carlini <pcarlini@suse.de>
4192 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
4193 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
4195 2007-08-17 Paolo Carlini <pcarlini@suse.de>
4198 * parser.c (cp_parser_class_head): Improve error message.
4200 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
4202 * pt.c (instantiate_decl): Set input_location
4203 for the function end.
4205 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4207 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
4209 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
4210 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
4211 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
4212 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
4213 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
4214 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
4215 * typeck.c (cp_type_quals): Likewise.
4216 * typeck2.c (cxx_incomplete_type_diagnostic,
4217 cxx_incomplete_type_error): Likewise.
4219 2007-08-16 Paolo Carlini <pcarlini@suse.de>
4222 * pt.c (tsubst_friend_function): When check_classfn
4223 returns error_mark_node likewise return it.
4225 2007-08-15 Jakub Jelinek <jakub@redhat.com>
4228 * typeck.c (check_return_expr): Don't NRV optimize vars in
4230 * decl.c (finish_function): Comment fix.
4232 2007-08-15 Paolo Carlini <pcarlini@suse.de>
4235 * pt.c (push_template_decl_real): Depending on TYPE_P
4236 use either TYPE_CONTEXT or DECL_CONTEXT.
4238 2007-08-14 Mark Mitchell <mark@codesourcery.com>
4240 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
4241 constructors and destructors return this.
4243 2007-08-14 Paolo Carlini <pcarlini@suse.de>
4246 * decl2.c (check_classfn): Return error_mark_node in case of error;
4247 in that case, do not call add_method.
4248 * decl.c (start_decl): Deal with check_classfn returning
4250 (grokfndecl): Likewise.
4251 * pt.c (tsubst_friend_function): Likewise.
4253 2007-08-14 Andrew Pinski <pinskia@gmail.com>
4256 * typeck.c (build_binary_op): Disallow vector float types with
4257 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
4259 2007-08-11 Ian Lance Taylor <iant@google.com>
4261 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
4263 * cp-tree.h (cxx_get_alias_set): Update declaration.
4265 2007-08-10 Ollie Wild <aaw@google.com>
4267 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
4269 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
4271 (unqualified_namespace_lookup): Fix ambiguous_decl call.
4272 (lookup_using_namespace): Fix ambiguous_decl call.
4273 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
4275 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4277 * call.c (name_as_c_string): Use CONST_CAST.
4278 * decl.c (build_decl): Likewise.
4279 * parser.c (cp_parser_string_literal): Likewise.
4281 2007-08-10 Paolo Carlini <pcarlini@suse.de>
4284 * error.c (dump_expr): Consistently use the *_cxx_*
4285 variants of the pretty-print functions.
4287 2007-08-10 Paolo Carlini <pcarlini@suse.de>
4290 * decl.c (check_special_function_return_type): Just error
4291 on return type specified for conversion operator.
4293 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
4295 * typeck2.c (readonly_error): Handle general expressions.
4296 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
4298 2007-08-06 Dan Hipschman <dsh@google.com>
4300 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
4301 access function name.
4303 2007-08-04 Alfred Minarik <a.minarik@aon.at>
4306 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
4307 * g++spec.c (lang_specific_driver): Check them.
4309 2007-08-06 Paolo Carlini <pcarlini@suse.de>
4312 * pt.c (inline_needs_template_parms): Fix comment; change return type
4315 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
4318 2007-03-26 Dirk Mueller <dmueller@suse.de>
4320 * parser.c (cp_parser_member_declaration): Pedwarn
4321 about stray semicolons after member declarations.
4323 2007-08-02 Lee Millward <lee.millward@gmail.com>
4328 * parser.c (cp_parser_asm_definition): Detect and discard asm
4329 statements with invalid inputs or outputs.
4330 (cp_parser_asm_operand_list): Return error mark node if any
4331 of the operands are invalid. Adjust documentation.
4333 2007-08-02 Nick Clifton <nickc@redhat.com>
4335 * typeck.c: Change copyright header to refer to version 3 of the
4336 GNU General Public License and to point readers at the COPYING3
4337 file and the FSF's license web page.
4338 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
4339 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
4340 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
4341 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
4342 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
4343 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
4344 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
4345 name-lookup.h, parser.c: Likewise.
4347 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4350 * call.c (magic_varargs_p): Honor the "type generic" attribute.
4352 2007-07-30 Paolo Carlini <pcarlini@suse.de>
4355 * semantics.c (finish_label_stmt): Reject the __label__
4356 extension outside function scopes.
4358 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4360 * parser.c (eof_token): Un-constify.
4361 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
4362 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
4365 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
4367 * pt.c, tree.c, typeck2.c: Fix comment typos.
4369 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
4370 Mark Mitchell <mark@codesourcery.com>
4373 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
4374 hidden due to friend declarations in local classes.
4376 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
4378 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
4379 * cp-tree.def (DECLTYPE_TYPE): New.
4380 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
4381 (dump_type_prefix): Ditto.
4382 (dump_type_suffix): Ditto.
4383 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
4384 * mangle.c (write_type): Handle DECLTYPE_TYPE.
4385 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
4387 (DECLTYPE_TYPE_EXPR): New.
4388 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
4389 (finish_declared_type): Declare.
4390 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
4391 DECLTYPE_TYPE nodes.
4392 (pp_cxx_type_id): Ditto.
4393 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
4394 (tsubst): Substitute into a DECLTYPE_TYPE node.
4395 (tsubst_copy): Ditto.
4396 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
4398 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
4399 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
4400 structural equality (because we can't hash the expressions).
4401 (finish_declared_type): New.
4402 * lex.c (reswords): Add "decltype" keyword.
4403 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
4404 (cp_parser_postfix_expression): Add member_access_only_p to
4405 restrict postfix expression to member access expressions.
4406 (cp_parser_unary_expression): Update call to
4407 cp_parser_postfix_expression to reflect new parameter.
4408 (cp_parser_declared_type): New.
4409 (cp_parser_simple_type_specifier): Parse decltype types.
4411 2007-07-27 Mark Mitchell <mark@codesourcery.com>
4414 * call.c (convert_for_arg_passing): Only widen bitfields to their
4415 declared types if necessary.
4417 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4419 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
4422 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4424 * decl.c (typename_hash, typename_compare): Constify.
4425 * mangle.c (hash_type, compare_type): Likewise.
4426 * pt.c (eq_local_specializations, hash_local_specialization):
4428 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
4429 list_hash): Likewise.
4430 * typeck2.c (pat_compare): Likewise.
4432 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
4434 * method.c (implicitly_declare_fn): Increase alignment if member
4435 function pointer format requires it.
4437 2007-07-24 Paolo Carlini <pcarlini@suse.de>
4440 * typeck.c (check_return_expr): Do not pass a null argument
4443 2007-07-24 Paolo Carlini <pcarlini@suse.de>
4446 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
4449 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
4452 * typeck.c (convert_arguments): Only use default args if we have
4456 * typeck.c (structural_comptypes): No need to check
4457 resolve_typename_type return value here.
4458 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
4459 * pt.c (resolve_typename_type): Follow typename typedefs. Return
4460 original type rather than error_mark_node in case of failure.
4461 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
4462 resolve_typename_type result check.
4463 (cp_parser_direct_declarator, cp_parser_head,
4464 cp_parser_constructor_declarator_p): Likewise.
4466 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
4468 * pt.c (template_parms_variadic_p): Remove.
4469 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
4471 2007-07-12 Jakub Jelinek <jakub@redhat.com>
4474 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
4475 argument to dump_aggr_init_expr_args instead of false.
4477 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
4479 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
4480 canonical types; otherwise, fall back to structural type
4481 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
4482 internal compiler error if the canonical types are wrong.
4484 2007-07-11 Paolo Carlini <pcarlini@suse.de>
4487 * parser.c (cp_parser_make_indirect_declarator): When the
4488 the code argument is ERROR_MARK return cp_error_declarator.
4490 2007-07-09 Geoffrey Keating <geoffk@apple.com>
4493 * decl.c (cxx_init_decl_processing): Don't set
4494 force_align_functions_log.
4495 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
4496 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
4497 FUNCTION_DECL, return its alignment.
4499 2007-07-09 Richard Guenther <rguenther@suse.de>
4501 * decl.c (start_preparsed_function): Do not promote return type.
4503 2007-07-08 Paolo Carlini <pcarlini@suse.de>
4506 * pt.c (unify): Never pass error_mark_node to template_decl_level.
4508 2007-07-07 Mark Mitchell <mark@codesourcery.com>
4511 * pt.c (resolve_overloaded_unification): Robustify. Return a
4513 (type_unification_real): Adjust accordingly.
4515 2007-07-06 Richard Guenther <rguenther@suse.de>
4517 * init.c (build_new_1): Use the correct pointer type.
4518 * typeck2.c (build_m_component_ref): Likewise.
4520 2007-07-05 Mark Mitchell <mark@codesourcery.com>
4523 * init.c (build_zero_init): Always build an initializer for
4525 * typeck2.c (build_functional_cast): Use build_zero_init.
4528 * init.c (build_new_1): Always pass the allocation function to
4529 build_op_delete_call.
4530 * call.c (build_op_delete_call): Handle operator delete with a
4531 variable-argument list. Do not issue an error when no matching
4532 deallocation function is available for a new operator.
4535 * cp-tree.h (any_value_dependent_elements_p): Declare it.
4536 * decl.c (value_dependent_init_p): New function.
4537 (cp_finish_decl): Use it.
4538 * pt.c (value_dependent_expression_p): Use
4539 any_value_dependent_elements_p.
4540 * parser.c (cp_parser_primary_expression): Add comment about
4541 treating dependent qualified names as integral
4542 constant-expressions.
4544 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
4546 * decl.c (build_ptrmemfunc_type): Always use structural equality
4547 tests when comparing pointer-to-member-function types, because the
4548 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
4551 2007-07-03 Mark Mitchell <mark@codesourcery.com>
4553 * init.c (build_new): Tweak comment.
4555 2007-06-29 Dave Brolley <brolley@redhat.com>
4558 * parser.c (cp_parser_new_type_id): Don't reduce a named array
4559 type to its base type and number of elements here.
4560 * init.c (build_new): Call complete_type_or_else to ensure that the
4561 type is complete and to issue a diagnostic if it is not.
4562 (build_new_1): Don't call complete_type_or_else here.
4564 2007-07-03 Richard Guenther <rguenther@suse.de>
4567 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
4570 2007-07-02 Simon Baldwin <simonb@google.com>
4572 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
4573 for inner-style nested forward declarations that don't declare
4576 2007-07-02 Jakub Jelinek <jakub@redhat.com>
4579 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
4580 DECL_P in not a variable and appears more than once error messages.
4582 2007-07-01 Ollie Wild <aaw@google.com>
4584 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
4585 (select_decl): Remove function.
4586 (unqualified_namespace_lookup): Populate binding by calling
4587 ambiguous_decl. Remove select_decl call.
4588 (lookup_qualified_name): Remove select_decl call.
4589 * decl.c (lookup_and_check_tag): Check for ambiguous references.
4590 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
4591 generation when name lookup is ambiguous.
4593 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
4596 * init.c (build_new_1): Use structural equality on the copy of the
4599 2007-06-28 Geoffrey Keating <geoffk@apple.com>
4601 * decl2.c (determine_visibility): Implement
4602 flag_visibility_ms_compat effect on type info.
4603 * decl.c (cxx_init_decl_processing): Implement
4604 global effect of flag_visibility_ms_compat.
4606 2007-06-28 Geoffrey Keating <geoffk@apple.com>
4608 * decl2.c (start_objects): Mark constructor-running function
4611 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
4614 * decl.c (grokdeclarator): Reset friendp for member functions declared
4615 friend of their own class.
4617 2007-06-23 Mark Mitchell <mark@codesourcery.com>
4619 * decl2.c (determine_visibility): Don't look for dllexport here.
4620 (determine_visibility_from_class): Tidy.
4622 2007-06-18 Simon Baldwin <simonb@google.com>
4625 * parser.c (cp_parser_single_declaration): Added check for storage
4626 class other than sc_none in parsed declaration, and a flag to indicate
4627 if the call is part of an explicit template specialization parse.
4628 * (cp_parser_explicit_specialization): Specialization check flag added
4629 to call to cp_parser_single_declaration(), set true.
4630 * (cp_parser_template_declaration_after_export): Specialization check
4631 flag added to call to cp_parser_single_declaration(), set false.
4632 * pt.c (check_explicit_specialization): Added code to copy visiblity
4633 and linkage from the templated function to the explicit specialization.
4635 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
4637 * typeck.c (build_binary_op): For templates build the
4638 expression in pieces to avoid the assert in build2_stat.
4639 (get_member_function_from_ptrfunc):
4640 Change over to using POINTER_PLUS_EXPR and convert
4641 the second operand to sizetype.
4642 * typeck2.c (build_m_component_ref): Likewise.
4643 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
4644 instead of PLUS_EXPR for pointers.
4645 (build_new_1): Likewise.
4646 (build_vec_delete_1): Likewise.
4647 (build_vec_delete): Likewise.
4648 * class.c (build_base_path): Likewise.
4649 (build_base_path): Likewise.
4650 (convert_to_base_statically): Likewise.
4651 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
4652 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
4653 instead of PLUS_EXPR.
4654 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
4655 instead of PLUS_EXPR for pointers.
4656 * call.c (build_special_member_call): Likewise.
4657 * rtti.c (build_headof): Likewise.
4658 Use sizetype instead of ptrdiff_type_node.
4659 (tinfo_base_init): Create a POINTER_PLUS_EXPR
4660 instead of PLUS_EXPR for pointers.
4661 * except.c (expand_start_catch_block): Do a
4662 NEGATIVE and then a POINTER_PLUS_EXPR instead
4664 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
4665 PLUS_EXPR on pointer types over to use
4666 POINTER_PLUS_EXPR and remove the conversion
4667 to the pointer types.
4668 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
4669 adding to a pointer type. Use size_int instead of
4670 ssize_int. Convert the index to sizetype before
4671 adding it to the pointer.
4673 2007-06-15 Mark Mitchell <mark@codesourcery.com>
4675 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
4676 (DECL_ANON_UNION_VAR_P): New macro.
4677 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
4678 than DECL_VAR_MARKED_P, to keep track of which variables we have
4680 * decl.c (redeclaration_error_message): Complain about redeclaring
4681 anonymous union members at namespace scope.
4682 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
4684 2007-06-14 Geoff Keating <geoffk@apple.com>
4686 * decl2.c (determine_visibility): Ensure that functions with
4687 hidden types as parameters are hidden.
4690 * decl2.c (determine_visibility): Remove duplicate code for
4693 2007-06-12 Ian Lance Taylor <iant@google.com>
4696 * init.c (avoid_placement_new_aliasing): New static function.
4697 (build_new_1): Call it.
4699 2007-06-11 Rafael Ávila de Espíndola <espindola@google.com>
4701 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
4702 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
4704 2007-06-08 Jakub Jelinek <jakub@redhat.com>
4707 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
4708 on init, the non-decl cond operand and increment value.
4710 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
4713 * decl.c (check_initializer): Report an error when a brace enclosed
4714 initializer is used for a non-aggregate type in C++98.
4715 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
4717 (grokdeclarator): Likewise.
4718 (move_fn_p): Likewise.
4719 * typeck.c (check_return_expr): Likewise.
4720 * call.c (reference_binding): Likewise.
4721 * error.c (cp_cpp_error): Likewise.
4722 * pt.c (check_default_tmpl_args): Likewise.
4724 * lex.c (init_reswords): Likewise.
4725 * parser.c (p_parser_primary_expression): Likewise.
4726 (TOKEN_PRECEDENCE): Likewise.
4727 (cp_parser_init_declarator): Likewise.
4728 (cp_parser_ptr_operator): Likewise.
4729 (cp_parser_parameter_declaration): Likewise.
4730 (cp_parser_enclosed_template_argument_list): Likewise.
4731 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
4732 (cp_parser_next_token_ends_template_argument_p): Likewise.
4734 2007-06-04 Simon Baldwin <simonb@google.com>
4736 * decl.c (grokdeclarator): Readability change. Moved case labels
4737 into direct switch statement scope.
4739 2007-06-04 Paolo Carlini <pcarlini@suse.de>
4741 * call.c (convert_like_real): Remove pointless code.
4743 2007-05-31 Mark Mitchell <mark@codesourcery.com>
4745 * decl.c (get_atexit_fn_ptr_type): New function.
4746 (get_atexit_node): Use it.
4747 (start_cleanup_fn): Likewise.
4748 (register_dtor_fn): Use the object's destructor, instead of a
4749 separate cleanup function, where possible.
4750 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
4751 (atexit_fn_ptr_type_node): New macro.
4752 * decl2.c (build_cleanup): Use build_address.
4754 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
4756 * typeck.c (build_binary_op): Include types in error.
4758 2007-05-31 Jakub Jelinek <jakub@redhat.com>
4761 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
4762 needs runtime initialization.
4764 2007-05-31 Paolo Carlini <pcarlini@suse.de>
4767 * semantics.c (finish_trait_expr): Complete the types.
4769 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
4770 Douglas Gregor <doug.gregor@gmail.com>
4771 Pedro Lamarao <pedro.lamarao@mndfck.org>
4772 Howard Hinnant <howard.hinnant@gmail.com>
4776 * typeck.c (comptypes): Don't consider rvalue and lvalue
4777 reference types to be equivalent.
4778 (check_return_expr): Move from certain lvalues when returning
4780 * decl.c (grokdeclarator): Implement reference collapsing.
4781 (copy_fn_p): Don't consider constructors taking rvalue references
4782 to be copy constructors.
4784 * call.c (conversion): New "rvaluedness_matches_p" member.
4785 (convert_class_to_reference): Require reference type as first
4786 parameter instead of base type.
4787 (reference_binding): Add logic to handle rvalue references.
4788 (implicit_conversion): Update inaccurate comment.
4789 (convert_like_real): Disable creation of temporaries that are
4790 impossible to initialize for types with move constructors.
4791 (build_over_call): Elide move constructors when possible.
4792 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
4793 (maybe_handle_ref_bind): Return conversion instead of type node.
4794 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
4795 determine preferred conversion sequences.
4796 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
4797 (LOOKUP_PREFER_RVALUE): New.
4798 (DECL_MOVE_CONSTRUCTOR_P): New.
4799 (struct cp_declarator): Add "reference" member for reference
4800 types, with new "rvalue_ref" flag.
4801 (cp_build_reference_type): Declare.
4802 (move_fn_p): Declare.
4803 * error.c (dump_type_prefix): Format rvalue reference types
4804 correctly in error messages.
4805 * except.c (build_throw): Move from certain lvalues when
4807 * mangle.c (write_type): Mangle rvalue references differently
4808 than regular references.
4809 * parser.c (make_reference_declarator): Add boolean parameter for
4811 (cp_parser_make_indirect_declarator): New.
4812 (cp_parser_new_declarator_opt): Call
4813 cp_parser_make_indirect_declarator.
4814 (cp_parser_conversion_declarator_opt): Ditto.
4815 (cp_parser_declarator): Ditto.
4816 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
4818 * pt.c (tsubst): Implement reference collapsing.
4819 (maybe_adjust_types_for_deduction): Implement special template
4820 parameter deduction rule for rvalue references.
4821 (type_unification_real): Update calls to
4822 maybe_adjust_types_for_deduction.
4823 (try_one_overload): Ditto.
4824 (unify_pack_expansion): Ditto.
4825 * tree.c (lvalue_p_1): Handle rvalue reference types.
4826 (cp_build_reference_type): New.
4828 2007-05-30 Jakub Jelinek <jakub@redhat.com>
4831 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
4832 variables that need runtime initialization.
4834 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
4837 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
4838 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
4839 case POSTDECREMENT_EXPR>): Return the error_mark_node
4840 if either the real or imaginary parts would an
4843 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
4844 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4847 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
4848 token is a closing brace, false if there are no tokens left.
4849 (cp_parser_namespace_alias_definition): Only consume the next token if
4850 it is a closing brace.
4852 * parser.c (cp_parser_class_specifier): Likewise.
4854 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
4856 * semantics.c (finish_member_declaration): Fix a typo in the
4859 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
4871 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
4872 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
4873 * pt.c (check_for_bare_parameter_packs): Return bool indicated
4874 whether everything was okay. Fix indentation.
4875 (push_template_decl_real): Check for bare parameter packs in
4876 function parameters; where errors occur, mark the parameter types
4877 with ERROR_MARK_NODEs to avert ICEs.
4878 (coerce_template_parameter_pack): New.
4879 (coerce_template_parms): Moved parameter pack coercion into
4880 coerce_template_parameter_pack, and permit it anywhere in the
4881 template parameter list (not just at the end). Parameter and
4882 argument indices can vary (somewhat) separately now, so add
4883 PARM_IDX and ARG_IDX.
4884 (fn_type_unification): Don't set an argument pack as incomplete if
4885 no argument pack was deduced.
4886 (type_unification_real): If a type parameter is a parameter pack
4887 and has not otherwise been deduced, it will be deduced to an empty
4889 (more_specialized_fn): Use the actual lengths of the argument
4890 lists when comparing against expansions.
4891 * semantics.c (finish_member_declaration): If a field's type has
4892 bare parameter packs, error and set its type to ERROR_MARK_NODE.
4894 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
4897 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
4899 2007-05-22 Ollie Wild <aaw@google.com>
4901 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
4902 (unqualified_namespace_lookup): Adds check for hidden types.
4904 2007-05-22 Ollie Wild <aaw@google.com>
4906 * decl.c (duplicate_decls): Verify namespace names are unique.
4908 2007-05-21 Mark Mitchell <mark@codesourcery.com>
4910 * decl.c (cxx_maybe_build_cleanup): Handle
4911 __attribute__((cleanup)).
4913 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4915 * cvt.c (cp_convert_and_check): Don't check warnings if the
4918 2007-05-18 Geoffrey Keating <geoffk@apple.com>
4920 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
4922 2007-05-14 Paolo Carlini <pcarlini@suse.de>
4925 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
4926 type only if is a class type (5.2.8/4).
4928 2007-05-14 Rafael Ávila de Espíndola <espindola@google.com>
4930 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
4931 * decl.c (grokdeclarator): Use unsigned_type_for instead of
4932 c_common_unsigned_type.
4934 2007-05-11 Silvius Rus <rus@google.com>
4936 * typeck.c (build_indirect_ref): Add call to
4937 strict_aliasing_warning.
4938 (build_reinterpret_cast_1): Condition call to
4939 strict_aliasing_warning.
4941 2007-05-11 Jan Hubicka <jh@suse.cz>
4943 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
4944 * decl2.c (start_objects): ctors and dtors are no longer public.
4945 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
4947 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
4949 * typeck.c (build_unary_op): Remove code that used to
4950 handle non lvalue increments/decrements.
4952 2007-05-07 Mike Stump <mrs@apple.com>
4954 * parser.c (check_empty_body): Add.
4955 (cp_parser_iteration_statement): Add call to check_empty_body.
4957 2007-05-05 Geoffrey Keating <geoffk@apple.com>
4960 * mangle.c (write_mangled_name): Mangle static variable names.
4961 (write_unqualified_name): Use local-source-name for
4962 namespace-scope static variables.
4964 2007-05-04 Dirk Mueller <dmueller@suse.de>
4966 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
4969 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
4972 * decl2.c (constrain_class_visibility):
4973 Use strip_pointer_or_array_types instead of strip_array_types.
4975 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
4978 * decl.c (reshape_init_r): Don't reshape the first element if it
4979 is a pointer to member function.
4981 2007-04-27 Simon Baldwin <simonb@google.com>
4983 * decl.c (grokparms): Changed message format from %qD to %qE.
4985 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
4987 * error.c (maybe_warn_variadic_templates): Variadic templates are
4988 now in C++0x, so only warn about them in C++98 mode.
4990 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
4993 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
4994 integeral types from vectors types.
4996 2007-04-26 Jakub Jelinek <jakub@redhat.com>
4999 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
5000 for type dependent OMP_CLAUSE_DECLs.
5002 2007-04-24 Mark Mitchell <mark@codesourcery.com>
5005 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
5006 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
5007 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
5008 * init.c (build_zero_init): Adjust, as
5009 COMPLEX_TYPE is now a SCALAR_TYPE.
5010 * typeck2.c (digest_init): Allow brace-enclosed initializers for
5011 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
5013 2007-04-25 Paolo Carlini <pcarlini@suse.de>
5015 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
5016 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
5017 (trait_expr_value): Adjust.
5019 2007-04-23 Simon Baldwin <simonb@google.com>
5021 * decl.c (grokparms): Added new error for duplicate function
5022 parameters names in function prototypes, to match gcc behavior.
5024 2007-04-23 Jan Hubicka <jh@suse.cz>
5026 * decl2.c (finish_objects): Do not call target constructor/destructor
5029 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
5031 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
5032 instead of checking GIMPLE_STMT_P in chain_next.
5034 2007-04-17 Mark Mitchell <mark@codesourcery.com>
5037 * call.c (convert_for_arg_passing): Convert bitfields to their
5040 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
5043 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
5045 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
5048 * decl2.c (constrain_class_visibility):
5049 Do not warn about the use of anonymous namespace in the main input file.
5051 2007-04-15 Mark Mitchell <mark@codesourcery.com>
5053 * cp-tree.h (current_template_parms): Fix typo in comment.
5055 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
5057 * cp-tree.h, error.c: Fix comment typos.
5059 2007-04-13 Jason Merrill <jason@redhat.com>
5062 * call.c (reference_binding): Add c_cast_p parm. If true,
5063 add quals to TO as needed to make it reference-compatible.
5065 2007-04-11 Jan Hubicka <jh@suse.cz>
5067 * class.c (convert_to_base_statically): Fold produced tree; verify
5068 that we are not processing template_decl.
5070 2007-04-09 Mark Mitchell <mark@codesourcery.com>
5073 * class.c (build_base_path): Ensure that the converted pointer has
5074 the same cv-qualification as the input.
5076 2007-04-09 Paolo Carlini <pcarlini@suse.de>
5078 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
5080 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
5082 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
5084 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
5085 * tree.c (cp_add_pending_fn_decls): Remove.
5086 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
5088 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
5090 Revert change removing staticp.
5092 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
5094 * cp-objcp-common.c (cxx_staticp): Remove.
5095 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
5096 * cp-tree.h (cxx_staticp):
5098 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
5100 * class.c (check_for_override): Don't remove dllmport attribute
5103 2007-04-03 Jakub Jelinek <jakub@redhat.com>
5106 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
5107 type issue error and return early.
5109 2007-03-30 Jason Merrill <jason@redhat.com>
5112 * typeck.c (cp_type_readonly): New fn.
5113 * cp-tree.h: Declare it.
5114 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
5115 (cp_finish_decl): Not here.
5117 2007-03-31 Richard Guenther <rguenther@suse.de>
5119 * optimize.c (maybe_clone_body): Replace splay-tree usage by
5122 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
5127 * parser.c (declarator_can_be_parameter_pack): New.
5128 (cp_parser_template_parameter): Only parse the `...' if the
5129 declarator can be a parameter pack.
5130 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
5132 * pt.c (find_parameter_packs_r): Look into the bounds on integer
5133 types (they could be used as array bounds).
5134 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
5135 (tsubst_pack_expansion): Handle failure to expand parameter
5138 2007-03-30 Paolo Carlini <pcarlini@suse.de>
5141 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
5142 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
5143 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
5144 (CLASS_TYPE_NON_UNION_P): Add.
5145 (struct lang_type_class): Add has_complex_dflt.
5146 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
5147 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
5148 * cp-tree.def: Add TRAIT_EXPR.
5149 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
5150 * lex.c (struct resword): Add __has_nothrow_assign,
5151 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
5152 __has_trivial_constructor, __has_trivial_copy,
5153 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
5154 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
5155 __is_pod, __is_polymorphic, __is_union.
5156 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
5157 (cp_parser_trait_expr): New.
5158 * semantics.c (finish_trait_expr, trait_expr_value
5159 classtype_has_nothrow_copy_or_assign_p): New.
5160 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
5162 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
5163 * class.c (check_bases, check_field_decl, check_bases_and_members):
5164 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
5165 * pt.c (uses_template_parms, tsubst_copy_and_build,
5166 value_dependent_expression_p, type_dependent_expression_p): Deal with
5168 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
5170 2007-03-29 Richard Guenther <rguenther@suse.de>
5172 * tree.c (cp_walk_subtrees): Do not set input_location.
5174 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
5177 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
5180 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5182 * parser.c (struct cp_parser): Update comment for
5183 greater_than_is_operator_p.
5184 (cp_parser_primary_expression): In C++0x mode, a cast operator can
5185 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
5186 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
5187 !GREATER_THAN_IS_OPERATOR_P.
5188 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
5189 `>>' operators that will become two `>' tokens in C++0x.
5190 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
5191 mode, allowing it to terminate default arguments.
5192 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
5193 `>>' like two consecutive `>' tokens.
5194 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
5195 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
5196 ends a template argument.
5198 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5200 * decl.c (redeclaration_error_message): Complain when redeclaring
5201 a friend function with default template arguments (C++0x mode only).
5202 * cp-tree.h (check_default_tmpl_args): Declare.
5203 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
5204 template arguments in function templates. Add support for checking
5205 the default template arguments of friend templates.
5206 (push_template_decl_real): Fix call to check_default_tmpl_args.
5207 (type_unification_real): If a template parameter has not been
5208 deduced but provides a default template argument, substitute into
5209 that default template argument.
5210 * parser.c (cp_parser_init_declarator): When declaring (but not
5211 defining!) a function template in C++0x mode, check for default
5214 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5217 * decl.c (grokdeclarator): Deal with cv-qualified function type
5218 typedefs in the same way for member and non-member functions.
5220 2007-03-26 Dirk Mueller <dmueller@suse.de>
5222 * parser.c (cp_parser_member_declaration): Pedwarn
5223 about stray semicolons after member declarations.
5225 2007-03-26 Paolo Carlini <pcarlini@suse.de>
5228 * pt.c (instantiate_decl): Set in_system_header.
5230 2007-03-22 Mark Mitchell <mark@codesourcery.com>
5232 * cp-tree.h (current_tempalte_parms): Improve documentation.
5233 * pt.c (current_template_args): Likewise.
5236 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
5237 not consume tokens when failing.
5239 2007-03-22 Jim Wilson <wilson@specifix.com>
5240 Mark Mitchell <mark@codesourcery.com>
5243 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
5244 consistent with FROM.
5246 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5248 * error.c (dump_expr): Handle dependent names that designate types.
5249 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
5251 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
5253 * cp-tree.def, parser.c, pt.c: Fix comment typos.
5255 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5257 * cvt.c (cp_convert_and_check) : Define.
5258 * cp-tree.h (cp_convert_and_check): Declare.
5259 * call.c (convert_conversion_warnings): Rename to
5260 conversion_null_warnings. The warning for floating-point to
5261 integer is handled by convert_and_check in convert_like_real.
5262 (convert_like_real): convert_conversion_warnings was renamed as
5263 conversion_null_warnings.
5264 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
5265 overflow and changes of value during conversion.
5267 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5270 * parser.c (cp_parser_statement): If 'namespace' is found, this
5271 only can be a namespace alias definition, so parse it now.
5272 (cp_parser_namespace_alias_definition): if we find an open brace
5273 instead of '=', then this is actually a misplaced namespace
5276 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5279 * decl.c (cxx_init_decl_processing): Move command-line options
5280 processing to c-opts.c.
5282 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
5284 * ptree.c (cxx_print_type): Use formatting markup for integers
5285 when printing template parameter index/level/orig level.
5286 (cxx_print_xnode): Ditto.
5287 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
5288 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
5289 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
5291 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
5292 rather than a HOST_WIDE_INT.
5293 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
5294 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
5296 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
5297 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
5298 IN_BASE_INITIALIZER bool bitfields.
5299 (struct cp_declarator): Make KIND a 4-bit field. Make
5300 PARAMETER_PACK_P a bool bitfield just after KIND.
5301 * pt.c (uses_parameter_packs): Destroy the pointer set.
5302 (make_pack_expansion): Ditto.
5303 (check_for_bare_parameter_packs): Ditto.
5304 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
5306 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
5309 * call.c (convert_default_arg): Instead of copying the node,
5312 2007-03-15 Dirk Mueller <dmueller@suse.de>
5315 * call.c (convert_conversion_warnings): New..
5316 (convert_like_real): .. factored out from here.
5317 (convert_conversion_warnings): Add warning about
5318 false being converted to NULL in argument passing.
5320 2007-03-14 Dirk Mueller <dmueller@suse.de>
5322 * semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
5323 (finish_do_body): Warn about empty body in do/while statement.
5325 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5327 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
5329 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5332 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
5335 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
5337 * repo.c (init_repo): Initialize random_seed saved options.
5338 (finish_repo): Adjust.
5340 2007-03-13 Mark Mitchell <mark@codesourcery.com>
5343 * Make-lang.in (doc/g++.1): Use $< to specify the location from
5346 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
5348 * decl.c (compute_array_index_type): New warning flag warn_vla.
5350 2007-03-12 Mark Mitchell <mark@codesourcery.com>
5353 * call.c (convert_default_arg): Copy non-constant arguments.
5355 2007-03-11 Mark Mitchell <mark@codesourcery.com>
5358 * parser.c (cp_parser_postfix_expression): Disallow compound
5359 literals in constant expressions.
5362 * semantics.c (finish_typeof): Use unlowered_expr_type.
5364 2007-03-10 Mark Mitchell <mark@codesourcery.com>
5367 * cp-tree.h (unlowered_expr_type): New function.
5368 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
5369 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
5370 (unlowered_expr_type): New function.
5371 (build_unary_op): Disallow predecrements of bool bitfields.
5372 * call.c (build_conditional_expr): Use unlowered_expr_type.
5373 * pt.c (type_unification_real): Likewise.
5375 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
5378 * typeck.c (check_return_expr): Check for bare parameter packs.
5379 (comptypes): Compare template parameter packs and
5380 type pack expansions.
5381 * decl.c (grokdeclarator): Deal with the declaration of function
5383 (grokparms): Verify that the (optional) function parameter pack is
5384 at the end of the parameter list.
5385 (xref_basetypes): Handle pack expansions in the base class.
5386 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
5387 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
5388 (NONTYPE_ARGUMENT_PACK): New.
5389 (TYPE_PACK_EXPANSION): New.
5390 (EXPR_PACK_EXPANSION): New.
5391 (ARGUMENT_PACK_SELECT): New.
5392 * cp-objcp-common.c (cp_tree_size): Compute size of
5393 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
5394 ARGUMENT_PACK_SELECT.
5395 * error.c (dump_template_argument): Print template argument packs.
5396 (dump_template_argument_list): Ditto.
5397 (dump_template_parameter): Dump `...' for template type parameter
5399 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
5400 (dump_parameters): Print function parameter packs.
5401 (dump_template_parms): Print template argument packs.
5402 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
5403 (maybe_warn_variadic_templates): New.
5404 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
5405 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
5406 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
5408 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
5409 (write_template_arg): Write argument packs as separate arguments.
5410 * cp-tree.h (struct template_parm_index_s): Add flag that
5411 indicates that the template parameter is actually a parameter
5413 (struct tree_argument_pack_select): New.
5414 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
5415 (union lang_tree_node): Add argument_pack_select.
5416 (FUNCTION_PARAMETER_PACK_P): New.
5417 (PACK_EXPANSION_P): New.
5418 (PACK_EXPANSION_PATTERN): New.
5419 (SET_PACK_EXPANSION_PATTERN): New.
5420 (PACK_EXPANSION_PARAMETER_PACKS): New.
5421 (ARGUMENT_PACK_P): New.
5422 (ARGUMENT_PACK_ARGS): New.
5423 (SET_ARGUMENT_PACK_ARGS): New.
5424 (ARGUMENT_PACK_INCOMPLETE_P): New.
5425 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
5426 (TEMPLATE_PARM_PARAMETER_PACK): New.
5427 (TEMPLATE_TYPE_PARAMETER_PACK): New.
5428 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
5429 (ARGUMENT_PACK_SELECT_INDEX): New.
5430 (ARGUMENT_PACK_SELECT_ARG): New.
5431 (struct cp_declarator): Add parameter_pack_p flag.
5432 (maybe_warn_variadic_templates): Declare.
5433 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
5434 indicate a template parameter pack.
5435 (uses_parameter_packs): Declare.
5436 (template_parameter_pack_p): Declare.
5437 (template_parms_variadic_p): Declare.
5438 (make_pack_expansion): Declare.
5439 (check_for_bare_parameter_packs): Declare.
5440 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
5441 sizeof... expressions.
5442 (pp_cxx_expression): Print pack expansions and non-type argument
5444 (pp_cxx_exception_specification): Print pack expansions.
5445 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
5446 (pp_cxx_ctor_initializer): Print pack expansions.
5447 (pp_cxx_type_id): Print pack expansions.
5448 (pp_cxx_template_argument_list): Print argument packs.
5449 (pp_cxx_template_parameter): Print ellipsis for template parameter
5451 * pt.c (comp_template_parms): Compare template parameter packs.
5452 (template_parameter_pack_p): New.
5453 (template_parms_variadic_p): New.
5454 (template_args_variadic_p): New.
5455 (make_ith_pack_parameter_name): New.
5456 (struct find_parameter_pack_data): New.
5457 (find_parameter_packs_r): New.
5458 (uses_parameter_packs): New.
5459 (make_pack_expansion): New.
5460 (check_for_bare_parameter_packs): New.
5461 (expand_template_argument_pack): New.
5462 (reduce_template_parm_level): Propagate parameter pack flag.
5463 (process_template_parm): Add is_parameter_pack parameter to state
5464 when the parameter is actually a parameter pack. Create template
5465 parameter packs when is_parameter_pack is true.
5466 (current_template_args): The argument for a template parameter
5467 pack is an argument pack containing a single pack expansion.
5468 (process_partial_specialization): When checking that non-type
5469 argument expressions do not involve template parameters, loop over
5470 the arguments in argument packs separately.
5471 (push_template_decl_real): Check that the type of the declaration
5472 does not have any bare parameter packs. Check that primary
5473 templates have no more than one parameter pack, and that it comes
5474 at the end of the template parameter list.
5475 (convert_template_argument): Handle coercions for pack expansion
5476 expressions by coercing the pattern then rebuilding the expansion.
5477 (coerce_template_parms): When coercing the arguments for a
5478 variadic template, pack "extra" arguments into an argument pack.
5479 (coerce_template_template_parms): Cannot coerce between parameter
5480 packs and non-pack parameters.
5481 (template_args_equal): Compare PACK_EXPANSION_P expressions.
5482 (comp_template_args): Expand all template arguments packs before
5483 comparing template argument lists.
5484 (mangle_class_name_for_template): Make argument packs as separate
5486 (for_each_template_parm_r): No need to handle BASELINK.
5487 (instantiate_class_template): Handle pack expansions in the base
5489 (tsubst_pack_expansion): New.
5490 (tsubst_template_args): Handle substitutions of argument packs and
5491 pack expansion into template argument lists.
5492 (tsubst_decl): Expand function parameter packs into separate
5493 function parameters.
5494 (tsubst_arg_types): Expand a type pack expansion into separate
5496 (tsubst_exception_specification): Handle pack expansions in
5497 exception specifiers.
5498 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
5499 replacing a template parameter with its argument. If we encounter
5500 a substitution for an argument pack, just return the parameter
5502 (tsubst_copy): sizeof(X...) returns the number of elements in
5503 parameter pack X. See through ARGUMENT_PACK_SELECT when the
5504 PARM_DECL is a parameter pack.
5505 (tsubst_expr): Expression pack expansions and argument packs
5506 cannot show up here; they will all be handled through function
5507 calls, sizeof, and template argument lists.
5508 (tsubst_copy_and_build): sizeof(X...) returns the number of
5509 elements in parameter pack X. Handle pack expansions in TREE_LIST
5510 and CONSTRUCTOR nodes.
5511 (fn_type_unification): Handle "incomplete" explicit template
5512 argument lists that specify some of the arguments for a template
5514 (type_unification_real): Unify arguments against pack expansions.
5515 (template_parm_level_and_index): New, helper function.
5516 (unify_pack_expansion): New.
5517 (unify): Unify argument packs on an argument-by-argument basis,
5518 handling variadic argument packs as well.
5519 (more_specialized_fn): Handle unification of function parameter
5520 packs. All things being equal, prefer non-variadic function
5521 templates to variadic function templates.
5522 (more_specialized_class): Prefer the variadic class template
5523 partial specialization that binds fewer arguments to a parameter
5525 (regenerate_decl_from_template): Expand function parameter packs
5526 into separate parameters.
5527 (instantiate_decl): Ditto.
5528 (tsubst_initializer_list): Handle pack expansions for base-class
5530 (dependent_type_p_r): Determine dependent types in argument packs
5531 and pack expansions.
5532 (value_dependent_expression_p): Determine value-dependence of
5533 non-type argument packs.
5534 (dependent_template_arg_p): Handle argument packs.
5535 * semantics.c (finish_cond): Check for bare parameter packs.
5536 (finish_expr_stmt): Ditto.
5537 (finish_for_expr): Ditto.
5538 (finish_switch_cond): Ditto.
5539 (finish_mem_initializers): Ditto.
5540 * name-lookup.c (arg_assoc_type): Handle pack expansions and
5542 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
5543 * parser.c (make_declarator): Declarator is not an expansion.
5544 (make_pointer_declarator): Transfer parameter pack flag to outer
5546 (make_reference_declarator): Ditto.
5547 (make_ptrmem_declarator): Ditto.
5548 (make_call_declarator): Ditto.
5549 (make_array_declarator): Ditto.
5550 (cp_parser_postfix_expression): Allow pack expansion expressions
5551 in the argument list for a call expression.
5552 (cp_parser_parenthesized_expression_list): Add new parameter
5553 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
5554 into separate arguments."
5555 (cp_parser_new_placement): Allow pack expansion expressions.
5556 (cp_parser_new_initializer): Ditto.
5557 (cp_parser_mem_initializer_list): Allow ellipsis to create a
5558 base-class initializer expansion.
5559 (cp_parser_mem_initializer): Ditto.
5560 (cp_parser_template_parameter_list): Keep track of whether the
5561 template parameter is a template parameter pack.
5562 (cp_parser_template_parameter): Parse the ellipsis to indicate a
5563 template parameter pack.
5564 (cp_parser_type_parameter): Ditto.
5565 (cp_parser_template_argument_list): Parse the ellipsis to indicate
5567 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
5568 this declarator is a parameter pack.
5569 (cp_parser_parameter_declaration): The ellipsis does not end the
5570 parameter declaration, because it might be a parameter pack. Parse
5571 the ellipsis to indicate a parameter pack.
5572 (cp_parser_initializer): Allow pack expansions.
5573 (cp_parser_initializer_list): Allow ellipsis to create an
5574 initializer expansion.
5575 (cp_parser_base_clause): Allow ellipsis to create a base specifier
5577 (cp_parser_type_id_list): Allow ellipsis to create an exception
5578 specifier expansion.
5579 (cp_parser_attribute_list): Don't allow pack expansions.
5580 (cp_parser_functional_cast): Allow pack expansions.
5581 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
5582 compute the length of a parameter pack.
5583 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
5584 end a template argument.
5585 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
5586 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
5589 2007-03-09 Dirk Mueller <dmueller@suse.de>
5591 * call.c (build_new_op): Call warn_logical_operator.
5593 2007-03-08 Volker Reichelt <v.reichelt@netcologne.de>
5596 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
5599 * pt.c (any_template_arguments_need_structural_equality_p):
5602 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
5604 * decl.c (grokdeclarator): Disable warnings for anonymous
5607 2007-03-05 Volker Reichelt <v.reichelt@netcologne.de>
5609 * typeck2.c (readonly_error): Always emit a hard error.
5610 Remove last argument.
5611 * cp-tree.h (readonly_error): Adjust prototype.
5612 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
5613 * typeck.c (build_unary_op): Likewise.
5614 (build_modify_expr): Likewise.
5616 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
5619 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
5621 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5624 * parser.c (struct cp_parser): New IN_IF_STMT.
5625 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
5626 returning if parsing the body of an 'if' statement or issuing an
5627 error and continuing.
5628 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
5630 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
5632 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
5635 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
5638 2007-03-02 Geoffrey Keating <geoffk@apple.com>
5640 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
5641 Objective-C++. Don't exit early if -shared-libgcc needs to be
5644 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5646 * typeck.c (common_base_type): Delete unused function.
5648 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
5650 * Make-lang.in: Add dummy lang.install-pdf target.
5652 2007-03-01 Simon Baldwin <simonb@google.com>
5655 * decl.c (check_tag_decl): Added new warning for typedef ignored
5656 when it precedes an otherwise valid non-typedef declaration.
5658 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
5660 * typeck.c (build_function_call): Store converted arguments
5661 in a stack-allocated array instead of building a list.
5662 (convert_arguments): Store arguments in the array passed in as an
5663 argument, and return the actual number of arguments.
5664 * call.c (build_call): Delete, and replace with...
5665 (build_call_n, build_call_a): New.
5666 (build_op_delete_call): Rewrite to avoid constructing argument lists.
5667 (build_over_call): Store converted arguments in a stack-allocated
5668 array instead of building a list.
5669 (build_cxx_call): Pass arguments in an array instead of as a list.
5670 (build_java_interface_fn_ref): Rewrite to avoid constructing
5672 * tree.h: Update declarations to reflect above changes.
5673 * method.c (use_thunk): Use a stack-allocated array to hold
5674 the arguments instead of a list.
5675 * rtti.c (throw_bad_cast): Update call to cxx_call.
5676 (throw_bad_typeid): Likewise.
5677 (build_dynamic_cast_1): Likewise.
5678 * init.c (build_builtin_delete_call): Use build_call_n.
5679 * decl.c (expand_static_init): Likewise.
5680 * except.c (cp_protect_cleanup_actions): Likewise.
5681 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
5682 (gimplify_must_not_throw_expr): Likewise.
5683 (cxx_omp_apply_fn): Use build_call_a.
5685 2007-02-26 Mark Mitchell <mark@codesourcery.com>
5687 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
5688 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
5690 2007-02-25 Mark Mitchell <mark@codesourcery.com>
5692 * cp-tree.h (static_ctors): Remove.
5693 * cp-tree.h (static_dtors): Likewise.
5694 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
5695 refactoring of tree_map hierarchy.
5696 (decl_shadowed_for_var_insert): Likewise.
5697 * semantics.c (expand_body): Use c_expand_body.
5698 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
5699 * decl2.c (static_ctors): Remove.
5700 (static_dtors): Likewise.
5701 (generate_ctor_or_dtor_function): Pass NULL_TREE to
5702 objc_generate_static_init_call. Do not call static_[cd]tors.
5703 (generate_ctor_and_dtor_functions_for_priority): Do not check for
5705 (cp_write_global_declarations): Likewise.
5707 2007-02-23 Richard Guenther <rguenther@suse.de>
5709 * class.c (note_name_declared_in_class): Make declaration
5710 changes meaning a pedwarn.
5712 2007-02-22 Michael Matz <matz@suse.de>
5715 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
5716 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
5717 dump_function_decl): Guard emitting outer scopes by new flag.
5718 * cp-lang.c (cxx_dwarf_name): New function.
5719 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
5720 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
5722 (push_template_decl_real, lookup_template_class): Remove calls
5725 2007-02-19 Mark Mitchell <mark@codesourcery.com>
5727 * call.c (build_new_method_call): Ensure that explicit calls of
5728 destructors have type "void".
5730 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5732 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
5733 and -Walways-true with -Waddress.
5734 * cvt.c (convert_to_void): Replace unconditional warning with
5737 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
5739 * decl.c, tree.c: Fix comment typos.
5741 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
5744 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
5745 statement expression if we had an error mark node.
5747 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
5748 Brooks Moses <brooks.moses@codesourcery.com>
5749 Lee Millward <lee.millward@codesourcery.com>
5751 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
5752 Change class to tcc_vl_exp.
5754 * call.c (build_call): Use build_call_list instead
5756 (build_over_call): Likewise.
5757 (build_new_method_call): Use build_min_non_dep_call_list
5758 instead of build_min_non_dep.
5760 * error.c (dump_call_expr_args): New function.
5761 (dump_aggr_init_expr_args): New function.
5762 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
5763 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
5765 * cvt.c (convert_to_void): Use build_call_array instead
5766 of build3; use new AGGR_INIT_EXPR accessor macros.
5768 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
5769 instead of TREE_CODE_LENGTH.
5771 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
5772 AGGR_INIT_EXPR accessor macros.
5774 * cp-gimplify.c (cp_gimplify_init_expr): Use
5775 AGGR_INIT_EXPR_SLOT to set the slot operand.
5777 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
5778 (AGGR_INIT_EXPR_SLOT): New macro.
5779 (AGGR_INIT_EXPR_ARG): New macro.
5780 (aggr_init_expr_nargs): New macro.
5781 (AGGR_INIT_EXPR_ARGP): New macro.
5782 (aggr_init_expr_arg_iterator): New.
5783 (init_aggr_init_expr_arg_iterator): New.
5784 (next_aggr_init_expr_arg): New.
5785 (first_aggr_init_expr_arg): New.
5786 (more_aggr_init_expr_args_p): New.
5787 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
5788 (stabilize_aggr_init): New declaration.
5789 (build_min_non_dep_call_list): Likewise.
5791 * tree.c (process_aggr_init_operands): New function.
5792 (build_aggr_init_array) New function.
5793 (build_cplus_new): Update to use new CALL_EXPR and
5794 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
5795 build_aggr_init_array.
5796 (build_min_non_dep_call_list) New function.
5797 (build_min_nt): Assert input code parameter is not a variable
5798 length expression class.
5799 (build_min, build_min_non_dep): Likewise.
5800 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
5801 to check for equality instead of recursing. Handle tcc_vl_exp
5803 (stabilize_call): Update to only handle CALL_EXPRs, not
5804 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
5805 (stabilize_aggr_init): New function.
5806 (stabilize_init): Use it.
5808 * cxx-pretty-print.c (pp_cxx_postfix_expression)
5809 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
5810 AGGR_INIT_EXPR accessor macros and argument iterators.
5812 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
5813 build_vl_exp. Iterate through the operands, recursively
5814 processing each one.
5815 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
5816 CALL_EXPR accessor macros.
5817 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
5818 tree code classes. Use TREE_OPERAND_LENGTH instead of
5821 * semantics.c (finish_call_expr): Use build_nt_call_list
5822 instead of build_nt.
5823 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
5824 accessor macros. Use build_call_array to construct the
5825 CALL_EXPR node instead of build3
5827 * decl2.c (build_offset_ref_call_from_tree): Use
5828 build_nt_call_list and build_min_non_dep_call_list instead
5829 of build_min_nt and build_min_non_dep.
5831 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
5832 Use build_nt_call_list instead of build_min_nt.
5834 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5837 * call.c (build_conditional_expr): Improve error message.
5839 2007-02-13 Dirk Mueller <dmueller@suse.de>
5841 * friend.c (do_friend): Annotate warning about friend
5842 declarations in templates with OPT_Wnon_template_friend.
5843 Convert informal message from warning() to inform().
5845 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
5846 Mark Mitchell <mark@codesourcery.com>
5849 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
5850 instantiations for variables.
5852 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5855 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
5856 Check warn_unused_value just once.
5858 2007-02-11 Mark Mitchell <mark@codesourcery.com>
5861 * pt.c (determine_specialization): Use skip_artificial_parms_for.
5862 (fn_type_unificiation): Likewise.
5863 (get_bindings): Likewise.
5865 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
5868 * decl.c (finish_function): Use DECL_REPLACEABLE.
5869 * tree.c (cp_cannot_inline_tree_fn): Likewise.
5871 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
5873 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
5875 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
5877 * decl.c (grokvardecl): Don't error if !have_tls.
5878 (grokdeclarator): Likewise.
5879 * parser.c (cp_parser_omp_threadprivate): Likewise.
5881 2007-02-07 Jakub Jelinek <jakub@redhat.com>
5884 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
5885 parameters and result decls in omp clauses.
5886 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
5889 2007-02-05 Dirk Mueller <dmueller@suse.de>
5892 * parser.c (cp_parser_class_specifier): Always initialize bases.
5894 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
5896 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
5897 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
5898 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
5900 * semantics.c (finish_omp_atomic): Store a whole expression node
5901 in operand 1, and integer_zero_node in operand 0, for dependent
5902 OMP_ATOMIC. Rewrite to make flow easier to understand.
5904 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5906 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
5908 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
5910 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
5911 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
5913 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
5915 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
5916 keyword warning to -Wc++0x-compat.
5918 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5920 * decl.c (grokdeclarator): Update documentation.
5922 2007-02-02 Jakub Jelinek <jakub@redhat.com>
5925 * decl.c (grokdeclarator): If __thread is used together with
5926 a storage class other than extern and static, clear thread_p
5927 after issuing diagnostics and fall through to checking the
5930 2007-01-30 Roger Sayle <roger@eyesopen.com>
5932 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
5933 calculating the size of an array (to avoid recursive errors).
5935 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5938 * typeck.c (build_binary_op): Fix logic for warning. Move warning
5940 * call.c (convert_like_real): Don't warn when converting to
5943 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5945 * decl.c (pop_label): Replace warning with call to
5946 warn_for_unused_label.
5948 2007-01-28 Andrew Pinski <pinskia@gmail.com>
5951 * semantics.c (finish_pseudo_destructor_expr): Check the
5952 destrutor name by calling check_dtor_name.
5954 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
5956 * lex.c (D_CPP0X): Rename.
5958 (reswords): D_CPP0X -> D_CXX0X.
5959 (init_reswords): Ditto.
5960 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
5961 of C++0x keywords as identifiers.
5963 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
5966 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
5969 2007-01-23 Ian Lance Taylor <iant@google.com>
5971 * typeck.c (convert_for_assignment): Only warn about a = b = c
5972 when converting to bool.
5974 2007-01-23 Roger Sayle <roger@eyesopen.com>
5976 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
5978 * typeck.c (ignore_overflows): Remove the remaining uses of
5979 TREE_CONSTANT_OVERFLOW.
5981 2007-01-20 Jan Hubicka <jh@suse.cz>
5983 * decl2.c (start_objects, start_static_storage_duration_function):
5984 Do not make the functions uninlinable.
5986 2007-01-17 Ian Lance Taylor <iant@google.com>
5988 * class.c (add_method): Call VEC_reserve_exact rather than passing
5989 a negative size to VEC_reserve.
5991 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
5994 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
5996 2007-01-10 Mark Mitchell <mark@codesourcery.com>
5999 * decl.c (make_typename_type): If the qualified name is not a
6000 type, issue an error.
6001 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
6004 2007-01-08 Geoffrey Keating <geoffk@apple.com>
6006 * rtti.c: Include target.h.
6007 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
6008 don't emit typeinfo for fundamental types as weak.
6009 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
6011 2007-01-08 Richard Guenther <rguenther@suse.de>
6013 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
6015 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
6017 * call.c (standard_conversion): Pass flag to
6018 vector_types_convertible_p to disallow emission of note.
6019 * typeck.c (convert_for_assignment): Pass flag to
6020 vector_types_convertible_p to allow emission of note.
6021 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
6022 to disallow emission of note.
6024 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6027 * typeck.c (build_binary_op): Call overflow_warning if
6028 TREE_OVERFLOW_P is true for the result and not for any of the
6031 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
6034 * class.c (add_method): Don't wait until template
6035 instantiation time to complain about duplicate methods.
6037 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6040 * semantics.c (finish_unary_op_expr): Warn only if result
6041 overflowed and operands did not.
6043 2007-01-05 Ian Lance Taylor <iant@google.com>
6045 * typeck.c (build_binary_op): Warn about comparing a non-weak
6048 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
6050 * pt.c (tsubst): Propagate the need for structural equality checks
6051 when reducing the level of template parameters.
6053 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
6055 * pt.c: Fix a comment typo.
6057 2007-01-02 Ian Lance Taylor <iant@google.com>
6059 * semantics.c (maybe_convert_cond): Optionally warn when using an
6060 assignment as a condition.
6061 * typeck.c (convert_for_assignment): Optionally warn about
6062 assigning the result of an assignment to a bool.
6064 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
6066 * pt.c (canonical_template_parms): Correct typo in comment.
6068 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
6070 * typeck.c (structural_comptypes): Renamed from "comptypes".
6071 (comptypes): Use canonical type information to perform fast type
6072 comparison. When VERIFY_CANONICAL_TYPES, verify that the
6073 canonical type comparison returns the same results as we would see
6074 from the current, structural check. Support COMPARE_STRUCTURAL
6075 when we need structural checks.
6076 * decl.c (typename_compare): Fix comment.
6077 (build_typename_type): TYPENAME_TYPE nodes require structural
6078 equality checks, because they resolve different based on the
6080 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
6081 require structural equality checks (for now).
6082 (build_ptrmemfunc_type): Build the canonical pointer to member
6084 (compute_array_index_type): Whenever we build a new index type
6085 to represent the size of an array in a template, we need to mark
6086 this index type as requiring structural equality. This goes for
6087 arrays with value-dependent sizes with the current ABI, or all
6089 * tree.c (cplus_array_hash): New.
6090 (struct cplus_array_info): New.
6091 (cplus_array_compare): New.
6092 (cplus_array_htab): New.
6093 (build_cplus_array_type_1): Use a hash table to cache the array
6094 types we build. Build the canonical array type for each array
6096 (cp_build_qualified_type_real): When building a cv-qualified array
6097 type, use the hash table of array types and build canonical array
6099 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
6100 use structural equality (for now).
6101 * cp-tree.h (COMPARE_STRUCTURAL): New.
6102 * pt.c (canonical_template_parms): New.
6103 (canonical_type_parameter): New.
6104 (process_template_parm): Find the canonical type parameter.
6105 (lookup_template_class): When we have named the primary template
6106 type, set the canonical type for our template class to the primary
6107 template type. If any of the template arguments need structural
6108 equality checks, the template class needs structural equality
6110 (tsubst): When reducing the level of a template template
6111 parameter, we require structural equality tests for the resulting
6112 parameter because its template parameters have not had their types
6113 canonicalized. When reducing a template type parameter, find the
6114 canonical reduced type parameter.
6115 (any_template_arguments_need_structural_equality_p): New.