OSDN Git Service

2008-02-15 Douglas Gregor <doug.gregor@gmail.com>
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2008-02-15  Douglas Gregor  <doug.gregor@gmail.com>
2
3         PR c++/35023
4         PR c++/35024
5         PR c++/35026
6         * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
7         is error_mark_node, return an error early.
8         (find_parameter_packs_r): Pass the pointer set along to recursive
9         calls of cp_walk_subtrees; don't try to manage the pointer set
10         ourselves.
11         (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
12         (make_pack_expansion): Ditto.
13         (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
14         a second pass through the tree with find_parameter_packs_r; that
15         second pass no longer does anything.
16         (push_template_decl_real): If we have an erroneous declaration,
17         set its type to error_mark_node before returning an error.
18
19 2008-02-14  Douglas Gregor  <doug.gregor@gmail.com>
20
21         PR c++/34050
22         * pt.c (tsubst_initializer_list): Deal with the use of
23         VOID_TYPE_NODE to indicate value-initialization of the bases.
24
25 2008-02-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
26             Jason Merrill  <jason@redhat.com>
27
28         PR c++/5645
29         PR c++/11159
30         * class.c (type_has_user_nondefault_constructor): New fn.
31         * cp-tree.h: Declare it.
32         * init.c (emit_mem_initializers): Use it for -W warning about
33         missing base initializer.
34
35 2008-02-14  Paolo Carlini  <pcarlini@suse.de>
36
37         PR c++/28743
38         * pt.c (determine_specialization): In case of function templates,
39         when the type of DECL does not match FN there is no match.
40
41 2008-02-13  Jakub Jelinek  <jakub@redhat.com>
42             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
43
44         PR c++/35138
45         * parser.c (cp_parser_pseudo_destructor_name): If next tokens
46         are not identifier :: ~, return before calling cp_parser_type_name.
47
48 2008-02-13  Jason Merrill  <jason@redhat.com>
49
50         PR c++/34962, c++/34937, c++/34939
51         * decl2.c (is_late_template_attribute): Always defer attributes 
52         vector_size and weak.
53
54         PR c++/34774
55         * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
56         of enumerators, too.
57
58 2008-02-12  Jason Merrill  <jason@redhat.com>
59
60         PR c++/34824
61         * call.c (convert_like_real): Pass LOOKUP_ONLYCONVERTING to build_temp
62         if we're doing conversions to call a user-defined conversion function.
63
64 2008-02-12  Steven Bosscher  <steven@gcc.gnu.org>
65
66         PR c++/29048
67         * semantics.c (finish_qualified_id_expr): Avoid duplicate access
68         check here, too.
69
70 2008-02-12  Jakub Jelinek  <jakub@redhat.com>
71
72         PR c++/34862
73         * init.c (build_new_1): Don't create placement_expr before
74         constructing alloc_call.  Verify that the pointer is passed by
75         value to operator new.
76
77 2008-02-11  Jason Merrill  <jason@redhat.com>
78
79         PR c++/35097
80         * pt.c (tsubst): Don't look up a template typedef in an explicit
81         specialization.
82
83 2008-02-11  Douglas Gregor  <doug.gregor@gmail.com>
84
85        PR c++/35113
86        * tree.c (cp_build_qualified_type_real): When building a
87        cv-qualified array type, build it as a unique type with
88        build_cplus_array_type_1 and then adopt the unqualified type's
89        main variant.
90         
91 2008-02-11  Paolo Carlini  <pcarlini@suse.de>
92
93         PR c++/35077
94         * decl.c (groktypename): Check grokdeclarator return.
95
96 2008-02-10  Jason Merrill  <jason@redhat.com>
97
98         PR c++/34094
99         * decl2.c (cp_write_global_declarations): Don't write out static 
100         data members with DECL_IN_AGGR_P set.
101
102 2008-02-08  Jason Merrill  <jason@redhat.com>
103
104         PR c++/35116
105         * tree.c (build_target_expr_with_type): Handle void initializer.
106         (bot_manip): Remap slot before recursing.
107
108 2008-02-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
109
110         PR other/35107
111         * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
112
113 2008-02-06  Alexandre Oliva  <aoliva@redhat.com>
114
115         PR c++/35056
116         * tree.c: Include tree-flow.h.
117         (build_target_expr): Check type compatibility.
118         * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
119         * call.c (convert_like_real): Convert bitfield to expected type.
120
121 2008-02-06  Douglas Gregor  <doug.gregor@gmail.com>
122
123         PR c++/35049
124         PR c++/35096
125         * typeck.c (structural_comptypes): Call cp_comptypes.
126         (comptypes): New; called from the C/C++ common bits to perform
127         strict checks.
128         (cp_comptypes): Renamed from comptypes, which is already used,
129         with a different signature, by the C++ front end.
130         (build_reinterpret_cast_1): Call cp_comptypes.
131         (ptr_reasonably_similar): Ditto.
132         * decl.c (decls_match): Ditto.
133         * cvt.c (convert_to_reference): Ditto.
134         * cp-tree.h (same_type_p): Ditto.
135         (same_or_base_type_p): Ditto.
136         (comptypes): Rename to cp_comptypes.
137         * pt.c (canonical_type_parameter): Call cp_comptypes.
138
139 2008-02-05  Jakub Jelinek  <jakub@redhat.com>
140
141         PR c++/33553
142         * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
143         value dependent expression.
144
145 2008-02-05  Douglas Gregor  <doug.gregor@gmail.com>
146
147         PR c++/35074
148         * decl2.c (save_template_attributes): When we're modifying the
149         TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
150         all of the other variants to add those same attributes. Otherwise,
151         the main variant will be inconsistent with those other variants.
152         
153 2008-02-04  Richard Guenther  <rguenther@suse.de>
154
155         PR java/35035
156         * decl.c (record_builtin_java_type): Make jboolean a
157         integer type again where its mode doesn't match that of bool.
158
159 2008-02-02  Jason Merrill  <jason@redhat.com>
160             Mark Mitchell  <mark@codesourcery.com>
161
162         PR c++/33916
163         * init.c (build_value_init_1): New function.
164         (build_value_init): New function.
165         * typeck2.c (build_functional_cast): Call it.
166         * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
167
168         * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from 
169         TYPE_HAS_CONSTRUCTOR.
170         * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
171         add_implicitly_declared_members): Adjust.
172         (check_field_decls): Adjust. Remove warnings about reference/const
173         in class without constructor.
174         (check_bases_and_members): Adjust.  Give those warnings here instead.
175         * decl.c (fixup_anonymous_aggr): Adjust.
176         (check_initializer): Adjust, clarify logic slightly.
177         (grok_special_member_properties): Adjust, only set if user-provided.
178         * rtti.c (create_tinfo_types): Don't set.
179         * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
180         Use same_type_ignoring_top_level_qualifiers_p.
181         * pt.c (check_explicit_specialization): Adjust.
182         (instantiate_class_template): Adjust.
183
184 2008-01-31  Douglas Gregor  <doug.gregor@gmail.com>
185            Jakub Jelinek  <jakub@redhat.com>
186
187        PR c++/34935
188        PR c++/34936
189        * typeck.c (structural_comptypes): Handle comparisons of
190        VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
191        REAL_TYPE nodes.
192        * mangle.c (write_builtin_type): Map down to the canonical type,
193        which will be one of the predefined type nodes.
194
195 2008-01-29  Michael Meissner  <michael.meissner@amd.com>
196
197         PR 35004
198         * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
199         bits to allow for expansion of the number of middle end tree
200         codes.
201
202 2008-01-29  Douglas Gregor  <doug.gregor@gmail.com>
203
204         PR c++/34055
205         PR c++/34103
206         PR c++/34219
207         PR c++/34606
208         PR c++/34753
209         PR c++/34754
210         PR c++/34755
211         PR c++/34919
212         PR c++/34961
213         * typeck.c (check_return_expr): Tweak call to
214         check_for_bare_parameter_packs.
215         * class.c (add_method): Be careful with error_mark_nodes.
216         * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
217         signature.
218         * pt.c (struct find_parameter_pack_data): Remove
219         SET_PACKS_TO_ERROR.
220         (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
221         (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
222         (make_pack_expansion): Ditto.
223         (check_for_bare_parameter_packs): Parameter is now a tree, not a
224         tree*.
225         (process_template_parm): Tweak call to
226         check_for_bare_parameter_packs.  
227         (push_template_decl_real): Tweak calls to
228         check_for_bare_parameter_packs. If bare parameter packs are found
229         in the list of exceptions, clear out that list after giving an
230         error.
231         * semantics.c (finish_cond): Tweak call to
232         check_for_bare_parameter_packs.
233         (finish_expr_stmt): Ditto.
234         (finish_for_expr): Ditto.
235         (finish_switch_cond): Ditto.
236         (finish_mem_initializers): Ditto.
237         (finish_member_declaration): Ditto.
238         (finish_static_assert): Check for bare parameter packs in the
239         condition.
240         * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
241         attributes of a declaration.
242         * parser.c (cp_parser_using_declaration): Tweak call to
243         check_for_bare_parameter_packs.
244         (cp_parser_base_clause): Ditto.
245
246 2008-01-28  Jason Merrill  <jason@redhat.com>
247
248         PR c++/35007
249         * class.c (build_base_path): Fix !want_pointer case.
250
251 2008-01-27  Jason Merrill  <jason@redhat.com>
252
253         PR c++/27177
254         * class.c (build_base_path): Fix previous change.
255
256 2008-01-26  Jakub Jelinek  <jakub@redhat.com>
257
258         PR c++/34965
259         * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
260         and TRUTH_XOR_EXPR.
261
262 2008-01-26  Richard Guenther  <rguenther@suse.de>
263
264         PR c++/34235
265         * typeck.c (build_binary_op): Remove code to shorten compares.
266
267 2008-01-25  Richard Guenther  <rguenther@suse.de>
268
269         PR c++/33887
270         * decl.c (record_builtin_java_type): Make __java_boolean
271         a variant of bool.
272         * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
273         after TYPE_MAIN_VARIANT check.
274
275 2008-01-25  Jason Merrill  <jason@redhat.com>
276
277         PR c++/27177
278         * class.c (build_base_path): Don't mess with virtual access if
279         skip_evaluation.
280         * call.c (standard_conversion): Don't check whether source type
281         is complete.
282
283         * decl2.c (is_late_template_attribute): Don't defer attribute
284         visibility just because the type is dependent.
285
286 2008-01-25  Jason Merrill  <jason@redhat.com>
287             Mark Mitchell  <mark@codesourcery.com>
288
289         PR c++/31780
290         * call.c (standard_conversion): Allow conversion from integer/real
291         to complex.
292         (compare_ics): Such a conversion is worse than a normal arithmetic
293         conversion.
294         
295 2008-01-25  Richard Guenther  <rguenther@suse.de>
296
297         PR c++/33887
298         * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
299         to true.
300
301 2008-01-24  Paolo Carlini  <pcarlini@suse.de>
302
303         PR c++/34603
304         * pt.c (push_template_decl_real): Return error_mark_node in case
305         of template definition of non-template.
306
307 2008-01-24  Jason Merrill  <jason@redhat.com>
308
309         PR c++/34913
310         * decl2.c (is_late_template_attribute): Defer any attribute with 
311         dependent args.  Also defer type attributes if the type is dependent.
312
313 2008-01-22  Jakub Jelinek  <jakub@redhat.com>
314             Alexandre Oliva  <aoliva@redhat.com>
315
316         PR c++/33984
317         * call.c (reference_binding): For bitfields use the declared bitfield
318         type.
319         (add_builtin_candidates): Likewise.
320         * class.c (layout_class_type): For bitfields copy over the
321         original type quals.
322
323 2008-01-22  Jason Merrill  <jason@redhat.com>
324
325         PR c++/28560
326         * decl.c (groktypename): Also ignore attributes on dependent 
327         possibly-class types.
328
329         PR c++/34912
330         * friend.c (do_friend): Check for prior declaration of a friend 
331         function of a local class.
332         * name-lookup.c (lookup_name_innermost_nonclass_level): 
333         No longer static.
334         * name-lookup.h: Declare it.
335
336 2008-01-22  Tom Tromey  <tromey@redhat.com>
337
338         PR c++/34829:
339         * init.c (build_new_1): Only disallow Java aggregates.
340
341 2008-01-22  Jakub Jelinek  <jakub@redhat.com>
342
343         PR c++/34607
344         * semantics.c (finish_omp_for): Don't call c_finish_omp_for
345         if decl or init is error_mark_node.
346
347         PR c++/34918
348         * error.c (dump_expr): Handle VECTOR_CST.
349
350 2008-01-21  Jason Merrill  <jason@redhat.com>
351
352         PR c++/33959
353         * pt.c (tsubst_aggr_type): Make sure our context is complete.
354
355         PR c++/34573
356         * pt.c (retrieve_local_specialization): Robustify.
357         (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
358
359         PR c++/34846
360         * pt.c (tsubst): Only call retrieve_local_specialization if the
361         original typedef was in a function template.
362
363         PR c++/34196
364         * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
365
366 2008-01-21  Richard Guenther  <rguenther@suse.de>
367
368         PR c++/34850
369         * error.c (cp_print_error_function): Deal with recursive
370         BLOCK trees.
371
372 2008-01-20  Paolo Carlini  <pcarlini@suse.de>
373
374         PR c++/34891
375         * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
376
377 2008-01-20  Paolo Carlini  <pcarlini@suse.de>
378
379         PR c++/34776
380         PR c++/34486
381         * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
382         on non-IS_AGGR_TYPE scope.
383         (constructor_name_p): Assert IS_AGGR_TYPE.
384
385 2008-01-18  Ian Lance Taylor  <iant@google.com>
386
387         PR c++/33407
388         * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
389         (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
390         DECL_IS_OPERATOR_NEW flag.
391
392 2008-01-16  Richard Guenther  <rguenther@suse.de>
393
394         PR c++/33819
395         * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
396         for conversions to type variants.
397
398 2008-01-15  Andreas Tobler  <a.tobler@schweiz.org>
399
400         * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
401         declaration and code.  Update copyright year.
402
403 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
404
405         PR c++/34399
406         * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
407         know we have a class type.
408
409 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
410
411         PR c++/34751
412         * pt.c (coerce_template_parameter_pack): When substituting into
413         the type of a non-type template parameter pack. use the
414         deduced/substituted arguments.
415         * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
416         can be a parameter pack with the ellipsis following it.  When we
417         have an erroneous declaration, allow it to be a parameter pack.
418         (cp_parser_template_parameter): Complain about default
419         arguments on non-type template parameter packs, and parse them
420         using the new cp_parser_default_argument.
421         (cp_parser_parameter_declaration): Complain about parameter packs
422         with default arguments. Move parsing of default arguments into a
423         new function, cp_parser_default_argument.
424         (cp_parser_default_argument): New; extracted from
425         cp_parser_parameter_declaration.
426
427 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
428
429         PR c++/34051
430         PR c++/34055
431         PR c++/34102
432         PR c++/34103
433         * typeck.c (check_return_expr): If there are bare parameter packs
434         in the return value, set it to error_mark_node.
435         * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
436         * pt.c (find_parameter_packs_r): Look at the type of
437         IDENTIFIER_NODEs (e.g., for user-defined conversions).
438         (check_for_bare_parameter_packs): Flip the result: now returns
439         TRUE when there were bare parameter packs, FALSE otherwise.
440         (push_template_decl_real): Deal with flipped result of
441         check_for_bare_parameter_packs.
442         * semantics.c (finish_cond): If there are bare parameter packs in
443         the conditional, set it to error_mark_node.
444         (finish_expr_stmt): If there are bare parameter packs in the
445         expression, set it to error_mark_node.
446         (finish_for_expr): Ditto.
447         (finish_switch_cond): If there are bare parameter packs in
448         the conditional, set it to error_mark_node.
449         (finish_mem_initializers): If there are bare parameter packs in
450         the member initializer, set it to error_mark_node.
451         (finish_member_declaration): Check the attributes of the
452         declaration for bare parameter packs, and remove the attributes if
453         any have bare parameter packs.
454         * parser.c (cp_parser_using_declaration): Check the using
455         declaration for bare parameter packs.
456         (cp_parser_base_clause): If there are bare parameter packs in a
457         base specifier, don't add it to the chain.
458
459 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
460
461        PR c++/34314
462        * error.c (dump_simple_decl): Display ellipsis for template
463        non-type parameter packs.
464        (dump_decl): Display ellipsis for template type parameter packs.
465        (dump_template_decl): Display ellipsis for template template
466        parameter packs.
467        * pt.c (redeclare_class_template): When redeclaring a class
468        template, check for collisions between template parameters and
469        template parameter packs.
470
471 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
472
473        PR c++/33964
474        * pt.c (process_partial_specialization): Don't mark template
475        parameters that occur in non-deduced contexts.
476        (struct pair_fn_data): Add include_nondeduced_p.
477        (for_each_template_parm_r): Only visit non-deduced contexts if
478        include_nondeduced_p is set.
479        (for_each_template_parm): Added parameter include_nondeduced_p,
480        which states whether template parameters found in non-deduced
481        contexts should be visited.
482        (uses_template_parms): Visit all template parameters, even those
483        in non-deduced contexts.
484
485 2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>
486
487        PR c++/34052
488        * pt.c (check_default_tmpl_args): Check for parameter packs that
489        aren't at the end of a primary template.
490        (push_template_decl_real): Remove check for parameter packs that
491        aren't at the end of a primary template; that now happens in
492        check_default_tmpl_args.
493        * semantics.c (finish_template_template_parm): Use
494        check_default_tmpl_args to check for errors in the template
495        parameter list.
496         
497 2008-01-12  Doug Kwan  <dougkwan@google.com>
498
499         * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
500         instead of OPT_Wreturn_type in warning due to ignored return type
501         qualifiers.
502         * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
503         instead of OPT_Wreturn_type in warning due to ignored return type
504         qualifiers.
505
506 2008-01-08  Jakub Jelinek  <jakub@redhat.com>
507
508         PR c++/33890
509         * semantics.c (finish_omp_for): Don't call
510         fold_build_cleanup_point_expr if processing_template_decl.
511
512 2008-01-04  Paolo Carlini  <pcarlini@suse.de>
513             Jakub Jelinek  <jakub@redhat.com>
514
515         PR c++/34611
516         * error.c (dump_template_argument): Deal with TREE_LIST.
517
518 2008-01-01  Douglas Gregor  <doug.gregor@gmail.com>
519
520        * parser.c (cp_parser_check_decl_spec): Don't warn about "long
521        long" in C++0x mode; change the warning to note that "long long"
522        is only unsupported in C++98 mode.
523
524 2007-12-20  Jason Merrill  <jason@redhat.com>
525
526         PR c++/34111
527         * call.c (standard_conversion): Derived-to-base is considered a
528         standard conversion.
529
530 2007-12-19  Jakub Jelinek  <jakub@redhat.com>
531
532         PR c++/34513
533         * parser.c (cp_parser_omp_parallel): For non-combined parallel
534         call cp_parser_statement rather than
535         cp_parser_already_scoped_statement.
536
537 2007-12-18  Jason Merrill  <jason@redhat.com>
538
539         PR c++/34206
540         * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't 
541         use template parms.
542         (dependent_type_p_r): Handle the domain of an array.
543
544 2007-12-18  Douglas Gregor  <doug.gregor@gmail.com>
545             Jakub Jelinek  <jakub@redhat.com>
546         
547         PR c++/32565
548         PR c++/33943
549         PR c++/33965
550         * pt.c (template_template_parm_bindings_ok_p): New; verifies
551         bindings of template template parameters after all template
552         arguments have been deduced.
553         (coerce_template_parms): Don't complain when COMPLAIN doesn't
554         include tf_error.
555         (fn_type_unification): Use template_template_parm_bindings_ok_p. 
556         (unify): Deal with variadic, bound template template parameters. 
557         (get_class_bindings): Use template_template_parm_bindings_ok_p. 
558
559 2007-12-18  Jakub Jelinek  <jakub@redhat.com>
560
561         PR c++/34488
562         * decl.c (grokdeclarator): Reject friend sfk_constructor
563         FUNCTION_TYPE.
564
565 2007-12-17  Jakub Jelinek  <jakub@redhat.com>
566
567         PR c/34506
568         * parser.c (cp_parser_omp_all_clauses): Accept optional comma
569         in between clauses.
570
571 2007-12-15  Alexandre Oliva  <aoliva@redhat.com>
572
573         PR debug/7081
574         * cp-lang.c (cp_classify_record): New.
575         (LANG_HOOKS_CLASSIFY_RECORD): Override.
576
577 2007-12-11  Jakub Jelinek  <jakub@redhat.com>
578
579         PR c++/34238
580         * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
581
582         PR c++/34364
583         * rtti.c (build_dynamic_cast): Call convert_from_reference even for
584         dynamic_cast in a template.
585
586 2007-12-10  Simon Martin  <simartin@users.sourceforge.net>
587
588         PR c++/34059
589         * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
590         MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
591
592 2007-12-10  Jakub Jelinek  <jakub@redhat.com>
593
594         PR c++/34395
595         * error.c (dump_type_prefix, dump_type_suffix): Handle
596         TYPE_PACK_EXPANSION.
597
598         PR c++/34394
599         * error.c (dump_expr): Handle ABS_EXPR.
600
601 2007-12-09  Jakub Jelinek  <jakub@redhat.com>
602
603         PR c++/34178
604         PR c++/34340
605         * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
606         in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
607         Return 2 also if DECL_EXPLICIT_INSTANTIATION.
608         * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
609         flag_use_repository and repo_emit_p returned 2.
610
611 2007-12-06  Jakub Jelinek  <jakub@redhat.com>
612
613         PR c++/34336
614         * tree.c (stabilize_call, stabilize_init): Do nothing if
615         processing_template_decl.
616
617 2007-12-05  Jakub Jelinek  <jakub@redhat.com>
618
619         PR c++/34271
620         * semantics.c (finish_decltype_type): For SCOPE_REF issue an
621         error instead of assertion failure.
622         * parser.c (cp_parser_decltype): If closing paren is not found,
623         return error_mark_node.
624
625 2007-12-04  Douglas Gregor  <doug.gregor@gmail.com>
626
627        PR c++/34101
628        * name-lookup.c (arg_assoc_template_arg): Recurse on argument
629        packs.
630        (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
631        since arg_assoc_template_arg will deal with them (better).
632
633 2007-12-04  Douglas Gregor  <doug.gregor@gmail.com>
634
635        PR c++/33509
636        * pt.c (tsubst_exception_specification): Handle substitutions into
637        member templates, where tsubst_pack_expansion returns a
638        TYPE_PACK_EXPANSION.
639
640 2007-12-04  Douglas Gregor  <doug.gregor@gmail.com>
641
642        PR c++/33091
643        * pt.c (unify_pack_expansion): If we didn't deduce any actual
644        bindings for the template parameter pack, don't try to keep the
645        empty deduced arguments.
646        (unify): If a parameter is a template-id whose template argument
647        list contains a pack expansion that is not at the end, then we
648        cannot unify against that template-id.
649
650 2007-12-02  Paolo Carlini  <pcarlini@suse.de>
651
652         PR c++/34061
653         * pt.c (current_template_args): Use error_operand_p.
654
655 2007-12-02  Paolo Carlini  <pcarlini@suse.de>
656
657         PR c++/34273
658         * error.c (dump_decl): Handle TREE_BINFO.
659
660 2007-12-01  Ollie Wild  <aaw@google.com>
661
662         PR c++/8171
663         * typeck.c (build_binary_op): Add conversion of pointers to function
664         members appearing as operands to the equality operators.
665
666 2007-11-30  Jakub Jelinek  <jakub@redhat.com>
667
668         PR c++/34275
669         * error.c (dump_expr): Handle OBJ_TYPE_REF.
670
671 2007-11-29  Jakub Jelinek  <jakub@redhat.com>
672
673         PR c++/34270
674         * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
675         in templates.
676         * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
677         Likewise.
678
679         PR c++/34267
680         PR c++/34268
681         * parser.c (cp_parser_decltype): Don't call finish_id_expression
682         on ~type.
683         * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
684         and ~type early.
685
686 2007-11-27  Jakub Jelinek  <jakub@redhat.com>
687
688         PR tree-optimization/34181
689         * method.c (use_thunk): Don't inline the call in the thunk.
690
691         PR c++/34213
692         * tree.c (decl_linkage): Static data members and static member
693         functions in anonymous ns classes are lk_external.
694
695 2007-11-26  Andreas Krebbel  <krebbel1@de.ibm.com>
696
697         PR c++/34081
698         * decl.c (start_preparsed_function): Pass 
699         processing_template_decl for the new allocate_struct_function
700         parameter.
701
702 2007-11-25  Richard Guenther  <rguenther@suse.de>
703
704         * decl.c (poplevel): Use BLOCK_CHAIN.
705
706 2007-11-24  Ollie Wild  <aaw@google.com>
707
708         * typeck.c (delta_from_ptrmemfunc): New function.
709         (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
710         (build_binary_op): Call delta_from_ptrmemfunc.
711
712 2007-11-23  Jakub Jelinek  <jakub@redhat.com>
713
714         PR c++/30293
715         PR c++/30294
716         * decl.c (cp_finish_decl): Disallow variable or field
717         definitions if extern "Java" aggregates.
718         (grokparms): Disallow parameters with extern "Java"
719         aggregates.
720         (check_function_type): Disallow function return values
721         with extern "Java" aggregates.
722         * init.c (build_new_1): Disallow placement new with
723         extern "Java" aggregates.
724
725 2007-11-23  Mark Mitchell  <mark@codesourcery.com>
726             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
727         
728         PR c++/5310
729         * call.c (convert_like_real): Build a zero constant when __null is
730         converted to an integer type.
731         
732 2007-11-22  Jakub Jelinek  <jakub@redhat.com>
733
734         PR c++/34094
735         * decl2.c (cp_write_global_declarations): Issue error about static
736         data members in anonymous namespace which are declared and used,
737         but not defined.
738
739 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
740
741         PR c++/34089
742         * parser.c (cp_parser_class_head): Reject function template ids.
743
744         PR c++/28879
745         * tree.c (build_cplus_array_type_1): Don't pass any VLA types
746         when processing_template_decl to build_array_type.
747
748         PR c++/33962
749         * pt.c (more_specialized_fn): Don't segfault if one or
750         both argument list end with ellipsis.
751
752 2007-11-18  Jakub Jelinek  <jakub@redhat.com>
753
754         PR c++/30988
755         * semantics.c (finish_call_expr): Set
756         current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
757         or OVERLOAD with all noreturn functions.
758
759 2007-11-16  Jakub Jelinek  <jakub@redhat.com>
760
761         PR c++/34100
762         * pt.c (apply_late_template_attributes): Do nothing if decl's type is
763         error_mark_node.
764
765 2007-11-13  Jakub Jelinek  <jakub@redhat.com>
766
767         PR c++/34054
768         PR c++/34056
769         PR c++/34057
770         PR c++/34058
771         PR c++/34060
772         * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
773         set to error_mark_node the outermost POINTER_TYPE to the pack if
774         it is seen in a POINTER_TYPE.
775         (push_template_decl_real): If check_for_bare_parameter_packs
776         fails for function return type, set the return type to
777         integer_type_node.  If check_for_bare_parameter_packs failed
778         for non-function, return error_mark_node.
779
780         PR c++/29225
781         * call.c (build_new_op): Call resolve_args before calling
782         build_over_call.
783
784 2007-11-11  Tom Tromey  <tromey@redhat.com>
785
786         PR c++/17577:
787         * lex.c (handle_pragma_implementation): Use cpp_included_before.
788
789 2007-11-12  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
790
791         PR c++/8570
792         * pt.c (redeclare_class_template): Update error message. Use a
793         note to show the previous declaration.
794         (tsubst_friend_class): Use the location of the friend template as
795         the input location before calling redeclare_class_template.
796
797 2007-11-11  Jakub Jelinek  <jakub@redhat.com>
798
799         PR c++/34068
800         * semantics.c (finish_pseudo_destructor_expr): Handle
801         object == error_mark_node.
802
803 2007-11-10  Jakub Jelinek  <jakub@redhat.com>
804
805         PR c++/32241
806         * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
807         is not scalar type, let finish_class_member_access_expr handle
808         diagnostics.  Pass BIT_NOT_EXPR argument to
809         finish_pseudo_destructor_expr.  Handle SCOPE_REF properly.
810
811 2007-11-09  Douglas Gregor  <doug.gregor@gmail.com>
812
813         PR c++/33510
814         * decl.c (cp_complete_array_type): If any of the initializer
815         elements are pack expansions, don't compute the array size yet.
816
817 2007-11-08  Andrew Pinski  <pinskia@gmail.com>
818
819         PR c++/30297:
820         * tree.c (decl_linkage): Fields have no linkage.
821
822 2007-11-08  Daniel Jacobowitz  <dan@codesourcery.com>
823
824         * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
825
826 2007-11-07  Douglas Gregor  <doug.gregor@gmail.com>
827
828         PR c++/33045
829         PR c++/33837
830         PR c++/33838
831         * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
832         Be careful with ERROR_MARK_NODEs.
833         * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
834         argument.
835
836 2007-11-07  Jakub Jelinek  <jakub@redhat.com>
837
838         PR c++/33501
839         * call.c (build_over_call): Don't check TREE_ADDRESSABLE
840         on incomplete type.
841
842 2007-11-06  Douglas Gregor  <doug.gregor@gmail.com>
843
844         PR c++/33977
845         PR c++/33886
846         * tree.c (c_build_qualified_type): Define bridge to
847         cp_build_qualified_type.
848
849 2007-11-06  Douglas Gregor  <doug.gregor@gmail.com>
850
851         PR c++/31439
852         PR c++/32114
853         PR c++/32115
854         PR c++/32125
855         PR c++/32126
856         PR c++/32127
857         PR c++/32128
858         PR c++/32253
859         PR c++/32566
860         * typeck.c (check_return_expr): Pass address of retval to
861         check_for_bare_parameter_packs.
862         * class.c (build_base_field): Tolerate bases that have no layout
863         due to errors.
864         (end_of_base): Ditto.
865         * tree.c (canonical_type_variant): Be careful with
866         ERROR_MARK_NODE.
867         * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
868         tree*.
869         * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
870         which states whether parameter packs should be replaced with
871         ERROR_MARK_NODE.
872         (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
873         possible. If set_packs_to_error is set true, replace the parameter
874         pack with ERROR_MARK_NODE. Manage our own pointer sets.
875         (uses_parameter_packs): Don't set parameter packs to
876         ERROR_MARK_NODE.
877         (check_for_bare_parameter_packs): Now takes a pointer to a tree,
878         which may be modified (if it is a parameter pack). Instructs
879         find_parameter_packs_r to replace parameter packs with
880         ERROR_MARK_NODE (so that they won't cause errors later on).
881         (process_template_parm): Pass pointer to
882         check_for_bare_parameter_packs.
883         (process_partial_specialization): Replace pack expansions before
884         the end of the template argument list with ERROR_MARK_NODE.
885         (push_template_decl_real): Pass pointer to
886         check_for_bare_parameter_packs. Replace parameter packs not at the
887         end of the template parameter list with ERROR_MARK_NODE.
888         (convert_template_argument): Be more careful about using DECL_NAME
889         on only declarations.
890         (unify): Can't unify against ERROR_MARK_NODE.
891         * semantics.c (finish_cond): Pass pointer to
892         check_for_bare_parameter_packs.
893         (finish_expr_stmt): Ditto.
894         (finish_for_expr): Ditto.
895         (finish_switch_cond): Pass pointer to
896         check_for_bare_parameter_packs, and call it before we put the
897         condition into the statement.
898         (finish_mem_initializers): Pass pointer to
899         check_for_bare_parameter_packs.
900         (finish_member_declaration): Ditto.
901         * parser.c (cp_parser_base_clause): Ditto.
902         
903 2007-11-06  Jakub Jelinek  <jakub@redhat.com>
904
905         PR target/33168
906         * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
907         with the final TREE_READONLY flag in place.  processing_template_decl
908         is known to be 0 in this part of function.
909
910         PR c++/33894
911         * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
912         OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
913         * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
914         * semantics.c (finish_omp_atomic): Revert most of the
915         2007-02-05 changes, just keep the new representation of
916         OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
917
918 2007-11-05  H.J. Lu  <hongjiu.lu@intel.com>
919
920         PR c++/33871
921         * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
922         local.
923
924 2007-11-05  Douglas Gregor  <doug.gregor@gmail.com>
925
926         PR c++/33996
927         PR c++/33235
928         PR c++/33930
929         * typeck.c (merge_types): Don't lose rvalue references when
930         merging types.
931         * call.c (build_over_call): Don't elide move constructors just
932         because the copy constructor is trivial (!).
933         (compare_ics): If comparing cv-qualifiers fails, we can still order
934         based on binding lvalues vs. rvalues.
935
936 2007-11-05  Douglas Gregor  <doug.gregor@gmail.com>
937
938         PR c++/33939
939         * pt.c (unify_pack_expansion): bring handling of function call
940         arguments into line with type_unification_real. 
941
942 2007-11-05  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
943
944         * typeck.c (build_binary_op): Use pedwarn instead of error for
945         consistency.
946
947 2007-11-05  Jakub Jelinek  <jakub@redhat.com>
948
949         PR c++/33836
950         * parser.c (cp_parser_unary_expression): For &&label call
951         cp_parser_non_integral_constant_expression and return error_mark_node
952         if it returned true.
953
954         PR c++/33969
955         * decl.c (grokdeclarator): Don't call build_memfn_type if type
956         is neither FUNCTION_TYPE nor METHOD_TYPE.
957
958 2007-11-02  Jakub Jelinek  <jakub@redhat.com>
959
960         PR c++/33516
961         * parser.c (cp_parser_nested_name_specifier_opt): Use
962         TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
963         typedef of currently open class.
964
965 2007-11-02  Paolo Carlini  <pcarlini@suse.de>
966
967         PR c++/33495
968         * error.c (dump_expr): Deal specially with statements.
969
970 2007-11-01  Jason Merrill  <jason@redhat.com>
971
972         PR c++/30897
973         * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
974         template parms.
975         (lookup_template_class): Use it to get the outer template args
976         for instantiating one.
977
978         PR c++/29236
979         * pt.c (reduce_template_parm_level): tsubst the parameters
980         of a template template parm.
981
982 2007-11-01  Douglas Gregor  <doug.gregor@gmail.com>
983
984         PR c++/33955
985         * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
986
987 2007-11-01  Jakub Jelinek  <jakub@redhat.com>
988
989         PR c++/32384
990         * parser.c (cp_parser_postfix_dot_deref_expression): If
991         POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
992         first and if that succeeds and type is SCALAR_TYPE_P, create
993         PSEUDO_DTOR_EXPR.
994
995         PR c++/32260
996         * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
997         (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
998         as for std::type_info.
999
1000 2007-10-31  Paolo Carlini  <pcarlini@suse.de>
1001
1002         PR c++/33494
1003         * cxx-pretty-print.c (pp_cxx_typeid_expression,
1004         pp_cxx_delete_expression): Change to static linkage.
1005         * cxx-pretty-print.h: Adjust declarations.
1006         * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
1007         MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
1008         MODOP_EXPR): Forward to pp_expression.
1009
1010         * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
1011         Fix typo.
1012
1013 2007-10-31 Christian Bruel  <christian.bruel@st.com>
1014            Mark Mitchell  <mark@codesourcery.com>
1015
1016         PR c++/19531
1017         * typeck.c (check_return_expr): Don't set named_return_value_okay_p
1018         if retval is volatile. 
1019         
1020 2007-10-30  Jakub Jelinek  <jakub@redhat.com>
1021
1022         PR c++/33616
1023         * decl2.c (build_offset_ref_call_from_tree): Call
1024         build_non_dependent_expr on object prior to building ADDR_EXPR from it
1025         if FN is DOTSTAR_EXPR.
1026
1027 2007-10-30  Douglas Gregor  <doug.gregor@gmail.com>
1028
1029         PR c++/31993
1030         PR c++/32252
1031         * pt.c (find_parameter_packs_r): Fix typo in comment.
1032         (convert_template_argument): Look at the pattern of a pack
1033         expansion to determine what kind of entity we're converting.
1034         (coerce_template_parameter_pack): When we have coerced a non-type
1035         template parameter pack, substitute into the type of that pack.
1036         (tsubst_pack_expansion): When our substitution of a parameter pack
1037         is a "trivial" substitution of itself, just substitute into the
1038         pack expansion rather than actually expanding.
1039
1040 2007-10-29  Jakub Jelinek  <jakub@redhat.com>
1041
1042         PR c++/33841
1043         * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
1044         for non-integral type bitfields.  Return true if bitfield is correct, false
1045         error has been diagnosed.
1046         (check_field_decls): If check_bitfield_decl returned false, call also
1047         check_field_decl.
1048
1049 2007-10-28  Paolo Carlini  <pcarlini@suse.de>
1050             Mark Mitchell  <mark@codesourcery.com>
1051
1052         PR c++/30659
1053         * pt.c (do_decl_instantiation): If the VAR_DECL is not a
1054         class member error out and return.
1055
1056 2007-10-27  Jakub Jelinek  <jakub@redhat.com>
1057
1058         * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
1059         to current_function_decl rather than 0.
1060
1061         PR c++/33844
1062         * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
1063         ->* rather than .*.
1064         * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
1065
1066 2007-10-27  Jason Merrill  <jason@redhat.com>
1067
1068         PR c++/5247
1069         * call.c (convert_default_arg): Detect recursion.
1070
1071 2007-10-27  Jakub Jelinek  <jakub@redhat.com>
1072
1073         PR c++/33842
1074         * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
1075         * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
1076         OFFSETOF_EXPR.
1077         (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
1078         functions.
1079         * error.c (dump_expr): Handle OFFSETOF_EXPR.
1080
1081 2007-10-26  Jason Merrill  <jason@redhat.com>
1082
1083         PR c++/24791
1084         * pt.c (get_template_info): New fn.
1085         (template_class_depth): Use it.
1086         (push_template_decl_real): Check that the template args of the 
1087         definition match the args of the previous declaration.
1088
1089 2007-10-26  Paolo Carlini  <pcarlini@suse.de>
1090
1091         PR c++/31988
1092         * decl2.c (coerce_new_type): Do not allow a default argument for
1093         the first parameter.
1094
1095 2007-10-26  Douglas Gregor  <doug.gregor@gmail.com>
1096
1097         PR c++/33839
1098         * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
1099         don't see the leading '('. Only lookup names if we get an
1100         IDENTIFIER_NODE.
1101
1102 2007-10-26  Jakub Jelinek  <jakub@redhat.com>
1103
1104         PR c++/33744
1105         * parser.c (cp_parser_parenthesized_expression_list): Set
1106         greater_than_is_operator_p to true in between the parens.
1107
1108 2007-10-26  Paolo Carlini  <pcarlini@suse.de>
1109
1110         PR c++/31747
1111         * decl.c (grokdeclarator): In case of conflicting specifiers
1112         just return error_mark_node.
1113
1114 2007-10-26  Ollie Wild  <aaw@google.com>
1115
1116         * expr.c (cxx_expand_expr): Removed.
1117         * cp-tree.h (exx_expand_expr): Removed.
1118         * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
1119         with c_expand_expr.
1120
1121 2007-10-25  Paolo Carlini  <pcarlini@suse.de>
1122
1123         PR c++/33843
1124         * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
1125
1126 2007-10-23  Jason Merrill  <jason@redhat.com>
1127
1128         PR c++/25950 (DR 391)
1129         * call.c (struct conversion): Remove check_copy_constructor_p.
1130         (reference_binding): Always bind a reference directly to a 
1131         compatible class rvalue.  Pass down LOOKUP_NO_TEMP_BIND during 
1132         temporary creation.
1133         (check_constructor_callable): Remove.
1134         (convert_like_real): Don't call it.
1135         (initialize_reference): Don't call check_constructor_callable.
1136         (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
1137         LOOKUP_CONSTRUCTOR_CALLABLE.  Don't require a temporary for base
1138         conversions if LOOKUP_NO_TEMP_BIND.
1139         (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
1140         (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
1141         second conversion.
1142         * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
1143
1144 2007-10-22  Jakub Jelinek  <jakub@redhat.com>
1145
1146         PR c++/33372
1147         * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
1148         before checking if its type is integral.
1149
1150 2007-10-22  Jason Merrill  <jason@redhat.com>
1151
1152         PR c++/33620
1153         * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
1154         * pt.c (apply_late_template_attributes): Splice out dependent
1155         attributes from DECL_ATTRIBUTES.
1156
1157         * decl.c (cxx_maybe_build_cleanup): Use build_address.
1158
1159 2007-10-17  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1160
1161         * typeck.c (build_binary_op) : Use appropriate warning option
1162         instead of unnamed warning.
1163
1164 2007-10-16  Paolo Carlini  <pcarlini@suse.de>
1165
1166         PR c++/31446
1167         * pt.c (current_template_args): Do not change TREE_LIST elements
1168         with a TREE_VALUE of error_mark_node.
1169
1170 2007-10-16  Mark Mitchell  <mark@codesourcery.com>
1171
1172         * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
1173         * decl.c (start_decl): Tidy.
1174         (start_decl_1): Call cp_apply_type_quals_to_decl after completing
1175         the type.
1176         (grokdeclarator): Clarify comment.
1177
1178 2007-10-14  Andrew Pinski  <pinskia@gmail.com>
1179
1180         PR c++/30303
1181         * decl.c (grokfndecl): Return NULL after the "definition of
1182         implicitly-declared" error happened.
1183
1184 2007-10-12  Simon Martin  <simartin@users.sourceforge.net>
1185
1186         PR c++/26698
1187         * call.c (build_user_type_conversion_1): Do not consider conversion
1188         functions to convert a (possibly cv-qualified) object to the (possibly
1189         cv-qualified) same object type (or a reference to it), to a (possibly
1190         cv-qualified) base class of that type (or a reference to it).
1191
1192 2007-10-12  Paolo Carlini  <pcarlini@suse.de>
1193
1194         * pt.c (tsubst): Use template_parm_level_and_index.
1195
1196 2007-10-12  Jakub Jelinek  <jakub@redhat.com>
1197
1198         PR c++/32121
1199         * parser.c (cp_parser_compound_statement): Handle label-declarations
1200         at the beginning of the compound statement.
1201         (cp_parser_block_declaration): Issue diagnostics about __label__
1202         not at the beginning of a block.
1203
1204 2007-10-11  Paolo Carlini  <pcarlini@suse.de>
1205
1206         PR c++/33461
1207         * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
1208         to convert_template_argument.
1209         (coerce_template_parms): Return error_mark_node after fixed-length
1210         error.
1211         (tsubst_decl): Check for error_mark_node the return value of the
1212         first tsubst in 'case VAR_DECL'.
1213
1214 2007-10-08  Ollie Wild  <aaw@google.com>
1215
1216         * typeck2.c (digest_init): Call cplus_expand_constant after
1217         convert_for_initialization.
1218         * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
1219         * expr.c (cplus_expand_constant): Updated function description.
1220
1221 2007-10-04  Jason Merrill  <jason@redhat.com>
1222
1223         PR c++/20416
1224         * call.c (initialize_reference): Handle local static reference
1225         temps properly.
1226
1227 2007-10-03  Jason Merrill  <jason@redhat.com>
1228
1229         PR c++/32470
1230         * name-lookup.c (push_namespace_with_attrs): Fold back into...
1231         (push_namespace): Here.
1232         (handle_namespace_attrs): New fn for the attr code.
1233         (leave_scope): Don't pop_visibility.
1234         * name-lookup.h (struct cp_binding_level): Remove has_visibility.
1235         * parser.c (cp_parser_namespace_definition): Call
1236         handle_namespace_attrs and pop_visibility as appropriate. 
1237
1238         PR c++/11756
1239         * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
1240
1241 2007-10-03  Alexandre Oliva  <aoliva@redhat.com>
1242
1243         * decl.c (duplicate_decls): Preserve linkage flags for mere
1244         redeclarations of gnu_inline definitions.
1245
1246 2007-10-03  Jason Merrill  <jason@redhat.com>
1247
1248         PR c++/15764
1249         * decl.c (wrap_cleanups_r): New fn.
1250         (wrap_temporary_cleanups): New fn.
1251         (initialize_local_var): Call it.
1252
1253 2007-09-29  Jason Merrill  <jason@redhat.com>
1254
1255         PR c++/33094
1256         * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member 
1257         constant to not have DECL_EXTERNAL if it's file-local.
1258
1259 2007-09-28  Ollie Wild  <aaw@google.com>
1260
1261         Revert
1262         2007-09-27  Ollie Wild  <aaw@google.com>
1263
1264         * typeck2.c (digest_init): Call cplus_expand_constant after
1265         convert_for_initialization.
1266         * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
1267         * expr.c (cplus_expand_constant): Updated function description.
1268
1269 2007-09-28  Jason Merrill  <jason@redhat.com>
1270
1271         PR c++/10179
1272         * class.c (layout_empty_base): Take rli parameter, update
1273         rli->record_align if empty base has user-specified alignment.
1274         (build_base_field): Pass rli to it.
1275
1276 2007-09-28  Paolo Carlini  <pcarlini@suse.de>
1277
1278         PR c++/33213
1279         * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
1280
1281 2007-09-28  Paolo Carlini  <pcarlini@suse.de>
1282
1283         PR c++/33118
1284         * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
1285         (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
1286         (dump_parameters): Just call dump_type for argument packs too.
1287
1288 2007-09-28  Jakub Jelinek  <jakub@redhat.com>
1289
1290         PR c++/31434
1291         * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
1292         qualification by creating qualified PACK_EXPANSION_PATTERN and
1293         then calling make_pack_expansion on it.
1294
1295 2007-09-27  Ollie Wild  <aaw@google.com>
1296
1297         * typeck2.c (digest_init): Call cplus_expand_constant after
1298         convert_for_initialization.
1299         * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
1300         * expr.c (cplus_expand_constant): Updated function description.
1301
1302 2007-09-27  Jason Merrill  <jason@redhat.com>
1303
1304         PR c++/33571
1305         * decl2.c (is_late_template_attribute): Don't crash on unknown
1306         attribute.
1307
1308 2007-09-27  Paolo Carlini  <pcarlini@suse.de>
1309
1310         PR c++/33493
1311         * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
1312         * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
1313         spaces in the formatting.
1314         * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
1315
1316 2007-09-27  Jakub Jelinek  <jakub@redhat.com>
1317
1318         * error.c (cxx_print_error_function): Add third argument, pass
1319         it over to lhd_print_error_function.
1320         (cp_print_error_function): If diagnostic->abstract_origin, print
1321         virtual backtrace.
1322         * cp-tree.h (struct diagnostic_info): New forward decl.
1323         (cxx_print_error_function): Add third argument.
1324
1325 2007-09-25  Simon Martin  <simartin@users.sourceforge.net>
1326
1327         PR c++/33207
1328         * name-lookup.c (pushtag): Do not create an implicit typedef before
1329         the associated type declaration is known to be valid.
1330
1331 2007-09-25  Jakub Jelinek  <jakub@redhat.com>
1332
1333         * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
1334         rather than pointers.
1335
1336 2007-09-24  Danny Smith  <dannysmith@user.sourceforge.net>
1337
1338         PR c++/14688
1339         * search.c (check_final_overrider): Fail if
1340         targetm.comp_type_attributes returns 0.
1341
1342 2007-09-24  Jason Merrill  <jason@redhat.com>
1343
1344         PR c++/33239
1345         * pt.c (resolve_typename_type): Don't look things up in the original
1346         template if it would mean losing template arguments.    
1347
1348 2007-09-24  Jakub Jelinek  <jakub@redhat.com>
1349
1350         PR c++/33506
1351         * cp-tree.h (cxx_type_hash_eq): New prototype.
1352         * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
1353         * tree.c (cxx_type_hash_eq): New function.
1354
1355 2007-09-24  Douglas Gregor  <doug.gregor@gmail.com>
1356
1357         PR c++/33185    
1358         * tree.c (cp_build_qualified_type_real): Build a canonical
1359         ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
1360         
1361 2007-09-24  Douglas Gregor  <doug.gregor@gmail.com>
1362
1363         PR c++/33112
1364         PR c++/33185    
1365         * tree.c (cplus_array_compare): Compare pointers, not types.
1366         (build_cplus_array_type_1): Store new array type into the hash
1367         table before building the canonical type; build the canonical type
1368         correctly.
1369         (cp_build_qualified_type_real): Put all of the array types with
1370         cv-qualified element types into the C++ array hash table, built as 
1371         variants of the unqualified versions.
1372         
1373 2007-09-23  Jason Merrill  <jason@redhat.com>
1374
1375         PR c++/16370
1376         * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
1377         for deprecation warnings.
1378
1379 2007-09-22  Jason Merrill  <jason@redhat.com>
1380
1381         PR c++/15269
1382         * call.c (build_over_call): Warn about deprecated virtuals.
1383
1384         PR c++/19407
1385         * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
1386         (MAYBE_TAGGED_TYPE_P): Remove.
1387         * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
1388         instead of calling is_late_template_attribute again.
1389         (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
1390         (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
1391         Don't crash on typedefs from non-template classes.
1392         * decl2.c (grokfield): Don't sorry about attrs on template parms.
1393         (is_late_template_attribute): All attributes applied to template
1394         parms or typename types are dependent.  Static.
1395         (splice_template_attributes): Pass decl through.
1396         (save_template_attributes): Likewise.
1397
1398 2007-09-20  Jakub Jelinek  <jakub@redhat.com>
1399
1400         PR c++/33496
1401         * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
1402         returned from tsubst_pack_expansion.
1403         (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
1404         (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
1405
1406 2007-09-20  Paolo Carlini  <pcarlini@suse.de>
1407
1408         PR c++/33460
1409         * semantics.c (finish_id_expression): Use consistently
1410         context_for_name_lookup.
1411         * decl.c (fixup_anonymous_aggr): Fix error message for
1412         anonymous struct (vs union).
1413
1414 2007-09-19  Jason Merrill  <jason@redhat.com>
1415
1416         PR c++/7586
1417         * pt.c (tsubst): Handle typedefs by looking for the specialization.
1418         (retrieve_specialization): Only tagged types use 
1419         DECL_TEMPLATE_INSTANTIATIONS.
1420         (instantiate_class_template): Push nested classes too.
1421         (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
1422         tagged types.
1423         * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
1424         * init.c (is_aggr_type): Remove redundant tests.
1425         * class.c (push_nested_class): Use CLASS_TYPE_P.
1426
1427 2007-09-20  Paolo Carlini  <pcarlini@suse.de>
1428
1429         PR c++/33459
1430         * init.c (build_zero_init): If, recursively, build_zero_init
1431         returns a NULL_TREE, do not append it to the VEC of constructors.
1432
1433 2007-09-18  Jason Merrill  <jason@redhat.com>
1434
1435         PR c++/17743
1436         * pt.c (apply_late_template_attributes): Set processing_template_decl.
1437         (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
1438         ATTR_FLAG_TYPE_IN_PLACE.
1439         (tsubst): Do unqualified lookup to find typedefs from current class.
1440         [ARRAY_TYPE]: Propagate alignment info.
1441         * decl2.c (is_late_template_attribute): Only defer handling of
1442         attribute aligned if the expression is dependent.
1443         (save_template_attributes): If we're deferring any attributes,
1444         make this a naming typedef.
1445
1446 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
1447
1448         PR c++/33462 (again)
1449         * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
1450         va_arg instead of __builtin_va_arg.
1451
1452 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
1453
1454         PR c++/33462
1455         * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
1456         (pp_cxx_primary_expression): Use it.
1457         * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
1458         * error.c (dump_expr): Use it.
1459
1460 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
1461
1462         PR c++/33463
1463         * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
1464         out case TYPEID_EXPR to...
1465         (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
1466         and pp_cxx_right_paren.
1467         * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
1468         * error.c (dump_expr): Use it.
1469
1470 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
1471
1472         PR c++/33464
1473         * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
1474         (pp_cxx_primary_expression): Use it.
1475         * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
1476         * error.c (dump_expr): Use it.
1477
1478 2007-09-16  Paolo Carlini  <pcarlini@suse.de>
1479
1480         PR c++/33124
1481         * init.c (build_new): Remove warning for zero-element
1482         allocations.
1483
1484 2007-09-16  Nathan Sidwell  <nathan@codesourcery.com>
1485
1486         PR c++/32756
1487         * call.c (maybe_handle_implicit_object): Set this_p, clear
1488         rvaluedness_matches_p.
1489         (compare_ics): Do not compare rvaluedness matching when one of the
1490         operands is an implicit object.
1491
1492 2007-09-14  Jason Merrill  <jason@redhat.com>
1493
1494         PR c++/17743, c++/19163
1495         * decl2.c (is_late_template_attribute): New fn.
1496         (splice_template_attributes, save_template_attributes): New fns.
1497         (cplus_decl_attributes): Call save_template_attributes.
1498         * pt.c (apply_late_template_attributes): New fn.
1499         (instantiate_class_template, tsubst_decl): Use it.
1500         * cp-tree.h: Declare is_late_template_attribute.
1501
1502 2007-09-13  Tom Tromey  <tromey@redhat.com>
1503
1504         * parser.c (cp_lexer_new_main): Don't use
1505         c_lex_return_raw_strings.
1506         (cp_lexer_get_preprocessor_token): Update.  Add special case when
1507         lexer is NULL.
1508
1509 2007-09-11  Jan Hubicka <jh@suse.cz>
1510
1511         * method.c (use_thunk): Use tree_rest_of_compilation
1512         * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
1513         (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
1514         * cp-tree.h (expand_body): Kill.
1515         (emit_associated_thunks): Declare.
1516         * semantics.c (emit_associated_thunks): Export.
1517         (expand_body): Kill.
1518
1519 2007-09-09  David Daney  <ddaney@avtrex.com>
1520
1521         PR c++/33324
1522         * init.c (build_new_1):  Use POINTER_PLUS_EXPR instead of MINUS_EXPR
1523         to calculate cookie_ptr.
1524
1525 2007-09-08  Jason Merrill  <jason@redhat.com>
1526
1527         PR c++/33342
1528         * pt.c (most_specialized_class): Set processing_template_decl
1529         while tsubsting partial spec args.
1530
1531 2007-09-06  Jason Merrill  <jason@redhat.com>
1532
1533         * decl2.c (get_guard): Copy visibility from the guarded variable.
1534
1535 2007-09-06  Jan Hubicka  <jh@suse.cz>
1536
1537         * semantics.c (expand_body): Do not mark arguments of clones used.
1538
1539 2007-09-06  Paolo Carlini  <pcarlini@suse.de>
1540
1541         PR c++/32674
1542         * decl.c (cp_finish_decl): When processing_template_decl,
1543         deal correctly with init as TREE_LIST.
1544
1545 2007-09-06  Tom Tromey  <tromey@redhat.com>
1546
1547         * decl.c (finish_function): Put return's location on line zero of
1548         file.
1549
1550 2007-09-05  Jason Merrill  <jason@redhat.com>
1551
1552         PR c++/15745
1553         * except.c (prepare_eh_type): Use type_decays_to.
1554
1555         PR c++/15097
1556         * init.c (build_delete): Use build_headof to get the address of the
1557         complete object if we aren't using the deleting destructor.
1558         * rtti.c (build_headof): No longer static.
1559         * cp-tree.h: Declare it.
1560
1561 2007-09-06  Jakub Jelinek  <jakub@redhat.com>
1562
1563         * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
1564         decl if a prototype for XX is provided with throw().
1565
1566         PR c++/33289
1567         * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
1568         on __*_chk non-__builtin_* decls.
1569
1570 2007-09-05  Paolo Carlini  <pcarlini@suse.de>
1571
1572         PR c++/30302
1573         * semantics.c (finish_id_expression): Use context_for_name_lookup
1574         insted of DECL_CONTEXT, to see through anonymous structs and unions.
1575         * class.c (finish_struct_anon): Deal correctly with anonymous
1576         structs (vs unions, as GNU extension) in error messages.
1577
1578 2007-09-05  Jan Hubicka  <jh@suse.cz>
1579
1580         * cp/sematics.c (expand_body): Remove unnecesary import_export_decl
1581         call, DECL_EXTERNAL checks and current_function_decl saving.
1582
1583 2007-09-05  Paolo Carlini  <pcarlini@suse.de>
1584
1585         PR c++/29731 (again)
1586         * parser.c (cp_parser_primary_expression): Return error_mark_node
1587         when a statement-expression is found in a template-argument list.
1588
1589 2007-09-04  Jason Merrill  <jason@redhat.com>
1590
1591         * except.c (initialize_handler_parm): Use
1592         fold_build_cleanup_point_expr.
1593
1594         PR c++/31419
1595         * call.c (reference_binding): Don't look for user-defined conversions
1596         to the same type.
1597
1598         PR c++/31411
1599         * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
1600         the MUST_NOT_THROW_EXPR.
1601
1602 2007-09-04  Richard Sandiford  <richard@codesourcery.com>
1603
1604         * decl.c (cp_finish_decl): Call determine_visibility before
1605         make_rtl_for_nonlocal_decl.
1606
1607 2007-09-04  Jason Merrill  <jason@redhat.com>
1608
1609         PR c++/14032
1610         * pt.c (most_specialized_class): Substitute outer template
1611         arguments into the arguments of a member template partial
1612         specialization.
1613         (strip_innermost_template_args): New fn.
1614
1615 2007-09-03  Daniel Jacobowitz  <dan@codesourcery.com>
1616
1617         * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
1618
1619 2007-09-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1620
1621         * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
1622         * decl.c (cp_make_fname_decl): Likewise,
1623         * parser.c (cp_parser_string_literal): Likewise,
1624         * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
1625         * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
1626         Likewise,
1627
1628 2007-09-02  Paolo Carlini  <pcarlini@suse.de>
1629
1630         PR c++/33208
1631         * typeck.c (build_unary_op): Fix error message for
1632         Boolean expression as operand to operator--.
1633
1634 2007-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1635
1636         * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
1637         * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
1638         Likewise.
1639
1640 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
1641
1642         PR c++/32597
1643         * init.c (build_default_init): Make extern.
1644         * cp-tree.h (build_default_init): Declare here.
1645         * pt.c (tsubst_expr): When the instantiation of the initializer of
1646         a variable results in an empty list, default-initialize the
1647         variable.
1648         (tsubst_copy_and_build): When the instantiation of the initializer
1649         in a new expression results in an empty initializer list,
1650         default-initialize it.
1651
1652 2007-08-31  Douglas Gregor  <doug.gregor@gmail.com>
1653
1654         * mangle.c (write_type): Change mangling of rvalue reference from
1655         `RR' to `O'. 
1656
1657 2007-08-31  Jakub Jelinek  <jakub@redhat.com>
1658
1659         * decl.c (duplicate_decls): Remove duplicated line.
1660
1661 2007-08-31  Paolo Carlini  <pcarlini@suse.de>
1662
1663         PR c++/33210
1664         * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
1665         BOUND_TEMPLATE_TEMPLATE_PARM.
1666
1667 2007-08-31  Paolo Carlini  <pcarlini@suse.de>
1668
1669         PR c++/32113
1670         * search.c (lookup_member): Check the name argument for
1671         error_mark_node.
1672
1673 2007-08-31  Paolo Carlini  <pcarlini@suse.de>
1674
1675         PR c++/33212
1676         * parser.c (cp_parser_trait_expr): Check rerurn value of
1677         cp_parser_type_id.
1678
1679 2007-08-30  Ollie Wild  <aaw@google.com>
1680
1681         * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
1682         convert_ptrmem for pointer to member conversions.
1683         (convert_to_pointer_force): Update cp_convert_to_pointer call.
1684         (ocp_convert): Update cp_convert_to_pointer call.
1685         * typeck.c (convert_ptrmem): Add conditional for null pointers to
1686         members.
1687         (build_static_cast_1): Check can_convert for conversions in either
1688         direction.
1689         (get_delta_difference_1): New function.
1690         (get_delta_difference): Refactor to call get_delta_difference_1.
1691
1692 2007-08-30  Jakub Jelinek  <jakub@redhat.com>
1693
1694         * decl.c (start_preparsed_function): Set
1695         DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
1696
1697 2007-08-28  Paolo Carlini  <pcarlini@suse.de>
1698
1699         PR c++/33209
1700         * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
1701         BOUND_TEMPLATE_TEMPLATE_PARM.
1702
1703 2007-08-28  Jakub Jelinek  <jakub@redhat.com>
1704
1705         PR c++/32596
1706         PR c++/32400
1707         * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
1708         and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
1709
1710 2007-08-27  Jason Merrill  <jason@redhat.com>
1711
1712         PR c++/29000
1713         * pt.c (build_non_dependent_expr, type_dependent_expression_p): 
1714         Look inside STMT_EXPR.
1715         * semantics.c (stmt_expr_value_expr): New fn.
1716         * cp-tree.h: Declare it.
1717
1718         PR c++/28558
1719         * decl.c (groktypename): Ignore attributes applied to class type.
1720
1721 2007-08-28  Richard Guenther  <rguenther@suse.de>
1722
1723         * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
1724
1725 2007-08-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1726         
1727         * error.c (dump_expr): Handle COMPLEX_CST.
1728         * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
1729         (pp_cxx_expression): Likewise.
1730
1731 2007-08-27  Alexandre Oliva  <aoliva@redhat.com>
1732
1733         * decl.c (GNU_INLINE_P): New.
1734         (duplicate_decls): Handle gnu_inline.  Merge attributes and
1735         some flags in overriding definitions.
1736         (redeclaration_error_message): Handle gnu_inline.
1737         (start_preparsed_function): Likewise.
1738
1739 2007-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1740
1741         * call.c (sufficient_parms_p): Constify.
1742         * class.c (same_signature_p): Likewise.
1743         * cp-gimplify.c (is_invisiref_parm,
1744         cxx_omp_privatize_by_reference): Likewise.
1745         * cp-objcp-common.c (has_c_linkage): Likewise.
1746         * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
1747         sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
1748         grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
1749         num_artificial_parms_for, comp_template_parms,
1750         template_parameter_pack_p, any_dependent_template_arguments_p,
1751         any_type_dependent_arguments_p, any_value_dependent_elements_p,
1752         repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
1753         zero_init_p, member_p, cp_lvalue_kind,
1754         builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
1755         varargs_function_p, is_dummy_object, special_function_kind,
1756         string_conv_p, type_unknown_p, comp_except_specs, compparms,
1757         comp_cv_qualification, is_bitfield_expr_with_lowered_type,
1758         unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
1759         cp_has_mutable_p, at_least_as_qualified_p,
1760         invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
1761         * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
1762         * except.c (nothrow_libfn_p): Likewise.
1763         * method.c (skip_artificial_parms_for, num_artificial_parms_for):
1764         Likewise.
1765         * pt.c (comp_template_parms, template_parameter_pack_p,
1766         any_type_dependent_arguments_p, any_value_dependent_elements_p,
1767         any_dependent_template_arguments_p): Likewise.
1768         * repo.c (repo_export_class_p): Likewise.
1769         * semantics.c (anon_aggr_type_p): Likewise.
1770         * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
1771         builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
1772         varargs_function_p, member_p, is_dummy_object, pod_type_p,
1773         zero_init_p, special_function_p): Likewise.
1774         * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
1775         comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
1776         compparms, invalid_nonstatic_memfn_p,
1777         is_bitfield_expr_with_lowered_type, unlowered_expr_type,
1778         string_conv_p, ptr_reasonably_similar, cp_type_readonly,
1779         cp_has_mutable_p, lvalue_or_else): Likewise.
1780
1781 2007-08-25  Paolo Bonzini  <bonzini@gnu.org>
1782
1783         * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
1784         * cp-objcp-common.c (cp_tree_size): Ditto.
1785         * tree.c (cp_walk_subtrees): Ditto
1786         * cp-tree.def (TINST_LEVEL): Go away.
1787         * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
1788         move together with other non-tree structs.
1789         (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
1790         (union lang_tree_node): Eliminate tinst_level field.
1791         (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
1792         (current_instantiation, outermost_tinst_level): Return
1793         a "struct tinst_level *".
1794
1795         * error.c (print_instantiation_partial_context): Change second
1796         parameter to a "struct tinst_level *".  Replace accessor macros
1797         with field access.
1798         (print_instantiation_full_context): Likewise.
1799         * lex.c (in_main_input_context): Likewise.
1800
1801         * pt.c (struct pending_templates): New.
1802         (pending_templates, last_pending_template): Use it as a type.
1803         (current_tinst_level): Change typo to "struct tinst_level *"
1804         (reopen_tinst_level): Accept "struct tinst_level *", return decl.
1805         (add_pending_template): Construct a "struct pending_template".
1806         Replace TINST_LEVEL accessor macros with field access.
1807         (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
1808         (pop_tinst_level): Likewise.
1809         (instantiate_pending_templates): Likewise.  Factor common code used
1810         when an instantiation has been done.
1811         (outermost_tinst_level): Replace tree_last with loop.
1812         (current_instantiation): Return a "struct tinst_level *".
1813
1814 2007-08-24  Ollie Wild  <aaw@google.com>
1815
1816         * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
1817         * name-lookup.h (cp_binding_level): Remove vtables member.
1818
1819 2007-08-24  Richard Guenther  <rguenther@suse.de>
1820
1821         * tree.c (cp_cannot_inline_tree_fn): Remove.
1822         * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
1823         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
1824         Remove define.
1825
1826 2007-08-24  Jakub Jelinek  <jakub@redhat.com>
1827
1828         PR c++/32567
1829         * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
1830         error_mark_node right away if build_expr_type_conversion
1831         returned it.
1832
1833         PR c++/32898
1834         * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
1835         is error_mark_node rather than NULL_TREE.
1836         * pt.c (check_explicit_specialization): Likewise.
1837
1838         PR c++/31941
1839         * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
1840         TARGET_VTABLE_USES_DESCRIPTORS targets properly.
1841
1842 2007-08-22  Jason Merrill  <jason@redhat.com>
1843
1844         PR c++/29365
1845         * pt.c (outermost_tinst_level): New function.
1846         * lex.c (in_main_input_context): New function.
1847         * cp-tree.h: Declare it.
1848         * decl2.c (constrain_class_visibility): Use it to avoid warning
1849         about uses of the anonymous namespace in the main input file.
1850
1851 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
1852
1853         * init.c (build_new_1): Use get_target_expr instead of save_expr.
1854
1855 2007-08-20  Pawel Sikora  <pluto@pld-linux.org>
1856
1857         PR c++/7302
1858         * class.c (finish_struct_1): Warn when a class has virtual
1859         functions and accessible non-virtual destructor.
1860
1861 2007-08-20  Richard Guenther  <rguenther@suse.de>
1862
1863         PR c++/22369
1864         PR c++/22451
1865         * call.c (build_new_method_call): Convert initializer to
1866         the basetype.
1867         * init.c (build_aggr_init): Do not fiddle with types.
1868         (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
1869         * except.c (build_throw): Do not drop qualifiers for the
1870         pointer type.
1871         * typeck.c (get_member_function_from_ptrfunc): Do not
1872         fiddle with types, instead convert.
1873         (build_ptrmemfunc1): Convert to the target type for
1874         initialization.
1875         (gfc_trans_allocate): Convert result to target type.
1876         * cp-objcp-common.c (cxx_get_alias_set): Pointers to
1877         pointer-to-member structures shall have alias set zero as well.
1878
1879 2007-08-20  Richard Guenther  <rguenther@suse.de>
1880
1881         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
1882         Remove.
1883         * cp-tree.h (cp_auto_var_in_fn_p): Remove.
1884         (nonstatic_local_decl_p): Likewise.
1885         * tree.c (cp_auto_var_in_fn_p): Remove.
1886         * decl.c (nonstatic_local_decl_p): Remove.
1887
1888 2007-08-20  Richard Guenther  <rguenther@suse.de>
1889
1890         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
1891         Remove define.
1892         * tree.h (cp_walk_tree): New define to walk_tree_1 with
1893         cp_walk_subtrees lh parameter.
1894         (cp_walk_tree_without_duplicates): New define to
1895         walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
1896         * tree.c (count_trees): Call
1897         cp_walk_tree_without_duplicates.
1898         (verify_stmt_tree): Call cp_walk_tree.
1899         (break_out_target_exprs): Likewise.
1900         (WALK_SUBTREE): Likewise.
1901         * cp-gimplify.c (cp_genericize): Likewise.
1902         * cp-pt.c (find_parameter_packs_r): Likewise.
1903         (uses_parameter_packs): Likewise.
1904         (make_pack_expansion): Likewise.
1905         (check_for_bare_parameter_packs): Likewise.
1906         (for_each_template_parm): Likewise.
1907         * decl.c (check_default_argument): Call
1908         cp_walk_tree_without_duplicates.
1909         * except.c (build_throw): Likewise.
1910         * decl2.c (type_visibility): Likewise.
1911         * semantics.c (expand_or_defer_fn): Likewise.
1912         (finalize_nrv): Call cp_walk_tree.
1913
1914 2007-08-20  Jakub Jelinek  <jakub@redhat.com>
1915
1916         PR c++/33025
1917         * init.c (build_new_1): Rename placement_var variable to placement_expr.
1918         Initialize it with save_expr rather than get_temp_regvar.
1919
1920 2007-08-17  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1921
1922         PR c++/28989
1923         * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
1924         lvalues.
1925
1926 2007-08-17  Ollie Wild  <aaw@google.com>
1927
1928         PR c++/31749
1929         * name-lookup.c (do_nonmember_using_decl): Shift implicit type
1930         declarations into appropriate slots for comparison.  Fix type
1931         comparison.
1932
1933 2007-08-17  Paolo Carlini  <pcarlini@suse.de>
1934
1935         PR c++/32112
1936         * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
1937         * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
1938
1939 2007-08-17  Paolo Carlini  <pcarlini@suse.de>
1940
1941         PR c++/32870
1942         * parser.c (cp_parser_class_head): Improve error message.
1943
1944 2007-08-16  Seongbae Park  <seongbae.park@gmail.com>
1945
1946         * pt.c (instantiate_decl): Set input_location
1947         for the function end.
1948
1949 2007-08-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1950
1951         * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
1952         Constify.
1953         * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
1954         class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
1955         cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
1956         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
1957         * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
1958         * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
1959         * typeck.c (cp_type_quals): Likewise.
1960         * typeck2.c (cxx_incomplete_type_diagnostic,
1961         cxx_incomplete_type_error): Likewise.
1962
1963 2007-08-16  Paolo Carlini  <pcarlini@suse.de>
1964
1965         PR c++/31132
1966         * pt.c (tsubst_friend_function): When check_classfn
1967         returns error_mark_node likewise return it.
1968
1969 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
1970
1971         PR c++/32992
1972         * typeck.c (check_return_expr): Don't NRV optimize vars in
1973         anonymous unions.
1974         * decl.c (finish_function): Comment fix.
1975
1976 2007-08-15  Paolo Carlini  <pcarlini@suse.de>
1977
1978         PR c++/33035
1979         * pt.c (push_template_decl_real): Depending on TYPE_P
1980         use either TYPE_CONTEXT or DECL_CONTEXT.
1981
1982 2007-08-14  Mark Mitchell  <mark@codesourcery.com>
1983
1984         * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
1985         constructors and destructors return this.
1986
1987 2007-08-14  Paolo Carlini  <pcarlini@suse.de>
1988
1989         PR c++/27211
1990         * decl2.c (check_classfn): Return error_mark_node in case of error;
1991         in that case, do not call add_method.
1992         * decl.c (start_decl): Deal with check_classfn returning
1993         error_mark_node.
1994         (grokfndecl): Likewise.
1995         * pt.c (tsubst_friend_function): Likewise.
1996
1997 2007-08-14  Andrew Pinski  <pinskia@gmail.com>
1998
1999         PR c++/30428
2000         * typeck.c (build_binary_op): Disallow vector float types with
2001         BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
2002
2003 2007-08-11  Ian Lance Taylor  <iant@google.com>
2004
2005         * cp-objcp-common.c (cxx_get_alias_set): Change return type to
2006         alias_set_type.
2007         * cp/cp-tree.h (cxx_get_alias_set): Update declaration.
2008
2009 2007-08-10  Ollie Wild  <aaw@google.com>
2010
2011         * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
2012         type lookups.
2013         (ambiguous_decl): Construct tree of ambiguous types.  Remove extaneous
2014         function parameter.
2015         (unqualified_namespace_lookup): Fix ambiguous_decl call.
2016         (lookup_using_namespace): Fix ambiguous_decl call.
2017         (qualified_lookup_using_namespace): Fix ambiguous_decl call.
2018
2019 2007-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2020
2021         * call.c (name_as_c_string): Use CONST_CAST.
2022         * decl.c (build_decl): Likewise.
2023         * parser.c (cp_parser_string_literal): Likewise.
2024
2025 2007-08-10  Paolo Carlini  <pcarlini@suse.de>
2026
2027         PR c++/17763
2028         * error.c (dump_expr): Consistently use the *_cxx_*
2029         variants of the pretty-print functions.
2030
2031 2007-08-10  Paolo Carlini  <pcarlini@suse.de>
2032
2033         PR c++/22256
2034         * decl.c (check_special_function_return_type): Just error
2035         on return type specified for conversion operator.
2036
2037 2007-08-09  Daniel Berlin  <dberlin@dberlin.org>
2038
2039         * typeck2.c (readonly_error): Handle general expressions.
2040         * error.c (dump_expr): Handle POINTER_PLUS_EXPR
2041
2042 2007-08-06  Dan Hipschman  <dsh@google.com>
2043
2044         * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
2045         access function name.
2046
2047 2007-08-04  Alfred Minarik  <a.minarik@aon.at>
2048
2049         PR pch/13676
2050         * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
2051         * g++spec.c (lang_specific_driver): Check them.
2052
2053 2007-08-06  Paolo Carlini  <pcarlini@suse.de>
2054
2055         PR c++/19532
2056         * pt.c (inline_needs_template_parms): Fix comment; change return type
2057         to bool.
2058
2059 2007-08-05  Volker Reichelt  <v.reichelt@netcologne.de>
2060
2061         Revert:
2062         2007-03-26  Dirk Mueller  <dmueller@suse.de>
2063
2064         * parser.c (cp_parser_member_declaration): Pedwarn
2065         about stray semicolons after member declarations.
2066
2067 2007-08-02  Lee Millward  <lee.millward@gmail.com>
2068
2069         PR c++/30849
2070         PR c++/30850
2071         PR c++/30851
2072         * parser.c (cp_parser_asm_definition): Detect and discard asm
2073         statements with invalid inputs or outputs.
2074         (cp_parser_asm_operand_list): Return error mark node if any
2075         of the operands are invalid. Adjust documentation.
2076         
2077 2007-08-02  Nick Clifton  <nickc@redhat.com>
2078
2079         * typeck.c: Change copyright header to refer to version 3 of the
2080         GNU General Public License and to point readers at the COPYING3
2081         file and the FSF's license web page.
2082         * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
2083         config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
2084         Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
2085         cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
2086         tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
2087         cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
2088         cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
2089         name-lookup.h, parser.c: Likewise.
2090
2091 2007-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2092
2093         PR middle-end/32668
2094         * call.c (magic_varargs_p): Honor the "type generic" attribute.
2095
2096 2007-07-30  Paolo Carlini  <pcarlini@suse.de>
2097
2098         PR c++/32108
2099         * semantics.c (finish_label_stmt): Reject the __label__
2100         extension outside function scopes.
2101
2102 2007-07-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2103
2104         * parser.c (eof_token): Un-constify.
2105         (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
2106         cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
2107         casts.
2108
2109 2007-07-28  Kazu Hirata  <kazu@codesourcery.com>
2110
2111         * pt.c, tree.c, typeck2.c: Fix comment typos.
2112
2113 2007-07-28  Simon Martin  <simartin@users.sourceforge.net>
2114             Mark Mitchell  <mark@codesourcery.com>
2115
2116         PR c++/30917
2117         * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
2118         hidden due to friend declarations in local classes.
2119
2120 2007-07-27  Douglas Gregor  <doug.gregor@gmail.com>
2121
2122         * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
2123         * cp-tree.def (DECLTYPE_TYPE): New.
2124         * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
2125         (dump_type_prefix): Ditto.
2126         (dump_type_suffix): Ditto.
2127         * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
2128         * mangle.c (write_type): Handle DECLTYPE_TYPE.
2129         * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
2130         types.
2131         (DECLTYPE_TYPE_EXPR): New.
2132         (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
2133         (finish_declared_type): Declare.
2134         * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
2135         DECLTYPE_TYPE nodes.
2136         (pp_cxx_type_id): Ditto.
2137         * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
2138         (tsubst): Substitute into a DECLTYPE_TYPE node.
2139         (tsubst_copy): Ditto.
2140         (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
2141         nodes.
2142         (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
2143         * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
2144         structural equality (because we can't hash the expressions).
2145         (finish_declared_type): New.
2146         * lex.c (reswords): Add "decltype" keyword.
2147         * parser.c cp_lexer_next_token_is_decl_specifier_keyword
2148         (cp_parser_postfix_expression): Add member_access_only_p to
2149         restrict postfix expression to member access expressions.
2150         (cp_parser_unary_expression): Update call to
2151         cp_parser_postfix_expression to reflect new parameter.
2152         (cp_parser_declared_type): New.
2153         (cp_parser_simple_type_specifier): Parse decltype types.
2154
2155 2007-07-27  Mark Mitchell  <mark@codesourcery.com>
2156
2157         PR c++/32346
2158         * call.c (convert_for_arg_passing): Only widen bitfields to their
2159         declared types if necessary.
2160
2161 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2162
2163         * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
2164         Constify.
2165
2166 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2167
2168         * decl.c (typename_hash, typename_compare): Constify.
2169         * mangle.c (hash_type, compare_type): Likewise.
2170         * pt.c (eq_local_specializations, hash_local_specialization):
2171         Likewise.
2172         * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
2173         list_hash): Likewise.
2174         * typeck2.c (pat_compare): Likewise.
2175
2176 2007-07-24  Nathan Sidwell  <nathan@codesourcery.com>
2177
2178         * method.c (implicitly_declare_fn): Increase alignment if member
2179         function pointer format requires it.
2180
2181 2007-07-24  Paolo Carlini  <pcarlini@suse.de>
2182
2183         PR c++/29001
2184         * typeck.c (check_return_expr): Do not pass a null argument
2185         to null_ptr_cst_p.
2186
2187 2007-07-24  Paolo Carlini  <pcarlini@suse.de>
2188
2189         PR c++/32561
2190         * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
2191         only on VAR_DECL.
2192
2193 2007-07-22  Nathan Sidwell  <nathan@codesourcery.com>
2194
2195         PR c++/32839
2196         * typeck.c (convert_arguments): Only use default args if we have
2197         a function decl.
2198
2199         PR c++/30818
2200         * typeck.c (structural_comptypes): No need to check
2201         resolve_typename_type return value here.
2202         * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
2203         * pt.c (resolve_typename_type): Follow typename typedefs.  Return
2204         original type rather than error_mark_node in case of failure.
2205         * parser.c (cp_parser_nested_name_specifier_opt): Adjust
2206         resolve_typename_type result check.
2207         (cp_parser_direct_declarator, cp_parser_head,
2208         cp_parser_constructor_declarator_p): Likewise.
2209
2210 2007-07-12  Kazu Hirata  <kazu@codesourcery.com>
2211
2212         * pt.c (template_parms_variadic_p): Remove.
2213         * cp-tree.h: Remove the prototype for template_parms_variadic_p.
2214
2215 2007-07-12  Jakub Jelinek  <jakub@redhat.com>
2216
2217         PR c++/30854
2218         * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
2219         argument to dump_aggr_init_expr_args instead of false.
2220
2221 2007-07-11  Douglas Gregor  <doug.gregor@gmail.com>
2222
2223         * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
2224         canonical types; otherwise, fall back to structural type
2225         comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
2226         internal compiler error if the canonical types are wrong.
2227         
2228 2007-07-11  Paolo Carlini  <pcarlini@suse.de>
2229
2230         PR c++/32560
2231         * parser.c (cp_parser_make_indirect_declarator): When the
2232         the code argument is ERROR_MARK return cp_error_declarator.
2233
2234 2007-07-09  Geoffrey Keating  <geoffk@apple.com>
2235
2236         PR 32617
2237         * decl.c (cxx_init_decl_processing): Don't set
2238         force_align_functions_log.
2239         (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
2240         * typeck.c (cxx_alignof_expr): When alignof is used on a plain
2241         FUNCTION_DECL, return its alignment.
2242
2243 2007-07-09  Richard Guenther  <rguenther@suse.de>
2244
2245         * decl.c (start_preparsed_function): Do not promote return type.
2246
2247 2007-07-08  Paolo Carlini  <pcarlini@suse.de>
2248
2249         PR c++/30535
2250         * pt.c (unify): Never pass error_mark_node to template_decl_level.
2251
2252 2007-07-07  Mark Mitchell  <mark@codesourcery.com>
2253
2254         PR c++/32232
2255         * pt.c (resolve_overloaded_unification): Robustify.  Return a
2256         bool, not an int.
2257         (type_unification_real): Adjust accordingly.
2258
2259 2007-07-06  Richard Guenther  <rguenther@suse.de>
2260
2261         * init.c (build_new_1): Use the correct pointer type.
2262         * typeck2.c (build_m_component_ref): Likewise.
2263
2264 2007-07-05  Mark Mitchell  <mark@codesourcery.com>
2265
2266         PR c++/32245
2267         * init.c (build_zero_init): Always build an initializer for
2268         non-static storage.
2269         * typeck2.c (build_functional_cast): Use build_zero_init.
2270
2271         PR c++/32251
2272         * init.c (build_new_1): Always pass the allocation function to
2273         build_op_delete_call.
2274         * call.c (build_op_delete_call): Handle operator delete with a
2275         variable-argument list.  Do not issue an error when no matching
2276         deallocation function is available for a new operator.
2277
2278         PR c++/31992
2279         * cp-tree.h (any_value_dependent_elements_p): Declare it.
2280         * decl.c (value_dependent_init_p): New function.
2281         (cp_finish_decl): Use it.
2282         * pt.c (value_dependent_expression_p): Use
2283         any_value_dependent_elements_p.
2284         * parser.c (cp_parser_primary_expression): Add comment about
2285         treating dependent qualified names as integral
2286         constant-expressions.
2287
2288 2007-07-04  Douglas Gregor  <doug.gregor@gmail.com>
2289
2290         * decl.c (build_ptrmemfunc_type): Always use structural equality
2291         tests when comparing pointer-to-member-function types, because the
2292         handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
2293         types.
2294         
2295 2007-07-03  Mark Mitchell  <mark@codesourcery.com>
2296
2297         * init.c (build_new): Tweak comment.
2298
2299 2007-06-29  Dave Brolley  <brolley@redhat.com>
2300
2301         PR c++/31743
2302         * parser.c (cp_parser_new_type_id): Don't reduce a named array
2303         type to its base type and number of elements here.
2304         * init.c (build_new): Call complete_type_or_else to ensure that the
2305         type is complete and to issue a diagnostic if it is not.
2306         (build_new_1): Don't call complete_type_or_else here.
2307
2308 2007-07-03  Richard Guenther  <rguenther@suse.de>
2309
2310         PR c++/32609
2311         * class.c (fixed_type_or_null): Re-lookup the hashtable slot
2312         after recursing.
2313
2314 2007-07-02  Simon Baldwin  <simonb@google.com>
2315
2316         * parser.c (cp_parser_elaborated_type_specifier): Added a warning
2317         for inner-style nested forward declarations that don't declare
2318         anything useful.
2319
2320 2007-07-02  Jakub Jelinek  <jakub@redhat.com>
2321
2322         PR c++/31748
2323         * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
2324         DECL_P in not a variable and appears more than once error messages.
2325
2326 2007-07-01  Ollie Wild  <aaw@google.com>
2327
2328         * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
2329         (select_decl): Remove function.
2330         (unqualified_namespace_lookup): Populate binding by calling
2331         ambiguous_decl.  Remove select_decl call.
2332         (lookup_qualified_name): Remove select_decl call.
2333         * decl.c (lookup_and_check_tag): Check for ambiguous references.
2334         * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
2335         generation when name lookup is ambiguous.
2336
2337 2007-06-29  Douglas Gregor  <doug.gregor@gmail.com>
2338
2339         PR c++/31724
2340         * init.c (build_new_1): Use structural equality on the copy of the
2341         array type.
2342
2343 2007-06-28  Geoffrey Keating  <geoffk@apple.com>
2344
2345         * decl2.c (determine_visibility): Implement
2346         flag_visibility_ms_compat effect on type info.
2347         * decl.c (cxx_init_decl_processing): Implement
2348         global effect of flag_visibility_ms_compat.
2349
2350 2007-06-28  Geoffrey Keating  <geoffk@apple.com>
2351
2352         * decl2.c (start_objects): Mark constructor-running function
2353         as artificial.
2354
2355 2007-06-26  Simon Martin  <simartin@users.sourceforge.net>
2356
2357         PR c++/32111
2358         * decl.c (grokdeclarator): Reset friendp for member functions declared
2359         friend of their own class.
2360
2361 2007-06-23  Mark Mitchell  <mark@codesourcery.com>
2362
2363         * decl2.c (determine_visibility): Don't look for dllexport here.
2364         (determine_visibility_from_class): Tidy.
2365
2366 2007-06-18  Simon Baldwin <simonb@google.com>
2367
2368         PR c++/31923
2369         * parser.c (cp_parser_single_declaration): Added check for storage
2370         class other than sc_none in parsed declaration, and a flag to indicate
2371         if the call is part of an explicit template specialization parse.
2372         * (cp_parser_explicit_specialization): Specialization check flag added
2373         to call to cp_parser_single_declaration(), set true.
2374         * (cp_parser_template_declaration_after_export): Specialization check
2375         flag added to call to cp_parser_single_declaration(), set false.
2376         * pt.c (check_explicit_specialization): Added code to copy visiblity
2377         and linkage from the templated function to the explicit specialization.
2378
2379 2007-06-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2380
2381         * typeck.c (build_binary_op): For templates build the
2382         expression in pieces to avoid the assert in build2_stat.
2383         (get_member_function_from_ptrfunc):
2384         Change over to using POINTER_PLUS_EXPR and convert
2385         the second operand to sizetype.
2386         * typeck2.c (build_m_component_ref):  Likewise.
2387         * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
2388         instead of PLUS_EXPR for pointers.
2389         (build_new_1): Likewise.
2390         (build_vec_delete_1): Likewise.
2391         (build_vec_delete): Likewise.
2392         * class.c (build_base_path): Likewise.
2393         (build_base_path): Likewise.
2394         (convert_to_base_statically): Likewise.
2395         (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
2396         (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
2397         instead of PLUS_EXPR.
2398         (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
2399         instead of PLUS_EXPR for pointers.
2400         * call.c (build_special_member_call): Likewise.
2401         * rtti.c (build_headof): Likewise.
2402         Use sizetype instead of ptrdiff_type_node.
2403         (tinfo_base_init): Create a POINTER_PLUS_EXPR
2404         instead of PLUS_EXPR for pointers.
2405         * except.c (expand_start_catch_block):  Do a
2406         NEGATIVE and then a POINTER_PLUS_EXPR instead
2407         of a MINUS_EXPR.
2408         * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
2409         PLUS_EXPR on pointer types over to use
2410         POINTER_PLUS_EXPR and remove the conversion
2411         to the pointer types.
2412         * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
2413         adding to a pointer type. Use size_int instead of
2414         ssize_int. Convert the index to sizetype before
2415         adding it to the pointer.
2416
2417 2007-06-15  Mark Mitchell  <mark@codesourcery.com>
2418
2419         * cp-tree.h (DECL_VAR_MARKED_P): Remove.
2420         (DECL_ANON_UNION_VAR_P): New macro.
2421         * class.c (fixed_type_or_null): Tidy.  Use a hash table, rather
2422         than DECL_VAR_MARKED_P, to keep track of which variables we have
2423         seen.
2424         * decl.c (redeclaration_error_message): Complain about redeclaring
2425         anonymous union members at namespace scope.
2426         * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
2427
2428 2007-06-14  Geoff Keating  <geoffk@apple.com>
2429
2430         * decl2.c (determine_visibility): Ensure that functions with
2431         hidden types as parameters are hidden.
2432
2433         PR 31093
2434         * decl2.c (determine_visibility): Remove duplicate code for
2435         handling type info.
2436
2437 2007-06-12  Ian Lance Taylor  <iant@google.com>
2438
2439         PR libstdc++/29286
2440         * init.c (avoid_placement_new_aliasing): New static function.
2441         (build_new_1): Call it.
2442
2443 2007-06-11  Rafael Avila de Espindola  <espindola@google.com>
2444
2445         * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
2446         (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
2447
2448 2007-06-08  Jakub Jelinek  <jakub@redhat.com>
2449
2450         PR c++/32177
2451         * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
2452         on init, the non-decl cond operand and increment value.
2453
2454 2007-06-07  Simon Martin  <simartin@users.sourceforge.net>
2455
2456         PR c++/30759
2457         * decl.c (check_initializer): Report an error when a brace enclosed
2458         initializer is used for a non-aggregate type in C++98.
2459         (redeclaration_error_message): Rewrote flag_cpp0x in terms of
2460         cxx_dialect.
2461         (grokdeclarator): Likewise.
2462         (move_fn_p): Likewise.
2463         * typeck.c (check_return_expr): Likewise.
2464         * call.c (reference_binding): Likewise.
2465         * error.c (cp_cpp_error): Likewise.
2466         * pt.c (check_default_tmpl_args): Likewise.
2467         (tsubst): Likewise.
2468         * lex.c (init_reswords): Likewise.
2469         * parser.c (p_parser_primary_expression): Likewise.
2470         (TOKEN_PRECEDENCE): Likewise.
2471         (cp_parser_init_declarator): Likewise.
2472         (cp_parser_ptr_operator): Likewise.
2473         (cp_parser_parameter_declaration): Likewise.
2474         (cp_parser_enclosed_template_argument_list): Likewise.
2475         (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
2476         (cp_parser_next_token_ends_template_argument_p): Likewise.
2477
2478 2007-06-04  Simon Baldwin  <simonb@google.com>
2479
2480         * decl.c (grokdeclarator): Readability change.  Moved case labels
2481         into direct switch statement scope.
2482
2483 2007-06-04  Paolo Carlini  <pcarlini@suse.de>
2484
2485         * call.c (convert_like_real): Remove pointless code.
2486
2487 2007-05-31  Mark Mitchell  <mark@codesourcery.com>
2488
2489         * decl.c (get_atexit_fn_ptr_type): New function.
2490         (get_atexit_node): Use it.
2491         (start_cleanup_fn): Likewise.
2492         (register_dtor_fn): Use the object's destructor, instead of a
2493         separate cleanup function, where possible.
2494         * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
2495         (atexit_fn_ptr_type_node): New macro.
2496         * decl2.c (build_cleanup): Use build_address.
2497
2498 2007-05-31  Daniel Berlin  <dberlin@dberlin.org>
2499
2500         * typeck.c (build_binary_op): Include types in error.
2501
2502 2007-05-31  Jakub Jelinek  <jakub@redhat.com>
2503
2504         PR c++/31806
2505         * decl.c (cp_finish_decl): Also clear was_readonly if a static var
2506         needs runtime initialization.
2507
2508 2007-05-31  Paolo Carlini  <pcarlini@suse.de>
2509
2510         PR c++/32158
2511         * semantics.c (finish_trait_expr): Complete the types.
2512
2513 2007-05-30  Russell Yanofsky <russ@yanofsky.org>
2514             Douglas Gregor <doug.gregor@gmail.com>
2515             Pedro Lamarao <pedro.lamarao@mndfck.org>
2516             Howard Hinnant <howard.hinnant@gmail.com>
2517
2518         PR c++/7412
2519         PR c++/29939
2520         * typeck.c (comptypes): Don't consider rvalue and lvalue
2521         reference types to be equivalent.
2522         (check_return_expr): Move from certain lvalues when returning
2523         them.
2524         * decl.c (grokdeclarator): Implement reference collapsing.
2525         (copy_fn_p): Don't consider constructors taking rvalue references
2526         to be copy constructors.
2527         (move_fn_p): New.
2528         * call.c (conversion): New "rvaluedness_matches_p" member.
2529         (convert_class_to_reference): Require reference type as first
2530         parameter instead of base type.
2531         (reference_binding): Add logic to handle rvalue references.
2532         (implicit_conversion): Update inaccurate comment.
2533         (convert_like_real): Disable creation of temporaries that are
2534         impossible to initialize for types with move constructors.
2535         (build_over_call): Elide move constructors when possible.
2536         (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
2537         (maybe_handle_ref_bind): Return conversion instead of type node.
2538         (compare_ics): Add logic to use "rvaluedness_matches_p" values to
2539         determine preferred conversion sequences.
2540         * cp-tree.h (TYPE_REF_IS_RVALUE): New.
2541         (LOOKUP_PREFER_RVALUE): New.
2542         (DECL_MOVE_CONSTRUCTOR_P): New.
2543         (struct cp_declarator): Add "reference" member for reference
2544         types, with new "rvalue_ref" flag.
2545         (cp_build_reference_type): Declare.
2546         (move_fn_p): Declare.
2547         * error.c (dump_type_prefix): Format rvalue reference types
2548         correctly in error messages.
2549         * except.c (build_throw): Move from certain lvalues when
2550         throwing.
2551         * mangle.c (write_type): Mangle rvalue references differently
2552         than regular references.
2553         * parser.c (make_reference_declarator): Add boolean parameter for
2554         rvalue references.
2555         (cp_parser_make_indirect_declarator): New.
2556         (cp_parser_new_declarator_opt): Call
2557         cp_parser_make_indirect_declarator. 
2558         (cp_parser_conversion_declarator_opt): Ditto.
2559         (cp_parser_declarator): Ditto.
2560         (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
2561         declarators.
2562         * pt.c (tsubst): Implement reference collapsing.
2563         (maybe_adjust_types_for_deduction): Implement special template
2564         parameter deduction rule for rvalue references.
2565         (type_unification_real): Update calls to
2566         maybe_adjust_types_for_deduction.
2567         (try_one_overload): Ditto.
2568         (unify_pack_expansion): Ditto.
2569         * tree.c (lvalue_p_1): Handle rvalue reference types.
2570         (cp_build_reference_type): New.
2571
2572 2007-05-30  Jakub Jelinek  <jakub@redhat.com>
2573
2574         PR c++/31809
2575         * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
2576         variables that need runtime initialization.
2577
2578 2007-05-28  Andrew Pinski  <Andrew_pinski@playstation.sony.com>
2579
2580         PR c++/31339
2581         * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
2582         case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
2583         case POSTDECREMENT_EXPR>): Return the error_mark_node
2584         if either the real or imaginary parts would an
2585         error_mark_node.
2586         
2587 2007-05-25  Simon Martin  <simartin@users.sourceforge.net>
2588             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2589
2590         PR c++/31745
2591         * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
2592         token is a closing brace, false if there are no tokens left.
2593         (cp_parser_namespace_alias_definition): Only consume the next token if
2594         it is a closing brace.
2595
2596         * parser.c (cp_parser_class_specifier): Likewise.
2597
2598 2007-05-25  H.J. Lu  <hongjiu.lu@intel.com>
2599
2600         * semantics.c (finish_member_declaration): Fix a typo in the
2601         last checkin.
2602
2603 2007-05-25  Douglas Gregor <doug.gregor@gmail.com>
2604
2605         PR c++/31431
2606         PR c++/31432
2607         PR c++/31434
2608         PR c++/31435
2609         PR c++/31437
2610         PR c++/31438
2611         PR c++/31442
2612         PR c++/31443
2613         PR c++/31444
2614         PR c++/31445
2615         * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
2616         * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
2617         * pt.c (check_for_bare_parameter_packs): Return bool indicated
2618         whether everything was okay. Fix indentation.
2619         (push_template_decl_real): Check for bare parameter packs in
2620         function parameters; where errors occur, mark the parameter types
2621         with ERROR_MARK_NODEs to avert ICEs.
2622         (coerce_template_parameter_pack): New.
2623         (coerce_template_parms): Moved parameter pack coercion into
2624         coerce_template_parameter_pack, and permit it anywhere in the
2625         template parameter list (not just at the end). Parameter and
2626         argument indices can vary (somewhat) separately now, so add
2627         PARM_IDX and ARG_IDX.
2628         (fn_type_unification): Don't set an argument pack as incomplete if
2629         no argument pack was deduced.
2630         (type_unification_real): If a type parameter is a parameter pack
2631         and has not otherwise been deduced, it will be deduced to an empty
2632         parameter pack.
2633         (more_specialized_fn): Use the actual lengths of the argument
2634         lists when comparing against expansions.
2635         * semantics.c (finish_member_declaration): If a field's type has
2636         bare parameter packs, error and set its type to ERROR_MARK_NODE.
2637
2638 2007-05-24  Danny Smith  <dannysmith@users.sourceforge.net>
2639
2640         PR target/27067
2641         * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
2642
2643 2007-05-22  Ollie Wild  <aaw@google.com>
2644
2645         * name-lookup.c (ambiguous_decl): Adds check for hidden types.
2646         (unqualified_namespace_lookup): Adds check for hidden types.
2647
2648 2007-05-22  Ollie Wild  <aaw@google.com>
2649
2650         * decl.c (duplicate_decls): Verify namespace names are unique.
2651
2652 2007-05-21  Mark Mitchell  <mark@codesourcery.com>
2653
2654         * decl.c (cxx_maybe_build_cleanup): Handle
2655         __attribute__((cleanup)).
2656
2657 2007-05-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2658
2659         * cvt.c (cp_convert_and_check): Don't check warnings if the
2660         conversion failed.
2661
2662 2007-05-18  Geoffrey Keating  <geoffk@apple.com>
2663
2664         * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
2665
2666 2007-05-14  Paolo Carlini  <pcarlini@suse.de>
2667
2668         PR c++/29928
2669         * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
2670         type only if is a class type (5.2.8/4).
2671
2672 2007-05-14  Rafael Avila de Espindola  <espindola@google.com>
2673
2674         * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
2675         * decl.c (grokdeclarator): Use unsigned_type_for instead of
2676         c_common_unsigned_type.
2677
2678 2007-05-11  Silvius Rus  <rus@google.com>
2679
2680         * cp/typeck.c (build_indirect_ref): Add call to
2681         strict_aliasing_warning.
2682         (build_reinterpret_cast_1): Condition call to
2683         strict_aliasing_warning. 
2684
2685 2007-05-11  Jan Hubicka  <jh@suse.cz>
2686
2687         * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
2688         * decl2.c (start_objects): ctors and dtors are no longer public.
2689         (cp_write_global_declarations): Do not call c_build_cdtor_fns.
2690         
2691 2007-05-07  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2692
2693         * typeck.c (build_unary_op): Remove code that used to
2694         handle non lvalue increments/decrements.
2695
2696 2007-05-07  Mike Stump  <mrs@apple.com>
2697
2698         * parser.c (check_empty_body): Add.
2699         (cp_parser_iteration_statement): Add call to check_empty_body.
2700
2701 2007-05-05  Geoffrey Keating  <geoffk@apple.com>
2702
2703         PR 31775
2704         * mangle.c (write_mangled_name): Mangle static variable names.
2705         (write_unqualified_name): Use local-source-name for
2706         namespace-scope static variables.
2707
2708 2007-05-04  Dirk Mueller  <dmueller@suse.de>
2709
2710         * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
2711         not in effect.
2712
2713 2007-05-02  Seongbae Park  <seongbae.park@gmail.com>
2714
2715         PR c++/31663
2716         * decl2.c (constrain_class_visibility): 
2717         Use strip_pointer_or_array_types instead of strip_array_types.
2718
2719 2007-04-28  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2720
2721         PR C++/30221
2722         * decl.c (reshape_init_r): Don't reshape the first element if it
2723         is a pointer to member function.
2724
2725 2007-04-27  Simon Baldwin  <simonb@google.com>
2726
2727         * decl.c (grokparms): Changed message format from %qD to %qE.
2728
2729 2007-04-27  Douglas Gregor  <doug.gregor@gmail.com>
2730
2731         * error.c (maybe_warn_variadic_templates): Variadic templates are
2732        now in C++0x, so only warn about them in C++98 mode.
2733         
2734 2007-04-26  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2735
2736         PR C++/30016
2737         * typeck.c (build_reinterpret_cast_1): Only allow conversion to
2738         integeral types from vectors types.
2739
2740 2007-04-26  Jakub Jelinek  <jakub@redhat.com>
2741
2742         PR c++/31598
2743         * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
2744         for type dependent OMP_CLAUSE_DECLs.
2745
2746 2007-04-24  Mark Mitchell  <mark@codesourcery.com>
2747
2748         PR c++/31338
2749         * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
2750         * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
2751         COMPLEX_TYPE is now an ARITHMETIC_TYPE.
2752         * init.c (build_zero_init): Adjust, as
2753         COMPLEX_TYPE is now a SCALAR_TYPE.
2754         * typeck2.c (digest_init): Allow brace-enclosed initializers for
2755         COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
2756
2757 2007-04-25  Paolo Carlini  <pcarlini@suse.de>
2758
2759         * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
2760         per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
2761         (trait_expr_value): Adjust.
2762
2763 2007-04-23  Simon Baldwin  <simonb@google.com>
2764
2765         * decl.c (grokparms): Added new error for duplicate function
2766         parameters names in function prototypes, to match gcc behavior.
2767
2768 2007-04-23  Jan Hubicka  <jh@suse.cz>
2769
2770         * cp/decl2.c (finish_objects): Do not call target constructor/destructor
2771         bits dirrectly.
2772
2773 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2774
2775         * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
2776         instead of checking GIMPLE_STMT_P in chain_next.
2777
2778 2007-04-17  Mark Mitchell  <mark@codesourcery.com>
2779
2780         PR c++/31513
2781         * call.c (convert_for_arg_passing): Convert bitfields to their
2782         declared types.
2783
2784 2007-04-17  Simon Martin  <simartin@users.sourceforge.net>
2785
2786         PR c++/31517
2787         * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
2788
2789 2007-04-16  Seongbae Park <seongbae.park@gmail.com>
2790
2791         PR c++/29365
2792         * cp/decl2.c (constrain_class_visibility):
2793         Do not warn about the use of anonymous namespace in the main input file.
2794
2795 2007-04-15  Mark Mitchell  <mark@codesourcery.com>
2796
2797         * cp-tree.h (current_template_parms): Fix typo in comment.
2798
2799 2007-04-15  Kazu Hirata  <kazu@codesourcery.com>
2800
2801         * cp-tree.h, error.c: Fix comment typos.
2802
2803 2007-04-13  Jason Merrill  <jason@redhat.com>
2804
2805         PR c++/31074
2806         * call.c (reference_binding): Add c_cast_p parm.  If true,
2807         add quals to TO as needed to make it reference-compatible.
2808
2809 2007-04-11  Jan Hubicka  <jh@suse.cz>
2810
2811         * cp/class.c (convert_to_base_statically): Fold produced tree; verify
2812         that we are not processing template_decl.
2813
2814 2007-04-09  Mark Mitchell  <mark@codesourcery.com>
2815
2816         PR c++/31449
2817         * class.c (build_base_path): Ensure that the converted pointer has
2818         the same cv-qualification as the input.
2819
2820 2007-04-09  Paolo Carlini  <pcarlini@suse.de>
2821
2822         * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
2823
2824 2007-04-08  Steven Bosscher  <steven@gcc.gnu.org>
2825
2826         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
2827         Do not set it.
2828         (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
2829         * tree.c (cp_add_pending_fn_decls): Remove.
2830         * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
2831
2832 2007-04-07  Daniel Berlin  <dberlin@dberlin.org>
2833
2834         Revert change removing staticp.
2835
2836 2007-04-06  Daniel Berlin  <dberlin@dberlin.org>
2837
2838         * cp-objcp-common.c (cxx_staticp): Remove.
2839         * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
2840         * cp-tree.h (cxx_staticp):      
2841
2842 2007-04-04  Danny Smith  <dannysmith.users.sourceforge.net>
2843
2844         * class.c (check_for_override): Don't remove dllmport attribute
2845         of virtual methods.
2846
2847 2007-04-03  Jakub Jelinek  <jakub@redhat.com>
2848
2849         PR c++/30847
2850         * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
2851         type issue error and return early.
2852
2853 2007-03-30  Jason Merrill  <jason@redhat.com>
2854
2855         PR c++/31187
2856         * typeck.c (cp_type_readonly): New fn.
2857         * cp-tree.h: Declare it.
2858         * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
2859         (cp_finish_decl): Not here.
2860
2861 2007-03-31  Richard Guenther  <rguenther@suse.de>
2862
2863         * optimize.c (maybe_clone_body): Replace splay-tree usage by
2864         pointer-map.
2865
2866 2007-03-31  Douglas Gregor  <doug.gregor@gmail.com>
2867
2868         PR c++/31138
2869         PR c++/31140
2870         PR c++/31141
2871         * parser.c (declarator_can_be_parameter_pack): New.
2872         (cp_parser_template_parameter): Only parse the `...' if the
2873         declarator can be a parameter pack.
2874         (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
2875         is NULL.
2876         * pt.c (find_parameter_packs_r): Look into the bounds on integer
2877         types (they could be used as array bounds). 
2878         (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
2879         (tsubst_pack_expansion): Handle failure to expand parameter
2880         packs.
2881         
2882 2007-03-30  Paolo Carlini  <pcarlini@suse.de>
2883
2884         PR c++/26099
2885         * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
2886         TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
2887         (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
2888         (CLASS_TYPE_NON_UNION_P): Add.
2889         (struct lang_type_class): Add has_complex_dflt.
2890         (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
2891         (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
2892         * cp-tree.def: Add TRAIT_EXPR.
2893         * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
2894         * lex.c (struct resword): Add __has_nothrow_assign,
2895         __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
2896         __has_trivial_constructor, __has_trivial_copy,
2897         __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
2898         __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
2899         __is_pod, __is_polymorphic, __is_union.
2900         * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
2901         (cp_parser_trait_expr): New.
2902         * semantics.c (finish_trait_expr, trait_expr_value
2903         classtype_has_nothrow_copy_or_assign_p): New.
2904         * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
2905         as static.
2906         * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
2907         * class.c (check_bases, check_field_decl, check_bases_and_members):
2908         Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
2909         * pt.c (uses_template_parms, tsubst_copy_and_build,
2910         value_dependent_expression_p, type_dependent_expression_p): Deal with
2911         TRAIT_EXPR.
2912         * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
2913
2914 2007-03-29  Richard Guenther  <rguenther@suse.de>
2915
2916         * tree.c (cp_walk_subtrees): Do not set input_location.
2917
2918 2007-03-28  Simon Martin  <simartin@users.sourceforge.net>
2919
2920         PR c++/29077
2921         * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
2922         destructor.
2923
2924 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
2925
2926         * parser.c (struct cp_parser): Update comment for
2927         greater_than_is_operator_p.
2928         (cp_parser_primary_expression): In C++0x mode, a cast operator can
2929         be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
2930         (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
2931         !GREATER_THAN_IS_OPERATOR_P.
2932         (cp_parser_binary_expression): When -Wc++0x-compat, warn about
2933         `>>' operators that will become two `>' tokens in C++0x.
2934         (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
2935         mode, allowing it to terminate default arguments.
2936         (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
2937         `>>' like two consecutive `>' tokens.
2938         (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
2939         (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
2940         ends a template argument.
2941
2942 2007-03-28  Douglas Gregor  <doug.gregor@gmail.com>
2943
2944         * decl.c (redeclaration_error_message): Complain when redeclaring
2945         a friend function with default template arguments (C++0x mode only).
2946         * cp-tree.h (check_default_tmpl_args): Declare.
2947         * pt.c (check_default_tmpl_args): In C++0x mode, permit default
2948         template arguments in function templates. Add support for checking
2949         the default template arguments of friend templates.
2950         (push_template_decl_real): Fix call to check_default_tmpl_args.
2951         (type_unification_real): If a template parameter has not been
2952         deduced but provides a default template argument, substitute into
2953         that default template argument.
2954         * parser.c (cp_parser_init_declarator): When declaring (but not
2955         defining!) a function template in C++0x mode, check for default
2956         template arguments.
2957
2958 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
2959
2960         PR c++/29993
2961         * decl.c (grokdeclarator): Deal with cv-qualified function type
2962         typedefs in the same way for member and non-member functions.
2963
2964 2007-03-26  Dirk Mueller  <dmueller@suse.de>
2965
2966         * parser.c (cp_parser_member_declaration): Pedwarn
2967         about stray semicolons after member declarations.
2968
2969 2007-03-26  Paolo Carlini  <pcarlini@suse.de>
2970
2971         PR c++/30500
2972         * pt.c (instantiate_decl): Set in_system_header.
2973
2974 2007-03-22  Mark Mitchell  <mark@codesourcery.com>
2975
2976         * cp-tree.h (current_tempalte_parms): Improve documentation.
2977         * pt.c (current_template_args): Likewise.
2978
2979         PR c++/30863
2980         * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
2981         not consume tokens when failing.
2982
2983 2007-03-22  Jim Wilson  <wilson@specifix.com>
2984             Mark Mitchell  <mark@codesourcery.com>
2985
2986         PR c++/31273
2987         * call.c (standard_conversion): Use type_decays_to.  Keep FCODE
2988         consistent with FROM.
2989
2990 2007-03-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2991
2992         * error.c (dump_expr): Handle dependent names that designate types.
2993         * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
2994
2995 2007-03-17  Kazu Hirata  <kazu@codesourcery.com>
2996
2997         * cp-tree.def, parser.c, pt.c: Fix comment typos.
2998
2999 2007-03-16  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3000
3001         * cvt.c (cp_convert_and_check) : Define.
3002         * cp-tree.h (cp_convert_and_check): Declare.
3003         * call.c (convert_conversion_warnings): Rename to
3004         conversion_null_warnings.  The warning for floating-point to
3005         integer is handled by convert_and_check in convert_like_real.
3006         (convert_like_real): convert_conversion_warnings was renamed as
3007         conversion_null_warnings.
3008         * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
3009         overflow and changes of value during conversion.
3010
3011 2007-03-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3012
3013         PR c++/30891
3014         * parser.c (cp_parser_statement): If 'namespace' is found, this
3015         only can be a namespace alias definition, so parse it now.
3016         (cp_parser_namespace_alias_definition): if we find an open brace
3017         instead of '=', then this is actually a misplaced namespace
3018         definition.
3019         
3020 2007-03-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3021
3022         PR c++/24924
3023         * decl.c (cxx_init_decl_processing): Move command-line options
3024         processing to c-opts.c.
3025         
3026 2007-03-15  Douglas Gregor  <doug.gregor@gmail.com>
3027
3028         * ptree.c (cxx_print_type): Use formatting markup for integers
3029         when printing template parameter index/level/orig level.
3030         (cxx_print_xnode): Ditto.
3031         * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
3032         (struct template_parm_index_s): Remove the PARAMETER_PACK member.
3033         Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
3034         HOST_WIDE_INTs.
3035         (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
3036         rather than a HOST_WIDE_INT.
3037         Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
3038         NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
3039         better bit-packing.
3040         (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
3041         RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
3042         IN_BASE_INITIALIZER bool bitfields.
3043         (struct cp_declarator): Make KIND a 4-bit field. Make
3044         PARAMETER_PACK_P a bool bitfield just after KIND.
3045         * pt.c (uses_parameter_packs): Destroy the pointer set.
3046         (make_pack_expansion): Ditto.
3047         (check_for_bare_parameter_packs): Ditto.
3048         * name-lookup.c (push_to_top_level): Make need_pop a bool value.
3049         
3050 2007-03-14  Andrew Pinski  <andrew_pinski@playstation.sony.com>
3051
3052         PR c++/31165
3053         * call.c  (convert_default_arg): Instead of copying the node,
3054         unshare it.
3055
3056 2007-03-15  Dirk Mueller  <dmueller@suse.de>
3057
3058         PR c++/30860
3059         * call.c (convert_conversion_warnings): New..
3060         (convert_like_real): .. factored out from here.
3061         (convert_conversion_warnings): Add warning about
3062         false being converted to NULL in argument passing.
3063
3064 2007-03-14  Dirk Mueller  <dmueller@suse.de>
3065
3066         * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
3067         (finish_do_body): Warn about empty body in do/while statement.
3068
3069 2007-03-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3070
3071         * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
3072         
3073 2007-03-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3074
3075         PR c/21438
3076         * typeck.c (build_binary_op): Call warn_for_div_zero instead of
3077         warning.
3078         
3079 2007-03-13  Alexandre Oliva  <aoliva@redhat.com>
3080
3081         * cp/repo.c (init_repo): Initialize random_seed saved options.
3082         (finish_repo): Adjust.
3083
3084 2007-03-13  Mark Mitchell  <mark@codesourcery.com>
3085
3086         PR bootstrap/30899
3087         * Make-lang.in (doc/g++.1): Use $< to specify the location from
3088         which to copy.
3089
3090 2007-03-12  Seongbae Park <seongbae.park@gmail.com>
3091
3092         * decl.c (compute_array_index_type): New warning flag warn_vla.
3093
3094 2007-03-12  Mark Mitchell  <mark@codesourcery.com>
3095
3096         PR c++/30108
3097         * call.c (convert_default_arg): Copy non-constant arguments.
3098
3099 2007-03-11  Mark Mitchell  <mark@codesourcery.com>
3100
3101         PR c++/31038
3102         * parser.c (cp_parser_postfix_expression): Disallow compound
3103         literals in constant expressions.
3104
3105         PR c++/30328
3106         * semantics.c (finish_typeof): Use unlowered_expr_type.
3107         
3108 2007-03-10  Mark Mitchell  <mark@codesourcery.com>
3109
3110         PR c++/30274
3111         * cp-tree.h (unlowered_expr_type): New function.
3112         * typeck.c (is_bitfield_expr_with_lowered_type): Handle
3113         COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
3114         (unlowered_expr_type): New function.
3115         (build_unary_op): Disallow predecrements of bool bitfields.
3116         * call.c (build_conditional_expr): Use unlowered_expr_type.
3117         * pt.c (type_unification_real): Likewise.
3118
3119 2007-03-09  Douglas Gregor  <doug.gregor@gmail.com>
3120
3121         PR c++/20599
3122         * typeck.c (check_return_expr): Check for bare parameter packs.
3123         (comptypes): Compare template parameter packs and
3124         type pack expansions.
3125         * decl.c (grokdeclarator): Deal with the declaration of function
3126         parameter packs.
3127         (grokparms): Verify that the (optional) function parameter pack is
3128         at the end of the parameter list.
3129         (xref_basetypes): Handle pack expansions in the base class.
3130         (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
3131         * cp-tree.def (TYPE_ARGUMENT_PACK): New.
3132         (NONTYPE_ARGUMENT_PACK): New.
3133         (TYPE_PACK_EXPANSION): New.
3134         (EXPR_PACK_EXPANSION): New.
3135         (ARGUMENT_PACK_SELECT): New.
3136         * cp-objcp-common.c (cp_tree_size): Compute size of
3137         (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
3138         ARGUMENT_PACK_SELECT.
3139         * error.c (dump_template_argument): Print template argument packs.
3140         (dump_template_argument_list): Ditto.
3141         (dump_template_parameter): Dump `...' for template type parameter
3142         packs.
3143         (dump_type): Dump TYPE_PACK_EXPANSION nodes.
3144         (dump_parameters): Print function parameter packs.
3145         (dump_template_parms): Print template argument packs.
3146         (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
3147         (maybe_warn_variadic_templates): New.
3148         * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
3149         * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
3150         NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
3151         CAST_EXPR. 
3152         * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
3153         (write_template_arg): Write argument packs as separate arguments.
3154         * cp-tree.h (struct template_parm_index_s): Add flag that
3155         indicates that the template parameter is actually a parameter
3156         pack.
3157         (struct tree_argument_pack_select): New.
3158         (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
3159         (union lang_tree_node): Add argument_pack_select.
3160         (FUNCTION_PARAMETER_PACK_P): New.
3161         (PACK_EXPANSION_P): New.
3162         (PACK_EXPANSION_PATTERN): New.
3163         (SET_PACK_EXPANSION_PATTERN): New.
3164         (PACK_EXPANSION_PARAMETER_PACKS): New.
3165         (ARGUMENT_PACK_P): New.
3166         (ARGUMENT_PACK_ARGS): New.
3167         (SET_ARGUMENT_PACK_ARGS): New.
3168         (ARGUMENT_PACK_INCOMPLETE_P): New.
3169         (ARGUMENT_PACK_EXPLICIT_ARGS): New.
3170         (TEMPLATE_PARM_PARAMETER_PACK): New.
3171         (TEMPLATE_TYPE_PARAMETER_PACK): New.
3172         (ARGUMENT_PACK_SELECT_FROM_PACK): New.
3173         (ARGUMENT_PACK_SELECT_INDEX): New.
3174         (ARGUMENT_PACK_SELECT_ARG): New.
3175         (struct cp_declarator): Add parameter_pack_p flag.
3176         (maybe_warn_variadic_templates): Declare.
3177         (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
3178         indicate a template parameter pack. 
3179         (uses_parameter_packs): Declare.
3180         (template_parameter_pack_p): Declare.
3181         (template_parms_variadic_p): Declare.
3182         (make_pack_expansion): Declare.
3183         (check_for_bare_parameter_packs): Declare.
3184         * cxx-pretty-print.c (pp_cxx_unary_expression): Print
3185         sizeof... expressions. 
3186         (pp_cxx_expression): Print pack expansions and non-type argument
3187         packs.
3188         (pp_cxx_exception_specification): Print pack expansions. 
3189         (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
3190         (pp_cxx_ctor_initializer): Print pack expansions.
3191         (pp_cxx_type_id): Print pack expansions.
3192         (pp_cxx_template_argument_list): Print argument packs.
3193         (pp_cxx_template_parameter): Print ellipsis for template parameter
3194         packs.
3195         * pt.c (comp_template_parms): Compare template parameter packs.
3196         (template_parameter_pack_p): New.
3197         (template_parms_variadic_p): New.
3198         (template_args_variadic_p): New.
3199         (make_ith_pack_parameter_name): New.
3200         (struct find_parameter_pack_data): New.
3201         (find_parameter_packs_r): New.
3202         (uses_parameter_packs): New.
3203         (make_pack_expansion): New.
3204         (check_for_bare_parameter_packs): New.
3205         (expand_template_argument_pack): New.
3206         (reduce_template_parm_level): Propagate parameter pack flag.
3207         (process_template_parm): Add is_parameter_pack parameter to state
3208         when the parameter is actually a parameter pack. Create template
3209         parameter packs when is_parameter_pack is true.
3210         (current_template_args): The argument for a template parameter
3211         pack is an argument pack containing a single pack expansion.
3212         (process_partial_specialization): When checking that non-type
3213         argument expressions do not involve template parameters, loop over
3214         the arguments in argument packs separately.
3215         (push_template_decl_real): Check that the type of the declaration
3216         does not have any bare parameter packs. Check that primary
3217         templates have no more than one parameter pack, and that it comes
3218         at the end of the template parameter list.
3219         (convert_template_argument): Handle coercions for pack expansion
3220         expressions by coercing the pattern then rebuilding the expansion.
3221         (coerce_template_parms): When coercing the arguments for a
3222         variadic template, pack "extra" arguments into an argument pack.
3223         (coerce_template_template_parms): Cannot coerce between parameter
3224         packs and non-pack parameters.
3225         (template_args_equal): Compare PACK_EXPANSION_P expressions.
3226         (comp_template_args): Expand all template arguments packs before
3227         comparing template argument lists.
3228         (mangle_class_name_for_template): Make argument packs as separate
3229         template arguments.
3230         (for_each_template_parm_r): No need to handle BASELINK. 
3231         (instantiate_class_template): Handle pack expansions in the base
3232         class list.
3233         (tsubst_pack_expansion): New.
3234         (tsubst_template_args): Handle substitutions of argument packs and
3235         pack expansion into template argument lists.
3236         (tsubst_decl): Expand function parameter packs into separate
3237         function parameters.
3238         (tsubst_arg_types): Expand a type pack expansion into separate
3239         argument types.
3240         (tsubst_exception_specification): Handle pack expansions in
3241         exception specifiers.
3242         (tsubst): See through ARGUMENT_PACK_SELECT arguments when 
3243         replacing a template parameter with its argument. If we encounter
3244         a substitution for an argument pack, just return the parameter
3245         itself. 
3246         (tsubst_copy): sizeof(X...) returns the number of elements in
3247         parameter pack X.  See through ARGUMENT_PACK_SELECT when the
3248         PARM_DECL is a parameter pack.
3249         (tsubst_expr): Expression pack expansions and argument packs
3250         cannot show up here; they will all be handled through function
3251         calls, sizeof, and template argument lists.
3252         (tsubst_copy_and_build): sizeof(X...) returns the number of
3253         elements in parameter pack X.  Handle pack expansions in TREE_LIST
3254         and CONSTRUCTOR nodes.
3255         (fn_type_unification): Handle "incomplete" explicit template
3256         argument lists that specify some of the arguments for a template
3257         parameter pack.
3258         (type_unification_real): Unify arguments against pack expansions.
3259         (template_parm_level_and_index): New, helper function.
3260         (unify_pack_expansion): New.
3261         (unify): Unify argument packs on an argument-by-argument basis,
3262         handling variadic argument packs as well.
3263         (more_specialized_fn): Handle unification of function parameter
3264         packs. All things being equal, prefer non-variadic function
3265         templates to variadic function templates.
3266         (more_specialized_class): Prefer the variadic class template
3267         partial specialization that binds fewer arguments to a parameter
3268         pack.
3269         (regenerate_decl_from_template): Expand function parameter packs
3270         into separate parameters.
3271         (instantiate_decl): Ditto.
3272         (tsubst_initializer_list): Handle pack expansions for base-class
3273         initializers.
3274         (dependent_type_p_r): Determine dependent types in argument packs
3275         and pack expansions.
3276         (value_dependent_expression_p): Determine value-dependence of
3277         non-type argument packs.
3278         (dependent_template_arg_p): Handle argument packs.
3279         * semantics.c (finish_cond): Check for bare parameter packs.
3280         (finish_expr_stmt): Ditto.
3281         (finish_for_expr): Ditto.
3282         (finish_switch_cond): Ditto.
3283         (finish_mem_initializers): Ditto.
3284         * name-lookup.c (arg_assoc_type): Handle pack expansions and
3285         argument packs.
3286         * decl2.c (cp_build_parm_decl): Mark function parameter packs.
3287         * parser.c (make_declarator): Declarator is not an expansion.
3288         (make_pointer_declarator): Transfer parameter pack flag to outer
3289         declarator.
3290         (make_reference_declarator): Ditto.
3291         (make_ptrmem_declarator): Ditto.
3292         (make_call_declarator): Ditto.
3293         (make_array_declarator): Ditto.
3294         (cp_parser_postfix_expression): Allow pack expansion expressions
3295         in the argument list for a call expression.
3296         (cp_parser_parenthesized_expression_list): Add new parameter
3297         ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
3298         into separate arguments."
3299         (cp_parser_new_placement): Allow pack expansion expressions.
3300         (cp_parser_new_initializer): Ditto.
3301         (cp_parser_mem_initializer_list): Allow ellipsis to create a
3302         base-class initializer expansion.
3303         (cp_parser_mem_initializer): Ditto.
3304         (cp_parser_template_parameter_list): Keep track of whether the
3305         template parameter is a template parameter pack.
3306         (cp_parser_template_parameter): Parse the ellipsis to indicate a
3307         template parameter pack.
3308         (cp_parser_type_parameter): Ditto.
3309         (cp_parser_template_argument_list): Parse the ellipsis to indicate
3310         a pack expansion.
3311         (cp_parser_direct_declarator): Parse the ellipsis to indicate that
3312         this declarator is a parameter pack.
3313         (cp_parser_parameter_declaration): The ellipsis does not end the
3314         parameter declaration, because it might be a parameter pack. Parse
3315         the ellipsis to indicate a parameter pack.
3316         (cp_parser_initializer): Allow pack expansions.
3317         (cp_parser_initializer_list): Allow ellipsis to create an
3318         initializer expansion.
3319         (cp_parser_base_clause): Allow ellipsis to create a base specifier
3320         expansion.
3321         (cp_parser_type_id_list): Allow ellipsis to create an exception
3322         specifier expansion.
3323         (cp_parser_attribute_list): Don't allow pack expansions.
3324         (cp_parser_functional_cast): Allow pack expansions.
3325         (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
3326         compute the length of a parameter pack.
3327         (cp_parser_next_token_ends_template_argument_p): An ellipsis can
3328         end a template argument.
3329         * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
3330         NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
3331         CAST_EXPR. 
3332
3333 2007-03-09  Dirk Mueller  <dmueller@suse.de>
3334
3335         * cp/call.c (build_new_op): Call warn_logical_operator.
3336
3337 2007-03-08  Volker Reichelt  <reichelt@netcologne.de>
3338
3339         PR c++/30852
3340         * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
3341
3342         PR c++/30534
3343         * pt.c (any_template_arguments_need_structural_equality_p):
3344         Robustify.
3345
3346 2007-03-08  Alexandre Oliva  <aoliva@redhat.com>
3347
3348         * decl.c (grokdeclarator): Disable warnings for anonymous
3349         bitfields.
3350
3351 2007-03-05  Volker Reichelt  <reichelt@netcologne.de>
3352
3353         * typeck2.c (readonly_error): Always emit a hard error.
3354         Remove last argument.
3355         * cp-tree.h (readonly_error): Adjust prototype.
3356         * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
3357         * typeck.c (build_unary_op): Likewise.
3358         (build_modify_expr): Likewise.
3359
3360 2007-03-04  Simon Martin  <simartin@users.sourceforge.net>
3361
3362         PR c++/30895
3363         * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
3364
3365 2007-03-03  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3366
3367         PR c++/15787
3368         * parser.c (struct cp_parser): New IN_IF_STMT.
3369         (cp_parser_statement_seq_opt): Handle an unexpected 'else',
3370         returning if parsing the body of an 'if' statement or issuing an
3371         error and continuing.
3372         (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
3373         body of 'if'.
3374         (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
3375         
3376 2007-03-02  Simon Martin  <simartin@users.sourceforge.net>
3377
3378         PR c++/28253
3379         * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
3380         for thunks.
3381
3382 2007-03-02  Geoffrey Keating  <geoffk@apple.com>
3383
3384         * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
3385         Objective-C++.  Don't exit early if -shared-libgcc needs to be
3386         added.
3387
3388 2007-03-02  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3389
3390         * typeck.c (common_base_type): Delete unused function.
3391         
3392 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
3393
3394         * Make-lang.in: Add dummy lang.install-pdf target.
3395
3396 2007-03-01  Simon Baldwin <simonb@google.com>
3397
3398         PR c++/23689
3399         * decl.c (check_tag_decl): Added new warning for typedef ignored
3400         when it precedes an otherwise valid non-typedef declaration.
3401
3402 2007-02-28  Sandra Loosemore  <sandra@codesourcery.com>
3403
3404         * typeck.c (build_function_call): Store converted arguments
3405         in a stack-allocated array instead of building a list.
3406         (convert_arguments): Store arguments in the array passed in as an
3407         argument, and return the actual number of arguments.
3408         * call.c (build_call): Delete, and replace with...
3409         (build_call_n, build_call_a): New.
3410         (build_op_delete_call): Rewrite to avoid constructing argument lists.
3411         (build_over_call): Store converted arguments in a stack-allocated
3412         array instead of building a list.
3413         (build_cxx_call): Pass arguments in an array instead of as a list.
3414         (build_java_interface_fn_ref): Rewrite to avoid constructing
3415         argument lists.
3416         * tree.h: Update declarations to reflect above changes.
3417         * method.c (use_thunk): Use a stack-allocated array to hold
3418         the arguments instead of a list.
3419         * rtti.c (throw_bad_cast): Update call to cxx_call.
3420         (throw_bad_typeid): Likewise.
3421         (build_dynamic_cast_1): Likewise.
3422         * init.c (build_builtin_delete_call): Use build_call_n.
3423         * decl.c (expand_static_init): Likewise.
3424         * except.c (cp_protect_cleanup_actions): Likewise.
3425         * cp-gimplify.c (genericize_eh_spec_block): Likewise.
3426         (gimplify_must_not_throw_expr): Likewise.
3427         (cxx_omp_apply_fn): Use build_call_a.
3428
3429 2007-02-26  Mark Mitchell  <mark@codesourcery.com>
3430
3431         * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
3432         * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
3433
3434 2007-02-25  Mark Mitchell  <mark@codesourcery.com>
3435
3436         * cp-tree.h (static_ctors): Remove.
3437         * cp-tree.h (static_dtors): Likewise.
3438         * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
3439         refactoring of tree_map hierarchy.
3440         (decl_shadowed_for_var_insert): Likewise.
3441         * semantics.c (expand_body): Use c_expand_body.
3442         (expand_or_defer_fn): Don't update static_ctors or static_dtors.
3443         * decl2.c (static_ctors): Remove.
3444         (static_dtors): Likewise.
3445         (generate_ctor_or_dtor_function): Pass NULL_TREE to
3446         objc_generate_static_init_call.  Do not call static_[cd]tors.
3447         (generate_ctor_and_dtor_functions_for_priority): Do not check for
3448         static_[cd]tors.
3449         (cp_write_global_declarations): Likewise.
3450
3451 2007-02-23  Richard Guenther  <rguenther@suse.de>
3452
3453         * class.c (note_name_declared_in_class): Make declaration
3454         changes meaning a pedwarn.
3455
3456 2007-02-22  Michael Matz  <matz@suse.de>
3457
3458         PR c++/29433
3459         * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
3460         * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
3461         dump_function_decl): Guard emitting outer scopes by new flag.
3462         * cp-lang.c (cxx_dwarf_name): New function.
3463         (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
3464         * pt.c (classtype_mangled_name, mangle_class_name_for_template):
3465         Remove functions.
3466         (push_template_decl_real, lookup_template_class): Remove calls
3467         to above functions.
3468
3469 2007-02-19  Mark Mitchell  <mark@codesourcery.com>
3470
3471         * call.c (build_new_method_call): Ensure that explicit calls of
3472         destructors have type "void".
3473
3474 2007-02-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3475
3476         * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
3477         and -Walways-true with -Waddress.
3478         * cvt.c (convert_to_void): Replace unconditional warning with
3479         -Waddress.
3480
3481 2007-02-18  Kazu Hirata  <kazu@codesourcery.com>
3482
3483         * decl.c, tree.c: Fix comment typos.
3484
3485 2007-02-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
3486
3487         PR C++/30158
3488         * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the 
3489         statement expression if we had an error mark node.
3490
3491 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
3492             Brooks Moses  <brooks.moses@codesourcery.com>
3493             Lee Millward  <lee.millward@codesourcery.com>
3494
3495         * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
3496         Change class to tcc_vl_exp.
3497
3498         * call.c (build_call): Use build_call_list instead 
3499         of build3. 
3500         (build_over_call): Likewise.
3501         (build_new_method_call): Use build_min_non_dep_call_list 
3502         instead of build_min_non_dep.
3503
3504         * error.c (dump_call_expr_args): New function.
3505         (dump_aggr_init_expr_args): New function.
3506         (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them. 
3507         Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
3508
3509         * cvt.c (convert_to_void): Use build_call_array instead
3510         of build3; use new AGGR_INIT_EXPR accessor macros.
3511
3512         * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
3513         instead of TREE_CODE_LENGTH.
3514
3515         * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
3516         AGGR_INIT_EXPR accessor macros.
3517
3518         * cp-gimplify.c (cp_gimplify_init_expr): Use 
3519         AGGR_INIT_EXPR_SLOT to set the slot operand.
3520
3521         * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
3522         (AGGR_INIT_EXPR_SLOT): New macro.
3523         (AGGR_INIT_EXPR_ARG): New macro.
3524         (aggr_init_expr_nargs): New macro.
3525         (AGGR_INIT_EXPR_ARGP): New macro.
3526         (aggr_init_expr_arg_iterator): New.
3527         (init_aggr_init_expr_arg_iterator): New.
3528         (next_aggr_init_expr_arg): New.
3529         (first_aggr_init_expr_arg): New.
3530         (more_aggr_init_expr_args_p): New.
3531         (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
3532         (stabilize_aggr_init): New declaration.
3533         (build_min_non_dep_call_list): Likewise.
3534
3535         * tree.c (process_aggr_init_operands): New function.
3536         (build_aggr_init_array) New function.
3537         (build_cplus_new): Update to use new CALL_EXPR and
3538         AGGR_INIT_EXPR accessor macros. Replace use of build3 with
3539         build_aggr_init_array.
3540         (build_min_non_dep_call_list) New function.
3541         (build_min_nt): Assert input code parameter is not a variable
3542         length expression class.
3543         (build_min, build_min_non_dep): Likewise.
3544         (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
3545         to check for equality instead of recursing. Handle tcc_vl_exp
3546         tree code classes.
3547         (stabilize_call): Update to only handle CALL_EXPRs, not 
3548         AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
3549         (stabilize_aggr_init): New function.
3550         (stabilize_init): Use it.
3551
3552         * cxx-pretty-print.c (pp_cxx_postfix_expression)
3553         <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
3554         AGGR_INIT_EXPR accessor macros and argument iterators.
3555         
3556         * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
3557         build_vl_exp. Iterate through the operands, recursively 
3558         processing each one.
3559         (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
3560         CALL_EXPR accessor macros.
3561         (value_dependent_expression_p) <default>: Handle tcc_vl_exp
3562         tree code classes. Use TREE_OPERAND_LENGTH instead of 
3563         TREE_CODE_LENGTH.
3564
3565         * semantics.c (finish_call_expr): Use build_nt_call_list
3566         instead of build_nt.
3567         (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR 
3568         accessor macros. Use build_call_array to construct the 
3569         CALL_EXPR node instead of build3
3570         
3571         * decl2.c (build_offset_ref_call_from_tree): Use 
3572         build_nt_call_list and build_min_non_dep_call_list instead
3573         of build_min_nt and build_min_non_dep.
3574
3575         * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
3576         Use build_nt_call_list instead of build_min_nt.
3577
3578 2007-02-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3579
3580         PR c++/28943
3581         * call.c (build_conditional_expr): Improve error message.
3582         
3583 2007-02-13  Dirk Mueller  <dmueller@suse.de>
3584
3585         * friend.c (do_friend): Annotate warning about friend
3586         declarations in templates with OPT_Wnon_template_friend.
3587         Convert informal message from warning() to inform().
3588
3589 2007-02-12  Simon Martin  <simartin@users.sourceforge.net>
3590             Mark Mitchell  <mark@codesourcery.com>
3591
3592         PR c++/14622
3593         * pt.c (do_decl_instantiation): Detect type mismatches in explicit
3594         instantiations for variables.
3595
3596 2007-02-12  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3597
3598         PR middle-end/7651
3599         * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
3600         Check warn_unused_value just once.
3601
3602 2007-02-11  Mark Mitchell  <mark@codesourcery.com>
3603
3604         PR c++/26988
3605         * pt.c (determine_specialization): Use skip_artificial_parms_for.
3606         (fn_type_unificiation): Likewise.
3607         (get_bindings): Likewise.
3608
3609 o2007-02-06  Mark Mitchell  <mark@codesourcery.com>
3610
3611         PR target/29487
3612         * decl.c (finish_function): Use DECL_REPLACEABLE.
3613         * tree.c (cp_cannot_inline_tree_fn): Likewise.
3614
3615 2007-02-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3616
3617         * parser.c (cp_parser_primary_expression): Reformat overly long lines.
3618
3619 2007-02-10  Richard Henderson  <rth@redhat.com>, Jakub Jelinek  <jakub@redhat.com>
3620
3621         * decl.c (grokvardecl): Don't error if !have_tls.
3622         (grokdeclarator): Likewise.
3623         * parser.c (cp_parser_omp_threadprivate): Likewise.
3624
3625 2007-02-07  Jakub Jelinek  <jakub@redhat.com>
3626
3627         PR c++/30703
3628         * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
3629         parameters and result decls in omp clauses.
3630         (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
3631         by reference.
3632
3633 2007-02-05  Dirk Mueller  <dmueller@suse.de>
3634
3635         PR bootstrap/30510
3636         * parser.c (cp_parser_class_specifier): Always initialize bases.
3637
3638 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
3639
3640         * cp-tree.h (OMP_ATOMIC_CODE): Delete.
3641         (OMP_ATOMIC_DEPENDENT_P): Rewrite.
3642         * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
3643         expressions.
3644         * semantics.c (finish_omp_atomic): Store a whole expression node
3645         in operand 1, and integer_zero_node in operand 0, for dependent
3646         OMP_ATOMIC.  Rewrite to make flow easier to understand.
3647
3648 2007-02-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3649
3650         * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
3651
3652 2007-02-04  Kazu Hirata  <kazu@codesourcery.com>
3653
3654         * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
3655         parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
3656
3657 2007-02-03  Douglas Gregor  <doug.gregor@gmail.com>
3658
3659        * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
3660        keyword warning to -Wc++0x-compat.
3661         
3662 2007-02-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3663
3664         * decl.c (grokdeclarator): Update documentation.
3665
3666 2007-02-02  Jakub Jelinek  <jakub@redhat.com>
3667
3668         PR c++/30536
3669         * decl.c (grokdeclarator): If __thread is used together with
3670         a storage class other than extern and static, clear thread_p
3671         after issuing diagnostics and fall through to checking the
3672         storage class.
3673
3674 2007-01-30  Roger Sayle  <roger@eyesopen.com>
3675
3676         * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
3677         calculating the size of an array (to avoid recursive errors).
3678
3679 2007-01-30  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3680
3681         PR c++/24745
3682         * typeck.c (build_binary_op): Fix logic for warning. Move warning
3683         to -Wpointer-arith.
3684         * call.c (convert_like_real): Don't warn when converting to
3685         boolean type.
3686         
3687 2007-01-29  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3688
3689         * decl.c (pop_label): Replace warning with call to
3690         warn_for_unused_label.
3691
3692 2007-01-28  Andrew Pinski  <pinskia@gmail.com>
3693
3694         PR C++/28988
3695         * semantics.c (finish_pseudo_destructor_expr): Check the
3696         destrutor name by calling check_dtor_name.
3697
3698 2007-01-24  Douglas Gregor  <dgregor@osl.iu.edu>
3699
3700         * lex.c (D_CPP0X): Rename.
3701         (D_CXX0X): To this.
3702         (reswords): D_CPP0X -> D_CXX0X.
3703         (init_reswords): Ditto.
3704         * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
3705         of C++0x keywords as identifiers.
3706
3707 2007-01-23  Simon Martin  <simartin@users.sourceforge.net>
3708
3709         PR c++/27492
3710         * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
3711         function decls.
3712
3713 2007-01-23  Ian Lance Taylor  <iant@google.com>
3714
3715         * typeck.c (convert_for_assignment): Only warn about a = b = c
3716         when converting to bool.
3717
3718 2007-01-23  Roger Sayle  <roger@eyesopen.com>
3719
3720         * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
3721         TREE_OVERFLOW.
3722         * typeck.c (ignore_overflows): Remove the remaining uses of
3723         TREE_CONSTANT_OVERFLOW.
3724
3725 2007-01-20  Jan Hubicka  <jh@suse.cz>
3726
3727         * decl2.c (start_objects, start_static_storage_duration_function):
3728         Do not make the functions uninlinable.
3729
3730 2007-01-17  Ian Lance Taylor  <iant@google.com>
3731
3732         * class.c (add_method): Call VEC_reserve_exact rather than passing
3733         a negative size to VEC_reserve.
3734
3735 2007-01-11  Simon Martin  <simartin@users.sourceforge.net>
3736
3737         PR c++/29573
3738         * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
3739
3740 2007-01-10  Mark Mitchell  <mark@codesourcery.com>
3741
3742         PR c++/28999
3743         * decl.c (make_typename_type): If the qualified name is not a
3744         type, issue an error.
3745         * parser.c (cp_parser_elaborated_type_specifier): Fix comment
3746         formatting.
3747
3748 2007-01-08  Geoffrey Keating  <geoffk@apple.com>
3749
3750         * rtti.c: Include target.h.
3751         (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
3752         don't emit typeinfo for fundamental types as weak.
3753         * Make-lang.in (cp/rtti.o): Update and correct dependencies.
3754
3755 2007-01-08  Richard Guenther  <rguenther@suse.de>
3756
3757         * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
3758
3759 2007-01-08  Mark Shinwell  <shinwell@codesourcery.com>
3760
3761         * call.c (standard_conversion): Pass flag to
3762         vector_types_convertible_p to disallow emission of note.
3763         * typeck.c (convert_for_assignment): Pass flag to
3764         vector_types_convertible_p to allow emission of note.
3765         (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
3766         to disallow emission of note.
3767
3768 2007-01-07  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3769
3770         PR c++/28986
3771         * typeck.c (build_binary_op): Call overflow_warning if
3772         TREE_OVERFLOW_P is true for the result and not for any of the
3773         operands.
3774         
3775 2007-01-06  Lee Millward  <lee.millward@codesourcery.com>
3776
3777        PR c++/19439
3778        * class.c (add_method): Don't wait until template
3779        instantiation time to complain about duplicate methods.
3780         
3781 2007-01-05  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3782
3783         PR c/19978
3784         * semantics.c (finish_unary_op_expr): Warn only if result
3785         overflowed and operands did not.
3786
3787 2007-01-05  Ian Lance Taylor  <iant@google.com>
3788
3789         * typeck.c (build_binary_op): Warn about comparing a non-weak
3790         address to NULL.
3791
3792 2007-01-05  Douglas Gregor  <doug.gregor@gmail.com>
3793
3794         * pt.c (tsubst): Propagate the need for structural equality checks
3795         when reducing the level of template parameters.
3796
3797 2007-01-03  Kazu Hirata  <kazu@codesourcery.com>
3798
3799         * pt.c: Fix a comment typo.
3800
3801 2007-01-02  Ian Lance Taylor  <iant@google.com>
3802
3803         * semantics.c (maybe_convert_cond): Optionally warn when using an
3804         assignment as a condition.
3805         * typeck.c (convert_for_assignment): Optionally warn about
3806         assigning the result of an assignment to a bool.
3807
3808 2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>
3809
3810         * pt.c (canonical_template_parms): Correct typo in comment.
3811         
3812 2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>
3813
3814         * typeck.c (structural_comptypes): Renamed from "comptypes".
3815         (comptypes): Use canonical type information to perform fast type
3816         comparison. When VERIFY_CANONICAL_TYPES, verify that the
3817         canonical type comparison returns the same results as we would see
3818         from the current, structural check. Support COMPARE_STRUCTURAL
3819         when we need structural checks.
3820         * decl.c (typename_compare): Fix comment.
3821         (build_typename_type): TYPENAME_TYPE nodes require structural
3822         equality checks, because they resolve different based on the
3823         current class type.
3824         (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
3825         require structural equality checks (for now).
3826         (build_ptrmemfunc_type): Build the canonical pointer to member
3827         function type.
3828         (compute_array_index_type): Whenever we build a new index type
3829         to represent the size of an array in a template, we need to mark
3830         this index type as requiring structural equality. This goes for
3831         arrays with value-dependent sizes with the current ABI, or all
3832         arrays with ABI-1.
3833         * tree.c (cplus_array_hash): New.
3834         (struct cplus_array_info): New.
3835         (cplus_array_compare): New.
3836         (cplus_array_htab): New.
3837         (build_cplus_array_type_1): Use a hash table to cache the array
3838         types we build. Build the canonical array type for each array
3839         type.
3840         (cp_build_qualified_type_real): When building a cv-qualified array
3841         type, use the hash table of array types and build canonical array
3842         types as necessary.
3843         (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
3844         use structural equality (for now).
3845         * cp-tree.h (COMPARE_STRUCTURAL): New.
3846         * pt.c (canonical_template_parms): New.
3847         (canonical_type_parameter): New.
3848         (process_template_parm): Find the canonical type parameter.
3849         (lookup_template_class): When we have named the primary template
3850         type, set the canonical type for our template class to the primary
3851         template type. If any of the template arguments need structural
3852         equality checks, the template class needs structural equality
3853         checks.
3854         (tsubst): When reducing the level of a template template
3855         parameter, we require structural equality tests for the resulting
3856         parameter because its template parameters have not had their types
3857         canonicalized. When reducing a template type parameter, find the
3858         canonical reduced type parameter.
3859         (any_template_arguments_need_structural_equality_p): New.
3860