a58d4ac27d503ec28a89a136bb5379b0c94a75a0
[gcc.git] / gcc / cp / ChangeLog
1 2009-01-16 Jason Merrill <jason@redhat.com>
2
3 PR c++/38877
4 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
5 * init.c (build_new): Don't call describable_type unless we
6 have an auto.
7
8 PR c++/29470
9 * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
10
11 PR c++/38579
12 * search.c (protected_accessible_p): N doesn't vary.
13
14 2009-01-15 Jason Merrill <jason@redhat.com>
15
16 PR c++/38850
17 * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
18 accept hidden friends.
19
20 2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
21
22 PR C++/29388
23 * decl.c (grokdeclarator): Check for a non namespace/class context.
24
25 2009-01-15 Jason Merrill <jason@redhat.com>
26
27 PR c++/36334
28 PR c++/37646
29 * tree.c (lvalue_p_1): Handle BASELINK. A COMPONENT_REF to
30 a function isn't necessarily an lvalue. Take tree, not const_tree.
31 (lvalue_p, real_lvalue_p): Take tree, not const_tree.
32 * typeck.c (lvalue_or_else): Likewise.
33 * cp-tree.h: Adjust prototypes.
34
35 2009-01-15 Steve Ellcey <sje@cup.hp.com>
36
37 PR c++/38357
38 * pt.c (tsubst): Check for NULL args.
39
40 2009-01-15 Dodji Seketeli <dodji@redhat.com>
41
42 PR c++/38636
43 * name-lookup.c (pushtag): Don't create members to types that are not
44 being created.
45
46 2009-01-14 Nick Clifton <nickc@redhat.com>
47
48 PR c++/37862
49 * parser.c: Pass cp_id_kind computed in
50 cp_parser_postfix_dot_deref_expression to
51 cp_parser_primary_expression.
52
53 2009-01-13 Jakub Jelinek <jakub@redhat.com>
54
55 PR c++/38795
56 * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
57 STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
58 as CAST_EXPR.
59
60 2009-01-12 Jason Merrill <jason@redhat.com>
61 Steve Ellcey <sje@cup.hp.com>
62
63 PR c++/35109
64 * name-lookup.c (lookup_name_real): Keep looking past a hidden
65 binding.
66
67 2009-01-12 Dodji Seketeli <dodji@redhat.com>
68
69 PR c++/36019
70 * pt.c (parameter_of_template_p): New function.
71 * cp-tree.h: Declare it.
72 * name-lookup.c (binding_to_template_parms_of_scope_p): New
73 function.
74 (outer_binding): Take template parameters in account when looking for
75 a name binding.
76
77 2009-01-12 Jason Merrill <jason@redhat.com>
78
79 PR c++/31488
80 * tree.c (pod_type_p): Return 1 for structs created by the back end.
81
82 2009-01-12 Jakub Jelinek <jakub@redhat.com>
83
84 PR c/32041
85 * parser.c (cp_parser_builtin_offsetof): Allow `->' in
86 offsetof member-designator, handle it as `[0].'.
87
88 PR c++/38794
89 * decl.c (start_function): If grokdeclarator hasn't returned
90 FUNCTION_DECL nor error_mark_node, issue diagnostics.
91
92 2009-01-11 Jakub Jelinek <jakub@redhat.com>
93
94 PR c++/36254
95 * cp-gimplify.c (genericize_if_stmt): Renamed from ...
96 (gimplify_if_stmt): ... this.
97 (cp_gimplify_expr): Don't handle IF_STMT here.
98 (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
99
100 2009-01-10 Andrew Pinski <pinskia@gmail.com>
101
102 PR c++/38648
103 * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
104
105 PR c++/36695
106 * typeck2.c (build_functional_cast): Check for reference type and NULL
107 PARMS.
108
109 2009-01-09 Steve Ellcey <sje@cup.hp.com>
110
111 * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
112
113 2009-01-09 Jakub Jelinek <jakub@redhat.com>
114
115 PR c++/35335
116 * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
117
118 2009-01-09 John F. Carr <jfc@mit.edu>
119
120 PR c++/37877
121 * parser.c (cp_parser_class_specifier): Clear
122 parser->in_unbraced_linkage_specification_p while parsing class
123 specifiers.
124
125 2009-01-07 Jakub Jelinek <jakub@redhat.com>
126
127 PR c++/38725
128 * semantics.c (finish_goto_stmt): Convert destination to
129 void *.
130
131 2009-01-06 Jason Merrill <jason@redhat.com>
132
133 PR c++/35297
134 PR c++/35477
135 PR c++/35784
136 PR c++/36846
137 PR c++/38276
138 * pt.c (check_default_tmpl_args): Don't complain about
139 out-of-order parameter packs in the enclosing class
140 or parameter packs after default args.
141 (coerce_template_parms): If we have more than one
142 parameter pack, don't flatten argument packs.
143 (template_args_equal): Handle argument packs.
144 (comp_template_args): Don't flatten argument packs.
145 (check_instantiated_arg): Split out from...
146 (check_instantiated_args): Here. Handle arg packs.
147 (convert_template_argument): Just check that nontype argument
148 packs have the right type.
149
150 2009-01-05 Dodji Seketeli <dodji@redhat.com>
151
152 PR c++/38472
153 * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
154
155 2009-01-05 Jason Merrill <jason@redhat.com>
156
157 PR c++/38698
158 * typeck2.c (process_init_constructor_union): Handle union with
159 no fields.
160
161 * mangle.c (write_expression): Remove mangling for zero-operand
162 casts.
163
164 PR c++/38701
165 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
166 defaulting.
167
168 PR c++/38702
169 * class.c (defaultable_fn_p): Only operator== can be a copy
170 assignment operator.
171
172 2009-01-02 Jason Merrill <jason@redhat.com>
173
174 PR c++/38698
175 * typeck2.c (process_init_constructor_union): Handle excess
176 initializers.
177 (process_init_constructor_record): Likewise.
178
179 PR c++/38684
180 * typeck2.c (digest_init_r): Don't use process_init_constructor
181 for non-aggregate classes.
182
183 2008-12-31 Jakub Jelinek <jakub@redhat.com>
184
185 PR c++/38647
186 * parser.c (cp_parser_primary_expression) <case RID_FUNCTION_NAME>:
187 Return error_mark_node if cp_parser_non_integral_constant_expression
188 returns true.
189
190 PR c++/38640
191 * semantics.c (finish_decltype_type): Handle TEMPLATE_PARM_INDEX.
192
193 2008-12-29 Jakub Jelinek <jakub@redhat.com>
194
195 PR c++/38635
196 * parser.c (cp_parser_condition): Use cp_parser_require
197 instead of cp_lexer_consume_token to consume =.
198
199 PR c++/38637
200 * decl.c (start_enum): If enumtype is error_mark_node, exit early.
201
202 2008-12-28 Jakub Jelinek <jakub@redhat.com>
203
204 PR c++/38650
205 * semantics.c (finish_omp_for): Don't add CLEANUP_POINT_EXPR
206 around volatile iteration var in condition and/or increment
207 expression.
208
209 2008-12-27 Jakub Jelinek <jakub@redhat.com>
210
211 PR c++/38639
212 * pt.c (tsubst_omp_for_iterator): RECUR on whole init_expr instead of
213 just its type.
214
215 2008-12-21 Jason Merrill <jason@redhat.com>
216
217 PR c++/38597
218 * name-lookup.c (arg_assoc_type): Handle DECLTYPE_TYPE.
219
220 2008-12-20 Jakub Jelinek <jakub@redhat.com>
221 Manuel López-Ibáñez <manu@gcc.gnu.org>
222
223 PR c++/36921
224 * c-common.c (warn_about_parentheses): Remove ARG_UNUSED from
225 arg_left. Don't warn about X<=Y<=Z if comparison's type isn't
226 integral.
227
228 2008-12-19 Jakub Jelinek <jakub@redhat.com>
229
230 PR c++/38577
231 * call.c (build_new_method_call): Handle call being COMPOUND_EXPR
232 or NOP_EXPR.
233
234 2008-12-18 Jakub Jelinek <jakub@redhat.com>
235
236 PR c++/38427
237 * init.c (perform_member_init): For value-initialized
238 references call permerror instead of warning and don't emit any
239 INIT_EXPR.
240
241 2008-12-18 Jason Merrill <jason@redhat.com>
242
243 PR c++/38485
244 * parser.c (cp_parser_token_starts_cast_expression): An EOF
245 can't start a cast-expression.
246
247 2008-12-17 Jason Merrill <jason@redhat.com>
248
249 * semantics.c (describable_type): New function.
250 (finish_decltype_type): Use it for dependent exprs.
251 * cp-tree.h: Declare it.
252 * mangle.c (write_type) [DECLTYPE_TYPE]: Set skip_evaluation.
253 (write_expression): If skip_evaluation, use type stubs.
254 * tree.c (cp_tree_equal): Handle PARM_DECLs from different
255 declarations of a function.
256 * init.c (build_new): Do auto deduction if type is describable.
257 * decl.c (cp_finish_decl): Likewise.
258 * parser.c (cp_parser_omp_for_loop): Likewise.
259
260 2008-12-10 Jason Merrill <jason@redhat.com>
261
262 PR c++/35319
263 * mangle.c (write_builtin_type): Add mangling for decimal floating
264 point and fixed point types.
265 (write_type): Pass FIXED_POINT_TYPE along.
266
267 2008-12-09 Mark Mitchell <mark@codesourcery.com>
268
269 PR c++/37971
270 * class.c (resolve_address_of_overloaded_function): Check
271 accessibility of member functions unless FLAGS indicates
272 otherwise.
273 * call.c (standard_conversion): Adjust flags passed to
274 instantiate_type.
275 (convert_default_arg): Do not perform access checks.
276 * cp-tree.h (tsubst_flags_t): Add tf_no_access_control.
277
278 2008-12-08 Steve Ellcey <sje@cup.hp.com>
279
280 * decl2.c (mark_used): Remove assemble_external call.
281
282 2008-12-08 Dodji Seketeli <dodji@redhat.com>
283
284 PR debug/38390
285 * name-lookup.c (kept_level_p): Don't forget the case of levels
286 having using directives.
287
288 2008-12-08 Richard Henderson <rth@redhat.com>
289
290 PR 38240
291 * class.c (finish_struct_bits): Use SET_TYPE_MODE.
292 * decl.c (record_unknown_type): Likewise.
293 (start_enum, finish_enum): Likewise.
294
295 2008-12-05 Jakub Jelinek <jakub@redhat.com>
296
297 PR c++/35336
298 * error.c (dump_expr): Handle BIT_FIELD_REF.
299
300 2008-12-05 Sebastian Pop <sebastian.pop@amd.com>
301
302 PR bootstrap/38262
303 * Make-lang.in (cc1plus-dummy, cc1plus): Add BACKENDLIBS,
304 remove GMPLIBS.
305
306 2008-12-04 Jason Merrill <jason@redhat.com>
307
308 PR c++/37906
309 * decl.c (grok_special_member_properties): Set TYPE_HAS_COMPLEX_DFLT
310 here.
311 * class.c (check_bases_and_members): Rather than assuming any
312 user-declared default constructor is complex here.
313
314 2008-12-04 Richard Guenther <rguenther@suse.de>
315
316 PR c++/38334
317 * typeck.c (get_member_function_from_ptrfunc): Mark the vtbl
318 pointer access with TREE_NO_WARNING.
319
320 2008-12-03 Jason Merrill <jason@redhat.com>
321
322 PR c++/38232
323 * init.c (build_value_init): Do initial zero-initialization
324 of a class with an implicitly-defined constructor using
325 build_zero_init rather than in build_value_init.
326 (build_value_init_1): Fold into build_value_init.
327
328 PR c++/38256
329 * parser.c (cp_parser_conversion_type_id): Diagnose
330 'operator auto' here.
331 * decl.c (grokdeclarator): Not here.
332
333 PR c++/38380
334 * decl.c (grokdeclarator): Only set DECL_NONCONVERTING_P
335 on explicit constructors.
336 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Propagate
337 CONSTRUCTOR_IS_DIRECT_INIT.
338
339 2008-12-02 Jason Merrill <jason@redhat.com>
340
341 PR c++/35782, c++/37860
342 * call.c (build_user_type_conversion_1): Remember
343 list-initialization.
344 (convert_like_real): Likewise.
345 (build_over_call): Don't require the copy constructor
346 for copy-list-initialization.
347 * cp-tree.h (TARGET_EXPR_LIST_INIT_P): New macro.
348
349 PR c++/37234
350 * decl.c (cp_finish_decl): Handle =default and =delete for
351 templates, too.
352
353 2008-12-01 Jakub Jelinek <jakub@redhat.com>
354
355 PR c++/38257
356 * parser.c (cp_parser_omp_for_loop): Handle auto.
357 * pt.c (tsubst_omp_for_iterator): Likewise.
358
359 2008-11-28 Jason Merrill <jason@redhat.com>
360
361 PR c++/38233
362 * init.c (perform_member_init): Fix value-initialization.
363 (build_value_init_1): Add assert to catch cases that will break
364 in the gimplifier.
365 (build_default_init): Remove.
366 * cp-tree.h: Remove its prototype.
367 * pt.c (tsubst_expr) [DECL_EXPR]: Use build_value_init for
368 value-initialization.
369
370 PR c++/38278
371 * parser.c (cp_parser_class_name): Only call
372 maybe_note_name_used_in_class if we actually found a class name.
373
374 2008-11-25 Jason Merrill <jason@redhat.com>
375
376 PR c++/28743
377 * decl2.c (check_classfn): Error rather than abort on parameter
378 list mismatch.
379
380 2008-11-20 Jason Merrill <jason@redhat.com>
381
382 PR c++/28513
383 * parser.c (cp_parser_class_name): Call maybe_note_name_used_in_class.
384
385 PR c++/37540
386 * call.c (build_over_call): Take the address of the function even
387 in a template.
388 (build_new_method_call): Remember the type of the called function
389 in a template.
390
391 2008-11-19 Dodji Seketeli <dodji@redhat.com>
392
393 PR c++/37142
394 * pt.c (coerce_template_template_parm): Use the more robust
395 uses_template_parms instead of dependent_type_p.
396
397 2008-11-19 Dodji Seketeli <dodji@redhat.com>
398
399 PR c++/35405
400 * pt.c (lookup_template_class): Check pointers before dereferencing
401 them.
402 * error.c (dump_template_decl): Likewise.
403
404 2008-11-19 Jason Merrill <jason@redhat.com>
405
406 PR c++/36410
407 * decl2.c (grokfield): Pass ATTR_FLAG_TYPE_IN_PLACE for a typedef
408 that names a class for linkage purposes.
409
410 PR c++/37563
411 * parser.c (cp_parser_pseudo_destructor_name): A pseudo-destructor
412 name is not a declaration.
413
414 PR c++/37256
415 * pt.c (instantiate_decl): Don't require a definition of
416 a template that is explicitly instantiated 'extern'.
417
418 2008-11-18 Jason Merrill <jason@redhat.com>
419 Jakub Jelinek <jakub@redhat.com>
420
421 PR c++/37962
422 * parser.c (cp_parser_type_id): Complain about auto.
423 * decl.c (grokdeclarator): Complain about parameters and
424 conversion functions declared with auto.
425
426 * call.c (standard_conversion): Use CLASS_TYPE_P instead of
427 MAYBE_CLASS_TYPE_P.
428 * cp-tree.h (TYPE_NON_AGGREGATE_CLASS): Likewise.
429
430 2008-11-17 Jakub Jelinek <jakub@redhat.com>
431
432 PR c++/36089
433 * init.c (constant_value_1): Handle TREE_LIST init.
434
435 2008-11-15 Jakub Jelinek <jakub@redhat.com>
436
437 PR c++/37561
438 * typeck.c (cp_build_unary_op): Don't call get_unwidened. Use
439 argtype instead of result_type.
440
441 2008-11-14 Jason Merrill <jason@redhat.com>
442
443 PR c++/38030
444 * semantics.c (finish_call_expr): Don't repeat arg-dep lookup
445 for a non-dependent call.
446
447 PR c++/37740
448 * call.c (build_aggr_conv): Increment i.
449
450 2008-11-13 Jason Merrill <jason@redhat.com>
451
452 PR c++/37932
453 * typeck2.c (process_init_constructor_record): Update bitfield
454 handling.
455 (check_narrowing): Update bitfield handling, print source type.
456
457 2008-11-12 Jakub Jelinek <jakub@redhat.com>
458
459 PR c++/36478
460 Revert:
461 2007-05-07 Mike Stump <mrs@apple.com>
462 * parser.c (check_empty_body): Add.
463 (cp_parser_iteration_statement): Add call to check_empty_body.
464
465 2008-11-12 Jason Merrill <jason@redhat.com>
466
467 PR c++/38007
468 * typeck.c (cp_build_modify_expr): Update bitfield handling.
469
470 2008-11-12 Jakub Jelinek <jakub@redhat.com>
471
472 PR c++/34269
473 * parser.c (cp_parser_simple_declaration): Don't commit
474 to tentative parse if parse errors were seen.
475
476 PR c++/35334
477 * error.c (dump_expr): Handle COMPLEX_EXPR.
478
479 2008-11-10 Jakub Jelinek <jakub@redhat.com>
480
481 PR c++/38021
482 * parser.c (cp_parser_enum_specifier): After parsing :,
483 parse definitely. Don't return early if type specifier
484 is erroneous.
485
486 2008-11-06 David Edelsohn <edelsohn@gnu.org>
487
488 PR target/26397
489 * g++spec.c (LIBSTDCXX_STATIC): New.
490 (lang_spec_driver): Use LIBSTDCXX_STATIC when not
491 shared_libgcc.
492
493 2008-11-05 Fabien Chene <fabien.chene@gmail.com>
494
495 PR c++/32519
496 * cp-tree.h: Fix DECL_NONSTATIC_MEMBER_P to handle member template
497 functions.
498
499 2008-11-05 Richard Guenther <rguenther@suse.de>
500
501 PR middle-end/37742
502 * decl.c (start_preparsed_function): Use the correct type for
503 building the RESULT_DECL.
504
505 2008-10-31 Jakub Jelinek <jakub@redhat.com>
506
507 PR c++/37967
508 * decl.c (grokdeclarator): Diagnose auto function decl without
509 late return type and late return type function decl where type
510 is not auto.
511
512 PR c++/37965
513 * decl.c (cp_finish_decl): Diagnose type_uses_auto type with
514 no initializer.
515
516 2008-10-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
517
518 PR 11492
519 * class.c (check_bitfield_decl): Rename min_precision to
520 tree_int_cst_min_precision.
521 * decl.c (finish_enum): Likewise.
522
523 2008-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
524
525 PR c++/26997
526 * parser.c (cp_parser_token_starts_cast_expression): New.
527 (cp_parser_cast_expression): Peek the next token to decide whether
528 this could be a parenthesized constructor or is definitely an
529 actual cast.
530
531 2008-10-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
532
533 PR c/7543
534 * typeck.c (build_x_binary_op): Update call to
535 warn_about_parentheses.
536 * parser.c (cp_parser_binary_expression): Add note about passing
537 the correct code for unary expressions.
538
539 2008-10-24 Jakub Jelinek <jakub@redhat.com>
540
541 * Make-lang.in (check-c++-subtargets): New alias for
542 check-g++-subtargets.
543 (lang_checks_parallelized): Add check-g++.
544 (check_g++_parallelize): New variable.
545
546 2008-10-21 Richard Guenther <rguenther@suse.de>
547
548 * semantics.c (simplify_aggr_init_exprs_r): Remove.
549 (expand_or_defer_fn): Do not walk the function body to
550 simplify aggr_init_exprs.
551
552 2008-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
553
554 PR c++/37004
555 * typeck.c (cp_common_type): New. The same as
556 type_after_usual_arithmetic_conversions but without promotions.
557 (type_after_usual_arithmetic_conversions): Do the promotions and
558 call cp_common_type.
559 (common_type): Make it behave like the C version of this
560 function. Do not handle pointer types.
561 (common_pointer_type): Move handling of pointer types from
562 common_type to here.
563 (cp_build_binary_op): Use common_pointer_type instead of
564 common_type in call to pointer_diff.
565 Use cp_common_type instead of common_type.
566 * cp-tree.h (common_pointer_type): Declare.
567
568 2008-10-14 Jakub Jelinek <jakub@redhat.com>
569
570 PR c++/37819
571 * cp-gimplify.c (cp_genericize_r): Only fold_convert COND_EXPR
572 arguments if they don't already have COND_EXPR's type.
573
574 2008-10-14 Paolo Carlini <paolo.carlini@oracle.com>
575
576 PR c++/37650
577 * pt.c (push_template_decl_real): Check that current_template_parms
578 is not null.
579 (process_partial_specialization): Assert current_template_parms not
580 null.
581
582 2008-10-13 Doug Evans <dje@google.com>
583
584 * cp-tree.h (DECL_MAIN_P): Fix parentheses around expression.
585
586 2008-10-10 Jakub Jelinek <jakub@redhat.com>
587
588 PR c++/37146
589 * cp-gimplify.c (cp_genericize_r): Fix up bitfield operands of
590 COND_EXPR.
591
592 2008-10-09 Jakub Jelinek <jakub@redhat.com>
593
594 PR c++/37568
595 * semantics.c (finalize_nrv_r): Clear DECL_INITIAL instead of
596 setting it to error_mark_node.
597
598 2008-10-07 Steve Ellcey <sje@cup.hp.com>
599
600 * decl.c (start_cleanup_fn): Declare as inline.
601
602 2008-10-06 Jason Merrill <jason@redhat.com>
603
604 PR c++/37376, other mangling issues
605 * mangle.c (write_type): Update TYPE_PACK_EXPANSION mangling.
606 (write_member_name): Break out from...
607 (write_expression): ...here. Handle dependent COMPONENT_REF.
608 (write_template_arg): Wrap an argument pack in 'I'/'E'.
609 (write_builtin_type): Update char16/32_t mangling.
610 (write_nested_name, write_prefix): Don't forget template args
611 for typename types.
612 * operators.def: Add ARROW_EXPR, update COMPONENT_REF and
613 EXPR_PACK_EXPANSION.
614
615 2008-10-06 Aldy Hernandez <aldyh@redhat.com>
616
617 * typeck.c (build_x_indirect_ref): Add location argument.
618 (cp_build_binary_op): Pass location to warn_for_div_by_zero.
619 (cp_build_unary_op): Add location argument.
620 (cp_build_modify_expr): Same.
621 * class.c (build_base_path): Pass location to build_indirect_ref.
622 * semantics.c (handle_omp_for_class_iterator): Pass elocus to
623 build_modify_expr.
624
625 2008-10-05 Dodji Seketeli <dodji@redhat.com>
626
627 PR c++/37410
628 * cp-gimplify.c (cp_gimplify_expr): For each USING_STMT
629 make sure an IMPORTED_DECL node is added to the BLOCK_VARS list
630 of the innermost containing BLOCK.
631
632 2008-10-03 Paolo Carlini <paolo.carlini@oracle.com>
633
634 PR c++/37719
635 * error.c (dump_function_decl): Save the exceptions in case of
636 error about incompatible specifications in a specialization.
637
638 2008-10-01 Andrew Pinski <andrew_pinski@playstation.sony.com>
639
640 * tree.c (lvalue_p_1): COMPOUND_LITERAL_EXPR is also an lvalue.
641
642 2008-09-30 H.J. Lu <hongjiu.lu@intel.com>
643
644 PR c++/37683
645 * parser.c (cp_parser_selection_statement): Fix uninitialized
646 variable.
647
648 2008-09-30 Simon Martin <simartin@users.sourceforge.net>
649
650 PR c++/37555
651 PR c++/37556
652 * decl.c (grokdeclarator): Set the type for typedefs to a
653 nested-name-specifier to error_mark_node.
654
655 2008-09-30 Paolo Bonzini <bonzini@gnu.org>
656
657 * parser.c (cp_parser_selection_statement): Implement here the
658 -Wempty-body warning for `if' and `else' statements.
659 * semantics.c (finish_if_stmt): Do not call empty_body_warning.
660
661 2008-09-25 Paolo Carlini <paolo.carlini@oracle.com>
662
663 PR c++/37649
664 * name-lookup.c (maybe_process_template_type_declaration): Check
665 return value of push_template_decl_real for error_mark_node.
666
667 2008-09-24 Aldy Hernandez <aldyh@redhat.com>
668
669 * semantics.c (finish_fname): Pass location to fname_decl.
670
671 2008-09-23 Jakub Jelinek <jakub@redhat.com>
672
673 PR c++/37533
674 * semantics.c (finish_omp_for): If processing_template_decl, just build
675 MODIFY_EXPR for init instead of calling cp_build_modify_expr.
676
677 2008-09-23 Aldy Hernandez <aldyh@redhat.com>
678
679 * typeck.c (build_array_ref): Pass location to cp_build_binary_op.
680 (get_member_function_from_ptrfunc): Same.
681 (build_x_binary_op): Same.
682 (build_binary_op): Same.
683 (cp_build_binary_op): New location argument.
684 (pointer_diff): Pass location to cp_build_binary_op.
685 (cp_truthvalue_conversion): Pass location to build_binary_op.
686 (convert_ptrmem): Pass location to cp_build_binary_op.
687 (cp_build_modify_expr): Same.
688 (build_ptrmemfunc): Same.
689 * init.c (expand_cleanup_for_base): Pass location to
690 c_common_truthvalue_conversion.
691 (build_new_1): Pass location to cp_build_binary_op.
692 (build_vec_delete_1): Pass location to *build_binary_op,
693 c_common_truthvalue_conversion.
694 (build_vec_init): Same.
695 (build_delete): Same.
696 * decl.c (compute_array_index_type): Same.
697 * call.c (build_new_op): Same.
698 * rtti.c (build_dynamic_cast_1): Same.
699 * cp-tree.h: Add argument to cp_build_binary_op.
700 * semantics.c (handle_omp_for_class_iterator): Pass location to
701 *build_binary_op, c_common_truthvalue_conversion.
702 * decl2.c (get_guard_cond): Same.
703
704 2008-09-17 Richard Guenther <rguenther@suse.de>
705
706 PR c++/22374
707 * rtti.c (build_dynamic_cast_1): Convert the COND_EXPR
708 result to the correct type.
709
710 2008-09-17 H.J. Lu <hongjiu.lu@intel.com>
711
712 PR c++/37450
713 * name-lookup.c (pushdecl_maybe_friend): Don't return the old
714 parameter for duplicate.
715
716 2008-09-17 Jason Merrill <jason@redhat.com>
717
718 PR c++/37588
719 * name-lookup.c (lookup_type_scope): Look through sk_function_parms.
720
721 2008-09-17 Jakub Jelinek <jakub@redhat.com>
722
723 PR c++/37552
724 * typeck.c (build_array_ref): Use protected_set_expr_location instead
725 of SET_EXPR_LOCATION when ret might not be an expression.
726
727 2008-09-17 Jan Hubicka <jh@suse.cz>
728
729 PR c++/18071
730 * cp/decl.c (start_method): Set DECL_NO_INLINE_WARNING_P.
731
732 2008-09-16 Jakub Jelinek <jakub@redhat.com>
733
734 PR c++/37531
735 * semantics.c (finish_compound_literal): Return error_mark_node if
736 type is errorneous.
737
738 PR c++/37532
739 * lex.c (init_reswords): Don't populate ridpointers for D_CONLY
740 reserved words.
741
742 2008-09-15 Aldy Hernandez <aldyh@redhat.com>
743
744 * decl.c (duplicate_decls): Call error_at.
745 (grokfndecl): New location argument. Use location if available.
746 (grokdeclarator): Pass declarator location to grokfndecl.
747 * cp-tree.h (struct cp_declarator): Update comment for id_loc.
748 * decl2.c (check_classfn): Use error_at.
749 * parser.c (cp_parser_init_declarator): Set function_start_locus
750 to brace location.
751 (cp_parser_member_declaration): Set id_loc for function declarators.
752
753 2008-09-09 Jan Hubicka <jh@suse.cz>
754
755 PR middle-end/37500
756 * pt.c (tsubst_decl): Do not copy DECL_STRUCT_FUNCTION pointer.
757
758 2008-09-09 Jakub Jelinek <jakub@redhat.com>
759
760 PR c++/37417
761 * tree.c (array_type_nelts_top): Add size_one_node instead of
762 integer_one_node.
763
764 2008-09-09 Jason Merrill <jason@redhat.com>
765
766 PR c++/37439
767 * pt.c (tsubst_copy) [PARM_DECL]: Don't abort if the parm has
768 DECL_CONTEXT set.
769
770 2008-09-09 Jakub Jelinek <jakub@redhat.com>
771
772 PR c++/37389
773 * decl.c (build_enumerator): Handle previous value's DECL_INITIAL
774 being error_operand_p. Don't clear value if it was error_mark_node.
775
776 2008-09-09 Paolo Bonzini <bonzini@gnu.org>
777
778 * cp-objcp-common.h (LANG_HOOKS_EXPAND_DECL): Remove.
779 * cp-tree.h: Don't mention DECL_ANON_UNION_ELEMS.
780 * semantics.c (anon_aggr_type_p): Remove.
781
782 2008-09-06 Jason Merrill <jason@redhat.com>
783
784 PR c++/37302
785 * parser.c (cp_parser_parameter_declaration_list): Process the
786 PARM_DECLs as we go and push them. Return a TREE_LIST.
787 (cp_parser_parameter_declaration_clause): Return a TREE_LIST.
788 (cp_parser_direct_declarator): Create a binding level and
789 suppress deprecated warnings in the parameter list.
790 (make_call_declarator): PARMS is now a tree.
791 * cp-tree.h (struct cp_declarator): Function parms are now a tree.
792 * decl.h (enum deprecated_states, deprecated_state): Move here.
793 * decl.c: From here.
794 (type_is_deprecated): New fn.
795 (grokparms): PARMLIST is a tree now. Warn about parms that
796 use deprecated types.
797 * mangle.c (write_expression): Handle PARM_DECL, CALL_EXPR and
798 0-operand cast.
799 * pt.c (tsubst) [DECLTYPE_TYPE]: Set skip_evaluation.
800 (tsubst_copy) [PARM_DECL]: Handle a PARM_DECL used outside of a
801 function.
802 * name-lookup.c (pushtag): Look through function parameter scopes.
803 (pushdecl_maybe_friend): Don't set DECL_CONTEXT on a PARM_DECL
804 when we're parsing a function declarator.
805
806 2008-09-05 Douglas Gregor <doug.gregor@gmail.com>
807
808 PR c++/37342
809 * tree.c (cp_build_qualified_type_real): Deal with sharing of
810 TYPE_LANG_SPECIFIC in the canonical types of pointer-to-method
811 types.
812
813 2008-09-04 Ian Lance Taylor <iant@google.com>
814
815 * parser.c (check_no_duplicate_clause): Change code parameter to
816 enum omp_clause_code.
817
818 2008-09-03 Jakub Jelinek <jakub@redhat.com>
819
820 PR c++/37348
821 * decl.c (cp_finish_decl): Only set
822 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P if decl is VAR_DECL.
823
824 PR c++/37189
825 * cp-tree.h (defer_mark_used_calls, deferred_mark_used_calls): New
826 extern decls.
827 * decl2.c (mark_used): If defer_mark_used_calls, push decl into
828 deferred_mark_used_calls vector and exit early.
829 * decl.c (defer_mark_used_calls, deferred_mark_used_calls): New
830 variables.
831 (finish_function): Set defer_mark_used_calls for the duration of the
832 function. Call mark_used on any queued decls.
833
834 2008-09-02 Jason Merrill <jason@redhat.com>
835
836 PR c++/37208
837 * call.c (build_over_call): Make =delete work with SFINAE.
838 * class.c (resolve_address_of_overloaded_function): Likewise.
839
840 * cp-tree.h (struct lang_decl_flags): Rename threadprivate_p to
841 threadprivate_or_deleted_p.
842 (CP_DECL_THREADPRIVATE_P): Adjust.
843 (DECL_DELETED_FN): Likewise.
844 (SD_UNINITIALIZED, SD_INITIALIZED, SD_DEFAULTED): New macros.
845 (SD_DELETED): New macro.
846 * parser.c (cp_parser_init_declarator): Use them.
847 * decl.c (start_decl): Use them.
848
849 * decl2.c (mark_used): Give =deleted error even in sizeof.
850
851 * typeck2.c (check_narrowing): Downgrade narrowing error to
852 permerror.
853
854 2008-09-02 Aldy Hernandez <aldyh@redhat.com>
855
856 * typeck.c (build_array_ref): Use new location argument.
857 * class.c (build_vtbl_ref_1): Pass location to build_array_ref.
858 * call.c (build_new_op): Same.
859 * decl2.c (grok_array_decl): Same.
860 * cp-tree.h (build_array_ref): Add location argument to prototype.
861
862 2008-09-01 Aldy Hernandez <aldyh@redhat.com>
863
864 * typeck.c (build_x_indirect_ref): Add location argument.
865 * class.c (build_base_path): Pass location to build_indirect_ref.
866 * pt.c (tsubst_copy_and_build): Pass location to
867 finish_label_address_expr.
868 * parser.c (cp_parser_unary_expression): Same.
869
870 2008-08-31 Jason Merrill <jason@redhat.com>
871
872 Implement late-specified return type using 'auto'.
873 * cp-tree.h (struct cp_declarator): Add late_return_type field to
874 function declarator.
875 * parser.c (cp_parser_late_return_type_opt): New fn.
876 (cp_parser_direct_declarator): Use it.
877 (make_call_declarator): Put it in the declarator.
878 * decl.c (grokdeclarator): Splice in late-specified return type.
879 * pt.c (splice_late_return_type): New fn.
880
881 2008-08-29 Michael Meissner <gnu@the-meissners.org>
882
883 * decl.c (builtin_function_1): Take a bool argument to decide
884 whether to use pushdecl or pushdecl_top_level.
885 (duplicate_decls): Copy function specific target and optimization
886 options on duplicate declarations.
887 (cxx_builtin_function): Update builtin_function_1 call.
888 (cxx_builtin_function_ext_scope): New function, guarantee that the
889 declaration is done at global scope.
890
891 * cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE): New
892 macro, define builtin function hook for delayed machine specific
893 builtins.
894
895 * cp-tree.h (cxx_builtin_function_ext_scope): Add declaration.
896
897 2008-08-30 Jason Merrill <jason@redhat.com>
898
899 PR c++/37288
900 * pt.c (dependent_type_p): Don't abort on auto outside of a template.
901
902 2008-08-29 Jason Merrill <jason@redhat.com>
903
904 Implement C++0x 'auto' semantics.
905 * decl.c (start_decl_1): Don't complain about auto being incomplete.
906 (cp_finish_decl): Deduce auto.
907 * init.c (build_new): Handle 'new auto'.
908 * typeck2.c (cxx_incomplete_type_diagnostic): Give a different
909 message for auto than for normal template type parms.
910 * pt.c (type_dependent_expression_p): Handle { }.
911 (make_auto): New function.
912 (listify_autos): New function.
913 (do_auto_deduction): New function.
914 (is_auto): New function.
915 (type_uses_auto): New function.
916 * cp-tree.h: Declare them.
917 * parser.c (cp_parser_decl_specifier_seq): In C++0x mode, don't
918 treat auto as a declspec.
919 (cp_parser_simple_type_specifier): It's a type-specifier.
920
921 2008-08-29 Mark Mitchell <mark@codesourcery.com>
922
923 * mangle.c (write_type): Add target-specific manglings for
924 non-fundamental types to the substitution table.
925 gcc/testsuite/
926
927 2008-08-29 Jakub Jelinek <jakub@redhat.com>
928
929 PR fortran/29635
930 PR fortran/23057
931 * name-lookup.c (do_using_directive, cp_emit_debug_info_for_using):
932 Adjust debug_hooks->imported_module_or_decl callers.
933
934 2008-08-29 Jan Hubicka <jh@suse.cz>
935
936 * cp-gimplify.c (cp_gimplify_expr): Add PRED_CONTINUE heuristic.
937
938 2008-08-28 Paolo Carlini <paolo.carlini@oracle.com>
939
940 PR c++/37260
941 * decl.c (reshape_init_r): Check init for error_mark_node.
942
943 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
944
945 PR c++/17880
946 * semantics.c (maybe_convert_cond): Call verify_sequence_points.
947 (finish_return_stmt): Likewise.
948 (finish_switch_condition): Likewise.
949
950 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
951
952 * cp-tree.h: Fix #error directive.
953
954 2008-08-26 Douglas Gregor <doug.gregor@gmail.com>
955
956 * typeck.c (type_after_usual_arithmetic_conversions): Don't do the
957 usual arithmetic conversions on scoped enumeration types.
958 (common_type): Ditto.
959 (default_conversion): Don't perform integral promotions on scoped
960 enumeration types.
961 (build_array_ref): Scoped enumeration types can't be used as
962 subscripts.
963 * decl.c (start_enum): If building a C++0x scoped enumeration,
964 enter its scope. If provided with an underlying type, check that
965 underlying type and set up the enumeration type accordingly.
966 (finish_enum): Only compute an underlying type if the underlying
967 type isn't already fixed, and only convert the enumerator values
968 now if we've just computed the underlying type. Finish the scope
969 of C++0x scoped enumerations.
970 (build_enumerator): For enumerations with a fixed underlying type,
971 check the enumerator values when the enumerator is defined.
972 (lookup_enumerator): New.
973 * call.c (standard_conversion): Don't allow assignment from
974 integers to scoped enumeration types, even with -fpermissive.
975 Don't convert from scoped enumerations to bool or any arithmetic
976 types.
977 (build_conditional_expr): Don't per the usual arithmetic
978 conversions for scoped enumeration types.
979 (convert_like_real): Check complain to see if we should
980 produce warnings.
981 * error.c (class_key_or_enum_as_string): Print scoped enums.
982 * cp-tree.h (MAYBE_CLASS_TYPE_P): Check CLASS_TYPE_P, not
983 TYPE_LANG_FLAG_5.
984 (INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P): New.
985 (SCOPED_ENUM_P): New.
986 (UNSCOPED_ENUM_P): New.
987 (SET_SCOPED_ENUM_P): New.
988 (ENUM_UNDERLYING_TYPE): New.
989 * pt.c (lookup_template_class): Update the instantiation of enum
990 types to deal with C++0x scoped enumerations and underlying
991 types.
992 * name-lookup.c (begin_scope): Deal with scoped enumeration
993 scopes.
994 (lookup_qualified_name): Deal with lookup into enumeration types.
995 * name-lookup.h (enum scope_kind): Add sk_scoped_enum.
996 * parser.c (cp_parser_class_or_namespace_name): Rename to...
997 (cp_parser_qualifying_entity): ... this. Also, in C++0x mode,
998 parse a type-name that can be an enumeration type.
999 (cp_parser_nested_name_specifier_opt): Update with C++0x grammar.
1000 (cp_parser_elaborated_type_specifier): Parse the
1001 optional `struct' or `class' following enum (in C++0x).
1002 (cp_parser_enum_specifier): Parse C++0x scoped enumerations and
1003 enum-base clauses.
1004
1005 2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1006
1007 * typeck.c: Update all calls to pedwarn.
1008 * decl.c: Likewise.
1009 * call.c: Likewise.
1010 * error.c: Likewise.
1011 * pt.c: Likewise.
1012 * name-lookup.c: Likewise.
1013 * parser.c: Likewise.
1014
1015 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1016
1017 PR c++/35158
1018 * parser.c (cp_parser_omp_for_loop): Handle parenthesized
1019 initializers.
1020
1021 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1022
1023 * parser.c: Update all calls to inform.
1024 * typeck.c: Likewise.
1025 * init.c: Likewise.
1026 * class.c: Likewise.
1027 * call.c: Likewise.
1028 * method.c: Likewise.
1029 * friend.c: Likewise.
1030 * typeck2.c: Likewise.
1031 * pt.c: Likewise.
1032 * name-lookup.c: Likewise.
1033 * lex.c: Likewise.
1034
1035 2008-08-19 Jakub Jelinek <jakub@redhat.com>
1036
1037 PR debug/37156
1038 * error.c (cp_print_error_function): Deal with recursive BLOCK trees.
1039
1040 2008-08-18 Tomas Bily <tbily@suse.cz>
1041
1042 * tree.c (cp_tree_equal): Use CONVERT_EXPR_CODE_P.
1043
1044 2008-08-18 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1045
1046 * typeck.c: Update all callers of permerror.
1047 * init.c: Likewise.
1048 * class.c: Likewise.
1049 * decl.c: Likewise.
1050 * call.c: Likewise.
1051 * except.c: Likewise.
1052 * cvt.c: Likewise.
1053 * typeck2.c: Likewise.
1054 * pt.c: Likewise.
1055 * semantics.c: Likewise.
1056 * name-lookup.c: Likewise.
1057 * lex.c: Likewise.
1058 * decl2.c: Likewise.
1059 * parser.c: Likewise.
1060
1061 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1062
1063 PR c++/34485
1064 * pt.c (check_template_shadow): Change to return a bool.
1065 * name-lookup.c (push_class_level_binding): Early return if
1066 check_template_shadow returns false.
1067 * cp-tree.h (check_template_shadow): Adjust declaration.
1068
1069 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1070
1071 PR c++/34600
1072 * decl.c (grokdeclarator): In case of extern and initializer, return
1073 error_mark_node after the error.
1074
1075 2008-08-13 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1076
1077 PR 30551
1078 * decl.c (grokfndecl): Call check_main_parameters_type only if
1079 -Wmain.
1080
1081 2008-08-12 Paolo Carlini <paolo.carlini@oracle.com>
1082
1083 PR c++/37087
1084 * parser.c (cp_parser_class_head): Early return error_mark_node in
1085 case of global qualification of class name or qualified name that
1086 does not name a class.
1087
1088 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1089
1090 PR c++/12242
1091 * cvt.c (ocp_convert): Warn for out-of-range conversions to enum.
1092
1093 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1094
1095 PR 36901
1096 * cp-tree.h (struct diagnostic_context, struct diagnostic_info):
1097 Delete forward declarations. Check that toplev.h has not been
1098 included before this file. Include toplev.h and diagnostic.h.
1099 * error.c (cp_cpp_error): Use DK_PEDWARN.
1100 (cxx_incomplete_type_diagnostic): Update declaration.
1101 (cxx_incomplete_type_error): Use DK_ERROR.
1102 * typeck2.c (cxx_incomplete_type_diagnostic): Take a diagnostic_t
1103 as argument. Use emit_diagnostic.
1104 (cxx_incomplete_type_error): Use DK_ERROR.
1105 (add_exception_specifier): Use diagnostic_t instead of custom
1106 codes.
1107 * typeck.c (complete_type_or_else): Update call to
1108 cxx_incomplete_type_diagnostic.
1109 * init.c (build_delete): Likewise.
1110 * call.c (diagnostic_fn_t): Remove unused typedef.
1111 (build_temp): Pass a pointer to diagnostic_t.
1112 (convert_like_real): Use emit_diagnostic.
1113 (joust): Check return value of warning before giving informative
1114 note.
1115 * friend.c (do_friend): Check return value of warning
1116 before giving informative note.
1117 * parser.c (cp_parser_template_id): Likewise.
1118
1119 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1120
1121 PR 7651
1122 * class.c (check_bases_and_members): Warn with -Wuninitialized
1123 instead of -Wextra.
1124
1125 2008-08-08 Volker Reichelt <v.reichelt@netcologne.de>
1126
1127 PR c++/35985
1128 * decl.c (xref_basetypes): Check base for MAYBE_CLASS_TYPE_P,
1129 and make sure it is not a union.
1130
1131 2008-08-07 H.J. Lu <hongjiu.lu@intel.com>
1132
1133 * semantics.c (finish_decltype_type): Initialize type.
1134
1135 2008-08-07 Douglas Gregor <doug.gregor@gmail.com>
1136
1137 * semantics.c (finish_decltype_type): Handle calls to function
1138 pointers and references to functions properly.
1139
1140 2008-08-06 Douglas Gregor <doug.gregor@gmail.com>
1141
1142 PR c++/36460
1143 * parser.c (cp_parser_template_argument): Don't assume that '>>'
1144 following a type-id is an error when in C++0x mode.
1145
1146 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1147
1148 PR 26785
1149 * decl.c (grokdeclarator): Use explicit location with permerror_at.
1150
1151 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1152
1153 PR 8715
1154 * typeck.c (cp_build_binary_op): Move code to c-common.c.
1155
1156 2008-08-05 Jason Merrill <jason@redhat.com>
1157
1158 PR c++/37016
1159 * decl.c (build_ptrmemfunc_type): Don't require structural
1160 comparison of PMF types.
1161 * tree.c (cp_build_qualified_type_real): Don't clear
1162 a valid TYPE_PTRMEMFUNC_TYPE.
1163 * typeck.c (cp_build_unary_op): Still do build_ptrmemfunc in
1164 templates.
1165
1166 2008-08-04 Jason Merrill <jason@redhat.com>
1167
1168 PR c++/36963
1169 * typeck2.c (check_narrowing): Allow narrowing conversion
1170 from an explicit floating-point constant.
1171
1172 PR c++/37006
1173 * pt.c (tsubst_decl): Leave DECL_INITIAL set on deleted
1174 instantiations.
1175
1176 2008-08-04 Simon Baldwin <simonb@google.com>
1177
1178 PR c++/36999
1179 * parser.c (cp_parser_elaborated_type_specifier): Warn only when
1180 the declaration's id is followed by a semicolon.
1181
1182 2008-07-31 Jakub Jelinek <jakub@redhat.com>
1183
1184 PR c++/36405
1185 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Call
1186 complete_type_or_else even for UNKNOWN_TYPE to get diagnostics.
1187
1188 2008-07-31 Jason Merrill <jason@redhat.com>
1189
1190 PR c++/36633
1191 * init.c (build_new_1): Don't convert pointer to the data type
1192 until we're actually going to treat it as that type.
1193
1194 PR c++/11309
1195 * tree.c (build_aggr_init_expr): Split out...
1196 (build_cplus_new): ...from here.
1197 (stabilize_init): Don't mess with AGGR_INIT_EXPR either.
1198 * init.c (build_new_1): new T() means value-initialization,
1199 not default-initialization.
1200 (build_vec_init): Likewise.
1201 (build_value_init_1): Use build_aggr_init_expr.
1202
1203 2008-07-30 Dodji Seketeli <dseketel@redhat.com>
1204
1205 PR c++/36767
1206 * decl2.c (fix_temporary_vars_context_r): New function.
1207 (one_static_initialization_or_destruction): Make sure temporary
1208 variables part of the initialiser have their DECL_CONTEXT()
1209 properly set.
1210
1211 2008-07-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1212
1213 PR 34389
1214 * typeck.c (build_binary_op): Encapsulate code into
1215 shorten_binary_op.
1216
1217 2008-07-29 Jakub Jelinek <jakub@redhat.com>
1218
1219 PR c++/36852
1220 * tree.c (cplus_array_hash, build_cplus_array_type_1): Hash on
1221 TYPE_UID instead of pointers.
1222
1223 2008-07-29 Jan Hubicka <jh@suse.cz>
1224
1225 * optimize.c (maybe_clone_body): Remove DECL_INLINE.
1226 * decl.c (duplicate_decls): Likewise.
1227 (grokfndecl): Likewise.
1228 (start_method): Likewise.
1229 * method.c (make_thunk, make_alias_for, implicitly_declare_fn):
1230 Likewise.
1231 * pt.c (register_specialization, regenerate_decl_from_template):
1232 Likewise.
1233 * decl2.c (grokfield): Likewise.
1234
1235 2008-07-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1236
1237 PR 34985
1238 * decl.c (duplicate_decls): Merge USED flags.
1239
1240 2008-07-27 Jason Merrill <jason@redhat.com>
1241
1242 PR c++/36943
1243 * decl.c (reshape_init_r): Allow C++0x initializer lists.
1244
1245 2008-07-28 Richard Guenther <rguenther@suse.de>
1246
1247 Merge from gimple-tuples-branch.
1248
1249 2008-07-22 Aldy Hernandez <aldyh@redhat.com>
1250
1251 * cp-gimplify.c (gimplify_if_stmt): Set location on newly created
1252 COND_EXPR.
1253
1254 2008-07-18 Jakub Jelinek <jakub@redhat.com>
1255
1256 * decl.c (finish_function): Call gimple_body after cp_genericize.
1257
1258 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
1259
1260 * optimize.c: Include gimple.h instead of tree-gimple.h.
1261 * Make-lang.in (cp-gimplify.o): Depend on tree-iterator.h.
1262 * cp-gimplify.c: Rename tree-gimple.h to gimple.h. Include
1263 tree-iterator.h.
1264
1265 2008-07-16 Jakub Jelinek <jakub@redhat.com>
1266
1267 * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE for the clone.
1268
1269 2008-07-14 Jakub Jelinek <jakub@redhat.com>
1270
1271 * cp-gimplify.c (cp_gimplify_expr): Update comment.
1272
1273 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
1274
1275 * cp-tree.h (union lang_tree_node): Rename GENERIC_NEXT to
1276 TREE_CHAIN.
1277 * cp-gimplify.c (cxx_omp_clause_apply_fn): Rename
1278 GIMPLE_MODIFY_STMT to MODIFY_EXPR.
1279 (cxx_omp_clause_copy_ctor): Same.
1280 (cxx_omp_clause_assign_op): Same.
1281
1282 2008-05-28 Jakub Jelinek <jakub@redhat.com>
1283
1284 * cp-gimplify.c (cp_gimplify_omp_for): Add pre_p argument. Tuplify.
1285 (cp_gimplify_expr): Adjust caller.
1286
1287 2008-05-11 Doug Kwan <dougkwan@google.com>
1288
1289 * init.c (build_vec_delete): Add type conversion for argument
1290 0 of POINTER_PLUS_EXPR.
1291
1292 2008-04-29 Doug Kwan <dougkwan@google.com>
1293
1294 * decl2 (File): Include "gimple.h"
1295 (cp_write_global_declarations): Use gimple_body instead of
1296 DECL_SAVED_TREE.
1297 * Make-lang.in (cp/decl2.o): Add $(GIMPLE_H)
1298
1299 2008-04-10 Diego Novillo <dnovillo@google.com>
1300
1301 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00913.html
1302
1303 * optimize.c (maybe_clone_body): Re-enable call to
1304 clone_body.
1305 * cp-gimplify.c (cp_gimplify_omp_for): Mark disabled
1306 code with call to gimple_unreachable.
1307 (cp_genericize): Fix handling of clone bodies.
1308
1309 2008-04-04 Diego Novillo <dnovillo@google.com>
1310
1311 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00413.html
1312
1313 * optimize.c (maybe_clone_body): Re-enable.
1314
1315 2008-02-19 Diego Novillo <dnovillo@google.com>
1316 Oleg Ryjkov <olegr@google.com>
1317
1318 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
1319
1320 * cp-gimplify.c (gimplify_for_stmt): Change gimple_seq
1321 argument to gimple_seq *. Update all users.
1322 (gimplify_must_not_throw_expr): Likewise.
1323
1324 2008-02-04 Oleg Ryjkov <olegr@google.com>
1325
1326 * except.c: Include gimple.h
1327 (cp_protect_cleanup_actions): Convert to tuples.
1328 * Make-lang.in (cp/except.o): Add dependency on gimple.h
1329
1330 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
1331
1332 * cp-gimplify.c (gimplify_cp_loop): Call tree_annotate_all_with_locus
1333 instead of annotating each block manually.
1334
1335 2007-10-30 Aldy Hernandez <aldyh@redhat.com>
1336
1337 * cp-gimplify.c (gimplify_cp_loop): Tuplify.
1338 (gimplify_for_stmt): Same.
1339 (gimplify_switch_stmt): Same.
1340 (cp_gimplify_expr): [FOR_STMT]: Do not call gimplify_for_stmt. Return
1341 GS_OK.
1342 [WHILE_STMT]: Return GS_OK.
1343 [SWITCH_STMT]: Same.
1344 [CONTINUE_STMT]: Same.
1345 [BREAK_STMT]: Same.
1346 (cp_genericize): Set gimple_body() of cloned functions when needed.
1347
1348 2007-10-29 Aldy Hernandez <aldy@quesejoda.com>
1349
1350 * cp-gimplify.c: Move build_gimple_eh_filter_tree here.
1351 (cp_gimplify_init_expr): Convert to tuples.
1352 (gimplify_must_not_throw_expr): Make function return a
1353 gimplify_status and convert to tuples.
1354
1355 2007-10-18 Aldy Hernandez <aldy@quesejoda.com>
1356
1357 * cp-gimplify.c (genericize_try_block): Enable and do not call
1358 gimplify_stmt.
1359 (genericize_catch_block): Same.
1360 (genericize_eh_spec_block): Same.
1361 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
1362 (cp_gimplify_expr): Enable TRY_BLOCK, HANDLER, and EH_SPEC_BLOCK.
1363
1364 2007-10-16 Aldy Hernandez <aldy@quesejoda.com>
1365
1366 * optimize.c (maybe_clone_body): Comment out call to clone_body.
1367 * decl.c (finish_function): Use gimple_body instead of
1368 DECL_SAVED_TREE.
1369 * cp-tree.h (cp_gimplify_expr): Last 2 arguments are sequences.
1370 * cp-gimplify.c (genericize_try_block): Comment out.
1371 (genericize_catch_block): Same.
1372 (genericize_eh_spec_block): Same.
1373 (gimplify_cp_loop): Comment out calls to gimplify_stmt.
1374 (gimplify_for_stmt): Comment out.
1375 (gimplify_switch_stmt): Comment out call to gimplify_stmt.
1376 (cp_gimplify_omp_for): Same.
1377 (gimplify_must_not_throw_expr): Argument pre_p is a sequence.
1378 Comment out call to gimplify_stmt and append_to_statement_list.
1379 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
1380 (cp_gimplify_init_expr): Arguments pre_p and post_p are sequences.
1381 (cp_gimplify_expr): Same.
1382 Comment out calls to genericize_*_block. Comment out call to
1383 gimplify_for_stmt.
1384
1385 2008-07-27 H.J. Lu <hongjiu.lu@intel.com>
1386
1387 PR c++/36944
1388 * class.c (type_has_user_provided_default_constructor): Handle
1389 default parameters.
1390
1391 2008-07-27 Paolo Carlini <paolo.carlini@oracle.com>
1392
1393 * decl.c (push_library_fn): Add a parameter for the exceptions that
1394 the function may throw.
1395 (push_void_library_fn, push_throw_library_fn, expand_static_init):
1396 Adjust.
1397 (build_library_fn): Change to static.
1398 * cp-tree.h: Adjust declarations.
1399 * except.c (declare_nothrow_library_fn): New.
1400 (do_get_exception_ptr, do_begin_catch, do_free_exception,
1401 do_allocate_exception): Use the latter, adjust the declarations
1402 (ie, add empty exception-specification), consistently with the
1403 actual implementation in libsupc++.
1404
1405 2008-07-25 Jan Hubicka <jh@suse.cz>
1406
1407 * typeck.c (inline_conversion): Remove.
1408 (cp_build_function_call): Do not use inline_conversion.
1409 * decl.c (duplicate_decls): Do not insist on inline being declared
1410 early.
1411 (start_cleanup_fn): Do not assume that INLINE flags prevent function
1412 from being output. We now remove static functions always.
1413 (finish_function): Do return warning on all static functions.
1414 * call.c (build_over_call): Do not use inline_conversion.
1415 * cp-tree.h (possibly_inlined_p): Declare.
1416 (inline_conversion): Remove.
1417 * pt.c (instantiate_decl): Use possibly_inlined_p predicate.
1418 * decl2.c (cp_write_global_declarations): Likewise.
1419 (mark_used): Likewise.
1420 (possibly_inlined_p): New functions.
1421
1422 2008-07-25 Jason Merrill <jason@redhat.com>
1423
1424 * class.c (type_has_user_provided_default_constructor): Handle
1425 templates.
1426
1427 2008-07-23 Jan Hubicka <jh@suse.cz>
1428
1429 * decl.c (duplicate_decls): Update comment and unit-at-a-time.
1430 (grogfndecl): Drop flag_inline_trees code.
1431 * pt.c (instantiate_decl): Drop flag_iline_trees code.
1432 * lex.c (cxx_init): Do not set unit-at-a-time.
1433
1434 2008-07-23 Jason Merrill <jason@redhat.com>
1435
1436 * mangle.c (write_unqualified_name): Avoid infinite recursion when
1437 trying to mangle a decl with no name.
1438
1439 Implement defaulted/deleted functions as per N2346
1440 * cp-tree.h (struct lang_decl_flags): Add defaulted_p bitfield.
1441 (DECL_DELETED_FN): New macro.
1442 (DECL_DEFAULTED_FN): New macro.
1443 * class.c (user_provided_p): New fn.
1444 (defaultable_fn_p): New fn.
1445 (type_has_user_provided_constructor): New fn.
1446 (type_has_user_provided_default_constructor): New fn.
1447 (check_methods): A defaulted fn is still trivial.
1448 (check_bases_and_members): Likewise.
1449 * decl.c (grok_special_member_properties): Likewise.
1450 (duplicate_decls): Complain about redeclaring a function as deleted.
1451 (start_decl): initialized==2 means deleted.
1452 (cp_finish_decl): Handle deleted/defaulted semantics.
1453 * decl2.c (grokfield): Likewise.
1454 (mark_used): Check DECL_DEFAULTED_FN instead of DECL_ARTIFICIAL.
1455 Complain about using a deleted fn.
1456 * init.c (build_value_init_1): Use type_has_user_provided_constructor.
1457 (perform_member_init): Check for a user-provided default constructor
1458 even if TYPE_NEEDS_CONSTRUCTING.
1459 (build_new_1): Likewise.
1460 * call.c (build_over_call): Don't call mark_used twice.
1461 * method.c (implicitly_declare_fn): Set DECL_DEFAULTED_FN.
1462 * search.c (check_final_overrider): Check for deleted mismatch.
1463 * parser.c (cp_parser_init_declarator): Tell start_decl about =delete.
1464 (cp_parser_pure_specifier): Handle =default and =delete.
1465
1466 * error.c (maybe_warn_cpp0x): Suggest -std=gnu++0x as well.
1467
1468 2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1469
1470 PR 35058
1471 * typeck.c: All calls to pedwarn changed.
1472 * decl.c: All calls to pedwarn changed.
1473 * call.c: All calls to pedwarn changed.
1474 * error.c: All calls to pedwarn changed.
1475 * typeck2.c: All calls to pedwarn changed.
1476 * pt.c: All calls to pedwarn changed.
1477 * name-lookup.c: All calls to pedwarn changed.
1478 * parser.c: All calls to pedwarn changed.
1479
1480 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1481
1482 * call.c: Fix comment typos.
1483 * class.c: Likewise.
1484 * cp-tree.h: Likewise.
1485 * cxx-pretty-print.c: Likewise.
1486 * decl.c: Likewise.
1487 * init.c: Likewise.
1488 * name-lookup.c: Likewise.
1489 * operators.def: Likewise.
1490 * parser.c: Likewise.
1491 * pt.c: Likewise.
1492 * tree.c: Likewise.
1493 * typeck.c: Likewise.
1494
1495 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
1496
1497 PR c++/36871
1498 PR c++/36872
1499 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Only check
1500 copy constructors and copy assignment operators proper.
1501
1502 2008-07-21 Rafael Ávila de Espíndola <espindola@google.com>
1503
1504 * parser.c (cp_token): Remove in_system_header.
1505 (eof_token): Remove in_system_header.
1506 (cp_lexer_get_preprocessor_token): Don't set in_system_header.
1507 (cp_lexer_set_source_position_from_token): Don't set in_system_header.
1508 (cp_parser_member_declaration): Use in_system_header_at.
1509 * pt.c (lookup_template_class): Don't set DECL_IN_SYSTEM_HEADER.
1510 (pop_tinst_level): Don't set in_system_header.
1511 (instantiate_class_template): Don't set in_system_header.
1512 (instantiate_decl): Don't set in_system_header.
1513 (instantiate_pending_templates): Don't set in_system_header.
1514
1515 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
1516
1517 PR c++/36870
1518 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Use
1519 TYPE_NOTHROW_P, not TREE_NOTHROW.
1520 (trait_expr_value): Likewise.
1521
1522 2008-07-18 Dodji Seketeli <dseketel@redhat.com>
1523
1524 PR c++/36407
1525 * call.c (convert_like_real): Don't take the error code path
1526 when a rvalue or base conversion has the bad_p field set.
1527
1528 2008-07-18 Kris Van Hees <kris.van.hees@oracle.com>
1529
1530 * rtti.c (emit_support_tinfos): Add char16_type_node and
1531 char32_type_node.
1532 * typeck2.c (digest_init): Support char16_t and char32_t.
1533
1534 2008-07-18 Kavih R. Ghazi <ghazi@caip.rutgers.edu>
1535
1536 * cvt.c (convert_to_void): Avoid C++ keywords.
1537 * decl.c (walk_namespaces_r, wrapup_globals_for_namespace):
1538 Likewise.
1539 * friend.c (is_friend): Likewise.
1540 * init.c (perform_member_init): Likewise.
1541 * mangle.c (write_template_prefix, write_template_template_param):
1542 Likewise.
1543 * name-lookup.c (do_namespace_alias, do_using_directive,
1544 parse_using_directive, ambiguous_decl, arg_assoc): Likewise.
1545 * parser.c (cp_parser_template_id, cp_parser_namespace_definition,
1546 cp_parser_objc_typename, cp_parser_objc_method_keyword_params):
1547 Likewise.
1548 * pt.c (is_specialization_of_friend, lookup_template_class,
1549 push_tinst_level, instantiate_class_template,
1550 tsubst_copy_and_build): Likewise.
1551 * tree.c (add_stmt_to_compound): Likewise.
1552 * typeck.c (finish_class_member_access_expr): Likewise.
1553
1554 2008-07-17 Julian Brown <julian@codesourcery.com>
1555 Mark Mitchell <mark@codesourcery.com>
1556
1557 * decl2.c (determine_visibility): Allow target to override
1558 visibility of class data.
1559
1560 2008-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1561
1562 PR c++/36855
1563 * semantics.c (trait_expr_value): Update __has_trivial_destructor
1564 semantics to the current WP (N2691).
1565
1566 2008-07-16 Dodji Seketeli <dseketel@redhat.com>
1567
1568 PR c++/13699
1569 * name-lookup.c (lookup_extern_c_fun_binding_in_all_ns): New function.
1570 (pushdecl_maybe_friend): Check if a redeclaration of extern C function
1571 complies with exception specification constraints.
1572
1573 2008-07-14 Jason Merrill <jason@redhat.com>
1574
1575 * lex.c (init_reswords): Always set D_OBJC.
1576
1577 2008-07-11 Tom Tromey <tromey@redhat.com>
1578 Ian Lance Taylor <iant@google.com>
1579
1580 * lex.c (struct resword, reswords): Don't define.
1581 (D_EXT, D_ASM, D_OBJC, D_CXX0X): Don't define.
1582 (init_reswords): Clarify mask code. Use c_common_reswords rather
1583 than reswords.
1584
1585 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1586
1587 PR c++/13101
1588 * decl.c (grokdeclarator): Warn about initializing variables
1589 of storage class 'extern' only after the type of the declarator
1590 has been properly computed.
1591
1592 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1593
1594 PR c++/31754
1595 * cp-tree.h (struct cp_decl_specifier_seq): Add a location field. It
1596 carries the location of the primary type.
1597 * parser.c (cp_parser_check_type_definition): Update documentation.
1598 (cp_parser_check_for_definition_in_return_type,
1599 cp_parser_check_for_invalid_template_id,
1600 cp_parser_set_decl_spec_type,
1601 cp_parser_check_for_definition_in_return_type,
1602 cp_parser_diagnose_invalid_type_name,
1603 cp_parser_new_expression, cp_parser_explicit_instantiation,
1604 cp_parser_type_specifier, cp_parser_simple_type_specifier,
1605 cp_parser_omp_for_loop, cp_parser_pragma): Use location in error
1606 messages.
1607
1608 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1609
1610 PR c++/31754
1611 * pt.c, semantic.c:
1612 * semantic.c (qualified_name_lookup_error, finish_id_expression):
1613 Add a location_t parameter so that
1614 error message can have a more accurate location.
1615 * cp-tree.h: Updated prototype
1616 * pt.c (tsubst_qualified_id): Use location in error messages.
1617 * parser.c (cp_parser_postfix_expression,
1618 cp_parser_objc_statement, cp_parser_trait_expr,
1619 cp_parser_token_is_class_key,
1620 cp_parser_uncommitted_to_tentative_parse_p,
1621 cp_parser_check_for_invalid_template_id, cp_parser_is_string_literal,
1622 cp_parser_error, cp_parser_name_lookup_error,
1623 cp_parser_simulate_error, cp_parser_check_decl_spec,
1624 cp_parser_check_decl_spec, cp_parser_non_integral_constant_expression,
1625 cp_parser_diagnose_invalid_type_name,
1626 cp_parser_parse_and_diagnose_invalid_type_name,
1627 cp_parser_require_pragma_eol, cp_parser_make_typename_type,
1628 cp_parser_string_literal, cp_parser_primary_expression,
1629 cp_parser_primary_expression, cp_parser_unqualified_id,
1630 cp_parser_nested_name_specifier_opt, cp_parser_postfix_expression,
1631 cp_parser_postfix_dot_deref_expression, cp_parser_new_expression,
1632 cp_parser_direct_new_declarator, cp_parser_builtin_offsetof,
1633 cp_parser_label_for_labeled_statement, cp_parser_statement_seq_opt,
1634 cp_parser_jump_statement, cp_parser_block_declaration,
1635 cp_parser_simple_declaration, cp_parser_decl_specifier_seq,
1636 cp_parser_function_specifier_opt, cp_parser_decltype,
1637 cp_parser_mem_initializer_list, cp_parser_mem_initializer,
1638 cp_parser_mem_initializer_id, cp_parser_template_parameter,
1639 cp_parser_type_parameter, cp_parser_template_id,
1640 cp_parser_template_name, cp_parser_template_argument): Likewise.
1641
1642 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1643
1644 PR c++/36760
1645 * pt.c (tsubst_function_type): Remove warning for type qualifiers
1646 on function return type.
1647
1648 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1649
1650 PR c++/36760
1651 * pt.c (tsubst_function_type): Don't warn for type qualifiers
1652 on function return type in case of system header.
1653
1654 2008-07-09 Raksit Ashok <raksit@google.com>
1655
1656 * parser.c (cp_parser_postfix_expression): New warning based on flag
1657 warn_disallowed_functions.
1658
1659 2008-07-08 Simon Martin <simartin@users.sourceforge.net>
1660
1661 PR c++/34963
1662 * decl.c (grokdeclarator): Reset storage_class and staticp for friend
1663 functions declared with a storage class qualifier.
1664
1665 2008-07-03 Richard Guenther <rguenther@suse.de>
1666
1667 PR c++/36128
1668 * typeck.c (cp_build_function_call): Move code to verify
1669 builtin function arguments ...
1670 * call.c (build_cxx_call): ... here.
1671
1672 2008-07-02 Jason Merrill <jason@redhat.com>
1673
1674 * Make-lang.in (cp/typeck2.o): Add $(REAL_H) dependency.
1675
1676 Implement WG21 N2672, Initializer List proposed wording
1677 * cp-tree.h (enum cp_tree_index): Add CPTI_INIT_LIST_TYPE.
1678 (struct lang_type_class): Add has_list_ctor bitfield.
1679 (TYPE_HAS_LIST_CTOR): New macro.
1680 (BRACE_ENCLOSED_INITIALIZER_P): Expect init_list_type_node.
1681 (CONSTRUCTOR_IS_DIRECT_INIT): New macro.
1682 (LOOKUP_NO_NARROWING): New macro.
1683 (LOOKUP_NO_COPY_CTOR_CONVERSION): New macro.
1684 * parser.c (cp_parse_braced_list): Split out from...
1685 (cp_parser_initializer_clause): ...here.
1686 (cp_parser_postfix_expression): Build up CONSTRUCTOR for compound
1687 literal here.
1688 (cp_lexer_next_token_is_not_keyword): New fn.
1689 (cp_parser_parenthesized_expression_list): Handle { }.
1690 (cp_parser_new_expression, cp_parser_new_initializer): Likewise.
1691 (cp_parser_assignment_expression, cp_parser_condition): Likewise.
1692 (cp_parser_jump_statement, cp_parser_simple_declaration): Likewise.
1693 (cp_parser_mem_initializer, cp_parser_init_declarator): Likewise.
1694 (cp_parser_initializer, cp_parser_functional_cast): Likewise.
1695 (cp_parser_omp_for_loop, cp_parser_cache_group): Likewise.
1696 (cp_parser_save_member_function_body): Likewise.
1697 * call.c (conversion_kind): Add ck_list, ck_aggr.
1698 (struct conversion): Add check_narrowing bitfield, conversion list.
1699 (build_list_conv): New fn.
1700 (build_aggr_conv): New fn.
1701 (implicit_conversion): Call them.
1702 (standard_conversion): Set check_narrowing if appropriate.
1703 (add_function_candidate): Handle LOOKUP_NO_COPY_CTOR_CONVERSION.
1704 (build_user_type_conversion_1): When converting from an init list,
1705 we allow additional conversions except when calling a copy ctor.
1706 (convert_like_real): Calling an explicit ctor for an init list is
1707 ill-formed. Handle ck_list and ck_addr. Check narrowing.
1708 (build_new_method_call): If CONSTRUCTOR_IS_DIRECT_INIT is set and
1709 class doesn't have a list ctor, break the {} into a TREE_LIST.
1710 (compare_ics): ck_list is better than other UDCs.
1711 (set_up_extended_ref_temp): Split out from initialize_reference.
1712 (is_std_init_list): New fn.
1713 (is_list_ctor): New fn.
1714 * decl.c (cxx_init_decl_processing): Create init_list_type_node.
1715 (reshape_init_array_1): Pass it to build_constructor.
1716 (reshape_init_class): Ditto.
1717 (initialize_artificial_var): Pass the appropriate type.
1718 (build_aggr_init_full_exprs): Split out from...
1719 (check_initializer): ...here. Handle new semantics.
1720 (build_init_list_var_init): New subroutine of check_initializer.
1721 (grokdeclarator): Converting constructors can have more than one parm.
1722 (grok_special_member_properties): Set TYPE_HAS_LIST_CTOR.
1723 * init.c (expand_default_init): Only do digest_init for aggregates.
1724 * rtti.c (tinfo_base_init): Pass init_list_type_node to
1725 build_constructor_from_list.
1726 (generic_initializer, ptr_initializer): Ditto.
1727 (ptm_initializer, class_initializer): Ditto.
1728 (get_pseudo_ti_init): Ditto.
1729 * error.c (dump_type): Handle init_list_type_node.
1730 (maybe_warn_cpp0x): New fn.
1731 (maybe_varn_variadic_templates): Call it.
1732 * cvt.c (ocp_convert): Handle conversion from { }.
1733 * tree.c (build_array_of_n_type): New fn.
1734 * typeck2.c (store_init_value): Use init_list_type_node.
1735 (digest_init): Likewise.
1736 (check_narrowing): New fn.
1737 * semantics.c: (finish_compound_literal): Take CONSTRUCTOR instead
1738 of vector of constructor elts. Handle non-aggregate types. Make
1739 constant literals static.
1740 * pt.c: (tsubst_copy_and_build): Adjust.
1741 (unify): Handle { }.
1742 * name-lookup.c (arg_assoc_type): Handle init_list_type_node.
1743
1744 2008-07-01 Daniel Jacobowitz <dan@codesourcery.com>
1745
1746 * typeck.c (comp_ptr_ttypes_real): Use vector_targets_convertible_p.
1747 (comp_ptr_ttypes_const): Likewise.
1748
1749 2008-07-01 Andrew Haley <aph@redhat.com>
1750
1751 * decl.c (finish_constructor_body): Don't set the return value of
1752 the constructor if the constructor is that of a Java type.
1753
1754 2008-06-30 Jakub Jelinek <jakub@redhat.com>
1755
1756 PR c++/36662
1757 * decl2.c (is_late_template_attribute): If the first attribute
1758 argument is IDENTIFIER_NODE, don't consider it when checking
1759 if arguments are value or type dependent.
1760
1761 2008-06-29 Paolo Carlini <paolo.carlini@oracle.com>
1762
1763 PR c++/36655
1764 * pt.c (do_type_instantiation): In c++0x mode do not warn for
1765 extern template.
1766
1767 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1768
1769 * Make-lang.in (cp-warn): Delete $(CXX_COMPAT_WARN).
1770
1771 2008-06-28 Jakub Jelinek <jakub@redhat.com>
1772
1773 PR c++/36364
1774 * repo.c (repo_emit_p): Put const static data members initialized
1775 by const expr into *.rpo file, just return 2 if IDENTIFIER_REPO_CHOSEN
1776 for it is 0.
1777
1778 2008-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1779
1780 PR c++/36655
1781 * pt.c (do_decl_instantiation): In c++0x mode do not warn for
1782 extern template.
1783
1784 2008-06-24 Jonathan Wakely <jwakely.gcc@gmail.com>
1785
1786 PR c++/23194
1787 * typeck.c (cp_build_function_call): Show example syntax in
1788 diagnostic.
1789
1790 2008-06-21 Jonathan Wakely <jwakely.gcc@gmail.com>
1791
1792 * typeck.c (composite_pointer_type_r, cxx_sizeof_expr,
1793 cxx_alignof_expr, check_template_keyword, cp_build_binary_op,
1794 pointer_diff, cp_build_unary_op, build_x_compound_expr_from_list,
1795 build_reinterpret_cast_1, cp_build_c_cast, check_return_expr): Change
1796 pedwarn to permerror.
1797 * init.c (perform_member_init, build_new_1, build_new): Likewise.
1798 * decl.c (warn_extern_redeclared_static, duplicate_decls,
1799 * identify_goto, check_previous_goto_1, check_goto, define_label,
1800 check_tag_decl, start_decl, check_class_member_definition_namespace,
1801 grokfndecl, grokdeclarator): Likewise.
1802 * except.c (check_handlers): Likewise.
1803 * typeck2.c (digest_init): Likewise.
1804 * pt.c (check_specialization_namespace,
1805 check_explicit_instantiation_namespace,
1806 maybe_process_partial_specialization, check_explicit_specialization,
1807 convert_template_argument, do_decl_instantiation,
1808 do_type_instantiation, instantiate_decl): Likewise.
1809 * semantics.c (finish_template_type_parm): Likewise.
1810 * name-lookup.c (pushdecl_maybe_friend,
1811 check_for_out_of_scope_variable): Likewise.
1812 * decl2.c (finish_static_data_member_decl, build_anon_union_vars,
1813 coerce_new_type): Likewise.
1814 * parser.c (cp_parser_nested_name_specifier_opt,
1815 cp_parser_mem_initializer, cp_parser_elaborated_type_specifier,
1816 cp_parser_class_head, cp_parser_check_class_key): Likewise.
1817 (cp_parser_parameter_declaration): Check flag_permissive instead of
1818 flag_pedantic_errors.
1819 * call.c (joust): Change pedwarn to warning.
1820 * friend.c (make_friend_class): Likewise.
1821
1822 2008-06-16 Jan Hubicka <jh@suse.cz>
1823
1824 * method.c: Include cgraph.h.
1825 (use_thunk): Use cgraph_add_new_function instead of calling backend
1826 directly.
1827
1828 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1829
1830 * parser.c: Fix comment typo.
1831
1832 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1833
1834 PR c++/35320
1835 * decl2.c (grokbitfield): Receive the list of attributes, pass it to
1836 grokdeclarator and apply it to the created declaration.
1837 * cp-tree.h (grokbitfield): Update prototype.
1838 * parser.c (cp_parser_member_declaration): Don't apply the attributes
1839 since they are now applied in grokbitfield. Adjusted the call to
1840 grokbitfield.
1841 (cp_parser_objc_class_ivars): Likewise.
1842
1843 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1844
1845 PR c++/35317
1846 * class.c (type_requires_array_cookie): Do not consider delete[]
1847 operators with an ellipsis as second argument.
1848
1849 2008-06-09 Jakub Jelinek <jakub@redhat.com>
1850
1851 PR c++/36408
1852 * semantics.c (stmt_expr_value_expr): Don't crash on empty
1853 STATEMENT_LIST.
1854
1855 2008-06-08 Paolo Carlini <paolo.carlini@oracle.com>
1856
1857 PR c++/35242
1858 * pt.c (maybe_process_partial_specialization): Check the tree
1859 returned by push_template_decl for error_mark_node.
1860 * parser.c (cp_parser_class_head): Likewise, check the tree
1861 returned by the latter.
1862
1863 2008-06-07 Paolo Carlini <paolo.carlini@oracle.com>
1864
1865 PR c++/35327
1866 * decl.c (grokdeclarator): In case of wrong return type return
1867 immediately error_mark_node.
1868
1869 2008-06-06 Jakub Jelinek <jakub@redhat.com>
1870
1871 * cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
1872 dependent_omp_for_p, begin_omp_task, finish_omp_task,
1873 finish_omp_taskwait): New prototypes.
1874 (cxx_omp_clause_default_ctor): Add outer argument.
1875 (finish_omp_for): Add new clauses argument.
1876 * cp-gimplify.c (cxx_omp_finish_clause): New function.
1877 (cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
1878 (cxx_omp_clause_default_ctor): Add outer argument.
1879 (cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
1880 * cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
1881 * parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
1882 Add par_clauses argument. If decl is present in parallel's
1883 lastprivate clause, change that clause to shared and add
1884 a lastprivate clause for decl to OMP_FOR_CLAUSES.
1885 Fix wording of error messages. Adjust finish_omp_for caller.
1886 Add clauses argument. Parse loops with random access iterators.
1887 (cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
1888 functions.
1889 (cp_parser_omp_for, cp_parser_omp_parallel): Adjust
1890 cp_parser_omp_for_loop callers.
1891 (cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
1892 functions.
1893 (cp_parser_omp_clause_name): Handle collapse and untied
1894 clauses.
1895 (cp_parser_omp_clause_schedule): Handle auto schedule.
1896 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
1897 and PRAGMA_OMP_CLAUSE_UNTIED.
1898 (OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
1899 (OMP_TASK_CLAUSE_MASK): Define.
1900 (cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
1901 (cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
1902 (cp_parser_pragma): Handle PRAGMA_OMP_TASK and
1903 PRAGMA_OMP_TASKWAIT.
1904 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
1905 OMP_CLAUSE_UNTIED. Handle OMP_CLAUSE_LASTPRIVATE_STMT.
1906 (tsubst_omp_for_iterator): New function.
1907 (dependent_omp_for_p): New function.
1908 (tsubst_expr) <case OMP_FOR>: Use it. Handle collapsed OMP_FOR
1909 loops. Adjust finish_omp_for caller. Handle loops with random
1910 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR} changes.
1911 (tsubst_expr): Handle OMP_TASK.
1912 * semantics.c (cxx_omp_create_clause_info): New function.
1913 (finish_omp_clauses): Call it. Handle OMP_CLAUSE_UNTIED and
1914 OMP_CLAUSE_COLLAPSE.
1915 (cxx_omp_predetermined_sharing): Removed.
1916 * semantics.c (finish_omp_for): Allow pointer iterators. Use
1917 handle_omp_for_class_iterator and dependent_omp_for_p. Handle
1918 collapsed for loops. Adjust c_finish_omp_for caller. Add new
1919 clauses argument. Fix check for type dependent cond or incr.
1920 Set OMP_FOR_CLAUSES to clauses. Use cp_convert instead of
1921 fold_convert to convert incr amount to difference_type. Only
1922 fold if not in template. If decl is mentioned in lastprivate
1923 clause, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle loops with random
1924 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR}
1925 changes.
1926 (finish_omp_threadprivate): Allow static class members of the
1927 current class.
1928 (handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
1929 finish_omp_taskwait): New functions.
1930
1931 * parser.c (cp_parser_binary_expression): Add prec argument.
1932 (cp_parser_assignment_expression): Adjust caller.
1933 * cp-tree.h (outer_curly_brace_block): New prototype.
1934 * decl.c (outer_curly_brace_block): No longer static.
1935
1936 2008-06-02 Paolo Carlini <paolo.carlini@oracle.com>
1937
1938 PR c++/36404
1939 * pt.c (push_template_decl_real): Consistently return error_mark_node
1940 on error.
1941
1942 2008-06-02 Tomas Bily <tbily@suse.cz>
1943
1944 * typeck.c (is_bitfield_expr_with_lowered_type): Use CASE_CONVERT.
1945 (cp_build_unary_op): Likewise.
1946 (cp_build_indirect_ref): Use CONVERT_EXPR_P.
1947 (maybe_warn_about_returning_address_of_local): Likewise.
1948
1949 2008-05-29 Paolo Carlini <paolo.carlini@oracle.com>
1950
1951 PR c++/35243
1952 * pt.c (tsubst_initializer_list): Consistently check the tree
1953 returned by tsubst_pack_expansion for error_mark_node.
1954
1955 2008-05-27 Michael Matz <matz@suse.de>
1956
1957 PR c++/27975
1958 * call.c (build_new_op): Make warning conditional on
1959 OPT_Wenum_compare.
1960
1961 2008-05-27 Alexandre Oliva <aoliva@redhat.com>
1962
1963 PR c++/35909
1964 * call.c (convert_like_real): Convert bitfield to desired type
1965 before creating temporary.
1966
1967 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
1968
1969 * Makefile.in: Adjusted dependencies on c-incpath.o.
1970
1971 2008-05-23 Jakub Jelinek <jakub@redhat.com>
1972
1973 PR c++/36237
1974 * cp-gimplify.c (cxx_omp_clause_apply_fn): Call
1975 fold_build_cleanup_point_expr on build_call_a results.
1976
1977 PR c++/36308
1978 * semantics.c (omp_clause_info_fndecl): New function.
1979 (finish_omp_clauses): Use it.
1980
1981 2008-05-21 Jakub Jelinek <jakub@redhat.com>
1982
1983 PR c++/36023
1984 * cp-tree.h (check_array_initializer): New prototype.
1985 * decl.c (check_array_initializer): New function.
1986 (check_initializer): Call it.
1987 * semantics.c (finish_compound_literal): Call it for ARRAY_TYPEs.
1988
1989 2008-05-21 Tom Tromey <tromey@redhat.com>
1990
1991 * mangle.c (save_partially_mangled_name): Remove.
1992 (restore_partially_mangled_name): Likewise.
1993 (write_encoding): Update.
1994 (write_unqualified_name): Likewise.
1995 (start_mangling): Always use name_obstack. Remove 'ident_p'
1996 argument.
1997 (get_identifier_nocopy): Remove.
1998 (finish_mangling_internal): Rename from finish_mangling.
1999 (finish_mangling): New function.
2000 (finish_mangling_get_identifier): Likewise.
2001 (partially_mangled_name, partially_mangled_name_len): Remove.
2002 (mangle_decl_string): Change return type. Update.
2003 (mangle_decl, mangle_type_string, mangle_special_for_type,
2004 mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
2005 mangle_ref_init_variable): Update.
2006
2007 2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
2008
2009 PR c++/35331
2010 * semantics.c (begin_class_definition): Extend checks on the first
2011 argument.
2012
2013 2008-05-12 Tomas Bily <tbily@suse.cz>
2014
2015 * typeck2.c (digest_init): Use CONVERT_EXPR_P.
2016 * call.c (build_over_call): Likewise.
2017 * error.c (dump_expr): Use CASE_CONVERT.
2018 * class.c (fixed_type_or_null): Likewise.
2019
2020 2008-05-11 Volker Reichelt <v.reichelt@netcologne.de>
2021
2022 * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
2023 in error message.
2024 (cp_parser_omp_clause_schedule): Remove superfluous "expected"
2025 in error message.
2026
2027 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
2028
2029 * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
2030 DECL_LOOPING_CONST_OR_PURE_P attributes.
2031 * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
2032 DECL_PURE_P.
2033
2034 2008-05-02 Simon Baldwin <simonb@google.com>
2035
2036 PR bootstrap/36108
2037 * typeck.c (build_array_ref): Remove warn_array_subscript_range.
2038
2039 2008-05-01 Simon Baldwin <simonb@google.com>
2040
2041 * typeck.c (build_array_ref): Call warn_array_subscript_range.
2042
2043 2008-04-30 Jakub Jelinek <jakub@redhat.com>
2044
2045 PR c++/35986
2046 * pt.c (more_specialized_fn): Stop the loop even if there are no
2047 arguments before ellipsis.
2048
2049 2008-04-29 Jakub Jelinek <jakub@redhat.com>
2050
2051 PR c++/35650
2052 * parser.c (cp_parser_lookup_name): Look through single function
2053 OVERLOAD.
2054
2055 PR c++/35987
2056 * typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
2057 COMPOUND_EXPR if the second argument would be error_mark_node.
2058
2059 2008-04-28 Jason Merrill <jason@redhat.com>
2060 Liu Guanwei <liu_gw@163.com>
2061
2062 PR c++/57
2063 * parser.c (cp_parser_parameter_declaration): Handle < ambiguity
2064 in default arguments.
2065
2066 2008-04-25 Jan Hubicka <jh@suse.cz>
2067
2068 * typeck.c (check_return_expr): Update.
2069 * decl.c (start_preparsed_function): Update.
2070 * method.c (use_thunk): Update.
2071
2072 2008-04-24 Jakub Jelinek <jakub@redhat.com>
2073
2074 PR c++/35758
2075 * cp-tree.h (cp_reconstruct_complex_type): New prototype.
2076 * cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
2077 * decl2.c (is_late_template_attribute): Only make vector_size
2078 late tmpl attribute if argument is type or value dependent.
2079 (cp_reconstruct_complex_type): New function.
2080
2081 2008-04-24 Richard Guenther <rguenther@suse.de>
2082
2083 * typeck.c (cp_build_function_call): Call
2084 check_builtin_function_arguments.
2085
2086 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
2087
2088 * typeck.c (get_member_function_from_ptrfunc): Don't set TREE_INVARIANT.
2089 (build_ptrmemfunc1): Don't set TREE_INVARIANT.
2090 * init.c (build_zero_init): Don't set TREE_INVARIANT.
2091 * class.c (build_base_path): Don't set TREE_INVARIANT.
2092 (build_vtbl_ref_1): Don't set TREE_INVARIANT.
2093 (build_vtbl_initializer): Don't set TREE_INVARIANT.
2094 * decl.c (build_enumerator): Don't set TREE_INVARIANT.
2095 * rtti.c (tinfo_base_init): Don't set TREE_INVARIANT.
2096 (generic_initializer): Don't set TREE_INVARIANT.
2097 (ptr_initializer): Don't set TREE_INVARIANT.
2098 (ptm_initializer): Don't set TREE_INVARIANT.
2099 (class_initializer): Don't set TREE_INVARIANT.
2100 * typeck2.c (process_init_constructor): Don't set TREE_INVARIANT.
2101 * pt.c (push_inline_template_parms_recursive): Don't set TREE_INVARIANT.
2102 (build_template_parm_index): Don't set TREE_INVARIANT.
2103 (reduce_template_parm_level): Don't set TREE_INVARIANT.
2104 (process_template_parm): Don't set TREE_INVARIANT.
2105
2106 2008-04-22 Jason Merrill <jason@redhat.com>
2107
2108 PR c++/35316
2109 * semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
2110 to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
2111 * typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
2112
2113 2008-04-22 Jakub Jelinek <jakub@redhat.com>
2114
2115 PR c++/35747
2116 * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
2117 expression is errorneous.
2118
2119 2008-04-21 Jason Merrill <jason@redhat.com>
2120
2121 PR c++/35325
2122 * tree.c (cp_tree_equal): Handle FIXED_CST.
2123
2124 PR c++/35678
2125 * pt.c (template_template_parm_bindings_ok_p): Set
2126 processing_template_decl while in this function.
2127
2128 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
2129
2130 * cvt.c (type_promotes_to): Support char16_t and char32_t.
2131 * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
2132 char16_t and char32_t.
2133 * lex.c (reswords): Add char16_t and char32_t (for c++0x).
2134 * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
2135 extended builtin type "u8char{16,32}_t".
2136 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
2137 RID_CHAR{16,32}.
2138 (cp_lexer_print_token): Support CPP_STRING{16,32}.
2139 (cp_parser_is_string_literal): Idem.
2140 (cp_parser_string_literal): Idem.
2141 (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
2142 CPP_STRING{16,32}.
2143 (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}.
2144 * tree.c (char_type_p): Support char16_t and char32_t as char types.
2145 * typeck.c (string_conv_p): Support char16_t and char32_t.
2146
2147 2008-04-17 Jason Merrill <jason@redhat.com>
2148
2149 PR c++/35773
2150 * call.c (build_user_type_conversion_1): Represent second step of
2151 copy-init with an rvalue conversion.
2152 (convert_like_real) [ck_user]: Don't implicitly add it here.
2153
2154 2008-04-15 Jakub Jelinek <jakub@redhat.com>
2155
2156 PR c/35751
2157 * decl.c (layout_var_decl): If extern or static var has variable
2158 size, set TREE_TYPE (decl) to error_mark_node.
2159
2160 2008-04-16 Danny Smith <dannysmith@users.sourceforge.net>
2161
2162 PR target/35921
2163 * optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
2164 to clone.
2165
2166 2008-04-09 Jason Merrill <jason@redhat.com>
2167
2168 PR c++/35708
2169 * semantics.c (finish_compound_literal): Return a TARGET_EXPR,
2170 not a pushed variable.
2171
2172 2008-04-09 Volker Reichelt <v.reichelt@netcologne.de>
2173
2174 * call.c (build_op_delete_call): Fix quotation in warning message.
2175 * decl.c (grokdeclarator): Quote keyword in error message.
2176 * pt.c (check_for_bare_parameter_packs): Fix quotation in error
2177 message.
2178
2179 * parser.c (cp_parser_check_type_definition): Print error string
2180 directly rather than using "%s".
2181 (cp_parser_postfix_expression): Fix quotation.
2182 (cp_parser_decltype): Likewise.
2183 (cp_parser_sizeof_operand): Fix quotation. Simplify.
2184
2185 * parser.c (cp_parser_non_integral_constant_expression): Build error
2186 message with CONCAT rather than using "%s".
2187 (cp_parser_primary_expression): Fix quotation.
2188 (cp_parser_postfix_expression): Likewise.
2189 (cp_parser_postfix_dot_deref_expression): Likewise.
2190 (cp_parser_unary_expression): Likewise.
2191 (cp_parser_new_expression): Likewise.
2192 (cp_parser_delete_expression): Likewise.
2193
2194 * parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
2195 as `)', not as `('. Fix quotation.
2196 (cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
2197 (cp_parser_primary_expression): Likewise.
2198 (cp_parser_nested_name_specifier_opt): Likewise.
2199 (cp_parser_postfix_expression): Likewise.
2200 (cp_parser_postfix_open_square_expression): Likewise.
2201 (cp_parser_parenthesized_expression_list): Likewise.
2202 (cp_parser_pseudo_destructor_name): Likewise.
2203 (cp_parser_new_expression): Likewise.
2204 (cp_parser_direct_new_declarator): Likewise.
2205 (cp_parser_delete_expression): Likewise.
2206 (cp_parser_cast_expression): Likewise.
2207 (cp_parser_question_colon_clause): Likewise.
2208 (cp_parser_builtin_offsetof): Likewise.
2209 (cp_parser_trait_expr): Likewise.
2210 (cp_parser_label_for_labeled_statement): Likewise.
2211 (cp_parser_compound_statement): Likewise.
2212 (cp_parser_selection_statement): Likewise.
2213 (cp_parser_condition): Likewise.
2214 (cp_parser_iteration_statement): Likewise.
2215 (cp_parser_already_scoped_statement): Likewise.
2216 (cp_parser_simple_declaration): Likewise.
2217 (cp_parser_linkage_specification): Likewise.
2218 (cp_parser_static_assert): Likewise.
2219 (cp_parser_decltype): Likewise.
2220 (cp_parser_conversion_function_id): Likewise.
2221 (cp_parser_operator_function_id): Likewise.
2222 (cp_parser_operator): Likewise.
2223 (cp_parser_type_parameter): Likewise.
2224 (cp_parser_template_id): Likewise.
2225 (cp_parser_explicit_instantiation): Likewise.
2226 (cp_parser_explicit_specialization): Likewise.
2227 (cp_parser_enum_specifier): Likewise.
2228 (cp_parser_namespace_definition): Likewise.
2229 (cp_parser_namespace_alias_definition): Likewise.
2230 (cp_parser_using_declaration): Likewise.
2231 (cp_parser_using_directive): Likewise.
2232 (cp_parser_asm_definition): Likewise.
2233 (cp_parser_direct_declarator): Likewise.
2234 (cp_parser_ptr_operator): Likewise.
2235 (cp_parser_parameter_declaration_clause): Likewise.
2236 (cp_parser_initializer_clause): Likewise.
2237 (cp_parser_class_specifier): Likewise.
2238 (cp_parser_member_specification_opt): Likewise.
2239 (cp_parser_member_declaration): Likewise.
2240 (cp_parser_pure_specifier): Likewise.
2241 (cp_parser_constant_initializer): Likewise.
2242 (cp_parser_base_clause): Likewise.
2243 (cp_parser_exception_specification_opt): Likewise.
2244 (cp_parser_try_block): Likewise.
2245 (cp_parser_function_try_block): Likewise.
2246 (cp_parser_handler): Likewise.
2247 (cp_parser_throw_expression): Likewise.
2248 (cp_parser_asm_operand_list): Likewise.
2249 (cp_parser_attributes_opt): Likewise.
2250 (cp_parser_label_declaration): Likewise.
2251 (cp_parser_constructor_declarator_p): Likewise.
2252 (cp_parser_template_declaration_after_export): Likewise.
2253 (cp_parser_single_declaration): Likewise.
2254 (cp_parser_objc_message_expression): Likewise.
2255 (cp_parser_objc_message_args): Likewise.
2256 (cp_parser_objc_encode_expression): Likewise.
2257 (cp_parser_objc_defs_expression): Likewise.
2258 (cp_parser_objc_protocol_expression): Likewise.
2259 (cp_parser_objc_selector_expression): Likewise.
2260 (cp_parser_objc_protocol_refs_opt): Likewise.
2261 (cp_parser_objc_typename): Likewise.
2262 (cp_parser_objc_method_keyword_params): Likewise.
2263 (cp_parser_objc_superclass_or_category): Likewise.
2264 (cp_parser_objc_try_catch_finally_statement): Likewise.
2265 (cp_parser_objc_synchronized_statement): Likewise.
2266 (cp_parser_objc_throw_statement): Likewise.
2267 (cp_parser_omp_var_list_no_open): Likewise.
2268 (cp_parser_omp_clause_default): Likewise.
2269 (cp_parser_omp_clause_if): Likewise.
2270 (cp_parser_omp_clause_num_threads): Likewise.
2271 (cp_parser_omp_clause_reduction): Likewise.
2272 (cp_parser_omp_clause_schedule): Likewise.
2273 (cp_parser_omp_critical): Likewise.
2274 (cp_parser_omp_for_loop): Likewise.
2275 (cp_parser_omp_sections_scope): Likewise.
2276
2277 * parser.c (cp_parser_template_parameter_list): Simplify.
2278
2279 2008-04-07 James E. Wilson <wilson@tuliptree.org>
2280
2281 * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
2282
2283 2008-04-07 Jason Merrill <jason@redhat.com>
2284
2285 PR c++/35734
2286 * class.c (type_has_user_nondefault_constructor): A template
2287 counts as a nondefault constructor.
2288
2289 2008-04-04 Paolo Bonzini <bonzini@gnu.org>
2290
2291 * decl.c (cxx_push_function_context): Delete.
2292 (cxx_pop_function_context): Delete.
2293 (start_preparsed_function): Merge cxx_push_function_context (!f->decl
2294 code only).
2295 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_INIT,
2296 LANG_HOOKS_FUNCTION_FINAL): Delete.
2297 (LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): Rename to
2298 LANG_HOOKS_MISSING_NORETURN_OK_P.
2299 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context):
2300 Delete prototype.
2301 * semantics.c (current_stmt_tree): Fix comment.
2302
2303 2008-04-03 Jakub Jelinek <jakub@redhat.com>
2304
2305 PR c++/35741
2306 * semantics.c (finish_offsetof): Undo effect of convert_from_reference
2307 before calling fold_offsetof.
2308
2309 2008-04-03 Tom Tromey <tromey@redhat.com>
2310
2311 * Make-lang.in (c++_OBJS): New variable.
2312
2313 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
2314
2315 * optimize.c (clone_body): New, from tree-inline.c.
2316
2317 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
2318
2319 * method.c (synthesize_method): Use {push,pop}_function_context.
2320 * name-lookup.c (push_to_top_level): Likewise.
2321 * parser.c (cp_parser_late_parsing_for_member): Likewise.
2322
2323 2008-03-30 Volker Reichelt <v.reichelt@netcologne.de>
2324
2325 PR c++/35578
2326 * parser.c (cp_parser_decl_specifier_seq): Add location to error
2327 message.
2328
2329 2008-03-27 Tom Tromey <tromey@redhat.com>
2330
2331 * Make-lang.in: Revert automatic dependency patch.
2332
2333 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
2334
2335 PR obj-c++/35704
2336 * typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
2337 (build_compound_expr): New, for compatibility with C
2338 build_compound_expr.
2339 (cp_build_compound_expr): Renamed from build_compound_expr.
2340 (build_c_cast): New, for compatibility with C build_c_cast.
2341 (cp_build_c_cast): Renamed from build_c_cast.
2342 * init.c (build_vec_delete_1): Fix calls to build_compound_expr.
2343 * decl.c (cxx_maybe_build_cleanup): Ditto.
2344 * cp-tree.h (build_compound_expr): Add C-compatibile prototype.
2345 (cp_build_compound_expr): Renamed from build_compound_expr.
2346 (build_c_cast): Add C-compatible prototype.
2347 (cp_build_c_cast): Renamed from build_c_cast.
2348 * typeck2.c (build_functional_cast): Use cp_build_c_cast.
2349 * parser.c (cp_parser_cast_expression): Fix call to build_c_cast.
2350
2351 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
2352
2353 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Cope with
2354 tsubst_pack_expansion returning a pack expansion, or a TREE_VEC
2355 ending in a pack expansion, both of which can occur when
2356 substituting into a nested template.
2357 (tsubst_copy_and_build) <case SIZEOF_EXPR>: When we're
2358 instantiating the sizeof...(X) form, make tsubst_copy do the work.
2359 * parser.c (cp_parser_template_parameter): Deal with unnamed
2360 non-type template parameter packs identified by pack expansions in
2361 the parameter type.
2362
2363 2008-03-26 Jakub Jelinek <jakub@redhat.com>
2364
2365 PR c++/35546
2366 * pt.c (apply_late_template_attributes): Don't call tsubst on
2367 first attribute argument if it is IDENTIFIER_NODE.
2368
2369 PR c++/35332
2370 * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
2371 and LTGT_EXPR to pp_expression.
2372
2373 2008-03-26 Douglas Gregor <doug.gregor@gmail.com>
2374
2375 * pt.c (coerce_template_template_parm): Moved the body of the loop
2376 of coerce_template_template_parms here, to make iteration over a
2377 template argument pack simpler.
2378 Also, allow matching of a template parameter pack in the template
2379 template parameter to a template parameter in the template
2380 template argument.
2381 (coerce_template_template_parms): Deal with variadic template
2382 template parameters. Use coerce_template_template_parm.
2383 (unify): Make sure we coerce the template template argument's
2384 template arguments to the template template parameter's template
2385 parameters, not the other way around.
2386
2387 2008-03-25 Tom Tromey <tromey@redhat.com>
2388
2389 * Make-lang.in: Remove .o targets.
2390 (cp/g++spec.o): Moved to cp/. Reduce to variable setting.
2391 (GXX_OBJS): Update.
2392 (c++_OBJS): New variable.
2393 (CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
2394
2395 2008-03-25 Douglas Gregor <doug.gregor@gmail.com>
2396
2397 * typeck.c (composite_pointer_type_r): Add SFINAE support.
2398 (composite_pointer_type): Ditto.
2399 (common_type): Fix call to composite_pointer_type.
2400 (cxx_sizeof_nowarn): New; used to be a macro.
2401 (cxx_sizeof_expr): Add SFINAE support.
2402 (cxx_alignof_expr): Ditto.
2403 (decay_conversion): Fix calls for SFINAE support.
2404 (rationalize_conditional_expr): Add SFINAE support.
2405 (build_class_member_access_expr): Ditto.
2406 (finish_class_member_access_expr): Ditto.
2407 (build_x_indirect_ref): Ditto.
2408 (build_indirect_ref): Original version renamed to
2409 cp_build_indirect_ref; new version provides a bridge from
2410 c-common.
2411 (cp_build_indirect_ref): Was build_indirect_ref; added SFINAE
2412 support.
2413 (get_member_function_from_ptrfunc): Fix calls for SFINAE support.
2414 (build_function_call): Original version renamed to
2415 cp_build_function_call; new version provides a bridge from
2416 c-common.
2417 (cp_build_function_call): Was build_function_call; added SFINAE
2418 support.
2419 (convert_arguments): Add SFINAE support.
2420 (build_x_binary_op): Ditto.
2421 (build_binary_op): Original version renamed to cp_build_binary_op;
2422 new version provides a bridge from c-common.
2423 (cp_build_binary_op): Was build_binary_op; added SFINAE support.
2424 (pointer_diff): Fix calls for SFINAE.
2425 (build_x_unary_op): Add SFINAE support.
2426 (condition_conversion): Fix calls for SFINAE.
2427 (build_unary_op): Original version renamed to cp_build_unary_op;
2428 new version provides a bridge from c-common.
2429 (cp_build_unary_op): Was build_unary_op; added SFINAE support.
2430 (unary_complex_lvalue): Fix calls for SFINAE.
2431 (build_x_conditional_expr): Add SFINAE support.
2432 (build_x_compound_expr_from_list): Fix calls for SFINAE.
2433 (build_x_compound_expr): Add SFINAE support.
2434 (convert_ptrmem): Fix calls for SFINAE.
2435 (build_static_cast_1): Add SFINAE support.
2436 (build_static_cast): Ditto.
2437 (build_reinterpret_cast_1): Ditto.
2438 (build_reinterpret_cast): Ditto.
2439 (build_const_cast_1): Ditto.
2440 (build_const_cast): Ditto.
2441 (build_c_cast): Ditto.
2442 (build_modify_expr): Original version renamed to
2443 cp_build_modify_expr; new version provides a bridge from c-common.
2444 (cp_build_modify_expr): Was build_modify_expr; added SFINAE
2445 support.
2446 (build_x_modify_expr): Add SFINAE support.
2447 (build_ptrmemfunc): Fix calls for SFINAE.
2448 (convert_for_assignment): Add SFINAE support.
2449 (convert_for_initialization): Ditto.
2450 (check_return_expr): Fix calls for SFINAE.
2451 (lvalue_or_else): Add SFINAE support.
2452 * init.c (perform_member_init): Fix calls for SFINAE.
2453 (emit_mem_initializers): Ditto.
2454 (expand_virtual_init): Ditto.
2455 (expand_cleanup_for_base): Ditto.
2456 (build_aggr_init): Add SFINAE support.
2457 (expand_default_init): Ditto.
2458 (expand_aggr_init_1): Fix calls for SFINAE.
2459 (build_offset_ref): Ditto.
2460 (build_new_1): Add SFINAE support.
2461 (build_new): Ditto.
2462 (build_vec_delete_1): Fix calls for SFINAE.
2463 (get_temp_regvar): Ditto.
2464 (build_vec_init): Add SFINAE support.
2465 (build_dtor_call): Fix calls for SFINAE.
2466 (build_delete): Ditto.
2467 (push_base_cleanups): Ditto.
2468 (build_vec_delete_1): Ditto.
2469 * class.c (build_base_path): Fix calls for SFINAE.
2470 (build_simple_base_path): Ditto.
2471 (convert_to_base_statically): Ditto.
2472 (build_vfn_ref): Ditto.
2473 (resolve_address_of_overloaded_function): Ditto.
2474 * decl.c (check_initializer): Fix calls for SFINAE.
2475 (register_dtor_fn): Ditto.
2476 (compute_array_index_type): Ditto.
2477 (finish_enum): Ditto.
2478 (start_preparsed_function): Ditto.
2479 (cxx_maybe_build_cleanup): Ditto.
2480 * call.c (convert_like): Add COMPLAIN argument.
2481 (convert_like_with_context): Ditto.
2482 (build_this): Fix calls for SFINAE.
2483 (build_user_type_conversion): Ditto.
2484 (resolve_args): Ditto.
2485 (build_new_function_call): Add SFINAE support.
2486 (build_operator_new_call): Fix calls for SFINAE.
2487 (build_object_call): Add SFINAE support.
2488 (build_conditional_expr): Ditto.
2489 (build_new_op): Ditto.
2490 (build_op_delete_call): Fix calls for SFINAE.
2491 (build_temp): Ditto.
2492 (convert_like_real): Add SFINAE support.
2493 (build_x_va_arg): Fix calls for SFINAE.
2494 (convert_default_arg): Ditto.
2495 (build_over_call): Add SFINAE support.
2496 (build_java_interface_fn_ref): Fix calls for SFINAE.
2497 (build_special_member_call): Add SFINAE support.
2498 (build_new_method_call): Ditto.
2499 (perform_implicit_conversion): Ditto.
2500 (perform_direct_initialization_if_possible): Ditto.
2501 (initialize_reference): Fix calls for SFINAE.
2502 * method.c (do_build_assign_ref): Fix calls for SFINAE.
2503 * rtti.c (build_headof): Fix calls for SFINAE.
2504 (get_tinfo_decl_dynamic): Ditto.
2505 (get_typeid): Ditto.
2506 (build_dynamic_cast_1): Add SFINAE support.
2507 (build_dynamic_cast): Ditto.
2508 (tinfo_base_init): Fix calls for SFINAE.
2509 * except.c (do_get_exception_ptr): Fix calls for SFINAE.
2510 (do_end_catch): Ditto.
2511 (initialize_handler_parm): Ditto.
2512 (expand_start_catch_block): Ditto.
2513 (do_allocate_exception): Ditto.
2514 (do_free_exception): Ditto.
2515 (build_throw): Ditto.
2516 * cvt.c (build_up_reference): Fix calls for SFINAE.
2517 (convert_to_reference): Ditto.
2518 (ocp_convert): Ditto.
2519 (convert_to_void): Add SFINAE support.
2520 * tree.c (build_dummy_object): Fix calls for SFINAE.
2521 (stabilize_expr): Ditto.
2522 * cp-tree.h (build_conditional_expr): Add tsubst_flags_t
2523 parameter.
2524 (build_new_method_call): Ditto.
2525 (build_special_member_call): Ditto.
2526 (build_new_op): Ditto.
2527 (perform_implicit_conversion): Ditto.
2528 (perform_direct_initialization_if_possible): Ditto.
2529 (convert_to_void): Ditto.
2530 (build_aggr_init): Ditto.
2531 (build_new): Ditto.
2532 (build_vec_init): Ditto.
2533 (build_dynamic_cast): Ditto.
2534 (finish_call_expr): Ditto
2535 (cxx_sizeof_or_alignof_expr): Add COMPLAIN parameter.
2536 (cxx_sizeof_nowarn): Remove macro; add function declaration.
2537 (build_class_member_access_expr): Add tsubst_flags_t parameter.
2538 (finish_class_member_access_expr): Ditto.
2539 (build_x_indirect_ref): Ditto.
2540 (cp_build_indirect_ref): New.
2541 (cp_build_function_call): Add tsubst_flags_t parameter.
2542 (build_x_unary_op): Ditto.
2543 (cp_build_unary_op): New.
2544 (build_x_conditional_expr): Add tsubst_flags_t parameter.
2545 (build_x_compound_expr): Ditto.
2546 (build_compound_expr): Ditto.
2547 (build_static_cast): Ditto.
2548 (build_reinterpret_cast): Ditto.
2549 (build_const_cast): Ditto.
2550 (build_c_cast): Ditto.
2551 (build_x_modify_expr): Ditto.
2552 (cp_build_modify_expr): New.
2553 (convert_for_initialization): Add tsubst_flags_t parameter.
2554 (cp_build_binary_op): Remove macro; add function declaration.
2555 (invalid_nonstatic_memfn_p): Add tsubst_flags_t parameter.
2556 (lvalue_or_else): Ditto.
2557 (build_functional_cast): Ditto.
2558 * typeck2.c (digest_init): Fix calls for SFINAE.
2559 (process_init_constructor_array): Ditto.
2560 (process_init_constructor_record): Ditto.
2561 (build_x_arrow): Ditto.
2562 (build_m_component_ref): Ditto.
2563 (build_functional_cast): Add SFINAE support.
2564 * pt.c (tsubst_copy_and_build): Add (more) SFINAE support.
2565 * semantics.c (simplify_loop_decl_cond): Fix calls for SFINAE.
2566 (finish_expr_stmt): Ditto.
2567 (finish_for_expr): Ditto.
2568 (finish_asm_stmt): Ditto.
2569 (finish_non_static_data_member): Ditto.
2570 (finish_qualified_id_expr): Ditto.
2571 (finish_call_expr): Add SFINAE support.
2572 (finish_increment_expr): Fix calls for SFINAE.
2573 (finish_unary_op_expr): Ditto.
2574 (simplify_aggr_init_expr): Ditto.
2575 (finish_omp_clauses): Ditto.
2576 (finish_omp_for): Ditto.
2577 (finish_omp_barrier): Ditto.
2578 (finish_omo_flush): Ditto.
2579 * decl2.c (grok_array_decl): Fix calls or SFINAE.
2580 (build_anon_union_vars): Ditto.
2581 (get_guard_cond): Ditto.
2582 (set_guard): Ditto.
2583 (one_static_initialization_or_destruction): Ditto.
2584 (do_static_initialization_or_destruction): Ditto.
2585 (generate_ctor_or_dtor_function): Ditto.
2586 (build_offset_ref_call_from_tree): Ditto.
2587 * parser.c (cp_parser_postfix_expression): Fix calls for SFINAE.
2588 (cp_parser_postfix_dot_deref_expression): Ditto.
2589 (cp_parser_unary_expression): Ditto.
2590 (cp_parser_new_expression): Ditto.
2591 (cp_parser_cast_expression): Ditto.
2592 (cp_parser_binary_expression): Ditto.
2593 (cp_parser_question_colon_clause): Ditto.
2594 (cp_parser_assignment_expression): Ditto.
2595 (cp_parser_expression): Ditto.
2596 (cp_parser_builtin_offsetof): Ditto.
2597 (cp_parser_template_argument): Ditto.
2598 (cp_parser_functional_cast): Ditto.
2599
2600 2008-03-24 Tom Tromey <tromey@redhat.com>
2601
2602 * lex.c (handle_pragma_interface): Don't copy the filename.
2603 (handle_pragma_implementation): Copy filename using xstrdup.
2604
2605 2008-03-21 Paolo Carlini <pcarlini@suse.de>
2606
2607 * cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
2608 (SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
2609 (IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
2610 (PROMOTES_TO_AGGR_TYPE): Remove.
2611 (CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
2612 * typeck.c (unary_complex_lvalue, build_modify_expr,
2613 convert_for_initialization): Adjust.
2614 * init.c (is_aggr_type): Remove.
2615 (is_class_type): Add.
2616 (build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
2617 build_delete): Adjust.
2618 * lex.c (make_aggr_type): Remove.
2619 (make_class_type): Add.
2620 (cxx_make_type): Adjust.
2621 * class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
2622 Adjust.
2623 * decl.c (build_typename_type, make_typename_type,
2624 make_unbound_class_template, cxx_init_decl_processing,
2625 check_tag_decl, groktypename, start_decl_1, layout_var_decl,
2626 check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
2627 grok_op_properties, xref_tag, check_function_type): Adjust.
2628 * call.c (check_dtor_name, standard_conversion, implicit_conversion,
2629 add_builtin_candidate, add_builtin_candidates,
2630 build_user_type_conversion_1, convert_like_real, build_cxx_call,
2631 is_subseq, compare_ics): Adjust.
2632 * method.c (use_thunk): Adjust.
2633 * rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
2634 create_tinfo_types): Adjust.
2635 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
2636 build_up_reference, convert_to_reference, convert_from_reference,
2637 ocp_convert, build_expr_type_conversion): Adjust.
2638 * tree.c (bind_template_template_parm, error_type): Adjust.
2639 * dump.c (cp_dump_tree): Adjust.
2640 * search.c (lookup_member): Adjust.
2641 * friend.c (make_friend_class, do_friend): Adjust.
2642 * typeck2.c (store_init_value, process_init_constructor_array,
2643 process_init_constructor_record, build_x_arrow, build_m_component_ref,
2644 build_functional_cast): Adjust.
2645 * pt.c (finish_member_template_decl, process_template_parm,
2646 lookup_template_class, tsubst_function_type, tsubst,
2647 tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
2648 Adjust.
2649 * semantics.c (begin_class_definition, finish_base_specifier,
2650 finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
2651 Adjust.
2652 * name-lookup.c (constructor_name_p, push_overloaded_decl,
2653 do_class_using_decl, lookup_qualified_name,
2654 maybe_process_template_type_declaration): Adjust.
2655 * decl2.c (grok_array_decl, check_member_template,
2656 constrain_class_visibility): Adjust.
2657 * parser.c (cp_parser_class_name): Adjust.
2658
2659 2008-03-18 Paolo Bonzini <bonzini@gnu.org>
2660
2661 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
2662
2663 2008-03-17 Jason Merrill <jason@redhat.com>
2664
2665 PR c++/35548
2666 * call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
2667 a temp directly to a reference as per DR391.
2668
2669 2008-03-12 Richard Guenther <rguenther@suse.de>
2670
2671 PR c++/35469
2672 Revert:
2673 2008-02-04 Richard Guenther <rguenther@suse.de>
2674
2675 PR java/35035
2676 * decl.c (record_builtin_java_type): Make jboolean a
2677 integer type again where its mode doesn't match that of bool.
2678
2679 2008-01-25 Richard Guenther <rguenther@suse.de>
2680
2681 PR c++/33887
2682 * decl.c (record_builtin_java_type): Make __java_boolean
2683 a variant of bool.
2684 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
2685 after TYPE_MAIN_VARIANT check.
2686
2687 2008-03-10 Jakub Jelinek <jakub@redhat.com>
2688
2689 PR c++/35328
2690 * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
2691 if errorcount.
2692
2693 PR c++/35337
2694 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
2695 DECL_P in not a variable and appears more than once error messages.
2696
2697 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
2698
2699 Revert:
2700
2701 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
2702
2703 PR c++/35049
2704 PR c++/35096
2705 * typeck.c (structural_comptypes): Call cp_comptypes.
2706 (comptypes): New; called from the C/C++ common bits to perform
2707 strict checks.
2708 (cp_comptypes): Renamed from comptypes, which is already used,
2709 with a different signature, by the C++ front end.
2710 (build_reinterpret_cast_1): Call cp_comptypes.
2711 (ptr_reasonably_similar): Ditto.
2712 * decl.c (decls_match): Ditto.
2713 * cvt.c (convert_to_reference): Ditto.
2714 * cp-tree.h (same_type_p): Ditto.
2715 (same_or_base_type_p): Ditto.
2716 (comptypes): Rename to cp_comptypes.
2717 * pt.c (canonical_type_parameter): Call cp_comptypes.
2718
2719 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
2720
2721 * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
2722 test for equivalence between pointer and references.
2723
2724 2008-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2725
2726 PR 24924
2727 * class.c (finish_struct_anon): Use permerror instead of pedwarn.
2728 (check_field_decls): Likewise.
2729 (note_name_declared_in_class): Likewise.
2730 * call.c (build_new_op): Likewise.
2731 (convert_like_real): Likewise.
2732 (build_over_call): Likewise.
2733 * lex.c (unqualified_fn_lookup_error): Likewise.
2734 * parser.c (cp_parser_template_id): Likewise.
2735 * cvt.c (warn_ref_binding): Likewise.
2736 (convert_to_reference): Likewise.
2737 (ocp_convert): Likewise.
2738 (convert_to_void): Use error instead of pedwarn.
2739 * error.c (cp_cpp_error): Use pedantic_warning_kind.
2740 * decl.c (compute_array_index_type): Use constant_expression_error.
2741
2742 2008-03-01 Douglas Gregor <doug.gregor@gmail.com>
2743
2744 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
2745 that auto is either a storage class or a simple type specifier,
2746 depending on the dialect.
2747 (cp_parser_decl_specifier_seq): Complain about `auto' as a storage
2748 specifier in C++98 mode, error in C++0x mode (since we don't
2749 support auto as a type specifier, yet).
2750 (cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
2751 storage specifier in C++0x mode.
2752 (cp_parser_simple_type_specifier): Parse `auto' as a
2753 simple-type-specifier, but error because we don't support it yet.
2754
2755 2008-02-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2756
2757 * parser.c (cp_parser_nonclass_name): New.
2758 (cp_parser_pseudo_destructor_name): Use it instead of
2759 cp_parser_type_name.
2760 (cp_parser_type_name): Move code to cp_parser_nonclass_name.
2761
2762 2008-02-29 Tom Tromey <tromey@redhat.com>
2763
2764 * parser.c (struct cp_token) <input_file_stack_index>: Remove.
2765 (cp_lexer_get_preprocessor_token): Update.
2766 (cp_lexer_set_source_position_from_token): Don't call
2767 restore_input_file_stack.
2768 * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
2769
2770 2008-02-28 Richard Guenther <rguenther@suse.de>
2771
2772 Revert:
2773 2008-02-26 Richard Guenther <rguenther@suse.de>
2774
2775 * decl.c (duplicate_decls): Remove decl from global mapping
2776 before ggc_freeing it.
2777
2778 2008-02-27 Jakub Jelinek <jakub@redhat.com>
2779
2780 PR c++/35368
2781 * rtti.c: Include c-pragma.h.
2782 (push_abi_namespace, pop_abi_namespace): New functions.
2783 (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
2784 create_tinfo_types, emit_support_tinfos): Use them.
2785 * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
2786
2787 2008-02-26 Jason Merrill <jason@redhat.com>
2788
2789 PR c++/35315
2790 * decl.c (grokdeclarator): Allow a typedef of an unnamed struct
2791 to name the struct for linkage purposes even if it has attributes.
2792 (start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
2793
2794 2008-02-26 Tom Tromey <tromey@redhat.com>
2795
2796 * parser.c (eof_token): Remove old location code.
2797 (check_empty_body): Remove test of USE_MAPPED_LOCATION.
2798 * decl2.c (generate_ctor_or_dtor_function): Remove old location
2799 code.
2800 (cp_write_global_declarations): Likewise.
2801 * lex.c (cxx_init): Remove old location code.
2802 (handle_pragma_implementation): Remove test of
2803 USE_MAPPED_LOCATION.
2804 * pt.c (tsubst): Remove old location code.
2805 * error.c (cp_print_error_function): Remove test of
2806 USE_MAPPED_LOCATION.
2807 * decl.c (pop_label): Remove old location code.
2808 (finish_function): Likewise.
2809
2810 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2811
2812 PR 26264
2813 * call.c (magic_varargs_p): Remove BUILT_IN_STDARG_START.
2814
2815 2008-02-26 Richard Guenther <rguenther@suse.de>
2816
2817 * decl.c (duplicate_decls): Remove decl from global mapping
2818 before ggc_freeing it.
2819
2820 2008-02-26 Paolo Carlini <pcarlini@suse.de>
2821
2822 PR c++/35323
2823 * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
2824
2825 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2826
2827 * typeck.c (build_class_member_access_expr): Add appropriate
2828 OPT_W* parameter to warning.
2829 (build_reinterpret_cast_1): Likewise.
2830 * name-lookup.c (push_overloaded_decl): Likewise.
2831
2832 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2833
2834 PR c++/35333
2835 * error.c (dump_expr): Handle CONJ_EXPR.
2836
2837 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2838
2839 PR c++/35338
2840 * error.c (dump_type): Handle FIXED_POINT_TYPE.
2841 (dump_expr): Handle FIXED_CST.
2842
2843 2008-02-24 Jason Merrill <jason@redhat.com>
2844
2845 * parser.c (cp_parser_declaration): Handle "inline namespace".
2846 (cp_parser_namespace_definition): Likewise.
2847
2848 PR c++/33486
2849 * name-lookup.c (arg_assoc_namespace): Look down into inline
2850 namespaces, too.
2851
2852 2008-02-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2853
2854 * typeck.c (check_for_casting_away_constness): Use 1 single
2855 argument, the type of cast, to decide what diagnostics generate.
2856 (build_static_cast_1): Remove unused code. Update call to
2857 check_for_casting_away_constness.
2858 (build_reinterpret_cast_1): Update call to
2859 check_for_casting_away_constness.
2860 (build_const_cast_1): Likewise.
2861
2862 2008-02-24 Paolo Carlini <pcarlini@suse.de>
2863
2864 * error.c (dump_expr): Don't deal directly with NEW_EXPR (and
2865 VEC_NEW_EXPR), forward to pp_expression.
2866 * cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
2867
2868 2008-02-24 Danny Smith <dannysmith@users.sourceforge.net>
2869
2870 PR c++/34749
2871 * friend.c (do_friend): Call cplus_decl_attributes earlier.
2872
2873 2008-02-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
2874
2875 PR C++/34715
2876 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
2877 template decls' function decl.
2878
2879 2008-02-22 Paolo Carlini <pcarlini@suse.de>
2880
2881 PR c++/35282
2882 Revert:
2883 2008-02-14 Paolo Carlini <pcarlini@suse.de>
2884
2885 PR c++/28743
2886 * pt.c (determine_specialization): In case of function templates,
2887 when the type of DECL does not match FN there is no match.
2888
2889 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2890
2891 PR c/19999
2892 * typeck.c (build_binary_op): Warn about floating point
2893 comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
2894
2895 2008-02-19 Jason Merrill <jason@redhat.com>
2896
2897 PR c++/34950
2898 * pt.c (resolve_overloaded_unification): Set processing_template_decl
2899 while we look for possible bindings.
2900
2901 2008-02-19 Jakub Jelinek <jakub@redhat.com>
2902
2903 PR c++/35028
2904 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
2905
2906 PR c++/34964
2907 PR c++/35244
2908 * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
2909 vars. Afterwards ensure v is VAR_DECL.
2910
2911 PR c++/35078
2912 * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
2913 call cp_finish_decl.
2914 * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
2915 early.
2916
2917 2008-02-15 Douglas Gregor <doug.gregor@gmail.com>
2918
2919 PR c++/35023
2920 PR c++/35024
2921 PR c++/35026
2922 * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
2923 is error_mark_node, return an error early.
2924 (find_parameter_packs_r): Pass the pointer set along to recursive
2925 calls of cp_walk_subtrees; don't try to manage the pointer set
2926 ourselves.
2927 (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
2928 (make_pack_expansion): Ditto.
2929 (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
2930 a second pass through the tree with find_parameter_packs_r; that
2931 second pass no longer does anything.
2932 (push_template_decl_real): If we have an erroneous declaration,
2933 set its type to error_mark_node before returning an error.
2934
2935 2008-02-14 Douglas Gregor <doug.gregor@gmail.com>
2936
2937 PR c++/34050
2938 * pt.c (tsubst_initializer_list): Deal with the use of
2939 VOID_TYPE_NODE to indicate value-initialization of the bases.
2940
2941 2008-02-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2942 Jason Merrill <jason@redhat.com>
2943
2944 PR c++/5645
2945 PR c++/11159
2946 * class.c (type_has_user_nondefault_constructor): New fn.
2947 * cp-tree.h: Declare it.
2948 * init.c (emit_mem_initializers): Use it for -W warning about
2949 missing base initializer.
2950
2951 2008-02-14 Paolo Carlini <pcarlini@suse.de>
2952
2953 PR c++/28743
2954 * pt.c (determine_specialization): In case of function templates,
2955 when the type of DECL does not match FN there is no match.
2956
2957 2008-02-13 Jakub Jelinek <jakub@redhat.com>
2958 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2959
2960 PR c++/35138
2961 * parser.c (cp_parser_pseudo_destructor_name): If next tokens
2962 are not identifier :: ~, return before calling cp_parser_type_name.
2963
2964 2008-02-13 Jason Merrill <jason@redhat.com>
2965
2966 PR c++/34962, c++/34937, c++/34939
2967 * decl2.c (is_late_template_attribute): Always defer attributes
2968 vector_size and weak.
2969
2970 PR c++/34774
2971 * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
2972 of enumerators, too.
2973
2974 2008-02-12 Jason Merrill <jason@redhat.com>
2975
2976 PR c++/34824
2977 * call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
2978 if we're doing conversions to call a user-defined conversion function.
2979
2980 2008-02-12 Steven Bosscher <steven@gcc.gnu.org>
2981
2982 PR c++/29048
2983 * semantics.c (finish_qualified_id_expr): Avoid duplicate access
2984 check here, too.
2985
2986 2008-02-12 Jakub Jelinek <jakub@redhat.com>
2987
2988 PR c++/34862
2989 * init.c (build_new_1): Don't create placement_expr before
2990 constructing alloc_call. Verify that the pointer is passed by
2991 value to operator new.
2992
2993 2008-02-11 Jason Merrill <jason@redhat.com>
2994
2995 PR c++/35097
2996 * pt.c (tsubst): Don't look up a template typedef in an explicit
2997 specialization.
2998
2999 2008-02-11 Douglas Gregor <doug.gregor@gmail.com>
3000
3001 PR c++/35113
3002 * tree.c (cp_build_qualified_type_real): When building a
3003 cv-qualified array type, build it as a unique type with
3004 build_cplus_array_type_1 and then adopt the unqualified type's
3005 main variant.
3006
3007 2008-02-11 Paolo Carlini <pcarlini@suse.de>
3008
3009 PR c++/35077
3010 * decl.c (groktypename): Check grokdeclarator return.
3011
3012 2008-02-10 Jason Merrill <jason@redhat.com>
3013
3014 PR c++/34094
3015 * decl2.c (cp_write_global_declarations): Don't write out static
3016 data members with DECL_IN_AGGR_P set.
3017
3018 2008-02-08 Jason Merrill <jason@redhat.com>
3019
3020 PR c++/35116
3021 * tree.c (build_target_expr_with_type): Handle void initializer.
3022 (bot_manip): Remap slot before recursing.
3023
3024 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3025
3026 PR other/35107
3027 * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
3028
3029 2008-02-06 Alexandre Oliva <aoliva@redhat.com>
3030
3031 PR c++/35056
3032 * tree.c: Include tree-flow.h.
3033 (build_target_expr): Check type compatibility.
3034 * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
3035 * call.c (convert_like_real): Convert bitfield to expected type.
3036
3037 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
3038
3039 PR c++/35049
3040 PR c++/35096
3041 * typeck.c (structural_comptypes): Call cp_comptypes.
3042 (comptypes): New; called from the C/C++ common bits to perform
3043 strict checks.
3044 (cp_comptypes): Renamed from comptypes, which is already used,
3045 with a different signature, by the C++ front end.
3046 (build_reinterpret_cast_1): Call cp_comptypes.
3047 (ptr_reasonably_similar): Ditto.
3048 * decl.c (decls_match): Ditto.
3049 * cvt.c (convert_to_reference): Ditto.
3050 * cp-tree.h (same_type_p): Ditto.
3051 (same_or_base_type_p): Ditto.
3052 (comptypes): Rename to cp_comptypes.
3053 * pt.c (canonical_type_parameter): Call cp_comptypes.
3054
3055 2008-02-05 Jakub Jelinek <jakub@redhat.com>
3056
3057 PR c++/33553
3058 * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
3059 value dependent expression.
3060
3061 2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
3062
3063 PR c++/35074
3064 * decl2.c (save_template_attributes): When we're modifying the
3065 TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
3066 all of the other variants to add those same attributes. Otherwise,
3067 the main variant will be inconsistent with those other variants.
3068
3069 2008-02-04 Richard Guenther <rguenther@suse.de>
3070
3071 PR java/35035
3072 * decl.c (record_builtin_java_type): Make jboolean a
3073 integer type again where its mode doesn't match that of bool.
3074
3075 2008-02-02 Jason Merrill <jason@redhat.com>
3076 Mark Mitchell <mark@codesourcery.com>
3077
3078 PR c++/33916
3079 * init.c (build_value_init_1): New function.
3080 (build_value_init): New function.
3081 * typeck2.c (build_functional_cast): Call it.
3082 * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
3083
3084 * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
3085 TYPE_HAS_CONSTRUCTOR.
3086 * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
3087 add_implicitly_declared_members): Adjust.
3088 (check_field_decls): Adjust. Remove warnings about reference/const
3089 in class without constructor.
3090 (check_bases_and_members): Adjust. Give those warnings here instead.
3091 * decl.c (fixup_anonymous_aggr): Adjust.
3092 (check_initializer): Adjust, clarify logic slightly.
3093 (grok_special_member_properties): Adjust, only set if user-provided.
3094 * rtti.c (create_tinfo_types): Don't set.
3095 * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
3096 Use same_type_ignoring_top_level_qualifiers_p.
3097 * pt.c (check_explicit_specialization): Adjust.
3098 (instantiate_class_template): Adjust.
3099
3100 2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
3101 Jakub Jelinek <jakub@redhat.com>
3102
3103 PR c++/34935
3104 PR c++/34936
3105 * typeck.c (structural_comptypes): Handle comparisons of
3106 VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
3107 REAL_TYPE nodes.
3108 * mangle.c (write_builtin_type): Map down to the canonical type,
3109 which will be one of the predefined type nodes.
3110
3111 2008-01-29 Michael Meissner <michael.meissner@amd.com>
3112
3113 PR 35004
3114 * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
3115 bits to allow for expansion of the number of middle end tree
3116 codes.
3117
3118 2008-01-29 Douglas Gregor <doug.gregor@gmail.com>
3119
3120 PR c++/34055
3121 PR c++/34103
3122 PR c++/34219
3123 PR c++/34606
3124 PR c++/34753
3125 PR c++/34754
3126 PR c++/34755
3127 PR c++/34919
3128 PR c++/34961
3129 * typeck.c (check_return_expr): Tweak call to
3130 check_for_bare_parameter_packs.
3131 * class.c (add_method): Be careful with error_mark_nodes.
3132 * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
3133 signature.
3134 * pt.c (struct find_parameter_pack_data): Remove
3135 SET_PACKS_TO_ERROR.
3136 (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
3137 (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
3138 (make_pack_expansion): Ditto.
3139 (check_for_bare_parameter_packs): Parameter is now a tree, not a
3140 tree*.
3141 (process_template_parm): Tweak call to
3142 check_for_bare_parameter_packs.
3143 (push_template_decl_real): Tweak calls to
3144 check_for_bare_parameter_packs. If bare parameter packs are found
3145 in the list of exceptions, clear out that list after giving an
3146 error.
3147 * semantics.c (finish_cond): Tweak call to
3148 check_for_bare_parameter_packs.
3149 (finish_expr_stmt): Ditto.
3150 (finish_for_expr): Ditto.
3151 (finish_switch_cond): Ditto.
3152 (finish_mem_initializers): Ditto.
3153 (finish_member_declaration): Ditto.
3154 (finish_static_assert): Check for bare parameter packs in the
3155 condition.
3156 * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
3157 attributes of a declaration.
3158 * parser.c (cp_parser_using_declaration): Tweak call to
3159 check_for_bare_parameter_packs.
3160 (cp_parser_base_clause): Ditto.
3161
3162 2008-01-28 Jason Merrill <jason@redhat.com>
3163
3164 PR c++/35007
3165 * class.c (build_base_path): Fix !want_pointer case.
3166
3167 2008-01-27 Jason Merrill <jason@redhat.com>
3168
3169 PR c++/27177
3170 * class.c (build_base_path): Fix previous change.
3171
3172 2008-01-26 Jakub Jelinek <jakub@redhat.com>
3173
3174 PR c++/34965
3175 * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
3176 and TRUTH_XOR_EXPR.
3177
3178 2008-01-26 Richard Guenther <rguenther@suse.de>
3179
3180 PR c++/34235
3181 * typeck.c (build_binary_op): Remove code to shorten compares.
3182
3183 2008-01-25 Richard Guenther <rguenther@suse.de>
3184
3185 PR c++/33887
3186 * decl.c (record_builtin_java_type): Make __java_boolean
3187 a variant of bool.
3188 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
3189 after TYPE_MAIN_VARIANT check.
3190
3191 2008-01-25 Jason Merrill <jason@redhat.com>
3192
3193 PR c++/27177
3194 * class.c (build_base_path): Don't mess with virtual access if
3195 skip_evaluation.
3196 * call.c (standard_conversion): Don't check whether source type
3197 is complete.
3198
3199 * decl2.c (is_late_template_attribute): Don't defer attribute
3200 visibility just because the type is dependent.
3201
3202 2008-01-25 Jason Merrill <jason@redhat.com>
3203 Mark Mitchell <mark@codesourcery.com>
3204
3205 PR c++/31780
3206 * call.c (standard_conversion): Allow conversion from integer/real
3207 to complex.
3208 (compare_ics): Such a conversion is worse than a normal arithmetic
3209 conversion.
3210
3211 2008-01-25 Richard Guenther <rguenther@suse.de>
3212
3213 PR c++/33887
3214 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
3215 to true.
3216
3217 2008-01-24 Paolo Carlini <pcarlini@suse.de>
3218
3219 PR c++/34603
3220 * pt.c (push_template_decl_real): Return error_mark_node in case
3221 of template definition of non-template.
3222
3223 2008-01-24 Jason Merrill <jason@redhat.com>
3224
3225 PR c++/34913
3226 * decl2.c (is_late_template_attribute): Defer any attribute with
3227 dependent args. Also defer type attributes if the type is dependent.
3228
3229 2008-01-22 Jakub Jelinek <jakub@redhat.com>
3230 Alexandre Oliva <aoliva@redhat.com>
3231
3232 PR c++/33984
3233 * call.c (reference_binding): For bitfields use the declared bitfield
3234 type.
3235 (add_builtin_candidates): Likewise.
3236 * class.c (layout_class_type): For bitfields copy over the
3237 original type quals.
3238
3239 2008-01-22 Jason Merrill <jason@redhat.com>
3240
3241 PR c++/28560
3242 * decl.c (groktypename): Also ignore attributes on dependent
3243 possibly-class types.
3244
3245 PR c++/34912
3246 * friend.c (do_friend): Check for prior declaration of a friend
3247 function of a local class.
3248 * name-lookup.c (lookup_name_innermost_nonclass_level):
3249 No longer static.
3250 * name-lookup.h: Declare it.
3251
3252 2008-01-22 Tom Tromey <tromey@redhat.com>
3253
3254 PR c++/34829:
3255 * init.c (build_new_1): Only disallow Java aggregates.
3256
3257 2008-01-22 Jakub Jelinek <jakub@redhat.com>
3258
3259 PR c++/34607
3260 * semantics.c (finish_omp_for): Don't call c_finish_omp_for
3261 if decl or init is error_mark_node.
3262
3263 PR c++/34918
3264 * error.c (dump_expr): Handle VECTOR_CST.
3265
3266 2008-01-21 Jason Merrill <jason@redhat.com>
3267
3268 PR c++/33959
3269 * pt.c (tsubst_aggr_type): Make sure our context is complete.
3270
3271 PR c++/34573
3272 * pt.c (retrieve_local_specialization): Robustify.
3273 (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
3274
3275 PR c++/34846
3276 * pt.c (tsubst): Only call retrieve_local_specialization if the
3277 original typedef was in a function template.
3278
3279 PR c++/34196
3280 * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
3281
3282 2008-01-21 Richard Guenther <rguenther@suse.de>
3283
3284 PR c++/34850
3285 * error.c (cp_print_error_function): Deal with recursive
3286 BLOCK trees.
3287
3288 2008-01-20 Paolo Carlini <pcarlini@suse.de>
3289
3290 PR c++/34891
3291 * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
3292
3293 2008-01-20 Paolo Carlini <pcarlini@suse.de>
3294
3295 PR c++/34776
3296 PR c++/34486
3297 * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
3298 on non-IS_AGGR_TYPE scope.
3299 (constructor_name_p): Assert IS_AGGR_TYPE.
3300
3301 2008-01-18 Ian Lance Taylor <iant@google.com>
3302
3303 PR c++/33407
3304 * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
3305 (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
3306 DECL_IS_OPERATOR_NEW flag.
3307
3308 2008-01-16 Richard Guenther <rguenther@suse.de>
3309
3310 PR c++/33819
3311 * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
3312 for conversions to type variants.
3313
3314 2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
3315
3316 * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
3317 declaration and code. Update copyright year.
3318
3319 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3320
3321 PR c++/34399
3322 * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
3323 know we have a class type.
3324
3325 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3326
3327 PR c++/34751
3328 * pt.c (coerce_template_parameter_pack): When substituting into
3329 the type of a non-type template parameter pack. use the
3330 deduced/substituted arguments.
3331 * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
3332 can be a parameter pack with the ellipsis following it. When we
3333 have an erroneous declaration, allow it to be a parameter pack.
3334 (cp_parser_template_parameter): Complain about default
3335 arguments on non-type template parameter packs, and parse them
3336 using the new cp_parser_default_argument.
3337 (cp_parser_parameter_declaration): Complain about parameter packs
3338 with default arguments. Move parsing of default arguments into a
3339 new function, cp_parser_default_argument.
3340 (cp_parser_default_argument): New; extracted from
3341 cp_parser_parameter_declaration.
3342
3343 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3344
3345 PR c++/34051
3346 PR c++/34055
3347 PR c++/34102
3348 PR c++/34103
3349 * typeck.c (check_return_expr): If there are bare parameter packs
3350 in the return value, set it to error_mark_node.
3351 * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
3352 * pt.c (find_parameter_packs_r): Look at the type of
3353 IDENTIFIER_NODEs (e.g., for user-defined conversions).
3354 (check_for_bare_parameter_packs): Flip the result: now returns
3355 TRUE when there were bare parameter packs, FALSE otherwise.
3356 (push_template_decl_real): Deal with flipped result of
3357 check_for_bare_parameter_packs.
3358 * semantics.c (finish_cond): If there are bare parameter packs in
3359 the conditional, set it to error_mark_node.
3360 (finish_expr_stmt): If there are bare parameter packs in the
3361 expression, set it to error_mark_node.
3362 (finish_for_expr): Ditto.
3363 (finish_switch_cond): If there are bare parameter packs in
3364 the conditional, set it to error_mark_node.
3365 (finish_mem_initializers): If there are bare parameter packs in
3366 the member initializer, set it to error_mark_node.
3367 (finish_member_declaration): Check the attributes of the
3368 declaration for bare parameter packs, and remove the attributes if
3369 any have bare parameter packs.
3370 * parser.c (cp_parser_using_declaration): Check the using
3371 declaration for bare parameter packs.
3372 (cp_parser_base_clause): If there are bare parameter packs in a
3373 base specifier, don't add it to the chain.
3374
3375 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3376
3377 PR c++/34314
3378 * error.c (dump_simple_decl): Display ellipsis for template
3379 non-type parameter packs.
3380 (dump_decl): Display ellipsis for template type parameter packs.
3381 (dump_template_decl): Display ellipsis for template template
3382 parameter packs.
3383 * pt.c (redeclare_class_template): When redeclaring a class
3384 template, check for collisions between template parameters and
3385 template parameter packs.
3386
3387 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3388
3389 PR c++/33964
3390 * pt.c (process_partial_specialization): Don't mark template
3391 parameters that occur in non-deduced contexts.
3392 (struct pair_fn_data): Add include_nondeduced_p.
3393 (for_each_template_parm_r): Only visit non-deduced contexts if
3394 include_nondeduced_p is set.
3395 (for_each_template_parm): Added parameter include_nondeduced_p,
3396 which states whether template parameters found in non-deduced
3397 contexts should be visited.
3398 (uses_template_parms): Visit all template parameters, even those
3399 in non-deduced contexts.
3400
3401 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3402
3403 PR c++/34052
3404 * pt.c (check_default_tmpl_args): Check for parameter packs that
3405 aren't at the end of a primary template.
3406 (push_template_decl_real): Remove check for parameter packs that
3407 aren't at the end of a primary template; that now happens in
3408 check_default_tmpl_args.
3409 * semantics.c (finish_template_template_parm): Use
3410 check_default_tmpl_args to check for errors in the template
3411 parameter list.
3412
3413 2008-01-12 Doug Kwan <dougkwan@google.com>
3414
3415 * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
3416 instead of OPT_Wreturn_type in warning due to ignored return type
3417 qualifiers.
3418 * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
3419 instead of OPT_Wreturn_type in warning due to ignored return type
3420 qualifiers.
3421
3422 2008-01-08 Jakub Jelinek <jakub@redhat.com>
3423
3424 PR c++/33890
3425 * semantics.c (finish_omp_for): Don't call
3426 fold_build_cleanup_point_expr if processing_template_decl.
3427
3428 2008-01-04 Paolo Carlini <pcarlini@suse.de>
3429 Jakub Jelinek <jakub@redhat.com>
3430
3431 PR c++/34611
3432 * error.c (dump_template_argument): Deal with TREE_LIST.
3433
3434 2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
3435
3436 * parser.c (cp_parser_check_decl_spec): Don't warn about "long
3437 long" in C++0x mode; change the warning to note that "long long"
3438 is only unsupported in C++98 mode.
3439
3440 2007-12-20 Jason Merrill <jason@redhat.com>
3441
3442 PR c++/34111
3443 * call.c (standard_conversion): Derived-to-base is considered a
3444 standard conversion.
3445
3446 2007-12-19 Jakub Jelinek <jakub@redhat.com>
3447
3448 PR c++/34513
3449 * parser.c (cp_parser_omp_parallel): For non-combined parallel
3450 call cp_parser_statement rather than
3451 cp_parser_already_scoped_statement.
3452
3453 2007-12-18 Jason Merrill <jason@redhat.com>
3454
3455 PR c++/34206
3456 * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
3457 use template parms.
3458 (dependent_type_p_r): Handle the domain of an array.
3459
3460 2007-12-18 Douglas Gregor <doug.gregor@gmail.com>
3461 Jakub Jelinek <jakub@redhat.com>
3462
3463 PR c++/32565
3464 PR c++/33943
3465 PR c++/33965
3466 * pt.c (template_template_parm_bindings_ok_p): New; verifies
3467 bindings of template template parameters after all template
3468 arguments have been deduced.
3469 (coerce_template_parms): Don't complain when COMPLAIN doesn't
3470 include tf_error.
3471 (fn_type_unification): Use template_template_parm_bindings_ok_p.
3472 (unify): Deal with variadic, bound template template parameters.
3473 (get_class_bindings): Use template_template_parm_bindings_ok_p.
3474
3475 2007-12-18 Jakub Jelinek <jakub@redhat.com>
3476
3477 PR c++/34488
3478 * decl.c (grokdeclarator): Reject friend sfk_constructor
3479 FUNCTION_TYPE.
3480
3481 2007-12-17 Jakub Jelinek <jakub@redhat.com>
3482
3483 PR c/34506
3484 * parser.c (cp_parser_omp_all_clauses): Accept optional comma
3485 in between clauses.
3486
3487 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
3488
3489 PR debug/7081
3490 * cp-lang.c (cp_classify_record): New.
3491 (LANG_HOOKS_CLASSIFY_RECORD): Override.
3492
3493 2007-12-11 Jakub Jelinek <jakub@redhat.com>
3494
3495 PR c++/34238
3496 * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
3497
3498 PR c++/34364
3499 * rtti.c (build_dynamic_cast): Call convert_from_reference even for
3500 dynamic_cast in a template.
3501
3502 2007-12-10 Simon Martin <simartin@users.sourceforge.net>
3503
3504 PR c++/34059
3505 * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
3506 MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
3507
3508 2007-12-10 Jakub Jelinek <jakub@redhat.com>
3509
3510 PR c++/34395
3511 * error.c (dump_type_prefix, dump_type_suffix): Handle
3512 TYPE_PACK_EXPANSION.
3513
3514 PR c++/34394
3515 * error.c (dump_expr): Handle ABS_EXPR.
3516
3517 2007-12-09 Jakub Jelinek <jakub@redhat.com>
3518
3519 PR c++/34178
3520 PR c++/34340
3521 * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
3522 in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
3523 Return 2 also if DECL_EXPLICIT_INSTANTIATION.
3524 * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
3525 flag_use_repository and repo_emit_p returned 2.
3526
3527 2007-12-06 Jakub Jelinek <jakub@redhat.com>
3528
3529 PR c++/34336
3530 * tree.c (stabilize_call, stabilize_init): Do nothing if
3531 processing_template_decl.
3532
3533 2007-12-05 Jakub Jelinek <jakub@redhat.com>
3534
3535 PR c++/34271
3536 * semantics.c (finish_decltype_type): For SCOPE_REF issue an
3537 error instead of assertion failure.
3538 * parser.c (cp_parser_decltype): If closing paren is not found,
3539 return error_mark_node.
3540
3541 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3542
3543 PR c++/34101
3544 * name-lookup.c (arg_assoc_template_arg): Recurse on argument
3545 packs.
3546 (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
3547 since arg_assoc_template_arg will deal with them (better).
3548
3549 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3550
3551 PR c++/33509
3552 * pt.c (tsubst_exception_specification): Handle substitutions into
3553 member templates, where tsubst_pack_expansion returns a
3554 TYPE_PACK_EXPANSION.
3555
3556 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3557
3558 PR c++/33091
3559 * pt.c (unify_pack_expansion): If we didn't deduce any actual
3560 bindings for the template parameter pack, don't try to keep the
3561 empty deduced arguments.
3562 (unify): If a parameter is a template-id whose template argument
3563 list contains a pack expansion that is not at the end, then we
3564 cannot unify against that template-id.
3565
3566 2007-12-02 Paolo Carlini <pcarlini@suse.de>
3567
3568 PR c++/34061
3569 * pt.c (current_template_args): Use error_operand_p.
3570
3571 2007-12-02 Paolo Carlini <pcarlini@suse.de>
3572
3573 PR c++/34273
3574 * error.c (dump_decl): Handle TREE_BINFO.
3575
3576 2007-12-01 Ollie Wild <aaw@google.com>
3577
3578 PR c++/8171
3579 * typeck.c (build_binary_op): Add conversion of pointers to function
3580 members appearing as operands to the equality operators.
3581
3582 2007-11-30 Jakub Jelinek <jakub@redhat.com>
3583
3584 PR c++/34275
3585 * error.c (dump_expr): Handle OBJ_TYPE_REF.
3586
3587 2007-11-29 Jakub Jelinek <jakub@redhat.com>
3588
3589 PR c++/34270
3590 * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
3591 in templates.
3592 * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
3593 Likewise.
3594
3595 PR c++/34267
3596 PR c++/34268
3597 * parser.c (cp_parser_decltype): Don't call finish_id_expression
3598 on ~type.
3599 * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
3600 and ~type early.
3601
3602 2007-11-27 Jakub Jelinek <jakub@redhat.com>
3603
3604 PR tree-optimization/34181
3605 * method.c (use_thunk): Don't inline the call in the thunk.
3606
3607 PR c++/34213
3608 * tree.c (decl_linkage): Static data members and static member
3609 functions in anonymous ns classes are lk_external.
3610
3611 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
3612
3613 PR c++/34081
3614 * decl.c (start_preparsed_function): Pass
3615 processing_template_decl for the new allocate_struct_function
3616 parameter.
3617
3618 2007-11-25 Richard Guenther <rguenther@suse.de>
3619
3620 * decl.c (poplevel): Use BLOCK_CHAIN.
3621
3622 2007-11-24 Ollie Wild <aaw@google.com>
3623
3624 * typeck.c (delta_from_ptrmemfunc): New function.
3625 (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
3626 (build_binary_op): Call delta_from_ptrmemfunc.
3627
3628 2007-11-23 Jakub Jelinek <jakub@redhat.com>
3629
3630 PR c++/30293
3631 PR c++/30294
3632 * decl.c (cp_finish_decl): Disallow variable or field
3633 definitions if extern "Java" aggregates.
3634 (grokparms): Disallow parameters with extern "Java"
3635 aggregates.
3636 (check_function_type): Disallow function return values
3637 with extern "Java" aggregates.
3638 * init.c (build_new_1): Disallow placement new with
3639 extern "Java" aggregates.
3640
3641 2007-11-23 Mark Mitchell <mark@codesourcery.com>
3642 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3643
3644 PR c++/5310
3645 * call.c (convert_like_real): Build a zero constant when __null is
3646 converted to an integer type.
3647
3648 2007-11-22 Jakub Jelinek <jakub@redhat.com>
3649
3650 PR c++/34094
3651 * decl2.c (cp_write_global_declarations): Issue error about static
3652 data members in anonymous namespace which are declared and used,
3653 but not defined.
3654
3655 2007-11-20 Jakub Jelinek <jakub@redhat.com>
3656
3657 PR c++/34089
3658 * parser.c (cp_parser_class_head): Reject function template ids.
3659
3660 PR c++/28879
3661 * tree.c (build_cplus_array_type_1): Don't pass any VLA types
3662 when processing_template_decl to build_array_type.
3663
3664 PR c++/33962
3665 * pt.c (more_specialized_fn): Don't segfault if one or
3666 both argument list end with ellipsis.
3667
3668 2007-11-18 Jakub Jelinek <jakub@redhat.com>
3669
3670 PR c++/30988
3671 * semantics.c (finish_call_expr): Set
3672 current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
3673 or OVERLOAD with all noreturn functions.
3674
3675 2007-11-16 Jakub Jelinek <jakub@redhat.com>
3676
3677 PR c++/34100
3678 * pt.c (apply_late_template_attributes): Do nothing if decl's type is
3679 error_mark_node.
3680
3681 2007-11-13 Jakub Jelinek <jakub@redhat.com>
3682
3683 PR c++/34054
3684 PR c++/34056
3685 PR c++/34057
3686 PR c++/34058
3687 PR c++/34060
3688 * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
3689 set to error_mark_node the outermost POINTER_TYPE to the pack if
3690 it is seen in a POINTER_TYPE.
3691 (push_template_decl_real): If check_for_bare_parameter_packs
3692 fails for function return type, set the return type to
3693 integer_type_node. If check_for_bare_parameter_packs failed
3694 for non-function, return error_mark_node.
3695
3696 PR c++/29225
3697 * call.c (build_new_op): Call resolve_args before calling
3698 build_over_call.
3699
3700 2007-11-11 Tom Tromey <tromey@redhat.com>
3701
3702 PR c++/17577:
3703 * lex.c (handle_pragma_implementation): Use cpp_included_before.
3704
3705 2007-11-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3706
3707 PR c++/8570
3708 * pt.c (redeclare_class_template): Update error message. Use a
3709 note to show the previous declaration.
3710 (tsubst_friend_class): Use the location of the friend template as
3711 the input location before calling redeclare_class_template.
3712
3713 2007-11-11 Jakub Jelinek <jakub@redhat.com>
3714
3715 PR c++/34068
3716 * semantics.c (finish_pseudo_destructor_expr): Handle
3717 object == error_mark_node.
3718
3719 2007-11-10 Jakub Jelinek <jakub@redhat.com>
3720
3721 PR c++/32241
3722 * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
3723 is not scalar type, let finish_class_member_access_expr handle
3724 diagnostics. Pass BIT_NOT_EXPR argument to
3725 finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
3726
3727 2007-11-09 Douglas Gregor <doug.gregor@gmail.com>
3728
3729 PR c++/33510
3730 * decl.c (cp_complete_array_type): If any of the initializer
3731 elements are pack expansions, don't compute the array size yet.
3732
3733 2007-11-08 Andrew Pinski <pinskia@gmail.com>
3734
3735 PR c++/30297:
3736 * tree.c (decl_linkage): Fields have no linkage.
3737
3738 2007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
3739
3740 * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
3741
3742 2007-11-07 Douglas Gregor <doug.gregor@gmail.com>
3743
3744 PR c++/33045
3745 PR c++/33837
3746 PR c++/33838
3747 * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
3748 Be careful with ERROR_MARK_NODEs.
3749 * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
3750 argument.
3751
3752 2007-11-07 Jakub Jelinek <jakub@redhat.com>
3753
3754 PR c++/33501
3755 * call.c (build_over_call): Don't check TREE_ADDRESSABLE
3756 on incomplete type.
3757
3758 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
3759
3760 PR c++/33977
3761 PR c++/33886
3762 * tree.c (c_build_qualified_type): Define bridge to
3763 cp_build_qualified_type.
3764
3765 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
3766
3767 PR c++/31439
3768 PR c++/32114
3769 PR c++/32115
3770 PR c++/32125
3771 PR c++/32126
3772 PR c++/32127
3773 PR c++/32128
3774 PR c++/32253
3775 PR c++/32566
3776 * typeck.c (check_return_expr): Pass address of retval to
3777 check_for_bare_parameter_packs.
3778 * class.c (build_base_field): Tolerate bases that have no layout
3779 due to errors.
3780 (end_of_base): Ditto.
3781 * tree.c (canonical_type_variant): Be careful with
3782 ERROR_MARK_NODE.
3783 * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
3784 tree*.
3785 * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
3786 which states whether parameter packs should be replaced with
3787 ERROR_MARK_NODE.
3788 (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
3789 possible. If set_packs_to_error is set true, replace the parameter
3790 pack with ERROR_MARK_NODE. Manage our own pointer sets.
3791 (uses_parameter_packs): Don't set parameter packs to
3792 ERROR_MARK_NODE.
3793 (check_for_bare_parameter_packs): Now takes a pointer to a tree,
3794 which may be modified (if it is a parameter pack). Instructs
3795 find_parameter_packs_r to replace parameter packs with
3796 ERROR_MARK_NODE (so that they won't cause errors later on).
3797 (process_template_parm): Pass pointer to
3798 check_for_bare_parameter_packs.
3799 (process_partial_specialization): Replace pack expansions before
3800 the end of the template argument list with ERROR_MARK_NODE.
3801 (push_template_decl_real): Pass pointer to
3802 check_for_bare_parameter_packs. Replace parameter packs not at the
3803 end of the template parameter list with ERROR_MARK_NODE.
3804 (convert_template_argument): Be more careful about using DECL_NAME
3805 on only declarations.
3806 (unify): Can't unify against ERROR_MARK_NODE.
3807 * semantics.c (finish_cond): Pass pointer to
3808 check_for_bare_parameter_packs.
3809 (finish_expr_stmt): Ditto.
3810 (finish_for_expr): Ditto.
3811 (finish_switch_cond): Pass pointer to
3812 check_for_bare_parameter_packs, and call it before we put the
3813 condition into the statement.
3814 (finish_mem_initializers): Pass pointer to
3815 check_for_bare_parameter_packs.
3816 (finish_member_declaration): Ditto.
3817 * parser.c (cp_parser_base_clause): Ditto.
3818
3819 2007-11-06 Jakub Jelinek <jakub@redhat.com>
3820
3821 PR target/33168
3822 * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
3823 with the final TREE_READONLY flag in place. processing_template_decl
3824 is known to be 0 in this part of function.
3825
3826 PR c++/33894
3827 * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
3828 OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
3829 * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
3830 * semantics.c (finish_omp_atomic): Revert most of the
3831 2007-02-05 changes, just keep the new representation of
3832 OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
3833
3834 2007-11-05 H.J. Lu <hongjiu.lu@intel.com>
3835
3836 PR c++/33871
3837 * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
3838 local.
3839
3840 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
3841
3842 PR c++/33996
3843 PR c++/33235
3844 PR c++/33930
3845 * typeck.c (merge_types): Don't lose rvalue references when
3846 merging types.
3847 * call.c (build_over_call): Don't elide move constructors just
3848 because the copy constructor is trivial (!).
3849 (compare_ics): If comparing cv-qualifiers fails, we can still order
3850 based on binding lvalues vs. rvalues.
3851
3852 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
3853
3854 PR c++/33939
3855 * pt.c (unify_pack_expansion): bring handling of function call
3856 arguments into line with type_unification_real.
3857
3858 2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3859
3860 * typeck.c (build_binary_op): Use pedwarn instead of error for
3861 consistency.
3862
3863 2007-11-05 Jakub Jelinek <jakub@redhat.com>
3864
3865 PR c++/33836
3866 * parser.c (cp_parser_unary_expression): For &&label call
3867 cp_parser_non_integral_constant_expression and return error_mark_node
3868 if it returned true.
3869
3870 PR c++/33969
3871 * decl.c (grokdeclarator): Don't call build_memfn_type if type
3872 is neither FUNCTION_TYPE nor METHOD_TYPE.
3873
3874 2007-11-02 Jakub Jelinek <jakub@redhat.com>
3875
3876 PR c++/33516
3877 * parser.c (cp_parser_nested_name_specifier_opt): Use
3878 TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
3879 typedef of currently open class.
3880
3881 2007-11-02 Paolo Carlini <pcarlini@suse.de>
3882
3883 PR c++/33495
3884 * error.c (dump_expr): Deal specially with statements.
3885
3886 2007-11-01 Jason Merrill <jason@redhat.com>
3887
3888 PR c++/30897
3889 * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
3890 template parms.
3891 (lookup_template_class): Use it to get the outer template args
3892 for instantiating one.
3893
3894 PR c++/29236
3895 * pt.c (reduce_template_parm_level): tsubst the parameters
3896 of a template template parm.
3897
3898 2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
3899
3900 PR c++/33955
3901 * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
3902
3903 2007-11-01 Jakub Jelinek <jakub@redhat.com>
3904
3905 PR c++/32384
3906 * parser.c (cp_parser_postfix_dot_deref_expression): If
3907 POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
3908 first and if that succeeds and type is SCALAR_TYPE_P, create
3909 PSEUDO_DTOR_EXPR.
3910
3911 PR c++/32260
3912 * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
3913 (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
3914 as for std::type_info.
3915
3916 2007-10-31 Paolo Carlini <pcarlini@suse.de>
3917
3918 PR c++/33494
3919 * cxx-pretty-print.c (pp_cxx_typeid_expression,
3920 pp_cxx_delete_expression): Change to static linkage.
3921 * cxx-pretty-print.h: Adjust declarations.
3922 * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
3923 MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
3924 MODOP_EXPR): Forward to pp_expression.
3925
3926 * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
3927 Fix typo.
3928
3929 2007-10-31 Christian Bruel <christian.bruel@st.com>
3930 Mark Mitchell <mark@codesourcery.com>
3931
3932 PR c++/19531
3933 * typeck.c (check_return_expr): Don't set named_return_value_okay_p
3934 if retval is volatile.
3935
3936 2007-10-30 Jakub Jelinek <jakub@redhat.com>
3937
3938 PR c++/33616
3939 * decl2.c (build_offset_ref_call_from_tree): Call
3940 build_non_dependent_expr on object prior to building ADDR_EXPR from it
3941 if FN is DOTSTAR_EXPR.
3942
3943 2007-10-30 Douglas Gregor <doug.gregor@gmail.com>
3944
3945 PR c++/31993
3946 PR c++/32252
3947 * pt.c (find_parameter_packs_r): Fix typo in comment.
3948 (convert_template_argument): Look at the pattern of a pack
3949 expansion to determine what kind of entity we're converting.
3950 (coerce_template_parameter_pack): When we have coerced a non-type
3951 template parameter pack, substitute into the type of that pack.
3952 (tsubst_pack_expansion): When our substitution of a parameter pack
3953 is a "trivial" substitution of itself, just substitute into the
3954 pack expansion rather than actually expanding.
3955
3956 2007-10-29 Jakub Jelinek <jakub@redhat.com>
3957
3958 PR c++/33841
3959 * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
3960 for non-integral type bitfields. Return true if bitfield is correct, false
3961 error has been diagnosed.
3962 (check_field_decls): If check_bitfield_decl returned false, call also
3963 check_field_decl.
3964
3965 2007-10-28 Paolo Carlini <pcarlini@suse.de>
3966 Mark Mitchell <mark@codesourcery.com>
3967
3968 PR c++/30659
3969 * pt.c (do_decl_instantiation): If the VAR_DECL is not a
3970 class member error out and return.
3971
3972 2007-10-27 Jakub Jelinek <jakub@redhat.com>
3973
3974 * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
3975 to current_function_decl rather than 0.
3976
3977 PR c++/33844
3978 * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
3979 ->* rather than .*.
3980 * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
3981
3982 2007-10-27 Jason Merrill <jason@redhat.com>
3983
3984 PR c++/5247
3985 * call.c (convert_default_arg): Detect recursion.
3986
3987 2007-10-27 Jakub Jelinek <jakub@redhat.com>
3988
3989 PR c++/33842
3990 * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
3991 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
3992 OFFSETOF_EXPR.
3993 (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
3994 functions.
3995 * error.c (dump_expr): Handle OFFSETOF_EXPR.
3996
3997 2007-10-26 Jason Merrill <jason@redhat.com>
3998
3999 PR c++/24791
4000 * pt.c (get_template_info): New fn.
4001 (template_class_depth): Use it.
4002 (push_template_decl_real): Check that the template args of the
4003 definition match the args of the previous declaration.
4004
4005 2007-10-26 Paolo Carlini <pcarlini@suse.de>
4006
4007 PR c++/31988
4008 * decl2.c (coerce_new_type): Do not allow a default argument for
4009 the first parameter.
4010
4011 2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
4012
4013 PR c++/33839
4014 * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
4015 don't see the leading '('. Only lookup names if we get an
4016 IDENTIFIER_NODE.
4017
4018 2007-10-26 Jakub Jelinek <jakub@redhat.com>
4019
4020 PR c++/33744
4021 * parser.c (cp_parser_parenthesized_expression_list): Set
4022 greater_than_is_operator_p to true in between the parens.
4023
4024 2007-10-26 Paolo Carlini <pcarlini@suse.de>
4025
4026 PR c++/31747
4027 * decl.c (grokdeclarator): In case of conflicting specifiers
4028 just return error_mark_node.
4029
4030 2007-10-26 Ollie Wild <aaw@google.com>
4031
4032 * expr.c (cxx_expand_expr): Removed.
4033 * cp-tree.h (exx_expand_expr): Removed.
4034 * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
4035 with c_expand_expr.
4036
4037 2007-10-25 Paolo Carlini <pcarlini@suse.de>
4038
4039 PR c++/33843
4040 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
4041
4042 2007-10-23 Jason Merrill <jason@redhat.com>
4043
4044 PR c++/25950 (DR 391)
4045 * call.c (struct conversion): Remove check_copy_constructor_p.
4046 (reference_binding): Always bind a reference directly to a
4047 compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during
4048 temporary creation.
4049 (check_constructor_callable): Remove.
4050 (convert_like_real): Don't call it.
4051 (initialize_reference): Don't call check_constructor_callable.
4052 (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
4053 LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base
4054 conversions if LOOKUP_NO_TEMP_BIND.
4055 (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
4056 (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
4057 second conversion.
4058 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
4059
4060 2007-10-22 Jakub Jelinek <jakub@redhat.com>
4061
4062 PR c++/33372
4063 * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
4064 before checking if its type is integral.
4065
4066 2007-10-22 Jason Merrill <jason@redhat.com>
4067
4068 PR c++/33620
4069 * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
4070 * pt.c (apply_late_template_attributes): Splice out dependent
4071 attributes from DECL_ATTRIBUTES.
4072
4073 * decl.c (cxx_maybe_build_cleanup): Use build_address.
4074
4075 2007-10-17 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4076
4077 * typeck.c (build_binary_op) : Use appropriate warning option
4078 instead of unnamed warning.
4079
4080 2007-10-16 Paolo Carlini <pcarlini@suse.de>
4081
4082 PR c++/31446
4083 * pt.c (current_template_args): Do not change TREE_LIST elements
4084 with a TREE_VALUE of error_mark_node.
4085
4086 2007-10-16 Mark Mitchell <mark@codesourcery.com>
4087
4088 * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
4089 * decl.c (start_decl): Tidy.
4090 (start_decl_1): Call cp_apply_type_quals_to_decl after completing
4091 the type.
4092 (grokdeclarator): Clarify comment.
4093
4094 2007-10-14 Andrew Pinski <pinskia@gmail.com>
4095
4096 PR c++/30303
4097 * decl.c (grokfndecl): Return NULL after the "definition of
4098 implicitly-declared" error happened.
4099
4100 2007-10-12 Simon Martin <simartin@users.sourceforge.net>
4101
4102 PR c++/26698
4103 * call.c (build_user_type_conversion_1): Do not consider conversion
4104 functions to convert a (possibly cv-qualified) object to the (possibly
4105 cv-qualified) same object type (or a reference to it), to a (possibly
4106 cv-qualified) base class of that type (or a reference to it).
4107
4108 2007-10-12 Paolo Carlini <pcarlini@suse.de>
4109
4110 * pt.c (tsubst): Use template_parm_level_and_index.
4111
4112 2007-10-12 Jakub Jelinek <jakub@redhat.com>
4113
4114 PR c++/32121
4115 * parser.c (cp_parser_compound_statement): Handle label-declarations
4116 at the beginning of the compound statement.
4117 (cp_parser_block_declaration): Issue diagnostics about __label__
4118 not at the beginning of a block.
4119
4120 2007-10-11 Paolo Carlini <pcarlini@suse.de>
4121
4122 PR c++/33461
4123 * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
4124 to convert_template_argument.
4125 (coerce_template_parms): Return error_mark_node after fixed-length
4126 error.
4127 (tsubst_decl): Check for error_mark_node the return value of the
4128 first tsubst in 'case VAR_DECL'.
4129
4130 2007-10-08 Ollie Wild <aaw@google.com>
4131
4132 * typeck2.c (digest_init): Call cplus_expand_constant after
4133 convert_for_initialization.
4134 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
4135 * expr.c (cplus_expand_constant): Updated function description.
4136
4137 2007-10-04 Jason Merrill <jason@redhat.com>
4138
4139 PR c++/20416
4140 * call.c (initialize_reference): Handle local static reference
4141 temps properly.
4142
4143 2007-10-03 Jason Merrill <jason@redhat.com>
4144
4145 PR c++/32470
4146 * name-lookup.c (push_namespace_with_attrs): Fold back into...
4147 (push_namespace): Here.
4148 (handle_namespace_attrs): New fn for the attr code.
4149 (leave_scope): Don't pop_visibility.
4150 * name-lookup.h (struct cp_binding_level): Remove has_visibility.
4151 * parser.c (cp_parser_namespace_definition): Call
4152 handle_namespace_attrs and pop_visibility as appropriate.
4153
4154 PR c++/11756
4155 * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
4156
4157 2007-10-03 Alexandre Oliva <aoliva@redhat.com>
4158
4159 * decl.c (duplicate_decls): Preserve linkage flags for mere
4160 redeclarations of gnu_inline definitions.
4161
4162 2007-10-03 Jason Merrill <jason@redhat.com>
4163
4164 PR c++/15764
4165 * decl.c (wrap_cleanups_r): New fn.
4166 (wrap_temporary_cleanups): New fn.
4167 (initialize_local_var): Call it.
4168
4169 2007-09-29 Jason Merrill <jason@redhat.com>
4170
4171 PR c++/33094
4172 * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
4173 constant to not have DECL_EXTERNAL if it's file-local.
4174
4175 2007-09-28 Ollie Wild <aaw@google.com>
4176
4177 Revert
4178 2007-09-27 Ollie Wild <aaw@google.com>
4179
4180 * typeck2.c (digest_init): Call cplus_expand_constant after
4181 convert_for_initialization.
4182 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
4183 * expr.c (cplus_expand_constant): Updated function description.
4184
4185 2007-09-28 Jason Merrill <jason@redhat.com>
4186
4187 PR c++/10179
4188 * class.c (layout_empty_base): Take rli parameter, update
4189 rli->record_align if empty base has user-specified alignment.
4190 (build_base_field): Pass rli to it.
4191
4192 2007-09-28 Paolo Carlini <pcarlini@suse.de>
4193
4194 PR c++/33213
4195 * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
4196
4197 2007-09-28 Paolo Carlini <pcarlini@suse.de>
4198
4199 PR c++/33118
4200 * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
4201 (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
4202 (dump_parameters): Just call dump_type for argument packs too.
4203
4204 2007-09-28 Jakub Jelinek <jakub@redhat.com>
4205
4206 PR c++/31434
4207 * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
4208 qualification by creating qualified PACK_EXPANSION_PATTERN and
4209 then calling make_pack_expansion on it.
4210
4211 2007-09-27 Ollie Wild <aaw@google.com>
4212
4213 * typeck2.c (digest_init): Call cplus_expand_constant after
4214 convert_for_initialization.
4215 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
4216 * expr.c (cplus_expand_constant): Updated function description.
4217
4218 2007-09-27 Jason Merrill <jason@redhat.com>
4219
4220 PR c++/33571
4221 * decl2.c (is_late_template_attribute): Don't crash on unknown
4222 attribute.
4223
4224 2007-09-27 Paolo Carlini <pcarlini@suse.de>
4225
4226 PR c++/33493
4227 * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
4228 * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
4229 spaces in the formatting.
4230 * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
4231
4232 2007-09-27 Jakub Jelinek <jakub@redhat.com>
4233
4234 * error.c (cxx_print_error_function): Add third argument, pass
4235 it over to lhd_print_error_function.
4236 (cp_print_error_function): If diagnostic->abstract_origin, print
4237 virtual backtrace.
4238 * cp-tree.h (struct diagnostic_info): New forward decl.
4239 (cxx_print_error_function): Add third argument.
4240
4241 2007-09-25 Simon Martin <simartin@users.sourceforge.net>
4242
4243 PR c++/33207
4244 * name-lookup.c (pushtag): Do not create an implicit typedef before
4245 the associated type declaration is known to be valid.
4246
4247 2007-09-25 Jakub Jelinek <jakub@redhat.com>
4248
4249 * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
4250 rather than pointers.
4251
4252 2007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
4253
4254 PR c++/14688
4255 * search.c (check_final_overrider): Fail if
4256 targetm.comp_type_attributes returns 0.
4257
4258 2007-09-24 Jason Merrill <jason@redhat.com>
4259
4260 PR c++/33239
4261 * pt.c (resolve_typename_type): Don't look things up in the original
4262 template if it would mean losing template arguments.
4263
4264 2007-09-24 Jakub Jelinek <jakub@redhat.com>
4265
4266 PR c++/33506
4267 * cp-tree.h (cxx_type_hash_eq): New prototype.
4268 * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
4269 * tree.c (cxx_type_hash_eq): New function.
4270
4271 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
4272
4273 PR c++/33185
4274 * tree.c (cp_build_qualified_type_real): Build a canonical
4275 ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
4276
4277 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
4278
4279 PR c++/33112
4280 PR c++/33185
4281 * tree.c (cplus_array_compare): Compare pointers, not types.
4282 (build_cplus_array_type_1): Store new array type into the hash
4283 table before building the canonical type; build the canonical type
4284 correctly.
4285 (cp_build_qualified_type_real): Put all of the array types with
4286 cv-qualified element types into the C++ array hash table, built as
4287 variants of the unqualified versions.
4288
4289 2007-09-23 Jason Merrill <jason@redhat.com>
4290
4291 PR c++/16370
4292 * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
4293 for deprecation warnings.
4294
4295 2007-09-22 Jason Merrill <jason@redhat.com>
4296
4297 PR c++/15269
4298 * call.c (build_over_call): Warn about deprecated virtuals.
4299
4300 PR c++/19407
4301 * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
4302 (MAYBE_TAGGED_TYPE_P): Remove.
4303 * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
4304 instead of calling is_late_template_attribute again.
4305 (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
4306 (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
4307 Don't crash on typedefs from non-template classes.
4308 * decl2.c (grokfield): Don't sorry about attrs on template parms.
4309 (is_late_template_attribute): All attributes applied to template
4310 parms or typename types are dependent. Static.
4311 (splice_template_attributes): Pass decl through.
4312 (save_template_attributes): Likewise.
4313
4314 2007-09-20 Jakub Jelinek <jakub@redhat.com>
4315
4316 PR c++/33496
4317 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
4318 returned from tsubst_pack_expansion.
4319 (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
4320 (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
4321
4322 2007-09-20 Paolo Carlini <pcarlini@suse.de>
4323
4324 PR c++/33460
4325 * semantics.c (finish_id_expression): Use consistently
4326 context_for_name_lookup.
4327 * decl.c (fixup_anonymous_aggr): Fix error message for
4328 anonymous struct (vs union).
4329
4330 2007-09-19 Jason Merrill <jason@redhat.com>
4331
4332 PR c++/7586
4333 * pt.c (tsubst): Handle typedefs by looking for the specialization.
4334 (retrieve_specialization): Only tagged types use
4335 DECL_TEMPLATE_INSTANTIATIONS.
4336 (instantiate_class_template): Push nested classes too.
4337 (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
4338 tagged types.
4339 * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
4340 * init.c (is_aggr_type): Remove redundant tests.
4341 * class.c (push_nested_class): Use CLASS_TYPE_P.
4342
4343 2007-09-20 Paolo Carlini <pcarlini@suse.de>
4344
4345 PR c++/33459
4346 * init.c (build_zero_init): If, recursively, build_zero_init
4347 returns a NULL_TREE, do not append it to the VEC of constructors.
4348
4349 2007-09-18 Jason Merrill <jason@redhat.com>
4350
4351 PR c++/17743
4352 * pt.c (apply_late_template_attributes): Set processing_template_decl.
4353 (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
4354 ATTR_FLAG_TYPE_IN_PLACE.
4355 (tsubst): Do unqualified lookup to find typedefs from current class.
4356 [ARRAY_TYPE]: Propagate alignment info.
4357 * decl2.c (is_late_template_attribute): Only defer handling of
4358 attribute aligned if the expression is dependent.
4359 (save_template_attributes): If we're deferring any attributes,
4360 make this a naming typedef.
4361
4362 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4363
4364 PR c++/33462 (again)
4365 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
4366 va_arg instead of __builtin_va_arg.
4367
4368 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4369
4370 PR c++/33462
4371 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
4372 (pp_cxx_primary_expression): Use it.
4373 * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
4374 * error.c (dump_expr): Use it.
4375
4376 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4377
4378 PR c++/33463
4379 * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
4380 out case TYPEID_EXPR to...
4381 (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
4382 and pp_cxx_right_paren.
4383 * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
4384 * error.c (dump_expr): Use it.
4385
4386 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4387
4388 PR c++/33464
4389 * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
4390 (pp_cxx_primary_expression): Use it.
4391 * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
4392 * error.c (dump_expr): Use it.
4393
4394 2007-09-16 Paolo Carlini <pcarlini@suse.de>
4395
4396 PR c++/33124
4397 * init.c (build_new): Remove warning for zero-element
4398 allocations.
4399
4400 2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
4401
4402 PR c++/32756
4403 * call.c (maybe_handle_implicit_object): Set this_p, clear
4404 rvaluedness_matches_p.
4405 (compare_ics): Do not compare rvaluedness matching when one of the
4406 operands is an implicit object.
4407
4408 2007-09-14 Jason Merrill <jason@redhat.com>
4409
4410 PR c++/17743, c++/19163
4411 * decl2.c (is_late_template_attribute): New fn.
4412 (splice_template_attributes, save_template_attributes): New fns.
4413 (cplus_decl_attributes): Call save_template_attributes.
4414 * pt.c (apply_late_template_attributes): New fn.
4415 (instantiate_class_template, tsubst_decl): Use it.
4416 * cp-tree.h: Declare is_late_template_attribute.
4417
4418 2007-09-13 Tom Tromey <tromey@redhat.com>
4419
4420 * parser.c (cp_lexer_new_main): Don't use
4421 c_lex_return_raw_strings.
4422 (cp_lexer_get_preprocessor_token): Update. Add special case when
4423 lexer is NULL.
4424
4425 2007-09-11 Jan Hubicka <jh@suse.cz>
4426
4427 * method.c (use_thunk): Use tree_rest_of_compilation
4428 * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
4429 (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
4430 * cp-tree.h (expand_body): Kill.
4431 (emit_associated_thunks): Declare.
4432 * semantics.c (emit_associated_thunks): Export.
4433 (expand_body): Kill.
4434
4435 2007-09-09 David Daney <ddaney@avtrex.com>
4436
4437 PR c++/33324
4438 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
4439 to calculate cookie_ptr.
4440
4441 2007-09-08 Jason Merrill <jason@redhat.com>
4442
4443 PR c++/33342
4444 * pt.c (most_specialized_class): Set processing_template_decl
4445 while tsubsting partial spec args.
4446
4447 2007-09-06 Jason Merrill <jason@redhat.com>
4448
4449 * decl2.c (get_guard): Copy visibility from the guarded variable.
4450
4451 2007-09-06 Jan Hubicka <jh@suse.cz>
4452
4453 * semantics.c (expand_body): Do not mark arguments of clones used.
4454
4455 2007-09-06 Paolo Carlini <pcarlini@suse.de>
4456
4457 PR c++/32674
4458 * decl.c (cp_finish_decl): When processing_template_decl,
4459 deal correctly with init as TREE_LIST.
4460
4461 2007-09-06 Tom Tromey <tromey@redhat.com>
4462
4463 * decl.c (finish_function): Put return's location on line zero of
4464 file.
4465
4466 2007-09-05 Jason Merrill <jason@redhat.com>
4467
4468 PR c++/15745
4469 * except.c (prepare_eh_type): Use type_decays_to.
4470
4471 PR c++/15097
4472 * init.c (build_delete): Use build_headof to get the address of the
4473 complete object if we aren't using the deleting destructor.
4474 * rtti.c (build_headof): No longer static.
4475 * cp-tree.h: Declare it.
4476
4477 2007-09-06 Jakub Jelinek <jakub@redhat.com>
4478
4479 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
4480 decl if a prototype for XX is provided with throw().
4481
4482 PR c++/33289
4483 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
4484 on __*_chk non-__builtin_* decls.
4485
4486 2007-09-05 Paolo Carlini <pcarlini@suse.de>
4487
4488 PR c++/30302
4489 * semantics.c (finish_id_expression): Use context_for_name_lookup
4490 insted of DECL_CONTEXT, to see through anonymous structs and unions.
4491 * class.c (finish_struct_anon): Deal correctly with anonymous
4492 structs (vs unions, as GNU extension) in error messages.
4493
4494 2007-09-05 Jan Hubicka <jh@suse.cz>
4495
4496 * sematics.c (expand_body): Remove unnecesary import_export_decl
4497 call, DECL_EXTERNAL checks and current_function_decl saving.
4498
4499 2007-09-05 Paolo Carlini <pcarlini@suse.de>
4500
4501 PR c++/29731 (again)
4502 * parser.c (cp_parser_primary_expression): Return error_mark_node
4503 when a statement-expression is found in a template-argument list.
4504
4505 2007-09-04 Jason Merrill <jason@redhat.com>
4506
4507 * except.c (initialize_handler_parm): Use
4508 fold_build_cleanup_point_expr.
4509
4510 PR c++/31419
4511 * call.c (reference_binding): Don't look for user-defined conversions
4512 to the same type.
4513
4514 PR c++/31411
4515 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
4516 the MUST_NOT_THROW_EXPR.
4517
4518 2007-09-04 Richard Sandiford <richard@codesourcery.com>
4519
4520 * decl.c (cp_finish_decl): Call determine_visibility before
4521 make_rtl_for_nonlocal_decl.
4522
4523 2007-09-04 Jason Merrill <jason@redhat.com>
4524
4525 PR c++/14032
4526 * pt.c (most_specialized_class): Substitute outer template
4527 arguments into the arguments of a member template partial
4528 specialization.
4529 (strip_innermost_template_args): New fn.
4530
4531 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
4532
4533 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
4534
4535 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4536
4537 * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
4538 * decl.c (cp_make_fname_decl): Likewise,
4539 * parser.c (cp_parser_string_literal): Likewise,
4540 * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
4541 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
4542 Likewise,
4543
4544 2007-09-02 Paolo Carlini <pcarlini@suse.de>
4545
4546 PR c++/33208
4547 * typeck.c (build_unary_op): Fix error message for
4548 Boolean expression as operand to operator--.
4549
4550 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4551
4552 * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
4553 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
4554 Likewise.
4555
4556 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
4557
4558 PR c++/32597
4559 * init.c (build_default_init): Make extern.
4560 * cp-tree.h (build_default_init): Declare here.
4561 * pt.c (tsubst_expr): When the instantiation of the initializer of
4562 a variable results in an empty list, default-initialize the
4563 variable.
4564 (tsubst_copy_and_build): When the instantiation of the initializer
4565 in a new expression results in an empty initializer list,
4566 default-initialize it.
4567
4568 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
4569
4570 * mangle.c (write_type): Change mangling of rvalue reference from
4571 `RR' to `O'.
4572
4573 2007-08-31 Jakub Jelinek <jakub@redhat.com>
4574
4575 * decl.c (duplicate_decls): Remove duplicated line.
4576
4577 2007-08-31 Paolo Carlini <pcarlini@suse.de>
4578
4579 PR c++/33210
4580 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
4581 BOUND_TEMPLATE_TEMPLATE_PARM.
4582
4583 2007-08-31 Paolo Carlini <pcarlini@suse.de>
4584
4585 PR c++/32113
4586 * search.c (lookup_member): Check the name argument for
4587 error_mark_node.
4588
4589 2007-08-31 Paolo Carlini <pcarlini@suse.de>
4590
4591 PR c++/33212
4592 * parser.c (cp_parser_trait_expr): Check rerurn value of
4593 cp_parser_type_id.
4594
4595 2007-08-30 Ollie Wild <aaw@google.com>
4596
4597 * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
4598 convert_ptrmem for pointer to member conversions.
4599 (convert_to_pointer_force): Update cp_convert_to_pointer call.
4600 (ocp_convert): Update cp_convert_to_pointer call.
4601 * typeck.c (convert_ptrmem): Add conditional for null pointers to
4602 members.
4603 (build_static_cast_1): Check can_convert for conversions in either
4604 direction.
4605 (get_delta_difference_1): New function.
4606 (get_delta_difference): Refactor to call get_delta_difference_1.
4607
4608 2007-08-30 Jakub Jelinek <jakub@redhat.com>
4609
4610 * decl.c (start_preparsed_function): Set
4611 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
4612
4613 2007-08-28 Paolo Carlini <pcarlini@suse.de>
4614
4615 PR c++/33209
4616 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
4617 BOUND_TEMPLATE_TEMPLATE_PARM.
4618
4619 2007-08-28 Jakub Jelinek <jakub@redhat.com>
4620
4621 PR c++/32596
4622 PR c++/32400
4623 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
4624 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
4625
4626 2007-08-27 Jason Merrill <jason@redhat.com>
4627
4628 PR c++/29000
4629 * pt.c (build_non_dependent_expr, type_dependent_expression_p):
4630 Look inside STMT_EXPR.
4631 * semantics.c (stmt_expr_value_expr): New fn.
4632 * cp-tree.h: Declare it.
4633
4634 PR c++/28558
4635 * decl.c (groktypename): Ignore attributes applied to class type.
4636
4637 2007-08-28 Richard Guenther <rguenther@suse.de>
4638
4639 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
4640
4641 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
4642
4643 * error.c (dump_expr): Handle COMPLEX_CST.
4644 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
4645 (pp_cxx_expression): Likewise.
4646
4647 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
4648
4649 * decl.c (GNU_INLINE_P): New.
4650 (duplicate_decls): Handle gnu_inline. Merge attributes and
4651 some flags in overriding definitions.
4652 (redeclaration_error_message): Handle gnu_inline.
4653 (start_preparsed_function): Likewise.
4654
4655 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4656
4657 * call.c (sufficient_parms_p): Constify.
4658 * class.c (same_signature_p): Likewise.
4659 * cp-gimplify.c (is_invisiref_parm,
4660 cxx_omp_privatize_by_reference): Likewise.
4661 * cp-objcp-common.c (has_c_linkage): Likewise.
4662 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
4663 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
4664 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
4665 num_artificial_parms_for, comp_template_parms,
4666 template_parameter_pack_p, any_dependent_template_arguments_p,
4667 any_type_dependent_arguments_p, any_value_dependent_elements_p,
4668 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
4669 zero_init_p, member_p, cp_lvalue_kind,
4670 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
4671 varargs_function_p, is_dummy_object, special_function_kind,
4672 string_conv_p, type_unknown_p, comp_except_specs, compparms,
4673 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
4674 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
4675 cp_has_mutable_p, at_least_as_qualified_p,
4676 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
4677 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
4678 * except.c (nothrow_libfn_p): Likewise.
4679 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
4680 Likewise.
4681 * pt.c (comp_template_parms, template_parameter_pack_p,
4682 any_type_dependent_arguments_p, any_value_dependent_elements_p,
4683 any_dependent_template_arguments_p): Likewise.
4684 * repo.c (repo_export_class_p): Likewise.
4685 * semantics.c (anon_aggr_type_p): Likewise.
4686 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
4687 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
4688 varargs_function_p, member_p, is_dummy_object, pod_type_p,
4689 zero_init_p, special_function_p): Likewise.
4690 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
4691 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
4692 compparms, invalid_nonstatic_memfn_p,
4693 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
4694 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
4695 cp_has_mutable_p, lvalue_or_else): Likewise.
4696
4697 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
4698
4699 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
4700 * cp-objcp-common.c (cp_tree_size): Ditto.
4701 * tree.c (cp_walk_subtrees): Ditto
4702 * cp-tree.def (TINST_LEVEL): Go away.
4703 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
4704 move together with other non-tree structs.
4705 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
4706 (union lang_tree_node): Eliminate tinst_level field.
4707 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
4708 (current_instantiation, outermost_tinst_level): Return
4709 a "struct tinst_level *".
4710
4711 * error.c (print_instantiation_partial_context): Change second
4712 parameter to a "struct tinst_level *". Replace accessor macros
4713 with field access.
4714 (print_instantiation_full_context): Likewise.
4715 * lex.c (in_main_input_context): Likewise.
4716
4717 * pt.c (struct pending_templates): New.
4718 (pending_templates, last_pending_template): Use it as a type.
4719 (current_tinst_level): Change typo to "struct tinst_level *"
4720 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
4721 (add_pending_template): Construct a "struct pending_template".
4722 Replace TINST_LEVEL accessor macros with field access.
4723 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
4724 (pop_tinst_level): Likewise.
4725 (instantiate_pending_templates): Likewise. Factor common code used
4726 when an instantiation has been done.
4727 (outermost_tinst_level): Replace tree_last with loop.
4728 (current_instantiation): Return a "struct tinst_level *".
4729
4730 2007-08-24 Ollie Wild <aaw@google.com>
4731
4732 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
4733 * name-lookup.h (cp_binding_level): Remove vtables member.
4734
4735 2007-08-24 Richard Guenther <rguenther@suse.de>
4736
4737 * tree.c (cp_cannot_inline_tree_fn): Remove.
4738 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
4739 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
4740 Remove define.
4741
4742 2007-08-24 Jakub Jelinek <jakub@redhat.com>
4743
4744 PR c++/32567
4745 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
4746 error_mark_node right away if build_expr_type_conversion
4747 returned it.
4748
4749 PR c++/32898
4750 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
4751 is error_mark_node rather than NULL_TREE.
4752 * pt.c (check_explicit_specialization): Likewise.
4753
4754 PR c++/31941
4755 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
4756 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
4757
4758 2007-08-22 Jason Merrill <jason@redhat.com>
4759
4760 PR c++/29365
4761 * pt.c (outermost_tinst_level): New function.
4762 * lex.c (in_main_input_context): New function.
4763 * cp-tree.h: Declare it.
4764 * decl2.c (constrain_class_visibility): Use it to avoid warning
4765 about uses of the anonymous namespace in the main input file.
4766
4767 2007-08-21 Jakub Jelinek <jakub@redhat.com>
4768
4769 * init.c (build_new_1): Use get_target_expr instead of save_expr.
4770
4771 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
4772
4773 PR c++/7302
4774 * class.c (finish_struct_1): Warn when a class has virtual
4775 functions and accessible non-virtual destructor.
4776
4777 2007-08-20 Richard Guenther <rguenther@suse.de>
4778
4779 PR c++/22369
4780 PR c++/22451
4781 * call.c (build_new_method_call): Convert initializer to
4782 the basetype.
4783 * init.c (build_aggr_init): Do not fiddle with types.
4784 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
4785 * except.c (build_throw): Do not drop qualifiers for the
4786 pointer type.
4787 * typeck.c (get_member_function_from_ptrfunc): Do not
4788 fiddle with types, instead convert.
4789 (build_ptrmemfunc1): Convert to the target type for
4790 initialization.
4791 (gfc_trans_allocate): Convert result to target type.
4792 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
4793 pointer-to-member structures shall have alias set zero as well.
4794
4795 2007-08-20 Richard Guenther <rguenther@suse.de>
4796
4797 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
4798 Remove.
4799 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
4800 (nonstatic_local_decl_p): Likewise.
4801 * tree.c (cp_auto_var_in_fn_p): Remove.
4802 * decl.c (nonstatic_local_decl_p): Remove.
4803
4804 2007-08-20 Richard Guenther <rguenther@suse.de>
4805
4806 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
4807 Remove define.
4808 * tree.h (cp_walk_tree): New define to walk_tree_1 with
4809 cp_walk_subtrees lh parameter.
4810 (cp_walk_tree_without_duplicates): New define to
4811 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
4812 * tree.c (count_trees): Call
4813 cp_walk_tree_without_duplicates.
4814 (verify_stmt_tree): Call cp_walk_tree.
4815 (break_out_target_exprs): Likewise.
4816 (WALK_SUBTREE): Likewise.
4817 * cp-gimplify.c (cp_genericize): Likewise.
4818 * cp-pt.c (find_parameter_packs_r): Likewise.
4819 (uses_parameter_packs): Likewise.
4820 (make_pack_expansion): Likewise.
4821 (check_for_bare_parameter_packs): Likewise.
4822 (for_each_template_parm): Likewise.
4823 * decl.c (check_default_argument): Call
4824 cp_walk_tree_without_duplicates.
4825 * except.c (build_throw): Likewise.
4826 * decl2.c (type_visibility): Likewise.
4827 * semantics.c (expand_or_defer_fn): Likewise.
4828 (finalize_nrv): Call cp_walk_tree.
4829
4830 2007-08-20 Jakub Jelinek <jakub@redhat.com>
4831
4832 PR c++/33025
4833 * init.c (build_new_1): Rename placement_var variable to placement_expr.
4834 Initialize it with save_expr rather than get_temp_regvar.
4835
4836 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
4837
4838 PR c++/28989
4839 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
4840 lvalues.
4841
4842 2007-08-17 Ollie Wild <aaw@google.com>
4843
4844 PR c++/31749
4845 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
4846 declarations into appropriate slots for comparison. Fix type
4847 comparison.
4848
4849 2007-08-17 Paolo Carlini <pcarlini@suse.de>
4850
4851 PR c++/32112
4852 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
4853 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
4854
4855 2007-08-17 Paolo Carlini <pcarlini@suse.de>
4856
4857 PR c++/32870
4858 * parser.c (cp_parser_class_head): Improve error message.
4859
4860 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
4861
4862 * pt.c (instantiate_decl): Set input_location
4863 for the function end.
4864
4865 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4866
4867 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
4868 Constify.
4869 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
4870 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
4871 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
4872 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
4873 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
4874 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
4875 * typeck.c (cp_type_quals): Likewise.
4876 * typeck2.c (cxx_incomplete_type_diagnostic,
4877 cxx_incomplete_type_error): Likewise.
4878
4879 2007-08-16 Paolo Carlini <pcarlini@suse.de>
4880
4881 PR c++/31132
4882 * pt.c (tsubst_friend_function): When check_classfn
4883 returns error_mark_node likewise return it.
4884
4885 2007-08-15 Jakub Jelinek <jakub@redhat.com>
4886
4887 PR c++/32992
4888 * typeck.c (check_return_expr): Don't NRV optimize vars in
4889 anonymous unions.
4890 * decl.c (finish_function): Comment fix.
4891
4892 2007-08-15 Paolo Carlini <pcarlini@suse.de>
4893
4894 PR c++/33035
4895 * pt.c (push_template_decl_real): Depending on TYPE_P
4896 use either TYPE_CONTEXT or DECL_CONTEXT.
4897
4898 2007-08-14 Mark Mitchell <mark@codesourcery.com>
4899
4900 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
4901 constructors and destructors return this.
4902
4903 2007-08-14 Paolo Carlini <pcarlini@suse.de>
4904
4905 PR c++/27211
4906 * decl2.c (check_classfn): Return error_mark_node in case of error;
4907 in that case, do not call add_method.
4908 * decl.c (start_decl): Deal with check_classfn returning
4909 error_mark_node.
4910 (grokfndecl): Likewise.
4911 * pt.c (tsubst_friend_function): Likewise.
4912
4913 2007-08-14 Andrew Pinski <pinskia@gmail.com>
4914
4915 PR c++/30428
4916 * typeck.c (build_binary_op): Disallow vector float types with
4917 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
4918
4919 2007-08-11 Ian Lance Taylor <iant@google.com>
4920
4921 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
4922 alias_set_type.
4923 * cp-tree.h (cxx_get_alias_set): Update declaration.
4924
4925 2007-08-10 Ollie Wild <aaw@google.com>
4926
4927 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
4928 type lookups.
4929 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
4930 function parameter.
4931 (unqualified_namespace_lookup): Fix ambiguous_decl call.
4932 (lookup_using_namespace): Fix ambiguous_decl call.
4933 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
4934
4935 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4936
4937 * call.c (name_as_c_string): Use CONST_CAST.
4938 * decl.c (build_decl): Likewise.
4939 * parser.c (cp_parser_string_literal): Likewise.
4940
4941 2007-08-10 Paolo Carlini <pcarlini@suse.de>
4942
4943 PR c++/17763
4944 * error.c (dump_expr): Consistently use the *_cxx_*
4945 variants of the pretty-print functions.
4946
4947 2007-08-10 Paolo Carlini <pcarlini@suse.de>
4948
4949 PR c++/22256
4950 * decl.c (check_special_function_return_type): Just error
4951 on return type specified for conversion operator.
4952
4953 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
4954
4955 * typeck2.c (readonly_error): Handle general expressions.
4956 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
4957
4958 2007-08-06 Dan Hipschman <dsh@google.com>
4959
4960 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
4961 access function name.
4962
4963 2007-08-04 Alfred Minarik <a.minarik@aon.at>
4964
4965 PR pch/13676
4966 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
4967 * g++spec.c (lang_specific_driver): Check them.
4968
4969 2007-08-06 Paolo Carlini <pcarlini@suse.de>
4970
4971 PR c++/19532
4972 * pt.c (inline_needs_template_parms): Fix comment; change return type
4973 to bool.
4974
4975 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
4976
4977 Revert:
4978 2007-03-26 Dirk Mueller <dmueller@suse.de>
4979
4980 * parser.c (cp_parser_member_declaration): Pedwarn
4981 about stray semicolons after member declarations.
4982
4983 2007-08-02 Lee Millward <lee.millward@gmail.com>
4984
4985 PR c++/30849
4986 PR c++/30850
4987 PR c++/30851
4988 * parser.c (cp_parser_asm_definition): Detect and discard asm
4989 statements with invalid inputs or outputs.
4990 (cp_parser_asm_operand_list): Return error mark node if any
4991 of the operands are invalid. Adjust documentation.
4992
4993 2007-08-02 Nick Clifton <nickc@redhat.com>
4994
4995 * typeck.c: Change copyright header to refer to version 3 of the
4996 GNU General Public License and to point readers at the COPYING3
4997 file and the FSF's license web page.
4998 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
4999 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
5000 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
5001 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
5002 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
5003 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
5004 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
5005 name-lookup.h, parser.c: Likewise.
5006
5007 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5008
5009 PR middle-end/32668
5010 * call.c (magic_varargs_p): Honor the "type generic" attribute.
5011
5012 2007-07-30 Paolo Carlini <pcarlini@suse.de>
5013
5014 PR c++/32108
5015 * semantics.c (finish_label_stmt): Reject the __label__
5016 extension outside function scopes.
5017
5018 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5019
5020 * parser.c (eof_token): Un-constify.
5021 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
5022 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
5023 casts.
5024
5025 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
5026
5027 * pt.c, tree.c, typeck2.c: Fix comment typos.
5028
5029 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
5030 Mark Mitchell <mark@codesourcery.com>
5031
5032 PR c++/30917
5033 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
5034 hidden due to friend declarations in local classes.
5035
5036 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
5037
5038 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
5039 * cp-tree.def (DECLTYPE_TYPE): New.
5040 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
5041 (dump_type_prefix): Ditto.
5042 (dump_type_suffix): Ditto.
5043 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
5044 * mangle.c (write_type): Handle DECLTYPE_TYPE.
5045 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
5046 types.
5047 (DECLTYPE_TYPE_EXPR): New.
5048 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
5049 (finish_declared_type): Declare.
5050 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
5051 DECLTYPE_TYPE nodes.
5052 (pp_cxx_type_id): Ditto.
5053 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
5054 (tsubst): Substitute into a DECLTYPE_TYPE node.
5055 (tsubst_copy): Ditto.
5056 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
5057 nodes.
5058 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
5059 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
5060 structural equality (because we can't hash the expressions).
5061 (finish_declared_type): New.
5062 * lex.c (reswords): Add "decltype" keyword.
5063 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
5064 (cp_parser_postfix_expression): Add member_access_only_p to
5065 restrict postfix expression to member access expressions.
5066 (cp_parser_unary_expression): Update call to
5067 cp_parser_postfix_expression to reflect new parameter.
5068 (cp_parser_declared_type): New.
5069 (cp_parser_simple_type_specifier): Parse decltype types.
5070
5071 2007-07-27 Mark Mitchell <mark@codesourcery.com>
5072
5073 PR c++/32346
5074 * call.c (convert_for_arg_passing): Only widen bitfields to their
5075 declared types if necessary.
5076
5077 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5078
5079 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
5080 Constify.
5081
5082 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5083
5084 * decl.c (typename_hash, typename_compare): Constify.
5085 * mangle.c (hash_type, compare_type): Likewise.
5086 * pt.c (eq_local_specializations, hash_local_specialization):
5087 Likewise.
5088 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
5089 list_hash): Likewise.
5090 * typeck2.c (pat_compare): Likewise.
5091
5092 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
5093
5094 * method.c (implicitly_declare_fn): Increase alignment if member
5095 function pointer format requires it.
5096
5097 2007-07-24 Paolo Carlini <pcarlini@suse.de>
5098
5099 PR c++/29001
5100 * typeck.c (check_return_expr): Do not pass a null argument
5101 to null_ptr_cst_p.
5102
5103 2007-07-24 Paolo Carlini <pcarlini@suse.de>
5104
5105 PR c++/32561
5106 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
5107 only on VAR_DECL.
5108
5109 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
5110
5111 PR c++/32839
5112 * typeck.c (convert_arguments): Only use default args if we have
5113 a function decl.
5114
5115 PR c++/30818
5116 * typeck.c (structural_comptypes): No need to check
5117 resolve_typename_type return value here.
5118 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
5119 * pt.c (resolve_typename_type): Follow typename typedefs. Return
5120 original type rather than error_mark_node in case of failure.
5121 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
5122 resolve_typename_type result check.
5123 (cp_parser_direct_declarator, cp_parser_head,
5124 cp_parser_constructor_declarator_p): Likewise.
5125
5126 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
5127
5128 * pt.c (template_parms_variadic_p): Remove.
5129 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
5130
5131 2007-07-12 Jakub Jelinek <jakub@redhat.com>
5132
5133 PR c++/30854
5134 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
5135 argument to dump_aggr_init_expr_args instead of false.
5136
5137 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
5138
5139 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
5140 canonical types; otherwise, fall back to structural type
5141 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
5142 internal compiler error if the canonical types are wrong.
5143
5144 2007-07-11 Paolo Carlini <pcarlini@suse.de>
5145
5146 PR c++/32560
5147 * parser.c (cp_parser_make_indirect_declarator): When the
5148 the code argument is ERROR_MARK return cp_error_declarator.
5149
5150 2007-07-09 Geoffrey Keating <geoffk@apple.com>
5151
5152 PR 32617
5153 * decl.c (cxx_init_decl_processing): Don't set
5154 force_align_functions_log.
5155 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
5156 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
5157 FUNCTION_DECL, return its alignment.
5158
5159 2007-07-09 Richard Guenther <rguenther@suse.de>
5160
5161 * decl.c (start_preparsed_function): Do not promote return type.
5162
5163 2007-07-08 Paolo Carlini <pcarlini@suse.de>
5164
5165 PR c++/30535
5166 * pt.c (unify): Never pass error_mark_node to template_decl_level.
5167
5168 2007-07-07 Mark Mitchell <mark@codesourcery.com>
5169
5170 PR c++/32232
5171 * pt.c (resolve_overloaded_unification): Robustify. Return a
5172 bool, not an int.
5173 (type_unification_real): Adjust accordingly.
5174
5175 2007-07-06 Richard Guenther <rguenther@suse.de>
5176
5177 * init.c (build_new_1): Use the correct pointer type.
5178 * typeck2.c (build_m_component_ref): Likewise.
5179
5180 2007-07-05 Mark Mitchell <mark@codesourcery.com>
5181
5182 PR c++/32245
5183 * init.c (build_zero_init): Always build an initializer for
5184 non-static storage.
5185 * typeck2.c (build_functional_cast): Use build_zero_init.
5186
5187 PR c++/32251
5188 * init.c (build_new_1): Always pass the allocation function to
5189 build_op_delete_call.
5190 * call.c (build_op_delete_call): Handle operator delete with a
5191 variable-argument list. Do not issue an error when no matching
5192 deallocation function is available for a new operator.
5193
5194 PR c++/31992
5195 * cp-tree.h (any_value_dependent_elements_p): Declare it.
5196 * decl.c (value_dependent_init_p): New function.
5197 (cp_finish_decl): Use it.
5198 * pt.c (value_dependent_expression_p): Use
5199 any_value_dependent_elements_p.
5200 * parser.c (cp_parser_primary_expression): Add comment about
5201 treating dependent qualified names as integral
5202 constant-expressions.
5203
5204 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
5205
5206 * decl.c (build_ptrmemfunc_type): Always use structural equality
5207 tests when comparing pointer-to-member-function types, because the
5208 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
5209 types.
5210
5211 2007-07-03 Mark Mitchell <mark@codesourcery.com>
5212
5213 * init.c (build_new): Tweak comment.
5214
5215 2007-06-29 Dave Brolley <brolley@redhat.com>
5216
5217 PR c++/31743
5218 * parser.c (cp_parser_new_type_id): Don't reduce a named array
5219 type to its base type and number of elements here.
5220 * init.c (build_new): Call complete_type_or_else to ensure that the
5221 type is complete and to issue a diagnostic if it is not.
5222 (build_new_1): Don't call complete_type_or_else here.
5223
5224 2007-07-03 Richard Guenther <rguenther@suse.de>
5225
5226 PR c++/32609
5227 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
5228 after recursing.
5229
5230 2007-07-02 Simon Baldwin <simonb@google.com>
5231
5232 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
5233 for inner-style nested forward declarations that don't declare
5234 anything useful.
5235
5236 2007-07-02 Jakub Jelinek <jakub@redhat.com>
5237
5238 PR c++/31748
5239 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
5240 DECL_P in not a variable and appears more than once error messages.
5241
5242 2007-07-01 Ollie Wild <aaw@google.com>
5243
5244 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
5245 (select_decl): Remove function.
5246 (unqualified_namespace_lookup): Populate binding by calling
5247 ambiguous_decl. Remove select_decl call.
5248 (lookup_qualified_name): Remove select_decl call.
5249 * decl.c (lookup_and_check_tag): Check for ambiguous references.
5250 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
5251 generation when name lookup is ambiguous.
5252
5253 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
5254
5255 PR c++/31724
5256 * init.c (build_new_1): Use structural equality on the copy of the
5257 array type.
5258
5259 2007-06-28 Geoffrey Keating <geoffk@apple.com>
5260
5261 * decl2.c (determine_visibility): Implement
5262 flag_visibility_ms_compat effect on type info.
5263 * decl.c (cxx_init_decl_processing): Implement
5264 global effect of flag_visibility_ms_compat.
5265
5266 2007-06-28 Geoffrey Keating <geoffk@apple.com>
5267
5268 * decl2.c (start_objects): Mark constructor-running function
5269 as artificial.
5270
5271 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
5272
5273 PR c++/32111
5274 * decl.c (grokdeclarator): Reset friendp for member functions declared
5275 friend of their own class.
5276
5277 2007-06-23 Mark Mitchell <mark@codesourcery.com>
5278
5279 * decl2.c (determine_visibility): Don't look for dllexport here.
5280 (determine_visibility_from_class): Tidy.
5281
5282 2007-06-18 Simon Baldwin <simonb@google.com>
5283
5284 PR c++/31923
5285 * parser.c (cp_parser_single_declaration): Added check for storage
5286 class other than sc_none in parsed declaration, and a flag to indicate
5287 if the call is part of an explicit template specialization parse.
5288 * (cp_parser_explicit_specialization): Specialization check flag added
5289 to call to cp_parser_single_declaration(), set true.
5290 * (cp_parser_template_declaration_after_export): Specialization check
5291 flag added to call to cp_parser_single_declaration(), set false.
5292 * pt.c (check_explicit_specialization): Added code to copy visiblity
5293 and linkage from the templated function to the explicit specialization.
5294
5295 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
5296
5297 * typeck.c (build_binary_op): For templates build the
5298 expression in pieces to avoid the assert in build2_stat.
5299 (get_member_function_from_ptrfunc):
5300 Change over to using POINTER_PLUS_EXPR and convert
5301 the second operand to sizetype.
5302 * typeck2.c (build_m_component_ref): Likewise.
5303 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
5304 instead of PLUS_EXPR for pointers.
5305 (build_new_1): Likewise.
5306 (build_vec_delete_1): Likewise.
5307 (build_vec_delete): Likewise.
5308 * class.c (build_base_path): Likewise.
5309 (build_base_path): Likewise.
5310 (convert_to_base_statically): Likewise.
5311 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
5312 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
5313 instead of PLUS_EXPR.
5314 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
5315 instead of PLUS_EXPR for pointers.
5316 * call.c (build_special_member_call): Likewise.
5317 * rtti.c (build_headof): Likewise.
5318 Use sizetype instead of ptrdiff_type_node.
5319 (tinfo_base_init): Create a POINTER_PLUS_EXPR
5320 instead of PLUS_EXPR for pointers.
5321 * except.c (expand_start_catch_block): Do a
5322 NEGATIVE and then a POINTER_PLUS_EXPR instead
5323 of a MINUS_EXPR.
5324 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
5325 PLUS_EXPR on pointer types over to use
5326 POINTER_PLUS_EXPR and remove the conversion
5327 to the pointer types.
5328 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
5329 adding to a pointer type. Use size_int instead of
5330 ssize_int. Convert the index to sizetype before
5331 adding it to the pointer.
5332
5333 2007-06-15 Mark Mitchell <mark@codesourcery.com>
5334
5335 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
5336 (DECL_ANON_UNION_VAR_P): New macro.
5337 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
5338 than DECL_VAR_MARKED_P, to keep track of which variables we have
5339 seen.
5340 * decl.c (redeclaration_error_message): Complain about redeclaring
5341 anonymous union members at namespace scope.
5342 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
5343
5344 2007-06-14 Geoff Keating <geoffk@apple.com>
5345
5346 * decl2.c (determine_visibility): Ensure that functions with
5347 hidden types as parameters are hidden.
5348
5349 PR 31093
5350 * decl2.c (determine_visibility): Remove duplicate code for
5351 handling type info.
5352
5353 2007-06-12 Ian Lance Taylor <iant@google.com>
5354
5355 PR libstdc++/29286
5356 * init.c (avoid_placement_new_aliasing): New static function.
5357 (build_new_1): Call it.
5358
5359 2007-06-11 Rafael Ávila de Espíndola <espindola@google.com>
5360
5361 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
5362 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
5363
5364 2007-06-08 Jakub Jelinek <jakub@redhat.com>
5365
5366 PR c++/32177
5367 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
5368 on init, the non-decl cond operand and increment value.
5369
5370 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
5371
5372 PR c++/30759
5373 * decl.c (check_initializer): Report an error when a brace enclosed
5374 initializer is used for a non-aggregate type in C++98.
5375 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
5376 cxx_dialect.
5377 (grokdeclarator): Likewise.
5378 (move_fn_p): Likewise.
5379 * typeck.c (check_return_expr): Likewise.
5380 * call.c (reference_binding): Likewise.
5381 * error.c (cp_cpp_error): Likewise.
5382 * pt.c (check_default_tmpl_args): Likewise.
5383 (tsubst): Likewise.
5384 * lex.c (init_reswords): Likewise.
5385 * parser.c (p_parser_primary_expression): Likewise.
5386 (TOKEN_PRECEDENCE): Likewise.
5387 (cp_parser_init_declarator): Likewise.
5388 (cp_parser_ptr_operator): Likewise.
5389 (cp_parser_parameter_declaration): Likewise.
5390 (cp_parser_enclosed_template_argument_list): Likewise.
5391 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
5392 (cp_parser_next_token_ends_template_argument_p): Likewise.
5393
5394 2007-06-04 Simon Baldwin <simonb@google.com>
5395
5396 * decl.c (grokdeclarator): Readability change. Moved case labels
5397 into direct switch statement scope.
5398
5399 2007-06-04 Paolo Carlini <pcarlini@suse.de>
5400
5401 * call.c (convert_like_real): Remove pointless code.
5402
5403 2007-05-31 Mark Mitchell <mark@codesourcery.com>
5404
5405 * decl.c (get_atexit_fn_ptr_type): New function.
5406 (get_atexit_node): Use it.
5407 (start_cleanup_fn): Likewise.
5408 (register_dtor_fn): Use the object's destructor, instead of a
5409 separate cleanup function, where possible.
5410 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
5411 (atexit_fn_ptr_type_node): New macro.
5412 * decl2.c (build_cleanup): Use build_address.
5413
5414 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
5415
5416 * typeck.c (build_binary_op): Include types in error.
5417
5418 2007-05-31 Jakub Jelinek <jakub@redhat.com>
5419
5420 PR c++/31806
5421 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
5422 needs runtime initialization.
5423
5424 2007-05-31 Paolo Carlini <pcarlini@suse.de>
5425
5426 PR c++/32158
5427 * semantics.c (finish_trait_expr): Complete the types.
5428
5429 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
5430 Douglas Gregor <doug.gregor@gmail.com>
5431 Pedro Lamarao <pedro.lamarao@mndfck.org>
5432 Howard Hinnant <howard.hinnant@gmail.com>
5433
5434 PR c++/7412
5435 PR c++/29939
5436 * typeck.c (comptypes): Don't consider rvalue and lvalue
5437 reference types to be equivalent.
5438 (check_return_expr): Move from certain lvalues when returning
5439 them.
5440 * decl.c (grokdeclarator): Implement reference collapsing.
5441 (copy_fn_p): Don't consider constructors taking rvalue references
5442 to be copy constructors.
5443 (move_fn_p): New.
5444 * call.c (conversion): New "rvaluedness_matches_p" member.
5445 (convert_class_to_reference): Require reference type as first
5446 parameter instead of base type.
5447 (reference_binding): Add logic to handle rvalue references.
5448 (implicit_conversion): Update inaccurate comment.
5449 (convert_like_real): Disable creation of temporaries that are
5450 impossible to initialize for types with move constructors.
5451 (build_over_call): Elide move constructors when possible.
5452 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
5453 (maybe_handle_ref_bind): Return conversion instead of type node.
5454 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
5455 determine preferred conversion sequences.
5456 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
5457 (LOOKUP_PREFER_RVALUE): New.
5458 (DECL_MOVE_CONSTRUCTOR_P): New.
5459 (struct cp_declarator): Add "reference" member for reference
5460 types, with new "rvalue_ref" flag.
5461 (cp_build_reference_type): Declare.
5462 (move_fn_p): Declare.
5463 * error.c (dump_type_prefix): Format rvalue reference types
5464 correctly in error messages.
5465 * except.c (build_throw): Move from certain lvalues when
5466 throwing.
5467 * mangle.c (write_type): Mangle rvalue references differently
5468 than regular references.
5469 * parser.c (make_reference_declarator): Add boolean parameter for
5470 rvalue references.
5471 (cp_parser_make_indirect_declarator): New.
5472 (cp_parser_new_declarator_opt): Call
5473 cp_parser_make_indirect_declarator.
5474 (cp_parser_conversion_declarator_opt): Ditto.
5475 (cp_parser_declarator): Ditto.
5476 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
5477 declarators.
5478 * pt.c (tsubst): Implement reference collapsing.
5479 (maybe_adjust_types_for_deduction): Implement special template
5480 parameter deduction rule for rvalue references.
5481 (type_unification_real): Update calls to
5482 maybe_adjust_types_for_deduction.
5483 (try_one_overload): Ditto.
5484 (unify_pack_expansion): Ditto.
5485 * tree.c (lvalue_p_1): Handle rvalue reference types.
5486 (cp_build_reference_type): New.
5487
5488 2007-05-30 Jakub Jelinek <jakub@redhat.com>
5489
5490 PR c++/31809
5491 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
5492 variables that need runtime initialization.
5493
5494 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
5495
5496 PR c++/31339
5497 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
5498 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
5499 case POSTDECREMENT_EXPR>): Return the error_mark_node
5500 if either the real or imaginary parts would an
5501 error_mark_node.
5502
5503 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
5504 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5505
5506 PR c++/31745
5507 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
5508 token is a closing brace, false if there are no tokens left.
5509 (cp_parser_namespace_alias_definition): Only consume the next token if
5510 it is a closing brace.
5511
5512 * parser.c (cp_parser_class_specifier): Likewise.
5513
5514 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
5515
5516 * semantics.c (finish_member_declaration): Fix a typo in the
5517 last checkin.
5518
5519 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
5520
5521 PR c++/31431
5522 PR c++/31432
5523 PR c++/31434
5524 PR c++/31435
5525 PR c++/31437
5526 PR c++/31438
5527 PR c++/31442
5528 PR c++/31443
5529 PR c++/31444
5530 PR c++/31445
5531 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
5532 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
5533 * pt.c (check_for_bare_parameter_packs): Return bool indicated
5534 whether everything was okay. Fix indentation.
5535 (push_template_decl_real): Check for bare parameter packs in
5536 function parameters; where errors occur, mark the parameter types
5537 with ERROR_MARK_NODEs to avert ICEs.
5538 (coerce_template_parameter_pack): New.
5539 (coerce_template_parms): Moved parameter pack coercion into
5540 coerce_template_parameter_pack, and permit it anywhere in the
5541 template parameter list (not just at the end). Parameter and
5542 argument indices can vary (somewhat) separately now, so add
5543 PARM_IDX and ARG_IDX.
5544 (fn_type_unification): Don't set an argument pack as incomplete if
5545 no argument pack was deduced.
5546 (type_unification_real): If a type parameter is a parameter pack
5547 and has not otherwise been deduced, it will be deduced to an empty
5548 parameter pack.
5549 (more_specialized_fn): Use the actual lengths of the argument
5550 lists when comparing against expansions.
5551 * semantics.c (finish_member_declaration): If a field's type has
5552 bare parameter packs, error and set its type to ERROR_MARK_NODE.
5553
5554 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
5555
5556 PR target/27067
5557 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
5558
5559 2007-05-22 Ollie Wild <aaw@google.com>
5560
5561 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
5562 (unqualified_namespace_lookup): Adds check for hidden types.
5563
5564 2007-05-22 Ollie Wild <aaw@google.com>
5565
5566 * decl.c (duplicate_decls): Verify namespace names are unique.
5567
5568 2007-05-21 Mark Mitchell <mark@codesourcery.com>
5569
5570 * decl.c (cxx_maybe_build_cleanup): Handle
5571 __attribute__((cleanup)).
5572
5573 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5574
5575 * cvt.c (cp_convert_and_check): Don't check warnings if the
5576 conversion failed.
5577
5578 2007-05-18 Geoffrey Keating <geoffk@apple.com>
5579
5580 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
5581
5582 2007-05-14 Paolo Carlini <pcarlini@suse.de>
5583
5584 PR c++/29928
5585 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
5586 type only if is a class type (5.2.8/4).
5587
5588 2007-05-14 Rafael Ávila de Espíndola <espindola@google.com>
5589
5590 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
5591 * decl.c (grokdeclarator): Use unsigned_type_for instead of
5592 c_common_unsigned_type.
5593
5594 2007-05-11 Silvius Rus <rus@google.com>
5595
5596 * typeck.c (build_indirect_ref): Add call to
5597 strict_aliasing_warning.
5598 (build_reinterpret_cast_1): Condition call to
5599 strict_aliasing_warning.
5600
5601 2007-05-11 Jan Hubicka <jh@suse.cz>
5602
5603 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
5604 * decl2.c (start_objects): ctors and dtors are no longer public.
5605 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
5606
5607 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
5608
5609 * typeck.c (build_unary_op): Remove code that used to
5610 handle non lvalue increments/decrements.
5611
5612 2007-05-07 Mike Stump <mrs@apple.com>
5613
5614 * parser.c (check_empty_body): Add.
5615 (cp_parser_iteration_statement): Add call to check_empty_body.
5616
5617 2007-05-05 Geoffrey Keating <geoffk@apple.com>
5618
5619 PR 31775
5620 * mangle.c (write_mangled_name): Mangle static variable names.
5621 (write_unqualified_name): Use local-source-name for
5622 namespace-scope static variables.
5623
5624 2007-05-04 Dirk Mueller <dmueller@suse.de>
5625
5626 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
5627 not in effect.
5628
5629 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
5630
5631 PR c++/31663
5632 * decl2.c (constrain_class_visibility):
5633 Use strip_pointer_or_array_types instead of strip_array_types.
5634
5635 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
5636
5637 PR C++/30221
5638 * decl.c (reshape_init_r): Don't reshape the first element if it
5639 is a pointer to member function.
5640
5641 2007-04-27 Simon Baldwin <simonb@google.com>
5642
5643 * decl.c (grokparms): Changed message format from %qD to %qE.
5644
5645 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
5646
5647 * error.c (maybe_warn_variadic_templates): Variadic templates are
5648 now in C++0x, so only warn about them in C++98 mode.
5649
5650 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
5651
5652 PR C++/30016
5653 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
5654 integeral types from vectors types.
5655
5656 2007-04-26 Jakub Jelinek <jakub@redhat.com>
5657
5658 PR c++/31598
5659 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
5660 for type dependent OMP_CLAUSE_DECLs.
5661
5662 2007-04-24 Mark Mitchell <mark@codesourcery.com>
5663
5664 PR c++/31338
5665 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
5666 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
5667 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
5668 * init.c (build_zero_init): Adjust, as
5669 COMPLEX_TYPE is now a SCALAR_TYPE.
5670 * typeck2.c (digest_init): Allow brace-enclosed initializers for
5671 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
5672
5673 2007-04-25 Paolo Carlini <pcarlini@suse.de>
5674
5675 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
5676 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
5677 (trait_expr_value): Adjust.
5678
5679 2007-04-23 Simon Baldwin <simonb@google.com>
5680
5681 * decl.c (grokparms): Added new error for duplicate function
5682 parameters names in function prototypes, to match gcc behavior.
5683
5684 2007-04-23 Jan Hubicka <jh@suse.cz>
5685
5686 * decl2.c (finish_objects): Do not call target constructor/destructor
5687 bits dirrectly.
5688
5689 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
5690
5691 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
5692 instead of checking GIMPLE_STMT_P in chain_next.
5693
5694 2007-04-17 Mark Mitchell <mark@codesourcery.com>
5695
5696 PR c++/31513
5697 * call.c (convert_for_arg_passing): Convert bitfields to their
5698 declared types.
5699
5700 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
5701
5702 PR c++/31517
5703 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
5704
5705 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
5706
5707 PR c++/29365
5708 * decl2.c (constrain_class_visibility):
5709 Do not warn about the use of anonymous namespace in the main input file.
5710
5711 2007-04-15 Mark Mitchell <mark@codesourcery.com>
5712
5713 * cp-tree.h (current_template_parms): Fix typo in comment.
5714
5715 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
5716
5717 * cp-tree.h, error.c: Fix comment typos.
5718
5719 2007-04-13 Jason Merrill <jason@redhat.com>
5720
5721 PR c++/31074
5722 * call.c (reference_binding): Add c_cast_p parm. If true,
5723 add quals to TO as needed to make it reference-compatible.
5724
5725 2007-04-11 Jan Hubicka <jh@suse.cz>
5726
5727 * class.c (convert_to_base_statically): Fold produced tree; verify
5728 that we are not processing template_decl.
5729
5730 2007-04-09 Mark Mitchell <mark@codesourcery.com>
5731
5732 PR c++/31449
5733 * class.c (build_base_path): Ensure that the converted pointer has
5734 the same cv-qualification as the input.
5735
5736 2007-04-09 Paolo Carlini <pcarlini@suse.de>
5737
5738 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
5739
5740 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
5741
5742 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
5743 Do not set it.
5744 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
5745 * tree.c (cp_add_pending_fn_decls): Remove.
5746 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
5747
5748 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
5749
5750 Revert change removing staticp.
5751
5752 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
5753
5754 * cp-objcp-common.c (cxx_staticp): Remove.
5755 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
5756 * cp-tree.h (cxx_staticp):
5757
5758 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
5759
5760 * class.c (check_for_override): Don't remove dllmport attribute
5761 of virtual methods.
5762
5763 2007-04-03 Jakub Jelinek <jakub@redhat.com>
5764
5765 PR c++/30847
5766 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
5767 type issue error and return early.
5768
5769 2007-03-30 Jason Merrill <jason@redhat.com>
5770
5771 PR c++/31187
5772 * typeck.c (cp_type_readonly): New fn.
5773 * cp-tree.h: Declare it.
5774 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
5775 (cp_finish_decl): Not here.
5776
5777 2007-03-31 Richard Guenther <rguenther@suse.de>
5778
5779 * optimize.c (maybe_clone_body): Replace splay-tree usage by
5780 pointer-map.
5781
5782 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
5783
5784 PR c++/31138
5785 PR c++/31140
5786 PR c++/31141
5787 * parser.c (declarator_can_be_parameter_pack): New.
5788 (cp_parser_template_parameter): Only parse the `...' if the
5789 declarator can be a parameter pack.
5790 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
5791 is NULL.
5792 * pt.c (find_parameter_packs_r): Look into the bounds on integer
5793 types (they could be used as array bounds).
5794 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
5795 (tsubst_pack_expansion): Handle failure to expand parameter
5796 packs.
5797
5798 2007-03-30 Paolo Carlini <pcarlini@suse.de>
5799
5800 PR c++/26099
5801 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
5802 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
5803 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
5804 (CLASS_TYPE_NON_UNION_P): Add.
5805 (struct lang_type_class): Add has_complex_dflt.
5806 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
5807 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
5808 * cp-tree.def: Add TRAIT_EXPR.
5809 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
5810 * lex.c (struct resword): Add __has_nothrow_assign,
5811 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
5812 __has_trivial_constructor, __has_trivial_copy,
5813 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
5814 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
5815 __is_pod, __is_polymorphic, __is_union.
5816 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
5817 (cp_parser_trait_expr): New.
5818 * semantics.c (finish_trait_expr, trait_expr_value
5819 classtype_has_nothrow_copy_or_assign_p): New.
5820 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
5821 as static.
5822 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
5823 * class.c (check_bases, check_field_decl, check_bases_and_members):
5824 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
5825 * pt.c (uses_template_parms, tsubst_copy_and_build,
5826 value_dependent_expression_p, type_dependent_expression_p): Deal with
5827 TRAIT_EXPR.
5828 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
5829
5830 2007-03-29 Richard Guenther <rguenther@suse.de>
5831
5832 * tree.c (cp_walk_subtrees): Do not set input_location.
5833
5834 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
5835
5836 PR c++/29077
5837 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
5838 destructor.
5839
5840 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5841
5842 * parser.c (struct cp_parser): Update comment for
5843 greater_than_is_operator_p.
5844 (cp_parser_primary_expression): In C++0x mode, a cast operator can
5845 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
5846 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
5847 !GREATER_THAN_IS_OPERATOR_P.
5848 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
5849 `>>' operators that will become two `>' tokens in C++0x.
5850 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
5851 mode, allowing it to terminate default arguments.
5852 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
5853 `>>' like two consecutive `>' tokens.
5854 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
5855 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
5856 ends a template argument.
5857
5858 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5859
5860 * decl.c (redeclaration_error_message): Complain when redeclaring
5861 a friend function with default template arguments (C++0x mode only).
5862 * cp-tree.h (check_default_tmpl_args): Declare.
5863 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
5864 template arguments in function templates. Add support for checking
5865 the default template arguments of friend templates.
5866 (push_template_decl_real): Fix call to check_default_tmpl_args.
5867 (type_unification_real): If a template parameter has not been
5868 deduced but provides a default template argument, substitute into
5869 that default template argument.
5870 * parser.c (cp_parser_init_declarator): When declaring (but not
5871 defining!) a function template in C++0x mode, check for default
5872 template arguments.
5873
5874 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5875
5876 PR c++/29993
5877 * decl.c (grokdeclarator): Deal with cv-qualified function type
5878 typedefs in the same way for member and non-member functions.
5879
5880 2007-03-26 Dirk Mueller <dmueller@suse.de>
5881
5882 * parser.c (cp_parser_member_declaration): Pedwarn
5883 about stray semicolons after member declarations.
5884
5885 2007-03-26 Paolo Carlini <pcarlini@suse.de>
5886
5887 PR c++/30500
5888 * pt.c (instantiate_decl): Set in_system_header.
5889
5890 2007-03-22 Mark Mitchell <mark@codesourcery.com>
5891
5892 * cp-tree.h (current_tempalte_parms): Improve documentation.
5893 * pt.c (current_template_args): Likewise.
5894
5895 PR c++/30863
5896 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
5897 not consume tokens when failing.
5898
5899 2007-03-22 Jim Wilson <wilson@specifix.com>
5900 Mark Mitchell <mark@codesourcery.com>
5901
5902 PR c++/31273
5903 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
5904 consistent with FROM.
5905
5906 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5907
5908 * error.c (dump_expr): Handle dependent names that designate types.
5909 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
5910
5911 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
5912
5913 * cp-tree.def, parser.c, pt.c: Fix comment typos.
5914
5915 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5916
5917 * cvt.c (cp_convert_and_check) : Define.
5918 * cp-tree.h (cp_convert_and_check): Declare.
5919 * call.c (convert_conversion_warnings): Rename to
5920 conversion_null_warnings. The warning for floating-point to
5921 integer is handled by convert_and_check in convert_like_real.
5922 (convert_like_real): convert_conversion_warnings was renamed as
5923 conversion_null_warnings.
5924 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
5925 overflow and changes of value during conversion.
5926
5927 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5928
5929 PR c++/30891
5930 * parser.c (cp_parser_statement): If 'namespace' is found, this
5931 only can be a namespace alias definition, so parse it now.
5932 (cp_parser_namespace_alias_definition): if we find an open brace
5933 instead of '=', then this is actually a misplaced namespace
5934 definition.
5935
5936 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5937
5938 PR c++/24924
5939 * decl.c (cxx_init_decl_processing): Move command-line options
5940 processing to c-opts.c.
5941
5942 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
5943
5944 * ptree.c (cxx_print_type): Use formatting markup for integers
5945 when printing template parameter index/level/orig level.
5946 (cxx_print_xnode): Ditto.
5947 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
5948 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
5949 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
5950 HOST_WIDE_INTs.
5951 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
5952 rather than a HOST_WIDE_INT.
5953 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
5954 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
5955 better bit-packing.
5956 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
5957 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
5958 IN_BASE_INITIALIZER bool bitfields.
5959 (struct cp_declarator): Make KIND a 4-bit field. Make
5960 PARAMETER_PACK_P a bool bitfield just after KIND.
5961 * pt.c (uses_parameter_packs): Destroy the pointer set.
5962 (make_pack_expansion): Ditto.
5963 (check_for_bare_parameter_packs): Ditto.
5964 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
5965
5966 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
5967
5968 PR c++/31165
5969 * call.c (convert_default_arg): Instead of copying the node,
5970 unshare it.
5971
5972 2007-03-15 Dirk Mueller <dmueller@suse.de>
5973
5974 PR c++/30860
5975 * call.c (convert_conversion_warnings): New..
5976 (convert_like_real): .. factored out from here.
5977 (convert_conversion_warnings): Add warning about
5978 false being converted to NULL in argument passing.
5979
5980 2007-03-14 Dirk Mueller <dmueller@suse.de>
5981
5982 * semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
5983 (finish_do_body): Warn about empty body in do/while statement.
5984
5985 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5986
5987 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
5988
5989 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5990
5991 PR c/21438
5992 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
5993 warning.
5994
5995 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
5996
5997 * repo.c (init_repo): Initialize random_seed saved options.
5998 (finish_repo): Adjust.
5999
6000 2007-03-13 Mark Mitchell <mark@codesourcery.com>
6001
6002 PR bootstrap/30899
6003 * Make-lang.in (doc/g++.1): Use $< to specify the location from
6004 which to copy.
6005
6006 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
6007
6008 * decl.c (compute_array_index_type): New warning flag warn_vla.
6009
6010 2007-03-12 Mark Mitchell <mark@codesourcery.com>
6011
6012 PR c++/30108
6013 * call.c (convert_default_arg): Copy non-constant arguments.
6014
6015 2007-03-11 Mark Mitchell <mark@codesourcery.com>
6016
6017 PR c++/31038
6018 * parser.c (cp_parser_postfix_expression): Disallow compound
6019 literals in constant expressions.
6020
6021 PR c++/30328
6022 * semantics.c (finish_typeof): Use unlowered_expr_type.
6023
6024 2007-03-10 Mark Mitchell <mark@codesourcery.com>
6025
6026 PR c++/30274
6027 * cp-tree.h (unlowered_expr_type): New function.
6028 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
6029 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
6030 (unlowered_expr_type): New function.
6031 (build_unary_op): Disallow predecrements of bool bitfields.
6032 * call.c (build_conditional_expr): Use unlowered_expr_type.
6033 * pt.c (type_unification_real): Likewise.
6034
6035 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
6036
6037 PR c++/20599
6038 * typeck.c (check_return_expr): Check for bare parameter packs.
6039 (comptypes): Compare template parameter packs and
6040 type pack expansions.
6041 * decl.c (grokdeclarator): Deal with the declaration of function
6042 parameter packs.
6043 (grokparms): Verify that the (optional) function parameter pack is
6044 at the end of the parameter list.
6045 (xref_basetypes): Handle pack expansions in the base class.
6046 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
6047 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
6048 (NONTYPE_ARGUMENT_PACK): New.
6049 (TYPE_PACK_EXPANSION): New.
6050 (EXPR_PACK_EXPANSION): New.
6051 (ARGUMENT_PACK_SELECT): New.
6052 * cp-objcp-common.c (cp_tree_size): Compute size of
6053 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
6054 ARGUMENT_PACK_SELECT.
6055 * error.c (dump_template_argument): Print template argument packs.
6056 (dump_template_argument_list): Ditto.
6057 (dump_template_parameter): Dump `...' for template type parameter
6058 packs.
6059 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
6060 (dump_parameters): Print function parameter packs.
6061 (dump_template_parms): Print template argument packs.
6062 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
6063 (maybe_warn_variadic_templates): New.
6064 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
6065 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
6066 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
6067 CAST_EXPR.
6068 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
6069 (write_template_arg): Write argument packs as separate arguments.
6070 * cp-tree.h (struct template_parm_index_s): Add flag that
6071 indicates that the template parameter is actually a parameter
6072 pack.
6073 (struct tree_argument_pack_select): New.
6074 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
6075 (union lang_tree_node): Add argument_pack_select.
6076 (FUNCTION_PARAMETER_PACK_P): New.
6077 (PACK_EXPANSION_P): New.
6078 (PACK_EXPANSION_PATTERN): New.
6079 (SET_PACK_EXPANSION_PATTERN): New.
6080 (PACK_EXPANSION_PARAMETER_PACKS): New.
6081 (ARGUMENT_PACK_P): New.
6082 (ARGUMENT_PACK_ARGS): New.
6083 (SET_ARGUMENT_PACK_ARGS): New.
6084 (ARGUMENT_PACK_INCOMPLETE_P): New.
6085 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
6086 (TEMPLATE_PARM_PARAMETER_PACK): New.
6087 (TEMPLATE_TYPE_PARAMETER_PACK): New.
6088 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
6089 (ARGUMENT_PACK_SELECT_INDEX): New.
6090 (ARGUMENT_PACK_SELECT_ARG): New.
6091 (struct cp_declarator): Add parameter_pack_p flag.
6092 (maybe_warn_variadic_templates): Declare.
6093 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
6094 indicate a template parameter pack.
6095 (uses_parameter_packs): Declare.
6096 (template_parameter_pack_p): Declare.
6097 (template_parms_variadic_p): Declare.
6098 (make_pack_expansion): Declare.
6099 (check_for_bare_parameter_packs): Declare.
6100 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
6101 sizeof... expressions.
6102 (pp_cxx_expression): Print pack expansions and non-type argument
6103 packs.
6104 (pp_cxx_exception_specification): Print pack expansions.
6105 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
6106 (pp_cxx_ctor_initializer): Print pack expansions.
6107 (pp_cxx_type_id): Print pack expansions.
6108 (pp_cxx_template_argument_list): Print argument packs.
6109 (pp_cxx_template_parameter): Print ellipsis for template parameter
6110 packs.
6111 * pt.c (comp_template_parms): Compare template parameter packs.
6112 (template_parameter_pack_p): New.
6113 (template_parms_variadic_p): New.
6114 (template_args_variadic_p): New.
6115 (make_ith_pack_parameter_name): New.
6116 (struct find_parameter_pack_data): New.
6117 (find_parameter_packs_r): New.
6118 (uses_parameter_packs): New.
6119 (make_pack_expansion): New.
6120 (check_for_bare_parameter_packs): New.
6121 (expand_template_argument_pack): New.
6122 (reduce_template_parm_level): Propagate parameter pack flag.
6123 (process_template_parm): Add is_parameter_pack parameter to state
6124 when the parameter is actually a parameter pack. Create template
6125 parameter packs when is_parameter_pack is true.
6126 (current_template_args): The argument for a template parameter
6127 pack is an argument pack containing a single pack expansion.
6128 (process_partial_specialization): When checking that non-type
6129 argument expressions do not involve template parameters, loop over
6130 the arguments in argument packs separately.
6131 (push_template_decl_real): Check that the type of the declaration
6132 does not have any bare parameter packs. Check that primary
6133 templates have no more than one parameter pack, and that it comes
6134 at the end of the template parameter list.
6135 (convert_template_argument): Handle coercions for pack expansion
6136 expressions by coercing the pattern then rebuilding the expansion.
6137 (coerce_template_parms): When coercing the arguments for a
6138 variadic template, pack "extra" arguments into an argument pack.
6139 (coerce_template_template_parms): Cannot coerce between parameter
6140 packs and non-pack parameters.
6141 (template_args_equal): Compare PACK_EXPANSION_P expressions.
6142 (comp_template_args): Expand all template arguments packs before
6143 comparing template argument lists.
6144 (mangle_class_name_for_template): Make argument packs as separate
6145 template arguments.
6146 (for_each_template_parm_r): No need to handle BASELINK.
6147 (instantiate_class_template): Handle pack expansions in the base
6148 class list.
6149 (tsubst_pack_expansion): New.
6150 (tsubst_template_args): Handle substitutions of argument packs and
6151 pack expansion into template argument lists.
6152 (tsubst_decl): Expand function parameter packs into separate
6153 function parameters.
6154 (tsubst_arg_types): Expand a type pack expansion into separate
6155 argument types.
6156 (tsubst_exception_specification): Handle pack expansions in
6157 exception specifiers.
6158 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
6159 replacing a template parameter with its argument. If we encounter
6160 a substitution for an argument pack, just return the parameter
6161 itself.
6162 (tsubst_copy): sizeof(X...) returns the number of elements in
6163 parameter pack X. See through ARGUMENT_PACK_SELECT when the
6164 PARM_DECL is a parameter pack.
6165 (tsubst_expr): Expression pack expansions and argument packs
6166 cannot show up here; they will all be handled through function
6167 calls, sizeof, and template argument lists.
6168 (tsubst_copy_and_build): sizeof(X...) returns the number of
6169 elements in parameter pack X. Handle pack expansions in TREE_LIST
6170 and CONSTRUCTOR nodes.
6171 (fn_type_unification): Handle "incomplete" explicit template
6172 argument lists that specify some of the arguments for a template
6173 parameter pack.
6174 (type_unification_real): Unify arguments against pack expansions.
6175 (template_parm_level_and_index): New, helper function.
6176 (unify_pack_expansion): New.
6177 (unify): Unify argument packs on an argument-by-argument basis,
6178 handling variadic argument packs as well.
6179 (more_specialized_fn): Handle unification of function parameter
6180 packs. All things being equal, prefer non-variadic function
6181 templates to variadic function templates.
6182 (more_specialized_class): Prefer the variadic class template
6183 partial specialization that binds fewer arguments to a parameter
6184 pack.
6185 (regenerate_decl_from_template): Expand function parameter packs
6186 into separate parameters.
6187 (instantiate_decl): Ditto.
6188 (tsubst_initializer_list): Handle pack expansions for base-class
6189 initializers.
6190 (dependent_type_p_r): Determine dependent types in argument packs
6191 and pack expansions.
6192 (value_dependent_expression_p): Determine value-dependence of
6193 non-type argument packs.
6194 (dependent_template_arg_p): Handle argument packs.
6195 * semantics.c (finish_cond): Check for bare parameter packs.
6196 (finish_expr_stmt): Ditto.
6197 (finish_for_expr): Ditto.
6198 (finish_switch_cond): Ditto.
6199 (finish_mem_initializers): Ditto.
6200 * name-lookup.c (arg_assoc_type): Handle pack expansions and
6201 argument packs.
6202 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
6203 * parser.c (make_declarator): Declarator is not an expansion.
6204 (make_pointer_declarator): Transfer parameter pack flag to outer
6205 declarator.
6206 (make_reference_declarator): Ditto.
6207 (make_ptrmem_declarator): Ditto.
6208 (make_call_declarator): Ditto.
6209 (make_array_declarator): Ditto.
6210 (cp_parser_postfix_expression): Allow pack expansion expressions
6211 in the argument list for a call expression.
6212 (cp_parser_parenthesized_expression_list): Add new parameter
6213 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
6214 into separate arguments."
6215 (cp_parser_new_placement): Allow pack expansion expressions.
6216 (cp_parser_new_initializer): Ditto.
6217 (cp_parser_mem_initializer_list): Allow ellipsis to create a
6218 base-class initializer expansion.
6219 (cp_parser_mem_initializer): Ditto.
6220 (cp_parser_template_parameter_list): Keep track of whether the
6221 template parameter is a template parameter pack.
6222 (cp_parser_template_parameter): Parse the ellipsis to indicate a
6223 template parameter pack.
6224 (cp_parser_type_parameter): Ditto.
6225 (cp_parser_template_argument_list): Parse the ellipsis to indicate
6226 a pack expansion.
6227 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
6228 this declarator is a parameter pack.
6229 (cp_parser_parameter_declaration): The ellipsis does not end the
6230 parameter declaration, because it might be a parameter pack. Parse
6231 the ellipsis to indicate a parameter pack.
6232 (cp_parser_initializer): Allow pack expansions.
6233 (cp_parser_initializer_list): Allow ellipsis to create an
6234 initializer expansion.
6235 (cp_parser_base_clause): Allow ellipsis to create a base specifier
6236 expansion.
6237 (cp_parser_type_id_list): Allow ellipsis to create an exception
6238 specifier expansion.
6239 (cp_parser_attribute_list): Don't allow pack expansions.
6240 (cp_parser_functional_cast): Allow pack expansions.
6241 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
6242 compute the length of a parameter pack.
6243 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
6244 end a template argument.
6245 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
6246 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
6247 CAST_EXPR.
6248
6249 2007-03-09 Dirk Mueller <dmueller@suse.de>
6250
6251 * call.c (build_new_op): Call warn_logical_operator.
6252
6253 2007-03-08 Volker Reichelt <v.reichelt@netcologne.de>
6254
6255 PR c++/30852
6256 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
6257
6258 PR c++/30534
6259 * pt.c (any_template_arguments_need_structural_equality_p):
6260 Robustify.
6261
6262 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
6263
6264 * decl.c (grokdeclarator): Disable warnings for anonymous
6265 bitfields.
6266
6267 2007-03-05 Volker Reichelt <v.reichelt@netcologne.de>
6268
6269 * typeck2.c (readonly_error): Always emit a hard error.
6270 Remove last argument.
6271 * cp-tree.h (readonly_error): Adjust prototype.
6272 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
6273 * typeck.c (build_unary_op): Likewise.
6274 (build_modify_expr): Likewise.
6275
6276 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
6277
6278 PR c++/30895
6279 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
6280
6281 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6282
6283 PR c++/15787
6284 * parser.c (struct cp_parser): New IN_IF_STMT.
6285 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
6286 returning if parsing the body of an 'if' statement or issuing an
6287 error and continuing.
6288 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
6289 body of 'if'.
6290 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
6291
6292 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
6293
6294 PR c++/28253
6295 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
6296 for thunks.
6297
6298 2007-03-02 Geoffrey Keating <geoffk@apple.com>
6299
6300 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
6301 Objective-C++. Don't exit early if -shared-libgcc needs to be
6302 added.
6303
6304 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6305
6306 * typeck.c (common_base_type): Delete unused function.
6307
6308 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
6309
6310 * Make-lang.in: Add dummy lang.install-pdf target.
6311
6312 2007-03-01 Simon Baldwin <simonb@google.com>
6313
6314 PR c++/23689
6315 * decl.c (check_tag_decl): Added new warning for typedef ignored
6316 when it precedes an otherwise valid non-typedef declaration.
6317
6318 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
6319
6320 * typeck.c (build_function_call): Store converted arguments
6321 in a stack-allocated array instead of building a list.
6322 (convert_arguments): Store arguments in the array passed in as an
6323 argument, and return the actual number of arguments.
6324 * call.c (build_call): Delete, and replace with...
6325 (build_call_n, build_call_a): New.
6326 (build_op_delete_call): Rewrite to avoid constructing argument lists.
6327 (build_over_call): Store converted arguments in a stack-allocated
6328 array instead of building a list.
6329 (build_cxx_call): Pass arguments in an array instead of as a list.
6330 (build_java_interface_fn_ref): Rewrite to avoid constructing
6331 argument lists.
6332 * tree.h: Update declarations to reflect above changes.
6333 * method.c (use_thunk): Use a stack-allocated array to hold
6334 the arguments instead of a list.
6335 * rtti.c (throw_bad_cast): Update call to cxx_call.
6336 (throw_bad_typeid): Likewise.
6337 (build_dynamic_cast_1): Likewise.
6338 * init.c (build_builtin_delete_call): Use build_call_n.
6339 * decl.c (expand_static_init): Likewise.
6340 * except.c (cp_protect_cleanup_actions): Likewise.
6341 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
6342 (gimplify_must_not_throw_expr): Likewise.
6343 (cxx_omp_apply_fn): Use build_call_a.
6344
6345 2007-02-26 Mark Mitchell <mark@codesourcery.com>
6346
6347 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
6348 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
6349
6350 2007-02-25 Mark Mitchell <mark@codesourcery.com>
6351
6352 * cp-tree.h (static_ctors): Remove.
6353 * cp-tree.h (static_dtors): Likewise.
6354 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
6355 refactoring of tree_map hierarchy.
6356 (decl_shadowed_for_var_insert): Likewise.
6357 * semantics.c (expand_body): Use c_expand_body.
6358 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
6359 * decl2.c (static_ctors): Remove.
6360 (static_dtors): Likewise.
6361 (generate_ctor_or_dtor_function): Pass NULL_TREE to
6362 objc_generate_static_init_call. Do not call static_[cd]tors.
6363 (generate_ctor_and_dtor_functions_for_priority): Do not check for
6364 static_[cd]tors.
6365 (cp_write_global_declarations): Likewise.
6366
6367 2007-02-23 Richard Guenther <rguenther@suse.de>
6368
6369 * class.c (note_name_declared_in_class): Make declaration
6370 changes meaning a pedwarn.
6371
6372 2007-02-22 Michael Matz <matz@suse.de>
6373
6374 PR c++/29433
6375 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
6376 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
6377 dump_function_decl): Guard emitting outer scopes by new flag.
6378 * cp-lang.c (cxx_dwarf_name): New function.
6379 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
6380 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
6381 Remove functions.
6382 (push_template_decl_real, lookup_template_class): Remove calls
6383 to above functions.
6384
6385 2007-02-19 Mark Mitchell <mark@codesourcery.com>
6386
6387 * call.c (build_new_method_call): Ensure that explicit calls of
6388 destructors have type "void".
6389
6390 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6391
6392 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
6393 and -Walways-true with -Waddress.
6394 * cvt.c (convert_to_void): Replace unconditional warning with
6395 -Waddress.
6396
6397 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
6398
6399 * decl.c, tree.c: Fix comment typos.
6400
6401 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
6402
6403 PR C++/30158
6404 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
6405 statement expression if we had an error mark node.
6406
6407 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
6408 Brooks Moses <brooks.moses@codesourcery.com>
6409 Lee Millward <lee.millward@codesourcery.com>
6410
6411 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
6412 Change class to tcc_vl_exp.
6413
6414 * call.c (build_call): Use build_call_list instead
6415 of build3.
6416 (build_over_call): Likewise.
6417 (build_new_method_call): Use build_min_non_dep_call_list
6418 instead of build_min_non_dep.
6419
6420 * error.c (dump_call_expr_args): New function.
6421 (dump_aggr_init_expr_args): New function.
6422 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
6423 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
6424
6425 * cvt.c (convert_to_void): Use build_call_array instead
6426 of build3; use new AGGR_INIT_EXPR accessor macros.
6427
6428 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
6429 instead of TREE_CODE_LENGTH.
6430
6431 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
6432 AGGR_INIT_EXPR accessor macros.
6433
6434 * cp-gimplify.c (cp_gimplify_init_expr): Use
6435 AGGR_INIT_EXPR_SLOT to set the slot operand.
6436
6437 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
6438 (AGGR_INIT_EXPR_SLOT): New macro.
6439 (AGGR_INIT_EXPR_ARG): New macro.
6440 (aggr_init_expr_nargs): New macro.
6441 (AGGR_INIT_EXPR_ARGP): New macro.
6442 (aggr_init_expr_arg_iterator): New.
6443 (init_aggr_init_expr_arg_iterator): New.
6444 (next_aggr_init_expr_arg): New.
6445 (first_aggr_init_expr_arg): New.
6446 (more_aggr_init_expr_args_p): New.
6447 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
6448 (stabilize_aggr_init): New declaration.
6449 (build_min_non_dep_call_list): Likewise.
6450
6451 * tree.c (process_aggr_init_operands): New function.
6452 (build_aggr_init_array) New function.
6453 (build_cplus_new): Update to use new CALL_EXPR and
6454 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
6455 build_aggr_init_array.
6456 (build_min_non_dep_call_list) New function.
6457 (build_min_nt): Assert input code parameter is not a variable
6458 length expression class.
6459 (build_min, build_min_non_dep): Likewise.
6460 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
6461 to check for equality instead of recursing. Handle tcc_vl_exp
6462 tree code classes.
6463 (stabilize_call): Update to only handle CALL_EXPRs, not
6464 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
6465 (stabilize_aggr_init): New function.
6466 (stabilize_init): Use it.
6467
6468 * cxx-pretty-print.c (pp_cxx_postfix_expression)
6469 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
6470 AGGR_INIT_EXPR accessor macros and argument iterators.
6471
6472 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
6473 build_vl_exp. Iterate through the operands, recursively
6474 processing each one.
6475 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
6476 CALL_EXPR accessor macros.
6477 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
6478 tree code classes. Use TREE_OPERAND_LENGTH instead of
6479 TREE_CODE_LENGTH.
6480
6481 * semantics.c (finish_call_expr): Use build_nt_call_list
6482 instead of build_nt.
6483 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
6484 accessor macros. Use build_call_array to construct the
6485 CALL_EXPR node instead of build3
6486
6487 * decl2.c (build_offset_ref_call_from_tree): Use
6488 build_nt_call_list and build_min_non_dep_call_list instead
6489 of build_min_nt and build_min_non_dep.
6490
6491 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
6492 Use build_nt_call_list instead of build_min_nt.
6493
6494 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6495
6496 PR c++/28943
6497 * call.c (build_conditional_expr): Improve error message.
6498
6499 2007-02-13 Dirk Mueller <dmueller@suse.de>
6500
6501 * friend.c (do_friend): Annotate warning about friend
6502 declarations in templates with OPT_Wnon_template_friend.
6503 Convert informal message from warning() to inform().
6504
6505 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
6506 Mark Mitchell <mark@codesourcery.com>
6507
6508 PR c++/14622
6509 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
6510 instantiations for variables.
6511
6512 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6513
6514 PR middle-end/7651
6515 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
6516 Check warn_unused_value just once.
6517
6518 2007-02-11 Mark Mitchell <mark@codesourcery.com>
6519
6520 PR c++/26988
6521 * pt.c (determine_specialization): Use skip_artificial_parms_for.
6522 (fn_type_unificiation): Likewise.
6523 (get_bindings): Likewise.
6524
6525 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
6526
6527 PR target/29487
6528 * decl.c (finish_function): Use DECL_REPLACEABLE.
6529 * tree.c (cp_cannot_inline_tree_fn): Likewise.
6530
6531 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
6532
6533 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
6534
6535 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
6536
6537 * decl.c (grokvardecl): Don't error if !have_tls.
6538 (grokdeclarator): Likewise.
6539 * parser.c (cp_parser_omp_threadprivate): Likewise.
6540
6541 2007-02-07 Jakub Jelinek <jakub@redhat.com>
6542
6543 PR c++/30703
6544 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
6545 parameters and result decls in omp clauses.
6546 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
6547 by reference.
6548
6549 2007-02-05 Dirk Mueller <dmueller@suse.de>
6550
6551 PR bootstrap/30510
6552 * parser.c (cp_parser_class_specifier): Always initialize bases.
6553
6554 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
6555
6556 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
6557 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
6558 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
6559 expressions.
6560 * semantics.c (finish_omp_atomic): Store a whole expression node
6561 in operand 1, and integer_zero_node in operand 0, for dependent
6562 OMP_ATOMIC. Rewrite to make flow easier to understand.
6563
6564 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6565
6566 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
6567
6568 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
6569
6570 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
6571 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
6572
6573 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
6574
6575 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
6576 keyword warning to -Wc++0x-compat.
6577
6578 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6579
6580 * decl.c (grokdeclarator): Update documentation.
6581
6582 2007-02-02 Jakub Jelinek <jakub@redhat.com>
6583
6584 PR c++/30536
6585 * decl.c (grokdeclarator): If __thread is used together with
6586 a storage class other than extern and static, clear thread_p
6587 after issuing diagnostics and fall through to checking the
6588 storage class.
6589
6590 2007-01-30 Roger Sayle <roger@eyesopen.com>
6591
6592 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
6593 calculating the size of an array (to avoid recursive errors).
6594
6595 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6596
6597 PR c++/24745
6598 * typeck.c (build_binary_op): Fix logic for warning. Move warning
6599 to -Wpointer-arith.
6600 * call.c (convert_like_real): Don't warn when converting to
6601 boolean type.
6602
6603 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6604
6605 * decl.c (pop_label): Replace warning with call to
6606 warn_for_unused_label.
6607
6608 2007-01-28 Andrew Pinski <pinskia@gmail.com>
6609
6610 PR C++/28988
6611 * semantics.c (finish_pseudo_destructor_expr): Check the
6612 destrutor name by calling check_dtor_name.
6613
6614 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
6615
6616 * lex.c (D_CPP0X): Rename.
6617 (D_CXX0X): To this.
6618 (reswords): D_CPP0X -> D_CXX0X.
6619 (init_reswords): Ditto.
6620 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
6621 of C++0x keywords as identifiers.
6622
6623 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
6624
6625 PR c++/27492
6626 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
6627 function decls.
6628
6629 2007-01-23 Ian Lance Taylor <iant@google.com>
6630
6631 * typeck.c (convert_for_assignment): Only warn about a = b = c
6632 when converting to bool.
6633
6634 2007-01-23 Roger Sayle <roger@eyesopen.com>
6635
6636 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
6637 TREE_OVERFLOW.
6638 * typeck.c (ignore_overflows): Remove the remaining uses of
6639 TREE_CONSTANT_OVERFLOW.
6640
6641 2007-01-20 Jan Hubicka <jh@suse.cz>
6642
6643 * decl2.c (start_objects, start_static_storage_duration_function):
6644 Do not make the functions uninlinable.
6645
6646 2007-01-17 Ian Lance Taylor <iant@google.com>
6647
6648 * class.c (add_method): Call VEC_reserve_exact rather than passing
6649 a negative size to VEC_reserve.
6650
6651 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
6652
6653 PR c++/29573
6654 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
6655
6656 2007-01-10 Mark Mitchell <mark@codesourcery.com>
6657
6658 PR c++/28999
6659 * decl.c (make_typename_type): If the qualified name is not a
6660 type, issue an error.
6661 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
6662 formatting.
6663
6664 2007-01-08 Geoffrey Keating <geoffk@apple.com>
6665
6666 * rtti.c: Include target.h.
6667 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
6668 don't emit typeinfo for fundamental types as weak.
6669 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
6670
6671 2007-01-08 Richard Guenther <rguenther@suse.de>
6672
6673 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
6674
6675 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
6676
6677 * call.c (standard_conversion): Pass flag to
6678 vector_types_convertible_p to disallow emission of note.
6679 * typeck.c (convert_for_assignment): Pass flag to
6680 vector_types_convertible_p to allow emission of note.
6681 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
6682 to disallow emission of note.
6683
6684 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6685
6686 PR c++/28986
6687 * typeck.c (build_binary_op): Call overflow_warning if
6688 TREE_OVERFLOW_P is true for the result and not for any of the
6689 operands.
6690
6691 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
6692
6693 PR c++/19439
6694 * class.c (add_method): Don't wait until template
6695 instantiation time to complain about duplicate methods.
6696
6697 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6698
6699 PR c/19978
6700 * semantics.c (finish_unary_op_expr): Warn only if result
6701 overflowed and operands did not.
6702
6703 2007-01-05 Ian Lance Taylor <iant@google.com>
6704
6705 * typeck.c (build_binary_op): Warn about comparing a non-weak
6706 address to NULL.
6707
6708 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
6709
6710 * pt.c (tsubst): Propagate the need for structural equality checks
6711 when reducing the level of template parameters.
6712
6713 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
6714
6715 * pt.c: Fix a comment typo.
6716
6717 2007-01-02 Ian Lance Taylor <iant@google.com>
6718
6719 * semantics.c (maybe_convert_cond): Optionally warn when using an
6720 assignment as a condition.
6721 * typeck.c (convert_for_assignment): Optionally warn about
6722 assigning the result of an assignment to a bool.
6723
6724 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
6725
6726 * pt.c (canonical_template_parms): Correct typo in comment.
6727
6728 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
6729
6730 * typeck.c (structural_comptypes): Renamed from "comptypes".
6731 (comptypes): Use canonical type information to perform fast type
6732 comparison. When VERIFY_CANONICAL_TYPES, verify that the
6733 canonical type comparison returns the same results as we would see
6734 from the current, structural check. Support COMPARE_STRUCTURAL
6735 when we need structural checks.
6736 * decl.c (typename_compare): Fix comment.
6737 (build_typename_type): TYPENAME_TYPE nodes require structural
6738 equality checks, because they resolve different based on the
6739 current class type.
6740 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
6741 require structural equality checks (for now).
6742 (build_ptrmemfunc_type): Build the canonical pointer to member
6743 function type.
6744 (compute_array_index_type): Whenever we build a new index type
6745 to represent the size of an array in a template, we need to mark
6746 this index type as requiring structural equality. This goes for
6747 arrays with value-dependent sizes with the current ABI, or all
6748 arrays with ABI-1.
6749 * tree.c (cplus_array_hash): New.
6750 (struct cplus_array_info): New.
6751 (cplus_array_compare): New.
6752 (cplus_array_htab): New.
6753 (build_cplus_array_type_1): Use a hash table to cache the array
6754 types we build. Build the canonical array type for each array
6755 type.
6756 (cp_build_qualified_type_real): When building a cv-qualified array
6757 type, use the hash table of array types and build canonical array
6758 types as necessary.
6759 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
6760 use structural equality (for now).
6761 * cp-tree.h (COMPARE_STRUCTURAL): New.
6762 * pt.c (canonical_template_parms): New.
6763 (canonical_type_parameter): New.
6764 (process_template_parm): Find the canonical type parameter.
6765 (lookup_template_class): When we have named the primary template
6766 type, set the canonical type for our template class to the primary
6767 template type. If any of the template arguments need structural
6768 equality checks, the template class needs structural equality
6769 checks.
6770 (tsubst): When reducing the level of a template template
6771 parameter, we require structural equality tests for the resulting
6772 parameter because its template parameters have not had their types
6773 canonicalized. When reducing a template type parameter, find the
6774 canonical reduced type parameter.
6775 (any_template_arguments_need_structural_equality_p): New.
6776