1 2009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4 * parser.c (cp_parser_check_decl_spec): Drop redundant flags.
5 * error.c (pedwarn_cxx98): New.
6 * cp-tree.h (pedwarn_cxx98): Declare.
8 2009-04-20 Le-Chun Wu <lcwu@google.com>
11 * init.c (build_vec_init): Set TREE_NO_WARNING on the
12 compiler-generated INDIRECT_REF expression.
14 2009-04-20 Ian Lance Taylor <iant@google.com>
16 * typeck.c (build_function_call_vec): New function.
17 (cp_build_function_call): Only pass first parameter to
18 objc_rewrite_function_call.
19 (build_modify_expr): Add rhs_origtype parameter. Change all
21 * decl.c (finish_decl): Add origtype parameter. Change all
23 * semantics.c (finish_call_expr): Pass VEC to
24 resolve_overloaded_builtin.
26 2009-04-20 Ian Lance Taylor <iant@google.com>
28 * cp-tree.h (base_access): Change typedef to int.
29 * parser.c (cp_parser_omp_flush): Change 0 to OMP_CLAUSE_ERROR.
30 (cp_parser_omp_threadprivate): Likewise.
31 * pt.c (unify_pack_expansion): Add casts to enum type.
33 2009-04-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
37 * call.c (build_new_op): Save the original codes of operands
40 2009-04-18 Kazu Hirata <kazu@codesourcery.com>
42 * cp-tree.h: Remove the prototype for insert_block.
43 * decl.c (insert_block): Remove.
45 2009-04-16 Ian Lance Taylor <iant@google.com>
47 * cp-tree.h (enum tsubst_flags): Rename from enum tsubst_flags_t.
48 (tsubst_flags_t): Change typedef from enum type to int.
50 2009-04-16 Paolo Bonzini <bonzini@gnu.org>
52 * decl.c (check_initializer): Use TYPE_VECTOR_OPAQUE
53 instead of targetm.vector_opaque_p.
55 2009-04-15 Le-Chun Wu <lcwu@google.com>
58 * call.c (build_over_call): Set TREE_NO_WARNING on the
59 compiler-generated INDIRECT_REF expression.
60 * cvt.c (convert_to_void): Emit warning when stripping off
63 2009-04-14 Diego Novillo <dnovillo@google.com>
65 * parser.c (cp_parser_type_specifier_seq): Move call to
66 invoke_plugin_callbacks ...
67 (cp_parser_type_specifier_seq): ... here.
69 2009-04-14 Le-Chun Wu <lcwu@google.com>
71 * Make-lang.in: Modify dependencies of files including plugin.h.
72 * decl.c (finish_function): Call invoke_plugin_callbacks.
73 * parser.c (cp_parser_type_specifier): Call invoke_plugin_callbacks.
75 2009-04-14 Jason Merrill <jason@redhat.com>
78 * name-lookup.c (pushdecl_maybe_friend): Avoid all warnings
79 about shadowing by tentative parms.
81 2009-04-13 Jason Merrill <jason@redhat.com>
84 * call.c (build_over_call): Don't call memcpy if the target is
85 the same as the source.
87 2009-04-13 Jason Merrill <jason@redhat.com>
90 * pt.c (uses_template_parms): Handle CONSTRUCTOR.
92 2009-04-12 Jason Merrill <jason@redhat.com>
95 * call.c (joust): Don't crash on variadic fn.
97 2009-04-10 Jason Merrill <jason@redhat.com>
100 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Return
101 if we see a close brace without an open brace.
103 2008-04-10 H.J. Lu <hongjiu.lu@intel.com>
105 * parser.c (cp_parser_class_specifier): Remove the unused
106 has_trailing_semicolon.
108 2009-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
111 * parser.c (cp_parser_check_template_parameters): Take a
112 cp_declarator parameter.
113 (cp_parser_elaborated_type_specifier): Update to
114 cp_parser_check_template_parameters.
115 (cp_parser_class_head): Likewise.
116 (cp_parser_check_declarator_template_parameters): Likewise.
117 (cp_parser_check_template_parameters): Handle first the non-error
118 conditions. Give more accurate diagnostics if a declarator is
121 2009-04-08 Jason Merrill <jason@redhat.com>
124 * error.c (dump_aggr_type): Chase template typedefs if
125 -fno-pretty-templates.
127 2009-04-08 Dodji Seketeli <dodji@redhat.com>
130 * parser.c (cp_parser_enumerator_definition): Make sure the
131 initializer of the enumerator doesn't contain any bare parameter pack.
133 2009-04-07 Jason Merrill <jason@redhat.com>
136 * name-lookup.c (merge_functions): Keep multiple extern "C" functions.
137 * call.c (joust): Complain about mismatched default arguments
138 in extern "C" functions.
139 * class.c (resolve_address_of_overloaded_function): Handle multiple
140 extern "C" functions.
141 * pt.c (resolve_overloaded_unification): Likewise.
143 2009-04-07 Jason Merrill <jason@redhat.com>
146 * error.c (dump_function_decl): Don't pretty-print templates
147 if -fno-pretty-templates.
148 (count_non_default_template_args): Print all args if
149 -fno-pretty-templates.
151 2009-04-06 Jason Merrill <jason@redhat.com>
154 * pt.c (fn_type_unification): For DEDUCE_EXACT check that
155 the deduced template arguments give us the parameter types
158 2009-04-05 Giovanni Bajo <giovannibajo@libero.it>
159 Jason Merrill <jason@redhat.com>
162 * error.c (count_non_default_template_args): New fn.
163 (dump_template_parms): Call it.
164 (dump_template_argument_list): Call it. Add parms parm.
165 (dump_template_argument): Adjust call to dump_template_argument_list.
166 (dump_type, dump_decl): Likewise.
167 (dump_template_bindings): Refactor logic.
169 2009-04-03 Jason Merrill <jason@redhat.com>
172 * error.c (dump_template_bindings): Look through typedefs in
174 (dump_type) [TYPENAME_TYPE]: Print the typedef name if any.
175 (find_typenames_r): Also collect typedefs.
176 * pt.c (unify): Strip typedefs.
179 * semantics.c (finish_id_expression): Don't assume a dependent
180 member of the current instantiation isn't a valid integral
181 constant expression. Check dependent_scope_p.
182 * pt.c (dependent_scope_p): Check TYPE_P.
183 (tsubst_copy): If args is null, just return.
185 2009-04-02 Jason Merrill <jason@redhat.com>
188 * error.c (find_typenames, find_typenames_r): New fns.
189 (dump_function_decl): Call find_typenames.
190 (dump_template_bindings): Print typenames as well.
191 * pt.c (tsubst): Non-static.
192 * cp-tree.h: Declare it.
194 2009-04-02 Dodji Seketeli <dodji@redhat.com>
197 * decl2.c (grokfield): when a typedef appears in a
198 class, create the typedef variant type node for it.
199 (save_template_attributes): Creating typedef variant type node
201 * decl.c (grokdeclarator): If the typedef'ed struct/class was
202 anonymous, set the proper type name to all its type variants.
203 (xref_basetypes) : Fixup the variant types after setting
205 * name-lookup.c (pushdecl_maybe_friend): Reuse the
206 set_underlying_type function to install typedef variant types.
207 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
209 (append_type_to_template_for_access_check): New entry points.
210 * semantics.c (check_accessibility_of_qualified_id):
211 When a typedef that is a member of a class appears in a template,
212 add it to the template. It will be ...
213 * class.c (finish_struct_bits): Split type variant fixup into ...
214 (fixup_type_variants): A new entry point.
215 * pt.c (instantiate_class_template, instantiate_template ): ... access
216 checked at template instantiation time.
217 (resolve_type_name_type): The type name should be the name of the
219 (retrieve_specialization): Specializations of template typedefs aren't
220 to looked up in DECL_TEMPLATE_INSTANTIATIONS (tmpl).
221 (append_type_to_template_for_access_check): New entry point.
222 (tsubst_decl): For typedefs, build the variant type from the correct
224 (get_class_bindings): Fix function comment.
225 (perform_typedefs_access_check): New entry point.
227 2009-03-31 Jason Merrill <jason@redhat.com>
230 * name-lookup.c (pushdecl_maybe_friend): Diagnose mismatched
231 extern "C" declarations.
234 * semantics.c (finish_non_static_data_member): Allow such references
235 without an associated object in sizeof/decltype/alignof.
237 * ptree.c (cxx_print_decl): Pretty-print full name of
239 (cxx_print_type): Pretty-print full name of class.
241 * decl.c (grokdeclarator): Reject pointer to qualified function
244 PR c++/37806, core issue 547
245 * typeck.c (cp_apply_type_quals_to_decl): Don't apply any quals
247 * tree.c (cp_build_qualified_type_real): Don't apply restrict to a
249 * decl.h (enum decl_context): Add TEMPLATE_TYPE_ARG.
250 * decl.c (groktypename): Add is_template_arg parameter.
251 (grokdeclarator): Allow function cv-quals on a template type arg.
252 * parser.c (cp_parser_new_type_id, cp_parser_type_id): Add
253 is_template_arg argument in calls to groktypename.
254 * cp-tree.h: Adjust prototype.
255 * error.c (dump_type_prefix, dump_type_suffix): Fix plain
256 FUNCTION_TYPE printing.
258 * mangle.c (write_expression): Mangle dependent name as
261 PR c++/38030, 38850, 39070
262 * pt.c (type_dependent_expression_p_push): New fn.
263 (tsubst_copy_and_build) [CALL_EXPR]: Only do arg-dep lookup when the
264 substitution makes the call non-dependent. Preserve koenig_p.
265 * parser.c (cp_parser_postfix_expression): Only do arg-dep lookup
266 for non-dependent calls.
267 * semantics.c (finish_call_expr): Revert earlier changes.
268 * cp-tree.h: Revert change to finish_call_expr prototype.
270 2009-03-29 Joseph Myers <joseph@codesourcery.com>
272 PR preprocessor/34695
273 * cp-tree.h (cp_cpp_error): Remove.
274 * error.c (cp_cpp_error): Remove.
275 * parser.c (cp_lexer_new_main): Set done_lexing instead of
276 client_diagnostic and error callback.
278 2009-03-28 Paolo Bonzini <bonzini@gnu.org>
280 * cp/cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
281 * cp/cp-objcp-common.c (cxx_staticp): Remove.
282 * cp/cp-tree.h (cxx_staticp): Remove.
284 2009-03-28 Jakub Jelinek <jakub@redhat.com>
287 * parser.c (cp_parser_postfix_expression): Don't call
288 warning_if_disallowed_function_p.
290 2009-03-27 Jan Hubicka <jh@suse.cz>
292 * except.c (choose_personality_routine): Set terminate_node to abort
295 2009-03-27 Dodji Seketeli <dodji@redhat.com>
296 Jakub Jelinek <jakub@redhat.com>
299 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P): Define.
300 (cp_function_decl_explicit_p): New prototype.
301 * cp-objcp-common.c (cp_function_decl_explicit_p): New function.
303 2009-03-27 Andrew Pinski <andrew_pinski@playstation.sony.com>
306 * parser.c (cp_parser_elaborated_type_specifier): If we have a
307 typename tag and don't have either a TYPE_DECL or a
308 TEMPLATE_ID_EXPR, set the type to NULL.
310 2009-03-27 Simon Martin <simartin@users.sourceforge.net>
313 * decl.c (grokdeclarator): Reject [con|de]stuctors in a non-class
316 2009-03-27 Simon Martin <simartin@users.sourceforge.net>
319 * decl.c (check_array_designated_initializer): Handle error_mark_node.
321 2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
324 * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
326 2009-03-26 Andrew Haley <aph@redhat.com>
329 * decl2.c (possibly_inlined_p): If java exceptions are in use
330 don't inline a decl unless it is explicitly marked inline.
331 * lex.c: (pragma_java_exceptions): New variable.
332 (handle_pragma_java_exceptions): Set pragma_java_exceptions.
333 * cp-tree.h (pragma_java_exceptions): Declare new variable.
335 2009-03-24 Jason Merrill <jason@redhat.com>
338 * name-lookup.c (pushdecl_maybe_friend): Check default args later.
340 2009-03-23 Jakub Jelinek <jakub@redhat.com>
343 * semantics.c (handle_omp_for_class_iterator): Swap cond operands and
344 code if iter is the second operand.
345 * parser.c (cp_parser_binary_expression): Add no_toplevel_fold_p
346 argument. If it is set, don't build the toplevel expression with
347 build_x_binary_op, but build2.
348 (cp_parser_assignment_expression, cp_parser_omp_for_incr): Adjust
350 (cp_parser_omp_for_cond): Don't assume the first operand of the
351 comparison must be decl.
353 2009-03-23 Jason Merrill <jason@redhat.com>
356 * pt.c (make_fnparm_pack): Split out from...
357 (instantiate_decl): ...here.
358 (tsubst_pack_expansion): Handle being called in a late-specified
362 * name-lookup.c (pushdecl_maybe_friend): Don't warn about shadowing
365 2009-03-20 Jason Merrill <jason@redhat.com>
368 * parser.c (cp_parser_direct_declarator): In a template, wrap
369 non-constant expression in NOP_EXPR with TREE_SIDE_EFFECTS set.
370 * pt.c (tsubst): Preserve it in a partial instantiation.
371 (dependent_type_p_r): Don't check value_dependent_expression_p.
372 * decl.c (compute_array_index_type): Don't check
373 value_dependent_expression_p if TREE_SIDE_EFFECTS.
376 * typeck2.c (check_narrowing): Don't complain about loss of
377 precision when converting a floating-point constant.
379 2009-03-19 Jakub Jelinek <jakub@redhat.com>
382 * parser.c (cp_parser_omp_for_cond): Don't check lhs if decl is NULL.
383 (cp_parser_omp_for_loop): Always use cp_parser_omp_for_cond.
385 2009-03-18 Jakub Jelinek <jakub@redhat.com>
387 * parser.c (struct cp_token): Reorder fields for 64-bit hosts.
390 2009-03-18 H.J. Lu <hongjiu.lu@intel.com>
393 * parser.c (cp_parser_explicit_specialization): Don't skip the
394 rest of the specialization when begin_specialization returns
397 2009-03-17 Jason Merrill <jason@redhat.com>
399 * decl.c (grokfndecl): Set DECL_CONTEXT on parms.
400 (duplicate_decls): Adjust DECL_CONTEXT of newdecl's parms.
401 * pt.c (check_explicit_specialization): Likewise.
402 (tsubst_copy) [PARM_DECL]: Return a dummy parm if we don't have a
403 local specialization.
404 * tree.c (cp_tree_equal) [PARM_DECL]: Check type and index, not name.
405 * decl2.c (parm_index): New fn.
406 * semantics.c (finish_decltype_type): Don't use describable_type.
407 * mangle.c (write_expression): Likewise. Mangle ALIGNOF_EXPR.
408 Give a sorry for unsupported codes rather than crash. Mangle
409 conversions with other than 1 operand. New mangling for PARM_DECL.
410 * operators.def (ALIGNOF_EXPR): Mangle as "az".
412 2009-03-17 Jing Yu <jingyu@google.com>
415 * method.c (use_thunk): Change is_thunk from crtl to cfun.
417 2009-03-17 Paolo Carlini <paolo.carlini@oracle.com>
420 * semantics.c (check_trait_type): New.
421 (finish_trait_expr): Use it.
423 2009-03-17 Jakub Jelinek <jakub@redhat.com>
425 * name-lookup.c (cp_emit_debug_info_for_using): Emit USING_STMTs
426 instead of calling imported_module_or_decl debug hook if
427 building_stmt_tree ().
428 * cp-gimplify.c (cp_gimplify_expr): Don't assert the first operand
432 * name-lookup.c (do_namespace_alias): Don't call global_decl debug
433 hook at function scope.
436 * cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
439 2009-03-09 Jakub Jelinek <jakub@redhat.com>
442 * semantics.c (finish_switch_cond): Don't call get_unwidened.
443 * decl.c (finish_case_label): Pass SWITCH_STMT_TYPE as 3rd argument
444 instead of TREE_TYPE (cond).
446 2009-03-08 H.J. Lu <hongjiu.lu@intel.com>
449 * parser.c (cp_parser_late_parsing_default_args): Continue
450 the loop when cp_parser_assignment_expression returns
453 2009-03-07 Jason Merrill <jason@redhat.com>
456 * init.c (build_new_1): Don't use a VLA type.
457 (build_vec_init): Handle getting a pointer for BASE.
459 2009-03-06 H.J. Lu <hongjiu.lu@intel.com>
462 * cp-tree.h: Check NO_DOT_IN_LABEL before NO_DOLLAR_IN_LABEL
463 when mangling symbols.
465 2009-03-06 Paolo Carlini <paolo.carlini@oracle.com>
468 * error.c (dump_expr): Don't try to print THROW_EXPRs in full.
470 2009-03-06 Alexandre Oliva <aoliva@redhat.com>
472 * decl.c (record_builtin_java_type): Use canonicalized integer
475 2009-03-04 Jason Merrill <jason@redhat.com>
478 * class.c (is_really_empty_class): New fn.
479 * cp-tree.h: Declare it.
480 * cp-objcp-common.c (cp_expr_size): Use it.
483 * semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
484 * parser.c (cp_parser_postfix_expression): Call it for
486 * tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
487 (get_first_fn): Likewise.
493 * decl.c (make_typename_type): Do look inside currently open classes.
494 * parser.c (cp_parser_lookup_name): Likewise.
495 (cp_parser_template_name): Likewise.
496 * pt.c (dependent_scope_p): New function.
497 * cp-tree.h: Declare it.
498 * class.c (currently_open_class): Return fast if T isn't a class.
500 2009-02-26 H.J. Lu <hongjiu.lu@intel.com>
503 * parser.c (cp_parser_mem_initializer): Return error_mark_node
504 if cp_parser_mem_initializer_id returns error_mark_node.
506 2009-02-24 Richard Guenther <rguenther@suse.de>
509 * pt.c (instantiate_decl): Do not instantiate extern, non-inline
512 2009-02-23 H.J. Lu <hongjiu.lu@intel.com>
515 * pt.c (coerce_template_template_parms): Return 0 if parameter
518 2009-02-23 Jason Merrill <jason@redhat.com>
520 * pt.c (unify): Call maybe_adjust_types_for_deduction when
521 deducing from an initializer list.
523 2009-02-20 Jason Merrill <jason@redhat.com>
526 * decl.c (grokdeclarator): Handle ~identifier.
528 2009-02-19 Jakub Jelinek <jakub@redhat.com>
531 * decl2.c (determine_visibility): If visibility changed and
532 DECL_RTL has been already set, call make_decl_rtl to update symbol
535 2009-02-19 H.J. Lu <hongjiu.lu@intel.com>
538 * cp-tree.h (maybe_commonize_var): New.
540 * decl.c (maybe_commonize_var): Make it extern.
542 * decl2.c (finish_anon_union): Call maybe_commonize_var.
544 2009-02-18 H.J. Lu <hongjiu.lu@intel.com>
547 * parser.c (cp_parser_enum_specifier): Apply all attributes.
549 2009-02-18 Jason Merrill <jason@redhat.com>
551 * cfns.h: Tweak pathname for cfns.gperf.
553 2009-02-13 Jason Merrill <jason@redhat.com>
556 * semantics.c (finish_call_expr): Change koenig_p parm to int.
557 If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
558 * cp-tree.h: Adjust prototype.
559 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
561 2009-02-12 Jason Merrill <jason@redhat.com>
564 * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
566 2009-02-11 Jason Merrill <jason@redhat.com>
569 * decl2.c (cp_write_global_declarations):
570 Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
573 * init.c (build_value_init_noctor): Split out from...
574 (build_value_init): ...here.
575 (expand_aggr_init_1): Handle value-initialization.
576 * cp-tree.h: Add declaration.
577 * class.c (type_has_user_provided_constructor):
578 Handle non-class arguments.
580 2009-02-10 Jason Merrill <jason@redhat.com>
583 * class.c (defaultable_fn_p): Handle ... properly.
586 * tree.c (lvalue_p_1): Condition rvalue ref handling on
587 treat_class_rvalues_as_lvalues, too.
589 2009-02-10 Paolo Carlini <paolo.carlini@oracle.com>
592 * typeck.c (build_x_array_ref): New.
593 * cp-tree.h: Declare it.
594 * pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
596 2009-02-09 Jason Merrill <jason@redhat.com>
599 * semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
600 * init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
601 * tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
602 * cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
603 for build_value_init TARGET_EXPR.
604 * cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
606 2009-02-06 Paolo Carlini <paolo.carlini@oracle.com>
610 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
612 2009-02-04 Jakub Jelinek <jakub@redhat.com>
615 * operators.def: Use COMPONENT_REF code for ->/pt operator again,
616 remove ./dt operator.
617 * mangle.c (write_expression): Handle COMPONENT_REF after handling
618 ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
619 write_string ("dt") instead of using operators.def.
621 2009-02-03 Jason Merrill <jason@redhat.com>
623 * typeck.c (cp_build_unary_op): Only complain about taking address
626 2009-02-03 Jakub Jelinek <jakub@redhat.com>
629 * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
632 * typeck2.c (digest_init_r): Don't call process_init_constructor
635 2009-02-03 Paolo Bonzini <bonzini@gnu.org>
638 * pt.c (convert_nontype_argument_function): Expect expr to be an
642 * typeck.c (merge_types): Call resolve_typename_type if only
643 one type is a typename.
645 2009-02-02 Jason Merrill <jason@redhat.com>
648 * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node
651 2009-02-01 Paolo Carlini <paolo.carlini@oracle.com>
654 * parser.c (cp_parser_pure_specifier): If there are no tokens left
655 do not call cp_lexer_consume_token.
657 2009-01-30 Jakub Jelinek <jakub@redhat.com>
660 * parser.c (cp_parser_already_scoped_statement): Handle __label__
663 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
666 * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
668 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
671 * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
673 2009-01-29 Paolo Carlini <paolo.carlini@oracle.com>
675 * typeck.c (invalid_nonstatic_memfn_p): Use
676 DECL_NONSTATIC_MEMBER_FUNCTION_P.
678 2009-01-27 Paolo Carlini <paolo.carlini@oracle.com>
681 * call.c (build_over_call): If convert_for_arg_passing returns
682 error_mark_node unconditionally return it.
684 2009-01-22 Adam Nemet <anemet@caviumnetworks.com>
686 * class.c (check_field_decls): Also inherit packed for bitfields
687 regardless of their type.
689 2009-01-22 Dodji Seketeli <dodji@redhat.com>
692 * decl2.c (grokfield): Reverting changes of PR c++/26693
693 (save_template_attributes): Likewise.
694 * decl.c (grokdeclarator): Likewise.
695 * name-lookup.c (pushdecl_maybe_friend): Likewise.
696 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
697 (append_type_to_template_for_access_check): Likewise.
698 * semantics.c (check_accessibility_of_qualified_id): Likewise.
699 * pt.c (instantiate_class_template, instantiate_template ): Likewise.
701 (resolve_type_name_type): Likewise.
702 (append_type_to_template_for_access_check): Likewise.
704 2009-01-21 Dodji Seketeli <dodji@redhat.com>
707 * decl2.c (grokfield): when a typedef appears in a
708 class, create the typedef variant type node for it.
709 (save_template_attributes): Creating typedef variant type node
711 * decl.c (grokdeclarator): If the typedef'ed struct/class was
712 anonymous, set the proper type name to all its type variants.
713 * name-lookup.c (pushdecl_maybe_friend): Reuse the
714 set_underlying_type function to install typedef variant types.
715 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
717 (append_type_to_template_for_access_check): New entry points.
718 * semantics.c (check_accessibility_of_qualified_id):
719 When a typedef that is a member of a class appears in a template,
720 add it to the template. It will be ...
721 * pt.c (instantiate_class_template, instantiate_template ): ... access
722 checked at template instantiation time.
723 (tsubst): Handle the case of being called with NULL args.
724 (resolve_type_name_type): The type name should be the name of the
726 (append_type_to_template_for_access_check): New entry point.
728 2009-01-19 Jason Merrill <jason@redhat.com>
731 * parser.c (cp_parser_unqualified_id): In a template,
733 * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
735 2009-01-16 Jason Merrill <jason@redhat.com>
738 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
739 * init.c (build_new): Don't call describable_type unless we
743 * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
746 * search.c (protected_accessible_p): N doesn't vary.
748 2009-01-15 Jason Merrill <jason@redhat.com>
751 * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
752 accept hidden friends.
754 2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
757 * decl.c (grokdeclarator): Check for a non namespace/class context.
759 2009-01-15 Jason Merrill <jason@redhat.com>
763 * tree.c (lvalue_p_1): Handle BASELINK. A COMPONENT_REF to
764 a function isn't necessarily an lvalue. Take tree, not const_tree.
765 (lvalue_p, real_lvalue_p): Take tree, not const_tree.
766 * typeck.c (lvalue_or_else): Likewise.
767 * cp-tree.h: Adjust prototypes.
769 2009-01-15 Steve Ellcey <sje@cup.hp.com>
772 * pt.c (tsubst): Check for NULL args.
774 2009-01-15 Dodji Seketeli <dodji@redhat.com>
777 * name-lookup.c (pushtag): Don't create members to types that are not
780 2009-01-14 Nick Clifton <nickc@redhat.com>
783 * parser.c: Pass cp_id_kind computed in
784 cp_parser_postfix_dot_deref_expression to
785 cp_parser_primary_expression.
787 2009-01-13 Jakub Jelinek <jakub@redhat.com>
790 * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
791 STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
794 2009-01-12 Jason Merrill <jason@redhat.com>
795 Steve Ellcey <sje@cup.hp.com>
798 * name-lookup.c (lookup_name_real): Keep looking past a hidden
801 2009-01-12 Dodji Seketeli <dodji@redhat.com>
804 * pt.c (parameter_of_template_p): New function.
805 * cp-tree.h: Declare it.
806 * name-lookup.c (binding_to_template_parms_of_scope_p): New
808 (outer_binding): Take template parameters in account when looking for
811 2009-01-12 Jason Merrill <jason@redhat.com>
814 * tree.c (pod_type_p): Return 1 for structs created by the back end.
816 2009-01-12 Jakub Jelinek <jakub@redhat.com>
819 * parser.c (cp_parser_builtin_offsetof): Allow `->' in
820 offsetof member-designator, handle it as `[0].'.
823 * decl.c (start_function): If grokdeclarator hasn't returned
824 FUNCTION_DECL nor error_mark_node, issue diagnostics.
826 2009-01-11 Jakub Jelinek <jakub@redhat.com>
829 * cp-gimplify.c (genericize_if_stmt): Renamed from ...
830 (gimplify_if_stmt): ... this.
831 (cp_gimplify_expr): Don't handle IF_STMT here.
832 (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
834 2009-01-10 Andrew Pinski <pinskia@gmail.com>
837 * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
840 * typeck2.c (build_functional_cast): Check for reference type and NULL
843 2009-01-09 Steve Ellcey <sje@cup.hp.com>
845 * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
847 2009-01-09 Jakub Jelinek <jakub@redhat.com>
850 * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
852 2009-01-09 John F. Carr <jfc@mit.edu>
855 * parser.c (cp_parser_class_specifier): Clear
856 parser->in_unbraced_linkage_specification_p while parsing class
859 2009-01-07 Jakub Jelinek <jakub@redhat.com>
862 * semantics.c (finish_goto_stmt): Convert destination to
865 2009-01-06 Jason Merrill <jason@redhat.com>
872 * pt.c (check_default_tmpl_args): Don't complain about
873 out-of-order parameter packs in the enclosing class
874 or parameter packs after default args.
875 (coerce_template_parms): If we have more than one
876 parameter pack, don't flatten argument packs.
877 (template_args_equal): Handle argument packs.
878 (comp_template_args): Don't flatten argument packs.
879 (check_instantiated_arg): Split out from...
880 (check_instantiated_args): Here. Handle arg packs.
881 (convert_template_argument): Just check that nontype argument
882 packs have the right type.
884 2009-01-05 Dodji Seketeli <dodji@redhat.com>
887 * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
889 2009-01-05 Jason Merrill <jason@redhat.com>
892 * typeck2.c (process_init_constructor_union): Handle union with
895 * mangle.c (write_expression): Remove mangling for zero-operand
899 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
903 * class.c (defaultable_fn_p): Only operator== can be a copy
906 2009-01-02 Jason Merrill <jason@redhat.com>
909 * typeck2.c (process_init_constructor_union): Handle excess
911 (process_init_constructor_record): Likewise.
914 * typeck2.c (digest_init_r): Don't use process_init_constructor
915 for non-aggregate classes.