OSDN Git Service

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