OSDN Git Service

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