1 2009-05-01 Joseph Myers <joseph@codesourcery.com>
3 * cxx-pretty-print.c (is_destructor_name, pp_cxx_unqualified_id,
4 pp_cxx_template_keyword_if_needed, pp_cxx_postfix_expression,
5 pp_cxx_new_expression, pp_cxx_delete_expression,
6 pp_cxx_unary_expression, pp_cxx_assignment_operator,
7 pp_cxx_assignment_expression, pp_cxx_expression,
8 pp_cxx_function_specifier, pp_cxx_decl_specifier_seq,
9 pp_cxx_simple_type_specifier, pp_cxx_type_specifier_seq,
10 pp_cxx_exception_specification, pp_cxx_direct_declarator,
11 pp_cxx_ctor_initializer, pp_cxx_type_id, pp_cxx_statement,
12 pp_cxx_namespace_alias_definition, pp_cxx_template_parameter,
13 pp_cxx_canonical_template_parameter, pp_cxx_template_declaration,
14 pp_cxx_declaration, pp_cxx_typeid_expression,
15 pp_cxx_va_arg_expression, pp_cxx_offsetof_expression,
16 pp_cxx_trait_expression): Mostly use pp_string and
17 pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
18 for non-identifiers. Mark English strings for translation.
19 * cxx-pretty-print.h (pp_cxx_ws_string): Define.
20 * error.c (dump_template_parameter, dump_template_bindings,
21 dump_type, dump_aggr_type, dump_type_prefix, dump_simple_decl,
22 dump_decl, dump_template_decl, dump_function_decl,
23 dump_parameters, dump_exception_spec, dump_template_parms,
24 dump_expr, dump_binary_op, dump_unary_op, op_to_string,
25 assop_to_string, args_to_string, cp_print_error_function,
26 print_instantiation_full_context,
27 print_instantiation_partial_context): Mostly use pp_string and
28 pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
29 for non-identifiers. Mark English strings for translation.
30 (dump_global_iord): Mark strings for translation; use longer
31 strings instead of substituting single words.
32 (function_category): Return a format string marked for
33 translation, not a single word or phrase to substitute in a longer
36 2009-04-28 Ben Elliston <bje@au.ibm.com>
41 2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
43 * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
45 2009-04-27 Ian Lance Taylor <iant@google.com>
47 * semantics.c (finish_omp_clauses): Change type of c_kind to enum
50 2009-04-27 Jakub Jelinek <jakub@redhat.com>
53 * cvt.c (convert_to_void) <case INDIRECT_REF>: Only warn about
54 -Wunused-value if implicit.
56 2009-04-24 Ian Lance Taylor <iant@google.com>
58 * call.c (build_temp): Change 0 to enum constant.
59 * cp-tree.h (cp_lvalue_kind): Typedef to int rather than enum
61 * cp-gimplify.c (cp_gimplify_expr): Add cast to enum type.
62 * decl2.c (constrain_visibility): Likewise.
63 * parser.c (cp_lexer_get_preprocessor_token): Likewise.
64 (cp_parser_flags): Typedef to int rather than enum type.
65 (cp_parser_expression_stack_entry): Change prec field to enum
68 * typeck.c (build_modify_expr): Add lhs_origtype parameter.
71 2009-04-22 Dodji Seketeli <dodji@redhat.com>
74 * parser.c (cp_parser_template_argument_list): Display an error
75 when an ellipsis is not preceded by a parameter pack. Also, warn
76 about variadic templates usage without -std=c++0x.
78 2009-04-21 Taras Glek <tglek@mozilla.com>
80 * cp-tree.h: Update GTY annotations to new syntax.
83 * name-lookup.c: Likewise.
84 * name-lookup.h: Likewise.
88 * semantics.c: Likewise.
89 * typeck2.c: Likewise.
91 2009-04-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
94 * parser.c (cp_parser_error): Pass token->flags to c_parse_error.
96 2009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
99 * typeck.c (check_for_casting_away_constness): We diagnose casting
100 away any qualifiers not just constness.
101 (casts_away_constness): Mention that it handles more than just
104 2009-04-21 Joseph Myers <joseph@codesourcery.com>
106 * ChangeLog, ChangeLog-1993, ChangeLog-1994, ChangeLog-1995,
107 ChangeLog-1996, ChangeLog-1997, ChangeLog-1998, ChangeLog-1999,
108 ChangeLog-2000, ChangeLog-2001, ChangeLog-2002, ChangeLog-2003,
109 ChangeLog-2004, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007,
110 ChangeLog-2008, ChangeLog.ptr, ChangeLog.tree-ssa, NEWS,
111 cfns.gperf: Add copyright and license notices.
112 * cfns.h: Regenerate.
113 * ChangeLog, ChangeLog-2004: Correct dates.
115 2009-04-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
118 * tree.c (lvalue_p_1): Use const_tree.
119 Use CONST_CAST_TREE to avoid warning.
120 (lvalue_p): Returns bool, receives const_tree.
122 2009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
125 * parser.c (cp_parser_check_decl_spec): Drop redundant flags.
126 * error.c (pedwarn_cxx98): New.
127 * cp-tree.h (pedwarn_cxx98): Declare.
129 2009-04-20 Le-Chun Wu <lcwu@google.com>
132 * init.c (build_vec_init): Set TREE_NO_WARNING on the
133 compiler-generated INDIRECT_REF expression.
135 2009-04-20 Ian Lance Taylor <iant@google.com>
137 * typeck.c (build_function_call_vec): New function.
138 (cp_build_function_call): Only pass first parameter to
139 objc_rewrite_function_call.
140 (build_modify_expr): Add rhs_origtype parameter. Change all
142 * decl.c (finish_decl): Add origtype parameter. Change all
144 * semantics.c (finish_call_expr): Pass VEC to
145 resolve_overloaded_builtin.
147 2009-04-20 Ian Lance Taylor <iant@google.com>
149 * cp-tree.h (base_access): Change typedef to int.
150 * parser.c (cp_parser_omp_flush): Change 0 to OMP_CLAUSE_ERROR.
151 (cp_parser_omp_threadprivate): Likewise.
152 * pt.c (unify_pack_expansion): Add casts to enum type.
154 2009-04-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
158 * call.c (build_new_op): Save the original codes of operands
161 2009-04-18 Kazu Hirata <kazu@codesourcery.com>
163 * cp-tree.h: Remove the prototype for insert_block.
164 * decl.c (insert_block): Remove.
166 2009-04-16 Ian Lance Taylor <iant@google.com>
168 * cp-tree.h (enum tsubst_flags): Rename from enum tsubst_flags_t.
169 (tsubst_flags_t): Change typedef from enum type to int.
171 2009-04-16 Paolo Bonzini <bonzini@gnu.org>
173 * decl.c (check_initializer): Use TYPE_VECTOR_OPAQUE
174 instead of targetm.vector_opaque_p.
176 2009-04-15 Le-Chun Wu <lcwu@google.com>
179 * call.c (build_over_call): Set TREE_NO_WARNING on the
180 compiler-generated INDIRECT_REF expression.
181 * cvt.c (convert_to_void): Emit warning when stripping off
184 2009-04-14 Diego Novillo <dnovillo@google.com>
186 * parser.c (cp_parser_type_specifier_seq): Move call to
187 invoke_plugin_callbacks ...
188 (cp_parser_type_specifier_seq): ... here.
190 2009-04-14 Le-Chun Wu <lcwu@google.com>
192 * Make-lang.in: Modify dependencies of files including plugin.h.
193 * decl.c (finish_function): Call invoke_plugin_callbacks.
194 * parser.c (cp_parser_type_specifier): Call invoke_plugin_callbacks.
196 2009-04-14 Jason Merrill <jason@redhat.com>
199 * name-lookup.c (pushdecl_maybe_friend): Avoid all warnings
200 about shadowing by tentative parms.
202 2009-04-13 Jason Merrill <jason@redhat.com>
205 * call.c (build_over_call): Don't call memcpy if the target is
206 the same as the source.
208 2009-04-13 Jason Merrill <jason@redhat.com>
211 * pt.c (uses_template_parms): Handle CONSTRUCTOR.
213 2009-04-12 Jason Merrill <jason@redhat.com>
216 * call.c (joust): Don't crash on variadic fn.
218 2009-04-10 Jason Merrill <jason@redhat.com>
221 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Return
222 if we see a close brace without an open brace.
224 2009-04-10 H.J. Lu <hongjiu.lu@intel.com>
226 * parser.c (cp_parser_class_specifier): Remove the unused
227 has_trailing_semicolon.
229 2009-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
232 * parser.c (cp_parser_check_template_parameters): Take a
233 cp_declarator parameter.
234 (cp_parser_elaborated_type_specifier): Update to
235 cp_parser_check_template_parameters.
236 (cp_parser_class_head): Likewise.
237 (cp_parser_check_declarator_template_parameters): Likewise.
238 (cp_parser_check_template_parameters): Handle first the non-error
239 conditions. Give more accurate diagnostics if a declarator is
242 2009-04-08 Jason Merrill <jason@redhat.com>
245 * error.c (dump_aggr_type): Chase template typedefs if
246 -fno-pretty-templates.
248 2009-04-08 Dodji Seketeli <dodji@redhat.com>
251 * parser.c (cp_parser_enumerator_definition): Make sure the
252 initializer of the enumerator doesn't contain any bare parameter pack.
254 2009-04-07 Jason Merrill <jason@redhat.com>
257 * name-lookup.c (merge_functions): Keep multiple extern "C" functions.
258 * call.c (joust): Complain about mismatched default arguments
259 in extern "C" functions.
260 * class.c (resolve_address_of_overloaded_function): Handle multiple
261 extern "C" functions.
262 * pt.c (resolve_overloaded_unification): Likewise.
264 2009-04-07 Jason Merrill <jason@redhat.com>
267 * error.c (dump_function_decl): Don't pretty-print templates
268 if -fno-pretty-templates.
269 (count_non_default_template_args): Print all args if
270 -fno-pretty-templates.
272 2009-04-06 Jason Merrill <jason@redhat.com>
275 * pt.c (fn_type_unification): For DEDUCE_EXACT check that
276 the deduced template arguments give us the parameter types
279 2009-04-05 Giovanni Bajo <giovannibajo@libero.it>
280 Jason Merrill <jason@redhat.com>
283 * error.c (count_non_default_template_args): New fn.
284 (dump_template_parms): Call it.
285 (dump_template_argument_list): Call it. Add parms parm.
286 (dump_template_argument): Adjust call to dump_template_argument_list.
287 (dump_type, dump_decl): Likewise.
288 (dump_template_bindings): Refactor logic.
290 2009-04-03 Jason Merrill <jason@redhat.com>
293 * error.c (dump_template_bindings): Look through typedefs in
295 (dump_type) [TYPENAME_TYPE]: Print the typedef name if any.
296 (find_typenames_r): Also collect typedefs.
297 * pt.c (unify): Strip typedefs.
300 * semantics.c (finish_id_expression): Don't assume a dependent
301 member of the current instantiation isn't a valid integral
302 constant expression. Check dependent_scope_p.
303 * pt.c (dependent_scope_p): Check TYPE_P.
304 (tsubst_copy): If args is null, just return.
306 2009-04-02 Jason Merrill <jason@redhat.com>
309 * error.c (find_typenames, find_typenames_r): New fns.
310 (dump_function_decl): Call find_typenames.
311 (dump_template_bindings): Print typenames as well.
312 * pt.c (tsubst): Non-static.
313 * cp-tree.h: Declare it.
315 2009-04-02 Dodji Seketeli <dodji@redhat.com>
318 * decl2.c (grokfield): when a typedef appears in a
319 class, create the typedef variant type node for it.
320 (save_template_attributes): Creating typedef variant type node
322 * decl.c (grokdeclarator): If the typedef'ed struct/class was
323 anonymous, set the proper type name to all its type variants.
324 (xref_basetypes) : Fixup the variant types after setting
326 * name-lookup.c (pushdecl_maybe_friend): Reuse the
327 set_underlying_type function to install typedef variant types.
328 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
330 (append_type_to_template_for_access_check): New entry points.
331 * semantics.c (check_accessibility_of_qualified_id):
332 When a typedef that is a member of a class appears in a template,
333 add it to the template. It will be ...
334 * class.c (finish_struct_bits): Split type variant fixup into ...
335 (fixup_type_variants): A new entry point.
336 * pt.c (instantiate_class_template, instantiate_template ): ... access
337 checked at template instantiation time.
338 (resolve_type_name_type): The type name should be the name of the
340 (retrieve_specialization): Specializations of template typedefs aren't
341 to looked up in DECL_TEMPLATE_INSTANTIATIONS (tmpl).
342 (append_type_to_template_for_access_check): New entry point.
343 (tsubst_decl): For typedefs, build the variant type from the correct
345 (get_class_bindings): Fix function comment.
346 (perform_typedefs_access_check): New entry point.
348 2009-03-31 Jason Merrill <jason@redhat.com>
351 * name-lookup.c (pushdecl_maybe_friend): Diagnose mismatched
352 extern "C" declarations.
355 * semantics.c (finish_non_static_data_member): Allow such references
356 without an associated object in sizeof/decltype/alignof.
358 * ptree.c (cxx_print_decl): Pretty-print full name of
360 (cxx_print_type): Pretty-print full name of class.
362 * decl.c (grokdeclarator): Reject pointer to qualified function
365 PR c++/37806, core issue 547
366 * typeck.c (cp_apply_type_quals_to_decl): Don't apply any quals
368 * tree.c (cp_build_qualified_type_real): Don't apply restrict to a
370 * decl.h (enum decl_context): Add TEMPLATE_TYPE_ARG.
371 * decl.c (groktypename): Add is_template_arg parameter.
372 (grokdeclarator): Allow function cv-quals on a template type arg.
373 * parser.c (cp_parser_new_type_id, cp_parser_type_id): Add
374 is_template_arg argument in calls to groktypename.
375 * cp-tree.h: Adjust prototype.
376 * error.c (dump_type_prefix, dump_type_suffix): Fix plain
377 FUNCTION_TYPE printing.
379 * mangle.c (write_expression): Mangle dependent name as
382 PR c++/38030, 38850, 39070
383 * pt.c (type_dependent_expression_p_push): New fn.
384 (tsubst_copy_and_build) [CALL_EXPR]: Only do arg-dep lookup when the
385 substitution makes the call non-dependent. Preserve koenig_p.
386 * parser.c (cp_parser_postfix_expression): Only do arg-dep lookup
387 for non-dependent calls.
388 * semantics.c (finish_call_expr): Revert earlier changes.
389 * cp-tree.h: Revert change to finish_call_expr prototype.
391 2009-03-29 Joseph Myers <joseph@codesourcery.com>
393 PR preprocessor/34695
394 * cp-tree.h (cp_cpp_error): Remove.
395 * error.c (cp_cpp_error): Remove.
396 * parser.c (cp_lexer_new_main): Set done_lexing instead of
397 client_diagnostic and error callback.
399 2009-03-28 Paolo Bonzini <bonzini@gnu.org>
401 * cp/cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
402 * cp/cp-objcp-common.c (cxx_staticp): Remove.
403 * cp/cp-tree.h (cxx_staticp): Remove.
405 2009-03-28 Jakub Jelinek <jakub@redhat.com>
408 * parser.c (cp_parser_postfix_expression): Don't call
409 warning_if_disallowed_function_p.
411 2009-03-27 Jan Hubicka <jh@suse.cz>
413 * except.c (choose_personality_routine): Set terminate_node to abort
416 2009-03-27 Dodji Seketeli <dodji@redhat.com>
417 Jakub Jelinek <jakub@redhat.com>
420 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P): Define.
421 (cp_function_decl_explicit_p): New prototype.
422 * cp-objcp-common.c (cp_function_decl_explicit_p): New function.
424 2009-03-27 Andrew Pinski <andrew_pinski@playstation.sony.com>
427 * parser.c (cp_parser_elaborated_type_specifier): If we have a
428 typename tag and don't have either a TYPE_DECL or a
429 TEMPLATE_ID_EXPR, set the type to NULL.
431 2009-03-27 Simon Martin <simartin@users.sourceforge.net>
434 * decl.c (grokdeclarator): Reject [con|de]stuctors in a non-class
437 2009-03-27 Simon Martin <simartin@users.sourceforge.net>
440 * decl.c (check_array_designated_initializer): Handle error_mark_node.
442 2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
445 * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
447 2009-03-26 Andrew Haley <aph@redhat.com>
450 * decl2.c (possibly_inlined_p): If java exceptions are in use
451 don't inline a decl unless it is explicitly marked inline.
452 * lex.c: (pragma_java_exceptions): New variable.
453 (handle_pragma_java_exceptions): Set pragma_java_exceptions.
454 * cp-tree.h (pragma_java_exceptions): Declare new variable.
456 2009-03-24 Jason Merrill <jason@redhat.com>
459 * name-lookup.c (pushdecl_maybe_friend): Check default args later.
461 2009-03-23 Jakub Jelinek <jakub@redhat.com>
464 * semantics.c (handle_omp_for_class_iterator): Swap cond operands and
465 code if iter is the second operand.
466 * parser.c (cp_parser_binary_expression): Add no_toplevel_fold_p
467 argument. If it is set, don't build the toplevel expression with
468 build_x_binary_op, but build2.
469 (cp_parser_assignment_expression, cp_parser_omp_for_incr): Adjust
471 (cp_parser_omp_for_cond): Don't assume the first operand of the
472 comparison must be decl.
474 2009-03-23 Jason Merrill <jason@redhat.com>
477 * pt.c (make_fnparm_pack): Split out from...
478 (instantiate_decl): ...here.
479 (tsubst_pack_expansion): Handle being called in a late-specified
483 * name-lookup.c (pushdecl_maybe_friend): Don't warn about shadowing
486 2009-03-20 Jason Merrill <jason@redhat.com>
489 * parser.c (cp_parser_direct_declarator): In a template, wrap
490 non-constant expression in NOP_EXPR with TREE_SIDE_EFFECTS set.
491 * pt.c (tsubst): Preserve it in a partial instantiation.
492 (dependent_type_p_r): Don't check value_dependent_expression_p.
493 * decl.c (compute_array_index_type): Don't check
494 value_dependent_expression_p if TREE_SIDE_EFFECTS.
497 * typeck2.c (check_narrowing): Don't complain about loss of
498 precision when converting a floating-point constant.
500 2009-03-19 Jakub Jelinek <jakub@redhat.com>
503 * parser.c (cp_parser_omp_for_cond): Don't check lhs if decl is NULL.
504 (cp_parser_omp_for_loop): Always use cp_parser_omp_for_cond.
506 2009-03-18 Jakub Jelinek <jakub@redhat.com>
508 * parser.c (struct cp_token): Reorder fields for 64-bit hosts.
511 2009-03-18 H.J. Lu <hongjiu.lu@intel.com>
514 * parser.c (cp_parser_explicit_specialization): Don't skip the
515 rest of the specialization when begin_specialization returns
518 2009-03-17 Jason Merrill <jason@redhat.com>
520 * decl.c (grokfndecl): Set DECL_CONTEXT on parms.
521 (duplicate_decls): Adjust DECL_CONTEXT of newdecl's parms.
522 * pt.c (check_explicit_specialization): Likewise.
523 (tsubst_copy) [PARM_DECL]: Return a dummy parm if we don't have a
524 local specialization.
525 * tree.c (cp_tree_equal) [PARM_DECL]: Check type and index, not name.
526 * decl2.c (parm_index): New fn.
527 * semantics.c (finish_decltype_type): Don't use describable_type.
528 * mangle.c (write_expression): Likewise. Mangle ALIGNOF_EXPR.
529 Give a sorry for unsupported codes rather than crash. Mangle
530 conversions with other than 1 operand. New mangling for PARM_DECL.
531 * operators.def (ALIGNOF_EXPR): Mangle as "az".
533 2009-03-17 Jing Yu <jingyu@google.com>
536 * method.c (use_thunk): Change is_thunk from crtl to cfun.
538 2009-03-17 Paolo Carlini <paolo.carlini@oracle.com>
541 * semantics.c (check_trait_type): New.
542 (finish_trait_expr): Use it.
544 2009-03-17 Jakub Jelinek <jakub@redhat.com>
546 * name-lookup.c (cp_emit_debug_info_for_using): Emit USING_STMTs
547 instead of calling imported_module_or_decl debug hook if
548 building_stmt_tree ().
549 * cp-gimplify.c (cp_gimplify_expr): Don't assert the first operand
553 * name-lookup.c (do_namespace_alias): Don't call global_decl debug
554 hook at function scope.
557 * cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
560 2009-03-09 Jakub Jelinek <jakub@redhat.com>
563 * semantics.c (finish_switch_cond): Don't call get_unwidened.
564 * decl.c (finish_case_label): Pass SWITCH_STMT_TYPE as 3rd argument
565 instead of TREE_TYPE (cond).
567 2009-03-08 H.J. Lu <hongjiu.lu@intel.com>
570 * parser.c (cp_parser_late_parsing_default_args): Continue
571 the loop when cp_parser_assignment_expression returns
574 2009-03-07 Jason Merrill <jason@redhat.com>
577 * init.c (build_new_1): Don't use a VLA type.
578 (build_vec_init): Handle getting a pointer for BASE.
580 2009-03-06 H.J. Lu <hongjiu.lu@intel.com>
583 * cp-tree.h: Check NO_DOT_IN_LABEL before NO_DOLLAR_IN_LABEL
584 when mangling symbols.
586 2009-03-06 Paolo Carlini <paolo.carlini@oracle.com>
589 * error.c (dump_expr): Don't try to print THROW_EXPRs in full.
591 2009-03-06 Alexandre Oliva <aoliva@redhat.com>
593 * decl.c (record_builtin_java_type): Use canonicalized integer
596 2009-03-04 Jason Merrill <jason@redhat.com>
599 * class.c (is_really_empty_class): New fn.
600 * cp-tree.h: Declare it.
601 * cp-objcp-common.c (cp_expr_size): Use it.
604 * semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
605 * parser.c (cp_parser_postfix_expression): Call it for
607 * tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
608 (get_first_fn): Likewise.
614 * decl.c (make_typename_type): Do look inside currently open classes.
615 * parser.c (cp_parser_lookup_name): Likewise.
616 (cp_parser_template_name): Likewise.
617 * pt.c (dependent_scope_p): New function.
618 * cp-tree.h: Declare it.
619 * class.c (currently_open_class): Return fast if T isn't a class.
621 2009-02-26 H.J. Lu <hongjiu.lu@intel.com>
624 * parser.c (cp_parser_mem_initializer): Return error_mark_node
625 if cp_parser_mem_initializer_id returns error_mark_node.
627 2009-02-24 Richard Guenther <rguenther@suse.de>
630 * pt.c (instantiate_decl): Do not instantiate extern, non-inline
633 2009-02-23 H.J. Lu <hongjiu.lu@intel.com>
636 * pt.c (coerce_template_template_parms): Return 0 if parameter
639 2009-02-23 Jason Merrill <jason@redhat.com>
641 * pt.c (unify): Call maybe_adjust_types_for_deduction when
642 deducing from an initializer list.
644 2009-02-20 Jason Merrill <jason@redhat.com>
647 * decl.c (grokdeclarator): Handle ~identifier.
649 2009-02-19 Jakub Jelinek <jakub@redhat.com>
652 * decl2.c (determine_visibility): If visibility changed and
653 DECL_RTL has been already set, call make_decl_rtl to update symbol
656 2009-02-19 H.J. Lu <hongjiu.lu@intel.com>
659 * cp-tree.h (maybe_commonize_var): New.
661 * decl.c (maybe_commonize_var): Make it extern.
663 * decl2.c (finish_anon_union): Call maybe_commonize_var.
665 2009-02-18 H.J. Lu <hongjiu.lu@intel.com>
668 * parser.c (cp_parser_enum_specifier): Apply all attributes.
670 2009-02-18 Jason Merrill <jason@redhat.com>
672 * cfns.h: Tweak pathname for cfns.gperf.
674 2009-02-13 Jason Merrill <jason@redhat.com>
677 * semantics.c (finish_call_expr): Change koenig_p parm to int.
678 If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
679 * cp-tree.h: Adjust prototype.
680 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
682 2009-02-12 Jason Merrill <jason@redhat.com>
685 * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
687 2009-02-11 Jason Merrill <jason@redhat.com>
690 * decl2.c (cp_write_global_declarations):
691 Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
694 * init.c (build_value_init_noctor): Split out from...
695 (build_value_init): ...here.
696 (expand_aggr_init_1): Handle value-initialization.
697 * cp-tree.h: Add declaration.
698 * class.c (type_has_user_provided_constructor):
699 Handle non-class arguments.
701 2009-02-10 Jason Merrill <jason@redhat.com>
704 * class.c (defaultable_fn_p): Handle ... properly.
707 * tree.c (lvalue_p_1): Condition rvalue ref handling on
708 treat_class_rvalues_as_lvalues, too.
710 2009-02-10 Paolo Carlini <paolo.carlini@oracle.com>
713 * typeck.c (build_x_array_ref): New.
714 * cp-tree.h: Declare it.
715 * pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
717 2009-02-09 Jason Merrill <jason@redhat.com>
720 * semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
721 * init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
722 * tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
723 * cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
724 for build_value_init TARGET_EXPR.
725 * cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
727 2009-02-06 Paolo Carlini <paolo.carlini@oracle.com>
731 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
733 2009-02-04 Jakub Jelinek <jakub@redhat.com>
736 * operators.def: Use COMPONENT_REF code for ->/pt operator again,
737 remove ./dt operator.
738 * mangle.c (write_expression): Handle COMPONENT_REF after handling
739 ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
740 write_string ("dt") instead of using operators.def.
742 2009-02-03 Jason Merrill <jason@redhat.com>
744 * typeck.c (cp_build_unary_op): Only complain about taking address
747 2009-02-03 Jakub Jelinek <jakub@redhat.com>
750 * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
753 * typeck2.c (digest_init_r): Don't call process_init_constructor
756 2009-02-03 Paolo Bonzini <bonzini@gnu.org>
759 * pt.c (convert_nontype_argument_function): Expect expr to be an
763 * typeck.c (merge_types): Call resolve_typename_type if only
764 one type is a typename.
766 2009-02-02 Jason Merrill <jason@redhat.com>
769 * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node
772 2009-02-01 Paolo Carlini <paolo.carlini@oracle.com>
775 * parser.c (cp_parser_pure_specifier): If there are no tokens left
776 do not call cp_lexer_consume_token.
778 2009-01-30 Jakub Jelinek <jakub@redhat.com>
781 * parser.c (cp_parser_already_scoped_statement): Handle __label__
784 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
787 * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
789 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
792 * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
794 2009-01-29 Paolo Carlini <paolo.carlini@oracle.com>
796 * typeck.c (invalid_nonstatic_memfn_p): Use
797 DECL_NONSTATIC_MEMBER_FUNCTION_P.
799 2009-01-27 Paolo Carlini <paolo.carlini@oracle.com>
802 * call.c (build_over_call): If convert_for_arg_passing returns
803 error_mark_node unconditionally return it.
805 2009-01-22 Adam Nemet <anemet@caviumnetworks.com>
807 * class.c (check_field_decls): Also inherit packed for bitfields
808 regardless of their type.
810 2009-01-22 Dodji Seketeli <dodji@redhat.com>
813 * decl2.c (grokfield): Reverting changes of PR c++/26693
814 (save_template_attributes): Likewise.
815 * decl.c (grokdeclarator): Likewise.
816 * name-lookup.c (pushdecl_maybe_friend): Likewise.
817 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
818 (append_type_to_template_for_access_check): Likewise.
819 * semantics.c (check_accessibility_of_qualified_id): Likewise.
820 * pt.c (instantiate_class_template, instantiate_template ): Likewise.
822 (resolve_type_name_type): Likewise.
823 (append_type_to_template_for_access_check): Likewise.
825 2009-01-21 Dodji Seketeli <dodji@redhat.com>
828 * decl2.c (grokfield): when a typedef appears in a
829 class, create the typedef variant type node for it.
830 (save_template_attributes): Creating typedef variant type node
832 * decl.c (grokdeclarator): If the typedef'ed struct/class was
833 anonymous, set the proper type name to all its type variants.
834 * name-lookup.c (pushdecl_maybe_friend): Reuse the
835 set_underlying_type function to install typedef variant types.
836 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
838 (append_type_to_template_for_access_check): New entry points.
839 * semantics.c (check_accessibility_of_qualified_id):
840 When a typedef that is a member of a class appears in a template,
841 add it to the template. It will be ...
842 * pt.c (instantiate_class_template, instantiate_template ): ... access
843 checked at template instantiation time.
844 (tsubst): Handle the case of being called with NULL args.
845 (resolve_type_name_type): The type name should be the name of the
847 (append_type_to_template_for_access_check): New entry point.
849 2009-01-19 Jason Merrill <jason@redhat.com>
852 * parser.c (cp_parser_unqualified_id): In a template,
854 * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
856 2009-01-16 Jason Merrill <jason@redhat.com>
859 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
860 * init.c (build_new): Don't call describable_type unless we
864 * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
867 * search.c (protected_accessible_p): N doesn't vary.
869 2009-01-15 Jason Merrill <jason@redhat.com>
872 * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
873 accept hidden friends.
875 2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
878 * decl.c (grokdeclarator): Check for a non namespace/class context.
880 2009-01-15 Jason Merrill <jason@redhat.com>
884 * tree.c (lvalue_p_1): Handle BASELINK. A COMPONENT_REF to
885 a function isn't necessarily an lvalue. Take tree, not const_tree.
886 (lvalue_p, real_lvalue_p): Take tree, not const_tree.
887 * typeck.c (lvalue_or_else): Likewise.
888 * cp-tree.h: Adjust prototypes.
890 2009-01-15 Steve Ellcey <sje@cup.hp.com>
893 * pt.c (tsubst): Check for NULL args.
895 2009-01-15 Dodji Seketeli <dodji@redhat.com>
898 * name-lookup.c (pushtag): Don't create members to types that are not
901 2009-01-14 Nick Clifton <nickc@redhat.com>
904 * parser.c: Pass cp_id_kind computed in
905 cp_parser_postfix_dot_deref_expression to
906 cp_parser_primary_expression.
908 2009-01-13 Jakub Jelinek <jakub@redhat.com>
911 * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
912 STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
915 2009-01-12 Jason Merrill <jason@redhat.com>
916 Steve Ellcey <sje@cup.hp.com>
919 * name-lookup.c (lookup_name_real): Keep looking past a hidden
922 2009-01-12 Dodji Seketeli <dodji@redhat.com>
925 * pt.c (parameter_of_template_p): New function.
926 * cp-tree.h: Declare it.
927 * name-lookup.c (binding_to_template_parms_of_scope_p): New
929 (outer_binding): Take template parameters in account when looking for
932 2009-01-12 Jason Merrill <jason@redhat.com>
935 * tree.c (pod_type_p): Return 1 for structs created by the back end.
937 2009-01-12 Jakub Jelinek <jakub@redhat.com>
940 * parser.c (cp_parser_builtin_offsetof): Allow `->' in
941 offsetof member-designator, handle it as `[0].'.
944 * decl.c (start_function): If grokdeclarator hasn't returned
945 FUNCTION_DECL nor error_mark_node, issue diagnostics.
947 2009-01-11 Jakub Jelinek <jakub@redhat.com>
950 * cp-gimplify.c (genericize_if_stmt): Renamed from ...
951 (gimplify_if_stmt): ... this.
952 (cp_gimplify_expr): Don't handle IF_STMT here.
953 (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
955 2009-01-10 Andrew Pinski <pinskia@gmail.com>
958 * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
961 * typeck2.c (build_functional_cast): Check for reference type and NULL
964 2009-01-09 Steve Ellcey <sje@cup.hp.com>
966 * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
968 2009-01-09 Jakub Jelinek <jakub@redhat.com>
971 * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
973 2009-01-09 John F. Carr <jfc@mit.edu>
976 * parser.c (cp_parser_class_specifier): Clear
977 parser->in_unbraced_linkage_specification_p while parsing class
980 2009-01-07 Jakub Jelinek <jakub@redhat.com>
983 * semantics.c (finish_goto_stmt): Convert destination to
986 2009-01-06 Jason Merrill <jason@redhat.com>
993 * pt.c (check_default_tmpl_args): Don't complain about
994 out-of-order parameter packs in the enclosing class
995 or parameter packs after default args.
996 (coerce_template_parms): If we have more than one
997 parameter pack, don't flatten argument packs.
998 (template_args_equal): Handle argument packs.
999 (comp_template_args): Don't flatten argument packs.
1000 (check_instantiated_arg): Split out from...
1001 (check_instantiated_args): Here. Handle arg packs.
1002 (convert_template_argument): Just check that nontype argument
1003 packs have the right type.
1005 2009-01-05 Dodji Seketeli <dodji@redhat.com>
1008 * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
1010 2009-01-05 Jason Merrill <jason@redhat.com>
1013 * typeck2.c (process_init_constructor_union): Handle union with
1016 * mangle.c (write_expression): Remove mangling for zero-operand
1020 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
1024 * class.c (defaultable_fn_p): Only operator== can be a copy
1025 assignment operator.
1027 2009-01-02 Jason Merrill <jason@redhat.com>
1030 * typeck2.c (process_init_constructor_union): Handle excess
1032 (process_init_constructor_record): Likewise.
1035 * typeck2.c (digest_init_r): Don't use process_init_constructor
1036 for non-aggregate classes.
1039 Copyright (C) 2009 Free Software Foundation, Inc.
1041 Copying and distribution of this file, with or without modification,
1042 are permitted in any medium without royalty provided the copyright
1043 notice and this notice are preserved.