OSDN Git Service

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