OSDN Git Service

/gcc/cp
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2009-10-30  Jerry Quinn  <jlquinn@optonline.net>
2
3         * mangle.c (mangle_type_string_for_rtti): Reapply 153734.
4         (needs_fake_anon): Likewise.
5         (write_name): Likewise.
6         (write_nested_name): Likewise.
7         * cp-tree.h (mangle_type_string_for_rtti): Likewise.
8         (get_anonymous_namespace): Likewise.
9         * name-lookup.c (get_anonymous_namespace_name): Likewise.
10         * rtti.c (tinfo_name): Likewise, with +1 in the second
11         build_string call fixed.
12         (tinfo_base_init): Likewise.
13
14 2009-10-30  Jason Merrill  <jason@redhat.com>
15
16         Revert:
17         * decl.c (cp_fname_init): Correct build_string argument.
18
19 2009-10-30  Jerry Quinn  <jlquinn@optonline.net>
20
21         * mangle.c (mangle_type_string_for_rtti): Revert 153734.
22         (needs_fake_anon): Likewise.
23         (write_name): Likewise.
24         (write_nested_name): Likewise.
25         * cp-tree.h (mangle_type_string_for_rtti): Likewise.
26         (get_anonymous_namespace): Likewise.
27         * name-lookup.c (get_anonymous_namespace_name): Likewise.
28         * rtti.c (tinfo_name): Likewise.
29         (tinfo_base_init): Likewise.
30
31 2009-10-30  Dodji Seketeli  <dodji@redhat.com>
32
33         PR c++/41863
34         * pt.c (iterative_hash_template_arg): articifial parms
35         don't have DECL_PARM_INDEX set. Do not hash it.
36
37 2009-10-28  Jerry Quinn  <jlquinn@optonline.net>
38
39         * mangle.c (mangle_type_string_for_rtti): Revert r149964.
40         (needs_fake_anon): Likewise.
41         (write_name): Likewise.
42         (write_nested_name): Likewise.
43         * cp-tree.h (mangle_type_string_for_rtti): Likewise.
44         (get_anonymous_namespace): Likewise.
45         * name-lookup.c (get_anonymous_namespace_name): Likewise.
46         * rtti.c (tinfo_name): Insert '*' in front of private names.
47         (tinfo_base_init): Use it.
48
49 2009-10-28  Jason Merrill  <jason@redhat.com>
50
51         Core issue 812, 861
52         * name-lookup.c (set_decl_namespace): Deal properly with inline
53         namespaces.
54         (qualified_lookup_using_namespace): Overhaul.
55         * pt.c (print_candidates): Handle getting an OVERLOAD.
56
57 2009-10-28  Jason Merrill  <jason@redhat.com>
58
59         * decl.c (cp_fname_init): Correct build_string argument.
60
61 2009-10-27  Jason Merrill  <jason@redhat.com>
62
63         Allow no-capture lambdas to convert to function pointer.
64         * semantics.c (maybe_add_lambda_conv_op): New.
65         * parser.c (cp_parser_lambda_expression): Call it.
66         (cp_parser_lambda_declarator_opt): Make op() static if
67         no captures.
68         * mangle.c (write_closure_type_name): Adjust.
69         * semantics.c (finish_this_expr): Adjust.
70         * decl.c (grok_op_properties): Allow it.
71         * call.c (build_user_type_conversion_1): Handle static conversion op.
72         (build_op_call): And op().
73
74 2009-10-26  Jakub Jelinek  <jakub@redhat.com>
75
76         PR debug/41828
77         * cp-lang.c (cxx_dwarf_name): Return NULL instead of
78         <anonymous ...> for anonymous aggregate names.
79
80 2009-10-26  Jason Merrill  <jason@redhat.com>
81
82         PR c++/38796, Core issue 906
83         * cp-tree.h (DECL_DEFAULTED_OUTSIDE_CLASS_P): New.
84         (DECL_DEFAULTED_IN_CLASS_P): New.
85         * class.c (user_provided_p): Non-static.
86         (check_methods): Use it.
87         (check_bases_and_members): Check defaulted fns.
88         (defaultable_fn_p): Move and rename to...
89         * method.c (defaultable_fn_check): ...this.
90         (defaulted_late_check): New.
91         * pt.c (tsubst_decl): Call it.
92         * decl2.c (grokfield): Adjust.
93         * decl.c (cp_finish_decl): Adjust.
94         (grok_special_member_properties): Use user_provided_p.
95
96 2009-10-26  Dodji Seketeli  <dodji@redhat.com>
97
98         PR c++/41785
99         * pt.c (template_args_equal): Handle comparison of
100         an ARGUMENT_PACK_SELECT node with the arguments node it selects into.
101         * cp-tree.def: Fix a typo in the description of TYPE_PACK_EXPANSION.
102
103 2009-10-26  Dodji Seketeli  <dodji@redhat.com>
104
105         PR c++/41020
106         * decl.c (decls_match): Use DECL_IS_BUILTIN instead of
107         DECL_BUILT_IN.
108
109 2009-10-23  Dodji Seketeli  <dodji@redhat.com>
110
111         PR c++/40808
112         * mangle.c (write_template_args): Allow mangling of empty template
113         argument list. Updated function comments.
114
115 2009-10-23  Jason Merrill  <jason@redhat.com>
116
117         * semantics.c (lambda_expr_this_capture): Use thisify_lambda_field.
118
119         * semantics.c (outer_lambda_capture_p): New fn.
120         (thisify_lambda_field): Factor out...
121         (add_default_capture): ...from here.
122         (finish_id_expression): Use them.
123
124         Core issue 899
125         * call.c (add_function_candidate): Only permit explicit conversion
126         ops if copy ctor was called with a single argument.
127
128         * call.c (initialize_reference): Tweak error message.
129
130 2009-10-21  Jakub Jelinek  <jakub@redhat.com>
131
132         * mangle.c (finish_mangling_get_identifier): Use
133         obstack_base (mangle_obstack) instead of name_base.
134
135 2009-10-19  Jakub Jelinek  <jakub@redhat.com>
136
137         * parser.c (cp_lexer_print_token, cp_parser_is_string_literal,
138         cp_parser_string_literal, cp_parser_primary_expression): Likewise.
139         (cp_lexer_get_preprocessor_token): Use C_LEX_STRING_JOIN instead
140         of C_LEX_RAW_STRINGS.
141
142 2009-10-15  Jason Merrill  <jason@redhat.com>
143
144         PR c++/38888
145         * error.c (dump_template_bindings): Wrap argument packs in {}.
146
147         PR c++/38798
148         * parser.c (CP_PARSER_FLAGS_NO_TYPE_DEFINITIONS): New.
149         (cp_parser_type_specifier): Don't try to parse a class-specifier
150         or enum-specifier in that case.
151         (cp_parser_trailing_type_id): New.
152         (cp_parser_late_return_type_opt): Call it.
153         (cp_parser_type_id_1): Add is_trailing_return parm.
154         (cp_parser_type_specifier_seq): Likewise.
155
156 2009-10-14  Jason Merrill  <jason@redhat.com>
157
158         PR c++/39866
159         * call.c (print_z_candidates): Don't print deleted candidates.
160         (print_z_candidate): Note deleted candidates.
161
162 2009-10-14  Larry Evans  <cppljevans@suddenlink.net>
163
164         PR c++/40092
165         * tree.c (cp_tree_equal): Add test for TEMPLATE_PARM_PARAMETER_PACK
166         equality.
167
168 2009-10-12  Jason Merrill  <jason@redhat.com>
169
170         PR c++/37875
171         * parser.c (cp_parser_decltype): Set greater_than_is_operator_p.
172
173         PR c++/37766
174         * pt.c (type_unification_real): Call convert_template_argument
175         for function default template arguments.
176         (check_default_tmpl_args): Suggest -std=c++0x when function default
177         template args seen in C++98 mode.
178
179 2009-10-11  Jason Merrill  <jason@redhat.com>
180
181         PR c++/37204
182         * typeck.c (build_reinterpret_cast_1): Handle rvalue refs
183         properly.
184
185 2009-10-11  Richard Guenther  <rguenther@suse.de>
186
187         * tree.c (cp_free_lang_data): Drop anonymous aggregate names.
188
189 2009-10-08  Jason Merrill  <jason@redhat.com>
190
191         PR c++/36816
192         * pt.c (maybe_adjust_types_for_deduction): Do rvalue ref adjustment
193         even when DEDUCE_EXACT.
194
195         PR c++/37177
196         * pt.c (resolve_nondeduced_context): New.
197         * cvt.c (convert_to_void): Call it.
198         * semantics.c (finish_decltype_type): Likewise.
199         * typeck.c (decay_conversion): Here too.
200         * pt.c (tsubst_decl): Don't clobber input_location.
201         Don't register a bad specialization.
202
203 2009-10-07  Gabriel Dos Reis  <gdr@cs.tamu.edu>
204
205         * cp-tree.h: Fix location of documentation for DECL_LANG_FLAG_7.
206
207 2009-10-07  Jason Merrill  <jason@redhat.com>
208
209         PR c++/39863
210         * pt.c (tsubst_pack_expansion): Don't do anything now if we
211         have incomplete packs of different lengths.
212
213         PR c++/41038
214         * tree.c (build_qualified_name): Call convert_from_reference.
215
216 2009-10-06  Jason Merrill  <jason@redhat.com>
217
218         Fix lookup of initialized captures in unevaluated context.
219         * cp-tree.h (DECL_NORMAL_CAPTURE_P): New.
220         * name-lookup.c (qualify_lookup): Check it.
221         * parser.c (cp_parser_lambda_introducer): Pass explicit_init_p
222         to add_capture.
223         * semantics.c (add_capture): Set DECL_NORMAL_CAPTURE_P
224         on captures without explicit init.
225         (add_default_capture): Pass explicit_init_p.
226
227         Fix capture by copy of types with explicit copy constructor.
228         * cp-tree.h (TARGET_EXPR_DIRECT_INIT_P): New.
229         (DIRECT_INIT_EXPR_P): New.
230         * typeck.c (convert_for_initialization): Just return if
231         DIRECT_INIT_EXPR_P.
232         * semantics.c (build_lambda_object): Use
233         TARGET_EXPR_DIRECT_INIT_P for normal captures.
234
235 2009-10-05  Jason Merrill  <jason@redhat.com>
236
237         * parser.c: Mark lambda_scope and lambda_count for PCH.
238
239 2009-10-03  Jason Merrill  <jason@redhat.com>
240
241         PR c++/41553
242         * parser.c (cp_parser_lambda_introducer): Avoid infinite loop on
243         parse error.
244
245 2009-10-02  Jason Merrill  <jason@redhat.com>
246
247         * mangle.c (write_unnamed_type_name): Implement.
248         (local_class_index): Split out from...
249         (discriminator_for_local_entity): ...here.
250         (nested_anon_class_index): New.
251         * cp-tree.h (TYPE_FUNCTION_SCOPE_P): New.
252
253 2009-10-02  Janis Johnson  <janis187@us.ibm.com>
254
255         * call.c (convert_arg_to_ellipsis): Avoid promoting decimal32
256         to double.
257
258 2009-10-01  Jason Merrill  <jason@redhat.com>
259
260         * parser.c (cp_parser_lambda_expression): Compute visibility.
261         (no_linkage_lambda_type_p): Remove.
262         * cp-tree.h: Remove declaration.
263         * tree.c (no_linkage_check): Don't call it.  Don't check template
264         args.  Don't check TREE_PUBLIC Types.
265
266 2009-10-01  Gabriel Dos Reis  <gdr@cse.tamu.edu>
267             Jason Merrill <jason@redhat.com>
268
269         * decl.c (grokdeclarator): Set constexprness before announcing
270         friendship.
271
272 2009-10-01  Gabriel Dos Reis  <gdr@cs.tamu.edu>
273
274         * decl.c (record_builtin_java_type): Undo unintended change.
275         (cxx_init_decl_processing): Likewise.
276
277 2009-10-01  Jason Merrill  <jason@redhat.com>
278
279         * pt.c (register_specialization): Push DECL_SOURCE_LOCATION to the
280         clones.
281
282         * decl.c (grok_special_member_properties): Only adjust
283         TYPE_HAS_COMPLEX_* if the function is defaulted in the class body.
284         (cp_finish_decl): Push DECL_DELETED_FN/DECL_DEFAULTED_FN to the
285         clones.
286
287 2009-09-30  Gabriel Dos Reis  <gdr@cs.tamu.edu>
288
289         * decl.c (check_for_uninitialized_const_var): Check constexpr
290         variables too.
291         (grokdeclarator): Handle `constexpr'.
292         (check_tag_decl): Reject `constexpr'.
293         (check_function_type): Check constexpr functions.
294         * cp-tree.h (ds_constexpr): New cp_decl_spec enumerator.
295         (CLASSTYPE_LITERAL_P): New.
296         (lang_type_class::is_literal): New.
297         (lang_type_class::dummy): Adjust width.
298         (literal_type_p): Declare.
299         * parser.c (cp_parser_check_decl_spec): Print it.
300         (cp_parser_decl_specifier_seq): Accept "constexpr".
301         * semantics.c (validate_constexpr_fundecl): Define.
302         (literal_type_p): Define.
303
304 2009-09-30  Jason Merrill  <jason@redhat.com>
305
306         * semantics.c (lambda_expr_this_capture): Fix default capture
307         of explicit capture of 'this'.
308
309 2009-09-30  Jason Merrill  <jason@redhat.com>
310
311         * parser.c (cp_parser_lambda_expression): Don't add __ to __this.
312
313 2009-09-30  Jason Merrill  <jason@redhat.com>
314
315         * cp-tree.h (LANG_DECL_U2_CHECK): Check LANG_DECL_HAS_MIN.
316
317 2009-09-29  John Freeman  <jfreeman08@gmail.com>
318             Jason Merrill  <jason@redhat.com>
319
320         Add support for lambda-expressions as per N2927.
321         * cp-tree.def (VEC_INIT_EXPR, LAMBDA_EXPR): New.
322         * cp-tree.h (LAMBDA_TYPE_P, LAMBDA_FUNCTION_P): New.
323         (LAMBDA_EXPR_DEFAULT_CAPTURE_MODE): New.
324         (LAMBDA_EXPR_DEFAULT_CAPTURE_LIST): New.
325         (LAMBDA_EXPR_THIS_CAPTURE, LAMBDA_EXPR_CAPTURES_THIS_P): New.
326         (LAMBDA_EXPR_MUTABLE_P, LAMBDA_EXPR_DEDUCE_RETURN_TYPE_P): New.
327         (LAMBDA_EXPR_RETURN_TYPE, LAMBDA_EXPR_LOCATION): New.
328         (LAMBDA_EXPR_EXTRA_SCOPE, LAMBDA_EXPR_DISCRIMINATOR): New.
329         (struct tree_lambda_expr): New.
330         (union lang_tree_node): Add lambda_expression.
331         (struct lang_type_class): Add lazy_move_ctor flag, lambda_expr field.
332         (CLASSTYPE_LAZY_MOVE_CTOR, CLASSTYPE_LAMBDA_EXPR): New.
333         (LAMBDA_TYPE_EXTRA_SCOPE, VEC_INIT_EXPR_SLOT): New.
334         (VEC_INIT_EXPR_INIT, DECLTYPE_FOR_LAMBDA_CAPTURE): New.
335         (DECLTYPE_FOR_LAMBDA_RETURN): New.
336         (enum special_function_kind): Add sfk_move_constructor.
337         (LAMBDANAME_PREFIX, LAMBDANAME_FORMAT, LAMBDANAME_P): New.
338         * parser.c (cp_parser_lambda_expression, cp_parser_lambda_introducer)
339         (cp_parser_lambda_declarator_opt, cp_parser_lambda_body): New.
340         (start_lambda_scope, record_lambda_scope, finish_lambda_scope): New.
341         (no_linkage_lambda_type_p): New.
342         (cp_parser_primary_expression): Recognize lambda expression.
343         (cp_parser_init_declarator): Note lambda scope.
344         (cp_parser_function_definition_after_declarator): Likewise.
345         (cp_parser_late_parsing_default_args): Likewise.
346         (cp_parser_skip_to_closing_parenthesis): Skip to end of lambda capture
347         lists, too.
348         (cp_parser_parameter_declaration): Don't defer lambda default args.
349         * semantics.c (finish_non_static_data_member, finish_id_expression):
350         Handle default capture for lambda expressions.
351         (finish_this_expr): Handle 'this' keyword inside of lambda expressions.
352         (outer_automatic_var_p): New.
353         (finish_decltype_type): Handle decltypes within lambda expressions.
354         (classtype_has_nothrow_assign_or_copy_p): Synthesized move constructor.
355         (build_lambda_expr, build_lambda_object, begin_lambda_type)
356         (lambda_return_type, lambda_capture_field_type, apply_lambda_return_type)
357         (capture_decltype, add_capture, add_default_capture)
358         (lambda_expr_this_capture): New.
359         * mangle.c (write_unnamed_type_name): New. Incomplete.
360         (write_closure_type_name): New.
361         (write_unqualified_name): Recognize unnamed, closure types.
362         (write_type): Do not write decltypes from lambda expressions.
363         (decl_mangling_context): New.
364         (write_name): Use it.  Handle PARM_DECL scope.
365         (write_prefix): Likewise.  Handle VAR_DECL/FIELD_DECL scope.
366         (write_compact_number): Factor out from...
367         (write_expression, write_template_param): ...here.
368         (discriminator_for_local_entity): Recognize lambdas.
369         (write_local_name): Handle PARM_DECL scope.
370         * typeck.c (structural_comptypes): Compare decltypes from lambda
371         expressions.
372         (check_return_expr): Deduce lambda return type from multiple return
373         statements.
374         * class.c (add_implicitly_declared_members): Add lazy move constructor
375         for lambda types.
376         (check_bases_and_members): Delete default constructor and assignment
377         operator for lambda types.
378         (maybe_note_name_used_in_class): Do not confuse lambda expression with
379         defining a class.
380         * decl.c (reshape_init_r): Array copy.
381         (grokfndecl): Synthesized move constructor.
382         (cp_tree_node_structure): Lambda expression.
383         * method.c (use_thunk): Synthesized move constructor.
384         (do_build_copy_constructor): Likewise.
385         (locate_copy): Likewise.
386         (implicitly_declare_fn): Likewise.
387         * cp-objcp-common.c (cp_tree_size): Handle LAMBDA_EXPR.
388         * error.c (dump_aggr_type): Recognize lambda type.
389         (dump_function_decl): Recognize lambda function.
390         (function_category): Likewise.
391         (dump_function_name): Hide lambda name.
392         * tree.c (build_array_copy, move): New.
393         (special_function_p): Synthesized move constructor.
394         (no_linkage_check): Handle lambdas.
395         * search.c (lookup_fnfields_1): Synthesized move constructor.
396         * cp-gimplify.c (cp_gimplify_init_expr, cp_gimplify_expr):
397         Handle VEC_INIT_EXPR.
398         * typeck2.c (digest_init_r): Array copy.
399         * pt.c (get_template_info): Don't touch typedefs.
400         (instantiate_decl): Don't resubstitute artificial decls.
401         (tsubst_decl, tsubst, tsubst_copy_and_build): Handle lambdas.
402         (lookup_template_class): Don't fall back on name lookup.
403         * name-lookup.c (make_lambda_name): New.
404         (pushdecl_class_level): Handle default capture for lambda expressions.
405         (qualify_lookup): Handle decltypes within lambda expressions.
406         (pushtag): Handle ts_within_enclosing_non_class in function scope.
407
408 2009-09-28  Janis Johnson  <janis187@us.ibm.com>
409
410         * mangle.c (write_builtin_type): Support decimal float types.
411
412 2009-09-28  Richard Henderson  <rth@redhat.com>
413
414         * cp-objcp-common.h (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New.
415
416 2009-09-24  Jakub Jelinek  <jakub@redhat.com>
417
418         * method.c (make_thunk, make_alias_for): Don't set
419         DECL_NO_STATIC_CHAIN.
420         * decl.c (builtin_function_1, grokfndecl): Likewise.
421         * lex.c (build_lang_decl): Likewise.
422
423 2009-09-23  Dodji Seketeli  <dodji@redhat.com>
424
425         PR debug/41065
426         * decl.c (cp_finish_decl): Record the types used by the global
427         variable declaration we've just parsed.
428
429 2009-09-22  Dodji Seketeli  <dodji@redhat.com>
430
431         * cp-lang.c (LANG_HOOKS_FUNCTION_PARAMETER_PACK_P,
432         LANG_HOOKS_FUNCTION_PARM_EXPANDED_FROM_PACK_P,
433         LANG_HOOKS_GET_GENERIC_FUNCTION_DECL): Initialize these
434         hooks for the c++ FE.
435         * cp-tree.h (function_parameter_pack_p, get_function_template_decl,
436         function_parameter_expanded_from_pack_p): Declare ...
437         * pt.c (function_parameter_pack_p, get_function_template_decl,
438         function_parameter_expanded_from_pack_p): ... new hooks.
439         (get_template_info): Make this more robust.
440         (template_args_variadic_p, make_ith_pack_parameter_name): Add a new
441         line between comment and function.
442         (get_template_argument_pack_elems): Fix comment.
443         (tsubst_decl): Arguments of function parameter packs are not
444         parameter packs themselves.
445
446 2009-09-21  Jason Merrill  <jason@redhat.com>
447
448         PR c++/41421
449         * tree.c (trivial_type_p): Fix logic.
450
451 2009-09-21  Jason Merrill  <jason@redhat.com>
452
453         * name-lookup.c (push_class_level_binding): Sanity check.
454
455 2009-09-18  Jason Merrill  <jason@redhat.com>
456
457         * decl2.c (determine_visibility): Make anonymous types internal.
458         (mark_used): Complain about types without linkage used in
459         decls with internal linkage.
460         (vague_linkage_fn_p): Split out from...
461         * decl.c (maybe_commonize_var): ...here.
462         (grokdeclarator): Adjust linkage when a typedef gives linkage name.
463         * tree.c (no_linkage_check): Check the enclosing class and template
464         arguments.
465
466         * cp-tree.h (TYPE_NAMESPACE_SCOPE_P): New.
467
468         * pt.c (get_pattern_parm): New.
469         (listify): Split out from...
470         (listify_autos): ...here.
471         (unify): Deduce std::initializer_list for T.
472         * call.c (build_over_call): Warn about it.
473
474 2009-09-17  Andrew Pinski  <pinskia@gcc.gnu.org>
475
476         PR c++/39365
477         * typeck.c (cp_build_unary_op): Check TREE_CODE for bools instead of
478         using same_type_p.
479         (convert_for_assignment): Likewise.
480         * cvt.c (type_promotes_to): Likewise.
481
482 2009-09-14  Richard Henderson  <rth@redhat.com>
483             Jakub Jelinek  <jakub@redhat.com>
484
485         * cp-tree.h (finish_asm_stmt): Update decl.
486         * parser.c (cp_parser_asm_definition): Parse asm goto.
487         (cp_parser_asm_label_list): New.
488         * pt.c (tsubst_copy_asm_operands): Don't recurse on labels.
489         (tsubst_expr): Handle asm labels.
490         * semantics.c (finish_asm_stmt): Add and use labels parameter.
491
492 2009-09-14  Richard Henderson  <rth@redhat.com>
493
494         * except.c (init_exception_processing): Don't call
495         default_init_unwind_resume_libfunc.
496         (cp_protect_cleanup_actions): Return the decl to call.
497         (build_exc_ptr): Use __builtin_eh_pointer.
498         * optimize.c (clone_body): Set eh_lp_nr, not eh_region.
499
500 2009-09-13  Richard Guenther  <rguenther@suse.de>
501         Rafael Avila de Espindola  <espindola@google.com>
502
503         * except.c (init_exception_processing): Do not set
504         lang_eh_runtime_type.
505         (choose_personality_routine): Do not set eh_personality_decl,
506         set pragma_java_exceptions.
507         * cp-lang.c (LANG_HOOKS_EH_RUNTIME_TYPE): Define.
508         (LANG_HOOKS_EH_PERSONALITY): Likewise.
509         (cp_eh_personality_decl): New.
510         (cp_eh_personality): Likewise.
511         * Make-lang.in (cp-lang.o): Add $(EXPR_H) and $(EXCEPT_H)
512         dependencies.
513
514 2009-09-13  Wei Guozhi  <carrot@google.com>
515
516         PR c++/3187
517         * cp/optimize.c (build_delete_destructor_body): New function.
518         (maybe_clone_body): Call build_delete_destructor_body for
519         deleting destructor.
520
521 2009-09-10  Jason Merrill  <jason@redhat.com>
522
523         * repo.c (extract_string, get_base_filename, init_repo): constify.
524
525 2009-09-09  Jason Merrill  <jason@redhat.com>
526
527         * error.c (find_typenames_r): Also add decltypes.
528
529 2009-09-09  Paolo Carlini  <paolo.carlini@oracle.com>
530
531         PR c++/28293
532         * decl2.c (grokfield): Check for explicit template argument lists.
533
534 2009-09-09  Jack Howarth  <howarth@bromo.med.uc.edu>
535
536         PR bootstrap/41180
537         * Make-lang.in: Remove redundant code from linkage for darwin10.
538
539 2009-09-08  Paolo Carlini  <paolo.carlini@oracle.com>
540
541         PR c++/39923
542         * decl.c (build_init_list_var_init): Check return value of
543         perform_implicit_conversion.
544
545 2009-09-08  Jason Merrill  <jason@redhat.com>
546
547         * class.c (currently_open_class): Make sure we're dealing with the
548         main variant.
549
550         * cp-tree.h (enum overload_flags): Remove OP_FLAG.
551         * method.c (lazily_declare_fn): Check for dtorness in ABI warning.
552
553         * name-lookup.c (is_class_level): Remove.
554         (push_binding_level, leave_scope, resume_scope): Adjust.
555         (pushlevel_class): Adjust.
556         (poplevel_class): Make sure we're on class_binding_level.
557
558         * decl.c (grokmethod): Rename from start_method.
559         (finish_method): Remove.
560         * cp-tree.h: Adjust.
561         * parser.c (cp_parser_save_member_function_body): Adjust.
562
563 2009-09-03  Doug Kwan  <dougkwan@google.com>
564
565         * tree.c (cp_fix_function_decl_p): New.
566         (cp_free_lang_data): New.
567
568 2009-09-03  Diego Novillo  <dnovillo@google.com>
569
570         * Make-lang.in (decl2.o): Add dependency on $(POINTER_SET_H).
571         * decl2.c: Include pointer-set.h.
572         (collect_candidates_for_java_method_aliases): New.
573         (cp_write_global_declarations): Call it.
574         Add local variable CANDIDATES.  If set, call
575         build_java_method_aliases.
576         (build_java_method_aliases): Add argument CANDIDATES.
577         Use it to determine if FNDECL should get a hidden alias.
578         * cp-objcp-common.h (LANG_HOOKS_FREE_LANG_DATA): Define.
579         * cp-tree.h (cp_free_lang_data): Declare.
580
581 2009-09-03  Richard Guenther  <rguenther@suse.de>
582
583         * method.c (use_thunk): Use cgraph_finalize_function to hand
584         off thunks to the cgraph.
585         * semantics.c (emit_associated_thunks): Do not emit thunks
586         for really extern functions.
587
588 2009-09-03  Diego Novillo  <dnovillo@google.com>
589
590         * cp-lang.c (lang_hooks): Remove const qualifier.
591
592 2009-09-02  Jason Merrill  <jason@redhat.com>
593
594         * semantics.c (describable_type): Don't pretend to be in a template.
595
596         * ptree.c (cxx_print_type) [DECLTYPE_TYPE]: Print the expression.
597
598 2009-09-01  Alexandre Oliva  <aoliva@redhat.com>
599
600         * cp-tree.h (TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS): New.
601         * cp-lang.c (cxx_dwarf_name): Pass it.
602         * error.c (count_non_default_template_args): Take flags as
603         argument.  Adjust all callers.  Skip counting of default
604         arguments if the new flag is given.
605
606 2009-09-01  Dodji Seketeli  <dodji@redhat.com>
607
608         PR bootstrap/41205
609         * pt.c (make_ith_pack_parameter_name): Don't use strnlen that is a
610         GNU extension.
611
612 2009-09-01  Richard Guenther  <rguenther@suse.de>
613
614         * cp-objcp-common.c (cp_expr_size): Use tree_expr_size.
615         * cp-objcp-common.h (LANG_HOOKS_EXPR_SIZE): Do not define.
616
617 2009-09-01  Richard Guenther  <rguenther@suse.de>
618
619         * cp-objcp-common.h (LANG_HOOKS_MARK_ADDRESSABLE): Remove.
620
621 2009-08-31  Dodji Seketeli  <dodji@redhat.com>
622
623         PR debug/30161
624         * cp-tree.h (get_template_info): Parameter should be const.
625         (CLASSTYPE_SPECIALIZATION_OF_PRIMARY_TEMPLATE_P): Fix typo.
626         (get_template_argument_pack_elems,
627         get_primary_template_innermost_parameters,
628         get_template_innermost_arguments, template_template_parameter_p):
629         Declare ...
630         * pt.c (get_template_argument_pack_elems,
631         get_template_innermost_parameters, get_template_innermost_arguments,
632         template_template_parameter_p):
633         ... New C++ front end implementation of new language hooks.
634         (primary_template_instantiation_p): New private helper.
635         (make_ith_pack_parameter_name): Use snprintf and strnlen instead of
636         printf and strlen.
637         (get_template_info): Const-ify parameter.
638         * cp-lang.c (LANG_HOOKS_GET_INNERMOST_GENERIC_PARMS,
639         LANG_HOOKS_GET_INNERMOST_GENERIC_ARGS,
640         LANG_HOOKS_GET_ARGUMENT_PACK_ELEMS,
641         LANG_HOOKS_GENERIC_TYPE_PARAMETER_DECL_P): Initialize these
642         interfaces for the C++ front-end.
643
644 2009-08-31  Jason Merrill  <jason@redhat.com>
645
646         PR c++/41127
647         * parser.c (cp_parser_enum_specifier): Make sure the : is followed by a
648         type-specifier-seq before we commit.
649
650 2009-08-28  Richard Guenther  <rguenther@suse.de>
651
652         PR lto/41058
653         * cp-gimplify.c (cp_genericize_r): Do not leak zero-sized stores
654         into the generic IL.
655
656 2009-08-27  Richard Guenther  <rguenther@suse.de>
657
658         * class.c (build_vtbl_ref_1): Remove excess vertical space.
659         * Make-lang.in (CXX_TREE_H): Remove c-common.def dependency
660         tracked by $(TREE_H).
661         * semantics.c (expand_or_defer_fn): Zero DECL_SAVED_TREE.
662
663 2009-08-26  Jason Merrill  <jason@redhat.com>
664
665         * call.c (build_builtin_candidate): Don't set LOOKUP_ONLYCONVERTING
666         if we're contextually converting to bool.
667         (build_conditional_expr): Likewise.
668         * typeck.c (condition_conversion): Likewise.
669
670         * call.c (build_conditional_expr): Fix logic errors.
671         (build_new_op): Remove dead COND_EXPR handling.
672
673 2009-08-24  Jason Merrill  <jason@redhat.com>
674
675         * cp-tree.h (DECL_DEFERRED_FN): Remove.
676         (struct lang_decl_fn): Remove deferred flag.
677         * class.c (build_clone): Don't set it.
678         * decl2.c (note_vague_linkage_fn): Don't check or set it.
679         (mark_used): Don't check it.
680         * method.c (make_thunk, make_alias_for): Don't set it.
681
682         * decl2.c (mark_used): Streamline logic.
683
684         PR c++/41109
685         PR c++/41110
686         PR c++/41134
687         * cp-tree.h (DECL_ODR_USED): New macro.
688         (struct lang_decl_base): Add odr_used flag.
689         * decl.c (duplicate_decls): Propagate it.  Use it for error.
690         * pt.c (register_specialization): Use it for error.
691         * decl2.c (mark_used): Use it as gating flag rather than TREE_USED.
692         (cp_write_global_declarations): Use it for error.
693         (tree_used_ok): Remove.
694         * cp-tree.h: Remove tree_used_ok.
695         * call.c (build_call_a): Don't call it.
696         * init.c (build_offset_ref): Likewise.
697
698 2009-08-21  Jakub Jelinek  <jakub@redhat.com>
699
700         PR c++/41131
701         * tree.c (lvalue_p_1) <case CONST_DECL>: Return clk_none if
702         not TREE_STATIC.
703
704 2009-08-19  Jason Merrill  <jason@redhat.com>
705
706         PR c++/41119
707         PR c++/41120
708         * decl2.c (mark_used): Increment function_depth during synthesis.
709         * parser.c (cp_parser_default_argument): Not here.
710
711 2009-08-19  Jakub Jelinek  <jakub@redhat.com>
712
713         * method.c (use_thunk): Call free_after_compilation after
714         assemble_end_function.
715
716 2009-08-17  Richard Guenther  <rguenther@suse.de>
717
718         * decl.c (build_ptrmemfunc_type): Keep variant chain intact.
719         Avoid useless copy.
720         (finish_enum): Keep variant chain intact.
721         * tree.c (cp_build_reference_type): Likewise.
722
723 2009-08-16  Jason Merrill  <jason@redhat.com>
724
725         Make TREE_USED match the [basic.def.odr] concept for FUNCTION_DECL
726         and VAR_DECL, so mark_used only has effect the first time.
727         * decl2.c (mark_used): Just return if TREE_USED is already set.
728         Don't set TREE_USED if cp_unevaluated_operand is set.
729         (tree_used_ok): New fn.
730         * init.c (build_offset_ref): Check it instead of TREE_USED.
731         * call.c (build_call_a): Likewise.
732         * cp-tree.h: Declare it.
733         (DECL_NO_LINKAGE_CHECKED): No longer needed.
734         (struct lang_decl_base): Remove no_linkage_checked bitfield.
735
736         * decl2.c (finish_static_data_member_decl): Don't set TREE_USED.
737
738         * decl2.c (mark_used): It's ok to synthesize for default args now.
739
740 2009-08-10  Jason Merrill  <jason@redhat.com>
741
742         Implement DR 757: It's OK for a decl to use a type without linkage
743         so long as the decl is defined in the current translation unit.
744         * decl2.c (no_linkage_decls): New vector.
745         (mark_used): Add decls that use types with no linkage.
746         (cp_write_global_declarations): Check that they are defined.
747         (decl_defined_p, no_linkage_error): New fns.
748         * cp-tree.h (DECL_NO_LINKAGE_CHECKED): New macro.
749         (struct lang_decl_base): Add flag.
750         * decl.c (grokfndecl): Don't check type linkage.
751         (grokvardecl): If the type has no linkage, just make sure
752         DECL_LANG_SPECIFIC is set.
753         * pt.c (check_instantiated_arg): Don't check type linkage.
754         * name-lookup.c (is_local_extern): New fn.
755         * name-lookup.h: Declare it.
756
757 2009-08-05  Jason Merrill  <jason@redhat.com>
758
759         PR c++/40948
760         * init.c (build_vec_init): Evaluate the initializer before
761         starting the initialization try block.
762
763 2009-08-05  Manuel López-Ibáñez  <manu@gcc.gnu.org>
764
765         PR c++/36069
766         * typeck.c (convert_for_assignment): Do not warn for any boolean
767         variant. Use explicit location.
768
769 2009-08-04  Dodji Seketeli  <dodji@redhat.com>
770
771         PR c++/39987
772         * pt.c (tsubst_default_argument): Let access checks of the
773         default argument happen in the context of the current function.
774
775 2009-08-04  Manuel López-Ibáñez  <manu@gcc.gnu.org>
776
777         PR c++/16696
778         * call.c (build_new_op): Only try prefix operator if -fpermissive,
779         otherwise just error.
780
781 2009-08-04  Dodji Seketeli  <dodji@redhat.com>
782
783         PR debug/39706
784         * error.c (lang_decl_name): Print qualified names for decls
785         in  namespace scope.
786
787 2009-08-03  Jason Merrill  <jason@redhat.com>
788             Jakub Jelinek  <jakub@redhat.com>
789
790         PR c++/40948
791         * init.c (build_vec_init): Look through a TARGET_EXPR around a
792         CONSTRUCTOR.
793
794 2009-07-31  Jason Merrill  <jason@redhat.com>
795             Douglas Gregor  <doug.gregor@gmail.com>
796
797         Remove implicit binding of lvalues to rvalue references (N2831)
798         * call.c (convert_class_to_reference): Binding an lvalue to an
799         rvalue reference is bad.  If the user-defined conversion is bad,
800         set bad_p before merging conversions.
801         (maybe_handle_ref_bind): Don't push down bad_p.
802         (reference_binding): Binding an lvalue to an rvalue reference is bad.
803         (convert_like_real): Give a helpful error about binding lvalue
804         to rvalue reference.
805         (reference_related_p): No longer static.
806         * typeck.c (build_typed_address): New.
807         (build_static_cast_1): Add static_cast from lvalue to &&.
808         * cp-tree.h: Adjust.
809
810 2009-07-31  Jason Merrill  <jason@redhat.com>
811
812         * call.c (reference_binding): Rename lvalue_p to is_lvalue.
813         Do direct binding of "rvalues" in memory to rvalue references.
814         * tree.c (lvalue_p_1): Can't be both non-addressable lvalue and
815         "rvalue" in memory.
816         * typeck.c (build_static_cast_1): Do direct binding of memory
817         "rvalues" to rvalue references.
818         * cvt.c (cp_fold_convert): New.
819         * cp-tree.h: Declare it.
820
821 2009-07-31  Jason Merrill  <jason@redhat.com>
822
823         * typeck.c (build_address): Do fold away ADDR_EXPR of INDIRECT_REF.
824         * tree.c (rvalue): Use cp_build_qualified_type, not TYPE_MAIN_VARIANT.
825
826 2009-07-29  Jason Merrill  <jason@redhat.com>
827
828         PR c++/14912
829         * cp-tree.h (enum tsubst_flags): Add tf_no_class_instantiations.
830         * error.c (count_non_default_template_args): Pass it.
831         * pt.c (tsubst) [TYPENAME_TYPE]: Don't complete type if it's set.
832
833 2009-07-29  Richard Guenther  <rguenther@suse.de>
834
835         PR c++/40834
836         * cp-gimplify.c (cp_genericize_r): Properly walk the BIND_EXPR
837         vars.
838
839 2009-07-26  Simon Martin  <simartin@users.sourceforge.net>
840
841         PR c++/40749
842         * decl.c (grokdeclarator): Do not set TREE_NO_WARNING for functions
843         with a qualified return type.
844
845 2009-07-24  Jason Merrill  <jason@redhat.com>
846
847         Core issue 901
848         * call.c (build_op_delete_call): If this is for a new-expression
849         and the op delete is deleted, do nothing.
850
851         Core issue 702
852         * call.c (compare_ics): Give list-initialization of std::init_list
853         priority over conversion to scalar, too.
854
855 2009-07-22  Jason Merrill  <jason@redhat.com>
856
857         * mangle.c (mangle_type_string_for_rtti): Rename to be clearer.
858         (needs_fake_anon): New.
859         (write_name): Check it.
860         (write_nested_name): Add a fake anonymous namespace scope if true.
861         * name-lookup.c (get_anonymous_namespace_name): No longer static.
862         * rtti.c, cp-tree.h: Adjust.
863
864 2009-07-22  Richard Guenther  <rguenther@suse.de>
865
866         PR c++/40799
867         * cp-gimplify.c (cp_gimplify_expr): Move handling of using
868         related exprs to ...
869         (cp_genericize_r): ... genericization stage.
870         (cp_genericize): Adjust.
871
872 2009-07-21  Jason Merrill  <jason@redhat.com>
873
874         Core issue 934
875         * call.c (reference_binding): Implement binding to { }.
876         (initialize_reference): Binding temporary to non-const && is fine.
877         * decl.c (grok_reference_init): Remove error for CONSTRUCTOR.
878
879         * decl.c (reshape_init_r): { T } is not an aggregate initializer
880         for class T.
881
882 2009-07-17  Richard Guenther  <rguenther@suse.de>
883
884         PR c/40401
885         * decl.c (finish_function): Do not emit unused result warnings
886         from here.
887         * cp-objcp-common.h (LANG_HOOKS_POST_GIMPLIFY_PASS): Use
888         c_warn_unused_result_pass.
889         * semantics.c (expand_or_defer_fn): Adjust assertion about IL status.
890         * optimize.c (clone_body): Clone in GENERIC.
891         (maybe_clone_body): Do not clear DECL_SAVED_TREE.
892         * decl2.c (cp_write_global_declarations): Fix body test.
893         Do not call cgraph_optimize.
894         * Make-lang.in (optimize.o): Add tree-iterator.h dependency.
895         * method.c (use_thunk): Register thunk with
896         cgraph_finalize_function.
897         * error.c (function_category): Guard access of DECL_LANG_SPECIFIC.
898
899 2009-07-17  Richard Guenther  <rguenther@suse.de>
900
901         * init.c (build_vec_delete_1): Do not set DECL_REGISTER on the
902         temporary pointer.
903
904 2009-07-17  Aldy Hernandez  <aldyh@redhat.com>
905             Manuel López-Ibáñez  <manu@gcc.gnu.org>
906
907         PR 40435 
908         * typeck.c, init.c, class.c, method.c, rtti.c, except.c, error.c,
909         tree.c, cp-gimplify.c, cxx-pretty-print.c, pt.c, semantics.c,
910         call.c, cvt.c, mangle.c: Add location argument to
911         fold_{unary,binary,ternary}, fold_build[123], build_call_expr,
912         build_size_arg, build_fold_addr_expr, build_call_array,
913         non_lvalue, size_diffop, fold_build1_initializer,
914         fold_build2_initializer, fold_build3_initializer,
915         fold_build_call_array, fold_build_call_array_initializer,
916         fold_single_bit_test, omit_one_operand, omit_two_operands,
917         invert_truthvalue, fold_truth_not_expr, build_fold_indirect_ref,
918         fold_indirect_ref, combine_comparisons, fold_builtin_*,
919         fold_call_expr, build_range_check, maybe_fold_offset_to_address,
920         round_up, round_down.
921
922 2009-07-16  Jason Merrill  <jason@redhat.com>
923
924         PR libstdc++/37907
925         Split POD into "standard-layout" and "trivial" as per N2230,
926         Support std::is_standard_layout and std::is_trivial traits.
927         * cp-tree.h (enum cp_trait_kind): Add CPTK_IS_STD_LAYOUT,
928         CPTK_IS_TRIVIAL.
929         (struct lang_type_class): Add non_std_layout.
930         (CLASSTYPE_NON_STD_LAYOUT): New.
931         * class.c (check_bases): Set it.
932         (check_field_decls): Likewise.
933         (check_bases_and_members): Likewise.
934         * parser.c (cp_parser_primary_expression): Handle RID_IS_STD_LAYOUT,
935         RID_IS_TRIVIAL.
936         (cp_parser_trait_expr): Likewise.
937         * semantics.c (trait_expr_value): Handle CPTK_IS_STD_LAYOUT,
938         CPTK_IS_TRIVIAL.
939         (finish_trait_expr): Likewise.
940         * tree.c (scalarish_type_p, trivial_type_p, std_layout_type_p): New.
941         (pod_type_p): Use them.
942         (type_has_nontrivial_copy_init, type_has_nontrivial_default_init): New.
943
944         Adjust bits of the language that no longer refer to POD types.
945         * call.c (convert_arg_to_ellipsis): Use type_has_nontrivial_copy_init
946         and TYPE_HAS_NONTRIVIAL_DESTRUCTOR rather than pod_type_p.
947         (build_x_va_arg): Likewise.
948         (call_builtin_trap): Remove.
949         * decl.c (declare_local_label): Use type_has_nontrivial_default_init
950         and TYPE_HAS_NONTRIVIAL_DESTRUCTOR rather than pod_type_p.
951         (cp_finish_decl): Likewise.
952         (check_previous_goto_1, check_goto): Adjust error.
953         * typeck.c (build_class_member_access_expr): Check
954         CLASSTYPE_NON_STD_LAYOUT rather than CLASSTYPE_NON_POD_P.
955
956 2009-07-14  Taras Glek  <tglek@mozilla.com>
957             Rafael Espindola  <espindola@google.com>
958
959         * Make-lang.in: Added CP_PLUGIN_HEADERS and
960         c.install-target to export cp-tree.h cxx-pretty-print.h
961         name-lookup.h headers for plugins.
962
963 2009-07-14  Jason Merrill  <jason@redhat.com>
964
965         PR c++/37276
966         * decl.c (decls_match): A non-extern-C declaration doesn't match
967         a builtin extern-C declaration.
968
969         PR c++/40746
970         * name-lookup.c (qualified_lookup_using_namespace): Don't stop
971         looking in used namespaces just because we found something on
972         another branch.
973
974         PR c++/40740
975         * semantics.c (perform_koenig_lookup): Handle empty template args.
976
977         * call.c (build_over_call): Use can_trust_pointer_alignment.
978
979 2009-07-14  Dodji Seketeli  <dodji@redhat.com>
980
981         PR debug/40705
982         PR c++/403057
983         * decl2.c (grokfield): Don't call set_underlying_type on typedef
984         decls that are type names.
985
986 2009-07-13  Andrew Pinski  <andrew_pinski@playstation.sony.com>
987
988         PR C++/22154
989         * parser.c (cp_parser_elaborated_type_specifier): Accept typename in
990         front of qualified names.
991
992 2009-07-12  Jason Merrill  <jason@redhat.com>
993
994         PR c++/36628
995         * tree.c (rvalue): Use lvalue_or_rvalue_with_address_p.
996
997         PR c++/37206
998         * cp-tree.h (enum cp_lvalue_kind_flags): Add clk_rvalueref.
999         * tree.c (lvalue_p_1): Return it.  Remove
1000         treat_class_rvalues_as_lvalues parm.
1001         (real_lvalue_p): Disallow pseudo-lvalues here.
1002         (lvalue_or_rvalue_with_address_p): New fn.
1003         * call.c (initialize_reference): Use it instead of real_lvalue_p.
1004
1005         PR c++/40689
1006         * init.c (build_new_1): Handle initializer list as array initializer.
1007         (build_vec_init): Likewise.
1008         * typeck.c (cp_build_modify_expr): Likewise.
1009         * typeck2.c (process_init_constructor_array): Error rather than abort
1010         if too many initializers.
1011
1012 2009-07-10  Jakub Jelinek  <jakub@redhat.com>
1013
1014         PR c++/40502
1015         * error.c (cp_print_error_function): Check for NULL block.
1016
1017 2008-07-09  Simon Martin  <simartin@users.sourceforge.net>
1018             Jason Merrill  <jason@redhat.com>
1019
1020         * pt.c (perform_typedefs_access_check, get_types_needing_access_check,
1021         append_type_to_template_for_access_check_1): Use CLASS_TYPE_P.
1022
1023 2009-07-09  Dodji Seketeli  <dodji@redhat.com>
1024
1025         PR c++/40684
1026         * pt.c (type_unification_real): Use tsubst_template_arg instead
1027         of tsubst to substitute default template arguments.
1028
1029 2009-07-08  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1030
1031         PR c++/31246
1032         * init.c (build_new_1): Set TREE_NO_WARNING for compiler-generated
1033         code.
1034         * cp-gimplify.c (genericize_eh_spec_block): Likewise.
1035         
1036
1037 2009-07-07  Jason Merrill  <jason@redhat.com>
1038
1039         PR c++/35828
1040         * pt.c (tsubst_decl): Don't abort if we didn't change anything
1041         in a TEMPLATE_DECL's args.
1042
1043 2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1044
1045         * semantics.c (finalize_nrv_r): Replace EXPR_LOCUS by
1046         EXPR_LOCATION.
1047         
1048 2009-07-07  Jason Merrill  <jason@redhat.com>
1049
1050         PR c++/37816
1051         * decl.c (build_enumerator): Don't add enumerators for a
1052         scoped enum to the enclosing class.
1053
1054         PR c++/40639
1055         * decl.c (start_enum): Allow dependent underlying type.
1056
1057         PR c++/40633
1058         * decl.c (finish_enum): Finish scope even in a template.
1059
1060 2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1061
1062         * init.c: Replace %J by an explicit location. Update all calls.
1063         * decl.c: Likewise.
1064         * typeck2.c: Likewise.
1065         * pt.c: Likewise.
1066         * name-lookup.c: Likewise.
1067         
1068 2009-07-06  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1069
1070         * decl.c: Replace %H by an explicit location. Update all calls.
1071         * except.c: Likewise.
1072         * semantics.c: Likewise.
1073         * parser.c: Likewise.
1074
1075 2009-07-06  Simon Martin  <simartin@users.sourceforge.net>
1076
1077         PR c++/40557
1078         * pt.c (perform_typedefs_access_check, get_types_needing_access_check,
1079         append_type_to_template_for_access_check_1): Use
1080         RECORD_OR_UNION_CODE_P.
1081
1082 2009-07-04  Jason Merrill  <jason@redhat.com>
1083
1084         * pt.c (retrieve_specialization): Don't get confused by a
1085         using-declaration that brings in another instance of this template
1086         from a base class.
1087
1088         * ptree.c (cxx_print_type): Fix logic.
1089
1090         * cp-tree.h (LANG_DECL_FN_CHECK): Fix non-checking version.
1091
1092         PR c++/40619
1093         * cp-tree.h (struct lang_decl_parm): New.
1094         (struct lang_decl): Add it.
1095         (LANG_DECL_PARM_CHECK): New.
1096         (DECL_PARM_INDEX): New.
1097         * decl2.c (parm_index): Remove.
1098         * lex.c (retrofit_lang_decl): Handle parms.
1099         (cxx_dup_lang_specific_decl): Likewise.
1100         * mangle.c (write_expression): Adjust.
1101         * tree.c (cp_tree_equal): Adjust.
1102         (decl_linkage): Only check DECL_COMDAT for functions and variables.
1103         * parser.c (cp_parser_parameter_declaration_list): Set
1104         DECL_PARM_INDEX.
1105         * pt.c (iterative_hash_template_arg): Hash it.
1106
1107 2009-07-03  Jason Merrill  <jason@redhat.com>
1108
1109         * cp-tree.h (struct lang_decl): Overhaul.
1110         (struct lang_decl_flags): Remove.
1111         (struct lang_decl_base): New.
1112         (struct lang_decl_min): New.
1113         (struct lang_decl_fn): New.
1114         (struct lang_decl_ns): New.
1115         (CAN_HAVE_FULL_LANG_DECL_P): Replace with LANG_DECL_HAS_MIN.
1116         (LANG_DECL_MIN_CHECK): New.
1117         (LANG_DECL_FN_CHECK): New.
1118         (LANG_DECL_NS_CHECK): New.
1119         (STRIP_TEMPLATE): New.
1120         (NON_THUNK_FUNCTION_CHECK): Remove.
1121         (DECL_DECLARES_FUNCTION_P): New.
1122         (lots): Adjust.
1123         * lex.c (retrofit_lang_decl, cxx_dup_lang_specific_decl): Adjust.
1124         * decl.c (push_local_name, duplicate_decls): Adjust.
1125         * decl2.c (start_objects): Don't set u2sel.
1126         * semantics.c (finish_omp_threadprivate): Adjust.
1127         * class.c (build_clone): Don't do much on TEMPLATE_DECLs.
1128         (decl_cloned_function_p): Out-of-line implementation of macros.
1129         (clone_function_decl, adjust_clone_args): Use DECL_CLONED_FUNCTION_P.
1130         * mangle.c (write_unqualified_name): Don't check function flags
1131         on non-functions.
1132         * method.c (make_alias_for): Don't set DECL_CLONED_FUNCTION.
1133         * pt.c (build_template_decl): Don't set function flags.
1134         (check_default_tmpl_args): Check that it's a function.
1135         (instantiate_template): Use DECL_ABSTRACT_ORIGIN to find the
1136         cloned template.
1137
1138         * pt.c (tsubst_decl) [FUNCTION_DECL]: Don't tsubst
1139         DECL_CLONED_FUNCTION.
1140
1141         * cp-tree.h (struct lang_type_class): Move sorted_fields here.
1142         * class.c (finish_struct_1): Adjust.
1143         * ptree.c (cxx_print_decl, cxx_print_type): Adjust.
1144         * search.c (lookup_field_1): Adjust.
1145
1146         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Remove.
1147         * decl.c (finish_method): Don't add to it.
1148         * class.c (fixup_pending_inline): Remove.
1149         (fixup_inline_methods): Remove.
1150         (finish_struct_1): Don't call it.
1151
1152         * error.c (dump_function_name): Handle null name.
1153
1154 2009-07-02  Mark Mitchell  <mark@codesourcery.com>
1155
1156         * typeck.c (cp_build_binary_op): Move warnings about use of NULL
1157         in arithmetic earlier and allow comparisions of NULL with
1158         pointers-to-members.
1159
1160 2009-07-02  Jason Merrill  <jason@redhat.com>
1161
1162         Use hash tables for template specialization lookup.
1163         * pt.c (struct spec_entry): New type.
1164         (decl_specializations, type_specializations): New hash tables.
1165         (register_specialization, retrieve_specialization): Use them.
1166         (reregister_specialization, lookup_template_class): Use them.
1167         (eq_specializations, hash_tmpl_and_args, hash_specialization): New.
1168         (iterative_hash_template_arg): New.
1169         (init_template_processing): New
1170         (process_partial_specialization): Don't look to see if we already
1171         have this partial specialization.
1172         (maybe_process_partial_specialization): Handle reassigning
1173         full specializations when we get an explicit specialization
1174         of the partial instantiation.
1175         (tsubst_friend_function): Adjust specialization reassignment code.
1176         (instantiate_template): Only do one lookup.
1177         (instantiate_decl): Don't do any lookup.
1178         * cp-tree.h: Declare init_template_processing.
1179         * decl.c (duplicate_decls): Pass args to reregister_specialization.
1180
1181 2009-07-01  Jason Merrill  <jason@redhat.com>
1182
1183         * cp-tree.h (DECL_CLASS_TEMPLATE_P): Use DECL_IMPLICIT_TYPEDEF_P.
1184
1185         * pt.c (register_specialization): Use duplicate_decls to merge
1186         the argument with a previous specialization.
1187         (check_explicit_specialization): Call register_specialization to
1188         merge the TEMPLATE_DECL with a previous version.
1189         (determine_specialization): Return the args even if fn is a template.
1190
1191 2009-07-01  Ian Lance Taylor  <iant@google.com>
1192
1193         * g++spec.c (lang_specific_driver): Bump num_args by 1.
1194
1195 2009-06-30  Jason Merrill  <jason@redhat.com>
1196
1197         PR c++/40595
1198         * pt.c (tsubst_pack_expansion): Handle unexpanded packs in an
1199         EXPR_PACK_EXPANSION.
1200
1201 2009-06-29  Jason Merrill  <jason@redhat.com>
1202
1203         PR c++/40274
1204         * error.c (dump_template_parms): Pass all args to
1205         count_non_default_template_args.
1206         (count_non_default_template_args): Pull out the inner ones.
1207
1208 2009-06-26  H.J. Lu  <hongjiu.lu@intel.com>
1209
1210         * decl.c (duplicate_decls): Re-indent.
1211
1212 2009-06-25  Ian Lance Taylor  <iant@google.com>
1213
1214         * call.c (avoid_sign_compare_warnings): New static function.
1215         (build_new_op): Call it.
1216         * typeck.c (cp_build_binary_op): Don't call warn_sign_compare if
1217         TREE_NO_WARNING is set on either operand.
1218
1219 2009-06-25  Ian Lance Taylor  <iant@google.com>
1220
1221         * g++spec.c (SKIPOPT): define.
1222         (lang_specific_driver): Handle -static-libstdc++.  Only add
1223         LIBSTDCXX_STATIC if we add LIBSTDCXX.
1224
1225 2009-06-25  Ian Lance Taylor  <iant@google.com>
1226
1227         * cvt.c (convert_to_void): Only warn about COND_EXPR if neither
1228         the second nor third operand has side effects.
1229
1230 2009-06-25  Ian Lance Taylor  <iant@google.com>
1231
1232         * parser.c (cp_parser_binary_expression): Increment
1233         c_inhibit_evaluation_warnings while parsing the right hand side of
1234         "true || x" or "false && x".
1235         * typeck.c (cp_build_binary_op): Only call warn_for_sign_compare
1236         if c_inhibit_evaluation_warnings is zero.
1237
1238 2009-06-24  Jason Merrill  <jason@redhat.com>
1239
1240         * error.c (dump_decl): Do say "typedef" for the injected class name.
1241
1242         * pt.c (lookup_template_class): Use currently_open_class,
1243         compare template args later.
1244
1245         PR c++/40342
1246         * decl.c (decls_match): Check DECL_TI_TEMPLATE too.
1247         * class.c (resolve_address_of_overloaded_function): Fix typo.
1248
1249 2009-06-18  Aldy Hernandez  <aldyh@redhat.com>
1250
1251         * class.c (get_vtable_decl): Replace finish_decl with cp_finish_decl.
1252         * decl.c (finish_decl): Remove.
1253         (declare_global_var): Replace finish_decl with cp_finish_decl.
1254         (start_method): Same.
1255         * rtti.c (emit_tinfo_decl): Same.
1256         * pt.c (tsubst_expr): Same.
1257         (instantiate_decl): Same.
1258         * decl2.c (grokbitfield): Same.
1259         * name-lookup.c (pushdecl_top_level_1): Same.
1260         * cp-tree.h: Remove finish_decl.
1261
1262 2009-06-16  David Edelsohn  <edelsohn@gnu.org>
1263
1264         * g++-spec.c (LIBSTDCXX_STATIC): Default to NULL.
1265         (lang_specific_driver): Always allocate extra argument.
1266         Add LIBSTDCXX_STATIC to arglist if defined and linking
1267         statically.
1268
1269 2009-06-16  Ian Lance Taylor  <iant@google.com>
1270
1271         * Make-lang.in (cp/class.o): Depend upon gt-cp-class.h.
1272         (cp/semantics.o): Depend upon gt-cp-semantics.h.
1273
1274 2009-06-16  Ian Lance Taylor  <iant@google.com>
1275
1276         * parser.c (cp_unevaluated_operand): Define global variable.
1277         (cp_parser_question_colon_clause): Increment
1278         c_inhibit_evaluation_warnings when evaluating an expression which
1279         will never be executed.
1280         (cp_parser_decltype): Increment cp_unevaluated_operand and
1281         c_inhibit_evaluation_warnings, not skip_evaluation.
1282         (cp_parser_sizeof_operand): Likewise.
1283         (cp_parser_enclosed_template_argument_list): Save
1284         cp_unevaluated_operand and c_inhibit_evaluation_warnings, not
1285         skip_evaluation.
1286         * cp-tree.h (struct saved_scope): Remove skip_evaluation field.
1287         Add unevaluated_operand and inhibit_evaluation_warnings fields.
1288         (cp_unevaluated_operand): Declare.
1289         * name-lookup.c (push_to_top_level): Save cp_unevaluated_operand
1290         and c_inhibit_evaluation_warnings rather than skip_evaluation.
1291         (pop_from_top_level): Restore cp_unevaluated_operand and
1292         c_inhibit_evaluation_warnings rather than skip_evaluation.
1293         * class.c (build_base_path): Check cp_unevaluated_operand rather
1294         than skip_evaluation.
1295         * typeck.c (build_class_member_access_expr): Likewise.
1296         (cp_build_binary_op): Don't warn about bad shift counts if
1297         c_inhibit_evaluation_warnings is non-zero.
1298         * pt.c (coerce_template_parms): Save state of
1299         cp_unevaluated_operand and c_inhibit_evaluation_warnings, not
1300         skip_evaluation.
1301         (tsubst_aggr_type): Likewise.
1302         (tsubst_pack_expansion): Check cp_unevaluated_operand rather than
1303         skip_evaluation.
1304         (tsubst_copy): Likewise.
1305         (tsubst): Set cp_unevaluated_operand and
1306         c_inhibit_evaluation_warnings, not skip_evaluation.
1307         (tsubst_copy_and_build): Likewise.
1308         * call.c (convert_arg_to_ellipsis): Check cp_unevaluated_operand
1309         rather than skip_evaluation.
1310         * decl2.c (mark_used): Likewise.
1311         * semantics.c (finish_non_static_data_member): Likewise.
1312         * cvt.c (cp_convert_and_check): Check
1313         c_inhibit_evaluation_warnings rather than skip_evaluation.
1314         * mangle.c (write_type): Set cp_unevaluated_operand rather than
1315         skip_evaluation.
1316
1317 2009-06-15  Ian Lance Taylor  <iant@google.com>
1318
1319         * parser.c (cp_parser_direct_declarator): Add braces around
1320         variables declared before label.
1321
1322 2009-06-15  Rafael Avila de Espindola  <espindola@google.com>
1323
1324         * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Remove.
1325         * cp-tree.h (cxx_comdat_group): Change signature.
1326         * decl.c (duplicate_decls): Use DECL_COMDAT_GROUP.
1327         (cxx_comdat_group): Change signature.
1328         * decl2.c (comdat_linkage, maybe_make_one_only): Update call to
1329         make_decl_one_only.
1330         (constrain_visibility, get_guard): Use DECL_COMDAT_GROUP.
1331         * method.c (use_thunk): Update call to make_decl_one_only.
1332         * optimize.c (maybe_clone_body): Use DECL_COMDAT_GROUP
1333
1334 2009-06-12  Aldy Hernandez  <aldyh@redhat.com>
1335
1336         * typeck.c (cp_build_binary_op): Pass location to overflow_warning.
1337         (build_modify_expr): New arg.
1338         * semantics.c (finish_unary_op_expr): Pass location to
1339         overflow_warning.
1340         (handle_omp_for_class_iterator): Pass location to build_modify_expr.
1341         * typeck.c (cxx_sizeof_or_alignof_type): Pass location to
1342         c_sizeof_or_alignof_type.
1343         (build_array_ref): New argument.
1344         (build_compound_expr): Same.
1345         (build_const_cast): Same.
1346         (build_ptrmemfunc): Pass location to build_c_cast.
1347         * init.c (avoid_placement_new_aliasing): Pass location to
1348         build_stmt.
1349         (build_vec_delete_1): Pass location to cp_build_modify_expr,
1350         build_compound_expr.
1351         * class.c (build_vtbl_ref_1): Pass location to build_array_ref.
1352         * decl.c (poplevel): Pass location to c_build_bind_expr.
1353         (finish_case_label): Pass location to build_case_label.
1354         (finish_constructor_body): Same.
1355         (finish_destructor_body): Pass location to build_stmt.
1356         (cxx_maybe_build_cleanup): Same, but to build_compound_expr.
1357         * call.c (build_new_op): Pass location to build_array_ref.
1358         (build_x_va_arg): Pass location to build_va_arg.
1359         * except.c (expand_end_catch_block): Pass location to
1360         build_stmt.
1361         * cp-tree.h (build_array_ref): New argument.
1362         (build_compound_expr): Same.
1363         (build_c_cast): Same.
1364         * cp-gimplify.c (gimplify_if_stmt): Pass location on down.
1365         (gimplify_switch_stmt): Same.
1366         * typeck2.c (split_nonconstant_init_1): Same.
1367         * pt.c (tsubst_copy): Same.
1368         * semantics.c (add_decl_expr): Same.
1369         (do_poplevel): Same.
1370         (push_cleanup): Same.
1371         (finish_goto_stmt): Same.
1372         (finish_expr_stmt): Same.
1373         (begin_if_stmt): Same.
1374         (begin_while_stmt): Same.
1375         (begin_do_stmt): Same.
1376         (finish_return_stmt): Same.
1377         (begin_for_stmt): Same.
1378         (finish_break_stmt): Same.
1379         (finish_continue_stmt): Same.
1380         (begin_switch_stmt): Same.
1381         (begin_try_block): Same.
1382         (begin_handler): Same.
1383         (finish_asm_stmt): Same.
1384         (finish_label_stmt): Same.
1385         (finish_stmt_expr_expr): Same.
1386         (finalize_nrv_r): Same.
1387         (finish_omp_atomic): Same.
1388         * name-lookup.c (do_using_directive): Same.
1389         * decl2.c (grok_array_decl): Same.
1390         * parser.c (cp_parser_cast_expression): Same.
1391         (cp_parser_selection_statement): Same.
1392         (cp_parser_implicitly_scoped_statement): Same.
1393         (cp_parser_objc_selector_expression): Same.
1394         (cp_parser_objc_synchronized_statement): Same.
1395         (cp_parser_objc_throw_statement): Same.
1396         (cp_parser_omp_critical): Same.
1397         (cp_parser_omp_master): Same.
1398         * typeck.c (build_function_call): Add location argument.
1399         * init.c: Add location argument to all build_decl calls.
1400         * class.c: Same.
1401         * method.c: Same.
1402         * rtti.c: Same.
1403         * tree.c: Same.
1404         * pt.c: Same.
1405         * semantics.c: Same.
1406         * lex.c: Same.
1407         * decl2.c: Same.
1408         * cp-gimplify.c: Same.
1409         * decl.c: Same.
1410         (cp_make_fname_decl): Add location argument.  Pass location ot
1411         build_decl.
1412         (finish_case_label): Same.
1413         * cp-tree.h (finish_case_label): Add location argument.
1414         * parser.c (cp_parser_label_for_labeled_statement): Pass location to
1415         finish_case_label.
1416         
1417 2009-06-09  Jason Merrill  <jason@redhat.com>
1418
1419         PR c++/40381
1420         * decl2.c (mark_used): Return after complaining about deleted fn.
1421
1422 2009-06-08  Jason Merrill  <jason@redhat.com>
1423
1424         * parser.c (cp_parser_type_id_1): 'auto' type is ok with a
1425         late-specified return type.
1426
1427 2009-06-08  Jakub Jelinek  <jakub@redhat.com>
1428
1429         PR c++/40373
1430         * call.c (check_dtor_name): Return false even if
1431         get_type_value (name) is error_mark_node.
1432
1433         PR c++/40370
1434         PR c++/40372
1435         * parser.c (cp_parser_direct_declarator): Don't set TREE_SIDE_EFFECTS
1436         on error_mark_node.  Check for VLAs outside of function context
1437         before check whether to wrap bounds into a NOP_EXPR with
1438         TREE_SIDE_EFFECTS.
1439
1440 2009-06-08  Alexandre Oliva  <aoliva@redhat.com>
1441
1442         * repo.c (get_base_filename): Use aux_base_name rather than
1443         alternate temporary file during second compare debug compilation.
1444         (finish_repo): Skip during -fcompare-debug-second.
1445
1446 2009-06-06  Ian Lance Taylor  <iant@google.com>
1447
1448         * parser.c (cp_parser_label_for_labeled_statement): Support
1449         attribute on labels if immediately followed by semicolon.
1450         * semantics.c (finish_label_stmt): Return new label.
1451         * pt.c (tsubst_expr): Handle attributes for LABEL_EXPR.
1452
1453 2009-06-03  Ian Lance Taylor  <iant@google.com>
1454
1455         * Make-lang.in (cc1plus-checksum.o): Depend upon $(CONFIG_H) and
1456         $(SYSTEM_H).
1457
1458 2009-06-02  Mark Mitchell  <mark@codesourcery.com>
1459
1460         * decl.c (maybe_deduce_size_from_array_init): Use relayout_decl.
1461
1462 2009-06-02  Jason Merrill  <jason@redhat.com>
1463
1464         PR c++/40308
1465         PR c++/40311
1466         * typeck.c (cp_build_modify_expr): Always pass init-lists to the
1467         conversion code.
1468         * call.c (implicit_conversion): Allow init-list conversion to scalar
1469         during direct-initialization, too.  Mark the conversion bad if it
1470         has too many levels of braces.
1471         (convert_like_real): And give a helpful error.
1472
1473         PR c++/40306
1474         PR c++/40307
1475         * decl.c (cp_finish_decl): Handle auto deduction from ().
1476         * typeck.c (build_x_indirect_ref): Handle dereferencing an operand
1477         with dependent type that is known to be a pointer.
1478
1479 2009-06-02  Simon Martin  <simartin@users.sourceforge.net>
1480
1481         PR c++/38089
1482         * pt.c (register_specialization): Properly setup DECL_CONTEXT for
1483         specializations in an invalid namespace.
1484
1485 2009-06-01  Aldy Hernandez  <aldyh@redhat.com>
1486
1487         * error.c (print_instantiation_partial_context): Print column
1488         numbers.
1489
1490 2009-05-29  Ian Lance Taylor  <iant@google.com>
1491
1492         * error.c (cp_printer): Don't use va_arg with enum type.
1493
1494 2009-05-28  Dodji Seketeli  <dodji@redhat.com>
1495
1496         PR c++/39754
1497         * cp-tree.h (canonical_type_variant): Remove this function declaration.
1498         (strip_typedefs): New function declaration.
1499         * tree.c (strip_typedefs): New function definition.
1500         (canonical_type_variant): Remove function definition.
1501         * cvt.c (convert_from_reference): No need to use
1502         canonical_type_variant.
1503         * typeck.c (cp_build_indirect_ref): Likewise.
1504         * error.c (dump_template_bindings): Use strip_typedefs instead of
1505         canonical_type_variant.
1506         * pt.c (convert_template_argument, unify): Likewise.
1507         * mangle.c (canonicalize_for_substitution): Don't use
1508         canonical_type_variant.
1509
1510 2009-05-27  Jason Merrill  <jason@redhat.com>
1511
1512         * call.c (implicit_conversion): Handle conversion from
1513         initializer-list to scalar.
1514         (convert_like_real): Likewise.  Avoid crashing on list
1515         initialization with bad conversions.
1516         (can_convert): Use LOOKUP_EXPLICIT.
1517         (can_convert_arg_bad): Add flags parm.
1518         * cp-tree.h: Adjust.
1519         * typeck.c (convert_for_assignment): Pass flags.
1520
1521 2009-05-27  Ian Lance Taylor  <iant@google.com>
1522
1523         * Make-lang.in (g++$(exeext)): Change $(COMPILER) to $(LINKER).
1524         (cc1plus-dummy$(exeext), cc1plus$(exeext)): Likewise.
1525
1526 2009-05-26  Ian Lance Taylor  <iant@google.com>
1527
1528         * Make-lang.in (g++spec.o): Use $(COMPILER).
1529         (g++$(exeext), cc1plus-dummy$(exeext)): Likewise.
1530         (cc1plus$(exeext)): Likewise.
1531
1532 2009-05-26  Dodji Seketeli  <dodji@redhat.com>
1533
1534         PR c++/40007
1535         * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Remove this accessor.
1536         (TI_TYPEDEFS_NEEDING_ACCESS_CHECKING): New accessor.
1537         (get_types_needing_access_check): Declare new entry point.
1538         * pt.c (append_type_to_template_for_access_check_1,
1539         get_types_needing_access_check): New functions.
1540         (perform_typedefs_access_check): Accept FUNCTION_DECLs and
1541         RECORD_TYPEs rather than TEMPLATE_DECLs. Use the new
1542         get_types_needing_access_check, no more
1543         MEMBER_TYPES_NEEDING_ACCESS_CHECK.
1544         (instantiate_class_template): Set input_location to the source
1545         location of the most specialized template definition.
1546         Perform access check using the RECORD_TYPE of the template, not its
1547         associated most generic TEMPLATE_DECL.
1548         (append_type_to_template_for_access_check): Augment function
1549         comments. Use the new get_types_needing_access_check, not
1550         MEMBER_TYPE_NEEDING_ACCESS_CHECK. Use the new
1551         append_type_to_template_for_access_check_1 subroutine.
1552
1553 2009-05-22  Jason Merrill  <jason@redhat.com>
1554
1555         PR c++/38064
1556         * typeck.c (cp_build_binary_op): Allow ENUMERAL_TYPE in
1557         arithmetic comparisons.
1558         (cp_common_type): Handle scoped enums.
1559
1560         * call.c (promoted_arithmetic_type_p): Don't use INTEGRAL_TYPE_P.
1561         (add_builtin_candidate, add_builtin_candidates): Likewise.
1562         (convert_like_real): Likewise.
1563         * class.c (check_bitfield_decl): Likewise.
1564         * decl.c (check_static_variable_definition): Likewise.
1565         (compute_array_index_type): Likewise.
1566         * decl2.c (grokbitfield): Likewise.
1567         * init.c (build_new_1): Likewise.
1568         * pt.c (convert_nontype_argument): Likewise.
1569         (current_instantiation): Likewise.
1570         * tree.c (pod_type_p): Likewise.
1571         * typeck.c (build_static_cast_1): Likewise.
1572         (build_reinterpret_cast_1): Likewise.
1573
1574 2009-05-22  Richard Guenther  <rguenther@suse.de>
1575
1576         PR middle-end/38964
1577         * init.c (avoid_placement_new_aliasing): Remove.
1578         (build_new_1): Do not call it.
1579
1580 2009-05-22  Mark Mitchell  <mark@codesourcery.com>
1581
1582         * decl2.c (decl_needed_p): Consider dllexport'd functions needed.
1583         * semantics.c (expand_or_defer_fn): Similarly.
1584
1585 2009-05-20  Ian Lance Taylor  <iant@google.com>
1586
1587         * parser.c (cp_parser_postfix_expression): Change args to a vec.
1588         Release it when done.
1589         (tree_vector): Define typedef.  Define VEC functions.
1590         (cp_parser_parenthesized_expression_list): Change return type to
1591         vec.  Change all callers.
1592         (cp_parser_new_expression): Change placement and initializer to
1593         vecs.  Release them when done.
1594         (cp_parser_new_placement): Change return type to vec.  Change all
1595         callers.
1596         (cp_parser_new_initializer): Likewise.
1597         * typeck.c (build_function_call_vec): Just call
1598         cp_build_function_call_vec.
1599         (cp_build_function_call): Just build a vec and call
1600         cp_build_function_call_vec.
1601         (cp_build_function_call_vec): New function based on old
1602         cp_build_function_call.
1603         (convert_arguments): Remove nargs and argarray parameters.  Change
1604         values to a vec.  Change caller.
1605         (build_x_compound_expr_from_vec): New function.
1606         (cp_build_modify_expr): Build vec to pass to
1607         build_special_member_call.
1608         * call.c (struct z_candidate): Add first_arg field.  Change args
1609         field to vec.
1610         (convert_class_to_reference): Handle first argument separately.
1611         (add_candidate): Add first_arg parameter.  Change args parameter
1612         to vec.  Change all callers.
1613         (add_function_candidate, add_conv_candidate): Likewise.
1614         (add_template_candidate_real, add_template_candidate): Likewise.
1615         (add_template_conv_candidate): Likewise.
1616         (build_user_type_conversion_1): Handle first argument separately.
1617         (resolve_args): Change return type and parameter type to vecs.
1618         Change all callers.
1619         (perform_overload_resolution): Change args parameter to vec.
1620         Change all callers.
1621         (build_new_function_call, build_operator_new_call): Likewise.
1622         (add_candidates): Likewise.
1623         (build_op_call): New globally visible function, built from and
1624         replacing static function build_object_call.
1625         (build_new_op): Don't handle CALL_EXPR.  Build vec, not tree_list,
1626         of arguments.
1627         (build_op_delete_call): Build vec to pass to
1628         cp_build_function_call_vec.
1629         (build_temp): Build vec to pass to build_special_member_call.
1630         (convert_like_real): Likewise.
1631         (perform_direct_initialization_if_possible): Likewise.
1632         (build_over_call): Handle first_arg field.  Use build_call_array
1633         rather than build_call_list.
1634         (build_special_member_call): Change args parameter to vec.  Change
1635         all callers.
1636         (build_new_method_call): Likewise.
1637         * init.c (expand_default_init): Change parms to vec.
1638         (build_raw_new_expr): Change placement and init to vecs.  Change
1639         all callers.
1640         (build_new_1, build_new): Likewise.
1641         * class.c (resolve_address_of_overloaded_function): Build array to
1642         pass to fn_type_unification.
1643         * pt.c (tsubst_copy_and_build): For NEW_EXPR build vecs to pass to
1644         build_new.  For CALL_EXPR create a vec rather than a tree_list;
1645         expand a pack if necessary.
1646         (fn_type_unification): Change args parameter to const tree *.  Add
1647         nargs parameter.  Change all callers.
1648         (type_unification_real): Likewise.
1649         (unify): Build array to pass to type_unification_real.
1650         (get_bindings): Build array to pass to fn_type_unification.
1651         (any_type_dependent_arguments_p): Change args parameter to a vec.
1652         Change all callers.
1653         (make_args_non_dependent): Renamed from build_non_dependent_args.
1654         Change return type to void.  Change parameter type to vec.  Change
1655         all callers.
1656         (do_auto_deduction): Pass an array to type_unification_real.
1657         * semantics.c (perform_koenig_lookup): Change args to vec.  Change
1658         all callers.
1659         (finish_call_expr): Change args to vec.  Change all callers.  Call
1660         build_op_call instead of passing CALL_EXPR to build_new_op.
1661         (cxx_omp_create_clause_info): Allocate vec to pass to
1662         build_special_member_call.
1663         * decl2.c (build_offset_ref_call_from_tree): Change args parameter
1664         to vec.  Change all callers.
1665         * name-lookup.c (lookup_function_nonclass): Likewise.
1666         (struct arg_lookup): Change args to vec.
1667         (arg_assoc_namespace): Handle args as a vec.
1668         (arg_assoc_args_vec): New static function.
1669         (lookup_arg_dependent): Change args parameter to vec.  Change all
1670         callers.
1671         * method.c (do_build_assign_ref): Allocate vec to pass to
1672         build_special_member_call.
1673         * except.c (build_throw): Likewise.
1674         * typeck2.c (build_functional_cast): Likewise.
1675         * cvt.c (ocp_convert): Likewise.
1676         * tree.c (build_min_non_dep_call_vec): Change last parameter to
1677         vec.  Change all callers.
1678         * cp-tree.h: Update declarations.
1679         * name-lookup.h: Update declarations.
1680
1681 2009-05-20  Sandra Loosemore  <sandra@codesourcery.com>
1682
1683         * typeck.c (default_conversion): Check targetm.promoted_type.
1684         * decl.c (grokdeclarator): Check targetm.invalid_return_type.
1685         (grokparms): Check targetm.invalid_parameter_type.
1686         * cvt.c (ocp_convert): Check targetm.convert_to_type.
1687         (build_expr_type_conversion): Check targetm.promoted_type.
1688
1689 2009-05-19  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1690
1691         * typeck.c (build_binary_op): Allow % on integal vectors.
1692
1693 2009-05-18  Jason Merrill  <jason@redhat.com>
1694
1695         Implement explicit conversions ops as specified in N2437.
1696         * decl.c (grokdeclarator): Handle explicit conversion ops.
1697         (check_initializer): Pass flags to store_init_value.
1698         * decl2.c (maybe_emit_vtables): Likewise.
1699         * init.c (expand_aggr_init_1): Likewise.
1700         * call.c (convert_class_to_reference): Take flags parm,
1701         check DECL_NONCONVERTING_P.
1702         (build_user_type_conversion_1): Check DECL_NONCONVERTING_P.
1703         (add_builtin_candidates): Simplify getting type of conversion.
1704         (build_object_call): Likewise.  Check DECL_NONCONVERTING_P.
1705         (implicit_conversion): Pass through LOOKUP_ONLYCONVERTING.
1706         (reference_binding): Take flags parm.  Direct-initialize copy parm.
1707         (add_function_candidate): Direct-initialize the copy parm.
1708         (add_conv_candidate): Use LOOKUP_IMPLICIT, not LOOKUP_NORMAL.
1709         (build_builtin_candidate): Add LOOKUP_ONLYCONVERTING.
1710         (conditional_conversion): Likewise.
1711         (convert_like_real): Only complain about DECL_NONCONVERTING_P
1712         constructors.
1713         (perform_implicit_conversion_flags): Add flags parm to
1714         perform_implicit_conversion.  Improve diagnostics.
1715         * cp-tree.h (LOOKUP_IMPLICIT): New macro.
1716         (LOOKUP_COPY_PARM): New bit macro.
1717         * cvt.c (build_expr_type_conversion): Check DECL_NONCONVERTING_P.
1718         * typeck.c (convert_for_assignment): Take flags parm, pass it to
1719         perform_implicit_conversion_flags.
1720         (cp_build_modify_expr): Pass flags to convert_for_assignment.
1721         (convert_for_initialization): Likewise.
1722         * typeck2.c (store_init_value): Take flags parm, pass to
1723         digest_init_flags.
1724         (digest_init_flags): Add flags parm to digest_init.
1725         (digest_init_r): Take flags parm, pass to convert_for_initialization.
1726         (process_init_constructor_array): Pass it.
1727         (process_init_constructor_record): Likewise.
1728         (process_init_constructor_union): Likewise.
1729
1730 2009-05-16  Jason Merrill  <jason@redhat.com>
1731
1732         PR c++/40139
1733         * pt.c (tsubst_qualified_id): Retain the type if we aren't dealing
1734         with a dependent type.  Actually look up the destructor.
1735         * semantics.c (finish_id_expression): Fix logic.
1736         (finish_qualified_id_expr): Don't try to use 'this' if we aren't in
1737         a function.
1738         * typeck.c (build_x_unary_op): Diagnose taking the address of a
1739         constructor or destructor.
1740         * tree.c (get_first_fn): Handle OFFSET_REF.
1741
1742 2009-05-17  Joseph Myers  <joseph@codesourcery.com>
1743
1744         * tree.c (cxx_printable_name_internal): Allow consecutive
1745         translated and untranslated cached copies of the name of the
1746         current function.
1747
1748 2009-05-15  Ian Lance Taylor  <iant@google.com>
1749
1750         * cp-tree.h (enum cp_lvalue_kind_flags): Rename from
1751         cp_lvalue_kind.  Change all uses.
1752         (enum base_access_flags): Rename from enum base_access.  Change
1753         all uses.
1754         * parser.c (enum cp_parser_flags): Remove enum tag.
1755
1756 2009-05-15  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1757
1758         PR 16302
1759         * call.c (build_new_op): Update calls to warn_logical_operator.
1760
1761 2009-05-14  Ian Lance Taylor  <iant@google.com>
1762
1763         * class.c (layout_class_type): Change itk to unsigned int.
1764         * decl.c (finish_enum): Change itk to unsigned int.
1765         * parser.c (cp_parser_check_decl_spec): Change ds to int.  Remove
1766         casts.
1767
1768 2009-05-13  David Mandelin <dmandelin@mozilla.com>:
1769
1770         * decl.c (duplicate_decls): Preserve parameter attributes.
1771
1772 2009-05-10  Jan Hubicka  <jh@suse.cz>
1773
1774         * decl2.c (cxx_callgraph_analyze_expr): Use
1775         cgraph_mark_address_taken.
1776
1777 2009-05-10  Joseph Myers  <joseph@codesourcery.com>
1778
1779         * call.c (name_as_c_string): Call type_as_string_translate.
1780         Translate identifiers to locale character set.
1781         * cp-tree.h (lang_decl_name): Update prototype.
1782         (type_as_string_translate, decl_as_string_translate,
1783         cxx_printable_name_translate): Declare.
1784         * cxx-pretty-print.c (M_): Define.
1785         (pp_cxx_unqualified_id, pp_cxx_canonical_template_parameter): Mark
1786         English fragments for conditional translation with M_.
1787         * decl.c (grokdeclarator): Translate identifiers to locale
1788         character set for diagnostics.
1789         * error.c (M_): Define.
1790         (dump_template_bindings, dump_type, dump_aggr_type,
1791         dump_type_prefix, dump_global_iord, dump_simple_decl, dump_decl,
1792         dump_function_decl, dump_template_parms, dump_expr,
1793         dump_binary_op, op_to_string, assop_to_string): Mark English
1794         fragments for conditional translation with M_.
1795         (type_as_string): Disable translation of identifiers.
1796         (type_as_string_translate): New.
1797         (expr_as_string): Disable translation of identifiers.
1798         (decl_as_string): Disable translation of identifiers.
1799         (decl_as_string_translate): New.
1800         (lang_decl_name): Add parameter translate.
1801         (args_to_string): Call type_as_string_translate.
1802         (cp_print_error_function): Call cxx_printable_name_translate.
1803         (print_instantiation_full_context,
1804         print_instantiation_partial_context): Call
1805         decl_as_string_translate.
1806         * parser.c (cp_lexer_get_preprocessor_token): Use %qE for
1807         identifier in diagnostic.
1808         * tree.c (cxx_printable_name): Change to
1809         cxx_printable_name_internal.  Add parameter translate.
1810         (cxx_printable_name, cxx_printable_name_translate): New wrappers
1811         round cxx_printable_name_internal.
1812
1813 2009-05-08  H.J. Lu  <hongjiu.lu@intel.com>
1814
1815         PR c/36892
1816         * call.c (build_call_a): Updated warn_deprecated_use call.
1817         (build_over_call): Likewise.
1818         * decl.c (grokdeclarator): Likewise.
1819         (grokparms): Likewise.
1820         * semantics.c (finish_id_expression): Likewise.
1821         * typeck.c (build_class_member_access_expr): Likewise.
1822         (finish_class_member_access_expr): Likewise.
1823
1824 2009-05-06  Dodji Seketeli  <dodji@redhat.com>
1825
1826         PR c++/17395
1827         * pt.c (tsubst_copy) <case PARM_DECL>: We don't want to tsubst the
1828         whole list of PARM_DECLs, just the current one.
1829
1830 2009-05-05  Shujing Zhao  <pearly.zhao@oracle.com>
1831
1832         * cp-tree.h:
1833         (opname_tab, assignop_tab, update_member_visibility, yyerror, yyhook,
1834         mangle_compound_literal): Remove unused declarations.
1835         (build_vfield_ref, cxx_print_statistics, clone_function_decl,
1836         adjust_clone_args, maybe_push_cleanup_level, pushtag, make_anon_name,
1837         pushdecl_top_level_maybe_friend, pushdecl_top_level_and_finish,
1838         check_for_out_of_scope_variable, print_other_binding_stack,
1839         maybe_push_decl, cxx_mark_addressable, force_target_expr,
1840         build_target_expr_with_type, finish_case_label,
1841         cxx_maybe_build_cleanup, begin_eh_spec_block, finish_eh_spec_block,
1842         check_template_keyword, cxx_omp_predetermined_sharing,
1843         cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor,
1844         cxx_omp_clause_assign_op, cxx_omp_clause_dtor, cxx_omp_finish_clause,
1845         cxx_omp_privatize_by_reference): Rearrange the declarations line to
1846         match the comment that indicates the .c file which the functions are
1847         defined.
1848         (cxx_print_xnode, cxx_print_decl, cxx_print_type,
1849         cxx_print_identifier, cxx_print_error_function, pushdecl): Add comment.
1850
1851 2009-05-05  Nathan Sidwell  <nathan@codesourcery.com>
1852
1853         * typeck.c (cp_build_compound_expr): Require RHS to have a known
1854         type.
1855         * class.c (resolve_address_of_overloaded_function): Use
1856         OVL_CURRENT for error message.
1857         (instantiate_type): Forbid COMPOUND_EXPRs and remove code dealing
1858         with them.  Do not copy the node.
1859
1860 2009-05-05  Jakub Jelinek  <jakub@redhat.com>
1861
1862         PR c++/40013
1863         * pt.c (tsubst): If magic NOP_EXPR with side-effects has no type,
1864         set it from its operand's type after tsubst_expr.
1865
1866 2009-05-04  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1867
1868         PR c++/28152
1869         * parser.c (cp_lexer_get_preprocessor_token):  Do not store the
1870         canonical spelling for keywords.
1871         (cp_parser_attribute_list): Use the canonical spelling for
1872         keywords in attributes.
1873
1874 2009-05-01  Joseph Myers  <joseph@codesourcery.com>
1875
1876         * cxx-pretty-print.c (is_destructor_name, pp_cxx_unqualified_id,
1877         pp_cxx_template_keyword_if_needed, pp_cxx_postfix_expression,
1878         pp_cxx_new_expression, pp_cxx_delete_expression,
1879         pp_cxx_unary_expression, pp_cxx_assignment_operator,
1880         pp_cxx_assignment_expression, pp_cxx_expression,
1881         pp_cxx_function_specifier, pp_cxx_decl_specifier_seq,
1882         pp_cxx_simple_type_specifier, pp_cxx_type_specifier_seq,
1883         pp_cxx_exception_specification, pp_cxx_direct_declarator,
1884         pp_cxx_ctor_initializer, pp_cxx_type_id, pp_cxx_statement,
1885         pp_cxx_namespace_alias_definition, pp_cxx_template_parameter,
1886         pp_cxx_canonical_template_parameter, pp_cxx_template_declaration,
1887         pp_cxx_declaration, pp_cxx_typeid_expression,
1888         pp_cxx_va_arg_expression, pp_cxx_offsetof_expression,
1889         pp_cxx_trait_expression): Mostly use pp_string and
1890         pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
1891         for non-identifiers.  Mark English strings for translation.
1892         * cxx-pretty-print.h (pp_cxx_ws_string): Define.
1893         * error.c (dump_template_parameter, dump_template_bindings,
1894         dump_type, dump_aggr_type, dump_type_prefix, dump_simple_decl,
1895         dump_decl, dump_template_decl, dump_function_decl,
1896         dump_parameters, dump_exception_spec, dump_template_parms,
1897         dump_expr, dump_binary_op, dump_unary_op, op_to_string,
1898         assop_to_string, args_to_string, cp_print_error_function,
1899         print_instantiation_full_context,
1900         print_instantiation_partial_context): Mostly use pp_string and
1901         pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
1902         for non-identifiers.  Mark English strings for translation.
1903         (dump_global_iord): Mark strings for translation; use longer
1904         strings instead of substituting single words.
1905         (function_category): Return a format string marked for
1906         translation, not a single word or phrase to substitute in a longer
1907         phrase.
1908
1909 2009-04-28  Ben Elliston  <bje@au.ibm.com>
1910
1911         PR c++/35652
1912         Revert:
1913
1914         2009-03-27  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1915
1916         * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
1917
1918 2009-04-27  Ian Lance Taylor  <iant@google.com>
1919
1920         * semantics.c (finish_omp_clauses): Change type of c_kind to enum
1921         omp_clause_code.
1922
1923 2009-04-27  Jakub Jelinek  <jakub@redhat.com>
1924
1925         PR c++/39875
1926         * cvt.c (convert_to_void) <case INDIRECT_REF>: Only warn about
1927         -Wunused-value if implicit.
1928
1929 2009-04-24  Ian Lance Taylor  <iant@google.com>
1930
1931         * call.c (build_temp): Change 0 to enum constant.
1932         * cp-tree.h (cp_lvalue_kind): Typedef to int rather than enum
1933         type.
1934         * cp-gimplify.c (cp_gimplify_expr): Add cast to enum type.
1935         * decl2.c (constrain_visibility): Likewise.
1936         * parser.c (cp_lexer_get_preprocessor_token): Likewise.
1937         (cp_parser_flags): Typedef to int rather than enum type.
1938         (cp_parser_expression_stack_entry): Change prec field to enum
1939         cp_parser_prec.
1940
1941         * typeck.c (build_modify_expr): Add lhs_origtype parameter.
1942         Change all callers.
1943
1944 2009-04-22  Dodji Seketeli  <dodji@redhat.com>
1945
1946         PR c++/39639
1947         * parser.c (cp_parser_template_argument_list): Display an error
1948         when an ellipsis is not preceded by a parameter pack. Also, warn
1949         about variadic templates usage without -std=c++0x.
1950
1951 2009-04-21  Taras Glek <tglek@mozilla.com>
1952
1953         * cp-tree.h: Update GTY annotations to new syntax.
1954         * decl.c: Likewise.
1955         * mangle.c: Likewise.
1956         * name-lookup.c: Likewise.
1957         * name-lookup.h: Likewise.
1958         * parser.c: Likewise.
1959         * pt.c: Likewise.
1960         * rtti.c: Likewise.
1961         * semantics.c: Likewise.
1962         * typeck2.c: Likewise.
1963
1964 2009-04-22  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1965
1966         PR c++/14875
1967         * parser.c (cp_parser_error): Pass token->flags to c_parse_error.
1968
1969 2009-04-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1970
1971         PR c++/35711
1972         * typeck.c (check_for_casting_away_constness): We diagnose casting
1973         away any qualifiers not just constness.
1974         (casts_away_constness): Mention that it handles more than just
1975         constness.
1976         
1977 2009-04-21  Joseph Myers  <joseph@codesourcery.com>
1978
1979         * ChangeLog, ChangeLog-1993, ChangeLog-1994, ChangeLog-1995,
1980         ChangeLog-1996, ChangeLog-1997, ChangeLog-1998, ChangeLog-1999,
1981         ChangeLog-2000, ChangeLog-2001, ChangeLog-2002, ChangeLog-2003,
1982         ChangeLog-2004, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007,
1983         ChangeLog-2008, ChangeLog.ptr, ChangeLog.tree-ssa, NEWS,
1984         cfns.gperf: Add copyright and license notices.
1985         * cfns.h: Regenerate.
1986         * ChangeLog, ChangeLog-2004: Correct dates.
1987
1988 2009-04-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1989
1990         PR 16202
1991         * tree.c (lvalue_p_1): Use const_tree.
1992         Use CONST_CAST_TREE to avoid warning.
1993         (lvalue_p): Returns bool, receives const_tree.
1994
1995 2009-04-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1996
1997         PR c++/13358
1998         * parser.c (cp_parser_check_decl_spec): Drop redundant flags.
1999         * error.c (pedwarn_cxx98): New.
2000         * cp-tree.h (pedwarn_cxx98): Declare.
2001
2002 2009-04-20  Le-Chun Wu  <lcwu@google.com>
2003
2004         PR c++/39803
2005         * init.c (build_vec_init): Set TREE_NO_WARNING on the
2006         compiler-generated INDIRECT_REF expression.
2007
2008 2009-04-20  Ian Lance Taylor  <iant@google.com>
2009
2010         * typeck.c (build_function_call_vec): New function.
2011         (cp_build_function_call): Only pass first parameter to
2012         objc_rewrite_function_call.
2013         (build_modify_expr): Add rhs_origtype parameter.  Change all
2014         callers.
2015         * decl.c (finish_decl): Add origtype parameter.  Change all
2016         callers.
2017         * semantics.c (finish_call_expr): Pass VEC to
2018         resolve_overloaded_builtin.
2019
2020 2009-04-20  Ian Lance Taylor  <iant@google.com>
2021
2022         * cp-tree.h (base_access): Change typedef to int.
2023         * parser.c (cp_parser_omp_flush): Change 0 to OMP_CLAUSE_ERROR.
2024         (cp_parser_omp_threadprivate): Likewise.
2025         * pt.c (unify_pack_expansion): Add casts to enum type.
2026
2027 2009-04-19  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2028
2029         PR c/32061
2030         PR c++/36954
2031         * call.c (build_new_op): Save the original codes of operands
2032         before folding.
2033
2034 2009-04-18  Kazu Hirata  <kazu@codesourcery.com>
2035
2036         * cp-tree.h: Remove the prototype for insert_block.
2037         * decl.c (insert_block): Remove.
2038
2039 2009-04-16  Ian Lance Taylor  <iant@google.com>
2040
2041         * cp-tree.h (enum tsubst_flags): Rename from enum tsubst_flags_t.
2042         (tsubst_flags_t): Change typedef from enum type to int.
2043
2044 2009-04-16  Paolo Bonzini  <bonzini@gnu.org>
2045
2046         * decl.c (check_initializer): Use TYPE_VECTOR_OPAQUE
2047         instead of targetm.vector_opaque_p.
2048
2049 2009-04-15  Le-Chun Wu  <lcwu@google.com>
2050
2051         PR c++/39551
2052         * call.c (build_over_call): Set TREE_NO_WARNING on the
2053         compiler-generated INDIRECT_REF expression.
2054         * cvt.c (convert_to_void): Emit warning when stripping off
2055         INDIRECT_REF.
2056
2057 2009-04-14  Diego Novillo  <dnovillo@google.com>
2058
2059         * parser.c (cp_parser_type_specifier_seq): Move call to
2060         invoke_plugin_callbacks ...
2061         (cp_parser_type_specifier_seq): ... here.
2062
2063 2009-04-14  Le-Chun Wu  <lcwu@google.com>
2064
2065         * Make-lang.in: Modify dependencies of files including plugin.h.
2066         * decl.c (finish_function): Call invoke_plugin_callbacks.
2067         * parser.c (cp_parser_type_specifier): Call invoke_plugin_callbacks.
2068
2069 2009-04-14  Jason Merrill  <jason@redhat.com>
2070
2071         PR c++/39763
2072         * name-lookup.c (pushdecl_maybe_friend): Avoid all warnings
2073         about shadowing by tentative parms.
2074
2075 2009-04-13  Jason Merrill  <jason@redhat.com>
2076
2077         PR c++/39480
2078         * call.c (build_over_call): Don't call memcpy if the target is
2079         the same as the source.
2080
2081 2009-04-13  Jason Merrill  <jason@redhat.com>
2082
2083         PR c++/39750
2084         * pt.c (uses_template_parms): Handle CONSTRUCTOR.
2085
2086 2009-04-12  Jason Merrill  <jason@redhat.com>
2087
2088         PR c++/39742
2089         * call.c (joust): Don't crash on variadic fn.
2090
2091 2009-04-10  Jason Merrill  <jason@redhat.com>
2092
2093         PR c++/28301
2094         * parser.c (cp_parser_skip_to_end_of_block_or_statement): Return
2095         if we see a close brace without an open brace.
2096
2097 2009-04-10  H.J. Lu  <hongjiu.lu@intel.com>
2098
2099         * parser.c (cp_parser_class_specifier): Remove the unused
2100         has_trailing_semicolon.
2101
2102 2009-04-10  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2103
2104         PR  c++/20118
2105         * parser.c (cp_parser_check_template_parameters): Take a
2106         cp_declarator parameter.
2107         (cp_parser_elaborated_type_specifier): Update to
2108         cp_parser_check_template_parameters.
2109         (cp_parser_class_head): Likewise.
2110         (cp_parser_check_declarator_template_parameters): Likewise.
2111         (cp_parser_check_template_parameters): Handle first the non-error
2112         conditions. Give more accurate diagnostics if a declarator is
2113         given. 
2114
2115 2009-04-08  Jason Merrill  <jason@redhat.com>
2116
2117         PR c++/25185
2118         * error.c (dump_aggr_type): Chase template typedefs if
2119         -fno-pretty-templates.
2120
2121 2009-04-08  Dodji Seketeli  <dodji@redhat.com>
2122
2123         PR c++/39637
2124         * parser.c (cp_parser_enumerator_definition): Make sure the
2125         initializer of the enumerator doesn't contain any bare parameter pack.
2126
2127 2009-04-07  Jason Merrill  <jason@redhat.com>
2128
2129         PR c++/34691
2130         * name-lookup.c (merge_functions): Keep multiple extern "C" functions.
2131         * call.c (joust): Complain about mismatched default arguments
2132         in extern "C" functions.
2133         * class.c (resolve_address_of_overloaded_function): Handle multiple
2134         extern "C" functions.
2135         * pt.c (resolve_overloaded_unification): Likewise.
2136
2137 2009-04-07  Jason Merrill  <jason@redhat.com>
2138
2139         PR c++/25185
2140         * error.c (dump_function_decl): Don't pretty-print templates
2141         if -fno-pretty-templates.
2142         (count_non_default_template_args): Print all args if
2143         -fno-pretty-templates.
2144
2145 2009-04-06  Jason Merrill  <jason@redhat.com>
2146
2147         PR c++/35146
2148         * pt.c (fn_type_unification): For DEDUCE_EXACT check that
2149         the deduced template arguments give us the parameter types
2150         we're looking for.
2151
2152 2009-04-05  Giovanni Bajo <giovannibajo@libero.it>
2153             Jason Merrill  <jason@redhat.com>
2154
2155         PR c++/14912
2156         * error.c (count_non_default_template_args): New fn.
2157         (dump_template_parms): Call it.
2158         (dump_template_argument_list): Call it.  Add parms parm.
2159         (dump_template_argument): Adjust call to dump_template_argument_list.
2160         (dump_type, dump_decl): Likewise.
2161         (dump_template_bindings): Refactor logic.
2162
2163 2009-04-03  Jason Merrill  <jason@redhat.com>
2164
2165         PR c++/25185
2166         * error.c (dump_template_bindings): Look through typedefs in
2167         typename results.
2168         (dump_type) [TYPENAME_TYPE]: Print the typedef name if any.
2169         (find_typenames_r): Also collect typedefs.
2170         * pt.c (unify): Strip typedefs.
2171
2172         PR c++/39608
2173         * semantics.c (finish_id_expression): Don't assume a dependent
2174         member of the current instantiation isn't a valid integral
2175         constant expression.  Check dependent_scope_p.
2176         * pt.c (dependent_scope_p): Check TYPE_P.
2177         (tsubst_copy): If args is null, just return.
2178
2179 2009-04-02  Jason Merrill  <jason@redhat.com>
2180
2181         PR c++/25185
2182         * error.c (find_typenames, find_typenames_r): New fns.
2183         (dump_function_decl): Call find_typenames.
2184         (dump_template_bindings): Print typenames as well.
2185         * pt.c (tsubst): Non-static.
2186         * cp-tree.h: Declare it.
2187
2188 2009-04-02  Dodji Seketeli  <dodji@redhat.com>
2189
2190         PR c++/26693
2191         * decl2.c (grokfield): when a typedef appears in a
2192         class, create the typedef variant type node for it.
2193         (save_template_attributes): Creating typedef variant type node
2194          here is now useless.
2195         * decl.c (grokdeclarator): If the typedef'ed struct/class was
2196         anonymous, set the proper type name to all its type variants.
2197         (xref_basetypes) : Fixup the variant types after setting
2198         TYPE_BINFO on REF.
2199         * name-lookup.c (pushdecl_maybe_friend): Reuse the
2200         set_underlying_type function to install typedef variant types.
2201         * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
2202         macro.
2203         (append_type_to_template_for_access_check): New entry points.
2204         * semantics.c (check_accessibility_of_qualified_id):
2205         When a typedef that is a member of a class appears in a template,
2206         add it to the template. It will be ...
2207         * class.c (finish_struct_bits): Split type variant fixup into ...
2208         (fixup_type_variants): A new entry point.
2209         * pt.c (instantiate_class_template, instantiate_template ): ... access
2210         checked at template instantiation time.
2211         (resolve_type_name_type): The type name should be the name of the
2212         main type variant.
2213         (retrieve_specialization): Specializations of template typedefs aren't
2214         to looked up in DECL_TEMPLATE_INSTANTIATIONS (tmpl).
2215         (append_type_to_template_for_access_check): New entry point.
2216         (tsubst_decl): For typedefs, build the variant type from the correct
2217         original type.
2218         (get_class_bindings): Fix function comment.
2219         (perform_typedefs_access_check): New entry point.
2220
2221 2009-03-31  Jason Merrill  <jason@redhat.com>
2222
2223         PR c++/34691
2224         * name-lookup.c (pushdecl_maybe_friend): Diagnose mismatched
2225         extern "C" declarations.
2226
2227         C++ DR 613
2228         * semantics.c (finish_non_static_data_member): Allow such references
2229         without an associated object in sizeof/decltype/alignof.
2230
2231         * ptree.c (cxx_print_decl): Pretty-print full name of
2232         function/template.
2233         (cxx_print_type): Pretty-print full name of class.
2234
2235         * decl.c (grokdeclarator): Reject pointer to qualified function
2236         type.
2237
2238         PR c++/37806, core issue 547
2239         * typeck.c (cp_apply_type_quals_to_decl): Don't apply any quals
2240         to a typedef.
2241         * tree.c (cp_build_qualified_type_real): Don't apply restrict to a 
2242         function type.
2243         * decl.h (enum decl_context): Add TEMPLATE_TYPE_ARG.
2244         * decl.c (groktypename): Add is_template_arg parameter.
2245         (grokdeclarator): Allow function cv-quals on a template type arg.
2246         * parser.c (cp_parser_new_type_id, cp_parser_type_id): Add
2247         is_template_arg argument in calls to groktypename.
2248         * cp-tree.h: Adjust prototype.
2249         * error.c (dump_type_prefix, dump_type_suffix): Fix plain 
2250         FUNCTION_TYPE printing.
2251         
2252         * mangle.c (write_expression): Mangle dependent name as
2253         source-name.
2254
2255         PR c++/38030, 38850, 39070
2256         * pt.c (type_dependent_expression_p_push): New fn.
2257         (tsubst_copy_and_build) [CALL_EXPR]: Only do arg-dep lookup when the
2258         substitution makes the call non-dependent.  Preserve koenig_p.
2259         * parser.c (cp_parser_postfix_expression): Only do arg-dep lookup
2260         for non-dependent calls.
2261         * semantics.c (finish_call_expr): Revert earlier changes.
2262         * cp-tree.h: Revert change to finish_call_expr prototype.
2263
2264 2009-03-29  Joseph Myers  <joseph@codesourcery.com>
2265
2266         PR preprocessor/34695
2267         * cp-tree.h (cp_cpp_error): Remove.
2268         * error.c (cp_cpp_error): Remove.
2269         * parser.c (cp_lexer_new_main): Set done_lexing instead of
2270         client_diagnostic and error callback.
2271
2272 2009-03-28  Paolo Bonzini  <bonzini@gnu.org>
2273
2274         * cp/cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
2275         * cp/cp-objcp-common.c (cxx_staticp): Remove.
2276         * cp/cp-tree.h (cxx_staticp): Remove.
2277
2278 2009-03-28  Jakub Jelinek  <jakub@redhat.com>
2279
2280         PR c++/39554
2281         * parser.c (cp_parser_postfix_expression): Don't call
2282         warning_if_disallowed_function_p.
2283
2284 2009-03-27  Jan Hubicka  <jh@suse.cz>
2285
2286         * except.c (choose_personality_routine): Set terminate_node to abort
2287         for java exceptions.
2288
2289 2009-03-27  Dodji Seketeli  <dodji@redhat.com>
2290             Jakub Jelinek  <jakub@redhat.com>
2291
2292         PR debug/37959
2293         * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P): Define.
2294         (cp_function_decl_explicit_p): New prototype.
2295         * cp-objcp-common.c (cp_function_decl_explicit_p): New function.
2296
2297 2009-03-27  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2298
2299         PR c++/38638
2300         * parser.c (cp_parser_elaborated_type_specifier): If we have a
2301         typename tag and don't have either a TYPE_DECL or a
2302         TEMPLATE_ID_EXPR, set the type to NULL.
2303
2304 2009-03-27  Simon Martin  <simartin@users.sourceforge.net>
2305
2306         PR c++/37647
2307         * decl.c (grokdeclarator): Reject [con|de]stuctors in a non-class
2308         scope.
2309
2310 2009-03-27  Simon Martin  <simartin@users.sourceforge.net>
2311
2312         PR c++/29727
2313         * decl.c (check_array_designated_initializer): Handle error_mark_node.
2314
2315 2009-03-27  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2316
2317         PR c++/35652
2318         * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
2319
2320 2009-03-26  Andrew Haley  <aph@redhat.com>
2321
2322         PR C++/39380
2323         * decl2.c (possibly_inlined_p): If java exceptions are in use
2324         don't inline a decl unless it is explicitly marked inline.
2325         * lex.c: (pragma_java_exceptions): New variable.
2326         (handle_pragma_java_exceptions): Set pragma_java_exceptions.
2327         * cp-tree.h (pragma_java_exceptions): Declare new variable.
2328
2329 2009-03-24  Jason Merrill  <jason@redhat.com>
2330
2331         PR c++/28274
2332         * name-lookup.c (pushdecl_maybe_friend): Check default args later.
2333
2334 2009-03-23  Jakub Jelinek  <jakub@redhat.com>
2335
2336         PR c/39495
2337         * semantics.c (handle_omp_for_class_iterator): Swap cond operands and
2338         code if iter is the second operand.
2339         * parser.c (cp_parser_binary_expression): Add no_toplevel_fold_p
2340         argument.  If it is set, don't build the toplevel expression with
2341         build_x_binary_op, but build2.
2342         (cp_parser_assignment_expression,  cp_parser_omp_for_incr): Adjust
2343         callers.
2344         (cp_parser_omp_for_cond): Don't assume the first operand of the
2345         comparison must be decl.
2346
2347 2009-03-23  Jason Merrill  <jason@redhat.com>
2348
2349         PR c++/37729
2350         * pt.c (make_fnparm_pack): Split out from...
2351         (instantiate_decl): ...here.
2352         (tsubst_pack_expansion): Handle being called in a late-specified
2353         return type.
2354
2355         PR c++/39526
2356         * name-lookup.c (pushdecl_maybe_friend): Don't warn about shadowing
2357         a parm with a parm.
2358
2359 2009-03-20  Jason Merrill  <jason@redhat.com>
2360
2361         PR c++/28879
2362         * parser.c (cp_parser_direct_declarator): In a template, wrap 
2363         non-constant expression in NOP_EXPR with TREE_SIDE_EFFECTS set.
2364         * pt.c (tsubst): Preserve it in a partial instantiation.
2365         (dependent_type_p_r): Don't check value_dependent_expression_p.
2366         * decl.c (compute_array_index_type): Don't check
2367         value_dependent_expression_p if TREE_SIDE_EFFECTS.
2368
2369         C++ core issue 703
2370         * typeck2.c (check_narrowing): Don't complain about loss of 
2371         precision when converting a floating-point constant.
2372
2373 2009-03-19  Jakub Jelinek  <jakub@redhat.com>
2374
2375         PR c/39495
2376         * parser.c (cp_parser_omp_for_cond): Don't check lhs if decl is NULL.
2377         (cp_parser_omp_for_loop): Always use cp_parser_omp_for_cond.
2378
2379 2009-03-18  Jakub Jelinek  <jakub@redhat.com>
2380
2381         * parser.c (struct cp_token): Reorder fields for 64-bit hosts.
2382         (eof_token): Adjust.
2383
2384 2009-03-18  H.J. Lu  <hongjiu.lu@intel.com>
2385
2386         PR c++/39425
2387         * parser.c (cp_parser_explicit_specialization): Don't skip the
2388         rest of the specialization when begin_specialization returns
2389         false.
2390
2391 2009-03-17  Jason Merrill  <jason@redhat.com>
2392
2393         * decl.c (grokfndecl): Set DECL_CONTEXT on parms.
2394         (duplicate_decls): Adjust DECL_CONTEXT of newdecl's parms.
2395         * pt.c (check_explicit_specialization): Likewise.
2396         (tsubst_copy) [PARM_DECL]: Return a dummy parm if we don't have a
2397         local specialization.
2398         * tree.c (cp_tree_equal) [PARM_DECL]: Check type and index, not name.
2399         * decl2.c (parm_index): New fn.
2400         * semantics.c (finish_decltype_type): Don't use describable_type.
2401         * mangle.c (write_expression): Likewise.  Mangle ALIGNOF_EXPR.
2402         Give a sorry for unsupported codes rather than crash.  Mangle
2403         conversions with other than 1 operand.  New mangling for PARM_DECL.
2404         * operators.def (ALIGNOF_EXPR): Mangle as "az".
2405
2406 2009-03-17  Jing Yu  <jingyu@google.com>
2407
2408         PR middle-end/39378
2409         * method.c (use_thunk): Change is_thunk from crtl to cfun.
2410
2411 2009-03-17  Paolo Carlini  <paolo.carlini@oracle.com>
2412
2413         PR c++/39475
2414         * semantics.c (check_trait_type): New.
2415         (finish_trait_expr): Use it.
2416
2417 2009-03-17  Jakub Jelinek  <jakub@redhat.com>
2418
2419         * name-lookup.c (cp_emit_debug_info_for_using): Emit USING_STMTs
2420         instead of calling imported_module_or_decl debug hook if
2421         building_stmt_tree ().
2422         * cp-gimplify.c (cp_gimplify_expr): Don't assert the first operand
2423         is a NAMESPACE_DECL.
2424
2425         PR debug/37890
2426         * name-lookup.c (do_namespace_alias): Don't call global_decl debug
2427         hook at function scope.
2428
2429         PR debug/39471
2430         * cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
2431         on IMPORTED_DECL.
2432
2433 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
2434
2435         PR c++/39371
2436         * semantics.c (finish_switch_cond): Don't call get_unwidened.
2437         * decl.c (finish_case_label): Pass SWITCH_STMT_TYPE as 3rd argument
2438         instead of TREE_TYPE (cond).
2439
2440 2009-03-08  H.J. Lu  <hongjiu.lu@intel.com>
2441
2442         PR c++/39060
2443         * parser.c (cp_parser_late_parsing_default_args): Continue
2444         the loop when cp_parser_assignment_expression returns
2445         error_mark_node.
2446
2447 2009-03-07  Jason Merrill  <jason@redhat.com>
2448
2449         PR c++/39367
2450         * init.c (build_new_1): Don't use a VLA type.
2451         (build_vec_init): Handle getting a pointer for BASE.
2452
2453 2009-03-06  H.J. Lu  <hongjiu.lu@intel.com>
2454
2455         PR c++/37520
2456         * cp-tree.h: Check NO_DOT_IN_LABEL before NO_DOLLAR_IN_LABEL
2457         when mangling symbols.
2458
2459 2009-03-06  Paolo Carlini  <paolo.carlini@oracle.com>
2460
2461         PR c++/33492
2462         * error.c (dump_expr): Don't try to print THROW_EXPRs in full.
2463
2464 2009-03-06  Alexandre Oliva  <aoliva@redhat.com>
2465
2466         * decl.c (record_builtin_java_type): Use canonicalized integer
2467         types.
2468
2469 2009-03-04  Jason Merrill  <jason@redhat.com>
2470
2471         PR c++/38908
2472         * class.c (is_really_empty_class): New fn.
2473         * cp-tree.h: Declare it.
2474         * cp-objcp-common.c (cp_expr_size): Use it.
2475
2476         PR c++/13549
2477         * semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
2478         * parser.c (cp_parser_postfix_expression): Call it for 
2479         TEMPLATE_ID_EXPR.
2480         * tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
2481         (get_first_fn): Likewise.
2482
2483         PR c++/9634
2484         PR c++/29469
2485         PR c++/29607
2486         Implement DR 224.
2487         * decl.c (make_typename_type): Do look inside currently open classes.
2488         * parser.c (cp_parser_lookup_name): Likewise.
2489         (cp_parser_template_name): Likewise.
2490         * pt.c (dependent_scope_p): New function.
2491         * cp-tree.h: Declare it.
2492         * class.c (currently_open_class): Return fast if T isn't a class.
2493
2494 2009-02-26  H.J. Lu  <hongjiu.lu@intel.com>
2495
2496         PR c++/37789
2497         * parser.c (cp_parser_mem_initializer): Return error_mark_node
2498         if cp_parser_mem_initializer_id returns error_mark_node.
2499
2500 2009-02-24  Richard Guenther  <rguenther@suse.de>
2501
2502         PR c++/39242
2503         * pt.c (instantiate_decl): Do not instantiate extern, non-inline
2504         declared functions.
2505
2506 2009-02-23  H.J. Lu  <hongjiu.lu@intel.com>
2507
2508         PR c++/36411
2509         * pt.c (coerce_template_template_parms): Return 0 if parameter
2510         is error_mark_node.
2511
2512 2009-02-23  Jason Merrill  <jason@redhat.com>
2513
2514         * pt.c (unify): Call maybe_adjust_types_for_deduction when
2515         deducing from an initializer list.
2516
2517 2009-02-20  Jason Merrill  <jason@redhat.com>
2518
2519         PR c++/39225
2520         * decl.c (grokdeclarator): Handle ~identifier.
2521
2522 2009-02-19  Jakub Jelinek  <jakub@redhat.com>
2523
2524         PR target/39175
2525         * decl2.c (determine_visibility): If visibility changed and
2526         DECL_RTL has been already set, call make_decl_rtl to update symbol
2527         flags.
2528
2529 2009-02-19  H.J. Lu  <hongjiu.lu@intel.com>
2530
2531         PR c++/39188
2532         * cp-tree.h (maybe_commonize_var): New.
2533
2534         * decl.c (maybe_commonize_var): Make it extern.
2535
2536         * decl2.c (finish_anon_union): Call maybe_commonize_var.
2537
2538 2009-02-18  H.J. Lu  <hongjiu.lu@intel.com>
2539
2540         PR c++/39219
2541         * parser.c (cp_parser_enum_specifier): Apply all attributes.
2542
2543 2009-02-18  Jason Merrill  <jason@redhat.com>
2544
2545         * cfns.h: Tweak pathname for cfns.gperf.
2546
2547 2009-02-13  Jason Merrill  <jason@redhat.com>
2548
2549         PR c++/39070
2550         * semantics.c (finish_call_expr): Change koenig_p parm to int.
2551         If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
2552         * cp-tree.h: Adjust prototype.
2553         * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
2554
2555 2009-02-12  Jason Merrill  <jason@redhat.com>
2556
2557         PR c++/38950
2558         * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
2559
2560 2009-02-11  Jason Merrill  <jason@redhat.com>
2561
2562         PR c++/39153
2563         * decl2.c (cp_write_global_declarations): 
2564         Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
2565
2566         PR c++/30111
2567         * init.c (build_value_init_noctor): Split out from...
2568         (build_value_init): ...here.
2569         (expand_aggr_init_1): Handle value-initialization.
2570         * cp-tree.h: Add declaration.
2571         * class.c (type_has_user_provided_constructor): 
2572         Handle non-class arguments.
2573
2574 2009-02-10  Jason Merrill  <jason@redhat.com>
2575
2576         PR c++/38649
2577         * class.c (defaultable_fn_p): Handle ... properly.
2578
2579         PR c++/36744
2580         * tree.c (lvalue_p_1): Condition rvalue ref handling on
2581         treat_class_rvalues_as_lvalues, too.
2582
2583 2009-02-10  Paolo Carlini  <paolo.carlini@oracle.com>
2584
2585         PR c++/34397
2586         * typeck.c (build_x_array_ref): New.
2587         * cp-tree.h: Declare it.
2588         * pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
2589
2590 2009-02-09  Jason Merrill  <jason@redhat.com>
2591
2592         PR c++/39109
2593         * semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
2594         * init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
2595         * tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
2596         * cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
2597         for build_value_init TARGET_EXPR.
2598         * cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
2599
2600 2009-02-06  Paolo Carlini  <paolo.carlini@oracle.com>
2601
2602         PR c++/35147
2603         PR c++/37737
2604         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
2605
2606 2009-02-04  Jakub Jelinek  <jakub@redhat.com>
2607
2608         PR c++/39095
2609         * operators.def: Use COMPONENT_REF code for ->/pt operator again,
2610         remove ./dt operator.
2611         * mangle.c (write_expression): Handle COMPONENT_REF after handling
2612         ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
2613         write_string ("dt") instead of using operators.def.
2614
2615 2009-02-03  Jason Merrill  <jason@redhat.com>
2616
2617         * typeck.c (cp_build_unary_op): Only complain about taking address
2618         of main if pedantic.
2619
2620 2009-02-03  Jakub Jelinek  <jakub@redhat.com>
2621
2622         PR inline-asm/39059
2623         * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
2624
2625         PR c++/39056
2626         * typeck2.c (digest_init_r): Don't call process_init_constructor
2627         for COMPLEX_TYPE.
2628
2629 2009-02-03  Paolo Bonzini  <bonzini@gnu.org>
2630
2631         PR c++/36897
2632         * pt.c (convert_nontype_argument_function): Expect expr to be an
2633         ADDR_EXPR.
2634
2635         PR c++/37314
2636         * typeck.c (merge_types): Call resolve_typename_type if only
2637         one type is a typename.
2638
2639 2009-02-02  Jason Merrill  <jason@redhat.com>
2640
2641         PR c++/39054
2642         * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node 
2643         in BIT_NOT_EXPR.
2644
2645 2009-02-01  Paolo Carlini  <paolo.carlini@oracle.com>
2646
2647         PR c++/39053
2648         * parser.c (cp_parser_pure_specifier): If there are no tokens left
2649         do not call cp_lexer_consume_token.
2650
2651 2009-01-30  Jakub Jelinek  <jakub@redhat.com>
2652
2653         PR c++/39028
2654         * parser.c (cp_parser_already_scoped_statement): Handle __label__
2655         declarations.
2656
2657 2009-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
2658
2659         PR c++/33465
2660         * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
2661
2662 2009-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
2663
2664         PR c++/38655
2665         * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
2666
2667 2009-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
2668
2669         * typeck.c (invalid_nonstatic_memfn_p): Use
2670         DECL_NONSTATIC_MEMBER_FUNCTION_P.
2671
2672 2009-01-27  Paolo Carlini  <paolo.carlini@oracle.com>
2673
2674         PR c++/37554
2675         * call.c (build_over_call): If convert_for_arg_passing returns
2676         error_mark_node unconditionally return it.
2677
2678 2009-01-22  Adam Nemet  <anemet@caviumnetworks.com>
2679
2680         * class.c (check_field_decls): Also inherit packed for bitfields
2681         regardless of their type.
2682
2683 2009-01-22  Dodji Seketeli  <dodji@redhat.com>
2684
2685         PR c++/38930
2686         * decl2.c (grokfield): Reverting changes of PR c++/26693
2687         (save_template_attributes): Likewise.
2688         * decl.c (grokdeclarator): Likewise.
2689         * name-lookup.c (pushdecl_maybe_friend): Likewise.
2690         * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
2691         (append_type_to_template_for_access_check): Likewise.
2692         * semantics.c (check_accessibility_of_qualified_id): Likewise.
2693         * pt.c (instantiate_class_template, instantiate_template ): Likewise.
2694         (tsubst): Likewise.
2695         (resolve_type_name_type): Likewise.
2696         (append_type_to_template_for_access_check): Likewise.
2697
2698 2009-01-21  Dodji Seketeli  <dodji@redhat.com>
2699
2700         PR c++/26693
2701         * decl2.c (grokfield): when a typedef appears in a
2702         class, create the typedef variant type node for it.
2703         (save_template_attributes): Creating typedef variant type node
2704          here is now useless.
2705         * decl.c (grokdeclarator): If the typedef'ed struct/class was
2706         anonymous, set the proper type name to all its type variants.
2707         * name-lookup.c (pushdecl_maybe_friend): Reuse the
2708         set_underlying_type function to install typedef variant types.
2709         * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
2710         macro.
2711         (append_type_to_template_for_access_check): New entry points.
2712         * semantics.c (check_accessibility_of_qualified_id):
2713         When a typedef that is a member of a class appears in a template,
2714         add it to the template. It will be ...
2715         * pt.c (instantiate_class_template, instantiate_template ): ... access
2716         checked at template instantiation time.
2717         (tsubst): Handle the case of being called with NULL args.
2718         (resolve_type_name_type): The type name should be the name of the
2719         main type variant.
2720         (append_type_to_template_for_access_check): New entry point.
2721
2722 2009-01-19  Jason Merrill  <jason@redhat.com>
2723
2724         PR c++/23287
2725         * parser.c (cp_parser_unqualified_id): In a template,
2726         accept ~identifier.
2727         * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
2728
2729 2009-01-16  Jason Merrill  <jason@redhat.com>
2730
2731         PR c++/38877
2732         * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
2733         * init.c (build_new): Don't call describable_type unless we
2734         have an auto.
2735
2736         PR c++/29470
2737         * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
2738
2739         PR c++/38579
2740         * search.c (protected_accessible_p): N doesn't vary.
2741
2742 2009-01-15  Jason Merrill  <jason@redhat.com>
2743
2744         PR c++/38850
2745         * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
2746         accept hidden friends.
2747
2748 2009-01-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2749
2750         PR C++/29388
2751         * decl.c (grokdeclarator): Check for a non namespace/class context.
2752
2753 2009-01-15  Jason Merrill  <jason@redhat.com>
2754
2755         PR c++/36334
2756         PR c++/37646
2757         * tree.c (lvalue_p_1): Handle BASELINK.  A COMPONENT_REF to
2758         a function isn't necessarily an lvalue. Take tree, not const_tree.
2759         (lvalue_p, real_lvalue_p): Take tree, not const_tree.
2760         * typeck.c (lvalue_or_else): Likewise.
2761         * cp-tree.h: Adjust prototypes.
2762
2763 2009-01-15  Steve Ellcey  <sje@cup.hp.com>
2764
2765         PR c++/38357
2766         * pt.c (tsubst): Check for NULL args.
2767
2768 2009-01-15  Dodji Seketeli  <dodji@redhat.com>
2769
2770         PR c++/38636
2771         * name-lookup.c (pushtag): Don't create members to types that are not
2772         being created.
2773
2774 2009-01-14  Nick Clifton  <nickc@redhat.com>
2775
2776         PR c++/37862
2777         * parser.c: Pass cp_id_kind computed in
2778         cp_parser_postfix_dot_deref_expression to
2779         cp_parser_primary_expression.
2780
2781 2009-01-13  Jakub Jelinek  <jakub@redhat.com>
2782
2783         PR c++/38795
2784         * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
2785         STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
2786         as CAST_EXPR.
2787
2788 2009-01-12  Jason Merrill  <jason@redhat.com>
2789             Steve Ellcey  <sje@cup.hp.com>
2790
2791         PR c++/35109
2792         * name-lookup.c (lookup_name_real): Keep looking past a hidden 
2793         binding.
2794
2795 2009-01-12  Dodji Seketeli  <dodji@redhat.com>
2796
2797         PR c++/36019
2798         * pt.c (parameter_of_template_p): New function.
2799         * cp-tree.h: Declare it.
2800         * name-lookup.c (binding_to_template_parms_of_scope_p): New
2801         function.
2802         (outer_binding): Take template parameters in account when looking for
2803         a name binding.
2804
2805 2009-01-12  Jason Merrill  <jason@redhat.com>
2806
2807         PR c++/31488
2808         * tree.c (pod_type_p): Return 1 for structs created by the back end.
2809
2810 2009-01-12  Jakub Jelinek  <jakub@redhat.com>
2811
2812         PR c/32041
2813         * parser.c (cp_parser_builtin_offsetof): Allow `->' in
2814         offsetof member-designator, handle it as `[0].'.
2815
2816         PR c++/38794
2817         * decl.c (start_function): If grokdeclarator hasn't returned
2818         FUNCTION_DECL nor error_mark_node, issue diagnostics.
2819
2820 2009-01-11  Jakub Jelinek  <jakub@redhat.com>
2821
2822         PR c++/36254
2823         * cp-gimplify.c (genericize_if_stmt): Renamed from ...
2824         (gimplify_if_stmt): ... this.
2825         (cp_gimplify_expr): Don't handle IF_STMT here.
2826         (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
2827
2828 2009-01-10  Andrew Pinski  <pinskia@gmail.com>
2829
2830         PR c++/38648
2831         * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
2832
2833         PR c++/36695
2834         * typeck2.c (build_functional_cast): Check for reference type and NULL
2835         PARMS.
2836
2837 2009-01-09  Steve Ellcey  <sje@cup.hp.com>
2838
2839         * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
2840
2841 2009-01-09  Jakub Jelinek  <jakub@redhat.com>
2842
2843         PR c++/35335
2844         * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
2845
2846 2009-01-09  John F. Carr  <jfc@mit.edu>
2847
2848         PR c++/37877
2849         * parser.c (cp_parser_class_specifier): Clear
2850         parser->in_unbraced_linkage_specification_p while parsing class
2851         specifiers.
2852
2853 2009-01-07  Jakub Jelinek  <jakub@redhat.com>
2854
2855         PR c++/38725
2856         * semantics.c (finish_goto_stmt): Convert destination to
2857         void *.
2858
2859 2009-01-06  Jason Merrill  <jason@redhat.com>
2860
2861         PR c++/35297
2862         PR c++/35477
2863         PR c++/35784
2864         PR c++/36846
2865         PR c++/38276
2866         * pt.c (check_default_tmpl_args): Don't complain about
2867         out-of-order parameter packs in the enclosing class
2868         or parameter packs after default args.
2869         (coerce_template_parms): If we have more than one
2870         parameter pack, don't flatten argument packs.
2871         (template_args_equal): Handle argument packs.
2872         (comp_template_args): Don't flatten argument packs.
2873         (check_instantiated_arg): Split out from...
2874         (check_instantiated_args): Here.  Handle arg packs.
2875         (convert_template_argument): Just check that nontype argument
2876         packs have the right type.
2877
2878 2009-01-05  Dodji Seketeli  <dodji@redhat.com>
2879
2880         PR c++/38472
2881         * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
2882
2883 2009-01-05  Jason Merrill  <jason@redhat.com>
2884
2885         PR c++/38698
2886         * typeck2.c (process_init_constructor_union): Handle union with
2887         no fields.
2888
2889         * mangle.c (write_expression): Remove mangling for zero-operand
2890         casts.
2891
2892         PR c++/38701
2893         * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
2894         defaulting.
2895
2896         PR c++/38702
2897         * class.c (defaultable_fn_p): Only operator== can be a copy
2898         assignment operator.
2899
2900 2009-01-02  Jason Merrill  <jason@redhat.com>
2901
2902         PR c++/38698
2903         * typeck2.c (process_init_constructor_union): Handle excess
2904         initializers.
2905         (process_init_constructor_record): Likewise.
2906
2907         PR c++/38684
2908         * typeck2.c (digest_init_r): Don't use process_init_constructor
2909         for non-aggregate classes.
2910
2911 \f
2912 Copyright (C) 2009 Free Software Foundation, Inc.
2913
2914 Copying and distribution of this file, with or without modification,
2915 are permitted in any medium without royalty provided the copyright
2916 notice and this notice are preserved.