OSDN Git Service

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