OSDN Git Service

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