OSDN Git Service

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