OSDN Git Service

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