OSDN Git Service

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