1 2008-10-06 Aldy Hernandez <aldyh@redhat.com>
3 * typeck.c (build_x_indirect_ref): Add location argument.
4 (cp_build_binary_op): Pass location to warn_for_div_by_zero.
5 (cp_build_unary_op): Add location argument.
6 (cp_build_modify_expr): Same.
7 * class.c (build_base_path): Pass location to build_indirect_ref.
8 * semantics.c (handle_omp_for_class_iterator): Pass elocus to
11 2008-10-05 Dodji Seketeli <dodji@redhat.com>
14 * cp-gimplify.c (cp_gimplify_expr): For each USING_STMT
15 make sure an IMPORTED_DECL node is added to the BLOCK_VARS list
16 of the innermost containing BLOCK.
18 2008-10-03 Paolo Carlini <paolo.carlini@oracle.com>
21 * error.c (dump_function_decl): Save the exceptions in case of
22 error about incompatible specifications in a specialization.
24 2008-10-01 Andrew Pinski <andrew_pinski@playstation.sony.com>
26 * tree.c (lvalue_p_1): COMPOUND_LITERAL_EXPR is also an lvalue.
28 2008-09-30 H.J. Lu <hongjiu.lu@intel.com>
31 * parser.c (cp_parser_selection_statement): Fix uninitialized
34 2008-09-30 Simon Martin <simartin@users.sourceforge.net>
38 * decl.c (grokdeclarator): Set the type for typedefs to a
39 nested-name-specifier to error_mark_node.
41 2008-09-30 Paolo Bonzini <bonzini@gnu.org>
43 * parser.c (cp_parser_selection_statement): Implement here the
44 -Wempty-body warning for `if' and `else' statements.
45 * semantics.c (finish_if_stmt): Do not call empty_body_warning.
47 2008-09-25 Paolo Carlini <paolo.carlini@oracle.com>
50 * name-lookup.c (maybe_process_template_type_declaration): Check
51 return value of push_template_decl_real for error_mark_node.
53 2008-09-24 Aldy Hernandez <aldyh@redhat.com>
55 * semantics.c (finish_fname): Pass location to fname_decl.
57 2008-09-23 Jakub Jelinek <jakub@redhat.com>
60 * semantics.c (finish_omp_for): If processing_template_decl, just build
61 MODIFY_EXPR for init instead of calling cp_build_modify_expr.
63 2008-09-23 Aldy Hernandez <aldyh@redhat.com>
65 * typeck.c (build_array_ref): Pass location to cp_build_binary_op.
66 (get_member_function_from_ptrfunc): Same.
67 (build_x_binary_op): Same.
68 (build_binary_op): Same.
69 (cp_build_binary_op): New location argument.
70 (pointer_diff): Pass location to cp_build_binary_op.
71 (cp_truthvalue_conversion): Pass location to build_binary_op.
72 (convert_ptrmem): Pass location to cp_build_binary_op.
73 (cp_build_modify_expr): Same.
74 (build_ptrmemfunc): Same.
75 * init.c (expand_cleanup_for_base): Pass location to
76 c_common_truthvalue_conversion.
77 (build_new_1): Pass location to cp_build_binary_op.
78 (build_vec_delete_1): Pass location to *build_binary_op,
79 c_common_truthvalue_conversion.
80 (build_vec_init): Same.
82 * decl.c (compute_array_index_type): Same.
83 * call.c (build_new_op): Same.
84 * rtti.c (build_dynamic_cast_1): Same.
85 * cp-tree.h: Add argument to cp_build_binary_op.
86 * semantics.c (handle_omp_for_class_iterator): Pass location to
87 *build_binary_op, c_common_truthvalue_conversion.
88 * decl2.c (get_guard_cond): Same.
90 2008-09-17 Richard Guenther <rguenther@suse.de>
93 * rtti.c (build_dynamic_cast_1): Convert the COND_EXPR
94 result to the correct type.
96 2008-09-17 H.J. Lu <hongjiu.lu@intel.com>
99 * name-lookup.c (pushdecl_maybe_friend): Don't return the old
100 parameter for duplicate.
102 2008-09-17 Jason Merrill <jason@redhat.com>
105 * name-lookup.c (lookup_type_scope): Look through sk_function_parms.
107 2008-09-17 Jakub Jelinek <jakub@redhat.com>
110 * typeck.c (build_array_ref): Use protected_set_expr_location instead
111 of SET_EXPR_LOCATION when ret might not be an expression.
113 2008-09-17 Jan Hubicka <jh@suse.cz>
116 * cp/decl.c (start_method): Set DECL_NO_INLINE_WARNING_P.
118 2008-09-16 Jakub Jelinek <jakub@redhat.com>
121 * semantics.c (finish_compound_literal): Return error_mark_node if
125 * lex.c (init_reswords): Don't populate ridpointers for D_CONLY
128 2008-09-15 Aldy Hernandez <aldyh@redhat.com>
130 * decl.c (duplicate_decls): Call error_at.
131 (grokfndecl): New location argument. Use location if available.
132 (grokdeclarator): Pass declarator location to grokfndecl.
133 * cp-tree.h (struct cp_declarator): Update comment for id_loc.
134 * decl2.c (check_classfn): Use error_at.
135 * parser.c (cp_parser_init_declarator): Set function_start_locus
137 (cp_parser_member_declaration): Set id_loc for function declarators.
139 2008-09-09 Jan Hubicka <jh@suse.cz>
142 * pt.c (tsubst_decl): Do not copy DECL_STRUCT_FUNCTION pointer.
144 2008-09-09 Jakub Jelinek <jakub@redhat.com>
147 * tree.c (array_type_nelts_top): Add size_one_node instead of
150 2008-09-09 Jason Merrill <jason@redhat.com>
153 * pt.c (tsubst_copy) [PARM_DECL]: Don't abort if the parm has
156 2008-09-09 Jakub Jelinek <jakub@redhat.com>
159 * decl.c (build_enumerator): Handle previous value's DECL_INITIAL
160 being error_operand_p. Don't clear value if it was error_mark_node.
162 2008-09-09 Paolo Bonzini <bonzini@gnu.org>
164 * cp-objcp-common.h (LANG_HOOKS_EXPAND_DECL): Remove.
165 * cp-tree.h: Don't mention DECL_ANON_UNION_ELEMS.
166 * semantics.c (anon_aggr_type_p): Remove.
168 2008-09-06 Jason Merrill <jason@redhat.com>
171 * parser.c (cp_parser_parameter_declaration_list): Process the
172 PARM_DECLs as we go and push them. Return a TREE_LIST.
173 (cp_parser_parameter_declaration_clause): Return a TREE_LIST.
174 (cp_parser_direct_declarator): Create a binding level and
175 suppress deprecated warnings in the parameter list.
176 (make_call_declarator): PARMS is now a tree.
177 * cp-tree.h (struct cp_declarator): Function parms are now a tree.
178 * decl.h (enum deprecated_states, deprecated_state): Move here.
180 (type_is_deprecated): New fn.
181 (grokparms): PARMLIST is a tree now. Warn about parms that
182 use deprecated types.
183 * mangle.c (write_expression): Handle PARM_DECL, CALL_EXPR and
185 * pt.c (tsubst) [DECLTYPE_TYPE]: Set skip_evaluation.
186 (tsubst_copy) [PARM_DECL]: Handle a PARM_DECL used outside of a
188 * name-lookup.c (pushtag): Look through function parameter scopes.
189 (pushdecl_maybe_friend): Don't set DECL_CONTEXT on a PARM_DECL
190 when we're parsing a function declarator.
192 2008-09-05 Douglas Gregor <doug.gregor@gmail.com>
195 * tree.c (cp_build_qualified_type_real): Deal with sharing of
196 TYPE_LANG_SPECIFIC in the canonical types of pointer-to-method
199 2008-09-04 Ian Lance Taylor <iant@google.com>
201 * parser.c (check_no_duplicate_clause): Change code parameter to
202 enum omp_clause_code.
204 2008-09-03 Jakub Jelinek <jakub@redhat.com>
207 * decl.c (cp_finish_decl): Only set
208 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P if decl is VAR_DECL.
211 * cp-tree.h (defer_mark_used_calls, deferred_mark_used_calls): New
213 * decl2.c (mark_used): If defer_mark_used_calls, push decl into
214 deferred_mark_used_calls vector and exit early.
215 * decl.c (defer_mark_used_calls, deferred_mark_used_calls): New
217 (finish_function): Set defer_mark_used_calls for the duration of the
218 function. Call mark_used on any queued decls.
220 2008-09-02 Jason Merrill <jason@redhat.com>
223 * call.c (build_over_call): Make =delete work with SFINAE.
224 * class.c (resolve_address_of_overloaded_function): Likewise.
226 * cp-tree.h (struct lang_decl_flags): Rename threadprivate_p to
227 threadprivate_or_deleted_p.
228 (CP_DECL_THREADPRIVATE_P): Adjust.
229 (DECL_DELETED_FN): Likewise.
230 (SD_UNINITIALIZED, SD_INITIALIZED, SD_DEFAULTED): New macros.
231 (SD_DELETED): New macro.
232 * parser.c (cp_parser_init_declarator): Use them.
233 * decl.c (start_decl): Use them.
235 * decl2.c (mark_used): Give =deleted error even in sizeof.
237 * typeck2.c (check_narrowing): Downgrade narrowing error to
240 2008-09-02 Aldy Hernandez <aldyh@redhat.com>
242 * typeck.c (build_array_ref): Use new location argument.
243 * class.c (build_vtbl_ref_1): Pass location to build_array_ref.
244 * call.c (build_new_op): Same.
245 * decl2.c (grok_array_decl): Same.
246 * cp-tree.h (build_array_ref): Add location argument to prototype.
248 2008-09-01 Aldy Hernandez <aldyh@redhat.com>
250 * typeck.c (build_x_indirect_ref): Add location argument.
251 * class.c (build_base_path): Pass location to build_indirect_ref.
252 * pt.c (tsubst_copy_and_build): Pass location to
253 finish_label_address_expr.
254 * parser.c (cp_parser_unary_expression): Same.
256 2008-08-31 Jason Merrill <jason@redhat.com>
258 Implement late-specified return type using 'auto'.
259 * cp-tree.h (struct cp_declarator): Add late_return_type field to
261 * parser.c (cp_parser_late_return_type_opt): New fn.
262 (cp_parser_direct_declarator): Use it.
263 (make_call_declarator): Put it in the declarator.
264 * decl.c (grokdeclarator): Splice in late-specified return type.
265 * pt.c (splice_late_return_type): New fn.
267 2008-08-29 Michael Meissner <gnu@the-meissners.org>
269 * decl.c (builtin_function_1): Take a bool argument to decide
270 whether to use pushdecl or pushdecl_top_level.
271 (duplicate_decls): Copy function specific target and optimization
272 options on duplicate declarations.
273 (cxx_builtin_function): Update builtin_function_1 call.
274 (cxx_builtin_function_ext_scope): New function, guarantee that the
275 declaration is done at global scope.
277 * cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE): New
278 macro, define builtin function hook for delayed machine specific
281 * cp-tree.h (cxx_builtin_function_ext_scope): Add declaration.
283 2008-08-30 Jason Merrill <jason@redhat.com>
286 * pt.c (dependent_type_p): Don't abort on auto outside of a template.
288 2008-08-29 Jason Merrill <jason@redhat.com>
290 Implement C++0x 'auto' semantics.
291 * decl.c (start_decl_1): Don't complain about auto being incomplete.
292 (cp_finish_decl): Deduce auto.
293 * init.c (build_new): Handle 'new auto'.
294 * typeck2.c (cxx_incomplete_type_diagnostic): Give a different
295 message for auto than for normal template type parms.
296 * pt.c (type_dependent_expression_p): Handle { }.
297 (make_auto): New function.
298 (listify_autos): New function.
299 (do_auto_deduction): New function.
300 (is_auto): New function.
301 (type_uses_auto): New function.
302 * cp-tree.h: Declare them.
303 * parser.c (cp_parser_decl_specifier_seq): In C++0x mode, don't
304 treat auto as a declspec.
305 (cp_parser_simple_type_specifier): It's a type-specifier.
307 2008-08-29 Mark Mitchell <mark@codesourcery.com>
309 * mangle.c (write_type): Add target-specific manglings for
310 non-fundamental types to the substitution table.
313 2008-08-29 Jakub Jelinek <jakub@redhat.com>
317 * name-lookup.c (do_using_directive, cp_emit_debug_info_for_using):
318 Adjust debug_hooks->imported_module_or_decl callers.
320 2008-08-29 Jan Hubicka <jh@suse.cz>
322 * cp-gimplify.c (cp_gimplify_expr): Add PRED_CONTINUE heuristic.
324 2008-08-28 Paolo Carlini <paolo.carlini@oracle.com>
327 * decl.c (reshape_init_r): Check init for error_mark_node.
329 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
332 * semantics.c (maybe_convert_cond): Call verify_sequence_points.
333 (finish_return_stmt): Likewise.
334 (finish_switch_condition): Likewise.
336 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
338 * cp-tree.h: Fix #error directive.
340 2008-08-26 Douglas Gregor <doug.gregor@gmail.com>
342 * typeck.c (type_after_usual_arithmetic_conversions): Don't do the
343 usual arithmetic conversions on scoped enumeration types.
344 (common_type): Ditto.
345 (default_conversion): Don't perform integral promotions on scoped
347 (build_array_ref): Scoped enumeration types can't be used as
349 * decl.c (start_enum): If building a C++0x scoped enumeration,
350 enter its scope. If provided with an underlying type, check that
351 underlying type and set up the enumeration type accordingly.
352 (finish_enum): Only compute an underlying type if the underlying
353 type isn't already fixed, and only convert the enumerator values
354 now if we've just computed the underlying type. Finish the scope
355 of C++0x scoped enumerations.
356 (build_enumerator): For enumerations with a fixed underlying type,
357 check the enumerator values when the enumerator is defined.
358 (lookup_enumerator): New.
359 * call.c (standard_conversion): Don't allow assignment from
360 integers to scoped enumeration types, even with -fpermissive.
361 Don't convert from scoped enumerations to bool or any arithmetic
363 (build_conditional_expr): Don't per the usual arithmetic
364 conversions for scoped enumeration types.
365 (convert_like_real): Check complain to see if we should
367 * error.c (class_key_or_enum_as_string): Print scoped enums.
368 * cp-tree.h (MAYBE_CLASS_TYPE_P): Check CLASS_TYPE_P, not
370 (INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P): New.
371 (SCOPED_ENUM_P): New.
372 (UNSCOPED_ENUM_P): New.
373 (SET_SCOPED_ENUM_P): New.
374 (ENUM_UNDERLYING_TYPE): New.
375 * pt.c (lookup_template_class): Update the instantiation of enum
376 types to deal with C++0x scoped enumerations and underlying
378 * name-lookup.c (begin_scope): Deal with scoped enumeration
380 (lookup_qualified_name): Deal with lookup into enumeration types.
381 * name-lookup.h (enum scope_kind): Add sk_scoped_enum.
382 * parser.c (cp_parser_class_or_namespace_name): Rename to...
383 (cp_parser_qualifying_entity): ... this. Also, in C++0x mode,
384 parse a type-name that can be an enumeration type.
385 (cp_parser_nested_name_specifier_opt): Update with C++0x grammar.
386 (cp_parser_elaborated_type_specifier): Parse the
387 optional `struct' or `class' following enum (in C++0x).
388 (cp_parser_enum_specifier): Parse C++0x scoped enumerations and
391 2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
393 * typeck.c: Update all calls to pedwarn.
398 * name-lookup.c: Likewise.
399 * parser.c: Likewise.
401 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
404 * parser.c (cp_parser_omp_for_loop): Handle parenthesized
407 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
409 * parser.c: Update all calls to inform.
410 * typeck.c: Likewise.
414 * method.c: Likewise.
415 * friend.c: Likewise.
416 * typeck2.c: Likewise.
418 * name-lookup.c: Likewise.
421 2008-08-19 Jakub Jelinek <jakub@redhat.com>
424 * error.c (cp_print_error_function): Deal with recursive BLOCK trees.
426 2008-08-18 Tomas Bily <tbily@suse.cz>
428 * tree.c (cp_tree_equal): Use CONVERT_EXPR_CODE_P.
430 2008-08-18 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
432 * typeck.c: Update all callers of permerror.
437 * except.c: Likewise.
439 * typeck2.c: Likewise.
441 * semantics.c: Likewise.
442 * name-lookup.c: Likewise.
445 * parser.c: Likewise.
447 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
450 * pt.c (check_template_shadow): Change to return a bool.
451 * name-lookup.c (push_class_level_binding): Early return if
452 check_template_shadow returns false.
453 * cp-tree.h (check_template_shadow): Adjust declaration.
455 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
458 * decl.c (grokdeclarator): In case of extern and initializer, return
459 error_mark_node after the error.
461 2008-08-13 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
464 * decl.c (grokfndecl): Call check_main_parameters_type only if
467 2008-08-12 Paolo Carlini <paolo.carlini@oracle.com>
470 * parser.c (cp_parser_class_head): Early return error_mark_node in
471 case of global qualification of class name or qualified name that
472 does not name a class.
474 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
477 * cvt.c (ocp_convert): Warn for out-of-range conversions to enum.
479 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
482 * cp-tree.h (struct diagnostic_context, struct diagnostic_info):
483 Delete forward declarations. Check that toplev.h has not been
484 included before this file. Include toplev.h and diagnostic.h.
485 * error.c (cp_cpp_error): Use DK_PEDWARN.
486 (cxx_incomplete_type_diagnostic): Update declaration.
487 (cxx_incomplete_type_error): Use DK_ERROR.
488 * typeck2.c (cxx_incomplete_type_diagnostic): Take a diagnostic_t
489 as argument. Use emit_diagnostic.
490 (cxx_incomplete_type_error): Use DK_ERROR.
491 (add_exception_specifier): Use diagnostic_t instead of custom
493 * typeck.c (complete_type_or_else): Update call to
494 cxx_incomplete_type_diagnostic.
495 * init.c (build_delete): Likewise.
496 * call.c (diagnostic_fn_t): Remove unused typedef.
497 (build_temp): Pass a pointer to diagnostic_t.
498 (convert_like_real): Use emit_diagnostic.
499 (joust): Check return value of warning before giving informative
501 * friend.c (do_friend): Check return value of warning
502 before giving informative note.
503 * parser.c (cp_parser_template_id): Likewise.
505 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
508 * class.c (check_bases_and_members): Warn with -Wuninitialized
511 2008-08-08 Volker Reichelt <v.reichelt@netcologne.de>
514 * decl.c (xref_basetypes): Check base for MAYBE_CLASS_TYPE_P,
515 and make sure it is not a union.
517 2008-08-07 H.J. Lu <hongjiu.lu@intel.com>
519 * semantics.c (finish_decltype_type): Initialize type.
521 2008-08-07 Douglas Gregor <doug.gregor@gmail.com>
523 * semantics.c (finish_decltype_type): Handle calls to function
524 pointers and references to functions properly.
526 2008-08-06 Douglas Gregor <doug.gregor@gmail.com>
529 * parser.c (cp_parser_template_argument): Don't assume that '>>'
530 following a type-id is an error when in C++0x mode.
532 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
535 * decl.c (grokdeclarator): Use explicit location with permerror_at.
537 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
540 * typeck.c (cp_build_binary_op): Move code to c-common.c.
542 2008-08-05 Jason Merrill <jason@redhat.com>
545 * decl.c (build_ptrmemfunc_type): Don't require structural
546 comparison of PMF types.
547 * tree.c (cp_build_qualified_type_real): Don't clear
548 a valid TYPE_PTRMEMFUNC_TYPE.
549 * typeck.c (cp_build_unary_op): Still do build_ptrmemfunc in
552 2008-08-04 Jason Merrill <jason@redhat.com>
555 * typeck2.c (check_narrowing): Allow narrowing conversion
556 from an explicit floating-point constant.
559 * pt.c (tsubst_decl): Leave DECL_INITIAL set on deleted
562 2008-08-04 Simon Baldwin <simonb@google.com>
565 * parser.c (cp_parser_elaborated_type_specifier): Warn only when
566 the declaration's id is followed by a semicolon.
568 2008-07-31 Jakub Jelinek <jakub@redhat.com>
571 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Call
572 complete_type_or_else even for UNKNOWN_TYPE to get diagnostics.
574 2008-07-31 Jason Merrill <jason@redhat.com>
577 * init.c (build_new_1): Don't convert pointer to the data type
578 until we're actually going to treat it as that type.
581 * tree.c (build_aggr_init_expr): Split out...
582 (build_cplus_new): ...from here.
583 (stabilize_init): Don't mess with AGGR_INIT_EXPR either.
584 * init.c (build_new_1): new T() means value-initialization,
585 not default-initialization.
586 (build_vec_init): Likewise.
587 (build_value_init_1): Use build_aggr_init_expr.
589 2008-07-30 Dodji Seketeli <dseketel@redhat.com>
592 * decl2.c (fix_temporary_vars_context_r): New function.
593 (one_static_initialization_or_destruction): Make sure temporary
594 variables part of the initialiser have their DECL_CONTEXT()
597 2008-07-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
600 * typeck.c (build_binary_op): Encapsulate code into
603 2008-07-29 Jakub Jelinek <jakub@redhat.com>
606 * tree.c (cplus_array_hash, build_cplus_array_type_1): Hash on
607 TYPE_UID instead of pointers.
609 2008-07-29 Jan Hubicka <jh@suse.cz>
611 * optimize.c (maybe_clone_body): Remove DECL_INLINE.
612 * decl.c (duplicate_decls): Likewise.
613 (grokfndecl): Likewise.
614 (start_method): Likewise.
615 * method.c (make_thunk, make_alias_for, implicitly_declare_fn):
617 * pt.c (register_specialization, regenerate_decl_from_template):
619 * decl2.c (grokfield): Likewise.
621 2008-07-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
624 * decl.c (duplicate_decls): Merge USED flags.
626 2008-07-27 Jason Merrill <jason@redhat.com>
629 * decl.c (reshape_init_r): Allow C++0x initializer lists.
631 2008-07-28 Richard Guenther <rguenther@suse.de>
633 Merge from gimple-tuples-branch.
635 2008-07-22 Aldy Hernandez <aldyh@redhat.com>
637 * cp-gimplify.c (gimplify_if_stmt): Set location on newly created
640 2008-07-18 Jakub Jelinek <jakub@redhat.com>
642 * decl.c (finish_function): Call gimple_body after cp_genericize.
644 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
646 * optimize.c: Include gimple.h instead of tree-gimple.h.
647 * Make-lang.in (cp-gimplify.o): Depend on tree-iterator.h.
648 * cp-gimplify.c: Rename tree-gimple.h to gimple.h. Include
651 2008-07-16 Jakub Jelinek <jakub@redhat.com>
653 * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE for the clone.
655 2008-07-14 Jakub Jelinek <jakub@redhat.com>
657 * cp-gimplify.c (cp_gimplify_expr): Update comment.
659 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
661 * cp-tree.h (union lang_tree_node): Rename GENERIC_NEXT to
663 * cp-gimplify.c (cxx_omp_clause_apply_fn): Rename
664 GIMPLE_MODIFY_STMT to MODIFY_EXPR.
665 (cxx_omp_clause_copy_ctor): Same.
666 (cxx_omp_clause_assign_op): Same.
668 2008-05-28 Jakub Jelinek <jakub@redhat.com>
670 * cp-gimplify.c (cp_gimplify_omp_for): Add pre_p argument. Tuplify.
671 (cp_gimplify_expr): Adjust caller.
673 2008-05-11 Doug Kwan <dougkwan@google.com>
675 * init.c (build_vec_delete): Add type conversion for argument
676 0 of POINTER_PLUS_EXPR.
678 2008-04-29 Doug Kwan <dougkwan@google.com>
680 * decl2 (File): Include "gimple.h"
681 (cp_write_global_declarations): Use gimple_body instead of
683 * Make-lang.in (cp/decl2.o): Add $(GIMPLE_H)
685 2008-04-10 Diego Novillo <dnovillo@google.com>
687 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00913.html
689 * optimize.c (maybe_clone_body): Re-enable call to
691 * cp-gimplify.c (cp_gimplify_omp_for): Mark disabled
692 code with call to gimple_unreachable.
693 (cp_genericize): Fix handling of clone bodies.
695 2008-04-04 Diego Novillo <dnovillo@google.com>
697 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00413.html
699 * optimize.c (maybe_clone_body): Re-enable.
701 2008-02-19 Diego Novillo <dnovillo@google.com>
702 Oleg Ryjkov <olegr@google.com>
704 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
706 * cp-gimplify.c (gimplify_for_stmt): Change gimple_seq
707 argument to gimple_seq *. Update all users.
708 (gimplify_must_not_throw_expr): Likewise.
710 2008-02-04 Oleg Ryjkov <olegr@google.com>
712 * except.c: Include gimple.h
713 (cp_protect_cleanup_actions): Convert to tuples.
714 * Make-lang.in (cp/except.o): Add dependency on gimple.h
716 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
718 * cp-gimplify.c (gimplify_cp_loop): Call tree_annotate_all_with_locus
719 instead of annotating each block manually.
721 2007-10-30 Aldy Hernandez <aldyh@redhat.com>
723 * cp-gimplify.c (gimplify_cp_loop): Tuplify.
724 (gimplify_for_stmt): Same.
725 (gimplify_switch_stmt): Same.
726 (cp_gimplify_expr): [FOR_STMT]: Do not call gimplify_for_stmt. Return
728 [WHILE_STMT]: Return GS_OK.
730 [CONTINUE_STMT]: Same.
732 (cp_genericize): Set gimple_body() of cloned functions when needed.
734 2007-10-29 Aldy Hernandez <aldy@quesejoda.com>
736 * cp-gimplify.c: Move build_gimple_eh_filter_tree here.
737 (cp_gimplify_init_expr): Convert to tuples.
738 (gimplify_must_not_throw_expr): Make function return a
739 gimplify_status and convert to tuples.
741 2007-10-18 Aldy Hernandez <aldy@quesejoda.com>
743 * cp-gimplify.c (genericize_try_block): Enable and do not call
745 (genericize_catch_block): Same.
746 (genericize_eh_spec_block): Same.
747 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
748 (cp_gimplify_expr): Enable TRY_BLOCK, HANDLER, and EH_SPEC_BLOCK.
750 2007-10-16 Aldy Hernandez <aldy@quesejoda.com>
752 * optimize.c (maybe_clone_body): Comment out call to clone_body.
753 * decl.c (finish_function): Use gimple_body instead of
755 * cp-tree.h (cp_gimplify_expr): Last 2 arguments are sequences.
756 * cp-gimplify.c (genericize_try_block): Comment out.
757 (genericize_catch_block): Same.
758 (genericize_eh_spec_block): Same.
759 (gimplify_cp_loop): Comment out calls to gimplify_stmt.
760 (gimplify_for_stmt): Comment out.
761 (gimplify_switch_stmt): Comment out call to gimplify_stmt.
762 (cp_gimplify_omp_for): Same.
763 (gimplify_must_not_throw_expr): Argument pre_p is a sequence.
764 Comment out call to gimplify_stmt and append_to_statement_list.
765 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
766 (cp_gimplify_init_expr): Arguments pre_p and post_p are sequences.
767 (cp_gimplify_expr): Same.
768 Comment out calls to genericize_*_block. Comment out call to
771 2008-07-27 H.J. Lu <hongjiu.lu@intel.com>
774 * class.c (type_has_user_provided_default_constructor): Handle
777 2008-07-27 Paolo Carlini <paolo.carlini@oracle.com>
779 * decl.c (push_library_fn): Add a parameter for the exceptions that
780 the function may throw.
781 (push_void_library_fn, push_throw_library_fn, expand_static_init):
783 (build_library_fn): Change to static.
784 * cp-tree.h: Adjust declarations.
785 * except.c (declare_nothrow_library_fn): New.
786 (do_get_exception_ptr, do_begin_catch, do_free_exception,
787 do_allocate_exception): Use the latter, adjust the declarations
788 (ie, add empty exception-specification), consistently with the
789 actual implementation in libsupc++.
791 2008-07-25 Jan Hubicka <jh@suse.cz>
793 * typeck.c (inline_conversion): Remove.
794 (cp_build_function_call): Do not use inline_conversion.
795 * decl.c (duplicate_decls): Do not insist on inline being declared
797 (start_cleanup_fn): Do not assume that INLINE flags prevent function
798 from being output. We now remove static functions always.
799 (finish_function): Do return warning on all static functions.
800 * call.c (build_over_call): Do not use inline_conversion.
801 * cp-tree.h (possibly_inlined_p): Declare.
802 (inline_conversion): Remove.
803 * pt.c (instantiate_decl): Use possibly_inlined_p predicate.
804 * decl2.c (cp_write_global_declarations): Likewise.
805 (mark_used): Likewise.
806 (possibly_inlined_p): New functions.
808 2008-07-25 Jason Merrill <jason@redhat.com>
810 * class.c (type_has_user_provided_default_constructor): Handle
813 2008-07-23 Jan Hubicka <jh@suse.cz>
815 * decl.c (duplicate_decls): Update comment and unit-at-a-time.
816 (grogfndecl): Drop flag_inline_trees code.
817 * pt.c (instantiate_decl): Drop flag_iline_trees code.
818 * lex.c (cxx_init): Do not set unit-at-a-time.
820 2008-07-23 Jason Merrill <jason@redhat.com>
822 * mangle.c (write_unqualified_name): Avoid infinite recursion when
823 trying to mangle a decl with no name.
825 Implement defaulted/deleted functions as per N2346
826 * cp-tree.h (struct lang_decl_flags): Add defaulted_p bitfield.
827 (DECL_DELETED_FN): New macro.
828 (DECL_DEFAULTED_FN): New macro.
829 * class.c (user_provided_p): New fn.
830 (defaultable_fn_p): New fn.
831 (type_has_user_provided_constructor): New fn.
832 (type_has_user_provided_default_constructor): New fn.
833 (check_methods): A defaulted fn is still trivial.
834 (check_bases_and_members): Likewise.
835 * decl.c (grok_special_member_properties): Likewise.
836 (duplicate_decls): Complain about redeclaring a function as deleted.
837 (start_decl): initialized==2 means deleted.
838 (cp_finish_decl): Handle deleted/defaulted semantics.
839 * decl2.c (grokfield): Likewise.
840 (mark_used): Check DECL_DEFAULTED_FN instead of DECL_ARTIFICIAL.
841 Complain about using a deleted fn.
842 * init.c (build_value_init_1): Use type_has_user_provided_constructor.
843 (perform_member_init): Check for a user-provided default constructor
844 even if TYPE_NEEDS_CONSTRUCTING.
845 (build_new_1): Likewise.
846 * call.c (build_over_call): Don't call mark_used twice.
847 * method.c (implicitly_declare_fn): Set DECL_DEFAULTED_FN.
848 * search.c (check_final_overrider): Check for deleted mismatch.
849 * parser.c (cp_parser_init_declarator): Tell start_decl about =delete.
850 (cp_parser_pure_specifier): Handle =default and =delete.
852 * error.c (maybe_warn_cpp0x): Suggest -std=gnu++0x as well.
854 2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
857 * typeck.c: All calls to pedwarn changed.
858 * decl.c: All calls to pedwarn changed.
859 * call.c: All calls to pedwarn changed.
860 * error.c: All calls to pedwarn changed.
861 * typeck2.c: All calls to pedwarn changed.
862 * pt.c: All calls to pedwarn changed.
863 * name-lookup.c: All calls to pedwarn changed.
864 * parser.c: All calls to pedwarn changed.
866 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
868 * call.c: Fix comment typos.
870 * cp-tree.h: Likewise.
871 * cxx-pretty-print.c: Likewise.
874 * name-lookup.c: Likewise.
875 * operators.def: Likewise.
876 * parser.c: Likewise.
879 * typeck.c: Likewise.
881 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
885 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Only check
886 copy constructors and copy assignment operators proper.
888 2008-07-21 Rafael Ávila de Espíndola <espindola@google.com>
890 * parser.c (cp_token): Remove in_system_header.
891 (eof_token): Remove in_system_header.
892 (cp_lexer_get_preprocessor_token): Don't set in_system_header.
893 (cp_lexer_set_source_position_from_token): Don't set in_system_header.
894 (cp_parser_member_declaration): Use in_system_header_at.
895 * pt.c (lookup_template_class): Don't set DECL_IN_SYSTEM_HEADER.
896 (pop_tinst_level): Don't set in_system_header.
897 (instantiate_class_template): Don't set in_system_header.
898 (instantiate_decl): Don't set in_system_header.
899 (instantiate_pending_templates): Don't set in_system_header.
901 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
904 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Use
905 TYPE_NOTHROW_P, not TREE_NOTHROW.
906 (trait_expr_value): Likewise.
908 2008-07-18 Dodji Seketeli <dseketel@redhat.com>
911 * call.c (convert_like_real): Don't take the error code path
912 when a rvalue or base conversion has the bad_p field set.
914 2008-07-18 Kris Van Hees <kris.van.hees@oracle.com>
916 * rtti.c (emit_support_tinfos): Add char16_type_node and
918 * typeck2.c (digest_init): Support char16_t and char32_t.
920 2008-07-18 Kavih R. Ghazi <ghazi@caip.rutgers.edu>
922 * cvt.c (convert_to_void): Avoid C++ keywords.
923 * decl.c (walk_namespaces_r, wrapup_globals_for_namespace):
925 * friend.c (is_friend): Likewise.
926 * init.c (perform_member_init): Likewise.
927 * mangle.c (write_template_prefix, write_template_template_param):
929 * name-lookup.c (do_namespace_alias, do_using_directive,
930 parse_using_directive, ambiguous_decl, arg_assoc): Likewise.
931 * parser.c (cp_parser_template_id, cp_parser_namespace_definition,
932 cp_parser_objc_typename, cp_parser_objc_method_keyword_params):
934 * pt.c (is_specialization_of_friend, lookup_template_class,
935 push_tinst_level, instantiate_class_template,
936 tsubst_copy_and_build): Likewise.
937 * tree.c (add_stmt_to_compound): Likewise.
938 * typeck.c (finish_class_member_access_expr): Likewise.
940 2008-07-17 Julian Brown <julian@codesourcery.com>
941 Mark Mitchell <mark@codesourcery.com>
943 * decl2.c (determine_visibility): Allow target to override
944 visibility of class data.
946 2008-07-17 Paolo Carlini <paolo.carlini@oracle.com>
949 * semantics.c (trait_expr_value): Update __has_trivial_destructor
950 semantics to the current WP (N2691).
952 2008-07-16 Dodji Seketeli <dseketel@redhat.com>
955 * name-lookup.c (lookup_extern_c_fun_binding_in_all_ns): New function.
956 (pushdecl_maybe_friend): Check if a redeclaration of extern C function
957 complies with exception specification constraints.
959 2008-07-14 Jason Merrill <jason@redhat.com>
961 * lex.c (init_reswords): Always set D_OBJC.
963 2008-07-11 Tom Tromey <tromey@redhat.com>
964 Ian Lance Taylor <iant@google.com>
966 * lex.c (struct resword, reswords): Don't define.
967 (D_EXT, D_ASM, D_OBJC, D_CXX0X): Don't define.
968 (init_reswords): Clarify mask code. Use c_common_reswords rather
971 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
974 * decl.c (grokdeclarator): Warn about initializing variables
975 of storage class 'extern' only after the type of the declarator
976 has been properly computed.
978 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
981 * cp-tree.h (struct cp_decl_specifier_seq): Add a location field. It
982 carries the location of the primary type.
983 * parser.c (cp_parser_check_type_definition): Update documentation.
984 (cp_parser_check_for_definition_in_return_type,
985 cp_parser_check_for_invalid_template_id,
986 cp_parser_set_decl_spec_type,
987 cp_parser_check_for_definition_in_return_type,
988 cp_parser_diagnose_invalid_type_name,
989 cp_parser_new_expression, cp_parser_explicit_instantiation,
990 cp_parser_type_specifier, cp_parser_simple_type_specifier,
991 cp_parser_omp_for_loop, cp_parser_pragma): Use location in error
994 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
998 * semantic.c (qualified_name_lookup_error, finish_id_expression):
999 Add a location_t parameter so that
1000 error message can have a more accurate location.
1001 * cp-tree.h: Updated prototype
1002 * pt.c (tsubst_qualified_id): Use location in error messages.
1003 * parser.c (cp_parser_postfix_expression,
1004 cp_parser_objc_statement, cp_parser_trait_expr,
1005 cp_parser_token_is_class_key,
1006 cp_parser_uncommitted_to_tentative_parse_p,
1007 cp_parser_check_for_invalid_template_id, cp_parser_is_string_literal,
1008 cp_parser_error, cp_parser_name_lookup_error,
1009 cp_parser_simulate_error, cp_parser_check_decl_spec,
1010 cp_parser_check_decl_spec, cp_parser_non_integral_constant_expression,
1011 cp_parser_diagnose_invalid_type_name,
1012 cp_parser_parse_and_diagnose_invalid_type_name,
1013 cp_parser_require_pragma_eol, cp_parser_make_typename_type,
1014 cp_parser_string_literal, cp_parser_primary_expression,
1015 cp_parser_primary_expression, cp_parser_unqualified_id,
1016 cp_parser_nested_name_specifier_opt, cp_parser_postfix_expression,
1017 cp_parser_postfix_dot_deref_expression, cp_parser_new_expression,
1018 cp_parser_direct_new_declarator, cp_parser_builtin_offsetof,
1019 cp_parser_label_for_labeled_statement, cp_parser_statement_seq_opt,
1020 cp_parser_jump_statement, cp_parser_block_declaration,
1021 cp_parser_simple_declaration, cp_parser_decl_specifier_seq,
1022 cp_parser_function_specifier_opt, cp_parser_decltype,
1023 cp_parser_mem_initializer_list, cp_parser_mem_initializer,
1024 cp_parser_mem_initializer_id, cp_parser_template_parameter,
1025 cp_parser_type_parameter, cp_parser_template_id,
1026 cp_parser_template_name, cp_parser_template_argument): Likewise.
1028 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1031 * pt.c (tsubst_function_type): Remove warning for type qualifiers
1032 on function return type.
1034 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1037 * pt.c (tsubst_function_type): Don't warn for type qualifiers
1038 on function return type in case of system header.
1040 2008-07-09 Raksit Ashok <raksit@google.com>
1042 * parser.c (cp_parser_postfix_expression): New warning based on flag
1043 warn_disallowed_functions.
1045 2008-07-08 Simon Martin <simartin@users.sourceforge.net>
1048 * decl.c (grokdeclarator): Reset storage_class and staticp for friend
1049 functions declared with a storage class qualifier.
1051 2008-07-03 Richard Guenther <rguenther@suse.de>
1054 * typeck.c (cp_build_function_call): Move code to verify
1055 builtin function arguments ...
1056 * call.c (build_cxx_call): ... here.
1058 2008-07-02 Jason Merrill <jason@redhat.com>
1060 * Make-lang.in (cp/typeck2.o): Add $(REAL_H) dependency.
1062 Implement WG21 N2672, Initializer List proposed wording
1063 * cp-tree.h (enum cp_tree_index): Add CPTI_INIT_LIST_TYPE.
1064 (struct lang_type_class): Add has_list_ctor bitfield.
1065 (TYPE_HAS_LIST_CTOR): New macro.
1066 (BRACE_ENCLOSED_INITIALIZER_P): Expect init_list_type_node.
1067 (CONSTRUCTOR_IS_DIRECT_INIT): New macro.
1068 (LOOKUP_NO_NARROWING): New macro.
1069 (LOOKUP_NO_COPY_CTOR_CONVERSION): New macro.
1070 * parser.c (cp_parse_braced_list): Split out from...
1071 (cp_parser_initializer_clause): ...here.
1072 (cp_parser_postfix_expression): Build up CONSTRUCTOR for compound
1074 (cp_lexer_next_token_is_not_keyword): New fn.
1075 (cp_parser_parenthesized_expression_list): Handle { }.
1076 (cp_parser_new_expression, cp_parser_new_initializer): Likewise.
1077 (cp_parser_assignment_expression, cp_parser_condition): Likewise.
1078 (cp_parser_jump_statement, cp_parser_simple_declaration): Likewise.
1079 (cp_parser_mem_initializer, cp_parser_init_declarator): Likewise.
1080 (cp_parser_initializer, cp_parser_functional_cast): Likewise.
1081 (cp_parser_omp_for_loop, cp_parser_cache_group): Likewise.
1082 (cp_parser_save_member_function_body): Likewise.
1083 * call.c (conversion_kind): Add ck_list, ck_aggr.
1084 (struct conversion): Add check_narrowing bitfield, conversion list.
1085 (build_list_conv): New fn.
1086 (build_aggr_conv): New fn.
1087 (implicit_conversion): Call them.
1088 (standard_conversion): Set check_narrowing if appropriate.
1089 (add_function_candidate): Handle LOOKUP_NO_COPY_CTOR_CONVERSION.
1090 (build_user_type_conversion_1): When converting from an init list,
1091 we allow additional conversions except when calling a copy ctor.
1092 (convert_like_real): Calling an explicit ctor for an init list is
1093 ill-formed. Handle ck_list and ck_addr. Check narrowing.
1094 (build_new_method_call): If CONSTRUCTOR_IS_DIRECT_INIT is set and
1095 class doesn't have a list ctor, break the {} into a TREE_LIST.
1096 (compare_ics): ck_list is better than other UDCs.
1097 (set_up_extended_ref_temp): Split out from initialize_reference.
1098 (is_std_init_list): New fn.
1099 (is_list_ctor): New fn.
1100 * decl.c (cxx_init_decl_processing): Create init_list_type_node.
1101 (reshape_init_array_1): Pass it to build_constructor.
1102 (reshape_init_class): Ditto.
1103 (initialize_artificial_var): Pass the appropriate type.
1104 (build_aggr_init_full_exprs): Split out from...
1105 (check_initializer): ...here. Handle new semantics.
1106 (build_init_list_var_init): New subroutine of check_initializer.
1107 (grokdeclarator): Converting constructors can have more than one parm.
1108 (grok_special_member_properties): Set TYPE_HAS_LIST_CTOR.
1109 * init.c (expand_default_init): Only do digest_init for aggregates.
1110 * rtti.c (tinfo_base_init): Pass init_list_type_node to
1111 build_constructor_from_list.
1112 (generic_initializer, ptr_initializer): Ditto.
1113 (ptm_initializer, class_initializer): Ditto.
1114 (get_pseudo_ti_init): Ditto.
1115 * error.c (dump_type): Handle init_list_type_node.
1116 (maybe_warn_cpp0x): New fn.
1117 (maybe_varn_variadic_templates): Call it.
1118 * cvt.c (ocp_convert): Handle conversion from { }.
1119 * tree.c (build_array_of_n_type): New fn.
1120 * typeck2.c (store_init_value): Use init_list_type_node.
1121 (digest_init): Likewise.
1122 (check_narrowing): New fn.
1123 * semantics.c: (finish_compound_literal): Take CONSTRUCTOR instead
1124 of vector of constructor elts. Handle non-aggregate types. Make
1125 constant literals static.
1126 * pt.c: (tsubst_copy_and_build): Adjust.
1127 (unify): Handle { }.
1128 * name-lookup.c (arg_assoc_type): Handle init_list_type_node.
1130 2008-07-01 Daniel Jacobowitz <dan@codesourcery.com>
1132 * typeck.c (comp_ptr_ttypes_real): Use vector_targets_convertible_p.
1133 (comp_ptr_ttypes_const): Likewise.
1135 2008-07-01 Andrew Haley <aph@redhat.com>
1137 * decl.c (finish_constructor_body): Don't set the return value of
1138 the constructor if the constructor is that of a Java type.
1140 2008-06-30 Jakub Jelinek <jakub@redhat.com>
1143 * decl2.c (is_late_template_attribute): If the first attribute
1144 argument is IDENTIFIER_NODE, don't consider it when checking
1145 if arguments are value or type dependent.
1147 2008-06-29 Paolo Carlini <paolo.carlini@oracle.com>
1150 * pt.c (do_type_instantiation): In c++0x mode do not warn for
1153 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1155 * Make-lang.in (cp-warn): Delete $(CXX_COMPAT_WARN).
1157 2008-06-28 Jakub Jelinek <jakub@redhat.com>
1160 * repo.c (repo_emit_p): Put const static data members initialized
1161 by const expr into *.rpo file, just return 2 if IDENTIFIER_REPO_CHOSEN
1164 2008-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1167 * pt.c (do_decl_instantiation): In c++0x mode do not warn for
1170 2008-06-24 Jonathan Wakely <jwakely.gcc@gmail.com>
1173 * typeck.c (cp_build_function_call): Show example syntax in
1176 2008-06-21 Jonathan Wakely <jwakely.gcc@gmail.com>
1178 * typeck.c (composite_pointer_type_r, cxx_sizeof_expr,
1179 cxx_alignof_expr, check_template_keyword, cp_build_binary_op,
1180 pointer_diff, cp_build_unary_op, build_x_compound_expr_from_list,
1181 build_reinterpret_cast_1, cp_build_c_cast, check_return_expr): Change
1182 pedwarn to permerror.
1183 * init.c (perform_member_init, build_new_1, build_new): Likewise.
1184 * decl.c (warn_extern_redeclared_static, duplicate_decls,
1185 * identify_goto, check_previous_goto_1, check_goto, define_label,
1186 check_tag_decl, start_decl, check_class_member_definition_namespace,
1187 grokfndecl, grokdeclarator): Likewise.
1188 * except.c (check_handlers): Likewise.
1189 * typeck2.c (digest_init): Likewise.
1190 * pt.c (check_specialization_namespace,
1191 check_explicit_instantiation_namespace,
1192 maybe_process_partial_specialization, check_explicit_specialization,
1193 convert_template_argument, do_decl_instantiation,
1194 do_type_instantiation, instantiate_decl): Likewise.
1195 * semantics.c (finish_template_type_parm): Likewise.
1196 * name-lookup.c (pushdecl_maybe_friend,
1197 check_for_out_of_scope_variable): Likewise.
1198 * decl2.c (finish_static_data_member_decl, build_anon_union_vars,
1199 coerce_new_type): Likewise.
1200 * parser.c (cp_parser_nested_name_specifier_opt,
1201 cp_parser_mem_initializer, cp_parser_elaborated_type_specifier,
1202 cp_parser_class_head, cp_parser_check_class_key): Likewise.
1203 (cp_parser_parameter_declaration): Check flag_permissive instead of
1204 flag_pedantic_errors.
1205 * call.c (joust): Change pedwarn to warning.
1206 * friend.c (make_friend_class): Likewise.
1208 2008-06-16 Jan Hubicka <jh@suse.cz>
1210 * method.c: Include cgraph.h.
1211 (use_thunk): Use cgraph_add_new_function instead of calling backend
1214 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1216 * parser.c: Fix comment typo.
1218 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1221 * decl2.c (grokbitfield): Receive the list of attributes, pass it to
1222 grokdeclarator and apply it to the created declaration.
1223 * cp-tree.h (grokbitfield): Update prototype.
1224 * parser.c (cp_parser_member_declaration): Don't apply the attributes
1225 since they are now applied in grokbitfield. Adjusted the call to
1227 (cp_parser_objc_class_ivars): Likewise.
1229 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1232 * class.c (type_requires_array_cookie): Do not consider delete[]
1233 operators with an ellipsis as second argument.
1235 2008-06-09 Jakub Jelinek <jakub@redhat.com>
1238 * semantics.c (stmt_expr_value_expr): Don't crash on empty
1241 2008-06-08 Paolo Carlini <paolo.carlini@oracle.com>
1244 * pt.c (maybe_process_partial_specialization): Check the tree
1245 returned by push_template_decl for error_mark_node.
1246 * parser.c (cp_parser_class_head): Likewise, check the tree
1247 returned by the latter.
1249 2008-06-07 Paolo Carlini <paolo.carlini@oracle.com>
1252 * decl.c (grokdeclarator): In case of wrong return type return
1253 immediately error_mark_node.
1255 2008-06-06 Jakub Jelinek <jakub@redhat.com>
1257 * cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
1258 dependent_omp_for_p, begin_omp_task, finish_omp_task,
1259 finish_omp_taskwait): New prototypes.
1260 (cxx_omp_clause_default_ctor): Add outer argument.
1261 (finish_omp_for): Add new clauses argument.
1262 * cp-gimplify.c (cxx_omp_finish_clause): New function.
1263 (cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
1264 (cxx_omp_clause_default_ctor): Add outer argument.
1265 (cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
1266 * cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
1267 * parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
1268 Add par_clauses argument. If decl is present in parallel's
1269 lastprivate clause, change that clause to shared and add
1270 a lastprivate clause for decl to OMP_FOR_CLAUSES.
1271 Fix wording of error messages. Adjust finish_omp_for caller.
1272 Add clauses argument. Parse loops with random access iterators.
1273 (cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
1275 (cp_parser_omp_for, cp_parser_omp_parallel): Adjust
1276 cp_parser_omp_for_loop callers.
1277 (cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
1279 (cp_parser_omp_clause_name): Handle collapse and untied
1281 (cp_parser_omp_clause_schedule): Handle auto schedule.
1282 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
1283 and PRAGMA_OMP_CLAUSE_UNTIED.
1284 (OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
1285 (OMP_TASK_CLAUSE_MASK): Define.
1286 (cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
1287 (cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
1288 (cp_parser_pragma): Handle PRAGMA_OMP_TASK and
1289 PRAGMA_OMP_TASKWAIT.
1290 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
1291 OMP_CLAUSE_UNTIED. Handle OMP_CLAUSE_LASTPRIVATE_STMT.
1292 (tsubst_omp_for_iterator): New function.
1293 (dependent_omp_for_p): New function.
1294 (tsubst_expr) <case OMP_FOR>: Use it. Handle collapsed OMP_FOR
1295 loops. Adjust finish_omp_for caller. Handle loops with random
1296 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR} changes.
1297 (tsubst_expr): Handle OMP_TASK.
1298 * semantics.c (cxx_omp_create_clause_info): New function.
1299 (finish_omp_clauses): Call it. Handle OMP_CLAUSE_UNTIED and
1300 OMP_CLAUSE_COLLAPSE.
1301 (cxx_omp_predetermined_sharing): Removed.
1302 * semantics.c (finish_omp_for): Allow pointer iterators. Use
1303 handle_omp_for_class_iterator and dependent_omp_for_p. Handle
1304 collapsed for loops. Adjust c_finish_omp_for caller. Add new
1305 clauses argument. Fix check for type dependent cond or incr.
1306 Set OMP_FOR_CLAUSES to clauses. Use cp_convert instead of
1307 fold_convert to convert incr amount to difference_type. Only
1308 fold if not in template. If decl is mentioned in lastprivate
1309 clause, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle loops with random
1310 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR}
1312 (finish_omp_threadprivate): Allow static class members of the
1314 (handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
1315 finish_omp_taskwait): New functions.
1317 * parser.c (cp_parser_binary_expression): Add prec argument.
1318 (cp_parser_assignment_expression): Adjust caller.
1319 * cp-tree.h (outer_curly_brace_block): New prototype.
1320 * decl.c (outer_curly_brace_block): No longer static.
1322 2008-06-02 Paolo Carlini <paolo.carlini@oracle.com>
1325 * pt.c (push_template_decl_real): Consistently return error_mark_node
1328 2008-06-02 Tomas Bily <tbily@suse.cz>
1330 * typeck.c (is_bitfield_expr_with_lowered_type): Use CASE_CONVERT.
1331 (cp_build_unary_op): Likewise.
1332 (cp_build_indirect_ref): Use CONVERT_EXPR_P.
1333 (maybe_warn_about_returning_address_of_local): Likewise.
1335 2008-05-29 Paolo Carlini <paolo.carlini@oracle.com>
1338 * pt.c (tsubst_initializer_list): Consistently check the tree
1339 returned by tsubst_pack_expansion for error_mark_node.
1341 2008-05-27 Michael Matz <matz@suse.de>
1344 * call.c (build_new_op): Make warning conditional on
1347 2008-05-27 Alexandre Oliva <aoliva@redhat.com>
1350 * call.c (convert_like_real): Convert bitfield to desired type
1351 before creating temporary.
1353 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
1355 * Makefile.in: Adjusted dependencies on c-incpath.o.
1357 2008-05-23 Jakub Jelinek <jakub@redhat.com>
1360 * cp-gimplify.c (cxx_omp_clause_apply_fn): Call
1361 fold_build_cleanup_point_expr on build_call_a results.
1364 * semantics.c (omp_clause_info_fndecl): New function.
1365 (finish_omp_clauses): Use it.
1367 2008-05-21 Jakub Jelinek <jakub@redhat.com>
1370 * cp-tree.h (check_array_initializer): New prototype.
1371 * decl.c (check_array_initializer): New function.
1372 (check_initializer): Call it.
1373 * semantics.c (finish_compound_literal): Call it for ARRAY_TYPEs.
1375 2008-05-21 Tom Tromey <tromey@redhat.com>
1377 * mangle.c (save_partially_mangled_name): Remove.
1378 (restore_partially_mangled_name): Likewise.
1379 (write_encoding): Update.
1380 (write_unqualified_name): Likewise.
1381 (start_mangling): Always use name_obstack. Remove 'ident_p'
1383 (get_identifier_nocopy): Remove.
1384 (finish_mangling_internal): Rename from finish_mangling.
1385 (finish_mangling): New function.
1386 (finish_mangling_get_identifier): Likewise.
1387 (partially_mangled_name, partially_mangled_name_len): Remove.
1388 (mangle_decl_string): Change return type. Update.
1389 (mangle_decl, mangle_type_string, mangle_special_for_type,
1390 mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
1391 mangle_ref_init_variable): Update.
1393 2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
1396 * semantics.c (begin_class_definition): Extend checks on the first
1399 2008-05-12 Tomas Bily <tbily@suse.cz>
1401 * typeck2.c (digest_init): Use CONVERT_EXPR_P.
1402 * call.c (build_over_call): Likewise.
1403 * error.c (dump_expr): Use CASE_CONVERT.
1404 * class.c (fixed_type_or_null): Likewise.
1406 2008-05-11 Volker Reichelt <v.reichelt@netcologne.de>
1408 * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
1410 (cp_parser_omp_clause_schedule): Remove superfluous "expected"
1413 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
1415 * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
1416 DECL_LOOPING_CONST_OR_PURE_P attributes.
1417 * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
1420 2008-05-02 Simon Baldwin <simonb@google.com>
1423 * typeck.c (build_array_ref): Remove warn_array_subscript_range.
1425 2008-05-01 Simon Baldwin <simonb@google.com>
1427 * typeck.c (build_array_ref): Call warn_array_subscript_range.
1429 2008-04-30 Jakub Jelinek <jakub@redhat.com>
1432 * pt.c (more_specialized_fn): Stop the loop even if there are no
1433 arguments before ellipsis.
1435 2008-04-29 Jakub Jelinek <jakub@redhat.com>
1438 * parser.c (cp_parser_lookup_name): Look through single function
1442 * typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
1443 COMPOUND_EXPR if the second argument would be error_mark_node.
1445 2008-04-28 Jason Merrill <jason@redhat.com>
1446 Liu Guanwei <liu_gw@163.com>
1449 * parser.c (cp_parser_parameter_declaration): Handle < ambiguity
1450 in default arguments.
1452 2008-04-25 Jan Hubicka <jh@suse.cz>
1454 * typeck.c (check_return_expr): Update.
1455 * decl.c (start_preparsed_function): Update.
1456 * method.c (use_thunk): Update.
1458 2008-04-24 Jakub Jelinek <jakub@redhat.com>
1461 * cp-tree.h (cp_reconstruct_complex_type): New prototype.
1462 * cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
1463 * decl2.c (is_late_template_attribute): Only make vector_size
1464 late tmpl attribute if argument is type or value dependent.
1465 (cp_reconstruct_complex_type): New function.
1467 2008-04-24 Richard Guenther <rguenther@suse.de>
1469 * typeck.c (cp_build_function_call): Call
1470 check_builtin_function_arguments.
1472 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1474 * typeck.c (get_member_function_from_ptrfunc): Don't set TREE_INVARIANT.
1475 (build_ptrmemfunc1): Don't set TREE_INVARIANT.
1476 * init.c (build_zero_init): Don't set TREE_INVARIANT.
1477 * class.c (build_base_path): Don't set TREE_INVARIANT.
1478 (build_vtbl_ref_1): Don't set TREE_INVARIANT.
1479 (build_vtbl_initializer): Don't set TREE_INVARIANT.
1480 * decl.c (build_enumerator): Don't set TREE_INVARIANT.
1481 * rtti.c (tinfo_base_init): Don't set TREE_INVARIANT.
1482 (generic_initializer): Don't set TREE_INVARIANT.
1483 (ptr_initializer): Don't set TREE_INVARIANT.
1484 (ptm_initializer): Don't set TREE_INVARIANT.
1485 (class_initializer): Don't set TREE_INVARIANT.
1486 * typeck2.c (process_init_constructor): Don't set TREE_INVARIANT.
1487 * pt.c (push_inline_template_parms_recursive): Don't set TREE_INVARIANT.
1488 (build_template_parm_index): Don't set TREE_INVARIANT.
1489 (reduce_template_parm_level): Don't set TREE_INVARIANT.
1490 (process_template_parm): Don't set TREE_INVARIANT.
1492 2008-04-22 Jason Merrill <jason@redhat.com>
1495 * semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
1496 to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
1497 * typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
1499 2008-04-22 Jakub Jelinek <jakub@redhat.com>
1502 * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
1503 expression is errorneous.
1505 2008-04-21 Jason Merrill <jason@redhat.com>
1508 * tree.c (cp_tree_equal): Handle FIXED_CST.
1511 * pt.c (template_template_parm_bindings_ok_p): Set
1512 processing_template_decl while in this function.
1514 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
1516 * cvt.c (type_promotes_to): Support char16_t and char32_t.
1517 * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
1518 char16_t and char32_t.
1519 * lex.c (reswords): Add char16_t and char32_t (for c++0x).
1520 * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
1521 extended builtin type "u8char{16,32}_t".
1522 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
1524 (cp_lexer_print_token): Support CPP_STRING{16,32}.
1525 (cp_parser_is_string_literal): Idem.
1526 (cp_parser_string_literal): Idem.
1527 (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
1529 (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}.
1530 * tree.c (char_type_p): Support char16_t and char32_t as char types.
1531 * typeck.c (string_conv_p): Support char16_t and char32_t.
1533 2008-04-17 Jason Merrill <jason@redhat.com>
1536 * call.c (build_user_type_conversion_1): Represent second step of
1537 copy-init with an rvalue conversion.
1538 (convert_like_real) [ck_user]: Don't implicitly add it here.
1540 2008-04-15 Jakub Jelinek <jakub@redhat.com>
1543 * decl.c (layout_var_decl): If extern or static var has variable
1544 size, set TREE_TYPE (decl) to error_mark_node.
1546 2008-04-16 Danny Smith <dannysmith@users.sourceforge.net>
1549 * optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
1552 2008-04-09 Jason Merrill <jason@redhat.com>
1555 * semantics.c (finish_compound_literal): Return a TARGET_EXPR,
1556 not a pushed variable.
1558 2008-04-09 Volker Reichelt <v.reichelt@netcologne.de>
1560 * call.c (build_op_delete_call): Fix quotation in warning message.
1561 * decl.c (grokdeclarator): Quote keyword in error message.
1562 * pt.c (check_for_bare_parameter_packs): Fix quotation in error
1565 * parser.c (cp_parser_check_type_definition): Print error string
1566 directly rather than using "%s".
1567 (cp_parser_postfix_expression): Fix quotation.
1568 (cp_parser_decltype): Likewise.
1569 (cp_parser_sizeof_operand): Fix quotation. Simplify.
1571 * parser.c (cp_parser_non_integral_constant_expression): Build error
1572 message with CONCAT rather than using "%s".
1573 (cp_parser_primary_expression): Fix quotation.
1574 (cp_parser_postfix_expression): Likewise.
1575 (cp_parser_postfix_dot_deref_expression): Likewise.
1576 (cp_parser_unary_expression): Likewise.
1577 (cp_parser_new_expression): Likewise.
1578 (cp_parser_delete_expression): Likewise.
1580 * parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
1581 as `)', not as `('. Fix quotation.
1582 (cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
1583 (cp_parser_primary_expression): Likewise.
1584 (cp_parser_nested_name_specifier_opt): Likewise.
1585 (cp_parser_postfix_expression): Likewise.
1586 (cp_parser_postfix_open_square_expression): Likewise.
1587 (cp_parser_parenthesized_expression_list): Likewise.
1588 (cp_parser_pseudo_destructor_name): Likewise.
1589 (cp_parser_new_expression): Likewise.
1590 (cp_parser_direct_new_declarator): Likewise.
1591 (cp_parser_delete_expression): Likewise.
1592 (cp_parser_cast_expression): Likewise.
1593 (cp_parser_question_colon_clause): Likewise.
1594 (cp_parser_builtin_offsetof): Likewise.
1595 (cp_parser_trait_expr): Likewise.
1596 (cp_parser_label_for_labeled_statement): Likewise.
1597 (cp_parser_compound_statement): Likewise.
1598 (cp_parser_selection_statement): Likewise.
1599 (cp_parser_condition): Likewise.
1600 (cp_parser_iteration_statement): Likewise.
1601 (cp_parser_already_scoped_statement): Likewise.
1602 (cp_parser_simple_declaration): Likewise.
1603 (cp_parser_linkage_specification): Likewise.
1604 (cp_parser_static_assert): Likewise.
1605 (cp_parser_decltype): Likewise.
1606 (cp_parser_conversion_function_id): Likewise.
1607 (cp_parser_operator_function_id): Likewise.
1608 (cp_parser_operator): Likewise.
1609 (cp_parser_type_parameter): Likewise.
1610 (cp_parser_template_id): Likewise.
1611 (cp_parser_explicit_instantiation): Likewise.
1612 (cp_parser_explicit_specialization): Likewise.
1613 (cp_parser_enum_specifier): Likewise.
1614 (cp_parser_namespace_definition): Likewise.
1615 (cp_parser_namespace_alias_definition): Likewise.
1616 (cp_parser_using_declaration): Likewise.
1617 (cp_parser_using_directive): Likewise.
1618 (cp_parser_asm_definition): Likewise.
1619 (cp_parser_direct_declarator): Likewise.
1620 (cp_parser_ptr_operator): Likewise.
1621 (cp_parser_parameter_declaration_clause): Likewise.
1622 (cp_parser_initializer_clause): Likewise.
1623 (cp_parser_class_specifier): Likewise.
1624 (cp_parser_member_specification_opt): Likewise.
1625 (cp_parser_member_declaration): Likewise.
1626 (cp_parser_pure_specifier): Likewise.
1627 (cp_parser_constant_initializer): Likewise.
1628 (cp_parser_base_clause): Likewise.
1629 (cp_parser_exception_specification_opt): Likewise.
1630 (cp_parser_try_block): Likewise.
1631 (cp_parser_function_try_block): Likewise.
1632 (cp_parser_handler): Likewise.
1633 (cp_parser_throw_expression): Likewise.
1634 (cp_parser_asm_operand_list): Likewise.
1635 (cp_parser_attributes_opt): Likewise.
1636 (cp_parser_label_declaration): Likewise.
1637 (cp_parser_constructor_declarator_p): Likewise.
1638 (cp_parser_template_declaration_after_export): Likewise.
1639 (cp_parser_single_declaration): Likewise.
1640 (cp_parser_objc_message_expression): Likewise.
1641 (cp_parser_objc_message_args): Likewise.
1642 (cp_parser_objc_encode_expression): Likewise.
1643 (cp_parser_objc_defs_expression): Likewise.
1644 (cp_parser_objc_protocol_expression): Likewise.
1645 (cp_parser_objc_selector_expression): Likewise.
1646 (cp_parser_objc_protocol_refs_opt): Likewise.
1647 (cp_parser_objc_typename): Likewise.
1648 (cp_parser_objc_method_keyword_params): Likewise.
1649 (cp_parser_objc_superclass_or_category): Likewise.
1650 (cp_parser_objc_try_catch_finally_statement): Likewise.
1651 (cp_parser_objc_synchronized_statement): Likewise.
1652 (cp_parser_objc_throw_statement): Likewise.
1653 (cp_parser_omp_var_list_no_open): Likewise.
1654 (cp_parser_omp_clause_default): Likewise.
1655 (cp_parser_omp_clause_if): Likewise.
1656 (cp_parser_omp_clause_num_threads): Likewise.
1657 (cp_parser_omp_clause_reduction): Likewise.
1658 (cp_parser_omp_clause_schedule): Likewise.
1659 (cp_parser_omp_critical): Likewise.
1660 (cp_parser_omp_for_loop): Likewise.
1661 (cp_parser_omp_sections_scope): Likewise.
1663 * parser.c (cp_parser_template_parameter_list): Simplify.
1665 2008-04-07 James E. Wilson <wilson@tuliptree.org>
1667 * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
1669 2008-04-07 Jason Merrill <jason@redhat.com>
1672 * class.c (type_has_user_nondefault_constructor): A template
1673 counts as a nondefault constructor.
1675 2008-04-04 Paolo Bonzini <bonzini@gnu.org>
1677 * decl.c (cxx_push_function_context): Delete.
1678 (cxx_pop_function_context): Delete.
1679 (start_preparsed_function): Merge cxx_push_function_context (!f->decl
1681 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_INIT,
1682 LANG_HOOKS_FUNCTION_FINAL): Delete.
1683 (LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): Rename to
1684 LANG_HOOKS_MISSING_NORETURN_OK_P.
1685 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context):
1687 * semantics.c (current_stmt_tree): Fix comment.
1689 2008-04-03 Jakub Jelinek <jakub@redhat.com>
1692 * semantics.c (finish_offsetof): Undo effect of convert_from_reference
1693 before calling fold_offsetof.
1695 2008-04-03 Tom Tromey <tromey@redhat.com>
1697 * Make-lang.in (c++_OBJS): New variable.
1699 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1701 * optimize.c (clone_body): New, from tree-inline.c.
1703 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1705 * method.c (synthesize_method): Use {push,pop}_function_context.
1706 * name-lookup.c (push_to_top_level): Likewise.
1707 * parser.c (cp_parser_late_parsing_for_member): Likewise.
1709 2008-03-30 Volker Reichelt <v.reichelt@netcologne.de>
1712 * parser.c (cp_parser_decl_specifier_seq): Add location to error
1715 2008-03-27 Tom Tromey <tromey@redhat.com>
1717 * Make-lang.in: Revert automatic dependency patch.
1719 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
1722 * typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
1723 (build_compound_expr): New, for compatibility with C
1724 build_compound_expr.
1725 (cp_build_compound_expr): Renamed from build_compound_expr.
1726 (build_c_cast): New, for compatibility with C build_c_cast.
1727 (cp_build_c_cast): Renamed from build_c_cast.
1728 * init.c (build_vec_delete_1): Fix calls to build_compound_expr.
1729 * decl.c (cxx_maybe_build_cleanup): Ditto.
1730 * cp-tree.h (build_compound_expr): Add C-compatibile prototype.
1731 (cp_build_compound_expr): Renamed from build_compound_expr.
1732 (build_c_cast): Add C-compatible prototype.
1733 (cp_build_c_cast): Renamed from build_c_cast.
1734 * typeck2.c (build_functional_cast): Use cp_build_c_cast.
1735 * parser.c (cp_parser_cast_expression): Fix call to build_c_cast.
1737 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
1739 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Cope with
1740 tsubst_pack_expansion returning a pack expansion, or a TREE_VEC
1741 ending in a pack expansion, both of which can occur when
1742 substituting into a nested template.
1743 (tsubst_copy_and_build) <case SIZEOF_EXPR>: When we're
1744 instantiating the sizeof...(X) form, make tsubst_copy do the work.
1745 * parser.c (cp_parser_template_parameter): Deal with unnamed
1746 non-type template parameter packs identified by pack expansions in
1749 2008-03-26 Jakub Jelinek <jakub@redhat.com>
1752 * pt.c (apply_late_template_attributes): Don't call tsubst on
1753 first attribute argument if it is IDENTIFIER_NODE.
1756 * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
1757 and LTGT_EXPR to pp_expression.
1759 2008-03-26 Douglas Gregor <doug.gregor@gmail.com>
1761 * pt.c (coerce_template_template_parm): Moved the body of the loop
1762 of coerce_template_template_parms here, to make iteration over a
1763 template argument pack simpler.
1764 Also, allow matching of a template parameter pack in the template
1765 template parameter to a template parameter in the template
1767 (coerce_template_template_parms): Deal with variadic template
1768 template parameters. Use coerce_template_template_parm.
1769 (unify): Make sure we coerce the template template argument's
1770 template arguments to the template template parameter's template
1771 parameters, not the other way around.
1773 2008-03-25 Tom Tromey <tromey@redhat.com>
1775 * Make-lang.in: Remove .o targets.
1776 (cp/g++spec.o): Moved to cp/. Reduce to variable setting.
1778 (c++_OBJS): New variable.
1779 (CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
1781 2008-03-25 Douglas Gregor <doug.gregor@gmail.com>
1783 * typeck.c (composite_pointer_type_r): Add SFINAE support.
1784 (composite_pointer_type): Ditto.
1785 (common_type): Fix call to composite_pointer_type.
1786 (cxx_sizeof_nowarn): New; used to be a macro.
1787 (cxx_sizeof_expr): Add SFINAE support.
1788 (cxx_alignof_expr): Ditto.
1789 (decay_conversion): Fix calls for SFINAE support.
1790 (rationalize_conditional_expr): Add SFINAE support.
1791 (build_class_member_access_expr): Ditto.
1792 (finish_class_member_access_expr): Ditto.
1793 (build_x_indirect_ref): Ditto.
1794 (build_indirect_ref): Original version renamed to
1795 cp_build_indirect_ref; new version provides a bridge from
1797 (cp_build_indirect_ref): Was build_indirect_ref; added SFINAE
1799 (get_member_function_from_ptrfunc): Fix calls for SFINAE support.
1800 (build_function_call): Original version renamed to
1801 cp_build_function_call; new version provides a bridge from
1803 (cp_build_function_call): Was build_function_call; added SFINAE
1805 (convert_arguments): Add SFINAE support.
1806 (build_x_binary_op): Ditto.
1807 (build_binary_op): Original version renamed to cp_build_binary_op;
1808 new version provides a bridge from c-common.
1809 (cp_build_binary_op): Was build_binary_op; added SFINAE support.
1810 (pointer_diff): Fix calls for SFINAE.
1811 (build_x_unary_op): Add SFINAE support.
1812 (condition_conversion): Fix calls for SFINAE.
1813 (build_unary_op): Original version renamed to cp_build_unary_op;
1814 new version provides a bridge from c-common.
1815 (cp_build_unary_op): Was build_unary_op; added SFINAE support.
1816 (unary_complex_lvalue): Fix calls for SFINAE.
1817 (build_x_conditional_expr): Add SFINAE support.
1818 (build_x_compound_expr_from_list): Fix calls for SFINAE.
1819 (build_x_compound_expr): Add SFINAE support.
1820 (convert_ptrmem): Fix calls for SFINAE.
1821 (build_static_cast_1): Add SFINAE support.
1822 (build_static_cast): Ditto.
1823 (build_reinterpret_cast_1): Ditto.
1824 (build_reinterpret_cast): Ditto.
1825 (build_const_cast_1): Ditto.
1826 (build_const_cast): Ditto.
1827 (build_c_cast): Ditto.
1828 (build_modify_expr): Original version renamed to
1829 cp_build_modify_expr; new version provides a bridge from c-common.
1830 (cp_build_modify_expr): Was build_modify_expr; added SFINAE
1832 (build_x_modify_expr): Add SFINAE support.
1833 (build_ptrmemfunc): Fix calls for SFINAE.
1834 (convert_for_assignment): Add SFINAE support.
1835 (convert_for_initialization): Ditto.
1836 (check_return_expr): Fix calls for SFINAE.
1837 (lvalue_or_else): Add SFINAE support.
1838 * init.c (perform_member_init): Fix calls for SFINAE.
1839 (emit_mem_initializers): Ditto.
1840 (expand_virtual_init): Ditto.
1841 (expand_cleanup_for_base): Ditto.
1842 (build_aggr_init): Add SFINAE support.
1843 (expand_default_init): Ditto.
1844 (expand_aggr_init_1): Fix calls for SFINAE.
1845 (build_offset_ref): Ditto.
1846 (build_new_1): Add SFINAE support.
1848 (build_vec_delete_1): Fix calls for SFINAE.
1849 (get_temp_regvar): Ditto.
1850 (build_vec_init): Add SFINAE support.
1851 (build_dtor_call): Fix calls for SFINAE.
1852 (build_delete): Ditto.
1853 (push_base_cleanups): Ditto.
1854 (build_vec_delete_1): Ditto.
1855 * class.c (build_base_path): Fix calls for SFINAE.
1856 (build_simple_base_path): Ditto.
1857 (convert_to_base_statically): Ditto.
1858 (build_vfn_ref): Ditto.
1859 (resolve_address_of_overloaded_function): Ditto.
1860 * decl.c (check_initializer): Fix calls for SFINAE.
1861 (register_dtor_fn): Ditto.
1862 (compute_array_index_type): Ditto.
1863 (finish_enum): Ditto.
1864 (start_preparsed_function): Ditto.
1865 (cxx_maybe_build_cleanup): Ditto.
1866 * call.c (convert_like): Add COMPLAIN argument.
1867 (convert_like_with_context): Ditto.
1868 (build_this): Fix calls for SFINAE.
1869 (build_user_type_conversion): Ditto.
1870 (resolve_args): Ditto.
1871 (build_new_function_call): Add SFINAE support.
1872 (build_operator_new_call): Fix calls for SFINAE.
1873 (build_object_call): Add SFINAE support.
1874 (build_conditional_expr): Ditto.
1875 (build_new_op): Ditto.
1876 (build_op_delete_call): Fix calls for SFINAE.
1877 (build_temp): Ditto.
1878 (convert_like_real): Add SFINAE support.
1879 (build_x_va_arg): Fix calls for SFINAE.
1880 (convert_default_arg): Ditto.
1881 (build_over_call): Add SFINAE support.
1882 (build_java_interface_fn_ref): Fix calls for SFINAE.
1883 (build_special_member_call): Add SFINAE support.
1884 (build_new_method_call): Ditto.
1885 (perform_implicit_conversion): Ditto.
1886 (perform_direct_initialization_if_possible): Ditto.
1887 (initialize_reference): Fix calls for SFINAE.
1888 * method.c (do_build_assign_ref): Fix calls for SFINAE.
1889 * rtti.c (build_headof): Fix calls for SFINAE.
1890 (get_tinfo_decl_dynamic): Ditto.
1891 (get_typeid): Ditto.
1892 (build_dynamic_cast_1): Add SFINAE support.
1893 (build_dynamic_cast): Ditto.
1894 (tinfo_base_init): Fix calls for SFINAE.
1895 * except.c (do_get_exception_ptr): Fix calls for SFINAE.
1896 (do_end_catch): Ditto.
1897 (initialize_handler_parm): Ditto.
1898 (expand_start_catch_block): Ditto.
1899 (do_allocate_exception): Ditto.
1900 (do_free_exception): Ditto.
1901 (build_throw): Ditto.
1902 * cvt.c (build_up_reference): Fix calls for SFINAE.
1903 (convert_to_reference): Ditto.
1904 (ocp_convert): Ditto.
1905 (convert_to_void): Add SFINAE support.
1906 * tree.c (build_dummy_object): Fix calls for SFINAE.
1907 (stabilize_expr): Ditto.
1908 * cp-tree.h (build_conditional_expr): Add tsubst_flags_t
1910 (build_new_method_call): Ditto.
1911 (build_special_member_call): Ditto.
1912 (build_new_op): Ditto.
1913 (perform_implicit_conversion): Ditto.
1914 (perform_direct_initialization_if_possible): Ditto.
1915 (convert_to_void): Ditto.
1916 (build_aggr_init): Ditto.
1918 (build_vec_init): Ditto.
1919 (build_dynamic_cast): Ditto.
1920 (finish_call_expr): Ditto
1921 (cxx_sizeof_or_alignof_expr): Add COMPLAIN parameter.
1922 (cxx_sizeof_nowarn): Remove macro; add function declaration.
1923 (build_class_member_access_expr): Add tsubst_flags_t parameter.
1924 (finish_class_member_access_expr): Ditto.
1925 (build_x_indirect_ref): Ditto.
1926 (cp_build_indirect_ref): New.
1927 (cp_build_function_call): Add tsubst_flags_t parameter.
1928 (build_x_unary_op): Ditto.
1929 (cp_build_unary_op): New.
1930 (build_x_conditional_expr): Add tsubst_flags_t parameter.
1931 (build_x_compound_expr): Ditto.
1932 (build_compound_expr): Ditto.
1933 (build_static_cast): Ditto.
1934 (build_reinterpret_cast): Ditto.
1935 (build_const_cast): Ditto.
1936 (build_c_cast): Ditto.
1937 (build_x_modify_expr): Ditto.
1938 (cp_build_modify_expr): New.
1939 (convert_for_initialization): Add tsubst_flags_t parameter.
1940 (cp_build_binary_op): Remove macro; add function declaration.
1941 (invalid_nonstatic_memfn_p): Add tsubst_flags_t parameter.
1942 (lvalue_or_else): Ditto.
1943 (build_functional_cast): Ditto.
1944 * typeck2.c (digest_init): Fix calls for SFINAE.
1945 (process_init_constructor_array): Ditto.
1946 (process_init_constructor_record): Ditto.
1947 (build_x_arrow): Ditto.
1948 (build_m_component_ref): Ditto.
1949 (build_functional_cast): Add SFINAE support.
1950 * pt.c (tsubst_copy_and_build): Add (more) SFINAE support.
1951 * semantics.c (simplify_loop_decl_cond): Fix calls for SFINAE.
1952 (finish_expr_stmt): Ditto.
1953 (finish_for_expr): Ditto.
1954 (finish_asm_stmt): Ditto.
1955 (finish_non_static_data_member): Ditto.
1956 (finish_qualified_id_expr): Ditto.
1957 (finish_call_expr): Add SFINAE support.
1958 (finish_increment_expr): Fix calls for SFINAE.
1959 (finish_unary_op_expr): Ditto.
1960 (simplify_aggr_init_expr): Ditto.
1961 (finish_omp_clauses): Ditto.
1962 (finish_omp_for): Ditto.
1963 (finish_omp_barrier): Ditto.
1964 (finish_omo_flush): Ditto.
1965 * decl2.c (grok_array_decl): Fix calls or SFINAE.
1966 (build_anon_union_vars): Ditto.
1967 (get_guard_cond): Ditto.
1969 (one_static_initialization_or_destruction): Ditto.
1970 (do_static_initialization_or_destruction): Ditto.
1971 (generate_ctor_or_dtor_function): Ditto.
1972 (build_offset_ref_call_from_tree): Ditto.
1973 * parser.c (cp_parser_postfix_expression): Fix calls for SFINAE.
1974 (cp_parser_postfix_dot_deref_expression): Ditto.
1975 (cp_parser_unary_expression): Ditto.
1976 (cp_parser_new_expression): Ditto.
1977 (cp_parser_cast_expression): Ditto.
1978 (cp_parser_binary_expression): Ditto.
1979 (cp_parser_question_colon_clause): Ditto.
1980 (cp_parser_assignment_expression): Ditto.
1981 (cp_parser_expression): Ditto.
1982 (cp_parser_builtin_offsetof): Ditto.
1983 (cp_parser_template_argument): Ditto.
1984 (cp_parser_functional_cast): Ditto.
1986 2008-03-24 Tom Tromey <tromey@redhat.com>
1988 * lex.c (handle_pragma_interface): Don't copy the filename.
1989 (handle_pragma_implementation): Copy filename using xstrdup.
1991 2008-03-21 Paolo Carlini <pcarlini@suse.de>
1993 * cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
1994 (SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
1995 (IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
1996 (PROMOTES_TO_AGGR_TYPE): Remove.
1997 (CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
1998 * typeck.c (unary_complex_lvalue, build_modify_expr,
1999 convert_for_initialization): Adjust.
2000 * init.c (is_aggr_type): Remove.
2001 (is_class_type): Add.
2002 (build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
2003 build_delete): Adjust.
2004 * lex.c (make_aggr_type): Remove.
2005 (make_class_type): Add.
2006 (cxx_make_type): Adjust.
2007 * class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
2009 * decl.c (build_typename_type, make_typename_type,
2010 make_unbound_class_template, cxx_init_decl_processing,
2011 check_tag_decl, groktypename, start_decl_1, layout_var_decl,
2012 check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
2013 grok_op_properties, xref_tag, check_function_type): Adjust.
2014 * call.c (check_dtor_name, standard_conversion, implicit_conversion,
2015 add_builtin_candidate, add_builtin_candidates,
2016 build_user_type_conversion_1, convert_like_real, build_cxx_call,
2017 is_subseq, compare_ics): Adjust.
2018 * method.c (use_thunk): Adjust.
2019 * rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
2020 create_tinfo_types): Adjust.
2021 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
2022 build_up_reference, convert_to_reference, convert_from_reference,
2023 ocp_convert, build_expr_type_conversion): Adjust.
2024 * tree.c (bind_template_template_parm, error_type): Adjust.
2025 * dump.c (cp_dump_tree): Adjust.
2026 * search.c (lookup_member): Adjust.
2027 * friend.c (make_friend_class, do_friend): Adjust.
2028 * typeck2.c (store_init_value, process_init_constructor_array,
2029 process_init_constructor_record, build_x_arrow, build_m_component_ref,
2030 build_functional_cast): Adjust.
2031 * pt.c (finish_member_template_decl, process_template_parm,
2032 lookup_template_class, tsubst_function_type, tsubst,
2033 tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
2035 * semantics.c (begin_class_definition, finish_base_specifier,
2036 finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
2038 * name-lookup.c (constructor_name_p, push_overloaded_decl,
2039 do_class_using_decl, lookup_qualified_name,
2040 maybe_process_template_type_declaration): Adjust.
2041 * decl2.c (grok_array_decl, check_member_template,
2042 constrain_class_visibility): Adjust.
2043 * parser.c (cp_parser_class_name): Adjust.
2045 2008-03-18 Paolo Bonzini <bonzini@gnu.org>
2047 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
2049 2008-03-17 Jason Merrill <jason@redhat.com>
2052 * call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
2053 a temp directly to a reference as per DR391.
2055 2008-03-12 Richard Guenther <rguenther@suse.de>
2059 2008-02-04 Richard Guenther <rguenther@suse.de>
2062 * decl.c (record_builtin_java_type): Make jboolean a
2063 integer type again where its mode doesn't match that of bool.
2065 2008-01-25 Richard Guenther <rguenther@suse.de>
2068 * decl.c (record_builtin_java_type): Make __java_boolean
2070 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
2071 after TYPE_MAIN_VARIANT check.
2073 2008-03-10 Jakub Jelinek <jakub@redhat.com>
2076 * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
2080 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
2081 DECL_P in not a variable and appears more than once error messages.
2083 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
2087 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
2091 * typeck.c (structural_comptypes): Call cp_comptypes.
2092 (comptypes): New; called from the C/C++ common bits to perform
2094 (cp_comptypes): Renamed from comptypes, which is already used,
2095 with a different signature, by the C++ front end.
2096 (build_reinterpret_cast_1): Call cp_comptypes.
2097 (ptr_reasonably_similar): Ditto.
2098 * decl.c (decls_match): Ditto.
2099 * cvt.c (convert_to_reference): Ditto.
2100 * cp-tree.h (same_type_p): Ditto.
2101 (same_or_base_type_p): Ditto.
2102 (comptypes): Rename to cp_comptypes.
2103 * pt.c (canonical_type_parameter): Call cp_comptypes.
2105 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
2107 * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
2108 test for equivalence between pointer and references.
2110 2008-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2113 * class.c (finish_struct_anon): Use permerror instead of pedwarn.
2114 (check_field_decls): Likewise.
2115 (note_name_declared_in_class): Likewise.
2116 * call.c (build_new_op): Likewise.
2117 (convert_like_real): Likewise.
2118 (build_over_call): Likewise.
2119 * lex.c (unqualified_fn_lookup_error): Likewise.
2120 * parser.c (cp_parser_template_id): Likewise.
2121 * cvt.c (warn_ref_binding): Likewise.
2122 (convert_to_reference): Likewise.
2123 (ocp_convert): Likewise.
2124 (convert_to_void): Use error instead of pedwarn.
2125 * error.c (cp_cpp_error): Use pedantic_warning_kind.
2126 * decl.c (compute_array_index_type): Use constant_expression_error.
2128 2008-03-01 Douglas Gregor <doug.gregor@gmail.com>
2130 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
2131 that auto is either a storage class or a simple type specifier,
2132 depending on the dialect.
2133 (cp_parser_decl_specifier_seq): Complain about `auto' as a storage
2134 specifier in C++98 mode, error in C++0x mode (since we don't
2135 support auto as a type specifier, yet).
2136 (cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
2137 storage specifier in C++0x mode.
2138 (cp_parser_simple_type_specifier): Parse `auto' as a
2139 simple-type-specifier, but error because we don't support it yet.
2141 2008-02-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2143 * parser.c (cp_parser_nonclass_name): New.
2144 (cp_parser_pseudo_destructor_name): Use it instead of
2145 cp_parser_type_name.
2146 (cp_parser_type_name): Move code to cp_parser_nonclass_name.
2148 2008-02-29 Tom Tromey <tromey@redhat.com>
2150 * parser.c (struct cp_token) <input_file_stack_index>: Remove.
2151 (cp_lexer_get_preprocessor_token): Update.
2152 (cp_lexer_set_source_position_from_token): Don't call
2153 restore_input_file_stack.
2154 * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
2156 2008-02-28 Richard Guenther <rguenther@suse.de>
2159 2008-02-26 Richard Guenther <rguenther@suse.de>
2161 * decl.c (duplicate_decls): Remove decl from global mapping
2162 before ggc_freeing it.
2164 2008-02-27 Jakub Jelinek <jakub@redhat.com>
2167 * rtti.c: Include c-pragma.h.
2168 (push_abi_namespace, pop_abi_namespace): New functions.
2169 (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
2170 create_tinfo_types, emit_support_tinfos): Use them.
2171 * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
2173 2008-02-26 Jason Merrill <jason@redhat.com>
2176 * decl.c (grokdeclarator): Allow a typedef of an unnamed struct
2177 to name the struct for linkage purposes even if it has attributes.
2178 (start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
2180 2008-02-26 Tom Tromey <tromey@redhat.com>
2182 * parser.c (eof_token): Remove old location code.
2183 (check_empty_body): Remove test of USE_MAPPED_LOCATION.
2184 * decl2.c (generate_ctor_or_dtor_function): Remove old location
2186 (cp_write_global_declarations): Likewise.
2187 * lex.c (cxx_init): Remove old location code.
2188 (handle_pragma_implementation): Remove test of
2189 USE_MAPPED_LOCATION.
2190 * pt.c (tsubst): Remove old location code.
2191 * error.c (cp_print_error_function): Remove test of
2192 USE_MAPPED_LOCATION.
2193 * decl.c (pop_label): Remove old location code.
2194 (finish_function): Likewise.
2196 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2199 * call.c (magic_varargs_p): Remove BUILT_IN_STDARG_START.
2201 2008-02-26 Richard Guenther <rguenther@suse.de>
2203 * decl.c (duplicate_decls): Remove decl from global mapping
2204 before ggc_freeing it.
2206 2008-02-26 Paolo Carlini <pcarlini@suse.de>
2209 * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
2211 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2213 * typeck.c (build_class_member_access_expr): Add appropriate
2214 OPT_W* parameter to warning.
2215 (build_reinterpret_cast_1): Likewise.
2216 * name-lookup.c (push_overloaded_decl): Likewise.
2218 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2221 * error.c (dump_expr): Handle CONJ_EXPR.
2223 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2226 * error.c (dump_type): Handle FIXED_POINT_TYPE.
2227 (dump_expr): Handle FIXED_CST.
2229 2008-02-24 Jason Merrill <jason@redhat.com>
2231 * parser.c (cp_parser_declaration): Handle "inline namespace".
2232 (cp_parser_namespace_definition): Likewise.
2235 * name-lookup.c (arg_assoc_namespace): Look down into inline
2238 2008-02-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2240 * typeck.c (check_for_casting_away_constness): Use 1 single
2241 argument, the type of cast, to decide what diagnostics generate.
2242 (build_static_cast_1): Remove unused code. Update call to
2243 check_for_casting_away_constness.
2244 (build_reinterpret_cast_1): Update call to
2245 check_for_casting_away_constness.
2246 (build_const_cast_1): Likewise.
2248 2008-02-24 Paolo Carlini <pcarlini@suse.de>
2250 * error.c (dump_expr): Don't deal directly with NEW_EXPR (and
2251 VEC_NEW_EXPR), forward to pp_expression.
2252 * cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
2254 2008-02-24 Danny Smith <dannysmith@users.sourceforge.net>
2257 * friend.c (do_friend): Call cplus_decl_attributes earlier.
2259 2008-02-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
2262 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
2263 template decls' function decl.
2265 2008-02-22 Paolo Carlini <pcarlini@suse.de>
2269 2008-02-14 Paolo Carlini <pcarlini@suse.de>
2272 * pt.c (determine_specialization): In case of function templates,
2273 when the type of DECL does not match FN there is no match.
2275 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2278 * typeck.c (build_binary_op): Warn about floating point
2279 comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
2281 2008-02-19 Jason Merrill <jason@redhat.com>
2284 * pt.c (resolve_overloaded_unification): Set processing_template_decl
2285 while we look for possible bindings.
2287 2008-02-19 Jakub Jelinek <jakub@redhat.com>
2290 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
2294 * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
2295 vars. Afterwards ensure v is VAR_DECL.
2298 * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
2299 call cp_finish_decl.
2300 * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
2303 2008-02-15 Douglas Gregor <doug.gregor@gmail.com>
2308 * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
2309 is error_mark_node, return an error early.
2310 (find_parameter_packs_r): Pass the pointer set along to recursive
2311 calls of cp_walk_subtrees; don't try to manage the pointer set
2313 (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
2314 (make_pack_expansion): Ditto.
2315 (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
2316 a second pass through the tree with find_parameter_packs_r; that
2317 second pass no longer does anything.
2318 (push_template_decl_real): If we have an erroneous declaration,
2319 set its type to error_mark_node before returning an error.
2321 2008-02-14 Douglas Gregor <doug.gregor@gmail.com>
2324 * pt.c (tsubst_initializer_list): Deal with the use of
2325 VOID_TYPE_NODE to indicate value-initialization of the bases.
2327 2008-02-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2328 Jason Merrill <jason@redhat.com>
2332 * class.c (type_has_user_nondefault_constructor): New fn.
2333 * cp-tree.h: Declare it.
2334 * init.c (emit_mem_initializers): Use it for -W warning about
2335 missing base initializer.
2337 2008-02-14 Paolo Carlini <pcarlini@suse.de>
2340 * pt.c (determine_specialization): In case of function templates,
2341 when the type of DECL does not match FN there is no match.
2343 2008-02-13 Jakub Jelinek <jakub@redhat.com>
2344 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2347 * parser.c (cp_parser_pseudo_destructor_name): If next tokens
2348 are not identifier :: ~, return before calling cp_parser_type_name.
2350 2008-02-13 Jason Merrill <jason@redhat.com>
2352 PR c++/34962, c++/34937, c++/34939
2353 * decl2.c (is_late_template_attribute): Always defer attributes
2354 vector_size and weak.
2357 * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
2358 of enumerators, too.
2360 2008-02-12 Jason Merrill <jason@redhat.com>
2363 * call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
2364 if we're doing conversions to call a user-defined conversion function.
2366 2008-02-12 Steven Bosscher <steven@gcc.gnu.org>
2369 * semantics.c (finish_qualified_id_expr): Avoid duplicate access
2372 2008-02-12 Jakub Jelinek <jakub@redhat.com>
2375 * init.c (build_new_1): Don't create placement_expr before
2376 constructing alloc_call. Verify that the pointer is passed by
2377 value to operator new.
2379 2008-02-11 Jason Merrill <jason@redhat.com>
2382 * pt.c (tsubst): Don't look up a template typedef in an explicit
2385 2008-02-11 Douglas Gregor <doug.gregor@gmail.com>
2388 * tree.c (cp_build_qualified_type_real): When building a
2389 cv-qualified array type, build it as a unique type with
2390 build_cplus_array_type_1 and then adopt the unqualified type's
2393 2008-02-11 Paolo Carlini <pcarlini@suse.de>
2396 * decl.c (groktypename): Check grokdeclarator return.
2398 2008-02-10 Jason Merrill <jason@redhat.com>
2401 * decl2.c (cp_write_global_declarations): Don't write out static
2402 data members with DECL_IN_AGGR_P set.
2404 2008-02-08 Jason Merrill <jason@redhat.com>
2407 * tree.c (build_target_expr_with_type): Handle void initializer.
2408 (bot_manip): Remap slot before recursing.
2410 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2413 * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
2415 2008-02-06 Alexandre Oliva <aoliva@redhat.com>
2418 * tree.c: Include tree-flow.h.
2419 (build_target_expr): Check type compatibility.
2420 * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
2421 * call.c (convert_like_real): Convert bitfield to expected type.
2423 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
2427 * typeck.c (structural_comptypes): Call cp_comptypes.
2428 (comptypes): New; called from the C/C++ common bits to perform
2430 (cp_comptypes): Renamed from comptypes, which is already used,
2431 with a different signature, by the C++ front end.
2432 (build_reinterpret_cast_1): Call cp_comptypes.
2433 (ptr_reasonably_similar): Ditto.
2434 * decl.c (decls_match): Ditto.
2435 * cvt.c (convert_to_reference): Ditto.
2436 * cp-tree.h (same_type_p): Ditto.
2437 (same_or_base_type_p): Ditto.
2438 (comptypes): Rename to cp_comptypes.
2439 * pt.c (canonical_type_parameter): Call cp_comptypes.
2441 2008-02-05 Jakub Jelinek <jakub@redhat.com>
2444 * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
2445 value dependent expression.
2447 2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
2450 * decl2.c (save_template_attributes): When we're modifying the
2451 TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
2452 all of the other variants to add those same attributes. Otherwise,
2453 the main variant will be inconsistent with those other variants.
2455 2008-02-04 Richard Guenther <rguenther@suse.de>
2458 * decl.c (record_builtin_java_type): Make jboolean a
2459 integer type again where its mode doesn't match that of bool.
2461 2008-02-02 Jason Merrill <jason@redhat.com>
2462 Mark Mitchell <mark@codesourcery.com>
2465 * init.c (build_value_init_1): New function.
2466 (build_value_init): New function.
2467 * typeck2.c (build_functional_cast): Call it.
2468 * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
2470 * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
2471 TYPE_HAS_CONSTRUCTOR.
2472 * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
2473 add_implicitly_declared_members): Adjust.
2474 (check_field_decls): Adjust. Remove warnings about reference/const
2475 in class without constructor.
2476 (check_bases_and_members): Adjust. Give those warnings here instead.
2477 * decl.c (fixup_anonymous_aggr): Adjust.
2478 (check_initializer): Adjust, clarify logic slightly.
2479 (grok_special_member_properties): Adjust, only set if user-provided.
2480 * rtti.c (create_tinfo_types): Don't set.
2481 * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
2482 Use same_type_ignoring_top_level_qualifiers_p.
2483 * pt.c (check_explicit_specialization): Adjust.
2484 (instantiate_class_template): Adjust.
2486 2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
2487 Jakub Jelinek <jakub@redhat.com>
2491 * typeck.c (structural_comptypes): Handle comparisons of
2492 VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
2494 * mangle.c (write_builtin_type): Map down to the canonical type,
2495 which will be one of the predefined type nodes.
2497 2008-01-29 Michael Meissner <michael.meissner@amd.com>
2500 * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
2501 bits to allow for expansion of the number of middle end tree
2504 2008-01-29 Douglas Gregor <doug.gregor@gmail.com>
2515 * typeck.c (check_return_expr): Tweak call to
2516 check_for_bare_parameter_packs.
2517 * class.c (add_method): Be careful with error_mark_nodes.
2518 * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
2520 * pt.c (struct find_parameter_pack_data): Remove
2522 (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
2523 (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
2524 (make_pack_expansion): Ditto.
2525 (check_for_bare_parameter_packs): Parameter is now a tree, not a
2527 (process_template_parm): Tweak call to
2528 check_for_bare_parameter_packs.
2529 (push_template_decl_real): Tweak calls to
2530 check_for_bare_parameter_packs. If bare parameter packs are found
2531 in the list of exceptions, clear out that list after giving an
2533 * semantics.c (finish_cond): Tweak call to
2534 check_for_bare_parameter_packs.
2535 (finish_expr_stmt): Ditto.
2536 (finish_for_expr): Ditto.
2537 (finish_switch_cond): Ditto.
2538 (finish_mem_initializers): Ditto.
2539 (finish_member_declaration): Ditto.
2540 (finish_static_assert): Check for bare parameter packs in the
2542 * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
2543 attributes of a declaration.
2544 * parser.c (cp_parser_using_declaration): Tweak call to
2545 check_for_bare_parameter_packs.
2546 (cp_parser_base_clause): Ditto.
2548 2008-01-28 Jason Merrill <jason@redhat.com>
2551 * class.c (build_base_path): Fix !want_pointer case.
2553 2008-01-27 Jason Merrill <jason@redhat.com>
2556 * class.c (build_base_path): Fix previous change.
2558 2008-01-26 Jakub Jelinek <jakub@redhat.com>
2561 * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
2564 2008-01-26 Richard Guenther <rguenther@suse.de>
2567 * typeck.c (build_binary_op): Remove code to shorten compares.
2569 2008-01-25 Richard Guenther <rguenther@suse.de>
2572 * decl.c (record_builtin_java_type): Make __java_boolean
2574 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
2575 after TYPE_MAIN_VARIANT check.
2577 2008-01-25 Jason Merrill <jason@redhat.com>
2580 * class.c (build_base_path): Don't mess with virtual access if
2582 * call.c (standard_conversion): Don't check whether source type
2585 * decl2.c (is_late_template_attribute): Don't defer attribute
2586 visibility just because the type is dependent.
2588 2008-01-25 Jason Merrill <jason@redhat.com>
2589 Mark Mitchell <mark@codesourcery.com>
2592 * call.c (standard_conversion): Allow conversion from integer/real
2594 (compare_ics): Such a conversion is worse than a normal arithmetic
2597 2008-01-25 Richard Guenther <rguenther@suse.de>
2600 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
2603 2008-01-24 Paolo Carlini <pcarlini@suse.de>
2606 * pt.c (push_template_decl_real): Return error_mark_node in case
2607 of template definition of non-template.
2609 2008-01-24 Jason Merrill <jason@redhat.com>
2612 * decl2.c (is_late_template_attribute): Defer any attribute with
2613 dependent args. Also defer type attributes if the type is dependent.
2615 2008-01-22 Jakub Jelinek <jakub@redhat.com>
2616 Alexandre Oliva <aoliva@redhat.com>
2619 * call.c (reference_binding): For bitfields use the declared bitfield
2621 (add_builtin_candidates): Likewise.
2622 * class.c (layout_class_type): For bitfields copy over the
2623 original type quals.
2625 2008-01-22 Jason Merrill <jason@redhat.com>
2628 * decl.c (groktypename): Also ignore attributes on dependent
2629 possibly-class types.
2632 * friend.c (do_friend): Check for prior declaration of a friend
2633 function of a local class.
2634 * name-lookup.c (lookup_name_innermost_nonclass_level):
2636 * name-lookup.h: Declare it.
2638 2008-01-22 Tom Tromey <tromey@redhat.com>
2641 * init.c (build_new_1): Only disallow Java aggregates.
2643 2008-01-22 Jakub Jelinek <jakub@redhat.com>
2646 * semantics.c (finish_omp_for): Don't call c_finish_omp_for
2647 if decl or init is error_mark_node.
2650 * error.c (dump_expr): Handle VECTOR_CST.
2652 2008-01-21 Jason Merrill <jason@redhat.com>
2655 * pt.c (tsubst_aggr_type): Make sure our context is complete.
2658 * pt.c (retrieve_local_specialization): Robustify.
2659 (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
2662 * pt.c (tsubst): Only call retrieve_local_specialization if the
2663 original typedef was in a function template.
2666 * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
2668 2008-01-21 Richard Guenther <rguenther@suse.de>
2671 * error.c (cp_print_error_function): Deal with recursive
2674 2008-01-20 Paolo Carlini <pcarlini@suse.de>
2677 * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
2679 2008-01-20 Paolo Carlini <pcarlini@suse.de>
2683 * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
2684 on non-IS_AGGR_TYPE scope.
2685 (constructor_name_p): Assert IS_AGGR_TYPE.
2687 2008-01-18 Ian Lance Taylor <iant@google.com>
2690 * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
2691 (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
2692 DECL_IS_OPERATOR_NEW flag.
2694 2008-01-16 Richard Guenther <rguenther@suse.de>
2697 * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
2698 for conversions to type variants.
2700 2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
2702 * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
2703 declaration and code. Update copyright year.
2705 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2708 * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
2709 know we have a class type.
2711 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2714 * pt.c (coerce_template_parameter_pack): When substituting into
2715 the type of a non-type template parameter pack. use the
2716 deduced/substituted arguments.
2717 * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
2718 can be a parameter pack with the ellipsis following it. When we
2719 have an erroneous declaration, allow it to be a parameter pack.
2720 (cp_parser_template_parameter): Complain about default
2721 arguments on non-type template parameter packs, and parse them
2722 using the new cp_parser_default_argument.
2723 (cp_parser_parameter_declaration): Complain about parameter packs
2724 with default arguments. Move parsing of default arguments into a
2725 new function, cp_parser_default_argument.
2726 (cp_parser_default_argument): New; extracted from
2727 cp_parser_parameter_declaration.
2729 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2735 * typeck.c (check_return_expr): If there are bare parameter packs
2736 in the return value, set it to error_mark_node.
2737 * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
2738 * pt.c (find_parameter_packs_r): Look at the type of
2739 IDENTIFIER_NODEs (e.g., for user-defined conversions).
2740 (check_for_bare_parameter_packs): Flip the result: now returns
2741 TRUE when there were bare parameter packs, FALSE otherwise.
2742 (push_template_decl_real): Deal with flipped result of
2743 check_for_bare_parameter_packs.
2744 * semantics.c (finish_cond): If there are bare parameter packs in
2745 the conditional, set it to error_mark_node.
2746 (finish_expr_stmt): If there are bare parameter packs in the
2747 expression, set it to error_mark_node.
2748 (finish_for_expr): Ditto.
2749 (finish_switch_cond): If there are bare parameter packs in
2750 the conditional, set it to error_mark_node.
2751 (finish_mem_initializers): If there are bare parameter packs in
2752 the member initializer, set it to error_mark_node.
2753 (finish_member_declaration): Check the attributes of the
2754 declaration for bare parameter packs, and remove the attributes if
2755 any have bare parameter packs.
2756 * parser.c (cp_parser_using_declaration): Check the using
2757 declaration for bare parameter packs.
2758 (cp_parser_base_clause): If there are bare parameter packs in a
2759 base specifier, don't add it to the chain.
2761 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2764 * error.c (dump_simple_decl): Display ellipsis for template
2765 non-type parameter packs.
2766 (dump_decl): Display ellipsis for template type parameter packs.
2767 (dump_template_decl): Display ellipsis for template template
2769 * pt.c (redeclare_class_template): When redeclaring a class
2770 template, check for collisions between template parameters and
2771 template parameter packs.
2773 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2776 * pt.c (process_partial_specialization): Don't mark template
2777 parameters that occur in non-deduced contexts.
2778 (struct pair_fn_data): Add include_nondeduced_p.
2779 (for_each_template_parm_r): Only visit non-deduced contexts if
2780 include_nondeduced_p is set.
2781 (for_each_template_parm): Added parameter include_nondeduced_p,
2782 which states whether template parameters found in non-deduced
2783 contexts should be visited.
2784 (uses_template_parms): Visit all template parameters, even those
2785 in non-deduced contexts.
2787 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2790 * pt.c (check_default_tmpl_args): Check for parameter packs that
2791 aren't at the end of a primary template.
2792 (push_template_decl_real): Remove check for parameter packs that
2793 aren't at the end of a primary template; that now happens in
2794 check_default_tmpl_args.
2795 * semantics.c (finish_template_template_parm): Use
2796 check_default_tmpl_args to check for errors in the template
2799 2008-01-12 Doug Kwan <dougkwan@google.com>
2801 * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
2802 instead of OPT_Wreturn_type in warning due to ignored return type
2804 * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
2805 instead of OPT_Wreturn_type in warning due to ignored return type
2808 2008-01-08 Jakub Jelinek <jakub@redhat.com>
2811 * semantics.c (finish_omp_for): Don't call
2812 fold_build_cleanup_point_expr if processing_template_decl.
2814 2008-01-04 Paolo Carlini <pcarlini@suse.de>
2815 Jakub Jelinek <jakub@redhat.com>
2818 * error.c (dump_template_argument): Deal with TREE_LIST.
2820 2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
2822 * parser.c (cp_parser_check_decl_spec): Don't warn about "long
2823 long" in C++0x mode; change the warning to note that "long long"
2824 is only unsupported in C++98 mode.
2826 2007-12-20 Jason Merrill <jason@redhat.com>
2829 * call.c (standard_conversion): Derived-to-base is considered a
2830 standard conversion.
2832 2007-12-19 Jakub Jelinek <jakub@redhat.com>
2835 * parser.c (cp_parser_omp_parallel): For non-combined parallel
2836 call cp_parser_statement rather than
2837 cp_parser_already_scoped_statement.
2839 2007-12-18 Jason Merrill <jason@redhat.com>
2842 * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
2844 (dependent_type_p_r): Handle the domain of an array.
2846 2007-12-18 Douglas Gregor <doug.gregor@gmail.com>
2847 Jakub Jelinek <jakub@redhat.com>
2852 * pt.c (template_template_parm_bindings_ok_p): New; verifies
2853 bindings of template template parameters after all template
2854 arguments have been deduced.
2855 (coerce_template_parms): Don't complain when COMPLAIN doesn't
2857 (fn_type_unification): Use template_template_parm_bindings_ok_p.
2858 (unify): Deal with variadic, bound template template parameters.
2859 (get_class_bindings): Use template_template_parm_bindings_ok_p.
2861 2007-12-18 Jakub Jelinek <jakub@redhat.com>
2864 * decl.c (grokdeclarator): Reject friend sfk_constructor
2867 2007-12-17 Jakub Jelinek <jakub@redhat.com>
2870 * parser.c (cp_parser_omp_all_clauses): Accept optional comma
2873 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
2876 * cp-lang.c (cp_classify_record): New.
2877 (LANG_HOOKS_CLASSIFY_RECORD): Override.
2879 2007-12-11 Jakub Jelinek <jakub@redhat.com>
2882 * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
2885 * rtti.c (build_dynamic_cast): Call convert_from_reference even for
2886 dynamic_cast in a template.
2888 2007-12-10 Simon Martin <simartin@users.sourceforge.net>
2891 * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
2892 MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
2894 2007-12-10 Jakub Jelinek <jakub@redhat.com>
2897 * error.c (dump_type_prefix, dump_type_suffix): Handle
2898 TYPE_PACK_EXPANSION.
2901 * error.c (dump_expr): Handle ABS_EXPR.
2903 2007-12-09 Jakub Jelinek <jakub@redhat.com>
2907 * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
2908 in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2909 Return 2 also if DECL_EXPLICIT_INSTANTIATION.
2910 * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
2911 flag_use_repository and repo_emit_p returned 2.
2913 2007-12-06 Jakub Jelinek <jakub@redhat.com>
2916 * tree.c (stabilize_call, stabilize_init): Do nothing if
2917 processing_template_decl.
2919 2007-12-05 Jakub Jelinek <jakub@redhat.com>
2922 * semantics.c (finish_decltype_type): For SCOPE_REF issue an
2923 error instead of assertion failure.
2924 * parser.c (cp_parser_decltype): If closing paren is not found,
2925 return error_mark_node.
2927 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2930 * name-lookup.c (arg_assoc_template_arg): Recurse on argument
2932 (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
2933 since arg_assoc_template_arg will deal with them (better).
2935 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2938 * pt.c (tsubst_exception_specification): Handle substitutions into
2939 member templates, where tsubst_pack_expansion returns a
2940 TYPE_PACK_EXPANSION.
2942 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2945 * pt.c (unify_pack_expansion): If we didn't deduce any actual
2946 bindings for the template parameter pack, don't try to keep the
2947 empty deduced arguments.
2948 (unify): If a parameter is a template-id whose template argument
2949 list contains a pack expansion that is not at the end, then we
2950 cannot unify against that template-id.
2952 2007-12-02 Paolo Carlini <pcarlini@suse.de>
2955 * pt.c (current_template_args): Use error_operand_p.
2957 2007-12-02 Paolo Carlini <pcarlini@suse.de>
2960 * error.c (dump_decl): Handle TREE_BINFO.
2962 2007-12-01 Ollie Wild <aaw@google.com>
2965 * typeck.c (build_binary_op): Add conversion of pointers to function
2966 members appearing as operands to the equality operators.
2968 2007-11-30 Jakub Jelinek <jakub@redhat.com>
2971 * error.c (dump_expr): Handle OBJ_TYPE_REF.
2973 2007-11-29 Jakub Jelinek <jakub@redhat.com>
2976 * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
2978 * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
2983 * parser.c (cp_parser_decltype): Don't call finish_id_expression
2985 * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
2988 2007-11-27 Jakub Jelinek <jakub@redhat.com>
2990 PR tree-optimization/34181
2991 * method.c (use_thunk): Don't inline the call in the thunk.
2994 * tree.c (decl_linkage): Static data members and static member
2995 functions in anonymous ns classes are lk_external.
2997 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
3000 * decl.c (start_preparsed_function): Pass
3001 processing_template_decl for the new allocate_struct_function
3004 2007-11-25 Richard Guenther <rguenther@suse.de>
3006 * decl.c (poplevel): Use BLOCK_CHAIN.
3008 2007-11-24 Ollie Wild <aaw@google.com>
3010 * typeck.c (delta_from_ptrmemfunc): New function.
3011 (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
3012 (build_binary_op): Call delta_from_ptrmemfunc.
3014 2007-11-23 Jakub Jelinek <jakub@redhat.com>
3018 * decl.c (cp_finish_decl): Disallow variable or field
3019 definitions if extern "Java" aggregates.
3020 (grokparms): Disallow parameters with extern "Java"
3022 (check_function_type): Disallow function return values
3023 with extern "Java" aggregates.
3024 * init.c (build_new_1): Disallow placement new with
3025 extern "Java" aggregates.
3027 2007-11-23 Mark Mitchell <mark@codesourcery.com>
3028 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3031 * call.c (convert_like_real): Build a zero constant when __null is
3032 converted to an integer type.
3034 2007-11-22 Jakub Jelinek <jakub@redhat.com>
3037 * decl2.c (cp_write_global_declarations): Issue error about static
3038 data members in anonymous namespace which are declared and used,
3041 2007-11-20 Jakub Jelinek <jakub@redhat.com>
3044 * parser.c (cp_parser_class_head): Reject function template ids.
3047 * tree.c (build_cplus_array_type_1): Don't pass any VLA types
3048 when processing_template_decl to build_array_type.
3051 * pt.c (more_specialized_fn): Don't segfault if one or
3052 both argument list end with ellipsis.
3054 2007-11-18 Jakub Jelinek <jakub@redhat.com>
3057 * semantics.c (finish_call_expr): Set
3058 current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
3059 or OVERLOAD with all noreturn functions.
3061 2007-11-16 Jakub Jelinek <jakub@redhat.com>
3064 * pt.c (apply_late_template_attributes): Do nothing if decl's type is
3067 2007-11-13 Jakub Jelinek <jakub@redhat.com>
3074 * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
3075 set to error_mark_node the outermost POINTER_TYPE to the pack if
3076 it is seen in a POINTER_TYPE.
3077 (push_template_decl_real): If check_for_bare_parameter_packs
3078 fails for function return type, set the return type to
3079 integer_type_node. If check_for_bare_parameter_packs failed
3080 for non-function, return error_mark_node.
3083 * call.c (build_new_op): Call resolve_args before calling
3086 2007-11-11 Tom Tromey <tromey@redhat.com>
3089 * lex.c (handle_pragma_implementation): Use cpp_included_before.
3091 2007-11-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3094 * pt.c (redeclare_class_template): Update error message. Use a
3095 note to show the previous declaration.
3096 (tsubst_friend_class): Use the location of the friend template as
3097 the input location before calling redeclare_class_template.
3099 2007-11-11 Jakub Jelinek <jakub@redhat.com>
3102 * semantics.c (finish_pseudo_destructor_expr): Handle
3103 object == error_mark_node.
3105 2007-11-10 Jakub Jelinek <jakub@redhat.com>
3108 * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
3109 is not scalar type, let finish_class_member_access_expr handle
3110 diagnostics. Pass BIT_NOT_EXPR argument to
3111 finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
3113 2007-11-09 Douglas Gregor <doug.gregor@gmail.com>
3116 * decl.c (cp_complete_array_type): If any of the initializer
3117 elements are pack expansions, don't compute the array size yet.
3119 2007-11-08 Andrew Pinski <pinskia@gmail.com>
3122 * tree.c (decl_linkage): Fields have no linkage.
3124 2007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
3126 * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
3128 2007-11-07 Douglas Gregor <doug.gregor@gmail.com>
3133 * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
3134 Be careful with ERROR_MARK_NODEs.
3135 * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
3138 2007-11-07 Jakub Jelinek <jakub@redhat.com>
3141 * call.c (build_over_call): Don't check TREE_ADDRESSABLE
3144 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
3148 * tree.c (c_build_qualified_type): Define bridge to
3149 cp_build_qualified_type.
3151 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
3162 * typeck.c (check_return_expr): Pass address of retval to
3163 check_for_bare_parameter_packs.
3164 * class.c (build_base_field): Tolerate bases that have no layout
3166 (end_of_base): Ditto.
3167 * tree.c (canonical_type_variant): Be careful with
3169 * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
3171 * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
3172 which states whether parameter packs should be replaced with
3174 (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
3175 possible. If set_packs_to_error is set true, replace the parameter
3176 pack with ERROR_MARK_NODE. Manage our own pointer sets.
3177 (uses_parameter_packs): Don't set parameter packs to
3179 (check_for_bare_parameter_packs): Now takes a pointer to a tree,
3180 which may be modified (if it is a parameter pack). Instructs
3181 find_parameter_packs_r to replace parameter packs with
3182 ERROR_MARK_NODE (so that they won't cause errors later on).
3183 (process_template_parm): Pass pointer to
3184 check_for_bare_parameter_packs.
3185 (process_partial_specialization): Replace pack expansions before
3186 the end of the template argument list with ERROR_MARK_NODE.
3187 (push_template_decl_real): Pass pointer to
3188 check_for_bare_parameter_packs. Replace parameter packs not at the
3189 end of the template parameter list with ERROR_MARK_NODE.
3190 (convert_template_argument): Be more careful about using DECL_NAME
3191 on only declarations.
3192 (unify): Can't unify against ERROR_MARK_NODE.
3193 * semantics.c (finish_cond): Pass pointer to
3194 check_for_bare_parameter_packs.
3195 (finish_expr_stmt): Ditto.
3196 (finish_for_expr): Ditto.
3197 (finish_switch_cond): Pass pointer to
3198 check_for_bare_parameter_packs, and call it before we put the
3199 condition into the statement.
3200 (finish_mem_initializers): Pass pointer to
3201 check_for_bare_parameter_packs.
3202 (finish_member_declaration): Ditto.
3203 * parser.c (cp_parser_base_clause): Ditto.
3205 2007-11-06 Jakub Jelinek <jakub@redhat.com>
3208 * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
3209 with the final TREE_READONLY flag in place. processing_template_decl
3210 is known to be 0 in this part of function.
3213 * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
3214 OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
3215 * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
3216 * semantics.c (finish_omp_atomic): Revert most of the
3217 2007-02-05 changes, just keep the new representation of
3218 OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
3220 2007-11-05 H.J. Lu <hongjiu.lu@intel.com>
3223 * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
3226 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
3231 * typeck.c (merge_types): Don't lose rvalue references when
3233 * call.c (build_over_call): Don't elide move constructors just
3234 because the copy constructor is trivial (!).
3235 (compare_ics): If comparing cv-qualifiers fails, we can still order
3236 based on binding lvalues vs. rvalues.
3238 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
3241 * pt.c (unify_pack_expansion): bring handling of function call
3242 arguments into line with type_unification_real.
3244 2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3246 * typeck.c (build_binary_op): Use pedwarn instead of error for
3249 2007-11-05 Jakub Jelinek <jakub@redhat.com>
3252 * parser.c (cp_parser_unary_expression): For &&label call
3253 cp_parser_non_integral_constant_expression and return error_mark_node
3254 if it returned true.
3257 * decl.c (grokdeclarator): Don't call build_memfn_type if type
3258 is neither FUNCTION_TYPE nor METHOD_TYPE.
3260 2007-11-02 Jakub Jelinek <jakub@redhat.com>
3263 * parser.c (cp_parser_nested_name_specifier_opt): Use
3264 TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
3265 typedef of currently open class.
3267 2007-11-02 Paolo Carlini <pcarlini@suse.de>
3270 * error.c (dump_expr): Deal specially with statements.
3272 2007-11-01 Jason Merrill <jason@redhat.com>
3275 * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
3277 (lookup_template_class): Use it to get the outer template args
3278 for instantiating one.
3281 * pt.c (reduce_template_parm_level): tsubst the parameters
3282 of a template template parm.
3284 2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
3287 * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
3289 2007-11-01 Jakub Jelinek <jakub@redhat.com>
3292 * parser.c (cp_parser_postfix_dot_deref_expression): If
3293 POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
3294 first and if that succeeds and type is SCALAR_TYPE_P, create
3298 * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
3299 (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
3300 as for std::type_info.
3302 2007-10-31 Paolo Carlini <pcarlini@suse.de>
3305 * cxx-pretty-print.c (pp_cxx_typeid_expression,
3306 pp_cxx_delete_expression): Change to static linkage.
3307 * cxx-pretty-print.h: Adjust declarations.
3308 * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
3309 MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
3310 MODOP_EXPR): Forward to pp_expression.
3312 * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
3315 2007-10-31 Christian Bruel <christian.bruel@st.com>
3316 Mark Mitchell <mark@codesourcery.com>
3319 * typeck.c (check_return_expr): Don't set named_return_value_okay_p
3320 if retval is volatile.
3322 2007-10-30 Jakub Jelinek <jakub@redhat.com>
3325 * decl2.c (build_offset_ref_call_from_tree): Call
3326 build_non_dependent_expr on object prior to building ADDR_EXPR from it
3327 if FN is DOTSTAR_EXPR.
3329 2007-10-30 Douglas Gregor <doug.gregor@gmail.com>
3333 * pt.c (find_parameter_packs_r): Fix typo in comment.
3334 (convert_template_argument): Look at the pattern of a pack
3335 expansion to determine what kind of entity we're converting.
3336 (coerce_template_parameter_pack): When we have coerced a non-type
3337 template parameter pack, substitute into the type of that pack.
3338 (tsubst_pack_expansion): When our substitution of a parameter pack
3339 is a "trivial" substitution of itself, just substitute into the
3340 pack expansion rather than actually expanding.
3342 2007-10-29 Jakub Jelinek <jakub@redhat.com>
3345 * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
3346 for non-integral type bitfields. Return true if bitfield is correct, false
3347 error has been diagnosed.
3348 (check_field_decls): If check_bitfield_decl returned false, call also
3351 2007-10-28 Paolo Carlini <pcarlini@suse.de>
3352 Mark Mitchell <mark@codesourcery.com>
3355 * pt.c (do_decl_instantiation): If the VAR_DECL is not a
3356 class member error out and return.
3358 2007-10-27 Jakub Jelinek <jakub@redhat.com>
3360 * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
3361 to current_function_decl rather than 0.
3364 * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
3366 * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
3368 2007-10-27 Jason Merrill <jason@redhat.com>
3371 * call.c (convert_default_arg): Detect recursion.
3373 2007-10-27 Jakub Jelinek <jakub@redhat.com>
3376 * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
3377 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
3379 (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
3381 * error.c (dump_expr): Handle OFFSETOF_EXPR.
3383 2007-10-26 Jason Merrill <jason@redhat.com>
3386 * pt.c (get_template_info): New fn.
3387 (template_class_depth): Use it.
3388 (push_template_decl_real): Check that the template args of the
3389 definition match the args of the previous declaration.
3391 2007-10-26 Paolo Carlini <pcarlini@suse.de>
3394 * decl2.c (coerce_new_type): Do not allow a default argument for
3395 the first parameter.
3397 2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
3400 * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
3401 don't see the leading '('. Only lookup names if we get an
3404 2007-10-26 Jakub Jelinek <jakub@redhat.com>
3407 * parser.c (cp_parser_parenthesized_expression_list): Set
3408 greater_than_is_operator_p to true in between the parens.
3410 2007-10-26 Paolo Carlini <pcarlini@suse.de>
3413 * decl.c (grokdeclarator): In case of conflicting specifiers
3414 just return error_mark_node.
3416 2007-10-26 Ollie Wild <aaw@google.com>
3418 * expr.c (cxx_expand_expr): Removed.
3419 * cp-tree.h (exx_expand_expr): Removed.
3420 * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
3423 2007-10-25 Paolo Carlini <pcarlini@suse.de>
3426 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
3428 2007-10-23 Jason Merrill <jason@redhat.com>
3430 PR c++/25950 (DR 391)
3431 * call.c (struct conversion): Remove check_copy_constructor_p.
3432 (reference_binding): Always bind a reference directly to a
3433 compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during
3435 (check_constructor_callable): Remove.
3436 (convert_like_real): Don't call it.
3437 (initialize_reference): Don't call check_constructor_callable.
3438 (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
3439 LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base
3440 conversions if LOOKUP_NO_TEMP_BIND.
3441 (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
3442 (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
3444 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
3446 2007-10-22 Jakub Jelinek <jakub@redhat.com>
3449 * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
3450 before checking if its type is integral.
3452 2007-10-22 Jason Merrill <jason@redhat.com>
3455 * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
3456 * pt.c (apply_late_template_attributes): Splice out dependent
3457 attributes from DECL_ATTRIBUTES.
3459 * decl.c (cxx_maybe_build_cleanup): Use build_address.
3461 2007-10-17 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3463 * typeck.c (build_binary_op) : Use appropriate warning option
3464 instead of unnamed warning.
3466 2007-10-16 Paolo Carlini <pcarlini@suse.de>
3469 * pt.c (current_template_args): Do not change TREE_LIST elements
3470 with a TREE_VALUE of error_mark_node.
3472 2007-10-16 Mark Mitchell <mark@codesourcery.com>
3474 * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
3475 * decl.c (start_decl): Tidy.
3476 (start_decl_1): Call cp_apply_type_quals_to_decl after completing
3478 (grokdeclarator): Clarify comment.
3480 2007-10-14 Andrew Pinski <pinskia@gmail.com>
3483 * decl.c (grokfndecl): Return NULL after the "definition of
3484 implicitly-declared" error happened.
3486 2007-10-12 Simon Martin <simartin@users.sourceforge.net>
3489 * call.c (build_user_type_conversion_1): Do not consider conversion
3490 functions to convert a (possibly cv-qualified) object to the (possibly
3491 cv-qualified) same object type (or a reference to it), to a (possibly
3492 cv-qualified) base class of that type (or a reference to it).
3494 2007-10-12 Paolo Carlini <pcarlini@suse.de>
3496 * pt.c (tsubst): Use template_parm_level_and_index.
3498 2007-10-12 Jakub Jelinek <jakub@redhat.com>
3501 * parser.c (cp_parser_compound_statement): Handle label-declarations
3502 at the beginning of the compound statement.
3503 (cp_parser_block_declaration): Issue diagnostics about __label__
3504 not at the beginning of a block.
3506 2007-10-11 Paolo Carlini <pcarlini@suse.de>
3509 * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
3510 to convert_template_argument.
3511 (coerce_template_parms): Return error_mark_node after fixed-length
3513 (tsubst_decl): Check for error_mark_node the return value of the
3514 first tsubst in 'case VAR_DECL'.
3516 2007-10-08 Ollie Wild <aaw@google.com>
3518 * typeck2.c (digest_init): Call cplus_expand_constant after
3519 convert_for_initialization.
3520 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
3521 * expr.c (cplus_expand_constant): Updated function description.
3523 2007-10-04 Jason Merrill <jason@redhat.com>
3526 * call.c (initialize_reference): Handle local static reference
3529 2007-10-03 Jason Merrill <jason@redhat.com>
3532 * name-lookup.c (push_namespace_with_attrs): Fold back into...
3533 (push_namespace): Here.
3534 (handle_namespace_attrs): New fn for the attr code.
3535 (leave_scope): Don't pop_visibility.
3536 * name-lookup.h (struct cp_binding_level): Remove has_visibility.
3537 * parser.c (cp_parser_namespace_definition): Call
3538 handle_namespace_attrs and pop_visibility as appropriate.
3541 * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
3543 2007-10-03 Alexandre Oliva <aoliva@redhat.com>
3545 * decl.c (duplicate_decls): Preserve linkage flags for mere
3546 redeclarations of gnu_inline definitions.
3548 2007-10-03 Jason Merrill <jason@redhat.com>
3551 * decl.c (wrap_cleanups_r): New fn.
3552 (wrap_temporary_cleanups): New fn.
3553 (initialize_local_var): Call it.
3555 2007-09-29 Jason Merrill <jason@redhat.com>
3558 * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
3559 constant to not have DECL_EXTERNAL if it's file-local.
3561 2007-09-28 Ollie Wild <aaw@google.com>
3564 2007-09-27 Ollie Wild <aaw@google.com>
3566 * typeck2.c (digest_init): Call cplus_expand_constant after
3567 convert_for_initialization.
3568 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
3569 * expr.c (cplus_expand_constant): Updated function description.
3571 2007-09-28 Jason Merrill <jason@redhat.com>
3574 * class.c (layout_empty_base): Take rli parameter, update
3575 rli->record_align if empty base has user-specified alignment.
3576 (build_base_field): Pass rli to it.
3578 2007-09-28 Paolo Carlini <pcarlini@suse.de>
3581 * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
3583 2007-09-28 Paolo Carlini <pcarlini@suse.de>
3586 * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
3587 (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
3588 (dump_parameters): Just call dump_type for argument packs too.
3590 2007-09-28 Jakub Jelinek <jakub@redhat.com>
3593 * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
3594 qualification by creating qualified PACK_EXPANSION_PATTERN and
3595 then calling make_pack_expansion on it.
3597 2007-09-27 Ollie Wild <aaw@google.com>
3599 * typeck2.c (digest_init): Call cplus_expand_constant after
3600 convert_for_initialization.
3601 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
3602 * expr.c (cplus_expand_constant): Updated function description.
3604 2007-09-27 Jason Merrill <jason@redhat.com>
3607 * decl2.c (is_late_template_attribute): Don't crash on unknown
3610 2007-09-27 Paolo Carlini <pcarlini@suse.de>
3613 * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
3614 * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
3615 spaces in the formatting.
3616 * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
3618 2007-09-27 Jakub Jelinek <jakub@redhat.com>
3620 * error.c (cxx_print_error_function): Add third argument, pass
3621 it over to lhd_print_error_function.
3622 (cp_print_error_function): If diagnostic->abstract_origin, print
3624 * cp-tree.h (struct diagnostic_info): New forward decl.
3625 (cxx_print_error_function): Add third argument.
3627 2007-09-25 Simon Martin <simartin@users.sourceforge.net>
3630 * name-lookup.c (pushtag): Do not create an implicit typedef before
3631 the associated type declaration is known to be valid.
3633 2007-09-25 Jakub Jelinek <jakub@redhat.com>
3635 * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
3636 rather than pointers.
3638 2007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
3641 * search.c (check_final_overrider): Fail if
3642 targetm.comp_type_attributes returns 0.
3644 2007-09-24 Jason Merrill <jason@redhat.com>
3647 * pt.c (resolve_typename_type): Don't look things up in the original
3648 template if it would mean losing template arguments.
3650 2007-09-24 Jakub Jelinek <jakub@redhat.com>
3653 * cp-tree.h (cxx_type_hash_eq): New prototype.
3654 * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
3655 * tree.c (cxx_type_hash_eq): New function.
3657 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
3660 * tree.c (cp_build_qualified_type_real): Build a canonical
3661 ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
3663 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
3667 * tree.c (cplus_array_compare): Compare pointers, not types.
3668 (build_cplus_array_type_1): Store new array type into the hash
3669 table before building the canonical type; build the canonical type
3671 (cp_build_qualified_type_real): Put all of the array types with
3672 cv-qualified element types into the C++ array hash table, built as
3673 variants of the unqualified versions.
3675 2007-09-23 Jason Merrill <jason@redhat.com>
3678 * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
3679 for deprecation warnings.
3681 2007-09-22 Jason Merrill <jason@redhat.com>
3684 * call.c (build_over_call): Warn about deprecated virtuals.
3687 * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
3688 (MAYBE_TAGGED_TYPE_P): Remove.
3689 * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
3690 instead of calling is_late_template_attribute again.
3691 (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
3692 (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
3693 Don't crash on typedefs from non-template classes.
3694 * decl2.c (grokfield): Don't sorry about attrs on template parms.
3695 (is_late_template_attribute): All attributes applied to template
3696 parms or typename types are dependent. Static.
3697 (splice_template_attributes): Pass decl through.
3698 (save_template_attributes): Likewise.
3700 2007-09-20 Jakub Jelinek <jakub@redhat.com>
3703 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
3704 returned from tsubst_pack_expansion.
3705 (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
3706 (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
3708 2007-09-20 Paolo Carlini <pcarlini@suse.de>
3711 * semantics.c (finish_id_expression): Use consistently
3712 context_for_name_lookup.
3713 * decl.c (fixup_anonymous_aggr): Fix error message for
3714 anonymous struct (vs union).
3716 2007-09-19 Jason Merrill <jason@redhat.com>
3719 * pt.c (tsubst): Handle typedefs by looking for the specialization.
3720 (retrieve_specialization): Only tagged types use
3721 DECL_TEMPLATE_INSTANTIATIONS.
3722 (instantiate_class_template): Push nested classes too.
3723 (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
3725 * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
3726 * init.c (is_aggr_type): Remove redundant tests.
3727 * class.c (push_nested_class): Use CLASS_TYPE_P.
3729 2007-09-20 Paolo Carlini <pcarlini@suse.de>
3732 * init.c (build_zero_init): If, recursively, build_zero_init
3733 returns a NULL_TREE, do not append it to the VEC of constructors.
3735 2007-09-18 Jason Merrill <jason@redhat.com>
3738 * pt.c (apply_late_template_attributes): Set processing_template_decl.
3739 (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
3740 ATTR_FLAG_TYPE_IN_PLACE.
3741 (tsubst): Do unqualified lookup to find typedefs from current class.
3742 [ARRAY_TYPE]: Propagate alignment info.
3743 * decl2.c (is_late_template_attribute): Only defer handling of
3744 attribute aligned if the expression is dependent.
3745 (save_template_attributes): If we're deferring any attributes,
3746 make this a naming typedef.
3748 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3750 PR c++/33462 (again)
3751 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
3752 va_arg instead of __builtin_va_arg.
3754 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3757 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
3758 (pp_cxx_primary_expression): Use it.
3759 * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
3760 * error.c (dump_expr): Use it.
3762 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3765 * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
3766 out case TYPEID_EXPR to...
3767 (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
3768 and pp_cxx_right_paren.
3769 * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
3770 * error.c (dump_expr): Use it.
3772 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3775 * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
3776 (pp_cxx_primary_expression): Use it.
3777 * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
3778 * error.c (dump_expr): Use it.
3780 2007-09-16 Paolo Carlini <pcarlini@suse.de>
3783 * init.c (build_new): Remove warning for zero-element
3786 2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
3789 * call.c (maybe_handle_implicit_object): Set this_p, clear
3790 rvaluedness_matches_p.
3791 (compare_ics): Do not compare rvaluedness matching when one of the
3792 operands is an implicit object.
3794 2007-09-14 Jason Merrill <jason@redhat.com>
3796 PR c++/17743, c++/19163
3797 * decl2.c (is_late_template_attribute): New fn.
3798 (splice_template_attributes, save_template_attributes): New fns.
3799 (cplus_decl_attributes): Call save_template_attributes.
3800 * pt.c (apply_late_template_attributes): New fn.
3801 (instantiate_class_template, tsubst_decl): Use it.
3802 * cp-tree.h: Declare is_late_template_attribute.
3804 2007-09-13 Tom Tromey <tromey@redhat.com>
3806 * parser.c (cp_lexer_new_main): Don't use
3807 c_lex_return_raw_strings.
3808 (cp_lexer_get_preprocessor_token): Update. Add special case when
3811 2007-09-11 Jan Hubicka <jh@suse.cz>
3813 * method.c (use_thunk): Use tree_rest_of_compilation
3814 * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
3815 (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
3816 * cp-tree.h (expand_body): Kill.
3817 (emit_associated_thunks): Declare.
3818 * semantics.c (emit_associated_thunks): Export.
3819 (expand_body): Kill.
3821 2007-09-09 David Daney <ddaney@avtrex.com>
3824 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
3825 to calculate cookie_ptr.
3827 2007-09-08 Jason Merrill <jason@redhat.com>
3830 * pt.c (most_specialized_class): Set processing_template_decl
3831 while tsubsting partial spec args.
3833 2007-09-06 Jason Merrill <jason@redhat.com>
3835 * decl2.c (get_guard): Copy visibility from the guarded variable.
3837 2007-09-06 Jan Hubicka <jh@suse.cz>
3839 * semantics.c (expand_body): Do not mark arguments of clones used.
3841 2007-09-06 Paolo Carlini <pcarlini@suse.de>
3844 * decl.c (cp_finish_decl): When processing_template_decl,
3845 deal correctly with init as TREE_LIST.
3847 2007-09-06 Tom Tromey <tromey@redhat.com>
3849 * decl.c (finish_function): Put return's location on line zero of
3852 2007-09-05 Jason Merrill <jason@redhat.com>
3855 * except.c (prepare_eh_type): Use type_decays_to.
3858 * init.c (build_delete): Use build_headof to get the address of the
3859 complete object if we aren't using the deleting destructor.
3860 * rtti.c (build_headof): No longer static.
3861 * cp-tree.h: Declare it.
3863 2007-09-06 Jakub Jelinek <jakub@redhat.com>
3865 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
3866 decl if a prototype for XX is provided with throw().
3869 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
3870 on __*_chk non-__builtin_* decls.
3872 2007-09-05 Paolo Carlini <pcarlini@suse.de>
3875 * semantics.c (finish_id_expression): Use context_for_name_lookup
3876 insted of DECL_CONTEXT, to see through anonymous structs and unions.
3877 * class.c (finish_struct_anon): Deal correctly with anonymous
3878 structs (vs unions, as GNU extension) in error messages.
3880 2007-09-05 Jan Hubicka <jh@suse.cz>
3882 * sematics.c (expand_body): Remove unnecesary import_export_decl
3883 call, DECL_EXTERNAL checks and current_function_decl saving.
3885 2007-09-05 Paolo Carlini <pcarlini@suse.de>
3887 PR c++/29731 (again)
3888 * parser.c (cp_parser_primary_expression): Return error_mark_node
3889 when a statement-expression is found in a template-argument list.
3891 2007-09-04 Jason Merrill <jason@redhat.com>
3893 * except.c (initialize_handler_parm): Use
3894 fold_build_cleanup_point_expr.
3897 * call.c (reference_binding): Don't look for user-defined conversions
3901 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
3902 the MUST_NOT_THROW_EXPR.
3904 2007-09-04 Richard Sandiford <richard@codesourcery.com>
3906 * decl.c (cp_finish_decl): Call determine_visibility before
3907 make_rtl_for_nonlocal_decl.
3909 2007-09-04 Jason Merrill <jason@redhat.com>
3912 * pt.c (most_specialized_class): Substitute outer template
3913 arguments into the arguments of a member template partial
3915 (strip_innermost_template_args): New fn.
3917 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
3919 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
3921 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3923 * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
3924 * decl.c (cp_make_fname_decl): Likewise,
3925 * parser.c (cp_parser_string_literal): Likewise,
3926 * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
3927 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
3930 2007-09-02 Paolo Carlini <pcarlini@suse.de>
3933 * typeck.c (build_unary_op): Fix error message for
3934 Boolean expression as operand to operator--.
3936 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3938 * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
3939 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
3942 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
3945 * init.c (build_default_init): Make extern.
3946 * cp-tree.h (build_default_init): Declare here.
3947 * pt.c (tsubst_expr): When the instantiation of the initializer of
3948 a variable results in an empty list, default-initialize the
3950 (tsubst_copy_and_build): When the instantiation of the initializer
3951 in a new expression results in an empty initializer list,
3952 default-initialize it.
3954 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
3956 * mangle.c (write_type): Change mangling of rvalue reference from
3959 2007-08-31 Jakub Jelinek <jakub@redhat.com>
3961 * decl.c (duplicate_decls): Remove duplicated line.
3963 2007-08-31 Paolo Carlini <pcarlini@suse.de>
3966 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
3967 BOUND_TEMPLATE_TEMPLATE_PARM.
3969 2007-08-31 Paolo Carlini <pcarlini@suse.de>
3972 * search.c (lookup_member): Check the name argument for
3975 2007-08-31 Paolo Carlini <pcarlini@suse.de>
3978 * parser.c (cp_parser_trait_expr): Check rerurn value of
3981 2007-08-30 Ollie Wild <aaw@google.com>
3983 * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
3984 convert_ptrmem for pointer to member conversions.
3985 (convert_to_pointer_force): Update cp_convert_to_pointer call.
3986 (ocp_convert): Update cp_convert_to_pointer call.
3987 * typeck.c (convert_ptrmem): Add conditional for null pointers to
3989 (build_static_cast_1): Check can_convert for conversions in either
3991 (get_delta_difference_1): New function.
3992 (get_delta_difference): Refactor to call get_delta_difference_1.
3994 2007-08-30 Jakub Jelinek <jakub@redhat.com>
3996 * decl.c (start_preparsed_function): Set
3997 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
3999 2007-08-28 Paolo Carlini <pcarlini@suse.de>
4002 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
4003 BOUND_TEMPLATE_TEMPLATE_PARM.
4005 2007-08-28 Jakub Jelinek <jakub@redhat.com>
4009 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
4010 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
4012 2007-08-27 Jason Merrill <jason@redhat.com>
4015 * pt.c (build_non_dependent_expr, type_dependent_expression_p):
4016 Look inside STMT_EXPR.
4017 * semantics.c (stmt_expr_value_expr): New fn.
4018 * cp-tree.h: Declare it.
4021 * decl.c (groktypename): Ignore attributes applied to class type.
4023 2007-08-28 Richard Guenther <rguenther@suse.de>
4025 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
4027 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
4029 * error.c (dump_expr): Handle COMPLEX_CST.
4030 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
4031 (pp_cxx_expression): Likewise.
4033 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
4035 * decl.c (GNU_INLINE_P): New.
4036 (duplicate_decls): Handle gnu_inline. Merge attributes and
4037 some flags in overriding definitions.
4038 (redeclaration_error_message): Handle gnu_inline.
4039 (start_preparsed_function): Likewise.
4041 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4043 * call.c (sufficient_parms_p): Constify.
4044 * class.c (same_signature_p): Likewise.
4045 * cp-gimplify.c (is_invisiref_parm,
4046 cxx_omp_privatize_by_reference): Likewise.
4047 * cp-objcp-common.c (has_c_linkage): Likewise.
4048 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
4049 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
4050 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
4051 num_artificial_parms_for, comp_template_parms,
4052 template_parameter_pack_p, any_dependent_template_arguments_p,
4053 any_type_dependent_arguments_p, any_value_dependent_elements_p,
4054 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
4055 zero_init_p, member_p, cp_lvalue_kind,
4056 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
4057 varargs_function_p, is_dummy_object, special_function_kind,
4058 string_conv_p, type_unknown_p, comp_except_specs, compparms,
4059 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
4060 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
4061 cp_has_mutable_p, at_least_as_qualified_p,
4062 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
4063 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
4064 * except.c (nothrow_libfn_p): Likewise.
4065 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
4067 * pt.c (comp_template_parms, template_parameter_pack_p,
4068 any_type_dependent_arguments_p, any_value_dependent_elements_p,
4069 any_dependent_template_arguments_p): Likewise.
4070 * repo.c (repo_export_class_p): Likewise.
4071 * semantics.c (anon_aggr_type_p): Likewise.
4072 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
4073 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
4074 varargs_function_p, member_p, is_dummy_object, pod_type_p,
4075 zero_init_p, special_function_p): Likewise.
4076 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
4077 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
4078 compparms, invalid_nonstatic_memfn_p,
4079 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
4080 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
4081 cp_has_mutable_p, lvalue_or_else): Likewise.
4083 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
4085 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
4086 * cp-objcp-common.c (cp_tree_size): Ditto.
4087 * tree.c (cp_walk_subtrees): Ditto
4088 * cp-tree.def (TINST_LEVEL): Go away.
4089 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
4090 move together with other non-tree structs.
4091 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
4092 (union lang_tree_node): Eliminate tinst_level field.
4093 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
4094 (current_instantiation, outermost_tinst_level): Return
4095 a "struct tinst_level *".
4097 * error.c (print_instantiation_partial_context): Change second
4098 parameter to a "struct tinst_level *". Replace accessor macros
4100 (print_instantiation_full_context): Likewise.
4101 * lex.c (in_main_input_context): Likewise.
4103 * pt.c (struct pending_templates): New.
4104 (pending_templates, last_pending_template): Use it as a type.
4105 (current_tinst_level): Change typo to "struct tinst_level *"
4106 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
4107 (add_pending_template): Construct a "struct pending_template".
4108 Replace TINST_LEVEL accessor macros with field access.
4109 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
4110 (pop_tinst_level): Likewise.
4111 (instantiate_pending_templates): Likewise. Factor common code used
4112 when an instantiation has been done.
4113 (outermost_tinst_level): Replace tree_last with loop.
4114 (current_instantiation): Return a "struct tinst_level *".
4116 2007-08-24 Ollie Wild <aaw@google.com>
4118 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
4119 * name-lookup.h (cp_binding_level): Remove vtables member.
4121 2007-08-24 Richard Guenther <rguenther@suse.de>
4123 * tree.c (cp_cannot_inline_tree_fn): Remove.
4124 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
4125 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
4128 2007-08-24 Jakub Jelinek <jakub@redhat.com>
4131 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
4132 error_mark_node right away if build_expr_type_conversion
4136 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
4137 is error_mark_node rather than NULL_TREE.
4138 * pt.c (check_explicit_specialization): Likewise.
4141 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
4142 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
4144 2007-08-22 Jason Merrill <jason@redhat.com>
4147 * pt.c (outermost_tinst_level): New function.
4148 * lex.c (in_main_input_context): New function.
4149 * cp-tree.h: Declare it.
4150 * decl2.c (constrain_class_visibility): Use it to avoid warning
4151 about uses of the anonymous namespace in the main input file.
4153 2007-08-21 Jakub Jelinek <jakub@redhat.com>
4155 * init.c (build_new_1): Use get_target_expr instead of save_expr.
4157 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
4160 * class.c (finish_struct_1): Warn when a class has virtual
4161 functions and accessible non-virtual destructor.
4163 2007-08-20 Richard Guenther <rguenther@suse.de>
4167 * call.c (build_new_method_call): Convert initializer to
4169 * init.c (build_aggr_init): Do not fiddle with types.
4170 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
4171 * except.c (build_throw): Do not drop qualifiers for the
4173 * typeck.c (get_member_function_from_ptrfunc): Do not
4174 fiddle with types, instead convert.
4175 (build_ptrmemfunc1): Convert to the target type for
4177 (gfc_trans_allocate): Convert result to target type.
4178 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
4179 pointer-to-member structures shall have alias set zero as well.
4181 2007-08-20 Richard Guenther <rguenther@suse.de>
4183 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
4185 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
4186 (nonstatic_local_decl_p): Likewise.
4187 * tree.c (cp_auto_var_in_fn_p): Remove.
4188 * decl.c (nonstatic_local_decl_p): Remove.
4190 2007-08-20 Richard Guenther <rguenther@suse.de>
4192 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
4194 * tree.h (cp_walk_tree): New define to walk_tree_1 with
4195 cp_walk_subtrees lh parameter.
4196 (cp_walk_tree_without_duplicates): New define to
4197 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
4198 * tree.c (count_trees): Call
4199 cp_walk_tree_without_duplicates.
4200 (verify_stmt_tree): Call cp_walk_tree.
4201 (break_out_target_exprs): Likewise.
4202 (WALK_SUBTREE): Likewise.
4203 * cp-gimplify.c (cp_genericize): Likewise.
4204 * cp-pt.c (find_parameter_packs_r): Likewise.
4205 (uses_parameter_packs): Likewise.
4206 (make_pack_expansion): Likewise.
4207 (check_for_bare_parameter_packs): Likewise.
4208 (for_each_template_parm): Likewise.
4209 * decl.c (check_default_argument): Call
4210 cp_walk_tree_without_duplicates.
4211 * except.c (build_throw): Likewise.
4212 * decl2.c (type_visibility): Likewise.
4213 * semantics.c (expand_or_defer_fn): Likewise.
4214 (finalize_nrv): Call cp_walk_tree.
4216 2007-08-20 Jakub Jelinek <jakub@redhat.com>
4219 * init.c (build_new_1): Rename placement_var variable to placement_expr.
4220 Initialize it with save_expr rather than get_temp_regvar.
4222 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
4225 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
4228 2007-08-17 Ollie Wild <aaw@google.com>
4231 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
4232 declarations into appropriate slots for comparison. Fix type
4235 2007-08-17 Paolo Carlini <pcarlini@suse.de>
4238 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
4239 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
4241 2007-08-17 Paolo Carlini <pcarlini@suse.de>
4244 * parser.c (cp_parser_class_head): Improve error message.
4246 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
4248 * pt.c (instantiate_decl): Set input_location
4249 for the function end.
4251 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4253 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
4255 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
4256 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
4257 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
4258 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
4259 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
4260 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
4261 * typeck.c (cp_type_quals): Likewise.
4262 * typeck2.c (cxx_incomplete_type_diagnostic,
4263 cxx_incomplete_type_error): Likewise.
4265 2007-08-16 Paolo Carlini <pcarlini@suse.de>
4268 * pt.c (tsubst_friend_function): When check_classfn
4269 returns error_mark_node likewise return it.
4271 2007-08-15 Jakub Jelinek <jakub@redhat.com>
4274 * typeck.c (check_return_expr): Don't NRV optimize vars in
4276 * decl.c (finish_function): Comment fix.
4278 2007-08-15 Paolo Carlini <pcarlini@suse.de>
4281 * pt.c (push_template_decl_real): Depending on TYPE_P
4282 use either TYPE_CONTEXT or DECL_CONTEXT.
4284 2007-08-14 Mark Mitchell <mark@codesourcery.com>
4286 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
4287 constructors and destructors return this.
4289 2007-08-14 Paolo Carlini <pcarlini@suse.de>
4292 * decl2.c (check_classfn): Return error_mark_node in case of error;
4293 in that case, do not call add_method.
4294 * decl.c (start_decl): Deal with check_classfn returning
4296 (grokfndecl): Likewise.
4297 * pt.c (tsubst_friend_function): Likewise.
4299 2007-08-14 Andrew Pinski <pinskia@gmail.com>
4302 * typeck.c (build_binary_op): Disallow vector float types with
4303 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
4305 2007-08-11 Ian Lance Taylor <iant@google.com>
4307 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
4309 * cp-tree.h (cxx_get_alias_set): Update declaration.
4311 2007-08-10 Ollie Wild <aaw@google.com>
4313 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
4315 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
4317 (unqualified_namespace_lookup): Fix ambiguous_decl call.
4318 (lookup_using_namespace): Fix ambiguous_decl call.
4319 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
4321 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4323 * call.c (name_as_c_string): Use CONST_CAST.
4324 * decl.c (build_decl): Likewise.
4325 * parser.c (cp_parser_string_literal): Likewise.
4327 2007-08-10 Paolo Carlini <pcarlini@suse.de>
4330 * error.c (dump_expr): Consistently use the *_cxx_*
4331 variants of the pretty-print functions.
4333 2007-08-10 Paolo Carlini <pcarlini@suse.de>
4336 * decl.c (check_special_function_return_type): Just error
4337 on return type specified for conversion operator.
4339 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
4341 * typeck2.c (readonly_error): Handle general expressions.
4342 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
4344 2007-08-06 Dan Hipschman <dsh@google.com>
4346 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
4347 access function name.
4349 2007-08-04 Alfred Minarik <a.minarik@aon.at>
4352 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
4353 * g++spec.c (lang_specific_driver): Check them.
4355 2007-08-06 Paolo Carlini <pcarlini@suse.de>
4358 * pt.c (inline_needs_template_parms): Fix comment; change return type
4361 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
4364 2007-03-26 Dirk Mueller <dmueller@suse.de>
4366 * parser.c (cp_parser_member_declaration): Pedwarn
4367 about stray semicolons after member declarations.
4369 2007-08-02 Lee Millward <lee.millward@gmail.com>
4374 * parser.c (cp_parser_asm_definition): Detect and discard asm
4375 statements with invalid inputs or outputs.
4376 (cp_parser_asm_operand_list): Return error mark node if any
4377 of the operands are invalid. Adjust documentation.
4379 2007-08-02 Nick Clifton <nickc@redhat.com>
4381 * typeck.c: Change copyright header to refer to version 3 of the
4382 GNU General Public License and to point readers at the COPYING3
4383 file and the FSF's license web page.
4384 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
4385 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
4386 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
4387 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
4388 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
4389 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
4390 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
4391 name-lookup.h, parser.c: Likewise.
4393 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4396 * call.c (magic_varargs_p): Honor the "type generic" attribute.
4398 2007-07-30 Paolo Carlini <pcarlini@suse.de>
4401 * semantics.c (finish_label_stmt): Reject the __label__
4402 extension outside function scopes.
4404 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4406 * parser.c (eof_token): Un-constify.
4407 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
4408 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
4411 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
4413 * pt.c, tree.c, typeck2.c: Fix comment typos.
4415 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
4416 Mark Mitchell <mark@codesourcery.com>
4419 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
4420 hidden due to friend declarations in local classes.
4422 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
4424 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
4425 * cp-tree.def (DECLTYPE_TYPE): New.
4426 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
4427 (dump_type_prefix): Ditto.
4428 (dump_type_suffix): Ditto.
4429 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
4430 * mangle.c (write_type): Handle DECLTYPE_TYPE.
4431 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
4433 (DECLTYPE_TYPE_EXPR): New.
4434 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
4435 (finish_declared_type): Declare.
4436 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
4437 DECLTYPE_TYPE nodes.
4438 (pp_cxx_type_id): Ditto.
4439 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
4440 (tsubst): Substitute into a DECLTYPE_TYPE node.
4441 (tsubst_copy): Ditto.
4442 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
4444 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
4445 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
4446 structural equality (because we can't hash the expressions).
4447 (finish_declared_type): New.
4448 * lex.c (reswords): Add "decltype" keyword.
4449 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
4450 (cp_parser_postfix_expression): Add member_access_only_p to
4451 restrict postfix expression to member access expressions.
4452 (cp_parser_unary_expression): Update call to
4453 cp_parser_postfix_expression to reflect new parameter.
4454 (cp_parser_declared_type): New.
4455 (cp_parser_simple_type_specifier): Parse decltype types.
4457 2007-07-27 Mark Mitchell <mark@codesourcery.com>
4460 * call.c (convert_for_arg_passing): Only widen bitfields to their
4461 declared types if necessary.
4463 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4465 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
4468 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4470 * decl.c (typename_hash, typename_compare): Constify.
4471 * mangle.c (hash_type, compare_type): Likewise.
4472 * pt.c (eq_local_specializations, hash_local_specialization):
4474 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
4475 list_hash): Likewise.
4476 * typeck2.c (pat_compare): Likewise.
4478 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
4480 * method.c (implicitly_declare_fn): Increase alignment if member
4481 function pointer format requires it.
4483 2007-07-24 Paolo Carlini <pcarlini@suse.de>
4486 * typeck.c (check_return_expr): Do not pass a null argument
4489 2007-07-24 Paolo Carlini <pcarlini@suse.de>
4492 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
4495 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
4498 * typeck.c (convert_arguments): Only use default args if we have
4502 * typeck.c (structural_comptypes): No need to check
4503 resolve_typename_type return value here.
4504 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
4505 * pt.c (resolve_typename_type): Follow typename typedefs. Return
4506 original type rather than error_mark_node in case of failure.
4507 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
4508 resolve_typename_type result check.
4509 (cp_parser_direct_declarator, cp_parser_head,
4510 cp_parser_constructor_declarator_p): Likewise.
4512 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
4514 * pt.c (template_parms_variadic_p): Remove.
4515 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
4517 2007-07-12 Jakub Jelinek <jakub@redhat.com>
4520 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
4521 argument to dump_aggr_init_expr_args instead of false.
4523 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
4525 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
4526 canonical types; otherwise, fall back to structural type
4527 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
4528 internal compiler error if the canonical types are wrong.
4530 2007-07-11 Paolo Carlini <pcarlini@suse.de>
4533 * parser.c (cp_parser_make_indirect_declarator): When the
4534 the code argument is ERROR_MARK return cp_error_declarator.
4536 2007-07-09 Geoffrey Keating <geoffk@apple.com>
4539 * decl.c (cxx_init_decl_processing): Don't set
4540 force_align_functions_log.
4541 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
4542 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
4543 FUNCTION_DECL, return its alignment.
4545 2007-07-09 Richard Guenther <rguenther@suse.de>
4547 * decl.c (start_preparsed_function): Do not promote return type.
4549 2007-07-08 Paolo Carlini <pcarlini@suse.de>
4552 * pt.c (unify): Never pass error_mark_node to template_decl_level.
4554 2007-07-07 Mark Mitchell <mark@codesourcery.com>
4557 * pt.c (resolve_overloaded_unification): Robustify. Return a
4559 (type_unification_real): Adjust accordingly.
4561 2007-07-06 Richard Guenther <rguenther@suse.de>
4563 * init.c (build_new_1): Use the correct pointer type.
4564 * typeck2.c (build_m_component_ref): Likewise.
4566 2007-07-05 Mark Mitchell <mark@codesourcery.com>
4569 * init.c (build_zero_init): Always build an initializer for
4571 * typeck2.c (build_functional_cast): Use build_zero_init.
4574 * init.c (build_new_1): Always pass the allocation function to
4575 build_op_delete_call.
4576 * call.c (build_op_delete_call): Handle operator delete with a
4577 variable-argument list. Do not issue an error when no matching
4578 deallocation function is available for a new operator.
4581 * cp-tree.h (any_value_dependent_elements_p): Declare it.
4582 * decl.c (value_dependent_init_p): New function.
4583 (cp_finish_decl): Use it.
4584 * pt.c (value_dependent_expression_p): Use
4585 any_value_dependent_elements_p.
4586 * parser.c (cp_parser_primary_expression): Add comment about
4587 treating dependent qualified names as integral
4588 constant-expressions.
4590 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
4592 * decl.c (build_ptrmemfunc_type): Always use structural equality
4593 tests when comparing pointer-to-member-function types, because the
4594 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
4597 2007-07-03 Mark Mitchell <mark@codesourcery.com>
4599 * init.c (build_new): Tweak comment.
4601 2007-06-29 Dave Brolley <brolley@redhat.com>
4604 * parser.c (cp_parser_new_type_id): Don't reduce a named array
4605 type to its base type and number of elements here.
4606 * init.c (build_new): Call complete_type_or_else to ensure that the
4607 type is complete and to issue a diagnostic if it is not.
4608 (build_new_1): Don't call complete_type_or_else here.
4610 2007-07-03 Richard Guenther <rguenther@suse.de>
4613 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
4616 2007-07-02 Simon Baldwin <simonb@google.com>
4618 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
4619 for inner-style nested forward declarations that don't declare
4622 2007-07-02 Jakub Jelinek <jakub@redhat.com>
4625 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
4626 DECL_P in not a variable and appears more than once error messages.
4628 2007-07-01 Ollie Wild <aaw@google.com>
4630 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
4631 (select_decl): Remove function.
4632 (unqualified_namespace_lookup): Populate binding by calling
4633 ambiguous_decl. Remove select_decl call.
4634 (lookup_qualified_name): Remove select_decl call.
4635 * decl.c (lookup_and_check_tag): Check for ambiguous references.
4636 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
4637 generation when name lookup is ambiguous.
4639 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
4642 * init.c (build_new_1): Use structural equality on the copy of the
4645 2007-06-28 Geoffrey Keating <geoffk@apple.com>
4647 * decl2.c (determine_visibility): Implement
4648 flag_visibility_ms_compat effect on type info.
4649 * decl.c (cxx_init_decl_processing): Implement
4650 global effect of flag_visibility_ms_compat.
4652 2007-06-28 Geoffrey Keating <geoffk@apple.com>
4654 * decl2.c (start_objects): Mark constructor-running function
4657 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
4660 * decl.c (grokdeclarator): Reset friendp for member functions declared
4661 friend of their own class.
4663 2007-06-23 Mark Mitchell <mark@codesourcery.com>
4665 * decl2.c (determine_visibility): Don't look for dllexport here.
4666 (determine_visibility_from_class): Tidy.
4668 2007-06-18 Simon Baldwin <simonb@google.com>
4671 * parser.c (cp_parser_single_declaration): Added check for storage
4672 class other than sc_none in parsed declaration, and a flag to indicate
4673 if the call is part of an explicit template specialization parse.
4674 * (cp_parser_explicit_specialization): Specialization check flag added
4675 to call to cp_parser_single_declaration(), set true.
4676 * (cp_parser_template_declaration_after_export): Specialization check
4677 flag added to call to cp_parser_single_declaration(), set false.
4678 * pt.c (check_explicit_specialization): Added code to copy visiblity
4679 and linkage from the templated function to the explicit specialization.
4681 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
4683 * typeck.c (build_binary_op): For templates build the
4684 expression in pieces to avoid the assert in build2_stat.
4685 (get_member_function_from_ptrfunc):
4686 Change over to using POINTER_PLUS_EXPR and convert
4687 the second operand to sizetype.
4688 * typeck2.c (build_m_component_ref): Likewise.
4689 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
4690 instead of PLUS_EXPR for pointers.
4691 (build_new_1): Likewise.
4692 (build_vec_delete_1): Likewise.
4693 (build_vec_delete): Likewise.
4694 * class.c (build_base_path): Likewise.
4695 (build_base_path): Likewise.
4696 (convert_to_base_statically): Likewise.
4697 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
4698 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
4699 instead of PLUS_EXPR.
4700 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
4701 instead of PLUS_EXPR for pointers.
4702 * call.c (build_special_member_call): Likewise.
4703 * rtti.c (build_headof): Likewise.
4704 Use sizetype instead of ptrdiff_type_node.
4705 (tinfo_base_init): Create a POINTER_PLUS_EXPR
4706 instead of PLUS_EXPR for pointers.
4707 * except.c (expand_start_catch_block): Do a
4708 NEGATIVE and then a POINTER_PLUS_EXPR instead
4710 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
4711 PLUS_EXPR on pointer types over to use
4712 POINTER_PLUS_EXPR and remove the conversion
4713 to the pointer types.
4714 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
4715 adding to a pointer type. Use size_int instead of
4716 ssize_int. Convert the index to sizetype before
4717 adding it to the pointer.
4719 2007-06-15 Mark Mitchell <mark@codesourcery.com>
4721 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
4722 (DECL_ANON_UNION_VAR_P): New macro.
4723 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
4724 than DECL_VAR_MARKED_P, to keep track of which variables we have
4726 * decl.c (redeclaration_error_message): Complain about redeclaring
4727 anonymous union members at namespace scope.
4728 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
4730 2007-06-14 Geoff Keating <geoffk@apple.com>
4732 * decl2.c (determine_visibility): Ensure that functions with
4733 hidden types as parameters are hidden.
4736 * decl2.c (determine_visibility): Remove duplicate code for
4739 2007-06-12 Ian Lance Taylor <iant@google.com>
4742 * init.c (avoid_placement_new_aliasing): New static function.
4743 (build_new_1): Call it.
4745 2007-06-11 Rafael Ávila de Espíndola <espindola@google.com>
4747 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
4748 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
4750 2007-06-08 Jakub Jelinek <jakub@redhat.com>
4753 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
4754 on init, the non-decl cond operand and increment value.
4756 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
4759 * decl.c (check_initializer): Report an error when a brace enclosed
4760 initializer is used for a non-aggregate type in C++98.
4761 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
4763 (grokdeclarator): Likewise.
4764 (move_fn_p): Likewise.
4765 * typeck.c (check_return_expr): Likewise.
4766 * call.c (reference_binding): Likewise.
4767 * error.c (cp_cpp_error): Likewise.
4768 * pt.c (check_default_tmpl_args): Likewise.
4770 * lex.c (init_reswords): Likewise.
4771 * parser.c (p_parser_primary_expression): Likewise.
4772 (TOKEN_PRECEDENCE): Likewise.
4773 (cp_parser_init_declarator): Likewise.
4774 (cp_parser_ptr_operator): Likewise.
4775 (cp_parser_parameter_declaration): Likewise.
4776 (cp_parser_enclosed_template_argument_list): Likewise.
4777 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
4778 (cp_parser_next_token_ends_template_argument_p): Likewise.
4780 2007-06-04 Simon Baldwin <simonb@google.com>
4782 * decl.c (grokdeclarator): Readability change. Moved case labels
4783 into direct switch statement scope.
4785 2007-06-04 Paolo Carlini <pcarlini@suse.de>
4787 * call.c (convert_like_real): Remove pointless code.
4789 2007-05-31 Mark Mitchell <mark@codesourcery.com>
4791 * decl.c (get_atexit_fn_ptr_type): New function.
4792 (get_atexit_node): Use it.
4793 (start_cleanup_fn): Likewise.
4794 (register_dtor_fn): Use the object's destructor, instead of a
4795 separate cleanup function, where possible.
4796 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
4797 (atexit_fn_ptr_type_node): New macro.
4798 * decl2.c (build_cleanup): Use build_address.
4800 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
4802 * typeck.c (build_binary_op): Include types in error.
4804 2007-05-31 Jakub Jelinek <jakub@redhat.com>
4807 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
4808 needs runtime initialization.
4810 2007-05-31 Paolo Carlini <pcarlini@suse.de>
4813 * semantics.c (finish_trait_expr): Complete the types.
4815 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
4816 Douglas Gregor <doug.gregor@gmail.com>
4817 Pedro Lamarao <pedro.lamarao@mndfck.org>
4818 Howard Hinnant <howard.hinnant@gmail.com>
4822 * typeck.c (comptypes): Don't consider rvalue and lvalue
4823 reference types to be equivalent.
4824 (check_return_expr): Move from certain lvalues when returning
4826 * decl.c (grokdeclarator): Implement reference collapsing.
4827 (copy_fn_p): Don't consider constructors taking rvalue references
4828 to be copy constructors.
4830 * call.c (conversion): New "rvaluedness_matches_p" member.
4831 (convert_class_to_reference): Require reference type as first
4832 parameter instead of base type.
4833 (reference_binding): Add logic to handle rvalue references.
4834 (implicit_conversion): Update inaccurate comment.
4835 (convert_like_real): Disable creation of temporaries that are
4836 impossible to initialize for types with move constructors.
4837 (build_over_call): Elide move constructors when possible.
4838 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
4839 (maybe_handle_ref_bind): Return conversion instead of type node.
4840 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
4841 determine preferred conversion sequences.
4842 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
4843 (LOOKUP_PREFER_RVALUE): New.
4844 (DECL_MOVE_CONSTRUCTOR_P): New.
4845 (struct cp_declarator): Add "reference" member for reference
4846 types, with new "rvalue_ref" flag.
4847 (cp_build_reference_type): Declare.
4848 (move_fn_p): Declare.
4849 * error.c (dump_type_prefix): Format rvalue reference types
4850 correctly in error messages.
4851 * except.c (build_throw): Move from certain lvalues when
4853 * mangle.c (write_type): Mangle rvalue references differently
4854 than regular references.
4855 * parser.c (make_reference_declarator): Add boolean parameter for
4857 (cp_parser_make_indirect_declarator): New.
4858 (cp_parser_new_declarator_opt): Call
4859 cp_parser_make_indirect_declarator.
4860 (cp_parser_conversion_declarator_opt): Ditto.
4861 (cp_parser_declarator): Ditto.
4862 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
4864 * pt.c (tsubst): Implement reference collapsing.
4865 (maybe_adjust_types_for_deduction): Implement special template
4866 parameter deduction rule for rvalue references.
4867 (type_unification_real): Update calls to
4868 maybe_adjust_types_for_deduction.
4869 (try_one_overload): Ditto.
4870 (unify_pack_expansion): Ditto.
4871 * tree.c (lvalue_p_1): Handle rvalue reference types.
4872 (cp_build_reference_type): New.
4874 2007-05-30 Jakub Jelinek <jakub@redhat.com>
4877 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
4878 variables that need runtime initialization.
4880 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
4883 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
4884 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
4885 case POSTDECREMENT_EXPR>): Return the error_mark_node
4886 if either the real or imaginary parts would an
4889 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
4890 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4893 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
4894 token is a closing brace, false if there are no tokens left.
4895 (cp_parser_namespace_alias_definition): Only consume the next token if
4896 it is a closing brace.
4898 * parser.c (cp_parser_class_specifier): Likewise.
4900 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
4902 * semantics.c (finish_member_declaration): Fix a typo in the
4905 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
4917 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
4918 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
4919 * pt.c (check_for_bare_parameter_packs): Return bool indicated
4920 whether everything was okay. Fix indentation.
4921 (push_template_decl_real): Check for bare parameter packs in
4922 function parameters; where errors occur, mark the parameter types
4923 with ERROR_MARK_NODEs to avert ICEs.
4924 (coerce_template_parameter_pack): New.
4925 (coerce_template_parms): Moved parameter pack coercion into
4926 coerce_template_parameter_pack, and permit it anywhere in the
4927 template parameter list (not just at the end). Parameter and
4928 argument indices can vary (somewhat) separately now, so add
4929 PARM_IDX and ARG_IDX.
4930 (fn_type_unification): Don't set an argument pack as incomplete if
4931 no argument pack was deduced.
4932 (type_unification_real): If a type parameter is a parameter pack
4933 and has not otherwise been deduced, it will be deduced to an empty
4935 (more_specialized_fn): Use the actual lengths of the argument
4936 lists when comparing against expansions.
4937 * semantics.c (finish_member_declaration): If a field's type has
4938 bare parameter packs, error and set its type to ERROR_MARK_NODE.
4940 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
4943 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
4945 2007-05-22 Ollie Wild <aaw@google.com>
4947 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
4948 (unqualified_namespace_lookup): Adds check for hidden types.
4950 2007-05-22 Ollie Wild <aaw@google.com>
4952 * decl.c (duplicate_decls): Verify namespace names are unique.
4954 2007-05-21 Mark Mitchell <mark@codesourcery.com>
4956 * decl.c (cxx_maybe_build_cleanup): Handle
4957 __attribute__((cleanup)).
4959 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4961 * cvt.c (cp_convert_and_check): Don't check warnings if the
4964 2007-05-18 Geoffrey Keating <geoffk@apple.com>
4966 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
4968 2007-05-14 Paolo Carlini <pcarlini@suse.de>
4971 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
4972 type only if is a class type (5.2.8/4).
4974 2007-05-14 Rafael Ávila de Espíndola <espindola@google.com>
4976 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
4977 * decl.c (grokdeclarator): Use unsigned_type_for instead of
4978 c_common_unsigned_type.
4980 2007-05-11 Silvius Rus <rus@google.com>
4982 * typeck.c (build_indirect_ref): Add call to
4983 strict_aliasing_warning.
4984 (build_reinterpret_cast_1): Condition call to
4985 strict_aliasing_warning.
4987 2007-05-11 Jan Hubicka <jh@suse.cz>
4989 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
4990 * decl2.c (start_objects): ctors and dtors are no longer public.
4991 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
4993 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
4995 * typeck.c (build_unary_op): Remove code that used to
4996 handle non lvalue increments/decrements.
4998 2007-05-07 Mike Stump <mrs@apple.com>
5000 * parser.c (check_empty_body): Add.
5001 (cp_parser_iteration_statement): Add call to check_empty_body.
5003 2007-05-05 Geoffrey Keating <geoffk@apple.com>
5006 * mangle.c (write_mangled_name): Mangle static variable names.
5007 (write_unqualified_name): Use local-source-name for
5008 namespace-scope static variables.
5010 2007-05-04 Dirk Mueller <dmueller@suse.de>
5012 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
5015 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
5018 * decl2.c (constrain_class_visibility):
5019 Use strip_pointer_or_array_types instead of strip_array_types.
5021 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
5024 * decl.c (reshape_init_r): Don't reshape the first element if it
5025 is a pointer to member function.
5027 2007-04-27 Simon Baldwin <simonb@google.com>
5029 * decl.c (grokparms): Changed message format from %qD to %qE.
5031 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
5033 * error.c (maybe_warn_variadic_templates): Variadic templates are
5034 now in C++0x, so only warn about them in C++98 mode.
5036 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
5039 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
5040 integeral types from vectors types.
5042 2007-04-26 Jakub Jelinek <jakub@redhat.com>
5045 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
5046 for type dependent OMP_CLAUSE_DECLs.
5048 2007-04-24 Mark Mitchell <mark@codesourcery.com>
5051 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
5052 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
5053 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
5054 * init.c (build_zero_init): Adjust, as
5055 COMPLEX_TYPE is now a SCALAR_TYPE.
5056 * typeck2.c (digest_init): Allow brace-enclosed initializers for
5057 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
5059 2007-04-25 Paolo Carlini <pcarlini@suse.de>
5061 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
5062 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
5063 (trait_expr_value): Adjust.
5065 2007-04-23 Simon Baldwin <simonb@google.com>
5067 * decl.c (grokparms): Added new error for duplicate function
5068 parameters names in function prototypes, to match gcc behavior.
5070 2007-04-23 Jan Hubicka <jh@suse.cz>
5072 * decl2.c (finish_objects): Do not call target constructor/destructor
5075 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
5077 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
5078 instead of checking GIMPLE_STMT_P in chain_next.
5080 2007-04-17 Mark Mitchell <mark@codesourcery.com>
5083 * call.c (convert_for_arg_passing): Convert bitfields to their
5086 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
5089 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
5091 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
5094 * decl2.c (constrain_class_visibility):
5095 Do not warn about the use of anonymous namespace in the main input file.
5097 2007-04-15 Mark Mitchell <mark@codesourcery.com>
5099 * cp-tree.h (current_template_parms): Fix typo in comment.
5101 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
5103 * cp-tree.h, error.c: Fix comment typos.
5105 2007-04-13 Jason Merrill <jason@redhat.com>
5108 * call.c (reference_binding): Add c_cast_p parm. If true,
5109 add quals to TO as needed to make it reference-compatible.
5111 2007-04-11 Jan Hubicka <jh@suse.cz>
5113 * class.c (convert_to_base_statically): Fold produced tree; verify
5114 that we are not processing template_decl.
5116 2007-04-09 Mark Mitchell <mark@codesourcery.com>
5119 * class.c (build_base_path): Ensure that the converted pointer has
5120 the same cv-qualification as the input.
5122 2007-04-09 Paolo Carlini <pcarlini@suse.de>
5124 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
5126 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
5128 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
5130 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
5131 * tree.c (cp_add_pending_fn_decls): Remove.
5132 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
5134 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
5136 Revert change removing staticp.
5138 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
5140 * cp-objcp-common.c (cxx_staticp): Remove.
5141 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
5142 * cp-tree.h (cxx_staticp):
5144 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
5146 * class.c (check_for_override): Don't remove dllmport attribute
5149 2007-04-03 Jakub Jelinek <jakub@redhat.com>
5152 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
5153 type issue error and return early.
5155 2007-03-30 Jason Merrill <jason@redhat.com>
5158 * typeck.c (cp_type_readonly): New fn.
5159 * cp-tree.h: Declare it.
5160 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
5161 (cp_finish_decl): Not here.
5163 2007-03-31 Richard Guenther <rguenther@suse.de>
5165 * optimize.c (maybe_clone_body): Replace splay-tree usage by
5168 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
5173 * parser.c (declarator_can_be_parameter_pack): New.
5174 (cp_parser_template_parameter): Only parse the `...' if the
5175 declarator can be a parameter pack.
5176 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
5178 * pt.c (find_parameter_packs_r): Look into the bounds on integer
5179 types (they could be used as array bounds).
5180 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
5181 (tsubst_pack_expansion): Handle failure to expand parameter
5184 2007-03-30 Paolo Carlini <pcarlini@suse.de>
5187 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
5188 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
5189 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
5190 (CLASS_TYPE_NON_UNION_P): Add.
5191 (struct lang_type_class): Add has_complex_dflt.
5192 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
5193 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
5194 * cp-tree.def: Add TRAIT_EXPR.
5195 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
5196 * lex.c (struct resword): Add __has_nothrow_assign,
5197 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
5198 __has_trivial_constructor, __has_trivial_copy,
5199 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
5200 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
5201 __is_pod, __is_polymorphic, __is_union.
5202 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
5203 (cp_parser_trait_expr): New.
5204 * semantics.c (finish_trait_expr, trait_expr_value
5205 classtype_has_nothrow_copy_or_assign_p): New.
5206 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
5208 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
5209 * class.c (check_bases, check_field_decl, check_bases_and_members):
5210 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
5211 * pt.c (uses_template_parms, tsubst_copy_and_build,
5212 value_dependent_expression_p, type_dependent_expression_p): Deal with
5214 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
5216 2007-03-29 Richard Guenther <rguenther@suse.de>
5218 * tree.c (cp_walk_subtrees): Do not set input_location.
5220 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
5223 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
5226 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5228 * parser.c (struct cp_parser): Update comment for
5229 greater_than_is_operator_p.
5230 (cp_parser_primary_expression): In C++0x mode, a cast operator can
5231 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
5232 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
5233 !GREATER_THAN_IS_OPERATOR_P.
5234 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
5235 `>>' operators that will become two `>' tokens in C++0x.
5236 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
5237 mode, allowing it to terminate default arguments.
5238 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
5239 `>>' like two consecutive `>' tokens.
5240 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
5241 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
5242 ends a template argument.
5244 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5246 * decl.c (redeclaration_error_message): Complain when redeclaring
5247 a friend function with default template arguments (C++0x mode only).
5248 * cp-tree.h (check_default_tmpl_args): Declare.
5249 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
5250 template arguments in function templates. Add support for checking
5251 the default template arguments of friend templates.
5252 (push_template_decl_real): Fix call to check_default_tmpl_args.
5253 (type_unification_real): If a template parameter has not been
5254 deduced but provides a default template argument, substitute into
5255 that default template argument.
5256 * parser.c (cp_parser_init_declarator): When declaring (but not
5257 defining!) a function template in C++0x mode, check for default
5260 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5263 * decl.c (grokdeclarator): Deal with cv-qualified function type
5264 typedefs in the same way for member and non-member functions.
5266 2007-03-26 Dirk Mueller <dmueller@suse.de>
5268 * parser.c (cp_parser_member_declaration): Pedwarn
5269 about stray semicolons after member declarations.
5271 2007-03-26 Paolo Carlini <pcarlini@suse.de>
5274 * pt.c (instantiate_decl): Set in_system_header.
5276 2007-03-22 Mark Mitchell <mark@codesourcery.com>
5278 * cp-tree.h (current_tempalte_parms): Improve documentation.
5279 * pt.c (current_template_args): Likewise.
5282 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
5283 not consume tokens when failing.
5285 2007-03-22 Jim Wilson <wilson@specifix.com>
5286 Mark Mitchell <mark@codesourcery.com>
5289 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
5290 consistent with FROM.
5292 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5294 * error.c (dump_expr): Handle dependent names that designate types.
5295 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
5297 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
5299 * cp-tree.def, parser.c, pt.c: Fix comment typos.
5301 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5303 * cvt.c (cp_convert_and_check) : Define.
5304 * cp-tree.h (cp_convert_and_check): Declare.
5305 * call.c (convert_conversion_warnings): Rename to
5306 conversion_null_warnings. The warning for floating-point to
5307 integer is handled by convert_and_check in convert_like_real.
5308 (convert_like_real): convert_conversion_warnings was renamed as
5309 conversion_null_warnings.
5310 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
5311 overflow and changes of value during conversion.
5313 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5316 * parser.c (cp_parser_statement): If 'namespace' is found, this
5317 only can be a namespace alias definition, so parse it now.
5318 (cp_parser_namespace_alias_definition): if we find an open brace
5319 instead of '=', then this is actually a misplaced namespace
5322 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5325 * decl.c (cxx_init_decl_processing): Move command-line options
5326 processing to c-opts.c.
5328 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
5330 * ptree.c (cxx_print_type): Use formatting markup for integers
5331 when printing template parameter index/level/orig level.
5332 (cxx_print_xnode): Ditto.
5333 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
5334 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
5335 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
5337 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
5338 rather than a HOST_WIDE_INT.
5339 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
5340 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
5342 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
5343 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
5344 IN_BASE_INITIALIZER bool bitfields.
5345 (struct cp_declarator): Make KIND a 4-bit field. Make
5346 PARAMETER_PACK_P a bool bitfield just after KIND.
5347 * pt.c (uses_parameter_packs): Destroy the pointer set.
5348 (make_pack_expansion): Ditto.
5349 (check_for_bare_parameter_packs): Ditto.
5350 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
5352 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
5355 * call.c (convert_default_arg): Instead of copying the node,
5358 2007-03-15 Dirk Mueller <dmueller@suse.de>
5361 * call.c (convert_conversion_warnings): New..
5362 (convert_like_real): .. factored out from here.
5363 (convert_conversion_warnings): Add warning about
5364 false being converted to NULL in argument passing.
5366 2007-03-14 Dirk Mueller <dmueller@suse.de>
5368 * semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
5369 (finish_do_body): Warn about empty body in do/while statement.
5371 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5373 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
5375 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5378 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
5381 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
5383 * repo.c (init_repo): Initialize random_seed saved options.
5384 (finish_repo): Adjust.
5386 2007-03-13 Mark Mitchell <mark@codesourcery.com>
5389 * Make-lang.in (doc/g++.1): Use $< to specify the location from
5392 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
5394 * decl.c (compute_array_index_type): New warning flag warn_vla.
5396 2007-03-12 Mark Mitchell <mark@codesourcery.com>
5399 * call.c (convert_default_arg): Copy non-constant arguments.
5401 2007-03-11 Mark Mitchell <mark@codesourcery.com>
5404 * parser.c (cp_parser_postfix_expression): Disallow compound
5405 literals in constant expressions.
5408 * semantics.c (finish_typeof): Use unlowered_expr_type.
5410 2007-03-10 Mark Mitchell <mark@codesourcery.com>
5413 * cp-tree.h (unlowered_expr_type): New function.
5414 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
5415 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
5416 (unlowered_expr_type): New function.
5417 (build_unary_op): Disallow predecrements of bool bitfields.
5418 * call.c (build_conditional_expr): Use unlowered_expr_type.
5419 * pt.c (type_unification_real): Likewise.
5421 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
5424 * typeck.c (check_return_expr): Check for bare parameter packs.
5425 (comptypes): Compare template parameter packs and
5426 type pack expansions.
5427 * decl.c (grokdeclarator): Deal with the declaration of function
5429 (grokparms): Verify that the (optional) function parameter pack is
5430 at the end of the parameter list.
5431 (xref_basetypes): Handle pack expansions in the base class.
5432 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
5433 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
5434 (NONTYPE_ARGUMENT_PACK): New.
5435 (TYPE_PACK_EXPANSION): New.
5436 (EXPR_PACK_EXPANSION): New.
5437 (ARGUMENT_PACK_SELECT): New.
5438 * cp-objcp-common.c (cp_tree_size): Compute size of
5439 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
5440 ARGUMENT_PACK_SELECT.
5441 * error.c (dump_template_argument): Print template argument packs.
5442 (dump_template_argument_list): Ditto.
5443 (dump_template_parameter): Dump `...' for template type parameter
5445 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
5446 (dump_parameters): Print function parameter packs.
5447 (dump_template_parms): Print template argument packs.
5448 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
5449 (maybe_warn_variadic_templates): New.
5450 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
5451 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
5452 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
5454 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
5455 (write_template_arg): Write argument packs as separate arguments.
5456 * cp-tree.h (struct template_parm_index_s): Add flag that
5457 indicates that the template parameter is actually a parameter
5459 (struct tree_argument_pack_select): New.
5460 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
5461 (union lang_tree_node): Add argument_pack_select.
5462 (FUNCTION_PARAMETER_PACK_P): New.
5463 (PACK_EXPANSION_P): New.
5464 (PACK_EXPANSION_PATTERN): New.
5465 (SET_PACK_EXPANSION_PATTERN): New.
5466 (PACK_EXPANSION_PARAMETER_PACKS): New.
5467 (ARGUMENT_PACK_P): New.
5468 (ARGUMENT_PACK_ARGS): New.
5469 (SET_ARGUMENT_PACK_ARGS): New.
5470 (ARGUMENT_PACK_INCOMPLETE_P): New.
5471 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
5472 (TEMPLATE_PARM_PARAMETER_PACK): New.
5473 (TEMPLATE_TYPE_PARAMETER_PACK): New.
5474 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
5475 (ARGUMENT_PACK_SELECT_INDEX): New.
5476 (ARGUMENT_PACK_SELECT_ARG): New.
5477 (struct cp_declarator): Add parameter_pack_p flag.
5478 (maybe_warn_variadic_templates): Declare.
5479 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
5480 indicate a template parameter pack.
5481 (uses_parameter_packs): Declare.
5482 (template_parameter_pack_p): Declare.
5483 (template_parms_variadic_p): Declare.
5484 (make_pack_expansion): Declare.
5485 (check_for_bare_parameter_packs): Declare.
5486 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
5487 sizeof... expressions.
5488 (pp_cxx_expression): Print pack expansions and non-type argument
5490 (pp_cxx_exception_specification): Print pack expansions.
5491 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
5492 (pp_cxx_ctor_initializer): Print pack expansions.
5493 (pp_cxx_type_id): Print pack expansions.
5494 (pp_cxx_template_argument_list): Print argument packs.
5495 (pp_cxx_template_parameter): Print ellipsis for template parameter
5497 * pt.c (comp_template_parms): Compare template parameter packs.
5498 (template_parameter_pack_p): New.
5499 (template_parms_variadic_p): New.
5500 (template_args_variadic_p): New.
5501 (make_ith_pack_parameter_name): New.
5502 (struct find_parameter_pack_data): New.
5503 (find_parameter_packs_r): New.
5504 (uses_parameter_packs): New.
5505 (make_pack_expansion): New.
5506 (check_for_bare_parameter_packs): New.
5507 (expand_template_argument_pack): New.
5508 (reduce_template_parm_level): Propagate parameter pack flag.
5509 (process_template_parm): Add is_parameter_pack parameter to state
5510 when the parameter is actually a parameter pack. Create template
5511 parameter packs when is_parameter_pack is true.
5512 (current_template_args): The argument for a template parameter
5513 pack is an argument pack containing a single pack expansion.
5514 (process_partial_specialization): When checking that non-type
5515 argument expressions do not involve template parameters, loop over
5516 the arguments in argument packs separately.
5517 (push_template_decl_real): Check that the type of the declaration
5518 does not have any bare parameter packs. Check that primary
5519 templates have no more than one parameter pack, and that it comes
5520 at the end of the template parameter list.
5521 (convert_template_argument): Handle coercions for pack expansion
5522 expressions by coercing the pattern then rebuilding the expansion.
5523 (coerce_template_parms): When coercing the arguments for a
5524 variadic template, pack "extra" arguments into an argument pack.
5525 (coerce_template_template_parms): Cannot coerce between parameter
5526 packs and non-pack parameters.
5527 (template_args_equal): Compare PACK_EXPANSION_P expressions.
5528 (comp_template_args): Expand all template arguments packs before
5529 comparing template argument lists.
5530 (mangle_class_name_for_template): Make argument packs as separate
5532 (for_each_template_parm_r): No need to handle BASELINK.
5533 (instantiate_class_template): Handle pack expansions in the base
5535 (tsubst_pack_expansion): New.
5536 (tsubst_template_args): Handle substitutions of argument packs and
5537 pack expansion into template argument lists.
5538 (tsubst_decl): Expand function parameter packs into separate
5539 function parameters.
5540 (tsubst_arg_types): Expand a type pack expansion into separate
5542 (tsubst_exception_specification): Handle pack expansions in
5543 exception specifiers.
5544 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
5545 replacing a template parameter with its argument. If we encounter
5546 a substitution for an argument pack, just return the parameter
5548 (tsubst_copy): sizeof(X...) returns the number of elements in
5549 parameter pack X. See through ARGUMENT_PACK_SELECT when the
5550 PARM_DECL is a parameter pack.
5551 (tsubst_expr): Expression pack expansions and argument packs
5552 cannot show up here; they will all be handled through function
5553 calls, sizeof, and template argument lists.
5554 (tsubst_copy_and_build): sizeof(X...) returns the number of
5555 elements in parameter pack X. Handle pack expansions in TREE_LIST
5556 and CONSTRUCTOR nodes.
5557 (fn_type_unification): Handle "incomplete" explicit template
5558 argument lists that specify some of the arguments for a template
5560 (type_unification_real): Unify arguments against pack expansions.
5561 (template_parm_level_and_index): New, helper function.
5562 (unify_pack_expansion): New.
5563 (unify): Unify argument packs on an argument-by-argument basis,
5564 handling variadic argument packs as well.
5565 (more_specialized_fn): Handle unification of function parameter
5566 packs. All things being equal, prefer non-variadic function
5567 templates to variadic function templates.
5568 (more_specialized_class): Prefer the variadic class template
5569 partial specialization that binds fewer arguments to a parameter
5571 (regenerate_decl_from_template): Expand function parameter packs
5572 into separate parameters.
5573 (instantiate_decl): Ditto.
5574 (tsubst_initializer_list): Handle pack expansions for base-class
5576 (dependent_type_p_r): Determine dependent types in argument packs
5577 and pack expansions.
5578 (value_dependent_expression_p): Determine value-dependence of
5579 non-type argument packs.
5580 (dependent_template_arg_p): Handle argument packs.
5581 * semantics.c (finish_cond): Check for bare parameter packs.
5582 (finish_expr_stmt): Ditto.
5583 (finish_for_expr): Ditto.
5584 (finish_switch_cond): Ditto.
5585 (finish_mem_initializers): Ditto.
5586 * name-lookup.c (arg_assoc_type): Handle pack expansions and
5588 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
5589 * parser.c (make_declarator): Declarator is not an expansion.
5590 (make_pointer_declarator): Transfer parameter pack flag to outer
5592 (make_reference_declarator): Ditto.
5593 (make_ptrmem_declarator): Ditto.
5594 (make_call_declarator): Ditto.
5595 (make_array_declarator): Ditto.
5596 (cp_parser_postfix_expression): Allow pack expansion expressions
5597 in the argument list for a call expression.
5598 (cp_parser_parenthesized_expression_list): Add new parameter
5599 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
5600 into separate arguments."
5601 (cp_parser_new_placement): Allow pack expansion expressions.
5602 (cp_parser_new_initializer): Ditto.
5603 (cp_parser_mem_initializer_list): Allow ellipsis to create a
5604 base-class initializer expansion.
5605 (cp_parser_mem_initializer): Ditto.
5606 (cp_parser_template_parameter_list): Keep track of whether the
5607 template parameter is a template parameter pack.
5608 (cp_parser_template_parameter): Parse the ellipsis to indicate a
5609 template parameter pack.
5610 (cp_parser_type_parameter): Ditto.
5611 (cp_parser_template_argument_list): Parse the ellipsis to indicate
5613 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
5614 this declarator is a parameter pack.
5615 (cp_parser_parameter_declaration): The ellipsis does not end the
5616 parameter declaration, because it might be a parameter pack. Parse
5617 the ellipsis to indicate a parameter pack.
5618 (cp_parser_initializer): Allow pack expansions.
5619 (cp_parser_initializer_list): Allow ellipsis to create an
5620 initializer expansion.
5621 (cp_parser_base_clause): Allow ellipsis to create a base specifier
5623 (cp_parser_type_id_list): Allow ellipsis to create an exception
5624 specifier expansion.
5625 (cp_parser_attribute_list): Don't allow pack expansions.
5626 (cp_parser_functional_cast): Allow pack expansions.
5627 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
5628 compute the length of a parameter pack.
5629 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
5630 end a template argument.
5631 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
5632 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
5635 2007-03-09 Dirk Mueller <dmueller@suse.de>
5637 * call.c (build_new_op): Call warn_logical_operator.
5639 2007-03-08 Volker Reichelt <v.reichelt@netcologne.de>
5642 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
5645 * pt.c (any_template_arguments_need_structural_equality_p):
5648 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
5650 * decl.c (grokdeclarator): Disable warnings for anonymous
5653 2007-03-05 Volker Reichelt <v.reichelt@netcologne.de>
5655 * typeck2.c (readonly_error): Always emit a hard error.
5656 Remove last argument.
5657 * cp-tree.h (readonly_error): Adjust prototype.
5658 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
5659 * typeck.c (build_unary_op): Likewise.
5660 (build_modify_expr): Likewise.
5662 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
5665 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
5667 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5670 * parser.c (struct cp_parser): New IN_IF_STMT.
5671 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
5672 returning if parsing the body of an 'if' statement or issuing an
5673 error and continuing.
5674 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
5676 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
5678 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
5681 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
5684 2007-03-02 Geoffrey Keating <geoffk@apple.com>
5686 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
5687 Objective-C++. Don't exit early if -shared-libgcc needs to be
5690 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5692 * typeck.c (common_base_type): Delete unused function.
5694 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
5696 * Make-lang.in: Add dummy lang.install-pdf target.
5698 2007-03-01 Simon Baldwin <simonb@google.com>
5701 * decl.c (check_tag_decl): Added new warning for typedef ignored
5702 when it precedes an otherwise valid non-typedef declaration.
5704 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
5706 * typeck.c (build_function_call): Store converted arguments
5707 in a stack-allocated array instead of building a list.
5708 (convert_arguments): Store arguments in the array passed in as an
5709 argument, and return the actual number of arguments.
5710 * call.c (build_call): Delete, and replace with...
5711 (build_call_n, build_call_a): New.
5712 (build_op_delete_call): Rewrite to avoid constructing argument lists.
5713 (build_over_call): Store converted arguments in a stack-allocated
5714 array instead of building a list.
5715 (build_cxx_call): Pass arguments in an array instead of as a list.
5716 (build_java_interface_fn_ref): Rewrite to avoid constructing
5718 * tree.h: Update declarations to reflect above changes.
5719 * method.c (use_thunk): Use a stack-allocated array to hold
5720 the arguments instead of a list.
5721 * rtti.c (throw_bad_cast): Update call to cxx_call.
5722 (throw_bad_typeid): Likewise.
5723 (build_dynamic_cast_1): Likewise.
5724 * init.c (build_builtin_delete_call): Use build_call_n.
5725 * decl.c (expand_static_init): Likewise.
5726 * except.c (cp_protect_cleanup_actions): Likewise.
5727 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
5728 (gimplify_must_not_throw_expr): Likewise.
5729 (cxx_omp_apply_fn): Use build_call_a.
5731 2007-02-26 Mark Mitchell <mark@codesourcery.com>
5733 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
5734 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
5736 2007-02-25 Mark Mitchell <mark@codesourcery.com>
5738 * cp-tree.h (static_ctors): Remove.
5739 * cp-tree.h (static_dtors): Likewise.
5740 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
5741 refactoring of tree_map hierarchy.
5742 (decl_shadowed_for_var_insert): Likewise.
5743 * semantics.c (expand_body): Use c_expand_body.
5744 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
5745 * decl2.c (static_ctors): Remove.
5746 (static_dtors): Likewise.
5747 (generate_ctor_or_dtor_function): Pass NULL_TREE to
5748 objc_generate_static_init_call. Do not call static_[cd]tors.
5749 (generate_ctor_and_dtor_functions_for_priority): Do not check for
5751 (cp_write_global_declarations): Likewise.
5753 2007-02-23 Richard Guenther <rguenther@suse.de>
5755 * class.c (note_name_declared_in_class): Make declaration
5756 changes meaning a pedwarn.
5758 2007-02-22 Michael Matz <matz@suse.de>
5761 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
5762 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
5763 dump_function_decl): Guard emitting outer scopes by new flag.
5764 * cp-lang.c (cxx_dwarf_name): New function.
5765 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
5766 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
5768 (push_template_decl_real, lookup_template_class): Remove calls
5771 2007-02-19 Mark Mitchell <mark@codesourcery.com>
5773 * call.c (build_new_method_call): Ensure that explicit calls of
5774 destructors have type "void".
5776 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5778 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
5779 and -Walways-true with -Waddress.
5780 * cvt.c (convert_to_void): Replace unconditional warning with
5783 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
5785 * decl.c, tree.c: Fix comment typos.
5787 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
5790 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
5791 statement expression if we had an error mark node.
5793 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
5794 Brooks Moses <brooks.moses@codesourcery.com>
5795 Lee Millward <lee.millward@codesourcery.com>
5797 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
5798 Change class to tcc_vl_exp.
5800 * call.c (build_call): Use build_call_list instead
5802 (build_over_call): Likewise.
5803 (build_new_method_call): Use build_min_non_dep_call_list
5804 instead of build_min_non_dep.
5806 * error.c (dump_call_expr_args): New function.
5807 (dump_aggr_init_expr_args): New function.
5808 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
5809 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
5811 * cvt.c (convert_to_void): Use build_call_array instead
5812 of build3; use new AGGR_INIT_EXPR accessor macros.
5814 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
5815 instead of TREE_CODE_LENGTH.
5817 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
5818 AGGR_INIT_EXPR accessor macros.
5820 * cp-gimplify.c (cp_gimplify_init_expr): Use
5821 AGGR_INIT_EXPR_SLOT to set the slot operand.
5823 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
5824 (AGGR_INIT_EXPR_SLOT): New macro.
5825 (AGGR_INIT_EXPR_ARG): New macro.
5826 (aggr_init_expr_nargs): New macro.
5827 (AGGR_INIT_EXPR_ARGP): New macro.
5828 (aggr_init_expr_arg_iterator): New.
5829 (init_aggr_init_expr_arg_iterator): New.
5830 (next_aggr_init_expr_arg): New.
5831 (first_aggr_init_expr_arg): New.
5832 (more_aggr_init_expr_args_p): New.
5833 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
5834 (stabilize_aggr_init): New declaration.
5835 (build_min_non_dep_call_list): Likewise.
5837 * tree.c (process_aggr_init_operands): New function.
5838 (build_aggr_init_array) New function.
5839 (build_cplus_new): Update to use new CALL_EXPR and
5840 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
5841 build_aggr_init_array.
5842 (build_min_non_dep_call_list) New function.
5843 (build_min_nt): Assert input code parameter is not a variable
5844 length expression class.
5845 (build_min, build_min_non_dep): Likewise.
5846 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
5847 to check for equality instead of recursing. Handle tcc_vl_exp
5849 (stabilize_call): Update to only handle CALL_EXPRs, not
5850 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
5851 (stabilize_aggr_init): New function.
5852 (stabilize_init): Use it.
5854 * cxx-pretty-print.c (pp_cxx_postfix_expression)
5855 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
5856 AGGR_INIT_EXPR accessor macros and argument iterators.
5858 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
5859 build_vl_exp. Iterate through the operands, recursively
5860 processing each one.
5861 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
5862 CALL_EXPR accessor macros.
5863 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
5864 tree code classes. Use TREE_OPERAND_LENGTH instead of
5867 * semantics.c (finish_call_expr): Use build_nt_call_list
5868 instead of build_nt.
5869 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
5870 accessor macros. Use build_call_array to construct the
5871 CALL_EXPR node instead of build3
5873 * decl2.c (build_offset_ref_call_from_tree): Use
5874 build_nt_call_list and build_min_non_dep_call_list instead
5875 of build_min_nt and build_min_non_dep.
5877 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
5878 Use build_nt_call_list instead of build_min_nt.
5880 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5883 * call.c (build_conditional_expr): Improve error message.
5885 2007-02-13 Dirk Mueller <dmueller@suse.de>
5887 * friend.c (do_friend): Annotate warning about friend
5888 declarations in templates with OPT_Wnon_template_friend.
5889 Convert informal message from warning() to inform().
5891 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
5892 Mark Mitchell <mark@codesourcery.com>
5895 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
5896 instantiations for variables.
5898 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5901 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
5902 Check warn_unused_value just once.
5904 2007-02-11 Mark Mitchell <mark@codesourcery.com>
5907 * pt.c (determine_specialization): Use skip_artificial_parms_for.
5908 (fn_type_unificiation): Likewise.
5909 (get_bindings): Likewise.
5911 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
5914 * decl.c (finish_function): Use DECL_REPLACEABLE.
5915 * tree.c (cp_cannot_inline_tree_fn): Likewise.
5917 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
5919 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
5921 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
5923 * decl.c (grokvardecl): Don't error if !have_tls.
5924 (grokdeclarator): Likewise.
5925 * parser.c (cp_parser_omp_threadprivate): Likewise.
5927 2007-02-07 Jakub Jelinek <jakub@redhat.com>
5930 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
5931 parameters and result decls in omp clauses.
5932 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
5935 2007-02-05 Dirk Mueller <dmueller@suse.de>
5938 * parser.c (cp_parser_class_specifier): Always initialize bases.
5940 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
5942 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
5943 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
5944 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
5946 * semantics.c (finish_omp_atomic): Store a whole expression node
5947 in operand 1, and integer_zero_node in operand 0, for dependent
5948 OMP_ATOMIC. Rewrite to make flow easier to understand.
5950 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5952 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
5954 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
5956 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
5957 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
5959 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
5961 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
5962 keyword warning to -Wc++0x-compat.
5964 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5966 * decl.c (grokdeclarator): Update documentation.
5968 2007-02-02 Jakub Jelinek <jakub@redhat.com>
5971 * decl.c (grokdeclarator): If __thread is used together with
5972 a storage class other than extern and static, clear thread_p
5973 after issuing diagnostics and fall through to checking the
5976 2007-01-30 Roger Sayle <roger@eyesopen.com>
5978 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
5979 calculating the size of an array (to avoid recursive errors).
5981 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5984 * typeck.c (build_binary_op): Fix logic for warning. Move warning
5986 * call.c (convert_like_real): Don't warn when converting to
5989 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5991 * decl.c (pop_label): Replace warning with call to
5992 warn_for_unused_label.
5994 2007-01-28 Andrew Pinski <pinskia@gmail.com>
5997 * semantics.c (finish_pseudo_destructor_expr): Check the
5998 destrutor name by calling check_dtor_name.
6000 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
6002 * lex.c (D_CPP0X): Rename.
6004 (reswords): D_CPP0X -> D_CXX0X.
6005 (init_reswords): Ditto.
6006 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
6007 of C++0x keywords as identifiers.
6009 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
6012 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
6015 2007-01-23 Ian Lance Taylor <iant@google.com>
6017 * typeck.c (convert_for_assignment): Only warn about a = b = c
6018 when converting to bool.
6020 2007-01-23 Roger Sayle <roger@eyesopen.com>
6022 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
6024 * typeck.c (ignore_overflows): Remove the remaining uses of
6025 TREE_CONSTANT_OVERFLOW.
6027 2007-01-20 Jan Hubicka <jh@suse.cz>
6029 * decl2.c (start_objects, start_static_storage_duration_function):
6030 Do not make the functions uninlinable.
6032 2007-01-17 Ian Lance Taylor <iant@google.com>
6034 * class.c (add_method): Call VEC_reserve_exact rather than passing
6035 a negative size to VEC_reserve.
6037 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
6040 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
6042 2007-01-10 Mark Mitchell <mark@codesourcery.com>
6045 * decl.c (make_typename_type): If the qualified name is not a
6046 type, issue an error.
6047 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
6050 2007-01-08 Geoffrey Keating <geoffk@apple.com>
6052 * rtti.c: Include target.h.
6053 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
6054 don't emit typeinfo for fundamental types as weak.
6055 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
6057 2007-01-08 Richard Guenther <rguenther@suse.de>
6059 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
6061 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
6063 * call.c (standard_conversion): Pass flag to
6064 vector_types_convertible_p to disallow emission of note.
6065 * typeck.c (convert_for_assignment): Pass flag to
6066 vector_types_convertible_p to allow emission of note.
6067 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
6068 to disallow emission of note.
6070 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6073 * typeck.c (build_binary_op): Call overflow_warning if
6074 TREE_OVERFLOW_P is true for the result and not for any of the
6077 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
6080 * class.c (add_method): Don't wait until template
6081 instantiation time to complain about duplicate methods.
6083 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6086 * semantics.c (finish_unary_op_expr): Warn only if result
6087 overflowed and operands did not.
6089 2007-01-05 Ian Lance Taylor <iant@google.com>
6091 * typeck.c (build_binary_op): Warn about comparing a non-weak
6094 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
6096 * pt.c (tsubst): Propagate the need for structural equality checks
6097 when reducing the level of template parameters.
6099 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
6101 * pt.c: Fix a comment typo.
6103 2007-01-02 Ian Lance Taylor <iant@google.com>
6105 * semantics.c (maybe_convert_cond): Optionally warn when using an
6106 assignment as a condition.
6107 * typeck.c (convert_for_assignment): Optionally warn about
6108 assigning the result of an assignment to a bool.
6110 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
6112 * pt.c (canonical_template_parms): Correct typo in comment.
6114 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
6116 * typeck.c (structural_comptypes): Renamed from "comptypes".
6117 (comptypes): Use canonical type information to perform fast type
6118 comparison. When VERIFY_CANONICAL_TYPES, verify that the
6119 canonical type comparison returns the same results as we would see
6120 from the current, structural check. Support COMPARE_STRUCTURAL
6121 when we need structural checks.
6122 * decl.c (typename_compare): Fix comment.
6123 (build_typename_type): TYPENAME_TYPE nodes require structural
6124 equality checks, because they resolve different based on the
6126 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
6127 require structural equality checks (for now).
6128 (build_ptrmemfunc_type): Build the canonical pointer to member
6130 (compute_array_index_type): Whenever we build a new index type
6131 to represent the size of an array in a template, we need to mark
6132 this index type as requiring structural equality. This goes for
6133 arrays with value-dependent sizes with the current ABI, or all
6135 * tree.c (cplus_array_hash): New.
6136 (struct cplus_array_info): New.
6137 (cplus_array_compare): New.
6138 (cplus_array_htab): New.
6139 (build_cplus_array_type_1): Use a hash table to cache the array
6140 types we build. Build the canonical array type for each array
6142 (cp_build_qualified_type_real): When building a cv-qualified array
6143 type, use the hash table of array types and build canonical array
6145 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
6146 use structural equality (for now).
6147 * cp-tree.h (COMPARE_STRUCTURAL): New.
6148 * pt.c (canonical_template_parms): New.
6149 (canonical_type_parameter): New.
6150 (process_template_parm): Find the canonical type parameter.
6151 (lookup_template_class): When we have named the primary template
6152 type, set the canonical type for our template class to the primary
6153 template type. If any of the template arguments need structural
6154 equality checks, the template class needs structural equality
6156 (tsubst): When reducing the level of a template template
6157 parameter, we require structural equality tests for the resulting
6158 parameter because its template parameters have not had their types
6159 canonicalized. When reducing a template type parameter, find the
6160 canonical reduced type parameter.
6161 (any_template_arguments_need_structural_equality_p): New.