OSDN Git Service

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