1 2009-05-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
4 * call.c (build_new_op): Update calls to warn_logical_operator.
6 2009-05-14 Ian Lance Taylor <iant@google.com>
8 * class.c (layout_class_type): Change itk to unsigned int.
9 * decl.c (finish_enum): Change itk to unsigned int.
10 * parser.c (cp_parser_check_decl_spec): Change ds to int. Remove
13 2009-05-13 David Mandelin <dmandelin@mozilla.com>:
15 * decl.c (duplicate_decls): Preserve parameter attributes.
17 2009-05-10 Jan Hubicka <jh@suse.cz>
19 * decl2.c (cxx_callgraph_analyze_expr): Use
20 cgraph_mark_address_taken.
22 2009-05-10 Joseph Myers <joseph@codesourcery.com>
24 * call.c (name_as_c_string): Call type_as_string_translate.
25 Translate identifiers to locale character set.
26 * cp-tree.h (lang_decl_name): Update prototype.
27 (type_as_string_translate, decl_as_string_translate,
28 cxx_printable_name_translate): Declare.
29 * cxx-pretty-print.c (M_): Define.
30 (pp_cxx_unqualified_id, pp_cxx_canonical_template_parameter): Mark
31 English fragments for conditional translation with M_.
32 * decl.c (grokdeclarator): Translate identifiers to locale
33 character set for diagnostics.
34 * error.c (M_): Define.
35 (dump_template_bindings, dump_type, dump_aggr_type,
36 dump_type_prefix, dump_global_iord, dump_simple_decl, dump_decl,
37 dump_function_decl, dump_template_parms, dump_expr,
38 dump_binary_op, op_to_string, assop_to_string): Mark English
39 fragments for conditional translation with M_.
40 (type_as_string): Disable translation of identifiers.
41 (type_as_string_translate): New.
42 (expr_as_string): Disable translation of identifiers.
43 (decl_as_string): Disable translation of identifiers.
44 (decl_as_string_translate): New.
45 (lang_decl_name): Add parameter translate.
46 (args_to_string): Call type_as_string_translate.
47 (cp_print_error_function): Call cxx_printable_name_translate.
48 (print_instantiation_full_context,
49 print_instantiation_partial_context): Call
50 decl_as_string_translate.
51 * parser.c (cp_lexer_get_preprocessor_token): Use %qE for
52 identifier in diagnostic.
53 * tree.c (cxx_printable_name): Change to
54 cxx_printable_name_internal. Add parameter translate.
55 (cxx_printable_name, cxx_printable_name_translate): New wrappers
56 round cxx_printable_name_internal.
58 2009-05-08 H.J. Lu <hongjiu.lu@intel.com>
61 * call.c (build_call_a): Updated warn_deprecated_use call.
62 (build_over_call): Likewise.
63 * decl.c (grokdeclarator): Likewise.
64 (grokparms): Likewise.
65 * semantics.c (finish_id_expression): Likewise.
66 * typeck.c (build_class_member_access_expr): Likewise.
67 (finish_class_member_access_expr): Likewise.
69 2009-05-06 Dodji Seketeli <dodji@redhat.com>
72 * pt.c (tsubst_copy) <case PARM_DECL>: We don't want to tsubst the
73 whole list of PARM_DECLs, just the current one.
75 2009-05-05 Shujing Zhao <pearly.zhao@oracle.com>
78 (opname_tab, assignop_tab, update_member_visibility, yyerror, yyhook,
79 mangle_compound_literal): Remove unused declarations.
80 (build_vfield_ref, cxx_print_statistics, clone_function_decl,
81 adjust_clone_args, maybe_push_cleanup_level, pushtag, make_anon_name,
82 pushdecl_top_level_maybe_friend, pushdecl_top_level_and_finish,
83 check_for_out_of_scope_variable, print_other_binding_stack,
84 maybe_push_decl, cxx_mark_addressable, force_target_expr,
85 build_target_expr_with_type, finish_case_label,
86 cxx_maybe_build_cleanup, begin_eh_spec_block, finish_eh_spec_block,
87 check_template_keyword, cxx_omp_predetermined_sharing,
88 cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor,
89 cxx_omp_clause_assign_op, cxx_omp_clause_dtor, cxx_omp_finish_clause,
90 cxx_omp_privatize_by_reference): Rearrange the declarations line to
91 match the comment that indicates the .c file which the functions are
93 (cxx_print_xnode, cxx_print_decl, cxx_print_type,
94 cxx_print_identifier, cxx_print_error_function, pushdecl): Add comment.
96 2009-05-05 Nathan Sidwell <nathan@codesourcery.com>
98 * typeck.c (cp_build_compound_expr): Require RHS to have a known
100 * class.c (resolve_address_of_overloaded_function): Use
101 OVL_CURRENT for error message.
102 (instantiate_type): Forbid COMPOUND_EXPRs and remove code dealing
103 with them. Do not copy the node.
105 2009-05-05 Jakub Jelinek <jakub@redhat.com>
108 * pt.c (tsubst): If magic NOP_EXPR with side-effects has no type,
109 set it from its operand's type after tsubst_expr.
111 2009-05-04 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
114 * parser.c (cp_lexer_get_preprocessor_token): Do not store the
115 canonical spelling for keywords.
116 (cp_parser_attribute_list): Use the canonical spelling for
117 keywords in attributes.
119 2009-05-01 Joseph Myers <joseph@codesourcery.com>
121 * cxx-pretty-print.c (is_destructor_name, pp_cxx_unqualified_id,
122 pp_cxx_template_keyword_if_needed, pp_cxx_postfix_expression,
123 pp_cxx_new_expression, pp_cxx_delete_expression,
124 pp_cxx_unary_expression, pp_cxx_assignment_operator,
125 pp_cxx_assignment_expression, pp_cxx_expression,
126 pp_cxx_function_specifier, pp_cxx_decl_specifier_seq,
127 pp_cxx_simple_type_specifier, pp_cxx_type_specifier_seq,
128 pp_cxx_exception_specification, pp_cxx_direct_declarator,
129 pp_cxx_ctor_initializer, pp_cxx_type_id, pp_cxx_statement,
130 pp_cxx_namespace_alias_definition, pp_cxx_template_parameter,
131 pp_cxx_canonical_template_parameter, pp_cxx_template_declaration,
132 pp_cxx_declaration, pp_cxx_typeid_expression,
133 pp_cxx_va_arg_expression, pp_cxx_offsetof_expression,
134 pp_cxx_trait_expression): Mostly use pp_string and
135 pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
136 for non-identifiers. Mark English strings for translation.
137 * cxx-pretty-print.h (pp_cxx_ws_string): Define.
138 * error.c (dump_template_parameter, dump_template_bindings,
139 dump_type, dump_aggr_type, dump_type_prefix, dump_simple_decl,
140 dump_decl, dump_template_decl, dump_function_decl,
141 dump_parameters, dump_exception_spec, dump_template_parms,
142 dump_expr, dump_binary_op, dump_unary_op, op_to_string,
143 assop_to_string, args_to_string, cp_print_error_function,
144 print_instantiation_full_context,
145 print_instantiation_partial_context): Mostly use pp_string and
146 pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
147 for non-identifiers. Mark English strings for translation.
148 (dump_global_iord): Mark strings for translation; use longer
149 strings instead of substituting single words.
150 (function_category): Return a format string marked for
151 translation, not a single word or phrase to substitute in a longer
154 2009-04-28 Ben Elliston <bje@au.ibm.com>
159 2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
161 * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
163 2009-04-27 Ian Lance Taylor <iant@google.com>
165 * semantics.c (finish_omp_clauses): Change type of c_kind to enum
168 2009-04-27 Jakub Jelinek <jakub@redhat.com>
171 * cvt.c (convert_to_void) <case INDIRECT_REF>: Only warn about
172 -Wunused-value if implicit.
174 2009-04-24 Ian Lance Taylor <iant@google.com>
176 * call.c (build_temp): Change 0 to enum constant.
177 * cp-tree.h (cp_lvalue_kind): Typedef to int rather than enum
179 * cp-gimplify.c (cp_gimplify_expr): Add cast to enum type.
180 * decl2.c (constrain_visibility): Likewise.
181 * parser.c (cp_lexer_get_preprocessor_token): Likewise.
182 (cp_parser_flags): Typedef to int rather than enum type.
183 (cp_parser_expression_stack_entry): Change prec field to enum
186 * typeck.c (build_modify_expr): Add lhs_origtype parameter.
189 2009-04-22 Dodji Seketeli <dodji@redhat.com>
192 * parser.c (cp_parser_template_argument_list): Display an error
193 when an ellipsis is not preceded by a parameter pack. Also, warn
194 about variadic templates usage without -std=c++0x.
196 2009-04-21 Taras Glek <tglek@mozilla.com>
198 * cp-tree.h: Update GTY annotations to new syntax.
200 * mangle.c: Likewise.
201 * name-lookup.c: Likewise.
202 * name-lookup.h: Likewise.
203 * parser.c: Likewise.
206 * semantics.c: Likewise.
207 * typeck2.c: Likewise.
209 2009-04-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
212 * parser.c (cp_parser_error): Pass token->flags to c_parse_error.
214 2009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
217 * typeck.c (check_for_casting_away_constness): We diagnose casting
218 away any qualifiers not just constness.
219 (casts_away_constness): Mention that it handles more than just
222 2009-04-21 Joseph Myers <joseph@codesourcery.com>
224 * ChangeLog, ChangeLog-1993, ChangeLog-1994, ChangeLog-1995,
225 ChangeLog-1996, ChangeLog-1997, ChangeLog-1998, ChangeLog-1999,
226 ChangeLog-2000, ChangeLog-2001, ChangeLog-2002, ChangeLog-2003,
227 ChangeLog-2004, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007,
228 ChangeLog-2008, ChangeLog.ptr, ChangeLog.tree-ssa, NEWS,
229 cfns.gperf: Add copyright and license notices.
230 * cfns.h: Regenerate.
231 * ChangeLog, ChangeLog-2004: Correct dates.
233 2009-04-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
236 * tree.c (lvalue_p_1): Use const_tree.
237 Use CONST_CAST_TREE to avoid warning.
238 (lvalue_p): Returns bool, receives const_tree.
240 2009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
243 * parser.c (cp_parser_check_decl_spec): Drop redundant flags.
244 * error.c (pedwarn_cxx98): New.
245 * cp-tree.h (pedwarn_cxx98): Declare.
247 2009-04-20 Le-Chun Wu <lcwu@google.com>
250 * init.c (build_vec_init): Set TREE_NO_WARNING on the
251 compiler-generated INDIRECT_REF expression.
253 2009-04-20 Ian Lance Taylor <iant@google.com>
255 * typeck.c (build_function_call_vec): New function.
256 (cp_build_function_call): Only pass first parameter to
257 objc_rewrite_function_call.
258 (build_modify_expr): Add rhs_origtype parameter. Change all
260 * decl.c (finish_decl): Add origtype parameter. Change all
262 * semantics.c (finish_call_expr): Pass VEC to
263 resolve_overloaded_builtin.
265 2009-04-20 Ian Lance Taylor <iant@google.com>
267 * cp-tree.h (base_access): Change typedef to int.
268 * parser.c (cp_parser_omp_flush): Change 0 to OMP_CLAUSE_ERROR.
269 (cp_parser_omp_threadprivate): Likewise.
270 * pt.c (unify_pack_expansion): Add casts to enum type.
272 2009-04-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
276 * call.c (build_new_op): Save the original codes of operands
279 2009-04-18 Kazu Hirata <kazu@codesourcery.com>
281 * cp-tree.h: Remove the prototype for insert_block.
282 * decl.c (insert_block): Remove.
284 2009-04-16 Ian Lance Taylor <iant@google.com>
286 * cp-tree.h (enum tsubst_flags): Rename from enum tsubst_flags_t.
287 (tsubst_flags_t): Change typedef from enum type to int.
289 2009-04-16 Paolo Bonzini <bonzini@gnu.org>
291 * decl.c (check_initializer): Use TYPE_VECTOR_OPAQUE
292 instead of targetm.vector_opaque_p.
294 2009-04-15 Le-Chun Wu <lcwu@google.com>
297 * call.c (build_over_call): Set TREE_NO_WARNING on the
298 compiler-generated INDIRECT_REF expression.
299 * cvt.c (convert_to_void): Emit warning when stripping off
302 2009-04-14 Diego Novillo <dnovillo@google.com>
304 * parser.c (cp_parser_type_specifier_seq): Move call to
305 invoke_plugin_callbacks ...
306 (cp_parser_type_specifier_seq): ... here.
308 2009-04-14 Le-Chun Wu <lcwu@google.com>
310 * Make-lang.in: Modify dependencies of files including plugin.h.
311 * decl.c (finish_function): Call invoke_plugin_callbacks.
312 * parser.c (cp_parser_type_specifier): Call invoke_plugin_callbacks.
314 2009-04-14 Jason Merrill <jason@redhat.com>
317 * name-lookup.c (pushdecl_maybe_friend): Avoid all warnings
318 about shadowing by tentative parms.
320 2009-04-13 Jason Merrill <jason@redhat.com>
323 * call.c (build_over_call): Don't call memcpy if the target is
324 the same as the source.
326 2009-04-13 Jason Merrill <jason@redhat.com>
329 * pt.c (uses_template_parms): Handle CONSTRUCTOR.
331 2009-04-12 Jason Merrill <jason@redhat.com>
334 * call.c (joust): Don't crash on variadic fn.
336 2009-04-10 Jason Merrill <jason@redhat.com>
339 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Return
340 if we see a close brace without an open brace.
342 2009-04-10 H.J. Lu <hongjiu.lu@intel.com>
344 * parser.c (cp_parser_class_specifier): Remove the unused
345 has_trailing_semicolon.
347 2009-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
350 * parser.c (cp_parser_check_template_parameters): Take a
351 cp_declarator parameter.
352 (cp_parser_elaborated_type_specifier): Update to
353 cp_parser_check_template_parameters.
354 (cp_parser_class_head): Likewise.
355 (cp_parser_check_declarator_template_parameters): Likewise.
356 (cp_parser_check_template_parameters): Handle first the non-error
357 conditions. Give more accurate diagnostics if a declarator is
360 2009-04-08 Jason Merrill <jason@redhat.com>
363 * error.c (dump_aggr_type): Chase template typedefs if
364 -fno-pretty-templates.
366 2009-04-08 Dodji Seketeli <dodji@redhat.com>
369 * parser.c (cp_parser_enumerator_definition): Make sure the
370 initializer of the enumerator doesn't contain any bare parameter pack.
372 2009-04-07 Jason Merrill <jason@redhat.com>
375 * name-lookup.c (merge_functions): Keep multiple extern "C" functions.
376 * call.c (joust): Complain about mismatched default arguments
377 in extern "C" functions.
378 * class.c (resolve_address_of_overloaded_function): Handle multiple
379 extern "C" functions.
380 * pt.c (resolve_overloaded_unification): Likewise.
382 2009-04-07 Jason Merrill <jason@redhat.com>
385 * error.c (dump_function_decl): Don't pretty-print templates
386 if -fno-pretty-templates.
387 (count_non_default_template_args): Print all args if
388 -fno-pretty-templates.
390 2009-04-06 Jason Merrill <jason@redhat.com>
393 * pt.c (fn_type_unification): For DEDUCE_EXACT check that
394 the deduced template arguments give us the parameter types
397 2009-04-05 Giovanni Bajo <giovannibajo@libero.it>
398 Jason Merrill <jason@redhat.com>
401 * error.c (count_non_default_template_args): New fn.
402 (dump_template_parms): Call it.
403 (dump_template_argument_list): Call it. Add parms parm.
404 (dump_template_argument): Adjust call to dump_template_argument_list.
405 (dump_type, dump_decl): Likewise.
406 (dump_template_bindings): Refactor logic.
408 2009-04-03 Jason Merrill <jason@redhat.com>
411 * error.c (dump_template_bindings): Look through typedefs in
413 (dump_type) [TYPENAME_TYPE]: Print the typedef name if any.
414 (find_typenames_r): Also collect typedefs.
415 * pt.c (unify): Strip typedefs.
418 * semantics.c (finish_id_expression): Don't assume a dependent
419 member of the current instantiation isn't a valid integral
420 constant expression. Check dependent_scope_p.
421 * pt.c (dependent_scope_p): Check TYPE_P.
422 (tsubst_copy): If args is null, just return.
424 2009-04-02 Jason Merrill <jason@redhat.com>
427 * error.c (find_typenames, find_typenames_r): New fns.
428 (dump_function_decl): Call find_typenames.
429 (dump_template_bindings): Print typenames as well.
430 * pt.c (tsubst): Non-static.
431 * cp-tree.h: Declare it.
433 2009-04-02 Dodji Seketeli <dodji@redhat.com>
436 * decl2.c (grokfield): when a typedef appears in a
437 class, create the typedef variant type node for it.
438 (save_template_attributes): Creating typedef variant type node
440 * decl.c (grokdeclarator): If the typedef'ed struct/class was
441 anonymous, set the proper type name to all its type variants.
442 (xref_basetypes) : Fixup the variant types after setting
444 * name-lookup.c (pushdecl_maybe_friend): Reuse the
445 set_underlying_type function to install typedef variant types.
446 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
448 (append_type_to_template_for_access_check): New entry points.
449 * semantics.c (check_accessibility_of_qualified_id):
450 When a typedef that is a member of a class appears in a template,
451 add it to the template. It will be ...
452 * class.c (finish_struct_bits): Split type variant fixup into ...
453 (fixup_type_variants): A new entry point.
454 * pt.c (instantiate_class_template, instantiate_template ): ... access
455 checked at template instantiation time.
456 (resolve_type_name_type): The type name should be the name of the
458 (retrieve_specialization): Specializations of template typedefs aren't
459 to looked up in DECL_TEMPLATE_INSTANTIATIONS (tmpl).
460 (append_type_to_template_for_access_check): New entry point.
461 (tsubst_decl): For typedefs, build the variant type from the correct
463 (get_class_bindings): Fix function comment.
464 (perform_typedefs_access_check): New entry point.
466 2009-03-31 Jason Merrill <jason@redhat.com>
469 * name-lookup.c (pushdecl_maybe_friend): Diagnose mismatched
470 extern "C" declarations.
473 * semantics.c (finish_non_static_data_member): Allow such references
474 without an associated object in sizeof/decltype/alignof.
476 * ptree.c (cxx_print_decl): Pretty-print full name of
478 (cxx_print_type): Pretty-print full name of class.
480 * decl.c (grokdeclarator): Reject pointer to qualified function
483 PR c++/37806, core issue 547
484 * typeck.c (cp_apply_type_quals_to_decl): Don't apply any quals
486 * tree.c (cp_build_qualified_type_real): Don't apply restrict to a
488 * decl.h (enum decl_context): Add TEMPLATE_TYPE_ARG.
489 * decl.c (groktypename): Add is_template_arg parameter.
490 (grokdeclarator): Allow function cv-quals on a template type arg.
491 * parser.c (cp_parser_new_type_id, cp_parser_type_id): Add
492 is_template_arg argument in calls to groktypename.
493 * cp-tree.h: Adjust prototype.
494 * error.c (dump_type_prefix, dump_type_suffix): Fix plain
495 FUNCTION_TYPE printing.
497 * mangle.c (write_expression): Mangle dependent name as
500 PR c++/38030, 38850, 39070
501 * pt.c (type_dependent_expression_p_push): New fn.
502 (tsubst_copy_and_build) [CALL_EXPR]: Only do arg-dep lookup when the
503 substitution makes the call non-dependent. Preserve koenig_p.
504 * parser.c (cp_parser_postfix_expression): Only do arg-dep lookup
505 for non-dependent calls.
506 * semantics.c (finish_call_expr): Revert earlier changes.
507 * cp-tree.h: Revert change to finish_call_expr prototype.
509 2009-03-29 Joseph Myers <joseph@codesourcery.com>
511 PR preprocessor/34695
512 * cp-tree.h (cp_cpp_error): Remove.
513 * error.c (cp_cpp_error): Remove.
514 * parser.c (cp_lexer_new_main): Set done_lexing instead of
515 client_diagnostic and error callback.
517 2009-03-28 Paolo Bonzini <bonzini@gnu.org>
519 * cp/cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
520 * cp/cp-objcp-common.c (cxx_staticp): Remove.
521 * cp/cp-tree.h (cxx_staticp): Remove.
523 2009-03-28 Jakub Jelinek <jakub@redhat.com>
526 * parser.c (cp_parser_postfix_expression): Don't call
527 warning_if_disallowed_function_p.
529 2009-03-27 Jan Hubicka <jh@suse.cz>
531 * except.c (choose_personality_routine): Set terminate_node to abort
534 2009-03-27 Dodji Seketeli <dodji@redhat.com>
535 Jakub Jelinek <jakub@redhat.com>
538 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P): Define.
539 (cp_function_decl_explicit_p): New prototype.
540 * cp-objcp-common.c (cp_function_decl_explicit_p): New function.
542 2009-03-27 Andrew Pinski <andrew_pinski@playstation.sony.com>
545 * parser.c (cp_parser_elaborated_type_specifier): If we have a
546 typename tag and don't have either a TYPE_DECL or a
547 TEMPLATE_ID_EXPR, set the type to NULL.
549 2009-03-27 Simon Martin <simartin@users.sourceforge.net>
552 * decl.c (grokdeclarator): Reject [con|de]stuctors in a non-class
555 2009-03-27 Simon Martin <simartin@users.sourceforge.net>
558 * decl.c (check_array_designated_initializer): Handle error_mark_node.
560 2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
563 * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
565 2009-03-26 Andrew Haley <aph@redhat.com>
568 * decl2.c (possibly_inlined_p): If java exceptions are in use
569 don't inline a decl unless it is explicitly marked inline.
570 * lex.c: (pragma_java_exceptions): New variable.
571 (handle_pragma_java_exceptions): Set pragma_java_exceptions.
572 * cp-tree.h (pragma_java_exceptions): Declare new variable.
574 2009-03-24 Jason Merrill <jason@redhat.com>
577 * name-lookup.c (pushdecl_maybe_friend): Check default args later.
579 2009-03-23 Jakub Jelinek <jakub@redhat.com>
582 * semantics.c (handle_omp_for_class_iterator): Swap cond operands and
583 code if iter is the second operand.
584 * parser.c (cp_parser_binary_expression): Add no_toplevel_fold_p
585 argument. If it is set, don't build the toplevel expression with
586 build_x_binary_op, but build2.
587 (cp_parser_assignment_expression, cp_parser_omp_for_incr): Adjust
589 (cp_parser_omp_for_cond): Don't assume the first operand of the
590 comparison must be decl.
592 2009-03-23 Jason Merrill <jason@redhat.com>
595 * pt.c (make_fnparm_pack): Split out from...
596 (instantiate_decl): ...here.
597 (tsubst_pack_expansion): Handle being called in a late-specified
601 * name-lookup.c (pushdecl_maybe_friend): Don't warn about shadowing
604 2009-03-20 Jason Merrill <jason@redhat.com>
607 * parser.c (cp_parser_direct_declarator): In a template, wrap
608 non-constant expression in NOP_EXPR with TREE_SIDE_EFFECTS set.
609 * pt.c (tsubst): Preserve it in a partial instantiation.
610 (dependent_type_p_r): Don't check value_dependent_expression_p.
611 * decl.c (compute_array_index_type): Don't check
612 value_dependent_expression_p if TREE_SIDE_EFFECTS.
615 * typeck2.c (check_narrowing): Don't complain about loss of
616 precision when converting a floating-point constant.
618 2009-03-19 Jakub Jelinek <jakub@redhat.com>
621 * parser.c (cp_parser_omp_for_cond): Don't check lhs if decl is NULL.
622 (cp_parser_omp_for_loop): Always use cp_parser_omp_for_cond.
624 2009-03-18 Jakub Jelinek <jakub@redhat.com>
626 * parser.c (struct cp_token): Reorder fields for 64-bit hosts.
629 2009-03-18 H.J. Lu <hongjiu.lu@intel.com>
632 * parser.c (cp_parser_explicit_specialization): Don't skip the
633 rest of the specialization when begin_specialization returns
636 2009-03-17 Jason Merrill <jason@redhat.com>
638 * decl.c (grokfndecl): Set DECL_CONTEXT on parms.
639 (duplicate_decls): Adjust DECL_CONTEXT of newdecl's parms.
640 * pt.c (check_explicit_specialization): Likewise.
641 (tsubst_copy) [PARM_DECL]: Return a dummy parm if we don't have a
642 local specialization.
643 * tree.c (cp_tree_equal) [PARM_DECL]: Check type and index, not name.
644 * decl2.c (parm_index): New fn.
645 * semantics.c (finish_decltype_type): Don't use describable_type.
646 * mangle.c (write_expression): Likewise. Mangle ALIGNOF_EXPR.
647 Give a sorry for unsupported codes rather than crash. Mangle
648 conversions with other than 1 operand. New mangling for PARM_DECL.
649 * operators.def (ALIGNOF_EXPR): Mangle as "az".
651 2009-03-17 Jing Yu <jingyu@google.com>
654 * method.c (use_thunk): Change is_thunk from crtl to cfun.
656 2009-03-17 Paolo Carlini <paolo.carlini@oracle.com>
659 * semantics.c (check_trait_type): New.
660 (finish_trait_expr): Use it.
662 2009-03-17 Jakub Jelinek <jakub@redhat.com>
664 * name-lookup.c (cp_emit_debug_info_for_using): Emit USING_STMTs
665 instead of calling imported_module_or_decl debug hook if
666 building_stmt_tree ().
667 * cp-gimplify.c (cp_gimplify_expr): Don't assert the first operand
671 * name-lookup.c (do_namespace_alias): Don't call global_decl debug
672 hook at function scope.
675 * cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
678 2009-03-09 Jakub Jelinek <jakub@redhat.com>
681 * semantics.c (finish_switch_cond): Don't call get_unwidened.
682 * decl.c (finish_case_label): Pass SWITCH_STMT_TYPE as 3rd argument
683 instead of TREE_TYPE (cond).
685 2009-03-08 H.J. Lu <hongjiu.lu@intel.com>
688 * parser.c (cp_parser_late_parsing_default_args): Continue
689 the loop when cp_parser_assignment_expression returns
692 2009-03-07 Jason Merrill <jason@redhat.com>
695 * init.c (build_new_1): Don't use a VLA type.
696 (build_vec_init): Handle getting a pointer for BASE.
698 2009-03-06 H.J. Lu <hongjiu.lu@intel.com>
701 * cp-tree.h: Check NO_DOT_IN_LABEL before NO_DOLLAR_IN_LABEL
702 when mangling symbols.
704 2009-03-06 Paolo Carlini <paolo.carlini@oracle.com>
707 * error.c (dump_expr): Don't try to print THROW_EXPRs in full.
709 2009-03-06 Alexandre Oliva <aoliva@redhat.com>
711 * decl.c (record_builtin_java_type): Use canonicalized integer
714 2009-03-04 Jason Merrill <jason@redhat.com>
717 * class.c (is_really_empty_class): New fn.
718 * cp-tree.h: Declare it.
719 * cp-objcp-common.c (cp_expr_size): Use it.
722 * semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
723 * parser.c (cp_parser_postfix_expression): Call it for
725 * tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
726 (get_first_fn): Likewise.
732 * decl.c (make_typename_type): Do look inside currently open classes.
733 * parser.c (cp_parser_lookup_name): Likewise.
734 (cp_parser_template_name): Likewise.
735 * pt.c (dependent_scope_p): New function.
736 * cp-tree.h: Declare it.
737 * class.c (currently_open_class): Return fast if T isn't a class.
739 2009-02-26 H.J. Lu <hongjiu.lu@intel.com>
742 * parser.c (cp_parser_mem_initializer): Return error_mark_node
743 if cp_parser_mem_initializer_id returns error_mark_node.
745 2009-02-24 Richard Guenther <rguenther@suse.de>
748 * pt.c (instantiate_decl): Do not instantiate extern, non-inline
751 2009-02-23 H.J. Lu <hongjiu.lu@intel.com>
754 * pt.c (coerce_template_template_parms): Return 0 if parameter
757 2009-02-23 Jason Merrill <jason@redhat.com>
759 * pt.c (unify): Call maybe_adjust_types_for_deduction when
760 deducing from an initializer list.
762 2009-02-20 Jason Merrill <jason@redhat.com>
765 * decl.c (grokdeclarator): Handle ~identifier.
767 2009-02-19 Jakub Jelinek <jakub@redhat.com>
770 * decl2.c (determine_visibility): If visibility changed and
771 DECL_RTL has been already set, call make_decl_rtl to update symbol
774 2009-02-19 H.J. Lu <hongjiu.lu@intel.com>
777 * cp-tree.h (maybe_commonize_var): New.
779 * decl.c (maybe_commonize_var): Make it extern.
781 * decl2.c (finish_anon_union): Call maybe_commonize_var.
783 2009-02-18 H.J. Lu <hongjiu.lu@intel.com>
786 * parser.c (cp_parser_enum_specifier): Apply all attributes.
788 2009-02-18 Jason Merrill <jason@redhat.com>
790 * cfns.h: Tweak pathname for cfns.gperf.
792 2009-02-13 Jason Merrill <jason@redhat.com>
795 * semantics.c (finish_call_expr): Change koenig_p parm to int.
796 If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
797 * cp-tree.h: Adjust prototype.
798 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
800 2009-02-12 Jason Merrill <jason@redhat.com>
803 * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
805 2009-02-11 Jason Merrill <jason@redhat.com>
808 * decl2.c (cp_write_global_declarations):
809 Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
812 * init.c (build_value_init_noctor): Split out from...
813 (build_value_init): ...here.
814 (expand_aggr_init_1): Handle value-initialization.
815 * cp-tree.h: Add declaration.
816 * class.c (type_has_user_provided_constructor):
817 Handle non-class arguments.
819 2009-02-10 Jason Merrill <jason@redhat.com>
822 * class.c (defaultable_fn_p): Handle ... properly.
825 * tree.c (lvalue_p_1): Condition rvalue ref handling on
826 treat_class_rvalues_as_lvalues, too.
828 2009-02-10 Paolo Carlini <paolo.carlini@oracle.com>
831 * typeck.c (build_x_array_ref): New.
832 * cp-tree.h: Declare it.
833 * pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
835 2009-02-09 Jason Merrill <jason@redhat.com>
838 * semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
839 * init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
840 * tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
841 * cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
842 for build_value_init TARGET_EXPR.
843 * cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
845 2009-02-06 Paolo Carlini <paolo.carlini@oracle.com>
849 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
851 2009-02-04 Jakub Jelinek <jakub@redhat.com>
854 * operators.def: Use COMPONENT_REF code for ->/pt operator again,
855 remove ./dt operator.
856 * mangle.c (write_expression): Handle COMPONENT_REF after handling
857 ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
858 write_string ("dt") instead of using operators.def.
860 2009-02-03 Jason Merrill <jason@redhat.com>
862 * typeck.c (cp_build_unary_op): Only complain about taking address
865 2009-02-03 Jakub Jelinek <jakub@redhat.com>
868 * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
871 * typeck2.c (digest_init_r): Don't call process_init_constructor
874 2009-02-03 Paolo Bonzini <bonzini@gnu.org>
877 * pt.c (convert_nontype_argument_function): Expect expr to be an
881 * typeck.c (merge_types): Call resolve_typename_type if only
882 one type is a typename.
884 2009-02-02 Jason Merrill <jason@redhat.com>
887 * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node
890 2009-02-01 Paolo Carlini <paolo.carlini@oracle.com>
893 * parser.c (cp_parser_pure_specifier): If there are no tokens left
894 do not call cp_lexer_consume_token.
896 2009-01-30 Jakub Jelinek <jakub@redhat.com>
899 * parser.c (cp_parser_already_scoped_statement): Handle __label__
902 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
905 * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
907 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
910 * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
912 2009-01-29 Paolo Carlini <paolo.carlini@oracle.com>
914 * typeck.c (invalid_nonstatic_memfn_p): Use
915 DECL_NONSTATIC_MEMBER_FUNCTION_P.
917 2009-01-27 Paolo Carlini <paolo.carlini@oracle.com>
920 * call.c (build_over_call): If convert_for_arg_passing returns
921 error_mark_node unconditionally return it.
923 2009-01-22 Adam Nemet <anemet@caviumnetworks.com>
925 * class.c (check_field_decls): Also inherit packed for bitfields
926 regardless of their type.
928 2009-01-22 Dodji Seketeli <dodji@redhat.com>
931 * decl2.c (grokfield): Reverting changes of PR c++/26693
932 (save_template_attributes): Likewise.
933 * decl.c (grokdeclarator): Likewise.
934 * name-lookup.c (pushdecl_maybe_friend): Likewise.
935 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
936 (append_type_to_template_for_access_check): Likewise.
937 * semantics.c (check_accessibility_of_qualified_id): Likewise.
938 * pt.c (instantiate_class_template, instantiate_template ): Likewise.
940 (resolve_type_name_type): Likewise.
941 (append_type_to_template_for_access_check): Likewise.
943 2009-01-21 Dodji Seketeli <dodji@redhat.com>
946 * decl2.c (grokfield): when a typedef appears in a
947 class, create the typedef variant type node for it.
948 (save_template_attributes): Creating typedef variant type node
950 * decl.c (grokdeclarator): If the typedef'ed struct/class was
951 anonymous, set the proper type name to all its type variants.
952 * name-lookup.c (pushdecl_maybe_friend): Reuse the
953 set_underlying_type function to install typedef variant types.
954 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
956 (append_type_to_template_for_access_check): New entry points.
957 * semantics.c (check_accessibility_of_qualified_id):
958 When a typedef that is a member of a class appears in a template,
959 add it to the template. It will be ...
960 * pt.c (instantiate_class_template, instantiate_template ): ... access
961 checked at template instantiation time.
962 (tsubst): Handle the case of being called with NULL args.
963 (resolve_type_name_type): The type name should be the name of the
965 (append_type_to_template_for_access_check): New entry point.
967 2009-01-19 Jason Merrill <jason@redhat.com>
970 * parser.c (cp_parser_unqualified_id): In a template,
972 * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
974 2009-01-16 Jason Merrill <jason@redhat.com>
977 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
978 * init.c (build_new): Don't call describable_type unless we
982 * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
985 * search.c (protected_accessible_p): N doesn't vary.
987 2009-01-15 Jason Merrill <jason@redhat.com>
990 * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
991 accept hidden friends.
993 2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
996 * decl.c (grokdeclarator): Check for a non namespace/class context.
998 2009-01-15 Jason Merrill <jason@redhat.com>
1002 * tree.c (lvalue_p_1): Handle BASELINK. A COMPONENT_REF to
1003 a function isn't necessarily an lvalue. Take tree, not const_tree.
1004 (lvalue_p, real_lvalue_p): Take tree, not const_tree.
1005 * typeck.c (lvalue_or_else): Likewise.
1006 * cp-tree.h: Adjust prototypes.
1008 2009-01-15 Steve Ellcey <sje@cup.hp.com>
1011 * pt.c (tsubst): Check for NULL args.
1013 2009-01-15 Dodji Seketeli <dodji@redhat.com>
1016 * name-lookup.c (pushtag): Don't create members to types that are not
1019 2009-01-14 Nick Clifton <nickc@redhat.com>
1022 * parser.c: Pass cp_id_kind computed in
1023 cp_parser_postfix_dot_deref_expression to
1024 cp_parser_primary_expression.
1026 2009-01-13 Jakub Jelinek <jakub@redhat.com>
1029 * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
1030 STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
1033 2009-01-12 Jason Merrill <jason@redhat.com>
1034 Steve Ellcey <sje@cup.hp.com>
1037 * name-lookup.c (lookup_name_real): Keep looking past a hidden
1040 2009-01-12 Dodji Seketeli <dodji@redhat.com>
1043 * pt.c (parameter_of_template_p): New function.
1044 * cp-tree.h: Declare it.
1045 * name-lookup.c (binding_to_template_parms_of_scope_p): New
1047 (outer_binding): Take template parameters in account when looking for
1050 2009-01-12 Jason Merrill <jason@redhat.com>
1053 * tree.c (pod_type_p): Return 1 for structs created by the back end.
1055 2009-01-12 Jakub Jelinek <jakub@redhat.com>
1058 * parser.c (cp_parser_builtin_offsetof): Allow `->' in
1059 offsetof member-designator, handle it as `[0].'.
1062 * decl.c (start_function): If grokdeclarator hasn't returned
1063 FUNCTION_DECL nor error_mark_node, issue diagnostics.
1065 2009-01-11 Jakub Jelinek <jakub@redhat.com>
1068 * cp-gimplify.c (genericize_if_stmt): Renamed from ...
1069 (gimplify_if_stmt): ... this.
1070 (cp_gimplify_expr): Don't handle IF_STMT here.
1071 (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
1073 2009-01-10 Andrew Pinski <pinskia@gmail.com>
1076 * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
1079 * typeck2.c (build_functional_cast): Check for reference type and NULL
1082 2009-01-09 Steve Ellcey <sje@cup.hp.com>
1084 * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
1086 2009-01-09 Jakub Jelinek <jakub@redhat.com>
1089 * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
1091 2009-01-09 John F. Carr <jfc@mit.edu>
1094 * parser.c (cp_parser_class_specifier): Clear
1095 parser->in_unbraced_linkage_specification_p while parsing class
1098 2009-01-07 Jakub Jelinek <jakub@redhat.com>
1101 * semantics.c (finish_goto_stmt): Convert destination to
1104 2009-01-06 Jason Merrill <jason@redhat.com>
1111 * pt.c (check_default_tmpl_args): Don't complain about
1112 out-of-order parameter packs in the enclosing class
1113 or parameter packs after default args.
1114 (coerce_template_parms): If we have more than one
1115 parameter pack, don't flatten argument packs.
1116 (template_args_equal): Handle argument packs.
1117 (comp_template_args): Don't flatten argument packs.
1118 (check_instantiated_arg): Split out from...
1119 (check_instantiated_args): Here. Handle arg packs.
1120 (convert_template_argument): Just check that nontype argument
1121 packs have the right type.
1123 2009-01-05 Dodji Seketeli <dodji@redhat.com>
1126 * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
1128 2009-01-05 Jason Merrill <jason@redhat.com>
1131 * typeck2.c (process_init_constructor_union): Handle union with
1134 * mangle.c (write_expression): Remove mangling for zero-operand
1138 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
1142 * class.c (defaultable_fn_p): Only operator== can be a copy
1143 assignment operator.
1145 2009-01-02 Jason Merrill <jason@redhat.com>
1148 * typeck2.c (process_init_constructor_union): Handle excess
1150 (process_init_constructor_record): Likewise.
1153 * typeck2.c (digest_init_r): Don't use process_init_constructor
1154 for non-aggregate classes.
1157 Copyright (C) 2009 Free Software Foundation, Inc.
1159 Copying and distribution of this file, with or without modification,
1160 are permitted in any medium without royalty provided the copyright
1161 notice and this notice are preserved.