1 2008-10-24 Jakub Jelinek <jakub@redhat.com>
3 * Make-lang.in (check-c++-subtargets): New alias for
5 (lang_checks_parallelized): Add check-g++.
6 (check_g++_parallelize): New variable.
8 2008-10-21 Richard Guenther <rguenther@suse.de>
10 * semantics.c (simplify_aggr_init_exprs_r): Remove.
11 (expand_or_defer_fn): Do not walk the function body to
12 simplify aggr_init_exprs.
14 2008-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
17 * typeck.c (cp_common_type): New. The same as
18 type_after_usual_arithmetic_conversions but without promotions.
19 (type_after_usual_arithmetic_conversions): Do the promotions and
21 (common_type): Make it behave like the C version of this
22 function. Do not handle pointer types.
23 (common_pointer_type): Move handling of pointer types from
25 (cp_build_binary_op): Use common_pointer_type instead of
26 common_type in call to pointer_diff.
27 Use cp_common_type instead of common_type.
28 * cp-tree.h (common_pointer_type): Declare.
30 2008-10-14 Jakub Jelinek <jakub@redhat.com>
33 * cp-gimplify.c (cp_genericize_r): Only fold_convert COND_EXPR
34 arguments if they don't already have COND_EXPR's type.
36 2008-10-14 Paolo Carlini <paolo.carlini@oracle.com>
39 * pt.c (push_template_decl_real): Check that current_template_parms
41 (process_partial_specialization): Assert current_template_parms not
44 2008-10-13 Doug Evans <dje@google.com>
46 * cp-tree.h (DECL_MAIN_P): Fix parentheses around expression.
48 2008-10-10 Jakub Jelinek <jakub@redhat.com>
51 * cp-gimplify.c (cp_genericize_r): Fix up bitfield operands of
54 2008-10-09 Jakub Jelinek <jakub@redhat.com>
57 * semantics.c (finalize_nrv_r): Clear DECL_INITIAL instead of
58 setting it to error_mark_node.
60 2008-10-07 Steve Ellcey <sje@cup.hp.com>
62 * decl.c (start_cleanup_fn): Declare as inline.
64 2008-10-06 Jason Merrill <jason@redhat.com>
66 PR c++/37376, other mangling issues
67 * mangle.c (write_type): Update TYPE_PACK_EXPANSION mangling.
68 (write_member_name): Break out from...
69 (write_expression): ...here. Handle dependent COMPONENT_REF.
70 (write_template_arg): Wrap an argument pack in 'I'/'E'.
71 (write_builtin_type): Update char16/32_t mangling.
72 (write_nested_name, write_prefix): Don't forget template args
74 * operators.def: Add ARROW_EXPR, update COMPONENT_REF and
77 2008-10-06 Aldy Hernandez <aldyh@redhat.com>
79 * typeck.c (build_x_indirect_ref): Add location argument.
80 (cp_build_binary_op): Pass location to warn_for_div_by_zero.
81 (cp_build_unary_op): Add location argument.
82 (cp_build_modify_expr): Same.
83 * class.c (build_base_path): Pass location to build_indirect_ref.
84 * semantics.c (handle_omp_for_class_iterator): Pass elocus to
87 2008-10-05 Dodji Seketeli <dodji@redhat.com>
90 * cp-gimplify.c (cp_gimplify_expr): For each USING_STMT
91 make sure an IMPORTED_DECL node is added to the BLOCK_VARS list
92 of the innermost containing BLOCK.
94 2008-10-03 Paolo Carlini <paolo.carlini@oracle.com>
97 * error.c (dump_function_decl): Save the exceptions in case of
98 error about incompatible specifications in a specialization.
100 2008-10-01 Andrew Pinski <andrew_pinski@playstation.sony.com>
102 * tree.c (lvalue_p_1): COMPOUND_LITERAL_EXPR is also an lvalue.
104 2008-09-30 H.J. Lu <hongjiu.lu@intel.com>
107 * parser.c (cp_parser_selection_statement): Fix uninitialized
110 2008-09-30 Simon Martin <simartin@users.sourceforge.net>
114 * decl.c (grokdeclarator): Set the type for typedefs to a
115 nested-name-specifier to error_mark_node.
117 2008-09-30 Paolo Bonzini <bonzini@gnu.org>
119 * parser.c (cp_parser_selection_statement): Implement here the
120 -Wempty-body warning for `if' and `else' statements.
121 * semantics.c (finish_if_stmt): Do not call empty_body_warning.
123 2008-09-25 Paolo Carlini <paolo.carlini@oracle.com>
126 * name-lookup.c (maybe_process_template_type_declaration): Check
127 return value of push_template_decl_real for error_mark_node.
129 2008-09-24 Aldy Hernandez <aldyh@redhat.com>
131 * semantics.c (finish_fname): Pass location to fname_decl.
133 2008-09-23 Jakub Jelinek <jakub@redhat.com>
136 * semantics.c (finish_omp_for): If processing_template_decl, just build
137 MODIFY_EXPR for init instead of calling cp_build_modify_expr.
139 2008-09-23 Aldy Hernandez <aldyh@redhat.com>
141 * typeck.c (build_array_ref): Pass location to cp_build_binary_op.
142 (get_member_function_from_ptrfunc): Same.
143 (build_x_binary_op): Same.
144 (build_binary_op): Same.
145 (cp_build_binary_op): New location argument.
146 (pointer_diff): Pass location to cp_build_binary_op.
147 (cp_truthvalue_conversion): Pass location to build_binary_op.
148 (convert_ptrmem): Pass location to cp_build_binary_op.
149 (cp_build_modify_expr): Same.
150 (build_ptrmemfunc): Same.
151 * init.c (expand_cleanup_for_base): Pass location to
152 c_common_truthvalue_conversion.
153 (build_new_1): Pass location to cp_build_binary_op.
154 (build_vec_delete_1): Pass location to *build_binary_op,
155 c_common_truthvalue_conversion.
156 (build_vec_init): Same.
157 (build_delete): Same.
158 * decl.c (compute_array_index_type): Same.
159 * call.c (build_new_op): Same.
160 * rtti.c (build_dynamic_cast_1): Same.
161 * cp-tree.h: Add argument to cp_build_binary_op.
162 * semantics.c (handle_omp_for_class_iterator): Pass location to
163 *build_binary_op, c_common_truthvalue_conversion.
164 * decl2.c (get_guard_cond): Same.
166 2008-09-17 Richard Guenther <rguenther@suse.de>
169 * rtti.c (build_dynamic_cast_1): Convert the COND_EXPR
170 result to the correct type.
172 2008-09-17 H.J. Lu <hongjiu.lu@intel.com>
175 * name-lookup.c (pushdecl_maybe_friend): Don't return the old
176 parameter for duplicate.
178 2008-09-17 Jason Merrill <jason@redhat.com>
181 * name-lookup.c (lookup_type_scope): Look through sk_function_parms.
183 2008-09-17 Jakub Jelinek <jakub@redhat.com>
186 * typeck.c (build_array_ref): Use protected_set_expr_location instead
187 of SET_EXPR_LOCATION when ret might not be an expression.
189 2008-09-17 Jan Hubicka <jh@suse.cz>
192 * cp/decl.c (start_method): Set DECL_NO_INLINE_WARNING_P.
194 2008-09-16 Jakub Jelinek <jakub@redhat.com>
197 * semantics.c (finish_compound_literal): Return error_mark_node if
201 * lex.c (init_reswords): Don't populate ridpointers for D_CONLY
204 2008-09-15 Aldy Hernandez <aldyh@redhat.com>
206 * decl.c (duplicate_decls): Call error_at.
207 (grokfndecl): New location argument. Use location if available.
208 (grokdeclarator): Pass declarator location to grokfndecl.
209 * cp-tree.h (struct cp_declarator): Update comment for id_loc.
210 * decl2.c (check_classfn): Use error_at.
211 * parser.c (cp_parser_init_declarator): Set function_start_locus
213 (cp_parser_member_declaration): Set id_loc for function declarators.
215 2008-09-09 Jan Hubicka <jh@suse.cz>
218 * pt.c (tsubst_decl): Do not copy DECL_STRUCT_FUNCTION pointer.
220 2008-09-09 Jakub Jelinek <jakub@redhat.com>
223 * tree.c (array_type_nelts_top): Add size_one_node instead of
226 2008-09-09 Jason Merrill <jason@redhat.com>
229 * pt.c (tsubst_copy) [PARM_DECL]: Don't abort if the parm has
232 2008-09-09 Jakub Jelinek <jakub@redhat.com>
235 * decl.c (build_enumerator): Handle previous value's DECL_INITIAL
236 being error_operand_p. Don't clear value if it was error_mark_node.
238 2008-09-09 Paolo Bonzini <bonzini@gnu.org>
240 * cp-objcp-common.h (LANG_HOOKS_EXPAND_DECL): Remove.
241 * cp-tree.h: Don't mention DECL_ANON_UNION_ELEMS.
242 * semantics.c (anon_aggr_type_p): Remove.
244 2008-09-06 Jason Merrill <jason@redhat.com>
247 * parser.c (cp_parser_parameter_declaration_list): Process the
248 PARM_DECLs as we go and push them. Return a TREE_LIST.
249 (cp_parser_parameter_declaration_clause): Return a TREE_LIST.
250 (cp_parser_direct_declarator): Create a binding level and
251 suppress deprecated warnings in the parameter list.
252 (make_call_declarator): PARMS is now a tree.
253 * cp-tree.h (struct cp_declarator): Function parms are now a tree.
254 * decl.h (enum deprecated_states, deprecated_state): Move here.
256 (type_is_deprecated): New fn.
257 (grokparms): PARMLIST is a tree now. Warn about parms that
258 use deprecated types.
259 * mangle.c (write_expression): Handle PARM_DECL, CALL_EXPR and
261 * pt.c (tsubst) [DECLTYPE_TYPE]: Set skip_evaluation.
262 (tsubst_copy) [PARM_DECL]: Handle a PARM_DECL used outside of a
264 * name-lookup.c (pushtag): Look through function parameter scopes.
265 (pushdecl_maybe_friend): Don't set DECL_CONTEXT on a PARM_DECL
266 when we're parsing a function declarator.
268 2008-09-05 Douglas Gregor <doug.gregor@gmail.com>
271 * tree.c (cp_build_qualified_type_real): Deal with sharing of
272 TYPE_LANG_SPECIFIC in the canonical types of pointer-to-method
275 2008-09-04 Ian Lance Taylor <iant@google.com>
277 * parser.c (check_no_duplicate_clause): Change code parameter to
278 enum omp_clause_code.
280 2008-09-03 Jakub Jelinek <jakub@redhat.com>
283 * decl.c (cp_finish_decl): Only set
284 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P if decl is VAR_DECL.
287 * cp-tree.h (defer_mark_used_calls, deferred_mark_used_calls): New
289 * decl2.c (mark_used): If defer_mark_used_calls, push decl into
290 deferred_mark_used_calls vector and exit early.
291 * decl.c (defer_mark_used_calls, deferred_mark_used_calls): New
293 (finish_function): Set defer_mark_used_calls for the duration of the
294 function. Call mark_used on any queued decls.
296 2008-09-02 Jason Merrill <jason@redhat.com>
299 * call.c (build_over_call): Make =delete work with SFINAE.
300 * class.c (resolve_address_of_overloaded_function): Likewise.
302 * cp-tree.h (struct lang_decl_flags): Rename threadprivate_p to
303 threadprivate_or_deleted_p.
304 (CP_DECL_THREADPRIVATE_P): Adjust.
305 (DECL_DELETED_FN): Likewise.
306 (SD_UNINITIALIZED, SD_INITIALIZED, SD_DEFAULTED): New macros.
307 (SD_DELETED): New macro.
308 * parser.c (cp_parser_init_declarator): Use them.
309 * decl.c (start_decl): Use them.
311 * decl2.c (mark_used): Give =deleted error even in sizeof.
313 * typeck2.c (check_narrowing): Downgrade narrowing error to
316 2008-09-02 Aldy Hernandez <aldyh@redhat.com>
318 * typeck.c (build_array_ref): Use new location argument.
319 * class.c (build_vtbl_ref_1): Pass location to build_array_ref.
320 * call.c (build_new_op): Same.
321 * decl2.c (grok_array_decl): Same.
322 * cp-tree.h (build_array_ref): Add location argument to prototype.
324 2008-09-01 Aldy Hernandez <aldyh@redhat.com>
326 * typeck.c (build_x_indirect_ref): Add location argument.
327 * class.c (build_base_path): Pass location to build_indirect_ref.
328 * pt.c (tsubst_copy_and_build): Pass location to
329 finish_label_address_expr.
330 * parser.c (cp_parser_unary_expression): Same.
332 2008-08-31 Jason Merrill <jason@redhat.com>
334 Implement late-specified return type using 'auto'.
335 * cp-tree.h (struct cp_declarator): Add late_return_type field to
337 * parser.c (cp_parser_late_return_type_opt): New fn.
338 (cp_parser_direct_declarator): Use it.
339 (make_call_declarator): Put it in the declarator.
340 * decl.c (grokdeclarator): Splice in late-specified return type.
341 * pt.c (splice_late_return_type): New fn.
343 2008-08-29 Michael Meissner <gnu@the-meissners.org>
345 * decl.c (builtin_function_1): Take a bool argument to decide
346 whether to use pushdecl or pushdecl_top_level.
347 (duplicate_decls): Copy function specific target and optimization
348 options on duplicate declarations.
349 (cxx_builtin_function): Update builtin_function_1 call.
350 (cxx_builtin_function_ext_scope): New function, guarantee that the
351 declaration is done at global scope.
353 * cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE): New
354 macro, define builtin function hook for delayed machine specific
357 * cp-tree.h (cxx_builtin_function_ext_scope): Add declaration.
359 2008-08-30 Jason Merrill <jason@redhat.com>
362 * pt.c (dependent_type_p): Don't abort on auto outside of a template.
364 2008-08-29 Jason Merrill <jason@redhat.com>
366 Implement C++0x 'auto' semantics.
367 * decl.c (start_decl_1): Don't complain about auto being incomplete.
368 (cp_finish_decl): Deduce auto.
369 * init.c (build_new): Handle 'new auto'.
370 * typeck2.c (cxx_incomplete_type_diagnostic): Give a different
371 message for auto than for normal template type parms.
372 * pt.c (type_dependent_expression_p): Handle { }.
373 (make_auto): New function.
374 (listify_autos): New function.
375 (do_auto_deduction): New function.
376 (is_auto): New function.
377 (type_uses_auto): New function.
378 * cp-tree.h: Declare them.
379 * parser.c (cp_parser_decl_specifier_seq): In C++0x mode, don't
380 treat auto as a declspec.
381 (cp_parser_simple_type_specifier): It's a type-specifier.
383 2008-08-29 Mark Mitchell <mark@codesourcery.com>
385 * mangle.c (write_type): Add target-specific manglings for
386 non-fundamental types to the substitution table.
389 2008-08-29 Jakub Jelinek <jakub@redhat.com>
393 * name-lookup.c (do_using_directive, cp_emit_debug_info_for_using):
394 Adjust debug_hooks->imported_module_or_decl callers.
396 2008-08-29 Jan Hubicka <jh@suse.cz>
398 * cp-gimplify.c (cp_gimplify_expr): Add PRED_CONTINUE heuristic.
400 2008-08-28 Paolo Carlini <paolo.carlini@oracle.com>
403 * decl.c (reshape_init_r): Check init for error_mark_node.
405 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
408 * semantics.c (maybe_convert_cond): Call verify_sequence_points.
409 (finish_return_stmt): Likewise.
410 (finish_switch_condition): Likewise.
412 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
414 * cp-tree.h: Fix #error directive.
416 2008-08-26 Douglas Gregor <doug.gregor@gmail.com>
418 * typeck.c (type_after_usual_arithmetic_conversions): Don't do the
419 usual arithmetic conversions on scoped enumeration types.
420 (common_type): Ditto.
421 (default_conversion): Don't perform integral promotions on scoped
423 (build_array_ref): Scoped enumeration types can't be used as
425 * decl.c (start_enum): If building a C++0x scoped enumeration,
426 enter its scope. If provided with an underlying type, check that
427 underlying type and set up the enumeration type accordingly.
428 (finish_enum): Only compute an underlying type if the underlying
429 type isn't already fixed, and only convert the enumerator values
430 now if we've just computed the underlying type. Finish the scope
431 of C++0x scoped enumerations.
432 (build_enumerator): For enumerations with a fixed underlying type,
433 check the enumerator values when the enumerator is defined.
434 (lookup_enumerator): New.
435 * call.c (standard_conversion): Don't allow assignment from
436 integers to scoped enumeration types, even with -fpermissive.
437 Don't convert from scoped enumerations to bool or any arithmetic
439 (build_conditional_expr): Don't per the usual arithmetic
440 conversions for scoped enumeration types.
441 (convert_like_real): Check complain to see if we should
443 * error.c (class_key_or_enum_as_string): Print scoped enums.
444 * cp-tree.h (MAYBE_CLASS_TYPE_P): Check CLASS_TYPE_P, not
446 (INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P): New.
447 (SCOPED_ENUM_P): New.
448 (UNSCOPED_ENUM_P): New.
449 (SET_SCOPED_ENUM_P): New.
450 (ENUM_UNDERLYING_TYPE): New.
451 * pt.c (lookup_template_class): Update the instantiation of enum
452 types to deal with C++0x scoped enumerations and underlying
454 * name-lookup.c (begin_scope): Deal with scoped enumeration
456 (lookup_qualified_name): Deal with lookup into enumeration types.
457 * name-lookup.h (enum scope_kind): Add sk_scoped_enum.
458 * parser.c (cp_parser_class_or_namespace_name): Rename to...
459 (cp_parser_qualifying_entity): ... this. Also, in C++0x mode,
460 parse a type-name that can be an enumeration type.
461 (cp_parser_nested_name_specifier_opt): Update with C++0x grammar.
462 (cp_parser_elaborated_type_specifier): Parse the
463 optional `struct' or `class' following enum (in C++0x).
464 (cp_parser_enum_specifier): Parse C++0x scoped enumerations and
467 2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
469 * typeck.c: Update all calls to pedwarn.
474 * name-lookup.c: Likewise.
475 * parser.c: Likewise.
477 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
480 * parser.c (cp_parser_omp_for_loop): Handle parenthesized
483 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
485 * parser.c: Update all calls to inform.
486 * typeck.c: Likewise.
490 * method.c: Likewise.
491 * friend.c: Likewise.
492 * typeck2.c: Likewise.
494 * name-lookup.c: Likewise.
497 2008-08-19 Jakub Jelinek <jakub@redhat.com>
500 * error.c (cp_print_error_function): Deal with recursive BLOCK trees.
502 2008-08-18 Tomas Bily <tbily@suse.cz>
504 * tree.c (cp_tree_equal): Use CONVERT_EXPR_CODE_P.
506 2008-08-18 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
508 * typeck.c: Update all callers of permerror.
513 * except.c: Likewise.
515 * typeck2.c: Likewise.
517 * semantics.c: Likewise.
518 * name-lookup.c: Likewise.
521 * parser.c: Likewise.
523 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
526 * pt.c (check_template_shadow): Change to return a bool.
527 * name-lookup.c (push_class_level_binding): Early return if
528 check_template_shadow returns false.
529 * cp-tree.h (check_template_shadow): Adjust declaration.
531 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
534 * decl.c (grokdeclarator): In case of extern and initializer, return
535 error_mark_node after the error.
537 2008-08-13 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
540 * decl.c (grokfndecl): Call check_main_parameters_type only if
543 2008-08-12 Paolo Carlini <paolo.carlini@oracle.com>
546 * parser.c (cp_parser_class_head): Early return error_mark_node in
547 case of global qualification of class name or qualified name that
548 does not name a class.
550 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
553 * cvt.c (ocp_convert): Warn for out-of-range conversions to enum.
555 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
558 * cp-tree.h (struct diagnostic_context, struct diagnostic_info):
559 Delete forward declarations. Check that toplev.h has not been
560 included before this file. Include toplev.h and diagnostic.h.
561 * error.c (cp_cpp_error): Use DK_PEDWARN.
562 (cxx_incomplete_type_diagnostic): Update declaration.
563 (cxx_incomplete_type_error): Use DK_ERROR.
564 * typeck2.c (cxx_incomplete_type_diagnostic): Take a diagnostic_t
565 as argument. Use emit_diagnostic.
566 (cxx_incomplete_type_error): Use DK_ERROR.
567 (add_exception_specifier): Use diagnostic_t instead of custom
569 * typeck.c (complete_type_or_else): Update call to
570 cxx_incomplete_type_diagnostic.
571 * init.c (build_delete): Likewise.
572 * call.c (diagnostic_fn_t): Remove unused typedef.
573 (build_temp): Pass a pointer to diagnostic_t.
574 (convert_like_real): Use emit_diagnostic.
575 (joust): Check return value of warning before giving informative
577 * friend.c (do_friend): Check return value of warning
578 before giving informative note.
579 * parser.c (cp_parser_template_id): Likewise.
581 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
584 * class.c (check_bases_and_members): Warn with -Wuninitialized
587 2008-08-08 Volker Reichelt <v.reichelt@netcologne.de>
590 * decl.c (xref_basetypes): Check base for MAYBE_CLASS_TYPE_P,
591 and make sure it is not a union.
593 2008-08-07 H.J. Lu <hongjiu.lu@intel.com>
595 * semantics.c (finish_decltype_type): Initialize type.
597 2008-08-07 Douglas Gregor <doug.gregor@gmail.com>
599 * semantics.c (finish_decltype_type): Handle calls to function
600 pointers and references to functions properly.
602 2008-08-06 Douglas Gregor <doug.gregor@gmail.com>
605 * parser.c (cp_parser_template_argument): Don't assume that '>>'
606 following a type-id is an error when in C++0x mode.
608 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
611 * decl.c (grokdeclarator): Use explicit location with permerror_at.
613 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
616 * typeck.c (cp_build_binary_op): Move code to c-common.c.
618 2008-08-05 Jason Merrill <jason@redhat.com>
621 * decl.c (build_ptrmemfunc_type): Don't require structural
622 comparison of PMF types.
623 * tree.c (cp_build_qualified_type_real): Don't clear
624 a valid TYPE_PTRMEMFUNC_TYPE.
625 * typeck.c (cp_build_unary_op): Still do build_ptrmemfunc in
628 2008-08-04 Jason Merrill <jason@redhat.com>
631 * typeck2.c (check_narrowing): Allow narrowing conversion
632 from an explicit floating-point constant.
635 * pt.c (tsubst_decl): Leave DECL_INITIAL set on deleted
638 2008-08-04 Simon Baldwin <simonb@google.com>
641 * parser.c (cp_parser_elaborated_type_specifier): Warn only when
642 the declaration's id is followed by a semicolon.
644 2008-07-31 Jakub Jelinek <jakub@redhat.com>
647 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Call
648 complete_type_or_else even for UNKNOWN_TYPE to get diagnostics.
650 2008-07-31 Jason Merrill <jason@redhat.com>
653 * init.c (build_new_1): Don't convert pointer to the data type
654 until we're actually going to treat it as that type.
657 * tree.c (build_aggr_init_expr): Split out...
658 (build_cplus_new): ...from here.
659 (stabilize_init): Don't mess with AGGR_INIT_EXPR either.
660 * init.c (build_new_1): new T() means value-initialization,
661 not default-initialization.
662 (build_vec_init): Likewise.
663 (build_value_init_1): Use build_aggr_init_expr.
665 2008-07-30 Dodji Seketeli <dseketel@redhat.com>
668 * decl2.c (fix_temporary_vars_context_r): New function.
669 (one_static_initialization_or_destruction): Make sure temporary
670 variables part of the initialiser have their DECL_CONTEXT()
673 2008-07-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
676 * typeck.c (build_binary_op): Encapsulate code into
679 2008-07-29 Jakub Jelinek <jakub@redhat.com>
682 * tree.c (cplus_array_hash, build_cplus_array_type_1): Hash on
683 TYPE_UID instead of pointers.
685 2008-07-29 Jan Hubicka <jh@suse.cz>
687 * optimize.c (maybe_clone_body): Remove DECL_INLINE.
688 * decl.c (duplicate_decls): Likewise.
689 (grokfndecl): Likewise.
690 (start_method): Likewise.
691 * method.c (make_thunk, make_alias_for, implicitly_declare_fn):
693 * pt.c (register_specialization, regenerate_decl_from_template):
695 * decl2.c (grokfield): Likewise.
697 2008-07-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
700 * decl.c (duplicate_decls): Merge USED flags.
702 2008-07-27 Jason Merrill <jason@redhat.com>
705 * decl.c (reshape_init_r): Allow C++0x initializer lists.
707 2008-07-28 Richard Guenther <rguenther@suse.de>
709 Merge from gimple-tuples-branch.
711 2008-07-22 Aldy Hernandez <aldyh@redhat.com>
713 * cp-gimplify.c (gimplify_if_stmt): Set location on newly created
716 2008-07-18 Jakub Jelinek <jakub@redhat.com>
718 * decl.c (finish_function): Call gimple_body after cp_genericize.
720 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
722 * optimize.c: Include gimple.h instead of tree-gimple.h.
723 * Make-lang.in (cp-gimplify.o): Depend on tree-iterator.h.
724 * cp-gimplify.c: Rename tree-gimple.h to gimple.h. Include
727 2008-07-16 Jakub Jelinek <jakub@redhat.com>
729 * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE for the clone.
731 2008-07-14 Jakub Jelinek <jakub@redhat.com>
733 * cp-gimplify.c (cp_gimplify_expr): Update comment.
735 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
737 * cp-tree.h (union lang_tree_node): Rename GENERIC_NEXT to
739 * cp-gimplify.c (cxx_omp_clause_apply_fn): Rename
740 GIMPLE_MODIFY_STMT to MODIFY_EXPR.
741 (cxx_omp_clause_copy_ctor): Same.
742 (cxx_omp_clause_assign_op): Same.
744 2008-05-28 Jakub Jelinek <jakub@redhat.com>
746 * cp-gimplify.c (cp_gimplify_omp_for): Add pre_p argument. Tuplify.
747 (cp_gimplify_expr): Adjust caller.
749 2008-05-11 Doug Kwan <dougkwan@google.com>
751 * init.c (build_vec_delete): Add type conversion for argument
752 0 of POINTER_PLUS_EXPR.
754 2008-04-29 Doug Kwan <dougkwan@google.com>
756 * decl2 (File): Include "gimple.h"
757 (cp_write_global_declarations): Use gimple_body instead of
759 * Make-lang.in (cp/decl2.o): Add $(GIMPLE_H)
761 2008-04-10 Diego Novillo <dnovillo@google.com>
763 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00913.html
765 * optimize.c (maybe_clone_body): Re-enable call to
767 * cp-gimplify.c (cp_gimplify_omp_for): Mark disabled
768 code with call to gimple_unreachable.
769 (cp_genericize): Fix handling of clone bodies.
771 2008-04-04 Diego Novillo <dnovillo@google.com>
773 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00413.html
775 * optimize.c (maybe_clone_body): Re-enable.
777 2008-02-19 Diego Novillo <dnovillo@google.com>
778 Oleg Ryjkov <olegr@google.com>
780 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
782 * cp-gimplify.c (gimplify_for_stmt): Change gimple_seq
783 argument to gimple_seq *. Update all users.
784 (gimplify_must_not_throw_expr): Likewise.
786 2008-02-04 Oleg Ryjkov <olegr@google.com>
788 * except.c: Include gimple.h
789 (cp_protect_cleanup_actions): Convert to tuples.
790 * Make-lang.in (cp/except.o): Add dependency on gimple.h
792 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
794 * cp-gimplify.c (gimplify_cp_loop): Call tree_annotate_all_with_locus
795 instead of annotating each block manually.
797 2007-10-30 Aldy Hernandez <aldyh@redhat.com>
799 * cp-gimplify.c (gimplify_cp_loop): Tuplify.
800 (gimplify_for_stmt): Same.
801 (gimplify_switch_stmt): Same.
802 (cp_gimplify_expr): [FOR_STMT]: Do not call gimplify_for_stmt. Return
804 [WHILE_STMT]: Return GS_OK.
806 [CONTINUE_STMT]: Same.
808 (cp_genericize): Set gimple_body() of cloned functions when needed.
810 2007-10-29 Aldy Hernandez <aldy@quesejoda.com>
812 * cp-gimplify.c: Move build_gimple_eh_filter_tree here.
813 (cp_gimplify_init_expr): Convert to tuples.
814 (gimplify_must_not_throw_expr): Make function return a
815 gimplify_status and convert to tuples.
817 2007-10-18 Aldy Hernandez <aldy@quesejoda.com>
819 * cp-gimplify.c (genericize_try_block): Enable and do not call
821 (genericize_catch_block): Same.
822 (genericize_eh_spec_block): Same.
823 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
824 (cp_gimplify_expr): Enable TRY_BLOCK, HANDLER, and EH_SPEC_BLOCK.
826 2007-10-16 Aldy Hernandez <aldy@quesejoda.com>
828 * optimize.c (maybe_clone_body): Comment out call to clone_body.
829 * decl.c (finish_function): Use gimple_body instead of
831 * cp-tree.h (cp_gimplify_expr): Last 2 arguments are sequences.
832 * cp-gimplify.c (genericize_try_block): Comment out.
833 (genericize_catch_block): Same.
834 (genericize_eh_spec_block): Same.
835 (gimplify_cp_loop): Comment out calls to gimplify_stmt.
836 (gimplify_for_stmt): Comment out.
837 (gimplify_switch_stmt): Comment out call to gimplify_stmt.
838 (cp_gimplify_omp_for): Same.
839 (gimplify_must_not_throw_expr): Argument pre_p is a sequence.
840 Comment out call to gimplify_stmt and append_to_statement_list.
841 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
842 (cp_gimplify_init_expr): Arguments pre_p and post_p are sequences.
843 (cp_gimplify_expr): Same.
844 Comment out calls to genericize_*_block. Comment out call to
847 2008-07-27 H.J. Lu <hongjiu.lu@intel.com>
850 * class.c (type_has_user_provided_default_constructor): Handle
853 2008-07-27 Paolo Carlini <paolo.carlini@oracle.com>
855 * decl.c (push_library_fn): Add a parameter for the exceptions that
856 the function may throw.
857 (push_void_library_fn, push_throw_library_fn, expand_static_init):
859 (build_library_fn): Change to static.
860 * cp-tree.h: Adjust declarations.
861 * except.c (declare_nothrow_library_fn): New.
862 (do_get_exception_ptr, do_begin_catch, do_free_exception,
863 do_allocate_exception): Use the latter, adjust the declarations
864 (ie, add empty exception-specification), consistently with the
865 actual implementation in libsupc++.
867 2008-07-25 Jan Hubicka <jh@suse.cz>
869 * typeck.c (inline_conversion): Remove.
870 (cp_build_function_call): Do not use inline_conversion.
871 * decl.c (duplicate_decls): Do not insist on inline being declared
873 (start_cleanup_fn): Do not assume that INLINE flags prevent function
874 from being output. We now remove static functions always.
875 (finish_function): Do return warning on all static functions.
876 * call.c (build_over_call): Do not use inline_conversion.
877 * cp-tree.h (possibly_inlined_p): Declare.
878 (inline_conversion): Remove.
879 * pt.c (instantiate_decl): Use possibly_inlined_p predicate.
880 * decl2.c (cp_write_global_declarations): Likewise.
881 (mark_used): Likewise.
882 (possibly_inlined_p): New functions.
884 2008-07-25 Jason Merrill <jason@redhat.com>
886 * class.c (type_has_user_provided_default_constructor): Handle
889 2008-07-23 Jan Hubicka <jh@suse.cz>
891 * decl.c (duplicate_decls): Update comment and unit-at-a-time.
892 (grogfndecl): Drop flag_inline_trees code.
893 * pt.c (instantiate_decl): Drop flag_iline_trees code.
894 * lex.c (cxx_init): Do not set unit-at-a-time.
896 2008-07-23 Jason Merrill <jason@redhat.com>
898 * mangle.c (write_unqualified_name): Avoid infinite recursion when
899 trying to mangle a decl with no name.
901 Implement defaulted/deleted functions as per N2346
902 * cp-tree.h (struct lang_decl_flags): Add defaulted_p bitfield.
903 (DECL_DELETED_FN): New macro.
904 (DECL_DEFAULTED_FN): New macro.
905 * class.c (user_provided_p): New fn.
906 (defaultable_fn_p): New fn.
907 (type_has_user_provided_constructor): New fn.
908 (type_has_user_provided_default_constructor): New fn.
909 (check_methods): A defaulted fn is still trivial.
910 (check_bases_and_members): Likewise.
911 * decl.c (grok_special_member_properties): Likewise.
912 (duplicate_decls): Complain about redeclaring a function as deleted.
913 (start_decl): initialized==2 means deleted.
914 (cp_finish_decl): Handle deleted/defaulted semantics.
915 * decl2.c (grokfield): Likewise.
916 (mark_used): Check DECL_DEFAULTED_FN instead of DECL_ARTIFICIAL.
917 Complain about using a deleted fn.
918 * init.c (build_value_init_1): Use type_has_user_provided_constructor.
919 (perform_member_init): Check for a user-provided default constructor
920 even if TYPE_NEEDS_CONSTRUCTING.
921 (build_new_1): Likewise.
922 * call.c (build_over_call): Don't call mark_used twice.
923 * method.c (implicitly_declare_fn): Set DECL_DEFAULTED_FN.
924 * search.c (check_final_overrider): Check for deleted mismatch.
925 * parser.c (cp_parser_init_declarator): Tell start_decl about =delete.
926 (cp_parser_pure_specifier): Handle =default and =delete.
928 * error.c (maybe_warn_cpp0x): Suggest -std=gnu++0x as well.
930 2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
933 * typeck.c: All calls to pedwarn changed.
934 * decl.c: All calls to pedwarn changed.
935 * call.c: All calls to pedwarn changed.
936 * error.c: All calls to pedwarn changed.
937 * typeck2.c: All calls to pedwarn changed.
938 * pt.c: All calls to pedwarn changed.
939 * name-lookup.c: All calls to pedwarn changed.
940 * parser.c: All calls to pedwarn changed.
942 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
944 * call.c: Fix comment typos.
946 * cp-tree.h: Likewise.
947 * cxx-pretty-print.c: Likewise.
950 * name-lookup.c: Likewise.
951 * operators.def: Likewise.
952 * parser.c: Likewise.
955 * typeck.c: Likewise.
957 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
961 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Only check
962 copy constructors and copy assignment operators proper.
964 2008-07-21 Rafael Ávila de Espíndola <espindola@google.com>
966 * parser.c (cp_token): Remove in_system_header.
967 (eof_token): Remove in_system_header.
968 (cp_lexer_get_preprocessor_token): Don't set in_system_header.
969 (cp_lexer_set_source_position_from_token): Don't set in_system_header.
970 (cp_parser_member_declaration): Use in_system_header_at.
971 * pt.c (lookup_template_class): Don't set DECL_IN_SYSTEM_HEADER.
972 (pop_tinst_level): Don't set in_system_header.
973 (instantiate_class_template): Don't set in_system_header.
974 (instantiate_decl): Don't set in_system_header.
975 (instantiate_pending_templates): Don't set in_system_header.
977 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
980 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Use
981 TYPE_NOTHROW_P, not TREE_NOTHROW.
982 (trait_expr_value): Likewise.
984 2008-07-18 Dodji Seketeli <dseketel@redhat.com>
987 * call.c (convert_like_real): Don't take the error code path
988 when a rvalue or base conversion has the bad_p field set.
990 2008-07-18 Kris Van Hees <kris.van.hees@oracle.com>
992 * rtti.c (emit_support_tinfos): Add char16_type_node and
994 * typeck2.c (digest_init): Support char16_t and char32_t.
996 2008-07-18 Kavih R. Ghazi <ghazi@caip.rutgers.edu>
998 * cvt.c (convert_to_void): Avoid C++ keywords.
999 * decl.c (walk_namespaces_r, wrapup_globals_for_namespace):
1001 * friend.c (is_friend): Likewise.
1002 * init.c (perform_member_init): Likewise.
1003 * mangle.c (write_template_prefix, write_template_template_param):
1005 * name-lookup.c (do_namespace_alias, do_using_directive,
1006 parse_using_directive, ambiguous_decl, arg_assoc): Likewise.
1007 * parser.c (cp_parser_template_id, cp_parser_namespace_definition,
1008 cp_parser_objc_typename, cp_parser_objc_method_keyword_params):
1010 * pt.c (is_specialization_of_friend, lookup_template_class,
1011 push_tinst_level, instantiate_class_template,
1012 tsubst_copy_and_build): Likewise.
1013 * tree.c (add_stmt_to_compound): Likewise.
1014 * typeck.c (finish_class_member_access_expr): Likewise.
1016 2008-07-17 Julian Brown <julian@codesourcery.com>
1017 Mark Mitchell <mark@codesourcery.com>
1019 * decl2.c (determine_visibility): Allow target to override
1020 visibility of class data.
1022 2008-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1025 * semantics.c (trait_expr_value): Update __has_trivial_destructor
1026 semantics to the current WP (N2691).
1028 2008-07-16 Dodji Seketeli <dseketel@redhat.com>
1031 * name-lookup.c (lookup_extern_c_fun_binding_in_all_ns): New function.
1032 (pushdecl_maybe_friend): Check if a redeclaration of extern C function
1033 complies with exception specification constraints.
1035 2008-07-14 Jason Merrill <jason@redhat.com>
1037 * lex.c (init_reswords): Always set D_OBJC.
1039 2008-07-11 Tom Tromey <tromey@redhat.com>
1040 Ian Lance Taylor <iant@google.com>
1042 * lex.c (struct resword, reswords): Don't define.
1043 (D_EXT, D_ASM, D_OBJC, D_CXX0X): Don't define.
1044 (init_reswords): Clarify mask code. Use c_common_reswords rather
1047 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1050 * decl.c (grokdeclarator): Warn about initializing variables
1051 of storage class 'extern' only after the type of the declarator
1052 has been properly computed.
1054 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1057 * cp-tree.h (struct cp_decl_specifier_seq): Add a location field. It
1058 carries the location of the primary type.
1059 * parser.c (cp_parser_check_type_definition): Update documentation.
1060 (cp_parser_check_for_definition_in_return_type,
1061 cp_parser_check_for_invalid_template_id,
1062 cp_parser_set_decl_spec_type,
1063 cp_parser_check_for_definition_in_return_type,
1064 cp_parser_diagnose_invalid_type_name,
1065 cp_parser_new_expression, cp_parser_explicit_instantiation,
1066 cp_parser_type_specifier, cp_parser_simple_type_specifier,
1067 cp_parser_omp_for_loop, cp_parser_pragma): Use location in error
1070 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1074 * semantic.c (qualified_name_lookup_error, finish_id_expression):
1075 Add a location_t parameter so that
1076 error message can have a more accurate location.
1077 * cp-tree.h: Updated prototype
1078 * pt.c (tsubst_qualified_id): Use location in error messages.
1079 * parser.c (cp_parser_postfix_expression,
1080 cp_parser_objc_statement, cp_parser_trait_expr,
1081 cp_parser_token_is_class_key,
1082 cp_parser_uncommitted_to_tentative_parse_p,
1083 cp_parser_check_for_invalid_template_id, cp_parser_is_string_literal,
1084 cp_parser_error, cp_parser_name_lookup_error,
1085 cp_parser_simulate_error, cp_parser_check_decl_spec,
1086 cp_parser_check_decl_spec, cp_parser_non_integral_constant_expression,
1087 cp_parser_diagnose_invalid_type_name,
1088 cp_parser_parse_and_diagnose_invalid_type_name,
1089 cp_parser_require_pragma_eol, cp_parser_make_typename_type,
1090 cp_parser_string_literal, cp_parser_primary_expression,
1091 cp_parser_primary_expression, cp_parser_unqualified_id,
1092 cp_parser_nested_name_specifier_opt, cp_parser_postfix_expression,
1093 cp_parser_postfix_dot_deref_expression, cp_parser_new_expression,
1094 cp_parser_direct_new_declarator, cp_parser_builtin_offsetof,
1095 cp_parser_label_for_labeled_statement, cp_parser_statement_seq_opt,
1096 cp_parser_jump_statement, cp_parser_block_declaration,
1097 cp_parser_simple_declaration, cp_parser_decl_specifier_seq,
1098 cp_parser_function_specifier_opt, cp_parser_decltype,
1099 cp_parser_mem_initializer_list, cp_parser_mem_initializer,
1100 cp_parser_mem_initializer_id, cp_parser_template_parameter,
1101 cp_parser_type_parameter, cp_parser_template_id,
1102 cp_parser_template_name, cp_parser_template_argument): Likewise.
1104 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1107 * pt.c (tsubst_function_type): Remove warning for type qualifiers
1108 on function return type.
1110 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1113 * pt.c (tsubst_function_type): Don't warn for type qualifiers
1114 on function return type in case of system header.
1116 2008-07-09 Raksit Ashok <raksit@google.com>
1118 * parser.c (cp_parser_postfix_expression): New warning based on flag
1119 warn_disallowed_functions.
1121 2008-07-08 Simon Martin <simartin@users.sourceforge.net>
1124 * decl.c (grokdeclarator): Reset storage_class and staticp for friend
1125 functions declared with a storage class qualifier.
1127 2008-07-03 Richard Guenther <rguenther@suse.de>
1130 * typeck.c (cp_build_function_call): Move code to verify
1131 builtin function arguments ...
1132 * call.c (build_cxx_call): ... here.
1134 2008-07-02 Jason Merrill <jason@redhat.com>
1136 * Make-lang.in (cp/typeck2.o): Add $(REAL_H) dependency.
1138 Implement WG21 N2672, Initializer List proposed wording
1139 * cp-tree.h (enum cp_tree_index): Add CPTI_INIT_LIST_TYPE.
1140 (struct lang_type_class): Add has_list_ctor bitfield.
1141 (TYPE_HAS_LIST_CTOR): New macro.
1142 (BRACE_ENCLOSED_INITIALIZER_P): Expect init_list_type_node.
1143 (CONSTRUCTOR_IS_DIRECT_INIT): New macro.
1144 (LOOKUP_NO_NARROWING): New macro.
1145 (LOOKUP_NO_COPY_CTOR_CONVERSION): New macro.
1146 * parser.c (cp_parse_braced_list): Split out from...
1147 (cp_parser_initializer_clause): ...here.
1148 (cp_parser_postfix_expression): Build up CONSTRUCTOR for compound
1150 (cp_lexer_next_token_is_not_keyword): New fn.
1151 (cp_parser_parenthesized_expression_list): Handle { }.
1152 (cp_parser_new_expression, cp_parser_new_initializer): Likewise.
1153 (cp_parser_assignment_expression, cp_parser_condition): Likewise.
1154 (cp_parser_jump_statement, cp_parser_simple_declaration): Likewise.
1155 (cp_parser_mem_initializer, cp_parser_init_declarator): Likewise.
1156 (cp_parser_initializer, cp_parser_functional_cast): Likewise.
1157 (cp_parser_omp_for_loop, cp_parser_cache_group): Likewise.
1158 (cp_parser_save_member_function_body): Likewise.
1159 * call.c (conversion_kind): Add ck_list, ck_aggr.
1160 (struct conversion): Add check_narrowing bitfield, conversion list.
1161 (build_list_conv): New fn.
1162 (build_aggr_conv): New fn.
1163 (implicit_conversion): Call them.
1164 (standard_conversion): Set check_narrowing if appropriate.
1165 (add_function_candidate): Handle LOOKUP_NO_COPY_CTOR_CONVERSION.
1166 (build_user_type_conversion_1): When converting from an init list,
1167 we allow additional conversions except when calling a copy ctor.
1168 (convert_like_real): Calling an explicit ctor for an init list is
1169 ill-formed. Handle ck_list and ck_addr. Check narrowing.
1170 (build_new_method_call): If CONSTRUCTOR_IS_DIRECT_INIT is set and
1171 class doesn't have a list ctor, break the {} into a TREE_LIST.
1172 (compare_ics): ck_list is better than other UDCs.
1173 (set_up_extended_ref_temp): Split out from initialize_reference.
1174 (is_std_init_list): New fn.
1175 (is_list_ctor): New fn.
1176 * decl.c (cxx_init_decl_processing): Create init_list_type_node.
1177 (reshape_init_array_1): Pass it to build_constructor.
1178 (reshape_init_class): Ditto.
1179 (initialize_artificial_var): Pass the appropriate type.
1180 (build_aggr_init_full_exprs): Split out from...
1181 (check_initializer): ...here. Handle new semantics.
1182 (build_init_list_var_init): New subroutine of check_initializer.
1183 (grokdeclarator): Converting constructors can have more than one parm.
1184 (grok_special_member_properties): Set TYPE_HAS_LIST_CTOR.
1185 * init.c (expand_default_init): Only do digest_init for aggregates.
1186 * rtti.c (tinfo_base_init): Pass init_list_type_node to
1187 build_constructor_from_list.
1188 (generic_initializer, ptr_initializer): Ditto.
1189 (ptm_initializer, class_initializer): Ditto.
1190 (get_pseudo_ti_init): Ditto.
1191 * error.c (dump_type): Handle init_list_type_node.
1192 (maybe_warn_cpp0x): New fn.
1193 (maybe_varn_variadic_templates): Call it.
1194 * cvt.c (ocp_convert): Handle conversion from { }.
1195 * tree.c (build_array_of_n_type): New fn.
1196 * typeck2.c (store_init_value): Use init_list_type_node.
1197 (digest_init): Likewise.
1198 (check_narrowing): New fn.
1199 * semantics.c: (finish_compound_literal): Take CONSTRUCTOR instead
1200 of vector of constructor elts. Handle non-aggregate types. Make
1201 constant literals static.
1202 * pt.c: (tsubst_copy_and_build): Adjust.
1203 (unify): Handle { }.
1204 * name-lookup.c (arg_assoc_type): Handle init_list_type_node.
1206 2008-07-01 Daniel Jacobowitz <dan@codesourcery.com>
1208 * typeck.c (comp_ptr_ttypes_real): Use vector_targets_convertible_p.
1209 (comp_ptr_ttypes_const): Likewise.
1211 2008-07-01 Andrew Haley <aph@redhat.com>
1213 * decl.c (finish_constructor_body): Don't set the return value of
1214 the constructor if the constructor is that of a Java type.
1216 2008-06-30 Jakub Jelinek <jakub@redhat.com>
1219 * decl2.c (is_late_template_attribute): If the first attribute
1220 argument is IDENTIFIER_NODE, don't consider it when checking
1221 if arguments are value or type dependent.
1223 2008-06-29 Paolo Carlini <paolo.carlini@oracle.com>
1226 * pt.c (do_type_instantiation): In c++0x mode do not warn for
1229 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1231 * Make-lang.in (cp-warn): Delete $(CXX_COMPAT_WARN).
1233 2008-06-28 Jakub Jelinek <jakub@redhat.com>
1236 * repo.c (repo_emit_p): Put const static data members initialized
1237 by const expr into *.rpo file, just return 2 if IDENTIFIER_REPO_CHOSEN
1240 2008-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1243 * pt.c (do_decl_instantiation): In c++0x mode do not warn for
1246 2008-06-24 Jonathan Wakely <jwakely.gcc@gmail.com>
1249 * typeck.c (cp_build_function_call): Show example syntax in
1252 2008-06-21 Jonathan Wakely <jwakely.gcc@gmail.com>
1254 * typeck.c (composite_pointer_type_r, cxx_sizeof_expr,
1255 cxx_alignof_expr, check_template_keyword, cp_build_binary_op,
1256 pointer_diff, cp_build_unary_op, build_x_compound_expr_from_list,
1257 build_reinterpret_cast_1, cp_build_c_cast, check_return_expr): Change
1258 pedwarn to permerror.
1259 * init.c (perform_member_init, build_new_1, build_new): Likewise.
1260 * decl.c (warn_extern_redeclared_static, duplicate_decls,
1261 * identify_goto, check_previous_goto_1, check_goto, define_label,
1262 check_tag_decl, start_decl, check_class_member_definition_namespace,
1263 grokfndecl, grokdeclarator): Likewise.
1264 * except.c (check_handlers): Likewise.
1265 * typeck2.c (digest_init): Likewise.
1266 * pt.c (check_specialization_namespace,
1267 check_explicit_instantiation_namespace,
1268 maybe_process_partial_specialization, check_explicit_specialization,
1269 convert_template_argument, do_decl_instantiation,
1270 do_type_instantiation, instantiate_decl): Likewise.
1271 * semantics.c (finish_template_type_parm): Likewise.
1272 * name-lookup.c (pushdecl_maybe_friend,
1273 check_for_out_of_scope_variable): Likewise.
1274 * decl2.c (finish_static_data_member_decl, build_anon_union_vars,
1275 coerce_new_type): Likewise.
1276 * parser.c (cp_parser_nested_name_specifier_opt,
1277 cp_parser_mem_initializer, cp_parser_elaborated_type_specifier,
1278 cp_parser_class_head, cp_parser_check_class_key): Likewise.
1279 (cp_parser_parameter_declaration): Check flag_permissive instead of
1280 flag_pedantic_errors.
1281 * call.c (joust): Change pedwarn to warning.
1282 * friend.c (make_friend_class): Likewise.
1284 2008-06-16 Jan Hubicka <jh@suse.cz>
1286 * method.c: Include cgraph.h.
1287 (use_thunk): Use cgraph_add_new_function instead of calling backend
1290 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1292 * parser.c: Fix comment typo.
1294 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1297 * decl2.c (grokbitfield): Receive the list of attributes, pass it to
1298 grokdeclarator and apply it to the created declaration.
1299 * cp-tree.h (grokbitfield): Update prototype.
1300 * parser.c (cp_parser_member_declaration): Don't apply the attributes
1301 since they are now applied in grokbitfield. Adjusted the call to
1303 (cp_parser_objc_class_ivars): Likewise.
1305 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1308 * class.c (type_requires_array_cookie): Do not consider delete[]
1309 operators with an ellipsis as second argument.
1311 2008-06-09 Jakub Jelinek <jakub@redhat.com>
1314 * semantics.c (stmt_expr_value_expr): Don't crash on empty
1317 2008-06-08 Paolo Carlini <paolo.carlini@oracle.com>
1320 * pt.c (maybe_process_partial_specialization): Check the tree
1321 returned by push_template_decl for error_mark_node.
1322 * parser.c (cp_parser_class_head): Likewise, check the tree
1323 returned by the latter.
1325 2008-06-07 Paolo Carlini <paolo.carlini@oracle.com>
1328 * decl.c (grokdeclarator): In case of wrong return type return
1329 immediately error_mark_node.
1331 2008-06-06 Jakub Jelinek <jakub@redhat.com>
1333 * cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
1334 dependent_omp_for_p, begin_omp_task, finish_omp_task,
1335 finish_omp_taskwait): New prototypes.
1336 (cxx_omp_clause_default_ctor): Add outer argument.
1337 (finish_omp_for): Add new clauses argument.
1338 * cp-gimplify.c (cxx_omp_finish_clause): New function.
1339 (cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
1340 (cxx_omp_clause_default_ctor): Add outer argument.
1341 (cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
1342 * cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
1343 * parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
1344 Add par_clauses argument. If decl is present in parallel's
1345 lastprivate clause, change that clause to shared and add
1346 a lastprivate clause for decl to OMP_FOR_CLAUSES.
1347 Fix wording of error messages. Adjust finish_omp_for caller.
1348 Add clauses argument. Parse loops with random access iterators.
1349 (cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
1351 (cp_parser_omp_for, cp_parser_omp_parallel): Adjust
1352 cp_parser_omp_for_loop callers.
1353 (cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
1355 (cp_parser_omp_clause_name): Handle collapse and untied
1357 (cp_parser_omp_clause_schedule): Handle auto schedule.
1358 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
1359 and PRAGMA_OMP_CLAUSE_UNTIED.
1360 (OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
1361 (OMP_TASK_CLAUSE_MASK): Define.
1362 (cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
1363 (cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
1364 (cp_parser_pragma): Handle PRAGMA_OMP_TASK and
1365 PRAGMA_OMP_TASKWAIT.
1366 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
1367 OMP_CLAUSE_UNTIED. Handle OMP_CLAUSE_LASTPRIVATE_STMT.
1368 (tsubst_omp_for_iterator): New function.
1369 (dependent_omp_for_p): New function.
1370 (tsubst_expr) <case OMP_FOR>: Use it. Handle collapsed OMP_FOR
1371 loops. Adjust finish_omp_for caller. Handle loops with random
1372 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR} changes.
1373 (tsubst_expr): Handle OMP_TASK.
1374 * semantics.c (cxx_omp_create_clause_info): New function.
1375 (finish_omp_clauses): Call it. Handle OMP_CLAUSE_UNTIED and
1376 OMP_CLAUSE_COLLAPSE.
1377 (cxx_omp_predetermined_sharing): Removed.
1378 * semantics.c (finish_omp_for): Allow pointer iterators. Use
1379 handle_omp_for_class_iterator and dependent_omp_for_p. Handle
1380 collapsed for loops. Adjust c_finish_omp_for caller. Add new
1381 clauses argument. Fix check for type dependent cond or incr.
1382 Set OMP_FOR_CLAUSES to clauses. Use cp_convert instead of
1383 fold_convert to convert incr amount to difference_type. Only
1384 fold if not in template. If decl is mentioned in lastprivate
1385 clause, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle loops with random
1386 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR}
1388 (finish_omp_threadprivate): Allow static class members of the
1390 (handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
1391 finish_omp_taskwait): New functions.
1393 * parser.c (cp_parser_binary_expression): Add prec argument.
1394 (cp_parser_assignment_expression): Adjust caller.
1395 * cp-tree.h (outer_curly_brace_block): New prototype.
1396 * decl.c (outer_curly_brace_block): No longer static.
1398 2008-06-02 Paolo Carlini <paolo.carlini@oracle.com>
1401 * pt.c (push_template_decl_real): Consistently return error_mark_node
1404 2008-06-02 Tomas Bily <tbily@suse.cz>
1406 * typeck.c (is_bitfield_expr_with_lowered_type): Use CASE_CONVERT.
1407 (cp_build_unary_op): Likewise.
1408 (cp_build_indirect_ref): Use CONVERT_EXPR_P.
1409 (maybe_warn_about_returning_address_of_local): Likewise.
1411 2008-05-29 Paolo Carlini <paolo.carlini@oracle.com>
1414 * pt.c (tsubst_initializer_list): Consistently check the tree
1415 returned by tsubst_pack_expansion for error_mark_node.
1417 2008-05-27 Michael Matz <matz@suse.de>
1420 * call.c (build_new_op): Make warning conditional on
1423 2008-05-27 Alexandre Oliva <aoliva@redhat.com>
1426 * call.c (convert_like_real): Convert bitfield to desired type
1427 before creating temporary.
1429 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
1431 * Makefile.in: Adjusted dependencies on c-incpath.o.
1433 2008-05-23 Jakub Jelinek <jakub@redhat.com>
1436 * cp-gimplify.c (cxx_omp_clause_apply_fn): Call
1437 fold_build_cleanup_point_expr on build_call_a results.
1440 * semantics.c (omp_clause_info_fndecl): New function.
1441 (finish_omp_clauses): Use it.
1443 2008-05-21 Jakub Jelinek <jakub@redhat.com>
1446 * cp-tree.h (check_array_initializer): New prototype.
1447 * decl.c (check_array_initializer): New function.
1448 (check_initializer): Call it.
1449 * semantics.c (finish_compound_literal): Call it for ARRAY_TYPEs.
1451 2008-05-21 Tom Tromey <tromey@redhat.com>
1453 * mangle.c (save_partially_mangled_name): Remove.
1454 (restore_partially_mangled_name): Likewise.
1455 (write_encoding): Update.
1456 (write_unqualified_name): Likewise.
1457 (start_mangling): Always use name_obstack. Remove 'ident_p'
1459 (get_identifier_nocopy): Remove.
1460 (finish_mangling_internal): Rename from finish_mangling.
1461 (finish_mangling): New function.
1462 (finish_mangling_get_identifier): Likewise.
1463 (partially_mangled_name, partially_mangled_name_len): Remove.
1464 (mangle_decl_string): Change return type. Update.
1465 (mangle_decl, mangle_type_string, mangle_special_for_type,
1466 mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
1467 mangle_ref_init_variable): Update.
1469 2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
1472 * semantics.c (begin_class_definition): Extend checks on the first
1475 2008-05-12 Tomas Bily <tbily@suse.cz>
1477 * typeck2.c (digest_init): Use CONVERT_EXPR_P.
1478 * call.c (build_over_call): Likewise.
1479 * error.c (dump_expr): Use CASE_CONVERT.
1480 * class.c (fixed_type_or_null): Likewise.
1482 2008-05-11 Volker Reichelt <v.reichelt@netcologne.de>
1484 * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
1486 (cp_parser_omp_clause_schedule): Remove superfluous "expected"
1489 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
1491 * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
1492 DECL_LOOPING_CONST_OR_PURE_P attributes.
1493 * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
1496 2008-05-02 Simon Baldwin <simonb@google.com>
1499 * typeck.c (build_array_ref): Remove warn_array_subscript_range.
1501 2008-05-01 Simon Baldwin <simonb@google.com>
1503 * typeck.c (build_array_ref): Call warn_array_subscript_range.
1505 2008-04-30 Jakub Jelinek <jakub@redhat.com>
1508 * pt.c (more_specialized_fn): Stop the loop even if there are no
1509 arguments before ellipsis.
1511 2008-04-29 Jakub Jelinek <jakub@redhat.com>
1514 * parser.c (cp_parser_lookup_name): Look through single function
1518 * typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
1519 COMPOUND_EXPR if the second argument would be error_mark_node.
1521 2008-04-28 Jason Merrill <jason@redhat.com>
1522 Liu Guanwei <liu_gw@163.com>
1525 * parser.c (cp_parser_parameter_declaration): Handle < ambiguity
1526 in default arguments.
1528 2008-04-25 Jan Hubicka <jh@suse.cz>
1530 * typeck.c (check_return_expr): Update.
1531 * decl.c (start_preparsed_function): Update.
1532 * method.c (use_thunk): Update.
1534 2008-04-24 Jakub Jelinek <jakub@redhat.com>
1537 * cp-tree.h (cp_reconstruct_complex_type): New prototype.
1538 * cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
1539 * decl2.c (is_late_template_attribute): Only make vector_size
1540 late tmpl attribute if argument is type or value dependent.
1541 (cp_reconstruct_complex_type): New function.
1543 2008-04-24 Richard Guenther <rguenther@suse.de>
1545 * typeck.c (cp_build_function_call): Call
1546 check_builtin_function_arguments.
1548 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1550 * typeck.c (get_member_function_from_ptrfunc): Don't set TREE_INVARIANT.
1551 (build_ptrmemfunc1): Don't set TREE_INVARIANT.
1552 * init.c (build_zero_init): Don't set TREE_INVARIANT.
1553 * class.c (build_base_path): Don't set TREE_INVARIANT.
1554 (build_vtbl_ref_1): Don't set TREE_INVARIANT.
1555 (build_vtbl_initializer): Don't set TREE_INVARIANT.
1556 * decl.c (build_enumerator): Don't set TREE_INVARIANT.
1557 * rtti.c (tinfo_base_init): Don't set TREE_INVARIANT.
1558 (generic_initializer): Don't set TREE_INVARIANT.
1559 (ptr_initializer): Don't set TREE_INVARIANT.
1560 (ptm_initializer): Don't set TREE_INVARIANT.
1561 (class_initializer): Don't set TREE_INVARIANT.
1562 * typeck2.c (process_init_constructor): Don't set TREE_INVARIANT.
1563 * pt.c (push_inline_template_parms_recursive): Don't set TREE_INVARIANT.
1564 (build_template_parm_index): Don't set TREE_INVARIANT.
1565 (reduce_template_parm_level): Don't set TREE_INVARIANT.
1566 (process_template_parm): Don't set TREE_INVARIANT.
1568 2008-04-22 Jason Merrill <jason@redhat.com>
1571 * semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
1572 to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
1573 * typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
1575 2008-04-22 Jakub Jelinek <jakub@redhat.com>
1578 * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
1579 expression is errorneous.
1581 2008-04-21 Jason Merrill <jason@redhat.com>
1584 * tree.c (cp_tree_equal): Handle FIXED_CST.
1587 * pt.c (template_template_parm_bindings_ok_p): Set
1588 processing_template_decl while in this function.
1590 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
1592 * cvt.c (type_promotes_to): Support char16_t and char32_t.
1593 * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
1594 char16_t and char32_t.
1595 * lex.c (reswords): Add char16_t and char32_t (for c++0x).
1596 * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
1597 extended builtin type "u8char{16,32}_t".
1598 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
1600 (cp_lexer_print_token): Support CPP_STRING{16,32}.
1601 (cp_parser_is_string_literal): Idem.
1602 (cp_parser_string_literal): Idem.
1603 (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
1605 (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}.
1606 * tree.c (char_type_p): Support char16_t and char32_t as char types.
1607 * typeck.c (string_conv_p): Support char16_t and char32_t.
1609 2008-04-17 Jason Merrill <jason@redhat.com>
1612 * call.c (build_user_type_conversion_1): Represent second step of
1613 copy-init with an rvalue conversion.
1614 (convert_like_real) [ck_user]: Don't implicitly add it here.
1616 2008-04-15 Jakub Jelinek <jakub@redhat.com>
1619 * decl.c (layout_var_decl): If extern or static var has variable
1620 size, set TREE_TYPE (decl) to error_mark_node.
1622 2008-04-16 Danny Smith <dannysmith@users.sourceforge.net>
1625 * optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
1628 2008-04-09 Jason Merrill <jason@redhat.com>
1631 * semantics.c (finish_compound_literal): Return a TARGET_EXPR,
1632 not a pushed variable.
1634 2008-04-09 Volker Reichelt <v.reichelt@netcologne.de>
1636 * call.c (build_op_delete_call): Fix quotation in warning message.
1637 * decl.c (grokdeclarator): Quote keyword in error message.
1638 * pt.c (check_for_bare_parameter_packs): Fix quotation in error
1641 * parser.c (cp_parser_check_type_definition): Print error string
1642 directly rather than using "%s".
1643 (cp_parser_postfix_expression): Fix quotation.
1644 (cp_parser_decltype): Likewise.
1645 (cp_parser_sizeof_operand): Fix quotation. Simplify.
1647 * parser.c (cp_parser_non_integral_constant_expression): Build error
1648 message with CONCAT rather than using "%s".
1649 (cp_parser_primary_expression): Fix quotation.
1650 (cp_parser_postfix_expression): Likewise.
1651 (cp_parser_postfix_dot_deref_expression): Likewise.
1652 (cp_parser_unary_expression): Likewise.
1653 (cp_parser_new_expression): Likewise.
1654 (cp_parser_delete_expression): Likewise.
1656 * parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
1657 as `)', not as `('. Fix quotation.
1658 (cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
1659 (cp_parser_primary_expression): Likewise.
1660 (cp_parser_nested_name_specifier_opt): Likewise.
1661 (cp_parser_postfix_expression): Likewise.
1662 (cp_parser_postfix_open_square_expression): Likewise.
1663 (cp_parser_parenthesized_expression_list): Likewise.
1664 (cp_parser_pseudo_destructor_name): Likewise.
1665 (cp_parser_new_expression): Likewise.
1666 (cp_parser_direct_new_declarator): Likewise.
1667 (cp_parser_delete_expression): Likewise.
1668 (cp_parser_cast_expression): Likewise.
1669 (cp_parser_question_colon_clause): Likewise.
1670 (cp_parser_builtin_offsetof): Likewise.
1671 (cp_parser_trait_expr): Likewise.
1672 (cp_parser_label_for_labeled_statement): Likewise.
1673 (cp_parser_compound_statement): Likewise.
1674 (cp_parser_selection_statement): Likewise.
1675 (cp_parser_condition): Likewise.
1676 (cp_parser_iteration_statement): Likewise.
1677 (cp_parser_already_scoped_statement): Likewise.
1678 (cp_parser_simple_declaration): Likewise.
1679 (cp_parser_linkage_specification): Likewise.
1680 (cp_parser_static_assert): Likewise.
1681 (cp_parser_decltype): Likewise.
1682 (cp_parser_conversion_function_id): Likewise.
1683 (cp_parser_operator_function_id): Likewise.
1684 (cp_parser_operator): Likewise.
1685 (cp_parser_type_parameter): Likewise.
1686 (cp_parser_template_id): Likewise.
1687 (cp_parser_explicit_instantiation): Likewise.
1688 (cp_parser_explicit_specialization): Likewise.
1689 (cp_parser_enum_specifier): Likewise.
1690 (cp_parser_namespace_definition): Likewise.
1691 (cp_parser_namespace_alias_definition): Likewise.
1692 (cp_parser_using_declaration): Likewise.
1693 (cp_parser_using_directive): Likewise.
1694 (cp_parser_asm_definition): Likewise.
1695 (cp_parser_direct_declarator): Likewise.
1696 (cp_parser_ptr_operator): Likewise.
1697 (cp_parser_parameter_declaration_clause): Likewise.
1698 (cp_parser_initializer_clause): Likewise.
1699 (cp_parser_class_specifier): Likewise.
1700 (cp_parser_member_specification_opt): Likewise.
1701 (cp_parser_member_declaration): Likewise.
1702 (cp_parser_pure_specifier): Likewise.
1703 (cp_parser_constant_initializer): Likewise.
1704 (cp_parser_base_clause): Likewise.
1705 (cp_parser_exception_specification_opt): Likewise.
1706 (cp_parser_try_block): Likewise.
1707 (cp_parser_function_try_block): Likewise.
1708 (cp_parser_handler): Likewise.
1709 (cp_parser_throw_expression): Likewise.
1710 (cp_parser_asm_operand_list): Likewise.
1711 (cp_parser_attributes_opt): Likewise.
1712 (cp_parser_label_declaration): Likewise.
1713 (cp_parser_constructor_declarator_p): Likewise.
1714 (cp_parser_template_declaration_after_export): Likewise.
1715 (cp_parser_single_declaration): Likewise.
1716 (cp_parser_objc_message_expression): Likewise.
1717 (cp_parser_objc_message_args): Likewise.
1718 (cp_parser_objc_encode_expression): Likewise.
1719 (cp_parser_objc_defs_expression): Likewise.
1720 (cp_parser_objc_protocol_expression): Likewise.
1721 (cp_parser_objc_selector_expression): Likewise.
1722 (cp_parser_objc_protocol_refs_opt): Likewise.
1723 (cp_parser_objc_typename): Likewise.
1724 (cp_parser_objc_method_keyword_params): Likewise.
1725 (cp_parser_objc_superclass_or_category): Likewise.
1726 (cp_parser_objc_try_catch_finally_statement): Likewise.
1727 (cp_parser_objc_synchronized_statement): Likewise.
1728 (cp_parser_objc_throw_statement): Likewise.
1729 (cp_parser_omp_var_list_no_open): Likewise.
1730 (cp_parser_omp_clause_default): Likewise.
1731 (cp_parser_omp_clause_if): Likewise.
1732 (cp_parser_omp_clause_num_threads): Likewise.
1733 (cp_parser_omp_clause_reduction): Likewise.
1734 (cp_parser_omp_clause_schedule): Likewise.
1735 (cp_parser_omp_critical): Likewise.
1736 (cp_parser_omp_for_loop): Likewise.
1737 (cp_parser_omp_sections_scope): Likewise.
1739 * parser.c (cp_parser_template_parameter_list): Simplify.
1741 2008-04-07 James E. Wilson <wilson@tuliptree.org>
1743 * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
1745 2008-04-07 Jason Merrill <jason@redhat.com>
1748 * class.c (type_has_user_nondefault_constructor): A template
1749 counts as a nondefault constructor.
1751 2008-04-04 Paolo Bonzini <bonzini@gnu.org>
1753 * decl.c (cxx_push_function_context): Delete.
1754 (cxx_pop_function_context): Delete.
1755 (start_preparsed_function): Merge cxx_push_function_context (!f->decl
1757 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_INIT,
1758 LANG_HOOKS_FUNCTION_FINAL): Delete.
1759 (LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): Rename to
1760 LANG_HOOKS_MISSING_NORETURN_OK_P.
1761 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context):
1763 * semantics.c (current_stmt_tree): Fix comment.
1765 2008-04-03 Jakub Jelinek <jakub@redhat.com>
1768 * semantics.c (finish_offsetof): Undo effect of convert_from_reference
1769 before calling fold_offsetof.
1771 2008-04-03 Tom Tromey <tromey@redhat.com>
1773 * Make-lang.in (c++_OBJS): New variable.
1775 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1777 * optimize.c (clone_body): New, from tree-inline.c.
1779 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1781 * method.c (synthesize_method): Use {push,pop}_function_context.
1782 * name-lookup.c (push_to_top_level): Likewise.
1783 * parser.c (cp_parser_late_parsing_for_member): Likewise.
1785 2008-03-30 Volker Reichelt <v.reichelt@netcologne.de>
1788 * parser.c (cp_parser_decl_specifier_seq): Add location to error
1791 2008-03-27 Tom Tromey <tromey@redhat.com>
1793 * Make-lang.in: Revert automatic dependency patch.
1795 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
1798 * typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
1799 (build_compound_expr): New, for compatibility with C
1800 build_compound_expr.
1801 (cp_build_compound_expr): Renamed from build_compound_expr.
1802 (build_c_cast): New, for compatibility with C build_c_cast.
1803 (cp_build_c_cast): Renamed from build_c_cast.
1804 * init.c (build_vec_delete_1): Fix calls to build_compound_expr.
1805 * decl.c (cxx_maybe_build_cleanup): Ditto.
1806 * cp-tree.h (build_compound_expr): Add C-compatibile prototype.
1807 (cp_build_compound_expr): Renamed from build_compound_expr.
1808 (build_c_cast): Add C-compatible prototype.
1809 (cp_build_c_cast): Renamed from build_c_cast.
1810 * typeck2.c (build_functional_cast): Use cp_build_c_cast.
1811 * parser.c (cp_parser_cast_expression): Fix call to build_c_cast.
1813 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
1815 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Cope with
1816 tsubst_pack_expansion returning a pack expansion, or a TREE_VEC
1817 ending in a pack expansion, both of which can occur when
1818 substituting into a nested template.
1819 (tsubst_copy_and_build) <case SIZEOF_EXPR>: When we're
1820 instantiating the sizeof...(X) form, make tsubst_copy do the work.
1821 * parser.c (cp_parser_template_parameter): Deal with unnamed
1822 non-type template parameter packs identified by pack expansions in
1825 2008-03-26 Jakub Jelinek <jakub@redhat.com>
1828 * pt.c (apply_late_template_attributes): Don't call tsubst on
1829 first attribute argument if it is IDENTIFIER_NODE.
1832 * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
1833 and LTGT_EXPR to pp_expression.
1835 2008-03-26 Douglas Gregor <doug.gregor@gmail.com>
1837 * pt.c (coerce_template_template_parm): Moved the body of the loop
1838 of coerce_template_template_parms here, to make iteration over a
1839 template argument pack simpler.
1840 Also, allow matching of a template parameter pack in the template
1841 template parameter to a template parameter in the template
1843 (coerce_template_template_parms): Deal with variadic template
1844 template parameters. Use coerce_template_template_parm.
1845 (unify): Make sure we coerce the template template argument's
1846 template arguments to the template template parameter's template
1847 parameters, not the other way around.
1849 2008-03-25 Tom Tromey <tromey@redhat.com>
1851 * Make-lang.in: Remove .o targets.
1852 (cp/g++spec.o): Moved to cp/. Reduce to variable setting.
1854 (c++_OBJS): New variable.
1855 (CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
1857 2008-03-25 Douglas Gregor <doug.gregor@gmail.com>
1859 * typeck.c (composite_pointer_type_r): Add SFINAE support.
1860 (composite_pointer_type): Ditto.
1861 (common_type): Fix call to composite_pointer_type.
1862 (cxx_sizeof_nowarn): New; used to be a macro.
1863 (cxx_sizeof_expr): Add SFINAE support.
1864 (cxx_alignof_expr): Ditto.
1865 (decay_conversion): Fix calls for SFINAE support.
1866 (rationalize_conditional_expr): Add SFINAE support.
1867 (build_class_member_access_expr): Ditto.
1868 (finish_class_member_access_expr): Ditto.
1869 (build_x_indirect_ref): Ditto.
1870 (build_indirect_ref): Original version renamed to
1871 cp_build_indirect_ref; new version provides a bridge from
1873 (cp_build_indirect_ref): Was build_indirect_ref; added SFINAE
1875 (get_member_function_from_ptrfunc): Fix calls for SFINAE support.
1876 (build_function_call): Original version renamed to
1877 cp_build_function_call; new version provides a bridge from
1879 (cp_build_function_call): Was build_function_call; added SFINAE
1881 (convert_arguments): Add SFINAE support.
1882 (build_x_binary_op): Ditto.
1883 (build_binary_op): Original version renamed to cp_build_binary_op;
1884 new version provides a bridge from c-common.
1885 (cp_build_binary_op): Was build_binary_op; added SFINAE support.
1886 (pointer_diff): Fix calls for SFINAE.
1887 (build_x_unary_op): Add SFINAE support.
1888 (condition_conversion): Fix calls for SFINAE.
1889 (build_unary_op): Original version renamed to cp_build_unary_op;
1890 new version provides a bridge from c-common.
1891 (cp_build_unary_op): Was build_unary_op; added SFINAE support.
1892 (unary_complex_lvalue): Fix calls for SFINAE.
1893 (build_x_conditional_expr): Add SFINAE support.
1894 (build_x_compound_expr_from_list): Fix calls for SFINAE.
1895 (build_x_compound_expr): Add SFINAE support.
1896 (convert_ptrmem): Fix calls for SFINAE.
1897 (build_static_cast_1): Add SFINAE support.
1898 (build_static_cast): Ditto.
1899 (build_reinterpret_cast_1): Ditto.
1900 (build_reinterpret_cast): Ditto.
1901 (build_const_cast_1): Ditto.
1902 (build_const_cast): Ditto.
1903 (build_c_cast): Ditto.
1904 (build_modify_expr): Original version renamed to
1905 cp_build_modify_expr; new version provides a bridge from c-common.
1906 (cp_build_modify_expr): Was build_modify_expr; added SFINAE
1908 (build_x_modify_expr): Add SFINAE support.
1909 (build_ptrmemfunc): Fix calls for SFINAE.
1910 (convert_for_assignment): Add SFINAE support.
1911 (convert_for_initialization): Ditto.
1912 (check_return_expr): Fix calls for SFINAE.
1913 (lvalue_or_else): Add SFINAE support.
1914 * init.c (perform_member_init): Fix calls for SFINAE.
1915 (emit_mem_initializers): Ditto.
1916 (expand_virtual_init): Ditto.
1917 (expand_cleanup_for_base): Ditto.
1918 (build_aggr_init): Add SFINAE support.
1919 (expand_default_init): Ditto.
1920 (expand_aggr_init_1): Fix calls for SFINAE.
1921 (build_offset_ref): Ditto.
1922 (build_new_1): Add SFINAE support.
1924 (build_vec_delete_1): Fix calls for SFINAE.
1925 (get_temp_regvar): Ditto.
1926 (build_vec_init): Add SFINAE support.
1927 (build_dtor_call): Fix calls for SFINAE.
1928 (build_delete): Ditto.
1929 (push_base_cleanups): Ditto.
1930 (build_vec_delete_1): Ditto.
1931 * class.c (build_base_path): Fix calls for SFINAE.
1932 (build_simple_base_path): Ditto.
1933 (convert_to_base_statically): Ditto.
1934 (build_vfn_ref): Ditto.
1935 (resolve_address_of_overloaded_function): Ditto.
1936 * decl.c (check_initializer): Fix calls for SFINAE.
1937 (register_dtor_fn): Ditto.
1938 (compute_array_index_type): Ditto.
1939 (finish_enum): Ditto.
1940 (start_preparsed_function): Ditto.
1941 (cxx_maybe_build_cleanup): Ditto.
1942 * call.c (convert_like): Add COMPLAIN argument.
1943 (convert_like_with_context): Ditto.
1944 (build_this): Fix calls for SFINAE.
1945 (build_user_type_conversion): Ditto.
1946 (resolve_args): Ditto.
1947 (build_new_function_call): Add SFINAE support.
1948 (build_operator_new_call): Fix calls for SFINAE.
1949 (build_object_call): Add SFINAE support.
1950 (build_conditional_expr): Ditto.
1951 (build_new_op): Ditto.
1952 (build_op_delete_call): Fix calls for SFINAE.
1953 (build_temp): Ditto.
1954 (convert_like_real): Add SFINAE support.
1955 (build_x_va_arg): Fix calls for SFINAE.
1956 (convert_default_arg): Ditto.
1957 (build_over_call): Add SFINAE support.
1958 (build_java_interface_fn_ref): Fix calls for SFINAE.
1959 (build_special_member_call): Add SFINAE support.
1960 (build_new_method_call): Ditto.
1961 (perform_implicit_conversion): Ditto.
1962 (perform_direct_initialization_if_possible): Ditto.
1963 (initialize_reference): Fix calls for SFINAE.
1964 * method.c (do_build_assign_ref): Fix calls for SFINAE.
1965 * rtti.c (build_headof): Fix calls for SFINAE.
1966 (get_tinfo_decl_dynamic): Ditto.
1967 (get_typeid): Ditto.
1968 (build_dynamic_cast_1): Add SFINAE support.
1969 (build_dynamic_cast): Ditto.
1970 (tinfo_base_init): Fix calls for SFINAE.
1971 * except.c (do_get_exception_ptr): Fix calls for SFINAE.
1972 (do_end_catch): Ditto.
1973 (initialize_handler_parm): Ditto.
1974 (expand_start_catch_block): Ditto.
1975 (do_allocate_exception): Ditto.
1976 (do_free_exception): Ditto.
1977 (build_throw): Ditto.
1978 * cvt.c (build_up_reference): Fix calls for SFINAE.
1979 (convert_to_reference): Ditto.
1980 (ocp_convert): Ditto.
1981 (convert_to_void): Add SFINAE support.
1982 * tree.c (build_dummy_object): Fix calls for SFINAE.
1983 (stabilize_expr): Ditto.
1984 * cp-tree.h (build_conditional_expr): Add tsubst_flags_t
1986 (build_new_method_call): Ditto.
1987 (build_special_member_call): Ditto.
1988 (build_new_op): Ditto.
1989 (perform_implicit_conversion): Ditto.
1990 (perform_direct_initialization_if_possible): Ditto.
1991 (convert_to_void): Ditto.
1992 (build_aggr_init): Ditto.
1994 (build_vec_init): Ditto.
1995 (build_dynamic_cast): Ditto.
1996 (finish_call_expr): Ditto
1997 (cxx_sizeof_or_alignof_expr): Add COMPLAIN parameter.
1998 (cxx_sizeof_nowarn): Remove macro; add function declaration.
1999 (build_class_member_access_expr): Add tsubst_flags_t parameter.
2000 (finish_class_member_access_expr): Ditto.
2001 (build_x_indirect_ref): Ditto.
2002 (cp_build_indirect_ref): New.
2003 (cp_build_function_call): Add tsubst_flags_t parameter.
2004 (build_x_unary_op): Ditto.
2005 (cp_build_unary_op): New.
2006 (build_x_conditional_expr): Add tsubst_flags_t parameter.
2007 (build_x_compound_expr): Ditto.
2008 (build_compound_expr): Ditto.
2009 (build_static_cast): Ditto.
2010 (build_reinterpret_cast): Ditto.
2011 (build_const_cast): Ditto.
2012 (build_c_cast): Ditto.
2013 (build_x_modify_expr): Ditto.
2014 (cp_build_modify_expr): New.
2015 (convert_for_initialization): Add tsubst_flags_t parameter.
2016 (cp_build_binary_op): Remove macro; add function declaration.
2017 (invalid_nonstatic_memfn_p): Add tsubst_flags_t parameter.
2018 (lvalue_or_else): Ditto.
2019 (build_functional_cast): Ditto.
2020 * typeck2.c (digest_init): Fix calls for SFINAE.
2021 (process_init_constructor_array): Ditto.
2022 (process_init_constructor_record): Ditto.
2023 (build_x_arrow): Ditto.
2024 (build_m_component_ref): Ditto.
2025 (build_functional_cast): Add SFINAE support.
2026 * pt.c (tsubst_copy_and_build): Add (more) SFINAE support.
2027 * semantics.c (simplify_loop_decl_cond): Fix calls for SFINAE.
2028 (finish_expr_stmt): Ditto.
2029 (finish_for_expr): Ditto.
2030 (finish_asm_stmt): Ditto.
2031 (finish_non_static_data_member): Ditto.
2032 (finish_qualified_id_expr): Ditto.
2033 (finish_call_expr): Add SFINAE support.
2034 (finish_increment_expr): Fix calls for SFINAE.
2035 (finish_unary_op_expr): Ditto.
2036 (simplify_aggr_init_expr): Ditto.
2037 (finish_omp_clauses): Ditto.
2038 (finish_omp_for): Ditto.
2039 (finish_omp_barrier): Ditto.
2040 (finish_omo_flush): Ditto.
2041 * decl2.c (grok_array_decl): Fix calls or SFINAE.
2042 (build_anon_union_vars): Ditto.
2043 (get_guard_cond): Ditto.
2045 (one_static_initialization_or_destruction): Ditto.
2046 (do_static_initialization_or_destruction): Ditto.
2047 (generate_ctor_or_dtor_function): Ditto.
2048 (build_offset_ref_call_from_tree): Ditto.
2049 * parser.c (cp_parser_postfix_expression): Fix calls for SFINAE.
2050 (cp_parser_postfix_dot_deref_expression): Ditto.
2051 (cp_parser_unary_expression): Ditto.
2052 (cp_parser_new_expression): Ditto.
2053 (cp_parser_cast_expression): Ditto.
2054 (cp_parser_binary_expression): Ditto.
2055 (cp_parser_question_colon_clause): Ditto.
2056 (cp_parser_assignment_expression): Ditto.
2057 (cp_parser_expression): Ditto.
2058 (cp_parser_builtin_offsetof): Ditto.
2059 (cp_parser_template_argument): Ditto.
2060 (cp_parser_functional_cast): Ditto.
2062 2008-03-24 Tom Tromey <tromey@redhat.com>
2064 * lex.c (handle_pragma_interface): Don't copy the filename.
2065 (handle_pragma_implementation): Copy filename using xstrdup.
2067 2008-03-21 Paolo Carlini <pcarlini@suse.de>
2069 * cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
2070 (SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
2071 (IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
2072 (PROMOTES_TO_AGGR_TYPE): Remove.
2073 (CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
2074 * typeck.c (unary_complex_lvalue, build_modify_expr,
2075 convert_for_initialization): Adjust.
2076 * init.c (is_aggr_type): Remove.
2077 (is_class_type): Add.
2078 (build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
2079 build_delete): Adjust.
2080 * lex.c (make_aggr_type): Remove.
2081 (make_class_type): Add.
2082 (cxx_make_type): Adjust.
2083 * class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
2085 * decl.c (build_typename_type, make_typename_type,
2086 make_unbound_class_template, cxx_init_decl_processing,
2087 check_tag_decl, groktypename, start_decl_1, layout_var_decl,
2088 check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
2089 grok_op_properties, xref_tag, check_function_type): Adjust.
2090 * call.c (check_dtor_name, standard_conversion, implicit_conversion,
2091 add_builtin_candidate, add_builtin_candidates,
2092 build_user_type_conversion_1, convert_like_real, build_cxx_call,
2093 is_subseq, compare_ics): Adjust.
2094 * method.c (use_thunk): Adjust.
2095 * rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
2096 create_tinfo_types): Adjust.
2097 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
2098 build_up_reference, convert_to_reference, convert_from_reference,
2099 ocp_convert, build_expr_type_conversion): Adjust.
2100 * tree.c (bind_template_template_parm, error_type): Adjust.
2101 * dump.c (cp_dump_tree): Adjust.
2102 * search.c (lookup_member): Adjust.
2103 * friend.c (make_friend_class, do_friend): Adjust.
2104 * typeck2.c (store_init_value, process_init_constructor_array,
2105 process_init_constructor_record, build_x_arrow, build_m_component_ref,
2106 build_functional_cast): Adjust.
2107 * pt.c (finish_member_template_decl, process_template_parm,
2108 lookup_template_class, tsubst_function_type, tsubst,
2109 tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
2111 * semantics.c (begin_class_definition, finish_base_specifier,
2112 finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
2114 * name-lookup.c (constructor_name_p, push_overloaded_decl,
2115 do_class_using_decl, lookup_qualified_name,
2116 maybe_process_template_type_declaration): Adjust.
2117 * decl2.c (grok_array_decl, check_member_template,
2118 constrain_class_visibility): Adjust.
2119 * parser.c (cp_parser_class_name): Adjust.
2121 2008-03-18 Paolo Bonzini <bonzini@gnu.org>
2123 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
2125 2008-03-17 Jason Merrill <jason@redhat.com>
2128 * call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
2129 a temp directly to a reference as per DR391.
2131 2008-03-12 Richard Guenther <rguenther@suse.de>
2135 2008-02-04 Richard Guenther <rguenther@suse.de>
2138 * decl.c (record_builtin_java_type): Make jboolean a
2139 integer type again where its mode doesn't match that of bool.
2141 2008-01-25 Richard Guenther <rguenther@suse.de>
2144 * decl.c (record_builtin_java_type): Make __java_boolean
2146 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
2147 after TYPE_MAIN_VARIANT check.
2149 2008-03-10 Jakub Jelinek <jakub@redhat.com>
2152 * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
2156 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
2157 DECL_P in not a variable and appears more than once error messages.
2159 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
2163 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
2167 * typeck.c (structural_comptypes): Call cp_comptypes.
2168 (comptypes): New; called from the C/C++ common bits to perform
2170 (cp_comptypes): Renamed from comptypes, which is already used,
2171 with a different signature, by the C++ front end.
2172 (build_reinterpret_cast_1): Call cp_comptypes.
2173 (ptr_reasonably_similar): Ditto.
2174 * decl.c (decls_match): Ditto.
2175 * cvt.c (convert_to_reference): Ditto.
2176 * cp-tree.h (same_type_p): Ditto.
2177 (same_or_base_type_p): Ditto.
2178 (comptypes): Rename to cp_comptypes.
2179 * pt.c (canonical_type_parameter): Call cp_comptypes.
2181 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
2183 * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
2184 test for equivalence between pointer and references.
2186 2008-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2189 * class.c (finish_struct_anon): Use permerror instead of pedwarn.
2190 (check_field_decls): Likewise.
2191 (note_name_declared_in_class): Likewise.
2192 * call.c (build_new_op): Likewise.
2193 (convert_like_real): Likewise.
2194 (build_over_call): Likewise.
2195 * lex.c (unqualified_fn_lookup_error): Likewise.
2196 * parser.c (cp_parser_template_id): Likewise.
2197 * cvt.c (warn_ref_binding): Likewise.
2198 (convert_to_reference): Likewise.
2199 (ocp_convert): Likewise.
2200 (convert_to_void): Use error instead of pedwarn.
2201 * error.c (cp_cpp_error): Use pedantic_warning_kind.
2202 * decl.c (compute_array_index_type): Use constant_expression_error.
2204 2008-03-01 Douglas Gregor <doug.gregor@gmail.com>
2206 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
2207 that auto is either a storage class or a simple type specifier,
2208 depending on the dialect.
2209 (cp_parser_decl_specifier_seq): Complain about `auto' as a storage
2210 specifier in C++98 mode, error in C++0x mode (since we don't
2211 support auto as a type specifier, yet).
2212 (cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
2213 storage specifier in C++0x mode.
2214 (cp_parser_simple_type_specifier): Parse `auto' as a
2215 simple-type-specifier, but error because we don't support it yet.
2217 2008-02-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2219 * parser.c (cp_parser_nonclass_name): New.
2220 (cp_parser_pseudo_destructor_name): Use it instead of
2221 cp_parser_type_name.
2222 (cp_parser_type_name): Move code to cp_parser_nonclass_name.
2224 2008-02-29 Tom Tromey <tromey@redhat.com>
2226 * parser.c (struct cp_token) <input_file_stack_index>: Remove.
2227 (cp_lexer_get_preprocessor_token): Update.
2228 (cp_lexer_set_source_position_from_token): Don't call
2229 restore_input_file_stack.
2230 * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
2232 2008-02-28 Richard Guenther <rguenther@suse.de>
2235 2008-02-26 Richard Guenther <rguenther@suse.de>
2237 * decl.c (duplicate_decls): Remove decl from global mapping
2238 before ggc_freeing it.
2240 2008-02-27 Jakub Jelinek <jakub@redhat.com>
2243 * rtti.c: Include c-pragma.h.
2244 (push_abi_namespace, pop_abi_namespace): New functions.
2245 (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
2246 create_tinfo_types, emit_support_tinfos): Use them.
2247 * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
2249 2008-02-26 Jason Merrill <jason@redhat.com>
2252 * decl.c (grokdeclarator): Allow a typedef of an unnamed struct
2253 to name the struct for linkage purposes even if it has attributes.
2254 (start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
2256 2008-02-26 Tom Tromey <tromey@redhat.com>
2258 * parser.c (eof_token): Remove old location code.
2259 (check_empty_body): Remove test of USE_MAPPED_LOCATION.
2260 * decl2.c (generate_ctor_or_dtor_function): Remove old location
2262 (cp_write_global_declarations): Likewise.
2263 * lex.c (cxx_init): Remove old location code.
2264 (handle_pragma_implementation): Remove test of
2265 USE_MAPPED_LOCATION.
2266 * pt.c (tsubst): Remove old location code.
2267 * error.c (cp_print_error_function): Remove test of
2268 USE_MAPPED_LOCATION.
2269 * decl.c (pop_label): Remove old location code.
2270 (finish_function): Likewise.
2272 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2275 * call.c (magic_varargs_p): Remove BUILT_IN_STDARG_START.
2277 2008-02-26 Richard Guenther <rguenther@suse.de>
2279 * decl.c (duplicate_decls): Remove decl from global mapping
2280 before ggc_freeing it.
2282 2008-02-26 Paolo Carlini <pcarlini@suse.de>
2285 * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
2287 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2289 * typeck.c (build_class_member_access_expr): Add appropriate
2290 OPT_W* parameter to warning.
2291 (build_reinterpret_cast_1): Likewise.
2292 * name-lookup.c (push_overloaded_decl): Likewise.
2294 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2297 * error.c (dump_expr): Handle CONJ_EXPR.
2299 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2302 * error.c (dump_type): Handle FIXED_POINT_TYPE.
2303 (dump_expr): Handle FIXED_CST.
2305 2008-02-24 Jason Merrill <jason@redhat.com>
2307 * parser.c (cp_parser_declaration): Handle "inline namespace".
2308 (cp_parser_namespace_definition): Likewise.
2311 * name-lookup.c (arg_assoc_namespace): Look down into inline
2314 2008-02-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2316 * typeck.c (check_for_casting_away_constness): Use 1 single
2317 argument, the type of cast, to decide what diagnostics generate.
2318 (build_static_cast_1): Remove unused code. Update call to
2319 check_for_casting_away_constness.
2320 (build_reinterpret_cast_1): Update call to
2321 check_for_casting_away_constness.
2322 (build_const_cast_1): Likewise.
2324 2008-02-24 Paolo Carlini <pcarlini@suse.de>
2326 * error.c (dump_expr): Don't deal directly with NEW_EXPR (and
2327 VEC_NEW_EXPR), forward to pp_expression.
2328 * cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
2330 2008-02-24 Danny Smith <dannysmith@users.sourceforge.net>
2333 * friend.c (do_friend): Call cplus_decl_attributes earlier.
2335 2008-02-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
2338 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
2339 template decls' function decl.
2341 2008-02-22 Paolo Carlini <pcarlini@suse.de>
2345 2008-02-14 Paolo Carlini <pcarlini@suse.de>
2348 * pt.c (determine_specialization): In case of function templates,
2349 when the type of DECL does not match FN there is no match.
2351 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2354 * typeck.c (build_binary_op): Warn about floating point
2355 comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
2357 2008-02-19 Jason Merrill <jason@redhat.com>
2360 * pt.c (resolve_overloaded_unification): Set processing_template_decl
2361 while we look for possible bindings.
2363 2008-02-19 Jakub Jelinek <jakub@redhat.com>
2366 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
2370 * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
2371 vars. Afterwards ensure v is VAR_DECL.
2374 * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
2375 call cp_finish_decl.
2376 * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
2379 2008-02-15 Douglas Gregor <doug.gregor@gmail.com>
2384 * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
2385 is error_mark_node, return an error early.
2386 (find_parameter_packs_r): Pass the pointer set along to recursive
2387 calls of cp_walk_subtrees; don't try to manage the pointer set
2389 (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
2390 (make_pack_expansion): Ditto.
2391 (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
2392 a second pass through the tree with find_parameter_packs_r; that
2393 second pass no longer does anything.
2394 (push_template_decl_real): If we have an erroneous declaration,
2395 set its type to error_mark_node before returning an error.
2397 2008-02-14 Douglas Gregor <doug.gregor@gmail.com>
2400 * pt.c (tsubst_initializer_list): Deal with the use of
2401 VOID_TYPE_NODE to indicate value-initialization of the bases.
2403 2008-02-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2404 Jason Merrill <jason@redhat.com>
2408 * class.c (type_has_user_nondefault_constructor): New fn.
2409 * cp-tree.h: Declare it.
2410 * init.c (emit_mem_initializers): Use it for -W warning about
2411 missing base initializer.
2413 2008-02-14 Paolo Carlini <pcarlini@suse.de>
2416 * pt.c (determine_specialization): In case of function templates,
2417 when the type of DECL does not match FN there is no match.
2419 2008-02-13 Jakub Jelinek <jakub@redhat.com>
2420 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2423 * parser.c (cp_parser_pseudo_destructor_name): If next tokens
2424 are not identifier :: ~, return before calling cp_parser_type_name.
2426 2008-02-13 Jason Merrill <jason@redhat.com>
2428 PR c++/34962, c++/34937, c++/34939
2429 * decl2.c (is_late_template_attribute): Always defer attributes
2430 vector_size and weak.
2433 * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
2434 of enumerators, too.
2436 2008-02-12 Jason Merrill <jason@redhat.com>
2439 * call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
2440 if we're doing conversions to call a user-defined conversion function.
2442 2008-02-12 Steven Bosscher <steven@gcc.gnu.org>
2445 * semantics.c (finish_qualified_id_expr): Avoid duplicate access
2448 2008-02-12 Jakub Jelinek <jakub@redhat.com>
2451 * init.c (build_new_1): Don't create placement_expr before
2452 constructing alloc_call. Verify that the pointer is passed by
2453 value to operator new.
2455 2008-02-11 Jason Merrill <jason@redhat.com>
2458 * pt.c (tsubst): Don't look up a template typedef in an explicit
2461 2008-02-11 Douglas Gregor <doug.gregor@gmail.com>
2464 * tree.c (cp_build_qualified_type_real): When building a
2465 cv-qualified array type, build it as a unique type with
2466 build_cplus_array_type_1 and then adopt the unqualified type's
2469 2008-02-11 Paolo Carlini <pcarlini@suse.de>
2472 * decl.c (groktypename): Check grokdeclarator return.
2474 2008-02-10 Jason Merrill <jason@redhat.com>
2477 * decl2.c (cp_write_global_declarations): Don't write out static
2478 data members with DECL_IN_AGGR_P set.
2480 2008-02-08 Jason Merrill <jason@redhat.com>
2483 * tree.c (build_target_expr_with_type): Handle void initializer.
2484 (bot_manip): Remap slot before recursing.
2486 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2489 * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
2491 2008-02-06 Alexandre Oliva <aoliva@redhat.com>
2494 * tree.c: Include tree-flow.h.
2495 (build_target_expr): Check type compatibility.
2496 * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
2497 * call.c (convert_like_real): Convert bitfield to expected type.
2499 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
2503 * typeck.c (structural_comptypes): Call cp_comptypes.
2504 (comptypes): New; called from the C/C++ common bits to perform
2506 (cp_comptypes): Renamed from comptypes, which is already used,
2507 with a different signature, by the C++ front end.
2508 (build_reinterpret_cast_1): Call cp_comptypes.
2509 (ptr_reasonably_similar): Ditto.
2510 * decl.c (decls_match): Ditto.
2511 * cvt.c (convert_to_reference): Ditto.
2512 * cp-tree.h (same_type_p): Ditto.
2513 (same_or_base_type_p): Ditto.
2514 (comptypes): Rename to cp_comptypes.
2515 * pt.c (canonical_type_parameter): Call cp_comptypes.
2517 2008-02-05 Jakub Jelinek <jakub@redhat.com>
2520 * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
2521 value dependent expression.
2523 2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
2526 * decl2.c (save_template_attributes): When we're modifying the
2527 TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
2528 all of the other variants to add those same attributes. Otherwise,
2529 the main variant will be inconsistent with those other variants.
2531 2008-02-04 Richard Guenther <rguenther@suse.de>
2534 * decl.c (record_builtin_java_type): Make jboolean a
2535 integer type again where its mode doesn't match that of bool.
2537 2008-02-02 Jason Merrill <jason@redhat.com>
2538 Mark Mitchell <mark@codesourcery.com>
2541 * init.c (build_value_init_1): New function.
2542 (build_value_init): New function.
2543 * typeck2.c (build_functional_cast): Call it.
2544 * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
2546 * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
2547 TYPE_HAS_CONSTRUCTOR.
2548 * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
2549 add_implicitly_declared_members): Adjust.
2550 (check_field_decls): Adjust. Remove warnings about reference/const
2551 in class without constructor.
2552 (check_bases_and_members): Adjust. Give those warnings here instead.
2553 * decl.c (fixup_anonymous_aggr): Adjust.
2554 (check_initializer): Adjust, clarify logic slightly.
2555 (grok_special_member_properties): Adjust, only set if user-provided.
2556 * rtti.c (create_tinfo_types): Don't set.
2557 * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
2558 Use same_type_ignoring_top_level_qualifiers_p.
2559 * pt.c (check_explicit_specialization): Adjust.
2560 (instantiate_class_template): Adjust.
2562 2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
2563 Jakub Jelinek <jakub@redhat.com>
2567 * typeck.c (structural_comptypes): Handle comparisons of
2568 VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
2570 * mangle.c (write_builtin_type): Map down to the canonical type,
2571 which will be one of the predefined type nodes.
2573 2008-01-29 Michael Meissner <michael.meissner@amd.com>
2576 * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
2577 bits to allow for expansion of the number of middle end tree
2580 2008-01-29 Douglas Gregor <doug.gregor@gmail.com>
2591 * typeck.c (check_return_expr): Tweak call to
2592 check_for_bare_parameter_packs.
2593 * class.c (add_method): Be careful with error_mark_nodes.
2594 * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
2596 * pt.c (struct find_parameter_pack_data): Remove
2598 (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
2599 (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
2600 (make_pack_expansion): Ditto.
2601 (check_for_bare_parameter_packs): Parameter is now a tree, not a
2603 (process_template_parm): Tweak call to
2604 check_for_bare_parameter_packs.
2605 (push_template_decl_real): Tweak calls to
2606 check_for_bare_parameter_packs. If bare parameter packs are found
2607 in the list of exceptions, clear out that list after giving an
2609 * semantics.c (finish_cond): Tweak call to
2610 check_for_bare_parameter_packs.
2611 (finish_expr_stmt): Ditto.
2612 (finish_for_expr): Ditto.
2613 (finish_switch_cond): Ditto.
2614 (finish_mem_initializers): Ditto.
2615 (finish_member_declaration): Ditto.
2616 (finish_static_assert): Check for bare parameter packs in the
2618 * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
2619 attributes of a declaration.
2620 * parser.c (cp_parser_using_declaration): Tweak call to
2621 check_for_bare_parameter_packs.
2622 (cp_parser_base_clause): Ditto.
2624 2008-01-28 Jason Merrill <jason@redhat.com>
2627 * class.c (build_base_path): Fix !want_pointer case.
2629 2008-01-27 Jason Merrill <jason@redhat.com>
2632 * class.c (build_base_path): Fix previous change.
2634 2008-01-26 Jakub Jelinek <jakub@redhat.com>
2637 * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
2640 2008-01-26 Richard Guenther <rguenther@suse.de>
2643 * typeck.c (build_binary_op): Remove code to shorten compares.
2645 2008-01-25 Richard Guenther <rguenther@suse.de>
2648 * decl.c (record_builtin_java_type): Make __java_boolean
2650 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
2651 after TYPE_MAIN_VARIANT check.
2653 2008-01-25 Jason Merrill <jason@redhat.com>
2656 * class.c (build_base_path): Don't mess with virtual access if
2658 * call.c (standard_conversion): Don't check whether source type
2661 * decl2.c (is_late_template_attribute): Don't defer attribute
2662 visibility just because the type is dependent.
2664 2008-01-25 Jason Merrill <jason@redhat.com>
2665 Mark Mitchell <mark@codesourcery.com>
2668 * call.c (standard_conversion): Allow conversion from integer/real
2670 (compare_ics): Such a conversion is worse than a normal arithmetic
2673 2008-01-25 Richard Guenther <rguenther@suse.de>
2676 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
2679 2008-01-24 Paolo Carlini <pcarlini@suse.de>
2682 * pt.c (push_template_decl_real): Return error_mark_node in case
2683 of template definition of non-template.
2685 2008-01-24 Jason Merrill <jason@redhat.com>
2688 * decl2.c (is_late_template_attribute): Defer any attribute with
2689 dependent args. Also defer type attributes if the type is dependent.
2691 2008-01-22 Jakub Jelinek <jakub@redhat.com>
2692 Alexandre Oliva <aoliva@redhat.com>
2695 * call.c (reference_binding): For bitfields use the declared bitfield
2697 (add_builtin_candidates): Likewise.
2698 * class.c (layout_class_type): For bitfields copy over the
2699 original type quals.
2701 2008-01-22 Jason Merrill <jason@redhat.com>
2704 * decl.c (groktypename): Also ignore attributes on dependent
2705 possibly-class types.
2708 * friend.c (do_friend): Check for prior declaration of a friend
2709 function of a local class.
2710 * name-lookup.c (lookup_name_innermost_nonclass_level):
2712 * name-lookup.h: Declare it.
2714 2008-01-22 Tom Tromey <tromey@redhat.com>
2717 * init.c (build_new_1): Only disallow Java aggregates.
2719 2008-01-22 Jakub Jelinek <jakub@redhat.com>
2722 * semantics.c (finish_omp_for): Don't call c_finish_omp_for
2723 if decl or init is error_mark_node.
2726 * error.c (dump_expr): Handle VECTOR_CST.
2728 2008-01-21 Jason Merrill <jason@redhat.com>
2731 * pt.c (tsubst_aggr_type): Make sure our context is complete.
2734 * pt.c (retrieve_local_specialization): Robustify.
2735 (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
2738 * pt.c (tsubst): Only call retrieve_local_specialization if the
2739 original typedef was in a function template.
2742 * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
2744 2008-01-21 Richard Guenther <rguenther@suse.de>
2747 * error.c (cp_print_error_function): Deal with recursive
2750 2008-01-20 Paolo Carlini <pcarlini@suse.de>
2753 * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
2755 2008-01-20 Paolo Carlini <pcarlini@suse.de>
2759 * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
2760 on non-IS_AGGR_TYPE scope.
2761 (constructor_name_p): Assert IS_AGGR_TYPE.
2763 2008-01-18 Ian Lance Taylor <iant@google.com>
2766 * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
2767 (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
2768 DECL_IS_OPERATOR_NEW flag.
2770 2008-01-16 Richard Guenther <rguenther@suse.de>
2773 * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
2774 for conversions to type variants.
2776 2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
2778 * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
2779 declaration and code. Update copyright year.
2781 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2784 * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
2785 know we have a class type.
2787 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2790 * pt.c (coerce_template_parameter_pack): When substituting into
2791 the type of a non-type template parameter pack. use the
2792 deduced/substituted arguments.
2793 * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
2794 can be a parameter pack with the ellipsis following it. When we
2795 have an erroneous declaration, allow it to be a parameter pack.
2796 (cp_parser_template_parameter): Complain about default
2797 arguments on non-type template parameter packs, and parse them
2798 using the new cp_parser_default_argument.
2799 (cp_parser_parameter_declaration): Complain about parameter packs
2800 with default arguments. Move parsing of default arguments into a
2801 new function, cp_parser_default_argument.
2802 (cp_parser_default_argument): New; extracted from
2803 cp_parser_parameter_declaration.
2805 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2811 * typeck.c (check_return_expr): If there are bare parameter packs
2812 in the return value, set it to error_mark_node.
2813 * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
2814 * pt.c (find_parameter_packs_r): Look at the type of
2815 IDENTIFIER_NODEs (e.g., for user-defined conversions).
2816 (check_for_bare_parameter_packs): Flip the result: now returns
2817 TRUE when there were bare parameter packs, FALSE otherwise.
2818 (push_template_decl_real): Deal with flipped result of
2819 check_for_bare_parameter_packs.
2820 * semantics.c (finish_cond): If there are bare parameter packs in
2821 the conditional, set it to error_mark_node.
2822 (finish_expr_stmt): If there are bare parameter packs in the
2823 expression, set it to error_mark_node.
2824 (finish_for_expr): Ditto.
2825 (finish_switch_cond): If there are bare parameter packs in
2826 the conditional, set it to error_mark_node.
2827 (finish_mem_initializers): If there are bare parameter packs in
2828 the member initializer, set it to error_mark_node.
2829 (finish_member_declaration): Check the attributes of the
2830 declaration for bare parameter packs, and remove the attributes if
2831 any have bare parameter packs.
2832 * parser.c (cp_parser_using_declaration): Check the using
2833 declaration for bare parameter packs.
2834 (cp_parser_base_clause): If there are bare parameter packs in a
2835 base specifier, don't add it to the chain.
2837 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2840 * error.c (dump_simple_decl): Display ellipsis for template
2841 non-type parameter packs.
2842 (dump_decl): Display ellipsis for template type parameter packs.
2843 (dump_template_decl): Display ellipsis for template template
2845 * pt.c (redeclare_class_template): When redeclaring a class
2846 template, check for collisions between template parameters and
2847 template parameter packs.
2849 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2852 * pt.c (process_partial_specialization): Don't mark template
2853 parameters that occur in non-deduced contexts.
2854 (struct pair_fn_data): Add include_nondeduced_p.
2855 (for_each_template_parm_r): Only visit non-deduced contexts if
2856 include_nondeduced_p is set.
2857 (for_each_template_parm): Added parameter include_nondeduced_p,
2858 which states whether template parameters found in non-deduced
2859 contexts should be visited.
2860 (uses_template_parms): Visit all template parameters, even those
2861 in non-deduced contexts.
2863 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2866 * pt.c (check_default_tmpl_args): Check for parameter packs that
2867 aren't at the end of a primary template.
2868 (push_template_decl_real): Remove check for parameter packs that
2869 aren't at the end of a primary template; that now happens in
2870 check_default_tmpl_args.
2871 * semantics.c (finish_template_template_parm): Use
2872 check_default_tmpl_args to check for errors in the template
2875 2008-01-12 Doug Kwan <dougkwan@google.com>
2877 * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
2878 instead of OPT_Wreturn_type in warning due to ignored return type
2880 * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
2881 instead of OPT_Wreturn_type in warning due to ignored return type
2884 2008-01-08 Jakub Jelinek <jakub@redhat.com>
2887 * semantics.c (finish_omp_for): Don't call
2888 fold_build_cleanup_point_expr if processing_template_decl.
2890 2008-01-04 Paolo Carlini <pcarlini@suse.de>
2891 Jakub Jelinek <jakub@redhat.com>
2894 * error.c (dump_template_argument): Deal with TREE_LIST.
2896 2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
2898 * parser.c (cp_parser_check_decl_spec): Don't warn about "long
2899 long" in C++0x mode; change the warning to note that "long long"
2900 is only unsupported in C++98 mode.
2902 2007-12-20 Jason Merrill <jason@redhat.com>
2905 * call.c (standard_conversion): Derived-to-base is considered a
2906 standard conversion.
2908 2007-12-19 Jakub Jelinek <jakub@redhat.com>
2911 * parser.c (cp_parser_omp_parallel): For non-combined parallel
2912 call cp_parser_statement rather than
2913 cp_parser_already_scoped_statement.
2915 2007-12-18 Jason Merrill <jason@redhat.com>
2918 * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
2920 (dependent_type_p_r): Handle the domain of an array.
2922 2007-12-18 Douglas Gregor <doug.gregor@gmail.com>
2923 Jakub Jelinek <jakub@redhat.com>
2928 * pt.c (template_template_parm_bindings_ok_p): New; verifies
2929 bindings of template template parameters after all template
2930 arguments have been deduced.
2931 (coerce_template_parms): Don't complain when COMPLAIN doesn't
2933 (fn_type_unification): Use template_template_parm_bindings_ok_p.
2934 (unify): Deal with variadic, bound template template parameters.
2935 (get_class_bindings): Use template_template_parm_bindings_ok_p.
2937 2007-12-18 Jakub Jelinek <jakub@redhat.com>
2940 * decl.c (grokdeclarator): Reject friend sfk_constructor
2943 2007-12-17 Jakub Jelinek <jakub@redhat.com>
2946 * parser.c (cp_parser_omp_all_clauses): Accept optional comma
2949 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
2952 * cp-lang.c (cp_classify_record): New.
2953 (LANG_HOOKS_CLASSIFY_RECORD): Override.
2955 2007-12-11 Jakub Jelinek <jakub@redhat.com>
2958 * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
2961 * rtti.c (build_dynamic_cast): Call convert_from_reference even for
2962 dynamic_cast in a template.
2964 2007-12-10 Simon Martin <simartin@users.sourceforge.net>
2967 * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
2968 MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
2970 2007-12-10 Jakub Jelinek <jakub@redhat.com>
2973 * error.c (dump_type_prefix, dump_type_suffix): Handle
2974 TYPE_PACK_EXPANSION.
2977 * error.c (dump_expr): Handle ABS_EXPR.
2979 2007-12-09 Jakub Jelinek <jakub@redhat.com>
2983 * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
2984 in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2985 Return 2 also if DECL_EXPLICIT_INSTANTIATION.
2986 * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
2987 flag_use_repository and repo_emit_p returned 2.
2989 2007-12-06 Jakub Jelinek <jakub@redhat.com>
2992 * tree.c (stabilize_call, stabilize_init): Do nothing if
2993 processing_template_decl.
2995 2007-12-05 Jakub Jelinek <jakub@redhat.com>
2998 * semantics.c (finish_decltype_type): For SCOPE_REF issue an
2999 error instead of assertion failure.
3000 * parser.c (cp_parser_decltype): If closing paren is not found,
3001 return error_mark_node.
3003 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3006 * name-lookup.c (arg_assoc_template_arg): Recurse on argument
3008 (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
3009 since arg_assoc_template_arg will deal with them (better).
3011 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3014 * pt.c (tsubst_exception_specification): Handle substitutions into
3015 member templates, where tsubst_pack_expansion returns a
3016 TYPE_PACK_EXPANSION.
3018 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3021 * pt.c (unify_pack_expansion): If we didn't deduce any actual
3022 bindings for the template parameter pack, don't try to keep the
3023 empty deduced arguments.
3024 (unify): If a parameter is a template-id whose template argument
3025 list contains a pack expansion that is not at the end, then we
3026 cannot unify against that template-id.
3028 2007-12-02 Paolo Carlini <pcarlini@suse.de>
3031 * pt.c (current_template_args): Use error_operand_p.
3033 2007-12-02 Paolo Carlini <pcarlini@suse.de>
3036 * error.c (dump_decl): Handle TREE_BINFO.
3038 2007-12-01 Ollie Wild <aaw@google.com>
3041 * typeck.c (build_binary_op): Add conversion of pointers to function
3042 members appearing as operands to the equality operators.
3044 2007-11-30 Jakub Jelinek <jakub@redhat.com>
3047 * error.c (dump_expr): Handle OBJ_TYPE_REF.
3049 2007-11-29 Jakub Jelinek <jakub@redhat.com>
3052 * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
3054 * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
3059 * parser.c (cp_parser_decltype): Don't call finish_id_expression
3061 * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
3064 2007-11-27 Jakub Jelinek <jakub@redhat.com>
3066 PR tree-optimization/34181
3067 * method.c (use_thunk): Don't inline the call in the thunk.
3070 * tree.c (decl_linkage): Static data members and static member
3071 functions in anonymous ns classes are lk_external.
3073 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
3076 * decl.c (start_preparsed_function): Pass
3077 processing_template_decl for the new allocate_struct_function
3080 2007-11-25 Richard Guenther <rguenther@suse.de>
3082 * decl.c (poplevel): Use BLOCK_CHAIN.
3084 2007-11-24 Ollie Wild <aaw@google.com>
3086 * typeck.c (delta_from_ptrmemfunc): New function.
3087 (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
3088 (build_binary_op): Call delta_from_ptrmemfunc.
3090 2007-11-23 Jakub Jelinek <jakub@redhat.com>
3094 * decl.c (cp_finish_decl): Disallow variable or field
3095 definitions if extern "Java" aggregates.
3096 (grokparms): Disallow parameters with extern "Java"
3098 (check_function_type): Disallow function return values
3099 with extern "Java" aggregates.
3100 * init.c (build_new_1): Disallow placement new with
3101 extern "Java" aggregates.
3103 2007-11-23 Mark Mitchell <mark@codesourcery.com>
3104 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3107 * call.c (convert_like_real): Build a zero constant when __null is
3108 converted to an integer type.
3110 2007-11-22 Jakub Jelinek <jakub@redhat.com>
3113 * decl2.c (cp_write_global_declarations): Issue error about static
3114 data members in anonymous namespace which are declared and used,
3117 2007-11-20 Jakub Jelinek <jakub@redhat.com>
3120 * parser.c (cp_parser_class_head): Reject function template ids.
3123 * tree.c (build_cplus_array_type_1): Don't pass any VLA types
3124 when processing_template_decl to build_array_type.
3127 * pt.c (more_specialized_fn): Don't segfault if one or
3128 both argument list end with ellipsis.
3130 2007-11-18 Jakub Jelinek <jakub@redhat.com>
3133 * semantics.c (finish_call_expr): Set
3134 current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
3135 or OVERLOAD with all noreturn functions.
3137 2007-11-16 Jakub Jelinek <jakub@redhat.com>
3140 * pt.c (apply_late_template_attributes): Do nothing if decl's type is
3143 2007-11-13 Jakub Jelinek <jakub@redhat.com>
3150 * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
3151 set to error_mark_node the outermost POINTER_TYPE to the pack if
3152 it is seen in a POINTER_TYPE.
3153 (push_template_decl_real): If check_for_bare_parameter_packs
3154 fails for function return type, set the return type to
3155 integer_type_node. If check_for_bare_parameter_packs failed
3156 for non-function, return error_mark_node.
3159 * call.c (build_new_op): Call resolve_args before calling
3162 2007-11-11 Tom Tromey <tromey@redhat.com>
3165 * lex.c (handle_pragma_implementation): Use cpp_included_before.
3167 2007-11-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3170 * pt.c (redeclare_class_template): Update error message. Use a
3171 note to show the previous declaration.
3172 (tsubst_friend_class): Use the location of the friend template as
3173 the input location before calling redeclare_class_template.
3175 2007-11-11 Jakub Jelinek <jakub@redhat.com>
3178 * semantics.c (finish_pseudo_destructor_expr): Handle
3179 object == error_mark_node.
3181 2007-11-10 Jakub Jelinek <jakub@redhat.com>
3184 * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
3185 is not scalar type, let finish_class_member_access_expr handle
3186 diagnostics. Pass BIT_NOT_EXPR argument to
3187 finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
3189 2007-11-09 Douglas Gregor <doug.gregor@gmail.com>
3192 * decl.c (cp_complete_array_type): If any of the initializer
3193 elements are pack expansions, don't compute the array size yet.
3195 2007-11-08 Andrew Pinski <pinskia@gmail.com>
3198 * tree.c (decl_linkage): Fields have no linkage.
3200 2007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
3202 * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
3204 2007-11-07 Douglas Gregor <doug.gregor@gmail.com>
3209 * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
3210 Be careful with ERROR_MARK_NODEs.
3211 * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
3214 2007-11-07 Jakub Jelinek <jakub@redhat.com>
3217 * call.c (build_over_call): Don't check TREE_ADDRESSABLE
3220 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
3224 * tree.c (c_build_qualified_type): Define bridge to
3225 cp_build_qualified_type.
3227 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
3238 * typeck.c (check_return_expr): Pass address of retval to
3239 check_for_bare_parameter_packs.
3240 * class.c (build_base_field): Tolerate bases that have no layout
3242 (end_of_base): Ditto.
3243 * tree.c (canonical_type_variant): Be careful with
3245 * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
3247 * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
3248 which states whether parameter packs should be replaced with
3250 (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
3251 possible. If set_packs_to_error is set true, replace the parameter
3252 pack with ERROR_MARK_NODE. Manage our own pointer sets.
3253 (uses_parameter_packs): Don't set parameter packs to
3255 (check_for_bare_parameter_packs): Now takes a pointer to a tree,
3256 which may be modified (if it is a parameter pack). Instructs
3257 find_parameter_packs_r to replace parameter packs with
3258 ERROR_MARK_NODE (so that they won't cause errors later on).
3259 (process_template_parm): Pass pointer to
3260 check_for_bare_parameter_packs.
3261 (process_partial_specialization): Replace pack expansions before
3262 the end of the template argument list with ERROR_MARK_NODE.
3263 (push_template_decl_real): Pass pointer to
3264 check_for_bare_parameter_packs. Replace parameter packs not at the
3265 end of the template parameter list with ERROR_MARK_NODE.
3266 (convert_template_argument): Be more careful about using DECL_NAME
3267 on only declarations.
3268 (unify): Can't unify against ERROR_MARK_NODE.
3269 * semantics.c (finish_cond): Pass pointer to
3270 check_for_bare_parameter_packs.
3271 (finish_expr_stmt): Ditto.
3272 (finish_for_expr): Ditto.
3273 (finish_switch_cond): Pass pointer to
3274 check_for_bare_parameter_packs, and call it before we put the
3275 condition into the statement.
3276 (finish_mem_initializers): Pass pointer to
3277 check_for_bare_parameter_packs.
3278 (finish_member_declaration): Ditto.
3279 * parser.c (cp_parser_base_clause): Ditto.
3281 2007-11-06 Jakub Jelinek <jakub@redhat.com>
3284 * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
3285 with the final TREE_READONLY flag in place. processing_template_decl
3286 is known to be 0 in this part of function.
3289 * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
3290 OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
3291 * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
3292 * semantics.c (finish_omp_atomic): Revert most of the
3293 2007-02-05 changes, just keep the new representation of
3294 OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
3296 2007-11-05 H.J. Lu <hongjiu.lu@intel.com>
3299 * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
3302 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
3307 * typeck.c (merge_types): Don't lose rvalue references when
3309 * call.c (build_over_call): Don't elide move constructors just
3310 because the copy constructor is trivial (!).
3311 (compare_ics): If comparing cv-qualifiers fails, we can still order
3312 based on binding lvalues vs. rvalues.
3314 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
3317 * pt.c (unify_pack_expansion): bring handling of function call
3318 arguments into line with type_unification_real.
3320 2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3322 * typeck.c (build_binary_op): Use pedwarn instead of error for
3325 2007-11-05 Jakub Jelinek <jakub@redhat.com>
3328 * parser.c (cp_parser_unary_expression): For &&label call
3329 cp_parser_non_integral_constant_expression and return error_mark_node
3330 if it returned true.
3333 * decl.c (grokdeclarator): Don't call build_memfn_type if type
3334 is neither FUNCTION_TYPE nor METHOD_TYPE.
3336 2007-11-02 Jakub Jelinek <jakub@redhat.com>
3339 * parser.c (cp_parser_nested_name_specifier_opt): Use
3340 TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
3341 typedef of currently open class.
3343 2007-11-02 Paolo Carlini <pcarlini@suse.de>
3346 * error.c (dump_expr): Deal specially with statements.
3348 2007-11-01 Jason Merrill <jason@redhat.com>
3351 * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
3353 (lookup_template_class): Use it to get the outer template args
3354 for instantiating one.
3357 * pt.c (reduce_template_parm_level): tsubst the parameters
3358 of a template template parm.
3360 2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
3363 * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
3365 2007-11-01 Jakub Jelinek <jakub@redhat.com>
3368 * parser.c (cp_parser_postfix_dot_deref_expression): If
3369 POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
3370 first and if that succeeds and type is SCALAR_TYPE_P, create
3374 * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
3375 (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
3376 as for std::type_info.
3378 2007-10-31 Paolo Carlini <pcarlini@suse.de>
3381 * cxx-pretty-print.c (pp_cxx_typeid_expression,
3382 pp_cxx_delete_expression): Change to static linkage.
3383 * cxx-pretty-print.h: Adjust declarations.
3384 * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
3385 MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
3386 MODOP_EXPR): Forward to pp_expression.
3388 * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
3391 2007-10-31 Christian Bruel <christian.bruel@st.com>
3392 Mark Mitchell <mark@codesourcery.com>
3395 * typeck.c (check_return_expr): Don't set named_return_value_okay_p
3396 if retval is volatile.
3398 2007-10-30 Jakub Jelinek <jakub@redhat.com>
3401 * decl2.c (build_offset_ref_call_from_tree): Call
3402 build_non_dependent_expr on object prior to building ADDR_EXPR from it
3403 if FN is DOTSTAR_EXPR.
3405 2007-10-30 Douglas Gregor <doug.gregor@gmail.com>
3409 * pt.c (find_parameter_packs_r): Fix typo in comment.
3410 (convert_template_argument): Look at the pattern of a pack
3411 expansion to determine what kind of entity we're converting.
3412 (coerce_template_parameter_pack): When we have coerced a non-type
3413 template parameter pack, substitute into the type of that pack.
3414 (tsubst_pack_expansion): When our substitution of a parameter pack
3415 is a "trivial" substitution of itself, just substitute into the
3416 pack expansion rather than actually expanding.
3418 2007-10-29 Jakub Jelinek <jakub@redhat.com>
3421 * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
3422 for non-integral type bitfields. Return true if bitfield is correct, false
3423 error has been diagnosed.
3424 (check_field_decls): If check_bitfield_decl returned false, call also
3427 2007-10-28 Paolo Carlini <pcarlini@suse.de>
3428 Mark Mitchell <mark@codesourcery.com>
3431 * pt.c (do_decl_instantiation): If the VAR_DECL is not a
3432 class member error out and return.
3434 2007-10-27 Jakub Jelinek <jakub@redhat.com>
3436 * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
3437 to current_function_decl rather than 0.
3440 * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
3442 * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
3444 2007-10-27 Jason Merrill <jason@redhat.com>