OSDN Git Service

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