OSDN Git Service

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