1 2009-06-12 Aldy Hernandez <aldyh@redhat.com>
3 * typeck.c (cp_build_binary_op): Pass location to overflow_warning.
4 (build_modify_expr): New arg.
5 * semantics.c (finish_unary_op_expr): Pass location to
7 (handle_omp_for_class_iterator): Pass location to build_modify_expr.
8 * typeck.c (cxx_sizeof_or_alignof_type): Pass location to
9 c_sizeof_or_alignof_type.
10 (build_array_ref): New argument.
11 (build_compound_expr): Same.
12 (build_const_cast): Same.
13 (build_ptrmemfunc): Pass location to build_c_cast.
14 * init.c (avoid_placement_new_aliasing): Pass location to
16 (build_vec_delete_1): Pass location to cp_build_modify_expr,
18 * class.c (build_vtbl_ref_1): Pass location to build_array_ref.
19 * decl.c (poplevel): Pass location to c_build_bind_expr.
20 (finish_case_label): Pass location to build_case_label.
21 (finish_constructor_body): Same.
22 (finish_destructor_body): Pass location to build_stmt.
23 (cxx_maybe_build_cleanup): Same, but to build_compound_expr.
24 * call.c (build_new_op): Pass location to build_array_ref.
25 (build_x_va_arg): Pass location to build_va_arg.
26 * except.c (expand_end_catch_block): Pass location to
28 * cp-tree.h (build_array_ref): New argument.
29 (build_compound_expr): Same.
31 * cp-gimplify.c (gimplify_if_stmt): Pass location on down.
32 (gimplify_switch_stmt): Same.
33 * typeck2.c (split_nonconstant_init_1): Same.
34 * pt.c (tsubst_copy): Same.
35 * semantics.c (add_decl_expr): Same.
38 (finish_goto_stmt): Same.
39 (finish_expr_stmt): Same.
40 (begin_if_stmt): Same.
41 (begin_while_stmt): Same.
42 (begin_do_stmt): Same.
43 (finish_return_stmt): Same.
44 (begin_for_stmt): Same.
45 (finish_break_stmt): Same.
46 (finish_continue_stmt): Same.
47 (begin_switch_stmt): Same.
48 (begin_try_block): Same.
49 (begin_handler): Same.
50 (finish_asm_stmt): Same.
51 (finish_label_stmt): Same.
52 (finish_stmt_expr_expr): Same.
53 (finalize_nrv_r): Same.
54 (finish_omp_atomic): Same.
55 * name-lookup.c (do_using_directive): Same.
56 * decl2.c (grok_array_decl): Same.
57 * parser.c (cp_parser_cast_expression): Same.
58 (cp_parser_selection_statement): Same.
59 (cp_parser_implicitly_scoped_statement): Same.
60 (cp_parser_objc_selector_expression): Same.
61 (cp_parser_objc_synchronized_statement): Same.
62 (cp_parser_objc_throw_statement): Same.
63 (cp_parser_omp_critical): Same.
64 (cp_parser_omp_master): Same.
65 * typeck.c (build_function_call): Add location argument.
66 * init.c: Add location argument to all build_decl calls.
75 * cp-gimplify.c: Same.
77 (cp_make_fname_decl): Add location argument. Pass location ot
79 (finish_case_label): Same.
80 * cp-tree.h (finish_case_label): Add location argument.
81 * parser.c (cp_parser_label_for_labeled_statement): Pass location to
84 2009-06-09 Jason Merrill <jason@redhat.com>
87 * decl2.c (mark_used): Return after complaining about deleted fn.
89 2009-06-08 Jason Merrill <jason@redhat.com>
91 * parser.c (cp_parser_type_id_1): 'auto' type is ok with a
92 late-specified return type.
94 2009-06-08 Jakub Jelinek <jakub@redhat.com>
97 * call.c (check_dtor_name): Return false even if
98 get_type_value (name) is error_mark_node.
102 * parser.c (cp_parser_direct_declarator): Don't set TREE_SIDE_EFFECTS
103 on error_mark_node. Check for VLAs outside of function context
104 before check whether to wrap bounds into a NOP_EXPR with
107 2009-06-08 Alexandre Oliva <aoliva@redhat.com>
109 * repo.c (get_base_filename): Use aux_base_name rather than
110 alternate temporary file during second compare debug compilation.
111 (finish_repo): Skip during -fcompare-debug-second.
113 2009-06-06 Ian Lance Taylor <iant@google.com>
115 * parser.c (cp_parser_label_for_labeled_statement): Support
116 attribute on labels if immediately followed by semicolon.
117 * semantics.c (finish_label_stmt): Return new label.
118 * pt.c (tsubst_expr): Handle attributes for LABEL_EXPR.
120 2009-06-03 Ian Lance Taylor <iant@google.com>
122 * Make-lang.in (cc1plus-checksum.o): Depend upon $(CONFIG_H) and
125 2009-06-02 Mark Mitchell <mark@codesourcery.com>
127 * decl.c (maybe_deduce_size_from_array_init): Use relayout_decl.
129 2009-06-02 Jason Merrill <jason@redhat.com>
133 * typeck.c (cp_build_modify_expr): Always pass init-lists to the
135 * call.c (implicit_conversion): Allow init-list conversion to scalar
136 during direct-initialization, too. Mark the conversion bad if it
137 has too many levels of braces.
138 (convert_like_real): And give a helpful error.
142 * decl.c (cp_finish_decl): Handle auto deduction from ().
143 * typeck.c (build_x_indirect_ref): Handle dereferencing an operand
144 with dependent type that is known to be a pointer.
146 2009-06-02 Simon Martin <simartin@users.sourceforge.net>
149 * pt.c (register_specialization): Properly setup DECL_CONTEXT for
150 specializations in an invalid namespace.
152 2009-06-01 Aldy Hernandez <aldyh@redhat.com>
154 * error.c (print_instantiation_partial_context): Print column
157 2009-05-29 Ian Lance Taylor <iant@google.com>
159 * error.c (cp_printer): Don't use va_arg with enum type.
161 2009-05-28 Dodji Seketeli <dodji@redhat.com>
164 * cp-tree.h (canonical_type_variant): Remove this function declaration.
165 (strip_typedefs): New function declaration.
166 * tree.c (strip_typedefs): New function definition.
167 (canonical_type_variant): Remove function definition.
168 * cvt.c (convert_from_reference): No need to use
169 canonical_type_variant.
170 * typeck.c (cp_build_indirect_ref): Likewise.
171 * error.c (dump_template_bindings): Use strip_typedefs instead of
172 canonical_type_variant.
173 * pt.c (convert_template_argument, unify): Likewise.
174 * mangle.c (canonicalize_for_substitution): Don't use
175 canonical_type_variant.
177 2009-05-27 Jason Merrill <jason@redhat.com>
179 * call.c (implicit_conversion): Handle conversion from
180 initializer-list to scalar.
181 (convert_like_real): Likewise. Avoid crashing on list
182 initialization with bad conversions.
183 (can_convert): Use LOOKUP_EXPLICIT.
184 (can_convert_arg_bad): Add flags parm.
186 * typeck.c (convert_for_assignment): Pass flags.
188 2009-05-27 Ian Lance Taylor <iant@google.com>
190 * Make-lang.in (g++$(exeext)): Change $(COMPILER) to $(LINKER).
191 (cc1plus-dummy$(exeext), cc1plus$(exeext)): Likewise.
193 2009-05-26 Ian Lance Taylor <iant@google.com>
195 * Make-lang.in (g++spec.o): Use $(COMPILER).
196 (g++$(exeext), cc1plus-dummy$(exeext)): Likewise.
197 (cc1plus$(exeext)): Likewise.
199 2009-05-26 Dodji Seketeli <dodji@redhat.com>
202 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Remove this accessor.
203 (TI_TYPEDEFS_NEEDING_ACCESS_CHECKING): New accessor.
204 (get_types_needing_access_check): Declare new entry point.
205 * pt.c (append_type_to_template_for_access_check_1,
206 get_types_needing_access_check): New functions.
207 (perform_typedefs_access_check): Accept FUNCTION_DECLs and
208 RECORD_TYPEs rather than TEMPLATE_DECLs. Use the new
209 get_types_needing_access_check, no more
210 MEMBER_TYPES_NEEDING_ACCESS_CHECK.
211 (instantiate_class_template): Set input_location to the source
212 location of the most specialized template definition.
213 Perform access check using the RECORD_TYPE of the template, not its
214 associated most generic TEMPLATE_DECL.
215 (append_type_to_template_for_access_check): Augment function
216 comments. Use the new get_types_needing_access_check, not
217 MEMBER_TYPE_NEEDING_ACCESS_CHECK. Use the new
218 append_type_to_template_for_access_check_1 subroutine.
220 2009-05-22 Jason Merrill <jason@redhat.com>
223 * typeck.c (cp_build_binary_op): Allow ENUMERAL_TYPE in
224 arithmetic comparisons.
225 (cp_common_type): Handle scoped enums.
227 * call.c (promoted_arithmetic_type_p): Don't use INTEGRAL_TYPE_P.
228 (add_builtin_candidate, add_builtin_candidates): Likewise.
229 (convert_like_real): Likewise.
230 * class.c (check_bitfield_decl): Likewise.
231 * decl.c (check_static_variable_definition): Likewise.
232 (compute_array_index_type): Likewise.
233 * decl2.c (grokbitfield): Likewise.
234 * init.c (build_new_1): Likewise.
235 * pt.c (convert_nontype_argument): Likewise.
236 (current_instantiation): Likewise.
237 * tree.c (pod_type_p): Likewise.
238 * typeck.c (build_static_cast_1): Likewise.
239 (build_reinterpret_cast_1): Likewise.
241 2009-05-22 Richard Guenther <rguenther@suse.de>
244 * init.c (avoid_placement_new_aliasing): Remove.
245 (build_new_1): Do not call it.
247 2009-05-22 Mark Mitchell <mark@codesourcery.com>
249 * decl2.c (decl_needed_p): Consider dllexport'd functions needed.
250 * semantics.c (expand_or_defer_fn): Similarly.
252 2009-05-20 Ian Lance Taylor <iant@google.com>
254 * parser.c (cp_parser_postfix_expression): Change args to a vec.
255 Release it when done.
256 (tree_vector): Define typedef. Define VEC functions.
257 (cp_parser_parenthesized_expression_list): Change return type to
258 vec. Change all callers.
259 (cp_parser_new_expression): Change placement and initializer to
260 vecs. Release them when done.
261 (cp_parser_new_placement): Change return type to vec. Change all
263 (cp_parser_new_initializer): Likewise.
264 * typeck.c (build_function_call_vec): Just call
265 cp_build_function_call_vec.
266 (cp_build_function_call): Just build a vec and call
267 cp_build_function_call_vec.
268 (cp_build_function_call_vec): New function based on old
269 cp_build_function_call.
270 (convert_arguments): Remove nargs and argarray parameters. Change
271 values to a vec. Change caller.
272 (build_x_compound_expr_from_vec): New function.
273 (cp_build_modify_expr): Build vec to pass to
274 build_special_member_call.
275 * call.c (struct z_candidate): Add first_arg field. Change args
277 (convert_class_to_reference): Handle first argument separately.
278 (add_candidate): Add first_arg parameter. Change args parameter
279 to vec. Change all callers.
280 (add_function_candidate, add_conv_candidate): Likewise.
281 (add_template_candidate_real, add_template_candidate): Likewise.
282 (add_template_conv_candidate): Likewise.
283 (build_user_type_conversion_1): Handle first argument separately.
284 (resolve_args): Change return type and parameter type to vecs.
286 (perform_overload_resolution): Change args parameter to vec.
288 (build_new_function_call, build_operator_new_call): Likewise.
289 (add_candidates): Likewise.
290 (build_op_call): New globally visible function, built from and
291 replacing static function build_object_call.
292 (build_new_op): Don't handle CALL_EXPR. Build vec, not tree_list,
294 (build_op_delete_call): Build vec to pass to
295 cp_build_function_call_vec.
296 (build_temp): Build vec to pass to build_special_member_call.
297 (convert_like_real): Likewise.
298 (perform_direct_initialization_if_possible): Likewise.
299 (build_over_call): Handle first_arg field. Use build_call_array
300 rather than build_call_list.
301 (build_special_member_call): Change args parameter to vec. Change
303 (build_new_method_call): Likewise.
304 * init.c (expand_default_init): Change parms to vec.
305 (build_raw_new_expr): Change placement and init to vecs. Change
307 (build_new_1, build_new): Likewise.
308 * class.c (resolve_address_of_overloaded_function): Build array to
309 pass to fn_type_unification.
310 * pt.c (tsubst_copy_and_build): For NEW_EXPR build vecs to pass to
311 build_new. For CALL_EXPR create a vec rather than a tree_list;
312 expand a pack if necessary.
313 (fn_type_unification): Change args parameter to const tree *. Add
314 nargs parameter. Change all callers.
315 (type_unification_real): Likewise.
316 (unify): Build array to pass to type_unification_real.
317 (get_bindings): Build array to pass to fn_type_unification.
318 (any_type_dependent_arguments_p): Change args parameter to a vec.
320 (make_args_non_dependent): Renamed from build_non_dependent_args.
321 Change return type to void. Change parameter type to vec. Change
323 (do_auto_deduction): Pass an array to type_unification_real.
324 * semantics.c (perform_koenig_lookup): Change args to vec. Change
326 (finish_call_expr): Change args to vec. Change all callers. Call
327 build_op_call instead of passing CALL_EXPR to build_new_op.
328 (cxx_omp_create_clause_info): Allocate vec to pass to
329 build_special_member_call.
330 * decl2.c (build_offset_ref_call_from_tree): Change args parameter
331 to vec. Change all callers.
332 * name-lookup.c (lookup_function_nonclass): Likewise.
333 (struct arg_lookup): Change args to vec.
334 (arg_assoc_namespace): Handle args as a vec.
335 (arg_assoc_args_vec): New static function.
336 (lookup_arg_dependent): Change args parameter to vec. Change all
338 * method.c (do_build_assign_ref): Allocate vec to pass to
339 build_special_member_call.
340 * except.c (build_throw): Likewise.
341 * typeck2.c (build_functional_cast): Likewise.
342 * cvt.c (ocp_convert): Likewise.
343 * tree.c (build_min_non_dep_call_vec): Change last parameter to
344 vec. Change all callers.
345 * cp-tree.h: Update declarations.
346 * name-lookup.h: Update declarations.
348 2009-05-20 Sandra Loosemore <sandra@codesourcery.com>
350 * typeck.c (default_conversion): Check targetm.promoted_type.
351 * decl.c (grokdeclarator): Check targetm.invalid_return_type.
352 (grokparms): Check targetm.invalid_parameter_type.
353 * cvt.c (ocp_convert): Check targetm.convert_to_type.
354 (build_expr_type_conversion): Check targetm.promoted_type.
356 2009-05-19 Andrew Pinski <andrew_pinski@playstation.sony.com>
358 * typeck.c (build_binary_op): Allow % on integal vectors.
360 2009-05-18 Jason Merrill <jason@redhat.com>
362 Implement explicit conversions ops as specified in N2437.
363 * decl.c (grokdeclarator): Handle explicit conversion ops.
364 (check_initializer): Pass flags to store_init_value.
365 * decl2.c (maybe_emit_vtables): Likewise.
366 * init.c (expand_aggr_init_1): Likewise.
367 * call.c (convert_class_to_reference): Take flags parm,
368 check DECL_NONCONVERTING_P.
369 (build_user_type_conversion_1): Check DECL_NONCONVERTING_P.
370 (add_builtin_candidates): Simplify getting type of conversion.
371 (build_object_call): Likewise. Check DECL_NONCONVERTING_P.
372 (implicit_conversion): Pass through LOOKUP_ONLYCONVERTING.
373 (reference_binding): Take flags parm. Direct-initialize copy parm.
374 (add_function_candidate): Direct-initialize the copy parm.
375 (add_conv_candidate): Use LOOKUP_IMPLICIT, not LOOKUP_NORMAL.
376 (build_builtin_candidate): Add LOOKUP_ONLYCONVERTING.
377 (conditional_conversion): Likewise.
378 (convert_like_real): Only complain about DECL_NONCONVERTING_P
380 (perform_implicit_conversion_flags): Add flags parm to
381 perform_implicit_conversion. Improve diagnostics.
382 * cp-tree.h (LOOKUP_IMPLICIT): New macro.
383 (LOOKUP_COPY_PARM): New bit macro.
384 * cvt.c (build_expr_type_conversion): Check DECL_NONCONVERTING_P.
385 * typeck.c (convert_for_assignment): Take flags parm, pass it to
386 perform_implicit_conversion_flags.
387 (cp_build_modify_expr): Pass flags to convert_for_assignment.
388 (convert_for_initialization): Likewise.
389 * typeck2.c (store_init_value): Take flags parm, pass to
391 (digest_init_flags): Add flags parm to digest_init.
392 (digest_init_r): Take flags parm, pass to convert_for_initialization.
393 (process_init_constructor_array): Pass it.
394 (process_init_constructor_record): Likewise.
395 (process_init_constructor_union): Likewise.
397 2009-05-16 Jason Merrill <jason@redhat.com>
400 * pt.c (tsubst_qualified_id): Retain the type if we aren't dealing
401 with a dependent type. Actually look up the destructor.
402 * semantics.c (finish_id_expression): Fix logic.
403 (finish_qualified_id_expr): Don't try to use 'this' if we aren't in
405 * typeck.c (build_x_unary_op): Diagnose taking the address of a
406 constructor or destructor.
407 * tree.c (get_first_fn): Handle OFFSET_REF.
409 2009-05-17 Joseph Myers <joseph@codesourcery.com>
411 * tree.c (cxx_printable_name_internal): Allow consecutive
412 translated and untranslated cached copies of the name of the
415 2009-05-15 Ian Lance Taylor <iant@google.com>
417 * cp-tree.h (enum cp_lvalue_kind_flags): Rename from
418 cp_lvalue_kind. Change all uses.
419 (enum base_access_flags): Rename from enum base_access. Change
421 * parser.c (enum cp_parser_flags): Remove enum tag.
423 2009-05-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
426 * call.c (build_new_op): Update calls to warn_logical_operator.
428 2009-05-14 Ian Lance Taylor <iant@google.com>
430 * class.c (layout_class_type): Change itk to unsigned int.
431 * decl.c (finish_enum): Change itk to unsigned int.
432 * parser.c (cp_parser_check_decl_spec): Change ds to int. Remove
435 2009-05-13 David Mandelin <dmandelin@mozilla.com>:
437 * decl.c (duplicate_decls): Preserve parameter attributes.
439 2009-05-10 Jan Hubicka <jh@suse.cz>
441 * decl2.c (cxx_callgraph_analyze_expr): Use
442 cgraph_mark_address_taken.
444 2009-05-10 Joseph Myers <joseph@codesourcery.com>
446 * call.c (name_as_c_string): Call type_as_string_translate.
447 Translate identifiers to locale character set.
448 * cp-tree.h (lang_decl_name): Update prototype.
449 (type_as_string_translate, decl_as_string_translate,
450 cxx_printable_name_translate): Declare.
451 * cxx-pretty-print.c (M_): Define.
452 (pp_cxx_unqualified_id, pp_cxx_canonical_template_parameter): Mark
453 English fragments for conditional translation with M_.
454 * decl.c (grokdeclarator): Translate identifiers to locale
455 character set for diagnostics.
456 * error.c (M_): Define.
457 (dump_template_bindings, dump_type, dump_aggr_type,
458 dump_type_prefix, dump_global_iord, dump_simple_decl, dump_decl,
459 dump_function_decl, dump_template_parms, dump_expr,
460 dump_binary_op, op_to_string, assop_to_string): Mark English
461 fragments for conditional translation with M_.
462 (type_as_string): Disable translation of identifiers.
463 (type_as_string_translate): New.
464 (expr_as_string): Disable translation of identifiers.
465 (decl_as_string): Disable translation of identifiers.
466 (decl_as_string_translate): New.
467 (lang_decl_name): Add parameter translate.
468 (args_to_string): Call type_as_string_translate.
469 (cp_print_error_function): Call cxx_printable_name_translate.
470 (print_instantiation_full_context,
471 print_instantiation_partial_context): Call
472 decl_as_string_translate.
473 * parser.c (cp_lexer_get_preprocessor_token): Use %qE for
474 identifier in diagnostic.
475 * tree.c (cxx_printable_name): Change to
476 cxx_printable_name_internal. Add parameter translate.
477 (cxx_printable_name, cxx_printable_name_translate): New wrappers
478 round cxx_printable_name_internal.
480 2009-05-08 H.J. Lu <hongjiu.lu@intel.com>
483 * call.c (build_call_a): Updated warn_deprecated_use call.
484 (build_over_call): Likewise.
485 * decl.c (grokdeclarator): Likewise.
486 (grokparms): Likewise.
487 * semantics.c (finish_id_expression): Likewise.
488 * typeck.c (build_class_member_access_expr): Likewise.
489 (finish_class_member_access_expr): Likewise.
491 2009-05-06 Dodji Seketeli <dodji@redhat.com>
494 * pt.c (tsubst_copy) <case PARM_DECL>: We don't want to tsubst the
495 whole list of PARM_DECLs, just the current one.
497 2009-05-05 Shujing Zhao <pearly.zhao@oracle.com>
500 (opname_tab, assignop_tab, update_member_visibility, yyerror, yyhook,
501 mangle_compound_literal): Remove unused declarations.
502 (build_vfield_ref, cxx_print_statistics, clone_function_decl,
503 adjust_clone_args, maybe_push_cleanup_level, pushtag, make_anon_name,
504 pushdecl_top_level_maybe_friend, pushdecl_top_level_and_finish,
505 check_for_out_of_scope_variable, print_other_binding_stack,
506 maybe_push_decl, cxx_mark_addressable, force_target_expr,
507 build_target_expr_with_type, finish_case_label,
508 cxx_maybe_build_cleanup, begin_eh_spec_block, finish_eh_spec_block,
509 check_template_keyword, cxx_omp_predetermined_sharing,
510 cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor,
511 cxx_omp_clause_assign_op, cxx_omp_clause_dtor, cxx_omp_finish_clause,
512 cxx_omp_privatize_by_reference): Rearrange the declarations line to
513 match the comment that indicates the .c file which the functions are
515 (cxx_print_xnode, cxx_print_decl, cxx_print_type,
516 cxx_print_identifier, cxx_print_error_function, pushdecl): Add comment.
518 2009-05-05 Nathan Sidwell <nathan@codesourcery.com>
520 * typeck.c (cp_build_compound_expr): Require RHS to have a known
522 * class.c (resolve_address_of_overloaded_function): Use
523 OVL_CURRENT for error message.
524 (instantiate_type): Forbid COMPOUND_EXPRs and remove code dealing
525 with them. Do not copy the node.
527 2009-05-05 Jakub Jelinek <jakub@redhat.com>
530 * pt.c (tsubst): If magic NOP_EXPR with side-effects has no type,
531 set it from its operand's type after tsubst_expr.
533 2009-05-04 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
536 * parser.c (cp_lexer_get_preprocessor_token): Do not store the
537 canonical spelling for keywords.
538 (cp_parser_attribute_list): Use the canonical spelling for
539 keywords in attributes.
541 2009-05-01 Joseph Myers <joseph@codesourcery.com>
543 * cxx-pretty-print.c (is_destructor_name, pp_cxx_unqualified_id,
544 pp_cxx_template_keyword_if_needed, pp_cxx_postfix_expression,
545 pp_cxx_new_expression, pp_cxx_delete_expression,
546 pp_cxx_unary_expression, pp_cxx_assignment_operator,
547 pp_cxx_assignment_expression, pp_cxx_expression,
548 pp_cxx_function_specifier, pp_cxx_decl_specifier_seq,
549 pp_cxx_simple_type_specifier, pp_cxx_type_specifier_seq,
550 pp_cxx_exception_specification, pp_cxx_direct_declarator,
551 pp_cxx_ctor_initializer, pp_cxx_type_id, pp_cxx_statement,
552 pp_cxx_namespace_alias_definition, pp_cxx_template_parameter,
553 pp_cxx_canonical_template_parameter, pp_cxx_template_declaration,
554 pp_cxx_declaration, pp_cxx_typeid_expression,
555 pp_cxx_va_arg_expression, pp_cxx_offsetof_expression,
556 pp_cxx_trait_expression): Mostly use pp_string and
557 pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
558 for non-identifiers. Mark English strings for translation.
559 * cxx-pretty-print.h (pp_cxx_ws_string): Define.
560 * error.c (dump_template_parameter, dump_template_bindings,
561 dump_type, dump_aggr_type, dump_type_prefix, dump_simple_decl,
562 dump_decl, dump_template_decl, dump_function_decl,
563 dump_parameters, dump_exception_spec, dump_template_parms,
564 dump_expr, dump_binary_op, dump_unary_op, op_to_string,
565 assop_to_string, args_to_string, cp_print_error_function,
566 print_instantiation_full_context,
567 print_instantiation_partial_context): Mostly use pp_string and
568 pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
569 for non-identifiers. Mark English strings for translation.
570 (dump_global_iord): Mark strings for translation; use longer
571 strings instead of substituting single words.
572 (function_category): Return a format string marked for
573 translation, not a single word or phrase to substitute in a longer
576 2009-04-28 Ben Elliston <bje@au.ibm.com>
581 2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
583 * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
585 2009-04-27 Ian Lance Taylor <iant@google.com>
587 * semantics.c (finish_omp_clauses): Change type of c_kind to enum
590 2009-04-27 Jakub Jelinek <jakub@redhat.com>
593 * cvt.c (convert_to_void) <case INDIRECT_REF>: Only warn about
594 -Wunused-value if implicit.
596 2009-04-24 Ian Lance Taylor <iant@google.com>
598 * call.c (build_temp): Change 0 to enum constant.
599 * cp-tree.h (cp_lvalue_kind): Typedef to int rather than enum
601 * cp-gimplify.c (cp_gimplify_expr): Add cast to enum type.
602 * decl2.c (constrain_visibility): Likewise.
603 * parser.c (cp_lexer_get_preprocessor_token): Likewise.
604 (cp_parser_flags): Typedef to int rather than enum type.
605 (cp_parser_expression_stack_entry): Change prec field to enum
608 * typeck.c (build_modify_expr): Add lhs_origtype parameter.
611 2009-04-22 Dodji Seketeli <dodji@redhat.com>
614 * parser.c (cp_parser_template_argument_list): Display an error
615 when an ellipsis is not preceded by a parameter pack. Also, warn
616 about variadic templates usage without -std=c++0x.
618 2009-04-21 Taras Glek <tglek@mozilla.com>
620 * cp-tree.h: Update GTY annotations to new syntax.
622 * mangle.c: Likewise.
623 * name-lookup.c: Likewise.
624 * name-lookup.h: Likewise.
625 * parser.c: Likewise.
628 * semantics.c: Likewise.
629 * typeck2.c: Likewise.
631 2009-04-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
634 * parser.c (cp_parser_error): Pass token->flags to c_parse_error.
636 2009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
639 * typeck.c (check_for_casting_away_constness): We diagnose casting
640 away any qualifiers not just constness.
641 (casts_away_constness): Mention that it handles more than just
644 2009-04-21 Joseph Myers <joseph@codesourcery.com>
646 * ChangeLog, ChangeLog-1993, ChangeLog-1994, ChangeLog-1995,
647 ChangeLog-1996, ChangeLog-1997, ChangeLog-1998, ChangeLog-1999,
648 ChangeLog-2000, ChangeLog-2001, ChangeLog-2002, ChangeLog-2003,
649 ChangeLog-2004, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007,
650 ChangeLog-2008, ChangeLog.ptr, ChangeLog.tree-ssa, NEWS,
651 cfns.gperf: Add copyright and license notices.
652 * cfns.h: Regenerate.
653 * ChangeLog, ChangeLog-2004: Correct dates.
655 2009-04-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
658 * tree.c (lvalue_p_1): Use const_tree.
659 Use CONST_CAST_TREE to avoid warning.
660 (lvalue_p): Returns bool, receives const_tree.
662 2009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
665 * parser.c (cp_parser_check_decl_spec): Drop redundant flags.
666 * error.c (pedwarn_cxx98): New.
667 * cp-tree.h (pedwarn_cxx98): Declare.
669 2009-04-20 Le-Chun Wu <lcwu@google.com>
672 * init.c (build_vec_init): Set TREE_NO_WARNING on the
673 compiler-generated INDIRECT_REF expression.
675 2009-04-20 Ian Lance Taylor <iant@google.com>
677 * typeck.c (build_function_call_vec): New function.
678 (cp_build_function_call): Only pass first parameter to
679 objc_rewrite_function_call.
680 (build_modify_expr): Add rhs_origtype parameter. Change all
682 * decl.c (finish_decl): Add origtype parameter. Change all
684 * semantics.c (finish_call_expr): Pass VEC to
685 resolve_overloaded_builtin.
687 2009-04-20 Ian Lance Taylor <iant@google.com>
689 * cp-tree.h (base_access): Change typedef to int.
690 * parser.c (cp_parser_omp_flush): Change 0 to OMP_CLAUSE_ERROR.
691 (cp_parser_omp_threadprivate): Likewise.
692 * pt.c (unify_pack_expansion): Add casts to enum type.
694 2009-04-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
698 * call.c (build_new_op): Save the original codes of operands
701 2009-04-18 Kazu Hirata <kazu@codesourcery.com>
703 * cp-tree.h: Remove the prototype for insert_block.
704 * decl.c (insert_block): Remove.
706 2009-04-16 Ian Lance Taylor <iant@google.com>
708 * cp-tree.h (enum tsubst_flags): Rename from enum tsubst_flags_t.
709 (tsubst_flags_t): Change typedef from enum type to int.
711 2009-04-16 Paolo Bonzini <bonzini@gnu.org>
713 * decl.c (check_initializer): Use TYPE_VECTOR_OPAQUE
714 instead of targetm.vector_opaque_p.
716 2009-04-15 Le-Chun Wu <lcwu@google.com>
719 * call.c (build_over_call): Set TREE_NO_WARNING on the
720 compiler-generated INDIRECT_REF expression.
721 * cvt.c (convert_to_void): Emit warning when stripping off
724 2009-04-14 Diego Novillo <dnovillo@google.com>
726 * parser.c (cp_parser_type_specifier_seq): Move call to
727 invoke_plugin_callbacks ...
728 (cp_parser_type_specifier_seq): ... here.
730 2009-04-14 Le-Chun Wu <lcwu@google.com>
732 * Make-lang.in: Modify dependencies of files including plugin.h.
733 * decl.c (finish_function): Call invoke_plugin_callbacks.
734 * parser.c (cp_parser_type_specifier): Call invoke_plugin_callbacks.
736 2009-04-14 Jason Merrill <jason@redhat.com>
739 * name-lookup.c (pushdecl_maybe_friend): Avoid all warnings
740 about shadowing by tentative parms.
742 2009-04-13 Jason Merrill <jason@redhat.com>
745 * call.c (build_over_call): Don't call memcpy if the target is
746 the same as the source.
748 2009-04-13 Jason Merrill <jason@redhat.com>
751 * pt.c (uses_template_parms): Handle CONSTRUCTOR.
753 2009-04-12 Jason Merrill <jason@redhat.com>
756 * call.c (joust): Don't crash on variadic fn.
758 2009-04-10 Jason Merrill <jason@redhat.com>
761 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Return
762 if we see a close brace without an open brace.
764 2009-04-10 H.J. Lu <hongjiu.lu@intel.com>
766 * parser.c (cp_parser_class_specifier): Remove the unused
767 has_trailing_semicolon.
769 2009-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
772 * parser.c (cp_parser_check_template_parameters): Take a
773 cp_declarator parameter.
774 (cp_parser_elaborated_type_specifier): Update to
775 cp_parser_check_template_parameters.
776 (cp_parser_class_head): Likewise.
777 (cp_parser_check_declarator_template_parameters): Likewise.
778 (cp_parser_check_template_parameters): Handle first the non-error
779 conditions. Give more accurate diagnostics if a declarator is
782 2009-04-08 Jason Merrill <jason@redhat.com>
785 * error.c (dump_aggr_type): Chase template typedefs if
786 -fno-pretty-templates.
788 2009-04-08 Dodji Seketeli <dodji@redhat.com>
791 * parser.c (cp_parser_enumerator_definition): Make sure the
792 initializer of the enumerator doesn't contain any bare parameter pack.
794 2009-04-07 Jason Merrill <jason@redhat.com>
797 * name-lookup.c (merge_functions): Keep multiple extern "C" functions.
798 * call.c (joust): Complain about mismatched default arguments
799 in extern "C" functions.
800 * class.c (resolve_address_of_overloaded_function): Handle multiple
801 extern "C" functions.
802 * pt.c (resolve_overloaded_unification): Likewise.
804 2009-04-07 Jason Merrill <jason@redhat.com>
807 * error.c (dump_function_decl): Don't pretty-print templates
808 if -fno-pretty-templates.
809 (count_non_default_template_args): Print all args if
810 -fno-pretty-templates.
812 2009-04-06 Jason Merrill <jason@redhat.com>
815 * pt.c (fn_type_unification): For DEDUCE_EXACT check that
816 the deduced template arguments give us the parameter types
819 2009-04-05 Giovanni Bajo <giovannibajo@libero.it>
820 Jason Merrill <jason@redhat.com>
823 * error.c (count_non_default_template_args): New fn.
824 (dump_template_parms): Call it.
825 (dump_template_argument_list): Call it. Add parms parm.
826 (dump_template_argument): Adjust call to dump_template_argument_list.
827 (dump_type, dump_decl): Likewise.
828 (dump_template_bindings): Refactor logic.
830 2009-04-03 Jason Merrill <jason@redhat.com>
833 * error.c (dump_template_bindings): Look through typedefs in
835 (dump_type) [TYPENAME_TYPE]: Print the typedef name if any.
836 (find_typenames_r): Also collect typedefs.
837 * pt.c (unify): Strip typedefs.
840 * semantics.c (finish_id_expression): Don't assume a dependent
841 member of the current instantiation isn't a valid integral
842 constant expression. Check dependent_scope_p.
843 * pt.c (dependent_scope_p): Check TYPE_P.
844 (tsubst_copy): If args is null, just return.
846 2009-04-02 Jason Merrill <jason@redhat.com>
849 * error.c (find_typenames, find_typenames_r): New fns.
850 (dump_function_decl): Call find_typenames.
851 (dump_template_bindings): Print typenames as well.
852 * pt.c (tsubst): Non-static.
853 * cp-tree.h: Declare it.
855 2009-04-02 Dodji Seketeli <dodji@redhat.com>
858 * decl2.c (grokfield): when a typedef appears in a
859 class, create the typedef variant type node for it.
860 (save_template_attributes): Creating typedef variant type node
862 * decl.c (grokdeclarator): If the typedef'ed struct/class was
863 anonymous, set the proper type name to all its type variants.
864 (xref_basetypes) : Fixup the variant types after setting
866 * name-lookup.c (pushdecl_maybe_friend): Reuse the
867 set_underlying_type function to install typedef variant types.
868 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
870 (append_type_to_template_for_access_check): New entry points.
871 * semantics.c (check_accessibility_of_qualified_id):
872 When a typedef that is a member of a class appears in a template,
873 add it to the template. It will be ...
874 * class.c (finish_struct_bits): Split type variant fixup into ...
875 (fixup_type_variants): A new entry point.
876 * pt.c (instantiate_class_template, instantiate_template ): ... access
877 checked at template instantiation time.
878 (resolve_type_name_type): The type name should be the name of the
880 (retrieve_specialization): Specializations of template typedefs aren't
881 to looked up in DECL_TEMPLATE_INSTANTIATIONS (tmpl).
882 (append_type_to_template_for_access_check): New entry point.
883 (tsubst_decl): For typedefs, build the variant type from the correct
885 (get_class_bindings): Fix function comment.
886 (perform_typedefs_access_check): New entry point.
888 2009-03-31 Jason Merrill <jason@redhat.com>
891 * name-lookup.c (pushdecl_maybe_friend): Diagnose mismatched
892 extern "C" declarations.
895 * semantics.c (finish_non_static_data_member): Allow such references
896 without an associated object in sizeof/decltype/alignof.
898 * ptree.c (cxx_print_decl): Pretty-print full name of
900 (cxx_print_type): Pretty-print full name of class.
902 * decl.c (grokdeclarator): Reject pointer to qualified function
905 PR c++/37806, core issue 547
906 * typeck.c (cp_apply_type_quals_to_decl): Don't apply any quals
908 * tree.c (cp_build_qualified_type_real): Don't apply restrict to a
910 * decl.h (enum decl_context): Add TEMPLATE_TYPE_ARG.
911 * decl.c (groktypename): Add is_template_arg parameter.
912 (grokdeclarator): Allow function cv-quals on a template type arg.
913 * parser.c (cp_parser_new_type_id, cp_parser_type_id): Add
914 is_template_arg argument in calls to groktypename.
915 * cp-tree.h: Adjust prototype.
916 * error.c (dump_type_prefix, dump_type_suffix): Fix plain
917 FUNCTION_TYPE printing.
919 * mangle.c (write_expression): Mangle dependent name as
922 PR c++/38030, 38850, 39070
923 * pt.c (type_dependent_expression_p_push): New fn.
924 (tsubst_copy_and_build) [CALL_EXPR]: Only do arg-dep lookup when the
925 substitution makes the call non-dependent. Preserve koenig_p.
926 * parser.c (cp_parser_postfix_expression): Only do arg-dep lookup
927 for non-dependent calls.
928 * semantics.c (finish_call_expr): Revert earlier changes.
929 * cp-tree.h: Revert change to finish_call_expr prototype.
931 2009-03-29 Joseph Myers <joseph@codesourcery.com>
933 PR preprocessor/34695
934 * cp-tree.h (cp_cpp_error): Remove.
935 * error.c (cp_cpp_error): Remove.
936 * parser.c (cp_lexer_new_main): Set done_lexing instead of
937 client_diagnostic and error callback.
939 2009-03-28 Paolo Bonzini <bonzini@gnu.org>
941 * cp/cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
942 * cp/cp-objcp-common.c (cxx_staticp): Remove.
943 * cp/cp-tree.h (cxx_staticp): Remove.
945 2009-03-28 Jakub Jelinek <jakub@redhat.com>
948 * parser.c (cp_parser_postfix_expression): Don't call
949 warning_if_disallowed_function_p.
951 2009-03-27 Jan Hubicka <jh@suse.cz>
953 * except.c (choose_personality_routine): Set terminate_node to abort
956 2009-03-27 Dodji Seketeli <dodji@redhat.com>
957 Jakub Jelinek <jakub@redhat.com>
960 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P): Define.
961 (cp_function_decl_explicit_p): New prototype.
962 * cp-objcp-common.c (cp_function_decl_explicit_p): New function.
964 2009-03-27 Andrew Pinski <andrew_pinski@playstation.sony.com>
967 * parser.c (cp_parser_elaborated_type_specifier): If we have a
968 typename tag and don't have either a TYPE_DECL or a
969 TEMPLATE_ID_EXPR, set the type to NULL.
971 2009-03-27 Simon Martin <simartin@users.sourceforge.net>
974 * decl.c (grokdeclarator): Reject [con|de]stuctors in a non-class
977 2009-03-27 Simon Martin <simartin@users.sourceforge.net>
980 * decl.c (check_array_designated_initializer): Handle error_mark_node.
982 2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
985 * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
987 2009-03-26 Andrew Haley <aph@redhat.com>
990 * decl2.c (possibly_inlined_p): If java exceptions are in use
991 don't inline a decl unless it is explicitly marked inline.
992 * lex.c: (pragma_java_exceptions): New variable.
993 (handle_pragma_java_exceptions): Set pragma_java_exceptions.
994 * cp-tree.h (pragma_java_exceptions): Declare new variable.
996 2009-03-24 Jason Merrill <jason@redhat.com>
999 * name-lookup.c (pushdecl_maybe_friend): Check default args later.
1001 2009-03-23 Jakub Jelinek <jakub@redhat.com>
1004 * semantics.c (handle_omp_for_class_iterator): Swap cond operands and
1005 code if iter is the second operand.
1006 * parser.c (cp_parser_binary_expression): Add no_toplevel_fold_p
1007 argument. If it is set, don't build the toplevel expression with
1008 build_x_binary_op, but build2.
1009 (cp_parser_assignment_expression, cp_parser_omp_for_incr): Adjust
1011 (cp_parser_omp_for_cond): Don't assume the first operand of the
1012 comparison must be decl.
1014 2009-03-23 Jason Merrill <jason@redhat.com>
1017 * pt.c (make_fnparm_pack): Split out from...
1018 (instantiate_decl): ...here.
1019 (tsubst_pack_expansion): Handle being called in a late-specified
1023 * name-lookup.c (pushdecl_maybe_friend): Don't warn about shadowing
1026 2009-03-20 Jason Merrill <jason@redhat.com>
1029 * parser.c (cp_parser_direct_declarator): In a template, wrap
1030 non-constant expression in NOP_EXPR with TREE_SIDE_EFFECTS set.
1031 * pt.c (tsubst): Preserve it in a partial instantiation.
1032 (dependent_type_p_r): Don't check value_dependent_expression_p.
1033 * decl.c (compute_array_index_type): Don't check
1034 value_dependent_expression_p if TREE_SIDE_EFFECTS.
1037 * typeck2.c (check_narrowing): Don't complain about loss of
1038 precision when converting a floating-point constant.
1040 2009-03-19 Jakub Jelinek <jakub@redhat.com>
1043 * parser.c (cp_parser_omp_for_cond): Don't check lhs if decl is NULL.
1044 (cp_parser_omp_for_loop): Always use cp_parser_omp_for_cond.
1046 2009-03-18 Jakub Jelinek <jakub@redhat.com>
1048 * parser.c (struct cp_token): Reorder fields for 64-bit hosts.
1049 (eof_token): Adjust.
1051 2009-03-18 H.J. Lu <hongjiu.lu@intel.com>
1054 * parser.c (cp_parser_explicit_specialization): Don't skip the
1055 rest of the specialization when begin_specialization returns
1058 2009-03-17 Jason Merrill <jason@redhat.com>
1060 * decl.c (grokfndecl): Set DECL_CONTEXT on parms.
1061 (duplicate_decls): Adjust DECL_CONTEXT of newdecl's parms.
1062 * pt.c (check_explicit_specialization): Likewise.
1063 (tsubst_copy) [PARM_DECL]: Return a dummy parm if we don't have a
1064 local specialization.
1065 * tree.c (cp_tree_equal) [PARM_DECL]: Check type and index, not name.
1066 * decl2.c (parm_index): New fn.
1067 * semantics.c (finish_decltype_type): Don't use describable_type.
1068 * mangle.c (write_expression): Likewise. Mangle ALIGNOF_EXPR.
1069 Give a sorry for unsupported codes rather than crash. Mangle
1070 conversions with other than 1 operand. New mangling for PARM_DECL.
1071 * operators.def (ALIGNOF_EXPR): Mangle as "az".
1073 2009-03-17 Jing Yu <jingyu@google.com>
1076 * method.c (use_thunk): Change is_thunk from crtl to cfun.
1078 2009-03-17 Paolo Carlini <paolo.carlini@oracle.com>
1081 * semantics.c (check_trait_type): New.
1082 (finish_trait_expr): Use it.
1084 2009-03-17 Jakub Jelinek <jakub@redhat.com>
1086 * name-lookup.c (cp_emit_debug_info_for_using): Emit USING_STMTs
1087 instead of calling imported_module_or_decl debug hook if
1088 building_stmt_tree ().
1089 * cp-gimplify.c (cp_gimplify_expr): Don't assert the first operand
1090 is a NAMESPACE_DECL.
1093 * name-lookup.c (do_namespace_alias): Don't call global_decl debug
1094 hook at function scope.
1097 * cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
1100 2009-03-09 Jakub Jelinek <jakub@redhat.com>
1103 * semantics.c (finish_switch_cond): Don't call get_unwidened.
1104 * decl.c (finish_case_label): Pass SWITCH_STMT_TYPE as 3rd argument
1105 instead of TREE_TYPE (cond).
1107 2009-03-08 H.J. Lu <hongjiu.lu@intel.com>
1110 * parser.c (cp_parser_late_parsing_default_args): Continue
1111 the loop when cp_parser_assignment_expression returns
1114 2009-03-07 Jason Merrill <jason@redhat.com>
1117 * init.c (build_new_1): Don't use a VLA type.
1118 (build_vec_init): Handle getting a pointer for BASE.
1120 2009-03-06 H.J. Lu <hongjiu.lu@intel.com>
1123 * cp-tree.h: Check NO_DOT_IN_LABEL before NO_DOLLAR_IN_LABEL
1124 when mangling symbols.
1126 2009-03-06 Paolo Carlini <paolo.carlini@oracle.com>
1129 * error.c (dump_expr): Don't try to print THROW_EXPRs in full.
1131 2009-03-06 Alexandre Oliva <aoliva@redhat.com>
1133 * decl.c (record_builtin_java_type): Use canonicalized integer
1136 2009-03-04 Jason Merrill <jason@redhat.com>
1139 * class.c (is_really_empty_class): New fn.
1140 * cp-tree.h: Declare it.
1141 * cp-objcp-common.c (cp_expr_size): Use it.
1144 * semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
1145 * parser.c (cp_parser_postfix_expression): Call it for
1147 * tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
1148 (get_first_fn): Likewise.
1154 * decl.c (make_typename_type): Do look inside currently open classes.
1155 * parser.c (cp_parser_lookup_name): Likewise.
1156 (cp_parser_template_name): Likewise.
1157 * pt.c (dependent_scope_p): New function.
1158 * cp-tree.h: Declare it.
1159 * class.c (currently_open_class): Return fast if T isn't a class.
1161 2009-02-26 H.J. Lu <hongjiu.lu@intel.com>
1164 * parser.c (cp_parser_mem_initializer): Return error_mark_node
1165 if cp_parser_mem_initializer_id returns error_mark_node.
1167 2009-02-24 Richard Guenther <rguenther@suse.de>
1170 * pt.c (instantiate_decl): Do not instantiate extern, non-inline
1173 2009-02-23 H.J. Lu <hongjiu.lu@intel.com>
1176 * pt.c (coerce_template_template_parms): Return 0 if parameter
1179 2009-02-23 Jason Merrill <jason@redhat.com>
1181 * pt.c (unify): Call maybe_adjust_types_for_deduction when
1182 deducing from an initializer list.
1184 2009-02-20 Jason Merrill <jason@redhat.com>
1187 * decl.c (grokdeclarator): Handle ~identifier.
1189 2009-02-19 Jakub Jelinek <jakub@redhat.com>
1192 * decl2.c (determine_visibility): If visibility changed and
1193 DECL_RTL has been already set, call make_decl_rtl to update symbol
1196 2009-02-19 H.J. Lu <hongjiu.lu@intel.com>
1199 * cp-tree.h (maybe_commonize_var): New.
1201 * decl.c (maybe_commonize_var): Make it extern.
1203 * decl2.c (finish_anon_union): Call maybe_commonize_var.
1205 2009-02-18 H.J. Lu <hongjiu.lu@intel.com>
1208 * parser.c (cp_parser_enum_specifier): Apply all attributes.
1210 2009-02-18 Jason Merrill <jason@redhat.com>
1212 * cfns.h: Tweak pathname for cfns.gperf.
1214 2009-02-13 Jason Merrill <jason@redhat.com>
1217 * semantics.c (finish_call_expr): Change koenig_p parm to int.
1218 If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
1219 * cp-tree.h: Adjust prototype.
1220 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
1222 2009-02-12 Jason Merrill <jason@redhat.com>
1225 * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
1227 2009-02-11 Jason Merrill <jason@redhat.com>
1230 * decl2.c (cp_write_global_declarations):
1231 Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
1234 * init.c (build_value_init_noctor): Split out from...
1235 (build_value_init): ...here.
1236 (expand_aggr_init_1): Handle value-initialization.
1237 * cp-tree.h: Add declaration.
1238 * class.c (type_has_user_provided_constructor):
1239 Handle non-class arguments.
1241 2009-02-10 Jason Merrill <jason@redhat.com>
1244 * class.c (defaultable_fn_p): Handle ... properly.
1247 * tree.c (lvalue_p_1): Condition rvalue ref handling on
1248 treat_class_rvalues_as_lvalues, too.
1250 2009-02-10 Paolo Carlini <paolo.carlini@oracle.com>
1253 * typeck.c (build_x_array_ref): New.
1254 * cp-tree.h: Declare it.
1255 * pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
1257 2009-02-09 Jason Merrill <jason@redhat.com>
1260 * semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
1261 * init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
1262 * tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
1263 * cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
1264 for build_value_init TARGET_EXPR.
1265 * cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
1267 2009-02-06 Paolo Carlini <paolo.carlini@oracle.com>
1271 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
1273 2009-02-04 Jakub Jelinek <jakub@redhat.com>
1276 * operators.def: Use COMPONENT_REF code for ->/pt operator again,
1277 remove ./dt operator.
1278 * mangle.c (write_expression): Handle COMPONENT_REF after handling
1279 ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
1280 write_string ("dt") instead of using operators.def.
1282 2009-02-03 Jason Merrill <jason@redhat.com>
1284 * typeck.c (cp_build_unary_op): Only complain about taking address
1285 of main if pedantic.
1287 2009-02-03 Jakub Jelinek <jakub@redhat.com>
1290 * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
1293 * typeck2.c (digest_init_r): Don't call process_init_constructor
1296 2009-02-03 Paolo Bonzini <bonzini@gnu.org>
1299 * pt.c (convert_nontype_argument_function): Expect expr to be an
1303 * typeck.c (merge_types): Call resolve_typename_type if only
1304 one type is a typename.
1306 2009-02-02 Jason Merrill <jason@redhat.com>
1309 * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node
1312 2009-02-01 Paolo Carlini <paolo.carlini@oracle.com>
1315 * parser.c (cp_parser_pure_specifier): If there are no tokens left
1316 do not call cp_lexer_consume_token.
1318 2009-01-30 Jakub Jelinek <jakub@redhat.com>
1321 * parser.c (cp_parser_already_scoped_statement): Handle __label__
1324 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
1327 * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
1329 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
1332 * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
1334 2009-01-29 Paolo Carlini <paolo.carlini@oracle.com>
1336 * typeck.c (invalid_nonstatic_memfn_p): Use
1337 DECL_NONSTATIC_MEMBER_FUNCTION_P.
1339 2009-01-27 Paolo Carlini <paolo.carlini@oracle.com>
1342 * call.c (build_over_call): If convert_for_arg_passing returns
1343 error_mark_node unconditionally return it.
1345 2009-01-22 Adam Nemet <anemet@caviumnetworks.com>
1347 * class.c (check_field_decls): Also inherit packed for bitfields
1348 regardless of their type.
1350 2009-01-22 Dodji Seketeli <dodji@redhat.com>
1353 * decl2.c (grokfield): Reverting changes of PR c++/26693
1354 (save_template_attributes): Likewise.
1355 * decl.c (grokdeclarator): Likewise.
1356 * name-lookup.c (pushdecl_maybe_friend): Likewise.
1357 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
1358 (append_type_to_template_for_access_check): Likewise.
1359 * semantics.c (check_accessibility_of_qualified_id): Likewise.
1360 * pt.c (instantiate_class_template, instantiate_template ): Likewise.
1362 (resolve_type_name_type): Likewise.
1363 (append_type_to_template_for_access_check): Likewise.
1365 2009-01-21 Dodji Seketeli <dodji@redhat.com>
1368 * decl2.c (grokfield): when a typedef appears in a
1369 class, create the typedef variant type node for it.
1370 (save_template_attributes): Creating typedef variant type node
1371 here is now useless.
1372 * decl.c (grokdeclarator): If the typedef'ed struct/class was
1373 anonymous, set the proper type name to all its type variants.
1374 * name-lookup.c (pushdecl_maybe_friend): Reuse the
1375 set_underlying_type function to install typedef variant types.
1376 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
1378 (append_type_to_template_for_access_check): New entry points.
1379 * semantics.c (check_accessibility_of_qualified_id):
1380 When a typedef that is a member of a class appears in a template,
1381 add it to the template. It will be ...
1382 * pt.c (instantiate_class_template, instantiate_template ): ... access
1383 checked at template instantiation time.
1384 (tsubst): Handle the case of being called with NULL args.
1385 (resolve_type_name_type): The type name should be the name of the
1387 (append_type_to_template_for_access_check): New entry point.
1389 2009-01-19 Jason Merrill <jason@redhat.com>
1392 * parser.c (cp_parser_unqualified_id): In a template,
1394 * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
1396 2009-01-16 Jason Merrill <jason@redhat.com>
1399 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
1400 * init.c (build_new): Don't call describable_type unless we
1404 * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
1407 * search.c (protected_accessible_p): N doesn't vary.
1409 2009-01-15 Jason Merrill <jason@redhat.com>
1412 * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
1413 accept hidden friends.
1415 2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1418 * decl.c (grokdeclarator): Check for a non namespace/class context.
1420 2009-01-15 Jason Merrill <jason@redhat.com>
1424 * tree.c (lvalue_p_1): Handle BASELINK. A COMPONENT_REF to
1425 a function isn't necessarily an lvalue. Take tree, not const_tree.
1426 (lvalue_p, real_lvalue_p): Take tree, not const_tree.
1427 * typeck.c (lvalue_or_else): Likewise.
1428 * cp-tree.h: Adjust prototypes.
1430 2009-01-15 Steve Ellcey <sje@cup.hp.com>
1433 * pt.c (tsubst): Check for NULL args.
1435 2009-01-15 Dodji Seketeli <dodji@redhat.com>
1438 * name-lookup.c (pushtag): Don't create members to types that are not
1441 2009-01-14 Nick Clifton <nickc@redhat.com>
1444 * parser.c: Pass cp_id_kind computed in
1445 cp_parser_postfix_dot_deref_expression to
1446 cp_parser_primary_expression.
1448 2009-01-13 Jakub Jelinek <jakub@redhat.com>
1451 * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
1452 STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
1455 2009-01-12 Jason Merrill <jason@redhat.com>
1456 Steve Ellcey <sje@cup.hp.com>
1459 * name-lookup.c (lookup_name_real): Keep looking past a hidden
1462 2009-01-12 Dodji Seketeli <dodji@redhat.com>
1465 * pt.c (parameter_of_template_p): New function.
1466 * cp-tree.h: Declare it.
1467 * name-lookup.c (binding_to_template_parms_of_scope_p): New
1469 (outer_binding): Take template parameters in account when looking for
1472 2009-01-12 Jason Merrill <jason@redhat.com>
1475 * tree.c (pod_type_p): Return 1 for structs created by the back end.
1477 2009-01-12 Jakub Jelinek <jakub@redhat.com>
1480 * parser.c (cp_parser_builtin_offsetof): Allow `->' in
1481 offsetof member-designator, handle it as `[0].'.
1484 * decl.c (start_function): If grokdeclarator hasn't returned
1485 FUNCTION_DECL nor error_mark_node, issue diagnostics.
1487 2009-01-11 Jakub Jelinek <jakub@redhat.com>
1490 * cp-gimplify.c (genericize_if_stmt): Renamed from ...
1491 (gimplify_if_stmt): ... this.
1492 (cp_gimplify_expr): Don't handle IF_STMT here.
1493 (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
1495 2009-01-10 Andrew Pinski <pinskia@gmail.com>
1498 * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
1501 * typeck2.c (build_functional_cast): Check for reference type and NULL
1504 2009-01-09 Steve Ellcey <sje@cup.hp.com>
1506 * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
1508 2009-01-09 Jakub Jelinek <jakub@redhat.com>
1511 * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
1513 2009-01-09 John F. Carr <jfc@mit.edu>
1516 * parser.c (cp_parser_class_specifier): Clear
1517 parser->in_unbraced_linkage_specification_p while parsing class
1520 2009-01-07 Jakub Jelinek <jakub@redhat.com>
1523 * semantics.c (finish_goto_stmt): Convert destination to
1526 2009-01-06 Jason Merrill <jason@redhat.com>
1533 * pt.c (check_default_tmpl_args): Don't complain about
1534 out-of-order parameter packs in the enclosing class
1535 or parameter packs after default args.
1536 (coerce_template_parms): If we have more than one
1537 parameter pack, don't flatten argument packs.
1538 (template_args_equal): Handle argument packs.
1539 (comp_template_args): Don't flatten argument packs.
1540 (check_instantiated_arg): Split out from...
1541 (check_instantiated_args): Here. Handle arg packs.
1542 (convert_template_argument): Just check that nontype argument
1543 packs have the right type.
1545 2009-01-05 Dodji Seketeli <dodji@redhat.com>
1548 * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
1550 2009-01-05 Jason Merrill <jason@redhat.com>
1553 * typeck2.c (process_init_constructor_union): Handle union with
1556 * mangle.c (write_expression): Remove mangling for zero-operand
1560 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
1564 * class.c (defaultable_fn_p): Only operator== can be a copy
1565 assignment operator.
1567 2009-01-02 Jason Merrill <jason@redhat.com>
1570 * typeck2.c (process_init_constructor_union): Handle excess
1572 (process_init_constructor_record): Likewise.
1575 * typeck2.c (digest_init_r): Don't use process_init_constructor
1576 for non-aggregate classes.
1579 Copyright (C) 2009 Free Software Foundation, Inc.
1581 Copying and distribution of this file, with or without modification,
1582 are permitted in any medium without royalty provided the copyright
1583 notice and this notice are preserved.