1 2009-09-29 John Freeman <jfreeman08@gmail.com>
2 Jason Merrill <jason@redhat.com>
4 Add support for lambda-expressions as per N2927.
5 * cp-tree.def (VEC_INIT_EXPR, LAMBDA_EXPR): New.
6 * cp-tree.h (LAMBDA_TYPE_P, LAMBDA_FUNCTION_P): New.
7 (LAMBDA_EXPR_DEFAULT_CAPTURE_MODE): New.
8 (LAMBDA_EXPR_DEFAULT_CAPTURE_LIST): New.
9 (LAMBDA_EXPR_THIS_CAPTURE, LAMBDA_EXPR_CAPTURES_THIS_P): New.
10 (LAMBDA_EXPR_MUTABLE_P, LAMBDA_EXPR_DEDUCE_RETURN_TYPE_P): New.
11 (LAMBDA_EXPR_RETURN_TYPE, LAMBDA_EXPR_LOCATION): New.
12 (LAMBDA_EXPR_EXTRA_SCOPE, LAMBDA_EXPR_DISCRIMINATOR): New.
13 (struct tree_lambda_expr): New.
14 (union lang_tree_node): Add lambda_expression.
15 (struct lang_type_class): Add lazy_move_ctor flag, lambda_expr field.
16 (CLASSTYPE_LAZY_MOVE_CTOR, CLASSTYPE_LAMBDA_EXPR): New.
17 (LAMBDA_TYPE_EXTRA_SCOPE, VEC_INIT_EXPR_SLOT): New.
18 (VEC_INIT_EXPR_INIT, DECLTYPE_FOR_LAMBDA_CAPTURE): New.
19 (DECLTYPE_FOR_LAMBDA_RETURN): New.
20 (enum special_function_kind): Add sfk_move_constructor.
21 (LAMBDANAME_PREFIX, LAMBDANAME_FORMAT, LAMBDANAME_P): New.
22 * parser.c (cp_parser_lambda_expression, cp_parser_lambda_introducer)
23 (cp_parser_lambda_declarator_opt, cp_parser_lambda_body): New.
24 (start_lambda_scope, record_lambda_scope, finish_lambda_scope): New.
25 (no_linkage_lambda_type_p): New.
26 (cp_parser_primary_expression): Recognize lambda expression.
27 (cp_parser_init_declarator): Note lambda scope.
28 (cp_parser_function_definition_after_declarator): Likewise.
29 (cp_parser_late_parsing_default_args): Likewise.
30 (cp_parser_skip_to_closing_parenthesis): Skip to end of lambda capture
32 (cp_parser_parameter_declaration): Don't defer lambda default args.
33 * semantics.c (finish_non_static_data_member, finish_id_expression):
34 Handle default capture for lambda expressions.
35 (finish_this_expr): Handle 'this' keyword inside of lambda expressions.
36 (outer_automatic_var_p): New.
37 (finish_decltype_type): Handle decltypes within lambda expressions.
38 (classtype_has_nothrow_assign_or_copy_p): Synthesized move constructor.
39 (build_lambda_expr, build_lambda_object, begin_lambda_type)
40 (lambda_return_type, lambda_capture_field_type, apply_lambda_return_type)
41 (capture_decltype, add_capture, add_default_capture)
42 (lambda_expr_this_capture): New.
43 * mangle.c (write_unnamed_type_name): New. Incomplete.
44 (write_closure_type_name): New.
45 (write_unqualified_name): Recognize unnamed, closure types.
46 (write_type): Do not write decltypes from lambda expressions.
47 (decl_mangling_context): New.
48 (write_name): Use it. Handle PARM_DECL scope.
49 (write_prefix): Likewise. Handle VAR_DECL/FIELD_DECL scope.
50 (write_compact_number): Factor out from...
51 (write_expression, write_template_param): ...here.
52 (discriminator_for_local_entity): Recognize lambdas.
53 (write_local_name): Handle PARM_DECL scope.
54 * typeck.c (structural_comptypes): Compare decltypes from lambda
56 (check_return_expr): Deduce lambda return type from multiple return
58 * class.c (add_implicitly_declared_members): Add lazy move constructor
60 (check_bases_and_members): Delete default constructor and assignment
61 operator for lambda types.
62 (maybe_note_name_used_in_class): Do not confuse lambda expression with
64 * decl.c (reshape_init_r): Array copy.
65 (grokfndecl): Synthesized move constructor.
66 (cp_tree_node_structure): Lambda expression.
67 * method.c (use_thunk): Synthesized move constructor.
68 (do_build_copy_constructor): Likewise.
69 (locate_copy): Likewise.
70 (implicitly_declare_fn): Likewise.
71 * cp-objcp-common.c (cp_tree_size): Handle LAMBDA_EXPR.
72 * error.c (dump_aggr_type): Recognize lambda type.
73 (dump_function_decl): Recognize lambda function.
74 (function_category): Likewise.
75 (dump_function_name): Hide lambda name.
76 * tree.c (build_array_copy, move): New.
77 (special_function_p): Synthesized move constructor.
78 (no_linkage_check): Handle lambdas.
79 * search.c (lookup_fnfields_1): Synthesized move constructor.
80 * cp-gimplify.c (cp_gimplify_init_expr, cp_gimplify_expr):
82 * typeck2.c (digest_init_r): Array copy.
83 * pt.c (get_template_info): Don't touch typedefs.
84 (instantiate_decl): Don't resubstitute artificial decls.
85 (tsubst_decl, tsubst, tsubst_copy_and_build): Handle lambdas.
86 (lookup_template_class): Don't fall back on name lookup.
87 * name-lookup.c (make_lambda_name): New.
88 (pushdecl_class_level): Handle default capture for lambda expressions.
89 (qualify_lookup): Handle decltypes within lambda expressions.
90 (pushtag): Handle ts_within_enclosing_non_class in function scope.
92 2009-09-28 Janis Johnson <janis187@us.ibm.com>
94 * mangle.c (write_builtin_type): Support decimal float types.
96 2009-09-28 Richard Henderson <rth@redhat.com>
98 * cp-objcp-common.h (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New.
100 2009-09-24 Jakub Jelinek <jakub@redhat.com>
102 * method.c (make_thunk, make_alias_for): Don't set
103 DECL_NO_STATIC_CHAIN.
104 * decl.c (builtin_function_1, grokfndecl): Likewise.
105 * lex.c (build_lang_decl): Likewise.
107 2009-09-23 Dodji Seketeli <dodji@redhat.com>
110 * decl.c (cp_finish_decl): Record the types used by the global
111 variable declaration we've just parsed.
113 2009-09-22 Dodji Seketeli <dodji@redhat.com>
115 * cp-lang.c (LANG_HOOKS_FUNCTION_PARAMETER_PACK_P,
116 LANG_HOOKS_FUNCTION_PARM_EXPANDED_FROM_PACK_P,
117 LANG_HOOKS_GET_GENERIC_FUNCTION_DECL): Initialize these
118 hooks for the c++ FE.
119 * cp-tree.h (function_parameter_pack_p, get_function_template_decl,
120 function_parameter_expanded_from_pack_p): Declare ...
121 * pt.c (function_parameter_pack_p, get_function_template_decl,
122 function_parameter_expanded_from_pack_p): ... new hooks.
123 (get_template_info): Make this more robust.
124 (template_args_variadic_p, make_ith_pack_parameter_name): Add a new
125 line between comment and function.
126 (get_template_argument_pack_elems): Fix comment.
127 (tsubst_decl): Arguments of function parameter packs are not
128 parameter packs themselves.
130 2009-09-21 Jason Merrill <jason@redhat.com>
133 * tree.c (trivial_type_p): Fix logic.
135 2009-09-21 Jason Merrill <jason@redhat.com>
137 * name-lookup.c (push_class_level_binding): Sanity check.
139 2009-09-18 Jason Merrill <jason@redhat.com>
141 * decl2.c (determine_visibility): Make anonymous types internal.
142 (mark_used): Complain about types without linkage used in
143 decls with internal linkage.
144 (vague_linkage_fn_p): Split out from...
145 * decl.c (maybe_commonize_var): ...here.
146 (grokdeclarator): Adjust linkage when a typedef gives linkage name.
147 * tree.c (no_linkage_check): Check the enclosing class and template
150 * cp-tree.h (TYPE_NAMESPACE_SCOPE_P): New.
152 * pt.c (get_pattern_parm): New.
153 (listify): Split out from...
154 (listify_autos): ...here.
155 (unify): Deduce std::initializer_list for T.
156 * call.c (build_over_call): Warn about it.
158 2009-09-17 Andrew Pinski <pinskia@gcc.gnu.org>
161 * typeck.c (cp_build_unary_op): Check TREE_CODE for bools instead of
163 (convert_for_assignment): Likewise.
164 * cvt.c (type_promotes_to): Likewise.
166 2009-09-14 Richard Henderson <rth@redhat.com>
167 Jakub Jelinek <jakub@redhat.com>
169 * cp-tree.h (finish_asm_stmt): Update decl.
170 * parser.c (cp_parser_asm_definition): Parse asm goto.
171 (cp_parser_asm_label_list): New.
172 * pt.c (tsubst_copy_asm_operands): Don't recurse on labels.
173 (tsubst_expr): Handle asm labels.
174 * semantics.c (finish_asm_stmt): Add and use labels parameter.
176 2009-09-14 Richard Henderson <rth@redhat.com>
178 * except.c (init_exception_processing): Don't call
179 default_init_unwind_resume_libfunc.
180 (cp_protect_cleanup_actions): Return the decl to call.
181 (build_exc_ptr): Use __builtin_eh_pointer.
182 * optimize.c (clone_body): Set eh_lp_nr, not eh_region.
184 2009-09-13 Richard Guenther <rguenther@suse.de>
185 Rafael Avila de Espindola <espindola@google.com>
187 * except.c (init_exception_processing): Do not set
188 lang_eh_runtime_type.
189 (choose_personality_routine): Do not set eh_personality_decl,
190 set pragma_java_exceptions.
191 * cp-lang.c (LANG_HOOKS_EH_RUNTIME_TYPE): Define.
192 (LANG_HOOKS_EH_PERSONALITY): Likewise.
193 (cp_eh_personality_decl): New.
194 (cp_eh_personality): Likewise.
195 * Make-lang.in (cp-lang.o): Add $(EXPR_H) and $(EXCEPT_H)
198 2009-09-13 Wei Guozhi <carrot@google.com>
201 * cp/optimize.c (build_delete_destructor_body): New function.
202 (maybe_clone_body): Call build_delete_destructor_body for
205 2009-09-10 Jason Merrill <jason@redhat.com>
207 * repo.c (extract_string, get_base_filename, init_repo): constify.
209 2009-09-09 Jason Merrill <jason@redhat.com>
211 * error.c (find_typenames_r): Also add decltypes.
213 2009-09-09 Paolo Carlini <paolo.carlini@oracle.com>
216 * decl2.c (grokfield): Check for explicit template argument lists.
218 2009-09-09 Jack Howarth <howarth@bromo.med.uc.edu>
221 * Make-lang.in: Remove redundant code from linkage for darwin10.
223 2009-09-08 Paolo Carlini <paolo.carlini@oracle.com>
226 * decl.c (build_init_list_var_init): Check return value of
227 perform_implicit_conversion.
229 2009-09-08 Jason Merrill <jason@redhat.com>
231 * class.c (currently_open_class): Make sure we're dealing with the
234 * cp-tree.h (enum overload_flags): Remove OP_FLAG.
235 * method.c (lazily_declare_fn): Check for dtorness in ABI warning.
237 * name-lookup.c (is_class_level): Remove.
238 (push_binding_level, leave_scope, resume_scope): Adjust.
239 (pushlevel_class): Adjust.
240 (poplevel_class): Make sure we're on class_binding_level.
242 * decl.c (grokmethod): Rename from start_method.
243 (finish_method): Remove.
245 * parser.c (cp_parser_save_member_function_body): Adjust.
247 2009-09-03 Doug Kwan <dougkwan@google.com>
249 * tree.c (cp_fix_function_decl_p): New.
250 (cp_free_lang_data): New.
252 2009-09-03 Diego Novillo <dnovillo@google.com>
254 * Make-lang.in (decl2.o): Add dependency on $(POINTER_SET_H).
255 * decl2.c: Include pointer-set.h.
256 (collect_candidates_for_java_method_aliases): New.
257 (cp_write_global_declarations): Call it.
258 Add local variable CANDIDATES. If set, call
259 build_java_method_aliases.
260 (build_java_method_aliases): Add argument CANDIDATES.
261 Use it to determine if FNDECL should get a hidden alias.
262 * cp-objcp-common.h (LANG_HOOKS_FREE_LANG_DATA): Define.
263 * cp-tree.h (cp_free_lang_data): Declare.
265 2009-09-03 Richard Guenther <rguenther@suse.de>
267 * method.c (use_thunk): Use cgraph_finalize_function to hand
268 off thunks to the cgraph.
269 * semantics.c (emit_associated_thunks): Do not emit thunks
270 for really extern functions.
272 2009-09-03 Diego Novillo <dnovillo@google.com>
274 * cp-lang.c (lang_hooks): Remove const qualifier.
276 2009-09-02 Jason Merrill <jason@redhat.com>
278 * semantics.c (describable_type): Don't pretend to be in a template.
280 * ptree.c (cxx_print_type) [DECLTYPE_TYPE]: Print the expression.
282 2009-09-01 Alexandre Oliva <aoliva@redhat.com>
284 * cp-tree.h (TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS): New.
285 * cp-lang.c (cxx_dwarf_name): Pass it.
286 * error.c (count_non_default_template_args): Take flags as
287 argument. Adjust all callers. Skip counting of default
288 arguments if the new flag is given.
290 2009-09-01 Dodji Seketeli <dodji@redhat.com>
293 * pt.c (make_ith_pack_parameter_name): Don't use strnlen that is a
296 2009-09-01 Richard Guenther <rguenther@suse.de>
298 * cp-objcp-common.c (cp_expr_size): Use tree_expr_size.
299 * cp-objcp-common.h (LANG_HOOKS_EXPR_SIZE): Do not define.
301 2009-09-01 Richard Guenther <rguenther@suse.de>
303 * cp-objcp-common.h (LANG_HOOKS_MARK_ADDRESSABLE): Remove.
305 2009-08-31 Dodji Seketeli <dodji@redhat.com>
308 * cp-tree.h (get_template_info): Parameter should be const.
309 (CLASSTYPE_SPECIALIZATION_OF_PRIMARY_TEMPLATE_P): Fix typo.
310 (get_template_argument_pack_elems,
311 get_primary_template_innermost_parameters,
312 get_template_innermost_arguments, template_template_parameter_p):
314 * pt.c (get_template_argument_pack_elems,
315 get_template_innermost_parameters, get_template_innermost_arguments,
316 template_template_parameter_p):
317 ... New C++ front end implementation of new language hooks.
318 (primary_template_instantiation_p): New private helper.
319 (make_ith_pack_parameter_name): Use snprintf and strnlen instead of
321 (get_template_info): Const-ify parameter.
322 * cp-lang.c (LANG_HOOKS_GET_INNERMOST_GENERIC_PARMS,
323 LANG_HOOKS_GET_INNERMOST_GENERIC_ARGS,
324 LANG_HOOKS_GET_ARGUMENT_PACK_ELEMS,
325 LANG_HOOKS_GENERIC_TYPE_PARAMETER_DECL_P): Initialize these
326 interfaces for the C++ front-end.
328 2009-08-31 Jason Merrill <jason@redhat.com>
331 * parser.c (cp_parser_enum_specifier): Make sure the : is followed by a
332 type-specifier-seq before we commit.
334 2009-08-28 Richard Guenther <rguenther@suse.de>
337 * cp-gimplify.c (cp_genericize_r): Do not leak zero-sized stores
340 2009-08-27 Richard Guenther <rguenther@suse.de>
342 * class.c (build_vtbl_ref_1): Remove excess vertical space.
343 * Make-lang.in (CXX_TREE_H): Remove c-common.def dependency
344 tracked by $(TREE_H).
345 * semantics.c (expand_or_defer_fn): Zero DECL_SAVED_TREE.
347 2009-08-26 Jason Merrill <jason@redhat.com>
349 * call.c (build_builtin_candidate): Don't set LOOKUP_ONLYCONVERTING
350 if we're contextually converting to bool.
351 (build_conditional_expr): Likewise.
352 * typeck.c (condition_conversion): Likewise.
354 * call.c (build_conditional_expr): Fix logic errors.
355 (build_new_op): Remove dead COND_EXPR handling.
357 2009-08-24 Jason Merrill <jason@redhat.com>
359 * cp-tree.h (DECL_DEFERRED_FN): Remove.
360 (struct lang_decl_fn): Remove deferred flag.
361 * class.c (build_clone): Don't set it.
362 * decl2.c (note_vague_linkage_fn): Don't check or set it.
363 (mark_used): Don't check it.
364 * method.c (make_thunk, make_alias_for): Don't set it.
366 * decl2.c (mark_used): Streamline logic.
371 * cp-tree.h (DECL_ODR_USED): New macro.
372 (struct lang_decl_base): Add odr_used flag.
373 * decl.c (duplicate_decls): Propagate it. Use it for error.
374 * pt.c (register_specialization): Use it for error.
375 * decl2.c (mark_used): Use it as gating flag rather than TREE_USED.
376 (cp_write_global_declarations): Use it for error.
377 (tree_used_ok): Remove.
378 * cp-tree.h: Remove tree_used_ok.
379 * call.c (build_call_a): Don't call it.
380 * init.c (build_offset_ref): Likewise.
382 2009-08-21 Jakub Jelinek <jakub@redhat.com>
385 * tree.c (lvalue_p_1) <case CONST_DECL>: Return clk_none if
388 2009-08-19 Jason Merrill <jason@redhat.com>
392 * decl2.c (mark_used): Increment function_depth during synthesis.
393 * parser.c (cp_parser_default_argument): Not here.
395 2009-08-19 Jakub Jelinek <jakub@redhat.com>
397 * method.c (use_thunk): Call free_after_compilation after
398 assemble_end_function.
400 2009-08-17 Richard Guenther <rguenther@suse.de>
402 * decl.c (build_ptrmemfunc_type): Keep variant chain intact.
404 (finish_enum): Keep variant chain intact.
405 * tree.c (cp_build_reference_type): Likewise.
407 2009-08-16 Jason Merrill <jason@redhat.com>
409 Make TREE_USED match the [basic.def.odr] concept for FUNCTION_DECL
410 and VAR_DECL, so mark_used only has effect the first time.
411 * decl2.c (mark_used): Just return if TREE_USED is already set.
412 Don't set TREE_USED if cp_unevaluated_operand is set.
413 (tree_used_ok): New fn.
414 * init.c (build_offset_ref): Check it instead of TREE_USED.
415 * call.c (build_call_a): Likewise.
416 * cp-tree.h: Declare it.
417 (DECL_NO_LINKAGE_CHECKED): No longer needed.
418 (struct lang_decl_base): Remove no_linkage_checked bitfield.
420 * decl2.c (finish_static_data_member_decl): Don't set TREE_USED.
422 * decl2.c (mark_used): It's ok to synthesize for default args now.
424 2009-08-10 Jason Merrill <jason@redhat.com>
426 Implement DR 757: It's OK for a decl to use a type without linkage
427 so long as the decl is defined in the current translation unit.
428 * decl2.c (no_linkage_decls): New vector.
429 (mark_used): Add decls that use types with no linkage.
430 (cp_write_global_declarations): Check that they are defined.
431 (decl_defined_p, no_linkage_error): New fns.
432 * cp-tree.h (DECL_NO_LINKAGE_CHECKED): New macro.
433 (struct lang_decl_base): Add flag.
434 * decl.c (grokfndecl): Don't check type linkage.
435 (grokvardecl): If the type has no linkage, just make sure
436 DECL_LANG_SPECIFIC is set.
437 * pt.c (check_instantiated_arg): Don't check type linkage.
438 * name-lookup.c (is_local_extern): New fn.
439 * name-lookup.h: Declare it.
441 2009-08-05 Jason Merrill <jason@redhat.com>
444 * init.c (build_vec_init): Evaluate the initializer before
445 starting the initialization try block.
447 2009-08-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
450 * typeck.c (convert_for_assignment): Do not warn for any boolean
451 variant. Use explicit location.
453 2009-08-04 Dodji Seketeli <dodji@redhat.com>
456 * pt.c (tsubst_default_argument): Let access checks of the
457 default argument happen in the context of the current function.
459 2009-08-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
462 * call.c (build_new_op): Only try prefix operator if -fpermissive,
463 otherwise just error.
465 2009-08-04 Dodji Seketeli <dodji@redhat.com>
468 * error.c (lang_decl_name): Print qualified names for decls
471 2009-08-03 Jason Merrill <jason@redhat.com>
472 Jakub Jelinek <jakub@redhat.com>
475 * init.c (build_vec_init): Look through a TARGET_EXPR around a
478 2009-07-31 Jason Merrill <jason@redhat.com>
479 Douglas Gregor <doug.gregor@gmail.com>
481 Remove implicit binding of lvalues to rvalue references (N2831)
482 * call.c (convert_class_to_reference): Binding an lvalue to an
483 rvalue reference is bad. If the user-defined conversion is bad,
484 set bad_p before merging conversions.
485 (maybe_handle_ref_bind): Don't push down bad_p.
486 (reference_binding): Binding an lvalue to an rvalue reference is bad.
487 (convert_like_real): Give a helpful error about binding lvalue
489 (reference_related_p): No longer static.
490 * typeck.c (build_typed_address): New.
491 (build_static_cast_1): Add static_cast from lvalue to &&.
494 2009-07-31 Jason Merrill <jason@redhat.com>
496 * call.c (reference_binding): Rename lvalue_p to is_lvalue.
497 Do direct binding of "rvalues" in memory to rvalue references.
498 * tree.c (lvalue_p_1): Can't be both non-addressable lvalue and
500 * typeck.c (build_static_cast_1): Do direct binding of memory
501 "rvalues" to rvalue references.
502 * cvt.c (cp_fold_convert): New.
503 * cp-tree.h: Declare it.
505 2009-07-31 Jason Merrill <jason@redhat.com>
507 * typeck.c (build_address): Do fold away ADDR_EXPR of INDIRECT_REF.
508 * tree.c (rvalue): Use cp_build_qualified_type, not TYPE_MAIN_VARIANT.
510 2009-07-29 Jason Merrill <jason@redhat.com>
513 * cp-tree.h (enum tsubst_flags): Add tf_no_class_instantiations.
514 * error.c (count_non_default_template_args): Pass it.
515 * pt.c (tsubst) [TYPENAME_TYPE]: Don't complete type if it's set.
517 2009-07-29 Richard Guenther <rguenther@suse.de>
520 * cp-gimplify.c (cp_genericize_r): Properly walk the BIND_EXPR
523 2009-07-26 Simon Martin <simartin@users.sourceforge.net>
526 * decl.c (grokdeclarator): Do not set TREE_NO_WARNING for functions
527 with a qualified return type.
529 2009-07-24 Jason Merrill <jason@redhat.com>
532 * call.c (build_op_delete_call): If this is for a new-expression
533 and the op delete is deleted, do nothing.
536 * call.c (compare_ics): Give list-initialization of std::init_list
537 priority over conversion to scalar, too.
539 2009-07-22 Jason Merrill <jason@redhat.com>
541 * mangle.c (mangle_type_string_for_rtti): Rename to be clearer.
542 (needs_fake_anon): New.
543 (write_name): Check it.
544 (write_nested_name): Add a fake anonymous namespace scope if true.
545 * name-lookup.c (get_anonymous_namespace_name): No longer static.
546 * rtti.c, cp-tree.h: Adjust.
548 2009-07-22 Richard Guenther <rguenther@suse.de>
551 * cp-gimplify.c (cp_gimplify_expr): Move handling of using
553 (cp_genericize_r): ... genericization stage.
554 (cp_genericize): Adjust.
556 2009-07-21 Jason Merrill <jason@redhat.com>
559 * call.c (reference_binding): Implement binding to { }.
560 (initialize_reference): Binding temporary to non-const && is fine.
561 * decl.c (grok_reference_init): Remove error for CONSTRUCTOR.
563 * decl.c (reshape_init_r): { T } is not an aggregate initializer
566 2009-07-17 Richard Guenther <rguenther@suse.de>
569 * decl.c (finish_function): Do not emit unused result warnings
571 * cp-objcp-common.h (LANG_HOOKS_POST_GIMPLIFY_PASS): Use
572 c_warn_unused_result_pass.
573 * semantics.c (expand_or_defer_fn): Adjust assertion about IL status.
574 * optimize.c (clone_body): Clone in GENERIC.
575 (maybe_clone_body): Do not clear DECL_SAVED_TREE.
576 * decl2.c (cp_write_global_declarations): Fix body test.
577 Do not call cgraph_optimize.
578 * Make-lang.in (optimize.o): Add tree-iterator.h dependency.
579 * method.c (use_thunk): Register thunk with
580 cgraph_finalize_function.
581 * error.c (function_category): Guard access of DECL_LANG_SPECIFIC.
583 2009-07-17 Richard Guenther <rguenther@suse.de>
585 * init.c (build_vec_delete_1): Do not set DECL_REGISTER on the
588 2009-07-17 Aldy Hernandez <aldyh@redhat.com>
589 Manuel López-Ibáñez <manu@gcc.gnu.org>
592 * typeck.c, init.c, class.c, method.c, rtti.c, except.c, error.c,
593 tree.c, cp-gimplify.c, cxx-pretty-print.c, pt.c, semantics.c,
594 call.c, cvt.c, mangle.c: Add location argument to
595 fold_{unary,binary,ternary}, fold_build[123], build_call_expr,
596 build_size_arg, build_fold_addr_expr, build_call_array,
597 non_lvalue, size_diffop, fold_build1_initializer,
598 fold_build2_initializer, fold_build3_initializer,
599 fold_build_call_array, fold_build_call_array_initializer,
600 fold_single_bit_test, omit_one_operand, omit_two_operands,
601 invert_truthvalue, fold_truth_not_expr, build_fold_indirect_ref,
602 fold_indirect_ref, combine_comparisons, fold_builtin_*,
603 fold_call_expr, build_range_check, maybe_fold_offset_to_address,
604 round_up, round_down.
606 2009-07-16 Jason Merrill <jason@redhat.com>
609 Split POD into "standard-layout" and "trivial" as per N2230,
610 Support std::is_standard_layout and std::is_trivial traits.
611 * cp-tree.h (enum cp_trait_kind): Add CPTK_IS_STD_LAYOUT,
613 (struct lang_type_class): Add non_std_layout.
614 (CLASSTYPE_NON_STD_LAYOUT): New.
615 * class.c (check_bases): Set it.
616 (check_field_decls): Likewise.
617 (check_bases_and_members): Likewise.
618 * parser.c (cp_parser_primary_expression): Handle RID_IS_STD_LAYOUT,
620 (cp_parser_trait_expr): Likewise.
621 * semantics.c (trait_expr_value): Handle CPTK_IS_STD_LAYOUT,
623 (finish_trait_expr): Likewise.
624 * tree.c (scalarish_type_p, trivial_type_p, std_layout_type_p): New.
625 (pod_type_p): Use them.
626 (type_has_nontrivial_copy_init, type_has_nontrivial_default_init): New.
628 Adjust bits of the language that no longer refer to POD types.
629 * call.c (convert_arg_to_ellipsis): Use type_has_nontrivial_copy_init
630 and TYPE_HAS_NONTRIVIAL_DESTRUCTOR rather than pod_type_p.
631 (build_x_va_arg): Likewise.
632 (call_builtin_trap): Remove.
633 * decl.c (declare_local_label): Use type_has_nontrivial_default_init
634 and TYPE_HAS_NONTRIVIAL_DESTRUCTOR rather than pod_type_p.
635 (cp_finish_decl): Likewise.
636 (check_previous_goto_1, check_goto): Adjust error.
637 * typeck.c (build_class_member_access_expr): Check
638 CLASSTYPE_NON_STD_LAYOUT rather than CLASSTYPE_NON_POD_P.
640 2009-07-14 Taras Glek <tglek@mozilla.com>
641 Rafael Espindola <espindola@google.com>
643 * Make-lang.in: Added CP_PLUGIN_HEADERS and
644 c.install-target to export cp-tree.h cxx-pretty-print.h
645 name-lookup.h headers for plugins.
647 2009-07-14 Jason Merrill <jason@redhat.com>
650 * decl.c (decls_match): A non-extern-C declaration doesn't match
651 a builtin extern-C declaration.
654 * name-lookup.c (qualified_lookup_using_namespace): Don't stop
655 looking in used namespaces just because we found something on
659 * semantics.c (perform_koenig_lookup): Handle empty template args.
661 * call.c (build_over_call): Use can_trust_pointer_alignment.
663 2009-07-14 Dodji Seketeli <dodji@redhat.com>
667 * decl2.c (grokfield): Don't call set_underlying_type on typedef
668 decls that are type names.
670 2009-07-13 Andrew Pinski <andrew_pinski@playstation.sony.com>
673 * parser.c (cp_parser_elaborated_type_specifier): Accept typename in
674 front of qualified names.
676 2009-07-12 Jason Merrill <jason@redhat.com>
679 * tree.c (rvalue): Use lvalue_or_rvalue_with_address_p.
682 * cp-tree.h (enum cp_lvalue_kind_flags): Add clk_rvalueref.
683 * tree.c (lvalue_p_1): Return it. Remove
684 treat_class_rvalues_as_lvalues parm.
685 (real_lvalue_p): Disallow pseudo-lvalues here.
686 (lvalue_or_rvalue_with_address_p): New fn.
687 * call.c (initialize_reference): Use it instead of real_lvalue_p.
690 * init.c (build_new_1): Handle initializer list as array initializer.
691 (build_vec_init): Likewise.
692 * typeck.c (cp_build_modify_expr): Likewise.
693 * typeck2.c (process_init_constructor_array): Error rather than abort
694 if too many initializers.
696 2009-07-10 Jakub Jelinek <jakub@redhat.com>
699 * error.c (cp_print_error_function): Check for NULL block.
701 2008-07-09 Simon Martin <simartin@users.sourceforge.net>
702 Jason Merrill <jason@redhat.com>
704 * pt.c (perform_typedefs_access_check, get_types_needing_access_check,
705 append_type_to_template_for_access_check_1): Use CLASS_TYPE_P.
707 2009-07-09 Dodji Seketeli <dodji@redhat.com>
710 * pt.c (type_unification_real): Use tsubst_template_arg instead
711 of tsubst to substitute default template arguments.
713 2009-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
716 * init.c (build_new_1): Set TREE_NO_WARNING for compiler-generated
718 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
721 2009-07-07 Jason Merrill <jason@redhat.com>
724 * pt.c (tsubst_decl): Don't abort if we didn't change anything
725 in a TEMPLATE_DECL's args.
727 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
729 * semantics.c (finalize_nrv_r): Replace EXPR_LOCUS by
732 2009-07-07 Jason Merrill <jason@redhat.com>
735 * decl.c (build_enumerator): Don't add enumerators for a
736 scoped enum to the enclosing class.
739 * decl.c (start_enum): Allow dependent underlying type.
742 * decl.c (finish_enum): Finish scope even in a template.
744 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
746 * init.c: Replace %J by an explicit location. Update all calls.
748 * typeck2.c: Likewise.
750 * name-lookup.c: Likewise.
752 2009-07-06 Manuel López-Ibáñez <manu@gcc.gnu.org>
754 * decl.c: Replace %H by an explicit location. Update all calls.
755 * except.c: Likewise.
756 * semantics.c: Likewise.
757 * parser.c: Likewise.
759 2009-07-06 Simon Martin <simartin@users.sourceforge.net>
762 * pt.c (perform_typedefs_access_check, get_types_needing_access_check,
763 append_type_to_template_for_access_check_1): Use
764 RECORD_OR_UNION_CODE_P.
766 2009-07-04 Jason Merrill <jason@redhat.com>
768 * pt.c (retrieve_specialization): Don't get confused by a
769 using-declaration that brings in another instance of this template
772 * ptree.c (cxx_print_type): Fix logic.
774 * cp-tree.h (LANG_DECL_FN_CHECK): Fix non-checking version.
777 * cp-tree.h (struct lang_decl_parm): New.
778 (struct lang_decl): Add it.
779 (LANG_DECL_PARM_CHECK): New.
780 (DECL_PARM_INDEX): New.
781 * decl2.c (parm_index): Remove.
782 * lex.c (retrofit_lang_decl): Handle parms.
783 (cxx_dup_lang_specific_decl): Likewise.
784 * mangle.c (write_expression): Adjust.
785 * tree.c (cp_tree_equal): Adjust.
786 (decl_linkage): Only check DECL_COMDAT for functions and variables.
787 * parser.c (cp_parser_parameter_declaration_list): Set
789 * pt.c (iterative_hash_template_arg): Hash it.
791 2009-07-03 Jason Merrill <jason@redhat.com>
793 * cp-tree.h (struct lang_decl): Overhaul.
794 (struct lang_decl_flags): Remove.
795 (struct lang_decl_base): New.
796 (struct lang_decl_min): New.
797 (struct lang_decl_fn): New.
798 (struct lang_decl_ns): New.
799 (CAN_HAVE_FULL_LANG_DECL_P): Replace with LANG_DECL_HAS_MIN.
800 (LANG_DECL_MIN_CHECK): New.
801 (LANG_DECL_FN_CHECK): New.
802 (LANG_DECL_NS_CHECK): New.
803 (STRIP_TEMPLATE): New.
804 (NON_THUNK_FUNCTION_CHECK): Remove.
805 (DECL_DECLARES_FUNCTION_P): New.
807 * lex.c (retrofit_lang_decl, cxx_dup_lang_specific_decl): Adjust.
808 * decl.c (push_local_name, duplicate_decls): Adjust.
809 * decl2.c (start_objects): Don't set u2sel.
810 * semantics.c (finish_omp_threadprivate): Adjust.
811 * class.c (build_clone): Don't do much on TEMPLATE_DECLs.
812 (decl_cloned_function_p): Out-of-line implementation of macros.
813 (clone_function_decl, adjust_clone_args): Use DECL_CLONED_FUNCTION_P.
814 * mangle.c (write_unqualified_name): Don't check function flags
816 * method.c (make_alias_for): Don't set DECL_CLONED_FUNCTION.
817 * pt.c (build_template_decl): Don't set function flags.
818 (check_default_tmpl_args): Check that it's a function.
819 (instantiate_template): Use DECL_ABSTRACT_ORIGIN to find the
822 * pt.c (tsubst_decl) [FUNCTION_DECL]: Don't tsubst
823 DECL_CLONED_FUNCTION.
825 * cp-tree.h (struct lang_type_class): Move sorted_fields here.
826 * class.c (finish_struct_1): Adjust.
827 * ptree.c (cxx_print_decl, cxx_print_type): Adjust.
828 * search.c (lookup_field_1): Adjust.
830 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Remove.
831 * decl.c (finish_method): Don't add to it.
832 * class.c (fixup_pending_inline): Remove.
833 (fixup_inline_methods): Remove.
834 (finish_struct_1): Don't call it.
836 * error.c (dump_function_name): Handle null name.
838 2009-07-02 Mark Mitchell <mark@codesourcery.com>
840 * typeck.c (cp_build_binary_op): Move warnings about use of NULL
841 in arithmetic earlier and allow comparisions of NULL with
844 2009-07-02 Jason Merrill <jason@redhat.com>
846 Use hash tables for template specialization lookup.
847 * pt.c (struct spec_entry): New type.
848 (decl_specializations, type_specializations): New hash tables.
849 (register_specialization, retrieve_specialization): Use them.
850 (reregister_specialization, lookup_template_class): Use them.
851 (eq_specializations, hash_tmpl_and_args, hash_specialization): New.
852 (iterative_hash_template_arg): New.
853 (init_template_processing): New
854 (process_partial_specialization): Don't look to see if we already
855 have this partial specialization.
856 (maybe_process_partial_specialization): Handle reassigning
857 full specializations when we get an explicit specialization
858 of the partial instantiation.
859 (tsubst_friend_function): Adjust specialization reassignment code.
860 (instantiate_template): Only do one lookup.
861 (instantiate_decl): Don't do any lookup.
862 * cp-tree.h: Declare init_template_processing.
863 * decl.c (duplicate_decls): Pass args to reregister_specialization.
865 2009-07-01 Jason Merrill <jason@redhat.com>
867 * cp-tree.h (DECL_CLASS_TEMPLATE_P): Use DECL_IMPLICIT_TYPEDEF_P.
869 * pt.c (register_specialization): Use duplicate_decls to merge
870 the argument with a previous specialization.
871 (check_explicit_specialization): Call register_specialization to
872 merge the TEMPLATE_DECL with a previous version.
873 (determine_specialization): Return the args even if fn is a template.
875 2009-07-01 Ian Lance Taylor <iant@google.com>
877 * g++spec.c (lang_specific_driver): Bump num_args by 1.
879 2009-06-30 Jason Merrill <jason@redhat.com>
882 * pt.c (tsubst_pack_expansion): Handle unexpanded packs in an
885 2009-06-29 Jason Merrill <jason@redhat.com>
888 * error.c (dump_template_parms): Pass all args to
889 count_non_default_template_args.
890 (count_non_default_template_args): Pull out the inner ones.
892 2009-06-26 H.J. Lu <hongjiu.lu@intel.com>
894 * decl.c (duplicate_decls): Re-indent.
896 2009-06-25 Ian Lance Taylor <iant@google.com>
898 * call.c (avoid_sign_compare_warnings): New static function.
899 (build_new_op): Call it.
900 * typeck.c (cp_build_binary_op): Don't call warn_sign_compare if
901 TREE_NO_WARNING is set on either operand.
903 2009-06-25 Ian Lance Taylor <iant@google.com>
905 * g++spec.c (SKIPOPT): define.
906 (lang_specific_driver): Handle -static-libstdc++. Only add
907 LIBSTDCXX_STATIC if we add LIBSTDCXX.
909 2009-06-25 Ian Lance Taylor <iant@google.com>
911 * cvt.c (convert_to_void): Only warn about COND_EXPR if neither
912 the second nor third operand has side effects.
914 2009-06-25 Ian Lance Taylor <iant@google.com>
916 * parser.c (cp_parser_binary_expression): Increment
917 c_inhibit_evaluation_warnings while parsing the right hand side of
918 "true || x" or "false && x".
919 * typeck.c (cp_build_binary_op): Only call warn_for_sign_compare
920 if c_inhibit_evaluation_warnings is zero.
922 2009-06-24 Jason Merrill <jason@redhat.com>
924 * error.c (dump_decl): Do say "typedef" for the injected class name.
926 * pt.c (lookup_template_class): Use currently_open_class,
927 compare template args later.
930 * decl.c (decls_match): Check DECL_TI_TEMPLATE too.
931 * class.c (resolve_address_of_overloaded_function): Fix typo.
933 2009-06-18 Aldy Hernandez <aldyh@redhat.com>
935 * class.c (get_vtable_decl): Replace finish_decl with cp_finish_decl.
936 * decl.c (finish_decl): Remove.
937 (declare_global_var): Replace finish_decl with cp_finish_decl.
938 (start_method): Same.
939 * rtti.c (emit_tinfo_decl): Same.
940 * pt.c (tsubst_expr): Same.
941 (instantiate_decl): Same.
942 * decl2.c (grokbitfield): Same.
943 * name-lookup.c (pushdecl_top_level_1): Same.
944 * cp-tree.h: Remove finish_decl.
946 2009-06-16 David Edelsohn <edelsohn@gnu.org>
948 * g++-spec.c (LIBSTDCXX_STATIC): Default to NULL.
949 (lang_specific_driver): Always allocate extra argument.
950 Add LIBSTDCXX_STATIC to arglist if defined and linking
953 2009-06-16 Ian Lance Taylor <iant@google.com>
955 * Make-lang.in (cp/class.o): Depend upon gt-cp-class.h.
956 (cp/semantics.o): Depend upon gt-cp-semantics.h.
958 2009-06-16 Ian Lance Taylor <iant@google.com>
960 * parser.c (cp_unevaluated_operand): Define global variable.
961 (cp_parser_question_colon_clause): Increment
962 c_inhibit_evaluation_warnings when evaluating an expression which
963 will never be executed.
964 (cp_parser_decltype): Increment cp_unevaluated_operand and
965 c_inhibit_evaluation_warnings, not skip_evaluation.
966 (cp_parser_sizeof_operand): Likewise.
967 (cp_parser_enclosed_template_argument_list): Save
968 cp_unevaluated_operand and c_inhibit_evaluation_warnings, not
970 * cp-tree.h (struct saved_scope): Remove skip_evaluation field.
971 Add unevaluated_operand and inhibit_evaluation_warnings fields.
972 (cp_unevaluated_operand): Declare.
973 * name-lookup.c (push_to_top_level): Save cp_unevaluated_operand
974 and c_inhibit_evaluation_warnings rather than skip_evaluation.
975 (pop_from_top_level): Restore cp_unevaluated_operand and
976 c_inhibit_evaluation_warnings rather than skip_evaluation.
977 * class.c (build_base_path): Check cp_unevaluated_operand rather
978 than skip_evaluation.
979 * typeck.c (build_class_member_access_expr): Likewise.
980 (cp_build_binary_op): Don't warn about bad shift counts if
981 c_inhibit_evaluation_warnings is non-zero.
982 * pt.c (coerce_template_parms): Save state of
983 cp_unevaluated_operand and c_inhibit_evaluation_warnings, not
985 (tsubst_aggr_type): Likewise.
986 (tsubst_pack_expansion): Check cp_unevaluated_operand rather than
988 (tsubst_copy): Likewise.
989 (tsubst): Set cp_unevaluated_operand and
990 c_inhibit_evaluation_warnings, not skip_evaluation.
991 (tsubst_copy_and_build): Likewise.
992 * call.c (convert_arg_to_ellipsis): Check cp_unevaluated_operand
993 rather than skip_evaluation.
994 * decl2.c (mark_used): Likewise.
995 * semantics.c (finish_non_static_data_member): Likewise.
996 * cvt.c (cp_convert_and_check): Check
997 c_inhibit_evaluation_warnings rather than skip_evaluation.
998 * mangle.c (write_type): Set cp_unevaluated_operand rather than
1001 2009-06-15 Ian Lance Taylor <iant@google.com>
1003 * parser.c (cp_parser_direct_declarator): Add braces around
1004 variables declared before label.
1006 2009-06-15 Rafael Avila de Espindola <espindola@google.com>
1008 * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Remove.
1009 * cp-tree.h (cxx_comdat_group): Change signature.
1010 * decl.c (duplicate_decls): Use DECL_COMDAT_GROUP.
1011 (cxx_comdat_group): Change signature.
1012 * decl2.c (comdat_linkage, maybe_make_one_only): Update call to
1014 (constrain_visibility, get_guard): Use DECL_COMDAT_GROUP.
1015 * method.c (use_thunk): Update call to make_decl_one_only.
1016 * optimize.c (maybe_clone_body): Use DECL_COMDAT_GROUP
1018 2009-06-12 Aldy Hernandez <aldyh@redhat.com>
1020 * typeck.c (cp_build_binary_op): Pass location to overflow_warning.
1021 (build_modify_expr): New arg.
1022 * semantics.c (finish_unary_op_expr): Pass location to
1024 (handle_omp_for_class_iterator): Pass location to build_modify_expr.
1025 * typeck.c (cxx_sizeof_or_alignof_type): Pass location to
1026 c_sizeof_or_alignof_type.
1027 (build_array_ref): New argument.
1028 (build_compound_expr): Same.
1029 (build_const_cast): Same.
1030 (build_ptrmemfunc): Pass location to build_c_cast.
1031 * init.c (avoid_placement_new_aliasing): Pass location to
1033 (build_vec_delete_1): Pass location to cp_build_modify_expr,
1034 build_compound_expr.
1035 * class.c (build_vtbl_ref_1): Pass location to build_array_ref.
1036 * decl.c (poplevel): Pass location to c_build_bind_expr.
1037 (finish_case_label): Pass location to build_case_label.
1038 (finish_constructor_body): Same.
1039 (finish_destructor_body): Pass location to build_stmt.
1040 (cxx_maybe_build_cleanup): Same, but to build_compound_expr.
1041 * call.c (build_new_op): Pass location to build_array_ref.
1042 (build_x_va_arg): Pass location to build_va_arg.
1043 * except.c (expand_end_catch_block): Pass location to
1045 * cp-tree.h (build_array_ref): New argument.
1046 (build_compound_expr): Same.
1047 (build_c_cast): Same.
1048 * cp-gimplify.c (gimplify_if_stmt): Pass location on down.
1049 (gimplify_switch_stmt): Same.
1050 * typeck2.c (split_nonconstant_init_1): Same.
1051 * pt.c (tsubst_copy): Same.
1052 * semantics.c (add_decl_expr): Same.
1053 (do_poplevel): Same.
1054 (push_cleanup): Same.
1055 (finish_goto_stmt): Same.
1056 (finish_expr_stmt): Same.
1057 (begin_if_stmt): Same.
1058 (begin_while_stmt): Same.
1059 (begin_do_stmt): Same.
1060 (finish_return_stmt): Same.
1061 (begin_for_stmt): Same.
1062 (finish_break_stmt): Same.
1063 (finish_continue_stmt): Same.
1064 (begin_switch_stmt): Same.
1065 (begin_try_block): Same.
1066 (begin_handler): Same.
1067 (finish_asm_stmt): Same.
1068 (finish_label_stmt): Same.
1069 (finish_stmt_expr_expr): Same.
1070 (finalize_nrv_r): Same.
1071 (finish_omp_atomic): Same.
1072 * name-lookup.c (do_using_directive): Same.
1073 * decl2.c (grok_array_decl): Same.
1074 * parser.c (cp_parser_cast_expression): Same.
1075 (cp_parser_selection_statement): Same.
1076 (cp_parser_implicitly_scoped_statement): Same.
1077 (cp_parser_objc_selector_expression): Same.
1078 (cp_parser_objc_synchronized_statement): Same.
1079 (cp_parser_objc_throw_statement): Same.
1080 (cp_parser_omp_critical): Same.
1081 (cp_parser_omp_master): Same.
1082 * typeck.c (build_function_call): Add location argument.
1083 * init.c: Add location argument to all build_decl calls.
1089 * semantics.c: Same.
1092 * cp-gimplify.c: Same.
1094 (cp_make_fname_decl): Add location argument. Pass location ot
1096 (finish_case_label): Same.
1097 * cp-tree.h (finish_case_label): Add location argument.
1098 * parser.c (cp_parser_label_for_labeled_statement): Pass location to
1101 2009-06-09 Jason Merrill <jason@redhat.com>
1104 * decl2.c (mark_used): Return after complaining about deleted fn.
1106 2009-06-08 Jason Merrill <jason@redhat.com>
1108 * parser.c (cp_parser_type_id_1): 'auto' type is ok with a
1109 late-specified return type.
1111 2009-06-08 Jakub Jelinek <jakub@redhat.com>
1114 * call.c (check_dtor_name): Return false even if
1115 get_type_value (name) is error_mark_node.
1119 * parser.c (cp_parser_direct_declarator): Don't set TREE_SIDE_EFFECTS
1120 on error_mark_node. Check for VLAs outside of function context
1121 before check whether to wrap bounds into a NOP_EXPR with
1124 2009-06-08 Alexandre Oliva <aoliva@redhat.com>
1126 * repo.c (get_base_filename): Use aux_base_name rather than
1127 alternate temporary file during second compare debug compilation.
1128 (finish_repo): Skip during -fcompare-debug-second.
1130 2009-06-06 Ian Lance Taylor <iant@google.com>
1132 * parser.c (cp_parser_label_for_labeled_statement): Support
1133 attribute on labels if immediately followed by semicolon.
1134 * semantics.c (finish_label_stmt): Return new label.
1135 * pt.c (tsubst_expr): Handle attributes for LABEL_EXPR.
1137 2009-06-03 Ian Lance Taylor <iant@google.com>
1139 * Make-lang.in (cc1plus-checksum.o): Depend upon $(CONFIG_H) and
1142 2009-06-02 Mark Mitchell <mark@codesourcery.com>
1144 * decl.c (maybe_deduce_size_from_array_init): Use relayout_decl.
1146 2009-06-02 Jason Merrill <jason@redhat.com>
1150 * typeck.c (cp_build_modify_expr): Always pass init-lists to the
1152 * call.c (implicit_conversion): Allow init-list conversion to scalar
1153 during direct-initialization, too. Mark the conversion bad if it
1154 has too many levels of braces.
1155 (convert_like_real): And give a helpful error.
1159 * decl.c (cp_finish_decl): Handle auto deduction from ().
1160 * typeck.c (build_x_indirect_ref): Handle dereferencing an operand
1161 with dependent type that is known to be a pointer.
1163 2009-06-02 Simon Martin <simartin@users.sourceforge.net>
1166 * pt.c (register_specialization): Properly setup DECL_CONTEXT for
1167 specializations in an invalid namespace.
1169 2009-06-01 Aldy Hernandez <aldyh@redhat.com>
1171 * error.c (print_instantiation_partial_context): Print column
1174 2009-05-29 Ian Lance Taylor <iant@google.com>
1176 * error.c (cp_printer): Don't use va_arg with enum type.
1178 2009-05-28 Dodji Seketeli <dodji@redhat.com>
1181 * cp-tree.h (canonical_type_variant): Remove this function declaration.
1182 (strip_typedefs): New function declaration.
1183 * tree.c (strip_typedefs): New function definition.
1184 (canonical_type_variant): Remove function definition.
1185 * cvt.c (convert_from_reference): No need to use
1186 canonical_type_variant.
1187 * typeck.c (cp_build_indirect_ref): Likewise.
1188 * error.c (dump_template_bindings): Use strip_typedefs instead of
1189 canonical_type_variant.
1190 * pt.c (convert_template_argument, unify): Likewise.
1191 * mangle.c (canonicalize_for_substitution): Don't use
1192 canonical_type_variant.
1194 2009-05-27 Jason Merrill <jason@redhat.com>
1196 * call.c (implicit_conversion): Handle conversion from
1197 initializer-list to scalar.
1198 (convert_like_real): Likewise. Avoid crashing on list
1199 initialization with bad conversions.
1200 (can_convert): Use LOOKUP_EXPLICIT.
1201 (can_convert_arg_bad): Add flags parm.
1202 * cp-tree.h: Adjust.
1203 * typeck.c (convert_for_assignment): Pass flags.
1205 2009-05-27 Ian Lance Taylor <iant@google.com>
1207 * Make-lang.in (g++$(exeext)): Change $(COMPILER) to $(LINKER).
1208 (cc1plus-dummy$(exeext), cc1plus$(exeext)): Likewise.
1210 2009-05-26 Ian Lance Taylor <iant@google.com>
1212 * Make-lang.in (g++spec.o): Use $(COMPILER).
1213 (g++$(exeext), cc1plus-dummy$(exeext)): Likewise.
1214 (cc1plus$(exeext)): Likewise.
1216 2009-05-26 Dodji Seketeli <dodji@redhat.com>
1219 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Remove this accessor.
1220 (TI_TYPEDEFS_NEEDING_ACCESS_CHECKING): New accessor.
1221 (get_types_needing_access_check): Declare new entry point.
1222 * pt.c (append_type_to_template_for_access_check_1,
1223 get_types_needing_access_check): New functions.
1224 (perform_typedefs_access_check): Accept FUNCTION_DECLs and
1225 RECORD_TYPEs rather than TEMPLATE_DECLs. Use the new
1226 get_types_needing_access_check, no more
1227 MEMBER_TYPES_NEEDING_ACCESS_CHECK.
1228 (instantiate_class_template): Set input_location to the source
1229 location of the most specialized template definition.
1230 Perform access check using the RECORD_TYPE of the template, not its
1231 associated most generic TEMPLATE_DECL.
1232 (append_type_to_template_for_access_check): Augment function
1233 comments. Use the new get_types_needing_access_check, not
1234 MEMBER_TYPE_NEEDING_ACCESS_CHECK. Use the new
1235 append_type_to_template_for_access_check_1 subroutine.
1237 2009-05-22 Jason Merrill <jason@redhat.com>
1240 * typeck.c (cp_build_binary_op): Allow ENUMERAL_TYPE in
1241 arithmetic comparisons.
1242 (cp_common_type): Handle scoped enums.
1244 * call.c (promoted_arithmetic_type_p): Don't use INTEGRAL_TYPE_P.
1245 (add_builtin_candidate, add_builtin_candidates): Likewise.
1246 (convert_like_real): Likewise.
1247 * class.c (check_bitfield_decl): Likewise.
1248 * decl.c (check_static_variable_definition): Likewise.
1249 (compute_array_index_type): Likewise.
1250 * decl2.c (grokbitfield): Likewise.
1251 * init.c (build_new_1): Likewise.
1252 * pt.c (convert_nontype_argument): Likewise.
1253 (current_instantiation): Likewise.
1254 * tree.c (pod_type_p): Likewise.
1255 * typeck.c (build_static_cast_1): Likewise.
1256 (build_reinterpret_cast_1): Likewise.
1258 2009-05-22 Richard Guenther <rguenther@suse.de>
1261 * init.c (avoid_placement_new_aliasing): Remove.
1262 (build_new_1): Do not call it.
1264 2009-05-22 Mark Mitchell <mark@codesourcery.com>
1266 * decl2.c (decl_needed_p): Consider dllexport'd functions needed.
1267 * semantics.c (expand_or_defer_fn): Similarly.
1269 2009-05-20 Ian Lance Taylor <iant@google.com>
1271 * parser.c (cp_parser_postfix_expression): Change args to a vec.
1272 Release it when done.
1273 (tree_vector): Define typedef. Define VEC functions.
1274 (cp_parser_parenthesized_expression_list): Change return type to
1275 vec. Change all callers.
1276 (cp_parser_new_expression): Change placement and initializer to
1277 vecs. Release them when done.
1278 (cp_parser_new_placement): Change return type to vec. Change all
1280 (cp_parser_new_initializer): Likewise.
1281 * typeck.c (build_function_call_vec): Just call
1282 cp_build_function_call_vec.
1283 (cp_build_function_call): Just build a vec and call
1284 cp_build_function_call_vec.
1285 (cp_build_function_call_vec): New function based on old
1286 cp_build_function_call.
1287 (convert_arguments): Remove nargs and argarray parameters. Change
1288 values to a vec. Change caller.
1289 (build_x_compound_expr_from_vec): New function.
1290 (cp_build_modify_expr): Build vec to pass to
1291 build_special_member_call.
1292 * call.c (struct z_candidate): Add first_arg field. Change args
1294 (convert_class_to_reference): Handle first argument separately.
1295 (add_candidate): Add first_arg parameter. Change args parameter
1296 to vec. Change all callers.
1297 (add_function_candidate, add_conv_candidate): Likewise.
1298 (add_template_candidate_real, add_template_candidate): Likewise.
1299 (add_template_conv_candidate): Likewise.
1300 (build_user_type_conversion_1): Handle first argument separately.
1301 (resolve_args): Change return type and parameter type to vecs.
1303 (perform_overload_resolution): Change args parameter to vec.
1305 (build_new_function_call, build_operator_new_call): Likewise.
1306 (add_candidates): Likewise.
1307 (build_op_call): New globally visible function, built from and
1308 replacing static function build_object_call.
1309 (build_new_op): Don't handle CALL_EXPR. Build vec, not tree_list,
1311 (build_op_delete_call): Build vec to pass to
1312 cp_build_function_call_vec.
1313 (build_temp): Build vec to pass to build_special_member_call.
1314 (convert_like_real): Likewise.
1315 (perform_direct_initialization_if_possible): Likewise.
1316 (build_over_call): Handle first_arg field. Use build_call_array
1317 rather than build_call_list.
1318 (build_special_member_call): Change args parameter to vec. Change
1320 (build_new_method_call): Likewise.
1321 * init.c (expand_default_init): Change parms to vec.
1322 (build_raw_new_expr): Change placement and init to vecs. Change
1324 (build_new_1, build_new): Likewise.
1325 * class.c (resolve_address_of_overloaded_function): Build array to
1326 pass to fn_type_unification.
1327 * pt.c (tsubst_copy_and_build): For NEW_EXPR build vecs to pass to
1328 build_new. For CALL_EXPR create a vec rather than a tree_list;
1329 expand a pack if necessary.
1330 (fn_type_unification): Change args parameter to const tree *. Add
1331 nargs parameter. Change all callers.
1332 (type_unification_real): Likewise.
1333 (unify): Build array to pass to type_unification_real.
1334 (get_bindings): Build array to pass to fn_type_unification.
1335 (any_type_dependent_arguments_p): Change args parameter to a vec.
1337 (make_args_non_dependent): Renamed from build_non_dependent_args.
1338 Change return type to void. Change parameter type to vec. Change
1340 (do_auto_deduction): Pass an array to type_unification_real.
1341 * semantics.c (perform_koenig_lookup): Change args to vec. Change
1343 (finish_call_expr): Change args to vec. Change all callers. Call
1344 build_op_call instead of passing CALL_EXPR to build_new_op.
1345 (cxx_omp_create_clause_info): Allocate vec to pass to
1346 build_special_member_call.
1347 * decl2.c (build_offset_ref_call_from_tree): Change args parameter
1348 to vec. Change all callers.
1349 * name-lookup.c (lookup_function_nonclass): Likewise.
1350 (struct arg_lookup): Change args to vec.
1351 (arg_assoc_namespace): Handle args as a vec.
1352 (arg_assoc_args_vec): New static function.
1353 (lookup_arg_dependent): Change args parameter to vec. Change all
1355 * method.c (do_build_assign_ref): Allocate vec to pass to
1356 build_special_member_call.
1357 * except.c (build_throw): Likewise.
1358 * typeck2.c (build_functional_cast): Likewise.
1359 * cvt.c (ocp_convert): Likewise.
1360 * tree.c (build_min_non_dep_call_vec): Change last parameter to
1361 vec. Change all callers.
1362 * cp-tree.h: Update declarations.
1363 * name-lookup.h: Update declarations.
1365 2009-05-20 Sandra Loosemore <sandra@codesourcery.com>
1367 * typeck.c (default_conversion): Check targetm.promoted_type.
1368 * decl.c (grokdeclarator): Check targetm.invalid_return_type.
1369 (grokparms): Check targetm.invalid_parameter_type.
1370 * cvt.c (ocp_convert): Check targetm.convert_to_type.
1371 (build_expr_type_conversion): Check targetm.promoted_type.
1373 2009-05-19 Andrew Pinski <andrew_pinski@playstation.sony.com>
1375 * typeck.c (build_binary_op): Allow % on integal vectors.
1377 2009-05-18 Jason Merrill <jason@redhat.com>
1379 Implement explicit conversions ops as specified in N2437.
1380 * decl.c (grokdeclarator): Handle explicit conversion ops.
1381 (check_initializer): Pass flags to store_init_value.
1382 * decl2.c (maybe_emit_vtables): Likewise.
1383 * init.c (expand_aggr_init_1): Likewise.
1384 * call.c (convert_class_to_reference): Take flags parm,
1385 check DECL_NONCONVERTING_P.
1386 (build_user_type_conversion_1): Check DECL_NONCONVERTING_P.
1387 (add_builtin_candidates): Simplify getting type of conversion.
1388 (build_object_call): Likewise. Check DECL_NONCONVERTING_P.
1389 (implicit_conversion): Pass through LOOKUP_ONLYCONVERTING.
1390 (reference_binding): Take flags parm. Direct-initialize copy parm.
1391 (add_function_candidate): Direct-initialize the copy parm.
1392 (add_conv_candidate): Use LOOKUP_IMPLICIT, not LOOKUP_NORMAL.
1393 (build_builtin_candidate): Add LOOKUP_ONLYCONVERTING.
1394 (conditional_conversion): Likewise.
1395 (convert_like_real): Only complain about DECL_NONCONVERTING_P
1397 (perform_implicit_conversion_flags): Add flags parm to
1398 perform_implicit_conversion. Improve diagnostics.
1399 * cp-tree.h (LOOKUP_IMPLICIT): New macro.
1400 (LOOKUP_COPY_PARM): New bit macro.
1401 * cvt.c (build_expr_type_conversion): Check DECL_NONCONVERTING_P.
1402 * typeck.c (convert_for_assignment): Take flags parm, pass it to
1403 perform_implicit_conversion_flags.
1404 (cp_build_modify_expr): Pass flags to convert_for_assignment.
1405 (convert_for_initialization): Likewise.
1406 * typeck2.c (store_init_value): Take flags parm, pass to
1408 (digest_init_flags): Add flags parm to digest_init.
1409 (digest_init_r): Take flags parm, pass to convert_for_initialization.
1410 (process_init_constructor_array): Pass it.
1411 (process_init_constructor_record): Likewise.
1412 (process_init_constructor_union): Likewise.
1414 2009-05-16 Jason Merrill <jason@redhat.com>
1417 * pt.c (tsubst_qualified_id): Retain the type if we aren't dealing
1418 with a dependent type. Actually look up the destructor.
1419 * semantics.c (finish_id_expression): Fix logic.
1420 (finish_qualified_id_expr): Don't try to use 'this' if we aren't in
1422 * typeck.c (build_x_unary_op): Diagnose taking the address of a
1423 constructor or destructor.
1424 * tree.c (get_first_fn): Handle OFFSET_REF.
1426 2009-05-17 Joseph Myers <joseph@codesourcery.com>
1428 * tree.c (cxx_printable_name_internal): Allow consecutive
1429 translated and untranslated cached copies of the name of the
1432 2009-05-15 Ian Lance Taylor <iant@google.com>
1434 * cp-tree.h (enum cp_lvalue_kind_flags): Rename from
1435 cp_lvalue_kind. Change all uses.
1436 (enum base_access_flags): Rename from enum base_access. Change
1438 * parser.c (enum cp_parser_flags): Remove enum tag.
1440 2009-05-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
1443 * call.c (build_new_op): Update calls to warn_logical_operator.
1445 2009-05-14 Ian Lance Taylor <iant@google.com>
1447 * class.c (layout_class_type): Change itk to unsigned int.
1448 * decl.c (finish_enum): Change itk to unsigned int.
1449 * parser.c (cp_parser_check_decl_spec): Change ds to int. Remove
1452 2009-05-13 David Mandelin <dmandelin@mozilla.com>:
1454 * decl.c (duplicate_decls): Preserve parameter attributes.
1456 2009-05-10 Jan Hubicka <jh@suse.cz>
1458 * decl2.c (cxx_callgraph_analyze_expr): Use
1459 cgraph_mark_address_taken.
1461 2009-05-10 Joseph Myers <joseph@codesourcery.com>
1463 * call.c (name_as_c_string): Call type_as_string_translate.
1464 Translate identifiers to locale character set.
1465 * cp-tree.h (lang_decl_name): Update prototype.
1466 (type_as_string_translate, decl_as_string_translate,
1467 cxx_printable_name_translate): Declare.
1468 * cxx-pretty-print.c (M_): Define.
1469 (pp_cxx_unqualified_id, pp_cxx_canonical_template_parameter): Mark
1470 English fragments for conditional translation with M_.
1471 * decl.c (grokdeclarator): Translate identifiers to locale
1472 character set for diagnostics.
1473 * error.c (M_): Define.
1474 (dump_template_bindings, dump_type, dump_aggr_type,
1475 dump_type_prefix, dump_global_iord, dump_simple_decl, dump_decl,
1476 dump_function_decl, dump_template_parms, dump_expr,
1477 dump_binary_op, op_to_string, assop_to_string): Mark English
1478 fragments for conditional translation with M_.
1479 (type_as_string): Disable translation of identifiers.
1480 (type_as_string_translate): New.
1481 (expr_as_string): Disable translation of identifiers.
1482 (decl_as_string): Disable translation of identifiers.
1483 (decl_as_string_translate): New.
1484 (lang_decl_name): Add parameter translate.
1485 (args_to_string): Call type_as_string_translate.
1486 (cp_print_error_function): Call cxx_printable_name_translate.
1487 (print_instantiation_full_context,
1488 print_instantiation_partial_context): Call
1489 decl_as_string_translate.
1490 * parser.c (cp_lexer_get_preprocessor_token): Use %qE for
1491 identifier in diagnostic.
1492 * tree.c (cxx_printable_name): Change to
1493 cxx_printable_name_internal. Add parameter translate.
1494 (cxx_printable_name, cxx_printable_name_translate): New wrappers
1495 round cxx_printable_name_internal.
1497 2009-05-08 H.J. Lu <hongjiu.lu@intel.com>
1500 * call.c (build_call_a): Updated warn_deprecated_use call.
1501 (build_over_call): Likewise.
1502 * decl.c (grokdeclarator): Likewise.
1503 (grokparms): Likewise.
1504 * semantics.c (finish_id_expression): Likewise.
1505 * typeck.c (build_class_member_access_expr): Likewise.
1506 (finish_class_member_access_expr): Likewise.
1508 2009-05-06 Dodji Seketeli <dodji@redhat.com>
1511 * pt.c (tsubst_copy) <case PARM_DECL>: We don't want to tsubst the
1512 whole list of PARM_DECLs, just the current one.
1514 2009-05-05 Shujing Zhao <pearly.zhao@oracle.com>
1517 (opname_tab, assignop_tab, update_member_visibility, yyerror, yyhook,
1518 mangle_compound_literal): Remove unused declarations.
1519 (build_vfield_ref, cxx_print_statistics, clone_function_decl,
1520 adjust_clone_args, maybe_push_cleanup_level, pushtag, make_anon_name,
1521 pushdecl_top_level_maybe_friend, pushdecl_top_level_and_finish,
1522 check_for_out_of_scope_variable, print_other_binding_stack,
1523 maybe_push_decl, cxx_mark_addressable, force_target_expr,
1524 build_target_expr_with_type, finish_case_label,
1525 cxx_maybe_build_cleanup, begin_eh_spec_block, finish_eh_spec_block,
1526 check_template_keyword, cxx_omp_predetermined_sharing,
1527 cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor,
1528 cxx_omp_clause_assign_op, cxx_omp_clause_dtor, cxx_omp_finish_clause,
1529 cxx_omp_privatize_by_reference): Rearrange the declarations line to
1530 match the comment that indicates the .c file which the functions are
1532 (cxx_print_xnode, cxx_print_decl, cxx_print_type,
1533 cxx_print_identifier, cxx_print_error_function, pushdecl): Add comment.
1535 2009-05-05 Nathan Sidwell <nathan@codesourcery.com>
1537 * typeck.c (cp_build_compound_expr): Require RHS to have a known
1539 * class.c (resolve_address_of_overloaded_function): Use
1540 OVL_CURRENT for error message.
1541 (instantiate_type): Forbid COMPOUND_EXPRs and remove code dealing
1542 with them. Do not copy the node.
1544 2009-05-05 Jakub Jelinek <jakub@redhat.com>
1547 * pt.c (tsubst): If magic NOP_EXPR with side-effects has no type,
1548 set it from its operand's type after tsubst_expr.
1550 2009-05-04 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1553 * parser.c (cp_lexer_get_preprocessor_token): Do not store the
1554 canonical spelling for keywords.
1555 (cp_parser_attribute_list): Use the canonical spelling for
1556 keywords in attributes.
1558 2009-05-01 Joseph Myers <joseph@codesourcery.com>
1560 * cxx-pretty-print.c (is_destructor_name, pp_cxx_unqualified_id,
1561 pp_cxx_template_keyword_if_needed, pp_cxx_postfix_expression,
1562 pp_cxx_new_expression, pp_cxx_delete_expression,
1563 pp_cxx_unary_expression, pp_cxx_assignment_operator,
1564 pp_cxx_assignment_expression, pp_cxx_expression,
1565 pp_cxx_function_specifier, pp_cxx_decl_specifier_seq,
1566 pp_cxx_simple_type_specifier, pp_cxx_type_specifier_seq,
1567 pp_cxx_exception_specification, pp_cxx_direct_declarator,
1568 pp_cxx_ctor_initializer, pp_cxx_type_id, pp_cxx_statement,
1569 pp_cxx_namespace_alias_definition, pp_cxx_template_parameter,
1570 pp_cxx_canonical_template_parameter, pp_cxx_template_declaration,
1571 pp_cxx_declaration, pp_cxx_typeid_expression,
1572 pp_cxx_va_arg_expression, pp_cxx_offsetof_expression,
1573 pp_cxx_trait_expression): Mostly use pp_string and
1574 pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
1575 for non-identifiers. Mark English strings for translation.
1576 * cxx-pretty-print.h (pp_cxx_ws_string): Define.
1577 * error.c (dump_template_parameter, dump_template_bindings,
1578 dump_type, dump_aggr_type, dump_type_prefix, dump_simple_decl,
1579 dump_decl, dump_template_decl, dump_function_decl,
1580 dump_parameters, dump_exception_spec, dump_template_parms,
1581 dump_expr, dump_binary_op, dump_unary_op, op_to_string,
1582 assop_to_string, args_to_string, cp_print_error_function,
1583 print_instantiation_full_context,
1584 print_instantiation_partial_context): Mostly use pp_string and
1585 pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
1586 for non-identifiers. Mark English strings for translation.
1587 (dump_global_iord): Mark strings for translation; use longer
1588 strings instead of substituting single words.
1589 (function_category): Return a format string marked for
1590 translation, not a single word or phrase to substitute in a longer
1593 2009-04-28 Ben Elliston <bje@au.ibm.com>
1598 2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1600 * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
1602 2009-04-27 Ian Lance Taylor <iant@google.com>
1604 * semantics.c (finish_omp_clauses): Change type of c_kind to enum
1607 2009-04-27 Jakub Jelinek <jakub@redhat.com>
1610 * cvt.c (convert_to_void) <case INDIRECT_REF>: Only warn about
1611 -Wunused-value if implicit.
1613 2009-04-24 Ian Lance Taylor <iant@google.com>
1615 * call.c (build_temp): Change 0 to enum constant.
1616 * cp-tree.h (cp_lvalue_kind): Typedef to int rather than enum
1618 * cp-gimplify.c (cp_gimplify_expr): Add cast to enum type.
1619 * decl2.c (constrain_visibility): Likewise.
1620 * parser.c (cp_lexer_get_preprocessor_token): Likewise.
1621 (cp_parser_flags): Typedef to int rather than enum type.
1622 (cp_parser_expression_stack_entry): Change prec field to enum
1625 * typeck.c (build_modify_expr): Add lhs_origtype parameter.
1628 2009-04-22 Dodji Seketeli <dodji@redhat.com>
1631 * parser.c (cp_parser_template_argument_list): Display an error
1632 when an ellipsis is not preceded by a parameter pack. Also, warn
1633 about variadic templates usage without -std=c++0x.
1635 2009-04-21 Taras Glek <tglek@mozilla.com>
1637 * cp-tree.h: Update GTY annotations to new syntax.
1639 * mangle.c: Likewise.
1640 * name-lookup.c: Likewise.
1641 * name-lookup.h: Likewise.
1642 * parser.c: Likewise.
1645 * semantics.c: Likewise.
1646 * typeck2.c: Likewise.
1648 2009-04-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1651 * parser.c (cp_parser_error): Pass token->flags to c_parse_error.
1653 2009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1656 * typeck.c (check_for_casting_away_constness): We diagnose casting
1657 away any qualifiers not just constness.
1658 (casts_away_constness): Mention that it handles more than just
1661 2009-04-21 Joseph Myers <joseph@codesourcery.com>
1663 * ChangeLog, ChangeLog-1993, ChangeLog-1994, ChangeLog-1995,
1664 ChangeLog-1996, ChangeLog-1997, ChangeLog-1998, ChangeLog-1999,
1665 ChangeLog-2000, ChangeLog-2001, ChangeLog-2002, ChangeLog-2003,
1666 ChangeLog-2004, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007,
1667 ChangeLog-2008, ChangeLog.ptr, ChangeLog.tree-ssa, NEWS,
1668 cfns.gperf: Add copyright and license notices.
1669 * cfns.h: Regenerate.
1670 * ChangeLog, ChangeLog-2004: Correct dates.
1672 2009-04-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
1675 * tree.c (lvalue_p_1): Use const_tree.
1676 Use CONST_CAST_TREE to avoid warning.
1677 (lvalue_p): Returns bool, receives const_tree.
1679 2009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1682 * parser.c (cp_parser_check_decl_spec): Drop redundant flags.
1683 * error.c (pedwarn_cxx98): New.
1684 * cp-tree.h (pedwarn_cxx98): Declare.
1686 2009-04-20 Le-Chun Wu <lcwu@google.com>
1689 * init.c (build_vec_init): Set TREE_NO_WARNING on the
1690 compiler-generated INDIRECT_REF expression.
1692 2009-04-20 Ian Lance Taylor <iant@google.com>
1694 * typeck.c (build_function_call_vec): New function.
1695 (cp_build_function_call): Only pass first parameter to
1696 objc_rewrite_function_call.
1697 (build_modify_expr): Add rhs_origtype parameter. Change all
1699 * decl.c (finish_decl): Add origtype parameter. Change all
1701 * semantics.c (finish_call_expr): Pass VEC to
1702 resolve_overloaded_builtin.
1704 2009-04-20 Ian Lance Taylor <iant@google.com>
1706 * cp-tree.h (base_access): Change typedef to int.
1707 * parser.c (cp_parser_omp_flush): Change 0 to OMP_CLAUSE_ERROR.
1708 (cp_parser_omp_threadprivate): Likewise.
1709 * pt.c (unify_pack_expansion): Add casts to enum type.
1711 2009-04-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
1715 * call.c (build_new_op): Save the original codes of operands
1718 2009-04-18 Kazu Hirata <kazu@codesourcery.com>
1720 * cp-tree.h: Remove the prototype for insert_block.
1721 * decl.c (insert_block): Remove.
1723 2009-04-16 Ian Lance Taylor <iant@google.com>
1725 * cp-tree.h (enum tsubst_flags): Rename from enum tsubst_flags_t.
1726 (tsubst_flags_t): Change typedef from enum type to int.
1728 2009-04-16 Paolo Bonzini <bonzini@gnu.org>
1730 * decl.c (check_initializer): Use TYPE_VECTOR_OPAQUE
1731 instead of targetm.vector_opaque_p.
1733 2009-04-15 Le-Chun Wu <lcwu@google.com>
1736 * call.c (build_over_call): Set TREE_NO_WARNING on the
1737 compiler-generated INDIRECT_REF expression.
1738 * cvt.c (convert_to_void): Emit warning when stripping off
1741 2009-04-14 Diego Novillo <dnovillo@google.com>
1743 * parser.c (cp_parser_type_specifier_seq): Move call to
1744 invoke_plugin_callbacks ...
1745 (cp_parser_type_specifier_seq): ... here.
1747 2009-04-14 Le-Chun Wu <lcwu@google.com>
1749 * Make-lang.in: Modify dependencies of files including plugin.h.
1750 * decl.c (finish_function): Call invoke_plugin_callbacks.
1751 * parser.c (cp_parser_type_specifier): Call invoke_plugin_callbacks.
1753 2009-04-14 Jason Merrill <jason@redhat.com>
1756 * name-lookup.c (pushdecl_maybe_friend): Avoid all warnings
1757 about shadowing by tentative parms.
1759 2009-04-13 Jason Merrill <jason@redhat.com>
1762 * call.c (build_over_call): Don't call memcpy if the target is
1763 the same as the source.
1765 2009-04-13 Jason Merrill <jason@redhat.com>
1768 * pt.c (uses_template_parms): Handle CONSTRUCTOR.
1770 2009-04-12 Jason Merrill <jason@redhat.com>
1773 * call.c (joust): Don't crash on variadic fn.
1775 2009-04-10 Jason Merrill <jason@redhat.com>
1778 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Return
1779 if we see a close brace without an open brace.
1781 2009-04-10 H.J. Lu <hongjiu.lu@intel.com>
1783 * parser.c (cp_parser_class_specifier): Remove the unused
1784 has_trailing_semicolon.
1786 2009-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
1789 * parser.c (cp_parser_check_template_parameters): Take a
1790 cp_declarator parameter.
1791 (cp_parser_elaborated_type_specifier): Update to
1792 cp_parser_check_template_parameters.
1793 (cp_parser_class_head): Likewise.
1794 (cp_parser_check_declarator_template_parameters): Likewise.
1795 (cp_parser_check_template_parameters): Handle first the non-error
1796 conditions. Give more accurate diagnostics if a declarator is
1799 2009-04-08 Jason Merrill <jason@redhat.com>
1802 * error.c (dump_aggr_type): Chase template typedefs if
1803 -fno-pretty-templates.
1805 2009-04-08 Dodji Seketeli <dodji@redhat.com>
1808 * parser.c (cp_parser_enumerator_definition): Make sure the
1809 initializer of the enumerator doesn't contain any bare parameter pack.
1811 2009-04-07 Jason Merrill <jason@redhat.com>
1814 * name-lookup.c (merge_functions): Keep multiple extern "C" functions.
1815 * call.c (joust): Complain about mismatched default arguments
1816 in extern "C" functions.
1817 * class.c (resolve_address_of_overloaded_function): Handle multiple
1818 extern "C" functions.
1819 * pt.c (resolve_overloaded_unification): Likewise.
1821 2009-04-07 Jason Merrill <jason@redhat.com>
1824 * error.c (dump_function_decl): Don't pretty-print templates
1825 if -fno-pretty-templates.
1826 (count_non_default_template_args): Print all args if
1827 -fno-pretty-templates.
1829 2009-04-06 Jason Merrill <jason@redhat.com>
1832 * pt.c (fn_type_unification): For DEDUCE_EXACT check that
1833 the deduced template arguments give us the parameter types
1836 2009-04-05 Giovanni Bajo <giovannibajo@libero.it>
1837 Jason Merrill <jason@redhat.com>
1840 * error.c (count_non_default_template_args): New fn.
1841 (dump_template_parms): Call it.
1842 (dump_template_argument_list): Call it. Add parms parm.
1843 (dump_template_argument): Adjust call to dump_template_argument_list.
1844 (dump_type, dump_decl): Likewise.
1845 (dump_template_bindings): Refactor logic.
1847 2009-04-03 Jason Merrill <jason@redhat.com>
1850 * error.c (dump_template_bindings): Look through typedefs in
1852 (dump_type) [TYPENAME_TYPE]: Print the typedef name if any.
1853 (find_typenames_r): Also collect typedefs.
1854 * pt.c (unify): Strip typedefs.
1857 * semantics.c (finish_id_expression): Don't assume a dependent
1858 member of the current instantiation isn't a valid integral
1859 constant expression. Check dependent_scope_p.
1860 * pt.c (dependent_scope_p): Check TYPE_P.
1861 (tsubst_copy): If args is null, just return.
1863 2009-04-02 Jason Merrill <jason@redhat.com>
1866 * error.c (find_typenames, find_typenames_r): New fns.
1867 (dump_function_decl): Call find_typenames.
1868 (dump_template_bindings): Print typenames as well.
1869 * pt.c (tsubst): Non-static.
1870 * cp-tree.h: Declare it.
1872 2009-04-02 Dodji Seketeli <dodji@redhat.com>
1875 * decl2.c (grokfield): when a typedef appears in a
1876 class, create the typedef variant type node for it.
1877 (save_template_attributes): Creating typedef variant type node
1878 here is now useless.
1879 * decl.c (grokdeclarator): If the typedef'ed struct/class was
1880 anonymous, set the proper type name to all its type variants.
1881 (xref_basetypes) : Fixup the variant types after setting
1883 * name-lookup.c (pushdecl_maybe_friend): Reuse the
1884 set_underlying_type function to install typedef variant types.
1885 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
1887 (append_type_to_template_for_access_check): New entry points.
1888 * semantics.c (check_accessibility_of_qualified_id):
1889 When a typedef that is a member of a class appears in a template,
1890 add it to the template. It will be ...
1891 * class.c (finish_struct_bits): Split type variant fixup into ...
1892 (fixup_type_variants): A new entry point.
1893 * pt.c (instantiate_class_template, instantiate_template ): ... access
1894 checked at template instantiation time.
1895 (resolve_type_name_type): The type name should be the name of the
1897 (retrieve_specialization): Specializations of template typedefs aren't
1898 to looked up in DECL_TEMPLATE_INSTANTIATIONS (tmpl).
1899 (append_type_to_template_for_access_check): New entry point.
1900 (tsubst_decl): For typedefs, build the variant type from the correct
1902 (get_class_bindings): Fix function comment.
1903 (perform_typedefs_access_check): New entry point.
1905 2009-03-31 Jason Merrill <jason@redhat.com>
1908 * name-lookup.c (pushdecl_maybe_friend): Diagnose mismatched
1909 extern "C" declarations.
1912 * semantics.c (finish_non_static_data_member): Allow such references
1913 without an associated object in sizeof/decltype/alignof.
1915 * ptree.c (cxx_print_decl): Pretty-print full name of
1917 (cxx_print_type): Pretty-print full name of class.
1919 * decl.c (grokdeclarator): Reject pointer to qualified function
1922 PR c++/37806, core issue 547
1923 * typeck.c (cp_apply_type_quals_to_decl): Don't apply any quals
1925 * tree.c (cp_build_qualified_type_real): Don't apply restrict to a
1927 * decl.h (enum decl_context): Add TEMPLATE_TYPE_ARG.
1928 * decl.c (groktypename): Add is_template_arg parameter.
1929 (grokdeclarator): Allow function cv-quals on a template type arg.
1930 * parser.c (cp_parser_new_type_id, cp_parser_type_id): Add
1931 is_template_arg argument in calls to groktypename.
1932 * cp-tree.h: Adjust prototype.
1933 * error.c (dump_type_prefix, dump_type_suffix): Fix plain
1934 FUNCTION_TYPE printing.
1936 * mangle.c (write_expression): Mangle dependent name as
1939 PR c++/38030, 38850, 39070
1940 * pt.c (type_dependent_expression_p_push): New fn.
1941 (tsubst_copy_and_build) [CALL_EXPR]: Only do arg-dep lookup when the
1942 substitution makes the call non-dependent. Preserve koenig_p.
1943 * parser.c (cp_parser_postfix_expression): Only do arg-dep lookup
1944 for non-dependent calls.
1945 * semantics.c (finish_call_expr): Revert earlier changes.
1946 * cp-tree.h: Revert change to finish_call_expr prototype.
1948 2009-03-29 Joseph Myers <joseph@codesourcery.com>
1950 PR preprocessor/34695
1951 * cp-tree.h (cp_cpp_error): Remove.
1952 * error.c (cp_cpp_error): Remove.
1953 * parser.c (cp_lexer_new_main): Set done_lexing instead of
1954 client_diagnostic and error callback.
1956 2009-03-28 Paolo Bonzini <bonzini@gnu.org>
1958 * cp/cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
1959 * cp/cp-objcp-common.c (cxx_staticp): Remove.
1960 * cp/cp-tree.h (cxx_staticp): Remove.
1962 2009-03-28 Jakub Jelinek <jakub@redhat.com>
1965 * parser.c (cp_parser_postfix_expression): Don't call
1966 warning_if_disallowed_function_p.
1968 2009-03-27 Jan Hubicka <jh@suse.cz>
1970 * except.c (choose_personality_routine): Set terminate_node to abort
1971 for java exceptions.
1973 2009-03-27 Dodji Seketeli <dodji@redhat.com>
1974 Jakub Jelinek <jakub@redhat.com>
1977 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P): Define.
1978 (cp_function_decl_explicit_p): New prototype.
1979 * cp-objcp-common.c (cp_function_decl_explicit_p): New function.
1981 2009-03-27 Andrew Pinski <andrew_pinski@playstation.sony.com>
1984 * parser.c (cp_parser_elaborated_type_specifier): If we have a
1985 typename tag and don't have either a TYPE_DECL or a
1986 TEMPLATE_ID_EXPR, set the type to NULL.
1988 2009-03-27 Simon Martin <simartin@users.sourceforge.net>
1991 * decl.c (grokdeclarator): Reject [con|de]stuctors in a non-class
1994 2009-03-27 Simon Martin <simartin@users.sourceforge.net>
1997 * decl.c (check_array_designated_initializer): Handle error_mark_node.
1999 2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2002 * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
2004 2009-03-26 Andrew Haley <aph@redhat.com>
2007 * decl2.c (possibly_inlined_p): If java exceptions are in use
2008 don't inline a decl unless it is explicitly marked inline.
2009 * lex.c: (pragma_java_exceptions): New variable.
2010 (handle_pragma_java_exceptions): Set pragma_java_exceptions.
2011 * cp-tree.h (pragma_java_exceptions): Declare new variable.
2013 2009-03-24 Jason Merrill <jason@redhat.com>
2016 * name-lookup.c (pushdecl_maybe_friend): Check default args later.
2018 2009-03-23 Jakub Jelinek <jakub@redhat.com>
2021 * semantics.c (handle_omp_for_class_iterator): Swap cond operands and
2022 code if iter is the second operand.
2023 * parser.c (cp_parser_binary_expression): Add no_toplevel_fold_p
2024 argument. If it is set, don't build the toplevel expression with
2025 build_x_binary_op, but build2.
2026 (cp_parser_assignment_expression, cp_parser_omp_for_incr): Adjust
2028 (cp_parser_omp_for_cond): Don't assume the first operand of the
2029 comparison must be decl.
2031 2009-03-23 Jason Merrill <jason@redhat.com>
2034 * pt.c (make_fnparm_pack): Split out from...
2035 (instantiate_decl): ...here.
2036 (tsubst_pack_expansion): Handle being called in a late-specified
2040 * name-lookup.c (pushdecl_maybe_friend): Don't warn about shadowing
2043 2009-03-20 Jason Merrill <jason@redhat.com>
2046 * parser.c (cp_parser_direct_declarator): In a template, wrap
2047 non-constant expression in NOP_EXPR with TREE_SIDE_EFFECTS set.
2048 * pt.c (tsubst): Preserve it in a partial instantiation.
2049 (dependent_type_p_r): Don't check value_dependent_expression_p.
2050 * decl.c (compute_array_index_type): Don't check
2051 value_dependent_expression_p if TREE_SIDE_EFFECTS.
2054 * typeck2.c (check_narrowing): Don't complain about loss of
2055 precision when converting a floating-point constant.
2057 2009-03-19 Jakub Jelinek <jakub@redhat.com>
2060 * parser.c (cp_parser_omp_for_cond): Don't check lhs if decl is NULL.
2061 (cp_parser_omp_for_loop): Always use cp_parser_omp_for_cond.
2063 2009-03-18 Jakub Jelinek <jakub@redhat.com>
2065 * parser.c (struct cp_token): Reorder fields for 64-bit hosts.
2066 (eof_token): Adjust.
2068 2009-03-18 H.J. Lu <hongjiu.lu@intel.com>
2071 * parser.c (cp_parser_explicit_specialization): Don't skip the
2072 rest of the specialization when begin_specialization returns
2075 2009-03-17 Jason Merrill <jason@redhat.com>
2077 * decl.c (grokfndecl): Set DECL_CONTEXT on parms.
2078 (duplicate_decls): Adjust DECL_CONTEXT of newdecl's parms.
2079 * pt.c (check_explicit_specialization): Likewise.
2080 (tsubst_copy) [PARM_DECL]: Return a dummy parm if we don't have a
2081 local specialization.
2082 * tree.c (cp_tree_equal) [PARM_DECL]: Check type and index, not name.
2083 * decl2.c (parm_index): New fn.
2084 * semantics.c (finish_decltype_type): Don't use describable_type.
2085 * mangle.c (write_expression): Likewise. Mangle ALIGNOF_EXPR.
2086 Give a sorry for unsupported codes rather than crash. Mangle
2087 conversions with other than 1 operand. New mangling for PARM_DECL.
2088 * operators.def (ALIGNOF_EXPR): Mangle as "az".
2090 2009-03-17 Jing Yu <jingyu@google.com>
2093 * method.c (use_thunk): Change is_thunk from crtl to cfun.
2095 2009-03-17 Paolo Carlini <paolo.carlini@oracle.com>
2098 * semantics.c (check_trait_type): New.
2099 (finish_trait_expr): Use it.
2101 2009-03-17 Jakub Jelinek <jakub@redhat.com>
2103 * name-lookup.c (cp_emit_debug_info_for_using): Emit USING_STMTs
2104 instead of calling imported_module_or_decl debug hook if
2105 building_stmt_tree ().
2106 * cp-gimplify.c (cp_gimplify_expr): Don't assert the first operand
2107 is a NAMESPACE_DECL.
2110 * name-lookup.c (do_namespace_alias): Don't call global_decl debug
2111 hook at function scope.
2114 * cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
2117 2009-03-09 Jakub Jelinek <jakub@redhat.com>
2120 * semantics.c (finish_switch_cond): Don't call get_unwidened.
2121 * decl.c (finish_case_label): Pass SWITCH_STMT_TYPE as 3rd argument
2122 instead of TREE_TYPE (cond).
2124 2009-03-08 H.J. Lu <hongjiu.lu@intel.com>
2127 * parser.c (cp_parser_late_parsing_default_args): Continue
2128 the loop when cp_parser_assignment_expression returns
2131 2009-03-07 Jason Merrill <jason@redhat.com>
2134 * init.c (build_new_1): Don't use a VLA type.
2135 (build_vec_init): Handle getting a pointer for BASE.
2137 2009-03-06 H.J. Lu <hongjiu.lu@intel.com>
2140 * cp-tree.h: Check NO_DOT_IN_LABEL before NO_DOLLAR_IN_LABEL
2141 when mangling symbols.
2143 2009-03-06 Paolo Carlini <paolo.carlini@oracle.com>
2146 * error.c (dump_expr): Don't try to print THROW_EXPRs in full.
2148 2009-03-06 Alexandre Oliva <aoliva@redhat.com>
2150 * decl.c (record_builtin_java_type): Use canonicalized integer
2153 2009-03-04 Jason Merrill <jason@redhat.com>
2156 * class.c (is_really_empty_class): New fn.
2157 * cp-tree.h: Declare it.
2158 * cp-objcp-common.c (cp_expr_size): Use it.
2161 * semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
2162 * parser.c (cp_parser_postfix_expression): Call it for
2164 * tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
2165 (get_first_fn): Likewise.
2171 * decl.c (make_typename_type): Do look inside currently open classes.
2172 * parser.c (cp_parser_lookup_name): Likewise.
2173 (cp_parser_template_name): Likewise.
2174 * pt.c (dependent_scope_p): New function.
2175 * cp-tree.h: Declare it.
2176 * class.c (currently_open_class): Return fast if T isn't a class.
2178 2009-02-26 H.J. Lu <hongjiu.lu@intel.com>
2181 * parser.c (cp_parser_mem_initializer): Return error_mark_node
2182 if cp_parser_mem_initializer_id returns error_mark_node.
2184 2009-02-24 Richard Guenther <rguenther@suse.de>
2187 * pt.c (instantiate_decl): Do not instantiate extern, non-inline
2190 2009-02-23 H.J. Lu <hongjiu.lu@intel.com>
2193 * pt.c (coerce_template_template_parms): Return 0 if parameter
2196 2009-02-23 Jason Merrill <jason@redhat.com>
2198 * pt.c (unify): Call maybe_adjust_types_for_deduction when
2199 deducing from an initializer list.
2201 2009-02-20 Jason Merrill <jason@redhat.com>
2204 * decl.c (grokdeclarator): Handle ~identifier.
2206 2009-02-19 Jakub Jelinek <jakub@redhat.com>
2209 * decl2.c (determine_visibility): If visibility changed and
2210 DECL_RTL has been already set, call make_decl_rtl to update symbol
2213 2009-02-19 H.J. Lu <hongjiu.lu@intel.com>
2216 * cp-tree.h (maybe_commonize_var): New.
2218 * decl.c (maybe_commonize_var): Make it extern.
2220 * decl2.c (finish_anon_union): Call maybe_commonize_var.
2222 2009-02-18 H.J. Lu <hongjiu.lu@intel.com>
2225 * parser.c (cp_parser_enum_specifier): Apply all attributes.
2227 2009-02-18 Jason Merrill <jason@redhat.com>
2229 * cfns.h: Tweak pathname for cfns.gperf.
2231 2009-02-13 Jason Merrill <jason@redhat.com>
2234 * semantics.c (finish_call_expr): Change koenig_p parm to int.
2235 If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
2236 * cp-tree.h: Adjust prototype.
2237 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
2239 2009-02-12 Jason Merrill <jason@redhat.com>
2242 * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
2244 2009-02-11 Jason Merrill <jason@redhat.com>
2247 * decl2.c (cp_write_global_declarations):
2248 Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
2251 * init.c (build_value_init_noctor): Split out from...
2252 (build_value_init): ...here.
2253 (expand_aggr_init_1): Handle value-initialization.
2254 * cp-tree.h: Add declaration.
2255 * class.c (type_has_user_provided_constructor):
2256 Handle non-class arguments.
2258 2009-02-10 Jason Merrill <jason@redhat.com>
2261 * class.c (defaultable_fn_p): Handle ... properly.
2264 * tree.c (lvalue_p_1): Condition rvalue ref handling on
2265 treat_class_rvalues_as_lvalues, too.
2267 2009-02-10 Paolo Carlini <paolo.carlini@oracle.com>
2270 * typeck.c (build_x_array_ref): New.
2271 * cp-tree.h: Declare it.
2272 * pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
2274 2009-02-09 Jason Merrill <jason@redhat.com>
2277 * semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
2278 * init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
2279 * tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
2280 * cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
2281 for build_value_init TARGET_EXPR.
2282 * cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
2284 2009-02-06 Paolo Carlini <paolo.carlini@oracle.com>
2288 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
2290 2009-02-04 Jakub Jelinek <jakub@redhat.com>
2293 * operators.def: Use COMPONENT_REF code for ->/pt operator again,
2294 remove ./dt operator.
2295 * mangle.c (write_expression): Handle COMPONENT_REF after handling
2296 ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
2297 write_string ("dt") instead of using operators.def.
2299 2009-02-03 Jason Merrill <jason@redhat.com>
2301 * typeck.c (cp_build_unary_op): Only complain about taking address
2302 of main if pedantic.
2304 2009-02-03 Jakub Jelinek <jakub@redhat.com>
2307 * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
2310 * typeck2.c (digest_init_r): Don't call process_init_constructor
2313 2009-02-03 Paolo Bonzini <bonzini@gnu.org>
2316 * pt.c (convert_nontype_argument_function): Expect expr to be an
2320 * typeck.c (merge_types): Call resolve_typename_type if only
2321 one type is a typename.
2323 2009-02-02 Jason Merrill <jason@redhat.com>
2326 * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node
2329 2009-02-01 Paolo Carlini <paolo.carlini@oracle.com>
2332 * parser.c (cp_parser_pure_specifier): If there are no tokens left
2333 do not call cp_lexer_consume_token.
2335 2009-01-30 Jakub Jelinek <jakub@redhat.com>
2338 * parser.c (cp_parser_already_scoped_statement): Handle __label__
2341 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
2344 * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
2346 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
2349 * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
2351 2009-01-29 Paolo Carlini <paolo.carlini@oracle.com>
2353 * typeck.c (invalid_nonstatic_memfn_p): Use
2354 DECL_NONSTATIC_MEMBER_FUNCTION_P.
2356 2009-01-27 Paolo Carlini <paolo.carlini@oracle.com>
2359 * call.c (build_over_call): If convert_for_arg_passing returns
2360 error_mark_node unconditionally return it.
2362 2009-01-22 Adam Nemet <anemet@caviumnetworks.com>
2364 * class.c (check_field_decls): Also inherit packed for bitfields
2365 regardless of their type.
2367 2009-01-22 Dodji Seketeli <dodji@redhat.com>
2370 * decl2.c (grokfield): Reverting changes of PR c++/26693
2371 (save_template_attributes): Likewise.
2372 * decl.c (grokdeclarator): Likewise.
2373 * name-lookup.c (pushdecl_maybe_friend): Likewise.
2374 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
2375 (append_type_to_template_for_access_check): Likewise.
2376 * semantics.c (check_accessibility_of_qualified_id): Likewise.
2377 * pt.c (instantiate_class_template, instantiate_template ): Likewise.
2379 (resolve_type_name_type): Likewise.
2380 (append_type_to_template_for_access_check): Likewise.
2382 2009-01-21 Dodji Seketeli <dodji@redhat.com>
2385 * decl2.c (grokfield): when a typedef appears in a
2386 class, create the typedef variant type node for it.
2387 (save_template_attributes): Creating typedef variant type node
2388 here is now useless.
2389 * decl.c (grokdeclarator): If the typedef'ed struct/class was
2390 anonymous, set the proper type name to all its type variants.
2391 * name-lookup.c (pushdecl_maybe_friend): Reuse the
2392 set_underlying_type function to install typedef variant types.
2393 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
2395 (append_type_to_template_for_access_check): New entry points.
2396 * semantics.c (check_accessibility_of_qualified_id):
2397 When a typedef that is a member of a class appears in a template,
2398 add it to the template. It will be ...
2399 * pt.c (instantiate_class_template, instantiate_template ): ... access
2400 checked at template instantiation time.
2401 (tsubst): Handle the case of being called with NULL args.
2402 (resolve_type_name_type): The type name should be the name of the
2404 (append_type_to_template_for_access_check): New entry point.
2406 2009-01-19 Jason Merrill <jason@redhat.com>
2409 * parser.c (cp_parser_unqualified_id): In a template,
2411 * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
2413 2009-01-16 Jason Merrill <jason@redhat.com>
2416 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
2417 * init.c (build_new): Don't call describable_type unless we
2421 * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
2424 * search.c (protected_accessible_p): N doesn't vary.
2426 2009-01-15 Jason Merrill <jason@redhat.com>
2429 * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
2430 accept hidden friends.
2432 2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
2435 * decl.c (grokdeclarator): Check for a non namespace/class context.
2437 2009-01-15 Jason Merrill <jason@redhat.com>
2441 * tree.c (lvalue_p_1): Handle BASELINK. A COMPONENT_REF to
2442 a function isn't necessarily an lvalue. Take tree, not const_tree.
2443 (lvalue_p, real_lvalue_p): Take tree, not const_tree.
2444 * typeck.c (lvalue_or_else): Likewise.
2445 * cp-tree.h: Adjust prototypes.
2447 2009-01-15 Steve Ellcey <sje@cup.hp.com>
2450 * pt.c (tsubst): Check for NULL args.
2452 2009-01-15 Dodji Seketeli <dodji@redhat.com>
2455 * name-lookup.c (pushtag): Don't create members to types that are not
2458 2009-01-14 Nick Clifton <nickc@redhat.com>
2461 * parser.c: Pass cp_id_kind computed in
2462 cp_parser_postfix_dot_deref_expression to
2463 cp_parser_primary_expression.
2465 2009-01-13 Jakub Jelinek <jakub@redhat.com>
2468 * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
2469 STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
2472 2009-01-12 Jason Merrill <jason@redhat.com>
2473 Steve Ellcey <sje@cup.hp.com>
2476 * name-lookup.c (lookup_name_real): Keep looking past a hidden
2479 2009-01-12 Dodji Seketeli <dodji@redhat.com>
2482 * pt.c (parameter_of_template_p): New function.
2483 * cp-tree.h: Declare it.
2484 * name-lookup.c (binding_to_template_parms_of_scope_p): New
2486 (outer_binding): Take template parameters in account when looking for
2489 2009-01-12 Jason Merrill <jason@redhat.com>
2492 * tree.c (pod_type_p): Return 1 for structs created by the back end.
2494 2009-01-12 Jakub Jelinek <jakub@redhat.com>
2497 * parser.c (cp_parser_builtin_offsetof): Allow `->' in
2498 offsetof member-designator, handle it as `[0].'.
2501 * decl.c (start_function): If grokdeclarator hasn't returned
2502 FUNCTION_DECL nor error_mark_node, issue diagnostics.
2504 2009-01-11 Jakub Jelinek <jakub@redhat.com>
2507 * cp-gimplify.c (genericize_if_stmt): Renamed from ...
2508 (gimplify_if_stmt): ... this.
2509 (cp_gimplify_expr): Don't handle IF_STMT here.
2510 (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
2512 2009-01-10 Andrew Pinski <pinskia@gmail.com>
2515 * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
2518 * typeck2.c (build_functional_cast): Check for reference type and NULL
2521 2009-01-09 Steve Ellcey <sje@cup.hp.com>
2523 * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
2525 2009-01-09 Jakub Jelinek <jakub@redhat.com>
2528 * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
2530 2009-01-09 John F. Carr <jfc@mit.edu>
2533 * parser.c (cp_parser_class_specifier): Clear
2534 parser->in_unbraced_linkage_specification_p while parsing class
2537 2009-01-07 Jakub Jelinek <jakub@redhat.com>
2540 * semantics.c (finish_goto_stmt): Convert destination to
2543 2009-01-06 Jason Merrill <jason@redhat.com>
2550 * pt.c (check_default_tmpl_args): Don't complain about
2551 out-of-order parameter packs in the enclosing class
2552 or parameter packs after default args.
2553 (coerce_template_parms): If we have more than one
2554 parameter pack, don't flatten argument packs.
2555 (template_args_equal): Handle argument packs.
2556 (comp_template_args): Don't flatten argument packs.
2557 (check_instantiated_arg): Split out from...
2558 (check_instantiated_args): Here. Handle arg packs.
2559 (convert_template_argument): Just check that nontype argument
2560 packs have the right type.
2562 2009-01-05 Dodji Seketeli <dodji@redhat.com>
2565 * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
2567 2009-01-05 Jason Merrill <jason@redhat.com>
2570 * typeck2.c (process_init_constructor_union): Handle union with
2573 * mangle.c (write_expression): Remove mangling for zero-operand
2577 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
2581 * class.c (defaultable_fn_p): Only operator== can be a copy
2582 assignment operator.
2584 2009-01-02 Jason Merrill <jason@redhat.com>
2587 * typeck2.c (process_init_constructor_union): Handle excess
2589 (process_init_constructor_record): Likewise.
2592 * typeck2.c (digest_init_r): Don't use process_init_constructor
2593 for non-aggregate classes.
2596 Copyright (C) 2009 Free Software Foundation, Inc.
2598 Copying and distribution of this file, with or without modification,
2599 are permitted in any medium without royalty provided the copyright
2600 notice and this notice are preserved.