OSDN Git Service

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