OSDN Git Service

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