OSDN Git Service

2007-08-20 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2007-08-20  Richard Guenther  <rguenther@suse.de>
2
3         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
4         Remove.
5         * cp-tree.h (cp_auto_var_in_fn_p): Remove.
6         (nonstatic_local_decl_p): Likewise.
7         * tree.c (cp_auto_var_in_fn_p): Remove.
8         * decl.c (nonstatic_local_decl_p): Remove.
9
10 2007-08-20  Richard Guenther  <rguenther@suse.de>
11
12         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
13         Remove define.
14         * tree.h (cp_walk_tree): New define to walk_tree_1 with
15         cp_walk_subtrees lh parameter.
16         (cp_walk_tree_without_duplicates): New define to
17         walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
18         * tree.c (count_trees): Call
19         cp_walk_tree_without_duplicates.
20         (verify_stmt_tree): Call cp_walk_tree.
21         (break_out_target_exprs): Likewise.
22         (WALK_SUBTREE): Likewise.
23         * cp-gimplify.c (cp_genericize): Likewise.
24         * cp-pt.c (find_parameter_packs_r): Likewise.
25         (uses_parameter_packs): Likewise.
26         (make_pack_expansion): Likewise.
27         (check_for_bare_parameter_packs): Likewise.
28         (for_each_template_parm): Likewise.
29         * decl.c (check_default_argument): Call
30         cp_walk_tree_without_duplicates.
31         * except.c (build_throw): Likewise.
32         * decl2.c (type_visibility): Likewise.
33         * semantics.c (expand_or_defer_fn): Likewise.
34         (finalize_nrv): Call cp_walk_tree.
35
36 2007-08-20  Jakub Jelinek  <jakub@redhat.com>
37
38         PR c++/33025
39         * init.c (build_new_1): Rename placement_var variable to placement_expr.
40         Initialize it with save_expr rather than get_temp_regvar.
41
42 2007-08-17  Andrew Pinski  <andrew_pinski@playstation.sony.com>
43
44         PR c++/28989
45         * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
46         lvalues.
47
48 2007-08-17  Ollie Wild  <aaw@google.com>
49
50         PR c++/31749
51         * name-lookup.c (do_nonmember_using_decl): Shift implicit type
52         declarations into appropriate slots for comparison.  Fix type
53         comparison.
54
55 2007-08-17  Paolo Carlini  <pcarlini@suse.de>
56
57         PR c++/32112
58         * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
59         * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
60
61 2007-08-17  Paolo Carlini  <pcarlini@suse.de>
62
63         PR c++/32870
64         * parser.c (cp_parser_class_head): Improve error message.
65
66 2007-08-16  Seongbae Park  <seongbae.park@gmail.com>
67
68         * pt.c (instantiate_decl): Set input_location
69         for the function end.
70
71 2007-08-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
72
73         * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
74         Constify.
75         * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
76         class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
77         cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
78         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
79         * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
80         * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
81         * typeck.c (cp_type_quals): Likewise.
82         * typeck2.c (cxx_incomplete_type_diagnostic,
83         cxx_incomplete_type_error): Likewise.
84
85 2007-08-16  Paolo Carlini  <pcarlini@suse.de>
86
87         PR c++/31132
88         * pt.c (tsubst_friend_function): When check_classfn
89         returns error_mark_node likewise return it.
90
91 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
92
93         PR c++/32992
94         * typeck.c (check_return_expr): Don't NRV optimize vars in
95         anonymous unions.
96         * decl.c (finish_function): Comment fix.
97
98 2007-08-15  Paolo Carlini  <pcarlini@suse.de>
99
100         PR c++/33035
101         * pt.c (push_template_decl_real): Depending on TYPE_P
102         use either TYPE_CONTEXT or DECL_CONTEXT.
103
104 2007-08-14  Mark Mitchell  <mark@codesourcery.com>
105
106         * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
107         constructors and destructors return this.
108
109 2007-08-14  Paolo Carlini  <pcarlini@suse.de>
110
111         PR c++/27211
112         * decl2.c (check_classfn): Return error_mark_node in case of error;
113         in that case, do not call add_method.
114         * decl.c (start_decl): Deal with check_classfn returning
115         error_mark_node.
116         (grokfndecl): Likewise.
117         * pt.c (tsubst_friend_function): Likewise.
118
119 2007-08-14  Andrew Pinski  <pinskia@gmail.com>
120
121         PR c++/30428
122         * typeck.c (build_binary_op): Disallow vector float types with
123         BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
124
125 2007-08-11  Ian Lance Taylor  <iant@google.com>
126
127         * cp-objcp-common.c (cxx_get_alias_set): Change return type to
128         alias_set_type.
129         * cp/cp-tree.h (cxx_get_alias_set): Update declaration.
130
131 2007-08-10  Ollie Wild  <aaw@google.com>
132
133         * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
134         type lookups.
135         (ambiguous_decl): Construct tree of ambiguous types.  Remove extaneous
136         function parameter.
137         (unqualified_namespace_lookup): Fix ambiguous_decl call.
138         (lookup_using_namespace): Fix ambiguous_decl call.
139         (qualified_lookup_using_namespace): Fix ambiguous_decl call.
140
141 2007-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
142
143         * call.c (name_as_c_string): Use CONST_CAST.
144         * decl.c (build_decl): Likewise.
145         * parser.c (cp_parser_string_literal): Likewise.
146
147 2007-08-10  Paolo Carlini  <pcarlini@suse.de>
148
149         PR c++/17763
150         * error.c (dump_expr): Consistently use the *_cxx_*
151         variants of the pretty-print functions.
152
153 2007-08-10  Paolo Carlini  <pcarlini@suse.de>
154
155         PR c++/22256
156         * decl.c (check_special_function_return_type): Just error
157         on return type specified for conversion operator.
158
159 2007-08-09  Daniel Berlin  <dberlin@dberlin.org>
160
161         * typeck2.c (readonly_error): Handle general expressions.
162         * error.c (dump_expr): Handle POINTER_PLUS_EXPR
163
164 2007-08-06  Dan Hipschman  <dsh@google.com>
165
166         * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
167         access function name.
168
169 2007-08-04  Alfred Minarik  <a.minarik@aon.at>
170
171         PR pch/13676
172         * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
173         * g++spec.c (lang_specific_driver): Check them.
174
175 2007-08-06  Paolo Carlini  <pcarlini@suse.de>
176
177         PR c++/19532
178         * pt.c (template_class_depth): Fix comment; change return type
179         to bool.
180
181 2007-08-05  Volker Reichelt  <v.reichelt@netcologne.de>
182
183         Revert:
184         2007-03-26  Dirk Mueller  <dmueller@suse.de>
185
186         * parser.c (cp_parser_member_declaration): Pedwarn
187         about stray semicolons after member declarations.
188
189 2007-08-02  Lee Millward  <lee.millward@gmail.com>
190
191         PR c++/30849
192         PR c++/30850
193         PR c++/30851
194         * parser.c (cp_parser_asm_definition): Detect and discard asm
195         statements with invalid inputs or outputs.
196         (cp_parser_asm_operand_list): Return error mark node if any
197         of the operands are invalid. Adjust documentation.
198         
199 2007-08-02  Nick Clifton  <nickc@redhat.com>
200
201         * typeck.c: Change copyright header to refer to version 3 of the
202         GNU General Public License and to point readers at the COPYING3
203         file and the FSF's license web page.
204         * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
205         config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
206         Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
207         cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
208         tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
209         cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
210         cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
211         name-lookup.h, parser.c: Likewise.
212
213 2007-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
214
215         PR middle-end/32668
216         * call.c (magic_varargs_p): Honor the "type generic" attribute.
217
218 2007-07-30  Paolo Carlini  <pcarlini@suse.de>
219
220         PR c++/32108
221         * semantics.c (finish_label_stmt): Reject the __label__
222         extension outside function scopes.
223
224 2007-07-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
225
226         * parser.c (eof_token): Un-constify.
227         (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
228         cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
229         casts.
230
231 2007-07-28  Kazu Hirata  <kazu@codesourcery.com>
232
233         * pt.c, tree.c, typeck2.c: Fix comment typos.
234
235 2007-07-28  Simon Martin  <simartin@users.sourceforge.net>
236             Mark Mitchell  <mark@codesourcery.com>
237
238         PR c++/30917
239         * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
240         hidden due to friend declarations in local classes.
241
242 2007-07-27  Douglas Gregor  <doug.gregor@gmail.com>
243
244         * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
245         * cp-tree.def (DECLTYPE_TYPE): New.
246         * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
247         (dump_type_prefix): Ditto.
248         (dump_type_suffix): Ditto.
249         * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
250         * mangle.c (write_type): Handle DECLTYPE_TYPE.
251         * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
252         types.
253         (DECLTYPE_TYPE_EXPR): New.
254         (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
255         (finish_declared_type): Declare.
256         * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
257         DECLTYPE_TYPE nodes.
258         (pp_cxx_type_id): Ditto.
259         * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
260         (tsubst): Substitute into a DECLTYPE_TYPE node.
261         (tsubst_copy): Ditto.
262         (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
263         nodes.
264         (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
265         * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
266         structural equality (because we can't hash the expressions).
267         (finish_declared_type): New.
268         * lex.c (reswords): Add "decltype" keyword.
269         * parser.c cp_lexer_next_token_is_decl_specifier_keyword
270         (cp_parser_postfix_expression): Add member_access_only_p to
271         restrict postfix expression to member access expressions.
272         (cp_parser_unary_expression): Update call to
273         cp_parser_postfix_expression to reflect new parameter.
274         (cp_parser_declared_type): New.
275         (cp_parser_simple_type_specifier): Parse decltype types.
276
277 2007-07-27  Mark Mitchell  <mark@codesourcery.com>
278
279         PR c++/32346
280         * call.c (convert_for_arg_passing): Only widen bitfields to their
281         declared types if necessary.
282
283 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
284
285         * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
286         Constify.
287
288 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
289
290         * decl.c (typename_hash, typename_compare): Constify.
291         * mangle.c (hash_type, compare_type): Likewise.
292         * pt.c (eq_local_specializations, hash_local_specialization):
293         Likewise.
294         * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
295         list_hash): Likewise.
296         * typeck2.c (pat_compare): Likewise.
297
298 2007-07-24  Nathan Sidwell  <nathan@codesourcery.com>
299
300         * method.c (implicitly_declare_fn): Increase alignment if member
301         function pointer format requires it.
302
303 2007-07-24  Paolo Carlini  <pcarlini@suse.de>
304
305         PR c++/29001
306         * typeck.c (check_return_expr): Do not pass a null argument
307         to null_ptr_cst_p.
308
309 2007-07-24  Paolo Carlini  <pcarlini@suse.de>
310
311         PR c++/32561
312         * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
313         only on VAR_DECL.
314
315 2007-07-22  Nathan Sidwell  <nathan@codesourcery.com>
316
317         PR c++/32839
318         * typeck.c (convert_arguments): Only use default args if we have
319         a function decl.
320
321         PR c++/30818
322         * typeck.c (structural_comptypes): No need to check
323         resolve_typename_type return value here.
324         * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
325         * pt.c (resolve_typename_type): Follow typename typedefs.  Return
326         original type rather than error_mark_node in case of failure.
327         * parser.c (cp_parser_nested_name_specifier_opt): Adjust
328         resolve_typename_type result check.
329         (cp_parser_direct_declarator, cp_parser_head,
330         cp_parser_constructor_declarator_p): Likewise.
331
332 2007-07-12  Kazu Hirata  <kazu@codesourcery.com>
333
334         * pt.c (template_parms_variadic_p): Remove.
335         * cp-tree.h: Remove the prototype for template_parms_variadic_p.
336
337 2007-07-12  Jakub Jelinek  <jakub@redhat.com>
338
339         PR c++/30854
340         * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
341         argument to dump_aggr_init_expr_args instead of false.
342
343 2007-07-11  Douglas Gregor  <doug.gregor@gmail.com>
344
345         * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
346         canonical types; otherwise, fall back to structural type
347         comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
348         internal compiler error if the canonical types are wrong.
349         
350 2007-07-11  Paolo Carlini  <pcarlini@suse.de>
351
352         PR c++/32560
353         * parser.c (cp_parser_make_indirect_declarator): When the
354         the code argument is ERROR_MARK return cp_error_declarator.
355
356 2007-07-09  Geoffrey Keating  <geoffk@apple.com>
357
358         PR 32617
359         * decl.c (cxx_init_decl_processing): Don't set
360         force_align_functions_log.
361         (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
362         * typeck.c (cxx_alignof_expr): When alignof is used on a plain
363         FUNCTION_DECL, return its alignment.
364
365 2007-07-09  Richard Guenther  <rguenther@suse.de>
366
367         * decl.c (start_preparsed_function): Do not promote return type.
368
369 2007-07-08  Paolo Carlini  <pcarlini@suse.de>
370
371         PR c++/30535
372         * pt.c (unify): Never pass error_mark_node to template_decl_level.
373
374 2007-07-07  Mark Mitchell  <mark@codesourcery.com>
375
376         PR c++/32232
377         * pt.c (resolve_overloaded_unification): Robustify.  Return a
378         bool, not an int.
379         (type_unification_real): Adjust accordingly.
380
381 2007-07-06  Richard Guenther  <rguenther@suse.de>
382
383         * init.c (build_new_1): Use the correct pointer type.
384         * typeck2.c (build_m_component_ref): Likewise.
385
386 2007-07-05  Mark Mitchell  <mark@codesourcery.com>
387
388         PR c++/32245
389         * init.c (build_zero_init): Always build an initializer for
390         non-static storage.
391         * typeck2.c (build_functional_cast): Use build_zero_init.
392
393         PR c++/32251
394         * init.c (build_new_1): Always pass the allocation function to
395         build_op_delete_call.
396         * call.c (build_op_delete_call): Handle operator delete with a
397         variable-argument list.  Do not issue an error when no matching
398         deallocation function is available for a new operator.
399
400         PR c++/31992
401         * cp-tree.h (any_value_dependent_elements_p): Declare it.
402         * decl.c (value_dependent_init_p): New function.
403         (cp_finish_decl): Use it.
404         * pt.c (value_dependent_expression_p): Use
405         any_value_dependent_elements_p.
406         * parser.c (cp_parser_primary_expression): Add comment about
407         treating dependent qualified names as integral
408         constant-expressions.
409
410 2007-07-04  Douglas Gregor  <doug.gregor@gmail.com>
411
412         * decl.c (build_ptrmemfunc_type): Always use structural equality
413         tests when comparing pointer-to-member-function types, because the
414         handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
415         types.
416         
417 2007-07-03  Mark Mitchell  <mark@codesourcery.com>
418
419         * init.c (build_new): Tweak comment.
420
421 2007-06-29  Dave Brolley  <brolley@redhat.com>
422
423         PR c++/31743
424         * parser.c (cp_parser_new_type_id): Don't reduce a named array
425         type to its base type and number of elements here.
426         * init.c (build_new): Call complete_type_or_else to ensure that the
427         type is complete and to issue a diagnostic if it is not.
428         (build_new_1): Don't call complete_type_or_else here.
429
430 2007-07-03  Richard Guenther  <rguenther@suse.de>
431
432         PR c++/32609
433         * class.c (fixed_type_or_null): Re-lookup the hashtable slot
434         after recursing.
435
436 2007-07-02  Simon Baldwin  <simonb@google.com>
437
438         * parser.c (cp_parser_elaborated_type_specifier): Added a warning
439         for inner-style nested forward declarations that don't declare
440         anything useful.
441
442 2007-07-02  Jakub Jelinek  <jakub@redhat.com>
443
444         PR c++/31748
445         * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
446         DECL_P in not a variable and appears more than once error messages.
447
448 2007-07-01  Ollie Wild  <aaw@google.com>
449
450         * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
451         (select_decl): Remove function.
452         (unqualified_namespace_lookup): Populate binding by calling
453         ambiguous_decl.  Remove select_decl call.
454         (lookup_qualified_name): Remove select_decl call.
455         * decl.c (lookup_and_check_tag): Check for ambiguous references.
456         * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
457         generation when name lookup is ambiguous.
458
459 2007-06-29  Douglas Gregor  <doug.gregor@gmail.com>
460
461         PR c++/31724
462         * init.c (build_new_1): Use structural equality on the copy of the
463         array type.
464
465 2007-06-28  Geoffrey Keating  <geoffk@apple.com>
466
467         * decl2.c (determine_visibility): Implement
468         flag_visibility_ms_compat effect on type info.
469         * decl.c (cxx_init_decl_processing): Implement
470         global effect of flag_visibility_ms_compat.
471
472 2007-06-28  Geoffrey Keating  <geoffk@apple.com>
473
474         * decl2.c (start_objects): Mark constructor-running function
475         as artificial.
476
477 2007-06-26  Simon Martin  <simartin@users.sourceforge.net>
478
479         PR c++/32111
480         * decl.c (grokdeclarator): Reset friendp for member functions declared
481         friend of their own class.
482
483 2007-06-23  Mark Mitchell  <mark@codesourcery.com>
484
485         * decl2.c (determine_visibility): Don't look for dllexport here.
486         (determine_visibility_from_class): Tidy.
487
488 2007-06-18  Simon Baldwin <simonb@google.com>
489
490         PR c++/31923
491         * parser.c (cp_parser_single_declaration): Added check for storage
492         class other than sc_none in parsed declaration, and a flag to indicate
493         if the call is part of an explicit template specialization parse.
494         * (cp_parser_explicit_specialization): Specialization check flag added
495         to call to cp_parser_single_declaration(), set true.
496         * (cp_parser_template_declaration_after_export): Specialization check
497         flag added to call to cp_parser_single_declaration(), set false.
498         * pt.c (check_explicit_specialization): Added code to copy visiblity
499         and linkage from the templated function to the explicit specialization.
500
501 2007-06-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
502
503         * typeck.c (build_binary_op): For templates build the
504         expression in pieces to avoid the assert in build2_stat.
505         (get_member_function_from_ptrfunc):
506         Change over to using POINTER_PLUS_EXPR and convert
507         the second operand to sizetype.
508         * typeck2.c (build_m_component_ref):  Likewise.
509         * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
510         instead of PLUS_EXPR for pointers.
511         (build_new_1): Likewise.
512         (build_vec_delete_1): Likewise.
513         (build_vec_delete): Likewise.
514         * class.c (build_base_path): Likewise.
515         (build_base_path): Likewise.
516         (convert_to_base_statically): Likewise.
517         (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
518         (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
519         instead of PLUS_EXPR.
520         (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
521         instead of PLUS_EXPR for pointers.
522         * call.c (build_special_member_call): Likewise.
523         * rtti.c (build_headof): Likewise.
524         Use sizetype instead of ptrdiff_type_node.
525         (tinfo_base_init): Create a POINTER_PLUS_EXPR
526         instead of PLUS_EXPR for pointers.
527         * except.c (expand_start_catch_block):  Do a
528         NEGATIVE and then a POINTER_PLUS_EXPR instead
529         of a MINUS_EXPR.
530         * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
531         PLUS_EXPR on pointer types over to use
532         POINTER_PLUS_EXPR and remove the conversion
533         to the pointer types.
534         * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
535         adding to a pointer type. Use size_int instead of
536         ssize_int. Convert the index to sizetype before
537         adding it to the pointer.
538
539 2007-06-15  Mark Mitchell  <mark@codesourcery.com>
540
541         * cp-tree.h (DECL_VAR_MARKED_P): Remove.
542         (DECL_ANON_UNION_VAR_P): New macro.
543         * class.c (fixed_type_or_null): Tidy.  Use a hash table, rather
544         than DECL_VAR_MARKED_P, to keep track of which variables we have
545         seen.
546         * decl.c (redeclaration_error_message): Complain about redeclaring
547         anonymous union members at namespace scope.
548         * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
549
550 2007-06-14  Geoff Keating  <geoffk@apple.com>
551
552         * decl2.c (determine_visibility): Ensure that functions with
553         hidden types as parameters are hidden.
554
555         PR 31093
556         * decl2.c (determine_visibility): Remove duplicate code for
557         handling type info.
558
559 2007-06-12  Ian Lance Taylor  <iant@google.com>
560
561         PR libstdc++/29286
562         * init.c (avoid_placement_new_aliasing): New static function.
563         (build_new_1): Call it.
564
565 2007-06-11  Rafael Avila de Espindola  <espindola@google.com>
566
567         * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
568         (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
569
570 2007-06-08  Jakub Jelinek  <jakub@redhat.com>
571
572         PR c++/32177
573         * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
574         on init, the non-decl cond operand and increment value.
575
576 2007-06-07  Simon Martin  <simartin@users.sourceforge.net>
577
578         PR c++/30759
579         * decl.c (check_initializer): Report an error when a brace enclosed
580         initializer is used for a non-aggregate type in C++98.
581         (redeclaration_error_message): Rewrote flag_cpp0x in terms of
582         cxx_dialect.
583         (grokdeclarator): Likewise.
584         (move_fn_p): Likewise.
585         * typeck.c (check_return_expr): Likewise.
586         * call.c (reference_binding): Likewise.
587         * error.c (cp_cpp_error): Likewise.
588         * pt.c (check_default_tmpl_args): Likewise.
589         (tsubst): Likewise.
590         * lex.c (init_reswords): Likewise.
591         * parser.c (p_parser_primary_expression): Likewise.
592         (TOKEN_PRECEDENCE): Likewise.
593         (cp_parser_init_declarator): Likewise.
594         (cp_parser_ptr_operator): Likewise.
595         (cp_parser_parameter_declaration): Likewise.
596         (cp_parser_enclosed_template_argument_list): Likewise.
597         (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
598         (cp_parser_next_token_ends_template_argument_p): Likewise.
599
600 2007-06-04  Simon Baldwin  <simonb@google.com>
601
602         * decl.c (grokdeclarator): Readability change.  Moved case labels
603         into direct switch statement scope.
604
605 2007-06-04  Paolo Carlini  <pcarlini@suse.de>
606
607         * call.c (convert_like_real): Remove pointless code.
608
609 2007-05-31  Mark Mitchell  <mark@codesourcery.com>
610
611         * decl.c (get_atexit_fn_ptr_type): New function.
612         (get_atexit_node): Use it.
613         (start_cleanup_fn): Likewise.
614         (register_dtor_fn): Use the object's destructor, instead of a
615         separate cleanup function, where possible.
616         * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
617         (atexit_fn_ptr_type_node): New macro.
618         * decl2.c (build_cleanup): Use build_address.
619
620 2007-05-31  Daniel Berlin  <dberlin@dberlin.org>
621
622         * typeck.c (build_binary_op): Include types in error.
623
624 2007-05-31  Jakub Jelinek  <jakub@redhat.com>
625
626         PR c++/31806
627         * decl.c (cp_finish_decl): Also clear was_readonly if a static var
628         needs runtime initialization.
629
630 2007-05-31  Paolo Carlini  <pcarlini@suse.de>
631
632         PR c++/32158
633         * semantics.c (finish_trait_expr): Complete the types.
634
635 2007-05-30  Russell Yanofsky <russ@yanofsky.org>
636             Douglas Gregor <doug.gregor@gmail.com>
637             Pedro Lamarao <pedro.lamarao@mndfck.org>
638             Howard Hinnant <howard.hinnant@gmail.com>
639
640         PR c++/7412
641         PR c++/29939
642         * typeck.c (comptypes): Don't consider rvalue and lvalue
643         reference types to be equivalent.
644         (check_return_expr): Move from certain lvalues when returning
645         them.
646         * decl.c (grokdeclarator): Implement reference collapsing.
647         (copy_fn_p): Don't consider constructors taking rvalue references
648         to be copy constructors.
649         (move_fn_p): New.
650         * call.c (conversion): New "rvaluedness_matches_p" member.
651         (convert_class_to_reference): Require reference type as first
652         parameter instead of base type.
653         (reference_binding): Add logic to handle rvalue references.
654         (implicit_conversion): Update inaccurate comment.
655         (convert_like_real): Disable creation of temporaries that are
656         impossible to initialize for types with move constructors.
657         (build_over_call): Elide move constructors when possible.
658         (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
659         (maybe_handle_ref_bind): Return conversion instead of type node.
660         (compare_ics): Add logic to use "rvaluedness_matches_p" values to
661         determine preferred conversion sequences.
662         * cp-tree.h (TYPE_REF_IS_RVALUE): New.
663         (LOOKUP_PREFER_RVALUE): New.
664         (DECL_MOVE_CONSTRUCTOR_P): New.
665         (struct cp_declarator): Add "reference" member for reference
666         types, with new "rvalue_ref" flag.
667         (cp_build_reference_type): Declare.
668         (move_fn_p): Declare.
669         * error.c (dump_type_prefix): Format rvalue reference types
670         correctly in error messages.
671         * except.c (build_throw): Move from certain lvalues when
672         throwing.
673         * mangle.c (write_type): Mangle rvalue references differently
674         than regular references.
675         * parser.c (make_reference_declarator): Add boolean parameter for
676         rvalue references.
677         (cp_parser_make_indirect_declarator): New.
678         (cp_parser_new_declarator_opt): Call
679         cp_parser_make_indirect_declarator. 
680         (cp_parser_conversion_declarator_opt): Ditto.
681         (cp_parser_declarator): Ditto.
682         (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
683         declarators.
684         * pt.c (tsubst): Implement reference collapsing.
685         (maybe_adjust_types_for_deduction): Implement special template
686         parameter deduction rule for rvalue references.
687         (type_unification_real): Update calls to
688         maybe_adjust_types_for_deduction.
689         (try_one_overload): Ditto.
690         (unify_pack_expansion): Ditto.
691         * tree.c (lvalue_p_1): Handle rvalue reference types.
692         (cp_build_reference_type): New.
693
694 2007-05-30  Jakub Jelinek  <jakub@redhat.com>
695
696         PR c++/31809
697         * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
698         variables that need runtime initialization.
699
700 2007-05-28  Andrew Pinski  <Andrew_pinski@playstation.sony.com>
701
702         PR c++/31339
703         * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
704         case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
705         case POSTDECREMENT_EXPR>): Return the error_mark_node
706         if either the real or imaginary parts would an
707         error_mark_node.
708         
709 2007-05-25  Simon Martin  <simartin@users.sourceforge.net>
710             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
711
712         PR c++/31745
713         * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
714         token is a closing brace, false if there are no tokens left.
715         (cp_parser_namespace_alias_definition): Only consume the next token if
716         it is a closing brace.
717
718         * parser.c (cp_parser_class_specifier): Likewise.
719
720 2007-05-25  H.J. Lu  <hongjiu.lu@intel.com>
721
722         * semantics.c (finish_member_declaration): Fix a typo in the
723         last checkin.
724
725 2007-05-25  Douglas Gregor <doug.gregor@gmail.com>
726
727         PR c++/31431
728         PR c++/31432
729         PR c++/31434
730         PR c++/31435
731         PR c++/31437
732         PR c++/31438
733         PR c++/31442
734         PR c++/31443
735         PR c++/31444
736         PR c++/31445
737         * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
738         * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
739         * pt.c (check_for_bare_parameter_packs): Return bool indicated
740         whether everything was okay. Fix indentation.
741         (push_template_decl_real): Check for bare parameter packs in
742         function parameters; where errors occur, mark the parameter types
743         with ERROR_MARK_NODEs to avert ICEs.
744         (coerce_template_parameter_pack): New.
745         (coerce_template_parms): Moved parameter pack coercion into
746         coerce_template_parameter_pack, and permit it anywhere in the
747         template parameter list (not just at the end). Parameter and
748         argument indices can vary (somewhat) separately now, so add
749         PARM_IDX and ARG_IDX.
750         (fn_type_unification): Don't set an argument pack as incomplete if
751         no argument pack was deduced.
752         (type_unification_real): If a type parameter is a parameter pack
753         and has not otherwise been deduced, it will be deduced to an empty
754         parameter pack.
755         (more_specialized_fn): Use the actual lengths of the argument
756         lists when comparing against expansions.
757         * semantics.c (finish_member_declaration): If a field's type has
758         bare parameter packs, error and set its type to ERROR_MARK_NODE.
759
760 2007-05-24  Danny Smith  <dannysmith@users.sourceforge.net>
761
762         PR target/27067
763         * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
764
765 2007-05-22  Ollie Wild  <aaw@google.com>
766
767         * name-lookup.c (ambiguous_decl): Adds check for hidden types.
768         (unqualified_namespace_lookup): Adds check for hidden types.
769
770 2007-05-22  Ollie Wild  <aaw@google.com>
771
772         * decl.c (duplicate_decls): Verify namespace names are unique.
773
774 2007-05-21  Mark Mitchell  <mark@codesourcery.com>
775
776         * decl.c (cxx_maybe_build_cleanup): Handle
777         __attribute__((cleanup)).
778
779 2007-05-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
780
781         * cvt.c (cp_convert_and_check): Don't check warnings if the
782         conversion failed.
783
784 2007-05-18  Geoffrey Keating  <geoffk@apple.com>
785
786         * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
787
788 2007-05-14  Paolo Carlini  <pcarlini@suse.de>
789
790         PR c++/29928
791         * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
792         type only if is a class type (5.2.8/4).
793
794 2007-05-14  Rafael Avila de Espindola  <espindola@google.com>
795
796         * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
797         * decl.c (grokdeclarator): Use unsigned_type_for instead of
798         c_common_unsigned_type.
799
800 2007-05-11  Silvius Rus  <rus@google.com>
801
802         * cp/typeck.c (build_indirect_ref): Add call to
803         strict_aliasing_warning.
804         (build_reinterpret_cast_1): Condition call to
805         strict_aliasing_warning. 
806
807 2007-05-11  Jan Hubicka  <jh@suse.cz>
808
809         * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
810         * decl2.c (start_objects): ctors and dtors are no longer public.
811         (cp_write_global_declarations): Do not call c_build_cdtor_fns.
812         
813 2007-05-07  Andrew Pinski  <andrew_pinski@playstation.sony.com>
814
815         * typeck.c (build_unary_op): Remove code that used to
816         handle non lvalue increments/decrements.
817
818 2007-05-07  Mike Stump  <mrs@apple.com>
819
820         * parser.c (check_empty_body): Add.
821         (cp_parser_iteration_statement): Add call to check_empty_body.
822
823 2007-05-05  Geoffrey Keating  <geoffk@apple.com>
824
825         PR 31775
826         * mangle.c (write_mangled_name): Mangle static variable names.
827         (write_unqualified_name): Use local-source-name for
828         namespace-scope static variables.
829
830 2007-05-04  Dirk Mueller  <dmueller@suse.de>
831
832         * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
833         not in effect.
834
835 2007-05-02  Seongbae Park  <seongbae.park@gmail.com>
836
837         PR c++/31663
838         * decl2.c (constrain_class_visibility): 
839         Use strip_pointer_or_array_types instead of strip_array_types.
840
841 2007-04-28  Andrew Pinski  <andrew_pinski@playstation.sony.com>
842
843         PR C++/30221
844         * decl.c (reshape_init_r): Don't reshape the first element if it
845         is a pointer to member function.
846
847 2007-04-27  Simon Baldwin  <simonb@google.com>
848
849         * decl.c (grokparms): Changed message format from %qD to %qE.
850
851 2007-04-27  Douglas Gregor  <doug.gregor@gmail.com>
852
853         * error.c (maybe_warn_variadic_templates): Variadic templates are
854        now in C++0x, so only warn about them in C++98 mode.
855         
856 2007-04-26  Andrew Pinski  <andrew_pinski@playstation.sony.com>
857
858         PR C++/30016
859         * typeck.c (build_reinterpret_cast_1): Only allow conversion to
860         integeral types from vectors types.
861
862 2007-04-26  Jakub Jelinek  <jakub@redhat.com>
863
864         PR c++/31598
865         * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
866         for type dependent OMP_CLAUSE_DECLs.
867
868 2007-04-24  Mark Mitchell  <mark@codesourcery.com>
869
870         PR c++/31338
871         * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
872         * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
873         COMPLEX_TYPE is now an ARITHMETIC_TYPE.
874         * init.c (build_zero_init): Adjust, as
875         COMPLEX_TYPE is now a SCALAR_TYPE.
876         * typeck2.c (digest_init): Allow brace-enclosed initializers for
877         COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
878
879 2007-04-25  Paolo Carlini  <pcarlini@suse.de>
880
881         * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
882         per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
883         (trait_expr_value): Adjust.
884
885 2007-04-23  Simon Baldwin  <simonb@google.com>
886
887         * decl.c (grokparms): Added new error for duplicate function
888         parameters names in function prototypes, to match gcc behavior.
889
890 2007-04-23  Jan Hubicka  <jh@suse.cz>
891
892         * cp/decl2.c (finish_objects): Do not call target constructor/destructor
893         bits dirrectly.
894
895 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
896
897         * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
898         instead of checking GIMPLE_STMT_P in chain_next.
899
900 2007-04-17  Mark Mitchell  <mark@codesourcery.com>
901
902         PR c++/31513
903         * call.c (convert_for_arg_passing): Convert bitfields to their
904         declared types.
905
906 2007-04-17  Simon Martin  <simartin@users.sourceforge.net>
907
908         PR c++/31517
909         * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
910
911 2007-04-16  Seongbae Park <seongbae.park@gmail.com>
912
913         PR c++/29365
914
915         * cp/decl2.c (constrain_class_visibility):
916         Do not warn about the use of anonymous namespace in the main input file.
917
918 2007-04-15  Mark Mitchell  <mark@codesourcery.com>
919
920         * cp-tree.h (current_template_parms): Fix typo in comment.
921
922 2007-04-15  Kazu Hirata  <kazu@codesourcery.com>
923
924         * cp-tree.h, error.c: Fix comment typos.
925
926 2007-04-13  Jason Merrill  <jason@redhat.com>
927
928         PR c++/31074
929         * call.c (reference_binding): Add c_cast_p parm.  If true,
930         add quals to TO as needed to make it reference-compatible.
931
932 2007-04-11  Jan Hubicka  <jh@suse.cz>
933
934         * cp/class.c (convert_to_base_statically): Fold produced tree; verify
935         that we are not processing template_decl.
936
937 2007-04-09  Mark Mitchell  <mark@codesourcery.com>
938
939         PR c++/31449
940         * class.c (build_base_path): Ensure that the converted pointer has
941         the same cv-qualification as the input.
942
943 2007-04-09  Paolo Carlini  <pcarlini@suse.de>
944
945         * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
946
947 2007-04-08  Steven Bosscher  <steven@gcc.gnu.org>
948
949         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
950         Do not set it.
951         (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
952         * tree.c (cp_add_pending_fn_decls): Remove.
953         * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
954
955 2007-04-07  Daniel Berlin  <dberlin@dberlin.org>
956
957         Revert change removing staticp.
958
959 2007-04-06  Daniel Berlin  <dberlin@dberlin.org>
960
961         * cp-objcp-common.c (cxx_staticp): Remove.
962         * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
963         * cp-tree.h (cxx_staticp):      
964
965 2007-04-04  Danny Smith  <dannysmith.users.sourceforge.net>
966
967         * class.c (check_for_override): Don't remove dllmport attribute
968         of virtual methods.
969
970 2007-04-03  Jakub Jelinek  <jakub@redhat.com>
971
972         PR c++/30847
973         * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
974         type issue error and return early.
975
976 2007-03-30  Jason Merrill  <jason@redhat.com>
977
978         PR c++/31187
979         * typeck.c (cp_type_readonly): New fn.
980         * cp-tree.h: Declare it.
981         * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
982         (cp_finish_decl): Not here.
983
984 2007-03-31  Richard Guenther  <rguenther@suse.de>
985
986         * optimize.c (maybe_clone_body): Replace splay-tree usage by
987         pointer-map.
988
989 2007-03-31  Douglas Gregor  <doug.gregor@gmail.com>
990
991         PR c++/31138
992         PR c++/31140
993         PR c++/31141
994         * parser.c (declarator_can_be_parameter_pack): New.
995         (cp_parser_template_parameter): Only parse the `...' if the
996         declarator can be a parameter pack.
997         (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
998         is NULL.
999         * pt.c (find_parameter_packs_r): Look into the bounds on integer
1000         types (they could be used as array bounds). 
1001         (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
1002         (tsubst_pack_expansion): Handle failure to expand parameter
1003         packs.
1004         
1005 2007-03-30  Paolo Carlini  <pcarlini@suse.de>
1006
1007         PR c++/26099
1008         * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
1009         TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
1010         (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
1011         (CLASS_TYPE_NON_UNION_P): Add.
1012         (struct lang_type_class): Add has_complex_dflt.
1013         (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
1014         (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
1015         * cp-tree.def: Add TRAIT_EXPR.
1016         * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
1017         * lex.c (struct resword): Add __has_nothrow_assign,
1018         __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
1019         __has_trivial_constructor, __has_trivial_copy,
1020         __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
1021         __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
1022         __is_pod, __is_polymorphic, __is_union.
1023         * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
1024         (cp_parser_trait_expr): New.
1025         * semantics.c (finish_trait_expr, trait_expr_value
1026         classtype_has_nothrow_copy_or_assign_p): New.
1027         * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
1028         as static.
1029         * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
1030         * class.c (check_bases, check_field_decl, check_bases_and_members):
1031         Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
1032         * pt.c (uses_template_parms, tsubst_copy_and_build,
1033         value_dependent_expression_p, type_dependent_expression_p): Deal with
1034         TRAIT_EXPR.
1035         * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
1036
1037 2007-03-29  Richard Guenther  <rguenther@suse.de>
1038
1039         * tree.c (cp_walk_subtrees): Do not set input_location.
1040
1041 2007-03-28  Simon Martin  <simartin@users.sourceforge.net>
1042
1043         PR c++/29077
1044         * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
1045         destructor.
1046
1047 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1048
1049         * parser.c (struct cp_parser): Update comment for
1050         greater_than_is_operator_p.
1051         (cp_parser_primary_expression): In C++0x mode, a cast operator can
1052         be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
1053         (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
1054         !GREATER_THAN_IS_OPERATOR_P.
1055         (cp_parser_binary_expression): When -Wc++0x-compat, warn about
1056         `>>' operators that will become two `>' tokens in C++0x.
1057         (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
1058         mode, allowing it to terminate default arguments.
1059         (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
1060         `>>' like two consecutive `>' tokens.
1061         (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
1062         (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
1063         ends a template argument.
1064
1065 2007-03-28  Douglas Gregor  <doug.gregor@gmail.com>
1066
1067         * decl.c (redeclaration_error_message): Complain when redeclaring
1068         a friend function with default template arguments (C++0x mode only).
1069         * cp-tree.h (check_default_tmpl_args): Declare.
1070         * pt.c (check_default_tmpl_args): In C++0x mode, permit default
1071         template arguments in function templates. Add support for checking
1072         the default template arguments of friend templates.
1073         (push_template_decl_real): Fix call to check_default_tmpl_args.
1074         (type_unification_real): If a template parameter has not been
1075         deduced but provides a default template argument, substitute into
1076         that default template argument.
1077         * parser.c (cp_parser_init_declarator): When declaring (but not
1078         defining!) a function template in C++0x mode, check for default
1079         template arguments.
1080
1081 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1082
1083         PR c++/29993
1084         * decl.c (grokdeclarator): Deal with cv-qualified function type
1085         typedefs in the same way for member and non-member functions.
1086
1087 2007-03-26  Dirk Mueller  <dmueller@suse.de>
1088
1089         * parser.c (cp_parser_member_declaration): Pedwarn
1090         about stray semicolons after member declarations.
1091
1092 2007-03-26  Paolo Carlini  <pcarlini@suse.de>
1093
1094         PR c++/30500
1095         * pt.c (instantiate_decl): Set in_system_header.
1096
1097 2007-03-22  Mark Mitchell  <mark@codesourcery.com>
1098
1099         * cp-tree.h (current_tempalte_parms): Improve documentation.
1100         * pt.c (current_template_args): Likewise.
1101
1102         PR c++/30863
1103         * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
1104         not consume tokens when failing.
1105
1106 2007-03-22  Jim Wilson  <wilson@specifix.com>
1107             Mark Mitchell  <mark@codesourcery.com>
1108
1109         PR c++/31273
1110         * call.c (standard_conversion): Use type_decays_to.  Keep FCODE
1111         consistent with FROM.
1112
1113 2007-03-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1114
1115         * error.c (dump_expr): Handle dependent names that designate types.
1116         * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
1117
1118 2007-03-17  Kazu Hirata  <kazu@codesourcery.com>
1119
1120         * cp-tree.def, parser.c, pt.c: Fix comment typos.
1121
1122 2007-03-16  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1123
1124         * cvt.c (cp_convert_and_check) : Define.
1125         * cp-tree.h (cp_convert_and_check): Declare.
1126         * call.c (convert_conversion_warnings): Rename to
1127         conversion_null_warnings.  The warning for floating-point to
1128         integer is handled by convert_and_check in convert_like_real.
1129         (convert_like_real): convert_conversion_warnings was renamed as
1130         conversion_null_warnings.
1131         * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
1132         overflow and changes of value during conversion.
1133
1134 2007-03-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1135
1136         PR c++/30891
1137         * parser.c (cp_parser_statement): If 'namespace' is found, this
1138         only can be a namespace alias definition, so parse it now.
1139         (cp_parser_namespace_alias_definition): if we find an open brace
1140         instead of '=', then this is actually a misplaced namespace
1141         definition.
1142         
1143 2007-03-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1144
1145         PR c++/24924
1146         * decl.c (cxx_init_decl_processing): Move command-line options
1147         processing to c-opts.c.
1148         
1149 2007-03-15  Douglas Gregor  <doug.gregor@gmail.com>
1150
1151         * ptree.c (cxx_print_type): Use formatting markup for integers
1152         when printing template parameter index/level/orig level.
1153         (cxx_print_xnode): Ditto.
1154         * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
1155         (struct template_parm_index_s): Remove the PARAMETER_PACK member.
1156         Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
1157         HOST_WIDE_INTs.
1158         (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
1159         rather than a HOST_WIDE_INT.
1160         Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
1161         NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
1162         better bit-packing.
1163         (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
1164         RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
1165         IN_BASE_INITIALIZER bool bitfields.
1166         (struct cp_declarator): Make KIND a 4-bit field. Make
1167         PARAMETER_PACK_P a bool bitfield just after KIND.
1168         * pt.c (uses_parameter_packs): Destroy the pointer set.
1169         (make_pack_expansion): Ditto.
1170         (check_for_bare_parameter_packs): Ditto.
1171         * name-lookup.c (push_to_top_level): Make need_pop a bool value.
1172         
1173 2007-03-14  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1174
1175         PR c++/31165
1176         * call.c  (convert_default_arg): Instead of copying the node,
1177         unshare it.
1178
1179 2007-03-15  Dirk Mueller  <dmueller@suse.de>
1180
1181         PR c++/30860
1182         * call.c (convert_conversion_warnings): New..
1183         (convert_like_real): .. factored out from here.
1184         (convert_conversion_warnings): Add warning about
1185         false being converted to NULL in argument passing.
1186
1187 2007-03-14  Dirk Mueller  <dmueller@suse.de>
1188
1189         * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
1190         (finish_do_body): Warn about empty body in do/while statement.
1191
1192 2007-03-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1193
1194         * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
1195         
1196 2007-03-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1197
1198         PR c/21438
1199         * typeck.c (build_binary_op): Call warn_for_div_zero instead of
1200         warning.
1201         
1202 2007-03-13  Alexandre Oliva  <aoliva@redhat.com>
1203
1204         * cp/repo.c (init_repo): Initialize random_seed saved options.
1205         (finish_repo): Adjust.
1206
1207 2007-03-13  Mark Mitchell  <mark@codesourcery.com>
1208
1209         PR bootstrap/30899
1210         * Make-lang.in (doc/g++.1): Use $< to specify the location from
1211         which to copy.
1212
1213 2007-03-12  Seongbae Park <seongbae.park@gmail.com>
1214
1215         * decl.c (compute_array_index_type): New warning flag warn_vla.
1216
1217 2007-03-12  Mark Mitchell  <mark@codesourcery.com>
1218
1219         PR c++/30108
1220         * call.c (convert_default_arg): Copy non-constant arguments.
1221
1222 2007-03-11  Mark Mitchell  <mark@codesourcery.com>
1223
1224         PR c++/31038
1225         * parser.c (cp_parser_postfix_expression): Disallow compound
1226         literals in constant expressions.
1227
1228         PR c++/30328
1229         * semantics.c (finish_typeof): Use unlowered_expr_type.
1230         
1231 2007-03-10  Mark Mitchell  <mark@codesourcery.com>
1232
1233         PR c++/30274
1234         * cp-tree.h (unlowered_expr_type): New function.
1235         * typeck.c (is_bitfield_expr_with_lowered_type): Handle
1236         COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
1237         (unlowered_expr_type): New function.
1238         (build_unary_op): Disallow predecrements of bool bitfields.
1239         * call.c (build_conditional_expr): Use unlowered_expr_type.
1240         * pt.c (type_unification_real): Likewise.
1241
1242 2007-03-09  Douglas Gregor  <doug.gregor@gmail.com>
1243
1244         PR c++/20599
1245         * typeck.c (check_return_expr): Check for bare parameter packs.
1246         (comptypes): Compare template parameter packs and
1247         type pack expansions.
1248         * decl.c (grokdeclarator): Deal with the declaration of function
1249         parameter packs.
1250         (grokparms): Verify that the (optional) function parameter pack is
1251         at the end of the parameter list.
1252         (xref_basetypes): Handle pack expansions in the base class.
1253         (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
1254         * cp-tree.def (TYPE_ARGUMENT_PACK): New.
1255         (NONTYPE_ARGUMENT_PACK): New.
1256         (TYPE_PACK_EXPANSION): New.
1257         (EXPR_PACK_EXPANSION): New.
1258         (ARGUMENT_PACK_SELECT): New.
1259         * cp-objcp-common.c (cp_tree_size): Compute size of
1260         (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
1261         ARGUMENT_PACK_SELECT.
1262         * error.c (dump_template_argument): Print template argument packs.
1263         (dump_template_argument_list): Ditto.
1264         (dump_template_parameter): Dump `...' for template type parameter
1265         packs.
1266         (dump_type): Dump TYPE_PACK_EXPANSION nodes.
1267         (dump_parameters): Print function parameter packs.
1268         (dump_template_parms): Print template argument packs.
1269         (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
1270         (maybe_warn_variadic_templates): New.
1271         * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
1272         * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1273         NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1274         CAST_EXPR. 
1275         * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
1276         (write_template_arg): Write argument packs as separate arguments.
1277         * cp-tree.h (struct template_parm_index_s): Add flag that
1278         indicates that the template parameter is actually a parameter
1279         pack.
1280         (struct tree_argument_pack_select): New.
1281         (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
1282         (union lang_tree_node): Add argument_pack_select.
1283         (FUNCTION_PARAMETER_PACK_P): New.
1284         (PACK_EXPANSION_P): New.
1285         (PACK_EXPANSION_PATTERN): New.
1286         (SET_PACK_EXPANSION_PATTERN): New.
1287         (PACK_EXPANSION_PARAMETER_PACKS): New.
1288         (ARGUMENT_PACK_P): New.
1289         (ARGUMENT_PACK_ARGS): New.
1290         (SET_ARGUMENT_PACK_ARGS): New.
1291         (ARGUMENT_PACK_INCOMPLETE_P): New.
1292         (ARGUMENT_PACK_EXPLICIT_ARGS): New.
1293         (TEMPLATE_PARM_PARAMETER_PACK): New.
1294         (TEMPLATE_TYPE_PARAMETER_PACK): New.
1295         (ARGUMENT_PACK_SELECT_FROM_PACK): New.
1296         (ARGUMENT_PACK_SELECT_INDEX): New.
1297         (ARGUMENT_PACK_SELECT_ARG): New.
1298         (struct cp_declarator): Add parameter_pack_p flag.
1299         (maybe_warn_variadic_templates): Declare.
1300         (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
1301         indicate a template parameter pack. 
1302         (uses_parameter_packs): Declare.
1303         (template_parameter_pack_p): Declare.
1304         (template_parms_variadic_p): Declare.
1305         (make_pack_expansion): Declare.
1306         (check_for_bare_parameter_packs): Declare.
1307         * cxx-pretty-print.c (pp_cxx_unary_expression): Print
1308         sizeof... expressions. 
1309         (pp_cxx_expression): Print pack expansions and non-type argument
1310         packs.
1311         (pp_cxx_exception_specification): Print pack expansions. 
1312         (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
1313         (pp_cxx_ctor_initializer): Print pack expansions.
1314         (pp_cxx_type_id): Print pack expansions.
1315         (pp_cxx_template_argument_list): Print argument packs.
1316         (pp_cxx_template_parameter): Print ellipsis for template parameter
1317         packs.
1318         * pt.c (comp_template_parms): Compare template parameter packs.
1319         (template_parameter_pack_p): New.
1320         (template_parms_variadic_p): New.
1321         (template_args_variadic_p): New.
1322         (make_ith_pack_parameter_name): New.
1323         (struct find_parameter_pack_data): New.
1324         (find_parameter_packs_r): New.
1325         (uses_parameter_packs): New.
1326         (make_pack_expansion): New.
1327         (check_for_bare_parameter_packs): New.
1328         (expand_template_argument_pack): New.
1329         (reduce_template_parm_level): Propagate parameter pack flag.
1330         (process_template_parm): Add is_parameter_pack parameter to state
1331         when the parameter is actually a parameter pack. Create template
1332         parameter packs when is_parameter_pack is true.
1333         (current_template_args): The argument for a template parameter
1334         pack is an argument pack containing a single pack expansion.
1335         (process_partial_specialization): When checking that non-type
1336         argument expressions do not involve template parameters, loop over
1337         the arguments in argument packs separately.
1338         (push_template_decl_real): Check that the type of the declaration
1339         does not have any bare parameter packs. Check that primary
1340         templates have no more than one parameter pack, and that it comes
1341         at the end of the template parameter list.
1342         (convert_template_argument): Handle coercions for pack expansion
1343         expressions by coercing the pattern then rebuilding the expansion.
1344         (coerce_template_parms): When coercing the arguments for a
1345         variadic template, pack "extra" arguments into an argument pack.
1346         (coerce_template_template_parms): Cannot coerce between parameter
1347         packs and non-pack parameters.
1348         (template_args_equal): Compare PACK_EXPANSION_P expressions.
1349         (comp_template_args): Expand all template arguments packs before
1350         comparing template argument lists.
1351         (mangle_class_name_for_template): Make argument packs as separate
1352         template arguments.
1353         (for_each_template_parm_r): No need to handle BASELINK. 
1354         (instantiate_class_template): Handle pack expansions in the base
1355         class list.
1356         (tsubst_pack_expansion): New.
1357         (tsubst_template_args): Handle substitutions of argument packs and
1358         pack expansion into template argument lists.
1359         (tsubst_decl): Expand function parameter packs into separate
1360         function parameters.
1361         (tsubst_arg_types): Expand a type pack expansion into separate
1362         argument types.
1363         (tsubst_exception_specification): Handle pack expansions in
1364         exception specifiers.
1365         (tsubst): See through ARGUMENT_PACK_SELECT arguments when 
1366         replacing a template parameter with its argument. If we encounter
1367         a substitution for an argument pack, just return the parameter
1368         itself. 
1369         (tsubst_copy): sizeof(X...) returns the number of elements in
1370         parameter pack X.  See through ARGUMENT_PACK_SELECT when the
1371         PARM_DECL is a parameter pack.
1372         (tsubst_expr): Expression pack expansions and argument packs
1373         cannot show up here; they will all be handled through function
1374         calls, sizeof, and template argument lists.
1375         (tsubst_copy_and_build): sizeof(X...) returns the number of
1376         elements in parameter pack X.  Handle pack expansions in TREE_LIST
1377         and CONSTRUCTOR nodes.
1378         (fn_type_unification): Handle "incomplete" explicit template
1379         argument lists that specify some of the arguments for a template
1380         parameter pack.
1381         (type_unification_real): Unify arguments against pack expansions.
1382         (template_parm_level_and_index): New, helper function.
1383         (unify_pack_expansion): New.
1384         (unify): Unify argument packs on an argument-by-argument basis,
1385         handling variadic argument packs as well.
1386         (more_specialized_fn): Handle unification of function parameter
1387         packs. All things being equal, prefer non-variadic function
1388         templates to variadic function templates.
1389         (more_specialized_class): Prefer the variadic class template
1390         partial specialization that binds fewer arguments to a parameter
1391         pack.
1392         (regenerate_decl_from_template): Expand function parameter packs
1393         into separate parameters.
1394         (instantiate_decl): Ditto.
1395         (tsubst_initializer_list): Handle pack expansions for base-class
1396         initializers.
1397         (dependent_type_p_r): Determine dependent types in argument packs
1398         and pack expansions.
1399         (value_dependent_expression_p): Determine value-dependence of
1400         non-type argument packs.
1401         (dependent_template_arg_p): Handle argument packs.
1402         * semantics.c (finish_cond): Check for bare parameter packs.
1403         (finish_expr_stmt): Ditto.
1404         (finish_for_expr): Ditto.
1405         (finish_switch_cond): Ditto.
1406         (finish_mem_initializers): Ditto.
1407         * name-lookup.c (arg_assoc_type): Handle pack expansions and
1408         argument packs.
1409         * decl2.c (cp_build_parm_decl): Mark function parameter packs.
1410         * parser.c (make_declarator): Declarator is not an expansion.
1411         (make_pointer_declarator): Transfer parameter pack flag to outer
1412         declarator.
1413         (make_reference_declarator): Ditto.
1414         (make_ptrmem_declarator): Ditto.
1415         (make_call_declarator): Ditto.
1416         (make_array_declarator): Ditto.
1417         (cp_parser_postfix_expression): Allow pack expansion expressions
1418         in the argument list for a call expression.
1419         (cp_parser_parenthesized_expression_list): Add new parameter
1420         ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
1421         into separate arguments."
1422         (cp_parser_new_placement): Allow pack expansion expressions.
1423         (cp_parser_new_initializer): Ditto.
1424         (cp_parser_mem_initializer_list): Allow ellipsis to create a
1425         base-class initializer expansion.
1426         (cp_parser_mem_initializer): Ditto.
1427         (cp_parser_template_parameter_list): Keep track of whether the
1428         template parameter is a template parameter pack.
1429         (cp_parser_template_parameter): Parse the ellipsis to indicate a
1430         template parameter pack.
1431         (cp_parser_type_parameter): Ditto.
1432         (cp_parser_template_argument_list): Parse the ellipsis to indicate
1433         a pack expansion.
1434         (cp_parser_direct_declarator): Parse the ellipsis to indicate that
1435         this declarator is a parameter pack.
1436         (cp_parser_parameter_declaration): The ellipsis does not end the
1437         parameter declaration, because it might be a parameter pack. Parse
1438         the ellipsis to indicate a parameter pack.
1439         (cp_parser_initializer): Allow pack expansions.
1440         (cp_parser_initializer_list): Allow ellipsis to create an
1441         initializer expansion.
1442         (cp_parser_base_clause): Allow ellipsis to create a base specifier
1443         expansion.
1444         (cp_parser_type_id_list): Allow ellipsis to create an exception
1445         specifier expansion.
1446         (cp_parser_attribute_list): Don't allow pack expansions.
1447         (cp_parser_functional_cast): Allow pack expansions.
1448         (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
1449         compute the length of a parameter pack.
1450         (cp_parser_next_token_ends_template_argument_p): An ellipsis can
1451         end a template argument.
1452         * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1453         NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1454         CAST_EXPR. 
1455
1456 2007-03-09  Dirk Mueller  <dmueller@suse.de>
1457
1458         * cp/call.c (build_new_op): Call warn_logical_operator.
1459
1460 2007-03-08  Volker Reichelt  <reichelt@netcologne.de>
1461
1462         PR c++/30852
1463         * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
1464
1465         PR c++/30534
1466         * pt.c (any_template_arguments_need_structural_equality_p):
1467         Robustify.
1468
1469 2007-03-08  Alexandre Oliva  <aoliva@redhat.com>
1470
1471         * decl.c (grokdeclarator): Disable warnings for anonymous
1472         bitfields.
1473
1474 2007-03-05  Volker Reichelt  <reichelt@netcologne.de>
1475
1476         * typeck2.c (readonly_error): Always emit a hard error.
1477         Remove last argument.
1478         * cp-tree.h (readonly_error): Adjust prototype.
1479         * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
1480         * typeck.c (build_unary_op): Likewise.
1481         (build_modify_expr): Likewise.
1482
1483 2007-03-04  Simon Martin  <simartin@users.sourceforge.net>
1484
1485         PR c++/30895
1486         * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
1487
1488 2007-03-03  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1489
1490         PR c++/15787
1491         * parser.c (struct cp_parser): New IN_IF_STMT.
1492         (cp_parser_statement_seq_opt): Handle an unexpected 'else',
1493         returning if parsing the body of an 'if' statement or issuing an
1494         error and continuing.
1495         (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
1496         body of 'if'.
1497         (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
1498         
1499 2007-03-02  Simon Martin  <simartin@users.sourceforge.net>
1500
1501         PR c++/28253
1502         * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
1503         for thunks.
1504
1505 2007-03-02  Geoffrey Keating  <geoffk@apple.com>
1506
1507         * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
1508         Objective-C++.  Don't exit early if -shared-libgcc needs to be
1509         added.
1510
1511 2007-03-02  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1512
1513         * typeck.c (common_base_type): Delete unused function.
1514         
1515 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
1516
1517         * Make-lang.in: Add dummy lang.install-pdf target.
1518
1519 2007-03-01  Simon Baldwin <simonb@google.com>
1520
1521         PR c++/23689
1522         * decl.c (check_tag_decl): Added new warning for typedef ignored
1523         when it precedes an otherwise valid non-typedef declaration.
1524
1525 2007-02-28  Sandra Loosemore  <sandra@codesourcery.com>
1526
1527         * typeck.c (build_function_call): Store converted arguments
1528         in a stack-allocated array instead of building a list.
1529         (convert_arguments): Store arguments in the array passed in as an
1530         argument, and return the actual number of arguments.
1531         * call.c (build_call): Delete, and replace with...
1532         (build_call_n, build_call_a): New.
1533         (build_op_delete_call): Rewrite to avoid constructing argument lists.
1534         (build_over_call): Store converted arguments in a stack-allocated
1535         array instead of building a list.
1536         (build_cxx_call): Pass arguments in an array instead of as a list.
1537         (build_java_interface_fn_ref): Rewrite to avoid constructing
1538         argument lists.
1539         * tree.h: Update declarations to reflect above changes.
1540         * method.c (use_thunk): Use a stack-allocated array to hold
1541         the arguments instead of a list.
1542         * rtti.c (throw_bad_cast): Update call to cxx_call.
1543         (throw_bad_typeid): Likewise.
1544         (build_dynamic_cast_1): Likewise.
1545         * init.c (build_builtin_delete_call): Use build_call_n.
1546         * decl.c (expand_static_init): Likewise.
1547         * except.c (cp_protect_cleanup_actions): Likewise.
1548         * cp-gimplify.c (genericize_eh_spec_block): Likewise.
1549         (gimplify_must_not_throw_expr): Likewise.
1550         (cxx_omp_apply_fn): Use build_call_a.
1551
1552 2007-02-26  Mark Mitchell  <mark@codesourcery.com>
1553
1554         * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
1555         * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
1556
1557 2007-02-25  Mark Mitchell  <mark@codesourcery.com>
1558
1559         * cp-tree.h (static_ctors): Remove.
1560         * cp-tree.h (static_dtors): Likewise.
1561         * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
1562         refactoring of tree_map hierarchy.
1563         (decl_shadowed_for_var_insert): Likewise.
1564         * semantics.c (expand_body): Use c_expand_body.
1565         (expand_or_defer_fn): Don't update static_ctors or static_dtors.
1566         * decl2.c (static_ctors): Remove.
1567         (static_dtors): Likewise.
1568         (generate_ctor_or_dtor_function): Pass NULL_TREE to
1569         objc_generate_static_init_call.  Do not call static_[cd]tors.
1570         (generate_ctor_and_dtor_functions_for_priority): Do not check for
1571         static_[cd]tors.
1572         (cp_write_global_declarations): Likewise.
1573
1574 2007-02-23  Richard Guenther  <rguenther@suse.de>
1575
1576         * class.c (note_name_declared_in_class): Make declaration
1577         changes meaning a pedwarn.
1578
1579 2007-02-22  Michael Matz  <matz@suse.de>
1580
1581         PR c++/29433
1582         * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
1583         * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
1584         dump_function_decl): Guard emitting outer scopes by new flag.
1585         * cp-lang.c (cxx_dwarf_name): New function.
1586         (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
1587         * pt.c (classtype_mangled_name, mangle_class_name_for_template):
1588         Remove functions.
1589         (push_template_decl_real, lookup_template_class): Remove calls
1590         to above functions.
1591
1592 2007-02-19  Mark Mitchell  <mark@codesourcery.com>
1593
1594         * call.c (build_new_method_call): Ensure that explicit calls of
1595         destructors have type "void".
1596
1597 2007-02-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1598
1599         * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
1600         and -Walways-true with -Waddress.
1601         * cvt.c (convert_to_void): Replace unconditional warning with
1602         -Waddress.
1603
1604 2007-02-18  Kazu Hirata  <kazu@codesourcery.com>
1605
1606         * decl.c, tree.c: Fix comment typos.
1607
1608 2007-02-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1609
1610         PR C++/30158
1611         * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the 
1612         statement expression if we had an error mark node.
1613
1614 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
1615             Brooks Moses  <brooks.moses@codesourcery.com>
1616             Lee Millward  <lee.millward@codesourcery.com>
1617
1618         * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
1619         Change class to tcc_vl_exp.
1620
1621         * call.c (build_call): Use build_call_list instead 
1622         of build3. 
1623         (build_over_call): Likewise.
1624         (build_new_method_call): Use build_min_non_dep_call_list 
1625         instead of build_min_non_dep.
1626
1627         * error.c (dump_call_expr_args): New function.
1628         (dump_aggr_init_expr_args): New function.
1629         (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them. 
1630         Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
1631
1632         * cvt.c (convert_to_void): Use build_call_array instead
1633         of build3; use new AGGR_INIT_EXPR accessor macros.
1634
1635         * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
1636         instead of TREE_CODE_LENGTH.
1637
1638         * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
1639         AGGR_INIT_EXPR accessor macros.
1640
1641         * cp-gimplify.c (cp_gimplify_init_expr): Use 
1642         AGGR_INIT_EXPR_SLOT to set the slot operand.
1643
1644         * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
1645         (AGGR_INIT_EXPR_SLOT): New macro.
1646         (AGGR_INIT_EXPR_ARG): New macro.
1647         (aggr_init_expr_nargs): New macro.
1648         (AGGR_INIT_EXPR_ARGP): New macro.
1649         (aggr_init_expr_arg_iterator): New.
1650         (init_aggr_init_expr_arg_iterator): New.
1651         (next_aggr_init_expr_arg): New.
1652         (first_aggr_init_expr_arg): New.
1653         (more_aggr_init_expr_args_p): New.
1654         (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
1655         (stabilize_aggr_init): New declaration.
1656         (build_min_non_dep_call_list): Likewise.
1657
1658         * tree.c (process_aggr_init_operands): New function.
1659         (build_aggr_init_array) New function.
1660         (build_cplus_new): Update to use new CALL_EXPR and
1661         AGGR_INIT_EXPR accessor macros. Replace use of build3 with
1662         build_aggr_init_array.
1663         (build_min_non_dep_call_list) New function.
1664         (build_min_nt): Assert input code parameter is not a variable
1665         length expression class.
1666         (build_min, build_min_non_dep): Likewise.
1667         (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
1668         to check for equality instead of recursing. Handle tcc_vl_exp
1669         tree code classes.
1670         (stabilize_call): Update to only handle CALL_EXPRs, not 
1671         AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
1672         (stabilize_aggr_init): New function.
1673         (stabilize_init): Use it.
1674
1675         * cxx-pretty-print.c (pp_cxx_postfix_expression)
1676         <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
1677         AGGR_INIT_EXPR accessor macros and argument iterators.
1678         
1679         * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
1680         build_vl_exp. Iterate through the operands, recursively 
1681         processing each one.
1682         (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
1683         CALL_EXPR accessor macros.
1684         (value_dependent_expression_p) <default>: Handle tcc_vl_exp
1685         tree code classes. Use TREE_OPERAND_LENGTH instead of 
1686         TREE_CODE_LENGTH.
1687
1688         * semantics.c (finish_call_expr): Use build_nt_call_list
1689         instead of build_nt.
1690         (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR 
1691         accessor macros. Use build_call_array to construct the 
1692         CALL_EXPR node instead of build3
1693         
1694         * decl2.c (build_offset_ref_call_from_tree): Use 
1695         build_nt_call_list and build_min_non_dep_call_list instead
1696         of build_min_nt and build_min_non_dep.
1697
1698         * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
1699         Use build_nt_call_list instead of build_min_nt.
1700
1701 2007-02-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1702
1703         PR c++/28943
1704         * call.c (build_conditional_expr): Improve error message.
1705         
1706 2007-02-13  Dirk Mueller  <dmueller@suse.de>
1707
1708         * friend.c (do_friend): Annotate warning about friend
1709         declarations in templates with OPT_Wnon_template_friend.
1710         Convert informal message from warning() to inform().
1711
1712 2007-02-12  Simon Martin  <simartin@users.sourceforge.net>
1713             Mark Mitchell  <mark@codesourcery.com>
1714
1715         PR c++/14622
1716         * pt.c (do_decl_instantiation): Detect type mismatches in explicit
1717         instantiations for variables.
1718
1719 2007-02-12  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1720
1721         PR middle-end/7651
1722         * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
1723         Check warn_unused_value just once.
1724
1725 2007-02-11  Mark Mitchell  <mark@codesourcery.com>
1726
1727         PR c++/26988
1728         * pt.c (determine_specialization): Use skip_artificial_parms_for.
1729         (fn_type_unificiation): Likewise.
1730         (get_bindings): Likewise.
1731
1732 o2007-02-06  Mark Mitchell  <mark@codesourcery.com>
1733
1734         PR target/29487
1735         * decl.c (finish_function): Use DECL_REPLACEABLE.
1736         * tree.c (cp_cannot_inline_tree_fn): Likewise.
1737
1738 2007-02-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1739
1740         * parser.c (cp_parser_primary_expression): Reformat overly long lines.
1741
1742 2007-02-10  Richard Henderson  <rth@redhat.com>, Jakub Jelinek  <jakub@redhat.com>
1743
1744         * decl.c (grokvardecl): Don't error if !have_tls.
1745         (grokdeclarator): Likewise.
1746         * parser.c (cp_parser_omp_threadprivate): Likewise.
1747
1748 2007-02-07  Jakub Jelinek  <jakub@redhat.com>
1749
1750         PR c++/30703
1751         * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
1752         parameters and result decls in omp clauses.
1753         (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
1754         by reference.
1755
1756 2007-02-05  Dirk Mueller  <dmueller@suse.de>
1757
1758         PR bootstrap/30510
1759         * parser.c (cp_parser_class_specifier): Always initialize bases.
1760
1761 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
1762
1763         * cp-tree.h (OMP_ATOMIC_CODE): Delete.
1764         (OMP_ATOMIC_DEPENDENT_P): Rewrite.
1765         * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
1766         expressions.
1767         * semantics.c (finish_omp_atomic): Store a whole expression node
1768         in operand 1, and integer_zero_node in operand 0, for dependent
1769         OMP_ATOMIC.  Rewrite to make flow easier to understand.
1770
1771 2007-02-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1772
1773         * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
1774
1775 2007-02-04  Kazu Hirata  <kazu@codesourcery.com>
1776
1777         * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
1778         parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
1779
1780 2007-02-03  Douglas Gregor  <doug.gregor@gmail.com>
1781
1782        * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
1783        keyword warning to -Wc++0x-compat.
1784         
1785 2007-02-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1786
1787         * decl.c (grokdeclarator): Update documentation.
1788
1789 2007-02-02  Jakub Jelinek  <jakub@redhat.com>
1790
1791         PR c++/30536
1792         * decl.c (grokdeclarator): If __thread is used together with
1793         a storage class other than extern and static, clear thread_p
1794         after issuing diagnostics and fall through to checking the
1795         storage class.
1796
1797 2007-01-30  Roger Sayle  <roger@eyesopen.com>
1798
1799         * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
1800         calculating the size of an array (to avoid recursive errors).
1801
1802 2007-01-30  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1803
1804         PR c++/24745
1805         * typeck.c (build_binary_op): Fix logic for warning. Move warning
1806         to -Wpointer-arith.
1807         * call.c (convert_like_real): Don't warn when converting to
1808         boolean type.
1809         
1810 2007-01-29  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1811
1812         * decl.c (pop_label): Replace warning with call to
1813         warn_for_unused_label.
1814
1815 2007-01-28  Andrew Pinski  <pinskia@gmail.com>
1816
1817         PR C++/28988
1818         * semantics.c (finish_pseudo_destructor_expr): Check the
1819         destrutor name by calling check_dtor_name.
1820
1821 2007-01-24  Douglas Gregor  <dgregor@osl.iu.edu>
1822
1823         * lex.c (D_CPP0X): Rename.
1824         (D_CXX0X): To this.
1825         (reswords): D_CPP0X -> D_CXX0X.
1826         (init_reswords): Ditto.
1827         * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
1828         of C++0x keywords as identifiers.
1829
1830 2007-01-23  Simon Martin  <simartin@users.sourceforge.net>
1831
1832         PR c++/27492
1833         * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
1834         function decls.
1835
1836 2007-01-23  Ian Lance Taylor  <iant@google.com>
1837
1838         * typeck.c (convert_for_assignment): Only warn about a = b = c
1839         when converting to bool.
1840
1841 2007-01-23  Roger Sayle  <roger@eyesopen.com>
1842
1843         * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
1844         TREE_OVERFLOW.
1845         * typeck.c (ignore_overflows): Remove the remaining uses of
1846         TREE_CONSTANT_OVERFLOW.
1847
1848 2007-01-20  Jan Hubicka  <jh@suse.cz>
1849
1850         * decl2.c (start_objects, start_static_storage_duration_function):
1851         Do not make the functions uninlinable.
1852
1853 2007-01-17  Ian Lance Taylor  <iant@google.com>
1854
1855         * class.c (add_method): Call VEC_reserve_exact rather than passing
1856         a negative size to VEC_reserve.
1857
1858 2007-01-11  Simon Martin  <simartin@users.sourceforge.net>
1859
1860         PR c++/29573
1861         * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
1862
1863 2007-01-10  Mark Mitchell  <mark@codesourcery.com>
1864
1865         PR c++/28999
1866         * decl.c (make_typename_type): If the qualified name is not a
1867         type, issue an error.
1868         * parser.c (cp_parser_elaborated_type_specifier): Fix comment
1869         formatting.
1870
1871 2007-01-08  Geoffrey Keating  <geoffk@apple.com>
1872
1873         * rtti.c: Include target.h.
1874         (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
1875         don't emit typeinfo for fundamental types as weak.
1876         * Make-lang.in (cp/rtti.o): Update and correct dependencies.
1877
1878 2007-01-08  Richard Guenther  <rguenther@suse.de>
1879
1880         * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
1881
1882 2007-01-08  Mark Shinwell  <shinwell@codesourcery.com>
1883
1884         * call.c (standard_conversion): Pass flag to
1885         vector_types_convertible_p to disallow emission of note.
1886         * typeck.c (convert_for_assignment): Pass flag to
1887         vector_types_convertible_p to allow emission of note.
1888         (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
1889         to disallow emission of note.
1890
1891 2007-01-07  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1892
1893         PR c++/28986
1894         * typeck.c (build_binary_op): Call overflow_warning if
1895         TREE_OVERFLOW_P is true for the result and not for any of the
1896         operands.
1897         
1898 2007-01-06  Lee Millward  <lee.millward@codesourcery.com>
1899
1900        PR c++/19439
1901        * class.c (add_method): Don't wait until template
1902        instantiation time to complain about duplicate methods.
1903         
1904 2007-01-05  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1905
1906         PR c/19978
1907         * semantics.c (finish_unary_op_expr): Warn only if result
1908         overflowed and operands did not.
1909
1910 2007-01-05  Ian Lance Taylor  <iant@google.com>
1911
1912         * typeck.c (build_binary_op): Warn about comparing a non-weak
1913         address to NULL.
1914
1915 2007-01-05  Douglas Gregor  <doug.gregor@gmail.com>
1916
1917         * pt.c (tsubst): Propagate the need for structural equality checks
1918         when reducing the level of template parameters.
1919
1920 2007-01-03  Kazu Hirata  <kazu@codesourcery.com>
1921
1922         * pt.c: Fix a comment typo.
1923
1924 2007-01-02  Ian Lance Taylor  <iant@google.com>
1925
1926         * semantics.c (maybe_convert_cond): Optionally warn when using an
1927         assignment as a condition.
1928         * typeck.c (convert_for_assignment): Optionally warn about
1929         assigning the result of an assignment to a bool.
1930
1931 2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>
1932
1933         * pt.c (canonical_template_parms): Correct typo in comment.
1934         
1935 2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>
1936
1937         * typeck.c (structural_comptypes): Renamed from "comptypes".
1938         (comptypes): Use canonical type information to perform fast type
1939         comparison. When VERIFY_CANONICAL_TYPES, verify that the
1940         canonical type comparison returns the same results as we would see
1941         from the current, structural check. Support COMPARE_STRUCTURAL
1942         when we need structural checks.
1943         * decl.c (typename_compare): Fix comment.
1944         (build_typename_type): TYPENAME_TYPE nodes require structural
1945         equality checks, because they resolve different based on the
1946         current class type.
1947         (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
1948         require structural equality checks (for now).
1949         (build_ptrmemfunc_type): Build the canonical pointer to member
1950         function type.
1951         (compute_array_index_type): Whenever we build a new index type
1952         to represent the size of an array in a template, we need to mark
1953         this index type as requiring structural equality. This goes for
1954         arrays with value-dependent sizes with the current ABI, or all
1955         arrays with ABI-1.
1956         * tree.c (cplus_array_hash): New.
1957         (struct cplus_array_info): New.
1958         (cplus_array_compare): New.
1959         (cplus_array_htab): New.
1960         (build_cplus_array_type_1): Use a hash table to cache the array
1961         types we build. Build the canonical array type for each array
1962         type.
1963         (cp_build_qualified_type_real): When building a cv-qualified array
1964         type, use the hash table of array types and build canonical array
1965         types as necessary.
1966         (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
1967         use structural equality (for now).
1968         * cp-tree.h (COMPARE_STRUCTURAL): New.
1969         * pt.c (canonical_template_parms): New.
1970         (canonical_type_parameter): New.
1971         (process_template_parm): Find the canonical type parameter.
1972         (lookup_template_class): When we have named the primary template
1973         type, set the canonical type for our template class to the primary
1974         template type. If any of the template arguments need structural
1975         equality checks, the template class needs structural equality
1976         checks.
1977         (tsubst): When reducing the level of a template template
1978         parameter, we require structural equality tests for the resulting
1979         parameter because its template parameters have not had their types
1980         canonicalized. When reducing a template type parameter, find the
1981         canonical reduced type parameter.
1982         (any_template_arguments_need_structural_equality_p): New.
1983