OSDN Git Service

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