OSDN Git Service

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