re PR target/39175 (ICE while compiling qt-4.5.0-rc1)
[platform/upstream/gcc.git] / gcc / cp / ChangeLog
1 2009-02-19  Jakub Jelinek  <jakub@redhat.com>
2
3         PR target/39175
4         * decl2.c (determine_visibility): If visibility changed and
5         DECL_RTL has been already set, call make_decl_rtl to update symbol
6         flags.
7
8 2009-02-19  H.J. Lu  <hongjiu.lu@intel.com>
9
10         PR c++/39188
11         * cp-tree.h (maybe_commonize_var): New.
12
13         * decl.c (maybe_commonize_var): Make it extern.
14
15         * decl2.c (finish_anon_union): Call maybe_commonize_var.
16
17 2009-02-18  H.J. Lu  <hongjiu.lu@intel.com>
18
19         PR c++/39219
20         * parser.c (cp_parser_enum_specifier): Apply all attributes.
21
22 2009-02-18  Jason Merrill  <jason@redhat.com>
23
24         * cfns.h: Tweak pathname for cfns.gperf.
25
26 2009-02-13  Jason Merrill  <jason@redhat.com>
27
28         PR c++/39070
29         * semantics.c (finish_call_expr): Change koenig_p parm to int.
30         If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
31         * cp-tree.h: Adjust prototype.
32         * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
33
34 2009-02-12  Jason Merrill  <jason@redhat.com>
35
36         PR c++/38950
37         * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
38
39 2009-02-11  Jason Merrill  <jason@redhat.com>
40
41         PR c++/39153
42         * decl2.c (cp_write_global_declarations): 
43         Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
44
45         PR c++/30111
46         * init.c (build_value_init_noctor): Split out from...
47         (build_value_init): ...here.
48         (expand_aggr_init_1): Handle value-initialization.
49         * cp-tree.h: Add declaration.
50         * class.c (type_has_user_provided_constructor): 
51         Handle non-class arguments.
52
53 2009-02-10  Jason Merrill  <jason@redhat.com>
54
55         PR c++/38649
56         * class.c (defaultable_fn_p): Handle ... properly.
57
58         PR c++/36744
59         * tree.c (lvalue_p_1): Condition rvalue ref handling on
60         treat_class_rvalues_as_lvalues, too.
61
62 2009-02-10  Paolo Carlini  <paolo.carlini@oracle.com>
63
64         PR c++/34397
65         * typeck.c (build_x_array_ref): New.
66         * cp-tree.h: Declare it.
67         * pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
68
69 2009-02-09  Jason Merrill  <jason@redhat.com>
70
71         PR c++/39109
72         * semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
73         * init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
74         * tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
75         * cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
76         for build_value_init TARGET_EXPR.
77         * cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
78
79 2009-02-06  Paolo Carlini  <paolo.carlini@oracle.com>
80
81         PR c++/35147
82         PR c++/37737
83         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
84
85 2009-02-04  Jakub Jelinek  <jakub@redhat.com>
86
87         PR c++/39095
88         * operators.def: Use COMPONENT_REF code for ->/pt operator again,
89         remove ./dt operator.
90         * mangle.c (write_expression): Handle COMPONENT_REF after handling
91         ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
92         write_string ("dt") instead of using operators.def.
93
94 2009-02-03  Jason Merrill  <jason@redhat.com>
95
96         * typeck.c (cp_build_unary_op): Only complain about taking address
97         of main if pedantic.
98
99 2009-02-03  Jakub Jelinek  <jakub@redhat.com>
100
101         PR inline-asm/39059
102         * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
103
104         PR c++/39056
105         * typeck2.c (digest_init_r): Don't call process_init_constructor
106         for COMPLEX_TYPE.
107
108 2009-02-03  Paolo Bonzini  <bonzini@gnu.org>
109
110         PR c++/36897
111         * pt.c (convert_nontype_argument_function): Expect expr to be an
112         ADDR_EXPR.
113
114         PR c++/37314
115         * typeck.c (merge_types): Call resolve_typename_type if only
116         one type is a typename.
117
118 2009-02-02  Jason Merrill  <jason@redhat.com>
119
120         PR c++/39054
121         * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node 
122         in BIT_NOT_EXPR.
123
124 2009-02-01  Paolo Carlini  <paolo.carlini@oracle.com>
125
126         PR c++/39053
127         * parser.c (cp_parser_pure_specifier): If there are no tokens left
128         do not call cp_lexer_consume_token.
129
130 2009-01-30  Jakub Jelinek  <jakub@redhat.com>
131
132         PR c++/39028
133         * parser.c (cp_parser_already_scoped_statement): Handle __label__
134         declarations.
135
136 2009-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
137
138         PR c++/33465
139         * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
140
141 2009-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
142
143         PR c++/38655
144         * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
145
146 2009-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
147
148         * typeck.c (invalid_nonstatic_memfn_p): Use
149         DECL_NONSTATIC_MEMBER_FUNCTION_P.
150
151 2009-01-27  Paolo Carlini  <paolo.carlini@oracle.com>
152
153         PR c++/37554
154         * call.c (build_over_call): If convert_for_arg_passing returns
155         error_mark_node unconditionally return it.
156
157 2009-01-22  Adam Nemet  <anemet@caviumnetworks.com>
158
159         * class.c (check_field_decls): Also inherit packed for bitfields
160         regardless of their type.
161
162 2009-01-22  Dodji Seketeli  <dodji@redhat.com>
163
164         PR c++/38930
165         * decl2.c (grokfield): Reverting changes of PR c++/26693
166         (save_template_attributes): Likewise.
167         * decl.c (grokdeclarator): Likewise.
168         * name-lookup.c (pushdecl_maybe_friend): Likewise.
169         * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
170         (append_type_to_template_for_access_check): Likewise.
171         * semantics.c (check_accessibility_of_qualified_id): Likewise.
172         * pt.c (instantiate_class_template, instantiate_template ): Likewise.
173         (tsubst): Likewise.
174         (resolve_type_name_type): Likewise.
175         (append_type_to_template_for_access_check): Likewise.
176
177 2009-01-21  Dodji Seketeli  <dodji@redhat.com>
178
179         PR c++/26693
180         * decl2.c (grokfield): when a typedef appears in a
181         class, create the typedef variant type node for it.
182         (save_template_attributes): Creating typedef variant type node
183          here is now useless.
184         * decl.c (grokdeclarator): If the typedef'ed struct/class was
185         anonymous, set the proper type name to all its type variants.
186         * name-lookup.c (pushdecl_maybe_friend): Reuse the
187         set_underlying_type function to install typedef variant types.
188         * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
189         macro.
190         (append_type_to_template_for_access_check): New entry points.
191         * semantics.c (check_accessibility_of_qualified_id):
192         When a typedef that is a member of a class appears in a template,
193         add it to the template. It will be ...
194         * pt.c (instantiate_class_template, instantiate_template ): ... access
195         checked at template instantiation time.
196         (tsubst): Handle the case of being called with NULL args.
197         (resolve_type_name_type): The type name should be the name of the
198         main type variant.
199         (append_type_to_template_for_access_check): New entry point.
200
201 2009-01-19  Jason Merrill  <jason@redhat.com>
202
203         PR c++/23287
204         * parser.c (cp_parser_unqualified_id): In a template,
205         accept ~identifier.
206         * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
207
208 2009-01-16  Jason Merrill  <jason@redhat.com>
209
210         PR c++/38877
211         * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
212         * init.c (build_new): Don't call describable_type unless we
213         have an auto.
214
215         PR c++/29470
216         * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
217
218         PR c++/38579
219         * search.c (protected_accessible_p): N doesn't vary.
220
221 2009-01-15  Jason Merrill  <jason@redhat.com>
222
223         PR c++/38850
224         * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
225         accept hidden friends.
226
227 2009-01-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
228
229         PR C++/29388
230         * decl.c (grokdeclarator): Check for a non namespace/class context.
231
232 2009-01-15  Jason Merrill  <jason@redhat.com>
233
234         PR c++/36334
235         PR c++/37646
236         * tree.c (lvalue_p_1): Handle BASELINK.  A COMPONENT_REF to
237         a function isn't necessarily an lvalue. Take tree, not const_tree.
238         (lvalue_p, real_lvalue_p): Take tree, not const_tree.
239         * typeck.c (lvalue_or_else): Likewise.
240         * cp-tree.h: Adjust prototypes.
241
242 2009-01-15  Steve Ellcey  <sje@cup.hp.com>
243
244         PR c++/38357
245         * pt.c (tsubst): Check for NULL args.
246
247 2009-01-15  Dodji Seketeli  <dodji@redhat.com>
248
249         PR c++/38636
250         * name-lookup.c (pushtag): Don't create members to types that are not
251         being created.
252
253 2009-01-14  Nick Clifton  <nickc@redhat.com>
254
255         PR c++/37862
256         * parser.c: Pass cp_id_kind computed in
257         cp_parser_postfix_dot_deref_expression to
258         cp_parser_primary_expression.
259
260 2009-01-13  Jakub Jelinek  <jakub@redhat.com>
261
262         PR c++/38795
263         * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
264         STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
265         as CAST_EXPR.
266
267 2009-01-12  Jason Merrill  <jason@redhat.com>
268             Steve Ellcey  <sje@cup.hp.com>
269
270         PR c++/35109
271         * name-lookup.c (lookup_name_real): Keep looking past a hidden 
272         binding.
273
274 2009-01-12  Dodji Seketeli  <dodji@redhat.com>
275
276         PR c++/36019
277         * pt.c (parameter_of_template_p): New function.
278         * cp-tree.h: Declare it.
279         * name-lookup.c (binding_to_template_parms_of_scope_p): New
280         function.
281         (outer_binding): Take template parameters in account when looking for
282         a name binding.
283
284 2009-01-12  Jason Merrill  <jason@redhat.com>
285
286         PR c++/31488
287         * tree.c (pod_type_p): Return 1 for structs created by the back end.
288
289 2009-01-12  Jakub Jelinek  <jakub@redhat.com>
290
291         PR c/32041
292         * parser.c (cp_parser_builtin_offsetof): Allow `->' in
293         offsetof member-designator, handle it as `[0].'.
294
295         PR c++/38794
296         * decl.c (start_function): If grokdeclarator hasn't returned
297         FUNCTION_DECL nor error_mark_node, issue diagnostics.
298
299 2009-01-11  Jakub Jelinek  <jakub@redhat.com>
300
301         PR c++/36254
302         * cp-gimplify.c (genericize_if_stmt): Renamed from ...
303         (gimplify_if_stmt): ... this.
304         (cp_gimplify_expr): Don't handle IF_STMT here.
305         (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
306
307 2009-01-10  Andrew Pinski  <pinskia@gmail.com>
308
309         PR c++/38648
310         * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
311
312         PR c++/36695
313         * typeck2.c (build_functional_cast): Check for reference type and NULL
314         PARMS.
315
316 2009-01-09  Steve Ellcey  <sje@cup.hp.com>
317
318         * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
319
320 2009-01-09  Jakub Jelinek  <jakub@redhat.com>
321
322         PR c++/35335
323         * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
324
325 2009-01-09  John F. Carr  <jfc@mit.edu>
326
327         PR c++/37877
328         * parser.c (cp_parser_class_specifier): Clear
329         parser->in_unbraced_linkage_specification_p while parsing class
330         specifiers.
331
332 2009-01-07  Jakub Jelinek  <jakub@redhat.com>
333
334         PR c++/38725
335         * semantics.c (finish_goto_stmt): Convert destination to
336         void *.
337
338 2009-01-06  Jason Merrill  <jason@redhat.com>
339
340         PR c++/35297
341         PR c++/35477
342         PR c++/35784
343         PR c++/36846
344         PR c++/38276
345         * pt.c (check_default_tmpl_args): Don't complain about
346         out-of-order parameter packs in the enclosing class
347         or parameter packs after default args.
348         (coerce_template_parms): If we have more than one
349         parameter pack, don't flatten argument packs.
350         (template_args_equal): Handle argument packs.
351         (comp_template_args): Don't flatten argument packs.
352         (check_instantiated_arg): Split out from...
353         (check_instantiated_args): Here.  Handle arg packs.
354         (convert_template_argument): Just check that nontype argument
355         packs have the right type.
356
357 2009-01-05  Dodji Seketeli  <dodji@redhat.com>
358
359         PR c++/38472
360         * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
361
362 2009-01-05  Jason Merrill  <jason@redhat.com>
363
364         PR c++/38698
365         * typeck2.c (process_init_constructor_union): Handle union with
366         no fields.
367
368         * mangle.c (write_expression): Remove mangling for zero-operand
369         casts.
370
371         PR c++/38701
372         * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
373         defaulting.
374
375         PR c++/38702
376         * class.c (defaultable_fn_p): Only operator== can be a copy
377         assignment operator.
378
379 2009-01-02  Jason Merrill  <jason@redhat.com>
380
381         PR c++/38698
382         * typeck2.c (process_init_constructor_union): Handle excess
383         initializers.
384         (process_init_constructor_record): Likewise.
385
386         PR c++/38684
387         * typeck2.c (digest_init_r): Don't use process_init_constructor
388         for non-aggregate classes.
389
390 2008-12-31  Jakub Jelinek  <jakub@redhat.com>
391
392         PR c++/38647
393         * parser.c (cp_parser_primary_expression) <case RID_FUNCTION_NAME>:
394         Return error_mark_node if cp_parser_non_integral_constant_expression
395         returns true.
396
397         PR c++/38640
398         * semantics.c (finish_decltype_type): Handle TEMPLATE_PARM_INDEX.
399
400 2008-12-29  Jakub Jelinek  <jakub@redhat.com>
401
402         PR c++/38635
403         * parser.c (cp_parser_condition): Use cp_parser_require
404         instead of cp_lexer_consume_token to consume =.
405
406         PR c++/38637
407         * decl.c (start_enum): If enumtype is error_mark_node, exit early.
408
409 2008-12-28  Jakub Jelinek  <jakub@redhat.com>
410
411         PR c++/38650
412         * semantics.c (finish_omp_for): Don't add CLEANUP_POINT_EXPR
413         around volatile iteration var in condition and/or increment
414         expression.
415
416 2008-12-27  Jakub Jelinek  <jakub@redhat.com>
417
418         PR c++/38639
419         * pt.c (tsubst_omp_for_iterator): RECUR on whole init_expr instead of
420         just its type.
421
422 2008-12-21  Jason Merrill  <jason@redhat.com>
423
424         PR c++/38597
425         * name-lookup.c (arg_assoc_type): Handle DECLTYPE_TYPE.
426
427 2008-12-20  Jakub Jelinek  <jakub@redhat.com>
428             Manuel López-Ibáñez  <manu@gcc.gnu.org>
429
430         PR c++/36921
431         * c-common.c (warn_about_parentheses): Remove ARG_UNUSED from
432         arg_left.  Don't warn about X<=Y<=Z if comparison's type isn't
433         integral.
434
435 2008-12-19  Jakub Jelinek  <jakub@redhat.com>
436
437         PR c++/38577
438         * call.c (build_new_method_call): Handle call being COMPOUND_EXPR
439         or NOP_EXPR.
440
441 2008-12-18  Jakub Jelinek  <jakub@redhat.com>
442
443         PR c++/38427
444         * init.c (perform_member_init): For value-initialized
445         references call permerror instead of warning and don't emit any
446         INIT_EXPR.
447
448 2008-12-18  Jason Merrill  <jason@redhat.com>
449
450         PR c++/38485
451         * parser.c (cp_parser_token_starts_cast_expression): An EOF
452         can't start a cast-expression.
453
454 2008-12-17  Jason Merrill  <jason@redhat.com>
455
456         * semantics.c (describable_type): New function.
457         (finish_decltype_type): Use it for dependent exprs.
458         * cp-tree.h: Declare it.
459         * mangle.c (write_type) [DECLTYPE_TYPE]: Set skip_evaluation.
460         (write_expression): If skip_evaluation, use type stubs.
461         * tree.c (cp_tree_equal): Handle PARM_DECLs from different
462         declarations of a function.
463         * init.c (build_new): Do auto deduction if type is describable.
464         * decl.c (cp_finish_decl): Likewise.
465         * parser.c (cp_parser_omp_for_loop): Likewise.
466
467 2008-12-10  Jason Merrill  <jason@redhat.com>
468
469         PR c++/35319
470         * mangle.c (write_builtin_type): Add mangling for decimal floating 
471         point and fixed point types.
472         (write_type): Pass FIXED_POINT_TYPE along.
473
474 2008-12-09  Mark Mitchell  <mark@codesourcery.com>
475
476         PR c++/37971
477         * class.c (resolve_address_of_overloaded_function): Check
478         accessibility of member functions unless FLAGS indicates
479         otherwise.
480         * call.c (standard_conversion): Adjust flags passed to
481         instantiate_type.
482         (convert_default_arg): Do not perform access checks.
483         * cp-tree.h (tsubst_flags_t): Add tf_no_access_control.
484
485 2008-12-08  Steve Ellcey  <sje@cup.hp.com>
486
487         * decl2.c (mark_used): Remove assemble_external call.
488
489 2008-12-08  Dodji Seketeli  <dodji@redhat.com>
490
491         PR debug/38390
492         * name-lookup.c (kept_level_p): Don't forget the case of levels
493           having using directives.
494
495 2008-12-08  Richard Henderson  <rth@redhat.com>
496
497         PR 38240
498         * class.c (finish_struct_bits): Use SET_TYPE_MODE.
499         * decl.c (record_unknown_type): Likewise.
500         (start_enum, finish_enum): Likewise.
501
502 2008-12-05  Jakub Jelinek  <jakub@redhat.com>
503
504         PR c++/35336
505         * error.c (dump_expr): Handle BIT_FIELD_REF.
506
507 2008-12-05  Sebastian Pop  <sebastian.pop@amd.com>
508
509         PR bootstrap/38262
510         * Make-lang.in (cc1plus-dummy, cc1plus): Add BACKENDLIBS,
511         remove GMPLIBS.
512
513 2008-12-04  Jason Merrill  <jason@redhat.com>
514
515         PR c++/37906
516         * decl.c (grok_special_member_properties): Set TYPE_HAS_COMPLEX_DFLT
517         here.
518         * class.c (check_bases_and_members): Rather than assuming any
519         user-declared default constructor is complex here.
520
521 2008-12-04  Richard Guenther  <rguenther@suse.de>
522
523         PR c++/38334
524         * typeck.c (get_member_function_from_ptrfunc): Mark the vtbl
525         pointer access with TREE_NO_WARNING.
526
527 2008-12-03  Jason Merrill  <jason@redhat.com>
528
529         PR c++/38232
530         * init.c (build_value_init): Do initial zero-initialization
531         of a class with an implicitly-defined constructor using
532         build_zero_init rather than in build_value_init.
533         (build_value_init_1): Fold into build_value_init.
534
535         PR c++/38256
536         * parser.c (cp_parser_conversion_type_id): Diagnose
537         'operator auto' here.
538         * decl.c (grokdeclarator): Not here.
539
540         PR c++/38380
541         * decl.c (grokdeclarator): Only set DECL_NONCONVERTING_P
542         on explicit constructors.
543         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Propagate
544         CONSTRUCTOR_IS_DIRECT_INIT.
545
546 2008-12-02  Jason Merrill  <jason@redhat.com>
547
548         PR c++/35782, c++/37860
549         * call.c (build_user_type_conversion_1): Remember
550         list-initialization.
551         (convert_like_real): Likewise.
552         (build_over_call): Don't require the copy constructor
553         for copy-list-initialization.
554         * cp-tree.h (TARGET_EXPR_LIST_INIT_P): New macro.
555
556         PR c++/37234
557         * decl.c (cp_finish_decl): Handle =default and =delete for
558         templates, too.
559
560 2008-12-01  Jakub Jelinek  <jakub@redhat.com>
561
562         PR c++/38257
563         * parser.c (cp_parser_omp_for_loop): Handle auto.
564         * pt.c (tsubst_omp_for_iterator): Likewise.
565
566 2008-11-28  Jason Merrill  <jason@redhat.com>
567
568         PR c++/38233
569         * init.c (perform_member_init): Fix value-initialization.
570         (build_value_init_1): Add assert to catch cases that will break
571         in the gimplifier.
572         (build_default_init): Remove.
573         * cp-tree.h: Remove its prototype.
574         * pt.c (tsubst_expr) [DECL_EXPR]: Use build_value_init for
575         value-initialization.
576
577         PR c++/38278
578         * parser.c (cp_parser_class_name): Only call 
579         maybe_note_name_used_in_class if we actually found a class name.
580
581 2008-11-25  Jason Merrill  <jason@redhat.com>
582
583         PR c++/28743
584         * decl2.c (check_classfn): Error rather than abort on parameter
585         list mismatch.
586
587 2008-11-20  Jason Merrill  <jason@redhat.com>
588
589         PR c++/28513
590         * parser.c (cp_parser_class_name): Call maybe_note_name_used_in_class.
591
592         PR c++/37540
593         * call.c (build_over_call): Take the address of the function even
594         in a template.
595         (build_new_method_call): Remember the type of the called function
596         in a template.
597
598 2008-11-19  Dodji Seketeli  <dodji@redhat.com>
599
600         PR c++/37142
601         * pt.c (coerce_template_template_parm): Use the more robust
602         uses_template_parms instead of dependent_type_p.
603
604 2008-11-19  Dodji Seketeli  <dodji@redhat.com>
605
606         PR c++/35405
607         * pt.c (lookup_template_class): Check pointers before dereferencing
608         them.
609         * error.c (dump_template_decl): Likewise.
610
611 2008-11-19  Jason Merrill  <jason@redhat.com>
612
613         PR c++/36410
614         * decl2.c (grokfield): Pass ATTR_FLAG_TYPE_IN_PLACE for a typedef
615         that names a class for linkage purposes.
616
617         PR c++/37563
618         * parser.c (cp_parser_pseudo_destructor_name): A pseudo-destructor
619         name is not a declaration.
620
621         PR c++/37256
622         * pt.c (instantiate_decl): Don't require a definition of
623         a template that is explicitly instantiated 'extern'.
624
625 2008-11-18  Jason Merrill  <jason@redhat.com>
626             Jakub Jelinek  <jakub@redhat.com>
627         
628         PR c++/37962
629         * parser.c (cp_parser_type_id): Complain about auto.
630         * decl.c (grokdeclarator): Complain about parameters and
631         conversion functions declared with auto.
632
633         * call.c (standard_conversion): Use CLASS_TYPE_P instead of
634         MAYBE_CLASS_TYPE_P.
635         * cp-tree.h (TYPE_NON_AGGREGATE_CLASS): Likewise.
636
637 2008-11-17  Jakub Jelinek  <jakub@redhat.com>
638
639         PR c++/36089
640         * init.c (constant_value_1): Handle TREE_LIST init.
641
642 2008-11-15  Jakub Jelinek  <jakub@redhat.com>
643
644         PR c++/37561
645         * typeck.c (cp_build_unary_op): Don't call get_unwidened.  Use
646         argtype instead of result_type.
647
648 2008-11-14  Jason Merrill  <jason@redhat.com>
649
650         PR c++/38030
651         * semantics.c (finish_call_expr): Don't repeat arg-dep lookup
652         for a non-dependent call.
653
654         PR c++/37740
655         * call.c (build_aggr_conv): Increment i.
656
657 2008-11-13  Jason Merrill  <jason@redhat.com>
658
659         PR c++/37932
660         * typeck2.c (process_init_constructor_record): Update bitfield
661         handling.
662         (check_narrowing): Update bitfield handling, print source type.
663         
664 2008-11-12  Jakub Jelinek  <jakub@redhat.com>
665
666         PR c++/36478
667         Revert:
668         2007-05-07  Mike Stump  <mrs@apple.com>
669         * parser.c (check_empty_body): Add.
670         (cp_parser_iteration_statement): Add call to check_empty_body.
671
672 2008-11-12  Jason Merrill  <jason@redhat.com>
673
674         PR c++/38007
675         * typeck.c (cp_build_modify_expr): Update bitfield handling.
676
677 2008-11-12  Jakub Jelinek  <jakub@redhat.com>
678
679         PR c++/34269
680         * parser.c (cp_parser_simple_declaration): Don't commit
681         to tentative parse if parse errors were seen.
682
683         PR c++/35334
684         * error.c (dump_expr): Handle COMPLEX_EXPR.
685
686 2008-11-10  Jakub Jelinek  <jakub@redhat.com>
687
688         PR c++/38021
689         * parser.c (cp_parser_enum_specifier): After parsing :,
690         parse definitely.  Don't return early if type specifier
691         is erroneous.
692
693 2008-11-06  David Edelsohn  <edelsohn@gnu.org>
694
695         PR target/26397
696         * g++spec.c (LIBSTDCXX_STATIC): New.
697         (lang_spec_driver): Use LIBSTDCXX_STATIC when not
698         shared_libgcc.
699         
700 2008-11-05  Fabien Chene <fabien.chene@gmail.com>
701
702         PR c++/32519
703         * cp-tree.h: Fix DECL_NONSTATIC_MEMBER_P to handle member template
704         functions.
705
706 2008-11-05  Richard Guenther  <rguenther@suse.de>
707
708         PR middle-end/37742
709         * decl.c (start_preparsed_function): Use the correct type for
710         building the RESULT_DECL.
711
712 2008-10-31  Jakub Jelinek  <jakub@redhat.com>
713
714         PR c++/37967
715         * decl.c (grokdeclarator): Diagnose auto function decl without
716         late return type and late return type function decl where type
717         is not auto.
718
719         PR c++/37965
720         * decl.c (cp_finish_decl): Diagnose type_uses_auto type with
721         no initializer.
722
723 2008-10-29  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
724
725         PR 11492
726         * class.c (check_bitfield_decl): Rename min_precision to
727         tree_int_cst_min_precision.
728         * decl.c (finish_enum): Likewise.
729
730 2008-10-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
731
732         PR c++/26997
733         * parser.c (cp_parser_token_starts_cast_expression): New.
734         (cp_parser_cast_expression): Peek the next token to decide whether
735         this could be a parenthesized constructor or is definitely an
736         actual cast.
737
738 2008-10-24  Manuel López-Ibáñez  <manu@gcc.gnu.org>
739
740         PR c/7543
741         * typeck.c (build_x_binary_op): Update call to
742         warn_about_parentheses.
743         * parser.c (cp_parser_binary_expression): Add note about passing
744         the correct code for unary expressions.
745
746 2008-10-24  Jakub Jelinek  <jakub@redhat.com>
747
748         * Make-lang.in (check-c++-subtargets): New alias for
749         check-g++-subtargets.
750         (lang_checks_parallelized): Add check-g++.
751         (check_g++_parallelize): New variable.
752
753 2008-10-21  Richard Guenther  <rguenther@suse.de>
754
755         * semantics.c (simplify_aggr_init_exprs_r): Remove.
756         (expand_or_defer_fn): Do not walk the function body to
757         simplify aggr_init_exprs.
758
759 2008-10-20  Manuel López-Ibáñez  <manu@gcc.gnu.org>
760
761         PR c++/37004
762         * typeck.c (cp_common_type): New. The same as
763         type_after_usual_arithmetic_conversions but without promotions.
764         (type_after_usual_arithmetic_conversions): Do the promotions and
765         call cp_common_type.
766         (common_type): Make it behave like the C version of this
767         function. Do not handle pointer types.
768         (common_pointer_type): Move handling of pointer types from
769         common_type to here.
770         (cp_build_binary_op): Use common_pointer_type instead of
771         common_type in call to pointer_diff.
772         Use cp_common_type instead of common_type.
773         * cp-tree.h (common_pointer_type): Declare.
774
775 2008-10-14  Jakub Jelinek  <jakub@redhat.com>
776
777         PR c++/37819
778         * cp-gimplify.c (cp_genericize_r): Only fold_convert COND_EXPR
779         arguments if they don't already have COND_EXPR's type.
780
781 2008-10-14  Paolo Carlini  <paolo.carlini@oracle.com>
782
783         PR c++/37650
784         * pt.c (push_template_decl_real): Check that current_template_parms
785         is not null.
786         (process_partial_specialization): Assert current_template_parms not
787         null.
788
789 2008-10-13  Doug Evans  <dje@google.com>
790
791         * cp-tree.h (DECL_MAIN_P): Fix parentheses around expression.
792
793 2008-10-10  Jakub Jelinek  <jakub@redhat.com>
794
795         PR c++/37146
796         * cp-gimplify.c (cp_genericize_r): Fix up bitfield operands of
797         COND_EXPR.
798
799 2008-10-09  Jakub Jelinek  <jakub@redhat.com>
800
801         PR c++/37568
802         * semantics.c (finalize_nrv_r): Clear DECL_INITIAL instead of
803         setting it to error_mark_node.
804
805 2008-10-07  Steve Ellcey  <sje@cup.hp.com>
806
807         * decl.c (start_cleanup_fn): Declare as inline.
808
809 2008-10-06  Jason Merrill  <jason@redhat.com>
810
811         PR c++/37376, other mangling issues
812         * mangle.c (write_type): Update TYPE_PACK_EXPANSION mangling.
813         (write_member_name): Break out from...
814         (write_expression): ...here.  Handle dependent COMPONENT_REF.
815         (write_template_arg): Wrap an argument pack in 'I'/'E'.
816         (write_builtin_type): Update char16/32_t mangling.
817         (write_nested_name, write_prefix): Don't forget template args
818         for typename types.
819         * operators.def: Add ARROW_EXPR, update COMPONENT_REF and 
820         EXPR_PACK_EXPANSION.
821
822 2008-10-06  Aldy Hernandez  <aldyh@redhat.com>
823
824         * typeck.c (build_x_indirect_ref): Add location argument.
825         (cp_build_binary_op): Pass location to warn_for_div_by_zero.
826         (cp_build_unary_op): Add location argument.
827         (cp_build_modify_expr): Same.
828         * class.c (build_base_path): Pass location to build_indirect_ref.
829         * semantics.c (handle_omp_for_class_iterator): Pass elocus to
830         build_modify_expr.
831
832 2008-10-05  Dodji Seketeli  <dodji@redhat.com>
833
834         PR c++/37410
835         * cp-gimplify.c (cp_gimplify_expr): For each USING_STMT
836         make sure an IMPORTED_DECL node is added to the BLOCK_VARS list
837         of the innermost containing BLOCK.
838
839 2008-10-03  Paolo Carlini  <paolo.carlini@oracle.com>
840
841         PR c++/37719
842         * error.c (dump_function_decl): Save the exceptions in case of
843         error about incompatible specifications in a specialization.
844
845 2008-10-01  Andrew Pinski  <andrew_pinski@playstation.sony.com>
846
847         * tree.c (lvalue_p_1): COMPOUND_LITERAL_EXPR is also an lvalue.
848
849 2008-09-30  H.J. Lu  <hongjiu.lu@intel.com>
850
851         PR c++/37683
852         * parser.c (cp_parser_selection_statement): Fix uninitialized
853         variable.
854
855 2008-09-30  Simon Martin  <simartin@users.sourceforge.net>
856
857         PR c++/37555
858         PR c++/37556
859         * decl.c (grokdeclarator): Set the type for typedefs to a
860         nested-name-specifier to error_mark_node.
861
862 2008-09-30  Paolo Bonzini  <bonzini@gnu.org>
863
864         * parser.c (cp_parser_selection_statement): Implement here the
865         -Wempty-body warning for `if' and `else' statements.
866         * semantics.c (finish_if_stmt): Do not call empty_body_warning.
867
868 2008-09-25  Paolo Carlini  <paolo.carlini@oracle.com>
869
870         PR c++/37649
871         * name-lookup.c (maybe_process_template_type_declaration): Check
872         return value of push_template_decl_real for error_mark_node.
873
874 2008-09-24  Aldy Hernandez  <aldyh@redhat.com>
875
876         * semantics.c (finish_fname): Pass location to fname_decl.
877
878 2008-09-23  Jakub Jelinek  <jakub@redhat.com>
879
880         PR c++/37533
881         * semantics.c (finish_omp_for): If processing_template_decl, just build
882         MODIFY_EXPR for init instead of calling cp_build_modify_expr.
883
884 2008-09-23  Aldy Hernandez  <aldyh@redhat.com>
885
886         * typeck.c (build_array_ref): Pass location to cp_build_binary_op.
887         (get_member_function_from_ptrfunc): Same.
888         (build_x_binary_op): Same.
889         (build_binary_op): Same.
890         (cp_build_binary_op): New location argument.
891         (pointer_diff): Pass location to cp_build_binary_op.
892         (cp_truthvalue_conversion): Pass location to build_binary_op.
893         (convert_ptrmem): Pass location to cp_build_binary_op.
894         (cp_build_modify_expr): Same.
895         (build_ptrmemfunc): Same.
896         * init.c (expand_cleanup_for_base): Pass location to
897         c_common_truthvalue_conversion.
898         (build_new_1): Pass location to cp_build_binary_op.
899         (build_vec_delete_1): Pass location to *build_binary_op,
900         c_common_truthvalue_conversion.
901         (build_vec_init): Same.
902         (build_delete): Same.
903         * decl.c (compute_array_index_type): Same.
904         * call.c (build_new_op): Same.
905         * rtti.c (build_dynamic_cast_1): Same.
906         * cp-tree.h: Add argument to cp_build_binary_op.
907         * semantics.c (handle_omp_for_class_iterator): Pass location to
908         *build_binary_op, c_common_truthvalue_conversion.
909         * decl2.c (get_guard_cond): Same.
910
911 2008-09-17  Richard Guenther  <rguenther@suse.de>
912
913         PR c++/22374
914         * rtti.c (build_dynamic_cast_1): Convert the COND_EXPR
915         result to the correct type.
916
917 2008-09-17  H.J. Lu  <hongjiu.lu@intel.com>
918
919         PR c++/37450
920         * name-lookup.c (pushdecl_maybe_friend): Don't return the old
921         parameter for duplicate.
922
923 2008-09-17  Jason Merrill  <jason@redhat.com>
924
925         PR c++/37588
926         * name-lookup.c (lookup_type_scope): Look through sk_function_parms.
927
928 2008-09-17  Jakub Jelinek  <jakub@redhat.com>
929
930         PR c++/37552
931         * typeck.c (build_array_ref): Use protected_set_expr_location instead
932         of SET_EXPR_LOCATION when ret might not be an expression.
933
934 2008-09-17  Jan Hubicka  <jh@suse.cz>
935
936         PR c++/18071
937         * cp/decl.c (start_method): Set DECL_NO_INLINE_WARNING_P.
938
939 2008-09-16  Jakub Jelinek  <jakub@redhat.com>
940
941         PR c++/37531
942         * semantics.c (finish_compound_literal): Return error_mark_node if
943         type is errorneous.
944
945         PR c++/37532
946         * lex.c (init_reswords): Don't populate ridpointers for D_CONLY
947         reserved words.
948
949 2008-09-15  Aldy Hernandez  <aldyh@redhat.com>
950
951         * decl.c (duplicate_decls): Call error_at.
952         (grokfndecl): New location argument.  Use location if available.
953         (grokdeclarator): Pass declarator location to grokfndecl.
954         * cp-tree.h (struct cp_declarator): Update comment for id_loc.
955         * decl2.c (check_classfn): Use error_at.
956         * parser.c (cp_parser_init_declarator): Set function_start_locus
957         to brace location.
958         (cp_parser_member_declaration): Set id_loc for function declarators.
959
960 2008-09-09  Jan Hubicka  <jh@suse.cz>
961
962         PR middle-end/37500
963         * pt.c (tsubst_decl): Do not copy DECL_STRUCT_FUNCTION pointer.
964
965 2008-09-09  Jakub Jelinek  <jakub@redhat.com>
966
967         PR c++/37417
968         * tree.c (array_type_nelts_top): Add size_one_node instead of
969         integer_one_node.
970
971 2008-09-09  Jason Merrill  <jason@redhat.com>
972
973         PR c++/37439
974         * pt.c (tsubst_copy) [PARM_DECL]: Don't abort if the parm has
975         DECL_CONTEXT set.
976
977 2008-09-09  Jakub Jelinek  <jakub@redhat.com>
978
979         PR c++/37389
980         * decl.c (build_enumerator): Handle previous value's DECL_INITIAL
981         being error_operand_p.  Don't clear value if it was error_mark_node.
982
983 2008-09-09  Paolo Bonzini  <bonzini@gnu.org>
984
985         * cp-objcp-common.h (LANG_HOOKS_EXPAND_DECL): Remove.
986         * cp-tree.h: Don't mention DECL_ANON_UNION_ELEMS.
987         * semantics.c (anon_aggr_type_p): Remove.
988
989 2008-09-06  Jason Merrill  <jason@redhat.com>
990
991         PR c++/37302
992         * parser.c (cp_parser_parameter_declaration_list): Process the
993         PARM_DECLs as we go and push them.  Return a TREE_LIST.
994         (cp_parser_parameter_declaration_clause): Return a TREE_LIST.
995         (cp_parser_direct_declarator): Create a binding level and
996         suppress deprecated warnings in the parameter list.
997         (make_call_declarator): PARMS is now a tree.
998         * cp-tree.h (struct cp_declarator): Function parms are now a tree.
999         * decl.h (enum deprecated_states, deprecated_state): Move here.
1000         * decl.c: From here.
1001         (type_is_deprecated): New fn.
1002         (grokparms): PARMLIST is a tree now.  Warn about parms that
1003         use deprecated types.
1004         * mangle.c (write_expression): Handle PARM_DECL, CALL_EXPR and
1005         0-operand cast.
1006         * pt.c (tsubst) [DECLTYPE_TYPE]: Set skip_evaluation.
1007         (tsubst_copy) [PARM_DECL]: Handle a PARM_DECL used outside of a 
1008         function.
1009         * name-lookup.c (pushtag): Look through function parameter scopes.
1010         (pushdecl_maybe_friend): Don't set DECL_CONTEXT on a PARM_DECL 
1011         when we're parsing a function declarator.
1012
1013 2008-09-05  Douglas Gregor  <doug.gregor@gmail.com>
1014
1015        PR c++/37342
1016        * tree.c (cp_build_qualified_type_real): Deal with sharing of
1017        TYPE_LANG_SPECIFIC in the canonical types of pointer-to-method
1018        types.
1019         
1020 2008-09-04  Ian Lance Taylor  <iant@google.com>
1021
1022         * parser.c (check_no_duplicate_clause): Change code parameter to
1023         enum omp_clause_code.
1024
1025 2008-09-03  Jakub Jelinek  <jakub@redhat.com>
1026
1027         PR c++/37348
1028         * decl.c (cp_finish_decl): Only set
1029         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P if decl is VAR_DECL.
1030
1031         PR c++/37189
1032         * cp-tree.h (defer_mark_used_calls, deferred_mark_used_calls): New
1033         extern decls.
1034         * decl2.c (mark_used): If defer_mark_used_calls, push decl into
1035         deferred_mark_used_calls vector and exit early.
1036         * decl.c (defer_mark_used_calls, deferred_mark_used_calls): New
1037         variables.
1038         (finish_function): Set defer_mark_used_calls for the duration of the
1039         function.  Call mark_used on any queued decls.
1040
1041 2008-09-02  Jason Merrill  <jason@redhat.com>
1042
1043         PR c++/37208
1044         * call.c (build_over_call): Make =delete work with SFINAE.
1045         * class.c (resolve_address_of_overloaded_function): Likewise.
1046
1047         * cp-tree.h (struct lang_decl_flags): Rename threadprivate_p to
1048         threadprivate_or_deleted_p.
1049         (CP_DECL_THREADPRIVATE_P): Adjust.
1050         (DECL_DELETED_FN): Likewise.
1051         (SD_UNINITIALIZED, SD_INITIALIZED, SD_DEFAULTED): New macros.
1052         (SD_DELETED): New macro.
1053         * parser.c (cp_parser_init_declarator): Use them.
1054         * decl.c (start_decl): Use them.
1055
1056         * decl2.c (mark_used): Give =deleted error even in sizeof.
1057
1058         * typeck2.c (check_narrowing): Downgrade narrowing error to
1059         permerror.
1060
1061 2008-09-02  Aldy Hernandez  <aldyh@redhat.com>
1062
1063         * typeck.c (build_array_ref): Use new location argument.
1064         * class.c (build_vtbl_ref_1): Pass location to build_array_ref.
1065         * call.c (build_new_op): Same.
1066         * decl2.c (grok_array_decl): Same.
1067         * cp-tree.h (build_array_ref): Add location argument to prototype.
1068
1069 2008-09-01  Aldy Hernandez  <aldyh@redhat.com>
1070
1071         * typeck.c (build_x_indirect_ref): Add location argument.
1072         * class.c (build_base_path): Pass location to build_indirect_ref.
1073         * pt.c (tsubst_copy_and_build): Pass location to
1074         finish_label_address_expr.
1075         * parser.c (cp_parser_unary_expression): Same.
1076
1077 2008-08-31  Jason Merrill  <jason@redhat.com>
1078
1079         Implement late-specified return type using 'auto'.
1080         * cp-tree.h (struct cp_declarator): Add late_return_type field to
1081         function declarator.
1082         * parser.c (cp_parser_late_return_type_opt): New fn.
1083         (cp_parser_direct_declarator): Use it.
1084         (make_call_declarator): Put it in the declarator.
1085         * decl.c (grokdeclarator): Splice in late-specified return type.
1086         * pt.c (splice_late_return_type): New fn.
1087
1088 2008-08-29  Michael Meissner  <gnu@the-meissners.org>
1089
1090         * decl.c (builtin_function_1): Take a bool argument to decide
1091         whether to use pushdecl or pushdecl_top_level.
1092         (duplicate_decls): Copy function specific target and optimization
1093         options on duplicate declarations.
1094         (cxx_builtin_function): Update builtin_function_1 call.
1095         (cxx_builtin_function_ext_scope): New function, guarantee that the
1096         declaration is done at global scope.
1097
1098         * cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE): New
1099         macro, define builtin function hook for delayed machine specific
1100         builtins.
1101
1102         * cp-tree.h (cxx_builtin_function_ext_scope): Add declaration.
1103
1104 2008-08-30  Jason Merrill  <jason@redhat.com>
1105
1106         PR c++/37288
1107         * pt.c (dependent_type_p): Don't abort on auto outside of a template.
1108
1109 2008-08-29  Jason Merrill  <jason@redhat.com>
1110
1111         Implement C++0x 'auto' semantics.
1112         * decl.c (start_decl_1): Don't complain about auto being incomplete.
1113         (cp_finish_decl): Deduce auto.
1114         * init.c (build_new): Handle 'new auto'.
1115         * typeck2.c (cxx_incomplete_type_diagnostic): Give a different
1116         message for auto than for normal template type parms.
1117         * pt.c (type_dependent_expression_p): Handle { }.
1118         (make_auto): New function.
1119         (listify_autos): New function.
1120         (do_auto_deduction): New function.
1121         (is_auto): New function.
1122         (type_uses_auto): New function.
1123         * cp-tree.h: Declare them.
1124         * parser.c (cp_parser_decl_specifier_seq): In C++0x mode, don't
1125         treat auto as a declspec.
1126         (cp_parser_simple_type_specifier): It's a type-specifier.
1127
1128 2008-08-29  Mark Mitchell  <mark@codesourcery.com>
1129
1130         * mangle.c (write_type): Add target-specific manglings for
1131         non-fundamental types to the substitution table.
1132         gcc/testsuite/
1133
1134 2008-08-29  Jakub Jelinek  <jakub@redhat.com>
1135
1136         PR fortran/29635
1137         PR fortran/23057
1138         * name-lookup.c (do_using_directive, cp_emit_debug_info_for_using):
1139         Adjust debug_hooks->imported_module_or_decl callers.
1140
1141 2008-08-29  Jan Hubicka  <jh@suse.cz>
1142
1143         * cp-gimplify.c (cp_gimplify_expr): Add PRED_CONTINUE heuristic.
1144
1145 2008-08-28  Paolo Carlini  <paolo.carlini@oracle.com>
1146
1147         PR c++/37260
1148         * decl.c (reshape_init_r): Check init for error_mark_node.
1149
1150 2008-08-27  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1151
1152         PR c++/17880
1153         * semantics.c (maybe_convert_cond): Call verify_sequence_points.
1154         (finish_return_stmt): Likewise.
1155         (finish_switch_condition): Likewise.
1156
1157 2008-08-27  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1158
1159         * cp-tree.h: Fix #error directive.
1160
1161 2008-08-26  Douglas Gregor  <doug.gregor@gmail.com>
1162
1163         * typeck.c (type_after_usual_arithmetic_conversions): Don't do the
1164         usual arithmetic conversions on scoped enumeration types.
1165         (common_type): Ditto.
1166         (default_conversion): Don't perform integral promotions on scoped
1167         enumeration types. 
1168         (build_array_ref): Scoped enumeration types can't be used as
1169         subscripts.
1170         * decl.c (start_enum): If building a C++0x scoped enumeration,
1171         enter its scope. If provided with an underlying type, check that
1172         underlying type and set up the enumeration type accordingly.
1173         (finish_enum): Only compute an underlying type if the underlying
1174         type isn't already fixed, and only convert the enumerator values
1175         now if we've just computed the underlying type. Finish the scope
1176         of C++0x scoped enumerations.
1177         (build_enumerator): For enumerations with a fixed underlying type,
1178         check the enumerator values when the enumerator is defined.
1179         (lookup_enumerator): New.
1180         * call.c (standard_conversion): Don't allow assignment from
1181         integers to scoped enumeration types, even with -fpermissive.
1182         Don't convert from scoped enumerations to bool or any arithmetic
1183         types.
1184         (build_conditional_expr): Don't per the usual arithmetic
1185         conversions for scoped enumeration types.
1186         (convert_like_real): Check complain to see if we should
1187         produce warnings.
1188         * error.c (class_key_or_enum_as_string): Print scoped enums.
1189         * cp-tree.h (MAYBE_CLASS_TYPE_P): Check CLASS_TYPE_P, not
1190         TYPE_LANG_FLAG_5.
1191         (INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P): New.
1192         (SCOPED_ENUM_P): New.
1193         (UNSCOPED_ENUM_P): New.
1194         (SET_SCOPED_ENUM_P): New.
1195         (ENUM_UNDERLYING_TYPE): New.
1196         * pt.c (lookup_template_class): Update the instantiation of enum
1197         types to deal with C++0x scoped enumerations and underlying
1198         types.
1199         * name-lookup.c (begin_scope): Deal with scoped enumeration
1200         scopes.
1201         (lookup_qualified_name): Deal with lookup into enumeration types.
1202         * name-lookup.h (enum scope_kind): Add sk_scoped_enum.
1203         * parser.c (cp_parser_class_or_namespace_name): Rename to...
1204         (cp_parser_qualifying_entity): ... this. Also, in C++0x mode,
1205         parse a type-name that can be an enumeration type.
1206         (cp_parser_nested_name_specifier_opt): Update with C++0x grammar.
1207         (cp_parser_elaborated_type_specifier): Parse the
1208         optional `struct' or `class' following enum (in C++0x).
1209         (cp_parser_enum_specifier): Parse C++0x scoped enumerations and
1210         enum-base clauses.
1211
1212 2008-08-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1213
1214         * typeck.c: Update all calls to pedwarn.
1215         * decl.c: Likewise.
1216         * call.c: Likewise.
1217         * error.c: Likewise.
1218         * pt.c: Likewise.
1219         * name-lookup.c: Likewise.
1220         * parser.c: Likewise.
1221
1222 2008-08-20  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1223
1224         PR c++/35158
1225         * parser.c (cp_parser_omp_for_loop): Handle parenthesized
1226         initializers.
1227
1228 2008-08-20  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1229
1230         * parser.c: Update all calls to inform.
1231         * typeck.c: Likewise.
1232         * init.c: Likewise.
1233         * class.c: Likewise.
1234         * call.c: Likewise.
1235         * method.c: Likewise.
1236         * friend.c: Likewise.
1237         * typeck2.c: Likewise.
1238         * pt.c: Likewise.
1239         * name-lookup.c: Likewise.
1240         * lex.c: Likewise.
1241
1242 2008-08-19  Jakub Jelinek  <jakub@redhat.com>
1243
1244         PR debug/37156
1245         * error.c (cp_print_error_function): Deal with recursive BLOCK trees.
1246
1247 2008-08-18  Tomas Bily  <tbily@suse.cz>
1248
1249         * tree.c (cp_tree_equal): Use CONVERT_EXPR_CODE_P.
1250
1251 2008-08-18  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1252
1253         * typeck.c: Update all callers of permerror.
1254         * init.c: Likewise.
1255         * class.c: Likewise.
1256         * decl.c: Likewise.
1257         * call.c: Likewise.
1258         * except.c: Likewise.
1259         * cvt.c: Likewise.
1260         * typeck2.c: Likewise.
1261         * pt.c: Likewise.
1262         * semantics.c: Likewise.
1263         * name-lookup.c: Likewise.
1264         * lex.c: Likewise.
1265         * decl2.c: Likewise.
1266         * parser.c: Likewise.
1267
1268 2008-08-14  Paolo Carlini  <paolo.carlini@oracle.com>
1269
1270         PR c++/34485
1271         * pt.c (check_template_shadow): Change to return a bool.
1272         * name-lookup.c (push_class_level_binding): Early return if
1273         check_template_shadow returns false.
1274         * cp-tree.h (check_template_shadow): Adjust declaration.
1275
1276 2008-08-14  Paolo Carlini  <paolo.carlini@oracle.com>
1277
1278         PR c++/34600
1279         * decl.c (grokdeclarator): In case of extern and initializer, return
1280         error_mark_node after the error.
1281
1282 2008-08-13  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1283
1284         PR 30551
1285         * decl.c (grokfndecl): Call check_main_parameters_type only if
1286         -Wmain.
1287
1288 2008-08-12  Paolo Carlini  <paolo.carlini@oracle.com>
1289
1290         PR c++/37087
1291         * parser.c (cp_parser_class_head): Early return error_mark_node in
1292         case of global qualification of class name or qualified name that
1293         does not name a class.
1294
1295 2008-08-09  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1296
1297         PR c++/12242
1298         * cvt.c (ocp_convert): Warn for out-of-range conversions to enum.
1299
1300 2008-08-09  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1301
1302         PR 36901
1303         * cp-tree.h (struct diagnostic_context, struct diagnostic_info):
1304         Delete forward declarations. Check that toplev.h has not been
1305         included before this file. Include toplev.h and diagnostic.h.
1306         * error.c (cp_cpp_error): Use DK_PEDWARN.
1307         (cxx_incomplete_type_diagnostic): Update declaration.
1308         (cxx_incomplete_type_error): Use DK_ERROR.
1309         * typeck2.c (cxx_incomplete_type_diagnostic): Take a diagnostic_t
1310         as argument. Use emit_diagnostic.
1311         (cxx_incomplete_type_error): Use DK_ERROR.
1312         (add_exception_specifier): Use diagnostic_t instead of custom
1313         codes.  
1314         * typeck.c (complete_type_or_else): Update call to
1315         cxx_incomplete_type_diagnostic.
1316         * init.c (build_delete): Likewise.  
1317         * call.c (diagnostic_fn_t): Remove unused typedef.
1318         (build_temp): Pass a pointer to diagnostic_t.
1319         (convert_like_real): Use emit_diagnostic.
1320         (joust): Check return value of warning before giving informative
1321         note.  
1322         * friend.c (do_friend): Check return value of warning
1323         before giving informative note.
1324         * parser.c (cp_parser_template_id): Likewise.
1325
1326 2008-08-09  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1327
1328         PR 7651
1329         * class.c (check_bases_and_members): Warn with -Wuninitialized
1330         instead of -Wextra.
1331         
1332 2008-08-08  Volker Reichelt  <v.reichelt@netcologne.de>
1333
1334         PR c++/35985
1335         * decl.c (xref_basetypes): Check base for MAYBE_CLASS_TYPE_P,
1336         and make sure it is not a union.
1337
1338 2008-08-07  H.J. Lu  <hongjiu.lu@intel.com>
1339
1340         * semantics.c (finish_decltype_type): Initialize type.
1341
1342 2008-08-07  Douglas Gregor  <doug.gregor@gmail.com>
1343
1344         * semantics.c (finish_decltype_type): Handle calls to function
1345         pointers and references to functions properly.
1346
1347 2008-08-06  Douglas Gregor  <doug.gregor@gmail.com>
1348
1349         PR c++/36460
1350         * parser.c (cp_parser_template_argument): Don't assume that '>>'
1351         following a type-id is an error when in C++0x mode.
1352
1353 2008-08-06  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1354
1355         PR 26785
1356         * decl.c (grokdeclarator): Use explicit location with permerror_at.
1357
1358 2008-08-06  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1359
1360         PR 8715
1361         * typeck.c (cp_build_binary_op): Move code to c-common.c.
1362
1363 2008-08-05  Jason Merrill  <jason@redhat.com>
1364
1365         PR c++/37016
1366         * decl.c (build_ptrmemfunc_type): Don't require structural
1367         comparison of PMF types.
1368         * tree.c (cp_build_qualified_type_real): Don't clear
1369         a valid TYPE_PTRMEMFUNC_TYPE.
1370         * typeck.c (cp_build_unary_op): Still do build_ptrmemfunc in
1371         templates.
1372
1373 2008-08-04  Jason Merrill  <jason@redhat.com>
1374
1375         PR c++/36963
1376         * typeck2.c (check_narrowing): Allow narrowing conversion
1377         from an explicit floating-point constant.
1378
1379         PR c++/37006
1380         * pt.c (tsubst_decl): Leave DECL_INITIAL set on deleted
1381         instantiations.
1382
1383 2008-08-04  Simon Baldwin  <simonb@google.com>
1384
1385         PR c++/36999
1386         * parser.c (cp_parser_elaborated_type_specifier): Warn only when
1387         the declaration's id is followed by a semicolon.
1388
1389 2008-07-31  Jakub Jelinek  <jakub@redhat.com>
1390
1391         PR c++/36405
1392         * rtti.c (get_tinfo_decl_dynamic, get_typeid): Call
1393         complete_type_or_else even for UNKNOWN_TYPE to get diagnostics.
1394
1395 2008-07-31  Jason Merrill  <jason@redhat.com>
1396
1397         PR c++/36633
1398         * init.c (build_new_1): Don't convert pointer to the data type
1399         until we're actually going to treat it as that type.
1400
1401         PR c++/11309
1402         * tree.c (build_aggr_init_expr): Split out...
1403         (build_cplus_new): ...from here.
1404         (stabilize_init): Don't mess with AGGR_INIT_EXPR either.
1405         * init.c (build_new_1): new T() means value-initialization,
1406         not default-initialization.
1407         (build_vec_init): Likewise.
1408         (build_value_init_1): Use build_aggr_init_expr.
1409
1410 2008-07-30  Dodji Seketeli  <dseketel@redhat.com>
1411
1412         PR c++/36767
1413         * decl2.c (fix_temporary_vars_context_r): New function.
1414          (one_static_initialization_or_destruction): Make sure temporary
1415          variables part of the initialiser have their DECL_CONTEXT()
1416          properly set.
1417
1418 2008-07-30  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1419
1420         PR 34389
1421         * typeck.c (build_binary_op): Encapsulate code into
1422         shorten_binary_op.
1423
1424 2008-07-29  Jakub Jelinek  <jakub@redhat.com>
1425
1426         PR c++/36852
1427         * tree.c (cplus_array_hash, build_cplus_array_type_1): Hash on
1428         TYPE_UID instead of pointers.
1429
1430 2008-07-29  Jan Hubicka  <jh@suse.cz>
1431
1432         * optimize.c (maybe_clone_body): Remove DECL_INLINE.
1433         * decl.c (duplicate_decls): Likewise.
1434         (grokfndecl): Likewise.
1435         (start_method): Likewise.
1436         * method.c (make_thunk, make_alias_for, implicitly_declare_fn):
1437         Likewise.
1438         * pt.c (register_specialization, regenerate_decl_from_template):
1439         Likewise.
1440         * decl2.c (grokfield): Likewise.
1441
1442 2008-07-29  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1443
1444         PR 34985
1445         * decl.c (duplicate_decls): Merge USED flags.
1446
1447 2008-07-27  Jason Merrill  <jason@redhat.com>
1448
1449         PR c++/36943
1450         * decl.c (reshape_init_r): Allow C++0x initializer lists.
1451
1452 2008-07-28  Richard Guenther  <rguenther@suse.de>
1453
1454         Merge from gimple-tuples-branch.
1455
1456         2008-07-22  Aldy Hernandez  <aldyh@redhat.com>
1457
1458         * cp-gimplify.c (gimplify_if_stmt): Set location on newly created
1459         COND_EXPR.
1460
1461         2008-07-18  Jakub Jelinek  <jakub@redhat.com>
1462
1463         * decl.c (finish_function): Call gimple_body after cp_genericize.
1464
1465         2008-07-18  Aldy Hernandez  <aldyh@redhat.com>
1466
1467         * optimize.c: Include gimple.h instead of tree-gimple.h.
1468         * Make-lang.in (cp-gimplify.o): Depend on tree-iterator.h.
1469         * cp-gimplify.c: Rename tree-gimple.h to gimple.h.  Include
1470         tree-iterator.h.
1471
1472         2008-07-16  Jakub Jelinek  <jakub@redhat.com>
1473
1474         * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE for the clone.
1475
1476         2008-07-14  Jakub Jelinek  <jakub@redhat.com>
1477
1478         * cp-gimplify.c (cp_gimplify_expr): Update comment.
1479
1480         2008-07-14  Aldy Hernandez  <aldyh@redhat.com>
1481
1482         * cp-tree.h (union lang_tree_node): Rename GENERIC_NEXT to
1483         TREE_CHAIN.
1484         * cp-gimplify.c (cxx_omp_clause_apply_fn): Rename
1485         GIMPLE_MODIFY_STMT to MODIFY_EXPR.
1486         (cxx_omp_clause_copy_ctor): Same.
1487         (cxx_omp_clause_assign_op): Same.
1488
1489         2008-05-28  Jakub Jelinek  <jakub@redhat.com>
1490
1491         * cp-gimplify.c (cp_gimplify_omp_for): Add pre_p argument.  Tuplify.
1492         (cp_gimplify_expr): Adjust caller.
1493
1494         2008-05-11 Doug Kwan  <dougkwan@google.com>
1495
1496         * init.c (build_vec_delete): Add type conversion for argument
1497         0 of POINTER_PLUS_EXPR.
1498
1499         2008-04-29  Doug Kwan  <dougkwan@google.com>
1500
1501         * decl2 (File): Include "gimple.h"
1502         (cp_write_global_declarations): Use gimple_body instead of
1503         DECL_SAVED_TREE.
1504         * Make-lang.in (cp/decl2.o): Add $(GIMPLE_H)
1505
1506         2008-04-10  Diego Novillo  <dnovillo@google.com>
1507
1508         http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00913.html
1509
1510         * optimize.c (maybe_clone_body): Re-enable call to
1511         clone_body.
1512         * cp-gimplify.c (cp_gimplify_omp_for): Mark disabled
1513         code with call to gimple_unreachable.
1514         (cp_genericize): Fix handling of clone bodies.
1515
1516         2008-04-04  Diego Novillo  <dnovillo@google.com>
1517
1518         http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00413.html
1519
1520         * optimize.c (maybe_clone_body): Re-enable.
1521
1522         2008-02-19  Diego Novillo  <dnovillo@google.com>
1523                     Oleg Ryjkov  <olegr@google.com>
1524
1525         http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
1526
1527         * cp-gimplify.c (gimplify_for_stmt): Change gimple_seq
1528         argument to gimple_seq *.  Update all users.
1529         (gimplify_must_not_throw_expr): Likewise.
1530
1531         2008-02-04  Oleg Ryjkov <olegr@google.com>
1532
1533         * except.c: Include gimple.h
1534         (cp_protect_cleanup_actions): Convert to tuples.
1535         * Make-lang.in (cp/except.o): Add dependency on gimple.h
1536
1537         2007-11-10  Aldy Hernandez  <aldyh@redhat.com>
1538
1539         * cp-gimplify.c (gimplify_cp_loop): Call tree_annotate_all_with_locus
1540         instead of annotating each block manually.
1541
1542         2007-10-30  Aldy Hernandez  <aldyh@redhat.com>
1543
1544         * cp-gimplify.c (gimplify_cp_loop): Tuplify.
1545         (gimplify_for_stmt): Same.
1546         (gimplify_switch_stmt): Same.
1547         (cp_gimplify_expr): [FOR_STMT]: Do not call gimplify_for_stmt.  Return
1548         GS_OK.
1549         [WHILE_STMT]: Return GS_OK.
1550         [SWITCH_STMT]: Same.
1551         [CONTINUE_STMT]: Same.
1552         [BREAK_STMT]: Same.
1553         (cp_genericize): Set gimple_body() of cloned functions when needed.
1554
1555         2007-10-29  Aldy Hernandez  <aldy@quesejoda.com>
1556
1557         * cp-gimplify.c: Move build_gimple_eh_filter_tree here.
1558         (cp_gimplify_init_expr): Convert to tuples.
1559         (gimplify_must_not_throw_expr): Make function return a
1560         gimplify_status and convert to tuples.
1561
1562         2007-10-18  Aldy Hernandez  <aldy@quesejoda.com>
1563
1564         * cp-gimplify.c (genericize_try_block): Enable and do not call
1565         gimplify_stmt.
1566         (genericize_catch_block): Same.
1567         (genericize_eh_spec_block): Same.
1568         Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
1569         (cp_gimplify_expr): Enable TRY_BLOCK, HANDLER, and EH_SPEC_BLOCK.
1570
1571         2007-10-16  Aldy Hernandez  <aldy@quesejoda.com>
1572
1573         * optimize.c (maybe_clone_body): Comment out call to clone_body.
1574         * decl.c (finish_function): Use gimple_body instead of
1575         DECL_SAVED_TREE.
1576         * cp-tree.h (cp_gimplify_expr): Last 2 arguments are sequences.
1577         * cp-gimplify.c (genericize_try_block): Comment out.
1578         (genericize_catch_block): Same.
1579         (genericize_eh_spec_block): Same.
1580         (gimplify_cp_loop): Comment out calls to gimplify_stmt.
1581         (gimplify_for_stmt): Comment out.
1582         (gimplify_switch_stmt): Comment out call to gimplify_stmt.
1583         (cp_gimplify_omp_for): Same.
1584         (gimplify_must_not_throw_expr): Argument pre_p is a sequence.
1585         Comment out call to gimplify_stmt and append_to_statement_list.
1586         Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
1587         (cp_gimplify_init_expr): Arguments pre_p and post_p are sequences.
1588         (cp_gimplify_expr): Same.
1589         Comment out calls to genericize_*_block.  Comment out call to
1590         gimplify_for_stmt.
1591
1592 2008-07-27  H.J. Lu  <hongjiu.lu@intel.com>
1593
1594         PR c++/36944
1595         * class.c (type_has_user_provided_default_constructor): Handle
1596         default parameters.
1597
1598 2008-07-27  Paolo Carlini  <paolo.carlini@oracle.com>
1599
1600         * decl.c (push_library_fn): Add a parameter for the exceptions that
1601         the function may throw.
1602         (push_void_library_fn, push_throw_library_fn, expand_static_init):
1603         Adjust.
1604         (build_library_fn): Change to static.
1605         * cp-tree.h: Adjust declarations.
1606         * except.c (declare_nothrow_library_fn): New.
1607         (do_get_exception_ptr, do_begin_catch, do_free_exception,
1608         do_allocate_exception):  Use the latter, adjust the declarations
1609         (ie, add empty exception-specification), consistently with the
1610         actual implementation in libsupc++.
1611
1612 2008-07-25  Jan Hubicka  <jh@suse.cz>
1613
1614         * typeck.c (inline_conversion): Remove.
1615         (cp_build_function_call): Do not use inline_conversion.
1616         * decl.c (duplicate_decls): Do not insist on inline being declared
1617         early.
1618         (start_cleanup_fn): Do not assume that INLINE flags prevent function
1619         from being output.  We now remove static functions always.
1620         (finish_function): Do return warning on all static functions.
1621         * call.c (build_over_call): Do not use inline_conversion.
1622         * cp-tree.h (possibly_inlined_p): Declare.
1623         (inline_conversion): Remove.
1624         * pt.c (instantiate_decl): Use possibly_inlined_p predicate.
1625         * decl2.c (cp_write_global_declarations): Likewise.
1626         (mark_used): Likewise.
1627         (possibly_inlined_p): New functions.
1628
1629 2008-07-25  Jason Merrill  <jason@redhat.com>
1630
1631         * class.c (type_has_user_provided_default_constructor): Handle
1632         templates.
1633
1634 2008-07-23  Jan Hubicka  <jh@suse.cz>
1635
1636         * decl.c (duplicate_decls): Update comment and unit-at-a-time.
1637         (grogfndecl): Drop flag_inline_trees code.
1638         * pt.c (instantiate_decl): Drop flag_iline_trees code.
1639         * lex.c (cxx_init): Do not set unit-at-a-time.
1640
1641 2008-07-23  Jason Merrill  <jason@redhat.com>
1642
1643         * mangle.c (write_unqualified_name): Avoid infinite recursion when
1644         trying to mangle a decl with no name.
1645
1646         Implement defaulted/deleted functions as per N2346
1647         * cp-tree.h (struct lang_decl_flags): Add defaulted_p bitfield.
1648         (DECL_DELETED_FN): New macro.
1649         (DECL_DEFAULTED_FN): New macro.
1650         * class.c (user_provided_p): New fn.
1651         (defaultable_fn_p): New fn.
1652         (type_has_user_provided_constructor): New fn.
1653         (type_has_user_provided_default_constructor): New fn.
1654         (check_methods): A defaulted fn is still trivial.
1655         (check_bases_and_members): Likewise.
1656         * decl.c (grok_special_member_properties): Likewise.
1657         (duplicate_decls): Complain about redeclaring a function as deleted.
1658         (start_decl): initialized==2 means deleted.
1659         (cp_finish_decl): Handle deleted/defaulted semantics.
1660         * decl2.c (grokfield): Likewise.
1661         (mark_used): Check DECL_DEFAULTED_FN instead of DECL_ARTIFICIAL.
1662         Complain about using a deleted fn.
1663         * init.c (build_value_init_1): Use type_has_user_provided_constructor.
1664         (perform_member_init): Check for a user-provided default constructor
1665         even if TYPE_NEEDS_CONSTRUCTING.
1666         (build_new_1): Likewise.
1667         * call.c (build_over_call): Don't call mark_used twice.
1668         * method.c (implicitly_declare_fn): Set DECL_DEFAULTED_FN.
1669         * search.c (check_final_overrider): Check for deleted mismatch.
1670         * parser.c (cp_parser_init_declarator): Tell start_decl about =delete.
1671         (cp_parser_pure_specifier): Handle =default and =delete.
1672
1673         * error.c (maybe_warn_cpp0x): Suggest -std=gnu++0x as well.
1674
1675 2008-07-23  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1676
1677         PR 35058
1678         * typeck.c: All calls to pedwarn changed.
1679         * decl.c: All calls to pedwarn changed.
1680         * call.c: All calls to pedwarn changed.
1681         * error.c: All calls to pedwarn changed.
1682         * typeck2.c: All calls to pedwarn changed.
1683         * pt.c: All calls to pedwarn changed.
1684         * name-lookup.c: All calls to pedwarn changed.
1685         * parser.c: All calls to pedwarn changed.
1686
1687 2008-07-21  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1688
1689         * call.c: Fix comment typos.
1690         * class.c: Likewise.
1691         * cp-tree.h: Likewise.
1692         * cxx-pretty-print.c: Likewise.
1693         * decl.c: Likewise.
1694         * init.c: Likewise.
1695         * name-lookup.c: Likewise.
1696         * operators.def: Likewise.
1697         * parser.c: Likewise.
1698         * pt.c: Likewise.
1699         * tree.c: Likewise.
1700         * typeck.c: Likewise.
1701
1702 2008-07-21  Paolo Carlini  <paolo.carlini@oracle.com>
1703
1704         PR c++/36871
1705         PR c++/36872
1706         * semantics.c (classtype_has_nothrow_assign_or_copy_p): Only check
1707         copy constructors and copy assignment operators proper.
1708
1709 2008-07-21  Rafael Ávila de Espíndola  <espindola@google.com>
1710
1711         * parser.c (cp_token): Remove in_system_header.
1712         (eof_token): Remove in_system_header.
1713         (cp_lexer_get_preprocessor_token): Don't set in_system_header.
1714         (cp_lexer_set_source_position_from_token): Don't set in_system_header.
1715         (cp_parser_member_declaration):  Use in_system_header_at.
1716         * pt.c (lookup_template_class): Don't set DECL_IN_SYSTEM_HEADER.
1717         (pop_tinst_level): Don't set in_system_header.
1718         (instantiate_class_template): Don't set in_system_header.
1719         (instantiate_decl): Don't set in_system_header.
1720         (instantiate_pending_templates): Don't set in_system_header.
1721
1722 2008-07-21  Paolo Carlini  <paolo.carlini@oracle.com>
1723
1724         PR c++/36870
1725         * semantics.c (classtype_has_nothrow_assign_or_copy_p): Use
1726         TYPE_NOTHROW_P, not TREE_NOTHROW.
1727         (trait_expr_value): Likewise.
1728
1729 2008-07-18  Dodji Seketeli  <dseketel@redhat.com>
1730
1731         PR c++/36407
1732         * call.c (convert_like_real): Don't take the error code path
1733           when a rvalue or base conversion has the bad_p field set.
1734
1735 2008-07-18  Kris Van Hees  <kris.van.hees@oracle.com>
1736
1737         * rtti.c (emit_support_tinfos): Add char16_type_node and
1738         char32_type_node.
1739         * typeck2.c (digest_init): Support char16_t and char32_t.
1740
1741 2008-07-18  Kavih R. Ghazi  <ghazi@caip.rutgers.edu>
1742
1743         * cvt.c (convert_to_void): Avoid C++ keywords.
1744         * decl.c (walk_namespaces_r, wrapup_globals_for_namespace):
1745         Likewise.
1746         * friend.c (is_friend): Likewise.
1747         * init.c (perform_member_init): Likewise.
1748         * mangle.c (write_template_prefix, write_template_template_param):
1749         Likewise.
1750         * name-lookup.c (do_namespace_alias, do_using_directive,
1751         parse_using_directive, ambiguous_decl, arg_assoc): Likewise.
1752         * parser.c (cp_parser_template_id, cp_parser_namespace_definition,
1753         cp_parser_objc_typename, cp_parser_objc_method_keyword_params):
1754         Likewise.
1755         * pt.c (is_specialization_of_friend, lookup_template_class,
1756         push_tinst_level, instantiate_class_template,
1757         tsubst_copy_and_build): Likewise.
1758         * tree.c (add_stmt_to_compound): Likewise.
1759         * typeck.c (finish_class_member_access_expr): Likewise.
1760
1761 2008-07-17  Julian Brown  <julian@codesourcery.com>
1762             Mark Mitchell  <mark@codesourcery.com>
1763
1764         * decl2.c (determine_visibility): Allow target to override
1765         visibility of class data.
1766
1767 2008-07-17  Paolo Carlini  <paolo.carlini@oracle.com>
1768
1769         PR c++/36855
1770         * semantics.c (trait_expr_value): Update __has_trivial_destructor
1771         semantics to the current WP (N2691).
1772
1773 2008-07-16  Dodji Seketeli  <dseketel@redhat.com>
1774
1775         PR c++/13699
1776         * name-lookup.c (lookup_extern_c_fun_binding_in_all_ns): New function.
1777         (pushdecl_maybe_friend): Check if a redeclaration of extern C function
1778         complies with exception specification constraints.
1779
1780 2008-07-14  Jason Merrill  <jason@redhat.com>
1781
1782         * lex.c (init_reswords): Always set D_OBJC.
1783
1784 2008-07-11  Tom Tromey  <tromey@redhat.com>
1785             Ian Lance Taylor  <iant@google.com>
1786
1787         * lex.c (struct resword, reswords): Don't define.
1788         (D_EXT, D_ASM, D_OBJC, D_CXX0X): Don't define.
1789         (init_reswords): Clarify mask code.  Use c_common_reswords rather
1790         than reswords.
1791
1792 2008-07-11  Dodji Seketeli  <dseketel@redhat.com>
1793
1794         PR c++/13101
1795         * decl.c (grokdeclarator): Warn about initializing variables
1796         of storage class 'extern' only after the type of the declarator
1797         has been properly computed.
1798
1799 2008-07-11  Dodji Seketeli  <dseketel@redhat.com>
1800
1801         PR c++/31754
1802         * cp-tree.h (struct cp_decl_specifier_seq): Add a location field. It
1803         carries the location of the primary type.
1804         * parser.c (cp_parser_check_type_definition): Update documentation.
1805         (cp_parser_check_for_definition_in_return_type,
1806         cp_parser_check_for_invalid_template_id,
1807         cp_parser_set_decl_spec_type,
1808         cp_parser_check_for_definition_in_return_type,
1809         cp_parser_diagnose_invalid_type_name,
1810         cp_parser_new_expression, cp_parser_explicit_instantiation,
1811         cp_parser_type_specifier, cp_parser_simple_type_specifier,
1812         cp_parser_omp_for_loop, cp_parser_pragma): Use location in error
1813         messages.
1814
1815 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1816
1817         PR c++/31754
1818         * pt.c, semantic.c:
1819         * semantic.c (qualified_name_lookup_error, finish_id_expression):
1820         Add a location_t parameter so that
1821         error message can have a more accurate location.
1822         * cp-tree.h: Updated prototype
1823         * pt.c (tsubst_qualified_id): Use location in error messages.
1824         * parser.c (cp_parser_postfix_expression,
1825         cp_parser_objc_statement, cp_parser_trait_expr,
1826         cp_parser_token_is_class_key,
1827         cp_parser_uncommitted_to_tentative_parse_p,
1828         cp_parser_check_for_invalid_template_id, cp_parser_is_string_literal,
1829         cp_parser_error, cp_parser_name_lookup_error,
1830         cp_parser_simulate_error, cp_parser_check_decl_spec,
1831         cp_parser_check_decl_spec, cp_parser_non_integral_constant_expression,
1832         cp_parser_diagnose_invalid_type_name,
1833         cp_parser_parse_and_diagnose_invalid_type_name,
1834         cp_parser_require_pragma_eol, cp_parser_make_typename_type,
1835         cp_parser_string_literal, cp_parser_primary_expression,
1836         cp_parser_primary_expression, cp_parser_unqualified_id,
1837         cp_parser_nested_name_specifier_opt, cp_parser_postfix_expression,
1838         cp_parser_postfix_dot_deref_expression, cp_parser_new_expression,
1839         cp_parser_direct_new_declarator, cp_parser_builtin_offsetof,
1840         cp_parser_label_for_labeled_statement, cp_parser_statement_seq_opt,
1841         cp_parser_jump_statement, cp_parser_block_declaration,
1842         cp_parser_simple_declaration, cp_parser_decl_specifier_seq,
1843         cp_parser_function_specifier_opt, cp_parser_decltype,
1844         cp_parser_mem_initializer_list, cp_parser_mem_initializer,
1845         cp_parser_mem_initializer_id, cp_parser_template_parameter,
1846         cp_parser_type_parameter, cp_parser_template_id,
1847         cp_parser_template_name, cp_parser_template_argument): Likewise.
1848
1849 2008-07-09  Paolo Carlini  <paolo.carlini@oracle.com>
1850
1851         PR c++/36760
1852         * pt.c (tsubst_function_type): Remove warning for type qualifiers
1853         on function return type.
1854
1855 2008-07-09  Paolo Carlini  <paolo.carlini@oracle.com>
1856
1857         PR c++/36760
1858         * pt.c (tsubst_function_type): Don't warn for type qualifiers
1859         on function return type in case of system header.
1860
1861 2008-07-09  Raksit Ashok <raksit@google.com>
1862
1863         * parser.c (cp_parser_postfix_expression): New warning based on flag
1864         warn_disallowed_functions.
1865
1866 2008-07-08  Simon Martin  <simartin@users.sourceforge.net>
1867
1868         PR c++/34963
1869         * decl.c (grokdeclarator): Reset storage_class and staticp for friend
1870         functions declared with a storage class qualifier.
1871
1872 2008-07-03  Richard Guenther  <rguenther@suse.de>
1873
1874         PR c++/36128
1875         * typeck.c (cp_build_function_call): Move code to verify
1876         builtin function arguments ...
1877         * call.c (build_cxx_call): ... here.
1878
1879 2008-07-02  Jason Merrill  <jason@redhat.com>
1880
1881         * Make-lang.in (cp/typeck2.o): Add $(REAL_H) dependency.
1882
1883         Implement WG21 N2672, Initializer List proposed wording
1884         * cp-tree.h (enum cp_tree_index): Add CPTI_INIT_LIST_TYPE.
1885         (struct lang_type_class): Add has_list_ctor bitfield.
1886         (TYPE_HAS_LIST_CTOR): New macro.
1887         (BRACE_ENCLOSED_INITIALIZER_P): Expect init_list_type_node.
1888         (CONSTRUCTOR_IS_DIRECT_INIT): New macro.
1889         (LOOKUP_NO_NARROWING): New macro.
1890         (LOOKUP_NO_COPY_CTOR_CONVERSION): New macro.
1891         * parser.c (cp_parse_braced_list): Split out from...
1892         (cp_parser_initializer_clause): ...here.
1893         (cp_parser_postfix_expression): Build up CONSTRUCTOR for compound
1894         literal here.
1895         (cp_lexer_next_token_is_not_keyword): New fn.
1896         (cp_parser_parenthesized_expression_list): Handle { }.
1897         (cp_parser_new_expression, cp_parser_new_initializer): Likewise.
1898         (cp_parser_assignment_expression, cp_parser_condition): Likewise.
1899         (cp_parser_jump_statement, cp_parser_simple_declaration): Likewise.
1900         (cp_parser_mem_initializer, cp_parser_init_declarator): Likewise.
1901         (cp_parser_initializer, cp_parser_functional_cast): Likewise.
1902         (cp_parser_omp_for_loop, cp_parser_cache_group): Likewise.
1903         (cp_parser_save_member_function_body): Likewise.
1904         * call.c (conversion_kind): Add ck_list, ck_aggr.
1905         (struct conversion): Add check_narrowing bitfield, conversion list.
1906         (build_list_conv): New fn.
1907         (build_aggr_conv): New fn.
1908         (implicit_conversion): Call them.
1909         (standard_conversion): Set check_narrowing if appropriate.
1910         (add_function_candidate): Handle LOOKUP_NO_COPY_CTOR_CONVERSION.
1911         (build_user_type_conversion_1): When converting from an init list,
1912         we allow additional conversions except when calling a copy ctor.
1913         (convert_like_real): Calling an explicit ctor for an init list is
1914         ill-formed.  Handle ck_list and ck_addr.  Check narrowing.
1915         (build_new_method_call): If CONSTRUCTOR_IS_DIRECT_INIT is set and
1916         class doesn't have a list ctor, break the {} into a TREE_LIST.
1917         (compare_ics): ck_list is better than other UDCs.
1918         (set_up_extended_ref_temp): Split out from initialize_reference.
1919         (is_std_init_list): New fn.
1920         (is_list_ctor): New fn.
1921         * decl.c (cxx_init_decl_processing): Create init_list_type_node.
1922         (reshape_init_array_1): Pass it to build_constructor.
1923         (reshape_init_class): Ditto.
1924         (initialize_artificial_var): Pass the appropriate type.
1925         (build_aggr_init_full_exprs): Split out from...
1926         (check_initializer): ...here.  Handle new semantics.
1927         (build_init_list_var_init): New subroutine of check_initializer.
1928         (grokdeclarator): Converting constructors can have more than one parm.
1929         (grok_special_member_properties): Set TYPE_HAS_LIST_CTOR.
1930         * init.c (expand_default_init): Only do digest_init for aggregates.
1931         * rtti.c (tinfo_base_init): Pass init_list_type_node to
1932         build_constructor_from_list.
1933         (generic_initializer, ptr_initializer): Ditto.
1934         (ptm_initializer, class_initializer): Ditto.
1935         (get_pseudo_ti_init): Ditto.
1936         * error.c (dump_type): Handle init_list_type_node.
1937         (maybe_warn_cpp0x): New fn.
1938         (maybe_varn_variadic_templates): Call it.
1939         * cvt.c (ocp_convert): Handle conversion from { }.
1940         * tree.c (build_array_of_n_type): New fn.
1941         * typeck2.c (store_init_value): Use init_list_type_node.
1942         (digest_init): Likewise.
1943         (check_narrowing): New fn.
1944         * semantics.c: (finish_compound_literal): Take CONSTRUCTOR instead
1945         of vector of constructor elts.  Handle non-aggregate types.  Make
1946         constant literals static.
1947         * pt.c: (tsubst_copy_and_build): Adjust.
1948         (unify): Handle { }.
1949         * name-lookup.c (arg_assoc_type): Handle init_list_type_node.
1950
1951 2008-07-01  Daniel Jacobowitz  <dan@codesourcery.com>
1952
1953         * typeck.c (comp_ptr_ttypes_real): Use vector_targets_convertible_p.
1954         (comp_ptr_ttypes_const): Likewise.
1955
1956 2008-07-01  Andrew Haley  <aph@redhat.com>
1957
1958         * decl.c (finish_constructor_body): Don't set the return value of
1959         the constructor if the constructor is that of a Java type.
1960
1961 2008-06-30  Jakub Jelinek  <jakub@redhat.com>
1962
1963         PR c++/36662
1964         * decl2.c (is_late_template_attribute): If the first attribute
1965         argument is IDENTIFIER_NODE, don't consider it when checking
1966         if arguments are value or type dependent.
1967
1968 2008-06-29  Paolo Carlini  <paolo.carlini@oracle.com>
1969
1970         PR c++/36655
1971         * pt.c (do_type_instantiation): In c++0x mode do not warn for
1972         extern template.
1973
1974 2008-06-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1975
1976         * Make-lang.in (cp-warn): Delete $(CXX_COMPAT_WARN).
1977
1978 2008-06-28  Jakub Jelinek  <jakub@redhat.com>
1979
1980         PR c++/36364
1981         * repo.c (repo_emit_p): Put const static data members initialized
1982         by const expr into *.rpo file, just return 2 if IDENTIFIER_REPO_CHOSEN
1983         for it is 0.
1984
1985 2008-06-27  Paolo Carlini  <paolo.carlini@oracle.com>
1986
1987         PR c++/36655
1988         * pt.c (do_decl_instantiation): In c++0x mode do not warn for
1989         extern template.
1990
1991 2008-06-24  Jonathan Wakely  <jwakely.gcc@gmail.com>
1992
1993         PR c++/23194
1994         * typeck.c (cp_build_function_call): Show example syntax in
1995         diagnostic.
1996
1997 2008-06-21  Jonathan Wakely  <jwakely.gcc@gmail.com>
1998
1999         * typeck.c (composite_pointer_type_r, cxx_sizeof_expr,
2000         cxx_alignof_expr, check_template_keyword, cp_build_binary_op,
2001         pointer_diff, cp_build_unary_op, build_x_compound_expr_from_list,
2002         build_reinterpret_cast_1, cp_build_c_cast, check_return_expr): Change
2003         pedwarn to permerror.
2004         * init.c (perform_member_init, build_new_1, build_new): Likewise.
2005         * decl.c (warn_extern_redeclared_static, duplicate_decls,
2006         * identify_goto, check_previous_goto_1, check_goto, define_label,
2007         check_tag_decl, start_decl, check_class_member_definition_namespace,
2008         grokfndecl, grokdeclarator): Likewise.
2009         * except.c (check_handlers): Likewise.
2010         * typeck2.c (digest_init): Likewise.
2011         * pt.c (check_specialization_namespace,
2012         check_explicit_instantiation_namespace,
2013         maybe_process_partial_specialization, check_explicit_specialization,
2014         convert_template_argument, do_decl_instantiation,
2015         do_type_instantiation, instantiate_decl): Likewise.
2016         * semantics.c (finish_template_type_parm): Likewise.
2017         * name-lookup.c (pushdecl_maybe_friend,
2018         check_for_out_of_scope_variable): Likewise.
2019         * decl2.c (finish_static_data_member_decl, build_anon_union_vars,
2020         coerce_new_type): Likewise.
2021         * parser.c (cp_parser_nested_name_specifier_opt,
2022         cp_parser_mem_initializer, cp_parser_elaborated_type_specifier,
2023         cp_parser_class_head, cp_parser_check_class_key): Likewise.
2024         (cp_parser_parameter_declaration): Check flag_permissive instead of
2025         flag_pedantic_errors.
2026         * call.c (joust): Change pedwarn to warning.
2027         * friend.c (make_friend_class): Likewise.
2028
2029 2008-06-16  Jan Hubicka  <jh@suse.cz>
2030
2031         * method.c: Include cgraph.h.
2032         (use_thunk): Use cgraph_add_new_function instead of calling backend
2033         directly.
2034
2035 2008-06-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2036
2037         * parser.c: Fix comment typo.
2038
2039 2008-06-14  Simon Martin  <simartin@users.sourceforge.net>
2040
2041         PR c++/35320
2042         * decl2.c (grokbitfield): Receive the list of attributes, pass it to
2043         grokdeclarator and apply it to the created declaration.
2044         * cp-tree.h (grokbitfield): Update prototype.
2045         * parser.c (cp_parser_member_declaration): Don't apply the attributes
2046         since they are now applied in grokbitfield. Adjusted the call to
2047         grokbitfield.
2048         (cp_parser_objc_class_ivars): Likewise.
2049
2050 2008-06-14  Simon Martin  <simartin@users.sourceforge.net>
2051
2052         PR c++/35317
2053         * class.c (type_requires_array_cookie): Do not consider delete[]
2054         operators with an ellipsis as second argument.
2055
2056 2008-06-09  Jakub Jelinek  <jakub@redhat.com>
2057
2058         PR c++/36408
2059         * semantics.c (stmt_expr_value_expr): Don't crash on empty
2060         STATEMENT_LIST.
2061
2062 2008-06-08  Paolo Carlini  <paolo.carlini@oracle.com>
2063
2064          PR c++/35242
2065          * pt.c (maybe_process_partial_specialization): Check the tree
2066         returned by push_template_decl for error_mark_node.
2067         * parser.c (cp_parser_class_head): Likewise, check the tree
2068         returned by the latter.
2069
2070 2008-06-07  Paolo Carlini  <paolo.carlini@oracle.com>
2071
2072          PR c++/35327
2073          * decl.c (grokdeclarator): In case of wrong return type return
2074         immediately error_mark_node.
2075
2076 2008-06-06  Jakub Jelinek  <jakub@redhat.com>
2077
2078         * cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
2079         dependent_omp_for_p, begin_omp_task, finish_omp_task,
2080         finish_omp_taskwait): New prototypes.
2081         (cxx_omp_clause_default_ctor): Add outer argument.
2082         (finish_omp_for): Add new clauses argument.
2083         * cp-gimplify.c (cxx_omp_finish_clause): New function.
2084         (cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
2085         (cxx_omp_clause_default_ctor): Add outer argument.
2086         (cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
2087         * cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
2088         * parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
2089         Add par_clauses argument.  If decl is present in parallel's
2090         lastprivate clause, change that clause to shared and add
2091         a lastprivate clause for decl to OMP_FOR_CLAUSES.
2092         Fix wording of error messages.  Adjust finish_omp_for caller.
2093         Add clauses argument.  Parse loops with random access iterators.
2094         (cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
2095         functions.
2096         (cp_parser_omp_for, cp_parser_omp_parallel): Adjust
2097         cp_parser_omp_for_loop callers.
2098         (cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
2099         functions.
2100         (cp_parser_omp_clause_name): Handle collapse and untied
2101         clauses.
2102         (cp_parser_omp_clause_schedule): Handle auto schedule.
2103         (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
2104         and PRAGMA_OMP_CLAUSE_UNTIED.
2105         (OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
2106         (OMP_TASK_CLAUSE_MASK): Define.
2107         (cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
2108         (cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
2109         (cp_parser_pragma): Handle PRAGMA_OMP_TASK and
2110         PRAGMA_OMP_TASKWAIT.
2111         * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
2112         OMP_CLAUSE_UNTIED.  Handle OMP_CLAUSE_LASTPRIVATE_STMT.
2113         (tsubst_omp_for_iterator): New function.
2114         (dependent_omp_for_p): New function.
2115         (tsubst_expr) <case OMP_FOR>: Use it.  Handle collapsed OMP_FOR
2116         loops.  Adjust finish_omp_for caller.  Handle loops with random
2117         access iterators.  Adjust for OMP_FOR_{INIT,COND,INCR} changes.
2118         (tsubst_expr): Handle OMP_TASK.
2119         * semantics.c (cxx_omp_create_clause_info): New function.
2120         (finish_omp_clauses): Call it.  Handle OMP_CLAUSE_UNTIED and
2121         OMP_CLAUSE_COLLAPSE.
2122         (cxx_omp_predetermined_sharing): Removed.
2123         * semantics.c (finish_omp_for): Allow pointer iterators.  Use
2124         handle_omp_for_class_iterator and dependent_omp_for_p.  Handle
2125         collapsed for loops.  Adjust c_finish_omp_for caller.  Add new
2126         clauses argument.  Fix check for type dependent cond or incr.
2127         Set OMP_FOR_CLAUSES to clauses.  Use cp_convert instead of
2128         fold_convert to convert incr amount to difference_type.  Only
2129         fold if not in template.  If decl is mentioned in lastprivate
2130         clause, set OMP_CLAUSE_LASTPRIVATE_STMT.  Handle loops with random
2131         access iterators.  Adjust for OMP_FOR_{INIT,COND,INCR}
2132         changes.
2133         (finish_omp_threadprivate): Allow static class members of the
2134         current class.
2135         (handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
2136         finish_omp_taskwait): New functions.
2137
2138         * parser.c (cp_parser_binary_expression): Add prec argument.
2139         (cp_parser_assignment_expression): Adjust caller.
2140         * cp-tree.h (outer_curly_brace_block): New prototype.
2141         * decl.c (outer_curly_brace_block): No longer static.
2142
2143 2008-06-02  Paolo Carlini  <paolo.carlini@oracle.com>
2144
2145          PR c++/36404
2146          * pt.c (push_template_decl_real): Consistently return error_mark_node
2147         on error.
2148
2149 2008-06-02  Tomas Bily  <tbily@suse.cz>
2150
2151          * typeck.c (is_bitfield_expr_with_lowered_type): Use CASE_CONVERT.
2152          (cp_build_unary_op): Likewise.
2153          (cp_build_indirect_ref): Use CONVERT_EXPR_P.
2154          (maybe_warn_about_returning_address_of_local): Likewise.
2155
2156 2008-05-29  Paolo Carlini  <paolo.carlini@oracle.com>
2157
2158          PR c++/35243
2159          * pt.c (tsubst_initializer_list): Consistently check the tree
2160          returned by tsubst_pack_expansion for error_mark_node.
2161
2162 2008-05-27  Michael Matz  <matz@suse.de>
2163
2164         PR c++/27975
2165         * call.c (build_new_op): Make warning conditional on
2166         OPT_Wenum_compare.
2167
2168 2008-05-27  Alexandre Oliva  <aoliva@redhat.com>
2169
2170         PR c++/35909
2171         * call.c (convert_like_real): Convert bitfield to desired type
2172         before creating temporary.
2173
2174 2008-05-26  Daniel Franke  <franke.daniel@gmail.com>
2175
2176         * Makefile.in: Adjusted dependencies on c-incpath.o.
2177
2178 2008-05-23  Jakub Jelinek  <jakub@redhat.com>
2179
2180         PR c++/36237
2181         * cp-gimplify.c (cxx_omp_clause_apply_fn): Call
2182         fold_build_cleanup_point_expr on build_call_a results.
2183
2184         PR c++/36308
2185         * semantics.c (omp_clause_info_fndecl): New function.
2186         (finish_omp_clauses): Use it.
2187
2188 2008-05-21  Jakub Jelinek  <jakub@redhat.com>
2189
2190         PR c++/36023
2191         * cp-tree.h (check_array_initializer): New prototype.
2192         * decl.c (check_array_initializer): New function.
2193         (check_initializer): Call it.
2194         * semantics.c (finish_compound_literal): Call it for ARRAY_TYPEs.
2195
2196 2008-05-21  Tom Tromey  <tromey@redhat.com>
2197
2198         * mangle.c (save_partially_mangled_name): Remove.
2199         (restore_partially_mangled_name): Likewise.
2200         (write_encoding): Update.
2201         (write_unqualified_name): Likewise.
2202         (start_mangling): Always use name_obstack.  Remove 'ident_p'
2203         argument.
2204         (get_identifier_nocopy): Remove.
2205         (finish_mangling_internal): Rename from finish_mangling.
2206         (finish_mangling): New function.
2207         (finish_mangling_get_identifier): Likewise.
2208         (partially_mangled_name, partially_mangled_name_len): Remove.
2209         (mangle_decl_string): Change return type.  Update.
2210         (mangle_decl, mangle_type_string, mangle_special_for_type,
2211         mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
2212         mangle_ref_init_variable): Update.
2213
2214 2008-05-12  Paolo Carlini  <paolo.carlini@oracle.com>
2215
2216          PR c++/35331
2217          * semantics.c (begin_class_definition): Extend checks on the first
2218         argument.
2219
2220 2008-05-12  Tomas Bily  <tbily@suse.cz>
2221
2222          * typeck2.c (digest_init): Use CONVERT_EXPR_P.
2223          * call.c (build_over_call): Likewise.
2224          * error.c (dump_expr): Use CASE_CONVERT.
2225          * class.c (fixed_type_or_null): Likewise.
2226
2227 2008-05-11  Volker Reichelt  <v.reichelt@netcologne.de>
2228
2229         * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
2230         in error message.
2231         (cp_parser_omp_clause_schedule): Remove superfluous "expected"
2232         in error message.
2233
2234 2008-05-07  Kenneth Zadeck  <zadeck@naturalbridge.com>
2235
2236         * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
2237         DECL_LOOPING_CONST_OR_PURE_P attributes.
2238         * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
2239         DECL_PURE_P.
2240
2241 2008-05-02  Simon Baldwin  <simonb@google.com>
2242
2243         PR bootstrap/36108
2244         * typeck.c (build_array_ref): Remove warn_array_subscript_range.
2245
2246 2008-05-01  Simon Baldwin  <simonb@google.com>
2247
2248         * typeck.c (build_array_ref): Call warn_array_subscript_range.
2249
2250 2008-04-30  Jakub Jelinek  <jakub@redhat.com>
2251
2252         PR c++/35986
2253         * pt.c (more_specialized_fn): Stop the loop even if there are no
2254         arguments before ellipsis.
2255
2256 2008-04-29  Jakub Jelinek  <jakub@redhat.com>
2257
2258         PR c++/35650
2259         * parser.c (cp_parser_lookup_name): Look through single function
2260         OVERLOAD.
2261
2262         PR c++/35987
2263         * typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
2264         COMPOUND_EXPR if the second argument would be error_mark_node.
2265
2266 2008-04-28  Jason Merrill  <jason@redhat.com>
2267             Liu Guanwei <liu_gw@163.com>
2268
2269         PR c++/57
2270         * parser.c (cp_parser_parameter_declaration): Handle < ambiguity
2271         in default arguments.
2272
2273 2008-04-25  Jan Hubicka  <jh@suse.cz>
2274
2275         * typeck.c (check_return_expr): Update.
2276         * decl.c (start_preparsed_function): Update.
2277         * method.c (use_thunk): Update.
2278
2279 2008-04-24  Jakub Jelinek  <jakub@redhat.com>
2280
2281         PR c++/35758
2282         * cp-tree.h (cp_reconstruct_complex_type): New prototype.
2283         * cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
2284         * decl2.c (is_late_template_attribute): Only make vector_size
2285         late tmpl attribute if argument is type or value dependent.
2286         (cp_reconstruct_complex_type): New function.
2287
2288 2008-04-24  Richard Guenther  <rguenther@suse.de>
2289
2290         * typeck.c (cp_build_function_call): Call
2291         check_builtin_function_arguments.
2292
2293 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
2294
2295         * typeck.c (get_member_function_from_ptrfunc): Don't set TREE_INVARIANT.
2296         (build_ptrmemfunc1): Don't set TREE_INVARIANT.
2297         * init.c (build_zero_init): Don't set TREE_INVARIANT.
2298         * class.c (build_base_path): Don't set TREE_INVARIANT.
2299         (build_vtbl_ref_1): Don't set TREE_INVARIANT.
2300         (build_vtbl_initializer): Don't set TREE_INVARIANT.
2301         * decl.c (build_enumerator): Don't set TREE_INVARIANT.
2302         * rtti.c (tinfo_base_init): Don't set TREE_INVARIANT.
2303         (generic_initializer): Don't set TREE_INVARIANT.
2304         (ptr_initializer): Don't set TREE_INVARIANT.
2305         (ptm_initializer): Don't set TREE_INVARIANT.
2306         (class_initializer): Don't set TREE_INVARIANT.
2307         * typeck2.c (process_init_constructor): Don't set TREE_INVARIANT.
2308         * pt.c (push_inline_template_parms_recursive): Don't set TREE_INVARIANT.
2309         (build_template_parm_index): Don't set TREE_INVARIANT.
2310         (reduce_template_parm_level): Don't set TREE_INVARIANT.
2311         (process_template_parm): Don't set TREE_INVARIANT.
2312
2313 2008-04-22  Jason Merrill  <jason@redhat.com>
2314
2315         PR c++/35316
2316         * semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
2317         to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
2318         * typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
2319
2320 2008-04-22  Jakub Jelinek  <jakub@redhat.com>
2321
2322         PR c++/35747
2323         * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
2324         expression is errorneous.
2325
2326 2008-04-21  Jason Merrill  <jason@redhat.com>
2327
2328         PR c++/35325
2329         * tree.c (cp_tree_equal): Handle FIXED_CST.
2330
2331         PR c++/35678
2332         * pt.c (template_template_parm_bindings_ok_p): Set
2333         processing_template_decl while in this function.
2334
2335 2008-04-18  Kris Van Hees <kris.van.hees@oracle.com>
2336
2337         * cvt.c (type_promotes_to): Support char16_t and char32_t.
2338         * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
2339         char16_t and char32_t.
2340         * lex.c (reswords): Add char16_t and char32_t (for c++0x).
2341         * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
2342         extended builtin type "u8char{16,32}_t".
2343         * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
2344         RID_CHAR{16,32}.
2345         (cp_lexer_print_token): Support CPP_STRING{16,32}.
2346         (cp_parser_is_string_literal): Idem.
2347         (cp_parser_string_literal): Idem.
2348         (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
2349         CPP_STRING{16,32}.
2350         (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}.
2351         * tree.c (char_type_p): Support char16_t and char32_t as char types.
2352         * typeck.c (string_conv_p): Support char16_t and char32_t.
2353
2354 2008-04-17  Jason Merrill  <jason@redhat.com>
2355
2356         PR c++/35773
2357         * call.c (build_user_type_conversion_1): Represent second step of
2358         copy-init with an rvalue conversion.
2359         (convert_like_real) [ck_user]: Don't implicitly add it here.
2360
2361 2008-04-15  Jakub Jelinek  <jakub@redhat.com>
2362
2363         PR c/35751
2364         * decl.c (layout_var_decl): If extern or static var has variable
2365         size, set TREE_TYPE (decl) to error_mark_node.
2366
2367 2008-04-16  Danny Smith  <dannysmith@users.sourceforge.net>
2368
2369         PR target/35921
2370         * optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
2371         to clone.
2372
2373 2008-04-09  Jason Merrill  <jason@redhat.com>
2374
2375         PR c++/35708
2376         * semantics.c (finish_compound_literal): Return a TARGET_EXPR,
2377         not a pushed variable.
2378
2379 2008-04-09  Volker Reichelt  <v.reichelt@netcologne.de>
2380
2381         * call.c (build_op_delete_call): Fix quotation in warning message.
2382         * decl.c (grokdeclarator): Quote keyword in error message.
2383         * pt.c (check_for_bare_parameter_packs): Fix quotation in error
2384         message.
2385
2386         * parser.c (cp_parser_check_type_definition): Print error string
2387         directly rather than using "%s".
2388         (cp_parser_postfix_expression): Fix quotation.
2389         (cp_parser_decltype): Likewise.
2390         (cp_parser_sizeof_operand): Fix quotation. Simplify.
2391
2392         * parser.c (cp_parser_non_integral_constant_expression): Build error
2393         message with CONCAT rather than using "%s".
2394         (cp_parser_primary_expression): Fix quotation.
2395         (cp_parser_postfix_expression): Likewise.
2396         (cp_parser_postfix_dot_deref_expression): Likewise.
2397         (cp_parser_unary_expression): Likewise.
2398         (cp_parser_new_expression): Likewise.
2399         (cp_parser_delete_expression): Likewise.
2400
2401         * parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
2402         as `)', not as `('.  Fix quotation.
2403         (cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
2404         (cp_parser_primary_expression): Likewise.
2405         (cp_parser_nested_name_specifier_opt): Likewise.
2406         (cp_parser_postfix_expression): Likewise.
2407         (cp_parser_postfix_open_square_expression): Likewise.
2408         (cp_parser_parenthesized_expression_list): Likewise.
2409         (cp_parser_pseudo_destructor_name): Likewise.
2410         (cp_parser_new_expression): Likewise.
2411         (cp_parser_direct_new_declarator): Likewise.
2412         (cp_parser_delete_expression): Likewise.
2413         (cp_parser_cast_expression): Likewise.
2414         (cp_parser_question_colon_clause): Likewise.
2415         (cp_parser_builtin_offsetof): Likewise.
2416         (cp_parser_trait_expr): Likewise.
2417         (cp_parser_label_for_labeled_statement): Likewise.
2418         (cp_parser_compound_statement): Likewise.
2419         (cp_parser_selection_statement): Likewise.
2420         (cp_parser_condition): Likewise.
2421         (cp_parser_iteration_statement): Likewise.
2422         (cp_parser_already_scoped_statement): Likewise.
2423         (cp_parser_simple_declaration): Likewise.
2424         (cp_parser_linkage_specification): Likewise.
2425         (cp_parser_static_assert): Likewise.
2426         (cp_parser_decltype): Likewise.
2427         (cp_parser_conversion_function_id): Likewise.
2428         (cp_parser_operator_function_id): Likewise.
2429         (cp_parser_operator): Likewise.
2430         (cp_parser_type_parameter): Likewise.
2431         (cp_parser_template_id): Likewise.
2432         (cp_parser_explicit_instantiation): Likewise.
2433         (cp_parser_explicit_specialization): Likewise.
2434         (cp_parser_enum_specifier): Likewise.
2435         (cp_parser_namespace_definition): Likewise.
2436         (cp_parser_namespace_alias_definition): Likewise.
2437         (cp_parser_using_declaration): Likewise.
2438         (cp_parser_using_directive): Likewise.
2439         (cp_parser_asm_definition): Likewise.
2440         (cp_parser_direct_declarator): Likewise.
2441         (cp_parser_ptr_operator): Likewise.
2442         (cp_parser_parameter_declaration_clause): Likewise.
2443         (cp_parser_initializer_clause): Likewise.
2444         (cp_parser_class_specifier): Likewise.
2445         (cp_parser_member_specification_opt): Likewise.
2446         (cp_parser_member_declaration): Likewise.
2447         (cp_parser_pure_specifier): Likewise.
2448         (cp_parser_constant_initializer): Likewise.
2449         (cp_parser_base_clause): Likewise.
2450         (cp_parser_exception_specification_opt): Likewise.
2451         (cp_parser_try_block): Likewise.
2452         (cp_parser_function_try_block): Likewise.
2453         (cp_parser_handler): Likewise.
2454         (cp_parser_throw_expression): Likewise.
2455         (cp_parser_asm_operand_list): Likewise.
2456         (cp_parser_attributes_opt): Likewise.
2457         (cp_parser_label_declaration): Likewise.
2458         (cp_parser_constructor_declarator_p): Likewise.
2459         (cp_parser_template_declaration_after_export): Likewise.
2460         (cp_parser_single_declaration): Likewise.
2461         (cp_parser_objc_message_expression): Likewise.
2462         (cp_parser_objc_message_args): Likewise.
2463         (cp_parser_objc_encode_expression): Likewise.
2464         (cp_parser_objc_defs_expression): Likewise.
2465         (cp_parser_objc_protocol_expression): Likewise.
2466         (cp_parser_objc_selector_expression): Likewise.
2467         (cp_parser_objc_protocol_refs_opt): Likewise.
2468         (cp_parser_objc_typename): Likewise.
2469         (cp_parser_objc_method_keyword_params): Likewise.
2470         (cp_parser_objc_superclass_or_category): Likewise.
2471         (cp_parser_objc_try_catch_finally_statement): Likewise.
2472         (cp_parser_objc_synchronized_statement): Likewise.
2473         (cp_parser_objc_throw_statement): Likewise.
2474         (cp_parser_omp_var_list_no_open): Likewise.
2475         (cp_parser_omp_clause_default): Likewise.
2476         (cp_parser_omp_clause_if): Likewise.
2477         (cp_parser_omp_clause_num_threads): Likewise.
2478         (cp_parser_omp_clause_reduction): Likewise.
2479         (cp_parser_omp_clause_schedule): Likewise.
2480         (cp_parser_omp_critical): Likewise.
2481         (cp_parser_omp_for_loop): Likewise.
2482         (cp_parser_omp_sections_scope): Likewise.
2483
2484         * parser.c (cp_parser_template_parameter_list): Simplify.
2485
2486 2008-04-07  James E. Wilson  <wilson@tuliptree.org>
2487
2488         * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
2489
2490 2008-04-07  Jason Merrill  <jason@redhat.com>
2491
2492         PR c++/35734
2493         * class.c (type_has_user_nondefault_constructor): A template
2494         counts as a nondefault constructor.
2495
2496 2008-04-04  Paolo Bonzini  <bonzini@gnu.org>
2497
2498         * decl.c (cxx_push_function_context): Delete.
2499         (cxx_pop_function_context): Delete.
2500         (start_preparsed_function): Merge cxx_push_function_context (!f->decl
2501         code only).
2502         * cp-objcp-common.h (LANG_HOOKS_FUNCTION_INIT,
2503         LANG_HOOKS_FUNCTION_FINAL): Delete.
2504         (LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): Rename to
2505         LANG_HOOKS_MISSING_NORETURN_OK_P.
2506         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context):
2507         Delete prototype.
2508         * semantics.c (current_stmt_tree): Fix comment.
2509
2510 2008-04-03  Jakub Jelinek  <jakub@redhat.com>
2511
2512         PR c++/35741
2513         * semantics.c (finish_offsetof): Undo effect of convert_from_reference
2514         before calling fold_offsetof.
2515
2516 2008-04-03  Tom Tromey  <tromey@redhat.com>
2517
2518         * Make-lang.in (c++_OBJS): New variable.
2519
2520 2008-04-03  Paolo Bonzini  <bonzini@gnu.org>
2521
2522         * optimize.c (clone_body): New, from tree-inline.c.
2523
2524 2008-04-03  Paolo Bonzini  <bonzini@gnu.org>
2525
2526          * method.c (synthesize_method): Use {push,pop}_function_context.
2527          * name-lookup.c (push_to_top_level): Likewise.
2528          * parser.c (cp_parser_late_parsing_for_member): Likewise.
2529
2530 2008-03-30  Volker Reichelt  <v.reichelt@netcologne.de>
2531
2532         PR c++/35578
2533         * parser.c (cp_parser_decl_specifier_seq): Add location to error
2534         message.
2535
2536 2008-03-27  Tom Tromey  <tromey@redhat.com>
2537
2538         * Make-lang.in: Revert automatic dependency patch.
2539
2540 2008-03-27  Douglas Gregor  <doug.gregor@gmail.com>
2541
2542         PR obj-c++/35704
2543         * typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
2544         (build_compound_expr): New, for compatibility with C
2545         build_compound_expr.
2546         (cp_build_compound_expr): Renamed from build_compound_expr.
2547         (build_c_cast): New, for compatibility with C build_c_cast.
2548         (cp_build_c_cast): Renamed from build_c_cast.
2549         * init.c (build_vec_delete_1): Fix calls to build_compound_expr.
2550         * decl.c (cxx_maybe_build_cleanup): Ditto.
2551         * cp-tree.h (build_compound_expr): Add C-compatibile prototype.
2552         (cp_build_compound_expr): Renamed from build_compound_expr.
2553         (build_c_cast): Add C-compatible prototype.
2554         (cp_build_c_cast): Renamed from build_c_cast.
2555         * typeck2.c (build_functional_cast): Use cp_build_c_cast.
2556         * parser.c (cp_parser_cast_expression): Fix call to build_c_cast.
2557
2558 2008-03-27  Douglas Gregor  <doug.gregor@gmail.com>
2559
2560         * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Cope with
2561         tsubst_pack_expansion returning a pack expansion, or a TREE_VEC
2562         ending in a pack expansion, both of which can occur when
2563         substituting into a nested template.
2564         (tsubst_copy_and_build) <case SIZEOF_EXPR>: When we're
2565         instantiating the sizeof...(X) form, make tsubst_copy do the work.
2566         * parser.c (cp_parser_template_parameter): Deal with unnamed
2567         non-type template parameter packs identified by pack expansions in
2568         the parameter type.
2569
2570 2008-03-26  Jakub Jelinek  <jakub@redhat.com>
2571
2572         PR c++/35546
2573         * pt.c (apply_late_template_attributes): Don't call tsubst on
2574         first attribute argument if it is IDENTIFIER_NODE.
2575
2576         PR c++/35332
2577         * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
2578         and LTGT_EXPR to pp_expression.
2579
2580 2008-03-26  Douglas Gregor  <doug.gregor@gmail.com>
2581
2582         * pt.c (coerce_template_template_parm): Moved the body of the loop
2583         of coerce_template_template_parms here, to make iteration over a
2584         template argument pack simpler.
2585         Also, allow matching of a template parameter pack in the template
2586         template parameter to a template parameter in the template
2587         template argument.
2588         (coerce_template_template_parms): Deal with variadic template
2589         template parameters. Use coerce_template_template_parm.
2590         (unify): Make sure we coerce the template template argument's
2591         template arguments to the template template parameter's template
2592         parameters, not the other way around.
2593
2594 2008-03-25  Tom Tromey  <tromey@redhat.com>
2595
2596         * Make-lang.in: Remove .o targets.
2597         (cp/g++spec.o): Moved to cp/.  Reduce to variable setting.
2598         (GXX_OBJS): Update.
2599         (c++_OBJS): New variable.
2600         (CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
2601
2602 2008-03-25  Douglas Gregor  <doug.gregor@gmail.com>
2603
2604         * typeck.c (composite_pointer_type_r): Add SFINAE support.
2605         (composite_pointer_type): Ditto.
2606         (common_type): Fix call to composite_pointer_type.
2607         (cxx_sizeof_nowarn): New; used to be a macro.
2608         (cxx_sizeof_expr): Add SFINAE support.
2609         (cxx_alignof_expr): Ditto.
2610         (decay_conversion): Fix calls for SFINAE support.
2611         (rationalize_conditional_expr): Add SFINAE support.
2612         (build_class_member_access_expr): Ditto.
2613         (finish_class_member_access_expr): Ditto.
2614         (build_x_indirect_ref): Ditto.
2615         (build_indirect_ref): Original version renamed to
2616         cp_build_indirect_ref; new version provides a bridge from
2617         c-common.
2618         (cp_build_indirect_ref): Was build_indirect_ref; added SFINAE
2619         support.
2620         (get_member_function_from_ptrfunc): Fix calls for SFINAE support.
2621         (build_function_call): Original version renamed to
2622         cp_build_function_call; new version provides a bridge from
2623         c-common.
2624         (cp_build_function_call): Was build_function_call; added SFINAE
2625         support.
2626         (convert_arguments): Add SFINAE support.
2627         (build_x_binary_op): Ditto.
2628         (build_binary_op): Original version renamed to cp_build_binary_op;
2629         new version provides a bridge from c-common.
2630         (cp_build_binary_op): Was build_binary_op; added SFINAE support.
2631         (pointer_diff): Fix calls for SFINAE.
2632         (build_x_unary_op): Add SFINAE support.
2633         (condition_conversion): Fix calls for SFINAE.
2634         (build_unary_op): Original version renamed to cp_build_unary_op;
2635         new version provides a bridge from c-common.
2636         (cp_build_unary_op): Was build_unary_op; added SFINAE support.
2637         (unary_complex_lvalue): Fix calls for SFINAE.
2638         (build_x_conditional_expr): Add SFINAE support.
2639         (build_x_compound_expr_from_list): Fix calls for SFINAE.
2640         (build_x_compound_expr): Add SFINAE support.
2641         (convert_ptrmem): Fix calls for SFINAE.
2642         (build_static_cast_1): Add SFINAE support.
2643         (build_static_cast): Ditto.
2644         (build_reinterpret_cast_1): Ditto.
2645         (build_reinterpret_cast): Ditto.
2646         (build_const_cast_1): Ditto.
2647         (build_const_cast): Ditto.
2648         (build_c_cast): Ditto.
2649         (build_modify_expr): Original version renamed to
2650         cp_build_modify_expr; new version provides a bridge from c-common.
2651         (cp_build_modify_expr): Was build_modify_expr; added SFINAE
2652         support.
2653         (build_x_modify_expr): Add SFINAE support.
2654         (build_ptrmemfunc): Fix calls for SFINAE.
2655         (convert_for_assignment): Add SFINAE support.
2656         (convert_for_initialization): Ditto.
2657         (check_return_expr): Fix calls for SFINAE.
2658         (lvalue_or_else): Add SFINAE support.
2659         * init.c (perform_member_init): Fix calls for SFINAE.
2660         (emit_mem_initializers): Ditto.
2661         (expand_virtual_init): Ditto.
2662         (expand_cleanup_for_base): Ditto.
2663         (build_aggr_init): Add SFINAE support.
2664         (expand_default_init): Ditto.
2665         (expand_aggr_init_1): Fix calls for SFINAE.
2666         (build_offset_ref): Ditto.
2667         (build_new_1): Add SFINAE support.
2668         (build_new): Ditto.
2669         (build_vec_delete_1): Fix calls for SFINAE.
2670         (get_temp_regvar): Ditto.
2671         (build_vec_init): Add SFINAE support.
2672         (build_dtor_call): Fix calls for SFINAE.
2673         (build_delete): Ditto.
2674         (push_base_cleanups): Ditto.
2675         (build_vec_delete_1): Ditto.
2676         * class.c (build_base_path): Fix calls for SFINAE.
2677         (build_simple_base_path): Ditto.
2678         (convert_to_base_statically): Ditto.
2679         (build_vfn_ref): Ditto.
2680         (resolve_address_of_overloaded_function): Ditto.
2681         * decl.c (check_initializer): Fix calls for SFINAE.
2682         (register_dtor_fn): Ditto.
2683         (compute_array_index_type): Ditto.
2684         (finish_enum): Ditto.
2685         (start_preparsed_function): Ditto.
2686         (cxx_maybe_build_cleanup): Ditto.
2687         * call.c (convert_like): Add COMPLAIN argument.
2688         (convert_like_with_context): Ditto.
2689         (build_this): Fix calls for SFINAE.
2690         (build_user_type_conversion): Ditto.
2691         (resolve_args): Ditto.
2692         (build_new_function_call): Add SFINAE support.
2693         (build_operator_new_call): Fix calls for SFINAE.
2694         (build_object_call): Add SFINAE support.
2695         (build_conditional_expr): Ditto.
2696         (build_new_op): Ditto.
2697         (build_op_delete_call): Fix calls for SFINAE.
2698         (build_temp): Ditto.
2699         (convert_like_real): Add SFINAE support.
2700         (build_x_va_arg): Fix calls for SFINAE.
2701         (convert_default_arg): Ditto.
2702         (build_over_call): Add SFINAE support.
2703         (build_java_interface_fn_ref): Fix calls for SFINAE.
2704         (build_special_member_call): Add SFINAE support.
2705         (build_new_method_call): Ditto.
2706         (perform_implicit_conversion): Ditto.
2707         (perform_direct_initialization_if_possible): Ditto.
2708         (initialize_reference): Fix calls for SFINAE.
2709         * method.c (do_build_assign_ref): Fix calls for SFINAE.
2710         * rtti.c (build_headof): Fix calls for SFINAE.
2711         (get_tinfo_decl_dynamic): Ditto.
2712         (get_typeid): Ditto.
2713         (build_dynamic_cast_1): Add SFINAE support.
2714         (build_dynamic_cast): Ditto.
2715         (tinfo_base_init): Fix calls for SFINAE.
2716         * except.c (do_get_exception_ptr): Fix calls for SFINAE.
2717         (do_end_catch): Ditto.
2718         (initialize_handler_parm): Ditto.
2719         (expand_start_catch_block): Ditto.
2720         (do_allocate_exception): Ditto.
2721         (do_free_exception): Ditto.
2722         (build_throw): Ditto.
2723         * cvt.c (build_up_reference): Fix calls for SFINAE.
2724         (convert_to_reference): Ditto.
2725         (ocp_convert): Ditto.
2726         (convert_to_void): Add SFINAE support.
2727         * tree.c (build_dummy_object): Fix calls for SFINAE.
2728         (stabilize_expr): Ditto.
2729         * cp-tree.h (build_conditional_expr): Add tsubst_flags_t
2730         parameter.
2731         (build_new_method_call): Ditto.
2732         (build_special_member_call): Ditto.
2733         (build_new_op): Ditto.
2734         (perform_implicit_conversion): Ditto.
2735         (perform_direct_initialization_if_possible): Ditto.
2736         (convert_to_void): Ditto.
2737         (build_aggr_init): Ditto.
2738         (build_new): Ditto.
2739         (build_vec_init): Ditto.
2740         (build_dynamic_cast): Ditto.
2741         (finish_call_expr): Ditto
2742         (cxx_sizeof_or_alignof_expr): Add COMPLAIN parameter.
2743         (cxx_sizeof_nowarn): Remove macro; add function declaration.
2744         (build_class_member_access_expr): Add tsubst_flags_t parameter.
2745         (finish_class_member_access_expr): Ditto.
2746         (build_x_indirect_ref): Ditto.
2747         (cp_build_indirect_ref): New.
2748         (cp_build_function_call): Add tsubst_flags_t parameter.
2749         (build_x_unary_op): Ditto.
2750         (cp_build_unary_op): New.
2751         (build_x_conditional_expr): Add tsubst_flags_t parameter.
2752         (build_x_compound_expr): Ditto.
2753         (build_compound_expr): Ditto.
2754         (build_static_cast): Ditto.
2755         (build_reinterpret_cast): Ditto.
2756         (build_const_cast): Ditto.
2757         (build_c_cast): Ditto.
2758         (build_x_modify_expr): Ditto.
2759         (cp_build_modify_expr): New.
2760         (convert_for_initialization): Add tsubst_flags_t parameter.
2761         (cp_build_binary_op): Remove macro; add function declaration.
2762         (invalid_nonstatic_memfn_p): Add tsubst_flags_t parameter.
2763         (lvalue_or_else): Ditto.
2764         (build_functional_cast): Ditto.
2765         * typeck2.c (digest_init): Fix calls for SFINAE.
2766         (process_init_constructor_array): Ditto.
2767         (process_init_constructor_record): Ditto.
2768         (build_x_arrow): Ditto.
2769         (build_m_component_ref): Ditto.
2770         (build_functional_cast): Add SFINAE support.
2771         * pt.c (tsubst_copy_and_build): Add (more) SFINAE support.
2772         * semantics.c (simplify_loop_decl_cond): Fix calls for SFINAE.
2773         (finish_expr_stmt): Ditto.
2774         (finish_for_expr): Ditto.
2775         (finish_asm_stmt): Ditto.
2776         (finish_non_static_data_member): Ditto.
2777         (finish_qualified_id_expr): Ditto.
2778         (finish_call_expr): Add SFINAE support.
2779         (finish_increment_expr): Fix calls for SFINAE.
2780         (finish_unary_op_expr): Ditto.
2781         (simplify_aggr_init_expr): Ditto.
2782         (finish_omp_clauses): Ditto.
2783         (finish_omp_for): Ditto.
2784         (finish_omp_barrier): Ditto.
2785         (finish_omo_flush): Ditto.
2786         * decl2.c (grok_array_decl): Fix calls or SFINAE.
2787         (build_anon_union_vars): Ditto.
2788         (get_guard_cond): Ditto.
2789         (set_guard): Ditto.
2790         (one_static_initialization_or_destruction): Ditto.
2791         (do_static_initialization_or_destruction): Ditto.
2792         (generate_ctor_or_dtor_function): Ditto.
2793         (build_offset_ref_call_from_tree): Ditto.
2794         * parser.c (cp_parser_postfix_expression): Fix calls for SFINAE.
2795         (cp_parser_postfix_dot_deref_expression): Ditto.
2796         (cp_parser_unary_expression): Ditto.
2797         (cp_parser_new_expression): Ditto.
2798         (cp_parser_cast_expression): Ditto.
2799         (cp_parser_binary_expression): Ditto.
2800         (cp_parser_question_colon_clause): Ditto.
2801         (cp_parser_assignment_expression): Ditto.
2802         (cp_parser_expression): Ditto.
2803         (cp_parser_builtin_offsetof): Ditto.
2804         (cp_parser_template_argument): Ditto.
2805         (cp_parser_functional_cast): Ditto.
2806
2807 2008-03-24  Tom Tromey  <tromey@redhat.com>
2808
2809         * lex.c (handle_pragma_interface): Don't copy the filename.
2810         (handle_pragma_implementation): Copy filename using xstrdup.
2811
2812 2008-03-21  Paolo Carlini  <pcarlini@suse.de>
2813
2814         * cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
2815         (SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
2816         (IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
2817         (PROMOTES_TO_AGGR_TYPE): Remove.
2818         (CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
2819         * typeck.c (unary_complex_lvalue, build_modify_expr,
2820         convert_for_initialization): Adjust.
2821         * init.c (is_aggr_type): Remove.
2822         (is_class_type): Add.
2823         (build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
2824         build_delete): Adjust.
2825         * lex.c (make_aggr_type): Remove.
2826         (make_class_type): Add.
2827         (cxx_make_type): Adjust.
2828         * class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
2829         Adjust.
2830         * decl.c (build_typename_type, make_typename_type,
2831         make_unbound_class_template, cxx_init_decl_processing,
2832         check_tag_decl, groktypename, start_decl_1, layout_var_decl,
2833         check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
2834         grok_op_properties, xref_tag, check_function_type): Adjust.
2835         * call.c (check_dtor_name, standard_conversion, implicit_conversion,
2836         add_builtin_candidate, add_builtin_candidates,
2837         build_user_type_conversion_1, convert_like_real, build_cxx_call,
2838         is_subseq, compare_ics): Adjust.
2839         * method.c (use_thunk): Adjust.
2840         * rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
2841         create_tinfo_types): Adjust.
2842         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
2843         build_up_reference, convert_to_reference, convert_from_reference,
2844         ocp_convert, build_expr_type_conversion): Adjust.
2845         * tree.c (bind_template_template_parm, error_type): Adjust.
2846         * dump.c (cp_dump_tree): Adjust.
2847         * search.c (lookup_member): Adjust.
2848         * friend.c (make_friend_class, do_friend): Adjust.
2849         * typeck2.c (store_init_value, process_init_constructor_array,
2850         process_init_constructor_record, build_x_arrow, build_m_component_ref,
2851         build_functional_cast): Adjust.
2852         * pt.c (finish_member_template_decl, process_template_parm,
2853         lookup_template_class, tsubst_function_type, tsubst,
2854         tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
2855         Adjust.
2856         * semantics.c (begin_class_definition, finish_base_specifier,
2857         finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
2858         Adjust.
2859         * name-lookup.c (constructor_name_p, push_overloaded_decl,
2860         do_class_using_decl, lookup_qualified_name,
2861         maybe_process_template_type_declaration): Adjust.
2862         * decl2.c (grok_array_decl, check_member_template,
2863         constrain_class_visibility): Adjust.
2864         * parser.c (cp_parser_class_name): Adjust.
2865
2866 2008-03-18  Paolo Bonzini  <bonzini@gnu.org>
2867
2868          * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
2869
2870 2008-03-17  Jason Merrill  <jason@redhat.com>
2871
2872         PR c++/35548
2873         * call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
2874         a temp directly to a reference as per DR391.
2875
2876 2008-03-12  Richard Guenther  <rguenther@suse.de>
2877
2878         PR c++/35469
2879         Revert:
2880         2008-02-04  Richard Guenther  <rguenther@suse.de>
2881
2882          PR java/35035
2883          * decl.c (record_builtin_java_type): Make jboolean a
2884          integer type again where its mode doesn't match that of bool.
2885
2886         2008-01-25  Richard Guenther  <rguenther@suse.de>
2887
2888          PR c++/33887
2889          * decl.c (record_builtin_java_type): Make __java_boolean
2890          a variant of bool.
2891          * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
2892          after TYPE_MAIN_VARIANT check.
2893
2894 2008-03-10  Jakub Jelinek  <jakub@redhat.com>
2895
2896         PR c++/35328
2897         * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
2898         if errorcount.
2899
2900         PR c++/35337
2901         * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
2902         DECL_P in not a variable and appears more than once error messages.
2903
2904 2008-03-07  Paolo Bonzini  <bonzini@gnu.org>
2905
2906         Revert:
2907
2908         2008-02-06  Douglas Gregor  <doug.gregor@gmail.com>
2909
2910         PR c++/35049
2911         PR c++/35096
2912         * typeck.c (structural_comptypes): Call cp_comptypes.
2913         (comptypes): New; called from the C/C++ common bits to perform
2914         strict checks.
2915         (cp_comptypes): Renamed from comptypes, which is already used,
2916         with a different signature, by the C++ front end.
2917         (build_reinterpret_cast_1): Call cp_comptypes.
2918         (ptr_reasonably_similar): Ditto.
2919         * decl.c (decls_match): Ditto.
2920         * cvt.c (convert_to_reference): Ditto.
2921         * cp-tree.h (same_type_p): Ditto.
2922         (same_or_base_type_p): Ditto.
2923         (comptypes): Rename to cp_comptypes.
2924         * pt.c (canonical_type_parameter): Call cp_comptypes.
2925
2926 2008-03-07  Paolo Bonzini  <bonzini@gnu.org>
2927
2928         * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
2929         test for equivalence between pointer and references.
2930
2931 2008-03-02  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2932
2933         PR 24924
2934         * class.c (finish_struct_anon): Use permerror instead of pedwarn.
2935         (check_field_decls): Likewise.
2936         (note_name_declared_in_class): Likewise.
2937         * call.c (build_new_op): Likewise.
2938         (convert_like_real): Likewise.
2939         (build_over_call): Likewise.
2940         * lex.c (unqualified_fn_lookup_error): Likewise.
2941         * parser.c (cp_parser_template_id): Likewise.
2942         * cvt.c (warn_ref_binding): Likewise.
2943         (convert_to_reference): Likewise.
2944         (ocp_convert): Likewise.
2945         (convert_to_void): Use error instead of pedwarn.
2946         * error.c (cp_cpp_error): Use pedantic_warning_kind.
2947         * decl.c (compute_array_index_type): Use constant_expression_error.
2948
2949 2008-03-01  Douglas Gregor  <doug.gregor@gmail.com>
2950
2951         * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
2952         that auto is either a storage class or a simple type specifier,
2953         depending on the dialect.
2954         (cp_parser_decl_specifier_seq): Complain about `auto' as a storage
2955         specifier in C++98 mode, error in C++0x mode (since we don't
2956         support auto as a type specifier, yet).
2957         (cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
2958         storage specifier in C++0x mode.
2959         (cp_parser_simple_type_specifier): Parse `auto' as a
2960         simple-type-specifier, but error because we don't support it yet.
2961
2962 2008-02-29  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2963
2964         * parser.c (cp_parser_nonclass_name): New.
2965         (cp_parser_pseudo_destructor_name): Use it instead of
2966         cp_parser_type_name.
2967         (cp_parser_type_name): Move code to cp_parser_nonclass_name.
2968
2969 2008-02-29  Tom Tromey  <tromey@redhat.com>
2970
2971         * parser.c (struct cp_token) <input_file_stack_index>: Remove.
2972         (cp_lexer_get_preprocessor_token): Update.
2973         (cp_lexer_set_source_position_from_token): Don't call
2974         restore_input_file_stack.
2975         * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
2976
2977 2008-02-28  Richard Guenther  <rguenther@suse.de>
2978
2979         Revert:
2980         2008-02-26  Richard Guenther  <rguenther@suse.de>
2981
2982         * decl.c (duplicate_decls): Remove decl from global mapping
2983         before ggc_freeing it.
2984
2985 2008-02-27  Jakub Jelinek  <jakub@redhat.com>
2986
2987         PR c++/35368
2988         * rtti.c: Include c-pragma.h.
2989         (push_abi_namespace, pop_abi_namespace): New functions.
2990         (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
2991         create_tinfo_types, emit_support_tinfos): Use them.
2992         * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
2993
2994 2008-02-26  Jason Merrill  <jason@redhat.com>
2995
2996         PR c++/35315
2997         * decl.c (grokdeclarator): Allow a typedef of an unnamed struct
2998         to name the struct for linkage purposes even if it has attributes.
2999         (start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
3000
3001 2008-02-26  Tom Tromey  <tromey@redhat.com>
3002
3003         * parser.c (eof_token): Remove old location code.
3004         (check_empty_body): Remove test of USE_MAPPED_LOCATION.
3005         * decl2.c (generate_ctor_or_dtor_function): Remove old location
3006         code.
3007         (cp_write_global_declarations): Likewise.
3008         * lex.c (cxx_init): Remove old location code.
3009         (handle_pragma_implementation): Remove test of
3010         USE_MAPPED_LOCATION.
3011         * pt.c (tsubst): Remove old location code.
3012         * error.c (cp_print_error_function): Remove test of
3013         USE_MAPPED_LOCATION.
3014         * decl.c (pop_label): Remove old location code.
3015         (finish_function): Likewise.
3016
3017 2008-02-26  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3018
3019         PR 26264
3020         * call.c (magic_varargs_p):  Remove BUILT_IN_STDARG_START.
3021
3022 2008-02-26  Richard Guenther  <rguenther@suse.de>
3023
3024         * decl.c (duplicate_decls): Remove decl from global mapping
3025         before ggc_freeing it.
3026
3027 2008-02-26  Paolo Carlini  <pcarlini@suse.de>
3028
3029          PR c++/35323
3030          * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
3031
3032 2008-02-26  Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3033
3034         * typeck.c (build_class_member_access_expr): Add appropriate
3035         OPT_W* parameter to warning.
3036         (build_reinterpret_cast_1): Likewise.
3037         * name-lookup.c (push_overloaded_decl): Likewise.
3038
3039 2008-02-25  Paolo Carlini  <pcarlini@suse.de>
3040
3041          PR c++/35333
3042          * error.c (dump_expr): Handle CONJ_EXPR.
3043
3044 2008-02-25  Paolo Carlini  <pcarlini@suse.de>
3045
3046          PR c++/35338
3047          * error.c (dump_type): Handle FIXED_POINT_TYPE.
3048         (dump_expr): Handle FIXED_CST.
3049
3050 2008-02-24  Jason Merrill  <jason@redhat.com>
3051
3052         * parser.c (cp_parser_declaration): Handle "inline namespace".
3053         (cp_parser_namespace_definition): Likewise.
3054
3055         PR c++/33486
3056         * name-lookup.c (arg_assoc_namespace): Look down into inline
3057         namespaces, too.
3058
3059 2008-02-23  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3060
3061         * typeck.c (check_for_casting_away_constness): Use 1 single
3062         argument, the type of cast, to decide what diagnostics generate.
3063         (build_static_cast_1): Remove unused code. Update call to
3064         check_for_casting_away_constness.
3065         (build_reinterpret_cast_1): Update call to
3066         check_for_casting_away_constness.
3067         (build_const_cast_1): Likewise.
3068
3069 2008-02-24  Paolo Carlini  <pcarlini@suse.de>
3070
3071         * error.c (dump_expr): Don't deal directly with NEW_EXPR (and
3072         VEC_NEW_EXPR), forward to pp_expression.
3073         * cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
3074
3075 2008-02-24  Danny Smith  <dannysmith@users.sourceforge.net>
3076
3077         PR c++/34749
3078         * friend.c (do_friend): Call cplus_decl_attributes earlier.
3079
3080 2008-02-22  Andrew Pinski  <andrew_pinski@playstation.sony.com>
3081
3082         PR C++/34715
3083         * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
3084         template decls' function decl.
3085
3086 2008-02-22  Paolo Carlini  <pcarlini@suse.de>
3087
3088         PR c++/35282
3089         Revert:
3090         2008-02-14  Paolo Carlini  <pcarlini@suse.de>
3091
3092          PR c++/28743
3093          * pt.c (determine_specialization): In case of function templates,
3094         when the type of DECL does not match FN there is no match.
3095
3096 2008-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3097
3098         PR c/19999
3099         * typeck.c (build_binary_op): Warn about floating point
3100         comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
3101
3102 2008-02-19  Jason Merrill  <jason@redhat.com>
3103
3104         PR c++/34950
3105         * pt.c (resolve_overloaded_unification): Set processing_template_decl
3106         while we look for possible bindings.
3107
3108 2008-02-19  Jakub Jelinek  <jakub@redhat.com>
3109
3110         PR c++/35028
3111         * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
3112
3113         PR c++/34964
3114         PR c++/35244
3115         * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
3116         vars.  Afterwards ensure v is VAR_DECL.
3117
3118         PR c++/35078
3119         * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
3120         call cp_finish_decl.
3121         * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
3122         early.
3123
3124 2008-02-15  Douglas Gregor  <doug.gregor@gmail.com>
3125
3126         PR c++/35023
3127         PR c++/35024
3128         PR c++/35026
3129         * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
3130         is error_mark_node, return an error early.
3131         (find_parameter_packs_r): Pass the pointer set along to recursive
3132         calls of cp_walk_subtrees; don't try to manage the pointer set
3133         ourselves.
3134         (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
3135         (make_pack_expansion): Ditto.
3136         (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
3137         a second pass through the tree with find_parameter_packs_r; that
3138         second pass no longer does anything.
3139         (push_template_decl_real): If we have an erroneous declaration,
3140         set its type to error_mark_node before returning an error.
3141
3142 2008-02-14  Douglas Gregor  <doug.gregor@gmail.com>
3143
3144         PR c++/34050
3145         * pt.c (tsubst_initializer_list): Deal with the use of
3146         VOID_TYPE_NODE to indicate value-initialization of the bases.
3147
3148 2008-02-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3149             Jason Merrill  <jason@redhat.com>
3150
3151         PR c++/5645
3152         PR c++/11159
3153         * class.c (type_has_user_nondefault_constructor): New fn.
3154         * cp-tree.h: Declare it.
3155         * init.c (emit_mem_initializers): Use it for -W warning about
3156         missing base initializer.
3157
3158 2008-02-14  Paolo Carlini  <pcarlini@suse.de>
3159
3160          PR c++/28743
3161          * pt.c (determine_specialization): In case of function templates,
3162         when the type of DECL does not match FN there is no match.
3163
3164 2008-02-13  Jakub Jelinek  <jakub@redhat.com>
3165             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3166
3167         PR c++/35138
3168         * parser.c (cp_parser_pseudo_destructor_name): If next tokens
3169         are not identifier :: ~, return before calling cp_parser_type_name.
3170
3171 2008-02-13  Jason Merrill  <jason@redhat.com>
3172
3173         PR c++/34962, c++/34937, c++/34939
3174         * decl2.c (is_late_template_attribute): Always defer attributes
3175         vector_size and weak.
3176
3177         PR c++/34774
3178         * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
3179         of enumerators, too.
3180
3181 2008-02-12  Jason Merrill  <jason@redhat.com>
3182
3183         PR c++/34824
3184         * call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
3185         if we're doing conversions to call a user-defined conversion function.
3186
3187 2008-02-12  Steven Bosscher  <steven@gcc.gnu.org>
3188
3189         PR c++/29048
3190         * semantics.c (finish_qualified_id_expr): Avoid duplicate access
3191         check here, too.
3192
3193 2008-02-12  Jakub Jelinek  <jakub@redhat.com>
3194
3195         PR c++/34862
3196         * init.c (build_new_1): Don't create placement_expr before
3197         constructing alloc_call.  Verify that the pointer is passed by
3198         value to operator new.
3199
3200 2008-02-11  Jason Merrill  <jason@redhat.com>
3201
3202         PR c++/35097
3203         * pt.c (tsubst): Don't look up a template typedef in an explicit
3204         specialization.
3205
3206 2008-02-11  Douglas Gregor  <doug.gregor@gmail.com>
3207
3208         PR c++/35113
3209         * tree.c (cp_build_qualified_type_real): When building a
3210         cv-qualified array type, build it as a unique type with
3211         build_cplus_array_type_1 and then adopt the unqualified type's
3212         main variant.
3213
3214 2008-02-11  Paolo Carlini  <pcarlini@suse.de>
3215
3216         PR c++/35077
3217         * decl.c (groktypename): Check grokdeclarator return.
3218
3219 2008-02-10  Jason Merrill  <jason@redhat.com>
3220
3221         PR c++/34094
3222         * decl2.c (cp_write_global_declarations): Don't write out static
3223         data members with DECL_IN_AGGR_P set.
3224
3225 2008-02-08  Jason Merrill  <jason@redhat.com>
3226
3227         PR c++/35116
3228         * tree.c (build_target_expr_with_type): Handle void initializer.
3229         (bot_manip): Remap slot before recursing.
3230
3231 2008-02-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3232
3233         PR other/35107
3234         * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
3235
3236 2008-02-06  Alexandre Oliva  <aoliva@redhat.com>
3237
3238         PR c++/35056
3239         * tree.c: Include tree-flow.h.
3240         (build_target_expr): Check type compatibility.
3241         * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
3242         * call.c (convert_like_real): Convert bitfield to expected type.
3243
3244 2008-02-06  Douglas Gregor  <doug.gregor@gmail.com>
3245
3246         PR c++/35049
3247         PR c++/35096
3248         * typeck.c (structural_comptypes): Call cp_comptypes.
3249         (comptypes): New; called from the C/C++ common bits to perform
3250         strict checks.
3251         (cp_comptypes): Renamed from comptypes, which is already used,
3252         with a different signature, by the C++ front end.
3253         (build_reinterpret_cast_1): Call cp_comptypes.
3254         (ptr_reasonably_similar): Ditto.
3255         * decl.c (decls_match): Ditto.
3256         * cvt.c (convert_to_reference): Ditto.
3257         * cp-tree.h (same_type_p): Ditto.
3258         (same_or_base_type_p): Ditto.
3259         (comptypes): Rename to cp_comptypes.
3260         * pt.c (canonical_type_parameter): Call cp_comptypes.
3261
3262 2008-02-05  Jakub Jelinek  <jakub@redhat.com>
3263
3264         PR c++/33553
3265         * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
3266         value dependent expression.
3267
3268 2008-02-05  Douglas Gregor  <doug.gregor@gmail.com>
3269
3270         PR c++/35074
3271         * decl2.c (save_template_attributes): When we're modifying the
3272         TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
3273         all of the other variants to add those same attributes. Otherwise,
3274         the main variant will be inconsistent with those other variants.
3275
3276 2008-02-04  Richard Guenther  <rguenther@suse.de>
3277
3278         PR java/35035
3279         * decl.c (record_builtin_java_type): Make jboolean a
3280         integer type again where its mode doesn't match that of bool.
3281
3282 2008-02-02  Jason Merrill  <jason@redhat.com>
3283             Mark Mitchell  <mark@codesourcery.com>
3284
3285         PR c++/33916
3286         * init.c (build_value_init_1): New function.
3287         (build_value_init): New function.
3288         * typeck2.c (build_functional_cast): Call it.
3289         * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
3290
3291         * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
3292         TYPE_HAS_CONSTRUCTOR.
3293         * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
3294         add_implicitly_declared_members): Adjust.
3295         (check_field_decls): Adjust. Remove warnings about reference/const
3296         in class without constructor.
3297         (check_bases_and_members): Adjust.  Give those warnings here instead.
3298         * decl.c (fixup_anonymous_aggr): Adjust.
3299         (check_initializer): Adjust, clarify logic slightly.
3300         (grok_special_member_properties): Adjust, only set if user-provided.
3301         * rtti.c (create_tinfo_types): Don't set.
3302         * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
3303         Use same_type_ignoring_top_level_qualifiers_p.
3304         * pt.c (check_explicit_specialization): Adjust.
3305         (instantiate_class_template): Adjust.
3306
3307 2008-01-31  Douglas Gregor  <doug.gregor@gmail.com>
3308             Jakub Jelinek  <jakub@redhat.com>
3309
3310         PR c++/34935
3311         PR c++/34936
3312         * typeck.c (structural_comptypes): Handle comparisons of
3313         VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
3314         REAL_TYPE nodes.
3315         * mangle.c (write_builtin_type): Map down to the canonical type,
3316         which will be one of the predefined type nodes.
3317
3318 2008-01-29  Michael Meissner  <michael.meissner@amd.com>
3319
3320         PR 35004
3321         * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
3322         bits to allow for expansion of the number of middle end tree
3323         codes.
3324
3325 2008-01-29  Douglas Gregor  <doug.gregor@gmail.com>
3326
3327         PR c++/34055
3328         PR c++/34103
3329         PR c++/34219
3330         PR c++/34606
3331         PR c++/34753
3332         PR c++/34754
3333         PR c++/34755
3334         PR c++/34919
3335         PR c++/34961
3336         * typeck.c (check_return_expr): Tweak call to
3337         check_for_bare_parameter_packs.
3338         * class.c (add_method): Be careful with error_mark_nodes.
3339         * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
3340         signature.
3341         * pt.c (struct find_parameter_pack_data): Remove
3342         SET_PACKS_TO_ERROR.
3343         (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
3344         (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
3345         (make_pack_expansion): Ditto.
3346         (check_for_bare_parameter_packs): Parameter is now a tree, not a
3347         tree*.
3348         (process_template_parm): Tweak call to
3349         check_for_bare_parameter_packs.
3350         (push_template_decl_real): Tweak calls to
3351         check_for_bare_parameter_packs. If bare parameter packs are found
3352         in the list of exceptions, clear out that list after giving an
3353         error.
3354         * semantics.c (finish_cond): Tweak call to
3355         check_for_bare_parameter_packs.
3356         (finish_expr_stmt): Ditto.
3357         (finish_for_expr): Ditto.
3358         (finish_switch_cond): Ditto.
3359         (finish_mem_initializers): Ditto.
3360         (finish_member_declaration): Ditto.
3361         (finish_static_assert): Check for bare parameter packs in the
3362         condition.
3363         * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
3364         attributes of a declaration.
3365         * parser.c (cp_parser_using_declaration): Tweak call to
3366         check_for_bare_parameter_packs.
3367         (cp_parser_base_clause): Ditto.
3368
3369 2008-01-28  Jason Merrill  <jason@redhat.com>
3370
3371         PR c++/35007
3372         * class.c (build_base_path): Fix !want_pointer case.
3373
3374 2008-01-27  Jason Merrill  <jason@redhat.com>
3375
3376         PR c++/27177
3377         * class.c (build_base_path): Fix previous change.
3378
3379 2008-01-26  Jakub Jelinek  <jakub@redhat.com>
3380
3381         PR c++/34965
3382         * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
3383         and TRUTH_XOR_EXPR.
3384
3385 2008-01-26  Richard Guenther  <rguenther@suse.de>
3386
3387         PR c++/34235
3388         * typeck.c (build_binary_op): Remove code to shorten compares.
3389
3390 2008-01-25  Richard Guenther  <rguenther@suse.de>
3391
3392         PR c++/33887
3393         * decl.c (record_builtin_java_type): Make __java_boolean
3394         a variant of bool.
3395         * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
3396         after TYPE_MAIN_VARIANT check.
3397
3398 2008-01-25  Jason Merrill  <jason@redhat.com>
3399
3400         PR c++/27177
3401         * class.c (build_base_path): Don't mess with virtual access if
3402         skip_evaluation.
3403         * call.c (standard_conversion): Don't check whether source type
3404         is complete.
3405
3406         * decl2.c (is_late_template_attribute): Don't defer attribute
3407         visibility just because the type is dependent.
3408
3409 2008-01-25  Jason Merrill  <jason@redhat.com>
3410             Mark Mitchell  <mark@codesourcery.com>
3411
3412         PR c++/31780
3413         * call.c (standard_conversion): Allow conversion from integer/real
3414         to complex.
3415         (compare_ics): Such a conversion is worse than a normal arithmetic
3416         conversion.
3417
3418 2008-01-25  Richard Guenther  <rguenther@suse.de>
3419
3420         PR c++/33887
3421         * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
3422         to true.
3423
3424 2008-01-24  Paolo Carlini  <pcarlini@suse.de>
3425
3426          PR c++/34603
3427          * pt.c (push_template_decl_real): Return error_mark_node in case
3428         of template definition of non-template.
3429
3430 2008-01-24  Jason Merrill  <jason@redhat.com>
3431
3432         PR c++/34913
3433         * decl2.c (is_late_template_attribute): Defer any attribute with
3434         dependent args.  Also defer type attributes if the type is dependent.
3435
3436 2008-01-22  Jakub Jelinek  <jakub@redhat.com>
3437             Alexandre Oliva  <aoliva@redhat.com>
3438
3439         PR c++/33984
3440         * call.c (reference_binding): For bitfields use the declared bitfield
3441         type.
3442         (add_builtin_candidates): Likewise.
3443         * class.c (layout_class_type): For bitfields copy over the
3444         original type quals.
3445
3446 2008-01-22  Jason Merrill  <jason@redhat.com>
3447
3448         PR c++/28560
3449         * decl.c (groktypename): Also ignore attributes on dependent
3450         possibly-class types.
3451
3452         PR c++/34912
3453         * friend.c (do_friend): Check for prior declaration of a friend
3454         function of a local class.
3455         * name-lookup.c (lookup_name_innermost_nonclass_level):
3456         No longer static.
3457         * name-lookup.h: Declare it.
3458
3459 2008-01-22  Tom Tromey  <tromey@redhat.com>
3460
3461         PR c++/34829:
3462         * init.c (build_new_1): Only disallow Java aggregates.
3463
3464 2008-01-22  Jakub Jelinek  <jakub@redhat.com>
3465
3466         PR c++/34607
3467         * semantics.c (finish_omp_for): Don't call c_finish_omp_for
3468         if decl or init is error_mark_node.
3469
3470         PR c++/34918
3471         * error.c (dump_expr): Handle VECTOR_CST.
3472
3473 2008-01-21  Jason Merrill  <jason@redhat.com>
3474
3475         PR c++/33959
3476         * pt.c (tsubst_aggr_type): Make sure our context is complete.
3477
3478         PR c++/34573
3479         * pt.c (retrieve_local_specialization): Robustify.
3480         (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
3481
3482         PR c++/34846
3483         * pt.c (tsubst): Only call retrieve_local_specialization if the
3484         original typedef was in a function template.
3485
3486         PR c++/34196
3487         * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
3488
3489 2008-01-21  Richard Guenther  <rguenther@suse.de>
3490
3491         PR c++/34850
3492         * error.c (cp_print_error_function): Deal with recursive
3493         BLOCK trees.
3494
3495 2008-01-20  Paolo Carlini  <pcarlini@suse.de>
3496
3497          PR c++/34891
3498          * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
3499
3500 2008-01-20  Paolo Carlini  <pcarlini@suse.de>
3501
3502          PR c++/34776
3503         PR c++/34486
3504          * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
3505         on non-IS_AGGR_TYPE scope.
3506         (constructor_name_p): Assert IS_AGGR_TYPE.
3507
3508 2008-01-18  Ian Lance Taylor  <iant@google.com>
3509
3510         PR c++/33407
3511         * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
3512         (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
3513         DECL_IS_OPERATOR_NEW flag.
3514
3515 2008-01-16  Richard Guenther  <rguenther@suse.de>
3516
3517         PR c++/33819
3518         * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
3519         for conversions to type variants.
3520
3521 2008-01-15  Andreas Tobler  <a.tobler@schweiz.org>
3522
3523         * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
3524         declaration and code.  Update copyright year.
3525
3526 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
3527
3528         PR c++/34399
3529         * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
3530         know we have a class type.
3531
3532 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
3533
3534         PR c++/34751
3535         * pt.c (coerce_template_parameter_pack): When substituting into
3536         the type of a non-type template parameter pack. use the
3537         deduced/substituted arguments.
3538         * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
3539         can be a parameter pack with the ellipsis following it.  When we
3540         have an erroneous declaration, allow it to be a parameter pack.
3541         (cp_parser_template_parameter): Complain about default
3542         arguments on non-type template parameter packs, and parse them
3543         using the new cp_parser_default_argument.
3544         (cp_parser_parameter_declaration): Complain about parameter packs
3545         with default arguments. Move parsing of default arguments into a
3546         new function, cp_parser_default_argument.
3547         (cp_parser_default_argument): New; extracted from
3548         cp_parser_parameter_declaration.
3549
3550 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
3551
3552         PR c++/34051
3553         PR c++/34055
3554         PR c++/34102
3555         PR c++/34103
3556         * typeck.c (check_return_expr): If there are bare parameter packs
3557         in the return value, set it to error_mark_node.
3558         * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
3559         * pt.c (find_parameter_packs_r): Look at the type of
3560         IDENTIFIER_NODEs (e.g., for user-defined conversions).
3561         (check_for_bare_parameter_packs): Flip the result: now returns
3562         TRUE when there were bare parameter packs, FALSE otherwise.
3563         (push_template_decl_real): Deal with flipped result of
3564         check_for_bare_parameter_packs.
3565         * semantics.c (finish_cond): If there are bare parameter packs in
3566         the conditional, set it to error_mark_node.
3567         (finish_expr_stmt): If there are bare parameter packs in the
3568         expression, set it to error_mark_node.
3569         (finish_for_expr): Ditto.
3570         (finish_switch_cond): If there are bare parameter packs in
3571         the conditional, set it to error_mark_node.
3572         (finish_mem_initializers): If there are bare parameter packs in
3573         the member initializer, set it to error_mark_node.
3574         (finish_member_declaration): Check the attributes of the
3575         declaration for bare parameter packs, and remove the attributes if
3576         any have bare parameter packs.
3577         * parser.c (cp_parser_using_declaration): Check the using
3578         declaration for bare parameter packs.
3579         (cp_parser_base_clause): If there are bare parameter packs in a
3580         base specifier, don't add it to the chain.
3581
3582 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
3583
3584         PR c++/34314
3585         * error.c (dump_simple_decl): Display ellipsis for template
3586         non-type parameter packs.
3587         (dump_decl): Display ellipsis for template type parameter packs.
3588         (dump_template_decl): Display ellipsis for template template
3589         parameter packs.
3590         * pt.c (redeclare_class_template): When redeclaring a class
3591         template, check for collisions between template parameters and
3592         template parameter packs.
3593
3594 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
3595
3596         PR c++/33964
3597         * pt.c (process_partial_specialization): Don't mark template
3598         parameters that occur in non-deduced contexts.
3599         (struct pair_fn_data): Add include_nondeduced_p.
3600         (for_each_template_parm_r): Only visit non-deduced contexts if
3601         include_nondeduced_p is set.
3602         (for_each_template_parm): Added parameter include_nondeduced_p,
3603         which states whether template parameters found in non-deduced
3604         contexts should be visited.
3605         (uses_template_parms): Visit all template parameters, even those
3606         in non-deduced contexts.
3607
3608 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
3609
3610         PR c++/34052
3611         * pt.c (check_default_tmpl_args): Check for parameter packs that
3612         aren't at the end of a primary template.
3613         (push_template_decl_real): Remove check for parameter packs that
3614         aren't at the end of a primary template; that now happens in
3615         check_default_tmpl_args.
3616         * semantics.c (finish_template_template_parm): Use
3617         check_default_tmpl_args to check for errors in the template
3618         parameter list.
3619
3620 2008-01-12  Doug Kwan  <dougkwan@google.com>
3621
3622         * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
3623         instead of OPT_Wreturn_type in warning due to ignored return type
3624         qualifiers.
3625         * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
3626         instead of OPT_Wreturn_type in warning due to ignored return type
3627         qualifiers.
3628
3629 2008-01-08  Jakub Jelinek  <jakub@redhat.com>
3630
3631         PR c++/33890
3632         * semantics.c (finish_omp_for): Don't call
3633         fold_build_cleanup_point_expr if processing_template_decl.
3634
3635 2008-01-04  Paolo Carlini  <pcarlini@suse.de>
3636             Jakub Jelinek  <jakub@redhat.com>
3637
3638         PR c++/34611
3639         * error.c (dump_template_argument): Deal with TREE_LIST.
3640
3641 2008-01-01  Douglas Gregor  <doug.gregor@gmail.com>
3642
3643         * parser.c (cp_parser_check_decl_spec): Don't warn about "long
3644         long" in C++0x mode; change the warning to note that "long long"
3645         is only unsupported in C++98 mode.
3646
3647 2007-12-20  Jason Merrill  <jason@redhat.com>
3648
3649         PR c++/34111
3650         * call.c (standard_conversion): Derived-to-base is considered a
3651         standard conversion.
3652
3653 2007-12-19  Jakub Jelinek  <jakub@redhat.com>
3654
3655         PR c++/34513
3656         * parser.c (cp_parser_omp_parallel): For non-combined parallel
3657         call cp_parser_statement rather than
3658         cp_parser_already_scoped_statement.
3659
3660 2007-12-18  Jason Merrill  <jason@redhat.com>
3661
3662         PR c++/34206
3663         * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
3664         use template parms.
3665         (dependent_type_p_r): Handle the domain of an array.
3666
3667 2007-12-18  Douglas Gregor  <doug.gregor@gmail.com>
3668              Jakub Jelinek  <jakub@redhat.com>
3669
3670         PR c++/32565
3671         PR c++/33943
3672         PR c++/33965
3673         * pt.c (template_template_parm_bindings_ok_p): New; verifies
3674         bindings of template template parameters after all template
3675         arguments have been deduced.
3676         (coerce_template_parms): Don't complain when COMPLAIN doesn't
3677         include tf_error.
3678         (fn_type_unification): Use template_template_parm_bindings_ok_p.
3679         (unify): Deal with variadic, bound template template parameters.
3680         (get_class_bindings): Use template_template_parm_bindings_ok_p.
3681
3682 2007-12-18  Jakub Jelinek  <jakub@redhat.com>
3683
3684         PR c++/34488
3685         * decl.c (grokdeclarator): Reject friend sfk_constructor
3686         FUNCTION_TYPE.
3687
3688 2007-12-17  Jakub Jelinek  <jakub@redhat.com>
3689
3690         PR c/34506
3691         * parser.c (cp_parser_omp_all_clauses): Accept optional comma
3692         in between clauses.
3693
3694 2007-12-15  Alexandre Oliva  <aoliva@redhat.com>
3695
3696         PR debug/7081
3697         * cp-lang.c (cp_classify_record): New.
3698         (LANG_HOOKS_CLASSIFY_RECORD): Override.
3699
3700 2007-12-11  Jakub Jelinek  <jakub@redhat.com>
3701
3702         PR c++/34238
3703         * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
3704
3705         PR c++/34364
3706         * rtti.c (build_dynamic_cast): Call convert_from_reference even for
3707         dynamic_cast in a template.
3708
3709 2007-12-10  Simon Martin  <simartin@users.sourceforge.net>
3710
3711         PR c++/34059
3712         * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
3713         MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
3714
3715 2007-12-10  Jakub Jelinek  <jakub@redhat.com>
3716
3717         PR c++/34395
3718         * error.c (dump_type_prefix, dump_type_suffix): Handle
3719         TYPE_PACK_EXPANSION.
3720
3721         PR c++/34394
3722         * error.c (dump_expr): Handle ABS_EXPR.
3723
3724 2007-12-09  Jakub Jelinek  <jakub@redhat.com>
3725
3726         PR c++/34178
3727         PR c++/34340
3728         * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
3729         in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
3730         Return 2 also if DECL_EXPLICIT_INSTANTIATION.
3731         * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
3732         flag_use_repository and repo_emit_p returned 2.
3733
3734 2007-12-06  Jakub Jelinek  <jakub@redhat.com>
3735
3736         PR c++/34336
3737         * tree.c (stabilize_call, stabilize_init): Do nothing if
3738         processing_template_decl.
3739
3740 2007-12-05  Jakub Jelinek  <jakub@redhat.com>
3741
3742         PR c++/34271
3743         * semantics.c (finish_decltype_type): For SCOPE_REF issue an
3744         error instead of assertion failure.
3745         * parser.c (cp_parser_decltype): If closing paren is not found,
3746         return error_mark_node.
3747
3748 2007-12-04  Douglas Gregor  <doug.gregor@gmail.com>
3749
3750         PR c++/34101
3751         * name-lookup.c (arg_assoc_template_arg): Recurse on argument
3752         packs.
3753         (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
3754         since arg_assoc_template_arg will deal with them (better).
3755
3756 2007-12-04  Douglas Gregor  <doug.gregor@gmail.com>
3757
3758         PR c++/33509
3759         * pt.c (tsubst_exception_specification): Handle substitutions into
3760         member templates, where tsubst_pack_expansion returns a
3761         TYPE_PACK_EXPANSION.
3762
3763 2007-12-04  Douglas Gregor  <doug.gregor@gmail.com>
3764
3765         PR c++/33091
3766         * pt.c (unify_pack_expansion): If we didn't deduce any actual
3767         bindings for the template parameter pack, don't try to keep the
3768         empty deduced arguments.
3769         (unify): If a parameter is a template-id whose template argument
3770         list contains a pack expansion that is not at the end, then we
3771         cannot unify against that template-id.
3772
3773 2007-12-02  Paolo Carlini  <pcarlini@suse.de>
3774
3775          PR c++/34061
3776          * pt.c (current_template_args): Use error_operand_p.
3777
3778 2007-12-02  Paolo Carlini  <pcarlini@suse.de>
3779
3780          PR c++/34273
3781          * error.c (dump_decl): Handle TREE_BINFO.
3782
3783 2007-12-01  Ollie Wild  <aaw@google.com>
3784
3785         PR c++/8171
3786         * typeck.c (build_binary_op): Add conversion of pointers to function
3787         members appearing as operands to the equality operators.
3788
3789 2007-11-30  Jakub Jelinek  <jakub@redhat.com>
3790
3791         PR c++/34275
3792         * error.c (dump_expr): Handle OBJ_TYPE_REF.
3793
3794 2007-11-29  Jakub Jelinek  <jakub@redhat.com>
3795
3796         PR c++/34270
3797         * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
3798         in templates.
3799         * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
3800         Likewise.
3801
3802         PR c++/34267
3803         PR c++/34268
3804         * parser.c (cp_parser_decltype): Don't call finish_id_expression
3805         on ~type.
3806         * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
3807         and ~type early.
3808
3809 2007-11-27  Jakub Jelinek  <jakub@redhat.com>
3810
3811         PR tree-optimization/34181
3812         * method.c (use_thunk): Don't inline the call in the thunk.
3813
3814         PR c++/34213
3815         * tree.c (decl_linkage): Static data members and static member
3816         functions in anonymous ns classes are lk_external.
3817
3818 2007-11-26  Andreas Krebbel  <krebbel1@de.ibm.com>
3819
3820         PR c++/34081
3821         * decl.c (start_preparsed_function): Pass
3822         processing_template_decl for the new allocate_struct_function
3823         parameter.
3824
3825 2007-11-25  Richard Guenther  <rguenther@suse.de>
3826
3827         * decl.c (poplevel): Use BLOCK_CHAIN.
3828
3829 2007-11-24  Ollie Wild  <aaw@google.com>
3830
3831         * typeck.c (delta_from_ptrmemfunc): New function.
3832         (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
3833         (build_binary_op): Call delta_from_ptrmemfunc.
3834
3835 2007-11-23  Jakub Jelinek  <jakub@redhat.com>
3836
3837         PR c++/30293
3838         PR c++/30294
3839         * decl.c (cp_finish_decl): Disallow variable or field
3840         definitions if extern "Java" aggregates.
3841         (grokparms): Disallow parameters with extern "Java"
3842         aggregates.
3843         (check_function_type): Disallow function return values
3844         with extern "Java" aggregates.
3845         * init.c (build_new_1): Disallow placement new with
3846         extern "Java" aggregates.
3847
3848 2007-11-23  Mark Mitchell  <mark@codesourcery.com>
3849             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3850
3851         PR c++/5310
3852         * call.c (convert_like_real): Build a zero constant when __null is
3853         converted to an integer type.
3854
3855 2007-11-22  Jakub Jelinek  <jakub@redhat.com>
3856
3857         PR c++/34094
3858         * decl2.c (cp_write_global_declarations): Issue error about static
3859         data members in anonymous namespace which are declared and used,
3860         but not defined.
3861
3862 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
3863
3864         PR c++/34089
3865         * parser.c (cp_parser_class_head): Reject function template ids.
3866
3867         PR c++/28879
3868         * tree.c (build_cplus_array_type_1): Don't pass any VLA types
3869         when processing_template_decl to build_array_type.
3870
3871         PR c++/33962
3872         * pt.c (more_specialized_fn): Don't segfault if one or
3873         both argument list end with ellipsis.
3874
3875 2007-11-18  Jakub Jelinek  <jakub@redhat.com>
3876
3877         PR c++/30988
3878         * semantics.c (finish_call_expr): Set
3879         current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
3880         or OVERLOAD with all noreturn functions.
3881
3882 2007-11-16  Jakub Jelinek  <jakub@redhat.com>
3883
3884         PR c++/34100
3885         * pt.c (apply_late_template_attributes): Do nothing if decl's type is
3886         error_mark_node.
3887
3888 2007-11-13  Jakub Jelinek  <jakub@redhat.com>
3889
3890         PR c++/34054
3891         PR c++/34056
3892         PR c++/34057
3893         PR c++/34058
3894         PR c++/34060
3895         * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
3896         set to error_mark_node the outermost POINTER_TYPE to the pack if
3897         it is seen in a POINTER_TYPE.
3898         (push_template_decl_real): If check_for_bare_parameter_packs
3899         fails for function return type, set the return type to
3900         integer_type_node.  If check_for_bare_parameter_packs failed
3901         for non-function, return error_mark_node.
3902
3903         PR c++/29225
3904         * call.c (build_new_op): Call resolve_args before calling
3905         build_over_call.
3906
3907 2007-11-11  Tom Tromey  <tromey@redhat.com>
3908
3909         PR c++/17577:
3910         * lex.c (handle_pragma_implementation): Use cpp_included_before.
3911
3912 2007-11-12  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3913
3914         PR c++/8570
3915         * pt.c (redeclare_class_template): Update error message. Use a
3916         note to show the previous declaration.
3917         (tsubst_friend_class): Use the location of the friend template as
3918         the input location before calling redeclare_class_template.
3919
3920 2007-11-11  Jakub Jelinek  <jakub@redhat.com>
3921
3922         PR c++/34068
3923         * semantics.c (finish_pseudo_destructor_expr): Handle
3924         object == error_mark_node.
3925
3926 2007-11-10  Jakub Jelinek  <jakub@redhat.com>
3927
3928         PR c++/32241
3929         * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
3930         is not scalar type, let finish_class_member_access_expr handle
3931         diagnostics.  Pass BIT_NOT_EXPR argument to
3932         finish_pseudo_destructor_expr.  Handle SCOPE_REF properly.
3933
3934 2007-11-09  Douglas Gregor  <doug.gregor@gmail.com>
3935
3936         PR c++/33510
3937         * decl.c (cp_complete_array_type): If any of the initializer
3938         elements are pack expansions, don't compute the array size yet.
3939
3940 2007-11-08  Andrew Pinski  <pinskia@gmail.com>
3941
3942         PR c++/30297:
3943         * tree.c (decl_linkage): Fields have no linkage.
3944
3945 2007-11-08  Daniel Jacobowitz  <dan@codesourcery.com>
3946
3947         * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
3948
3949 2007-11-07  Douglas Gregor  <doug.gregor@gmail.com>
3950
3951         PR c++/33045
3952         PR c++/33837
3953         PR c++/33838
3954         * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
3955         Be careful with ERROR_MARK_NODEs.
3956         * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
3957         argument.
3958
3959 2007-11-07  Jakub Jelinek  <jakub@redhat.com>
3960
3961         PR c++/33501
3962         * call.c (build_over_call): Don't check TREE_ADDRESSABLE
3963         on incomplete type.
3964
3965 2007-11-06  Douglas Gregor  <doug.gregor@gmail.com>
3966
3967         PR c++/33977
3968         PR c++/33886
3969         * tree.c (c_build_qualified_type): Define bridge to
3970         cp_build_qualified_type.
3971
3972 2007-11-06  Douglas Gregor  <doug.gregor@gmail.com>
3973
3974         PR c++/31439
3975         PR c++/32114
3976         PR c++/32115
3977         PR c++/32125
3978         PR c++/32126
3979         PR c++/32127
3980         PR c++/32128
3981         PR c++/32253
3982         PR c++/32566
3983         * typeck.c (check_return_expr): Pass address of retval to
3984         check_for_bare_parameter_packs.
3985         * class.c (build_base_field): Tolerate bases that have no layout
3986         due to errors.
3987         (end_of_base): Ditto.
3988         * tree.c (canonical_type_variant): Be careful with
3989         ERROR_MARK_NODE.
3990         * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
3991         tree*.
3992         * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
3993         which states whether parameter packs should be replaced with
3994         ERROR_MARK_NODE.
3995         (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
3996         possible. If set_packs_to_error is set true, replace the parameter
3997         pack with ERROR_MARK_NODE. Manage our own pointer sets.
3998         (uses_parameter_packs): Don't set parameter packs to
3999         ERROR_MARK_NODE.
4000         (check_for_bare_parameter_packs): Now takes a pointer to a tree,
4001         which may be modified (if it is a parameter pack). Instructs
4002         find_parameter_packs_r to replace parameter packs with
4003         ERROR_MARK_NODE (so that they won't cause errors later on).
4004         (process_template_parm): Pass pointer to
4005         check_for_bare_parameter_packs.
4006         (process_partial_specialization): Replace pack expansions before
4007         the end of the template argument list with ERROR_MARK_NODE.
4008         (push_template_decl_real): Pass pointer to
4009         check_for_bare_parameter_packs. Replace parameter packs not at the
4010         end of the template parameter list with ERROR_MARK_NODE.
4011         (convert_template_argument): Be more careful about using DECL_NAME
4012         on only declarations.
4013         (unify): Can't unify against ERROR_MARK_NODE.
4014         * semantics.c (finish_cond): Pass pointer to
4015         check_for_bare_parameter_packs.
4016         (finish_expr_stmt): Ditto.
4017         (finish_for_expr): Ditto.
4018         (finish_switch_cond): Pass pointer to
4019         check_for_bare_parameter_packs, and call it before we put the
4020         condition into the statement.
4021         (finish_mem_initializers): Pass pointer to
4022         check_for_bare_parameter_packs.
4023         (finish_member_declaration): Ditto.
4024         * parser.c (cp_parser_base_clause): Ditto.
4025
4026 2007-11-06  Jakub Jelinek  <jakub@redhat.com>
4027
4028         PR target/33168
4029         * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
4030         with the final TREE_READONLY flag in place.  processing_template_decl
4031         is known to be 0 in this part of function.
4032
4033         PR c++/33894
4034         * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
4035         OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
4036         * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
4037         * semantics.c (finish_omp_atomic): Revert most of the
4038         2007-02-05 changes, just keep the new representation of
4039         OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
4040
4041 2007-11-05  H.J. Lu  <hongjiu.lu@intel.com>
4042
4043         PR c++/33871
4044         * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
4045         local.
4046
4047 2007-11-05  Douglas Gregor  <doug.gregor@gmail.com>
4048
4049         PR c++/33996
4050         PR c++/33235
4051         PR c++/33930
4052         * typeck.c (merge_types): Don't lose rvalue references when
4053         merging types.
4054         * call.c (build_over_call): Don't elide move constructors just
4055         because the copy constructor is trivial (!).
4056         (compare_ics): If comparing cv-qualifiers fails, we can still order
4057         based on binding lvalues vs. rvalues.
4058
4059 2007-11-05  Douglas Gregor  <doug.gregor@gmail.com>
4060
4061         PR c++/33939
4062         * pt.c (unify_pack_expansion): bring handling of function call
4063         arguments into line with type_unification_real.
4064
4065 2007-11-05  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
4066
4067         * typeck.c (build_binary_op): Use pedwarn instead of error for
4068         consistency.
4069
4070 2007-11-05  Jakub Jelinek  <jakub@redhat.com>
4071
4072         PR c++/33836
4073         * parser.c (cp_parser_unary_expression): For &&label call
4074         cp_parser_non_integral_constant_expression and return error_mark_node
4075         if it returned true.
4076
4077         PR c++/33969
4078         * decl.c (grokdeclarator): Don't call build_memfn_type if type
4079         is neither FUNCTION_TYPE nor METHOD_TYPE.
4080
4081 2007-11-02  Jakub Jelinek  <jakub@redhat.com>
4082
4083         PR c++/33516
4084         * parser.c (cp_parser_nested_name_specifier_opt): Use
4085         TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
4086         typedef of currently open class.
4087
4088 2007-11-02  Paolo Carlini  <pcarlini@suse.de>
4089
4090         PR c++/33495
4091         * error.c (dump_expr): Deal specially with statements.
4092
4093 2007-11-01  Jason Merrill  <jason@redhat.com>
4094
4095         PR c++/30897
4096         * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
4097         template parms.
4098         (lookup_template_class): Use it to get the outer template args
4099         for instantiating one.
4100
4101         PR c++/29236
4102         * pt.c (reduce_template_parm_level): tsubst the parameters
4103         of a template template parm.
4104
4105 2007-11-01  Douglas Gregor  <doug.gregor@gmail.com>
4106
4107         PR c++/33955
4108         * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
4109
4110 2007-11-01  Jakub Jelinek  <jakub@redhat.com>
4111
4112         PR c++/32384
4113         * parser.c (cp_parser_postfix_dot_deref_expression): If
4114         POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
4115         first and if that succeeds and type is SCALAR_TYPE_P, create
4116         PSEUDO_DTOR_EXPR.
4117
4118         PR c++/32260
4119         * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
4120         (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
4121         as for std::type_info.
4122
4123 2007-10-31  Paolo Carlini  <pcarlini@suse.de>
4124
4125         PR c++/33494
4126         * cxx-pretty-print.c (pp_cxx_typeid_expression,
4127         pp_cxx_delete_expression): Change to static linkage.
4128         * cxx-pretty-print.h: Adjust declarations.
4129         * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
4130         MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
4131         MODOP_EXPR): Forward to pp_expression.
4132
4133         * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
4134         Fix typo.
4135
4136 2007-10-31 Christian Bruel  <christian.bruel@st.com>
4137             Mark Mitchell  <mark@codesourcery.com>
4138
4139         PR c++/19531
4140         * typeck.c (check_return_expr): Don't set named_return_value_okay_p
4141         if retval is volatile.
4142
4143 2007-10-30  Jakub Jelinek  <jakub@redhat.com>
4144
4145         PR c++/33616
4146         * decl2.c (build_offset_ref_call_from_tree): Call
4147         build_non_dependent_expr on object prior to building ADDR_EXPR from it
4148         if FN is DOTSTAR_EXPR.
4149
4150 2007-10-30  Douglas Gregor  <doug.gregor@gmail.com>
4151
4152         PR c++/31993
4153         PR c++/32252
4154         * pt.c (find_parameter_packs_r): Fix typo in comment.
4155         (convert_template_argument): Look at the pattern of a pack
4156         expansion to determine what kind of entity we're converting.
4157         (coerce_template_parameter_pack): When we have coerced a non-type
4158         template parameter pack, substitute into the type of that pack.
4159         (tsubst_pack_expansion): When our substitution of a parameter pack
4160         is a "trivial" substitution of itself, just substitute into the
4161         pack expansion rather than actually expanding.
4162
4163 2007-10-29  Jakub Jelinek  <jakub@redhat.com>
4164
4165         PR c++/33841
4166         * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
4167         for non-integral type bitfields.  Return true if bitfield is correct, false
4168         error has been diagnosed.
4169         (check_field_decls): If check_bitfield_decl returned false, call also
4170         check_field_decl.
4171
4172 2007-10-28  Paolo Carlini  <pcarlini@suse.de>
4173             Mark Mitchell  <mark@codesourcery.com>
4174
4175         PR c++/30659
4176         * pt.c (do_decl_instantiation): If the VAR_DECL is not a
4177         class member error out and return.
4178
4179 2007-10-27  Jakub Jelinek  <jakub@redhat.com>
4180
4181         * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
4182         to current_function_decl rather than 0.
4183
4184         PR c++/33844
4185         * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
4186         ->* rather than .*.
4187         * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
4188
4189 2007-10-27  Jason Merrill  <jason@redhat.com>
4190
4191         PR c++/5247
4192         * call.c (convert_default_arg): Detect recursion.
4193
4194 2007-10-27  Jakub Jelinek  <jakub@redhat.com>
4195
4196         PR c++/33842
4197         * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
4198         * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
4199         OFFSETOF_EXPR.
4200         (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
4201         functions.
4202         * error.c (dump_expr): Handle OFFSETOF_EXPR.
4203
4204 2007-10-26  Jason Merrill  <jason@redhat.com>
4205
4206         PR c++/24791
4207         * pt.c (get_template_info): New fn.
4208         (template_class_depth): Use it.
4209         (push_template_decl_real): Check that the template args of the
4210         definition match the args of the previous declaration.
4211
4212 2007-10-26  Paolo Carlini  <pcarlini@suse.de>
4213
4214         PR c++/31988
4215         * decl2.c (coerce_new_type): Do not allow a default argument for
4216         the first parameter.
4217
4218 2007-10-26  Douglas Gregor  <doug.gregor@gmail.com>
4219
4220         PR c++/33839
4221         * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
4222         don't see the leading '('. Only lookup names if we get an
4223         IDENTIFIER_NODE.
4224
4225 2007-10-26  Jakub Jelinek  <jakub@redhat.com>
4226
4227         PR c++/33744
4228         * parser.c (cp_parser_parenthesized_expression_list): Set
4229         greater_than_is_operator_p to true in between the parens.
4230
4231 2007-10-26  Paolo Carlini  <pcarlini@suse.de>
4232
4233         PR c++/31747
4234         * decl.c (grokdeclarator): In case of conflicting specifiers
4235         just return error_mark_node.
4236
4237 2007-10-26  Ollie Wild  <aaw@google.com>
4238
4239         * expr.c (cxx_expand_expr): Removed.
4240         * cp-tree.h (exx_expand_expr): Removed.
4241         * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
4242         with c_expand_expr.
4243
4244 2007-10-25  Paolo Carlini  <pcarlini@suse.de>
4245
4246         PR c++/33843
4247         * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
4248
4249 2007-10-23  Jason Merrill  <jason@redhat.com>
4250
4251         PR c++/25950 (DR 391)
4252         * call.c (struct conversion): Remove check_copy_constructor_p.
4253         (reference_binding): Always bind a reference directly to a
4254         compatible class rvalue.  Pass down LOOKUP_NO_TEMP_BIND during
4255         temporary creation.
4256         (check_constructor_callable): Remove.
4257         (convert_like_real): Don't call it.
4258         (initialize_reference): Don't call check_constructor_callable.
4259         (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
4260         LOOKUP_CONSTRUCTOR_CALLABLE.  Don't require a temporary for base
4261         conversions if LOOKUP_NO_TEMP_BIND.
4262         (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
4263         (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
4264         second conversion.
4265         * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
4266
4267 2007-10-22  Jakub Jelinek  <jakub@redhat.com>
4268
4269         PR c++/33372
4270         * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
4271         before checking if its type is integral.
4272
4273 2007-10-22  Jason Merrill  <jason@redhat.com>
4274
4275         PR c++/33620
4276         * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
4277         * pt.c (apply_late_template_attributes): Splice out dependent
4278         attributes from DECL_ATTRIBUTES.
4279
4280         * decl.c (cxx_maybe_build_cleanup): Use build_address.
4281
4282 2007-10-17  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
4283
4284         * typeck.c (build_binary_op) : Use appropriate warning option
4285         instead of unnamed warning.
4286
4287 2007-10-16  Paolo Carlini  <pcarlini@suse.de>
4288
4289         PR c++/31446
4290         * pt.c (current_template_args): Do not change TREE_LIST elements
4291         with a TREE_VALUE of error_mark_node.
4292
4293 2007-10-16  Mark Mitchell  <mark@codesourcery.com>
4294
4295         * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
4296         * decl.c (start_decl): Tidy.
4297         (start_decl_1): Call cp_apply_type_quals_to_decl after completing
4298         the type.
4299         (grokdeclarator): Clarify comment.
4300
4301 2007-10-14  Andrew Pinski  <pinskia@gmail.com>
4302
4303         PR c++/30303
4304         * decl.c (grokfndecl): Return NULL after the "definition of
4305         implicitly-declared" error happened.
4306
4307 2007-10-12  Simon Martin  <simartin@users.sourceforge.net>
4308
4309         PR c++/26698
4310         * call.c (build_user_type_conversion_1): Do not consider conversion
4311         functions to convert a (possibly cv-qualified) object to the (possibly
4312         cv-qualified) same object type (or a reference to it), to a (possibly
4313         cv-qualified) base class of that type (or a reference to it).
4314
4315 2007-10-12  Paolo Carlini  <pcarlini@suse.de>
4316
4317         * pt.c (tsubst): Use template_parm_level_and_index.
4318
4319 2007-10-12  Jakub Jelinek  <jakub@redhat.com>
4320
4321         PR c++/32121
4322         * parser.c (cp_parser_compound_statement): Handle label-declarations
4323         at the beginning of the compound statement.
4324         (cp_parser_block_declaration): Issue diagnostics about __label__
4325         not at the beginning of a block.
4326
4327 2007-10-11  Paolo Carlini  <pcarlini@suse.de>
4328
4329         PR c++/33461
4330         * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
4331         to convert_template_argument.
4332         (coerce_template_parms): Return error_mark_node after fixed-length
4333         error.
4334         (tsubst_decl): Check for error_mark_node the return value of the
4335         first tsubst in 'case VAR_DECL'.
4336
4337 2007-10-08  Ollie Wild  <aaw@google.com>
4338
4339         * typeck2.c (digest_init): Call cplus_expand_constant after
4340         convert_for_initialization.
4341         * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
4342         * expr.c (cplus_expand_constant): Updated function description.
4343
4344 2007-10-04  Jason Merrill  <jason@redhat.com>
4345
4346         PR c++/20416
4347         * call.c (initialize_reference): Handle local static reference
4348         temps properly.
4349
4350 2007-10-03  Jason Merrill  <jason@redhat.com>
4351
4352         PR c++/32470
4353         * name-lookup.c (push_namespace_with_attrs): Fold back into...
4354         (push_namespace): Here.
4355         (handle_namespace_attrs): New fn for the attr code.
4356         (leave_scope): Don't pop_visibility.
4357         * name-lookup.h (struct cp_binding_level): Remove has_visibility.
4358         * parser.c (cp_parser_namespace_definition): Call
4359         handle_namespace_attrs and pop_visibility as appropriate.
4360
4361         PR c++/11756
4362         * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
4363
4364 2007-10-03  Alexandre Oliva  <aoliva@redhat.com>
4365
4366         * decl.c (duplicate_decls): Preserve linkage flags for mere
4367         redeclarations of gnu_inline definitions.
4368
4369 2007-10-03  Jason Merrill  <jason@redhat.com>
4370
4371         PR c++/15764
4372         * decl.c (wrap_cleanups_r): New fn.
4373         (wrap_temporary_cleanups): New fn.
4374         (initialize_local_var): Call it.
4375
4376 2007-09-29  Jason Merrill  <jason@redhat.com>
4377
4378         PR c++/33094
4379         * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
4380         constant to not have DECL_EXTERNAL if it's file-local.
4381
4382 2007-09-28  Ollie Wild  <aaw@google.com>
4383
4384         Revert
4385         2007-09-27  Ollie Wild  <aaw@google.com>
4386
4387         * typeck2.c (digest_init): Call cplus_expand_constant after
4388         convert_for_initialization.
4389         * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
4390         * expr.c (cplus_expand_constant): Updated function description.
4391
4392 2007-09-28  Jason Merrill  <jason@redhat.com>
4393
4394         PR c++/10179
4395         * class.c (layout_empty_base): Take rli parameter, update
4396         rli->record_align if empty base has user-specified alignment.
4397         (build_base_field): Pass rli to it.
4398
4399 2007-09-28  Paolo Carlini  <pcarlini@suse.de>
4400
4401         PR c++/33213
4402         * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
4403
4404 2007-09-28  Paolo Carlini  <pcarlini@suse.de>
4405
4406         PR c++/33118
4407         * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
4408         (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
4409         (dump_parameters): Just call dump_type for argument packs too.
4410
4411 2007-09-28  Jakub Jelinek  <jakub@redhat.com>
4412
4413         PR c++/31434
4414         * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
4415         qualification by creating qualified PACK_EXPANSION_PATTERN and
4416         then calling make_pack_expansion on it.
4417
4418 2007-09-27  Ollie Wild  <aaw@google.com>
4419
4420         * typeck2.c (digest_init): Call cplus_expand_constant after
4421         convert_for_initialization.
4422         * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
4423         * expr.c (cplus_expand_constant): Updated function description.
4424
4425 2007-09-27  Jason Merrill  <jason@redhat.com>
4426
4427         PR c++/33571
4428         * decl2.c (is_late_template_attribute): Don't crash on unknown
4429         attribute.
4430
4431 2007-09-27  Paolo Carlini  <pcarlini@suse.de>
4432
4433         PR c++/33493
4434         * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
4435         * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
4436         spaces in the formatting.
4437         * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
4438
4439 2007-09-27  Jakub Jelinek  <jakub@redhat.com>
4440
4441         * error.c (cxx_print_error_function): Add third argument, pass
4442         it over to lhd_print_error_function.
4443         (cp_print_error_function): If diagnostic->abstract_origin, print
4444         virtual backtrace.
4445         * cp-tree.h (struct diagnostic_info): New forward decl.
4446         (cxx_print_error_function): Add third argument.
4447
4448 2007-09-25  Simon Martin  <simartin@users.sourceforge.net>
4449
4450         PR c++/33207
4451         * name-lookup.c (pushtag): Do not create an implicit typedef before
4452         the associated type declaration is known to be valid.
4453
4454 2007-09-25  Jakub Jelinek  <jakub@redhat.com>
4455
4456         * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
4457         rather than pointers.
4458
4459 2007-09-24  Danny Smith  <dannysmith@user.sourceforge.net>
4460
4461         PR c++/14688
4462          * search.c (check_final_overrider): Fail if
4463         targetm.comp_type_attributes returns 0.
4464
4465 2007-09-24  Jason Merrill  <jason@redhat.com>
4466
4467         PR c++/33239
4468         * pt.c (resolve_typename_type): Don't look things up in the original
4469         template if it would mean losing template arguments.
4470
4471 2007-09-24  Jakub Jelinek  <jakub@redhat.com>
4472
4473         PR c++/33506
4474         * cp-tree.h (cxx_type_hash_eq): New prototype.
4475         * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
4476         * tree.c (cxx_type_hash_eq): New function.
4477
4478 2007-09-24  Douglas Gregor  <doug.gregor@gmail.com>
4479
4480         PR c++/33185
4481         * tree.c (cp_build_qualified_type_real): Build a canonical
4482         ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
4483
4484 2007-09-24  Douglas Gregor  <doug.gregor@gmail.com>
4485
4486         PR c++/33112
4487         PR c++/33185
4488         * tree.c (cplus_array_compare): Compare pointers, not types.
4489         (build_cplus_array_type_1): Store new array type into the hash
4490         table before building the canonical type; build the canonical type
4491         correctly.
4492         (cp_build_qualified_type_real): Put all of the array types with
4493         cv-qualified element types into the C++ array hash table, built as
4494         variants of the unqualified versions.
4495
4496 2007-09-23  Jason Merrill  <jason@redhat.com>
4497
4498         PR c++/16370
4499         * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
4500         for deprecation warnings.
4501
4502 2007-09-22  Jason Merrill  <jason@redhat.com>
4503
4504         PR c++/15269
4505         * call.c (build_over_call): Warn about deprecated virtuals.
4506
4507         PR c++/19407
4508         * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
4509         (MAYBE_TAGGED_TYPE_P): Remove.
4510         * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
4511         instead of calling is_late_template_attribute again.
4512         (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
4513         (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
4514         Don't crash on typedefs from non-template classes.
4515         * decl2.c (grokfield): Don't sorry about attrs on template parms.
4516         (is_late_template_attribute): All attributes applied to template
4517         parms or typename types are dependent.  Static.
4518         (splice_template_attributes): Pass decl through.
4519         (save_template_attributes): Likewise.
4520
4521 2007-09-20  Jakub Jelinek  <jakub@redhat.com>
4522
4523         PR c++/33496
4524         * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
4525         returned from tsubst_pack_expansion.
4526         (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
4527         (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
4528
4529 2007-09-20  Paolo Carlini  <pcarlini@suse.de>
4530
4531         PR c++/33460
4532         * semantics.c (finish_id_expression): Use consistently
4533         context_for_name_lookup.
4534         * decl.c (fixup_anonymous_aggr): Fix error message for
4535         anonymous struct (vs union).
4536
4537 2007-09-19  Jason Merrill  <jason@redhat.com>
4538
4539         PR c++/7586
4540         * pt.c (tsubst): Handle typedefs by looking for the specialization.
4541         (retrieve_specialization): Only tagged types use
4542         DECL_TEMPLATE_INSTANTIATIONS.
4543         (instantiate_class_template): Push nested classes too.
4544         (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
4545         tagged types.
4546         * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
4547         * init.c (is_aggr_type): Remove redundant tests.
4548         * class.c (push_nested_class): Use CLASS_TYPE_P.
4549
4550 2007-09-20  Paolo Carlini  <pcarlini@suse.de>
4551
4552         PR c++/33459
4553         * init.c (build_zero_init): If, recursively, build_zero_init
4554         returns a NULL_TREE, do not append it to the VEC of constructors.
4555
4556 2007-09-18  Jason Merrill  <jason@redhat.com>
4557
4558         PR c++/17743
4559         * pt.c (apply_late_template_attributes): Set processing_template_decl.
4560         (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
4561         ATTR_FLAG_TYPE_IN_PLACE.
4562         (tsubst): Do unqualified lookup to find typedefs from current class.
4563         [ARRAY_TYPE]: Propagate alignment info.
4564         * decl2.c (is_late_template_attribute): Only defer handling of
4565         attribute aligned if the expression is dependent.
4566         (save_template_attributes): If we're deferring any attributes,
4567         make this a naming typedef.
4568
4569 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
4570
4571         PR c++/33462 (again)
4572         * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
4573         va_arg instead of __builtin_va_arg.
4574
4575 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
4576
4577         PR c++/33462
4578         * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
4579         (pp_cxx_primary_expression): Use it.
4580         * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
4581         * error.c (dump_expr): Use it.
4582
4583 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
4584
4585         PR c++/33463
4586         * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
4587         out case TYPEID_EXPR to...
4588         (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
4589         and pp_cxx_right_paren.
4590         * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
4591         * error.c (dump_expr): Use it.
4592
4593 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
4594
4595         PR c++/33464
4596         * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
4597         (pp_cxx_primary_expression): Use it.
4598         * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
4599         * error.c (dump_expr): Use it.
4600
4601 2007-09-16  Paolo Carlini  <pcarlini@suse.de>
4602
4603         PR c++/33124
4604         * init.c (build_new): Remove warning for zero-element
4605         allocations.
4606
4607 2007-09-16  Nathan Sidwell  <nathan@codesourcery.com>
4608
4609         PR c++/32756
4610         * call.c (maybe_handle_implicit_object): Set this_p, clear
4611         rvaluedness_matches_p.
4612         (compare_ics): Do not compare rvaluedness matching when one of the
4613         operands is an implicit object.
4614
4615 2007-09-14  Jason Merrill  <jason@redhat.com>
4616
4617         PR c++/17743, c++/19163
4618         * decl2.c (is_late_template_attribute): New fn.
4619         (splice_template_attributes, save_template_attributes): New fns.
4620         (cplus_decl_attributes): Call save_template_attributes.
4621         * pt.c (apply_late_template_attributes): New fn.
4622         (instantiate_class_template, tsubst_decl): Use it.
4623         * cp-tree.h: Declare is_late_template_attribute.
4624
4625 2007-09-13  Tom Tromey  <tromey@redhat.com>
4626
4627         * parser.c (cp_lexer_new_main): Don't use
4628         c_lex_return_raw_strings.
4629         (cp_lexer_get_preprocessor_token): Update.  Add special case when
4630         lexer is NULL.
4631
4632 2007-09-11  Jan Hubicka <jh@suse.cz>
4633
4634         * method.c (use_thunk): Use tree_rest_of_compilation
4635         * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
4636         (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
4637         * cp-tree.h (expand_body): Kill.
4638         (emit_associated_thunks): Declare.
4639         * semantics.c (emit_associated_thunks): Export.
4640         (expand_body): Kill.
4641
4642 2007-09-09  David Daney  <ddaney@avtrex.com>
4643
4644         PR c++/33324
4645         * init.c (build_new_1):  Use POINTER_PLUS_EXPR instead of MINUS_EXPR
4646         to calculate cookie_ptr.
4647
4648 2007-09-08  Jason Merrill  <jason@redhat.com>
4649
4650         PR c++/33342
4651         * pt.c (most_specialized_class): Set processing_template_decl
4652         while tsubsting partial spec args.
4653
4654 2007-09-06  Jason Merrill  <jason@redhat.com>
4655
4656         * decl2.c (get_guard): Copy visibility from the guarded variable.
4657
4658 2007-09-06  Jan Hubicka  <jh@suse.cz>
4659
4660         * semantics.c (expand_body): Do not mark arguments of clones used.
4661
4662 2007-09-06  Paolo Carlini  <pcarlini@suse.de>
4663
4664         PR c++/32674
4665         * decl.c (cp_finish_decl): When processing_template_decl,
4666         deal correctly with init as TREE_LIST.
4667
4668 2007-09-06  Tom Tromey  <tromey@redhat.com>
4669
4670         * decl.c (finish_function): Put return's location on line zero of
4671         file.
4672
4673 2007-09-05  Jason Merrill  <jason@redhat.com>
4674
4675         PR c++/15745
4676         * except.c (prepare_eh_type): Use type_decays_to.
4677
4678         PR c++/15097
4679         * init.c (build_delete): Use build_headof to get the address of the
4680         complete object if we aren't using the deleting destructor.
4681         * rtti.c (build_headof): No longer static.
4682         * cp-tree.h: Declare it.
4683
4684 2007-09-06  Jakub Jelinek  <jakub@redhat.com>
4685
4686         * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
4687         decl if a prototype for XX is provided with throw().
4688
4689         PR c++/33289
4690         * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
4691         on __*_chk non-__builtin_* decls.
4692
4693 2007-09-05  Paolo Carlini  <pcarlini@suse.de>
4694
4695         PR c++/30302
4696         * semantics.c (finish_id_expression): Use context_for_name_lookup
4697         insted of DECL_CONTEXT, to see through anonymous structs and unions.
4698         * class.c (finish_struct_anon): Deal correctly with anonymous
4699         structs (vs unions, as GNU extension) in error messages.
4700
4701 2007-09-05  Jan Hubicka  <jh@suse.cz>
4702
4703         * sematics.c (expand_body): Remove unnecesary import_export_decl
4704         call, DECL_EXTERNAL checks and current_function_decl saving.
4705
4706 2007-09-05  Paolo Carlini  <pcarlini@suse.de>
4707
4708         PR c++/29731 (again)
4709         * parser.c (cp_parser_primary_expression): Return error_mark_node
4710         when a statement-expression is found in a template-argument list.
4711
4712 2007-09-04  Jason Merrill  <jason@redhat.com>
4713
4714         * except.c (initialize_handler_parm): Use
4715         fold_build_cleanup_point_expr.
4716
4717         PR c++/31419
4718         * call.c (reference_binding): Don't look for user-defined conversions
4719         to the same type.
4720
4721         PR c++/31411
4722         * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
4723         the MUST_NOT_THROW_EXPR.
4724
4725 2007-09-04  Richard Sandiford  <richard@codesourcery.com>
4726
4727         * decl.c (cp_finish_decl): Call determine_visibility before
4728         make_rtl_for_nonlocal_decl.
4729
4730 2007-09-04  Jason Merrill  <jason@redhat.com>
4731
4732         PR c++/14032
4733         * pt.c (most_specialized_class): Substitute outer template
4734         arguments into the arguments of a member template partial
4735         specialization.
4736         (strip_innermost_template_args): New fn.
4737
4738 2007-09-03  Daniel Jacobowitz  <dan@codesourcery.com>
4739
4740         * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
4741
4742 2007-09-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4743
4744         * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
4745         * decl.c (cp_make_fname_decl): Likewise,
4746         * parser.c (cp_parser_string_literal): Likewise,
4747         * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
4748         * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
4749         Likewise,
4750
4751 2007-09-02  Paolo Carlini  <pcarlini@suse.de>
4752
4753         PR c++/33208
4754         * typeck.c (build_unary_op): Fix error message for
4755         Boolean expression as operand to operator--.
4756
4757 2007-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4758
4759         * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
4760         * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
4761         Likewise.
4762
4763 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
4764
4765         PR c++/32597
4766         * init.c (build_default_init): Make extern.
4767         * cp-tree.h (build_default_init): Declare here.
4768         * pt.c (tsubst_expr): When the instantiation of the initializer of
4769         a variable results in an empty list, default-initialize the
4770         variable.
4771         (tsubst_copy_and_build): When the instantiation of the initializer
4772         in a new expression results in an empty initializer list,
4773         default-initialize it.
4774
4775 2007-08-31  Douglas Gregor  <doug.gregor@gmail.com>
4776
4777         * mangle.c (write_type): Change mangling of rvalue reference from
4778         `RR' to `O'.
4779
4780 2007-08-31  Jakub Jelinek  <jakub@redhat.com>
4781
4782         * decl.c (duplicate_decls): Remove duplicated line.
4783
4784 2007-08-31  Paolo Carlini  <pcarlini@suse.de>
4785
4786         PR c++/33210
4787         * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
4788         BOUND_TEMPLATE_TEMPLATE_PARM.
4789
4790 2007-08-31  Paolo Carlini  <pcarlini@suse.de>
4791
4792         PR c++/32113
4793         * search.c (lookup_member): Check the name argument for
4794         error_mark_node.
4795
4796 2007-08-31  Paolo Carlini  <pcarlini@suse.de>
4797
4798         PR c++/33212
4799         * parser.c (cp_parser_trait_expr): Check rerurn value of
4800         cp_parser_type_id.
4801
4802 2007-08-30  Ollie Wild  <aaw@google.com>
4803
4804         * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
4805         convert_ptrmem for pointer to member conversions.
4806         (convert_to_pointer_force): Update cp_convert_to_pointer call.
4807         (ocp_convert): Update cp_convert_to_pointer call.
4808         * typeck.c (convert_ptrmem): Add conditional for null pointers to
4809         members.
4810         (build_static_cast_1): Check can_convert for conversions in either
4811         direction.
4812         (get_delta_difference_1): New function.
4813         (get_delta_difference): Refactor to call get_delta_difference_1.
4814
4815 2007-08-30  Jakub Jelinek  <jakub@redhat.com>
4816
4817         * decl.c (start_preparsed_function): Set
4818         DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
4819
4820 2007-08-28  Paolo Carlini  <pcarlini@suse.de>
4821
4822         PR c++/33209
4823         * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
4824         BOUND_TEMPLATE_TEMPLATE_PARM.
4825
4826 2007-08-28  Jakub Jelinek  <jakub@redhat.com>
4827
4828         PR c++/32596
4829         PR c++/32400
4830         * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
4831         and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
4832
4833 2007-08-27  Jason Merrill  <jason@redhat.com>
4834
4835         PR c++/29000
4836         * pt.c (build_non_dependent_expr, type_dependent_expression_p):
4837         Look inside STMT_EXPR.
4838         * semantics.c (stmt_expr_value_expr): New fn.
4839         * cp-tree.h: Declare it.
4840
4841         PR c++/28558
4842         * decl.c (groktypename): Ignore attributes applied to class type.
4843
4844 2007-08-28  Richard Guenther  <rguenther@suse.de>
4845
4846         * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
4847
4848 2007-08-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4849
4850         * error.c (dump_expr): Handle COMPLEX_CST.
4851         * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
4852         (pp_cxx_expression): Likewise.
4853
4854 2007-08-27  Alexandre Oliva  <aoliva@redhat.com>
4855
4856         * decl.c (GNU_INLINE_P): New.
4857         (duplicate_decls): Handle gnu_inline.  Merge attributes and
4858         some flags in overriding definitions.
4859         (redeclaration_error_message): Handle gnu_inline.
4860         (start_preparsed_function): Likewise.
4861
4862 2007-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4863
4864         * call.c (sufficient_parms_p): Constify.
4865         * class.c (same_signature_p): Likewise.
4866         * cp-gimplify.c (is_invisiref_parm,
4867         cxx_omp_privatize_by_reference): Likewise.
4868         * cp-objcp-common.c (has_c_linkage): Likewise.
4869         * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
4870         sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
4871         grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
4872         num_artificial_parms_for, comp_template_parms,
4873         template_parameter_pack_p, any_dependent_template_arguments_p,
4874         any_type_dependent_arguments_p, any_value_dependent_elements_p,
4875         repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
4876         zero_init_p, member_p, cp_lvalue_kind,
4877         builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
4878         varargs_function_p, is_dummy_object, special_function_kind,
4879         string_conv_p, type_unknown_p, comp_except_specs, compparms,
4880         comp_cv_qualification, is_bitfield_expr_with_lowered_type,
4881         unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
4882         cp_has_mutable_p, at_least_as_qualified_p,
4883         invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
4884         * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
4885         * except.c (nothrow_libfn_p): Likewise.
4886         * method.c (skip_artificial_parms_for, num_artificial_parms_for):
4887         Likewise.
4888         * pt.c (comp_template_parms, template_parameter_pack_p,
4889         any_type_dependent_arguments_p, any_value_dependent_elements_p,
4890         any_dependent_template_arguments_p): Likewise.
4891         * repo.c (repo_export_class_p): Likewise.
4892         * semantics.c (anon_aggr_type_p): Likewise.
4893         * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
4894         builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
4895         varargs_function_p, member_p, is_dummy_object, pod_type_p,
4896         zero_init_p, special_function_p): Likewise.
4897         * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
4898         comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
4899         compparms, invalid_nonstatic_memfn_p,
4900         is_bitfield_expr_with_lowered_type, unlowered_expr_type,
4901         string_conv_p, ptr_reasonably_similar, cp_type_readonly,
4902         cp_has_mutable_p, lvalue_or_else): Likewise.
4903
4904 2007-08-25  Paolo Bonzini  <bonzini@gnu.org>
4905
4906         * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
4907         * cp-objcp-common.c (cp_tree_size): Ditto.
4908         * tree.c (cp_walk_subtrees): Ditto
4909         * cp-tree.def (TINST_LEVEL): Go away.
4910         * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
4911         move together with other non-tree structs.
4912         (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
4913         (union lang_tree_node): Eliminate tinst_level field.
4914         (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
4915         (current_instantiation, outermost_tinst_level): Return
4916         a "struct tinst_level *".
4917
4918         * error.c (print_instantiation_partial_context): Change second
4919         parameter to a "struct tinst_level *".  Replace accessor macros
4920         with field access.
4921         (print_instantiation_full_context): Likewise.
4922         * lex.c (in_main_input_context): Likewise.
4923
4924         * pt.c (struct pending_templates): New.
4925         (pending_templates, last_pending_template): Use it as a type.
4926         (current_tinst_level): Change typo to "struct tinst_level *"
4927         (reopen_tinst_level): Accept "struct tinst_level *", return decl.
4928         (add_pending_template): Construct a "struct pending_template".
4929         Replace TINST_LEVEL accessor macros with field access.
4930         (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
4931         (pop_tinst_level): Likewise.
4932         (instantiate_pending_templates): Likewise.  Factor common code used
4933         when an instantiation has been done.
4934         (outermost_tinst_level): Replace tree_last with loop.
4935         (current_instantiation): Return a "struct tinst_level *".
4936
4937 2007-08-24  Ollie Wild  <aaw@google.com>
4938
4939         * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
4940         * name-lookup.h (cp_binding_level): Remove vtables member.
4941
4942 2007-08-24  Richard Guenther  <rguenther@suse.de>
4943
4944         * tree.c (cp_cannot_inline_tree_fn): Remove.
4945         * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
4946         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
4947         Remove define.
4948
4949 2007-08-24  Jakub Jelinek  <jakub@redhat.com>
4950
4951         PR c++/32567
4952         * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
4953         error_mark_node right away if build_expr_type_conversion
4954         returned it.
4955
4956         PR c++/32898
4957         * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
4958         is error_mark_node rather than NULL_TREE.
4959         * pt.c (check_explicit_specialization): Likewise.
4960
4961         PR c++/31941
4962         * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
4963         TARGET_VTABLE_USES_DESCRIPTORS targets properly.
4964
4965 2007-08-22  Jason Merrill  <jason@redhat.com>
4966
4967         PR c++/29365
4968         * pt.c (outermost_tinst_level): New function.
4969         * lex.c (in_main_input_context): New function.
4970         * cp-tree.h: Declare it.
4971         * decl2.c (constrain_class_visibility): Use it to avoid warning
4972         about uses of the anonymous namespace in the main input file.
4973
4974 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
4975
4976         * init.c (build_new_1): Use get_target_expr instead of save_expr.
4977
4978 2007-08-20  Pawel Sikora  <pluto@pld-linux.org>
4979
4980         PR c++/7302
4981         * class.c (finish_struct_1): Warn when a class has virtual
4982         functions and accessible non-virtual destructor.
4983
4984 2007-08-20  Richard Guenther  <rguenther@suse.de>
4985
4986         PR c++/22369
4987         PR c++/22451
4988         * call.c (build_new_method_call): Convert initializer to
4989         the basetype.
4990         * init.c (build_aggr_init): Do not fiddle with types.
4991         (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
4992         * except.c (build_throw): Do not drop qualifiers for the
4993         pointer type.
4994         * typeck.c (get_member_function_from_ptrfunc): Do not
4995         fiddle with types, instead convert.
4996         (build_ptrmemfunc1): Convert to the target type for
4997         initialization.
4998         (gfc_trans_allocate): Convert result to target type.
4999         * cp-objcp-common.c (cxx_get_alias_set): Pointers to
5000         pointer-to-member structures shall have alias set zero as well.
5001
5002 2007-08-20  Richard Guenther  <rguenther@suse.de>
5003
5004         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
5005         Remove.
5006         * cp-tree.h (cp_auto_var_in_fn_p): Remove.
5007         (nonstatic_local_decl_p): Likewise.
5008         * tree.c (cp_auto_var_in_fn_p): Remove.
5009         * decl.c (nonstatic_local_decl_p): Remove.
5010
5011 2007-08-20  Richard Guenther  <rguenther@suse.de>
5012
5013         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
5014         Remove define.
5015         * tree.h (cp_walk_tree): New define to walk_tree_1 with
5016         cp_walk_subtrees lh parameter.
5017         (cp_walk_tree_without_duplicates): New define to
5018         walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
5019         * tree.c (count_trees): Call
5020         cp_walk_tree_without_duplicates.
5021         (verify_stmt_tree): Call cp_walk_tree.
5022         (break_out_target_exprs): Likewise.
5023         (WALK_SUBTREE): Likewise.
5024         * cp-gimplify.c (cp_genericize): Likewise.
5025         * cp-pt.c (find_parameter_packs_r): Likewise.
5026         (uses_parameter_packs): Likewise.
5027         (make_pack_expansion): Likewise.
5028         (check_for_bare_parameter_packs): Likewise.
5029         (for_each_template_parm): Likewise.
5030         * decl.c (check_default_argument): Call
5031         cp_walk_tree_without_duplicates.
5032         * except.c (build_throw): Likewise.
5033         * decl2.c (type_visibility): Likewise.
5034         * semantics.c (expand_or_defer_fn): Likewise.
5035         (finalize_nrv): Call cp_walk_tree.
5036
5037 2007-08-20  Jakub Jelinek  <jakub@redhat.com>
5038
5039         PR c++/33025
5040         * init.c (build_new_1): Rename placement_var variable to placement_expr.
5041         Initialize it with save_expr rather than get_temp_regvar.
5042
5043 2007-08-17  Andrew Pinski  <andrew_pinski@playstation.sony.com>
5044
5045         PR c++/28989
5046         * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
5047         lvalues.
5048
5049 2007-08-17  Ollie Wild  <aaw@google.com>
5050
5051         PR c++/31749
5052         * name-lookup.c (do_nonmember_using_decl): Shift implicit type
5053         declarations into appropriate slots for comparison.  Fix type
5054         comparison.
5055
5056 2007-08-17  Paolo Carlini  <pcarlini@suse.de>
5057
5058         PR c++/32112
5059         * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
5060         * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
5061
5062 2007-08-17  Paolo Carlini  <pcarlini@suse.de>
5063
5064         PR c++/32870
5065         * parser.c (cp_parser_class_head): Improve error message.
5066
5067 2007-08-16  Seongbae Park  <seongbae.park@gmail.com>
5068
5069         * pt.c (instantiate_decl): Set input_location
5070         for the function end.
5071
5072 2007-08-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5073
5074         * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
5075         Constify.
5076         * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
5077         class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
5078         cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
5079         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
5080         * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
5081         * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
5082         * typeck.c (cp_type_quals): Likewise.
5083         * typeck2.c (cxx_incomplete_type_diagnostic,
5084         cxx_incomplete_type_error): Likewise.
5085
5086 2007-08-16  Paolo Carlini  <pcarlini@suse.de>
5087
5088         PR c++/31132
5089         * pt.c (tsubst_friend_function): When check_classfn
5090         returns error_mark_node likewise return it.
5091
5092 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
5093
5094         PR c++/32992
5095         * typeck.c (check_return_expr): Don't NRV optimize vars in
5096         anonymous unions.
5097         * decl.c (finish_function): Comment fix.
5098
5099 2007-08-15  Paolo Carlini  <pcarlini@suse.de>
5100
5101         PR c++/33035
5102         * pt.c (push_template_decl_real): Depending on TYPE_P
5103         use either TYPE_CONTEXT or DECL_CONTEXT.
5104
5105 2007-08-14  Mark Mitchell  <mark@codesourcery.com>
5106
5107         * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
5108         constructors and destructors return this.
5109
5110 2007-08-14  Paolo Carlini  <pcarlini@suse.de>
5111
5112         PR c++/27211
5113         * decl2.c (check_classfn): Return error_mark_node in case of error;
5114         in that case, do not call add_method.
5115         * decl.c (start_decl): Deal with check_classfn returning
5116         error_mark_node.
5117         (grokfndecl): Likewise.
5118         * pt.c (tsubst_friend_function): Likewise.
5119
5120 2007-08-14  Andrew Pinski  <pinskia@gmail.com>
5121
5122         PR c++/30428
5123         * typeck.c (build_binary_op): Disallow vector float types with
5124         BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
5125
5126 2007-08-11  Ian Lance Taylor  <iant@google.com>
5127
5128         * cp-objcp-common.c (cxx_get_alias_set): Change return type to
5129         alias_set_type.
5130         * cp-tree.h (cxx_get_alias_set): Update declaration.
5131
5132 2007-08-10  Ollie Wild  <aaw@google.com>
5133
5134         * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
5135         type lookups.
5136         (ambiguous_decl): Construct tree of ambiguous types.  Remove extaneous
5137         function parameter.
5138         (unqualified_namespace_lookup): Fix ambiguous_decl call.
5139         (lookup_using_namespace): Fix ambiguous_decl call.
5140         (qualified_lookup_using_namespace): Fix ambiguous_decl call.
5141
5142 2007-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5143
5144         * call.c (name_as_c_string): Use CONST_CAST.
5145         * decl.c (build_decl): Likewise.
5146         * parser.c (cp_parser_string_literal): Likewise.
5147
5148 2007-08-10  Paolo Carlini  <pcarlini@suse.de>
5149
5150         PR c++/17763
5151         * error.c (dump_expr): Consistently use the *_cxx_*
5152         variants of the pretty-print functions.
5153
5154 2007-08-10  Paolo Carlini  <pcarlini@suse.de>
5155
5156         PR c++/22256
5157         * decl.c (check_special_function_return_type): Just error
5158         on return type specified for conversion operator.
5159
5160 2007-08-09  Daniel Berlin  <dberlin@dberlin.org>
5161
5162         * typeck2.c (readonly_error): Handle general expressions.
5163         * error.c (dump_expr): Handle POINTER_PLUS_EXPR
5164
5165 2007-08-06  Dan Hipschman  <dsh@google.com>
5166
5167         * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
5168         access function name.
5169
5170 2007-08-04  Alfred Minarik  <a.minarik@aon.at>
5171
5172         PR pch/13676
5173         * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
5174         * g++spec.c (lang_specific_driver): Check them.
5175
5176 2007-08-06  Paolo Carlini  <pcarlini@suse.de>
5177
5178         PR c++/19532
5179         * pt.c (inline_needs_template_parms): Fix comment; change return type
5180         to bool.
5181
5182 2007-08-05  Volker Reichelt  <v.reichelt@netcologne.de>
5183
5184         Revert:
5185         2007-03-26  Dirk Mueller  <dmueller@suse.de>
5186
5187         * parser.c (cp_parser_member_declaration): Pedwarn
5188         about stray semicolons after member declarations.
5189
5190 2007-08-02  Lee Millward  <lee.millward@gmail.com>
5191
5192         PR c++/30849
5193         PR c++/30850
5194         PR c++/30851
5195         * parser.c (cp_parser_asm_definition): Detect and discard asm
5196         statements with invalid inputs or outputs.
5197          (cp_parser_asm_operand_list): Return error mark node if any
5198          of the operands are invalid. Adjust documentation.
5199
5200 2007-08-02  Nick Clifton  <nickc@redhat.com>
5201
5202         * typeck.c: Change copyright header to refer to version 3 of the
5203         GNU General Public License and to point readers at the COPYING3
5204         file and the FSF's license web page.
5205         * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
5206         config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
5207         Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
5208         cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
5209         tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
5210         cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
5211         cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
5212         name-lookup.h, parser.c: Likewise.
5213
5214 2007-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5215
5216         PR middle-end/32668
5217         * call.c (magic_varargs_p): Honor the "type generic" attribute.
5218
5219 2007-07-30  Paolo Carlini  <pcarlini@suse.de>
5220
5221         PR c++/32108
5222         * semantics.c (finish_label_stmt): Reject the __label__
5223         extension outside function scopes.
5224
5225 2007-07-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5226
5227         * parser.c (eof_token): Un-constify.
5228         (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
5229         cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
5230         casts.
5231
5232 2007-07-28  Kazu Hirata  <kazu@codesourcery.com>
5233
5234         * pt.c, tree.c, typeck2.c: Fix comment typos.
5235
5236 2007-07-28  Simon Martin  <simartin@users.sourceforge.net>
5237             Mark Mitchell  <mark@codesourcery.com>
5238
5239         PR c++/30917
5240         * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
5241         hidden due to friend declarations in local classes.
5242
5243 2007-07-27  Douglas Gregor  <doug.gregor@gmail.com>
5244
5245         * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
5246         * cp-tree.def (DECLTYPE_TYPE): New.
5247         * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
5248         (dump_type_prefix): Ditto.
5249         (dump_type_suffix): Ditto.
5250         * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
5251         * mangle.c (write_type): Handle DECLTYPE_TYPE.
5252         * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
5253         types.
5254         (DECLTYPE_TYPE_EXPR): New.
5255         (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
5256         (finish_declared_type): Declare.
5257         * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
5258         DECLTYPE_TYPE nodes.
5259         (pp_cxx_type_id): Ditto.
5260         * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
5261         (tsubst): Substitute into a DECLTYPE_TYPE node.
5262         (tsubst_copy): Ditto.
5263         (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
5264         nodes.
5265         (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
5266         * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
5267         structural equality (because we can't hash the expressions).
5268         (finish_declared_type): New.
5269         * lex.c (reswords): Add "decltype" keyword.
5270         * parser.c cp_lexer_next_token_is_decl_specifier_keyword
5271         (cp_parser_postfix_expression): Add member_access_only_p to
5272         restrict postfix expression to member access expressions.
5273         (cp_parser_unary_expression): Update call to
5274         cp_parser_postfix_expression to reflect new parameter.
5275         (cp_parser_declared_type): New.
5276         (cp_parser_simple_type_specifier): Parse decltype types.
5277
5278 2007-07-27  Mark Mitchell  <mark@codesourcery.com>
5279
5280         PR c++/32346
5281         * call.c (convert_for_arg_passing): Only widen bitfields to their
5282         declared types if necessary.
5283
5284 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5285
5286         * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
5287         Constify.
5288
5289 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5290
5291         * decl.c (typename_hash, typename_compare): Constify.
5292         * mangle.c (hash_type, compare_type): Likewise.
5293         * pt.c (eq_local_specializations, hash_local_specialization):
5294         Likewise.
5295         * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
5296         list_hash): Likewise.
5297         * typeck2.c (pat_compare): Likewise.
5298
5299 2007-07-24  Nathan Sidwell  <nathan@codesourcery.com>
5300
5301         * method.c (implicitly_declare_fn): Increase alignment if member
5302         function pointer format requires it.
5303
5304 2007-07-24  Paolo Carlini  <pcarlini@suse.de>
5305
5306         PR c++/29001
5307         * typeck.c (check_return_expr): Do not pass a null argument
5308         to null_ptr_cst_p.
5309
5310 2007-07-24  Paolo Carlini  <pcarlini@suse.de>
5311
5312         PR c++/32561
5313         * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
5314         only on VAR_DECL.
5315
5316 2007-07-22  Nathan Sidwell  <nathan@codesourcery.com>
5317
5318         PR c++/32839
5319         * typeck.c (convert_arguments): Only use default args if we have
5320         a function decl.
5321
5322         PR c++/30818
5323         * typeck.c (structural_comptypes): No need to check
5324         resolve_typename_type return value here.
5325         * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
5326         * pt.c (resolve_typename_type): Follow typename typedefs.  Return
5327         original type rather than error_mark_node in case of failure.
5328         * parser.c (cp_parser_nested_name_specifier_opt): Adjust
5329         resolve_typename_type result check.
5330         (cp_parser_direct_declarator, cp_parser_head,
5331         cp_parser_constructor_declarator_p): Likewise.
5332
5333 2007-07-12  Kazu Hirata  <kazu@codesourcery.com>
5334
5335         * pt.c (template_parms_variadic_p): Remove.
5336         * cp-tree.h: Remove the prototype for template_parms_variadic_p.
5337
5338 2007-07-12  Jakub Jelinek  <jakub@redhat.com>
5339
5340         PR c++/30854
5341         * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
5342         argument to dump_aggr_init_expr_args instead of false.
5343
5344 2007-07-11  Douglas Gregor  <doug.gregor@gmail.com>
5345
5346         * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
5347         canonical types; otherwise, fall back to structural type
5348         comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
5349         internal compiler error if the canonical types are wrong.
5350
5351 2007-07-11  Paolo Carlini  <pcarlini@suse.de>
5352
5353         PR c++/32560
5354         * parser.c (cp_parser_make_indirect_declarator): When the
5355         the code argument is ERROR_MARK return cp_error_declarator.
5356
5357 2007-07-09  Geoffrey Keating  <geoffk@apple.com>
5358
5359         PR 32617
5360         * decl.c (cxx_init_decl_processing): Don't set
5361         force_align_functions_log.
5362         (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
5363         * typeck.c (cxx_alignof_expr): When alignof is used on a plain
5364         FUNCTION_DECL, return its alignment.
5365
5366 2007-07-09  Richard Guenther  <rguenther@suse.de>
5367
5368         * decl.c (start_preparsed_function): Do not promote return type.
5369
5370 2007-07-08  Paolo Carlini  <pcarlini@suse.de>
5371
5372         PR c++/30535
5373         * pt.c (unify): Never pass error_mark_node to template_decl_level.
5374
5375 2007-07-07  Mark Mitchell  <mark@codesourcery.com>
5376
5377         PR c++/32232
5378         * pt.c (resolve_overloaded_unification): Robustify.  Return a
5379         bool, not an int.
5380         (type_unification_real): Adjust accordingly.
5381
5382 2007-07-06  Richard Guenther  <rguenther@suse.de>
5383
5384         * init.c (build_new_1): Use the correct pointer type.
5385         * typeck2.c (build_m_component_ref): Likewise.
5386
5387 2007-07-05  Mark Mitchell  <mark@codesourcery.com>
5388
5389         PR c++/32245
5390         * init.c (build_zero_init): Always build an initializer for
5391         non-static storage.
5392         * typeck2.c (build_functional_cast): Use build_zero_init.
5393
5394         PR c++/32251
5395         * init.c (build_new_1): Always pass the allocation function to
5396         build_op_delete_call.
5397         * call.c (build_op_delete_call): Handle operator delete with a
5398         variable-argument list.  Do not issue an error when no matching
5399         deallocation function is available for a new operator.
5400
5401         PR c++/31992
5402         * cp-tree.h (any_value_dependent_elements_p): Declare it.
5403         * decl.c (value_dependent_init_p): New function.
5404         (cp_finish_decl): Use it.
5405         * pt.c (value_dependent_expression_p): Use
5406         any_value_dependent_elements_p.
5407         * parser.c (cp_parser_primary_expression): Add comment about
5408         treating dependent qualified names as integral
5409         constant-expressions.
5410
5411 2007-07-04  Douglas Gregor  <doug.gregor@gmail.com>
5412
5413         * decl.c (build_ptrmemfunc_type): Always use structural equality
5414         tests when comparing pointer-to-member-function types, because the
5415         handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
5416         types.
5417
5418 2007-07-03  Mark Mitchell  <mark@codesourcery.com>
5419
5420         * init.c (build_new): Tweak comment.
5421
5422 2007-06-29  Dave Brolley  <brolley@redhat.com>
5423
5424         PR c++/31743
5425         * parser.c (cp_parser_new_type_id): Don't reduce a named array
5426         type to its base type and number of elements here.
5427         * init.c (build_new): Call complete_type_or_else to ensure that the
5428         type is complete and to issue a diagnostic if it is not.
5429         (build_new_1): Don't call complete_type_or_else here.
5430
5431 2007-07-03  Richard Guenther  <rguenther@suse.de>
5432
5433         PR c++/32609
5434         * class.c (fixed_type_or_null): Re-lookup the hashtable slot
5435         after recursing.
5436
5437 2007-07-02  Simon Baldwin  <simonb@google.com>
5438
5439         * parser.c (cp_parser_elaborated_type_specifier): Added a warning
5440         for inner-style nested forward declarations that don't declare
5441         anything useful.
5442
5443 2007-07-02  Jakub Jelinek  <jakub@redhat.com>
5444
5445         PR c++/31748
5446         * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
5447         DECL_P in not a variable and appears more than once error messages.
5448
5449 2007-07-01  Ollie Wild  <aaw@google.com>
5450
5451         * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
5452         (select_decl): Remove function.
5453         (unqualified_namespace_lookup): Populate binding by calling
5454         ambiguous_decl.  Remove select_decl call.
5455         (lookup_qualified_name): Remove select_decl call.
5456         * decl.c (lookup_and_check_tag): Check for ambiguous references.
5457         * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
5458         generation when name lookup is ambiguous.
5459
5460 2007-06-29  Douglas Gregor  <doug.gregor@gmail.com>
5461
5462         PR c++/31724
5463         * init.c (build_new_1): Use structural equality on the copy of the
5464         array type.
5465
5466 2007-06-28  Geoffrey Keating  <geoffk@apple.com>
5467
5468         * decl2.c (determine_visibility): Implement
5469         flag_visibility_ms_compat effect on type info.
5470         * decl.c (cxx_init_decl_processing): Implement
5471         global effect of flag_visibility_ms_compat.
5472
5473 2007-06-28  Geoffrey Keating  <geoffk@apple.com>
5474
5475         * decl2.c (start_objects): Mark constructor-running function
5476         as artificial.
5477
5478 2007-06-26  Simon Martin  <simartin@users.sourceforge.net>
5479
5480         PR c++/32111
5481         * decl.c (grokdeclarator): Reset friendp for member functions declared
5482         friend of their own class.
5483
5484 2007-06-23  Mark Mitchell  <mark@codesourcery.com>
5485
5486         * decl2.c (determine_visibility): Don't look for dllexport here.
5487         (determine_visibility_from_class): Tidy.
5488
5489 2007-06-18  Simon Baldwin <simonb@google.com>
5490
5491         PR c++/31923
5492         * parser.c (cp_parser_single_declaration): Added check for storage
5493         class other than sc_none in parsed declaration, and a flag to indicate
5494         if the call is part of an explicit template specialization parse.
5495         * (cp_parser_explicit_specialization): Specialization check flag added
5496         to call to cp_parser_single_declaration(), set true.
5497         * (cp_parser_template_declaration_after_export): Specialization check
5498         flag added to call to cp_parser_single_declaration(), set false.
5499         * pt.c (check_explicit_specialization): Added code to copy visiblity
5500         and linkage from the templated function to the explicit specialization.
5501
5502 2007-06-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
5503
5504         * typeck.c (build_binary_op): For templates build the
5505         expression in pieces to avoid the assert in build2_stat.
5506         (get_member_function_from_ptrfunc):
5507         Change over to using POINTER_PLUS_EXPR and convert
5508         the second operand to sizetype.
5509         * typeck2.c (build_m_component_ref):  Likewise.
5510         * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
5511         instead of PLUS_EXPR for pointers.
5512         (build_new_1): Likewise.
5513         (build_vec_delete_1): Likewise.
5514         (build_vec_delete): Likewise.
5515         * class.c (build_base_path): Likewise.
5516         (build_base_path): Likewise.
5517         (convert_to_base_statically): Likewise.
5518         (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
5519         (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
5520         instead of PLUS_EXPR.
5521         (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
5522         instead of PLUS_EXPR for pointers.
5523         * call.c (build_special_member_call): Likewise.
5524         * rtti.c (build_headof): Likewise.
5525         Use sizetype instead of ptrdiff_type_node.
5526         (tinfo_base_init): Create a POINTER_PLUS_EXPR
5527         instead of PLUS_EXPR for pointers.
5528         * except.c (expand_start_catch_block):  Do a
5529         NEGATIVE and then a POINTER_PLUS_EXPR instead
5530         of a MINUS_EXPR.
5531         * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
5532         PLUS_EXPR on pointer types over to use
5533         POINTER_PLUS_EXPR and remove the conversion
5534         to the pointer types.
5535         * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
5536         adding to a pointer type. Use size_int instead of
5537         ssize_int. Convert the index to sizetype before
5538         adding it to the pointer.
5539
5540 2007-06-15  Mark Mitchell  <mark@codesourcery.com>
5541
5542         * cp-tree.h (DECL_VAR_MARKED_P): Remove.
5543         (DECL_ANON_UNION_VAR_P): New macro.
5544         * class.c (fixed_type_or_null): Tidy.  Use a hash table, rather
5545         than DECL_VAR_MARKED_P, to keep track of which variables we have
5546         seen.
5547         * decl.c (redeclaration_error_message): Complain about redeclaring
5548         anonymous union members at namespace scope.
5549         * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
5550
5551 2007-06-14  Geoff Keating  <geoffk@apple.com>
5552
5553         * decl2.c (determine_visibility): Ensure that functions with
5554         hidden types as parameters are hidden.
5555
5556         PR 31093
5557         * decl2.c (determine_visibility): Remove duplicate code for
5558         handling type info.
5559
5560 2007-06-12  Ian Lance Taylor  <iant@google.com>
5561
5562         PR libstdc++/29286
5563         * init.c (avoid_placement_new_aliasing): New static function.
5564         (build_new_1): Call it.
5565
5566 2007-06-11  Rafael Ávila de Espíndola  <espindola@google.com>
5567
5568         * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
5569         (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
5570
5571 2007-06-08  Jakub Jelinek  <jakub@redhat.com>
5572
5573         PR c++/32177
5574         * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
5575         on init, the non-decl cond operand and increment value.
5576
5577 2007-06-07  Simon Martin  <simartin@users.sourceforge.net>
5578
5579         PR c++/30759
5580         * decl.c (check_initializer): Report an error when a brace enclosed
5581         initializer is used for a non-aggregate type in C++98.
5582         (redeclaration_error_message): Rewrote flag_cpp0x in terms of
5583         cxx_dialect.
5584         (grokdeclarator): Likewise.
5585         (move_fn_p): Likewise.
5586         * typeck.c (check_return_expr): Likewise.
5587         * call.c (reference_binding): Likewise.
5588         * error.c (cp_cpp_error): Likewise.
5589         * pt.c (check_default_tmpl_args): Likewise.
5590         (tsubst): Likewise.
5591         * lex.c (init_reswords): Likewise.
5592         * parser.c (p_parser_primary_expression): Likewise.
5593         (TOKEN_PRECEDENCE): Likewise.
5594         (cp_parser_init_declarator): Likewise.
5595         (cp_parser_ptr_operator): Likewise.
5596         (cp_parser_parameter_declaration): Likewise.
5597         (cp_parser_enclosed_template_argument_list): Likewise.
5598         (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
5599         (cp_parser_next_token_ends_template_argument_p): Likewise.
5600
5601 2007-06-04  Simon Baldwin  <simonb@google.com>
5602
5603         * decl.c (grokdeclarator): Readability change.  Moved case labels
5604         into direct switch statement scope.
5605
5606 2007-06-04  Paolo Carlini  <pcarlini@suse.de>
5607
5608         * call.c (convert_like_real): Remove pointless code.
5609
5610 2007-05-31  Mark Mitchell  <mark@codesourcery.com>
5611
5612         * decl.c (get_atexit_fn_ptr_type): New function.
5613         (get_atexit_node): Use it.
5614         (start_cleanup_fn): Likewise.
5615         (register_dtor_fn): Use the object's destructor, instead of a
5616         separate cleanup function, where possible.
5617         * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
5618         (atexit_fn_ptr_type_node): New macro.
5619         * decl2.c (build_cleanup): Use build_address.
5620
5621 2007-05-31  Daniel Berlin  <dberlin@dberlin.org>
5622
5623         * typeck.c (build_binary_op): Include types in error.
5624
5625 2007-05-31  Jakub Jelinek  <jakub@redhat.com>
5626
5627         PR c++/31806
5628         * decl.c (cp_finish_decl): Also clear was_readonly if a static var
5629         needs runtime initialization.
5630
5631 2007-05-31  Paolo Carlini  <pcarlini@suse.de>
5632
5633         PR c++/32158
5634         * semantics.c (finish_trait_expr): Complete the types.
5635
5636 2007-05-30  Russell Yanofsky <russ@yanofsky.org>
5637              Douglas Gregor <doug.gregor@gmail.com>
5638              Pedro Lamarao <pedro.lamarao@mndfck.org>
5639              Howard Hinnant <howard.hinnant@gmail.com>
5640
5641         PR c++/7412
5642         PR c++/29939
5643         * typeck.c (comptypes): Don't consider rvalue and lvalue
5644         reference types to be equivalent.
5645         (check_return_expr): Move from certain lvalues when returning
5646         them.
5647         * decl.c (grokdeclarator): Implement reference collapsing.
5648         (copy_fn_p): Don't consider constructors taking rvalue references
5649         to be copy constructors.
5650         (move_fn_p): New.
5651         * call.c (conversion): New "rvaluedness_matches_p" member.
5652         (convert_class_to_reference): Require reference type as first
5653         parameter instead of base type.
5654         (reference_binding): Add logic to handle rvalue references.
5655         (implicit_conversion): Update inaccurate comment.
5656         (convert_like_real): Disable creation of temporaries that are
5657         impossible to initialize for types with move constructors.
5658         (build_over_call): Elide move constructors when possible.
5659         (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
5660         (maybe_handle_ref_bind): Return conversion instead of type node.
5661         (compare_ics): Add logic to use "rvaluedness_matches_p" values to
5662         determine preferred conversion sequences.
5663         * cp-tree.h (TYPE_REF_IS_RVALUE): New.
5664         (LOOKUP_PREFER_RVALUE): New.
5665         (DECL_MOVE_CONSTRUCTOR_P): New.
5666         (struct cp_declarator): Add "reference" member for reference
5667         types, with new "rvalue_ref" flag.
5668         (cp_build_reference_type): Declare.
5669         (move_fn_p): Declare.
5670         * error.c (dump_type_prefix): Format rvalue reference types
5671         correctly in error messages.
5672         * except.c (build_throw): Move from certain lvalues when
5673         throwing.
5674         * mangle.c (write_type): Mangle rvalue references differently
5675         than regular references.
5676         * parser.c (make_reference_declarator): Add boolean parameter for
5677         rvalue references.
5678         (cp_parser_make_indirect_declarator): New.
5679         (cp_parser_new_declarator_opt): Call
5680         cp_parser_make_indirect_declarator.
5681         (cp_parser_conversion_declarator_opt): Ditto.
5682         (cp_parser_declarator): Ditto.
5683         (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
5684         declarators.
5685         * pt.c (tsubst): Implement reference collapsing.
5686         (maybe_adjust_types_for_deduction): Implement special template
5687         parameter deduction rule for rvalue references.
5688         (type_unification_real): Update calls to
5689         maybe_adjust_types_for_deduction.
5690         (try_one_overload): Ditto.
5691         (unify_pack_expansion): Ditto.
5692         * tree.c (lvalue_p_1): Handle rvalue reference types.
5693         (cp_build_reference_type): New.
5694
5695 2007-05-30  Jakub Jelinek  <jakub@redhat.com>
5696
5697         PR c++/31809
5698         * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
5699         variables that need runtime initialization.
5700
5701 2007-05-28  Andrew Pinski  <Andrew_pinski@playstation.sony.com>
5702
5703         PR c++/31339
5704         * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
5705         case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
5706         case POSTDECREMENT_EXPR>): Return the error_mark_node
5707         if either the real or imaginary parts would an
5708         error_mark_node.
5709
5710 2007-05-25  Simon Martin  <simartin@users.sourceforge.net>
5711             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
5712
5713         PR c++/31745
5714         * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
5715         token is a closing brace, false if there are no tokens left.
5716         (cp_parser_namespace_alias_definition): Only consume the next token if
5717         it is a closing brace.
5718
5719         * parser.c (cp_parser_class_specifier): Likewise.
5720
5721 2007-05-25  H.J. Lu  <hongjiu.lu@intel.com>
5722
5723         * semantics.c (finish_member_declaration): Fix a typo in the
5724         last checkin.
5725
5726 2007-05-25  Douglas Gregor <doug.gregor@gmail.com>
5727
5728         PR c++/31431
5729         PR c++/31432
5730         PR c++/31434
5731         PR c++/31435
5732         PR c++/31437
5733         PR c++/31438
5734         PR c++/31442
5735         PR c++/31443
5736         PR c++/31444
5737         PR c++/31445
5738         * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
5739         * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
5740         * pt.c (check_for_bare_parameter_packs): Return bool indicated
5741         whether everything was okay. Fix indentation.
5742         (push_template_decl_real): Check for bare parameter packs in
5743         function parameters; where errors occur, mark the parameter types
5744         with ERROR_MARK_NODEs to avert ICEs.
5745         (coerce_template_parameter_pack): New.
5746         (coerce_template_parms): Moved parameter pack coercion into
5747         coerce_template_parameter_pack, and permit it anywhere in the
5748         template parameter list (not just at the end). Parameter and
5749         argument indices can vary (somewhat) separately now, so add
5750         PARM_IDX and ARG_IDX.
5751         (fn_type_unification): Don't set an argument pack as incomplete if
5752         no argument pack was deduced.
5753         (type_unification_real): If a type parameter is a parameter pack
5754         and has not otherwise been deduced, it will be deduced to an empty
5755         parameter pack.
5756         (more_specialized_fn): Use the actual lengths of the argument
5757         lists when comparing against expansions.
5758         * semantics.c (finish_member_declaration): If a field's type has
5759         bare parameter packs, error and set its type to ERROR_MARK_NODE.
5760
5761 2007-05-24  Danny Smith  <dannysmith@users.sourceforge.net>
5762
5763         PR target/27067
5764         * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
5765
5766 2007-05-22  Ollie Wild  <aaw@google.com>
5767
5768         * name-lookup.c (ambiguous_decl): Adds check for hidden types.
5769         (unqualified_namespace_lookup): Adds check for hidden types.
5770
5771 2007-05-22  Ollie Wild  <aaw@google.com>
5772
5773         * decl.c (duplicate_decls): Verify namespace names are unique.
5774
5775 2007-05-21  Mark Mitchell  <mark@codesourcery.com>
5776
5777         * decl.c (cxx_maybe_build_cleanup): Handle
5778         __attribute__((cleanup)).
5779
5780 2007-05-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
5781
5782         * cvt.c (cp_convert_and_check): Don't check warnings if the
5783         conversion failed.
5784
5785 2007-05-18  Geoffrey Keating  <geoffk@apple.com>
5786
5787         * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
5788
5789 2007-05-14  Paolo Carlini  <pcarlini@suse.de>
5790
5791         PR c++/29928
5792         * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
5793         type only if is a class type (5.2.8/4).
5794
5795 2007-05-14  Rafael Ávila de Espíndola  <espindola@google.com>
5796
5797         * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
5798         * decl.c (grokdeclarator): Use unsigned_type_for instead of
5799         c_common_unsigned_type.
5800
5801 2007-05-11  Silvius Rus  <rus@google.com>
5802
5803         * typeck.c (build_indirect_ref): Add call to
5804         strict_aliasing_warning.
5805         (build_reinterpret_cast_1): Condition call to
5806         strict_aliasing_warning.
5807
5808 2007-05-11  Jan Hubicka  <jh@suse.cz>
5809
5810         * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
5811         * decl2.c (start_objects): ctors and dtors are no longer public.
5812         (cp_write_global_declarations): Do not call c_build_cdtor_fns.
5813
5814 2007-05-07  Andrew Pinski  <andrew_pinski@playstation.sony.com>
5815
5816         * typeck.c (build_unary_op): Remove code that used to
5817         handle non lvalue increments/decrements.
5818
5819 2007-05-07  Mike Stump  <mrs@apple.com>
5820
5821         * parser.c (check_empty_body): Add.
5822         (cp_parser_iteration_statement): Add call to check_empty_body.
5823
5824 2007-05-05  Geoffrey Keating  <geoffk@apple.com>
5825
5826         PR 31775
5827         * mangle.c (write_mangled_name): Mangle static variable names.
5828         (write_unqualified_name): Use local-source-name for
5829         namespace-scope static variables.
5830
5831 2007-05-04  Dirk Mueller  <dmueller@suse.de>
5832
5833         * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
5834         not in effect.
5835
5836 2007-05-02  Seongbae Park  <seongbae.park@gmail.com>
5837
5838         PR c++/31663
5839         * decl2.c (constrain_class_visibility):
5840         Use strip_pointer_or_array_types instead of strip_array_types.
5841
5842 2007-04-28  Andrew Pinski  <andrew_pinski@playstation.sony.com>
5843
5844         PR C++/30221
5845         * decl.c (reshape_init_r): Don't reshape the first element if it
5846         is a pointer to member function.
5847
5848 2007-04-27  Simon Baldwin  <simonb@google.com>
5849
5850         * decl.c (grokparms): Changed message format from %qD to %qE.
5851
5852 2007-04-27  Douglas Gregor  <doug.gregor@gmail.com>
5853
5854         * error.c (maybe_warn_variadic_templates): Variadic templates are
5855         now in C++0x, so only warn about them in C++98 mode.
5856
5857 2007-04-26  Andrew Pinski  <andrew_pinski@playstation.sony.com>
5858
5859         PR C++/30016
5860         * typeck.c (build_reinterpret_cast_1): Only allow conversion to
5861         integeral types from vectors types.
5862
5863 2007-04-26  Jakub Jelinek  <jakub@redhat.com>
5864
5865         PR c++/31598
5866         * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
5867         for type dependent OMP_CLAUSE_DECLs.
5868
5869 2007-04-24  Mark Mitchell  <mark@codesourcery.com>
5870
5871         PR c++/31338
5872         * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
5873         * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
5874         COMPLEX_TYPE is now an ARITHMETIC_TYPE.
5875         * init.c (build_zero_init): Adjust, as
5876         COMPLEX_TYPE is now a SCALAR_TYPE.
5877         * typeck2.c (digest_init): Allow brace-enclosed initializers for
5878         COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
5879
5880 2007-04-25  Paolo Carlini  <pcarlini@suse.de>
5881
5882         * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
5883         per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
5884         (trait_expr_value): Adjust.
5885
5886 2007-04-23  Simon Baldwin  <simonb@google.com>
5887
5888         * decl.c (grokparms): Added new error for duplicate function
5889         parameters names in function prototypes, to match gcc behavior.
5890
5891 2007-04-23  Jan Hubicka  <jh@suse.cz>
5892
5893         * decl2.c (finish_objects): Do not call target constructor/destructor
5894         bits dirrectly.
5895
5896 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
5897
5898         * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
5899         instead of checking GIMPLE_STMT_P in chain_next.
5900
5901 2007-04-17  Mark Mitchell  <mark@codesourcery.com>
5902
5903         PR c++/31513
5904         * call.c (convert_for_arg_passing): Convert bitfields to their
5905         declared types.
5906
5907 2007-04-17  Simon Martin  <simartin@users.sourceforge.net>
5908
5909         PR c++/31517
5910         * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
5911
5912 2007-04-16  Seongbae Park <seongbae.park@gmail.com>
5913
5914         PR c++/29365
5915         * decl2.c (constrain_class_visibility):
5916         Do not warn about the use of anonymous namespace in the main input file.
5917
5918 2007-04-15  Mark Mitchell  <mark@codesourcery.com>
5919
5920         * cp-tree.h (current_template_parms): Fix typo in comment.
5921
5922 2007-04-15  Kazu Hirata  <kazu@codesourcery.com>
5923
5924         * cp-tree.h, error.c: Fix comment typos.
5925
5926 2007-04-13  Jason Merrill  <jason@redhat.com>
5927
5928         PR c++/31074
5929         * call.c (reference_binding): Add c_cast_p parm.  If true,
5930         add quals to TO as needed to make it reference-compatible.
5931
5932 2007-04-11  Jan Hubicka  <jh@suse.cz>
5933
5934         * class.c (convert_to_base_statically): Fold produced tree; verify
5935         that we are not processing template_decl.
5936
5937 2007-04-09  Mark Mitchell  <mark@codesourcery.com>
5938
5939         PR c++/31449
5940         * class.c (build_base_path): Ensure that the converted pointer has
5941         the same cv-qualification as the input.
5942
5943 2007-04-09  Paolo Carlini  <pcarlini@suse.de>
5944
5945         * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
5946
5947 2007-04-08  Steven Bosscher  <steven@gcc.gnu.org>
5948
5949         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
5950         Do not set it.
5951         (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
5952         * tree.c (cp_add_pending_fn_decls): Remove.
5953         * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
5954
5955 2007-04-07  Daniel Berlin  <dberlin@dberlin.org>
5956
5957         Revert change removing staticp.
5958
5959 2007-04-06  Daniel Berlin  <dberlin@dberlin.org>
5960
5961         * cp-objcp-common.c (cxx_staticp): Remove.
5962         * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
5963         * cp-tree.h (cxx_staticp):
5964
5965 2007-04-04  Danny Smith  <dannysmith.users.sourceforge.net>
5966
5967         * class.c (check_for_override): Don't remove dllmport attribute
5968         of virtual methods.
5969
5970 2007-04-03  Jakub Jelinek  <jakub@redhat.com>
5971
5972         PR c++/30847
5973         * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
5974         type issue error and return early.
5975
5976 2007-03-30  Jason Merrill  <jason@redhat.com>
5977
5978         PR c++/31187
5979         * typeck.c (cp_type_readonly): New fn.
5980         * cp-tree.h: Declare it.
5981         * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
5982         (cp_finish_decl): Not here.
5983
5984 2007-03-31  Richard Guenther  <rguenther@suse.de>
5985
5986         * optimize.c (maybe_clone_body): Replace splay-tree usage by
5987         pointer-map.
5988
5989 2007-03-31  Douglas Gregor  <doug.gregor@gmail.com>
5990
5991         PR c++/31138
5992         PR c++/31140
5993         PR c++/31141
5994         * parser.c (declarator_can_be_parameter_pack): New.
5995         (cp_parser_template_parameter): Only parse the `...' if the
5996         declarator can be a parameter pack.
5997         (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
5998         is NULL.
5999         * pt.c (find_parameter_packs_r): Look into the bounds on integer
6000         types (they could be used as array bounds).
6001         (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
6002         (tsubst_pack_expansion): Handle failure to expand parameter
6003         packs.
6004
6005 2007-03-30  Paolo Carlini  <pcarlini@suse.de>
6006
6007         PR c++/26099
6008         * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
6009         TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
6010         (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
6011         (CLASS_TYPE_NON_UNION_P): Add.
6012         (struct lang_type_class): Add has_complex_dflt.
6013         (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
6014         (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
6015         * cp-tree.def: Add TRAIT_EXPR.
6016         * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
6017         * lex.c (struct resword): Add __has_nothrow_assign,
6018         __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
6019         __has_trivial_constructor, __has_trivial_copy,
6020         __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
6021         __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
6022         __is_pod, __is_polymorphic, __is_union.
6023         * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
6024         (cp_parser_trait_expr): New.
6025         * semantics.c (finish_trait_expr, trait_expr_value
6026         classtype_has_nothrow_copy_or_assign_p): New.
6027         * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
6028         as static.
6029         * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
6030         * class.c (check_bases, check_field_decl, check_bases_and_members):
6031         Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
6032         * pt.c (uses_template_parms, tsubst_copy_and_build,
6033         value_dependent_expression_p, type_dependent_expression_p): Deal with
6034         TRAIT_EXPR.
6035         * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
6036
6037 2007-03-29  Richard Guenther  <rguenther@suse.de>
6038
6039         * tree.c (cp_walk_subtrees): Do not set input_location.
6040
6041 2007-03-28  Simon Martin  <simartin@users.sourceforge.net>
6042
6043         PR c++/29077
6044         * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
6045         destructor.
6046
6047 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
6048
6049         * parser.c (struct cp_parser): Update comment for
6050         greater_than_is_operator_p.
6051         (cp_parser_primary_expression): In C++0x mode, a cast operator can
6052         be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
6053         (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
6054         !GREATER_THAN_IS_OPERATOR_P.
6055         (cp_parser_binary_expression): When -Wc++0x-compat, warn about
6056         `>>' operators that will become two `>' tokens in C++0x.
6057         (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
6058         mode, allowing it to terminate default arguments.
6059         (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
6060         `>>' like two consecutive `>' tokens.
6061         (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
6062         (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
6063         ends a template argument.
6064
6065 2007-03-28  Douglas Gregor  <doug.gregor@gmail.com>
6066
6067         * decl.c (redeclaration_error_message): Complain when redeclaring
6068         a friend function with default template arguments (C++0x mode only).
6069         * cp-tree.h (check_default_tmpl_args): Declare.
6070         * pt.c (check_default_tmpl_args): In C++0x mode, permit default
6071         template arguments in function templates. Add support for checking
6072         the default template arguments of friend templates.
6073         (push_template_decl_real): Fix call to check_default_tmpl_args.
6074         (type_unification_real): If a template parameter has not been
6075         deduced but provides a default template argument, substitute into
6076         that default template argument.
6077         * parser.c (cp_parser_init_declarator): When declaring (but not
6078         defining!) a function template in C++0x mode, check for default
6079         template arguments.
6080
6081 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
6082
6083         PR c++/29993
6084         * decl.c (grokdeclarator): Deal with cv-qualified function type
6085         typedefs in the same way for member and non-member functions.
6086
6087 2007-03-26  Dirk Mueller  <dmueller@suse.de>
6088
6089         * parser.c (cp_parser_member_declaration): Pedwarn
6090         about stray semicolons after member declarations.
6091
6092 2007-03-26  Paolo Carlini  <pcarlini@suse.de>
6093
6094         PR c++/30500
6095         * pt.c (instantiate_decl): Set in_system_header.
6096
6097 2007-03-22  Mark Mitchell  <mark@codesourcery.com>
6098
6099         * cp-tree.h (current_tempalte_parms): Improve documentation.
6100         * pt.c (current_template_args): Likewise.
6101
6102         PR c++/30863
6103         * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
6104         not consume tokens when failing.
6105
6106 2007-03-22  Jim Wilson  <wilson@specifix.com>
6107             Mark Mitchell  <mark@codesourcery.com>
6108
6109         PR c++/31273
6110         * call.c (standard_conversion): Use type_decays_to.  Keep FCODE
6111         consistent with FROM.
6112
6113 2007-03-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6114
6115         * error.c (dump_expr): Handle dependent names that designate types.
6116         * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
6117
6118 2007-03-17  Kazu Hirata  <kazu@codesourcery.com>
6119
6120         * cp-tree.def, parser.c, pt.c: Fix comment typos.
6121
6122 2007-03-16  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
6123
6124         * cvt.c (cp_convert_and_check) : Define.
6125         * cp-tree.h (cp_convert_and_check): Declare.
6126         * call.c (convert_conversion_warnings): Rename to
6127         conversion_null_warnings.  The warning for floating-point to
6128         integer is handled by convert_and_check in convert_like_real.
6129         (convert_like_real): convert_conversion_warnings was renamed as
6130         conversion_null_warnings.
6131         * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
6132         overflow and changes of value during conversion.
6133
6134 2007-03-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
6135
6136         PR c++/30891
6137         * parser.c (cp_parser_statement): If 'namespace' is found, this
6138         only can be a namespace alias definition, so parse it now.
6139         (cp_parser_namespace_alias_definition): if we find an open brace
6140         instead of '=', then this is actually a misplaced namespace
6141         definition.
6142
6143 2007-03-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
6144
6145         PR c++/24924
6146         * decl.c (cxx_init_decl_processing): Move command-line options
6147         processing to c-opts.c.
6148
6149 2007-03-15  Douglas Gregor  <doug.gregor@gmail.com>
6150
6151         * ptree.c (cxx_print_type): Use formatting markup for integers
6152         when printing template parameter index/level/orig level.
6153         (cxx_print_xnode): Ditto.
6154         * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
6155         (struct template_parm_index_s): Remove the PARAMETER_PACK member.
6156         Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
6157         HOST_WIDE_INTs.
6158         (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
6159         rather than a HOST_WIDE_INT.
6160         Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
6161         NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
6162         better bit-packing.
6163         (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
6164         RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
6165         IN_BASE_INITIALIZER bool bitfields.
6166         (struct cp_declarator): Make KIND a 4-bit field. Make
6167         PARAMETER_PACK_P a bool bitfield just after KIND.
6168         * pt.c (uses_parameter_packs): Destroy the pointer set.
6169         (make_pack_expansion): Ditto.
6170         (check_for_bare_parameter_packs): Ditto.
6171         * name-lookup.c (push_to_top_level): Make need_pop a bool value.
6172
6173 2007-03-14  Andrew Pinski  <andrew_pinski@playstation.sony.com>
6174
6175         PR c++/31165
6176         * call.c  (convert_default_arg): Instead of copying the node,
6177         unshare it.
6178
6179 2007-03-15  Dirk Mueller  <dmueller@suse.de>
6180
6181         PR c++/30860
6182         * call.c (convert_conversion_warnings): New..
6183         (convert_like_real): .. factored out from here.
6184         (convert_conversion_warnings): Add warning about
6185         false being converted to NULL in argument passing.
6186
6187 2007-03-14  Dirk Mueller  <dmueller@suse.de>
6188
6189         * semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
6190         (finish_do_body): Warn about empty body in do/while statement.
6191
6192 2007-03-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
6193
6194         * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
6195
6196 2007-03-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
6197
6198         PR c/21438
6199         * typeck.c (build_binary_op): Call warn_for_div_zero instead of
6200         warning.
6201
6202 2007-03-13  Alexandre Oliva  <aoliva@redhat.com>
6203
6204         * repo.c (init_repo): Initialize random_seed saved options.
6205         (finish_repo): Adjust.
6206
6207 2007-03-13  Mark Mitchell  <mark@codesourcery.com>
6208
6209         PR bootstrap/30899
6210         * Make-lang.in (doc/g++.1): Use $< to specify the location from
6211         which to copy.
6212
6213 2007-03-12  Seongbae Park <seongbae.park@gmail.com>
6214
6215         * decl.c (compute_array_index_type): New warning flag warn_vla.
6216
6217 2007-03-12  Mark Mitchell  <mark@codesourcery.com>
6218
6219         PR c++/30108
6220         * call.c (convert_default_arg): Copy non-constant arguments.
6221
6222 2007-03-11  Mark Mitchell  <mark@codesourcery.com>
6223
6224         PR c++/31038
6225         * parser.c (cp_parser_postfix_expression): Disallow compound
6226         literals in constant expressions.
6227
6228         PR c++/30328
6229         * semantics.c (finish_typeof): Use unlowered_expr_type.
6230
6231 2007-03-10  Mark Mitchell  <mark@codesourcery.com>
6232
6233         PR c++/30274
6234         * cp-tree.h (unlowered_expr_type): New function.
6235         * typeck.c (is_bitfield_expr_with_lowered_type): Handle
6236         COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
6237         (unlowered_expr_type): New function.
6238         (build_unary_op): Disallow predecrements of bool bitfields.
6239         * call.c (build_conditional_expr): Use unlowered_expr_type.
6240         * pt.c (type_unification_real): Likewise.
6241
6242 2007-03-09  Douglas Gregor  <doug.gregor@gmail.com>
6243
6244         PR c++/20599
6245         * typeck.c (check_return_expr): Check for bare parameter packs.
6246         (comptypes): Compare template parameter packs and
6247         type pack expansions.
6248         * decl.c (grokdeclarator): Deal with the declaration of function
6249         parameter packs.
6250         (grokparms): Verify that the (optional) function parameter pack is
6251         at the end of the parameter list.
6252         (xref_basetypes): Handle pack expansions in the base class.
6253         (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
6254         * cp-tree.def (TYPE_ARGUMENT_PACK): New.
6255         (NONTYPE_ARGUMENT_PACK): New.
6256         (TYPE_PACK_EXPANSION): New.
6257         (EXPR_PACK_EXPANSION): New.
6258         (ARGUMENT_PACK_SELECT): New.
6259         * cp-objcp-common.c (cp_tree_size): Compute size of
6260         (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
6261         ARGUMENT_PACK_SELECT.
6262         * error.c (dump_template_argument): Print template argument packs.
6263         (dump_template_argument_list): Ditto.
6264         (dump_template_parameter): Dump `...' for template type parameter
6265         packs.
6266         (dump_type): Dump TYPE_PACK_EXPANSION nodes.
6267         (dump_parameters): Print function parameter packs.
6268         (dump_template_parms): Print template argument packs.
6269         (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
6270         (maybe_warn_variadic_templates): New.
6271         * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
6272         * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
6273         NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
6274         CAST_EXPR.
6275         * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
6276         (write_template_arg): Write argument packs as separate arguments.
6277         * cp-tree.h (struct template_parm_index_s): Add flag that
6278         indicates that the template parameter is actually a parameter
6279         pack.
6280         (struct tree_argument_pack_select): New.
6281         (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
6282         (union lang_tree_node): Add argument_pack_select.
6283         (FUNCTION_PARAMETER_PACK_P): New.
6284         (PACK_EXPANSION_P): New.
6285         (PACK_EXPANSION_PATTERN): New.
6286         (SET_PACK_EXPANSION_PATTERN): New.
6287         (PACK_EXPANSION_PARAMETER_PACKS): New.
6288         (ARGUMENT_PACK_P): New.
6289         (ARGUMENT_PACK_ARGS): New.
6290         (SET_ARGUMENT_PACK_ARGS): New.
6291         (ARGUMENT_PACK_INCOMPLETE_P): New.
6292         (ARGUMENT_PACK_EXPLICIT_ARGS): New.
6293         (TEMPLATE_PARM_PARAMETER_PACK): New.
6294         (TEMPLATE_TYPE_PARAMETER_PACK): New.
6295         (ARGUMENT_PACK_SELECT_FROM_PACK): New.
6296         (ARGUMENT_PACK_SELECT_INDEX): New.
6297         (ARGUMENT_PACK_SELECT_ARG): New.
6298         (struct cp_declarator): Add parameter_pack_p flag.
6299         (maybe_warn_variadic_templates): Declare.
6300         (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
6301         indicate a template parameter pack.
6302         (uses_parameter_packs): Declare.
6303         (template_parameter_pack_p): Declare.
6304         (template_parms_variadic_p): Declare.
6305         (make_pack_expansion): Declare.
6306         (check_for_bare_parameter_packs): Declare.
6307         * cxx-pretty-print.c (pp_cxx_unary_expression): Print
6308         sizeof... expressions.
6309         (pp_cxx_expression): Print pack expansions and non-type argument
6310         packs.
6311         (pp_cxx_exception_specification): Print pack expansions.
6312         (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
6313         (pp_cxx_ctor_initializer): Print pack expansions.
6314         (pp_cxx_type_id): Print pack expansions.
6315         (pp_cxx_template_argument_list): Print argument packs.
6316         (pp_cxx_template_parameter): Print ellipsis for template parameter
6317         packs.
6318         * pt.c (comp_template_parms): Compare template parameter packs.
6319         (template_parameter_pack_p): New.
6320         (template_parms_variadic_p): New.
6321         (template_args_variadic_p): New.
6322         (make_ith_pack_parameter_name): New.
6323         (struct find_parameter_pack_data): New.
6324         (find_parameter_packs_r): New.
6325         (uses_parameter_packs): New.
6326         (make_pack_expansion): New.
6327         (check_for_bare_parameter_packs): New.
6328         (expand_template_argument_pack): New.
6329         (reduce_template_parm_level): Propagate parameter pack flag.
6330         (process_template_parm): Add is_parameter_pack parameter to state
6331         when the parameter is actually a parameter pack. Create template
6332         parameter packs when is_parameter_pack is true.
6333         (current_template_args): The argument for a template parameter
6334         pack is an argument pack containing a single pack expansion.
6335         (process_partial_specialization): When checking that non-type
6336         argument expressions do not involve template parameters, loop over
6337         the arguments in argument packs separately.
6338         (push_template_decl_real): Check that the type of the declaration
6339         does not have any bare parameter packs. Check that primary
6340         templates have no more than one parameter pack, and that it comes
6341         at the end of the template parameter list.
6342         (convert_template_argument): Handle coercions for pack expansion
6343         expressions by coercing the pattern then rebuilding the expansion.
6344         (coerce_template_parms): When coercing the arguments for a
6345         variadic template, pack "extra" arguments into an argument pack.
6346         (coerce_template_template_parms): Cannot coerce between parameter
6347         packs and non-pack parameters.
6348         (template_args_equal): Compare PACK_EXPANSION_P expressions.
6349         (comp_template_args): Expand all template arguments packs before
6350         comparing template argument lists.
6351         (mangle_class_name_for_template): Make argument packs as separate
6352         template arguments.
6353         (for_each_template_parm_r): No need to handle BASELINK.
6354         (instantiate_class_template): Handle pack expansions in the base
6355         class list.
6356         (tsubst_pack_expansion): New.
6357         (tsubst_template_args): Handle substitutions of argument packs and
6358         pack expansion into template argument lists.
6359         (tsubst_decl): Expand function parameter packs into separate
6360         function parameters.
6361         (tsubst_arg_types): Expand a type pack expansion into separate
6362         argument types.
6363         (tsubst_exception_specification): Handle pack expansions in
6364         exception specifiers.
6365         (tsubst): See through ARGUMENT_PACK_SELECT arguments when
6366         replacing a template parameter with its argument. If we encounter
6367         a substitution for an argument pack, just return the parameter
6368         itself.
6369         (tsubst_copy): sizeof(X...) returns the number of elements in
6370         parameter pack X.  See through ARGUMENT_PACK_SELECT when the
6371         PARM_DECL is a parameter pack.
6372         (tsubst_expr): Expression pack expansions and argument packs
6373         cannot show up here; they will all be handled through function
6374         calls, sizeof, and template argument lists.
6375         (tsubst_copy_and_build): sizeof(X...) returns the number of
6376         elements in parameter pack X.  Handle pack expansions in TREE_LIST
6377         and CONSTRUCTOR nodes.
6378         (fn_type_unification): Handle "incomplete" explicit template
6379         argument lists that specify some of the arguments for a template
6380         parameter pack.
6381         (type_unification_real): Unify arguments against pack expansions.
6382         (template_parm_level_and_index): New, helper function.
6383         (unify_pack_expansion): New.
6384         (unify): Unify argument packs on an argument-by-argument basis,
6385         handling variadic argument packs as well.
6386         (more_specialized_fn): Handle unification of function parameter
6387         packs. All things being equal, prefer non-variadic function
6388         templates to variadic function templates.
6389         (more_specialized_class): Prefer the variadic class template
6390         partial specialization that binds fewer arguments to a parameter
6391         pack.
6392         (regenerate_decl_from_template): Expand function parameter packs
6393         into separate parameters.
6394         (instantiate_decl): Ditto.
6395         (tsubst_initializer_list): Handle pack expansions for base-class
6396         initializers.
6397         (dependent_type_p_r): Determine dependent types in argument packs
6398         and pack expansions.
6399         (value_dependent_expression_p): Determine value-dependence of
6400         non-type argument packs.
6401         (dependent_template_arg_p): Handle argument packs.
6402         * semantics.c (finish_cond): Check for bare parameter packs.
6403         (finish_expr_stmt): Ditto.
6404         (finish_for_expr): Ditto.
6405         (finish_switch_cond): Ditto.
6406         (finish_mem_initializers): Ditto.
6407         * name-lookup.c (arg_assoc_type): Handle pack expansions and
6408         argument packs.
6409         * decl2.c (cp_build_parm_decl): Mark function parameter packs.
6410         * parser.c (make_declarator): Declarator is not an expansion.
6411         (make_pointer_declarator): Transfer parameter pack flag to outer
6412         declarator.
6413         (make_reference_declarator): Ditto.
6414         (make_ptrmem_declarator): Ditto.
6415         (make_call_declarator): Ditto.
6416         (make_array_declarator): Ditto.
6417         (cp_parser_postfix_expression): Allow pack expansion expressions
6418         in the argument list for a call expression.
6419         (cp_parser_parenthesized_expression_list): Add new parameter
6420         ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
6421         into separate arguments."
6422         (cp_parser_new_placement): Allow pack expansion expressions.
6423         (cp_parser_new_initializer): Ditto.
6424         (cp_parser_mem_initializer_list): Allow ellipsis to create a
6425         base-class initializer expansion.
6426         (cp_parser_mem_initializer): Ditto.
6427         (cp_parser_template_parameter_list): Keep track of whether the
6428         template parameter is a template parameter pack.
6429         (cp_parser_template_parameter): Parse the ellipsis to indicate a
6430         template parameter pack.
6431         (cp_parser_type_parameter): Ditto.
6432         (cp_parser_template_argument_list): Parse the ellipsis to indicate
6433         a pack expansion.
6434         (cp_parser_direct_declarator): Parse the ellipsis to indicate that
6435         this declarator is a parameter pack.
6436         (cp_parser_parameter_declaration): The ellipsis does not end the
6437         parameter declaration, because it might be a parameter pack. Parse
6438         the ellipsis to indicate a parameter pack.
6439         (cp_parser_initializer): Allow pack expansions.
6440         (cp_parser_initializer_list): Allow ellipsis to create an
6441         initializer expansion.
6442         (cp_parser_base_clause): Allow ellipsis to create a base specifier
6443         expansion.
6444         (cp_parser_type_id_list): Allow ellipsis to create an exception
6445         specifier expansion.
6446         (cp_parser_attribute_list): Don't allow pack expansions.
6447         (cp_parser_functional_cast): Allow pack expansions.
6448         (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
6449         compute the length of a parameter pack.
6450         (cp_parser_next_token_ends_template_argument_p): An ellipsis can
6451         end a template argument.
6452         * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
6453         NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
6454         CAST_EXPR.
6455
6456 2007-03-09  Dirk Mueller  <dmueller@suse.de>
6457
6458         * call.c (build_new_op): Call warn_logical_operator.
6459
6460 2007-03-08  Volker Reichelt  <v.reichelt@netcologne.de>
6461
6462         PR c++/30852
6463         * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
6464
6465         PR c++/30534
6466         * pt.c (any_template_arguments_need_structural_equality_p):
6467         Robustify.
6468
6469 2007-03-08  Alexandre Oliva  <aoliva@redhat.com>
6470
6471         * decl.c (grokdeclarator): Disable warnings for anonymous
6472         bitfields.
6473
6474 2007-03-05  Volker Reichelt  <v.reichelt@netcologne.de>
6475
6476         * typeck2.c (readonly_error): Always emit a hard error.
6477         Remove last argument.
6478         * cp-tree.h (readonly_error): Adjust prototype.
6479         * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
6480         * typeck.c (build_unary_op): Likewise.
6481         (build_modify_expr): Likewise.
6482
6483 2007-03-04  Simon Martin  <simartin@users.sourceforge.net>
6484
6485         PR c++/30895
6486         * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
6487
6488 2007-03-03  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
6489
6490         PR c++/15787
6491         * parser.c (struct cp_parser): New IN_IF_STMT.
6492         (cp_parser_statement_seq_opt): Handle an unexpected 'else',
6493         returning if parsing the body of an 'if' statement or issuing an
6494         error and continuing.
6495         (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
6496         body of 'if'.
6497         (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
6498
6499 2007-03-02  Simon Martin  <simartin@users.sourceforge.net>
6500
6501         PR c++/28253
6502         * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
6503         for thunks.
6504
6505 2007-03-02  Geoffrey Keating  <geoffk@apple.com>
6506
6507         * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
6508         Objective-C++.  Don't exit early if -shared-libgcc needs to be
6509         added.
6510
6511 2007-03-02  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
6512
6513         * typeck.c (common_base_type): Delete unused function.
6514
6515 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
6516
6517         * Make-lang.in: Add dummy lang.install-pdf target.
6518
6519 2007-03-01  Simon Baldwin <simonb@google.com>
6520
6521         PR c++/23689
6522         * decl.c (check_tag_decl): Added new warning for typedef ignored
6523         when it precedes an otherwise valid non-typedef declaration.
6524
6525 2007-02-28  Sandra Loosemore  <sandra@codesourcery.com>
6526
6527         * typeck.c (build_function_call): Store converted arguments
6528         in a stack-allocated array instead of building a list.
6529         (convert_arguments): Store arguments in the array passed in as an
6530         argument, and return the actual number of arguments.
6531         * call.c (build_call): Delete, and replace with...
6532         (build_call_n, build_call_a): New.
6533         (build_op_delete_call): Rewrite to avoid constructing argument lists.
6534         (build_over_call): Store converted arguments in a stack-allocated
6535         array instead of building a list.
6536         (build_cxx_call): Pass arguments in an array instead of as a list.
6537         (build_java_interface_fn_ref): Rewrite to avoid constructing
6538         argument lists.
6539         * tree.h: Update declarations to reflect above changes.
6540         * method.c (use_thunk): Use a stack-allocated array to hold
6541         the arguments instead of a list.
6542         * rtti.c (throw_bad_cast): Update call to cxx_call.
6543         (throw_bad_typeid): Likewise.
6544         (build_dynamic_cast_1): Likewise.
6545         * init.c (build_builtin_delete_call): Use build_call_n.
6546         * decl.c (expand_static_init): Likewise.
6547         * except.c (cp_protect_cleanup_actions): Likewise.
6548         * cp-gimplify.c (genericize_eh_spec_block): Likewise.
6549         (gimplify_must_not_throw_expr): Likewise.
6550         (cxx_omp_apply_fn): Use build_call_a.
6551
6552 2007-02-26  Mark Mitchell  <mark@codesourcery.com>
6553
6554         * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
6555         * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
6556
6557 2007-02-25  Mark Mitchell  <mark@codesourcery.com>
6558
6559         * cp-tree.h (static_ctors): Remove.
6560         * cp-tree.h (static_dtors): Likewise.
6561         * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
6562         refactoring of tree_map hierarchy.
6563         (decl_shadowed_for_var_insert): Likewise.
6564         * semantics.c (expand_body): Use c_expand_body.
6565         (expand_or_defer_fn): Don't update static_ctors or static_dtors.
6566         * decl2.c (static_ctors): Remove.
6567         (static_dtors): Likewise.
6568         (generate_ctor_or_dtor_function): Pass NULL_TREE to
6569         objc_generate_static_init_call.  Do not call static_[cd]tors.
6570         (generate_ctor_and_dtor_functions_for_priority): Do not check for
6571         static_[cd]tors.
6572         (cp_write_global_declarations): Likewise.
6573
6574 2007-02-23  Richard Guenther  <rguenther@suse.de>
6575
6576         * class.c (note_name_declared_in_class): Make declaration
6577         changes meaning a pedwarn.
6578
6579 2007-02-22  Michael Matz  <matz@suse.de>
6580
6581         PR c++/29433
6582         * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
6583         * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
6584         dump_function_decl): Guard emitting outer scopes by new flag.
6585         * cp-lang.c (cxx_dwarf_name): New function.
6586         (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
6587         * pt.c (classtype_mangled_name, mangle_class_name_for_template):
6588         Remove functions.
6589         (push_template_decl_real, lookup_template_class): Remove calls
6590         to above functions.
6591
6592 2007-02-19  Mark Mitchell  <mark@codesourcery.com>
6593
6594         * call.c (build_new_method_call): Ensure that explicit calls of
6595         destructors have type "void".
6596
6597 2007-02-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
6598
6599         * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
6600         and -Walways-true with -Waddress.
6601         * cvt.c (convert_to_void): Replace unconditional warning with
6602         -Waddress.
6603
6604 2007-02-18  Kazu Hirata  <kazu@codesourcery.com>
6605
6606         * decl.c, tree.c: Fix comment typos.
6607
6608 2007-02-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
6609
6610         PR C++/30158
6611         * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
6612         statement expression if we had an error mark node.
6613
6614 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
6615             Brooks Moses  <brooks.moses@codesourcery.com>
6616             Lee Millward  <lee.millward@codesourcery.com>
6617
6618         * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
6619         Change class to tcc_vl_exp.
6620
6621         * call.c (build_call): Use build_call_list instead
6622         of build3.
6623         (build_over_call): Likewise.
6624         (build_new_method_call): Use build_min_non_dep_call_list
6625         instead of build_min_non_dep.
6626
6627         * error.c (dump_call_expr_args): New function.
6628         (dump_aggr_init_expr_args): New function.
6629         (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
6630         Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
6631
6632         * cvt.c (convert_to_void): Use build_call_array instead
6633         of build3; use new AGGR_INIT_EXPR accessor macros.
6634
6635         * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
6636         instead of TREE_CODE_LENGTH.
6637
6638         * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
6639         AGGR_INIT_EXPR accessor macros.
6640
6641         * cp-gimplify.c (cp_gimplify_init_expr): Use
6642         AGGR_INIT_EXPR_SLOT to set the slot operand.
6643
6644         * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
6645         (AGGR_INIT_EXPR_SLOT): New macro.
6646         (AGGR_INIT_EXPR_ARG): New macro.
6647         (aggr_init_expr_nargs): New macro.
6648         (AGGR_INIT_EXPR_ARGP): New macro.
6649         (aggr_init_expr_arg_iterator): New.
6650         (init_aggr_init_expr_arg_iterator): New.
6651         (next_aggr_init_expr_arg): New.
6652         (first_aggr_init_expr_arg): New.
6653         (more_aggr_init_expr_args_p): New.
6654         (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
6655         (stabilize_aggr_init): New declaration.
6656         (build_min_non_dep_call_list): Likewise.
6657
6658         * tree.c (process_aggr_init_operands): New function.
6659         (build_aggr_init_array) New function.
6660         (build_cplus_new): Update to use new CALL_EXPR and
6661         AGGR_INIT_EXPR accessor macros. Replace use of build3 with
6662         build_aggr_init_array.
6663         (build_min_non_dep_call_list) New function.
6664         (build_min_nt): Assert input code parameter is not a variable
6665         length expression class.
6666         (build_min, build_min_non_dep): Likewise.
6667         (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
6668         to check for equality instead of recursing. Handle tcc_vl_exp
6669         tree code classes.
6670         (stabilize_call): Update to only handle CALL_EXPRs, not
6671         AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
6672         (stabilize_aggr_init): New function.
6673         (stabilize_init): Use it.
6674
6675         * cxx-pretty-print.c (pp_cxx_postfix_expression)
6676         <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
6677         AGGR_INIT_EXPR accessor macros and argument iterators.
6678
6679         * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
6680         build_vl_exp. Iterate through the operands, recursively
6681         processing each one.
6682         (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
6683         CALL_EXPR accessor macros.
6684         (value_dependent_expression_p) <default>: Handle tcc_vl_exp
6685         tree code classes. Use TREE_OPERAND_LENGTH instead of
6686         TREE_CODE_LENGTH.
6687
6688         * semantics.c (finish_call_expr): Use build_nt_call_list
6689         instead of build_nt.
6690         (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
6691         accessor macros. Use build_call_array to construct the
6692         CALL_EXPR node instead of build3
6693
6694         * decl2.c (build_offset_ref_call_from_tree): Use
6695         build_nt_call_list and build_min_non_dep_call_list instead
6696         of build_min_nt and build_min_non_dep.
6697
6698         * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
6699         Use build_nt_call_list instead of build_min_nt.
6700
6701 2007-02-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
6702
6703         PR c++/28943
6704         * call.c (build_conditional_expr): Improve error message.
6705
6706 2007-02-13  Dirk Mueller  <dmueller@suse.de>
6707
6708         * friend.c (do_friend): Annotate warning about friend
6709         declarations in templates with OPT_Wnon_template_friend.
6710         Convert informal message from warning() to inform().
6711
6712 2007-02-12  Simon Martin  <simartin@users.sourceforge.net>
6713             Mark Mitchell  <mark@codesourcery.com>
6714
6715         PR c++/14622
6716         * pt.c (do_decl_instantiation): Detect type mismatches in explicit
6717         instantiations for variables.
6718
6719 2007-02-12  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
6720
6721         PR middle-end/7651
6722         * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
6723         Check warn_unused_value just once.
6724
6725 2007-02-11  Mark Mitchell  <mark@codesourcery.com>
6726
6727         PR c++/26988
6728         * pt.c (determine_specialization): Use skip_artificial_parms_for.
6729         (fn_type_unificiation): Likewise.
6730         (get_bindings): Likewise.
6731
6732 o2007-02-06  Mark Mitchell  <mark@codesourcery.com>
6733
6734         PR target/29487
6735         * decl.c (finish_function): Use DECL_REPLACEABLE.
6736         * tree.c (cp_cannot_inline_tree_fn): Likewise.
6737
6738 2007-02-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6739
6740         * parser.c (cp_parser_primary_expression): Reformat overly long lines.
6741
6742 2007-02-10  Richard Henderson  <rth@redhat.com>, Jakub Jelinek  <jakub@redhat.com>
6743
6744         * decl.c (grokvardecl): Don't error if !have_tls.
6745         (grokdeclarator): Likewise.
6746         * parser.c (cp_parser_omp_threadprivate): Likewise.
6747
6748 2007-02-07  Jakub Jelinek  <jakub@redhat.com>
6749
6750         PR c++/30703
6751         * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
6752         parameters and result decls in omp clauses.
6753         (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
6754         by reference.
6755
6756 2007-02-05  Dirk Mueller  <dmueller@suse.de>
6757
6758         PR bootstrap/30510
6759         * parser.c (cp_parser_class_specifier): Always initialize bases.
6760
6761 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
6762
6763         * cp-tree.h (OMP_ATOMIC_CODE): Delete.
6764         (OMP_ATOMIC_DEPENDENT_P): Rewrite.
6765         * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
6766         expressions.
6767         * semantics.c (finish_omp_atomic): Store a whole expression node
6768         in operand 1, and integer_zero_node in operand 0, for dependent
6769         OMP_ATOMIC.  Rewrite to make flow easier to understand.
6770
6771 2007-02-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6772
6773         * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
6774
6775 2007-02-04  Kazu Hirata  <kazu@codesourcery.com>
6776
6777         * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
6778         parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
6779
6780 2007-02-03  Douglas Gregor  <doug.gregor@gmail.com>
6781
6782         * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
6783         keyword warning to -Wc++0x-compat.
6784
6785 2007-02-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6786
6787         * decl.c (grokdeclarator): Update documentation.
6788
6789 2007-02-02  Jakub Jelinek  <jakub@redhat.com>
6790
6791         PR c++/30536
6792         * decl.c (grokdeclarator): If __thread is used together with
6793         a storage class other than extern and static, clear thread_p
6794         after issuing diagnostics and fall through to checking the
6795         storage class.
6796
6797 2007-01-30  Roger Sayle  <roger@eyesopen.com>
6798
6799         * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
6800         calculating the size of an array (to avoid recursive errors).
6801
6802 2007-01-30  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
6803
6804         PR c++/24745
6805         * typeck.c (build_binary_op): Fix logic for warning. Move warning
6806         to -Wpointer-arith.
6807         * call.c (convert_like_real): Don't warn when converting to
6808         boolean type.
6809
6810 2007-01-29  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
6811
6812         * decl.c (pop_label): Replace warning with call to
6813         warn_for_unused_label.
6814
6815 2007-01-28  Andrew Pinski  <pinskia@gmail.com>
6816
6817         PR C++/28988
6818         * semantics.c (finish_pseudo_destructor_expr): Check the
6819         destrutor name by calling check_dtor_name.
6820
6821 2007-01-24  Douglas Gregor  <dgregor@osl.iu.edu>
6822
6823         * lex.c (D_CPP0X): Rename.
6824         (D_CXX0X): To this.
6825         (reswords): D_CPP0X -> D_CXX0X.
6826         (init_reswords): Ditto.
6827         * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
6828         of C++0x keywords as identifiers.
6829
6830 2007-01-23  Simon Martin  <simartin@users.sourceforge.net>
6831
6832         PR c++/27492
6833         * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
6834         function decls.
6835
6836 2007-01-23  Ian Lance Taylor  <iant@google.com>
6837
6838         * typeck.c (convert_for_assignment): Only warn about a = b = c
6839         when converting to bool.
6840
6841 2007-01-23  Roger Sayle  <roger@eyesopen.com>
6842
6843         * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
6844         TREE_OVERFLOW.
6845         * typeck.c (ignore_overflows): Remove the remaining uses of
6846         TREE_CONSTANT_OVERFLOW.
6847
6848 2007-01-20  Jan Hubicka  <jh@suse.cz>
6849
6850         * decl2.c (start_objects, start_static_storage_duration_function):
6851         Do not make the functions uninlinable.
6852
6853 2007-01-17  Ian Lance Taylor  <iant@google.com>
6854
6855         * class.c (add_method): Call VEC_reserve_exact rather than passing
6856         a negative size to VEC_reserve.
6857
6858 2007-01-11  Simon Martin  <simartin@users.sourceforge.net>
6859
6860         PR c++/29573
6861         * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
6862
6863 2007-01-10  Mark Mitchell  <mark@codesourcery.com>
6864
6865         PR c++/28999
6866         * decl.c (make_typename_type): If the qualified name is not a
6867         type, issue an error.
6868         * parser.c (cp_parser_elaborated_type_specifier): Fix comment
6869         formatting.
6870
6871 2007-01-08  Geoffrey Keating  <geoffk@apple.com>
6872
6873         * rtti.c: Include target.h.
6874         (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
6875         don't emit typeinfo for fundamental types as weak.
6876         * Make-lang.in (cp/rtti.o): Update and correct dependencies.
6877
6878 2007-01-08  Richard Guenther  <rguenther@suse.de>
6879
6880         * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
6881
6882 2007-01-08  Mark Shinwell  <shinwell@codesourcery.com>
6883
6884         * call.c (standard_conversion): Pass flag to
6885         vector_types_convertible_p to disallow emission of note.
6886         * typeck.c (convert_for_assignment): Pass flag to
6887         vector_types_convertible_p to allow emission of note.
6888         (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
6889         to disallow emission of note.
6890
6891 2007-01-07  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
6892
6893         PR c++/28986
6894         * typeck.c (build_binary_op): Call overflow_warning if
6895         TREE_OVERFLOW_P is true for the result and not for any of the
6896         operands.
6897
6898 2007-01-06  Lee Millward  <lee.millward@codesourcery.com>
6899
6900         PR c++/19439
6901         * class.c (add_method): Don't wait until template
6902         instantiation time to complain about duplicate methods.
6903
6904 2007-01-05  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
6905
6906         PR c/19978
6907         * semantics.c (finish_unary_op_expr): Warn only if result
6908         overflowed and operands did not.
6909
6910 2007-01-05  Ian Lance Taylor  <iant@google.com>
6911
6912         * typeck.c (build_binary_op): Warn about comparing a non-weak
6913         address to NULL.
6914
6915 2007-01-05  Douglas Gregor  <doug.gregor@gmail.com>
6916
6917         * pt.c (tsubst): Propagate the need for structural equality checks
6918         when reducing the level of template parameters.
6919
6920 2007-01-03  Kazu Hirata  <kazu@codesourcery.com>
6921
6922         * pt.c: Fix a comment typo.
6923
6924 2007-01-02  Ian Lance Taylor  <iant@google.com>
6925
6926         * semantics.c (maybe_convert_cond): Optionally warn when using an
6927         assignment as a condition.
6928         * typeck.c (convert_for_assignment): Optionally warn about
6929         assigning the result of an assignment to a bool.
6930
6931 2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>
6932
6933         * pt.c (canonical_template_parms): Correct typo in comment.
6934
6935 2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>
6936
6937         * typeck.c (structural_comptypes): Renamed from "comptypes".
6938         (comptypes): Use canonical type information to perform fast type
6939         comparison. When VERIFY_CANONICAL_TYPES, verify that the
6940         canonical type comparison returns the same results as we would see
6941         from the current, structural check. Support COMPARE_STRUCTURAL
6942         when we need structural checks.
6943         * decl.c (typename_compare): Fix comment.
6944         (build_typename_type): TYPENAME_TYPE nodes require structural
6945         equality checks, because they resolve different based on the
6946         current class type.
6947         (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
6948         require structural equality checks (for now).
6949         (build_ptrmemfunc_type): Build the canonical pointer to member
6950         function type.
6951         (compute_array_index_type): Whenever we build a new index type
6952         to represent the size of an array in a template, we need to mark
6953         this index type as requiring structural equality. This goes for
6954         arrays with value-dependent sizes with the current ABI, or all
6955         arrays with ABI-1.
6956         * tree.c (cplus_array_hash): New.
6957         (struct cplus_array_info): New.
6958         (cplus_array_compare): New.
6959         (cplus_array_htab): New.
6960         (build_cplus_array_type_1): Use a hash table to cache the array
6961         types we build. Build the canonical array type for each array
6962         type.
6963         (cp_build_qualified_type_real): When building a cv-qualified array
6964         type, use the hash table of array types and build canonical array
6965         types as necessary.
6966         (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
6967         use structural equality (for now).
6968         * cp-tree.h (COMPARE_STRUCTURAL): New.
6969         * pt.c (canonical_template_parms): New.
6970         (canonical_type_parameter): New.
6971         (process_template_parm): Find the canonical type parameter.
6972         (lookup_template_class): When we have named the primary template
6973         type, set the canonical type for our template class to the primary
6974         template type. If any of the template arguments need structural
6975         equality checks, the template class needs structural equality
6976         checks.
6977         (tsubst): When reducing the level of a template template
6978         parameter, we require structural equality tests for the resulting
6979         parameter because its template parameters have not had their types
6980         canonicalized. When reducing a template type parameter, find the
6981         canonical reduced type parameter.
6982         (any_template_arguments_need_structural_equality_p): New.
6983