re PR c++/35113 (g++.dg/ext/vector13.C doesn't work)
[gcc.git] / gcc / cp / ChangeLog
1 2008-02-11 Douglas Gregor <doug.gregor@gmail.com>
2
3 PR c++/35113
4 * tree.c (cp_build_qualified_type_real): When building a
5 cv-qualified array type, build it as a unique type with
6 build_cplus_array_type_1 and then adopt the unqualified type's
7 main variant.
8
9 2008-02-11 Paolo Carlini <pcarlini@suse.de>
10
11 PR c++/35077
12 * decl.c (groktypename): Check grokdeclarator return.
13
14 2008-02-10 Jason Merrill <jason@redhat.com>
15
16 PR c++/34094
17 * decl2.c (cp_write_global_declarations): Don't write out static
18 data members with DECL_IN_AGGR_P set.
19
20 2008-02-08 Jason Merrill <jason@redhat.com>
21
22 PR c++/35116
23 * tree.c (build_target_expr_with_type): Handle void initializer.
24 (bot_manip): Remap slot before recursing.
25
26 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
27
28 PR other/35107
29 * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
30
31 2008-02-06 Alexandre Oliva <aoliva@redhat.com>
32
33 PR c++/35056
34 * tree.c: Include tree-flow.h.
35 (build_target_expr): Check type compatibility.
36 * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
37 * call.c (convert_like_real): Convert bitfield to expected type.
38
39 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
40
41 PR c++/35049
42 PR c++/35096
43 * typeck.c (structural_comptypes): Call cp_comptypes.
44 (comptypes): New; called from the C/C++ common bits to perform
45 strict checks.
46 (cp_comptypes): Renamed from comptypes, which is already used,
47 with a different signature, by the C++ front end.
48 (build_reinterpret_cast_1): Call cp_comptypes.
49 (ptr_reasonably_similar): Ditto.
50 * decl.c (decls_match): Ditto.
51 * cvt.c (convert_to_reference): Ditto.
52 * cp-tree.h (same_type_p): Ditto.
53 (same_or_base_type_p): Ditto.
54 (comptypes): Rename to cp_comptypes.
55 * pt.c (canonical_type_parameter): Call cp_comptypes.
56
57 2008-02-05 Jakub Jelinek <jakub@redhat.com>
58
59 PR c++/33553
60 * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
61 value dependent expression.
62
63 2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
64
65 PR c++/35074
66 * decl2.c (save_template_attributes): When we're modifying the
67 TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
68 all of the other variants to add those same attributes. Otherwise,
69 the main variant will be inconsistent with those other variants.
70
71 2008-02-04 Richard Guenther <rguenther@suse.de>
72
73 PR java/35035
74 * decl.c (record_builtin_java_type): Make jboolean a
75 integer type again where its mode doesn't match that of bool.
76
77 2008-02-02 Jason Merrill <jason@redhat.com>
78 Mark Mitchell <mark@codesourcery.com>
79
80 PR c++/33916
81 * init.c (build_value_init_1): New function.
82 (build_value_init): New function.
83 * typeck2.c (build_functional_cast): Call it.
84 * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
85
86 * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
87 TYPE_HAS_CONSTRUCTOR.
88 * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
89 add_implicitly_declared_members): Adjust.
90 (check_field_decls): Adjust. Remove warnings about reference/const
91 in class without constructor.
92 (check_bases_and_members): Adjust. Give those warnings here instead.
93 * decl.c (fixup_anonymous_aggr): Adjust.
94 (check_initializer): Adjust, clarify logic slightly.
95 (grok_special_member_properties): Adjust, only set if user-provided.
96 * rtti.c (create_tinfo_types): Don't set.
97 * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
98 Use same_type_ignoring_top_level_qualifiers_p.
99 * pt.c (check_explicit_specialization): Adjust.
100 (instantiate_class_template): Adjust.
101
102 2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
103 Jakub Jelinek <jakub@redhat.com>
104
105 PR c++/34935
106 PR c++/34936
107 * typeck.c (structural_comptypes): Handle comparisons of
108 VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
109 REAL_TYPE nodes.
110 * mangle.c (write_builtin_type): Map down to the canonical type,
111 which will be one of the predefined type nodes.
112
113 2008-01-29 Michael Meissner <michael.meissner@amd.com>
114
115 PR 35004
116 * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
117 bits to allow for expansion of the number of middle end tree
118 codes.
119
120 2008-01-29 Douglas Gregor <doug.gregor@gmail.com>
121
122 PR c++/34055
123 PR c++/34103
124 PR c++/34219
125 PR c++/34606
126 PR c++/34753
127 PR c++/34754
128 PR c++/34755
129 PR c++/34919
130 PR c++/34961
131 * typeck.c (check_return_expr): Tweak call to
132 check_for_bare_parameter_packs.
133 * class.c (add_method): Be careful with error_mark_nodes.
134 * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
135 signature.
136 * pt.c (struct find_parameter_pack_data): Remove
137 SET_PACKS_TO_ERROR.
138 (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
139 (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
140 (make_pack_expansion): Ditto.
141 (check_for_bare_parameter_packs): Parameter is now a tree, not a
142 tree*.
143 (process_template_parm): Tweak call to
144 check_for_bare_parameter_packs.
145 (push_template_decl_real): Tweak calls to
146 check_for_bare_parameter_packs. If bare parameter packs are found
147 in the list of exceptions, clear out that list after giving an
148 error.
149 * semantics.c (finish_cond): Tweak call to
150 check_for_bare_parameter_packs.
151 (finish_expr_stmt): Ditto.
152 (finish_for_expr): Ditto.
153 (finish_switch_cond): Ditto.
154 (finish_mem_initializers): Ditto.
155 (finish_member_declaration): Ditto.
156 (finish_static_assert): Check for bare parameter packs in the
157 condition.
158 * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
159 attributes of a declaration.
160 * parser.c (cp_parser_using_declaration): Tweak call to
161 check_for_bare_parameter_packs.
162 (cp_parser_base_clause): Ditto.
163
164 2008-01-28 Jason Merrill <jason@redhat.com>
165
166 PR c++/35007
167 * class.c (build_base_path): Fix !want_pointer case.
168
169 2008-01-27 Jason Merrill <jason@redhat.com>
170
171 PR c++/27177
172 * class.c (build_base_path): Fix previous change.
173
174 2008-01-26 Jakub Jelinek <jakub@redhat.com>
175
176 PR c++/34965
177 * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
178 and TRUTH_XOR_EXPR.
179
180 2008-01-26 Richard Guenther <rguenther@suse.de>
181
182 PR c++/34235
183 * typeck.c (build_binary_op): Remove code to shorten compares.
184
185 2008-01-25 Richard Guenther <rguenther@suse.de>
186
187 PR c++/33887
188 * decl.c (record_builtin_java_type): Make __java_boolean
189 a variant of bool.
190 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
191 after TYPE_MAIN_VARIANT check.
192
193 2008-01-25 Jason Merrill <jason@redhat.com>
194
195 PR c++/27177
196 * class.c (build_base_path): Don't mess with virtual access if
197 skip_evaluation.
198 * call.c (standard_conversion): Don't check whether source type
199 is complete.
200
201 * decl2.c (is_late_template_attribute): Don't defer attribute
202 visibility just because the type is dependent.
203
204 2008-01-25 Jason Merrill <jason@redhat.com>
205 Mark Mitchell <mark@codesourcery.com>
206
207 PR c++/31780
208 * call.c (standard_conversion): Allow conversion from integer/real
209 to complex.
210 (compare_ics): Such a conversion is worse than a normal arithmetic
211 conversion.
212
213 2008-01-25 Richard Guenther <rguenther@suse.de>
214
215 PR c++/33887
216 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
217 to true.
218
219 2008-01-24 Paolo Carlini <pcarlini@suse.de>
220
221 PR c++/34603
222 * pt.c (push_template_decl_real): Return error_mark_node in case
223 of template definition of non-template.
224
225 2008-01-24 Jason Merrill <jason@redhat.com>
226
227 PR c++/34913
228 * decl2.c (is_late_template_attribute): Defer any attribute with
229 dependent args. Also defer type attributes if the type is dependent.
230
231 2008-01-22 Jakub Jelinek <jakub@redhat.com>
232 Alexandre Oliva <aoliva@redhat.com>
233
234 PR c++/33984
235 * call.c (reference_binding): For bitfields use the declared bitfield
236 type.
237 (add_builtin_candidates): Likewise.
238 * class.c (layout_class_type): For bitfields copy over the
239 original type quals.
240
241 2008-01-22 Jason Merrill <jason@redhat.com>
242
243 PR c++/28560
244 * decl.c (groktypename): Also ignore attributes on dependent
245 possibly-class types.
246
247 PR c++/34912
248 * friend.c (do_friend): Check for prior declaration of a friend
249 function of a local class.
250 * name-lookup.c (lookup_name_innermost_nonclass_level):
251 No longer static.
252 * name-lookup.h: Declare it.
253
254 2008-01-22 Tom Tromey <tromey@redhat.com>
255
256 PR c++/34829:
257 * init.c (build_new_1): Only disallow Java aggregates.
258
259 2008-01-22 Jakub Jelinek <jakub@redhat.com>
260
261 PR c++/34607
262 * semantics.c (finish_omp_for): Don't call c_finish_omp_for
263 if decl or init is error_mark_node.
264
265 PR c++/34918
266 * error.c (dump_expr): Handle VECTOR_CST.
267
268 2008-01-21 Jason Merrill <jason@redhat.com>
269
270 PR c++/33959
271 * pt.c (tsubst_aggr_type): Make sure our context is complete.
272
273 PR c++/34573
274 * pt.c (retrieve_local_specialization): Robustify.
275 (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
276
277 PR c++/34846
278 * pt.c (tsubst): Only call retrieve_local_specialization if the
279 original typedef was in a function template.
280
281 PR c++/34196
282 * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
283
284 2008-01-21 Richard Guenther <rguenther@suse.de>
285
286 PR c++/34850
287 * error.c (cp_print_error_function): Deal with recursive
288 BLOCK trees.
289
290 2008-01-20 Paolo Carlini <pcarlini@suse.de>
291
292 PR c++/34891
293 * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
294
295 2008-01-20 Paolo Carlini <pcarlini@suse.de>
296
297 PR c++/34776
298 PR c++/34486
299 * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
300 on non-IS_AGGR_TYPE scope.
301 (constructor_name_p): Assert IS_AGGR_TYPE.
302
303 2008-01-18 Ian Lance Taylor <iant@google.com>
304
305 PR c++/33407
306 * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
307 (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
308 DECL_IS_OPERATOR_NEW flag.
309
310 2008-01-16 Richard Guenther <rguenther@suse.de>
311
312 PR c++/33819
313 * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
314 for conversions to type variants.
315
316 2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
317
318 * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
319 declaration and code. Update copyright year.
320
321 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
322
323 PR c++/34399
324 * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
325 know we have a class type.
326
327 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
328
329 PR c++/34751
330 * pt.c (coerce_template_parameter_pack): When substituting into
331 the type of a non-type template parameter pack. use the
332 deduced/substituted arguments.
333 * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
334 can be a parameter pack with the ellipsis following it. When we
335 have an erroneous declaration, allow it to be a parameter pack.
336 (cp_parser_template_parameter): Complain about default
337 arguments on non-type template parameter packs, and parse them
338 using the new cp_parser_default_argument.
339 (cp_parser_parameter_declaration): Complain about parameter packs
340 with default arguments. Move parsing of default arguments into a
341 new function, cp_parser_default_argument.
342 (cp_parser_default_argument): New; extracted from
343 cp_parser_parameter_declaration.
344
345 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
346
347 PR c++/34051
348 PR c++/34055
349 PR c++/34102
350 PR c++/34103
351 * typeck.c (check_return_expr): If there are bare parameter packs
352 in the return value, set it to error_mark_node.
353 * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
354 * pt.c (find_parameter_packs_r): Look at the type of
355 IDENTIFIER_NODEs (e.g., for user-defined conversions).
356 (check_for_bare_parameter_packs): Flip the result: now returns
357 TRUE when there were bare parameter packs, FALSE otherwise.
358 (push_template_decl_real): Deal with flipped result of
359 check_for_bare_parameter_packs.
360 * semantics.c (finish_cond): If there are bare parameter packs in
361 the conditional, set it to error_mark_node.
362 (finish_expr_stmt): If there are bare parameter packs in the
363 expression, set it to error_mark_node.
364 (finish_for_expr): Ditto.
365 (finish_switch_cond): If there are bare parameter packs in
366 the conditional, set it to error_mark_node.
367 (finish_mem_initializers): If there are bare parameter packs in
368 the member initializer, set it to error_mark_node.
369 (finish_member_declaration): Check the attributes of the
370 declaration for bare parameter packs, and remove the attributes if
371 any have bare parameter packs.
372 * parser.c (cp_parser_using_declaration): Check the using
373 declaration for bare parameter packs.
374 (cp_parser_base_clause): If there are bare parameter packs in a
375 base specifier, don't add it to the chain.
376
377 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
378
379 PR c++/34314
380 * error.c (dump_simple_decl): Display ellipsis for template
381 non-type parameter packs.
382 (dump_decl): Display ellipsis for template type parameter packs.
383 (dump_template_decl): Display ellipsis for template template
384 parameter packs.
385 * pt.c (redeclare_class_template): When redeclaring a class
386 template, check for collisions between template parameters and
387 template parameter packs.
388
389 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
390
391 PR c++/33964
392 * pt.c (process_partial_specialization): Don't mark template
393 parameters that occur in non-deduced contexts.
394 (struct pair_fn_data): Add include_nondeduced_p.
395 (for_each_template_parm_r): Only visit non-deduced contexts if
396 include_nondeduced_p is set.
397 (for_each_template_parm): Added parameter include_nondeduced_p,
398 which states whether template parameters found in non-deduced
399 contexts should be visited.
400 (uses_template_parms): Visit all template parameters, even those
401 in non-deduced contexts.
402
403 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
404
405 PR c++/34052
406 * pt.c (check_default_tmpl_args): Check for parameter packs that
407 aren't at the end of a primary template.
408 (push_template_decl_real): Remove check for parameter packs that
409 aren't at the end of a primary template; that now happens in
410 check_default_tmpl_args.
411 * semantics.c (finish_template_template_parm): Use
412 check_default_tmpl_args to check for errors in the template
413 parameter list.
414
415 2008-01-12 Doug Kwan <dougkwan@google.com>
416
417 * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
418 instead of OPT_Wreturn_type in warning due to ignored return type
419 qualifiers.
420 * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
421 instead of OPT_Wreturn_type in warning due to ignored return type
422 qualifiers.
423
424 2008-01-08 Jakub Jelinek <jakub@redhat.com>
425
426 PR c++/33890
427 * semantics.c (finish_omp_for): Don't call
428 fold_build_cleanup_point_expr if processing_template_decl.
429
430 2008-01-04 Paolo Carlini <pcarlini@suse.de>
431 Jakub Jelinek <jakub@redhat.com>
432
433 PR c++/34611
434 * error.c (dump_template_argument): Deal with TREE_LIST.
435
436 2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
437
438 * parser.c (cp_parser_check_decl_spec): Don't warn about "long
439 long" in C++0x mode; change the warning to note that "long long"
440 is only unsupported in C++98 mode.
441
442 2007-12-20 Jason Merrill <jason@redhat.com>
443
444 PR c++/34111
445 * call.c (standard_conversion): Derived-to-base is considered a
446 standard conversion.
447
448 2007-12-19 Jakub Jelinek <jakub@redhat.com>
449
450 PR c++/34513
451 * parser.c (cp_parser_omp_parallel): For non-combined parallel
452 call cp_parser_statement rather than
453 cp_parser_already_scoped_statement.
454
455 2007-12-18 Jason Merrill <jason@redhat.com>
456
457 PR c++/34206
458 * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
459 use template parms.
460 (dependent_type_p_r): Handle the domain of an array.
461
462 2007-12-18 Douglas Gregor <doug.gregor@gmail.com>
463 Jakub Jelinek <jakub@redhat.com>
464
465 PR c++/32565
466 PR c++/33943
467 PR c++/33965
468 * pt.c (template_template_parm_bindings_ok_p): New; verifies
469 bindings of template template parameters after all template
470 arguments have been deduced.
471 (coerce_template_parms): Don't complain when COMPLAIN doesn't
472 include tf_error.
473 (fn_type_unification): Use template_template_parm_bindings_ok_p.
474 (unify): Deal with variadic, bound template template parameters.
475 (get_class_bindings): Use template_template_parm_bindings_ok_p.
476
477 2007-12-18 Jakub Jelinek <jakub@redhat.com>
478
479 PR c++/34488
480 * decl.c (grokdeclarator): Reject friend sfk_constructor
481 FUNCTION_TYPE.
482
483 2007-12-17 Jakub Jelinek <jakub@redhat.com>
484
485 PR c/34506
486 * parser.c (cp_parser_omp_all_clauses): Accept optional comma
487 in between clauses.
488
489 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
490
491 PR debug/7081
492 * cp-lang.c (cp_classify_record): New.
493 (LANG_HOOKS_CLASSIFY_RECORD): Override.
494
495 2007-12-11 Jakub Jelinek <jakub@redhat.com>
496
497 PR c++/34238
498 * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
499
500 PR c++/34364
501 * rtti.c (build_dynamic_cast): Call convert_from_reference even for
502 dynamic_cast in a template.
503
504 2007-12-10 Simon Martin <simartin@users.sourceforge.net>
505
506 PR c++/34059
507 * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
508 MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
509
510 2007-12-10 Jakub Jelinek <jakub@redhat.com>
511
512 PR c++/34395
513 * error.c (dump_type_prefix, dump_type_suffix): Handle
514 TYPE_PACK_EXPANSION.
515
516 PR c++/34394
517 * error.c (dump_expr): Handle ABS_EXPR.
518
519 2007-12-09 Jakub Jelinek <jakub@redhat.com>
520
521 PR c++/34178
522 PR c++/34340
523 * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
524 in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
525 Return 2 also if DECL_EXPLICIT_INSTANTIATION.
526 * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
527 flag_use_repository and repo_emit_p returned 2.
528
529 2007-12-06 Jakub Jelinek <jakub@redhat.com>
530
531 PR c++/34336
532 * tree.c (stabilize_call, stabilize_init): Do nothing if
533 processing_template_decl.
534
535 2007-12-05 Jakub Jelinek <jakub@redhat.com>
536
537 PR c++/34271
538 * semantics.c (finish_decltype_type): For SCOPE_REF issue an
539 error instead of assertion failure.
540 * parser.c (cp_parser_decltype): If closing paren is not found,
541 return error_mark_node.
542
543 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
544
545 PR c++/34101
546 * name-lookup.c (arg_assoc_template_arg): Recurse on argument
547 packs.
548 (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
549 since arg_assoc_template_arg will deal with them (better).
550
551 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
552
553 PR c++/33509
554 * pt.c (tsubst_exception_specification): Handle substitutions into
555 member templates, where tsubst_pack_expansion returns a
556 TYPE_PACK_EXPANSION.
557
558 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
559
560 PR c++/33091
561 * pt.c (unify_pack_expansion): If we didn't deduce any actual
562 bindings for the template parameter pack, don't try to keep the
563 empty deduced arguments.
564 (unify): If a parameter is a template-id whose template argument
565 list contains a pack expansion that is not at the end, then we
566 cannot unify against that template-id.
567
568 2007-12-02 Paolo Carlini <pcarlini@suse.de>
569
570 PR c++/34061
571 * pt.c (current_template_args): Use error_operand_p.
572
573 2007-12-02 Paolo Carlini <pcarlini@suse.de>
574
575 PR c++/34273
576 * error.c (dump_decl): Handle TREE_BINFO.
577
578 2007-12-01 Ollie Wild <aaw@google.com>
579
580 PR c++/8171
581 * typeck.c (build_binary_op): Add conversion of pointers to function
582 members appearing as operands to the equality operators.
583
584 2007-11-30 Jakub Jelinek <jakub@redhat.com>
585
586 PR c++/34275
587 * error.c (dump_expr): Handle OBJ_TYPE_REF.
588
589 2007-11-29 Jakub Jelinek <jakub@redhat.com>
590
591 PR c++/34270
592 * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
593 in templates.
594 * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
595 Likewise.
596
597 PR c++/34267
598 PR c++/34268
599 * parser.c (cp_parser_decltype): Don't call finish_id_expression
600 on ~type.
601 * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
602 and ~type early.
603
604 2007-11-27 Jakub Jelinek <jakub@redhat.com>
605
606 PR tree-optimization/34181
607 * method.c (use_thunk): Don't inline the call in the thunk.
608
609 PR c++/34213
610 * tree.c (decl_linkage): Static data members and static member
611 functions in anonymous ns classes are lk_external.
612
613 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
614
615 PR c++/34081
616 * decl.c (start_preparsed_function): Pass
617 processing_template_decl for the new allocate_struct_function
618 parameter.
619
620 2007-11-25 Richard Guenther <rguenther@suse.de>
621
622 * decl.c (poplevel): Use BLOCK_CHAIN.
623
624 2007-11-24 Ollie Wild <aaw@google.com>
625
626 * typeck.c (delta_from_ptrmemfunc): New function.
627 (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
628 (build_binary_op): Call delta_from_ptrmemfunc.
629
630 2007-11-23 Jakub Jelinek <jakub@redhat.com>
631
632 PR c++/30293
633 PR c++/30294
634 * decl.c (cp_finish_decl): Disallow variable or field
635 definitions if extern "Java" aggregates.
636 (grokparms): Disallow parameters with extern "Java"
637 aggregates.
638 (check_function_type): Disallow function return values
639 with extern "Java" aggregates.
640 * init.c (build_new_1): Disallow placement new with
641 extern "Java" aggregates.
642
643 2007-11-23 Mark Mitchell <mark@codesourcery.com>
644 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
645
646 PR c++/5310
647 * call.c (convert_like_real): Build a zero constant when __null is
648 converted to an integer type.
649
650 2007-11-22 Jakub Jelinek <jakub@redhat.com>
651
652 PR c++/34094
653 * decl2.c (cp_write_global_declarations): Issue error about static
654 data members in anonymous namespace which are declared and used,
655 but not defined.
656
657 2007-11-20 Jakub Jelinek <jakub@redhat.com>
658
659 PR c++/34089
660 * parser.c (cp_parser_class_head): Reject function template ids.
661
662 PR c++/28879
663 * tree.c (build_cplus_array_type_1): Don't pass any VLA types
664 when processing_template_decl to build_array_type.
665
666 PR c++/33962
667 * pt.c (more_specialized_fn): Don't segfault if one or
668 both argument list end with ellipsis.
669
670 2007-11-18 Jakub Jelinek <jakub@redhat.com>
671
672 PR c++/30988
673 * semantics.c (finish_call_expr): Set
674 current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
675 or OVERLOAD with all noreturn functions.
676
677 2007-11-16 Jakub Jelinek <jakub@redhat.com>
678
679 PR c++/34100
680 * pt.c (apply_late_template_attributes): Do nothing if decl's type is
681 error_mark_node.
682
683 2007-11-13 Jakub Jelinek <jakub@redhat.com>
684
685 PR c++/34054
686 PR c++/34056
687 PR c++/34057
688 PR c++/34058
689 PR c++/34060
690 * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
691 set to error_mark_node the outermost POINTER_TYPE to the pack if
692 it is seen in a POINTER_TYPE.
693 (push_template_decl_real): If check_for_bare_parameter_packs
694 fails for function return type, set the return type to
695 integer_type_node. If check_for_bare_parameter_packs failed
696 for non-function, return error_mark_node.
697
698 PR c++/29225
699 * call.c (build_new_op): Call resolve_args before calling
700 build_over_call.
701
702 2007-11-11 Tom Tromey <tromey@redhat.com>
703
704 PR c++/17577:
705 * lex.c (handle_pragma_implementation): Use cpp_included_before.
706
707 2007-11-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
708
709 PR c++/8570
710 * pt.c (redeclare_class_template): Update error message. Use a
711 note to show the previous declaration.
712 (tsubst_friend_class): Use the location of the friend template as
713 the input location before calling redeclare_class_template.
714
715 2007-11-11 Jakub Jelinek <jakub@redhat.com>
716
717 PR c++/34068
718 * semantics.c (finish_pseudo_destructor_expr): Handle
719 object == error_mark_node.
720
721 2007-11-10 Jakub Jelinek <jakub@redhat.com>
722
723 PR c++/32241
724 * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
725 is not scalar type, let finish_class_member_access_expr handle
726 diagnostics. Pass BIT_NOT_EXPR argument to
727 finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
728
729 2007-11-09 Douglas Gregor <doug.gregor@gmail.com>
730
731 PR c++/33510
732 * decl.c (cp_complete_array_type): If any of the initializer
733 elements are pack expansions, don't compute the array size yet.
734
735 2007-11-08 Andrew Pinski <pinskia@gmail.com>
736
737 PR c++/30297:
738 * tree.c (decl_linkage): Fields have no linkage.
739
740 2007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
741
742 * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
743
744 2007-11-07 Douglas Gregor <doug.gregor@gmail.com>
745
746 PR c++/33045
747 PR c++/33837
748 PR c++/33838
749 * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
750 Be careful with ERROR_MARK_NODEs.
751 * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
752 argument.
753
754 2007-11-07 Jakub Jelinek <jakub@redhat.com>
755
756 PR c++/33501
757 * call.c (build_over_call): Don't check TREE_ADDRESSABLE
758 on incomplete type.
759
760 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
761
762 PR c++/33977
763 PR c++/33886
764 * tree.c (c_build_qualified_type): Define bridge to
765 cp_build_qualified_type.
766
767 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
768
769 PR c++/31439
770 PR c++/32114
771 PR c++/32115
772 PR c++/32125
773 PR c++/32126
774 PR c++/32127
775 PR c++/32128
776 PR c++/32253
777 PR c++/32566
778 * typeck.c (check_return_expr): Pass address of retval to
779 check_for_bare_parameter_packs.
780 * class.c (build_base_field): Tolerate bases that have no layout
781 due to errors.
782 (end_of_base): Ditto.
783 * tree.c (canonical_type_variant): Be careful with
784 ERROR_MARK_NODE.
785 * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
786 tree*.
787 * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
788 which states whether parameter packs should be replaced with
789 ERROR_MARK_NODE.
790 (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
791 possible. If set_packs_to_error is set true, replace the parameter
792 pack with ERROR_MARK_NODE. Manage our own pointer sets.
793 (uses_parameter_packs): Don't set parameter packs to
794 ERROR_MARK_NODE.
795 (check_for_bare_parameter_packs): Now takes a pointer to a tree,
796 which may be modified (if it is a parameter pack). Instructs
797 find_parameter_packs_r to replace parameter packs with
798 ERROR_MARK_NODE (so that they won't cause errors later on).
799 (process_template_parm): Pass pointer to
800 check_for_bare_parameter_packs.
801 (process_partial_specialization): Replace pack expansions before
802 the end of the template argument list with ERROR_MARK_NODE.
803 (push_template_decl_real): Pass pointer to
804 check_for_bare_parameter_packs. Replace parameter packs not at the
805 end of the template parameter list with ERROR_MARK_NODE.
806 (convert_template_argument): Be more careful about using DECL_NAME
807 on only declarations.
808 (unify): Can't unify against ERROR_MARK_NODE.
809 * semantics.c (finish_cond): Pass pointer to
810 check_for_bare_parameter_packs.
811 (finish_expr_stmt): Ditto.
812 (finish_for_expr): Ditto.
813 (finish_switch_cond): Pass pointer to
814 check_for_bare_parameter_packs, and call it before we put the
815 condition into the statement.
816 (finish_mem_initializers): Pass pointer to
817 check_for_bare_parameter_packs.
818 (finish_member_declaration): Ditto.
819 * parser.c (cp_parser_base_clause): Ditto.
820
821 2007-11-06 Jakub Jelinek <jakub@redhat.com>
822
823 PR target/33168
824 * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
825 with the final TREE_READONLY flag in place. processing_template_decl
826 is known to be 0 in this part of function.
827
828 PR c++/33894
829 * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
830 OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
831 * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
832 * semantics.c (finish_omp_atomic): Revert most of the
833 2007-02-05 changes, just keep the new representation of
834 OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
835
836 2007-11-05 H.J. Lu <hongjiu.lu@intel.com>
837
838 PR c++/33871
839 * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
840 local.
841
842 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
843
844 PR c++/33996
845 PR c++/33235
846 PR c++/33930
847 * typeck.c (merge_types): Don't lose rvalue references when
848 merging types.
849 * call.c (build_over_call): Don't elide move constructors just
850 because the copy constructor is trivial (!).
851 (compare_ics): If comparing cv-qualifiers fails, we can still order
852 based on binding lvalues vs. rvalues.
853
854 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
855
856 PR c++/33939
857 * pt.c (unify_pack_expansion): bring handling of function call
858 arguments into line with type_unification_real.
859
860 2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
861
862 * typeck.c (build_binary_op): Use pedwarn instead of error for
863 consistency.
864
865 2007-11-05 Jakub Jelinek <jakub@redhat.com>
866
867 PR c++/33836
868 * parser.c (cp_parser_unary_expression): For &&label call
869 cp_parser_non_integral_constant_expression and return error_mark_node
870 if it returned true.
871
872 PR c++/33969
873 * decl.c (grokdeclarator): Don't call build_memfn_type if type
874 is neither FUNCTION_TYPE nor METHOD_TYPE.
875
876 2007-11-02 Jakub Jelinek <jakub@redhat.com>
877
878 PR c++/33516
879 * parser.c (cp_parser_nested_name_specifier_opt): Use
880 TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
881 typedef of currently open class.
882
883 2007-11-02 Paolo Carlini <pcarlini@suse.de>
884
885 PR c++/33495
886 * error.c (dump_expr): Deal specially with statements.
887
888 2007-11-01 Jason Merrill <jason@redhat.com>
889
890 PR c++/30897
891 * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
892 template parms.
893 (lookup_template_class): Use it to get the outer template args
894 for instantiating one.
895
896 PR c++/29236
897 * pt.c (reduce_template_parm_level): tsubst the parameters
898 of a template template parm.
899
900 2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
901
902 PR c++/33955
903 * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
904
905 2007-11-01 Jakub Jelinek <jakub@redhat.com>
906
907 PR c++/32384
908 * parser.c (cp_parser_postfix_dot_deref_expression): If
909 POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
910 first and if that succeeds and type is SCALAR_TYPE_P, create
911 PSEUDO_DTOR_EXPR.
912
913 PR c++/32260
914 * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
915 (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
916 as for std::type_info.
917
918 2007-10-31 Paolo Carlini <pcarlini@suse.de>
919
920 PR c++/33494
921 * cxx-pretty-print.c (pp_cxx_typeid_expression,
922 pp_cxx_delete_expression): Change to static linkage.
923 * cxx-pretty-print.h: Adjust declarations.
924 * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
925 MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
926 MODOP_EXPR): Forward to pp_expression.
927
928 * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
929 Fix typo.
930
931 2007-10-31 Christian Bruel <christian.bruel@st.com>
932 Mark Mitchell <mark@codesourcery.com>
933
934 PR c++/19531
935 * typeck.c (check_return_expr): Don't set named_return_value_okay_p
936 if retval is volatile.
937
938 2007-10-30 Jakub Jelinek <jakub@redhat.com>
939
940 PR c++/33616
941 * decl2.c (build_offset_ref_call_from_tree): Call
942 build_non_dependent_expr on object prior to building ADDR_EXPR from it
943 if FN is DOTSTAR_EXPR.
944
945 2007-10-30 Douglas Gregor <doug.gregor@gmail.com>
946
947 PR c++/31993
948 PR c++/32252
949 * pt.c (find_parameter_packs_r): Fix typo in comment.
950 (convert_template_argument): Look at the pattern of a pack
951 expansion to determine what kind of entity we're converting.
952 (coerce_template_parameter_pack): When we have coerced a non-type
953 template parameter pack, substitute into the type of that pack.
954 (tsubst_pack_expansion): When our substitution of a parameter pack
955 is a "trivial" substitution of itself, just substitute into the
956 pack expansion rather than actually expanding.
957
958 2007-10-29 Jakub Jelinek <jakub@redhat.com>
959
960 PR c++/33841
961 * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
962 for non-integral type bitfields. Return true if bitfield is correct, false
963 error has been diagnosed.
964 (check_field_decls): If check_bitfield_decl returned false, call also
965 check_field_decl.
966
967 2007-10-28 Paolo Carlini <pcarlini@suse.de>
968 Mark Mitchell <mark@codesourcery.com>
969
970 PR c++/30659
971 * pt.c (do_decl_instantiation): If the VAR_DECL is not a
972 class member error out and return.
973
974 2007-10-27 Jakub Jelinek <jakub@redhat.com>
975
976 * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
977 to current_function_decl rather than 0.
978
979 PR c++/33844
980 * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
981 ->* rather than .*.
982 * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
983
984 2007-10-27 Jason Merrill <jason@redhat.com>
985
986 PR c++/5247
987 * call.c (convert_default_arg): Detect recursion.
988
989 2007-10-27 Jakub Jelinek <jakub@redhat.com>
990
991 PR c++/33842
992 * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
993 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
994 OFFSETOF_EXPR.
995 (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
996 functions.
997 * error.c (dump_expr): Handle OFFSETOF_EXPR.
998
999 2007-10-26 Jason Merrill <jason@redhat.com>
1000
1001 PR c++/24791
1002 * pt.c (get_template_info): New fn.
1003 (template_class_depth): Use it.
1004 (push_template_decl_real): Check that the template args of the
1005 definition match the args of the previous declaration.
1006
1007 2007-10-26 Paolo Carlini <pcarlini@suse.de>
1008
1009 PR c++/31988
1010 * decl2.c (coerce_new_type): Do not allow a default argument for
1011 the first parameter.
1012
1013 2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
1014
1015 PR c++/33839
1016 * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
1017 don't see the leading '('. Only lookup names if we get an
1018 IDENTIFIER_NODE.
1019
1020 2007-10-26 Jakub Jelinek <jakub@redhat.com>
1021
1022 PR c++/33744
1023 * parser.c (cp_parser_parenthesized_expression_list): Set
1024 greater_than_is_operator_p to true in between the parens.
1025
1026 2007-10-26 Paolo Carlini <pcarlini@suse.de>
1027
1028 PR c++/31747
1029 * decl.c (grokdeclarator): In case of conflicting specifiers
1030 just return error_mark_node.
1031
1032 2007-10-26 Ollie Wild <aaw@google.com>
1033
1034 * expr.c (cxx_expand_expr): Removed.
1035 * cp-tree.h (exx_expand_expr): Removed.
1036 * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
1037 with c_expand_expr.
1038
1039 2007-10-25 Paolo Carlini <pcarlini@suse.de>
1040
1041 PR c++/33843
1042 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
1043
1044 2007-10-23 Jason Merrill <jason@redhat.com>
1045
1046 PR c++/25950 (DR 391)
1047 * call.c (struct conversion): Remove check_copy_constructor_p.
1048 (reference_binding): Always bind a reference directly to a
1049 compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during
1050 temporary creation.
1051 (check_constructor_callable): Remove.
1052 (convert_like_real): Don't call it.
1053 (initialize_reference): Don't call check_constructor_callable.
1054 (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
1055 LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base
1056 conversions if LOOKUP_NO_TEMP_BIND.
1057 (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
1058 (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
1059 second conversion.
1060 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
1061
1062 2007-10-22 Jakub Jelinek <jakub@redhat.com>
1063
1064 PR c++/33372
1065 * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
1066 before checking if its type is integral.
1067
1068 2007-10-22 Jason Merrill <jason@redhat.com>
1069
1070 PR c++/33620
1071 * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
1072 * pt.c (apply_late_template_attributes): Splice out dependent
1073 attributes from DECL_ATTRIBUTES.
1074
1075 * decl.c (cxx_maybe_build_cleanup): Use build_address.
1076
1077 2007-10-17 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1078
1079 * typeck.c (build_binary_op) : Use appropriate warning option
1080 instead of unnamed warning.
1081
1082 2007-10-16 Paolo Carlini <pcarlini@suse.de>
1083
1084 PR c++/31446
1085 * pt.c (current_template_args): Do not change TREE_LIST elements
1086 with a TREE_VALUE of error_mark_node.
1087
1088 2007-10-16 Mark Mitchell <mark@codesourcery.com>
1089
1090 * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
1091 * decl.c (start_decl): Tidy.
1092 (start_decl_1): Call cp_apply_type_quals_to_decl after completing
1093 the type.
1094 (grokdeclarator): Clarify comment.
1095
1096 2007-10-14 Andrew Pinski <pinskia@gmail.com>
1097
1098 PR c++/30303
1099 * decl.c (grokfndecl): Return NULL after the "definition of
1100 implicitly-declared" error happened.
1101
1102 2007-10-12 Simon Martin <simartin@users.sourceforge.net>
1103
1104 PR c++/26698
1105 * call.c (build_user_type_conversion_1): Do not consider conversion
1106 functions to convert a (possibly cv-qualified) object to the (possibly
1107 cv-qualified) same object type (or a reference to it), to a (possibly
1108 cv-qualified) base class of that type (or a reference to it).
1109
1110 2007-10-12 Paolo Carlini <pcarlini@suse.de>
1111
1112 * pt.c (tsubst): Use template_parm_level_and_index.
1113
1114 2007-10-12 Jakub Jelinek <jakub@redhat.com>
1115
1116 PR c++/32121
1117 * parser.c (cp_parser_compound_statement): Handle label-declarations
1118 at the beginning of the compound statement.
1119 (cp_parser_block_declaration): Issue diagnostics about __label__
1120 not at the beginning of a block.
1121
1122 2007-10-11 Paolo Carlini <pcarlini@suse.de>
1123
1124 PR c++/33461
1125 * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
1126 to convert_template_argument.
1127 (coerce_template_parms): Return error_mark_node after fixed-length
1128 error.
1129 (tsubst_decl): Check for error_mark_node the return value of the
1130 first tsubst in 'case VAR_DECL'.
1131
1132 2007-10-08 Ollie Wild <aaw@google.com>
1133
1134 * typeck2.c (digest_init): Call cplus_expand_constant after
1135 convert_for_initialization.
1136 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
1137 * expr.c (cplus_expand_constant): Updated function description.
1138
1139 2007-10-04 Jason Merrill <jason@redhat.com>
1140
1141 PR c++/20416
1142 * call.c (initialize_reference): Handle local static reference
1143 temps properly.
1144
1145 2007-10-03 Jason Merrill <jason@redhat.com>
1146
1147 PR c++/32470
1148 * name-lookup.c (push_namespace_with_attrs): Fold back into...
1149 (push_namespace): Here.
1150 (handle_namespace_attrs): New fn for the attr code.
1151 (leave_scope): Don't pop_visibility.
1152 * name-lookup.h (struct cp_binding_level): Remove has_visibility.
1153 * parser.c (cp_parser_namespace_definition): Call
1154 handle_namespace_attrs and pop_visibility as appropriate.
1155
1156 PR c++/11756
1157 * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
1158
1159 2007-10-03 Alexandre Oliva <aoliva@redhat.com>
1160
1161 * decl.c (duplicate_decls): Preserve linkage flags for mere
1162 redeclarations of gnu_inline definitions.
1163
1164 2007-10-03 Jason Merrill <jason@redhat.com>
1165
1166 PR c++/15764
1167 * decl.c (wrap_cleanups_r): New fn.
1168 (wrap_temporary_cleanups): New fn.
1169 (initialize_local_var): Call it.
1170
1171 2007-09-29 Jason Merrill <jason@redhat.com>
1172
1173 PR c++/33094
1174 * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
1175 constant to not have DECL_EXTERNAL if it's file-local.
1176
1177 2007-09-28 Ollie Wild <aaw@google.com>
1178
1179 Revert
1180 2007-09-27 Ollie Wild <aaw@google.com>
1181
1182 * typeck2.c (digest_init): Call cplus_expand_constant after
1183 convert_for_initialization.
1184 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
1185 * expr.c (cplus_expand_constant): Updated function description.
1186
1187 2007-09-28 Jason Merrill <jason@redhat.com>
1188
1189 PR c++/10179
1190 * class.c (layout_empty_base): Take rli parameter, update
1191 rli->record_align if empty base has user-specified alignment.
1192 (build_base_field): Pass rli to it.
1193
1194 2007-09-28 Paolo Carlini <pcarlini@suse.de>
1195
1196 PR c++/33213
1197 * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
1198
1199 2007-09-28 Paolo Carlini <pcarlini@suse.de>
1200
1201 PR c++/33118
1202 * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
1203 (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
1204 (dump_parameters): Just call dump_type for argument packs too.
1205
1206 2007-09-28 Jakub Jelinek <jakub@redhat.com>
1207
1208 PR c++/31434
1209 * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
1210 qualification by creating qualified PACK_EXPANSION_PATTERN and
1211 then calling make_pack_expansion on it.
1212
1213 2007-09-27 Ollie Wild <aaw@google.com>
1214
1215 * typeck2.c (digest_init): Call cplus_expand_constant after
1216 convert_for_initialization.
1217 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
1218 * expr.c (cplus_expand_constant): Updated function description.
1219
1220 2007-09-27 Jason Merrill <jason@redhat.com>
1221
1222 PR c++/33571
1223 * decl2.c (is_late_template_attribute): Don't crash on unknown
1224 attribute.
1225
1226 2007-09-27 Paolo Carlini <pcarlini@suse.de>
1227
1228 PR c++/33493
1229 * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
1230 * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
1231 spaces in the formatting.
1232 * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
1233
1234 2007-09-27 Jakub Jelinek <jakub@redhat.com>
1235
1236 * error.c (cxx_print_error_function): Add third argument, pass
1237 it over to lhd_print_error_function.
1238 (cp_print_error_function): If diagnostic->abstract_origin, print
1239 virtual backtrace.
1240 * cp-tree.h (struct diagnostic_info): New forward decl.
1241 (cxx_print_error_function): Add third argument.
1242
1243 2007-09-25 Simon Martin <simartin@users.sourceforge.net>
1244
1245 PR c++/33207
1246 * name-lookup.c (pushtag): Do not create an implicit typedef before
1247 the associated type declaration is known to be valid.
1248
1249 2007-09-25 Jakub Jelinek <jakub@redhat.com>
1250
1251 * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
1252 rather than pointers.
1253
1254 2007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
1255
1256 PR c++/14688
1257 * search.c (check_final_overrider): Fail if
1258 targetm.comp_type_attributes returns 0.
1259
1260 2007-09-24 Jason Merrill <jason@redhat.com>
1261
1262 PR c++/33239
1263 * pt.c (resolve_typename_type): Don't look things up in the original
1264 template if it would mean losing template arguments.
1265
1266 2007-09-24 Jakub Jelinek <jakub@redhat.com>
1267
1268 PR c++/33506
1269 * cp-tree.h (cxx_type_hash_eq): New prototype.
1270 * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
1271 * tree.c (cxx_type_hash_eq): New function.
1272
1273 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
1274
1275 PR c++/33185
1276 * tree.c (cp_build_qualified_type_real): Build a canonical
1277 ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
1278
1279 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
1280
1281 PR c++/33112
1282 PR c++/33185
1283 * tree.c (cplus_array_compare): Compare pointers, not types.
1284 (build_cplus_array_type_1): Store new array type into the hash
1285 table before building the canonical type; build the canonical type
1286 correctly.
1287 (cp_build_qualified_type_real): Put all of the array types with
1288 cv-qualified element types into the C++ array hash table, built as
1289 variants of the unqualified versions.
1290
1291 2007-09-23 Jason Merrill <jason@redhat.com>
1292
1293 PR c++/16370
1294 * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
1295 for deprecation warnings.
1296
1297 2007-09-22 Jason Merrill <jason@redhat.com>
1298
1299 PR c++/15269
1300 * call.c (build_over_call): Warn about deprecated virtuals.
1301
1302 PR c++/19407
1303 * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
1304 (MAYBE_TAGGED_TYPE_P): Remove.
1305 * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
1306 instead of calling is_late_template_attribute again.
1307 (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
1308 (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
1309 Don't crash on typedefs from non-template classes.
1310 * decl2.c (grokfield): Don't sorry about attrs on template parms.
1311 (is_late_template_attribute): All attributes applied to template
1312 parms or typename types are dependent. Static.
1313 (splice_template_attributes): Pass decl through.
1314 (save_template_attributes): Likewise.
1315
1316 2007-09-20 Jakub Jelinek <jakub@redhat.com>
1317
1318 PR c++/33496
1319 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
1320 returned from tsubst_pack_expansion.
1321 (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
1322 (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
1323
1324 2007-09-20 Paolo Carlini <pcarlini@suse.de>
1325
1326 PR c++/33460
1327 * semantics.c (finish_id_expression): Use consistently
1328 context_for_name_lookup.
1329 * decl.c (fixup_anonymous_aggr): Fix error message for
1330 anonymous struct (vs union).
1331
1332 2007-09-19 Jason Merrill <jason@redhat.com>
1333
1334 PR c++/7586
1335 * pt.c (tsubst): Handle typedefs by looking for the specialization.
1336 (retrieve_specialization): Only tagged types use
1337 DECL_TEMPLATE_INSTANTIATIONS.
1338 (instantiate_class_template): Push nested classes too.
1339 (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
1340 tagged types.
1341 * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
1342 * init.c (is_aggr_type): Remove redundant tests.
1343 * class.c (push_nested_class): Use CLASS_TYPE_P.
1344
1345 2007-09-20 Paolo Carlini <pcarlini@suse.de>
1346
1347 PR c++/33459
1348 * init.c (build_zero_init): If, recursively, build_zero_init
1349 returns a NULL_TREE, do not append it to the VEC of constructors.
1350
1351 2007-09-18 Jason Merrill <jason@redhat.com>
1352
1353 PR c++/17743
1354 * pt.c (apply_late_template_attributes): Set processing_template_decl.
1355 (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
1356 ATTR_FLAG_TYPE_IN_PLACE.
1357 (tsubst): Do unqualified lookup to find typedefs from current class.
1358 [ARRAY_TYPE]: Propagate alignment info.
1359 * decl2.c (is_late_template_attribute): Only defer handling of
1360 attribute aligned if the expression is dependent.
1361 (save_template_attributes): If we're deferring any attributes,
1362 make this a naming typedef.
1363
1364 2007-09-18 Paolo Carlini <pcarlini@suse.de>
1365
1366 PR c++/33462 (again)
1367 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
1368 va_arg instead of __builtin_va_arg.
1369
1370 2007-09-18 Paolo Carlini <pcarlini@suse.de>
1371
1372 PR c++/33462
1373 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
1374 (pp_cxx_primary_expression): Use it.
1375 * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
1376 * error.c (dump_expr): Use it.
1377
1378 2007-09-18 Paolo Carlini <pcarlini@suse.de>
1379
1380 PR c++/33463
1381 * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
1382 out case TYPEID_EXPR to...
1383 (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
1384 and pp_cxx_right_paren.
1385 * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
1386 * error.c (dump_expr): Use it.
1387
1388 2007-09-18 Paolo Carlini <pcarlini@suse.de>
1389
1390 PR c++/33464
1391 * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
1392 (pp_cxx_primary_expression): Use it.
1393 * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
1394 * error.c (dump_expr): Use it.
1395
1396 2007-09-16 Paolo Carlini <pcarlini@suse.de>
1397
1398 PR c++/33124
1399 * init.c (build_new): Remove warning for zero-element
1400 allocations.
1401
1402 2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
1403
1404 PR c++/32756
1405 * call.c (maybe_handle_implicit_object): Set this_p, clear
1406 rvaluedness_matches_p.
1407 (compare_ics): Do not compare rvaluedness matching when one of the
1408 operands is an implicit object.
1409
1410 2007-09-14 Jason Merrill <jason@redhat.com>
1411
1412 PR c++/17743, c++/19163
1413 * decl2.c (is_late_template_attribute): New fn.
1414 (splice_template_attributes, save_template_attributes): New fns.
1415 (cplus_decl_attributes): Call save_template_attributes.
1416 * pt.c (apply_late_template_attributes): New fn.
1417 (instantiate_class_template, tsubst_decl): Use it.
1418 * cp-tree.h: Declare is_late_template_attribute.
1419
1420 2007-09-13 Tom Tromey <tromey@redhat.com>
1421
1422 * parser.c (cp_lexer_new_main): Don't use
1423 c_lex_return_raw_strings.
1424 (cp_lexer_get_preprocessor_token): Update. Add special case when
1425 lexer is NULL.
1426
1427 2007-09-11 Jan Hubicka <jh@suse.cz>
1428
1429 * method.c (use_thunk): Use tree_rest_of_compilation
1430 * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
1431 (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
1432 * cp-tree.h (expand_body): Kill.
1433 (emit_associated_thunks): Declare.
1434 * semantics.c (emit_associated_thunks): Export.
1435 (expand_body): Kill.
1436
1437 2007-09-09 David Daney <ddaney@avtrex.com>
1438
1439 PR c++/33324
1440 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
1441 to calculate cookie_ptr.
1442
1443 2007-09-08 Jason Merrill <jason@redhat.com>
1444
1445 PR c++/33342
1446 * pt.c (most_specialized_class): Set processing_template_decl
1447 while tsubsting partial spec args.
1448
1449 2007-09-06 Jason Merrill <jason@redhat.com>
1450
1451 * decl2.c (get_guard): Copy visibility from the guarded variable.
1452
1453 2007-09-06 Jan Hubicka <jh@suse.cz>
1454
1455 * semantics.c (expand_body): Do not mark arguments of clones used.
1456
1457 2007-09-06 Paolo Carlini <pcarlini@suse.de>
1458
1459 PR c++/32674
1460 * decl.c (cp_finish_decl): When processing_template_decl,
1461 deal correctly with init as TREE_LIST.
1462
1463 2007-09-06 Tom Tromey <tromey@redhat.com>
1464
1465 * decl.c (finish_function): Put return's location on line zero of
1466 file.
1467
1468 2007-09-05 Jason Merrill <jason@redhat.com>
1469
1470 PR c++/15745
1471 * except.c (prepare_eh_type): Use type_decays_to.
1472
1473 PR c++/15097
1474 * init.c (build_delete): Use build_headof to get the address of the
1475 complete object if we aren't using the deleting destructor.
1476 * rtti.c (build_headof): No longer static.
1477 * cp-tree.h: Declare it.
1478
1479 2007-09-06 Jakub Jelinek <jakub@redhat.com>
1480
1481 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
1482 decl if a prototype for XX is provided with throw().
1483
1484 PR c++/33289
1485 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
1486 on __*_chk non-__builtin_* decls.
1487
1488 2007-09-05 Paolo Carlini <pcarlini@suse.de>
1489
1490 PR c++/30302
1491 * semantics.c (finish_id_expression): Use context_for_name_lookup
1492 insted of DECL_CONTEXT, to see through anonymous structs and unions.
1493 * class.c (finish_struct_anon): Deal correctly with anonymous
1494 structs (vs unions, as GNU extension) in error messages.
1495
1496 2007-09-05 Jan Hubicka <jh@suse.cz>
1497
1498 * cp/sematics.c (expand_body): Remove unnecesary import_export_decl
1499 call, DECL_EXTERNAL checks and current_function_decl saving.
1500
1501 2007-09-05 Paolo Carlini <pcarlini@suse.de>
1502
1503 PR c++/29731 (again)
1504 * parser.c (cp_parser_primary_expression): Return error_mark_node
1505 when a statement-expression is found in a template-argument list.
1506
1507 2007-09-04 Jason Merrill <jason@redhat.com>
1508
1509 * except.c (initialize_handler_parm): Use
1510 fold_build_cleanup_point_expr.
1511
1512 PR c++/31419
1513 * call.c (reference_binding): Don't look for user-defined conversions
1514 to the same type.
1515
1516 PR c++/31411
1517 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
1518 the MUST_NOT_THROW_EXPR.
1519
1520 2007-09-04 Richard Sandiford <richard@codesourcery.com>
1521
1522 * decl.c (cp_finish_decl): Call determine_visibility before
1523 make_rtl_for_nonlocal_decl.
1524
1525 2007-09-04 Jason Merrill <jason@redhat.com>
1526
1527 PR c++/14032
1528 * pt.c (most_specialized_class): Substitute outer template
1529 arguments into the arguments of a member template partial
1530 specialization.
1531 (strip_innermost_template_args): New fn.
1532
1533 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
1534
1535 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
1536
1537 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1538
1539 * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
1540 * decl.c (cp_make_fname_decl): Likewise,
1541 * parser.c (cp_parser_string_literal): Likewise,
1542 * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
1543 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
1544 Likewise,
1545
1546 2007-09-02 Paolo Carlini <pcarlini@suse.de>
1547
1548 PR c++/33208
1549 * typeck.c (build_unary_op): Fix error message for
1550 Boolean expression as operand to operator--.
1551
1552 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1553
1554 * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
1555 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
1556 Likewise.
1557
1558 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
1559
1560 PR c++/32597
1561 * init.c (build_default_init): Make extern.
1562 * cp-tree.h (build_default_init): Declare here.
1563 * pt.c (tsubst_expr): When the instantiation of the initializer of
1564 a variable results in an empty list, default-initialize the
1565 variable.
1566 (tsubst_copy_and_build): When the instantiation of the initializer
1567 in a new expression results in an empty initializer list,
1568 default-initialize it.
1569
1570 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
1571
1572 * mangle.c (write_type): Change mangling of rvalue reference from
1573 `RR' to `O'.
1574
1575 2007-08-31 Jakub Jelinek <jakub@redhat.com>
1576
1577 * decl.c (duplicate_decls): Remove duplicated line.
1578
1579 2007-08-31 Paolo Carlini <pcarlini@suse.de>
1580
1581 PR c++/33210
1582 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
1583 BOUND_TEMPLATE_TEMPLATE_PARM.
1584
1585 2007-08-31 Paolo Carlini <pcarlini@suse.de>
1586
1587 PR c++/32113
1588 * search.c (lookup_member): Check the name argument for
1589 error_mark_node.
1590
1591 2007-08-31 Paolo Carlini <pcarlini@suse.de>
1592
1593 PR c++/33212
1594 * parser.c (cp_parser_trait_expr): Check rerurn value of
1595 cp_parser_type_id.
1596
1597 2007-08-30 Ollie Wild <aaw@google.com>
1598
1599 * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
1600 convert_ptrmem for pointer to member conversions.
1601 (convert_to_pointer_force): Update cp_convert_to_pointer call.
1602 (ocp_convert): Update cp_convert_to_pointer call.
1603 * typeck.c (convert_ptrmem): Add conditional for null pointers to
1604 members.
1605 (build_static_cast_1): Check can_convert for conversions in either
1606 direction.
1607 (get_delta_difference_1): New function.
1608 (get_delta_difference): Refactor to call get_delta_difference_1.
1609
1610 2007-08-30 Jakub Jelinek <jakub@redhat.com>
1611
1612 * decl.c (start_preparsed_function): Set
1613 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
1614
1615 2007-08-28 Paolo Carlini <pcarlini@suse.de>
1616
1617 PR c++/33209
1618 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
1619 BOUND_TEMPLATE_TEMPLATE_PARM.
1620
1621 2007-08-28 Jakub Jelinek <jakub@redhat.com>
1622
1623 PR c++/32596
1624 PR c++/32400
1625 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
1626 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
1627
1628 2007-08-27 Jason Merrill <jason@redhat.com>
1629
1630 PR c++/29000
1631 * pt.c (build_non_dependent_expr, type_dependent_expression_p):
1632 Look inside STMT_EXPR.
1633 * semantics.c (stmt_expr_value_expr): New fn.
1634 * cp-tree.h: Declare it.
1635
1636 PR c++/28558
1637 * decl.c (groktypename): Ignore attributes applied to class type.
1638
1639 2007-08-28 Richard Guenther <rguenther@suse.de>
1640
1641 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
1642
1643 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
1644
1645 * error.c (dump_expr): Handle COMPLEX_CST.
1646 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
1647 (pp_cxx_expression): Likewise.
1648
1649 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
1650
1651 * decl.c (GNU_INLINE_P): New.
1652 (duplicate_decls): Handle gnu_inline. Merge attributes and
1653 some flags in overriding definitions.
1654 (redeclaration_error_message): Handle gnu_inline.
1655 (start_preparsed_function): Likewise.
1656
1657 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1658
1659 * call.c (sufficient_parms_p): Constify.
1660 * class.c (same_signature_p): Likewise.
1661 * cp-gimplify.c (is_invisiref_parm,
1662 cxx_omp_privatize_by_reference): Likewise.
1663 * cp-objcp-common.c (has_c_linkage): Likewise.
1664 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
1665 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
1666 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
1667 num_artificial_parms_for, comp_template_parms,
1668 template_parameter_pack_p, any_dependent_template_arguments_p,
1669 any_type_dependent_arguments_p, any_value_dependent_elements_p,
1670 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
1671 zero_init_p, member_p, cp_lvalue_kind,
1672 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
1673 varargs_function_p, is_dummy_object, special_function_kind,
1674 string_conv_p, type_unknown_p, comp_except_specs, compparms,
1675 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
1676 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
1677 cp_has_mutable_p, at_least_as_qualified_p,
1678 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
1679 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
1680 * except.c (nothrow_libfn_p): Likewise.
1681 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
1682 Likewise.
1683 * pt.c (comp_template_parms, template_parameter_pack_p,
1684 any_type_dependent_arguments_p, any_value_dependent_elements_p,
1685 any_dependent_template_arguments_p): Likewise.
1686 * repo.c (repo_export_class_p): Likewise.
1687 * semantics.c (anon_aggr_type_p): Likewise.
1688 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
1689 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
1690 varargs_function_p, member_p, is_dummy_object, pod_type_p,
1691 zero_init_p, special_function_p): Likewise.
1692 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
1693 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
1694 compparms, invalid_nonstatic_memfn_p,
1695 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
1696 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
1697 cp_has_mutable_p, lvalue_or_else): Likewise.
1698
1699 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
1700
1701 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
1702 * cp-objcp-common.c (cp_tree_size): Ditto.
1703 * tree.c (cp_walk_subtrees): Ditto
1704 * cp-tree.def (TINST_LEVEL): Go away.
1705 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
1706 move together with other non-tree structs.
1707 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
1708 (union lang_tree_node): Eliminate tinst_level field.
1709 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
1710 (current_instantiation, outermost_tinst_level): Return
1711 a "struct tinst_level *".
1712
1713 * error.c (print_instantiation_partial_context): Change second
1714 parameter to a "struct tinst_level *". Replace accessor macros
1715 with field access.
1716 (print_instantiation_full_context): Likewise.
1717 * lex.c (in_main_input_context): Likewise.
1718
1719 * pt.c (struct pending_templates): New.
1720 (pending_templates, last_pending_template): Use it as a type.
1721 (current_tinst_level): Change typo to "struct tinst_level *"
1722 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
1723 (add_pending_template): Construct a "struct pending_template".
1724 Replace TINST_LEVEL accessor macros with field access.
1725 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
1726 (pop_tinst_level): Likewise.
1727 (instantiate_pending_templates): Likewise. Factor common code used
1728 when an instantiation has been done.
1729 (outermost_tinst_level): Replace tree_last with loop.
1730 (current_instantiation): Return a "struct tinst_level *".
1731
1732 2007-08-24 Ollie Wild <aaw@google.com>
1733
1734 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
1735 * name-lookup.h (cp_binding_level): Remove vtables member.
1736
1737 2007-08-24 Richard Guenther <rguenther@suse.de>
1738
1739 * tree.c (cp_cannot_inline_tree_fn): Remove.
1740 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
1741 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
1742 Remove define.
1743
1744 2007-08-24 Jakub Jelinek <jakub@redhat.com>
1745
1746 PR c++/32567
1747 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
1748 error_mark_node right away if build_expr_type_conversion
1749 returned it.
1750
1751 PR c++/32898
1752 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
1753 is error_mark_node rather than NULL_TREE.
1754 * pt.c (check_explicit_specialization): Likewise.
1755
1756 PR c++/31941
1757 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
1758 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
1759
1760 2007-08-22 Jason Merrill <jason@redhat.com>
1761
1762 PR c++/29365
1763 * pt.c (outermost_tinst_level): New function.
1764 * lex.c (in_main_input_context): New function.
1765 * cp-tree.h: Declare it.
1766 * decl2.c (constrain_class_visibility): Use it to avoid warning
1767 about uses of the anonymous namespace in the main input file.
1768
1769 2007-08-21 Jakub Jelinek <jakub@redhat.com>
1770
1771 * init.c (build_new_1): Use get_target_expr instead of save_expr.
1772
1773 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
1774
1775 PR c++/7302
1776 * class.c (finish_struct_1): Warn when a class has virtual
1777 functions and accessible non-virtual destructor.
1778
1779 2007-08-20 Richard Guenther <rguenther@suse.de>
1780
1781 PR c++/22369
1782 PR c++/22451
1783 * call.c (build_new_method_call): Convert initializer to
1784 the basetype.
1785 * init.c (build_aggr_init): Do not fiddle with types.
1786 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
1787 * except.c (build_throw): Do not drop qualifiers for the
1788 pointer type.
1789 * typeck.c (get_member_function_from_ptrfunc): Do not
1790 fiddle with types, instead convert.
1791 (build_ptrmemfunc1): Convert to the target type for
1792 initialization.
1793 (gfc_trans_allocate): Convert result to target type.
1794 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
1795 pointer-to-member structures shall have alias set zero as well.
1796
1797 2007-08-20 Richard Guenther <rguenther@suse.de>
1798
1799 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
1800 Remove.
1801 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
1802 (nonstatic_local_decl_p): Likewise.
1803 * tree.c (cp_auto_var_in_fn_p): Remove.
1804 * decl.c (nonstatic_local_decl_p): Remove.
1805
1806 2007-08-20 Richard Guenther <rguenther@suse.de>
1807
1808 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
1809 Remove define.
1810 * tree.h (cp_walk_tree): New define to walk_tree_1 with
1811 cp_walk_subtrees lh parameter.
1812 (cp_walk_tree_without_duplicates): New define to
1813 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
1814 * tree.c (count_trees): Call
1815 cp_walk_tree_without_duplicates.
1816 (verify_stmt_tree): Call cp_walk_tree.
1817 (break_out_target_exprs): Likewise.
1818 (WALK_SUBTREE): Likewise.
1819 * cp-gimplify.c (cp_genericize): Likewise.
1820 * cp-pt.c (find_parameter_packs_r): Likewise.
1821 (uses_parameter_packs): Likewise.
1822 (make_pack_expansion): Likewise.
1823 (check_for_bare_parameter_packs): Likewise.
1824 (for_each_template_parm): Likewise.
1825 * decl.c (check_default_argument): Call
1826 cp_walk_tree_without_duplicates.
1827 * except.c (build_throw): Likewise.
1828 * decl2.c (type_visibility): Likewise.
1829 * semantics.c (expand_or_defer_fn): Likewise.
1830 (finalize_nrv): Call cp_walk_tree.
1831
1832 2007-08-20 Jakub Jelinek <jakub@redhat.com>
1833
1834 PR c++/33025
1835 * init.c (build_new_1): Rename placement_var variable to placement_expr.
1836 Initialize it with save_expr rather than get_temp_regvar.
1837
1838 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
1839
1840 PR c++/28989
1841 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
1842 lvalues.
1843
1844 2007-08-17 Ollie Wild <aaw@google.com>
1845
1846 PR c++/31749
1847 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
1848 declarations into appropriate slots for comparison. Fix type
1849 comparison.
1850
1851 2007-08-17 Paolo Carlini <pcarlini@suse.de>
1852
1853 PR c++/32112
1854 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
1855 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
1856
1857 2007-08-17 Paolo Carlini <pcarlini@suse.de>
1858
1859 PR c++/32870
1860 * parser.c (cp_parser_class_head): Improve error message.
1861
1862 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
1863
1864 * pt.c (instantiate_decl): Set input_location
1865 for the function end.
1866
1867 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1868
1869 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
1870 Constify.
1871 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
1872 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
1873 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
1874 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
1875 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
1876 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
1877 * typeck.c (cp_type_quals): Likewise.
1878 * typeck2.c (cxx_incomplete_type_diagnostic,
1879 cxx_incomplete_type_error): Likewise.
1880
1881 2007-08-16 Paolo Carlini <pcarlini@suse.de>
1882
1883 PR c++/31132
1884 * pt.c (tsubst_friend_function): When check_classfn
1885 returns error_mark_node likewise return it.
1886
1887 2007-08-15 Jakub Jelinek <jakub@redhat.com>
1888
1889 PR c++/32992
1890 * typeck.c (check_return_expr): Don't NRV optimize vars in
1891 anonymous unions.
1892 * decl.c (finish_function): Comment fix.
1893
1894 2007-08-15 Paolo Carlini <pcarlini@suse.de>
1895
1896 PR c++/33035
1897 * pt.c (push_template_decl_real): Depending on TYPE_P
1898 use either TYPE_CONTEXT or DECL_CONTEXT.
1899
1900 2007-08-14 Mark Mitchell <mark@codesourcery.com>
1901
1902 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
1903 constructors and destructors return this.
1904
1905 2007-08-14 Paolo Carlini <pcarlini@suse.de>
1906
1907 PR c++/27211
1908 * decl2.c (check_classfn): Return error_mark_node in case of error;
1909 in that case, do not call add_method.
1910 * decl.c (start_decl): Deal with check_classfn returning
1911 error_mark_node.
1912 (grokfndecl): Likewise.
1913 * pt.c (tsubst_friend_function): Likewise.
1914
1915 2007-08-14 Andrew Pinski <pinskia@gmail.com>
1916
1917 PR c++/30428
1918 * typeck.c (build_binary_op): Disallow vector float types with
1919 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
1920
1921 2007-08-11 Ian Lance Taylor <iant@google.com>
1922
1923 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
1924 alias_set_type.
1925 * cp/cp-tree.h (cxx_get_alias_set): Update declaration.
1926
1927 2007-08-10 Ollie Wild <aaw@google.com>
1928
1929 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
1930 type lookups.
1931 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
1932 function parameter.
1933 (unqualified_namespace_lookup): Fix ambiguous_decl call.
1934 (lookup_using_namespace): Fix ambiguous_decl call.
1935 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
1936
1937 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1938
1939 * call.c (name_as_c_string): Use CONST_CAST.
1940 * decl.c (build_decl): Likewise.
1941 * parser.c (cp_parser_string_literal): Likewise.
1942
1943 2007-08-10 Paolo Carlini <pcarlini@suse.de>
1944
1945 PR c++/17763
1946 * error.c (dump_expr): Consistently use the *_cxx_*
1947 variants of the pretty-print functions.
1948
1949 2007-08-10 Paolo Carlini <pcarlini@suse.de>
1950
1951 PR c++/22256
1952 * decl.c (check_special_function_return_type): Just error
1953 on return type specified for conversion operator.
1954
1955 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
1956
1957 * typeck2.c (readonly_error): Handle general expressions.
1958 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
1959
1960 2007-08-06 Dan Hipschman <dsh@google.com>
1961
1962 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
1963 access function name.
1964
1965 2007-08-04 Alfred Minarik <a.minarik@aon.at>
1966
1967 PR pch/13676
1968 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
1969 * g++spec.c (lang_specific_driver): Check them.
1970
1971 2007-08-06 Paolo Carlini <pcarlini@suse.de>
1972
1973 PR c++/19532
1974 * pt.c (inline_needs_template_parms): Fix comment; change return type
1975 to bool.
1976
1977 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
1978
1979 Revert:
1980 2007-03-26 Dirk Mueller <dmueller@suse.de>
1981
1982 * parser.c (cp_parser_member_declaration): Pedwarn
1983 about stray semicolons after member declarations.
1984
1985 2007-08-02 Lee Millward <lee.millward@gmail.com>
1986
1987 PR c++/30849
1988 PR c++/30850
1989 PR c++/30851
1990 * parser.c (cp_parser_asm_definition): Detect and discard asm
1991 statements with invalid inputs or outputs.
1992 (cp_parser_asm_operand_list): Return error mark node if any
1993 of the operands are invalid. Adjust documentation.
1994
1995 2007-08-02 Nick Clifton <nickc@redhat.com>
1996
1997 * typeck.c: Change copyright header to refer to version 3 of the
1998 GNU General Public License and to point readers at the COPYING3
1999 file and the FSF's license web page.
2000 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
2001 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
2002 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
2003 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
2004 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
2005 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
2006 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
2007 name-lookup.h, parser.c: Likewise.
2008
2009 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2010
2011 PR middle-end/32668
2012 * call.c (magic_varargs_p): Honor the "type generic" attribute.
2013
2014 2007-07-30 Paolo Carlini <pcarlini@suse.de>
2015
2016 PR c++/32108
2017 * semantics.c (finish_label_stmt): Reject the __label__
2018 extension outside function scopes.
2019
2020 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2021
2022 * parser.c (eof_token): Un-constify.
2023 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
2024 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
2025 casts.
2026
2027 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
2028
2029 * pt.c, tree.c, typeck2.c: Fix comment typos.
2030
2031 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
2032 Mark Mitchell <mark@codesourcery.com>
2033
2034 PR c++/30917
2035 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
2036 hidden due to friend declarations in local classes.
2037
2038 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
2039
2040 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
2041 * cp-tree.def (DECLTYPE_TYPE): New.
2042 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
2043 (dump_type_prefix): Ditto.
2044 (dump_type_suffix): Ditto.
2045 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
2046 * mangle.c (write_type): Handle DECLTYPE_TYPE.
2047 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
2048 types.
2049 (DECLTYPE_TYPE_EXPR): New.
2050 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
2051 (finish_declared_type): Declare.
2052 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
2053 DECLTYPE_TYPE nodes.
2054 (pp_cxx_type_id): Ditto.
2055 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
2056 (tsubst): Substitute into a DECLTYPE_TYPE node.
2057 (tsubst_copy): Ditto.
2058 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
2059 nodes.
2060 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
2061 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
2062 structural equality (because we can't hash the expressions).
2063 (finish_declared_type): New.
2064 * lex.c (reswords): Add "decltype" keyword.
2065 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
2066 (cp_parser_postfix_expression): Add member_access_only_p to
2067 restrict postfix expression to member access expressions.
2068 (cp_parser_unary_expression): Update call to
2069 cp_parser_postfix_expression to reflect new parameter.
2070 (cp_parser_declared_type): New.
2071 (cp_parser_simple_type_specifier): Parse decltype types.
2072
2073 2007-07-27 Mark Mitchell <mark@codesourcery.com>
2074
2075 PR c++/32346
2076 * call.c (convert_for_arg_passing): Only widen bitfields to their
2077 declared types if necessary.
2078
2079 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2080
2081 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
2082 Constify.
2083
2084 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2085
2086 * decl.c (typename_hash, typename_compare): Constify.
2087 * mangle.c (hash_type, compare_type): Likewise.
2088 * pt.c (eq_local_specializations, hash_local_specialization):
2089 Likewise.
2090 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
2091 list_hash): Likewise.
2092 * typeck2.c (pat_compare): Likewise.
2093
2094 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
2095
2096 * method.c (implicitly_declare_fn): Increase alignment if member
2097 function pointer format requires it.
2098
2099 2007-07-24 Paolo Carlini <pcarlini@suse.de>
2100
2101 PR c++/29001
2102 * typeck.c (check_return_expr): Do not pass a null argument
2103 to null_ptr_cst_p.
2104
2105 2007-07-24 Paolo Carlini <pcarlini@suse.de>
2106
2107 PR c++/32561
2108 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
2109 only on VAR_DECL.
2110
2111 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
2112
2113 PR c++/32839
2114 * typeck.c (convert_arguments): Only use default args if we have
2115 a function decl.
2116
2117 PR c++/30818
2118 * typeck.c (structural_comptypes): No need to check
2119 resolve_typename_type return value here.
2120 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
2121 * pt.c (resolve_typename_type): Follow typename typedefs. Return
2122 original type rather than error_mark_node in case of failure.
2123 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
2124 resolve_typename_type result check.
2125 (cp_parser_direct_declarator, cp_parser_head,
2126 cp_parser_constructor_declarator_p): Likewise.
2127
2128 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
2129
2130 * pt.c (template_parms_variadic_p): Remove.
2131 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
2132
2133 2007-07-12 Jakub Jelinek <jakub@redhat.com>
2134
2135 PR c++/30854
2136 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
2137 argument to dump_aggr_init_expr_args instead of false.
2138
2139 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
2140
2141 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
2142 canonical types; otherwise, fall back to structural type
2143 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
2144 internal compiler error if the canonical types are wrong.
2145
2146 2007-07-11 Paolo Carlini <pcarlini@suse.de>
2147
2148 PR c++/32560
2149 * parser.c (cp_parser_make_indirect_declarator): When the
2150 the code argument is ERROR_MARK return cp_error_declarator.
2151
2152 2007-07-09 Geoffrey Keating <geoffk@apple.com>
2153
2154 PR 32617
2155 * decl.c (cxx_init_decl_processing): Don't set
2156 force_align_functions_log.
2157 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
2158 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
2159 FUNCTION_DECL, return its alignment.
2160
2161 2007-07-09 Richard Guenther <rguenther@suse.de>
2162
2163 * decl.c (start_preparsed_function): Do not promote return type.
2164
2165 2007-07-08 Paolo Carlini <pcarlini@suse.de>
2166
2167 PR c++/30535
2168 * pt.c (unify): Never pass error_mark_node to template_decl_level.
2169
2170 2007-07-07 Mark Mitchell <mark@codesourcery.com>
2171
2172 PR c++/32232
2173 * pt.c (resolve_overloaded_unification): Robustify. Return a
2174 bool, not an int.
2175 (type_unification_real): Adjust accordingly.
2176
2177 2007-07-06 Richard Guenther <rguenther@suse.de>
2178
2179 * init.c (build_new_1): Use the correct pointer type.
2180 * typeck2.c (build_m_component_ref): Likewise.
2181
2182 2007-07-05 Mark Mitchell <mark@codesourcery.com>
2183
2184 PR c++/32245
2185 * init.c (build_zero_init): Always build an initializer for
2186 non-static storage.
2187 * typeck2.c (build_functional_cast): Use build_zero_init.
2188
2189 PR c++/32251
2190 * init.c (build_new_1): Always pass the allocation function to
2191 build_op_delete_call.
2192 * call.c (build_op_delete_call): Handle operator delete with a
2193 variable-argument list. Do not issue an error when no matching
2194 deallocation function is available for a new operator.
2195
2196 PR c++/31992
2197 * cp-tree.h (any_value_dependent_elements_p): Declare it.
2198 * decl.c (value_dependent_init_p): New function.
2199 (cp_finish_decl): Use it.
2200 * pt.c (value_dependent_expression_p): Use
2201 any_value_dependent_elements_p.
2202 * parser.c (cp_parser_primary_expression): Add comment about
2203 treating dependent qualified names as integral
2204 constant-expressions.
2205
2206 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
2207
2208 * decl.c (build_ptrmemfunc_type): Always use structural equality
2209 tests when comparing pointer-to-member-function types, because the
2210 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
2211 types.
2212
2213 2007-07-03 Mark Mitchell <mark@codesourcery.com>
2214
2215 * init.c (build_new): Tweak comment.
2216
2217 2007-06-29 Dave Brolley <brolley@redhat.com>
2218
2219 PR c++/31743
2220 * parser.c (cp_parser_new_type_id): Don't reduce a named array
2221 type to its base type and number of elements here.
2222 * init.c (build_new): Call complete_type_or_else to ensure that the
2223 type is complete and to issue a diagnostic if it is not.
2224 (build_new_1): Don't call complete_type_or_else here.
2225
2226 2007-07-03 Richard Guenther <rguenther@suse.de>
2227
2228 PR c++/32609
2229 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
2230 after recursing.
2231
2232 2007-07-02 Simon Baldwin <simonb@google.com>
2233
2234 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
2235 for inner-style nested forward declarations that don't declare
2236 anything useful.
2237
2238 2007-07-02 Jakub Jelinek <jakub@redhat.com>
2239
2240 PR c++/31748
2241 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
2242 DECL_P in not a variable and appears more than once error messages.
2243
2244 2007-07-01 Ollie Wild <aaw@google.com>
2245
2246 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
2247 (select_decl): Remove function.
2248 (unqualified_namespace_lookup): Populate binding by calling
2249 ambiguous_decl. Remove select_decl call.
2250 (lookup_qualified_name): Remove select_decl call.
2251 * decl.c (lookup_and_check_tag): Check for ambiguous references.
2252 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
2253 generation when name lookup is ambiguous.
2254
2255 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
2256
2257 PR c++/31724
2258 * init.c (build_new_1): Use structural equality on the copy of the
2259 array type.
2260
2261 2007-06-28 Geoffrey Keating <geoffk@apple.com>
2262
2263 * decl2.c (determine_visibility): Implement
2264 flag_visibility_ms_compat effect on type info.
2265 * decl.c (cxx_init_decl_processing): Implement
2266 global effect of flag_visibility_ms_compat.
2267
2268 2007-06-28 Geoffrey Keating <geoffk@apple.com>
2269
2270 * decl2.c (start_objects): Mark constructor-running function
2271 as artificial.
2272
2273 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
2274
2275 PR c++/32111
2276 * decl.c (grokdeclarator): Reset friendp for member functions declared
2277 friend of their own class.
2278
2279 2007-06-23 Mark Mitchell <mark@codesourcery.com>
2280
2281 * decl2.c (determine_visibility): Don't look for dllexport here.
2282 (determine_visibility_from_class): Tidy.
2283
2284 2007-06-18 Simon Baldwin <simonb@google.com>
2285
2286 PR c++/31923
2287 * parser.c (cp_parser_single_declaration): Added check for storage
2288 class other than sc_none in parsed declaration, and a flag to indicate
2289 if the call is part of an explicit template specialization parse.
2290 * (cp_parser_explicit_specialization): Specialization check flag added
2291 to call to cp_parser_single_declaration(), set true.
2292 * (cp_parser_template_declaration_after_export): Specialization check
2293 flag added to call to cp_parser_single_declaration(), set false.
2294 * pt.c (check_explicit_specialization): Added code to copy visiblity
2295 and linkage from the templated function to the explicit specialization.
2296
2297 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
2298
2299 * typeck.c (build_binary_op): For templates build the
2300 expression in pieces to avoid the assert in build2_stat.
2301 (get_member_function_from_ptrfunc):
2302 Change over to using POINTER_PLUS_EXPR and convert
2303 the second operand to sizetype.
2304 * typeck2.c (build_m_component_ref): Likewise.
2305 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
2306 instead of PLUS_EXPR for pointers.
2307 (build_new_1): Likewise.
2308 (build_vec_delete_1): Likewise.
2309 (build_vec_delete): Likewise.
2310 * class.c (build_base_path): Likewise.
2311 (build_base_path): Likewise.
2312 (convert_to_base_statically): Likewise.
2313 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
2314 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
2315 instead of PLUS_EXPR.
2316 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
2317 instead of PLUS_EXPR for pointers.
2318 * call.c (build_special_member_call): Likewise.
2319 * rtti.c (build_headof): Likewise.
2320 Use sizetype instead of ptrdiff_type_node.
2321 (tinfo_base_init): Create a POINTER_PLUS_EXPR
2322 instead of PLUS_EXPR for pointers.
2323 * except.c (expand_start_catch_block): Do a
2324 NEGATIVE and then a POINTER_PLUS_EXPR instead
2325 of a MINUS_EXPR.
2326 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
2327 PLUS_EXPR on pointer types over to use
2328 POINTER_PLUS_EXPR and remove the conversion
2329 to the pointer types.
2330 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
2331 adding to a pointer type. Use size_int instead of
2332 ssize_int. Convert the index to sizetype before
2333 adding it to the pointer.
2334
2335 2007-06-15 Mark Mitchell <mark@codesourcery.com>
2336
2337 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
2338 (DECL_ANON_UNION_VAR_P): New macro.
2339 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
2340 than DECL_VAR_MARKED_P, to keep track of which variables we have
2341 seen.
2342 * decl.c (redeclaration_error_message): Complain about redeclaring
2343 anonymous union members at namespace scope.
2344 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
2345
2346 2007-06-14 Geoff Keating <geoffk@apple.com>
2347
2348 * decl2.c (determine_visibility): Ensure that functions with
2349 hidden types as parameters are hidden.
2350
2351 PR 31093
2352 * decl2.c (determine_visibility): Remove duplicate code for
2353 handling type info.
2354
2355 2007-06-12 Ian Lance Taylor <iant@google.com>
2356
2357 PR libstdc++/29286
2358 * init.c (avoid_placement_new_aliasing): New static function.
2359 (build_new_1): Call it.
2360
2361 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
2362
2363 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
2364 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
2365
2366 2007-06-08 Jakub Jelinek <jakub@redhat.com>
2367
2368 PR c++/32177
2369 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
2370 on init, the non-decl cond operand and increment value.
2371
2372 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
2373
2374 PR c++/30759
2375 * decl.c (check_initializer): Report an error when a brace enclosed
2376 initializer is used for a non-aggregate type in C++98.
2377 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
2378 cxx_dialect.
2379 (grokdeclarator): Likewise.
2380 (move_fn_p): Likewise.
2381 * typeck.c (check_return_expr): Likewise.
2382 * call.c (reference_binding): Likewise.
2383 * error.c (cp_cpp_error): Likewise.
2384 * pt.c (check_default_tmpl_args): Likewise.
2385 (tsubst): Likewise.
2386 * lex.c (init_reswords): Likewise.
2387 * parser.c (p_parser_primary_expression): Likewise.
2388 (TOKEN_PRECEDENCE): Likewise.
2389 (cp_parser_init_declarator): Likewise.
2390 (cp_parser_ptr_operator): Likewise.
2391 (cp_parser_parameter_declaration): Likewise.
2392 (cp_parser_enclosed_template_argument_list): Likewise.
2393 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
2394 (cp_parser_next_token_ends_template_argument_p): Likewise.
2395
2396 2007-06-04 Simon Baldwin <simonb@google.com>
2397
2398 * decl.c (grokdeclarator): Readability change. Moved case labels
2399 into direct switch statement scope.
2400
2401 2007-06-04 Paolo Carlini <pcarlini@suse.de>
2402
2403 * call.c (convert_like_real): Remove pointless code.
2404
2405 2007-05-31 Mark Mitchell <mark@codesourcery.com>
2406
2407 * decl.c (get_atexit_fn_ptr_type): New function.
2408 (get_atexit_node): Use it.
2409 (start_cleanup_fn): Likewise.
2410 (register_dtor_fn): Use the object's destructor, instead of a
2411 separate cleanup function, where possible.
2412 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
2413 (atexit_fn_ptr_type_node): New macro.
2414 * decl2.c (build_cleanup): Use build_address.
2415
2416 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
2417
2418 * typeck.c (build_binary_op): Include types in error.
2419
2420 2007-05-31 Jakub Jelinek <jakub@redhat.com>
2421
2422 PR c++/31806
2423 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
2424 needs runtime initialization.
2425
2426 2007-05-31 Paolo Carlini <pcarlini@suse.de>
2427
2428 PR c++/32158
2429 * semantics.c (finish_trait_expr): Complete the types.
2430
2431 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
2432 Douglas Gregor <doug.gregor@gmail.com>
2433 Pedro Lamarao <pedro.lamarao@mndfck.org>
2434 Howard Hinnant <howard.hinnant@gmail.com>
2435
2436 PR c++/7412
2437 PR c++/29939
2438 * typeck.c (comptypes): Don't consider rvalue and lvalue
2439 reference types to be equivalent.
2440 (check_return_expr): Move from certain lvalues when returning
2441 them.
2442 * decl.c (grokdeclarator): Implement reference collapsing.
2443 (copy_fn_p): Don't consider constructors taking rvalue references
2444 to be copy constructors.
2445 (move_fn_p): New.
2446 * call.c (conversion): New "rvaluedness_matches_p" member.
2447 (convert_class_to_reference): Require reference type as first
2448 parameter instead of base type.
2449 (reference_binding): Add logic to handle rvalue references.
2450 (implicit_conversion): Update inaccurate comment.
2451 (convert_like_real): Disable creation of temporaries that are
2452 impossible to initialize for types with move constructors.
2453 (build_over_call): Elide move constructors when possible.
2454 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
2455 (maybe_handle_ref_bind): Return conversion instead of type node.
2456 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
2457 determine preferred conversion sequences.
2458 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
2459 (LOOKUP_PREFER_RVALUE): New.
2460 (DECL_MOVE_CONSTRUCTOR_P): New.
2461 (struct cp_declarator): Add "reference" member for reference
2462 types, with new "rvalue_ref" flag.
2463 (cp_build_reference_type): Declare.
2464 (move_fn_p): Declare.
2465 * error.c (dump_type_prefix): Format rvalue reference types
2466 correctly in error messages.
2467 * except.c (build_throw): Move from certain lvalues when
2468 throwing.
2469 * mangle.c (write_type): Mangle rvalue references differently
2470 than regular references.
2471 * parser.c (make_reference_declarator): Add boolean parameter for
2472 rvalue references.
2473 (cp_parser_make_indirect_declarator): New.
2474 (cp_parser_new_declarator_opt): Call
2475 cp_parser_make_indirect_declarator.
2476 (cp_parser_conversion_declarator_opt): Ditto.
2477 (cp_parser_declarator): Ditto.
2478 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
2479 declarators.
2480 * pt.c (tsubst): Implement reference collapsing.
2481 (maybe_adjust_types_for_deduction): Implement special template
2482 parameter deduction rule for rvalue references.
2483 (type_unification_real): Update calls to
2484 maybe_adjust_types_for_deduction.
2485 (try_one_overload): Ditto.
2486 (unify_pack_expansion): Ditto.
2487 * tree.c (lvalue_p_1): Handle rvalue reference types.
2488 (cp_build_reference_type): New.
2489
2490 2007-05-30 Jakub Jelinek <jakub@redhat.com>
2491
2492 PR c++/31809
2493 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
2494 variables that need runtime initialization.
2495
2496 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
2497
2498 PR c++/31339
2499 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
2500 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
2501 case POSTDECREMENT_EXPR>): Return the error_mark_node
2502 if either the real or imaginary parts would an
2503 error_mark_node.
2504
2505 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
2506 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2507
2508 PR c++/31745
2509 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
2510 token is a closing brace, false if there are no tokens left.
2511 (cp_parser_namespace_alias_definition): Only consume the next token if
2512 it is a closing brace.
2513
2514 * parser.c (cp_parser_class_specifier): Likewise.
2515
2516 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
2517
2518 * semantics.c (finish_member_declaration): Fix a typo in the
2519 last checkin.
2520
2521 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
2522
2523 PR c++/31431
2524 PR c++/31432
2525 PR c++/31434
2526 PR c++/31435
2527 PR c++/31437
2528 PR c++/31438
2529 PR c++/31442
2530 PR c++/31443
2531 PR c++/31444
2532 PR c++/31445
2533 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
2534 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
2535 * pt.c (check_for_bare_parameter_packs): Return bool indicated
2536 whether everything was okay. Fix indentation.
2537 (push_template_decl_real): Check for bare parameter packs in
2538 function parameters; where errors occur, mark the parameter types
2539 with ERROR_MARK_NODEs to avert ICEs.
2540 (coerce_template_parameter_pack): New.
2541 (coerce_template_parms): Moved parameter pack coercion into
2542 coerce_template_parameter_pack, and permit it anywhere in the
2543 template parameter list (not just at the end). Parameter and
2544 argument indices can vary (somewhat) separately now, so add
2545 PARM_IDX and ARG_IDX.
2546 (fn_type_unification): Don't set an argument pack as incomplete if
2547 no argument pack was deduced.
2548 (type_unification_real): If a type parameter is a parameter pack
2549 and has not otherwise been deduced, it will be deduced to an empty
2550 parameter pack.
2551 (more_specialized_fn): Use the actual lengths of the argument
2552 lists when comparing against expansions.
2553 * semantics.c (finish_member_declaration): If a field's type has
2554 bare parameter packs, error and set its type to ERROR_MARK_NODE.
2555
2556 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
2557
2558 PR target/27067
2559 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
2560
2561 2007-05-22 Ollie Wild <aaw@google.com>
2562
2563 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
2564 (unqualified_namespace_lookup): Adds check for hidden types.
2565
2566 2007-05-22 Ollie Wild <aaw@google.com>
2567
2568 * decl.c (duplicate_decls): Verify namespace names are unique.
2569
2570 2007-05-21 Mark Mitchell <mark@codesourcery.com>
2571
2572 * decl.c (cxx_maybe_build_cleanup): Handle
2573 __attribute__((cleanup)).
2574
2575 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2576
2577 * cvt.c (cp_convert_and_check): Don't check warnings if the
2578 conversion failed.
2579
2580 2007-05-18 Geoffrey Keating <geoffk@apple.com>
2581
2582 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
2583
2584 2007-05-14 Paolo Carlini <pcarlini@suse.de>
2585
2586 PR c++/29928
2587 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
2588 type only if is a class type (5.2.8/4).
2589
2590 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
2591
2592 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
2593 * decl.c (grokdeclarator): Use unsigned_type_for instead of
2594 c_common_unsigned_type.
2595
2596 2007-05-11 Silvius Rus <rus@google.com>
2597
2598 * cp/typeck.c (build_indirect_ref): Add call to
2599 strict_aliasing_warning.
2600 (build_reinterpret_cast_1): Condition call to
2601 strict_aliasing_warning.
2602
2603 2007-05-11 Jan Hubicka <jh@suse.cz>
2604
2605 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
2606 * decl2.c (start_objects): ctors and dtors are no longer public.
2607 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
2608
2609 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
2610
2611 * typeck.c (build_unary_op): Remove code that used to
2612 handle non lvalue increments/decrements.
2613
2614 2007-05-07 Mike Stump <mrs@apple.com>
2615
2616 * parser.c (check_empty_body): Add.
2617 (cp_parser_iteration_statement): Add call to check_empty_body.
2618
2619 2007-05-05 Geoffrey Keating <geoffk@apple.com>
2620
2621 PR 31775
2622 * mangle.c (write_mangled_name): Mangle static variable names.
2623 (write_unqualified_name): Use local-source-name for
2624 namespace-scope static variables.
2625
2626 2007-05-04 Dirk Mueller <dmueller@suse.de>
2627
2628 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
2629 not in effect.
2630
2631 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
2632
2633 PR c++/31663
2634 * decl2.c (constrain_class_visibility):
2635 Use strip_pointer_or_array_types instead of strip_array_types.
2636
2637 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
2638
2639 PR C++/30221
2640 * decl.c (reshape_init_r): Don't reshape the first element if it
2641 is a pointer to member function.
2642
2643 2007-04-27 Simon Baldwin <simonb@google.com>
2644
2645 * decl.c (grokparms): Changed message format from %qD to %qE.
2646
2647 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
2648
2649 * error.c (maybe_warn_variadic_templates): Variadic templates are
2650 now in C++0x, so only warn about them in C++98 mode.
2651
2652 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
2653
2654 PR C++/30016
2655 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
2656 integeral types from vectors types.
2657
2658 2007-04-26 Jakub Jelinek <jakub@redhat.com>
2659
2660 PR c++/31598
2661 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
2662 for type dependent OMP_CLAUSE_DECLs.
2663
2664 2007-04-24 Mark Mitchell <mark@codesourcery.com>
2665
2666 PR c++/31338
2667 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
2668 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
2669 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
2670 * init.c (build_zero_init): Adjust, as
2671 COMPLEX_TYPE is now a SCALAR_TYPE.
2672 * typeck2.c (digest_init): Allow brace-enclosed initializers for
2673 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
2674
2675 2007-04-25 Paolo Carlini <pcarlini@suse.de>
2676
2677 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
2678 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
2679 (trait_expr_value): Adjust.
2680
2681 2007-04-23 Simon Baldwin <simonb@google.com>
2682
2683 * decl.c (grokparms): Added new error for duplicate function
2684 parameters names in function prototypes, to match gcc behavior.
2685
2686 2007-04-23 Jan Hubicka <jh@suse.cz>
2687
2688 * cp/decl2.c (finish_objects): Do not call target constructor/destructor
2689 bits dirrectly.
2690
2691 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
2692
2693 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
2694 instead of checking GIMPLE_STMT_P in chain_next.
2695
2696 2007-04-17 Mark Mitchell <mark@codesourcery.com>
2697
2698 PR c++/31513
2699 * call.c (convert_for_arg_passing): Convert bitfields to their
2700 declared types.
2701
2702 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
2703
2704 PR c++/31517
2705 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
2706
2707 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
2708
2709 PR c++/29365
2710 * cp/decl2.c (constrain_class_visibility):
2711 Do not warn about the use of anonymous namespace in the main input file.
2712
2713 2007-04-15 Mark Mitchell <mark@codesourcery.com>
2714
2715 * cp-tree.h (current_template_parms): Fix typo in comment.
2716
2717 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
2718
2719 * cp-tree.h, error.c: Fix comment typos.
2720
2721 2007-04-13 Jason Merrill <jason@redhat.com>
2722
2723 PR c++/31074
2724 * call.c (reference_binding): Add c_cast_p parm. If true,
2725 add quals to TO as needed to make it reference-compatible.
2726
2727 2007-04-11 Jan Hubicka <jh@suse.cz>
2728
2729 * cp/class.c (convert_to_base_statically): Fold produced tree; verify
2730 that we are not processing template_decl.
2731
2732 2007-04-09 Mark Mitchell <mark@codesourcery.com>
2733
2734 PR c++/31449
2735 * class.c (build_base_path): Ensure that the converted pointer has
2736 the same cv-qualification as the input.
2737
2738 2007-04-09 Paolo Carlini <pcarlini@suse.de>
2739
2740 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
2741
2742 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
2743
2744 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
2745 Do not set it.
2746 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
2747 * tree.c (cp_add_pending_fn_decls): Remove.
2748 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
2749
2750 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
2751
2752 Revert change removing staticp.
2753
2754 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
2755
2756 * cp-objcp-common.c (cxx_staticp): Remove.
2757 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
2758 * cp-tree.h (cxx_staticp):
2759
2760 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
2761
2762 * class.c (check_for_override): Don't remove dllmport attribute
2763 of virtual methods.
2764
2765 2007-04-03 Jakub Jelinek <jakub@redhat.com>
2766
2767 PR c++/30847
2768 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
2769 type issue error and return early.
2770
2771 2007-03-30 Jason Merrill <jason@redhat.com>
2772
2773 PR c++/31187
2774 * typeck.c (cp_type_readonly): New fn.
2775 * cp-tree.h: Declare it.
2776 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
2777 (cp_finish_decl): Not here.
2778
2779 2007-03-31 Richard Guenther <rguenther@suse.de>
2780
2781 * optimize.c (maybe_clone_body): Replace splay-tree usage by
2782 pointer-map.
2783
2784 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
2785
2786 PR c++/31138
2787 PR c++/31140
2788 PR c++/31141
2789 * parser.c (declarator_can_be_parameter_pack): New.
2790 (cp_parser_template_parameter): Only parse the `...' if the
2791 declarator can be a parameter pack.
2792 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
2793 is NULL.
2794 * pt.c (find_parameter_packs_r): Look into the bounds on integer
2795 types (they could be used as array bounds).
2796 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
2797 (tsubst_pack_expansion): Handle failure to expand parameter
2798 packs.
2799
2800 2007-03-30 Paolo Carlini <pcarlini@suse.de>
2801
2802 PR c++/26099
2803 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
2804 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
2805 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
2806 (CLASS_TYPE_NON_UNION_P): Add.
2807 (struct lang_type_class): Add has_complex_dflt.
2808 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
2809 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
2810 * cp-tree.def: Add TRAIT_EXPR.
2811 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
2812 * lex.c (struct resword): Add __has_nothrow_assign,
2813 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
2814 __has_trivial_constructor, __has_trivial_copy,
2815 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
2816 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
2817 __is_pod, __is_polymorphic, __is_union.
2818 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
2819 (cp_parser_trait_expr): New.
2820 * semantics.c (finish_trait_expr, trait_expr_value
2821 classtype_has_nothrow_copy_or_assign_p): New.
2822 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
2823 as static.
2824 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
2825 * class.c (check_bases, check_field_decl, check_bases_and_members):
2826 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
2827 * pt.c (uses_template_parms, tsubst_copy_and_build,
2828 value_dependent_expression_p, type_dependent_expression_p): Deal with
2829 TRAIT_EXPR.
2830 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
2831
2832 2007-03-29 Richard Guenther <rguenther@suse.de>
2833
2834 * tree.c (cp_walk_subtrees): Do not set input_location.
2835
2836 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
2837
2838 PR c++/29077
2839 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
2840 destructor.
2841
2842 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
2843
2844 * parser.c (struct cp_parser): Update comment for
2845 greater_than_is_operator_p.
2846 (cp_parser_primary_expression): In C++0x mode, a cast operator can
2847 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
2848 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
2849 !GREATER_THAN_IS_OPERATOR_P.
2850 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
2851 `>>' operators that will become two `>' tokens in C++0x.
2852 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
2853 mode, allowing it to terminate default arguments.
2854 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
2855 `>>' like two consecutive `>' tokens.
2856 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
2857 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
2858 ends a template argument.
2859
2860 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
2861
2862 * decl.c (redeclaration_error_message): Complain when redeclaring
2863 a friend function with default template arguments (C++0x mode only).
2864 * cp-tree.h (check_default_tmpl_args): Declare.
2865 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
2866 template arguments in function templates. Add support for checking
2867 the default template arguments of friend templates.
2868 (push_template_decl_real): Fix call to check_default_tmpl_args.
2869 (type_unification_real): If a template parameter has not been
2870 deduced but provides a default template argument, substitute into
2871 that default template argument.
2872 * parser.c (cp_parser_init_declarator): When declaring (but not
2873 defining!) a function template in C++0x mode, check for default
2874 template arguments.
2875
2876 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
2877
2878 PR c++/29993
2879 * decl.c (grokdeclarator): Deal with cv-qualified function type
2880 typedefs in the same way for member and non-member functions.
2881
2882 2007-03-26 Dirk Mueller <dmueller@suse.de>
2883
2884 * parser.c (cp_parser_member_declaration): Pedwarn
2885 about stray semicolons after member declarations.
2886
2887 2007-03-26 Paolo Carlini <pcarlini@suse.de>
2888
2889 PR c++/30500
2890 * pt.c (instantiate_decl): Set in_system_header.
2891
2892 2007-03-22 Mark Mitchell <mark@codesourcery.com>
2893
2894 * cp-tree.h (current_tempalte_parms): Improve documentation.
2895 * pt.c (current_template_args): Likewise.
2896
2897 PR c++/30863
2898 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
2899 not consume tokens when failing.
2900
2901 2007-03-22 Jim Wilson <wilson@specifix.com>
2902 Mark Mitchell <mark@codesourcery.com>
2903
2904 PR c++/31273
2905 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
2906 consistent with FROM.
2907
2908 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2909
2910 * error.c (dump_expr): Handle dependent names that designate types.
2911 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
2912
2913 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
2914
2915 * cp-tree.def, parser.c, pt.c: Fix comment typos.
2916
2917 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2918
2919 * cvt.c (cp_convert_and_check) : Define.
2920 * cp-tree.h (cp_convert_and_check): Declare.
2921 * call.c (convert_conversion_warnings): Rename to
2922 conversion_null_warnings. The warning for floating-point to
2923 integer is handled by convert_and_check in convert_like_real.
2924 (convert_like_real): convert_conversion_warnings was renamed as
2925 conversion_null_warnings.
2926 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
2927 overflow and changes of value during conversion.
2928
2929 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2930
2931 PR c++/30891
2932 * parser.c (cp_parser_statement): If 'namespace' is found, this
2933 only can be a namespace alias definition, so parse it now.
2934 (cp_parser_namespace_alias_definition): if we find an open brace
2935 instead of '=', then this is actually a misplaced namespace
2936 definition.
2937
2938 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2939
2940 PR c++/24924
2941 * decl.c (cxx_init_decl_processing): Move command-line options
2942 processing to c-opts.c.
2943
2944 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
2945
2946 * ptree.c (cxx_print_type): Use formatting markup for integers
2947 when printing template parameter index/level/orig level.
2948 (cxx_print_xnode): Ditto.
2949 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
2950 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
2951 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
2952 HOST_WIDE_INTs.
2953 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
2954 rather than a HOST_WIDE_INT.
2955 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
2956 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
2957 better bit-packing.
2958 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
2959 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
2960 IN_BASE_INITIALIZER bool bitfields.
2961 (struct cp_declarator): Make KIND a 4-bit field. Make
2962 PARAMETER_PACK_P a bool bitfield just after KIND.
2963 * pt.c (uses_parameter_packs): Destroy the pointer set.
2964 (make_pack_expansion): Ditto.
2965 (check_for_bare_parameter_packs): Ditto.
2966 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
2967
2968 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
2969
2970 PR c++/31165
2971 * call.c (convert_default_arg): Instead of copying the node,
2972 unshare it.
2973
2974 2007-03-15 Dirk Mueller <dmueller@suse.de>
2975
2976 PR c++/30860
2977 * call.c (convert_conversion_warnings): New..
2978 (convert_like_real): .. factored out from here.
2979 (convert_conversion_warnings): Add warning about
2980 false being converted to NULL in argument passing.
2981
2982 2007-03-14 Dirk Mueller <dmueller@suse.de>
2983
2984 * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
2985 (finish_do_body): Warn about empty body in do/while statement.
2986
2987 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2988
2989 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
2990
2991 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2992
2993 PR c/21438
2994 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
2995 warning.
2996
2997 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
2998
2999 * cp/repo.c (init_repo): Initialize random_seed saved options.
3000 (finish_repo): Adjust.
3001
3002 2007-03-13 Mark Mitchell <mark@codesourcery.com>
3003
3004 PR bootstrap/30899
3005 * Make-lang.in (doc/g++.1): Use $< to specify the location from
3006 which to copy.
3007
3008 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
3009
3010 * decl.c (compute_array_index_type): New warning flag warn_vla.
3011
3012 2007-03-12 Mark Mitchell <mark@codesourcery.com>
3013
3014 PR c++/30108
3015 * call.c (convert_default_arg): Copy non-constant arguments.
3016
3017 2007-03-11 Mark Mitchell <mark@codesourcery.com>
3018
3019 PR c++/31038
3020 * parser.c (cp_parser_postfix_expression): Disallow compound
3021 literals in constant expressions.
3022
3023 PR c++/30328
3024 * semantics.c (finish_typeof): Use unlowered_expr_type.
3025
3026 2007-03-10 Mark Mitchell <mark@codesourcery.com>
3027
3028 PR c++/30274
3029 * cp-tree.h (unlowered_expr_type): New function.
3030 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
3031 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
3032 (unlowered_expr_type): New function.
3033 (build_unary_op): Disallow predecrements of bool bitfields.
3034 * call.c (build_conditional_expr): Use unlowered_expr_type.
3035 * pt.c (type_unification_real): Likewise.
3036
3037 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
3038
3039 PR c++/20599
3040 * typeck.c (check_return_expr): Check for bare parameter packs.
3041 (comptypes): Compare template parameter packs and
3042 type pack expansions.
3043 * decl.c (grokdeclarator): Deal with the declaration of function
3044 parameter packs.
3045 (grokparms): Verify that the (optional) function parameter pack is
3046 at the end of the parameter list.
3047 (xref_basetypes): Handle pack expansions in the base class.
3048 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
3049 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
3050 (NONTYPE_ARGUMENT_PACK): New.
3051 (TYPE_PACK_EXPANSION): New.
3052 (EXPR_PACK_EXPANSION): New.
3053 (ARGUMENT_PACK_SELECT): New.
3054 * cp-objcp-common.c (cp_tree_size): Compute size of
3055 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
3056 ARGUMENT_PACK_SELECT.
3057 * error.c (dump_template_argument): Print template argument packs.
3058 (dump_template_argument_list): Ditto.
3059 (dump_template_parameter): Dump `...' for template type parameter
3060 packs.
3061 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
3062 (dump_parameters): Print function parameter packs.
3063 (dump_template_parms): Print template argument packs.
3064 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
3065 (maybe_warn_variadic_templates): New.
3066 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
3067 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
3068 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
3069 CAST_EXPR.
3070 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
3071 (write_template_arg): Write argument packs as separate arguments.
3072 * cp-tree.h (struct template_parm_index_s): Add flag that
3073 indicates that the template parameter is actually a parameter
3074 pack.
3075 (struct tree_argument_pack_select): New.
3076 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
3077 (union lang_tree_node): Add argument_pack_select.
3078 (FUNCTION_PARAMETER_PACK_P): New.
3079 (PACK_EXPANSION_P): New.
3080 (PACK_EXPANSION_PATTERN): New.
3081 (SET_PACK_EXPANSION_PATTERN): New.
3082 (PACK_EXPANSION_PARAMETER_PACKS): New.
3083 (ARGUMENT_PACK_P): New.
3084 (ARGUMENT_PACK_ARGS): New.
3085 (SET_ARGUMENT_PACK_ARGS): New.
3086 (ARGUMENT_PACK_INCOMPLETE_P): New.
3087 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
3088 (TEMPLATE_PARM_PARAMETER_PACK): New.
3089 (TEMPLATE_TYPE_PARAMETER_PACK): New.
3090 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
3091 (ARGUMENT_PACK_SELECT_INDEX): New.
3092 (ARGUMENT_PACK_SELECT_ARG): New.
3093 (struct cp_declarator): Add parameter_pack_p flag.
3094 (maybe_warn_variadic_templates): Declare.
3095 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
3096 indicate a template parameter pack.
3097 (uses_parameter_packs): Declare.
3098 (template_parameter_pack_p): Declare.
3099 (template_parms_variadic_p): Declare.
3100 (make_pack_expansion): Declare.
3101 (check_for_bare_parameter_packs): Declare.
3102 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
3103 sizeof... expressions.
3104 (pp_cxx_expression): Print pack expansions and non-type argument
3105 packs.
3106 (pp_cxx_exception_specification): Print pack expansions.
3107 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
3108 (pp_cxx_ctor_initializer): Print pack expansions.
3109 (pp_cxx_type_id): Print pack expansions.
3110 (pp_cxx_template_argument_list): Print argument packs.
3111 (pp_cxx_template_parameter): Print ellipsis for template parameter
3112 packs.
3113 * pt.c (comp_template_parms): Compare template parameter packs.
3114 (template_parameter_pack_p): New.
3115 (template_parms_variadic_p): New.
3116 (template_args_variadic_p): New.
3117 (make_ith_pack_parameter_name): New.
3118 (struct find_parameter_pack_data): New.
3119 (find_parameter_packs_r): New.
3120 (uses_parameter_packs): New.
3121 (make_pack_expansion): New.
3122 (check_for_bare_parameter_packs): New.
3123 (expand_template_argument_pack): New.
3124 (reduce_template_parm_level): Propagate parameter pack flag.
3125 (process_template_parm): Add is_parameter_pack parameter to state
3126 when the parameter is actually a parameter pack. Create template
3127 parameter packs when is_parameter_pack is true.
3128 (current_template_args): The argument for a template parameter
3129 pack is an argument pack containing a single pack expansion.
3130 (process_partial_specialization): When checking that non-type
3131 argument expressions do not involve template parameters, loop over
3132 the arguments in argument packs separately.
3133 (push_template_decl_real): Check that the type of the declaration
3134 does not have any bare parameter packs. Check that primary
3135 templates have no more than one parameter pack, and that it comes
3136 at the end of the template parameter list.
3137 (convert_template_argument): Handle coercions for pack expansion
3138 expressions by coercing the pattern then rebuilding the expansion.
3139 (coerce_template_parms): When coercing the arguments for a
3140 variadic template, pack "extra" arguments into an argument pack.
3141 (coerce_template_template_parms): Cannot coerce between parameter
3142 packs and non-pack parameters.
3143 (template_args_equal): Compare PACK_EXPANSION_P expressions.
3144 (comp_template_args): Expand all template arguments packs before
3145 comparing template argument lists.
3146 (mangle_class_name_for_template): Make argument packs as separate
3147 template arguments.
3148 (for_each_template_parm_r): No need to handle BASELINK.
3149 (instantiate_class_template): Handle pack expansions in the base
3150 class list.
3151 (tsubst_pack_expansion): New.
3152 (tsubst_template_args): Handle substitutions of argument packs and
3153 pack expansion into template argument lists.
3154 (tsubst_decl): Expand function parameter packs into separate
3155 function parameters.
3156 (tsubst_arg_types): Expand a type pack expansion into separate
3157 argument types.
3158 (tsubst_exception_specification): Handle pack expansions in
3159 exception specifiers.
3160 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
3161 replacing a template parameter with its argument. If we encounter
3162 a substitution for an argument pack, just return the parameter
3163 itself.
3164 (tsubst_copy): sizeof(X...) returns the number of elements in
3165 parameter pack X. See through ARGUMENT_PACK_SELECT when the
3166 PARM_DECL is a parameter pack.
3167 (tsubst_expr): Expression pack expansions and argument packs
3168 cannot show up here; they will all be handled through function
3169 calls, sizeof, and template argument lists.
3170 (tsubst_copy_and_build): sizeof(X...) returns the number of
3171 elements in parameter pack X. Handle pack expansions in TREE_LIST
3172 and CONSTRUCTOR nodes.
3173 (fn_type_unification): Handle "incomplete" explicit template
3174 argument lists that specify some of the arguments for a template
3175 parameter pack.
3176 (type_unification_real): Unify arguments against pack expansions.
3177 (template_parm_level_and_index): New, helper function.
3178 (unify_pack_expansion): New.
3179 (unify): Unify argument packs on an argument-by-argument basis,
3180 handling variadic argument packs as well.
3181 (more_specialized_fn): Handle unification of function parameter
3182 packs. All things being equal, prefer non-variadic function
3183 templates to variadic function templates.
3184 (more_specialized_class): Prefer the variadic class template
3185 partial specialization that binds fewer arguments to a parameter
3186 pack.
3187 (regenerate_decl_from_template): Expand function parameter packs
3188 into separate parameters.
3189 (instantiate_decl): Ditto.
3190 (tsubst_initializer_list): Handle pack expansions for base-class
3191 initializers.
3192 (dependent_type_p_r): Determine dependent types in argument packs
3193 and pack expansions.
3194 (value_dependent_expression_p): Determine value-dependence of
3195 non-type argument packs.
3196 (dependent_template_arg_p): Handle argument packs.
3197 * semantics.c (finish_cond): Check for bare parameter packs.
3198 (finish_expr_stmt): Ditto.
3199 (finish_for_expr): Ditto.
3200 (finish_switch_cond): Ditto.
3201 (finish_mem_initializers): Ditto.
3202 * name-lookup.c (arg_assoc_type): Handle pack expansions and
3203 argument packs.
3204 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
3205 * parser.c (make_declarator): Declarator is not an expansion.
3206 (make_pointer_declarator): Transfer parameter pack flag to outer
3207 declarator.
3208 (make_reference_declarator): Ditto.
3209 (make_ptrmem_declarator): Ditto.
3210 (make_call_declarator): Ditto.
3211 (make_array_declarator): Ditto.
3212 (cp_parser_postfix_expression): Allow pack expansion expressions
3213 in the argument list for a call expression.
3214 (cp_parser_parenthesized_expression_list): Add new parameter
3215 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
3216 into separate arguments."
3217 (cp_parser_new_placement): Allow pack expansion expressions.
3218 (cp_parser_new_initializer): Ditto.
3219 (cp_parser_mem_initializer_list): Allow ellipsis to create a
3220 base-class initializer expansion.
3221 (cp_parser_mem_initializer): Ditto.
3222 (cp_parser_template_parameter_list): Keep track of whether the
3223 template parameter is a template parameter pack.
3224 (cp_parser_template_parameter): Parse the ellipsis to indicate a
3225 template parameter pack.
3226 (cp_parser_type_parameter): Ditto.
3227 (cp_parser_template_argument_list): Parse the ellipsis to indicate
3228 a pack expansion.
3229 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
3230 this declarator is a parameter pack.
3231 (cp_parser_parameter_declaration): The ellipsis does not end the
3232 parameter declaration, because it might be a parameter pack. Parse
3233 the ellipsis to indicate a parameter pack.
3234 (cp_parser_initializer): Allow pack expansions.
3235 (cp_parser_initializer_list): Allow ellipsis to create an
3236 initializer expansion.
3237 (cp_parser_base_clause): Allow ellipsis to create a base specifier
3238 expansion.
3239 (cp_parser_type_id_list): Allow ellipsis to create an exception
3240 specifier expansion.
3241 (cp_parser_attribute_list): Don't allow pack expansions.
3242 (cp_parser_functional_cast): Allow pack expansions.
3243 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
3244 compute the length of a parameter pack.
3245 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
3246 end a template argument.
3247 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
3248 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
3249 CAST_EXPR.
3250
3251 2007-03-09 Dirk Mueller <dmueller@suse.de>
3252
3253 * cp/call.c (build_new_op): Call warn_logical_operator.
3254
3255 2007-03-08 Volker Reichelt <reichelt@netcologne.de>
3256
3257 PR c++/30852
3258 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
3259
3260 PR c++/30534
3261 * pt.c (any_template_arguments_need_structural_equality_p):
3262 Robustify.
3263
3264 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
3265
3266 * decl.c (grokdeclarator): Disable warnings for anonymous
3267 bitfields.
3268
3269 2007-03-05 Volker Reichelt <reichelt@netcologne.de>
3270
3271 * typeck2.c (readonly_error): Always emit a hard error.
3272 Remove last argument.
3273 * cp-tree.h (readonly_error): Adjust prototype.
3274 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
3275 * typeck.c (build_unary_op): Likewise.
3276 (build_modify_expr): Likewise.
3277
3278 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
3279
3280 PR c++/30895
3281 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
3282
3283 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3284
3285 PR c++/15787
3286 * parser.c (struct cp_parser): New IN_IF_STMT.
3287 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
3288 returning if parsing the body of an 'if' statement or issuing an
3289 error and continuing.
3290 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
3291 body of 'if'.
3292 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
3293
3294 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
3295
3296 PR c++/28253
3297 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
3298 for thunks.
3299
3300 2007-03-02 Geoffrey Keating <geoffk@apple.com>
3301
3302 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
3303 Objective-C++. Don't exit early if -shared-libgcc needs to be
3304 added.
3305
3306 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3307
3308 * typeck.c (common_base_type): Delete unused function.
3309
3310 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
3311
3312 * Make-lang.in: Add dummy lang.install-pdf target.
3313
3314 2007-03-01 Simon Baldwin <simonb@google.com>
3315
3316 PR c++/23689
3317 * decl.c (check_tag_decl): Added new warning for typedef ignored
3318 when it precedes an otherwise valid non-typedef declaration.
3319
3320 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
3321
3322 * typeck.c (build_function_call): Store converted arguments
3323 in a stack-allocated array instead of building a list.
3324 (convert_arguments): Store arguments in the array passed in as an
3325 argument, and return the actual number of arguments.
3326 * call.c (build_call): Delete, and replace with...
3327 (build_call_n, build_call_a): New.
3328 (build_op_delete_call): Rewrite to avoid constructing argument lists.
3329 (build_over_call): Store converted arguments in a stack-allocated
3330 array instead of building a list.
3331 (build_cxx_call): Pass arguments in an array instead of as a list.
3332 (build_java_interface_fn_ref): Rewrite to avoid constructing
3333 argument lists.
3334 * tree.h: Update declarations to reflect above changes.
3335 * method.c (use_thunk): Use a stack-allocated array to hold
3336 the arguments instead of a list.
3337 * rtti.c (throw_bad_cast): Update call to cxx_call.
3338 (throw_bad_typeid): Likewise.
3339 (build_dynamic_cast_1): Likewise.
3340 * init.c (build_builtin_delete_call): Use build_call_n.
3341 * decl.c (expand_static_init): Likewise.
3342 * except.c (cp_protect_cleanup_actions): Likewise.
3343 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
3344 (gimplify_must_not_throw_expr): Likewise.
3345 (cxx_omp_apply_fn): Use build_call_a.
3346
3347 2007-02-26 Mark Mitchell <mark@codesourcery.com>
3348
3349 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
3350 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
3351
3352 2007-02-25 Mark Mitchell <mark@codesourcery.com>
3353
3354 * cp-tree.h (static_ctors): Remove.
3355 * cp-tree.h (static_dtors): Likewise.
3356 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
3357 refactoring of tree_map hierarchy.
3358 (decl_shadowed_for_var_insert): Likewise.
3359 * semantics.c (expand_body): Use c_expand_body.
3360 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
3361 * decl2.c (static_ctors): Remove.
3362 (static_dtors): Likewise.
3363 (generate_ctor_or_dtor_function): Pass NULL_TREE to
3364 objc_generate_static_init_call. Do not call static_[cd]tors.
3365 (generate_ctor_and_dtor_functions_for_priority): Do not check for
3366 static_[cd]tors.
3367 (cp_write_global_declarations): Likewise.
3368
3369 2007-02-23 Richard Guenther <rguenther@suse.de>
3370
3371 * class.c (note_name_declared_in_class): Make declaration
3372 changes meaning a pedwarn.
3373
3374 2007-02-22 Michael Matz <matz@suse.de>
3375
3376 PR c++/29433
3377 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
3378 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
3379 dump_function_decl): Guard emitting outer scopes by new flag.
3380 * cp-lang.c (cxx_dwarf_name): New function.
3381 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
3382 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
3383 Remove functions.
3384 (push_template_decl_real, lookup_template_class): Remove calls
3385 to above functions.
3386
3387 2007-02-19 Mark Mitchell <mark@codesourcery.com>
3388
3389 * call.c (build_new_method_call): Ensure that explicit calls of
3390 destructors have type "void".
3391
3392 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3393
3394 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
3395 and -Walways-true with -Waddress.
3396 * cvt.c (convert_to_void): Replace unconditional warning with
3397 -Waddress.
3398
3399 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
3400
3401 * decl.c, tree.c: Fix comment typos.
3402
3403 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
3404
3405 PR C++/30158
3406 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
3407 statement expression if we had an error mark node.
3408
3409 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
3410 Brooks Moses <brooks.moses@codesourcery.com>
3411 Lee Millward <lee.millward@codesourcery.com>
3412
3413 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
3414 Change class to tcc_vl_exp.
3415
3416 * call.c (build_call): Use build_call_list instead
3417 of build3.
3418 (build_over_call): Likewise.
3419 (build_new_method_call): Use build_min_non_dep_call_list
3420 instead of build_min_non_dep.
3421
3422 * error.c (dump_call_expr_args): New function.
3423 (dump_aggr_init_expr_args): New function.
3424 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
3425 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
3426
3427 * cvt.c (convert_to_void): Use build_call_array instead
3428 of build3; use new AGGR_INIT_EXPR accessor macros.
3429
3430 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
3431 instead of TREE_CODE_LENGTH.
3432
3433 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
3434 AGGR_INIT_EXPR accessor macros.
3435
3436 * cp-gimplify.c (cp_gimplify_init_expr): Use
3437 AGGR_INIT_EXPR_SLOT to set the slot operand.
3438
3439 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
3440 (AGGR_INIT_EXPR_SLOT): New macro.
3441 (AGGR_INIT_EXPR_ARG): New macro.
3442 (aggr_init_expr_nargs): New macro.
3443 (AGGR_INIT_EXPR_ARGP): New macro.
3444 (aggr_init_expr_arg_iterator): New.
3445 (init_aggr_init_expr_arg_iterator): New.
3446 (next_aggr_init_expr_arg): New.
3447 (first_aggr_init_expr_arg): New.
3448 (more_aggr_init_expr_args_p): New.
3449 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
3450 (stabilize_aggr_init): New declaration.
3451 (build_min_non_dep_call_list): Likewise.
3452
3453 * tree.c (process_aggr_init_operands): New function.
3454 (build_aggr_init_array) New function.
3455 (build_cplus_new): Update to use new CALL_EXPR and
3456 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
3457 build_aggr_init_array.
3458 (build_min_non_dep_call_list) New function.
3459 (build_min_nt): Assert input code parameter is not a variable
3460 length expression class.
3461 (build_min, build_min_non_dep): Likewise.
3462 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
3463 to check for equality instead of recursing. Handle tcc_vl_exp
3464 tree code classes.
3465 (stabilize_call): Update to only handle CALL_EXPRs, not
3466 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
3467 (stabilize_aggr_init): New function.
3468 (stabilize_init): Use it.
3469
3470 * cxx-pretty-print.c (pp_cxx_postfix_expression)
3471 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
3472 AGGR_INIT_EXPR accessor macros and argument iterators.
3473
3474 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
3475 build_vl_exp. Iterate through the operands, recursively
3476 processing each one.
3477 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
3478 CALL_EXPR accessor macros.
3479 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
3480 tree code classes. Use TREE_OPERAND_LENGTH instead of
3481 TREE_CODE_LENGTH.
3482
3483 * semantics.c (finish_call_expr): Use build_nt_call_list
3484 instead of build_nt.
3485 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
3486 accessor macros. Use build_call_array to construct the
3487 CALL_EXPR node instead of build3
3488
3489 * decl2.c (build_offset_ref_call_from_tree): Use
3490 build_nt_call_list and build_min_non_dep_call_list instead
3491 of build_min_nt and build_min_non_dep.
3492
3493 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
3494 Use build_nt_call_list instead of build_min_nt.
3495
3496 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3497
3498 PR c++/28943
3499 * call.c (build_conditional_expr): Improve error message.
3500
3501 2007-02-13 Dirk Mueller <dmueller@suse.de>
3502
3503 * friend.c (do_friend): Annotate warning about friend
3504 declarations in templates with OPT_Wnon_template_friend.
3505 Convert informal message from warning() to inform().
3506
3507 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
3508 Mark Mitchell <mark@codesourcery.com>
3509
3510 PR c++/14622
3511 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
3512 instantiations for variables.
3513
3514 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3515
3516 PR middle-end/7651
3517 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
3518 Check warn_unused_value just once.
3519
3520 2007-02-11 Mark Mitchell <mark@codesourcery.com>
3521
3522 PR c++/26988
3523 * pt.c (determine_specialization): Use skip_artificial_parms_for.
3524 (fn_type_unificiation): Likewise.
3525 (get_bindings): Likewise.
3526
3527 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
3528
3529 PR target/29487
3530 * decl.c (finish_function): Use DECL_REPLACEABLE.
3531 * tree.c (cp_cannot_inline_tree_fn): Likewise.
3532
3533 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
3534
3535 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
3536
3537 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
3538
3539 * decl.c (grokvardecl): Don't error if !have_tls.
3540 (grokdeclarator): Likewise.
3541 * parser.c (cp_parser_omp_threadprivate): Likewise.
3542
3543 2007-02-07 Jakub Jelinek <jakub@redhat.com>
3544
3545 PR c++/30703
3546 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
3547 parameters and result decls in omp clauses.
3548 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
3549 by reference.
3550
3551 2007-02-05 Dirk Mueller <dmueller@suse.de>
3552
3553 PR bootstrap/30510
3554 * parser.c (cp_parser_class_specifier): Always initialize bases.
3555
3556 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
3557
3558 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
3559 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
3560 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
3561 expressions.
3562 * semantics.c (finish_omp_atomic): Store a whole expression node
3563 in operand 1, and integer_zero_node in operand 0, for dependent
3564 OMP_ATOMIC. Rewrite to make flow easier to understand.
3565
3566 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3567
3568 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
3569
3570 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
3571
3572 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
3573 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
3574
3575 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
3576
3577 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
3578 keyword warning to -Wc++0x-compat.
3579
3580 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3581
3582 * decl.c (grokdeclarator): Update documentation.
3583
3584 2007-02-02 Jakub Jelinek <jakub@redhat.com>
3585
3586 PR c++/30536
3587 * decl.c (grokdeclarator): If __thread is used together with
3588 a storage class other than extern and static, clear thread_p
3589 after issuing diagnostics and fall through to checking the
3590 storage class.
3591
3592 2007-01-30 Roger Sayle <roger@eyesopen.com>
3593
3594 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
3595 calculating the size of an array (to avoid recursive errors).
3596
3597 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3598
3599 PR c++/24745
3600 * typeck.c (build_binary_op): Fix logic for warning. Move warning
3601 to -Wpointer-arith.
3602 * call.c (convert_like_real): Don't warn when converting to
3603 boolean type.
3604
3605 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3606
3607 * decl.c (pop_label): Replace warning with call to
3608 warn_for_unused_label.
3609
3610 2007-01-28 Andrew Pinski <pinskia@gmail.com>
3611
3612 PR C++/28988
3613 * semantics.c (finish_pseudo_destructor_expr): Check the
3614 destrutor name by calling check_dtor_name.
3615
3616 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
3617
3618 * lex.c (D_CPP0X): Rename.
3619 (D_CXX0X): To this.
3620 (reswords): D_CPP0X -> D_CXX0X.
3621 (init_reswords): Ditto.
3622 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
3623 of C++0x keywords as identifiers.
3624
3625 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
3626
3627 PR c++/27492
3628 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
3629 function decls.
3630
3631 2007-01-23 Ian Lance Taylor <iant@google.com>
3632
3633 * typeck.c (convert_for_assignment): Only warn about a = b = c
3634 when converting to bool.
3635
3636 2007-01-23 Roger Sayle <roger@eyesopen.com>
3637
3638 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
3639 TREE_OVERFLOW.
3640 * typeck.c (ignore_overflows): Remove the remaining uses of
3641 TREE_CONSTANT_OVERFLOW.
3642
3643 2007-01-20 Jan Hubicka <jh@suse.cz>
3644
3645 * decl2.c (start_objects, start_static_storage_duration_function):
3646 Do not make the functions uninlinable.
3647
3648 2007-01-17 Ian Lance Taylor <iant@google.com>
3649
3650 * class.c (add_method): Call VEC_reserve_exact rather than passing
3651 a negative size to VEC_reserve.
3652
3653 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
3654
3655 PR c++/29573
3656 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
3657
3658 2007-01-10 Mark Mitchell <mark@codesourcery.com>
3659
3660 PR c++/28999
3661 * decl.c (make_typename_type): If the qualified name is not a
3662 type, issue an error.
3663 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
3664 formatting.
3665
3666 2007-01-08 Geoffrey Keating <geoffk@apple.com>
3667
3668 * rtti.c: Include target.h.
3669 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
3670 don't emit typeinfo for fundamental types as weak.
3671 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
3672
3673 2007-01-08 Richard Guenther <rguenther@suse.de>
3674
3675 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
3676
3677 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
3678
3679 * call.c (standard_conversion): Pass flag to
3680 vector_types_convertible_p to disallow emission of note.
3681 * typeck.c (convert_for_assignment): Pass flag to
3682 vector_types_convertible_p to allow emission of note.
3683 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
3684 to disallow emission of note.
3685
3686 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3687
3688 PR c++/28986
3689 * typeck.c (build_binary_op): Call overflow_warning if
3690 TREE_OVERFLOW_P is true for the result and not for any of the
3691 operands.
3692
3693 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
3694
3695 PR c++/19439
3696 * class.c (add_method): Don't wait until template
3697 instantiation time to complain about duplicate methods.
3698
3699 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3700
3701 PR c/19978
3702 * semantics.c (finish_unary_op_expr): Warn only if result
3703 overflowed and operands did not.
3704
3705 2007-01-05 Ian Lance Taylor <iant@google.com>
3706
3707 * typeck.c (build_binary_op): Warn about comparing a non-weak
3708 address to NULL.
3709
3710 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
3711
3712 * pt.c (tsubst): Propagate the need for structural equality checks
3713 when reducing the level of template parameters.
3714
3715 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
3716
3717 * pt.c: Fix a comment typo.
3718
3719 2007-01-02 Ian Lance Taylor <iant@google.com>
3720
3721 * semantics.c (maybe_convert_cond): Optionally warn when using an
3722 assignment as a condition.
3723 * typeck.c (convert_for_assignment): Optionally warn about
3724 assigning the result of an assignment to a bool.
3725
3726 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
3727
3728 * pt.c (canonical_template_parms): Correct typo in comment.
3729
3730 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
3731
3732 * typeck.c (structural_comptypes): Renamed from "comptypes".
3733 (comptypes): Use canonical type information to perform fast type
3734 comparison. When VERIFY_CANONICAL_TYPES, verify that the
3735 canonical type comparison returns the same results as we would see
3736 from the current, structural check. Support COMPARE_STRUCTURAL
3737 when we need structural checks.
3738 * decl.c (typename_compare): Fix comment.
3739 (build_typename_type): TYPENAME_TYPE nodes require structural
3740 equality checks, because they resolve different based on the
3741 current class type.
3742 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
3743 require structural equality checks (for now).
3744 (build_ptrmemfunc_type): Build the canonical pointer to member
3745 function type.
3746 (compute_array_index_type): Whenever we build a new index type
3747 to represent the size of an array in a template, we need to mark
3748 this index type as requiring structural equality. This goes for
3749 arrays with value-dependent sizes with the current ABI, or all
3750 arrays with ABI-1.
3751 * tree.c (cplus_array_hash): New.
3752 (struct cplus_array_info): New.
3753 (cplus_array_compare): New.
3754 (cplus_array_htab): New.
3755 (build_cplus_array_type_1): Use a hash table to cache the array
3756 types we build. Build the canonical array type for each array
3757 type.
3758 (cp_build_qualified_type_real): When building a cv-qualified array
3759 type, use the hash table of array types and build canonical array
3760 types as necessary.
3761 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
3762 use structural equality (for now).
3763 * cp-tree.h (COMPARE_STRUCTURAL): New.
3764 * pt.c (canonical_template_parms): New.
3765 (canonical_type_parameter): New.
3766 (process_template_parm): Find the canonical type parameter.
3767 (lookup_template_class): When we have named the primary template
3768 type, set the canonical type for our template class to the primary
3769 template type. If any of the template arguments need structural
3770 equality checks, the template class needs structural equality
3771 checks.
3772 (tsubst): When reducing the level of a template template
3773 parameter, we require structural equality tests for the resulting
3774 parameter because its template parameters have not had their types
3775 canonicalized. When reducing a template type parameter, find the
3776 canonical reduced type parameter.
3777 (any_template_arguments_need_structural_equality_p): New.
3778