OSDN Git Service

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