OSDN Git Service

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