OSDN Git Service

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