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