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