OSDN Git Service

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