1 2009-05-15 Ian Lance Taylor <iant@google.com>
3 * cp-tree.h (enum cp_lvalue_kind_flags): Rename from
4 cp_lvalue_kind. Change all uses.
5 (enum base_access_flags): Rename from enum base_access. Change
7 * parser.c (enum cp_parser_flags): Remove enum tag.
9 2009-05-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
12 * call.c (build_new_op): Update calls to warn_logical_operator.
14 2009-05-14 Ian Lance Taylor <iant@google.com>
16 * class.c (layout_class_type): Change itk to unsigned int.
17 * decl.c (finish_enum): Change itk to unsigned int.
18 * parser.c (cp_parser_check_decl_spec): Change ds to int. Remove
21 2009-05-13 David Mandelin <dmandelin@mozilla.com>:
23 * decl.c (duplicate_decls): Preserve parameter attributes.
25 2009-05-10 Jan Hubicka <jh@suse.cz>
27 * decl2.c (cxx_callgraph_analyze_expr): Use
28 cgraph_mark_address_taken.
30 2009-05-10 Joseph Myers <joseph@codesourcery.com>
32 * call.c (name_as_c_string): Call type_as_string_translate.
33 Translate identifiers to locale character set.
34 * cp-tree.h (lang_decl_name): Update prototype.
35 (type_as_string_translate, decl_as_string_translate,
36 cxx_printable_name_translate): Declare.
37 * cxx-pretty-print.c (M_): Define.
38 (pp_cxx_unqualified_id, pp_cxx_canonical_template_parameter): Mark
39 English fragments for conditional translation with M_.
40 * decl.c (grokdeclarator): Translate identifiers to locale
41 character set for diagnostics.
42 * error.c (M_): Define.
43 (dump_template_bindings, dump_type, dump_aggr_type,
44 dump_type_prefix, dump_global_iord, dump_simple_decl, dump_decl,
45 dump_function_decl, dump_template_parms, dump_expr,
46 dump_binary_op, op_to_string, assop_to_string): Mark English
47 fragments for conditional translation with M_.
48 (type_as_string): Disable translation of identifiers.
49 (type_as_string_translate): New.
50 (expr_as_string): Disable translation of identifiers.
51 (decl_as_string): Disable translation of identifiers.
52 (decl_as_string_translate): New.
53 (lang_decl_name): Add parameter translate.
54 (args_to_string): Call type_as_string_translate.
55 (cp_print_error_function): Call cxx_printable_name_translate.
56 (print_instantiation_full_context,
57 print_instantiation_partial_context): Call
58 decl_as_string_translate.
59 * parser.c (cp_lexer_get_preprocessor_token): Use %qE for
60 identifier in diagnostic.
61 * tree.c (cxx_printable_name): Change to
62 cxx_printable_name_internal. Add parameter translate.
63 (cxx_printable_name, cxx_printable_name_translate): New wrappers
64 round cxx_printable_name_internal.
66 2009-05-08 H.J. Lu <hongjiu.lu@intel.com>
69 * call.c (build_call_a): Updated warn_deprecated_use call.
70 (build_over_call): Likewise.
71 * decl.c (grokdeclarator): Likewise.
72 (grokparms): Likewise.
73 * semantics.c (finish_id_expression): Likewise.
74 * typeck.c (build_class_member_access_expr): Likewise.
75 (finish_class_member_access_expr): Likewise.
77 2009-05-06 Dodji Seketeli <dodji@redhat.com>
80 * pt.c (tsubst_copy) <case PARM_DECL>: We don't want to tsubst the
81 whole list of PARM_DECLs, just the current one.
83 2009-05-05 Shujing Zhao <pearly.zhao@oracle.com>
86 (opname_tab, assignop_tab, update_member_visibility, yyerror, yyhook,
87 mangle_compound_literal): Remove unused declarations.
88 (build_vfield_ref, cxx_print_statistics, clone_function_decl,
89 adjust_clone_args, maybe_push_cleanup_level, pushtag, make_anon_name,
90 pushdecl_top_level_maybe_friend, pushdecl_top_level_and_finish,
91 check_for_out_of_scope_variable, print_other_binding_stack,
92 maybe_push_decl, cxx_mark_addressable, force_target_expr,
93 build_target_expr_with_type, finish_case_label,
94 cxx_maybe_build_cleanup, begin_eh_spec_block, finish_eh_spec_block,
95 check_template_keyword, cxx_omp_predetermined_sharing,
96 cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor,
97 cxx_omp_clause_assign_op, cxx_omp_clause_dtor, cxx_omp_finish_clause,
98 cxx_omp_privatize_by_reference): Rearrange the declarations line to
99 match the comment that indicates the .c file which the functions are
101 (cxx_print_xnode, cxx_print_decl, cxx_print_type,
102 cxx_print_identifier, cxx_print_error_function, pushdecl): Add comment.
104 2009-05-05 Nathan Sidwell <nathan@codesourcery.com>
106 * typeck.c (cp_build_compound_expr): Require RHS to have a known
108 * class.c (resolve_address_of_overloaded_function): Use
109 OVL_CURRENT for error message.
110 (instantiate_type): Forbid COMPOUND_EXPRs and remove code dealing
111 with them. Do not copy the node.
113 2009-05-05 Jakub Jelinek <jakub@redhat.com>
116 * pt.c (tsubst): If magic NOP_EXPR with side-effects has no type,
117 set it from its operand's type after tsubst_expr.
119 2009-05-04 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
122 * parser.c (cp_lexer_get_preprocessor_token): Do not store the
123 canonical spelling for keywords.
124 (cp_parser_attribute_list): Use the canonical spelling for
125 keywords in attributes.
127 2009-05-01 Joseph Myers <joseph@codesourcery.com>
129 * cxx-pretty-print.c (is_destructor_name, pp_cxx_unqualified_id,
130 pp_cxx_template_keyword_if_needed, pp_cxx_postfix_expression,
131 pp_cxx_new_expression, pp_cxx_delete_expression,
132 pp_cxx_unary_expression, pp_cxx_assignment_operator,
133 pp_cxx_assignment_expression, pp_cxx_expression,
134 pp_cxx_function_specifier, pp_cxx_decl_specifier_seq,
135 pp_cxx_simple_type_specifier, pp_cxx_type_specifier_seq,
136 pp_cxx_exception_specification, pp_cxx_direct_declarator,
137 pp_cxx_ctor_initializer, pp_cxx_type_id, pp_cxx_statement,
138 pp_cxx_namespace_alias_definition, pp_cxx_template_parameter,
139 pp_cxx_canonical_template_parameter, pp_cxx_template_declaration,
140 pp_cxx_declaration, pp_cxx_typeid_expression,
141 pp_cxx_va_arg_expression, pp_cxx_offsetof_expression,
142 pp_cxx_trait_expression): Mostly use pp_string and
143 pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
144 for non-identifiers. Mark English strings for translation.
145 * cxx-pretty-print.h (pp_cxx_ws_string): Define.
146 * error.c (dump_template_parameter, dump_template_bindings,
147 dump_type, dump_aggr_type, dump_type_prefix, dump_simple_decl,
148 dump_decl, dump_template_decl, dump_function_decl,
149 dump_parameters, dump_exception_spec, dump_template_parms,
150 dump_expr, dump_binary_op, dump_unary_op, op_to_string,
151 assop_to_string, args_to_string, cp_print_error_function,
152 print_instantiation_full_context,
153 print_instantiation_partial_context): Mostly use pp_string and
154 pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
155 for non-identifiers. Mark English strings for translation.
156 (dump_global_iord): Mark strings for translation; use longer
157 strings instead of substituting single words.
158 (function_category): Return a format string marked for
159 translation, not a single word or phrase to substitute in a longer
162 2009-04-28 Ben Elliston <bje@au.ibm.com>
167 2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
169 * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
171 2009-04-27 Ian Lance Taylor <iant@google.com>
173 * semantics.c (finish_omp_clauses): Change type of c_kind to enum
176 2009-04-27 Jakub Jelinek <jakub@redhat.com>
179 * cvt.c (convert_to_void) <case INDIRECT_REF>: Only warn about
180 -Wunused-value if implicit.
182 2009-04-24 Ian Lance Taylor <iant@google.com>
184 * call.c (build_temp): Change 0 to enum constant.
185 * cp-tree.h (cp_lvalue_kind): Typedef to int rather than enum
187 * cp-gimplify.c (cp_gimplify_expr): Add cast to enum type.
188 * decl2.c (constrain_visibility): Likewise.
189 * parser.c (cp_lexer_get_preprocessor_token): Likewise.
190 (cp_parser_flags): Typedef to int rather than enum type.
191 (cp_parser_expression_stack_entry): Change prec field to enum
194 * typeck.c (build_modify_expr): Add lhs_origtype parameter.
197 2009-04-22 Dodji Seketeli <dodji@redhat.com>
200 * parser.c (cp_parser_template_argument_list): Display an error
201 when an ellipsis is not preceded by a parameter pack. Also, warn
202 about variadic templates usage without -std=c++0x.
204 2009-04-21 Taras Glek <tglek@mozilla.com>
206 * cp-tree.h: Update GTY annotations to new syntax.
208 * mangle.c: Likewise.
209 * name-lookup.c: Likewise.
210 * name-lookup.h: Likewise.
211 * parser.c: Likewise.
214 * semantics.c: Likewise.
215 * typeck2.c: Likewise.
217 2009-04-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
220 * parser.c (cp_parser_error): Pass token->flags to c_parse_error.
222 2009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
225 * typeck.c (check_for_casting_away_constness): We diagnose casting
226 away any qualifiers not just constness.
227 (casts_away_constness): Mention that it handles more than just
230 2009-04-21 Joseph Myers <joseph@codesourcery.com>
232 * ChangeLog, ChangeLog-1993, ChangeLog-1994, ChangeLog-1995,
233 ChangeLog-1996, ChangeLog-1997, ChangeLog-1998, ChangeLog-1999,
234 ChangeLog-2000, ChangeLog-2001, ChangeLog-2002, ChangeLog-2003,
235 ChangeLog-2004, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007,
236 ChangeLog-2008, ChangeLog.ptr, ChangeLog.tree-ssa, NEWS,
237 cfns.gperf: Add copyright and license notices.
238 * cfns.h: Regenerate.
239 * ChangeLog, ChangeLog-2004: Correct dates.
241 2009-04-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
244 * tree.c (lvalue_p_1): Use const_tree.
245 Use CONST_CAST_TREE to avoid warning.
246 (lvalue_p): Returns bool, receives const_tree.
248 2009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
251 * parser.c (cp_parser_check_decl_spec): Drop redundant flags.
252 * error.c (pedwarn_cxx98): New.
253 * cp-tree.h (pedwarn_cxx98): Declare.
255 2009-04-20 Le-Chun Wu <lcwu@google.com>
258 * init.c (build_vec_init): Set TREE_NO_WARNING on the
259 compiler-generated INDIRECT_REF expression.
261 2009-04-20 Ian Lance Taylor <iant@google.com>
263 * typeck.c (build_function_call_vec): New function.
264 (cp_build_function_call): Only pass first parameter to
265 objc_rewrite_function_call.
266 (build_modify_expr): Add rhs_origtype parameter. Change all
268 * decl.c (finish_decl): Add origtype parameter. Change all
270 * semantics.c (finish_call_expr): Pass VEC to
271 resolve_overloaded_builtin.
273 2009-04-20 Ian Lance Taylor <iant@google.com>
275 * cp-tree.h (base_access): Change typedef to int.
276 * parser.c (cp_parser_omp_flush): Change 0 to OMP_CLAUSE_ERROR.
277 (cp_parser_omp_threadprivate): Likewise.
278 * pt.c (unify_pack_expansion): Add casts to enum type.
280 2009-04-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
284 * call.c (build_new_op): Save the original codes of operands
287 2009-04-18 Kazu Hirata <kazu@codesourcery.com>
289 * cp-tree.h: Remove the prototype for insert_block.
290 * decl.c (insert_block): Remove.
292 2009-04-16 Ian Lance Taylor <iant@google.com>
294 * cp-tree.h (enum tsubst_flags): Rename from enum tsubst_flags_t.
295 (tsubst_flags_t): Change typedef from enum type to int.
297 2009-04-16 Paolo Bonzini <bonzini@gnu.org>
299 * decl.c (check_initializer): Use TYPE_VECTOR_OPAQUE
300 instead of targetm.vector_opaque_p.
302 2009-04-15 Le-Chun Wu <lcwu@google.com>
305 * call.c (build_over_call): Set TREE_NO_WARNING on the
306 compiler-generated INDIRECT_REF expression.
307 * cvt.c (convert_to_void): Emit warning when stripping off
310 2009-04-14 Diego Novillo <dnovillo@google.com>
312 * parser.c (cp_parser_type_specifier_seq): Move call to
313 invoke_plugin_callbacks ...
314 (cp_parser_type_specifier_seq): ... here.
316 2009-04-14 Le-Chun Wu <lcwu@google.com>
318 * Make-lang.in: Modify dependencies of files including plugin.h.
319 * decl.c (finish_function): Call invoke_plugin_callbacks.
320 * parser.c (cp_parser_type_specifier): Call invoke_plugin_callbacks.
322 2009-04-14 Jason Merrill <jason@redhat.com>
325 * name-lookup.c (pushdecl_maybe_friend): Avoid all warnings
326 about shadowing by tentative parms.
328 2009-04-13 Jason Merrill <jason@redhat.com>
331 * call.c (build_over_call): Don't call memcpy if the target is
332 the same as the source.
334 2009-04-13 Jason Merrill <jason@redhat.com>
337 * pt.c (uses_template_parms): Handle CONSTRUCTOR.
339 2009-04-12 Jason Merrill <jason@redhat.com>
342 * call.c (joust): Don't crash on variadic fn.
344 2009-04-10 Jason Merrill <jason@redhat.com>
347 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Return
348 if we see a close brace without an open brace.
350 2009-04-10 H.J. Lu <hongjiu.lu@intel.com>
352 * parser.c (cp_parser_class_specifier): Remove the unused
353 has_trailing_semicolon.
355 2009-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
358 * parser.c (cp_parser_check_template_parameters): Take a
359 cp_declarator parameter.
360 (cp_parser_elaborated_type_specifier): Update to
361 cp_parser_check_template_parameters.
362 (cp_parser_class_head): Likewise.
363 (cp_parser_check_declarator_template_parameters): Likewise.
364 (cp_parser_check_template_parameters): Handle first the non-error
365 conditions. Give more accurate diagnostics if a declarator is
368 2009-04-08 Jason Merrill <jason@redhat.com>
371 * error.c (dump_aggr_type): Chase template typedefs if
372 -fno-pretty-templates.
374 2009-04-08 Dodji Seketeli <dodji@redhat.com>
377 * parser.c (cp_parser_enumerator_definition): Make sure the
378 initializer of the enumerator doesn't contain any bare parameter pack.
380 2009-04-07 Jason Merrill <jason@redhat.com>
383 * name-lookup.c (merge_functions): Keep multiple extern "C" functions.
384 * call.c (joust): Complain about mismatched default arguments
385 in extern "C" functions.
386 * class.c (resolve_address_of_overloaded_function): Handle multiple
387 extern "C" functions.
388 * pt.c (resolve_overloaded_unification): Likewise.
390 2009-04-07 Jason Merrill <jason@redhat.com>
393 * error.c (dump_function_decl): Don't pretty-print templates
394 if -fno-pretty-templates.
395 (count_non_default_template_args): Print all args if
396 -fno-pretty-templates.
398 2009-04-06 Jason Merrill <jason@redhat.com>
401 * pt.c (fn_type_unification): For DEDUCE_EXACT check that
402 the deduced template arguments give us the parameter types
405 2009-04-05 Giovanni Bajo <giovannibajo@libero.it>
406 Jason Merrill <jason@redhat.com>
409 * error.c (count_non_default_template_args): New fn.
410 (dump_template_parms): Call it.
411 (dump_template_argument_list): Call it. Add parms parm.
412 (dump_template_argument): Adjust call to dump_template_argument_list.
413 (dump_type, dump_decl): Likewise.
414 (dump_template_bindings): Refactor logic.
416 2009-04-03 Jason Merrill <jason@redhat.com>
419 * error.c (dump_template_bindings): Look through typedefs in
421 (dump_type) [TYPENAME_TYPE]: Print the typedef name if any.
422 (find_typenames_r): Also collect typedefs.
423 * pt.c (unify): Strip typedefs.
426 * semantics.c (finish_id_expression): Don't assume a dependent
427 member of the current instantiation isn't a valid integral
428 constant expression. Check dependent_scope_p.
429 * pt.c (dependent_scope_p): Check TYPE_P.
430 (tsubst_copy): If args is null, just return.
432 2009-04-02 Jason Merrill <jason@redhat.com>
435 * error.c (find_typenames, find_typenames_r): New fns.
436 (dump_function_decl): Call find_typenames.
437 (dump_template_bindings): Print typenames as well.
438 * pt.c (tsubst): Non-static.
439 * cp-tree.h: Declare it.
441 2009-04-02 Dodji Seketeli <dodji@redhat.com>
444 * decl2.c (grokfield): when a typedef appears in a
445 class, create the typedef variant type node for it.
446 (save_template_attributes): Creating typedef variant type node
448 * decl.c (grokdeclarator): If the typedef'ed struct/class was
449 anonymous, set the proper type name to all its type variants.
450 (xref_basetypes) : Fixup the variant types after setting
452 * name-lookup.c (pushdecl_maybe_friend): Reuse the
453 set_underlying_type function to install typedef variant types.
454 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
456 (append_type_to_template_for_access_check): New entry points.
457 * semantics.c (check_accessibility_of_qualified_id):
458 When a typedef that is a member of a class appears in a template,
459 add it to the template. It will be ...
460 * class.c (finish_struct_bits): Split type variant fixup into ...
461 (fixup_type_variants): A new entry point.
462 * pt.c (instantiate_class_template, instantiate_template ): ... access
463 checked at template instantiation time.
464 (resolve_type_name_type): The type name should be the name of the
466 (retrieve_specialization): Specializations of template typedefs aren't
467 to looked up in DECL_TEMPLATE_INSTANTIATIONS (tmpl).
468 (append_type_to_template_for_access_check): New entry point.
469 (tsubst_decl): For typedefs, build the variant type from the correct
471 (get_class_bindings): Fix function comment.
472 (perform_typedefs_access_check): New entry point.
474 2009-03-31 Jason Merrill <jason@redhat.com>
477 * name-lookup.c (pushdecl_maybe_friend): Diagnose mismatched
478 extern "C" declarations.
481 * semantics.c (finish_non_static_data_member): Allow such references
482 without an associated object in sizeof/decltype/alignof.
484 * ptree.c (cxx_print_decl): Pretty-print full name of
486 (cxx_print_type): Pretty-print full name of class.
488 * decl.c (grokdeclarator): Reject pointer to qualified function
491 PR c++/37806, core issue 547
492 * typeck.c (cp_apply_type_quals_to_decl): Don't apply any quals
494 * tree.c (cp_build_qualified_type_real): Don't apply restrict to a
496 * decl.h (enum decl_context): Add TEMPLATE_TYPE_ARG.
497 * decl.c (groktypename): Add is_template_arg parameter.
498 (grokdeclarator): Allow function cv-quals on a template type arg.
499 * parser.c (cp_parser_new_type_id, cp_parser_type_id): Add
500 is_template_arg argument in calls to groktypename.
501 * cp-tree.h: Adjust prototype.
502 * error.c (dump_type_prefix, dump_type_suffix): Fix plain
503 FUNCTION_TYPE printing.
505 * mangle.c (write_expression): Mangle dependent name as
508 PR c++/38030, 38850, 39070
509 * pt.c (type_dependent_expression_p_push): New fn.
510 (tsubst_copy_and_build) [CALL_EXPR]: Only do arg-dep lookup when the
511 substitution makes the call non-dependent. Preserve koenig_p.
512 * parser.c (cp_parser_postfix_expression): Only do arg-dep lookup
513 for non-dependent calls.
514 * semantics.c (finish_call_expr): Revert earlier changes.
515 * cp-tree.h: Revert change to finish_call_expr prototype.
517 2009-03-29 Joseph Myers <joseph@codesourcery.com>
519 PR preprocessor/34695
520 * cp-tree.h (cp_cpp_error): Remove.
521 * error.c (cp_cpp_error): Remove.
522 * parser.c (cp_lexer_new_main): Set done_lexing instead of
523 client_diagnostic and error callback.
525 2009-03-28 Paolo Bonzini <bonzini@gnu.org>
527 * cp/cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
528 * cp/cp-objcp-common.c (cxx_staticp): Remove.
529 * cp/cp-tree.h (cxx_staticp): Remove.
531 2009-03-28 Jakub Jelinek <jakub@redhat.com>
534 * parser.c (cp_parser_postfix_expression): Don't call
535 warning_if_disallowed_function_p.
537 2009-03-27 Jan Hubicka <jh@suse.cz>
539 * except.c (choose_personality_routine): Set terminate_node to abort
542 2009-03-27 Dodji Seketeli <dodji@redhat.com>
543 Jakub Jelinek <jakub@redhat.com>
546 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P): Define.
547 (cp_function_decl_explicit_p): New prototype.
548 * cp-objcp-common.c (cp_function_decl_explicit_p): New function.
550 2009-03-27 Andrew Pinski <andrew_pinski@playstation.sony.com>
553 * parser.c (cp_parser_elaborated_type_specifier): If we have a
554 typename tag and don't have either a TYPE_DECL or a
555 TEMPLATE_ID_EXPR, set the type to NULL.
557 2009-03-27 Simon Martin <simartin@users.sourceforge.net>
560 * decl.c (grokdeclarator): Reject [con|de]stuctors in a non-class
563 2009-03-27 Simon Martin <simartin@users.sourceforge.net>
566 * decl.c (check_array_designated_initializer): Handle error_mark_node.
568 2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
571 * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
573 2009-03-26 Andrew Haley <aph@redhat.com>
576 * decl2.c (possibly_inlined_p): If java exceptions are in use
577 don't inline a decl unless it is explicitly marked inline.
578 * lex.c: (pragma_java_exceptions): New variable.
579 (handle_pragma_java_exceptions): Set pragma_java_exceptions.
580 * cp-tree.h (pragma_java_exceptions): Declare new variable.
582 2009-03-24 Jason Merrill <jason@redhat.com>
585 * name-lookup.c (pushdecl_maybe_friend): Check default args later.
587 2009-03-23 Jakub Jelinek <jakub@redhat.com>
590 * semantics.c (handle_omp_for_class_iterator): Swap cond operands and
591 code if iter is the second operand.
592 * parser.c (cp_parser_binary_expression): Add no_toplevel_fold_p
593 argument. If it is set, don't build the toplevel expression with
594 build_x_binary_op, but build2.
595 (cp_parser_assignment_expression, cp_parser_omp_for_incr): Adjust
597 (cp_parser_omp_for_cond): Don't assume the first operand of the
598 comparison must be decl.
600 2009-03-23 Jason Merrill <jason@redhat.com>
603 * pt.c (make_fnparm_pack): Split out from...
604 (instantiate_decl): ...here.
605 (tsubst_pack_expansion): Handle being called in a late-specified
609 * name-lookup.c (pushdecl_maybe_friend): Don't warn about shadowing
612 2009-03-20 Jason Merrill <jason@redhat.com>
615 * parser.c (cp_parser_direct_declarator): In a template, wrap
616 non-constant expression in NOP_EXPR with TREE_SIDE_EFFECTS set.
617 * pt.c (tsubst): Preserve it in a partial instantiation.
618 (dependent_type_p_r): Don't check value_dependent_expression_p.
619 * decl.c (compute_array_index_type): Don't check
620 value_dependent_expression_p if TREE_SIDE_EFFECTS.
623 * typeck2.c (check_narrowing): Don't complain about loss of
624 precision when converting a floating-point constant.
626 2009-03-19 Jakub Jelinek <jakub@redhat.com>
629 * parser.c (cp_parser_omp_for_cond): Don't check lhs if decl is NULL.
630 (cp_parser_omp_for_loop): Always use cp_parser_omp_for_cond.
632 2009-03-18 Jakub Jelinek <jakub@redhat.com>
634 * parser.c (struct cp_token): Reorder fields for 64-bit hosts.
637 2009-03-18 H.J. Lu <hongjiu.lu@intel.com>
640 * parser.c (cp_parser_explicit_specialization): Don't skip the
641 rest of the specialization when begin_specialization returns
644 2009-03-17 Jason Merrill <jason@redhat.com>
646 * decl.c (grokfndecl): Set DECL_CONTEXT on parms.
647 (duplicate_decls): Adjust DECL_CONTEXT of newdecl's parms.
648 * pt.c (check_explicit_specialization): Likewise.
649 (tsubst_copy) [PARM_DECL]: Return a dummy parm if we don't have a
650 local specialization.
651 * tree.c (cp_tree_equal) [PARM_DECL]: Check type and index, not name.
652 * decl2.c (parm_index): New fn.
653 * semantics.c (finish_decltype_type): Don't use describable_type.
654 * mangle.c (write_expression): Likewise. Mangle ALIGNOF_EXPR.
655 Give a sorry for unsupported codes rather than crash. Mangle
656 conversions with other than 1 operand. New mangling for PARM_DECL.
657 * operators.def (ALIGNOF_EXPR): Mangle as "az".
659 2009-03-17 Jing Yu <jingyu@google.com>
662 * method.c (use_thunk): Change is_thunk from crtl to cfun.
664 2009-03-17 Paolo Carlini <paolo.carlini@oracle.com>
667 * semantics.c (check_trait_type): New.
668 (finish_trait_expr): Use it.
670 2009-03-17 Jakub Jelinek <jakub@redhat.com>
672 * name-lookup.c (cp_emit_debug_info_for_using): Emit USING_STMTs
673 instead of calling imported_module_or_decl debug hook if
674 building_stmt_tree ().
675 * cp-gimplify.c (cp_gimplify_expr): Don't assert the first operand
679 * name-lookup.c (do_namespace_alias): Don't call global_decl debug
680 hook at function scope.
683 * cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
686 2009-03-09 Jakub Jelinek <jakub@redhat.com>
689 * semantics.c (finish_switch_cond): Don't call get_unwidened.
690 * decl.c (finish_case_label): Pass SWITCH_STMT_TYPE as 3rd argument
691 instead of TREE_TYPE (cond).
693 2009-03-08 H.J. Lu <hongjiu.lu@intel.com>
696 * parser.c (cp_parser_late_parsing_default_args): Continue
697 the loop when cp_parser_assignment_expression returns
700 2009-03-07 Jason Merrill <jason@redhat.com>
703 * init.c (build_new_1): Don't use a VLA type.
704 (build_vec_init): Handle getting a pointer for BASE.
706 2009-03-06 H.J. Lu <hongjiu.lu@intel.com>
709 * cp-tree.h: Check NO_DOT_IN_LABEL before NO_DOLLAR_IN_LABEL
710 when mangling symbols.
712 2009-03-06 Paolo Carlini <paolo.carlini@oracle.com>
715 * error.c (dump_expr): Don't try to print THROW_EXPRs in full.
717 2009-03-06 Alexandre Oliva <aoliva@redhat.com>
719 * decl.c (record_builtin_java_type): Use canonicalized integer
722 2009-03-04 Jason Merrill <jason@redhat.com>
725 * class.c (is_really_empty_class): New fn.
726 * cp-tree.h: Declare it.
727 * cp-objcp-common.c (cp_expr_size): Use it.
730 * semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
731 * parser.c (cp_parser_postfix_expression): Call it for
733 * tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
734 (get_first_fn): Likewise.
740 * decl.c (make_typename_type): Do look inside currently open classes.
741 * parser.c (cp_parser_lookup_name): Likewise.
742 (cp_parser_template_name): Likewise.
743 * pt.c (dependent_scope_p): New function.
744 * cp-tree.h: Declare it.
745 * class.c (currently_open_class): Return fast if T isn't a class.
747 2009-02-26 H.J. Lu <hongjiu.lu@intel.com>
750 * parser.c (cp_parser_mem_initializer): Return error_mark_node
751 if cp_parser_mem_initializer_id returns error_mark_node.
753 2009-02-24 Richard Guenther <rguenther@suse.de>
756 * pt.c (instantiate_decl): Do not instantiate extern, non-inline
759 2009-02-23 H.J. Lu <hongjiu.lu@intel.com>
762 * pt.c (coerce_template_template_parms): Return 0 if parameter
765 2009-02-23 Jason Merrill <jason@redhat.com>
767 * pt.c (unify): Call maybe_adjust_types_for_deduction when
768 deducing from an initializer list.
770 2009-02-20 Jason Merrill <jason@redhat.com>
773 * decl.c (grokdeclarator): Handle ~identifier.
775 2009-02-19 Jakub Jelinek <jakub@redhat.com>
778 * decl2.c (determine_visibility): If visibility changed and
779 DECL_RTL has been already set, call make_decl_rtl to update symbol
782 2009-02-19 H.J. Lu <hongjiu.lu@intel.com>
785 * cp-tree.h (maybe_commonize_var): New.
787 * decl.c (maybe_commonize_var): Make it extern.
789 * decl2.c (finish_anon_union): Call maybe_commonize_var.
791 2009-02-18 H.J. Lu <hongjiu.lu@intel.com>
794 * parser.c (cp_parser_enum_specifier): Apply all attributes.
796 2009-02-18 Jason Merrill <jason@redhat.com>
798 * cfns.h: Tweak pathname for cfns.gperf.
800 2009-02-13 Jason Merrill <jason@redhat.com>
803 * semantics.c (finish_call_expr): Change koenig_p parm to int.
804 If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
805 * cp-tree.h: Adjust prototype.
806 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
808 2009-02-12 Jason Merrill <jason@redhat.com>
811 * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
813 2009-02-11 Jason Merrill <jason@redhat.com>
816 * decl2.c (cp_write_global_declarations):
817 Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
820 * init.c (build_value_init_noctor): Split out from...
821 (build_value_init): ...here.
822 (expand_aggr_init_1): Handle value-initialization.
823 * cp-tree.h: Add declaration.
824 * class.c (type_has_user_provided_constructor):
825 Handle non-class arguments.
827 2009-02-10 Jason Merrill <jason@redhat.com>
830 * class.c (defaultable_fn_p): Handle ... properly.
833 * tree.c (lvalue_p_1): Condition rvalue ref handling on
834 treat_class_rvalues_as_lvalues, too.
836 2009-02-10 Paolo Carlini <paolo.carlini@oracle.com>
839 * typeck.c (build_x_array_ref): New.
840 * cp-tree.h: Declare it.
841 * pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
843 2009-02-09 Jason Merrill <jason@redhat.com>
846 * semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
847 * init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
848 * tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
849 * cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
850 for build_value_init TARGET_EXPR.
851 * cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
853 2009-02-06 Paolo Carlini <paolo.carlini@oracle.com>
857 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
859 2009-02-04 Jakub Jelinek <jakub@redhat.com>
862 * operators.def: Use COMPONENT_REF code for ->/pt operator again,
863 remove ./dt operator.
864 * mangle.c (write_expression): Handle COMPONENT_REF after handling
865 ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
866 write_string ("dt") instead of using operators.def.
868 2009-02-03 Jason Merrill <jason@redhat.com>
870 * typeck.c (cp_build_unary_op): Only complain about taking address
873 2009-02-03 Jakub Jelinek <jakub@redhat.com>
876 * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
879 * typeck2.c (digest_init_r): Don't call process_init_constructor
882 2009-02-03 Paolo Bonzini <bonzini@gnu.org>
885 * pt.c (convert_nontype_argument_function): Expect expr to be an
889 * typeck.c (merge_types): Call resolve_typename_type if only
890 one type is a typename.
892 2009-02-02 Jason Merrill <jason@redhat.com>
895 * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node
898 2009-02-01 Paolo Carlini <paolo.carlini@oracle.com>
901 * parser.c (cp_parser_pure_specifier): If there are no tokens left
902 do not call cp_lexer_consume_token.
904 2009-01-30 Jakub Jelinek <jakub@redhat.com>
907 * parser.c (cp_parser_already_scoped_statement): Handle __label__
910 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
913 * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
915 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
918 * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
920 2009-01-29 Paolo Carlini <paolo.carlini@oracle.com>
922 * typeck.c (invalid_nonstatic_memfn_p): Use
923 DECL_NONSTATIC_MEMBER_FUNCTION_P.
925 2009-01-27 Paolo Carlini <paolo.carlini@oracle.com>
928 * call.c (build_over_call): If convert_for_arg_passing returns
929 error_mark_node unconditionally return it.
931 2009-01-22 Adam Nemet <anemet@caviumnetworks.com>
933 * class.c (check_field_decls): Also inherit packed for bitfields
934 regardless of their type.
936 2009-01-22 Dodji Seketeli <dodji@redhat.com>
939 * decl2.c (grokfield): Reverting changes of PR c++/26693
940 (save_template_attributes): Likewise.
941 * decl.c (grokdeclarator): Likewise.
942 * name-lookup.c (pushdecl_maybe_friend): Likewise.
943 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
944 (append_type_to_template_for_access_check): Likewise.
945 * semantics.c (check_accessibility_of_qualified_id): Likewise.
946 * pt.c (instantiate_class_template, instantiate_template ): Likewise.
948 (resolve_type_name_type): Likewise.
949 (append_type_to_template_for_access_check): Likewise.
951 2009-01-21 Dodji Seketeli <dodji@redhat.com>
954 * decl2.c (grokfield): when a typedef appears in a
955 class, create the typedef variant type node for it.
956 (save_template_attributes): Creating typedef variant type node
958 * decl.c (grokdeclarator): If the typedef'ed struct/class was
959 anonymous, set the proper type name to all its type variants.
960 * name-lookup.c (pushdecl_maybe_friend): Reuse the
961 set_underlying_type function to install typedef variant types.
962 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
964 (append_type_to_template_for_access_check): New entry points.
965 * semantics.c (check_accessibility_of_qualified_id):
966 When a typedef that is a member of a class appears in a template,
967 add it to the template. It will be ...
968 * pt.c (instantiate_class_template, instantiate_template ): ... access
969 checked at template instantiation time.
970 (tsubst): Handle the case of being called with NULL args.
971 (resolve_type_name_type): The type name should be the name of the
973 (append_type_to_template_for_access_check): New entry point.
975 2009-01-19 Jason Merrill <jason@redhat.com>
978 * parser.c (cp_parser_unqualified_id): In a template,
980 * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
982 2009-01-16 Jason Merrill <jason@redhat.com>
985 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
986 * init.c (build_new): Don't call describable_type unless we
990 * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
993 * search.c (protected_accessible_p): N doesn't vary.
995 2009-01-15 Jason Merrill <jason@redhat.com>
998 * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
999 accept hidden friends.
1001 2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1004 * decl.c (grokdeclarator): Check for a non namespace/class context.
1006 2009-01-15 Jason Merrill <jason@redhat.com>
1010 * tree.c (lvalue_p_1): Handle BASELINK. A COMPONENT_REF to
1011 a function isn't necessarily an lvalue. Take tree, not const_tree.
1012 (lvalue_p, real_lvalue_p): Take tree, not const_tree.
1013 * typeck.c (lvalue_or_else): Likewise.
1014 * cp-tree.h: Adjust prototypes.
1016 2009-01-15 Steve Ellcey <sje@cup.hp.com>
1019 * pt.c (tsubst): Check for NULL args.
1021 2009-01-15 Dodji Seketeli <dodji@redhat.com>
1024 * name-lookup.c (pushtag): Don't create members to types that are not
1027 2009-01-14 Nick Clifton <nickc@redhat.com>
1030 * parser.c: Pass cp_id_kind computed in
1031 cp_parser_postfix_dot_deref_expression to
1032 cp_parser_primary_expression.
1034 2009-01-13 Jakub Jelinek <jakub@redhat.com>
1037 * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
1038 STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
1041 2009-01-12 Jason Merrill <jason@redhat.com>
1042 Steve Ellcey <sje@cup.hp.com>
1045 * name-lookup.c (lookup_name_real): Keep looking past a hidden
1048 2009-01-12 Dodji Seketeli <dodji@redhat.com>
1051 * pt.c (parameter_of_template_p): New function.
1052 * cp-tree.h: Declare it.
1053 * name-lookup.c (binding_to_template_parms_of_scope_p): New
1055 (outer_binding): Take template parameters in account when looking for
1058 2009-01-12 Jason Merrill <jason@redhat.com>
1061 * tree.c (pod_type_p): Return 1 for structs created by the back end.
1063 2009-01-12 Jakub Jelinek <jakub@redhat.com>
1066 * parser.c (cp_parser_builtin_offsetof): Allow `->' in
1067 offsetof member-designator, handle it as `[0].'.
1070 * decl.c (start_function): If grokdeclarator hasn't returned
1071 FUNCTION_DECL nor error_mark_node, issue diagnostics.
1073 2009-01-11 Jakub Jelinek <jakub@redhat.com>
1076 * cp-gimplify.c (genericize_if_stmt): Renamed from ...
1077 (gimplify_if_stmt): ... this.
1078 (cp_gimplify_expr): Don't handle IF_STMT here.
1079 (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
1081 2009-01-10 Andrew Pinski <pinskia@gmail.com>
1084 * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
1087 * typeck2.c (build_functional_cast): Check for reference type and NULL
1090 2009-01-09 Steve Ellcey <sje@cup.hp.com>
1092 * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
1094 2009-01-09 Jakub Jelinek <jakub@redhat.com>
1097 * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
1099 2009-01-09 John F. Carr <jfc@mit.edu>
1102 * parser.c (cp_parser_class_specifier): Clear
1103 parser->in_unbraced_linkage_specification_p while parsing class
1106 2009-01-07 Jakub Jelinek <jakub@redhat.com>
1109 * semantics.c (finish_goto_stmt): Convert destination to
1112 2009-01-06 Jason Merrill <jason@redhat.com>
1119 * pt.c (check_default_tmpl_args): Don't complain about
1120 out-of-order parameter packs in the enclosing class
1121 or parameter packs after default args.
1122 (coerce_template_parms): If we have more than one
1123 parameter pack, don't flatten argument packs.
1124 (template_args_equal): Handle argument packs.
1125 (comp_template_args): Don't flatten argument packs.
1126 (check_instantiated_arg): Split out from...
1127 (check_instantiated_args): Here. Handle arg packs.
1128 (convert_template_argument): Just check that nontype argument
1129 packs have the right type.
1131 2009-01-05 Dodji Seketeli <dodji@redhat.com>
1134 * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
1136 2009-01-05 Jason Merrill <jason@redhat.com>
1139 * typeck2.c (process_init_constructor_union): Handle union with
1142 * mangle.c (write_expression): Remove mangling for zero-operand
1146 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
1150 * class.c (defaultable_fn_p): Only operator== can be a copy
1151 assignment operator.
1153 2009-01-02 Jason Merrill <jason@redhat.com>
1156 * typeck2.c (process_init_constructor_union): Handle excess
1158 (process_init_constructor_record): Likewise.
1161 * typeck2.c (digest_init_r): Don't use process_init_constructor
1162 for non-aggregate classes.
1165 Copyright (C) 2009 Free Software Foundation, Inc.
1167 Copying and distribution of this file, with or without modification,
1168 are permitted in any medium without royalty provided the copyright
1169 notice and this notice are preserved.