OSDN Git Service

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