1 2009-06-03 Ian Lance Taylor <iant@google.com>
3 * Make-lang.in (cc1plus-checksum.o): Depend upon $(CONFIG_H) and
6 2009-06-02 Mark Mitchell <mark@codesourcery.com>
8 * decl.c (maybe_deduce_size_from_array_init): Use relayout_decl.
10 2009-06-02 Jason Merrill <jason@redhat.com>
14 * typeck.c (cp_build_modify_expr): Always pass init-lists to the
16 * call.c (implicit_conversion): Allow init-list conversion to scalar
17 during direct-initialization, too. Mark the conversion bad if it
18 has too many levels of braces.
19 (convert_like_real): And give a helpful error.
23 * decl.c (cp_finish_decl): Handle auto deduction from ().
24 * typeck.c (build_x_indirect_ref): Handle dereferencing an operand
25 with dependent type that is known to be a pointer.
27 2009-06-02 Simon Martin <simartin@users.sourceforge.net>
30 * pt.c (register_specialization): Properly setup DECL_CONTEXT for
31 specializations in an invalid namespace.
33 2009-06-01 Aldy Hernandez <aldyh@redhat.com>
35 * error.c (print_instantiation_partial_context): Print column
38 2009-05-29 Ian Lance Taylor <iant@google.com>
40 * error.c (cp_printer): Don't use va_arg with enum type.
42 2009-05-28 Dodji Seketeli <dodji@redhat.com>
45 * cp-tree.h (canonical_type_variant): Remove this function declaration.
46 (strip_typedefs): New function declaration.
47 * tree.c (strip_typedefs): New function definition.
48 (canonical_type_variant): Remove function definition.
49 * cvt.c (convert_from_reference): No need to use
50 canonical_type_variant.
51 * typeck.c (cp_build_indirect_ref): Likewise.
52 * error.c (dump_template_bindings): Use strip_typedefs instead of
53 canonical_type_variant.
54 * pt.c (convert_template_argument, unify): Likewise.
55 * mangle.c (canonicalize_for_substitution): Don't use
56 canonical_type_variant.
58 2009-05-27 Jason Merrill <jason@redhat.com>
60 * call.c (implicit_conversion): Handle conversion from
61 initializer-list to scalar.
62 (convert_like_real): Likewise. Avoid crashing on list
63 initialization with bad conversions.
64 (can_convert): Use LOOKUP_EXPLICIT.
65 (can_convert_arg_bad): Add flags parm.
67 * typeck.c (convert_for_assignment): Pass flags.
69 2009-05-27 Ian Lance Taylor <iant@google.com>
71 * Make-lang.in (g++$(exeext)): Change $(COMPILER) to $(LINKER).
72 (cc1plus-dummy$(exeext), cc1plus$(exeext)): Likewise.
74 2009-05-26 Ian Lance Taylor <iant@google.com>
76 * Make-lang.in (g++spec.o): Use $(COMPILER).
77 (g++$(exeext), cc1plus-dummy$(exeext)): Likewise.
78 (cc1plus$(exeext)): Likewise.
80 2009-05-26 Dodji Seketeli <dodji@redhat.com>
83 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Remove this accessor.
84 (TI_TYPEDEFS_NEEDING_ACCESS_CHECKING): New accessor.
85 (get_types_needing_access_check): Declare new entry point.
86 * pt.c (append_type_to_template_for_access_check_1,
87 get_types_needing_access_check): New functions.
88 (perform_typedefs_access_check): Accept FUNCTION_DECLs and
89 RECORD_TYPEs rather than TEMPLATE_DECLs. Use the new
90 get_types_needing_access_check, no more
91 MEMBER_TYPES_NEEDING_ACCESS_CHECK.
92 (instantiate_class_template): Set input_location to the source
93 location of the most specialized template definition.
94 Perform access check using the RECORD_TYPE of the template, not its
95 associated most generic TEMPLATE_DECL.
96 (append_type_to_template_for_access_check): Augment function
97 comments. Use the new get_types_needing_access_check, not
98 MEMBER_TYPE_NEEDING_ACCESS_CHECK. Use the new
99 append_type_to_template_for_access_check_1 subroutine.
101 2009-05-22 Jason Merrill <jason@redhat.com>
104 * typeck.c (cp_build_binary_op): Allow ENUMERAL_TYPE in
105 arithmetic comparisons.
106 (cp_common_type): Handle scoped enums.
108 * call.c (promoted_arithmetic_type_p): Don't use INTEGRAL_TYPE_P.
109 (add_builtin_candidate, add_builtin_candidates): Likewise.
110 (convert_like_real): Likewise.
111 * class.c (check_bitfield_decl): Likewise.
112 * decl.c (check_static_variable_definition): Likewise.
113 (compute_array_index_type): Likewise.
114 * decl2.c (grokbitfield): Likewise.
115 * init.c (build_new_1): Likewise.
116 * pt.c (convert_nontype_argument): Likewise.
117 (current_instantiation): Likewise.
118 * tree.c (pod_type_p): Likewise.
119 * typeck.c (build_static_cast_1): Likewise.
120 (build_reinterpret_cast_1): Likewise.
122 2009-05-22 Richard Guenther <rguenther@suse.de>
125 * init.c (avoid_placement_new_aliasing): Remove.
126 (build_new_1): Do not call it.
128 2009-05-22 Mark Mitchell <mark@codesourcery.com>
130 * decl2.c (decl_needed_p): Consider dllexport'd functions needed.
131 * semantics.c (expand_or_defer_fn): Similarly.
133 2009-05-20 Ian Lance Taylor <iant@google.com>
135 * parser.c (cp_parser_postfix_expression): Change args to a vec.
136 Release it when done.
137 (tree_vector): Define typedef. Define VEC functions.
138 (cp_parser_parenthesized_expression_list): Change return type to
139 vec. Change all callers.
140 (cp_parser_new_expression): Change placement and initializer to
141 vecs. Release them when done.
142 (cp_parser_new_placement): Change return type to vec. Change all
144 (cp_parser_new_initializer): Likewise.
145 * typeck.c (build_function_call_vec): Just call
146 cp_build_function_call_vec.
147 (cp_build_function_call): Just build a vec and call
148 cp_build_function_call_vec.
149 (cp_build_function_call_vec): New function based on old
150 cp_build_function_call.
151 (convert_arguments): Remove nargs and argarray parameters. Change
152 values to a vec. Change caller.
153 (build_x_compound_expr_from_vec): New function.
154 (cp_build_modify_expr): Build vec to pass to
155 build_special_member_call.
156 * call.c (struct z_candidate): Add first_arg field. Change args
158 (convert_class_to_reference): Handle first argument separately.
159 (add_candidate): Add first_arg parameter. Change args parameter
160 to vec. Change all callers.
161 (add_function_candidate, add_conv_candidate): Likewise.
162 (add_template_candidate_real, add_template_candidate): Likewise.
163 (add_template_conv_candidate): Likewise.
164 (build_user_type_conversion_1): Handle first argument separately.
165 (resolve_args): Change return type and parameter type to vecs.
167 (perform_overload_resolution): Change args parameter to vec.
169 (build_new_function_call, build_operator_new_call): Likewise.
170 (add_candidates): Likewise.
171 (build_op_call): New globally visible function, built from and
172 replacing static function build_object_call.
173 (build_new_op): Don't handle CALL_EXPR. Build vec, not tree_list,
175 (build_op_delete_call): Build vec to pass to
176 cp_build_function_call_vec.
177 (build_temp): Build vec to pass to build_special_member_call.
178 (convert_like_real): Likewise.
179 (perform_direct_initialization_if_possible): Likewise.
180 (build_over_call): Handle first_arg field. Use build_call_array
181 rather than build_call_list.
182 (build_special_member_call): Change args parameter to vec. Change
184 (build_new_method_call): Likewise.
185 * init.c (expand_default_init): Change parms to vec.
186 (build_raw_new_expr): Change placement and init to vecs. Change
188 (build_new_1, build_new): Likewise.
189 * class.c (resolve_address_of_overloaded_function): Build array to
190 pass to fn_type_unification.
191 * pt.c (tsubst_copy_and_build): For NEW_EXPR build vecs to pass to
192 build_new. For CALL_EXPR create a vec rather than a tree_list;
193 expand a pack if necessary.
194 (fn_type_unification): Change args parameter to const tree *. Add
195 nargs parameter. Change all callers.
196 (type_unification_real): Likewise.
197 (unify): Build array to pass to type_unification_real.
198 (get_bindings): Build array to pass to fn_type_unification.
199 (any_type_dependent_arguments_p): Change args parameter to a vec.
201 (make_args_non_dependent): Renamed from build_non_dependent_args.
202 Change return type to void. Change parameter type to vec. Change
204 (do_auto_deduction): Pass an array to type_unification_real.
205 * semantics.c (perform_koenig_lookup): Change args to vec. Change
207 (finish_call_expr): Change args to vec. Change all callers. Call
208 build_op_call instead of passing CALL_EXPR to build_new_op.
209 (cxx_omp_create_clause_info): Allocate vec to pass to
210 build_special_member_call.
211 * decl2.c (build_offset_ref_call_from_tree): Change args parameter
212 to vec. Change all callers.
213 * name-lookup.c (lookup_function_nonclass): Likewise.
214 (struct arg_lookup): Change args to vec.
215 (arg_assoc_namespace): Handle args as a vec.
216 (arg_assoc_args_vec): New static function.
217 (lookup_arg_dependent): Change args parameter to vec. Change all
219 * method.c (do_build_assign_ref): Allocate vec to pass to
220 build_special_member_call.
221 * except.c (build_throw): Likewise.
222 * typeck2.c (build_functional_cast): Likewise.
223 * cvt.c (ocp_convert): Likewise.
224 * tree.c (build_min_non_dep_call_vec): Change last parameter to
225 vec. Change all callers.
226 * cp-tree.h: Update declarations.
227 * name-lookup.h: Update declarations.
229 2009-05-20 Sandra Loosemore <sandra@codesourcery.com>
231 * typeck.c (default_conversion): Check targetm.promoted_type.
232 * decl.c (grokdeclarator): Check targetm.invalid_return_type.
233 (grokparms): Check targetm.invalid_parameter_type.
234 * cvt.c (ocp_convert): Check targetm.convert_to_type.
235 (build_expr_type_conversion): Check targetm.promoted_type.
237 2009-05-19 Andrew Pinski <andrew_pinski@playstation.sony.com>
239 * typeck.c (build_binary_op): Allow % on integal vectors.
241 2009-05-18 Jason Merrill <jason@redhat.com>
243 Implement explicit conversions ops as specified in N2437.
244 * decl.c (grokdeclarator): Handle explicit conversion ops.
245 (check_initializer): Pass flags to store_init_value.
246 * decl2.c (maybe_emit_vtables): Likewise.
247 * init.c (expand_aggr_init_1): Likewise.
248 * call.c (convert_class_to_reference): Take flags parm,
249 check DECL_NONCONVERTING_P.
250 (build_user_type_conversion_1): Check DECL_NONCONVERTING_P.
251 (add_builtin_candidates): Simplify getting type of conversion.
252 (build_object_call): Likewise. Check DECL_NONCONVERTING_P.
253 (implicit_conversion): Pass through LOOKUP_ONLYCONVERTING.
254 (reference_binding): Take flags parm. Direct-initialize copy parm.
255 (add_function_candidate): Direct-initialize the copy parm.
256 (add_conv_candidate): Use LOOKUP_IMPLICIT, not LOOKUP_NORMAL.
257 (build_builtin_candidate): Add LOOKUP_ONLYCONVERTING.
258 (conditional_conversion): Likewise.
259 (convert_like_real): Only complain about DECL_NONCONVERTING_P
261 (perform_implicit_conversion_flags): Add flags parm to
262 perform_implicit_conversion. Improve diagnostics.
263 * cp-tree.h (LOOKUP_IMPLICIT): New macro.
264 (LOOKUP_COPY_PARM): New bit macro.
265 * cvt.c (build_expr_type_conversion): Check DECL_NONCONVERTING_P.
266 * typeck.c (convert_for_assignment): Take flags parm, pass it to
267 perform_implicit_conversion_flags.
268 (cp_build_modify_expr): Pass flags to convert_for_assignment.
269 (convert_for_initialization): Likewise.
270 * typeck2.c (store_init_value): Take flags parm, pass to
272 (digest_init_flags): Add flags parm to digest_init.
273 (digest_init_r): Take flags parm, pass to convert_for_initialization.
274 (process_init_constructor_array): Pass it.
275 (process_init_constructor_record): Likewise.
276 (process_init_constructor_union): Likewise.
278 2009-05-16 Jason Merrill <jason@redhat.com>
281 * pt.c (tsubst_qualified_id): Retain the type if we aren't dealing
282 with a dependent type. Actually look up the destructor.
283 * semantics.c (finish_id_expression): Fix logic.
284 (finish_qualified_id_expr): Don't try to use 'this' if we aren't in
286 * typeck.c (build_x_unary_op): Diagnose taking the address of a
287 constructor or destructor.
288 * tree.c (get_first_fn): Handle OFFSET_REF.
290 2009-05-17 Joseph Myers <joseph@codesourcery.com>
292 * tree.c (cxx_printable_name_internal): Allow consecutive
293 translated and untranslated cached copies of the name of the
296 2009-05-15 Ian Lance Taylor <iant@google.com>
298 * cp-tree.h (enum cp_lvalue_kind_flags): Rename from
299 cp_lvalue_kind. Change all uses.
300 (enum base_access_flags): Rename from enum base_access. Change
302 * parser.c (enum cp_parser_flags): Remove enum tag.
304 2009-05-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
307 * call.c (build_new_op): Update calls to warn_logical_operator.
309 2009-05-14 Ian Lance Taylor <iant@google.com>
311 * class.c (layout_class_type): Change itk to unsigned int.
312 * decl.c (finish_enum): Change itk to unsigned int.
313 * parser.c (cp_parser_check_decl_spec): Change ds to int. Remove
316 2009-05-13 David Mandelin <dmandelin@mozilla.com>:
318 * decl.c (duplicate_decls): Preserve parameter attributes.
320 2009-05-10 Jan Hubicka <jh@suse.cz>
322 * decl2.c (cxx_callgraph_analyze_expr): Use
323 cgraph_mark_address_taken.
325 2009-05-10 Joseph Myers <joseph@codesourcery.com>
327 * call.c (name_as_c_string): Call type_as_string_translate.
328 Translate identifiers to locale character set.
329 * cp-tree.h (lang_decl_name): Update prototype.
330 (type_as_string_translate, decl_as_string_translate,
331 cxx_printable_name_translate): Declare.
332 * cxx-pretty-print.c (M_): Define.
333 (pp_cxx_unqualified_id, pp_cxx_canonical_template_parameter): Mark
334 English fragments for conditional translation with M_.
335 * decl.c (grokdeclarator): Translate identifiers to locale
336 character set for diagnostics.
337 * error.c (M_): Define.
338 (dump_template_bindings, dump_type, dump_aggr_type,
339 dump_type_prefix, dump_global_iord, dump_simple_decl, dump_decl,
340 dump_function_decl, dump_template_parms, dump_expr,
341 dump_binary_op, op_to_string, assop_to_string): Mark English
342 fragments for conditional translation with M_.
343 (type_as_string): Disable translation of identifiers.
344 (type_as_string_translate): New.
345 (expr_as_string): Disable translation of identifiers.
346 (decl_as_string): Disable translation of identifiers.
347 (decl_as_string_translate): New.
348 (lang_decl_name): Add parameter translate.
349 (args_to_string): Call type_as_string_translate.
350 (cp_print_error_function): Call cxx_printable_name_translate.
351 (print_instantiation_full_context,
352 print_instantiation_partial_context): Call
353 decl_as_string_translate.
354 * parser.c (cp_lexer_get_preprocessor_token): Use %qE for
355 identifier in diagnostic.
356 * tree.c (cxx_printable_name): Change to
357 cxx_printable_name_internal. Add parameter translate.
358 (cxx_printable_name, cxx_printable_name_translate): New wrappers
359 round cxx_printable_name_internal.
361 2009-05-08 H.J. Lu <hongjiu.lu@intel.com>
364 * call.c (build_call_a): Updated warn_deprecated_use call.
365 (build_over_call): Likewise.
366 * decl.c (grokdeclarator): Likewise.
367 (grokparms): Likewise.
368 * semantics.c (finish_id_expression): Likewise.
369 * typeck.c (build_class_member_access_expr): Likewise.
370 (finish_class_member_access_expr): Likewise.
372 2009-05-06 Dodji Seketeli <dodji@redhat.com>
375 * pt.c (tsubst_copy) <case PARM_DECL>: We don't want to tsubst the
376 whole list of PARM_DECLs, just the current one.
378 2009-05-05 Shujing Zhao <pearly.zhao@oracle.com>
381 (opname_tab, assignop_tab, update_member_visibility, yyerror, yyhook,
382 mangle_compound_literal): Remove unused declarations.
383 (build_vfield_ref, cxx_print_statistics, clone_function_decl,
384 adjust_clone_args, maybe_push_cleanup_level, pushtag, make_anon_name,
385 pushdecl_top_level_maybe_friend, pushdecl_top_level_and_finish,
386 check_for_out_of_scope_variable, print_other_binding_stack,
387 maybe_push_decl, cxx_mark_addressable, force_target_expr,
388 build_target_expr_with_type, finish_case_label,
389 cxx_maybe_build_cleanup, begin_eh_spec_block, finish_eh_spec_block,
390 check_template_keyword, cxx_omp_predetermined_sharing,
391 cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor,
392 cxx_omp_clause_assign_op, cxx_omp_clause_dtor, cxx_omp_finish_clause,
393 cxx_omp_privatize_by_reference): Rearrange the declarations line to
394 match the comment that indicates the .c file which the functions are
396 (cxx_print_xnode, cxx_print_decl, cxx_print_type,
397 cxx_print_identifier, cxx_print_error_function, pushdecl): Add comment.
399 2009-05-05 Nathan Sidwell <nathan@codesourcery.com>
401 * typeck.c (cp_build_compound_expr): Require RHS to have a known
403 * class.c (resolve_address_of_overloaded_function): Use
404 OVL_CURRENT for error message.
405 (instantiate_type): Forbid COMPOUND_EXPRs and remove code dealing
406 with them. Do not copy the node.
408 2009-05-05 Jakub Jelinek <jakub@redhat.com>
411 * pt.c (tsubst): If magic NOP_EXPR with side-effects has no type,
412 set it from its operand's type after tsubst_expr.
414 2009-05-04 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
417 * parser.c (cp_lexer_get_preprocessor_token): Do not store the
418 canonical spelling for keywords.
419 (cp_parser_attribute_list): Use the canonical spelling for
420 keywords in attributes.
422 2009-05-01 Joseph Myers <joseph@codesourcery.com>
424 * cxx-pretty-print.c (is_destructor_name, pp_cxx_unqualified_id,
425 pp_cxx_template_keyword_if_needed, pp_cxx_postfix_expression,
426 pp_cxx_new_expression, pp_cxx_delete_expression,
427 pp_cxx_unary_expression, pp_cxx_assignment_operator,
428 pp_cxx_assignment_expression, pp_cxx_expression,
429 pp_cxx_function_specifier, pp_cxx_decl_specifier_seq,
430 pp_cxx_simple_type_specifier, pp_cxx_type_specifier_seq,
431 pp_cxx_exception_specification, pp_cxx_direct_declarator,
432 pp_cxx_ctor_initializer, pp_cxx_type_id, pp_cxx_statement,
433 pp_cxx_namespace_alias_definition, pp_cxx_template_parameter,
434 pp_cxx_canonical_template_parameter, pp_cxx_template_declaration,
435 pp_cxx_declaration, pp_cxx_typeid_expression,
436 pp_cxx_va_arg_expression, pp_cxx_offsetof_expression,
437 pp_cxx_trait_expression): Mostly use pp_string and
438 pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
439 for non-identifiers. Mark English strings for translation.
440 * cxx-pretty-print.h (pp_cxx_ws_string): Define.
441 * error.c (dump_template_parameter, dump_template_bindings,
442 dump_type, dump_aggr_type, dump_type_prefix, dump_simple_decl,
443 dump_decl, dump_template_decl, dump_function_decl,
444 dump_parameters, dump_exception_spec, dump_template_parms,
445 dump_expr, dump_binary_op, dump_unary_op, op_to_string,
446 assop_to_string, args_to_string, cp_print_error_function,
447 print_instantiation_full_context,
448 print_instantiation_partial_context): Mostly use pp_string and
449 pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
450 for non-identifiers. Mark English strings for translation.
451 (dump_global_iord): Mark strings for translation; use longer
452 strings instead of substituting single words.
453 (function_category): Return a format string marked for
454 translation, not a single word or phrase to substitute in a longer
457 2009-04-28 Ben Elliston <bje@au.ibm.com>
462 2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
464 * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
466 2009-04-27 Ian Lance Taylor <iant@google.com>
468 * semantics.c (finish_omp_clauses): Change type of c_kind to enum
471 2009-04-27 Jakub Jelinek <jakub@redhat.com>
474 * cvt.c (convert_to_void) <case INDIRECT_REF>: Only warn about
475 -Wunused-value if implicit.
477 2009-04-24 Ian Lance Taylor <iant@google.com>
479 * call.c (build_temp): Change 0 to enum constant.
480 * cp-tree.h (cp_lvalue_kind): Typedef to int rather than enum
482 * cp-gimplify.c (cp_gimplify_expr): Add cast to enum type.
483 * decl2.c (constrain_visibility): Likewise.
484 * parser.c (cp_lexer_get_preprocessor_token): Likewise.
485 (cp_parser_flags): Typedef to int rather than enum type.
486 (cp_parser_expression_stack_entry): Change prec field to enum
489 * typeck.c (build_modify_expr): Add lhs_origtype parameter.
492 2009-04-22 Dodji Seketeli <dodji@redhat.com>
495 * parser.c (cp_parser_template_argument_list): Display an error
496 when an ellipsis is not preceded by a parameter pack. Also, warn
497 about variadic templates usage without -std=c++0x.
499 2009-04-21 Taras Glek <tglek@mozilla.com>
501 * cp-tree.h: Update GTY annotations to new syntax.
503 * mangle.c: Likewise.
504 * name-lookup.c: Likewise.
505 * name-lookup.h: Likewise.
506 * parser.c: Likewise.
509 * semantics.c: Likewise.
510 * typeck2.c: Likewise.
512 2009-04-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
515 * parser.c (cp_parser_error): Pass token->flags to c_parse_error.
517 2009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
520 * typeck.c (check_for_casting_away_constness): We diagnose casting
521 away any qualifiers not just constness.
522 (casts_away_constness): Mention that it handles more than just
525 2009-04-21 Joseph Myers <joseph@codesourcery.com>
527 * ChangeLog, ChangeLog-1993, ChangeLog-1994, ChangeLog-1995,
528 ChangeLog-1996, ChangeLog-1997, ChangeLog-1998, ChangeLog-1999,
529 ChangeLog-2000, ChangeLog-2001, ChangeLog-2002, ChangeLog-2003,
530 ChangeLog-2004, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007,
531 ChangeLog-2008, ChangeLog.ptr, ChangeLog.tree-ssa, NEWS,
532 cfns.gperf: Add copyright and license notices.
533 * cfns.h: Regenerate.
534 * ChangeLog, ChangeLog-2004: Correct dates.
536 2009-04-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
539 * tree.c (lvalue_p_1): Use const_tree.
540 Use CONST_CAST_TREE to avoid warning.
541 (lvalue_p): Returns bool, receives const_tree.
543 2009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
546 * parser.c (cp_parser_check_decl_spec): Drop redundant flags.
547 * error.c (pedwarn_cxx98): New.
548 * cp-tree.h (pedwarn_cxx98): Declare.
550 2009-04-20 Le-Chun Wu <lcwu@google.com>
553 * init.c (build_vec_init): Set TREE_NO_WARNING on the
554 compiler-generated INDIRECT_REF expression.
556 2009-04-20 Ian Lance Taylor <iant@google.com>
558 * typeck.c (build_function_call_vec): New function.
559 (cp_build_function_call): Only pass first parameter to
560 objc_rewrite_function_call.
561 (build_modify_expr): Add rhs_origtype parameter. Change all
563 * decl.c (finish_decl): Add origtype parameter. Change all
565 * semantics.c (finish_call_expr): Pass VEC to
566 resolve_overloaded_builtin.
568 2009-04-20 Ian Lance Taylor <iant@google.com>
570 * cp-tree.h (base_access): Change typedef to int.
571 * parser.c (cp_parser_omp_flush): Change 0 to OMP_CLAUSE_ERROR.
572 (cp_parser_omp_threadprivate): Likewise.
573 * pt.c (unify_pack_expansion): Add casts to enum type.
575 2009-04-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
579 * call.c (build_new_op): Save the original codes of operands
582 2009-04-18 Kazu Hirata <kazu@codesourcery.com>
584 * cp-tree.h: Remove the prototype for insert_block.
585 * decl.c (insert_block): Remove.
587 2009-04-16 Ian Lance Taylor <iant@google.com>
589 * cp-tree.h (enum tsubst_flags): Rename from enum tsubst_flags_t.
590 (tsubst_flags_t): Change typedef from enum type to int.
592 2009-04-16 Paolo Bonzini <bonzini@gnu.org>
594 * decl.c (check_initializer): Use TYPE_VECTOR_OPAQUE
595 instead of targetm.vector_opaque_p.
597 2009-04-15 Le-Chun Wu <lcwu@google.com>
600 * call.c (build_over_call): Set TREE_NO_WARNING on the
601 compiler-generated INDIRECT_REF expression.
602 * cvt.c (convert_to_void): Emit warning when stripping off
605 2009-04-14 Diego Novillo <dnovillo@google.com>
607 * parser.c (cp_parser_type_specifier_seq): Move call to
608 invoke_plugin_callbacks ...
609 (cp_parser_type_specifier_seq): ... here.
611 2009-04-14 Le-Chun Wu <lcwu@google.com>
613 * Make-lang.in: Modify dependencies of files including plugin.h.
614 * decl.c (finish_function): Call invoke_plugin_callbacks.
615 * parser.c (cp_parser_type_specifier): Call invoke_plugin_callbacks.
617 2009-04-14 Jason Merrill <jason@redhat.com>
620 * name-lookup.c (pushdecl_maybe_friend): Avoid all warnings
621 about shadowing by tentative parms.
623 2009-04-13 Jason Merrill <jason@redhat.com>
626 * call.c (build_over_call): Don't call memcpy if the target is
627 the same as the source.
629 2009-04-13 Jason Merrill <jason@redhat.com>
632 * pt.c (uses_template_parms): Handle CONSTRUCTOR.
634 2009-04-12 Jason Merrill <jason@redhat.com>
637 * call.c (joust): Don't crash on variadic fn.
639 2009-04-10 Jason Merrill <jason@redhat.com>
642 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Return
643 if we see a close brace without an open brace.
645 2009-04-10 H.J. Lu <hongjiu.lu@intel.com>
647 * parser.c (cp_parser_class_specifier): Remove the unused
648 has_trailing_semicolon.
650 2009-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
653 * parser.c (cp_parser_check_template_parameters): Take a
654 cp_declarator parameter.
655 (cp_parser_elaborated_type_specifier): Update to
656 cp_parser_check_template_parameters.
657 (cp_parser_class_head): Likewise.
658 (cp_parser_check_declarator_template_parameters): Likewise.
659 (cp_parser_check_template_parameters): Handle first the non-error
660 conditions. Give more accurate diagnostics if a declarator is
663 2009-04-08 Jason Merrill <jason@redhat.com>
666 * error.c (dump_aggr_type): Chase template typedefs if
667 -fno-pretty-templates.
669 2009-04-08 Dodji Seketeli <dodji@redhat.com>
672 * parser.c (cp_parser_enumerator_definition): Make sure the
673 initializer of the enumerator doesn't contain any bare parameter pack.
675 2009-04-07 Jason Merrill <jason@redhat.com>
678 * name-lookup.c (merge_functions): Keep multiple extern "C" functions.
679 * call.c (joust): Complain about mismatched default arguments
680 in extern "C" functions.
681 * class.c (resolve_address_of_overloaded_function): Handle multiple
682 extern "C" functions.
683 * pt.c (resolve_overloaded_unification): Likewise.
685 2009-04-07 Jason Merrill <jason@redhat.com>
688 * error.c (dump_function_decl): Don't pretty-print templates
689 if -fno-pretty-templates.
690 (count_non_default_template_args): Print all args if
691 -fno-pretty-templates.
693 2009-04-06 Jason Merrill <jason@redhat.com>
696 * pt.c (fn_type_unification): For DEDUCE_EXACT check that
697 the deduced template arguments give us the parameter types
700 2009-04-05 Giovanni Bajo <giovannibajo@libero.it>
701 Jason Merrill <jason@redhat.com>
704 * error.c (count_non_default_template_args): New fn.
705 (dump_template_parms): Call it.
706 (dump_template_argument_list): Call it. Add parms parm.
707 (dump_template_argument): Adjust call to dump_template_argument_list.
708 (dump_type, dump_decl): Likewise.
709 (dump_template_bindings): Refactor logic.
711 2009-04-03 Jason Merrill <jason@redhat.com>
714 * error.c (dump_template_bindings): Look through typedefs in
716 (dump_type) [TYPENAME_TYPE]: Print the typedef name if any.
717 (find_typenames_r): Also collect typedefs.
718 * pt.c (unify): Strip typedefs.
721 * semantics.c (finish_id_expression): Don't assume a dependent
722 member of the current instantiation isn't a valid integral
723 constant expression. Check dependent_scope_p.
724 * pt.c (dependent_scope_p): Check TYPE_P.
725 (tsubst_copy): If args is null, just return.
727 2009-04-02 Jason Merrill <jason@redhat.com>
730 * error.c (find_typenames, find_typenames_r): New fns.
731 (dump_function_decl): Call find_typenames.
732 (dump_template_bindings): Print typenames as well.
733 * pt.c (tsubst): Non-static.
734 * cp-tree.h: Declare it.
736 2009-04-02 Dodji Seketeli <dodji@redhat.com>
739 * decl2.c (grokfield): when a typedef appears in a
740 class, create the typedef variant type node for it.
741 (save_template_attributes): Creating typedef variant type node
743 * decl.c (grokdeclarator): If the typedef'ed struct/class was
744 anonymous, set the proper type name to all its type variants.
745 (xref_basetypes) : Fixup the variant types after setting
747 * name-lookup.c (pushdecl_maybe_friend): Reuse the
748 set_underlying_type function to install typedef variant types.
749 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
751 (append_type_to_template_for_access_check): New entry points.
752 * semantics.c (check_accessibility_of_qualified_id):
753 When a typedef that is a member of a class appears in a template,
754 add it to the template. It will be ...
755 * class.c (finish_struct_bits): Split type variant fixup into ...
756 (fixup_type_variants): A new entry point.
757 * pt.c (instantiate_class_template, instantiate_template ): ... access
758 checked at template instantiation time.
759 (resolve_type_name_type): The type name should be the name of the
761 (retrieve_specialization): Specializations of template typedefs aren't
762 to looked up in DECL_TEMPLATE_INSTANTIATIONS (tmpl).
763 (append_type_to_template_for_access_check): New entry point.
764 (tsubst_decl): For typedefs, build the variant type from the correct
766 (get_class_bindings): Fix function comment.
767 (perform_typedefs_access_check): New entry point.
769 2009-03-31 Jason Merrill <jason@redhat.com>
772 * name-lookup.c (pushdecl_maybe_friend): Diagnose mismatched
773 extern "C" declarations.
776 * semantics.c (finish_non_static_data_member): Allow such references
777 without an associated object in sizeof/decltype/alignof.
779 * ptree.c (cxx_print_decl): Pretty-print full name of
781 (cxx_print_type): Pretty-print full name of class.
783 * decl.c (grokdeclarator): Reject pointer to qualified function
786 PR c++/37806, core issue 547
787 * typeck.c (cp_apply_type_quals_to_decl): Don't apply any quals
789 * tree.c (cp_build_qualified_type_real): Don't apply restrict to a
791 * decl.h (enum decl_context): Add TEMPLATE_TYPE_ARG.
792 * decl.c (groktypename): Add is_template_arg parameter.
793 (grokdeclarator): Allow function cv-quals on a template type arg.
794 * parser.c (cp_parser_new_type_id, cp_parser_type_id): Add
795 is_template_arg argument in calls to groktypename.
796 * cp-tree.h: Adjust prototype.
797 * error.c (dump_type_prefix, dump_type_suffix): Fix plain
798 FUNCTION_TYPE printing.
800 * mangle.c (write_expression): Mangle dependent name as
803 PR c++/38030, 38850, 39070
804 * pt.c (type_dependent_expression_p_push): New fn.
805 (tsubst_copy_and_build) [CALL_EXPR]: Only do arg-dep lookup when the
806 substitution makes the call non-dependent. Preserve koenig_p.
807 * parser.c (cp_parser_postfix_expression): Only do arg-dep lookup
808 for non-dependent calls.
809 * semantics.c (finish_call_expr): Revert earlier changes.
810 * cp-tree.h: Revert change to finish_call_expr prototype.
812 2009-03-29 Joseph Myers <joseph@codesourcery.com>
814 PR preprocessor/34695
815 * cp-tree.h (cp_cpp_error): Remove.
816 * error.c (cp_cpp_error): Remove.
817 * parser.c (cp_lexer_new_main): Set done_lexing instead of
818 client_diagnostic and error callback.
820 2009-03-28 Paolo Bonzini <bonzini@gnu.org>
822 * cp/cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
823 * cp/cp-objcp-common.c (cxx_staticp): Remove.
824 * cp/cp-tree.h (cxx_staticp): Remove.
826 2009-03-28 Jakub Jelinek <jakub@redhat.com>
829 * parser.c (cp_parser_postfix_expression): Don't call
830 warning_if_disallowed_function_p.
832 2009-03-27 Jan Hubicka <jh@suse.cz>
834 * except.c (choose_personality_routine): Set terminate_node to abort
837 2009-03-27 Dodji Seketeli <dodji@redhat.com>
838 Jakub Jelinek <jakub@redhat.com>
841 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P): Define.
842 (cp_function_decl_explicit_p): New prototype.
843 * cp-objcp-common.c (cp_function_decl_explicit_p): New function.
845 2009-03-27 Andrew Pinski <andrew_pinski@playstation.sony.com>
848 * parser.c (cp_parser_elaborated_type_specifier): If we have a
849 typename tag and don't have either a TYPE_DECL or a
850 TEMPLATE_ID_EXPR, set the type to NULL.
852 2009-03-27 Simon Martin <simartin@users.sourceforge.net>
855 * decl.c (grokdeclarator): Reject [con|de]stuctors in a non-class
858 2009-03-27 Simon Martin <simartin@users.sourceforge.net>
861 * decl.c (check_array_designated_initializer): Handle error_mark_node.
863 2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
866 * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
868 2009-03-26 Andrew Haley <aph@redhat.com>
871 * decl2.c (possibly_inlined_p): If java exceptions are in use
872 don't inline a decl unless it is explicitly marked inline.
873 * lex.c: (pragma_java_exceptions): New variable.
874 (handle_pragma_java_exceptions): Set pragma_java_exceptions.
875 * cp-tree.h (pragma_java_exceptions): Declare new variable.
877 2009-03-24 Jason Merrill <jason@redhat.com>
880 * name-lookup.c (pushdecl_maybe_friend): Check default args later.
882 2009-03-23 Jakub Jelinek <jakub@redhat.com>
885 * semantics.c (handle_omp_for_class_iterator): Swap cond operands and
886 code if iter is the second operand.
887 * parser.c (cp_parser_binary_expression): Add no_toplevel_fold_p
888 argument. If it is set, don't build the toplevel expression with
889 build_x_binary_op, but build2.
890 (cp_parser_assignment_expression, cp_parser_omp_for_incr): Adjust
892 (cp_parser_omp_for_cond): Don't assume the first operand of the
893 comparison must be decl.
895 2009-03-23 Jason Merrill <jason@redhat.com>
898 * pt.c (make_fnparm_pack): Split out from...
899 (instantiate_decl): ...here.
900 (tsubst_pack_expansion): Handle being called in a late-specified
904 * name-lookup.c (pushdecl_maybe_friend): Don't warn about shadowing
907 2009-03-20 Jason Merrill <jason@redhat.com>
910 * parser.c (cp_parser_direct_declarator): In a template, wrap
911 non-constant expression in NOP_EXPR with TREE_SIDE_EFFECTS set.
912 * pt.c (tsubst): Preserve it in a partial instantiation.
913 (dependent_type_p_r): Don't check value_dependent_expression_p.
914 * decl.c (compute_array_index_type): Don't check
915 value_dependent_expression_p if TREE_SIDE_EFFECTS.
918 * typeck2.c (check_narrowing): Don't complain about loss of
919 precision when converting a floating-point constant.
921 2009-03-19 Jakub Jelinek <jakub@redhat.com>
924 * parser.c (cp_parser_omp_for_cond): Don't check lhs if decl is NULL.
925 (cp_parser_omp_for_loop): Always use cp_parser_omp_for_cond.
927 2009-03-18 Jakub Jelinek <jakub@redhat.com>
929 * parser.c (struct cp_token): Reorder fields for 64-bit hosts.
932 2009-03-18 H.J. Lu <hongjiu.lu@intel.com>
935 * parser.c (cp_parser_explicit_specialization): Don't skip the
936 rest of the specialization when begin_specialization returns
939 2009-03-17 Jason Merrill <jason@redhat.com>
941 * decl.c (grokfndecl): Set DECL_CONTEXT on parms.
942 (duplicate_decls): Adjust DECL_CONTEXT of newdecl's parms.
943 * pt.c (check_explicit_specialization): Likewise.
944 (tsubst_copy) [PARM_DECL]: Return a dummy parm if we don't have a
945 local specialization.
946 * tree.c (cp_tree_equal) [PARM_DECL]: Check type and index, not name.
947 * decl2.c (parm_index): New fn.
948 * semantics.c (finish_decltype_type): Don't use describable_type.
949 * mangle.c (write_expression): Likewise. Mangle ALIGNOF_EXPR.
950 Give a sorry for unsupported codes rather than crash. Mangle
951 conversions with other than 1 operand. New mangling for PARM_DECL.
952 * operators.def (ALIGNOF_EXPR): Mangle as "az".
954 2009-03-17 Jing Yu <jingyu@google.com>
957 * method.c (use_thunk): Change is_thunk from crtl to cfun.
959 2009-03-17 Paolo Carlini <paolo.carlini@oracle.com>
962 * semantics.c (check_trait_type): New.
963 (finish_trait_expr): Use it.
965 2009-03-17 Jakub Jelinek <jakub@redhat.com>
967 * name-lookup.c (cp_emit_debug_info_for_using): Emit USING_STMTs
968 instead of calling imported_module_or_decl debug hook if
969 building_stmt_tree ().
970 * cp-gimplify.c (cp_gimplify_expr): Don't assert the first operand
974 * name-lookup.c (do_namespace_alias): Don't call global_decl debug
975 hook at function scope.
978 * cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
981 2009-03-09 Jakub Jelinek <jakub@redhat.com>
984 * semantics.c (finish_switch_cond): Don't call get_unwidened.
985 * decl.c (finish_case_label): Pass SWITCH_STMT_TYPE as 3rd argument
986 instead of TREE_TYPE (cond).
988 2009-03-08 H.J. Lu <hongjiu.lu@intel.com>
991 * parser.c (cp_parser_late_parsing_default_args): Continue
992 the loop when cp_parser_assignment_expression returns
995 2009-03-07 Jason Merrill <jason@redhat.com>
998 * init.c (build_new_1): Don't use a VLA type.
999 (build_vec_init): Handle getting a pointer for BASE.
1001 2009-03-06 H.J. Lu <hongjiu.lu@intel.com>
1004 * cp-tree.h: Check NO_DOT_IN_LABEL before NO_DOLLAR_IN_LABEL
1005 when mangling symbols.
1007 2009-03-06 Paolo Carlini <paolo.carlini@oracle.com>
1010 * error.c (dump_expr): Don't try to print THROW_EXPRs in full.
1012 2009-03-06 Alexandre Oliva <aoliva@redhat.com>
1014 * decl.c (record_builtin_java_type): Use canonicalized integer
1017 2009-03-04 Jason Merrill <jason@redhat.com>
1020 * class.c (is_really_empty_class): New fn.
1021 * cp-tree.h: Declare it.
1022 * cp-objcp-common.c (cp_expr_size): Use it.
1025 * semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
1026 * parser.c (cp_parser_postfix_expression): Call it for
1028 * tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
1029 (get_first_fn): Likewise.
1035 * decl.c (make_typename_type): Do look inside currently open classes.
1036 * parser.c (cp_parser_lookup_name): Likewise.
1037 (cp_parser_template_name): Likewise.
1038 * pt.c (dependent_scope_p): New function.
1039 * cp-tree.h: Declare it.
1040 * class.c (currently_open_class): Return fast if T isn't a class.
1042 2009-02-26 H.J. Lu <hongjiu.lu@intel.com>
1045 * parser.c (cp_parser_mem_initializer): Return error_mark_node
1046 if cp_parser_mem_initializer_id returns error_mark_node.
1048 2009-02-24 Richard Guenther <rguenther@suse.de>
1051 * pt.c (instantiate_decl): Do not instantiate extern, non-inline
1054 2009-02-23 H.J. Lu <hongjiu.lu@intel.com>
1057 * pt.c (coerce_template_template_parms): Return 0 if parameter
1060 2009-02-23 Jason Merrill <jason@redhat.com>
1062 * pt.c (unify): Call maybe_adjust_types_for_deduction when
1063 deducing from an initializer list.
1065 2009-02-20 Jason Merrill <jason@redhat.com>
1068 * decl.c (grokdeclarator): Handle ~identifier.
1070 2009-02-19 Jakub Jelinek <jakub@redhat.com>
1073 * decl2.c (determine_visibility): If visibility changed and
1074 DECL_RTL has been already set, call make_decl_rtl to update symbol
1077 2009-02-19 H.J. Lu <hongjiu.lu@intel.com>
1080 * cp-tree.h (maybe_commonize_var): New.
1082 * decl.c (maybe_commonize_var): Make it extern.
1084 * decl2.c (finish_anon_union): Call maybe_commonize_var.
1086 2009-02-18 H.J. Lu <hongjiu.lu@intel.com>
1089 * parser.c (cp_parser_enum_specifier): Apply all attributes.
1091 2009-02-18 Jason Merrill <jason@redhat.com>
1093 * cfns.h: Tweak pathname for cfns.gperf.
1095 2009-02-13 Jason Merrill <jason@redhat.com>
1098 * semantics.c (finish_call_expr): Change koenig_p parm to int.
1099 If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
1100 * cp-tree.h: Adjust prototype.
1101 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
1103 2009-02-12 Jason Merrill <jason@redhat.com>
1106 * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
1108 2009-02-11 Jason Merrill <jason@redhat.com>
1111 * decl2.c (cp_write_global_declarations):
1112 Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
1115 * init.c (build_value_init_noctor): Split out from...
1116 (build_value_init): ...here.
1117 (expand_aggr_init_1): Handle value-initialization.
1118 * cp-tree.h: Add declaration.
1119 * class.c (type_has_user_provided_constructor):
1120 Handle non-class arguments.
1122 2009-02-10 Jason Merrill <jason@redhat.com>
1125 * class.c (defaultable_fn_p): Handle ... properly.
1128 * tree.c (lvalue_p_1): Condition rvalue ref handling on
1129 treat_class_rvalues_as_lvalues, too.
1131 2009-02-10 Paolo Carlini <paolo.carlini@oracle.com>
1134 * typeck.c (build_x_array_ref): New.
1135 * cp-tree.h: Declare it.
1136 * pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
1138 2009-02-09 Jason Merrill <jason@redhat.com>
1141 * semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
1142 * init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
1143 * tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
1144 * cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
1145 for build_value_init TARGET_EXPR.
1146 * cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
1148 2009-02-06 Paolo Carlini <paolo.carlini@oracle.com>
1152 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
1154 2009-02-04 Jakub Jelinek <jakub@redhat.com>
1157 * operators.def: Use COMPONENT_REF code for ->/pt operator again,
1158 remove ./dt operator.
1159 * mangle.c (write_expression): Handle COMPONENT_REF after handling
1160 ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
1161 write_string ("dt") instead of using operators.def.
1163 2009-02-03 Jason Merrill <jason@redhat.com>
1165 * typeck.c (cp_build_unary_op): Only complain about taking address
1166 of main if pedantic.
1168 2009-02-03 Jakub Jelinek <jakub@redhat.com>
1171 * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
1174 * typeck2.c (digest_init_r): Don't call process_init_constructor
1177 2009-02-03 Paolo Bonzini <bonzini@gnu.org>
1180 * pt.c (convert_nontype_argument_function): Expect expr to be an
1184 * typeck.c (merge_types): Call resolve_typename_type if only
1185 one type is a typename.
1187 2009-02-02 Jason Merrill <jason@redhat.com>
1190 * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node
1193 2009-02-01 Paolo Carlini <paolo.carlini@oracle.com>
1196 * parser.c (cp_parser_pure_specifier): If there are no tokens left
1197 do not call cp_lexer_consume_token.
1199 2009-01-30 Jakub Jelinek <jakub@redhat.com>
1202 * parser.c (cp_parser_already_scoped_statement): Handle __label__
1205 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
1208 * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
1210 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
1213 * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
1215 2009-01-29 Paolo Carlini <paolo.carlini@oracle.com>
1217 * typeck.c (invalid_nonstatic_memfn_p): Use
1218 DECL_NONSTATIC_MEMBER_FUNCTION_P.
1220 2009-01-27 Paolo Carlini <paolo.carlini@oracle.com>
1223 * call.c (build_over_call): If convert_for_arg_passing returns
1224 error_mark_node unconditionally return it.
1226 2009-01-22 Adam Nemet <anemet@caviumnetworks.com>
1228 * class.c (check_field_decls): Also inherit packed for bitfields
1229 regardless of their type.
1231 2009-01-22 Dodji Seketeli <dodji@redhat.com>
1234 * decl2.c (grokfield): Reverting changes of PR c++/26693
1235 (save_template_attributes): Likewise.
1236 * decl.c (grokdeclarator): Likewise.
1237 * name-lookup.c (pushdecl_maybe_friend): Likewise.
1238 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
1239 (append_type_to_template_for_access_check): Likewise.
1240 * semantics.c (check_accessibility_of_qualified_id): Likewise.
1241 * pt.c (instantiate_class_template, instantiate_template ): Likewise.
1243 (resolve_type_name_type): Likewise.
1244 (append_type_to_template_for_access_check): Likewise.
1246 2009-01-21 Dodji Seketeli <dodji@redhat.com>
1249 * decl2.c (grokfield): when a typedef appears in a
1250 class, create the typedef variant type node for it.
1251 (save_template_attributes): Creating typedef variant type node
1252 here is now useless.
1253 * decl.c (grokdeclarator): If the typedef'ed struct/class was
1254 anonymous, set the proper type name to all its type variants.
1255 * name-lookup.c (pushdecl_maybe_friend): Reuse the
1256 set_underlying_type function to install typedef variant types.
1257 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
1259 (append_type_to_template_for_access_check): New entry points.
1260 * semantics.c (check_accessibility_of_qualified_id):
1261 When a typedef that is a member of a class appears in a template,
1262 add it to the template. It will be ...
1263 * pt.c (instantiate_class_template, instantiate_template ): ... access
1264 checked at template instantiation time.
1265 (tsubst): Handle the case of being called with NULL args.
1266 (resolve_type_name_type): The type name should be the name of the
1268 (append_type_to_template_for_access_check): New entry point.
1270 2009-01-19 Jason Merrill <jason@redhat.com>
1273 * parser.c (cp_parser_unqualified_id): In a template,
1275 * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
1277 2009-01-16 Jason Merrill <jason@redhat.com>
1280 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
1281 * init.c (build_new): Don't call describable_type unless we
1285 * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
1288 * search.c (protected_accessible_p): N doesn't vary.
1290 2009-01-15 Jason Merrill <jason@redhat.com>
1293 * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
1294 accept hidden friends.
1296 2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1299 * decl.c (grokdeclarator): Check for a non namespace/class context.
1301 2009-01-15 Jason Merrill <jason@redhat.com>
1305 * tree.c (lvalue_p_1): Handle BASELINK. A COMPONENT_REF to
1306 a function isn't necessarily an lvalue. Take tree, not const_tree.
1307 (lvalue_p, real_lvalue_p): Take tree, not const_tree.
1308 * typeck.c (lvalue_or_else): Likewise.
1309 * cp-tree.h: Adjust prototypes.
1311 2009-01-15 Steve Ellcey <sje@cup.hp.com>
1314 * pt.c (tsubst): Check for NULL args.
1316 2009-01-15 Dodji Seketeli <dodji@redhat.com>
1319 * name-lookup.c (pushtag): Don't create members to types that are not
1322 2009-01-14 Nick Clifton <nickc@redhat.com>
1325 * parser.c: Pass cp_id_kind computed in
1326 cp_parser_postfix_dot_deref_expression to
1327 cp_parser_primary_expression.
1329 2009-01-13 Jakub Jelinek <jakub@redhat.com>
1332 * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
1333 STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
1336 2009-01-12 Jason Merrill <jason@redhat.com>
1337 Steve Ellcey <sje@cup.hp.com>
1340 * name-lookup.c (lookup_name_real): Keep looking past a hidden
1343 2009-01-12 Dodji Seketeli <dodji@redhat.com>
1346 * pt.c (parameter_of_template_p): New function.
1347 * cp-tree.h: Declare it.
1348 * name-lookup.c (binding_to_template_parms_of_scope_p): New
1350 (outer_binding): Take template parameters in account when looking for
1353 2009-01-12 Jason Merrill <jason@redhat.com>
1356 * tree.c (pod_type_p): Return 1 for structs created by the back end.
1358 2009-01-12 Jakub Jelinek <jakub@redhat.com>
1361 * parser.c (cp_parser_builtin_offsetof): Allow `->' in
1362 offsetof member-designator, handle it as `[0].'.
1365 * decl.c (start_function): If grokdeclarator hasn't returned
1366 FUNCTION_DECL nor error_mark_node, issue diagnostics.
1368 2009-01-11 Jakub Jelinek <jakub@redhat.com>
1371 * cp-gimplify.c (genericize_if_stmt): Renamed from ...
1372 (gimplify_if_stmt): ... this.
1373 (cp_gimplify_expr): Don't handle IF_STMT here.
1374 (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
1376 2009-01-10 Andrew Pinski <pinskia@gmail.com>
1379 * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
1382 * typeck2.c (build_functional_cast): Check for reference type and NULL
1385 2009-01-09 Steve Ellcey <sje@cup.hp.com>
1387 * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
1389 2009-01-09 Jakub Jelinek <jakub@redhat.com>
1392 * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
1394 2009-01-09 John F. Carr <jfc@mit.edu>
1397 * parser.c (cp_parser_class_specifier): Clear
1398 parser->in_unbraced_linkage_specification_p while parsing class
1401 2009-01-07 Jakub Jelinek <jakub@redhat.com>
1404 * semantics.c (finish_goto_stmt): Convert destination to
1407 2009-01-06 Jason Merrill <jason@redhat.com>
1414 * pt.c (check_default_tmpl_args): Don't complain about
1415 out-of-order parameter packs in the enclosing class
1416 or parameter packs after default args.
1417 (coerce_template_parms): If we have more than one
1418 parameter pack, don't flatten argument packs.
1419 (template_args_equal): Handle argument packs.
1420 (comp_template_args): Don't flatten argument packs.
1421 (check_instantiated_arg): Split out from...
1422 (check_instantiated_args): Here. Handle arg packs.
1423 (convert_template_argument): Just check that nontype argument
1424 packs have the right type.
1426 2009-01-05 Dodji Seketeli <dodji@redhat.com>
1429 * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
1431 2009-01-05 Jason Merrill <jason@redhat.com>
1434 * typeck2.c (process_init_constructor_union): Handle union with
1437 * mangle.c (write_expression): Remove mangling for zero-operand
1441 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
1445 * class.c (defaultable_fn_p): Only operator== can be a copy
1446 assignment operator.
1448 2009-01-02 Jason Merrill <jason@redhat.com>
1451 * typeck2.c (process_init_constructor_union): Handle excess
1453 (process_init_constructor_record): Likewise.
1456 * typeck2.c (digest_init_r): Don't use process_init_constructor
1457 for non-aggregate classes.
1460 Copyright (C) 2009 Free Software Foundation, Inc.
1462 Copying and distribution of this file, with or without modification,
1463 are permitted in any medium without royalty provided the copyright
1464 notice and this notice are preserved.