1 2009-05-17 Joseph Myers <joseph@codesourcery.com>
3 * tree.c (cxx_printable_name_internal): Allow consecutive
4 translated and untranslated cached copies of the name of the
7 2009-05-15 Ian Lance Taylor <iant@google.com>
9 * cp-tree.h (enum cp_lvalue_kind_flags): Rename from
10 cp_lvalue_kind. Change all uses.
11 (enum base_access_flags): Rename from enum base_access. Change
13 * parser.c (enum cp_parser_flags): Remove enum tag.
15 2009-05-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
18 * call.c (build_new_op): Update calls to warn_logical_operator.
20 2009-05-14 Ian Lance Taylor <iant@google.com>
22 * class.c (layout_class_type): Change itk to unsigned int.
23 * decl.c (finish_enum): Change itk to unsigned int.
24 * parser.c (cp_parser_check_decl_spec): Change ds to int. Remove
27 2009-05-13 David Mandelin <dmandelin@mozilla.com>:
29 * decl.c (duplicate_decls): Preserve parameter attributes.
31 2009-05-10 Jan Hubicka <jh@suse.cz>
33 * decl2.c (cxx_callgraph_analyze_expr): Use
34 cgraph_mark_address_taken.
36 2009-05-10 Joseph Myers <joseph@codesourcery.com>
38 * call.c (name_as_c_string): Call type_as_string_translate.
39 Translate identifiers to locale character set.
40 * cp-tree.h (lang_decl_name): Update prototype.
41 (type_as_string_translate, decl_as_string_translate,
42 cxx_printable_name_translate): Declare.
43 * cxx-pretty-print.c (M_): Define.
44 (pp_cxx_unqualified_id, pp_cxx_canonical_template_parameter): Mark
45 English fragments for conditional translation with M_.
46 * decl.c (grokdeclarator): Translate identifiers to locale
47 character set for diagnostics.
48 * error.c (M_): Define.
49 (dump_template_bindings, dump_type, dump_aggr_type,
50 dump_type_prefix, dump_global_iord, dump_simple_decl, dump_decl,
51 dump_function_decl, dump_template_parms, dump_expr,
52 dump_binary_op, op_to_string, assop_to_string): Mark English
53 fragments for conditional translation with M_.
54 (type_as_string): Disable translation of identifiers.
55 (type_as_string_translate): New.
56 (expr_as_string): Disable translation of identifiers.
57 (decl_as_string): Disable translation of identifiers.
58 (decl_as_string_translate): New.
59 (lang_decl_name): Add parameter translate.
60 (args_to_string): Call type_as_string_translate.
61 (cp_print_error_function): Call cxx_printable_name_translate.
62 (print_instantiation_full_context,
63 print_instantiation_partial_context): Call
64 decl_as_string_translate.
65 * parser.c (cp_lexer_get_preprocessor_token): Use %qE for
66 identifier in diagnostic.
67 * tree.c (cxx_printable_name): Change to
68 cxx_printable_name_internal. Add parameter translate.
69 (cxx_printable_name, cxx_printable_name_translate): New wrappers
70 round cxx_printable_name_internal.
72 2009-05-08 H.J. Lu <hongjiu.lu@intel.com>
75 * call.c (build_call_a): Updated warn_deprecated_use call.
76 (build_over_call): Likewise.
77 * decl.c (grokdeclarator): Likewise.
78 (grokparms): Likewise.
79 * semantics.c (finish_id_expression): Likewise.
80 * typeck.c (build_class_member_access_expr): Likewise.
81 (finish_class_member_access_expr): Likewise.
83 2009-05-06 Dodji Seketeli <dodji@redhat.com>
86 * pt.c (tsubst_copy) <case PARM_DECL>: We don't want to tsubst the
87 whole list of PARM_DECLs, just the current one.
89 2009-05-05 Shujing Zhao <pearly.zhao@oracle.com>
92 (opname_tab, assignop_tab, update_member_visibility, yyerror, yyhook,
93 mangle_compound_literal): Remove unused declarations.
94 (build_vfield_ref, cxx_print_statistics, clone_function_decl,
95 adjust_clone_args, maybe_push_cleanup_level, pushtag, make_anon_name,
96 pushdecl_top_level_maybe_friend, pushdecl_top_level_and_finish,
97 check_for_out_of_scope_variable, print_other_binding_stack,
98 maybe_push_decl, cxx_mark_addressable, force_target_expr,
99 build_target_expr_with_type, finish_case_label,
100 cxx_maybe_build_cleanup, begin_eh_spec_block, finish_eh_spec_block,
101 check_template_keyword, cxx_omp_predetermined_sharing,
102 cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor,
103 cxx_omp_clause_assign_op, cxx_omp_clause_dtor, cxx_omp_finish_clause,
104 cxx_omp_privatize_by_reference): Rearrange the declarations line to
105 match the comment that indicates the .c file which the functions are
107 (cxx_print_xnode, cxx_print_decl, cxx_print_type,
108 cxx_print_identifier, cxx_print_error_function, pushdecl): Add comment.
110 2009-05-05 Nathan Sidwell <nathan@codesourcery.com>
112 * typeck.c (cp_build_compound_expr): Require RHS to have a known
114 * class.c (resolve_address_of_overloaded_function): Use
115 OVL_CURRENT for error message.
116 (instantiate_type): Forbid COMPOUND_EXPRs and remove code dealing
117 with them. Do not copy the node.
119 2009-05-05 Jakub Jelinek <jakub@redhat.com>
122 * pt.c (tsubst): If magic NOP_EXPR with side-effects has no type,
123 set it from its operand's type after tsubst_expr.
125 2009-05-04 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
128 * parser.c (cp_lexer_get_preprocessor_token): Do not store the
129 canonical spelling for keywords.
130 (cp_parser_attribute_list): Use the canonical spelling for
131 keywords in attributes.
133 2009-05-01 Joseph Myers <joseph@codesourcery.com>
135 * cxx-pretty-print.c (is_destructor_name, pp_cxx_unqualified_id,
136 pp_cxx_template_keyword_if_needed, pp_cxx_postfix_expression,
137 pp_cxx_new_expression, pp_cxx_delete_expression,
138 pp_cxx_unary_expression, pp_cxx_assignment_operator,
139 pp_cxx_assignment_expression, pp_cxx_expression,
140 pp_cxx_function_specifier, pp_cxx_decl_specifier_seq,
141 pp_cxx_simple_type_specifier, pp_cxx_type_specifier_seq,
142 pp_cxx_exception_specification, pp_cxx_direct_declarator,
143 pp_cxx_ctor_initializer, pp_cxx_type_id, pp_cxx_statement,
144 pp_cxx_namespace_alias_definition, pp_cxx_template_parameter,
145 pp_cxx_canonical_template_parameter, pp_cxx_template_declaration,
146 pp_cxx_declaration, pp_cxx_typeid_expression,
147 pp_cxx_va_arg_expression, pp_cxx_offsetof_expression,
148 pp_cxx_trait_expression): Mostly use pp_string and
149 pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
150 for non-identifiers. Mark English strings for translation.
151 * cxx-pretty-print.h (pp_cxx_ws_string): Define.
152 * error.c (dump_template_parameter, dump_template_bindings,
153 dump_type, dump_aggr_type, dump_type_prefix, dump_simple_decl,
154 dump_decl, dump_template_decl, dump_function_decl,
155 dump_parameters, dump_exception_spec, dump_template_parms,
156 dump_expr, dump_binary_op, dump_unary_op, op_to_string,
157 assop_to_string, args_to_string, cp_print_error_function,
158 print_instantiation_full_context,
159 print_instantiation_partial_context): Mostly use pp_string and
160 pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
161 for non-identifiers. Mark English strings for translation.
162 (dump_global_iord): Mark strings for translation; use longer
163 strings instead of substituting single words.
164 (function_category): Return a format string marked for
165 translation, not a single word or phrase to substitute in a longer
168 2009-04-28 Ben Elliston <bje@au.ibm.com>
173 2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
175 * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
177 2009-04-27 Ian Lance Taylor <iant@google.com>
179 * semantics.c (finish_omp_clauses): Change type of c_kind to enum
182 2009-04-27 Jakub Jelinek <jakub@redhat.com>
185 * cvt.c (convert_to_void) <case INDIRECT_REF>: Only warn about
186 -Wunused-value if implicit.
188 2009-04-24 Ian Lance Taylor <iant@google.com>
190 * call.c (build_temp): Change 0 to enum constant.
191 * cp-tree.h (cp_lvalue_kind): Typedef to int rather than enum
193 * cp-gimplify.c (cp_gimplify_expr): Add cast to enum type.
194 * decl2.c (constrain_visibility): Likewise.
195 * parser.c (cp_lexer_get_preprocessor_token): Likewise.
196 (cp_parser_flags): Typedef to int rather than enum type.
197 (cp_parser_expression_stack_entry): Change prec field to enum
200 * typeck.c (build_modify_expr): Add lhs_origtype parameter.
203 2009-04-22 Dodji Seketeli <dodji@redhat.com>
206 * parser.c (cp_parser_template_argument_list): Display an error
207 when an ellipsis is not preceded by a parameter pack. Also, warn
208 about variadic templates usage without -std=c++0x.
210 2009-04-21 Taras Glek <tglek@mozilla.com>
212 * cp-tree.h: Update GTY annotations to new syntax.
214 * mangle.c: Likewise.
215 * name-lookup.c: Likewise.
216 * name-lookup.h: Likewise.
217 * parser.c: Likewise.
220 * semantics.c: Likewise.
221 * typeck2.c: Likewise.
223 2009-04-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
226 * parser.c (cp_parser_error): Pass token->flags to c_parse_error.
228 2009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
231 * typeck.c (check_for_casting_away_constness): We diagnose casting
232 away any qualifiers not just constness.
233 (casts_away_constness): Mention that it handles more than just
236 2009-04-21 Joseph Myers <joseph@codesourcery.com>
238 * ChangeLog, ChangeLog-1993, ChangeLog-1994, ChangeLog-1995,
239 ChangeLog-1996, ChangeLog-1997, ChangeLog-1998, ChangeLog-1999,
240 ChangeLog-2000, ChangeLog-2001, ChangeLog-2002, ChangeLog-2003,
241 ChangeLog-2004, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007,
242 ChangeLog-2008, ChangeLog.ptr, ChangeLog.tree-ssa, NEWS,
243 cfns.gperf: Add copyright and license notices.
244 * cfns.h: Regenerate.
245 * ChangeLog, ChangeLog-2004: Correct dates.
247 2009-04-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
250 * tree.c (lvalue_p_1): Use const_tree.
251 Use CONST_CAST_TREE to avoid warning.
252 (lvalue_p): Returns bool, receives const_tree.
254 2009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
257 * parser.c (cp_parser_check_decl_spec): Drop redundant flags.
258 * error.c (pedwarn_cxx98): New.
259 * cp-tree.h (pedwarn_cxx98): Declare.
261 2009-04-20 Le-Chun Wu <lcwu@google.com>
264 * init.c (build_vec_init): Set TREE_NO_WARNING on the
265 compiler-generated INDIRECT_REF expression.
267 2009-04-20 Ian Lance Taylor <iant@google.com>
269 * typeck.c (build_function_call_vec): New function.
270 (cp_build_function_call): Only pass first parameter to
271 objc_rewrite_function_call.
272 (build_modify_expr): Add rhs_origtype parameter. Change all
274 * decl.c (finish_decl): Add origtype parameter. Change all
276 * semantics.c (finish_call_expr): Pass VEC to
277 resolve_overloaded_builtin.
279 2009-04-20 Ian Lance Taylor <iant@google.com>
281 * cp-tree.h (base_access): Change typedef to int.
282 * parser.c (cp_parser_omp_flush): Change 0 to OMP_CLAUSE_ERROR.
283 (cp_parser_omp_threadprivate): Likewise.
284 * pt.c (unify_pack_expansion): Add casts to enum type.
286 2009-04-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
290 * call.c (build_new_op): Save the original codes of operands
293 2009-04-18 Kazu Hirata <kazu@codesourcery.com>
295 * cp-tree.h: Remove the prototype for insert_block.
296 * decl.c (insert_block): Remove.
298 2009-04-16 Ian Lance Taylor <iant@google.com>
300 * cp-tree.h (enum tsubst_flags): Rename from enum tsubst_flags_t.
301 (tsubst_flags_t): Change typedef from enum type to int.
303 2009-04-16 Paolo Bonzini <bonzini@gnu.org>
305 * decl.c (check_initializer): Use TYPE_VECTOR_OPAQUE
306 instead of targetm.vector_opaque_p.
308 2009-04-15 Le-Chun Wu <lcwu@google.com>
311 * call.c (build_over_call): Set TREE_NO_WARNING on the
312 compiler-generated INDIRECT_REF expression.
313 * cvt.c (convert_to_void): Emit warning when stripping off
316 2009-04-14 Diego Novillo <dnovillo@google.com>
318 * parser.c (cp_parser_type_specifier_seq): Move call to
319 invoke_plugin_callbacks ...
320 (cp_parser_type_specifier_seq): ... here.
322 2009-04-14 Le-Chun Wu <lcwu@google.com>
324 * Make-lang.in: Modify dependencies of files including plugin.h.
325 * decl.c (finish_function): Call invoke_plugin_callbacks.
326 * parser.c (cp_parser_type_specifier): Call invoke_plugin_callbacks.
328 2009-04-14 Jason Merrill <jason@redhat.com>
331 * name-lookup.c (pushdecl_maybe_friend): Avoid all warnings
332 about shadowing by tentative parms.
334 2009-04-13 Jason Merrill <jason@redhat.com>
337 * call.c (build_over_call): Don't call memcpy if the target is
338 the same as the source.
340 2009-04-13 Jason Merrill <jason@redhat.com>
343 * pt.c (uses_template_parms): Handle CONSTRUCTOR.
345 2009-04-12 Jason Merrill <jason@redhat.com>
348 * call.c (joust): Don't crash on variadic fn.
350 2009-04-10 Jason Merrill <jason@redhat.com>
353 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Return
354 if we see a close brace without an open brace.
356 2009-04-10 H.J. Lu <hongjiu.lu@intel.com>
358 * parser.c (cp_parser_class_specifier): Remove the unused
359 has_trailing_semicolon.
361 2009-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
364 * parser.c (cp_parser_check_template_parameters): Take a
365 cp_declarator parameter.
366 (cp_parser_elaborated_type_specifier): Update to
367 cp_parser_check_template_parameters.
368 (cp_parser_class_head): Likewise.
369 (cp_parser_check_declarator_template_parameters): Likewise.
370 (cp_parser_check_template_parameters): Handle first the non-error
371 conditions. Give more accurate diagnostics if a declarator is
374 2009-04-08 Jason Merrill <jason@redhat.com>
377 * error.c (dump_aggr_type): Chase template typedefs if
378 -fno-pretty-templates.
380 2009-04-08 Dodji Seketeli <dodji@redhat.com>
383 * parser.c (cp_parser_enumerator_definition): Make sure the
384 initializer of the enumerator doesn't contain any bare parameter pack.
386 2009-04-07 Jason Merrill <jason@redhat.com>
389 * name-lookup.c (merge_functions): Keep multiple extern "C" functions.
390 * call.c (joust): Complain about mismatched default arguments
391 in extern "C" functions.
392 * class.c (resolve_address_of_overloaded_function): Handle multiple
393 extern "C" functions.
394 * pt.c (resolve_overloaded_unification): Likewise.
396 2009-04-07 Jason Merrill <jason@redhat.com>
399 * error.c (dump_function_decl): Don't pretty-print templates
400 if -fno-pretty-templates.
401 (count_non_default_template_args): Print all args if
402 -fno-pretty-templates.
404 2009-04-06 Jason Merrill <jason@redhat.com>
407 * pt.c (fn_type_unification): For DEDUCE_EXACT check that
408 the deduced template arguments give us the parameter types
411 2009-04-05 Giovanni Bajo <giovannibajo@libero.it>
412 Jason Merrill <jason@redhat.com>
415 * error.c (count_non_default_template_args): New fn.
416 (dump_template_parms): Call it.
417 (dump_template_argument_list): Call it. Add parms parm.
418 (dump_template_argument): Adjust call to dump_template_argument_list.
419 (dump_type, dump_decl): Likewise.
420 (dump_template_bindings): Refactor logic.
422 2009-04-03 Jason Merrill <jason@redhat.com>
425 * error.c (dump_template_bindings): Look through typedefs in
427 (dump_type) [TYPENAME_TYPE]: Print the typedef name if any.
428 (find_typenames_r): Also collect typedefs.
429 * pt.c (unify): Strip typedefs.
432 * semantics.c (finish_id_expression): Don't assume a dependent
433 member of the current instantiation isn't a valid integral
434 constant expression. Check dependent_scope_p.
435 * pt.c (dependent_scope_p): Check TYPE_P.
436 (tsubst_copy): If args is null, just return.
438 2009-04-02 Jason Merrill <jason@redhat.com>
441 * error.c (find_typenames, find_typenames_r): New fns.
442 (dump_function_decl): Call find_typenames.
443 (dump_template_bindings): Print typenames as well.
444 * pt.c (tsubst): Non-static.
445 * cp-tree.h: Declare it.
447 2009-04-02 Dodji Seketeli <dodji@redhat.com>
450 * decl2.c (grokfield): when a typedef appears in a
451 class, create the typedef variant type node for it.
452 (save_template_attributes): Creating typedef variant type node
454 * decl.c (grokdeclarator): If the typedef'ed struct/class was
455 anonymous, set the proper type name to all its type variants.
456 (xref_basetypes) : Fixup the variant types after setting
458 * name-lookup.c (pushdecl_maybe_friend): Reuse the
459 set_underlying_type function to install typedef variant types.
460 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
462 (append_type_to_template_for_access_check): New entry points.
463 * semantics.c (check_accessibility_of_qualified_id):
464 When a typedef that is a member of a class appears in a template,
465 add it to the template. It will be ...
466 * class.c (finish_struct_bits): Split type variant fixup into ...
467 (fixup_type_variants): A new entry point.
468 * pt.c (instantiate_class_template, instantiate_template ): ... access
469 checked at template instantiation time.
470 (resolve_type_name_type): The type name should be the name of the
472 (retrieve_specialization): Specializations of template typedefs aren't
473 to looked up in DECL_TEMPLATE_INSTANTIATIONS (tmpl).
474 (append_type_to_template_for_access_check): New entry point.
475 (tsubst_decl): For typedefs, build the variant type from the correct
477 (get_class_bindings): Fix function comment.
478 (perform_typedefs_access_check): New entry point.
480 2009-03-31 Jason Merrill <jason@redhat.com>
483 * name-lookup.c (pushdecl_maybe_friend): Diagnose mismatched
484 extern "C" declarations.
487 * semantics.c (finish_non_static_data_member): Allow such references
488 without an associated object in sizeof/decltype/alignof.
490 * ptree.c (cxx_print_decl): Pretty-print full name of
492 (cxx_print_type): Pretty-print full name of class.
494 * decl.c (grokdeclarator): Reject pointer to qualified function
497 PR c++/37806, core issue 547
498 * typeck.c (cp_apply_type_quals_to_decl): Don't apply any quals
500 * tree.c (cp_build_qualified_type_real): Don't apply restrict to a
502 * decl.h (enum decl_context): Add TEMPLATE_TYPE_ARG.
503 * decl.c (groktypename): Add is_template_arg parameter.
504 (grokdeclarator): Allow function cv-quals on a template type arg.
505 * parser.c (cp_parser_new_type_id, cp_parser_type_id): Add
506 is_template_arg argument in calls to groktypename.
507 * cp-tree.h: Adjust prototype.
508 * error.c (dump_type_prefix, dump_type_suffix): Fix plain
509 FUNCTION_TYPE printing.
511 * mangle.c (write_expression): Mangle dependent name as
514 PR c++/38030, 38850, 39070
515 * pt.c (type_dependent_expression_p_push): New fn.
516 (tsubst_copy_and_build) [CALL_EXPR]: Only do arg-dep lookup when the
517 substitution makes the call non-dependent. Preserve koenig_p.
518 * parser.c (cp_parser_postfix_expression): Only do arg-dep lookup
519 for non-dependent calls.
520 * semantics.c (finish_call_expr): Revert earlier changes.
521 * cp-tree.h: Revert change to finish_call_expr prototype.
523 2009-03-29 Joseph Myers <joseph@codesourcery.com>
525 PR preprocessor/34695
526 * cp-tree.h (cp_cpp_error): Remove.
527 * error.c (cp_cpp_error): Remove.
528 * parser.c (cp_lexer_new_main): Set done_lexing instead of
529 client_diagnostic and error callback.
531 2009-03-28 Paolo Bonzini <bonzini@gnu.org>
533 * cp/cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
534 * cp/cp-objcp-common.c (cxx_staticp): Remove.
535 * cp/cp-tree.h (cxx_staticp): Remove.
537 2009-03-28 Jakub Jelinek <jakub@redhat.com>
540 * parser.c (cp_parser_postfix_expression): Don't call
541 warning_if_disallowed_function_p.
543 2009-03-27 Jan Hubicka <jh@suse.cz>
545 * except.c (choose_personality_routine): Set terminate_node to abort
548 2009-03-27 Dodji Seketeli <dodji@redhat.com>
549 Jakub Jelinek <jakub@redhat.com>
552 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P): Define.
553 (cp_function_decl_explicit_p): New prototype.
554 * cp-objcp-common.c (cp_function_decl_explicit_p): New function.
556 2009-03-27 Andrew Pinski <andrew_pinski@playstation.sony.com>
559 * parser.c (cp_parser_elaborated_type_specifier): If we have a
560 typename tag and don't have either a TYPE_DECL or a
561 TEMPLATE_ID_EXPR, set the type to NULL.
563 2009-03-27 Simon Martin <simartin@users.sourceforge.net>
566 * decl.c (grokdeclarator): Reject [con|de]stuctors in a non-class
569 2009-03-27 Simon Martin <simartin@users.sourceforge.net>
572 * decl.c (check_array_designated_initializer): Handle error_mark_node.
574 2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
577 * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
579 2009-03-26 Andrew Haley <aph@redhat.com>
582 * decl2.c (possibly_inlined_p): If java exceptions are in use
583 don't inline a decl unless it is explicitly marked inline.
584 * lex.c: (pragma_java_exceptions): New variable.
585 (handle_pragma_java_exceptions): Set pragma_java_exceptions.
586 * cp-tree.h (pragma_java_exceptions): Declare new variable.
588 2009-03-24 Jason Merrill <jason@redhat.com>
591 * name-lookup.c (pushdecl_maybe_friend): Check default args later.
593 2009-03-23 Jakub Jelinek <jakub@redhat.com>
596 * semantics.c (handle_omp_for_class_iterator): Swap cond operands and
597 code if iter is the second operand.
598 * parser.c (cp_parser_binary_expression): Add no_toplevel_fold_p
599 argument. If it is set, don't build the toplevel expression with
600 build_x_binary_op, but build2.
601 (cp_parser_assignment_expression, cp_parser_omp_for_incr): Adjust
603 (cp_parser_omp_for_cond): Don't assume the first operand of the
604 comparison must be decl.
606 2009-03-23 Jason Merrill <jason@redhat.com>
609 * pt.c (make_fnparm_pack): Split out from...
610 (instantiate_decl): ...here.
611 (tsubst_pack_expansion): Handle being called in a late-specified
615 * name-lookup.c (pushdecl_maybe_friend): Don't warn about shadowing
618 2009-03-20 Jason Merrill <jason@redhat.com>
621 * parser.c (cp_parser_direct_declarator): In a template, wrap
622 non-constant expression in NOP_EXPR with TREE_SIDE_EFFECTS set.
623 * pt.c (tsubst): Preserve it in a partial instantiation.
624 (dependent_type_p_r): Don't check value_dependent_expression_p.
625 * decl.c (compute_array_index_type): Don't check
626 value_dependent_expression_p if TREE_SIDE_EFFECTS.
629 * typeck2.c (check_narrowing): Don't complain about loss of
630 precision when converting a floating-point constant.
632 2009-03-19 Jakub Jelinek <jakub@redhat.com>
635 * parser.c (cp_parser_omp_for_cond): Don't check lhs if decl is NULL.
636 (cp_parser_omp_for_loop): Always use cp_parser_omp_for_cond.
638 2009-03-18 Jakub Jelinek <jakub@redhat.com>
640 * parser.c (struct cp_token): Reorder fields for 64-bit hosts.
643 2009-03-18 H.J. Lu <hongjiu.lu@intel.com>
646 * parser.c (cp_parser_explicit_specialization): Don't skip the
647 rest of the specialization when begin_specialization returns
650 2009-03-17 Jason Merrill <jason@redhat.com>
652 * decl.c (grokfndecl): Set DECL_CONTEXT on parms.
653 (duplicate_decls): Adjust DECL_CONTEXT of newdecl's parms.
654 * pt.c (check_explicit_specialization): Likewise.
655 (tsubst_copy) [PARM_DECL]: Return a dummy parm if we don't have a
656 local specialization.
657 * tree.c (cp_tree_equal) [PARM_DECL]: Check type and index, not name.
658 * decl2.c (parm_index): New fn.
659 * semantics.c (finish_decltype_type): Don't use describable_type.
660 * mangle.c (write_expression): Likewise. Mangle ALIGNOF_EXPR.
661 Give a sorry for unsupported codes rather than crash. Mangle
662 conversions with other than 1 operand. New mangling for PARM_DECL.
663 * operators.def (ALIGNOF_EXPR): Mangle as "az".
665 2009-03-17 Jing Yu <jingyu@google.com>
668 * method.c (use_thunk): Change is_thunk from crtl to cfun.
670 2009-03-17 Paolo Carlini <paolo.carlini@oracle.com>
673 * semantics.c (check_trait_type): New.
674 (finish_trait_expr): Use it.
676 2009-03-17 Jakub Jelinek <jakub@redhat.com>
678 * name-lookup.c (cp_emit_debug_info_for_using): Emit USING_STMTs
679 instead of calling imported_module_or_decl debug hook if
680 building_stmt_tree ().
681 * cp-gimplify.c (cp_gimplify_expr): Don't assert the first operand
685 * name-lookup.c (do_namespace_alias): Don't call global_decl debug
686 hook at function scope.
689 * cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
692 2009-03-09 Jakub Jelinek <jakub@redhat.com>
695 * semantics.c (finish_switch_cond): Don't call get_unwidened.
696 * decl.c (finish_case_label): Pass SWITCH_STMT_TYPE as 3rd argument
697 instead of TREE_TYPE (cond).
699 2009-03-08 H.J. Lu <hongjiu.lu@intel.com>
702 * parser.c (cp_parser_late_parsing_default_args): Continue
703 the loop when cp_parser_assignment_expression returns
706 2009-03-07 Jason Merrill <jason@redhat.com>
709 * init.c (build_new_1): Don't use a VLA type.
710 (build_vec_init): Handle getting a pointer for BASE.
712 2009-03-06 H.J. Lu <hongjiu.lu@intel.com>
715 * cp-tree.h: Check NO_DOT_IN_LABEL before NO_DOLLAR_IN_LABEL
716 when mangling symbols.
718 2009-03-06 Paolo Carlini <paolo.carlini@oracle.com>
721 * error.c (dump_expr): Don't try to print THROW_EXPRs in full.
723 2009-03-06 Alexandre Oliva <aoliva@redhat.com>
725 * decl.c (record_builtin_java_type): Use canonicalized integer
728 2009-03-04 Jason Merrill <jason@redhat.com>
731 * class.c (is_really_empty_class): New fn.
732 * cp-tree.h: Declare it.
733 * cp-objcp-common.c (cp_expr_size): Use it.
736 * semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
737 * parser.c (cp_parser_postfix_expression): Call it for
739 * tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
740 (get_first_fn): Likewise.
746 * decl.c (make_typename_type): Do look inside currently open classes.
747 * parser.c (cp_parser_lookup_name): Likewise.
748 (cp_parser_template_name): Likewise.
749 * pt.c (dependent_scope_p): New function.
750 * cp-tree.h: Declare it.
751 * class.c (currently_open_class): Return fast if T isn't a class.
753 2009-02-26 H.J. Lu <hongjiu.lu@intel.com>
756 * parser.c (cp_parser_mem_initializer): Return error_mark_node
757 if cp_parser_mem_initializer_id returns error_mark_node.
759 2009-02-24 Richard Guenther <rguenther@suse.de>
762 * pt.c (instantiate_decl): Do not instantiate extern, non-inline
765 2009-02-23 H.J. Lu <hongjiu.lu@intel.com>
768 * pt.c (coerce_template_template_parms): Return 0 if parameter
771 2009-02-23 Jason Merrill <jason@redhat.com>
773 * pt.c (unify): Call maybe_adjust_types_for_deduction when
774 deducing from an initializer list.
776 2009-02-20 Jason Merrill <jason@redhat.com>
779 * decl.c (grokdeclarator): Handle ~identifier.
781 2009-02-19 Jakub Jelinek <jakub@redhat.com>
784 * decl2.c (determine_visibility): If visibility changed and
785 DECL_RTL has been already set, call make_decl_rtl to update symbol
788 2009-02-19 H.J. Lu <hongjiu.lu@intel.com>
791 * cp-tree.h (maybe_commonize_var): New.
793 * decl.c (maybe_commonize_var): Make it extern.
795 * decl2.c (finish_anon_union): Call maybe_commonize_var.
797 2009-02-18 H.J. Lu <hongjiu.lu@intel.com>
800 * parser.c (cp_parser_enum_specifier): Apply all attributes.
802 2009-02-18 Jason Merrill <jason@redhat.com>
804 * cfns.h: Tweak pathname for cfns.gperf.
806 2009-02-13 Jason Merrill <jason@redhat.com>
809 * semantics.c (finish_call_expr): Change koenig_p parm to int.
810 If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
811 * cp-tree.h: Adjust prototype.
812 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
814 2009-02-12 Jason Merrill <jason@redhat.com>
817 * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
819 2009-02-11 Jason Merrill <jason@redhat.com>
822 * decl2.c (cp_write_global_declarations):
823 Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
826 * init.c (build_value_init_noctor): Split out from...
827 (build_value_init): ...here.
828 (expand_aggr_init_1): Handle value-initialization.
829 * cp-tree.h: Add declaration.
830 * class.c (type_has_user_provided_constructor):
831 Handle non-class arguments.
833 2009-02-10 Jason Merrill <jason@redhat.com>
836 * class.c (defaultable_fn_p): Handle ... properly.
839 * tree.c (lvalue_p_1): Condition rvalue ref handling on
840 treat_class_rvalues_as_lvalues, too.
842 2009-02-10 Paolo Carlini <paolo.carlini@oracle.com>
845 * typeck.c (build_x_array_ref): New.
846 * cp-tree.h: Declare it.
847 * pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
849 2009-02-09 Jason Merrill <jason@redhat.com>
852 * semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
853 * init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
854 * tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
855 * cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
856 for build_value_init TARGET_EXPR.
857 * cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
859 2009-02-06 Paolo Carlini <paolo.carlini@oracle.com>
863 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
865 2009-02-04 Jakub Jelinek <jakub@redhat.com>
868 * operators.def: Use COMPONENT_REF code for ->/pt operator again,
869 remove ./dt operator.
870 * mangle.c (write_expression): Handle COMPONENT_REF after handling
871 ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
872 write_string ("dt") instead of using operators.def.
874 2009-02-03 Jason Merrill <jason@redhat.com>
876 * typeck.c (cp_build_unary_op): Only complain about taking address
879 2009-02-03 Jakub Jelinek <jakub@redhat.com>
882 * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
885 * typeck2.c (digest_init_r): Don't call process_init_constructor
888 2009-02-03 Paolo Bonzini <bonzini@gnu.org>
891 * pt.c (convert_nontype_argument_function): Expect expr to be an
895 * typeck.c (merge_types): Call resolve_typename_type if only
896 one type is a typename.
898 2009-02-02 Jason Merrill <jason@redhat.com>
901 * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node
904 2009-02-01 Paolo Carlini <paolo.carlini@oracle.com>
907 * parser.c (cp_parser_pure_specifier): If there are no tokens left
908 do not call cp_lexer_consume_token.
910 2009-01-30 Jakub Jelinek <jakub@redhat.com>
913 * parser.c (cp_parser_already_scoped_statement): Handle __label__
916 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
919 * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
921 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
924 * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
926 2009-01-29 Paolo Carlini <paolo.carlini@oracle.com>
928 * typeck.c (invalid_nonstatic_memfn_p): Use
929 DECL_NONSTATIC_MEMBER_FUNCTION_P.
931 2009-01-27 Paolo Carlini <paolo.carlini@oracle.com>
934 * call.c (build_over_call): If convert_for_arg_passing returns
935 error_mark_node unconditionally return it.
937 2009-01-22 Adam Nemet <anemet@caviumnetworks.com>
939 * class.c (check_field_decls): Also inherit packed for bitfields
940 regardless of their type.
942 2009-01-22 Dodji Seketeli <dodji@redhat.com>
945 * decl2.c (grokfield): Reverting changes of PR c++/26693
946 (save_template_attributes): Likewise.
947 * decl.c (grokdeclarator): Likewise.
948 * name-lookup.c (pushdecl_maybe_friend): Likewise.
949 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
950 (append_type_to_template_for_access_check): Likewise.
951 * semantics.c (check_accessibility_of_qualified_id): Likewise.
952 * pt.c (instantiate_class_template, instantiate_template ): Likewise.
954 (resolve_type_name_type): Likewise.
955 (append_type_to_template_for_access_check): Likewise.
957 2009-01-21 Dodji Seketeli <dodji@redhat.com>
960 * decl2.c (grokfield): when a typedef appears in a
961 class, create the typedef variant type node for it.
962 (save_template_attributes): Creating typedef variant type node
964 * decl.c (grokdeclarator): If the typedef'ed struct/class was
965 anonymous, set the proper type name to all its type variants.
966 * name-lookup.c (pushdecl_maybe_friend): Reuse the
967 set_underlying_type function to install typedef variant types.
968 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
970 (append_type_to_template_for_access_check): New entry points.
971 * semantics.c (check_accessibility_of_qualified_id):
972 When a typedef that is a member of a class appears in a template,
973 add it to the template. It will be ...
974 * pt.c (instantiate_class_template, instantiate_template ): ... access
975 checked at template instantiation time.
976 (tsubst): Handle the case of being called with NULL args.
977 (resolve_type_name_type): The type name should be the name of the
979 (append_type_to_template_for_access_check): New entry point.
981 2009-01-19 Jason Merrill <jason@redhat.com>
984 * parser.c (cp_parser_unqualified_id): In a template,
986 * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
988 2009-01-16 Jason Merrill <jason@redhat.com>
991 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
992 * init.c (build_new): Don't call describable_type unless we
996 * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
999 * search.c (protected_accessible_p): N doesn't vary.
1001 2009-01-15 Jason Merrill <jason@redhat.com>
1004 * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
1005 accept hidden friends.
1007 2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1010 * decl.c (grokdeclarator): Check for a non namespace/class context.
1012 2009-01-15 Jason Merrill <jason@redhat.com>
1016 * tree.c (lvalue_p_1): Handle BASELINK. A COMPONENT_REF to
1017 a function isn't necessarily an lvalue. Take tree, not const_tree.
1018 (lvalue_p, real_lvalue_p): Take tree, not const_tree.
1019 * typeck.c (lvalue_or_else): Likewise.
1020 * cp-tree.h: Adjust prototypes.
1022 2009-01-15 Steve Ellcey <sje@cup.hp.com>
1025 * pt.c (tsubst): Check for NULL args.
1027 2009-01-15 Dodji Seketeli <dodji@redhat.com>
1030 * name-lookup.c (pushtag): Don't create members to types that are not
1033 2009-01-14 Nick Clifton <nickc@redhat.com>
1036 * parser.c: Pass cp_id_kind computed in
1037 cp_parser_postfix_dot_deref_expression to
1038 cp_parser_primary_expression.
1040 2009-01-13 Jakub Jelinek <jakub@redhat.com>
1043 * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
1044 STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
1047 2009-01-12 Jason Merrill <jason@redhat.com>
1048 Steve Ellcey <sje@cup.hp.com>
1051 * name-lookup.c (lookup_name_real): Keep looking past a hidden
1054 2009-01-12 Dodji Seketeli <dodji@redhat.com>
1057 * pt.c (parameter_of_template_p): New function.
1058 * cp-tree.h: Declare it.
1059 * name-lookup.c (binding_to_template_parms_of_scope_p): New
1061 (outer_binding): Take template parameters in account when looking for
1064 2009-01-12 Jason Merrill <jason@redhat.com>
1067 * tree.c (pod_type_p): Return 1 for structs created by the back end.
1069 2009-01-12 Jakub Jelinek <jakub@redhat.com>
1072 * parser.c (cp_parser_builtin_offsetof): Allow `->' in
1073 offsetof member-designator, handle it as `[0].'.
1076 * decl.c (start_function): If grokdeclarator hasn't returned
1077 FUNCTION_DECL nor error_mark_node, issue diagnostics.
1079 2009-01-11 Jakub Jelinek <jakub@redhat.com>
1082 * cp-gimplify.c (genericize_if_stmt): Renamed from ...
1083 (gimplify_if_stmt): ... this.
1084 (cp_gimplify_expr): Don't handle IF_STMT here.
1085 (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
1087 2009-01-10 Andrew Pinski <pinskia@gmail.com>
1090 * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
1093 * typeck2.c (build_functional_cast): Check for reference type and NULL
1096 2009-01-09 Steve Ellcey <sje@cup.hp.com>
1098 * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
1100 2009-01-09 Jakub Jelinek <jakub@redhat.com>
1103 * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
1105 2009-01-09 John F. Carr <jfc@mit.edu>
1108 * parser.c (cp_parser_class_specifier): Clear
1109 parser->in_unbraced_linkage_specification_p while parsing class
1112 2009-01-07 Jakub Jelinek <jakub@redhat.com>
1115 * semantics.c (finish_goto_stmt): Convert destination to
1118 2009-01-06 Jason Merrill <jason@redhat.com>
1125 * pt.c (check_default_tmpl_args): Don't complain about
1126 out-of-order parameter packs in the enclosing class
1127 or parameter packs after default args.
1128 (coerce_template_parms): If we have more than one
1129 parameter pack, don't flatten argument packs.
1130 (template_args_equal): Handle argument packs.
1131 (comp_template_args): Don't flatten argument packs.
1132 (check_instantiated_arg): Split out from...
1133 (check_instantiated_args): Here. Handle arg packs.
1134 (convert_template_argument): Just check that nontype argument
1135 packs have the right type.
1137 2009-01-05 Dodji Seketeli <dodji@redhat.com>
1140 * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
1142 2009-01-05 Jason Merrill <jason@redhat.com>
1145 * typeck2.c (process_init_constructor_union): Handle union with
1148 * mangle.c (write_expression): Remove mangling for zero-operand
1152 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
1156 * class.c (defaultable_fn_p): Only operator== can be a copy
1157 assignment operator.
1159 2009-01-02 Jason Merrill <jason@redhat.com>
1162 * typeck2.c (process_init_constructor_union): Handle excess
1164 (process_init_constructor_record): Likewise.
1167 * typeck2.c (digest_init_r): Don't use process_init_constructor
1168 for non-aggregate classes.
1171 Copyright (C) 2009 Free Software Foundation, Inc.
1173 Copying and distribution of this file, with or without modification,
1174 are permitted in any medium without royalty provided the copyright
1175 notice and this notice are preserved.