1 2009-06-08 Alexandre Oliva <aoliva@redhat.com>
3 * repo.c (get_base_filename): Use aux_base_name rather than
4 alternate temporary file during second compare debug compilation.
5 (finish_repo): Skip during -fcompare-debug-second.
7 2009-06-06 Ian Lance Taylor <iant@google.com>
9 * parser.c (cp_parser_label_for_labeled_statement): Support
10 attribute on labels if immediately followed by semicolon.
11 * semantics.c (finish_label_stmt): Return new label.
12 * pt.c (tsubst_expr): Handle attributes for LABEL_EXPR.
14 2009-06-03 Ian Lance Taylor <iant@google.com>
16 * Make-lang.in (cc1plus-checksum.o): Depend upon $(CONFIG_H) and
19 2009-06-02 Mark Mitchell <mark@codesourcery.com>
21 * decl.c (maybe_deduce_size_from_array_init): Use relayout_decl.
23 2009-06-02 Jason Merrill <jason@redhat.com>
27 * typeck.c (cp_build_modify_expr): Always pass init-lists to the
29 * call.c (implicit_conversion): Allow init-list conversion to scalar
30 during direct-initialization, too. Mark the conversion bad if it
31 has too many levels of braces.
32 (convert_like_real): And give a helpful error.
36 * decl.c (cp_finish_decl): Handle auto deduction from ().
37 * typeck.c (build_x_indirect_ref): Handle dereferencing an operand
38 with dependent type that is known to be a pointer.
40 2009-06-02 Simon Martin <simartin@users.sourceforge.net>
43 * pt.c (register_specialization): Properly setup DECL_CONTEXT for
44 specializations in an invalid namespace.
46 2009-06-01 Aldy Hernandez <aldyh@redhat.com>
48 * error.c (print_instantiation_partial_context): Print column
51 2009-05-29 Ian Lance Taylor <iant@google.com>
53 * error.c (cp_printer): Don't use va_arg with enum type.
55 2009-05-28 Dodji Seketeli <dodji@redhat.com>
58 * cp-tree.h (canonical_type_variant): Remove this function declaration.
59 (strip_typedefs): New function declaration.
60 * tree.c (strip_typedefs): New function definition.
61 (canonical_type_variant): Remove function definition.
62 * cvt.c (convert_from_reference): No need to use
63 canonical_type_variant.
64 * typeck.c (cp_build_indirect_ref): Likewise.
65 * error.c (dump_template_bindings): Use strip_typedefs instead of
66 canonical_type_variant.
67 * pt.c (convert_template_argument, unify): Likewise.
68 * mangle.c (canonicalize_for_substitution): Don't use
69 canonical_type_variant.
71 2009-05-27 Jason Merrill <jason@redhat.com>
73 * call.c (implicit_conversion): Handle conversion from
74 initializer-list to scalar.
75 (convert_like_real): Likewise. Avoid crashing on list
76 initialization with bad conversions.
77 (can_convert): Use LOOKUP_EXPLICIT.
78 (can_convert_arg_bad): Add flags parm.
80 * typeck.c (convert_for_assignment): Pass flags.
82 2009-05-27 Ian Lance Taylor <iant@google.com>
84 * Make-lang.in (g++$(exeext)): Change $(COMPILER) to $(LINKER).
85 (cc1plus-dummy$(exeext), cc1plus$(exeext)): Likewise.
87 2009-05-26 Ian Lance Taylor <iant@google.com>
89 * Make-lang.in (g++spec.o): Use $(COMPILER).
90 (g++$(exeext), cc1plus-dummy$(exeext)): Likewise.
91 (cc1plus$(exeext)): Likewise.
93 2009-05-26 Dodji Seketeli <dodji@redhat.com>
96 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Remove this accessor.
97 (TI_TYPEDEFS_NEEDING_ACCESS_CHECKING): New accessor.
98 (get_types_needing_access_check): Declare new entry point.
99 * pt.c (append_type_to_template_for_access_check_1,
100 get_types_needing_access_check): New functions.
101 (perform_typedefs_access_check): Accept FUNCTION_DECLs and
102 RECORD_TYPEs rather than TEMPLATE_DECLs. Use the new
103 get_types_needing_access_check, no more
104 MEMBER_TYPES_NEEDING_ACCESS_CHECK.
105 (instantiate_class_template): Set input_location to the source
106 location of the most specialized template definition.
107 Perform access check using the RECORD_TYPE of the template, not its
108 associated most generic TEMPLATE_DECL.
109 (append_type_to_template_for_access_check): Augment function
110 comments. Use the new get_types_needing_access_check, not
111 MEMBER_TYPE_NEEDING_ACCESS_CHECK. Use the new
112 append_type_to_template_for_access_check_1 subroutine.
114 2009-05-22 Jason Merrill <jason@redhat.com>
117 * typeck.c (cp_build_binary_op): Allow ENUMERAL_TYPE in
118 arithmetic comparisons.
119 (cp_common_type): Handle scoped enums.
121 * call.c (promoted_arithmetic_type_p): Don't use INTEGRAL_TYPE_P.
122 (add_builtin_candidate, add_builtin_candidates): Likewise.
123 (convert_like_real): Likewise.
124 * class.c (check_bitfield_decl): Likewise.
125 * decl.c (check_static_variable_definition): Likewise.
126 (compute_array_index_type): Likewise.
127 * decl2.c (grokbitfield): Likewise.
128 * init.c (build_new_1): Likewise.
129 * pt.c (convert_nontype_argument): Likewise.
130 (current_instantiation): Likewise.
131 * tree.c (pod_type_p): Likewise.
132 * typeck.c (build_static_cast_1): Likewise.
133 (build_reinterpret_cast_1): Likewise.
135 2009-05-22 Richard Guenther <rguenther@suse.de>
138 * init.c (avoid_placement_new_aliasing): Remove.
139 (build_new_1): Do not call it.
141 2009-05-22 Mark Mitchell <mark@codesourcery.com>
143 * decl2.c (decl_needed_p): Consider dllexport'd functions needed.
144 * semantics.c (expand_or_defer_fn): Similarly.
146 2009-05-20 Ian Lance Taylor <iant@google.com>
148 * parser.c (cp_parser_postfix_expression): Change args to a vec.
149 Release it when done.
150 (tree_vector): Define typedef. Define VEC functions.
151 (cp_parser_parenthesized_expression_list): Change return type to
152 vec. Change all callers.
153 (cp_parser_new_expression): Change placement and initializer to
154 vecs. Release them when done.
155 (cp_parser_new_placement): Change return type to vec. Change all
157 (cp_parser_new_initializer): Likewise.
158 * typeck.c (build_function_call_vec): Just call
159 cp_build_function_call_vec.
160 (cp_build_function_call): Just build a vec and call
161 cp_build_function_call_vec.
162 (cp_build_function_call_vec): New function based on old
163 cp_build_function_call.
164 (convert_arguments): Remove nargs and argarray parameters. Change
165 values to a vec. Change caller.
166 (build_x_compound_expr_from_vec): New function.
167 (cp_build_modify_expr): Build vec to pass to
168 build_special_member_call.
169 * call.c (struct z_candidate): Add first_arg field. Change args
171 (convert_class_to_reference): Handle first argument separately.
172 (add_candidate): Add first_arg parameter. Change args parameter
173 to vec. Change all callers.
174 (add_function_candidate, add_conv_candidate): Likewise.
175 (add_template_candidate_real, add_template_candidate): Likewise.
176 (add_template_conv_candidate): Likewise.
177 (build_user_type_conversion_1): Handle first argument separately.
178 (resolve_args): Change return type and parameter type to vecs.
180 (perform_overload_resolution): Change args parameter to vec.
182 (build_new_function_call, build_operator_new_call): Likewise.
183 (add_candidates): Likewise.
184 (build_op_call): New globally visible function, built from and
185 replacing static function build_object_call.
186 (build_new_op): Don't handle CALL_EXPR. Build vec, not tree_list,
188 (build_op_delete_call): Build vec to pass to
189 cp_build_function_call_vec.
190 (build_temp): Build vec to pass to build_special_member_call.
191 (convert_like_real): Likewise.
192 (perform_direct_initialization_if_possible): Likewise.
193 (build_over_call): Handle first_arg field. Use build_call_array
194 rather than build_call_list.
195 (build_special_member_call): Change args parameter to vec. Change
197 (build_new_method_call): Likewise.
198 * init.c (expand_default_init): Change parms to vec.
199 (build_raw_new_expr): Change placement and init to vecs. Change
201 (build_new_1, build_new): Likewise.
202 * class.c (resolve_address_of_overloaded_function): Build array to
203 pass to fn_type_unification.
204 * pt.c (tsubst_copy_and_build): For NEW_EXPR build vecs to pass to
205 build_new. For CALL_EXPR create a vec rather than a tree_list;
206 expand a pack if necessary.
207 (fn_type_unification): Change args parameter to const tree *. Add
208 nargs parameter. Change all callers.
209 (type_unification_real): Likewise.
210 (unify): Build array to pass to type_unification_real.
211 (get_bindings): Build array to pass to fn_type_unification.
212 (any_type_dependent_arguments_p): Change args parameter to a vec.
214 (make_args_non_dependent): Renamed from build_non_dependent_args.
215 Change return type to void. Change parameter type to vec. Change
217 (do_auto_deduction): Pass an array to type_unification_real.
218 * semantics.c (perform_koenig_lookup): Change args to vec. Change
220 (finish_call_expr): Change args to vec. Change all callers. Call
221 build_op_call instead of passing CALL_EXPR to build_new_op.
222 (cxx_omp_create_clause_info): Allocate vec to pass to
223 build_special_member_call.
224 * decl2.c (build_offset_ref_call_from_tree): Change args parameter
225 to vec. Change all callers.
226 * name-lookup.c (lookup_function_nonclass): Likewise.
227 (struct arg_lookup): Change args to vec.
228 (arg_assoc_namespace): Handle args as a vec.
229 (arg_assoc_args_vec): New static function.
230 (lookup_arg_dependent): Change args parameter to vec. Change all
232 * method.c (do_build_assign_ref): Allocate vec to pass to
233 build_special_member_call.
234 * except.c (build_throw): Likewise.
235 * typeck2.c (build_functional_cast): Likewise.
236 * cvt.c (ocp_convert): Likewise.
237 * tree.c (build_min_non_dep_call_vec): Change last parameter to
238 vec. Change all callers.
239 * cp-tree.h: Update declarations.
240 * name-lookup.h: Update declarations.
242 2009-05-20 Sandra Loosemore <sandra@codesourcery.com>
244 * typeck.c (default_conversion): Check targetm.promoted_type.
245 * decl.c (grokdeclarator): Check targetm.invalid_return_type.
246 (grokparms): Check targetm.invalid_parameter_type.
247 * cvt.c (ocp_convert): Check targetm.convert_to_type.
248 (build_expr_type_conversion): Check targetm.promoted_type.
250 2009-05-19 Andrew Pinski <andrew_pinski@playstation.sony.com>
252 * typeck.c (build_binary_op): Allow % on integal vectors.
254 2009-05-18 Jason Merrill <jason@redhat.com>
256 Implement explicit conversions ops as specified in N2437.
257 * decl.c (grokdeclarator): Handle explicit conversion ops.
258 (check_initializer): Pass flags to store_init_value.
259 * decl2.c (maybe_emit_vtables): Likewise.
260 * init.c (expand_aggr_init_1): Likewise.
261 * call.c (convert_class_to_reference): Take flags parm,
262 check DECL_NONCONVERTING_P.
263 (build_user_type_conversion_1): Check DECL_NONCONVERTING_P.
264 (add_builtin_candidates): Simplify getting type of conversion.
265 (build_object_call): Likewise. Check DECL_NONCONVERTING_P.
266 (implicit_conversion): Pass through LOOKUP_ONLYCONVERTING.
267 (reference_binding): Take flags parm. Direct-initialize copy parm.
268 (add_function_candidate): Direct-initialize the copy parm.
269 (add_conv_candidate): Use LOOKUP_IMPLICIT, not LOOKUP_NORMAL.
270 (build_builtin_candidate): Add LOOKUP_ONLYCONVERTING.
271 (conditional_conversion): Likewise.
272 (convert_like_real): Only complain about DECL_NONCONVERTING_P
274 (perform_implicit_conversion_flags): Add flags parm to
275 perform_implicit_conversion. Improve diagnostics.
276 * cp-tree.h (LOOKUP_IMPLICIT): New macro.
277 (LOOKUP_COPY_PARM): New bit macro.
278 * cvt.c (build_expr_type_conversion): Check DECL_NONCONVERTING_P.
279 * typeck.c (convert_for_assignment): Take flags parm, pass it to
280 perform_implicit_conversion_flags.
281 (cp_build_modify_expr): Pass flags to convert_for_assignment.
282 (convert_for_initialization): Likewise.
283 * typeck2.c (store_init_value): Take flags parm, pass to
285 (digest_init_flags): Add flags parm to digest_init.
286 (digest_init_r): Take flags parm, pass to convert_for_initialization.
287 (process_init_constructor_array): Pass it.
288 (process_init_constructor_record): Likewise.
289 (process_init_constructor_union): Likewise.
291 2009-05-16 Jason Merrill <jason@redhat.com>
294 * pt.c (tsubst_qualified_id): Retain the type if we aren't dealing
295 with a dependent type. Actually look up the destructor.
296 * semantics.c (finish_id_expression): Fix logic.
297 (finish_qualified_id_expr): Don't try to use 'this' if we aren't in
299 * typeck.c (build_x_unary_op): Diagnose taking the address of a
300 constructor or destructor.
301 * tree.c (get_first_fn): Handle OFFSET_REF.
303 2009-05-17 Joseph Myers <joseph@codesourcery.com>
305 * tree.c (cxx_printable_name_internal): Allow consecutive
306 translated and untranslated cached copies of the name of the
309 2009-05-15 Ian Lance Taylor <iant@google.com>
311 * cp-tree.h (enum cp_lvalue_kind_flags): Rename from
312 cp_lvalue_kind. Change all uses.
313 (enum base_access_flags): Rename from enum base_access. Change
315 * parser.c (enum cp_parser_flags): Remove enum tag.
317 2009-05-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
320 * call.c (build_new_op): Update calls to warn_logical_operator.
322 2009-05-14 Ian Lance Taylor <iant@google.com>
324 * class.c (layout_class_type): Change itk to unsigned int.
325 * decl.c (finish_enum): Change itk to unsigned int.
326 * parser.c (cp_parser_check_decl_spec): Change ds to int. Remove
329 2009-05-13 David Mandelin <dmandelin@mozilla.com>:
331 * decl.c (duplicate_decls): Preserve parameter attributes.
333 2009-05-10 Jan Hubicka <jh@suse.cz>
335 * decl2.c (cxx_callgraph_analyze_expr): Use
336 cgraph_mark_address_taken.
338 2009-05-10 Joseph Myers <joseph@codesourcery.com>
340 * call.c (name_as_c_string): Call type_as_string_translate.
341 Translate identifiers to locale character set.
342 * cp-tree.h (lang_decl_name): Update prototype.
343 (type_as_string_translate, decl_as_string_translate,
344 cxx_printable_name_translate): Declare.
345 * cxx-pretty-print.c (M_): Define.
346 (pp_cxx_unqualified_id, pp_cxx_canonical_template_parameter): Mark
347 English fragments for conditional translation with M_.
348 * decl.c (grokdeclarator): Translate identifiers to locale
349 character set for diagnostics.
350 * error.c (M_): Define.
351 (dump_template_bindings, dump_type, dump_aggr_type,
352 dump_type_prefix, dump_global_iord, dump_simple_decl, dump_decl,
353 dump_function_decl, dump_template_parms, dump_expr,
354 dump_binary_op, op_to_string, assop_to_string): Mark English
355 fragments for conditional translation with M_.
356 (type_as_string): Disable translation of identifiers.
357 (type_as_string_translate): New.
358 (expr_as_string): Disable translation of identifiers.
359 (decl_as_string): Disable translation of identifiers.
360 (decl_as_string_translate): New.
361 (lang_decl_name): Add parameter translate.
362 (args_to_string): Call type_as_string_translate.
363 (cp_print_error_function): Call cxx_printable_name_translate.
364 (print_instantiation_full_context,
365 print_instantiation_partial_context): Call
366 decl_as_string_translate.
367 * parser.c (cp_lexer_get_preprocessor_token): Use %qE for
368 identifier in diagnostic.
369 * tree.c (cxx_printable_name): Change to
370 cxx_printable_name_internal. Add parameter translate.
371 (cxx_printable_name, cxx_printable_name_translate): New wrappers
372 round cxx_printable_name_internal.
374 2009-05-08 H.J. Lu <hongjiu.lu@intel.com>
377 * call.c (build_call_a): Updated warn_deprecated_use call.
378 (build_over_call): Likewise.
379 * decl.c (grokdeclarator): Likewise.
380 (grokparms): Likewise.
381 * semantics.c (finish_id_expression): Likewise.
382 * typeck.c (build_class_member_access_expr): Likewise.
383 (finish_class_member_access_expr): Likewise.
385 2009-05-06 Dodji Seketeli <dodji@redhat.com>
388 * pt.c (tsubst_copy) <case PARM_DECL>: We don't want to tsubst the
389 whole list of PARM_DECLs, just the current one.
391 2009-05-05 Shujing Zhao <pearly.zhao@oracle.com>
394 (opname_tab, assignop_tab, update_member_visibility, yyerror, yyhook,
395 mangle_compound_literal): Remove unused declarations.
396 (build_vfield_ref, cxx_print_statistics, clone_function_decl,
397 adjust_clone_args, maybe_push_cleanup_level, pushtag, make_anon_name,
398 pushdecl_top_level_maybe_friend, pushdecl_top_level_and_finish,
399 check_for_out_of_scope_variable, print_other_binding_stack,
400 maybe_push_decl, cxx_mark_addressable, force_target_expr,
401 build_target_expr_with_type, finish_case_label,
402 cxx_maybe_build_cleanup, begin_eh_spec_block, finish_eh_spec_block,
403 check_template_keyword, cxx_omp_predetermined_sharing,
404 cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor,
405 cxx_omp_clause_assign_op, cxx_omp_clause_dtor, cxx_omp_finish_clause,
406 cxx_omp_privatize_by_reference): Rearrange the declarations line to
407 match the comment that indicates the .c file which the functions are
409 (cxx_print_xnode, cxx_print_decl, cxx_print_type,
410 cxx_print_identifier, cxx_print_error_function, pushdecl): Add comment.
412 2009-05-05 Nathan Sidwell <nathan@codesourcery.com>
414 * typeck.c (cp_build_compound_expr): Require RHS to have a known
416 * class.c (resolve_address_of_overloaded_function): Use
417 OVL_CURRENT for error message.
418 (instantiate_type): Forbid COMPOUND_EXPRs and remove code dealing
419 with them. Do not copy the node.
421 2009-05-05 Jakub Jelinek <jakub@redhat.com>
424 * pt.c (tsubst): If magic NOP_EXPR with side-effects has no type,
425 set it from its operand's type after tsubst_expr.
427 2009-05-04 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
430 * parser.c (cp_lexer_get_preprocessor_token): Do not store the
431 canonical spelling for keywords.
432 (cp_parser_attribute_list): Use the canonical spelling for
433 keywords in attributes.
435 2009-05-01 Joseph Myers <joseph@codesourcery.com>
437 * cxx-pretty-print.c (is_destructor_name, pp_cxx_unqualified_id,
438 pp_cxx_template_keyword_if_needed, pp_cxx_postfix_expression,
439 pp_cxx_new_expression, pp_cxx_delete_expression,
440 pp_cxx_unary_expression, pp_cxx_assignment_operator,
441 pp_cxx_assignment_expression, pp_cxx_expression,
442 pp_cxx_function_specifier, pp_cxx_decl_specifier_seq,
443 pp_cxx_simple_type_specifier, pp_cxx_type_specifier_seq,
444 pp_cxx_exception_specification, pp_cxx_direct_declarator,
445 pp_cxx_ctor_initializer, pp_cxx_type_id, pp_cxx_statement,
446 pp_cxx_namespace_alias_definition, pp_cxx_template_parameter,
447 pp_cxx_canonical_template_parameter, pp_cxx_template_declaration,
448 pp_cxx_declaration, pp_cxx_typeid_expression,
449 pp_cxx_va_arg_expression, pp_cxx_offsetof_expression,
450 pp_cxx_trait_expression): Mostly use pp_string and
451 pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
452 for non-identifiers. Mark English strings for translation.
453 * cxx-pretty-print.h (pp_cxx_ws_string): Define.
454 * error.c (dump_template_parameter, dump_template_bindings,
455 dump_type, dump_aggr_type, dump_type_prefix, dump_simple_decl,
456 dump_decl, dump_template_decl, dump_function_decl,
457 dump_parameters, dump_exception_spec, dump_template_parms,
458 dump_expr, dump_binary_op, dump_unary_op, op_to_string,
459 assop_to_string, args_to_string, cp_print_error_function,
460 print_instantiation_full_context,
461 print_instantiation_partial_context): Mostly use pp_string and
462 pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
463 for non-identifiers. Mark English strings for translation.
464 (dump_global_iord): Mark strings for translation; use longer
465 strings instead of substituting single words.
466 (function_category): Return a format string marked for
467 translation, not a single word or phrase to substitute in a longer
470 2009-04-28 Ben Elliston <bje@au.ibm.com>
475 2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
477 * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
479 2009-04-27 Ian Lance Taylor <iant@google.com>
481 * semantics.c (finish_omp_clauses): Change type of c_kind to enum
484 2009-04-27 Jakub Jelinek <jakub@redhat.com>
487 * cvt.c (convert_to_void) <case INDIRECT_REF>: Only warn about
488 -Wunused-value if implicit.
490 2009-04-24 Ian Lance Taylor <iant@google.com>
492 * call.c (build_temp): Change 0 to enum constant.
493 * cp-tree.h (cp_lvalue_kind): Typedef to int rather than enum
495 * cp-gimplify.c (cp_gimplify_expr): Add cast to enum type.
496 * decl2.c (constrain_visibility): Likewise.
497 * parser.c (cp_lexer_get_preprocessor_token): Likewise.
498 (cp_parser_flags): Typedef to int rather than enum type.
499 (cp_parser_expression_stack_entry): Change prec field to enum
502 * typeck.c (build_modify_expr): Add lhs_origtype parameter.
505 2009-04-22 Dodji Seketeli <dodji@redhat.com>
508 * parser.c (cp_parser_template_argument_list): Display an error
509 when an ellipsis is not preceded by a parameter pack. Also, warn
510 about variadic templates usage without -std=c++0x.
512 2009-04-21 Taras Glek <tglek@mozilla.com>
514 * cp-tree.h: Update GTY annotations to new syntax.
516 * mangle.c: Likewise.
517 * name-lookup.c: Likewise.
518 * name-lookup.h: Likewise.
519 * parser.c: Likewise.
522 * semantics.c: Likewise.
523 * typeck2.c: Likewise.
525 2009-04-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
528 * parser.c (cp_parser_error): Pass token->flags to c_parse_error.
530 2009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
533 * typeck.c (check_for_casting_away_constness): We diagnose casting
534 away any qualifiers not just constness.
535 (casts_away_constness): Mention that it handles more than just
538 2009-04-21 Joseph Myers <joseph@codesourcery.com>
540 * ChangeLog, ChangeLog-1993, ChangeLog-1994, ChangeLog-1995,
541 ChangeLog-1996, ChangeLog-1997, ChangeLog-1998, ChangeLog-1999,
542 ChangeLog-2000, ChangeLog-2001, ChangeLog-2002, ChangeLog-2003,
543 ChangeLog-2004, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007,
544 ChangeLog-2008, ChangeLog.ptr, ChangeLog.tree-ssa, NEWS,
545 cfns.gperf: Add copyright and license notices.
546 * cfns.h: Regenerate.
547 * ChangeLog, ChangeLog-2004: Correct dates.
549 2009-04-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
552 * tree.c (lvalue_p_1): Use const_tree.
553 Use CONST_CAST_TREE to avoid warning.
554 (lvalue_p): Returns bool, receives const_tree.
556 2009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
559 * parser.c (cp_parser_check_decl_spec): Drop redundant flags.
560 * error.c (pedwarn_cxx98): New.
561 * cp-tree.h (pedwarn_cxx98): Declare.
563 2009-04-20 Le-Chun Wu <lcwu@google.com>
566 * init.c (build_vec_init): Set TREE_NO_WARNING on the
567 compiler-generated INDIRECT_REF expression.
569 2009-04-20 Ian Lance Taylor <iant@google.com>
571 * typeck.c (build_function_call_vec): New function.
572 (cp_build_function_call): Only pass first parameter to
573 objc_rewrite_function_call.
574 (build_modify_expr): Add rhs_origtype parameter. Change all
576 * decl.c (finish_decl): Add origtype parameter. Change all
578 * semantics.c (finish_call_expr): Pass VEC to
579 resolve_overloaded_builtin.
581 2009-04-20 Ian Lance Taylor <iant@google.com>
583 * cp-tree.h (base_access): Change typedef to int.
584 * parser.c (cp_parser_omp_flush): Change 0 to OMP_CLAUSE_ERROR.
585 (cp_parser_omp_threadprivate): Likewise.
586 * pt.c (unify_pack_expansion): Add casts to enum type.
588 2009-04-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
592 * call.c (build_new_op): Save the original codes of operands
595 2009-04-18 Kazu Hirata <kazu@codesourcery.com>
597 * cp-tree.h: Remove the prototype for insert_block.
598 * decl.c (insert_block): Remove.
600 2009-04-16 Ian Lance Taylor <iant@google.com>
602 * cp-tree.h (enum tsubst_flags): Rename from enum tsubst_flags_t.
603 (tsubst_flags_t): Change typedef from enum type to int.
605 2009-04-16 Paolo Bonzini <bonzini@gnu.org>
607 * decl.c (check_initializer): Use TYPE_VECTOR_OPAQUE
608 instead of targetm.vector_opaque_p.
610 2009-04-15 Le-Chun Wu <lcwu@google.com>
613 * call.c (build_over_call): Set TREE_NO_WARNING on the
614 compiler-generated INDIRECT_REF expression.
615 * cvt.c (convert_to_void): Emit warning when stripping off
618 2009-04-14 Diego Novillo <dnovillo@google.com>
620 * parser.c (cp_parser_type_specifier_seq): Move call to
621 invoke_plugin_callbacks ...
622 (cp_parser_type_specifier_seq): ... here.
624 2009-04-14 Le-Chun Wu <lcwu@google.com>
626 * Make-lang.in: Modify dependencies of files including plugin.h.
627 * decl.c (finish_function): Call invoke_plugin_callbacks.
628 * parser.c (cp_parser_type_specifier): Call invoke_plugin_callbacks.
630 2009-04-14 Jason Merrill <jason@redhat.com>
633 * name-lookup.c (pushdecl_maybe_friend): Avoid all warnings
634 about shadowing by tentative parms.
636 2009-04-13 Jason Merrill <jason@redhat.com>
639 * call.c (build_over_call): Don't call memcpy if the target is
640 the same as the source.
642 2009-04-13 Jason Merrill <jason@redhat.com>
645 * pt.c (uses_template_parms): Handle CONSTRUCTOR.
647 2009-04-12 Jason Merrill <jason@redhat.com>
650 * call.c (joust): Don't crash on variadic fn.
652 2009-04-10 Jason Merrill <jason@redhat.com>
655 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Return
656 if we see a close brace without an open brace.
658 2009-04-10 H.J. Lu <hongjiu.lu@intel.com>
660 * parser.c (cp_parser_class_specifier): Remove the unused
661 has_trailing_semicolon.
663 2009-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
666 * parser.c (cp_parser_check_template_parameters): Take a
667 cp_declarator parameter.
668 (cp_parser_elaborated_type_specifier): Update to
669 cp_parser_check_template_parameters.
670 (cp_parser_class_head): Likewise.
671 (cp_parser_check_declarator_template_parameters): Likewise.
672 (cp_parser_check_template_parameters): Handle first the non-error
673 conditions. Give more accurate diagnostics if a declarator is
676 2009-04-08 Jason Merrill <jason@redhat.com>
679 * error.c (dump_aggr_type): Chase template typedefs if
680 -fno-pretty-templates.
682 2009-04-08 Dodji Seketeli <dodji@redhat.com>
685 * parser.c (cp_parser_enumerator_definition): Make sure the
686 initializer of the enumerator doesn't contain any bare parameter pack.
688 2009-04-07 Jason Merrill <jason@redhat.com>
691 * name-lookup.c (merge_functions): Keep multiple extern "C" functions.
692 * call.c (joust): Complain about mismatched default arguments
693 in extern "C" functions.
694 * class.c (resolve_address_of_overloaded_function): Handle multiple
695 extern "C" functions.
696 * pt.c (resolve_overloaded_unification): Likewise.
698 2009-04-07 Jason Merrill <jason@redhat.com>
701 * error.c (dump_function_decl): Don't pretty-print templates
702 if -fno-pretty-templates.
703 (count_non_default_template_args): Print all args if
704 -fno-pretty-templates.
706 2009-04-06 Jason Merrill <jason@redhat.com>
709 * pt.c (fn_type_unification): For DEDUCE_EXACT check that
710 the deduced template arguments give us the parameter types
713 2009-04-05 Giovanni Bajo <giovannibajo@libero.it>
714 Jason Merrill <jason@redhat.com>
717 * error.c (count_non_default_template_args): New fn.
718 (dump_template_parms): Call it.
719 (dump_template_argument_list): Call it. Add parms parm.
720 (dump_template_argument): Adjust call to dump_template_argument_list.
721 (dump_type, dump_decl): Likewise.
722 (dump_template_bindings): Refactor logic.
724 2009-04-03 Jason Merrill <jason@redhat.com>
727 * error.c (dump_template_bindings): Look through typedefs in
729 (dump_type) [TYPENAME_TYPE]: Print the typedef name if any.
730 (find_typenames_r): Also collect typedefs.
731 * pt.c (unify): Strip typedefs.
734 * semantics.c (finish_id_expression): Don't assume a dependent
735 member of the current instantiation isn't a valid integral
736 constant expression. Check dependent_scope_p.
737 * pt.c (dependent_scope_p): Check TYPE_P.
738 (tsubst_copy): If args is null, just return.
740 2009-04-02 Jason Merrill <jason@redhat.com>
743 * error.c (find_typenames, find_typenames_r): New fns.
744 (dump_function_decl): Call find_typenames.
745 (dump_template_bindings): Print typenames as well.
746 * pt.c (tsubst): Non-static.
747 * cp-tree.h: Declare it.
749 2009-04-02 Dodji Seketeli <dodji@redhat.com>
752 * decl2.c (grokfield): when a typedef appears in a
753 class, create the typedef variant type node for it.
754 (save_template_attributes): Creating typedef variant type node
756 * decl.c (grokdeclarator): If the typedef'ed struct/class was
757 anonymous, set the proper type name to all its type variants.
758 (xref_basetypes) : Fixup the variant types after setting
760 * name-lookup.c (pushdecl_maybe_friend): Reuse the
761 set_underlying_type function to install typedef variant types.
762 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
764 (append_type_to_template_for_access_check): New entry points.
765 * semantics.c (check_accessibility_of_qualified_id):
766 When a typedef that is a member of a class appears in a template,
767 add it to the template. It will be ...
768 * class.c (finish_struct_bits): Split type variant fixup into ...
769 (fixup_type_variants): A new entry point.
770 * pt.c (instantiate_class_template, instantiate_template ): ... access
771 checked at template instantiation time.
772 (resolve_type_name_type): The type name should be the name of the
774 (retrieve_specialization): Specializations of template typedefs aren't
775 to looked up in DECL_TEMPLATE_INSTANTIATIONS (tmpl).
776 (append_type_to_template_for_access_check): New entry point.
777 (tsubst_decl): For typedefs, build the variant type from the correct
779 (get_class_bindings): Fix function comment.
780 (perform_typedefs_access_check): New entry point.
782 2009-03-31 Jason Merrill <jason@redhat.com>
785 * name-lookup.c (pushdecl_maybe_friend): Diagnose mismatched
786 extern "C" declarations.
789 * semantics.c (finish_non_static_data_member): Allow such references
790 without an associated object in sizeof/decltype/alignof.
792 * ptree.c (cxx_print_decl): Pretty-print full name of
794 (cxx_print_type): Pretty-print full name of class.
796 * decl.c (grokdeclarator): Reject pointer to qualified function
799 PR c++/37806, core issue 547
800 * typeck.c (cp_apply_type_quals_to_decl): Don't apply any quals
802 * tree.c (cp_build_qualified_type_real): Don't apply restrict to a
804 * decl.h (enum decl_context): Add TEMPLATE_TYPE_ARG.
805 * decl.c (groktypename): Add is_template_arg parameter.
806 (grokdeclarator): Allow function cv-quals on a template type arg.
807 * parser.c (cp_parser_new_type_id, cp_parser_type_id): Add
808 is_template_arg argument in calls to groktypename.
809 * cp-tree.h: Adjust prototype.
810 * error.c (dump_type_prefix, dump_type_suffix): Fix plain
811 FUNCTION_TYPE printing.
813 * mangle.c (write_expression): Mangle dependent name as
816 PR c++/38030, 38850, 39070
817 * pt.c (type_dependent_expression_p_push): New fn.
818 (tsubst_copy_and_build) [CALL_EXPR]: Only do arg-dep lookup when the
819 substitution makes the call non-dependent. Preserve koenig_p.
820 * parser.c (cp_parser_postfix_expression): Only do arg-dep lookup
821 for non-dependent calls.
822 * semantics.c (finish_call_expr): Revert earlier changes.
823 * cp-tree.h: Revert change to finish_call_expr prototype.
825 2009-03-29 Joseph Myers <joseph@codesourcery.com>
827 PR preprocessor/34695
828 * cp-tree.h (cp_cpp_error): Remove.
829 * error.c (cp_cpp_error): Remove.
830 * parser.c (cp_lexer_new_main): Set done_lexing instead of
831 client_diagnostic and error callback.
833 2009-03-28 Paolo Bonzini <bonzini@gnu.org>
835 * cp/cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
836 * cp/cp-objcp-common.c (cxx_staticp): Remove.
837 * cp/cp-tree.h (cxx_staticp): Remove.
839 2009-03-28 Jakub Jelinek <jakub@redhat.com>
842 * parser.c (cp_parser_postfix_expression): Don't call
843 warning_if_disallowed_function_p.
845 2009-03-27 Jan Hubicka <jh@suse.cz>
847 * except.c (choose_personality_routine): Set terminate_node to abort
850 2009-03-27 Dodji Seketeli <dodji@redhat.com>
851 Jakub Jelinek <jakub@redhat.com>
854 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P): Define.
855 (cp_function_decl_explicit_p): New prototype.
856 * cp-objcp-common.c (cp_function_decl_explicit_p): New function.
858 2009-03-27 Andrew Pinski <andrew_pinski@playstation.sony.com>
861 * parser.c (cp_parser_elaborated_type_specifier): If we have a
862 typename tag and don't have either a TYPE_DECL or a
863 TEMPLATE_ID_EXPR, set the type to NULL.
865 2009-03-27 Simon Martin <simartin@users.sourceforge.net>
868 * decl.c (grokdeclarator): Reject [con|de]stuctors in a non-class
871 2009-03-27 Simon Martin <simartin@users.sourceforge.net>
874 * decl.c (check_array_designated_initializer): Handle error_mark_node.
876 2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
879 * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
881 2009-03-26 Andrew Haley <aph@redhat.com>
884 * decl2.c (possibly_inlined_p): If java exceptions are in use
885 don't inline a decl unless it is explicitly marked inline.
886 * lex.c: (pragma_java_exceptions): New variable.
887 (handle_pragma_java_exceptions): Set pragma_java_exceptions.
888 * cp-tree.h (pragma_java_exceptions): Declare new variable.
890 2009-03-24 Jason Merrill <jason@redhat.com>
893 * name-lookup.c (pushdecl_maybe_friend): Check default args later.
895 2009-03-23 Jakub Jelinek <jakub@redhat.com>
898 * semantics.c (handle_omp_for_class_iterator): Swap cond operands and
899 code if iter is the second operand.
900 * parser.c (cp_parser_binary_expression): Add no_toplevel_fold_p
901 argument. If it is set, don't build the toplevel expression with
902 build_x_binary_op, but build2.
903 (cp_parser_assignment_expression, cp_parser_omp_for_incr): Adjust
905 (cp_parser_omp_for_cond): Don't assume the first operand of the
906 comparison must be decl.
908 2009-03-23 Jason Merrill <jason@redhat.com>
911 * pt.c (make_fnparm_pack): Split out from...
912 (instantiate_decl): ...here.
913 (tsubst_pack_expansion): Handle being called in a late-specified
917 * name-lookup.c (pushdecl_maybe_friend): Don't warn about shadowing
920 2009-03-20 Jason Merrill <jason@redhat.com>
923 * parser.c (cp_parser_direct_declarator): In a template, wrap
924 non-constant expression in NOP_EXPR with TREE_SIDE_EFFECTS set.
925 * pt.c (tsubst): Preserve it in a partial instantiation.
926 (dependent_type_p_r): Don't check value_dependent_expression_p.
927 * decl.c (compute_array_index_type): Don't check
928 value_dependent_expression_p if TREE_SIDE_EFFECTS.
931 * typeck2.c (check_narrowing): Don't complain about loss of
932 precision when converting a floating-point constant.
934 2009-03-19 Jakub Jelinek <jakub@redhat.com>
937 * parser.c (cp_parser_omp_for_cond): Don't check lhs if decl is NULL.
938 (cp_parser_omp_for_loop): Always use cp_parser_omp_for_cond.
940 2009-03-18 Jakub Jelinek <jakub@redhat.com>
942 * parser.c (struct cp_token): Reorder fields for 64-bit hosts.
945 2009-03-18 H.J. Lu <hongjiu.lu@intel.com>
948 * parser.c (cp_parser_explicit_specialization): Don't skip the
949 rest of the specialization when begin_specialization returns
952 2009-03-17 Jason Merrill <jason@redhat.com>
954 * decl.c (grokfndecl): Set DECL_CONTEXT on parms.
955 (duplicate_decls): Adjust DECL_CONTEXT of newdecl's parms.
956 * pt.c (check_explicit_specialization): Likewise.
957 (tsubst_copy) [PARM_DECL]: Return a dummy parm if we don't have a
958 local specialization.
959 * tree.c (cp_tree_equal) [PARM_DECL]: Check type and index, not name.
960 * decl2.c (parm_index): New fn.
961 * semantics.c (finish_decltype_type): Don't use describable_type.
962 * mangle.c (write_expression): Likewise. Mangle ALIGNOF_EXPR.
963 Give a sorry for unsupported codes rather than crash. Mangle
964 conversions with other than 1 operand. New mangling for PARM_DECL.
965 * operators.def (ALIGNOF_EXPR): Mangle as "az".
967 2009-03-17 Jing Yu <jingyu@google.com>
970 * method.c (use_thunk): Change is_thunk from crtl to cfun.
972 2009-03-17 Paolo Carlini <paolo.carlini@oracle.com>
975 * semantics.c (check_trait_type): New.
976 (finish_trait_expr): Use it.
978 2009-03-17 Jakub Jelinek <jakub@redhat.com>
980 * name-lookup.c (cp_emit_debug_info_for_using): Emit USING_STMTs
981 instead of calling imported_module_or_decl debug hook if
982 building_stmt_tree ().
983 * cp-gimplify.c (cp_gimplify_expr): Don't assert the first operand
987 * name-lookup.c (do_namespace_alias): Don't call global_decl debug
988 hook at function scope.
991 * cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
994 2009-03-09 Jakub Jelinek <jakub@redhat.com>
997 * semantics.c (finish_switch_cond): Don't call get_unwidened.
998 * decl.c (finish_case_label): Pass SWITCH_STMT_TYPE as 3rd argument
999 instead of TREE_TYPE (cond).
1001 2009-03-08 H.J. Lu <hongjiu.lu@intel.com>
1004 * parser.c (cp_parser_late_parsing_default_args): Continue
1005 the loop when cp_parser_assignment_expression returns
1008 2009-03-07 Jason Merrill <jason@redhat.com>
1011 * init.c (build_new_1): Don't use a VLA type.
1012 (build_vec_init): Handle getting a pointer for BASE.
1014 2009-03-06 H.J. Lu <hongjiu.lu@intel.com>
1017 * cp-tree.h: Check NO_DOT_IN_LABEL before NO_DOLLAR_IN_LABEL
1018 when mangling symbols.
1020 2009-03-06 Paolo Carlini <paolo.carlini@oracle.com>
1023 * error.c (dump_expr): Don't try to print THROW_EXPRs in full.
1025 2009-03-06 Alexandre Oliva <aoliva@redhat.com>
1027 * decl.c (record_builtin_java_type): Use canonicalized integer
1030 2009-03-04 Jason Merrill <jason@redhat.com>
1033 * class.c (is_really_empty_class): New fn.
1034 * cp-tree.h: Declare it.
1035 * cp-objcp-common.c (cp_expr_size): Use it.
1038 * semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
1039 * parser.c (cp_parser_postfix_expression): Call it for
1041 * tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
1042 (get_first_fn): Likewise.
1048 * decl.c (make_typename_type): Do look inside currently open classes.
1049 * parser.c (cp_parser_lookup_name): Likewise.
1050 (cp_parser_template_name): Likewise.
1051 * pt.c (dependent_scope_p): New function.
1052 * cp-tree.h: Declare it.
1053 * class.c (currently_open_class): Return fast if T isn't a class.
1055 2009-02-26 H.J. Lu <hongjiu.lu@intel.com>
1058 * parser.c (cp_parser_mem_initializer): Return error_mark_node
1059 if cp_parser_mem_initializer_id returns error_mark_node.
1061 2009-02-24 Richard Guenther <rguenther@suse.de>
1064 * pt.c (instantiate_decl): Do not instantiate extern, non-inline
1067 2009-02-23 H.J. Lu <hongjiu.lu@intel.com>
1070 * pt.c (coerce_template_template_parms): Return 0 if parameter
1073 2009-02-23 Jason Merrill <jason@redhat.com>
1075 * pt.c (unify): Call maybe_adjust_types_for_deduction when
1076 deducing from an initializer list.
1078 2009-02-20 Jason Merrill <jason@redhat.com>
1081 * decl.c (grokdeclarator): Handle ~identifier.
1083 2009-02-19 Jakub Jelinek <jakub@redhat.com>
1086 * decl2.c (determine_visibility): If visibility changed and
1087 DECL_RTL has been already set, call make_decl_rtl to update symbol
1090 2009-02-19 H.J. Lu <hongjiu.lu@intel.com>
1093 * cp-tree.h (maybe_commonize_var): New.
1095 * decl.c (maybe_commonize_var): Make it extern.
1097 * decl2.c (finish_anon_union): Call maybe_commonize_var.
1099 2009-02-18 H.J. Lu <hongjiu.lu@intel.com>
1102 * parser.c (cp_parser_enum_specifier): Apply all attributes.
1104 2009-02-18 Jason Merrill <jason@redhat.com>
1106 * cfns.h: Tweak pathname for cfns.gperf.
1108 2009-02-13 Jason Merrill <jason@redhat.com>
1111 * semantics.c (finish_call_expr): Change koenig_p parm to int.
1112 If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
1113 * cp-tree.h: Adjust prototype.
1114 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
1116 2009-02-12 Jason Merrill <jason@redhat.com>
1119 * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
1121 2009-02-11 Jason Merrill <jason@redhat.com>
1124 * decl2.c (cp_write_global_declarations):
1125 Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
1128 * init.c (build_value_init_noctor): Split out from...
1129 (build_value_init): ...here.
1130 (expand_aggr_init_1): Handle value-initialization.
1131 * cp-tree.h: Add declaration.
1132 * class.c (type_has_user_provided_constructor):
1133 Handle non-class arguments.
1135 2009-02-10 Jason Merrill <jason@redhat.com>
1138 * class.c (defaultable_fn_p): Handle ... properly.
1141 * tree.c (lvalue_p_1): Condition rvalue ref handling on
1142 treat_class_rvalues_as_lvalues, too.
1144 2009-02-10 Paolo Carlini <paolo.carlini@oracle.com>
1147 * typeck.c (build_x_array_ref): New.
1148 * cp-tree.h: Declare it.
1149 * pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
1151 2009-02-09 Jason Merrill <jason@redhat.com>
1154 * semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
1155 * init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
1156 * tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
1157 * cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
1158 for build_value_init TARGET_EXPR.
1159 * cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
1161 2009-02-06 Paolo Carlini <paolo.carlini@oracle.com>
1165 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
1167 2009-02-04 Jakub Jelinek <jakub@redhat.com>
1170 * operators.def: Use COMPONENT_REF code for ->/pt operator again,
1171 remove ./dt operator.
1172 * mangle.c (write_expression): Handle COMPONENT_REF after handling
1173 ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
1174 write_string ("dt") instead of using operators.def.
1176 2009-02-03 Jason Merrill <jason@redhat.com>
1178 * typeck.c (cp_build_unary_op): Only complain about taking address
1179 of main if pedantic.
1181 2009-02-03 Jakub Jelinek <jakub@redhat.com>
1184 * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
1187 * typeck2.c (digest_init_r): Don't call process_init_constructor
1190 2009-02-03 Paolo Bonzini <bonzini@gnu.org>
1193 * pt.c (convert_nontype_argument_function): Expect expr to be an
1197 * typeck.c (merge_types): Call resolve_typename_type if only
1198 one type is a typename.
1200 2009-02-02 Jason Merrill <jason@redhat.com>
1203 * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node
1206 2009-02-01 Paolo Carlini <paolo.carlini@oracle.com>
1209 * parser.c (cp_parser_pure_specifier): If there are no tokens left
1210 do not call cp_lexer_consume_token.
1212 2009-01-30 Jakub Jelinek <jakub@redhat.com>
1215 * parser.c (cp_parser_already_scoped_statement): Handle __label__
1218 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
1221 * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
1223 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
1226 * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
1228 2009-01-29 Paolo Carlini <paolo.carlini@oracle.com>
1230 * typeck.c (invalid_nonstatic_memfn_p): Use
1231 DECL_NONSTATIC_MEMBER_FUNCTION_P.
1233 2009-01-27 Paolo Carlini <paolo.carlini@oracle.com>
1236 * call.c (build_over_call): If convert_for_arg_passing returns
1237 error_mark_node unconditionally return it.
1239 2009-01-22 Adam Nemet <anemet@caviumnetworks.com>
1241 * class.c (check_field_decls): Also inherit packed for bitfields
1242 regardless of their type.
1244 2009-01-22 Dodji Seketeli <dodji@redhat.com>
1247 * decl2.c (grokfield): Reverting changes of PR c++/26693
1248 (save_template_attributes): Likewise.
1249 * decl.c (grokdeclarator): Likewise.
1250 * name-lookup.c (pushdecl_maybe_friend): Likewise.
1251 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
1252 (append_type_to_template_for_access_check): Likewise.
1253 * semantics.c (check_accessibility_of_qualified_id): Likewise.
1254 * pt.c (instantiate_class_template, instantiate_template ): Likewise.
1256 (resolve_type_name_type): Likewise.
1257 (append_type_to_template_for_access_check): Likewise.
1259 2009-01-21 Dodji Seketeli <dodji@redhat.com>
1262 * decl2.c (grokfield): when a typedef appears in a
1263 class, create the typedef variant type node for it.
1264 (save_template_attributes): Creating typedef variant type node
1265 here is now useless.
1266 * decl.c (grokdeclarator): If the typedef'ed struct/class was
1267 anonymous, set the proper type name to all its type variants.
1268 * name-lookup.c (pushdecl_maybe_friend): Reuse the
1269 set_underlying_type function to install typedef variant types.
1270 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
1272 (append_type_to_template_for_access_check): New entry points.
1273 * semantics.c (check_accessibility_of_qualified_id):
1274 When a typedef that is a member of a class appears in a template,
1275 add it to the template. It will be ...
1276 * pt.c (instantiate_class_template, instantiate_template ): ... access
1277 checked at template instantiation time.
1278 (tsubst): Handle the case of being called with NULL args.
1279 (resolve_type_name_type): The type name should be the name of the
1281 (append_type_to_template_for_access_check): New entry point.
1283 2009-01-19 Jason Merrill <jason@redhat.com>
1286 * parser.c (cp_parser_unqualified_id): In a template,
1288 * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
1290 2009-01-16 Jason Merrill <jason@redhat.com>
1293 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
1294 * init.c (build_new): Don't call describable_type unless we
1298 * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
1301 * search.c (protected_accessible_p): N doesn't vary.
1303 2009-01-15 Jason Merrill <jason@redhat.com>
1306 * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
1307 accept hidden friends.
1309 2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1312 * decl.c (grokdeclarator): Check for a non namespace/class context.
1314 2009-01-15 Jason Merrill <jason@redhat.com>
1318 * tree.c (lvalue_p_1): Handle BASELINK. A COMPONENT_REF to
1319 a function isn't necessarily an lvalue. Take tree, not const_tree.
1320 (lvalue_p, real_lvalue_p): Take tree, not const_tree.
1321 * typeck.c (lvalue_or_else): Likewise.
1322 * cp-tree.h: Adjust prototypes.
1324 2009-01-15 Steve Ellcey <sje@cup.hp.com>
1327 * pt.c (tsubst): Check for NULL args.
1329 2009-01-15 Dodji Seketeli <dodji@redhat.com>
1332 * name-lookup.c (pushtag): Don't create members to types that are not
1335 2009-01-14 Nick Clifton <nickc@redhat.com>
1338 * parser.c: Pass cp_id_kind computed in
1339 cp_parser_postfix_dot_deref_expression to
1340 cp_parser_primary_expression.
1342 2009-01-13 Jakub Jelinek <jakub@redhat.com>
1345 * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
1346 STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
1349 2009-01-12 Jason Merrill <jason@redhat.com>
1350 Steve Ellcey <sje@cup.hp.com>
1353 * name-lookup.c (lookup_name_real): Keep looking past a hidden
1356 2009-01-12 Dodji Seketeli <dodji@redhat.com>
1359 * pt.c (parameter_of_template_p): New function.
1360 * cp-tree.h: Declare it.
1361 * name-lookup.c (binding_to_template_parms_of_scope_p): New
1363 (outer_binding): Take template parameters in account when looking for
1366 2009-01-12 Jason Merrill <jason@redhat.com>
1369 * tree.c (pod_type_p): Return 1 for structs created by the back end.
1371 2009-01-12 Jakub Jelinek <jakub@redhat.com>
1374 * parser.c (cp_parser_builtin_offsetof): Allow `->' in
1375 offsetof member-designator, handle it as `[0].'.
1378 * decl.c (start_function): If grokdeclarator hasn't returned
1379 FUNCTION_DECL nor error_mark_node, issue diagnostics.
1381 2009-01-11 Jakub Jelinek <jakub@redhat.com>
1384 * cp-gimplify.c (genericize_if_stmt): Renamed from ...
1385 (gimplify_if_stmt): ... this.
1386 (cp_gimplify_expr): Don't handle IF_STMT here.
1387 (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
1389 2009-01-10 Andrew Pinski <pinskia@gmail.com>
1392 * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
1395 * typeck2.c (build_functional_cast): Check for reference type and NULL
1398 2009-01-09 Steve Ellcey <sje@cup.hp.com>
1400 * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
1402 2009-01-09 Jakub Jelinek <jakub@redhat.com>
1405 * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
1407 2009-01-09 John F. Carr <jfc@mit.edu>
1410 * parser.c (cp_parser_class_specifier): Clear
1411 parser->in_unbraced_linkage_specification_p while parsing class
1414 2009-01-07 Jakub Jelinek <jakub@redhat.com>
1417 * semantics.c (finish_goto_stmt): Convert destination to
1420 2009-01-06 Jason Merrill <jason@redhat.com>
1427 * pt.c (check_default_tmpl_args): Don't complain about
1428 out-of-order parameter packs in the enclosing class
1429 or parameter packs after default args.
1430 (coerce_template_parms): If we have more than one
1431 parameter pack, don't flatten argument packs.
1432 (template_args_equal): Handle argument packs.
1433 (comp_template_args): Don't flatten argument packs.
1434 (check_instantiated_arg): Split out from...
1435 (check_instantiated_args): Here. Handle arg packs.
1436 (convert_template_argument): Just check that nontype argument
1437 packs have the right type.
1439 2009-01-05 Dodji Seketeli <dodji@redhat.com>
1442 * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
1444 2009-01-05 Jason Merrill <jason@redhat.com>
1447 * typeck2.c (process_init_constructor_union): Handle union with
1450 * mangle.c (write_expression): Remove mangling for zero-operand
1454 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
1458 * class.c (defaultable_fn_p): Only operator== can be a copy
1459 assignment operator.
1461 2009-01-02 Jason Merrill <jason@redhat.com>
1464 * typeck2.c (process_init_constructor_union): Handle excess
1466 (process_init_constructor_record): Likewise.
1469 * typeck2.c (digest_init_r): Don't use process_init_constructor
1470 for non-aggregate classes.
1473 Copyright (C) 2009 Free Software Foundation, Inc.
1475 Copying and distribution of this file, with or without modification,
1476 are permitted in any medium without royalty provided the copyright
1477 notice and this notice are preserved.