Index: libiberty/ChangeLog
[gcc.git] / gcc / cp / ChangeLog
1 2007-05-05 Geoffrey Keating <geoffk@apple.com>
2
3 PR 31775
4 * mangle.c (write_mangled_name): Mangle static variable names.
5 (write_unqualified_name): Use local-source-name for
6 namespace-scope static variables.
7
8 2007-05-04 Dirk Mueller <dmueller@suse.de>
9
10 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
11 not in effect.
12
13 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
14
15 PR c++/31663
16 * decl2.c (constrain_class_visibility):
17 Use strip_pointer_or_array_types instead of strip_array_types.
18
19 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
20
21 PR C++/30221
22 * decl.c (reshape_init_r): Don't reshape the first element if it
23 is a pointer to member function.
24
25 2007-04-27 Simon Baldwin <simonb@google.com>
26
27 * decl.c (grokparms): Changed message format from %qD to %qE.
28
29 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
30
31 * error.c (maybe_warn_variadic_templates): Variadic templates are
32 now in C++0x, so only warn about them in C++98 mode.
33
34 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
35
36 PR C++/30016
37 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
38 integeral types from vectors types.
39
40 2007-04-26 Jakub Jelinek <jakub@redhat.com>
41
42 PR c++/31598
43 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
44 for type dependent OMP_CLAUSE_DECLs.
45
46 2007-04-24 Mark Mitchell <mark@codesourcery.com>
47
48 PR c++/31338
49 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
50 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
51 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
52 * init.c (build_zero_init): Adjust, as
53 COMPLEX_TYPE is now a SCALAR_TYPE.
54 * typeck2.c (digest_init): Allow brace-enclosed initializers for
55 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
56
57 2007-04-25 Paolo Carlini <pcarlini@suse.de>
58
59 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
60 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
61 (trait_expr_value): Adjust.
62
63 2007-04-23 Simon Baldwin <simonb@google.com>
64
65 * decl.c (grokparms): Added new error for duplicate function
66 parameters names in function prototypes, to match gcc behavior.
67
68 2007-04-23 Jan Hubicka <jh@suse.cz>
69
70 * cp/decl2.c (finish_objects): Do not call target constructor/destructor
71 bits dirrectly.
72
73 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
74
75 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
76 instead of checking GIMPLE_STMT_P in chain_next.
77
78 2007-04-17 Mark Mitchell <mark@codesourcery.com>
79
80 PR c++/31513
81 * call.c (convert_for_arg_passing): Convert bitfields to their
82 declared types.
83
84 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
85
86 PR c++/31517
87 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
88
89 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
90
91 PR c++/29365
92
93 * cp/decl2.c (constrain_class_visibility):
94 Do not warn about the use of anonymous namespace in the main input file.
95
96 2007-04-15 Mark Mitchell <mark@codesourcery.com>
97
98 * cp-tree.h (current_template_parms): Fix typo in comment.
99
100 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
101
102 * cp-tree.h, error.c: Fix comment typos.
103
104 2007-04-13 Jason Merrill <jason@redhat.com>
105
106 PR c++/31074
107 * call.c (reference_binding): Add c_cast_p parm. If true,
108 add quals to TO as needed to make it reference-compatible.
109
110 2007-04-11 Jan Hubicka <jh@suse.cz>
111
112 * cp/class.c (convert_to_base_statically): Fold produced tree; verify
113 that we are not processing template_decl.
114
115 2007-04-09 Mark Mitchell <mark@codesourcery.com>
116
117 PR c++/31449
118 * class.c (build_base_path): Ensure that the converted pointer has
119 the same cv-qualification as the input.
120
121 2007-04-09 Paolo Carlini <pcarlini@suse.de>
122
123 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
124
125 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
126
127 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
128 Do not set it.
129 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
130 * tree.c (cp_add_pending_fn_decls): Remove.
131 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
132
133 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
134
135 Revert change removing staticp.
136
137 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
138
139 * cp-objcp-common.c (cxx_staticp): Remove.
140 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
141 * cp-tree.h (cxx_staticp):
142
143 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
144
145 * class.c (check_for_override): Don't remove dllmport attribute
146 of virtual methods.
147
148 2007-04-03 Jakub Jelinek <jakub@redhat.com>
149
150 PR c++/30847
151 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
152 type issue error and return early.
153
154 2007-03-30 Jason Merrill <jason@redhat.com>
155
156 PR c++/31187
157 * typeck.c (cp_type_readonly): New fn.
158 * cp-tree.h: Declare it.
159 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
160 (cp_finish_decl): Not here.
161
162 2007-03-31 Richard Guenther <rguenther@suse.de>
163
164 * optimize.c (maybe_clone_body): Replace splay-tree usage by
165 pointer-map.
166
167 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
168
169 PR c++/31138
170 PR c++/31140
171 PR c++/31141
172 * parser.c (declarator_can_be_parameter_pack): New.
173 (cp_parser_template_parameter): Only parse the `...' if the
174 declarator can be a parameter pack.
175 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
176 is NULL.
177 * pt.c (find_parameter_packs_r): Look into the bounds on integer
178 types (they could be used as array bounds).
179 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
180 (tsubst_pack_expansion): Handle failure to expand parameter
181 packs.
182
183 2007-03-30 Paolo Carlini <pcarlini@suse.de>
184
185 PR c++/26099
186 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
187 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
188 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
189 (CLASS_TYPE_NON_UNION_P): Add.
190 (struct lang_type_class): Add has_complex_dflt.
191 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
192 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
193 * cp-tree.def: Add TRAIT_EXPR.
194 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
195 * lex.c (struct resword): Add __has_nothrow_assign,
196 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
197 __has_trivial_constructor, __has_trivial_copy,
198 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
199 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
200 __is_pod, __is_polymorphic, __is_union.
201 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
202 (cp_parser_trait_expr): New.
203 * semantics.c (finish_trait_expr, trait_expr_value
204 classtype_has_nothrow_copy_or_assign_p): New.
205 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
206 as static.
207 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
208 * class.c (check_bases, check_field_decl, check_bases_and_members):
209 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
210 * pt.c (uses_template_parms, tsubst_copy_and_build,
211 value_dependent_expression_p, type_dependent_expression_p): Deal with
212 TRAIT_EXPR.
213 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
214
215 2007-03-29 Richard Guenther <rguenther@suse.de>
216
217 * tree.c (cp_walk_subtrees): Do not set input_location.
218
219 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
220
221 PR c++/29077
222 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
223 destructor.
224
225 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
226
227 * parser.c (struct cp_parser): Update comment for
228 greater_than_is_operator_p.
229 (cp_parser_primary_expression): In C++0x mode, a cast operator can
230 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
231 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
232 !GREATER_THAN_IS_OPERATOR_P.
233 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
234 `>>' operators that will become two `>' tokens in C++0x.
235 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
236 mode, allowing it to terminate default arguments.
237 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
238 `>>' like two consecutive `>' tokens.
239 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
240 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
241 ends a template argument.
242
243 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
244
245 * decl.c (redeclaration_error_message): Complain when redeclaring
246 a friend function with default template arguments (C++0x mode only).
247 * cp-tree.h (check_default_tmpl_args): Declare.
248 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
249 template arguments in function templates. Add support for checking
250 the default template arguments of friend templates.
251 (push_template_decl_real): Fix call to check_default_tmpl_args.
252 (type_unification_real): If a template parameter has not been
253 deduced but provides a default template argument, substitute into
254 that default template argument.
255 * parser.c (cp_parser_init_declarator): When declaring (but not
256 defining!) a function template in C++0x mode, check for default
257 template arguments.
258
259 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
260
261 PR c++/29993
262 * decl.c (grokdeclarator): Deal with cv-qualified function type
263 typedefs in the same way for member and non-member functions.
264
265 2007-03-26 Dirk Mueller <dmueller@suse.de>
266
267 * parser.c (cp_parser_member_declaration): Pedwarn
268 about stray semicolons after member declarations.
269
270 2007-03-26 Paolo Carlini <pcarlini@suse.de>
271
272 PR c++/30500
273 * pt.c (instantiate_decl): Set in_system_header.
274
275 2007-03-22 Mark Mitchell <mark@codesourcery.com>
276
277 * cp-tree.h (current_tempalte_parms): Improve documentation.
278 * pt.c (current_template_args): Likewise.
279
280 PR c++/30863
281 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
282 not consume tokens when failing.
283
284 2007-03-22 Jim Wilson <wilson@specifix.com>
285 Mark Mitchell <mark@codesourcery.com>
286
287 PR c++/31273
288 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
289 consistent with FROM.
290
291 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
292
293 * error.c (dump_expr): Handle dependent names that designate types.
294 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
295
296 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
297
298 * cp-tree.def, parser.c, pt.c: Fix comment typos.
299
300 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
301
302 * cvt.c (cp_convert_and_check) : Define.
303 * cp-tree.h (cp_convert_and_check): Declare.
304 * call.c (convert_conversion_warnings): Rename to
305 conversion_null_warnings. The warning for floating-point to
306 integer is handled by convert_and_check in convert_like_real.
307 (convert_like_real): convert_conversion_warnings was renamed as
308 conversion_null_warnings.
309 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
310 overflow and changes of value during conversion.
311
312 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
313
314 PR c++/30891
315 * parser.c (cp_parser_statement): If 'namespace' is found, this
316 only can be a namespace alias definition, so parse it now.
317 (cp_parser_namespace_alias_definition): if we find an open brace
318 instead of '=', then this is actually a misplaced namespace
319 definition.
320
321 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
322
323 PR c++/24924
324 * decl.c (cxx_init_decl_processing): Move command-line options
325 processing to c-opts.c.
326
327 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
328
329 * ptree.c (cxx_print_type): Use formatting markup for integers
330 when printing template parameter index/level/orig level.
331 (cxx_print_xnode): Ditto.
332 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
333 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
334 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
335 HOST_WIDE_INTs.
336 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
337 rather than a HOST_WIDE_INT.
338 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
339 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
340 better bit-packing.
341 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
342 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
343 IN_BASE_INITIALIZER bool bitfields.
344 (struct cp_declarator): Make KIND a 4-bit field. Make
345 PARAMETER_PACK_P a bool bitfield just after KIND.
346 * pt.c (uses_parameter_packs): Destroy the pointer set.
347 (make_pack_expansion): Ditto.
348 (check_for_bare_parameter_packs): Ditto.
349 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
350
351 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
352
353 PR c++/31165
354 * call.c (convert_default_arg): Instead of copying the node,
355 unshare it.
356
357 2007-03-15 Dirk Mueller <dmueller@suse.de>
358
359 PR c++/30860
360 * call.c (convert_conversion_warnings): New..
361 (convert_like_real): .. factored out from here.
362 (convert_conversion_warnings): Add warning about
363 false being converted to NULL in argument passing.
364
365 2007-03-14 Dirk Mueller <dmueller@suse.de>
366
367 * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
368 (finish_do_body): Warn about empty body in do/while statement.
369
370 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
371
372 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
373
374 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
375
376 PR c/21438
377 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
378 warning.
379
380 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
381
382 * cp/repo.c (init_repo): Initialize random_seed saved options.
383 (finish_repo): Adjust.
384
385 2007-03-13 Mark Mitchell <mark@codesourcery.com>
386
387 PR bootstrap/30899
388 * Make-lang.in (doc/g++.1): Use $< to specify the location from
389 which to copy.
390
391 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
392
393 * decl.c (compute_array_index_type): New warning flag warn_vla.
394
395 2007-03-12 Mark Mitchell <mark@codesourcery.com>
396
397 PR c++/30108
398 * call.c (convert_default_arg): Copy non-constant arguments.
399
400 2007-03-11 Mark Mitchell <mark@codesourcery.com>
401
402 PR c++/31038
403 * parser.c (cp_parser_postfix_expression): Disallow compound
404 literals in constant expressions.
405
406 PR c++/30328
407 * semantics.c (finish_typeof): Use unlowered_expr_type.
408
409 2007-03-10 Mark Mitchell <mark@codesourcery.com>
410
411 PR c++/30274
412 * cp-tree.h (unlowered_expr_type): New function.
413 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
414 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
415 (unlowered_expr_type): New function.
416 (build_unary_op): Disallow predecrements of bool bitfields.
417 * call.c (build_conditional_expr): Use unlowered_expr_type.
418 * pt.c (type_unification_real): Likewise.
419
420 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
421
422 PR c++/20599
423 * typeck.c (check_return_expr): Check for bare parameter packs.
424 (comptypes): Compare template parameter packs and
425 type pack expansions.
426 * decl.c (grokdeclarator): Deal with the declaration of function
427 parameter packs.
428 (grokparms): Verify that the (optional) function parameter pack is
429 at the end of the parameter list.
430 (xref_basetypes): Handle pack expansions in the base class.
431 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
432 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
433 (NONTYPE_ARGUMENT_PACK): New.
434 (TYPE_PACK_EXPANSION): New.
435 (EXPR_PACK_EXPANSION): New.
436 (ARGUMENT_PACK_SELECT): New.
437 * cp-objcp-common.c (cp_tree_size): Compute size of
438 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
439 ARGUMENT_PACK_SELECT.
440 * error.c (dump_template_argument): Print template argument packs.
441 (dump_template_argument_list): Ditto.
442 (dump_template_parameter): Dump `...' for template type parameter
443 packs.
444 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
445 (dump_parameters): Print function parameter packs.
446 (dump_template_parms): Print template argument packs.
447 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
448 (maybe_warn_variadic_templates): New.
449 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
450 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
451 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
452 CAST_EXPR.
453 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
454 (write_template_arg): Write argument packs as separate arguments.
455 * cp-tree.h (struct template_parm_index_s): Add flag that
456 indicates that the template parameter is actually a parameter
457 pack.
458 (struct tree_argument_pack_select): New.
459 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
460 (union lang_tree_node): Add argument_pack_select.
461 (FUNCTION_PARAMETER_PACK_P): New.
462 (PACK_EXPANSION_P): New.
463 (PACK_EXPANSION_PATTERN): New.
464 (SET_PACK_EXPANSION_PATTERN): New.
465 (PACK_EXPANSION_PARAMETER_PACKS): New.
466 (ARGUMENT_PACK_P): New.
467 (ARGUMENT_PACK_ARGS): New.
468 (SET_ARGUMENT_PACK_ARGS): New.
469 (ARGUMENT_PACK_INCOMPLETE_P): New.
470 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
471 (TEMPLATE_PARM_PARAMETER_PACK): New.
472 (TEMPLATE_TYPE_PARAMETER_PACK): New.
473 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
474 (ARGUMENT_PACK_SELECT_INDEX): New.
475 (ARGUMENT_PACK_SELECT_ARG): New.
476 (struct cp_declarator): Add parameter_pack_p flag.
477 (maybe_warn_variadic_templates): Declare.
478 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
479 indicate a template parameter pack.
480 (uses_parameter_packs): Declare.
481 (template_parameter_pack_p): Declare.
482 (template_parms_variadic_p): Declare.
483 (make_pack_expansion): Declare.
484 (check_for_bare_parameter_packs): Declare.
485 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
486 sizeof... expressions.
487 (pp_cxx_expression): Print pack expansions and non-type argument
488 packs.
489 (pp_cxx_exception_specification): Print pack expansions.
490 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
491 (pp_cxx_ctor_initializer): Print pack expansions.
492 (pp_cxx_type_id): Print pack expansions.
493 (pp_cxx_template_argument_list): Print argument packs.
494 (pp_cxx_template_parameter): Print ellipsis for template parameter
495 packs.
496 * pt.c (comp_template_parms): Compare template parameter packs.
497 (template_parameter_pack_p): New.
498 (template_parms_variadic_p): New.
499 (template_args_variadic_p): New.
500 (make_ith_pack_parameter_name): New.
501 (struct find_parameter_pack_data): New.
502 (find_parameter_packs_r): New.
503 (uses_parameter_packs): New.
504 (make_pack_expansion): New.
505 (check_for_bare_parameter_packs): New.
506 (expand_template_argument_pack): New.
507 (reduce_template_parm_level): Propagate parameter pack flag.
508 (process_template_parm): Add is_parameter_pack parameter to state
509 when the parameter is actually a parameter pack. Create template
510 parameter packs when is_parameter_pack is true.
511 (current_template_args): The argument for a template parameter
512 pack is an argument pack containing a single pack expansion.
513 (process_partial_specialization): When checking that non-type
514 argument expressions do not involve template parameters, loop over
515 the arguments in argument packs separately.
516 (push_template_decl_real): Check that the type of the declaration
517 does not have any bare parameter packs. Check that primary
518 templates have no more than one parameter pack, and that it comes
519 at the end of the template parameter list.
520 (convert_template_argument): Handle coercions for pack expansion
521 expressions by coercing the pattern then rebuilding the expansion.
522 (coerce_template_parms): When coercing the arguments for a
523 variadic template, pack "extra" arguments into an argument pack.
524 (coerce_template_template_parms): Cannot coerce between parameter
525 packs and non-pack parameters.
526 (template_args_equal): Compare PACK_EXPANSION_P expressions.
527 (comp_template_args): Expand all template arguments packs before
528 comparing template argument lists.
529 (mangle_class_name_for_template): Make argument packs as separate
530 template arguments.
531 (for_each_template_parm_r): No need to handle BASELINK.
532 (instantiate_class_template): Handle pack expansions in the base
533 class list.
534 (tsubst_pack_expansion): New.
535 (tsubst_template_args): Handle substitutions of argument packs and
536 pack expansion into template argument lists.
537 (tsubst_decl): Expand function parameter packs into separate
538 function parameters.
539 (tsubst_arg_types): Expand a type pack expansion into separate
540 argument types.
541 (tsubst_exception_specification): Handle pack expansions in
542 exception specifiers.
543 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
544 replacing a template parameter with its argument. If we encounter
545 a substitution for an argument pack, just return the parameter
546 itself.
547 (tsubst_copy): sizeof(X...) returns the number of elements in
548 parameter pack X. See through ARGUMENT_PACK_SELECT when the
549 PARM_DECL is a parameter pack.
550 (tsubst_expr): Expression pack expansions and argument packs
551 cannot show up here; they will all be handled through function
552 calls, sizeof, and template argument lists.
553 (tsubst_copy_and_build): sizeof(X...) returns the number of
554 elements in parameter pack X. Handle pack expansions in TREE_LIST
555 and CONSTRUCTOR nodes.
556 (fn_type_unification): Handle "incomplete" explicit template
557 argument lists that specify some of the arguments for a template
558 parameter pack.
559 (type_unification_real): Unify arguments against pack expansions.
560 (template_parm_level_and_index): New, helper function.
561 (unify_pack_expansion): New.
562 (unify): Unify argument packs on an argument-by-argument basis,
563 handling variadic argument packs as well.
564 (more_specialized_fn): Handle unification of function parameter
565 packs. All things being equal, prefer non-variadic function
566 templates to variadic function templates.
567 (more_specialized_class): Prefer the variadic class template
568 partial specialization that binds fewer arguments to a parameter
569 pack.
570 (regenerate_decl_from_template): Expand function parameter packs
571 into separate parameters.
572 (instantiate_decl): Ditto.
573 (tsubst_initializer_list): Handle pack expansions for base-class
574 initializers.
575 (dependent_type_p_r): Determine dependent types in argument packs
576 and pack expansions.
577 (value_dependent_expression_p): Determine value-dependence of
578 non-type argument packs.
579 (dependent_template_arg_p): Handle argument packs.
580 * semantics.c (finish_cond): Check for bare parameter packs.
581 (finish_expr_stmt): Ditto.
582 (finish_for_expr): Ditto.
583 (finish_switch_cond): Ditto.
584 (finish_mem_initializers): Ditto.
585 * name-lookup.c (arg_assoc_type): Handle pack expansions and
586 argument packs.
587 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
588 * parser.c (make_declarator): Declarator is not an expansion.
589 (make_pointer_declarator): Transfer parameter pack flag to outer
590 declarator.
591 (make_reference_declarator): Ditto.
592 (make_ptrmem_declarator): Ditto.
593 (make_call_declarator): Ditto.
594 (make_array_declarator): Ditto.
595 (cp_parser_postfix_expression): Allow pack expansion expressions
596 in the argument list for a call expression.
597 (cp_parser_parenthesized_expression_list): Add new parameter
598 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
599 into separate arguments."
600 (cp_parser_new_placement): Allow pack expansion expressions.
601 (cp_parser_new_initializer): Ditto.
602 (cp_parser_mem_initializer_list): Allow ellipsis to create a
603 base-class initializer expansion.
604 (cp_parser_mem_initializer): Ditto.
605 (cp_parser_template_parameter_list): Keep track of whether the
606 template parameter is a template parameter pack.
607 (cp_parser_template_parameter): Parse the ellipsis to indicate a
608 template parameter pack.
609 (cp_parser_type_parameter): Ditto.
610 (cp_parser_template_argument_list): Parse the ellipsis to indicate
611 a pack expansion.
612 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
613 this declarator is a parameter pack.
614 (cp_parser_parameter_declaration): The ellipsis does not end the
615 parameter declaration, because it might be a parameter pack. Parse
616 the ellipsis to indicate a parameter pack.
617 (cp_parser_initializer): Allow pack expansions.
618 (cp_parser_initializer_list): Allow ellipsis to create an
619 initializer expansion.
620 (cp_parser_base_clause): Allow ellipsis to create a base specifier
621 expansion.
622 (cp_parser_type_id_list): Allow ellipsis to create an exception
623 specifier expansion.
624 (cp_parser_attribute_list): Don't allow pack expansions.
625 (cp_parser_functional_cast): Allow pack expansions.
626 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
627 compute the length of a parameter pack.
628 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
629 end a template argument.
630 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
631 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
632 CAST_EXPR.
633
634 2007-03-09 Dirk Mueller <dmueller@suse.de>
635
636 * cp/call.c (build_new_op): Call warn_logical_operator.
637
638 2007-03-08 Volker Reichelt <reichelt@netcologne.de>
639
640 PR c++/30852
641 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
642
643 PR c++/30534
644 * pt.c (any_template_arguments_need_structural_equality_p):
645 Robustify.
646
647 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
648
649 * decl.c (grokdeclarator): Disable warnings for anonymous
650 bitfields.
651
652 2007-03-05 Volker Reichelt <reichelt@netcologne.de>
653
654 * typeck2.c (readonly_error): Always emit a hard error.
655 Remove last argument.
656 * cp-tree.h (readonly_error): Adjust prototype.
657 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
658 * typeck.c (build_unary_op): Likewise.
659 (build_modify_expr): Likewise.
660
661 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
662
663 PR c++/30895
664 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
665
666 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
667
668 PR c++/15787
669 * parser.c (struct cp_parser): New IN_IF_STMT.
670 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
671 returning if parsing the body of an 'if' statement or issuing an
672 error and continuing.
673 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
674 body of 'if'.
675 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
676
677 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
678
679 PR c++/28253
680 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
681 for thunks.
682
683 2007-03-02 Geoffrey Keating <geoffk@apple.com>
684
685 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
686 Objective-C++. Don't exit early if -shared-libgcc needs to be
687 added.
688
689 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
690
691 * typeck.c (common_base_type): Delete unused function.
692
693 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
694
695 * Make-lang.in: Add dummy lang.install-pdf target.
696
697 2007-03-01 Simon Baldwin <simonb@google.com>
698
699 PR c++/23689
700 * decl.c (check_tag_decl): Added new warning for typedef ignored
701 when it precedes an otherwise valid non-typedef declaration.
702
703 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
704
705 * typeck.c (build_function_call): Store converted arguments
706 in a stack-allocated array instead of building a list.
707 (convert_arguments): Store arguments in the array passed in as an
708 argument, and return the actual number of arguments.
709 * call.c (build_call): Delete, and replace with...
710 (build_call_n, build_call_a): New.
711 (build_op_delete_call): Rewrite to avoid constructing argument lists.
712 (build_over_call): Store converted arguments in a stack-allocated
713 array instead of building a list.
714 (build_cxx_call): Pass arguments in an array instead of as a list.
715 (build_java_interface_fn_ref): Rewrite to avoid constructing
716 argument lists.
717 * tree.h: Update declarations to reflect above changes.
718 * method.c (use_thunk): Use a stack-allocated array to hold
719 the arguments instead of a list.
720 * rtti.c (throw_bad_cast): Update call to cxx_call.
721 (throw_bad_typeid): Likewise.
722 (build_dynamic_cast_1): Likewise.
723 * init.c (build_builtin_delete_call): Use build_call_n.
724 * decl.c (expand_static_init): Likewise.
725 * except.c (cp_protect_cleanup_actions): Likewise.
726 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
727 (gimplify_must_not_throw_expr): Likewise.
728 (cxx_omp_apply_fn): Use build_call_a.
729
730 2007-02-26 Mark Mitchell <mark@codesourcery.com>
731
732 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
733 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
734
735 2007-02-25 Mark Mitchell <mark@codesourcery.com>
736
737 * cp-tree.h (static_ctors): Remove.
738 * cp-tree.h (static_dtors): Likewise.
739 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
740 refactoring of tree_map hierarchy.
741 (decl_shadowed_for_var_insert): Likewise.
742 * semantics.c (expand_body): Use c_expand_body.
743 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
744 * decl2.c (static_ctors): Remove.
745 (static_dtors): Likewise.
746 (generate_ctor_or_dtor_function): Pass NULL_TREE to
747 objc_generate_static_init_call. Do not call static_[cd]tors.
748 (generate_ctor_and_dtor_functions_for_priority): Do not check for
749 static_[cd]tors.
750 (cp_write_global_declarations): Likewise.
751
752 2007-02-23 Richard Guenther <rguenther@suse.de>
753
754 * class.c (note_name_declared_in_class): Make declaration
755 changes meaning a pedwarn.
756
757 2007-02-22 Michael Matz <matz@suse.de>
758
759 PR c++/29433
760 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
761 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
762 dump_function_decl): Guard emitting outer scopes by new flag.
763 * cp-lang.c (cxx_dwarf_name): New function.
764 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
765 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
766 Remove functions.
767 (push_template_decl_real, lookup_template_class): Remove calls
768 to above functions.
769
770 2007-02-19 Mark Mitchell <mark@codesourcery.com>
771
772 * call.c (build_new_method_call): Ensure that explicit calls of
773 destructors have type "void".
774
775 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
776
777 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
778 and -Walways-true with -Waddress.
779 * cvt.c (convert_to_void): Replace unconditional warning with
780 -Waddress.
781
782 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
783
784 * decl.c, tree.c: Fix comment typos.
785
786 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
787
788 PR C++/30158
789 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
790 statement expression if we had an error mark node.
791
792 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
793 Brooks Moses <brooks.moses@codesourcery.com>
794 Lee Millward <lee.millward@codesourcery.com>
795
796 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
797 Change class to tcc_vl_exp.
798
799 * call.c (build_call): Use build_call_list instead
800 of build3.
801 (build_over_call): Likewise.
802 (build_new_method_call): Use build_min_non_dep_call_list
803 instead of build_min_non_dep.
804
805 * error.c (dump_call_expr_args): New function.
806 (dump_aggr_init_expr_args): New function.
807 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
808 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
809
810 * cvt.c (convert_to_void): Use build_call_array instead
811 of build3; use new AGGR_INIT_EXPR accessor macros.
812
813 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
814 instead of TREE_CODE_LENGTH.
815
816 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
817 AGGR_INIT_EXPR accessor macros.
818
819 * cp-gimplify.c (cp_gimplify_init_expr): Use
820 AGGR_INIT_EXPR_SLOT to set the slot operand.
821
822 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
823 (AGGR_INIT_EXPR_SLOT): New macro.
824 (AGGR_INIT_EXPR_ARG): New macro.
825 (aggr_init_expr_nargs): New macro.
826 (AGGR_INIT_EXPR_ARGP): New macro.
827 (aggr_init_expr_arg_iterator): New.
828 (init_aggr_init_expr_arg_iterator): New.
829 (next_aggr_init_expr_arg): New.
830 (first_aggr_init_expr_arg): New.
831 (more_aggr_init_expr_args_p): New.
832 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
833 (stabilize_aggr_init): New declaration.
834 (build_min_non_dep_call_list): Likewise.
835
836 * tree.c (process_aggr_init_operands): New function.
837 (build_aggr_init_array) New function.
838 (build_cplus_new): Update to use new CALL_EXPR and
839 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
840 build_aggr_init_array.
841 (build_min_non_dep_call_list) New function.
842 (build_min_nt): Assert input code parameter is not a variable
843 length expression class.
844 (build_min, build_min_non_dep): Likewise.
845 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
846 to check for equality instead of recursing. Handle tcc_vl_exp
847 tree code classes.
848 (stabilize_call): Update to only handle CALL_EXPRs, not
849 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
850 (stabilize_aggr_init): New function.
851 (stabilize_init): Use it.
852
853 * cxx-pretty-print.c (pp_cxx_postfix_expression)
854 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
855 AGGR_INIT_EXPR accessor macros and argument iterators.
856
857 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
858 build_vl_exp. Iterate through the operands, recursively
859 processing each one.
860 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
861 CALL_EXPR accessor macros.
862 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
863 tree code classes. Use TREE_OPERAND_LENGTH instead of
864 TREE_CODE_LENGTH.
865
866 * semantics.c (finish_call_expr): Use build_nt_call_list
867 instead of build_nt.
868 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
869 accessor macros. Use build_call_array to construct the
870 CALL_EXPR node instead of build3
871
872 * decl2.c (build_offset_ref_call_from_tree): Use
873 build_nt_call_list and build_min_non_dep_call_list instead
874 of build_min_nt and build_min_non_dep.
875
876 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
877 Use build_nt_call_list instead of build_min_nt.
878
879 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
880
881 PR c++/28943
882 * call.c (build_conditional_expr): Improve error message.
883
884 2007-02-13 Dirk Mueller <dmueller@suse.de>
885
886 * friend.c (do_friend): Annotate warning about friend
887 declarations in templates with OPT_Wnon_template_friend.
888 Convert informal message from warning() to inform().
889
890 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
891 Mark Mitchell <mark@codesourcery.com>
892
893 PR c++/14622
894 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
895 instantiations for variables.
896
897 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
898
899 PR middle-end/7651
900 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
901 Check warn_unused_value just once.
902
903 2007-02-11 Mark Mitchell <mark@codesourcery.com>
904
905 PR c++/26988
906 * pt.c (determine_specialization): Use skip_artificial_parms_for.
907 (fn_type_unificiation): Likewise.
908 (get_bindings): Likewise.
909
910 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
911
912 PR target/29487
913 * decl.c (finish_function): Use DECL_REPLACEABLE.
914 * tree.c (cp_cannot_inline_tree_fn): Likewise.
915
916 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
917
918 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
919
920 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
921
922 * decl.c (grokvardecl): Don't error if !have_tls.
923 (grokdeclarator): Likewise.
924 * parser.c (cp_parser_omp_threadprivate): Likewise.
925
926 2007-02-07 Jakub Jelinek <jakub@redhat.com>
927
928 PR c++/30703
929 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
930 parameters and result decls in omp clauses.
931 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
932 by reference.
933
934 2007-02-05 Dirk Mueller <dmueller@suse.de>
935
936 PR bootstrap/30510
937 * parser.c (cp_parser_class_specifier): Always initialize bases.
938
939 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
940
941 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
942 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
943 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
944 expressions.
945 * semantics.c (finish_omp_atomic): Store a whole expression node
946 in operand 1, and integer_zero_node in operand 0, for dependent
947 OMP_ATOMIC. Rewrite to make flow easier to understand.
948
949 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
950
951 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
952
953 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
954
955 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
956 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
957
958 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
959
960 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
961 keyword warning to -Wc++0x-compat.
962
963 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
964
965 * decl.c (grokdeclarator): Update documentation.
966
967 2007-02-02 Jakub Jelinek <jakub@redhat.com>
968
969 PR c++/30536
970 * decl.c (grokdeclarator): If __thread is used together with
971 a storage class other than extern and static, clear thread_p
972 after issuing diagnostics and fall through to checking the
973 storage class.
974
975 2007-01-30 Roger Sayle <roger@eyesopen.com>
976
977 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
978 calculating the size of an array (to avoid recursive errors).
979
980 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
981
982 PR c++/24745
983 * typeck.c (build_binary_op): Fix logic for warning. Move warning
984 to -Wpointer-arith.
985 * call.c (convert_like_real): Don't warn when converting to
986 boolean type.
987
988 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
989
990 * decl.c (pop_label): Replace warning with call to
991 warn_for_unused_label.
992
993 2007-01-28 Andrew Pinski <pinskia@gmail.com>
994
995 PR C++/28988
996 * semantics.c (finish_pseudo_destructor_expr): Check the
997 destrutor name by calling check_dtor_name.
998
999 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
1000
1001 * lex.c (D_CPP0X): Rename.
1002 (D_CXX0X): To this.
1003 (reswords): D_CPP0X -> D_CXX0X.
1004 (init_reswords): Ditto.
1005 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
1006 of C++0x keywords as identifiers.
1007
1008 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
1009
1010 PR c++/27492
1011 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
1012 function decls.
1013
1014 2007-01-23 Ian Lance Taylor <iant@google.com>
1015
1016 * typeck.c (convert_for_assignment): Only warn about a = b = c
1017 when converting to bool.
1018
1019 2007-01-23 Roger Sayle <roger@eyesopen.com>
1020
1021 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
1022 TREE_OVERFLOW.
1023 * typeck.c (ignore_overflows): Remove the remaining uses of
1024 TREE_CONSTANT_OVERFLOW.
1025
1026 2007-01-20 Jan Hubicka <jh@suse.cz>
1027
1028 * decl2.c (start_objects, start_static_storage_duration_function):
1029 Do not make the functions uninlinable.
1030
1031 2007-01-17 Ian Lance Taylor <iant@google.com>
1032
1033 * class.c (add_method): Call VEC_reserve_exact rather than passing
1034 a negative size to VEC_reserve.
1035
1036 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
1037
1038 PR c++/29573
1039 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
1040
1041 2007-01-10 Mark Mitchell <mark@codesourcery.com>
1042
1043 PR c++/28999
1044 * decl.c (make_typename_type): If the qualified name is not a
1045 type, issue an error.
1046 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
1047 formatting.
1048
1049 2007-01-08 Geoffrey Keating <geoffk@apple.com>
1050
1051 * rtti.c: Include target.h.
1052 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
1053 don't emit typeinfo for fundamental types as weak.
1054 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
1055
1056 2007-01-08 Richard Guenther <rguenther@suse.de>
1057
1058 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
1059
1060 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
1061
1062 * call.c (standard_conversion): Pass flag to
1063 vector_types_convertible_p to disallow emission of note.
1064 * typeck.c (convert_for_assignment): Pass flag to
1065 vector_types_convertible_p to allow emission of note.
1066 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
1067 to disallow emission of note.
1068
1069 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1070
1071 PR c++/28986
1072 * typeck.c (build_binary_op): Call overflow_warning if
1073 TREE_OVERFLOW_P is true for the result and not for any of the
1074 operands.
1075
1076 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
1077
1078 PR c++/19439
1079 * class.c (add_method): Don't wait until template
1080 instantiation time to complain about duplicate methods.
1081
1082 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1083
1084 PR c/19978
1085 * semantics.c (finish_unary_op_expr): Warn only if result
1086 overflowed and operands did not.
1087
1088 2007-01-05 Ian Lance Taylor <iant@google.com>
1089
1090 * typeck.c (build_binary_op): Warn about comparing a non-weak
1091 address to NULL.
1092
1093 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
1094
1095 * pt.c (tsubst): Propagate the need for structural equality checks
1096 when reducing the level of template parameters.
1097
1098 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
1099
1100 * pt.c: Fix a comment typo.
1101
1102 2007-01-02 Ian Lance Taylor <iant@google.com>
1103
1104 * semantics.c (maybe_convert_cond): Optionally warn when using an
1105 assignment as a condition.
1106 * typeck.c (convert_for_assignment): Optionally warn about
1107 assigning the result of an assignment to a bool.
1108
1109 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
1110
1111 * pt.c (canonical_template_parms): Correct typo in comment.
1112
1113 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
1114
1115 * typeck.c (structural_comptypes): Renamed from "comptypes".
1116 (comptypes): Use canonical type information to perform fast type
1117 comparison. When VERIFY_CANONICAL_TYPES, verify that the
1118 canonical type comparison returns the same results as we would see
1119 from the current, structural check. Support COMPARE_STRUCTURAL
1120 when we need structural checks.
1121 * decl.c (typename_compare): Fix comment.
1122 (build_typename_type): TYPENAME_TYPE nodes require structural
1123 equality checks, because they resolve different based on the
1124 current class type.
1125 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
1126 require structural equality checks (for now).
1127 (build_ptrmemfunc_type): Build the canonical pointer to member
1128 function type.
1129 (compute_array_index_type): Whenever we build a new index type
1130 to represent the size of an array in a template, we need to mark
1131 this index type as requiring structural equality. This goes for
1132 arrays with value-dependent sizes with the current ABI, or all
1133 arrays with ABI-1.
1134 * tree.c (cplus_array_hash): New.
1135 (struct cplus_array_info): New.
1136 (cplus_array_compare): New.
1137 (cplus_array_htab): New.
1138 (build_cplus_array_type_1): Use a hash table to cache the array
1139 types we build. Build the canonical array type for each array
1140 type.
1141 (cp_build_qualified_type_real): When building a cv-qualified array
1142 type, use the hash table of array types and build canonical array
1143 types as necessary.
1144 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
1145 use structural equality (for now).
1146 * cp-tree.h (COMPARE_STRUCTURAL): New.
1147 * pt.c (canonical_template_parms): New.
1148 (canonical_type_parameter): New.
1149 (process_template_parm): Find the canonical type parameter.
1150 (lookup_template_class): When we have named the primary template
1151 type, set the canonical type for our template class to the primary
1152 template type. If any of the template arguments need structural
1153 equality checks, the template class needs structural equality
1154 checks.
1155 (tsubst): When reducing the level of a template template
1156 parameter, we require structural equality tests for the resulting
1157 parameter because its template parameters have not had their types
1158 canonicalized. When reducing a template type parameter, find the
1159 canonical reduced type parameter.
1160 (any_template_arguments_need_structural_equality_p): New.
1161