OSDN Git Service

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