OSDN Git Service

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