OSDN Git Service

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