OSDN Git Service

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