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