1 2009-06-08 Jason Merrill <jason@redhat.com>
3 * parser.c (cp_parser_type_id_1): 'auto' type is ok with a
4 late-specified return type.
6 2009-06-08 Jakub Jelinek <jakub@redhat.com>
9 * call.c (check_dtor_name): Return false even if
10 get_type_value (name) is error_mark_node.
14 * parser.c (cp_parser_direct_declarator): Don't set TREE_SIDE_EFFECTS
15 on error_mark_node. Check for VLAs outside of function context
16 before check whether to wrap bounds into a NOP_EXPR with
19 2009-06-08 Alexandre Oliva <aoliva@redhat.com>
21 * repo.c (get_base_filename): Use aux_base_name rather than
22 alternate temporary file during second compare debug compilation.
23 (finish_repo): Skip during -fcompare-debug-second.
25 2009-06-06 Ian Lance Taylor <iant@google.com>
27 * parser.c (cp_parser_label_for_labeled_statement): Support
28 attribute on labels if immediately followed by semicolon.
29 * semantics.c (finish_label_stmt): Return new label.
30 * pt.c (tsubst_expr): Handle attributes for LABEL_EXPR.
32 2009-06-03 Ian Lance Taylor <iant@google.com>
34 * Make-lang.in (cc1plus-checksum.o): Depend upon $(CONFIG_H) and
37 2009-06-02 Mark Mitchell <mark@codesourcery.com>
39 * decl.c (maybe_deduce_size_from_array_init): Use relayout_decl.
41 2009-06-02 Jason Merrill <jason@redhat.com>
45 * typeck.c (cp_build_modify_expr): Always pass init-lists to the
47 * call.c (implicit_conversion): Allow init-list conversion to scalar
48 during direct-initialization, too. Mark the conversion bad if it
49 has too many levels of braces.
50 (convert_like_real): And give a helpful error.
54 * decl.c (cp_finish_decl): Handle auto deduction from ().
55 * typeck.c (build_x_indirect_ref): Handle dereferencing an operand
56 with dependent type that is known to be a pointer.
58 2009-06-02 Simon Martin <simartin@users.sourceforge.net>
61 * pt.c (register_specialization): Properly setup DECL_CONTEXT for
62 specializations in an invalid namespace.
64 2009-06-01 Aldy Hernandez <aldyh@redhat.com>
66 * error.c (print_instantiation_partial_context): Print column
69 2009-05-29 Ian Lance Taylor <iant@google.com>
71 * error.c (cp_printer): Don't use va_arg with enum type.
73 2009-05-28 Dodji Seketeli <dodji@redhat.com>
76 * cp-tree.h (canonical_type_variant): Remove this function declaration.
77 (strip_typedefs): New function declaration.
78 * tree.c (strip_typedefs): New function definition.
79 (canonical_type_variant): Remove function definition.
80 * cvt.c (convert_from_reference): No need to use
81 canonical_type_variant.
82 * typeck.c (cp_build_indirect_ref): Likewise.
83 * error.c (dump_template_bindings): Use strip_typedefs instead of
84 canonical_type_variant.
85 * pt.c (convert_template_argument, unify): Likewise.
86 * mangle.c (canonicalize_for_substitution): Don't use
87 canonical_type_variant.
89 2009-05-27 Jason Merrill <jason@redhat.com>
91 * call.c (implicit_conversion): Handle conversion from
92 initializer-list to scalar.
93 (convert_like_real): Likewise. Avoid crashing on list
94 initialization with bad conversions.
95 (can_convert): Use LOOKUP_EXPLICIT.
96 (can_convert_arg_bad): Add flags parm.
98 * typeck.c (convert_for_assignment): Pass flags.
100 2009-05-27 Ian Lance Taylor <iant@google.com>
102 * Make-lang.in (g++$(exeext)): Change $(COMPILER) to $(LINKER).
103 (cc1plus-dummy$(exeext), cc1plus$(exeext)): Likewise.
105 2009-05-26 Ian Lance Taylor <iant@google.com>
107 * Make-lang.in (g++spec.o): Use $(COMPILER).
108 (g++$(exeext), cc1plus-dummy$(exeext)): Likewise.
109 (cc1plus$(exeext)): Likewise.
111 2009-05-26 Dodji Seketeli <dodji@redhat.com>
114 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Remove this accessor.
115 (TI_TYPEDEFS_NEEDING_ACCESS_CHECKING): New accessor.
116 (get_types_needing_access_check): Declare new entry point.
117 * pt.c (append_type_to_template_for_access_check_1,
118 get_types_needing_access_check): New functions.
119 (perform_typedefs_access_check): Accept FUNCTION_DECLs and
120 RECORD_TYPEs rather than TEMPLATE_DECLs. Use the new
121 get_types_needing_access_check, no more
122 MEMBER_TYPES_NEEDING_ACCESS_CHECK.
123 (instantiate_class_template): Set input_location to the source
124 location of the most specialized template definition.
125 Perform access check using the RECORD_TYPE of the template, not its
126 associated most generic TEMPLATE_DECL.
127 (append_type_to_template_for_access_check): Augment function
128 comments. Use the new get_types_needing_access_check, not
129 MEMBER_TYPE_NEEDING_ACCESS_CHECK. Use the new
130 append_type_to_template_for_access_check_1 subroutine.
132 2009-05-22 Jason Merrill <jason@redhat.com>
135 * typeck.c (cp_build_binary_op): Allow ENUMERAL_TYPE in
136 arithmetic comparisons.
137 (cp_common_type): Handle scoped enums.
139 * call.c (promoted_arithmetic_type_p): Don't use INTEGRAL_TYPE_P.
140 (add_builtin_candidate, add_builtin_candidates): Likewise.
141 (convert_like_real): Likewise.
142 * class.c (check_bitfield_decl): Likewise.
143 * decl.c (check_static_variable_definition): Likewise.
144 (compute_array_index_type): Likewise.
145 * decl2.c (grokbitfield): Likewise.
146 * init.c (build_new_1): Likewise.
147 * pt.c (convert_nontype_argument): Likewise.
148 (current_instantiation): Likewise.
149 * tree.c (pod_type_p): Likewise.
150 * typeck.c (build_static_cast_1): Likewise.
151 (build_reinterpret_cast_1): Likewise.
153 2009-05-22 Richard Guenther <rguenther@suse.de>
156 * init.c (avoid_placement_new_aliasing): Remove.
157 (build_new_1): Do not call it.
159 2009-05-22 Mark Mitchell <mark@codesourcery.com>
161 * decl2.c (decl_needed_p): Consider dllexport'd functions needed.
162 * semantics.c (expand_or_defer_fn): Similarly.
164 2009-05-20 Ian Lance Taylor <iant@google.com>
166 * parser.c (cp_parser_postfix_expression): Change args to a vec.
167 Release it when done.
168 (tree_vector): Define typedef. Define VEC functions.
169 (cp_parser_parenthesized_expression_list): Change return type to
170 vec. Change all callers.
171 (cp_parser_new_expression): Change placement and initializer to
172 vecs. Release them when done.
173 (cp_parser_new_placement): Change return type to vec. Change all
175 (cp_parser_new_initializer): Likewise.
176 * typeck.c (build_function_call_vec): Just call
177 cp_build_function_call_vec.
178 (cp_build_function_call): Just build a vec and call
179 cp_build_function_call_vec.
180 (cp_build_function_call_vec): New function based on old
181 cp_build_function_call.
182 (convert_arguments): Remove nargs and argarray parameters. Change
183 values to a vec. Change caller.
184 (build_x_compound_expr_from_vec): New function.
185 (cp_build_modify_expr): Build vec to pass to
186 build_special_member_call.
187 * call.c (struct z_candidate): Add first_arg field. Change args
189 (convert_class_to_reference): Handle first argument separately.
190 (add_candidate): Add first_arg parameter. Change args parameter
191 to vec. Change all callers.
192 (add_function_candidate, add_conv_candidate): Likewise.
193 (add_template_candidate_real, add_template_candidate): Likewise.
194 (add_template_conv_candidate): Likewise.
195 (build_user_type_conversion_1): Handle first argument separately.
196 (resolve_args): Change return type and parameter type to vecs.
198 (perform_overload_resolution): Change args parameter to vec.
200 (build_new_function_call, build_operator_new_call): Likewise.
201 (add_candidates): Likewise.
202 (build_op_call): New globally visible function, built from and
203 replacing static function build_object_call.
204 (build_new_op): Don't handle CALL_EXPR. Build vec, not tree_list,
206 (build_op_delete_call): Build vec to pass to
207 cp_build_function_call_vec.
208 (build_temp): Build vec to pass to build_special_member_call.
209 (convert_like_real): Likewise.
210 (perform_direct_initialization_if_possible): Likewise.
211 (build_over_call): Handle first_arg field. Use build_call_array
212 rather than build_call_list.
213 (build_special_member_call): Change args parameter to vec. Change
215 (build_new_method_call): Likewise.
216 * init.c (expand_default_init): Change parms to vec.
217 (build_raw_new_expr): Change placement and init to vecs. Change
219 (build_new_1, build_new): Likewise.
220 * class.c (resolve_address_of_overloaded_function): Build array to
221 pass to fn_type_unification.
222 * pt.c (tsubst_copy_and_build): For NEW_EXPR build vecs to pass to
223 build_new. For CALL_EXPR create a vec rather than a tree_list;
224 expand a pack if necessary.
225 (fn_type_unification): Change args parameter to const tree *. Add
226 nargs parameter. Change all callers.
227 (type_unification_real): Likewise.
228 (unify): Build array to pass to type_unification_real.
229 (get_bindings): Build array to pass to fn_type_unification.
230 (any_type_dependent_arguments_p): Change args parameter to a vec.
232 (make_args_non_dependent): Renamed from build_non_dependent_args.
233 Change return type to void. Change parameter type to vec. Change
235 (do_auto_deduction): Pass an array to type_unification_real.
236 * semantics.c (perform_koenig_lookup): Change args to vec. Change
238 (finish_call_expr): Change args to vec. Change all callers. Call
239 build_op_call instead of passing CALL_EXPR to build_new_op.
240 (cxx_omp_create_clause_info): Allocate vec to pass to
241 build_special_member_call.
242 * decl2.c (build_offset_ref_call_from_tree): Change args parameter
243 to vec. Change all callers.
244 * name-lookup.c (lookup_function_nonclass): Likewise.
245 (struct arg_lookup): Change args to vec.
246 (arg_assoc_namespace): Handle args as a vec.
247 (arg_assoc_args_vec): New static function.
248 (lookup_arg_dependent): Change args parameter to vec. Change all
250 * method.c (do_build_assign_ref): Allocate vec to pass to
251 build_special_member_call.
252 * except.c (build_throw): Likewise.
253 * typeck2.c (build_functional_cast): Likewise.
254 * cvt.c (ocp_convert): Likewise.
255 * tree.c (build_min_non_dep_call_vec): Change last parameter to
256 vec. Change all callers.
257 * cp-tree.h: Update declarations.
258 * name-lookup.h: Update declarations.
260 2009-05-20 Sandra Loosemore <sandra@codesourcery.com>
262 * typeck.c (default_conversion): Check targetm.promoted_type.
263 * decl.c (grokdeclarator): Check targetm.invalid_return_type.
264 (grokparms): Check targetm.invalid_parameter_type.
265 * cvt.c (ocp_convert): Check targetm.convert_to_type.
266 (build_expr_type_conversion): Check targetm.promoted_type.
268 2009-05-19 Andrew Pinski <andrew_pinski@playstation.sony.com>
270 * typeck.c (build_binary_op): Allow % on integal vectors.
272 2009-05-18 Jason Merrill <jason@redhat.com>
274 Implement explicit conversions ops as specified in N2437.
275 * decl.c (grokdeclarator): Handle explicit conversion ops.
276 (check_initializer): Pass flags to store_init_value.
277 * decl2.c (maybe_emit_vtables): Likewise.
278 * init.c (expand_aggr_init_1): Likewise.
279 * call.c (convert_class_to_reference): Take flags parm,
280 check DECL_NONCONVERTING_P.
281 (build_user_type_conversion_1): Check DECL_NONCONVERTING_P.
282 (add_builtin_candidates): Simplify getting type of conversion.
283 (build_object_call): Likewise. Check DECL_NONCONVERTING_P.
284 (implicit_conversion): Pass through LOOKUP_ONLYCONVERTING.
285 (reference_binding): Take flags parm. Direct-initialize copy parm.
286 (add_function_candidate): Direct-initialize the copy parm.
287 (add_conv_candidate): Use LOOKUP_IMPLICIT, not LOOKUP_NORMAL.
288 (build_builtin_candidate): Add LOOKUP_ONLYCONVERTING.
289 (conditional_conversion): Likewise.
290 (convert_like_real): Only complain about DECL_NONCONVERTING_P
292 (perform_implicit_conversion_flags): Add flags parm to
293 perform_implicit_conversion. Improve diagnostics.
294 * cp-tree.h (LOOKUP_IMPLICIT): New macro.
295 (LOOKUP_COPY_PARM): New bit macro.
296 * cvt.c (build_expr_type_conversion): Check DECL_NONCONVERTING_P.
297 * typeck.c (convert_for_assignment): Take flags parm, pass it to
298 perform_implicit_conversion_flags.
299 (cp_build_modify_expr): Pass flags to convert_for_assignment.
300 (convert_for_initialization): Likewise.
301 * typeck2.c (store_init_value): Take flags parm, pass to
303 (digest_init_flags): Add flags parm to digest_init.
304 (digest_init_r): Take flags parm, pass to convert_for_initialization.
305 (process_init_constructor_array): Pass it.
306 (process_init_constructor_record): Likewise.
307 (process_init_constructor_union): Likewise.
309 2009-05-16 Jason Merrill <jason@redhat.com>
312 * pt.c (tsubst_qualified_id): Retain the type if we aren't dealing
313 with a dependent type. Actually look up the destructor.
314 * semantics.c (finish_id_expression): Fix logic.
315 (finish_qualified_id_expr): Don't try to use 'this' if we aren't in
317 * typeck.c (build_x_unary_op): Diagnose taking the address of a
318 constructor or destructor.
319 * tree.c (get_first_fn): Handle OFFSET_REF.
321 2009-05-17 Joseph Myers <joseph@codesourcery.com>
323 * tree.c (cxx_printable_name_internal): Allow consecutive
324 translated and untranslated cached copies of the name of the
327 2009-05-15 Ian Lance Taylor <iant@google.com>
329 * cp-tree.h (enum cp_lvalue_kind_flags): Rename from
330 cp_lvalue_kind. Change all uses.
331 (enum base_access_flags): Rename from enum base_access. Change
333 * parser.c (enum cp_parser_flags): Remove enum tag.
335 2009-05-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
338 * call.c (build_new_op): Update calls to warn_logical_operator.
340 2009-05-14 Ian Lance Taylor <iant@google.com>
342 * class.c (layout_class_type): Change itk to unsigned int.
343 * decl.c (finish_enum): Change itk to unsigned int.
344 * parser.c (cp_parser_check_decl_spec): Change ds to int. Remove
347 2009-05-13 David Mandelin <dmandelin@mozilla.com>:
349 * decl.c (duplicate_decls): Preserve parameter attributes.
351 2009-05-10 Jan Hubicka <jh@suse.cz>
353 * decl2.c (cxx_callgraph_analyze_expr): Use
354 cgraph_mark_address_taken.
356 2009-05-10 Joseph Myers <joseph@codesourcery.com>
358 * call.c (name_as_c_string): Call type_as_string_translate.
359 Translate identifiers to locale character set.
360 * cp-tree.h (lang_decl_name): Update prototype.
361 (type_as_string_translate, decl_as_string_translate,
362 cxx_printable_name_translate): Declare.
363 * cxx-pretty-print.c (M_): Define.
364 (pp_cxx_unqualified_id, pp_cxx_canonical_template_parameter): Mark
365 English fragments for conditional translation with M_.
366 * decl.c (grokdeclarator): Translate identifiers to locale
367 character set for diagnostics.
368 * error.c (M_): Define.
369 (dump_template_bindings, dump_type, dump_aggr_type,
370 dump_type_prefix, dump_global_iord, dump_simple_decl, dump_decl,
371 dump_function_decl, dump_template_parms, dump_expr,
372 dump_binary_op, op_to_string, assop_to_string): Mark English
373 fragments for conditional translation with M_.
374 (type_as_string): Disable translation of identifiers.
375 (type_as_string_translate): New.
376 (expr_as_string): Disable translation of identifiers.
377 (decl_as_string): Disable translation of identifiers.
378 (decl_as_string_translate): New.
379 (lang_decl_name): Add parameter translate.
380 (args_to_string): Call type_as_string_translate.
381 (cp_print_error_function): Call cxx_printable_name_translate.
382 (print_instantiation_full_context,
383 print_instantiation_partial_context): Call
384 decl_as_string_translate.
385 * parser.c (cp_lexer_get_preprocessor_token): Use %qE for
386 identifier in diagnostic.
387 * tree.c (cxx_printable_name): Change to
388 cxx_printable_name_internal. Add parameter translate.
389 (cxx_printable_name, cxx_printable_name_translate): New wrappers
390 round cxx_printable_name_internal.
392 2009-05-08 H.J. Lu <hongjiu.lu@intel.com>
395 * call.c (build_call_a): Updated warn_deprecated_use call.
396 (build_over_call): Likewise.
397 * decl.c (grokdeclarator): Likewise.
398 (grokparms): Likewise.
399 * semantics.c (finish_id_expression): Likewise.
400 * typeck.c (build_class_member_access_expr): Likewise.
401 (finish_class_member_access_expr): Likewise.
403 2009-05-06 Dodji Seketeli <dodji@redhat.com>
406 * pt.c (tsubst_copy) <case PARM_DECL>: We don't want to tsubst the
407 whole list of PARM_DECLs, just the current one.
409 2009-05-05 Shujing Zhao <pearly.zhao@oracle.com>
412 (opname_tab, assignop_tab, update_member_visibility, yyerror, yyhook,
413 mangle_compound_literal): Remove unused declarations.
414 (build_vfield_ref, cxx_print_statistics, clone_function_decl,
415 adjust_clone_args, maybe_push_cleanup_level, pushtag, make_anon_name,
416 pushdecl_top_level_maybe_friend, pushdecl_top_level_and_finish,
417 check_for_out_of_scope_variable, print_other_binding_stack,
418 maybe_push_decl, cxx_mark_addressable, force_target_expr,
419 build_target_expr_with_type, finish_case_label,
420 cxx_maybe_build_cleanup, begin_eh_spec_block, finish_eh_spec_block,
421 check_template_keyword, cxx_omp_predetermined_sharing,
422 cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor,
423 cxx_omp_clause_assign_op, cxx_omp_clause_dtor, cxx_omp_finish_clause,
424 cxx_omp_privatize_by_reference): Rearrange the declarations line to
425 match the comment that indicates the .c file which the functions are
427 (cxx_print_xnode, cxx_print_decl, cxx_print_type,
428 cxx_print_identifier, cxx_print_error_function, pushdecl): Add comment.
430 2009-05-05 Nathan Sidwell <nathan@codesourcery.com>
432 * typeck.c (cp_build_compound_expr): Require RHS to have a known
434 * class.c (resolve_address_of_overloaded_function): Use
435 OVL_CURRENT for error message.
436 (instantiate_type): Forbid COMPOUND_EXPRs and remove code dealing
437 with them. Do not copy the node.
439 2009-05-05 Jakub Jelinek <jakub@redhat.com>
442 * pt.c (tsubst): If magic NOP_EXPR with side-effects has no type,
443 set it from its operand's type after tsubst_expr.
445 2009-05-04 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
448 * parser.c (cp_lexer_get_preprocessor_token): Do not store the
449 canonical spelling for keywords.
450 (cp_parser_attribute_list): Use the canonical spelling for
451 keywords in attributes.
453 2009-05-01 Joseph Myers <joseph@codesourcery.com>
455 * cxx-pretty-print.c (is_destructor_name, pp_cxx_unqualified_id,
456 pp_cxx_template_keyword_if_needed, pp_cxx_postfix_expression,
457 pp_cxx_new_expression, pp_cxx_delete_expression,
458 pp_cxx_unary_expression, pp_cxx_assignment_operator,
459 pp_cxx_assignment_expression, pp_cxx_expression,
460 pp_cxx_function_specifier, pp_cxx_decl_specifier_seq,
461 pp_cxx_simple_type_specifier, pp_cxx_type_specifier_seq,
462 pp_cxx_exception_specification, pp_cxx_direct_declarator,
463 pp_cxx_ctor_initializer, pp_cxx_type_id, pp_cxx_statement,
464 pp_cxx_namespace_alias_definition, pp_cxx_template_parameter,
465 pp_cxx_canonical_template_parameter, pp_cxx_template_declaration,
466 pp_cxx_declaration, pp_cxx_typeid_expression,
467 pp_cxx_va_arg_expression, pp_cxx_offsetof_expression,
468 pp_cxx_trait_expression): Mostly use pp_string and
469 pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
470 for non-identifiers. Mark English strings for translation.
471 * cxx-pretty-print.h (pp_cxx_ws_string): Define.
472 * error.c (dump_template_parameter, dump_template_bindings,
473 dump_type, dump_aggr_type, dump_type_prefix, dump_simple_decl,
474 dump_decl, dump_template_decl, dump_function_decl,
475 dump_parameters, dump_exception_spec, dump_template_parms,
476 dump_expr, dump_binary_op, dump_unary_op, op_to_string,
477 assop_to_string, args_to_string, cp_print_error_function,
478 print_instantiation_full_context,
479 print_instantiation_partial_context): Mostly use pp_string and
480 pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
481 for non-identifiers. Mark English strings for translation.
482 (dump_global_iord): Mark strings for translation; use longer
483 strings instead of substituting single words.
484 (function_category): Return a format string marked for
485 translation, not a single word or phrase to substitute in a longer
488 2009-04-28 Ben Elliston <bje@au.ibm.com>
493 2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
495 * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
497 2009-04-27 Ian Lance Taylor <iant@google.com>
499 * semantics.c (finish_omp_clauses): Change type of c_kind to enum
502 2009-04-27 Jakub Jelinek <jakub@redhat.com>
505 * cvt.c (convert_to_void) <case INDIRECT_REF>: Only warn about
506 -Wunused-value if implicit.
508 2009-04-24 Ian Lance Taylor <iant@google.com>
510 * call.c (build_temp): Change 0 to enum constant.
511 * cp-tree.h (cp_lvalue_kind): Typedef to int rather than enum
513 * cp-gimplify.c (cp_gimplify_expr): Add cast to enum type.
514 * decl2.c (constrain_visibility): Likewise.
515 * parser.c (cp_lexer_get_preprocessor_token): Likewise.
516 (cp_parser_flags): Typedef to int rather than enum type.
517 (cp_parser_expression_stack_entry): Change prec field to enum
520 * typeck.c (build_modify_expr): Add lhs_origtype parameter.
523 2009-04-22 Dodji Seketeli <dodji@redhat.com>
526 * parser.c (cp_parser_template_argument_list): Display an error
527 when an ellipsis is not preceded by a parameter pack. Also, warn
528 about variadic templates usage without -std=c++0x.
530 2009-04-21 Taras Glek <tglek@mozilla.com>
532 * cp-tree.h: Update GTY annotations to new syntax.
534 * mangle.c: Likewise.
535 * name-lookup.c: Likewise.
536 * name-lookup.h: Likewise.
537 * parser.c: Likewise.
540 * semantics.c: Likewise.
541 * typeck2.c: Likewise.
543 2009-04-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
546 * parser.c (cp_parser_error): Pass token->flags to c_parse_error.
548 2009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
551 * typeck.c (check_for_casting_away_constness): We diagnose casting
552 away any qualifiers not just constness.
553 (casts_away_constness): Mention that it handles more than just
556 2009-04-21 Joseph Myers <joseph@codesourcery.com>
558 * ChangeLog, ChangeLog-1993, ChangeLog-1994, ChangeLog-1995,
559 ChangeLog-1996, ChangeLog-1997, ChangeLog-1998, ChangeLog-1999,
560 ChangeLog-2000, ChangeLog-2001, ChangeLog-2002, ChangeLog-2003,
561 ChangeLog-2004, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007,
562 ChangeLog-2008, ChangeLog.ptr, ChangeLog.tree-ssa, NEWS,
563 cfns.gperf: Add copyright and license notices.
564 * cfns.h: Regenerate.
565 * ChangeLog, ChangeLog-2004: Correct dates.
567 2009-04-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
570 * tree.c (lvalue_p_1): Use const_tree.
571 Use CONST_CAST_TREE to avoid warning.
572 (lvalue_p): Returns bool, receives const_tree.
574 2009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
577 * parser.c (cp_parser_check_decl_spec): Drop redundant flags.
578 * error.c (pedwarn_cxx98): New.
579 * cp-tree.h (pedwarn_cxx98): Declare.
581 2009-04-20 Le-Chun Wu <lcwu@google.com>
584 * init.c (build_vec_init): Set TREE_NO_WARNING on the
585 compiler-generated INDIRECT_REF expression.
587 2009-04-20 Ian Lance Taylor <iant@google.com>
589 * typeck.c (build_function_call_vec): New function.
590 (cp_build_function_call): Only pass first parameter to
591 objc_rewrite_function_call.
592 (build_modify_expr): Add rhs_origtype parameter. Change all
594 * decl.c (finish_decl): Add origtype parameter. Change all
596 * semantics.c (finish_call_expr): Pass VEC to
597 resolve_overloaded_builtin.
599 2009-04-20 Ian Lance Taylor <iant@google.com>
601 * cp-tree.h (base_access): Change typedef to int.
602 * parser.c (cp_parser_omp_flush): Change 0 to OMP_CLAUSE_ERROR.
603 (cp_parser_omp_threadprivate): Likewise.
604 * pt.c (unify_pack_expansion): Add casts to enum type.
606 2009-04-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
610 * call.c (build_new_op): Save the original codes of operands
613 2009-04-18 Kazu Hirata <kazu@codesourcery.com>
615 * cp-tree.h: Remove the prototype for insert_block.
616 * decl.c (insert_block): Remove.
618 2009-04-16 Ian Lance Taylor <iant@google.com>
620 * cp-tree.h (enum tsubst_flags): Rename from enum tsubst_flags_t.
621 (tsubst_flags_t): Change typedef from enum type to int.
623 2009-04-16 Paolo Bonzini <bonzini@gnu.org>
625 * decl.c (check_initializer): Use TYPE_VECTOR_OPAQUE
626 instead of targetm.vector_opaque_p.
628 2009-04-15 Le-Chun Wu <lcwu@google.com>
631 * call.c (build_over_call): Set TREE_NO_WARNING on the
632 compiler-generated INDIRECT_REF expression.
633 * cvt.c (convert_to_void): Emit warning when stripping off
636 2009-04-14 Diego Novillo <dnovillo@google.com>
638 * parser.c (cp_parser_type_specifier_seq): Move call to
639 invoke_plugin_callbacks ...
640 (cp_parser_type_specifier_seq): ... here.
642 2009-04-14 Le-Chun Wu <lcwu@google.com>
644 * Make-lang.in: Modify dependencies of files including plugin.h.
645 * decl.c (finish_function): Call invoke_plugin_callbacks.
646 * parser.c (cp_parser_type_specifier): Call invoke_plugin_callbacks.
648 2009-04-14 Jason Merrill <jason@redhat.com>
651 * name-lookup.c (pushdecl_maybe_friend): Avoid all warnings
652 about shadowing by tentative parms.
654 2009-04-13 Jason Merrill <jason@redhat.com>
657 * call.c (build_over_call): Don't call memcpy if the target is
658 the same as the source.
660 2009-04-13 Jason Merrill <jason@redhat.com>
663 * pt.c (uses_template_parms): Handle CONSTRUCTOR.
665 2009-04-12 Jason Merrill <jason@redhat.com>
668 * call.c (joust): Don't crash on variadic fn.
670 2009-04-10 Jason Merrill <jason@redhat.com>
673 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Return
674 if we see a close brace without an open brace.
676 2009-04-10 H.J. Lu <hongjiu.lu@intel.com>
678 * parser.c (cp_parser_class_specifier): Remove the unused
679 has_trailing_semicolon.
681 2009-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
684 * parser.c (cp_parser_check_template_parameters): Take a
685 cp_declarator parameter.
686 (cp_parser_elaborated_type_specifier): Update to
687 cp_parser_check_template_parameters.
688 (cp_parser_class_head): Likewise.
689 (cp_parser_check_declarator_template_parameters): Likewise.
690 (cp_parser_check_template_parameters): Handle first the non-error
691 conditions. Give more accurate diagnostics if a declarator is
694 2009-04-08 Jason Merrill <jason@redhat.com>
697 * error.c (dump_aggr_type): Chase template typedefs if
698 -fno-pretty-templates.
700 2009-04-08 Dodji Seketeli <dodji@redhat.com>
703 * parser.c (cp_parser_enumerator_definition): Make sure the
704 initializer of the enumerator doesn't contain any bare parameter pack.
706 2009-04-07 Jason Merrill <jason@redhat.com>
709 * name-lookup.c (merge_functions): Keep multiple extern "C" functions.
710 * call.c (joust): Complain about mismatched default arguments
711 in extern "C" functions.
712 * class.c (resolve_address_of_overloaded_function): Handle multiple
713 extern "C" functions.
714 * pt.c (resolve_overloaded_unification): Likewise.
716 2009-04-07 Jason Merrill <jason@redhat.com>
719 * error.c (dump_function_decl): Don't pretty-print templates
720 if -fno-pretty-templates.
721 (count_non_default_template_args): Print all args if
722 -fno-pretty-templates.
724 2009-04-06 Jason Merrill <jason@redhat.com>
727 * pt.c (fn_type_unification): For DEDUCE_EXACT check that
728 the deduced template arguments give us the parameter types
731 2009-04-05 Giovanni Bajo <giovannibajo@libero.it>
732 Jason Merrill <jason@redhat.com>
735 * error.c (count_non_default_template_args): New fn.
736 (dump_template_parms): Call it.
737 (dump_template_argument_list): Call it. Add parms parm.
738 (dump_template_argument): Adjust call to dump_template_argument_list.
739 (dump_type, dump_decl): Likewise.
740 (dump_template_bindings): Refactor logic.
742 2009-04-03 Jason Merrill <jason@redhat.com>
745 * error.c (dump_template_bindings): Look through typedefs in
747 (dump_type) [TYPENAME_TYPE]: Print the typedef name if any.
748 (find_typenames_r): Also collect typedefs.
749 * pt.c (unify): Strip typedefs.
752 * semantics.c (finish_id_expression): Don't assume a dependent
753 member of the current instantiation isn't a valid integral
754 constant expression. Check dependent_scope_p.
755 * pt.c (dependent_scope_p): Check TYPE_P.
756 (tsubst_copy): If args is null, just return.
758 2009-04-02 Jason Merrill <jason@redhat.com>
761 * error.c (find_typenames, find_typenames_r): New fns.
762 (dump_function_decl): Call find_typenames.
763 (dump_template_bindings): Print typenames as well.
764 * pt.c (tsubst): Non-static.
765 * cp-tree.h: Declare it.
767 2009-04-02 Dodji Seketeli <dodji@redhat.com>
770 * decl2.c (grokfield): when a typedef appears in a
771 class, create the typedef variant type node for it.
772 (save_template_attributes): Creating typedef variant type node
774 * decl.c (grokdeclarator): If the typedef'ed struct/class was
775 anonymous, set the proper type name to all its type variants.
776 (xref_basetypes) : Fixup the variant types after setting
778 * name-lookup.c (pushdecl_maybe_friend): Reuse the
779 set_underlying_type function to install typedef variant types.
780 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
782 (append_type_to_template_for_access_check): New entry points.
783 * semantics.c (check_accessibility_of_qualified_id):
784 When a typedef that is a member of a class appears in a template,
785 add it to the template. It will be ...
786 * class.c (finish_struct_bits): Split type variant fixup into ...
787 (fixup_type_variants): A new entry point.
788 * pt.c (instantiate_class_template, instantiate_template ): ... access
789 checked at template instantiation time.
790 (resolve_type_name_type): The type name should be the name of the
792 (retrieve_specialization): Specializations of template typedefs aren't
793 to looked up in DECL_TEMPLATE_INSTANTIATIONS (tmpl).
794 (append_type_to_template_for_access_check): New entry point.
795 (tsubst_decl): For typedefs, build the variant type from the correct
797 (get_class_bindings): Fix function comment.
798 (perform_typedefs_access_check): New entry point.
800 2009-03-31 Jason Merrill <jason@redhat.com>
803 * name-lookup.c (pushdecl_maybe_friend): Diagnose mismatched
804 extern "C" declarations.
807 * semantics.c (finish_non_static_data_member): Allow such references
808 without an associated object in sizeof/decltype/alignof.
810 * ptree.c (cxx_print_decl): Pretty-print full name of
812 (cxx_print_type): Pretty-print full name of class.
814 * decl.c (grokdeclarator): Reject pointer to qualified function
817 PR c++/37806, core issue 547
818 * typeck.c (cp_apply_type_quals_to_decl): Don't apply any quals
820 * tree.c (cp_build_qualified_type_real): Don't apply restrict to a
822 * decl.h (enum decl_context): Add TEMPLATE_TYPE_ARG.
823 * decl.c (groktypename): Add is_template_arg parameter.
824 (grokdeclarator): Allow function cv-quals on a template type arg.
825 * parser.c (cp_parser_new_type_id, cp_parser_type_id): Add
826 is_template_arg argument in calls to groktypename.
827 * cp-tree.h: Adjust prototype.
828 * error.c (dump_type_prefix, dump_type_suffix): Fix plain
829 FUNCTION_TYPE printing.
831 * mangle.c (write_expression): Mangle dependent name as
834 PR c++/38030, 38850, 39070
835 * pt.c (type_dependent_expression_p_push): New fn.
836 (tsubst_copy_and_build) [CALL_EXPR]: Only do arg-dep lookup when the
837 substitution makes the call non-dependent. Preserve koenig_p.
838 * parser.c (cp_parser_postfix_expression): Only do arg-dep lookup
839 for non-dependent calls.
840 * semantics.c (finish_call_expr): Revert earlier changes.
841 * cp-tree.h: Revert change to finish_call_expr prototype.
843 2009-03-29 Joseph Myers <joseph@codesourcery.com>
845 PR preprocessor/34695
846 * cp-tree.h (cp_cpp_error): Remove.
847 * error.c (cp_cpp_error): Remove.
848 * parser.c (cp_lexer_new_main): Set done_lexing instead of
849 client_diagnostic and error callback.
851 2009-03-28 Paolo Bonzini <bonzini@gnu.org>
853 * cp/cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
854 * cp/cp-objcp-common.c (cxx_staticp): Remove.
855 * cp/cp-tree.h (cxx_staticp): Remove.
857 2009-03-28 Jakub Jelinek <jakub@redhat.com>
860 * parser.c (cp_parser_postfix_expression): Don't call
861 warning_if_disallowed_function_p.
863 2009-03-27 Jan Hubicka <jh@suse.cz>
865 * except.c (choose_personality_routine): Set terminate_node to abort
868 2009-03-27 Dodji Seketeli <dodji@redhat.com>
869 Jakub Jelinek <jakub@redhat.com>
872 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P): Define.
873 (cp_function_decl_explicit_p): New prototype.
874 * cp-objcp-common.c (cp_function_decl_explicit_p): New function.
876 2009-03-27 Andrew Pinski <andrew_pinski@playstation.sony.com>
879 * parser.c (cp_parser_elaborated_type_specifier): If we have a
880 typename tag and don't have either a TYPE_DECL or a
881 TEMPLATE_ID_EXPR, set the type to NULL.
883 2009-03-27 Simon Martin <simartin@users.sourceforge.net>
886 * decl.c (grokdeclarator): Reject [con|de]stuctors in a non-class
889 2009-03-27 Simon Martin <simartin@users.sourceforge.net>
892 * decl.c (check_array_designated_initializer): Handle error_mark_node.
894 2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
897 * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
899 2009-03-26 Andrew Haley <aph@redhat.com>
902 * decl2.c (possibly_inlined_p): If java exceptions are in use
903 don't inline a decl unless it is explicitly marked inline.
904 * lex.c: (pragma_java_exceptions): New variable.
905 (handle_pragma_java_exceptions): Set pragma_java_exceptions.
906 * cp-tree.h (pragma_java_exceptions): Declare new variable.
908 2009-03-24 Jason Merrill <jason@redhat.com>
911 * name-lookup.c (pushdecl_maybe_friend): Check default args later.
913 2009-03-23 Jakub Jelinek <jakub@redhat.com>
916 * semantics.c (handle_omp_for_class_iterator): Swap cond operands and
917 code if iter is the second operand.
918 * parser.c (cp_parser_binary_expression): Add no_toplevel_fold_p
919 argument. If it is set, don't build the toplevel expression with
920 build_x_binary_op, but build2.
921 (cp_parser_assignment_expression, cp_parser_omp_for_incr): Adjust
923 (cp_parser_omp_for_cond): Don't assume the first operand of the
924 comparison must be decl.
926 2009-03-23 Jason Merrill <jason@redhat.com>
929 * pt.c (make_fnparm_pack): Split out from...
930 (instantiate_decl): ...here.
931 (tsubst_pack_expansion): Handle being called in a late-specified
935 * name-lookup.c (pushdecl_maybe_friend): Don't warn about shadowing
938 2009-03-20 Jason Merrill <jason@redhat.com>
941 * parser.c (cp_parser_direct_declarator): In a template, wrap
942 non-constant expression in NOP_EXPR with TREE_SIDE_EFFECTS set.
943 * pt.c (tsubst): Preserve it in a partial instantiation.
944 (dependent_type_p_r): Don't check value_dependent_expression_p.
945 * decl.c (compute_array_index_type): Don't check
946 value_dependent_expression_p if TREE_SIDE_EFFECTS.
949 * typeck2.c (check_narrowing): Don't complain about loss of
950 precision when converting a floating-point constant.
952 2009-03-19 Jakub Jelinek <jakub@redhat.com>
955 * parser.c (cp_parser_omp_for_cond): Don't check lhs if decl is NULL.
956 (cp_parser_omp_for_loop): Always use cp_parser_omp_for_cond.
958 2009-03-18 Jakub Jelinek <jakub@redhat.com>
960 * parser.c (struct cp_token): Reorder fields for 64-bit hosts.
963 2009-03-18 H.J. Lu <hongjiu.lu@intel.com>
966 * parser.c (cp_parser_explicit_specialization): Don't skip the
967 rest of the specialization when begin_specialization returns
970 2009-03-17 Jason Merrill <jason@redhat.com>
972 * decl.c (grokfndecl): Set DECL_CONTEXT on parms.
973 (duplicate_decls): Adjust DECL_CONTEXT of newdecl's parms.
974 * pt.c (check_explicit_specialization): Likewise.
975 (tsubst_copy) [PARM_DECL]: Return a dummy parm if we don't have a
976 local specialization.
977 * tree.c (cp_tree_equal) [PARM_DECL]: Check type and index, not name.
978 * decl2.c (parm_index): New fn.
979 * semantics.c (finish_decltype_type): Don't use describable_type.
980 * mangle.c (write_expression): Likewise. Mangle ALIGNOF_EXPR.
981 Give a sorry for unsupported codes rather than crash. Mangle
982 conversions with other than 1 operand. New mangling for PARM_DECL.
983 * operators.def (ALIGNOF_EXPR): Mangle as "az".
985 2009-03-17 Jing Yu <jingyu@google.com>
988 * method.c (use_thunk): Change is_thunk from crtl to cfun.
990 2009-03-17 Paolo Carlini <paolo.carlini@oracle.com>
993 * semantics.c (check_trait_type): New.
994 (finish_trait_expr): Use it.
996 2009-03-17 Jakub Jelinek <jakub@redhat.com>
998 * name-lookup.c (cp_emit_debug_info_for_using): Emit USING_STMTs
999 instead of calling imported_module_or_decl debug hook if
1000 building_stmt_tree ().
1001 * cp-gimplify.c (cp_gimplify_expr): Don't assert the first operand
1002 is a NAMESPACE_DECL.
1005 * name-lookup.c (do_namespace_alias): Don't call global_decl debug
1006 hook at function scope.
1009 * cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
1012 2009-03-09 Jakub Jelinek <jakub@redhat.com>
1015 * semantics.c (finish_switch_cond): Don't call get_unwidened.
1016 * decl.c (finish_case_label): Pass SWITCH_STMT_TYPE as 3rd argument
1017 instead of TREE_TYPE (cond).
1019 2009-03-08 H.J. Lu <hongjiu.lu@intel.com>
1022 * parser.c (cp_parser_late_parsing_default_args): Continue
1023 the loop when cp_parser_assignment_expression returns
1026 2009-03-07 Jason Merrill <jason@redhat.com>
1029 * init.c (build_new_1): Don't use a VLA type.
1030 (build_vec_init): Handle getting a pointer for BASE.
1032 2009-03-06 H.J. Lu <hongjiu.lu@intel.com>
1035 * cp-tree.h: Check NO_DOT_IN_LABEL before NO_DOLLAR_IN_LABEL
1036 when mangling symbols.
1038 2009-03-06 Paolo Carlini <paolo.carlini@oracle.com>
1041 * error.c (dump_expr): Don't try to print THROW_EXPRs in full.
1043 2009-03-06 Alexandre Oliva <aoliva@redhat.com>
1045 * decl.c (record_builtin_java_type): Use canonicalized integer
1048 2009-03-04 Jason Merrill <jason@redhat.com>
1051 * class.c (is_really_empty_class): New fn.
1052 * cp-tree.h: Declare it.
1053 * cp-objcp-common.c (cp_expr_size): Use it.
1056 * semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
1057 * parser.c (cp_parser_postfix_expression): Call it for
1059 * tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
1060 (get_first_fn): Likewise.
1066 * decl.c (make_typename_type): Do look inside currently open classes.
1067 * parser.c (cp_parser_lookup_name): Likewise.
1068 (cp_parser_template_name): Likewise.
1069 * pt.c (dependent_scope_p): New function.
1070 * cp-tree.h: Declare it.
1071 * class.c (currently_open_class): Return fast if T isn't a class.
1073 2009-02-26 H.J. Lu <hongjiu.lu@intel.com>
1076 * parser.c (cp_parser_mem_initializer): Return error_mark_node
1077 if cp_parser_mem_initializer_id returns error_mark_node.
1079 2009-02-24 Richard Guenther <rguenther@suse.de>
1082 * pt.c (instantiate_decl): Do not instantiate extern, non-inline
1085 2009-02-23 H.J. Lu <hongjiu.lu@intel.com>
1088 * pt.c (coerce_template_template_parms): Return 0 if parameter
1091 2009-02-23 Jason Merrill <jason@redhat.com>
1093 * pt.c (unify): Call maybe_adjust_types_for_deduction when
1094 deducing from an initializer list.
1096 2009-02-20 Jason Merrill <jason@redhat.com>
1099 * decl.c (grokdeclarator): Handle ~identifier.
1101 2009-02-19 Jakub Jelinek <jakub@redhat.com>
1104 * decl2.c (determine_visibility): If visibility changed and
1105 DECL_RTL has been already set, call make_decl_rtl to update symbol
1108 2009-02-19 H.J. Lu <hongjiu.lu@intel.com>
1111 * cp-tree.h (maybe_commonize_var): New.
1113 * decl.c (maybe_commonize_var): Make it extern.
1115 * decl2.c (finish_anon_union): Call maybe_commonize_var.
1117 2009-02-18 H.J. Lu <hongjiu.lu@intel.com>
1120 * parser.c (cp_parser_enum_specifier): Apply all attributes.
1122 2009-02-18 Jason Merrill <jason@redhat.com>
1124 * cfns.h: Tweak pathname for cfns.gperf.
1126 2009-02-13 Jason Merrill <jason@redhat.com>
1129 * semantics.c (finish_call_expr): Change koenig_p parm to int.
1130 If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
1131 * cp-tree.h: Adjust prototype.
1132 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
1134 2009-02-12 Jason Merrill <jason@redhat.com>
1137 * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
1139 2009-02-11 Jason Merrill <jason@redhat.com>
1142 * decl2.c (cp_write_global_declarations):
1143 Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
1146 * init.c (build_value_init_noctor): Split out from...
1147 (build_value_init): ...here.
1148 (expand_aggr_init_1): Handle value-initialization.
1149 * cp-tree.h: Add declaration.
1150 * class.c (type_has_user_provided_constructor):
1151 Handle non-class arguments.
1153 2009-02-10 Jason Merrill <jason@redhat.com>
1156 * class.c (defaultable_fn_p): Handle ... properly.
1159 * tree.c (lvalue_p_1): Condition rvalue ref handling on
1160 treat_class_rvalues_as_lvalues, too.
1162 2009-02-10 Paolo Carlini <paolo.carlini@oracle.com>
1165 * typeck.c (build_x_array_ref): New.
1166 * cp-tree.h: Declare it.
1167 * pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
1169 2009-02-09 Jason Merrill <jason@redhat.com>
1172 * semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
1173 * init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
1174 * tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
1175 * cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
1176 for build_value_init TARGET_EXPR.
1177 * cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
1179 2009-02-06 Paolo Carlini <paolo.carlini@oracle.com>
1183 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
1185 2009-02-04 Jakub Jelinek <jakub@redhat.com>
1188 * operators.def: Use COMPONENT_REF code for ->/pt operator again,
1189 remove ./dt operator.
1190 * mangle.c (write_expression): Handle COMPONENT_REF after handling
1191 ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
1192 write_string ("dt") instead of using operators.def.
1194 2009-02-03 Jason Merrill <jason@redhat.com>
1196 * typeck.c (cp_build_unary_op): Only complain about taking address
1197 of main if pedantic.
1199 2009-02-03 Jakub Jelinek <jakub@redhat.com>
1202 * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
1205 * typeck2.c (digest_init_r): Don't call process_init_constructor
1208 2009-02-03 Paolo Bonzini <bonzini@gnu.org>
1211 * pt.c (convert_nontype_argument_function): Expect expr to be an
1215 * typeck.c (merge_types): Call resolve_typename_type if only
1216 one type is a typename.
1218 2009-02-02 Jason Merrill <jason@redhat.com>
1221 * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node
1224 2009-02-01 Paolo Carlini <paolo.carlini@oracle.com>
1227 * parser.c (cp_parser_pure_specifier): If there are no tokens left
1228 do not call cp_lexer_consume_token.
1230 2009-01-30 Jakub Jelinek <jakub@redhat.com>
1233 * parser.c (cp_parser_already_scoped_statement): Handle __label__
1236 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
1239 * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
1241 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
1244 * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
1246 2009-01-29 Paolo Carlini <paolo.carlini@oracle.com>
1248 * typeck.c (invalid_nonstatic_memfn_p): Use
1249 DECL_NONSTATIC_MEMBER_FUNCTION_P.
1251 2009-01-27 Paolo Carlini <paolo.carlini@oracle.com>
1254 * call.c (build_over_call): If convert_for_arg_passing returns
1255 error_mark_node unconditionally return it.
1257 2009-01-22 Adam Nemet <anemet@caviumnetworks.com>
1259 * class.c (check_field_decls): Also inherit packed for bitfields
1260 regardless of their type.
1262 2009-01-22 Dodji Seketeli <dodji@redhat.com>
1265 * decl2.c (grokfield): Reverting changes of PR c++/26693
1266 (save_template_attributes): Likewise.
1267 * decl.c (grokdeclarator): Likewise.
1268 * name-lookup.c (pushdecl_maybe_friend): Likewise.
1269 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
1270 (append_type_to_template_for_access_check): Likewise.
1271 * semantics.c (check_accessibility_of_qualified_id): Likewise.
1272 * pt.c (instantiate_class_template, instantiate_template ): Likewise.
1274 (resolve_type_name_type): Likewise.
1275 (append_type_to_template_for_access_check): Likewise.
1277 2009-01-21 Dodji Seketeli <dodji@redhat.com>
1280 * decl2.c (grokfield): when a typedef appears in a
1281 class, create the typedef variant type node for it.
1282 (save_template_attributes): Creating typedef variant type node
1283 here is now useless.
1284 * decl.c (grokdeclarator): If the typedef'ed struct/class was
1285 anonymous, set the proper type name to all its type variants.
1286 * name-lookup.c (pushdecl_maybe_friend): Reuse the
1287 set_underlying_type function to install typedef variant types.
1288 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
1290 (append_type_to_template_for_access_check): New entry points.
1291 * semantics.c (check_accessibility_of_qualified_id):
1292 When a typedef that is a member of a class appears in a template,
1293 add it to the template. It will be ...
1294 * pt.c (instantiate_class_template, instantiate_template ): ... access
1295 checked at template instantiation time.
1296 (tsubst): Handle the case of being called with NULL args.
1297 (resolve_type_name_type): The type name should be the name of the
1299 (append_type_to_template_for_access_check): New entry point.
1301 2009-01-19 Jason Merrill <jason@redhat.com>
1304 * parser.c (cp_parser_unqualified_id): In a template,
1306 * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
1308 2009-01-16 Jason Merrill <jason@redhat.com>
1311 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
1312 * init.c (build_new): Don't call describable_type unless we
1316 * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
1319 * search.c (protected_accessible_p): N doesn't vary.
1321 2009-01-15 Jason Merrill <jason@redhat.com>
1324 * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
1325 accept hidden friends.
1327 2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1330 * decl.c (grokdeclarator): Check for a non namespace/class context.
1332 2009-01-15 Jason Merrill <jason@redhat.com>
1336 * tree.c (lvalue_p_1): Handle BASELINK. A COMPONENT_REF to
1337 a function isn't necessarily an lvalue. Take tree, not const_tree.
1338 (lvalue_p, real_lvalue_p): Take tree, not const_tree.
1339 * typeck.c (lvalue_or_else): Likewise.
1340 * cp-tree.h: Adjust prototypes.
1342 2009-01-15 Steve Ellcey <sje@cup.hp.com>
1345 * pt.c (tsubst): Check for NULL args.
1347 2009-01-15 Dodji Seketeli <dodji@redhat.com>
1350 * name-lookup.c (pushtag): Don't create members to types that are not
1353 2009-01-14 Nick Clifton <nickc@redhat.com>
1356 * parser.c: Pass cp_id_kind computed in
1357 cp_parser_postfix_dot_deref_expression to
1358 cp_parser_primary_expression.
1360 2009-01-13 Jakub Jelinek <jakub@redhat.com>
1363 * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
1364 STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
1367 2009-01-12 Jason Merrill <jason@redhat.com>
1368 Steve Ellcey <sje@cup.hp.com>
1371 * name-lookup.c (lookup_name_real): Keep looking past a hidden
1374 2009-01-12 Dodji Seketeli <dodji@redhat.com>
1377 * pt.c (parameter_of_template_p): New function.
1378 * cp-tree.h: Declare it.
1379 * name-lookup.c (binding_to_template_parms_of_scope_p): New
1381 (outer_binding): Take template parameters in account when looking for
1384 2009-01-12 Jason Merrill <jason@redhat.com>
1387 * tree.c (pod_type_p): Return 1 for structs created by the back end.
1389 2009-01-12 Jakub Jelinek <jakub@redhat.com>
1392 * parser.c (cp_parser_builtin_offsetof): Allow `->' in
1393 offsetof member-designator, handle it as `[0].'.
1396 * decl.c (start_function): If grokdeclarator hasn't returned
1397 FUNCTION_DECL nor error_mark_node, issue diagnostics.
1399 2009-01-11 Jakub Jelinek <jakub@redhat.com>
1402 * cp-gimplify.c (genericize_if_stmt): Renamed from ...
1403 (gimplify_if_stmt): ... this.
1404 (cp_gimplify_expr): Don't handle IF_STMT here.
1405 (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
1407 2009-01-10 Andrew Pinski <pinskia@gmail.com>
1410 * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
1413 * typeck2.c (build_functional_cast): Check for reference type and NULL
1416 2009-01-09 Steve Ellcey <sje@cup.hp.com>
1418 * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
1420 2009-01-09 Jakub Jelinek <jakub@redhat.com>
1423 * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
1425 2009-01-09 John F. Carr <jfc@mit.edu>
1428 * parser.c (cp_parser_class_specifier): Clear
1429 parser->in_unbraced_linkage_specification_p while parsing class
1432 2009-01-07 Jakub Jelinek <jakub@redhat.com>
1435 * semantics.c (finish_goto_stmt): Convert destination to
1438 2009-01-06 Jason Merrill <jason@redhat.com>
1445 * pt.c (check_default_tmpl_args): Don't complain about
1446 out-of-order parameter packs in the enclosing class
1447 or parameter packs after default args.
1448 (coerce_template_parms): If we have more than one
1449 parameter pack, don't flatten argument packs.
1450 (template_args_equal): Handle argument packs.
1451 (comp_template_args): Don't flatten argument packs.
1452 (check_instantiated_arg): Split out from...
1453 (check_instantiated_args): Here. Handle arg packs.
1454 (convert_template_argument): Just check that nontype argument
1455 packs have the right type.
1457 2009-01-05 Dodji Seketeli <dodji@redhat.com>
1460 * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
1462 2009-01-05 Jason Merrill <jason@redhat.com>
1465 * typeck2.c (process_init_constructor_union): Handle union with
1468 * mangle.c (write_expression): Remove mangling for zero-operand
1472 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
1476 * class.c (defaultable_fn_p): Only operator== can be a copy
1477 assignment operator.
1479 2009-01-02 Jason Merrill <jason@redhat.com>
1482 * typeck2.c (process_init_constructor_union): Handle excess
1484 (process_init_constructor_record): Likewise.
1487 * typeck2.c (digest_init_r): Don't use process_init_constructor
1488 for non-aggregate classes.
1491 Copyright (C) 2009 Free Software Foundation, Inc.
1493 Copying and distribution of this file, with or without modification,
1494 are permitted in any medium without royalty provided the copyright
1495 notice and this notice are preserved.