OSDN Git Service

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