OSDN Git Service

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