OSDN Git Service

2009-05-06 Dodji Seketeli <dodji@redhat.com>
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2009-05-06  Dodji Seketeli  <dodji@redhat.com>
2
3         PR c++/17395
4         * pt.c (tsubst_copy) <case PARM_DECL>: We don't want to tsubst the
5         whole list of PARM_DECLs, just the current one.
6
7 2009-05-05  Shujing Zhao  <pearly.zhao@oracle.com>
8
9         * cp-tree.h:
10         (opname_tab, assignop_tab, update_member_visibility, yyerror, yyhook,
11         mangle_compound_literal): Remove unused declarations.
12         (build_vfield_ref, cxx_print_statistics, clone_function_decl,
13         adjust_clone_args, maybe_push_cleanup_level, pushtag, make_anon_name,
14         pushdecl_top_level_maybe_friend, pushdecl_top_level_and_finish,
15         check_for_out_of_scope_variable, print_other_binding_stack,
16         maybe_push_decl, cxx_mark_addressable, force_target_expr,
17         build_target_expr_with_type, finish_case_label,
18         cxx_maybe_build_cleanup, begin_eh_spec_block, finish_eh_spec_block,
19         check_template_keyword, cxx_omp_predetermined_sharing,
20         cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor,
21         cxx_omp_clause_assign_op, cxx_omp_clause_dtor, cxx_omp_finish_clause,
22         cxx_omp_privatize_by_reference): Rearrange the declarations line to
23         match the comment that indicates the .c file which the functions are
24         defined.
25         (cxx_print_xnode, cxx_print_decl, cxx_print_type,
26         cxx_print_identifier, cxx_print_error_function, pushdecl): Add comment.
27
28 2009-05-05  Nathan Sidwell  <nathan@codesourcery.com>
29
30         * typeck.c (cp_build_compound_expr): Require RHS to have a known
31         type.
32         * class.c (resolve_address_of_overloaded_function): Use
33         OVL_CURRENT for error message.
34         (instantiate_type): Forbid COMPOUND_EXPRs and remove code dealing
35         with them.  Do not copy the node.
36
37 2009-05-05  Jakub Jelinek  <jakub@redhat.com>
38
39         PR c++/40013
40         * pt.c (tsubst): If magic NOP_EXPR with side-effects has no type,
41         set it from its operand's type after tsubst_expr.
42
43 2009-05-04  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
44
45         PR c++/28152
46         * parser.c (cp_lexer_get_preprocessor_token):  Do not store the
47         canonical spelling for keywords.
48         (cp_parser_attribute_list): Use the canonical spelling for
49         keywords in attributes.
50
51 2009-05-01  Joseph Myers  <joseph@codesourcery.com>
52
53         * cxx-pretty-print.c (is_destructor_name, pp_cxx_unqualified_id,
54         pp_cxx_template_keyword_if_needed, pp_cxx_postfix_expression,
55         pp_cxx_new_expression, pp_cxx_delete_expression,
56         pp_cxx_unary_expression, pp_cxx_assignment_operator,
57         pp_cxx_assignment_expression, pp_cxx_expression,
58         pp_cxx_function_specifier, pp_cxx_decl_specifier_seq,
59         pp_cxx_simple_type_specifier, pp_cxx_type_specifier_seq,
60         pp_cxx_exception_specification, pp_cxx_direct_declarator,
61         pp_cxx_ctor_initializer, pp_cxx_type_id, pp_cxx_statement,
62         pp_cxx_namespace_alias_definition, pp_cxx_template_parameter,
63         pp_cxx_canonical_template_parameter, pp_cxx_template_declaration,
64         pp_cxx_declaration, pp_cxx_typeid_expression,
65         pp_cxx_va_arg_expression, pp_cxx_offsetof_expression,
66         pp_cxx_trait_expression): Mostly use pp_string and
67         pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
68         for non-identifiers.  Mark English strings for translation.
69         * cxx-pretty-print.h (pp_cxx_ws_string): Define.
70         * error.c (dump_template_parameter, dump_template_bindings,
71         dump_type, dump_aggr_type, dump_type_prefix, dump_simple_decl,
72         dump_decl, dump_template_decl, dump_function_decl,
73         dump_parameters, dump_exception_spec, dump_template_parms,
74         dump_expr, dump_binary_op, dump_unary_op, op_to_string,
75         assop_to_string, args_to_string, cp_print_error_function,
76         print_instantiation_full_context,
77         print_instantiation_partial_context): Mostly use pp_string and
78         pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
79         for non-identifiers.  Mark English strings for translation.
80         (dump_global_iord): Mark strings for translation; use longer
81         strings instead of substituting single words.
82         (function_category): Return a format string marked for
83         translation, not a single word or phrase to substitute in a longer
84         phrase.
85
86 2009-04-28  Ben Elliston  <bje@au.ibm.com>
87
88         PR c++/35652
89         Revert:
90
91         2009-03-27  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
92
93         * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
94
95 2009-04-27  Ian Lance Taylor  <iant@google.com>
96
97         * semantics.c (finish_omp_clauses): Change type of c_kind to enum
98         omp_clause_code.
99
100 2009-04-27  Jakub Jelinek  <jakub@redhat.com>
101
102         PR c++/39875
103         * cvt.c (convert_to_void) <case INDIRECT_REF>: Only warn about
104         -Wunused-value if implicit.
105
106 2009-04-24  Ian Lance Taylor  <iant@google.com>
107
108         * call.c (build_temp): Change 0 to enum constant.
109         * cp-tree.h (cp_lvalue_kind): Typedef to int rather than enum
110         type.
111         * cp-gimplify.c (cp_gimplify_expr): Add cast to enum type.
112         * decl2.c (constrain_visibility): Likewise.
113         * parser.c (cp_lexer_get_preprocessor_token): Likewise.
114         (cp_parser_flags): Typedef to int rather than enum type.
115         (cp_parser_expression_stack_entry): Change prec field to enum
116         cp_parser_prec.
117
118         * typeck.c (build_modify_expr): Add lhs_origtype parameter.
119         Change all callers.
120
121 2009-04-22  Dodji Seketeli  <dodji@redhat.com>
122
123         PR c++/39639
124         * parser.c (cp_parser_template_argument_list): Display an error
125         when an ellipsis is not preceded by a parameter pack. Also, warn
126         about variadic templates usage without -std=c++0x.
127
128 2009-04-21  Taras Glek <tglek@mozilla.com>
129
130         * cp-tree.h: Update GTY annotations to new syntax.
131         * decl.c: Likewise.
132         * mangle.c: Likewise.
133         * name-lookup.c: Likewise.
134         * name-lookup.h: Likewise.
135         * parser.c: Likewise.
136         * pt.c: Likewise.
137         * rtti.c: Likewise.
138         * semantics.c: Likewise.
139         * typeck2.c: Likewise.
140
141 2009-04-22  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
142
143         PR c++/14875
144         * parser.c (cp_parser_error): Pass token->flags to c_parse_error.
145
146 2009-04-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
147
148         PR c++/35711
149         * typeck.c (check_for_casting_away_constness): We diagnose casting
150         away any qualifiers not just constness.
151         (casts_away_constness): Mention that it handles more than just
152         constness.
153         
154 2009-04-21  Joseph Myers  <joseph@codesourcery.com>
155
156         * ChangeLog, ChangeLog-1993, ChangeLog-1994, ChangeLog-1995,
157         ChangeLog-1996, ChangeLog-1997, ChangeLog-1998, ChangeLog-1999,
158         ChangeLog-2000, ChangeLog-2001, ChangeLog-2002, ChangeLog-2003,
159         ChangeLog-2004, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007,
160         ChangeLog-2008, ChangeLog.ptr, ChangeLog.tree-ssa, NEWS,
161         cfns.gperf: Add copyright and license notices.
162         * cfns.h: Regenerate.
163         * ChangeLog, ChangeLog-2004: Correct dates.
164
165 2009-04-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>
166
167         PR 16202
168         * tree.c (lvalue_p_1): Use const_tree.
169         Use CONST_CAST_TREE to avoid warning.
170         (lvalue_p): Returns bool, receives const_tree.
171
172 2009-04-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
173
174         PR c++/13358
175         * parser.c (cp_parser_check_decl_spec): Drop redundant flags.
176         * error.c (pedwarn_cxx98): New.
177         * cp-tree.h (pedwarn_cxx98): Declare.
178
179 2009-04-20  Le-Chun Wu  <lcwu@google.com>
180
181         PR c++/39803
182         * init.c (build_vec_init): Set TREE_NO_WARNING on the
183         compiler-generated INDIRECT_REF expression.
184
185 2009-04-20  Ian Lance Taylor  <iant@google.com>
186
187         * typeck.c (build_function_call_vec): New function.
188         (cp_build_function_call): Only pass first parameter to
189         objc_rewrite_function_call.
190         (build_modify_expr): Add rhs_origtype parameter.  Change all
191         callers.
192         * decl.c (finish_decl): Add origtype parameter.  Change all
193         callers.
194         * semantics.c (finish_call_expr): Pass VEC to
195         resolve_overloaded_builtin.
196
197 2009-04-20  Ian Lance Taylor  <iant@google.com>
198
199         * cp-tree.h (base_access): Change typedef to int.
200         * parser.c (cp_parser_omp_flush): Change 0 to OMP_CLAUSE_ERROR.
201         (cp_parser_omp_threadprivate): Likewise.
202         * pt.c (unify_pack_expansion): Add casts to enum type.
203
204 2009-04-19  Manuel López-Ibáñez  <manu@gcc.gnu.org>
205
206         PR c/32061
207         PR c++/36954
208         * call.c (build_new_op): Save the original codes of operands
209         before folding.
210
211 2009-04-18  Kazu Hirata  <kazu@codesourcery.com>
212
213         * cp-tree.h: Remove the prototype for insert_block.
214         * decl.c (insert_block): Remove.
215
216 2009-04-16  Ian Lance Taylor  <iant@google.com>
217
218         * cp-tree.h (enum tsubst_flags): Rename from enum tsubst_flags_t.
219         (tsubst_flags_t): Change typedef from enum type to int.
220
221 2009-04-16  Paolo Bonzini  <bonzini@gnu.org>
222
223         * decl.c (check_initializer): Use TYPE_VECTOR_OPAQUE
224         instead of targetm.vector_opaque_p.
225
226 2009-04-15  Le-Chun Wu  <lcwu@google.com>
227
228         PR c++/39551
229         * call.c (build_over_call): Set TREE_NO_WARNING on the
230         compiler-generated INDIRECT_REF expression.
231         * cvt.c (convert_to_void): Emit warning when stripping off
232         INDIRECT_REF.
233
234 2009-04-14  Diego Novillo  <dnovillo@google.com>
235
236         * parser.c (cp_parser_type_specifier_seq): Move call to
237         invoke_plugin_callbacks ...
238         (cp_parser_type_specifier_seq): ... here.
239
240 2009-04-14  Le-Chun Wu  <lcwu@google.com>
241
242         * Make-lang.in: Modify dependencies of files including plugin.h.
243         * decl.c (finish_function): Call invoke_plugin_callbacks.
244         * parser.c (cp_parser_type_specifier): Call invoke_plugin_callbacks.
245
246 2009-04-14  Jason Merrill  <jason@redhat.com>
247
248         PR c++/39763
249         * name-lookup.c (pushdecl_maybe_friend): Avoid all warnings
250         about shadowing by tentative parms.
251
252 2009-04-13  Jason Merrill  <jason@redhat.com>
253
254         PR c++/39480
255         * call.c (build_over_call): Don't call memcpy if the target is
256         the same as the source.
257
258 2009-04-13  Jason Merrill  <jason@redhat.com>
259
260         PR c++/39750
261         * pt.c (uses_template_parms): Handle CONSTRUCTOR.
262
263 2009-04-12  Jason Merrill  <jason@redhat.com>
264
265         PR c++/39742
266         * call.c (joust): Don't crash on variadic fn.
267
268 2009-04-10  Jason Merrill  <jason@redhat.com>
269
270         PR c++/28301
271         * parser.c (cp_parser_skip_to_end_of_block_or_statement): Return
272         if we see a close brace without an open brace.
273
274 2009-04-10  H.J. Lu  <hongjiu.lu@intel.com>
275
276         * parser.c (cp_parser_class_specifier): Remove the unused
277         has_trailing_semicolon.
278
279 2009-04-10  Manuel López-Ibáñez  <manu@gcc.gnu.org>
280
281         PR  c++/20118
282         * parser.c (cp_parser_check_template_parameters): Take a
283         cp_declarator parameter.
284         (cp_parser_elaborated_type_specifier): Update to
285         cp_parser_check_template_parameters.
286         (cp_parser_class_head): Likewise.
287         (cp_parser_check_declarator_template_parameters): Likewise.
288         (cp_parser_check_template_parameters): Handle first the non-error
289         conditions. Give more accurate diagnostics if a declarator is
290         given. 
291
292 2009-04-08  Jason Merrill  <jason@redhat.com>
293
294         PR c++/25185
295         * error.c (dump_aggr_type): Chase template typedefs if
296         -fno-pretty-templates.
297
298 2009-04-08  Dodji Seketeli  <dodji@redhat.com>
299
300         PR c++/39637
301         * parser.c (cp_parser_enumerator_definition): Make sure the
302         initializer of the enumerator doesn't contain any bare parameter pack.
303
304 2009-04-07  Jason Merrill  <jason@redhat.com>
305
306         PR c++/34691
307         * name-lookup.c (merge_functions): Keep multiple extern "C" functions.
308         * call.c (joust): Complain about mismatched default arguments
309         in extern "C" functions.
310         * class.c (resolve_address_of_overloaded_function): Handle multiple
311         extern "C" functions.
312         * pt.c (resolve_overloaded_unification): Likewise.
313
314 2009-04-07  Jason Merrill  <jason@redhat.com>
315
316         PR c++/25185
317         * error.c (dump_function_decl): Don't pretty-print templates
318         if -fno-pretty-templates.
319         (count_non_default_template_args): Print all args if
320         -fno-pretty-templates.
321
322 2009-04-06  Jason Merrill  <jason@redhat.com>
323
324         PR c++/35146
325         * pt.c (fn_type_unification): For DEDUCE_EXACT check that
326         the deduced template arguments give us the parameter types
327         we're looking for.
328
329 2009-04-05  Giovanni Bajo <giovannibajo@libero.it>
330             Jason Merrill  <jason@redhat.com>
331
332         PR c++/14912
333         * error.c (count_non_default_template_args): New fn.
334         (dump_template_parms): Call it.
335         (dump_template_argument_list): Call it.  Add parms parm.
336         (dump_template_argument): Adjust call to dump_template_argument_list.
337         (dump_type, dump_decl): Likewise.
338         (dump_template_bindings): Refactor logic.
339
340 2009-04-03  Jason Merrill  <jason@redhat.com>
341
342         PR c++/25185
343         * error.c (dump_template_bindings): Look through typedefs in
344         typename results.
345         (dump_type) [TYPENAME_TYPE]: Print the typedef name if any.
346         (find_typenames_r): Also collect typedefs.
347         * pt.c (unify): Strip typedefs.
348
349         PR c++/39608
350         * semantics.c (finish_id_expression): Don't assume a dependent
351         member of the current instantiation isn't a valid integral
352         constant expression.  Check dependent_scope_p.
353         * pt.c (dependent_scope_p): Check TYPE_P.
354         (tsubst_copy): If args is null, just return.
355
356 2009-04-02  Jason Merrill  <jason@redhat.com>
357
358         PR c++/25185
359         * error.c (find_typenames, find_typenames_r): New fns.
360         (dump_function_decl): Call find_typenames.
361         (dump_template_bindings): Print typenames as well.
362         * pt.c (tsubst): Non-static.
363         * cp-tree.h: Declare it.
364
365 2009-04-02  Dodji Seketeli  <dodji@redhat.com>
366
367         PR c++/26693
368         * decl2.c (grokfield): when a typedef appears in a
369         class, create the typedef variant type node for it.
370         (save_template_attributes): Creating typedef variant type node
371          here is now useless.
372         * decl.c (grokdeclarator): If the typedef'ed struct/class was
373         anonymous, set the proper type name to all its type variants.
374         (xref_basetypes) : Fixup the variant types after setting
375         TYPE_BINFO on REF.
376         * name-lookup.c (pushdecl_maybe_friend): Reuse the
377         set_underlying_type function to install typedef variant types.
378         * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
379         macro.
380         (append_type_to_template_for_access_check): New entry points.
381         * semantics.c (check_accessibility_of_qualified_id):
382         When a typedef that is a member of a class appears in a template,
383         add it to the template. It will be ...
384         * class.c (finish_struct_bits): Split type variant fixup into ...
385         (fixup_type_variants): A new entry point.
386         * pt.c (instantiate_class_template, instantiate_template ): ... access
387         checked at template instantiation time.
388         (resolve_type_name_type): The type name should be the name of the
389         main type variant.
390         (retrieve_specialization): Specializations of template typedefs aren't
391         to looked up in DECL_TEMPLATE_INSTANTIATIONS (tmpl).
392         (append_type_to_template_for_access_check): New entry point.
393         (tsubst_decl): For typedefs, build the variant type from the correct
394         original type.
395         (get_class_bindings): Fix function comment.
396         (perform_typedefs_access_check): New entry point.
397
398 2009-03-31  Jason Merrill  <jason@redhat.com>
399
400         PR c++/34691
401         * name-lookup.c (pushdecl_maybe_friend): Diagnose mismatched
402         extern "C" declarations.
403
404         C++ DR 613
405         * semantics.c (finish_non_static_data_member): Allow such references
406         without an associated object in sizeof/decltype/alignof.
407
408         * ptree.c (cxx_print_decl): Pretty-print full name of
409         function/template.
410         (cxx_print_type): Pretty-print full name of class.
411
412         * decl.c (grokdeclarator): Reject pointer to qualified function
413         type.
414
415         PR c++/37806, core issue 547
416         * typeck.c (cp_apply_type_quals_to_decl): Don't apply any quals
417         to a typedef.
418         * tree.c (cp_build_qualified_type_real): Don't apply restrict to a 
419         function type.
420         * decl.h (enum decl_context): Add TEMPLATE_TYPE_ARG.
421         * decl.c (groktypename): Add is_template_arg parameter.
422         (grokdeclarator): Allow function cv-quals on a template type arg.
423         * parser.c (cp_parser_new_type_id, cp_parser_type_id): Add
424         is_template_arg argument in calls to groktypename.
425         * cp-tree.h: Adjust prototype.
426         * error.c (dump_type_prefix, dump_type_suffix): Fix plain 
427         FUNCTION_TYPE printing.
428         
429         * mangle.c (write_expression): Mangle dependent name as
430         source-name.
431
432         PR c++/38030, 38850, 39070
433         * pt.c (type_dependent_expression_p_push): New fn.
434         (tsubst_copy_and_build) [CALL_EXPR]: Only do arg-dep lookup when the
435         substitution makes the call non-dependent.  Preserve koenig_p.
436         * parser.c (cp_parser_postfix_expression): Only do arg-dep lookup
437         for non-dependent calls.
438         * semantics.c (finish_call_expr): Revert earlier changes.
439         * cp-tree.h: Revert change to finish_call_expr prototype.
440
441 2009-03-29  Joseph Myers  <joseph@codesourcery.com>
442
443         PR preprocessor/34695
444         * cp-tree.h (cp_cpp_error): Remove.
445         * error.c (cp_cpp_error): Remove.
446         * parser.c (cp_lexer_new_main): Set done_lexing instead of
447         client_diagnostic and error callback.
448
449 2009-03-28  Paolo Bonzini  <bonzini@gnu.org>
450
451         * cp/cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
452         * cp/cp-objcp-common.c (cxx_staticp): Remove.
453         * cp/cp-tree.h (cxx_staticp): Remove.
454
455 2009-03-28  Jakub Jelinek  <jakub@redhat.com>
456
457         PR c++/39554
458         * parser.c (cp_parser_postfix_expression): Don't call
459         warning_if_disallowed_function_p.
460
461 2009-03-27  Jan Hubicka  <jh@suse.cz>
462
463         * except.c (choose_personality_routine): Set terminate_node to abort
464         for java exceptions.
465
466 2009-03-27  Dodji Seketeli  <dodji@redhat.com>
467             Jakub Jelinek  <jakub@redhat.com>
468
469         PR debug/37959
470         * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P): Define.
471         (cp_function_decl_explicit_p): New prototype.
472         * cp-objcp-common.c (cp_function_decl_explicit_p): New function.
473
474 2009-03-27  Andrew Pinski  <andrew_pinski@playstation.sony.com>
475
476         PR c++/38638
477         * parser.c (cp_parser_elaborated_type_specifier): If we have a
478         typename tag and don't have either a TYPE_DECL or a
479         TEMPLATE_ID_EXPR, set the type to NULL.
480
481 2009-03-27  Simon Martin  <simartin@users.sourceforge.net>
482
483         PR c++/37647
484         * decl.c (grokdeclarator): Reject [con|de]stuctors in a non-class
485         scope.
486
487 2009-03-27  Simon Martin  <simartin@users.sourceforge.net>
488
489         PR c++/29727
490         * decl.c (check_array_designated_initializer): Handle error_mark_node.
491
492 2009-03-27  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
493
494         PR c++/35652
495         * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
496
497 2009-03-26  Andrew Haley  <aph@redhat.com>
498
499         PR C++/39380
500         * decl2.c (possibly_inlined_p): If java exceptions are in use
501         don't inline a decl unless it is explicitly marked inline.
502         * lex.c: (pragma_java_exceptions): New variable.
503         (handle_pragma_java_exceptions): Set pragma_java_exceptions.
504         * cp-tree.h (pragma_java_exceptions): Declare new variable.
505
506 2009-03-24  Jason Merrill  <jason@redhat.com>
507
508         PR c++/28274
509         * name-lookup.c (pushdecl_maybe_friend): Check default args later.
510
511 2009-03-23  Jakub Jelinek  <jakub@redhat.com>
512
513         PR c/39495
514         * semantics.c (handle_omp_for_class_iterator): Swap cond operands and
515         code if iter is the second operand.
516         * parser.c (cp_parser_binary_expression): Add no_toplevel_fold_p
517         argument.  If it is set, don't build the toplevel expression with
518         build_x_binary_op, but build2.
519         (cp_parser_assignment_expression,  cp_parser_omp_for_incr): Adjust
520         callers.
521         (cp_parser_omp_for_cond): Don't assume the first operand of the
522         comparison must be decl.
523
524 2009-03-23  Jason Merrill  <jason@redhat.com>
525
526         PR c++/37729
527         * pt.c (make_fnparm_pack): Split out from...
528         (instantiate_decl): ...here.
529         (tsubst_pack_expansion): Handle being called in a late-specified
530         return type.
531
532         PR c++/39526
533         * name-lookup.c (pushdecl_maybe_friend): Don't warn about shadowing
534         a parm with a parm.
535
536 2009-03-20  Jason Merrill  <jason@redhat.com>
537
538         PR c++/28879
539         * parser.c (cp_parser_direct_declarator): In a template, wrap 
540         non-constant expression in NOP_EXPR with TREE_SIDE_EFFECTS set.
541         * pt.c (tsubst): Preserve it in a partial instantiation.
542         (dependent_type_p_r): Don't check value_dependent_expression_p.
543         * decl.c (compute_array_index_type): Don't check
544         value_dependent_expression_p if TREE_SIDE_EFFECTS.
545
546         C++ core issue 703
547         * typeck2.c (check_narrowing): Don't complain about loss of 
548         precision when converting a floating-point constant.
549
550 2009-03-19  Jakub Jelinek  <jakub@redhat.com>
551
552         PR c/39495
553         * parser.c (cp_parser_omp_for_cond): Don't check lhs if decl is NULL.
554         (cp_parser_omp_for_loop): Always use cp_parser_omp_for_cond.
555
556 2009-03-18  Jakub Jelinek  <jakub@redhat.com>
557
558         * parser.c (struct cp_token): Reorder fields for 64-bit hosts.
559         (eof_token): Adjust.
560
561 2009-03-18  H.J. Lu  <hongjiu.lu@intel.com>
562
563         PR c++/39425
564         * parser.c (cp_parser_explicit_specialization): Don't skip the
565         rest of the specialization when begin_specialization returns
566         false.
567
568 2009-03-17  Jason Merrill  <jason@redhat.com>
569
570         * decl.c (grokfndecl): Set DECL_CONTEXT on parms.
571         (duplicate_decls): Adjust DECL_CONTEXT of newdecl's parms.
572         * pt.c (check_explicit_specialization): Likewise.
573         (tsubst_copy) [PARM_DECL]: Return a dummy parm if we don't have a
574         local specialization.
575         * tree.c (cp_tree_equal) [PARM_DECL]: Check type and index, not name.
576         * decl2.c (parm_index): New fn.
577         * semantics.c (finish_decltype_type): Don't use describable_type.
578         * mangle.c (write_expression): Likewise.  Mangle ALIGNOF_EXPR.
579         Give a sorry for unsupported codes rather than crash.  Mangle
580         conversions with other than 1 operand.  New mangling for PARM_DECL.
581         * operators.def (ALIGNOF_EXPR): Mangle as "az".
582
583 2009-03-17  Jing Yu  <jingyu@google.com>
584
585         PR middle-end/39378
586         * method.c (use_thunk): Change is_thunk from crtl to cfun.
587
588 2009-03-17  Paolo Carlini  <paolo.carlini@oracle.com>
589
590         PR c++/39475
591         * semantics.c (check_trait_type): New.
592         (finish_trait_expr): Use it.
593
594 2009-03-17  Jakub Jelinek  <jakub@redhat.com>
595
596         * name-lookup.c (cp_emit_debug_info_for_using): Emit USING_STMTs
597         instead of calling imported_module_or_decl debug hook if
598         building_stmt_tree ().
599         * cp-gimplify.c (cp_gimplify_expr): Don't assert the first operand
600         is a NAMESPACE_DECL.
601
602         PR debug/37890
603         * name-lookup.c (do_namespace_alias): Don't call global_decl debug
604         hook at function scope.
605
606         PR debug/39471
607         * cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
608         on IMPORTED_DECL.
609
610 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
611
612         PR c++/39371
613         * semantics.c (finish_switch_cond): Don't call get_unwidened.
614         * decl.c (finish_case_label): Pass SWITCH_STMT_TYPE as 3rd argument
615         instead of TREE_TYPE (cond).
616
617 2009-03-08  H.J. Lu  <hongjiu.lu@intel.com>
618
619         PR c++/39060
620         * parser.c (cp_parser_late_parsing_default_args): Continue
621         the loop when cp_parser_assignment_expression returns
622         error_mark_node.
623
624 2009-03-07  Jason Merrill  <jason@redhat.com>
625
626         PR c++/39367
627         * init.c (build_new_1): Don't use a VLA type.
628         (build_vec_init): Handle getting a pointer for BASE.
629
630 2009-03-06  H.J. Lu  <hongjiu.lu@intel.com>
631
632         PR c++/37520
633         * cp-tree.h: Check NO_DOT_IN_LABEL before NO_DOLLAR_IN_LABEL
634         when mangling symbols.
635
636 2009-03-06  Paolo Carlini  <paolo.carlini@oracle.com>
637
638         PR c++/33492
639         * error.c (dump_expr): Don't try to print THROW_EXPRs in full.
640
641 2009-03-06  Alexandre Oliva  <aoliva@redhat.com>
642
643         * decl.c (record_builtin_java_type): Use canonicalized integer
644         types.
645
646 2009-03-04  Jason Merrill  <jason@redhat.com>
647
648         PR c++/38908
649         * class.c (is_really_empty_class): New fn.
650         * cp-tree.h: Declare it.
651         * cp-objcp-common.c (cp_expr_size): Use it.
652
653         PR c++/13549
654         * semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
655         * parser.c (cp_parser_postfix_expression): Call it for 
656         TEMPLATE_ID_EXPR.
657         * tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
658         (get_first_fn): Likewise.
659
660         PR c++/9634
661         PR c++/29469
662         PR c++/29607
663         Implement DR 224.
664         * decl.c (make_typename_type): Do look inside currently open classes.
665         * parser.c (cp_parser_lookup_name): Likewise.
666         (cp_parser_template_name): Likewise.
667         * pt.c (dependent_scope_p): New function.
668         * cp-tree.h: Declare it.
669         * class.c (currently_open_class): Return fast if T isn't a class.
670
671 2009-02-26  H.J. Lu  <hongjiu.lu@intel.com>
672
673         PR c++/37789
674         * parser.c (cp_parser_mem_initializer): Return error_mark_node
675         if cp_parser_mem_initializer_id returns error_mark_node.
676
677 2009-02-24  Richard Guenther  <rguenther@suse.de>
678
679         PR c++/39242
680         * pt.c (instantiate_decl): Do not instantiate extern, non-inline
681         declared functions.
682
683 2009-02-23  H.J. Lu  <hongjiu.lu@intel.com>
684
685         PR c++/36411
686         * pt.c (coerce_template_template_parms): Return 0 if parameter
687         is error_mark_node.
688
689 2009-02-23  Jason Merrill  <jason@redhat.com>
690
691         * pt.c (unify): Call maybe_adjust_types_for_deduction when
692         deducing from an initializer list.
693
694 2009-02-20  Jason Merrill  <jason@redhat.com>
695
696         PR c++/39225
697         * decl.c (grokdeclarator): Handle ~identifier.
698
699 2009-02-19  Jakub Jelinek  <jakub@redhat.com>
700
701         PR target/39175
702         * decl2.c (determine_visibility): If visibility changed and
703         DECL_RTL has been already set, call make_decl_rtl to update symbol
704         flags.
705
706 2009-02-19  H.J. Lu  <hongjiu.lu@intel.com>
707
708         PR c++/39188
709         * cp-tree.h (maybe_commonize_var): New.
710
711         * decl.c (maybe_commonize_var): Make it extern.
712
713         * decl2.c (finish_anon_union): Call maybe_commonize_var.
714
715 2009-02-18  H.J. Lu  <hongjiu.lu@intel.com>
716
717         PR c++/39219
718         * parser.c (cp_parser_enum_specifier): Apply all attributes.
719
720 2009-02-18  Jason Merrill  <jason@redhat.com>
721
722         * cfns.h: Tweak pathname for cfns.gperf.
723
724 2009-02-13  Jason Merrill  <jason@redhat.com>
725
726         PR c++/39070
727         * semantics.c (finish_call_expr): Change koenig_p parm to int.
728         If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
729         * cp-tree.h: Adjust prototype.
730         * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
731
732 2009-02-12  Jason Merrill  <jason@redhat.com>
733
734         PR c++/38950
735         * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
736
737 2009-02-11  Jason Merrill  <jason@redhat.com>
738
739         PR c++/39153
740         * decl2.c (cp_write_global_declarations): 
741         Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
742
743         PR c++/30111
744         * init.c (build_value_init_noctor): Split out from...
745         (build_value_init): ...here.
746         (expand_aggr_init_1): Handle value-initialization.
747         * cp-tree.h: Add declaration.
748         * class.c (type_has_user_provided_constructor): 
749         Handle non-class arguments.
750
751 2009-02-10  Jason Merrill  <jason@redhat.com>
752
753         PR c++/38649
754         * class.c (defaultable_fn_p): Handle ... properly.
755
756         PR c++/36744
757         * tree.c (lvalue_p_1): Condition rvalue ref handling on
758         treat_class_rvalues_as_lvalues, too.
759
760 2009-02-10  Paolo Carlini  <paolo.carlini@oracle.com>
761
762         PR c++/34397
763         * typeck.c (build_x_array_ref): New.
764         * cp-tree.h: Declare it.
765         * pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
766
767 2009-02-09  Jason Merrill  <jason@redhat.com>
768
769         PR c++/39109
770         * semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
771         * init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
772         * tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
773         * cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
774         for build_value_init TARGET_EXPR.
775         * cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
776
777 2009-02-06  Paolo Carlini  <paolo.carlini@oracle.com>
778
779         PR c++/35147
780         PR c++/37737
781         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
782
783 2009-02-04  Jakub Jelinek  <jakub@redhat.com>
784
785         PR c++/39095
786         * operators.def: Use COMPONENT_REF code for ->/pt operator again,
787         remove ./dt operator.
788         * mangle.c (write_expression): Handle COMPONENT_REF after handling
789         ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
790         write_string ("dt") instead of using operators.def.
791
792 2009-02-03  Jason Merrill  <jason@redhat.com>
793
794         * typeck.c (cp_build_unary_op): Only complain about taking address
795         of main if pedantic.
796
797 2009-02-03  Jakub Jelinek  <jakub@redhat.com>
798
799         PR inline-asm/39059
800         * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
801
802         PR c++/39056
803         * typeck2.c (digest_init_r): Don't call process_init_constructor
804         for COMPLEX_TYPE.
805
806 2009-02-03  Paolo Bonzini  <bonzini@gnu.org>
807
808         PR c++/36897
809         * pt.c (convert_nontype_argument_function): Expect expr to be an
810         ADDR_EXPR.
811
812         PR c++/37314
813         * typeck.c (merge_types): Call resolve_typename_type if only
814         one type is a typename.
815
816 2009-02-02  Jason Merrill  <jason@redhat.com>
817
818         PR c++/39054
819         * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node 
820         in BIT_NOT_EXPR.
821
822 2009-02-01  Paolo Carlini  <paolo.carlini@oracle.com>
823
824         PR c++/39053
825         * parser.c (cp_parser_pure_specifier): If there are no tokens left
826         do not call cp_lexer_consume_token.
827
828 2009-01-30  Jakub Jelinek  <jakub@redhat.com>
829
830         PR c++/39028
831         * parser.c (cp_parser_already_scoped_statement): Handle __label__
832         declarations.
833
834 2009-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
835
836         PR c++/33465
837         * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
838
839 2009-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
840
841         PR c++/38655
842         * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
843
844 2009-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
845
846         * typeck.c (invalid_nonstatic_memfn_p): Use
847         DECL_NONSTATIC_MEMBER_FUNCTION_P.
848
849 2009-01-27  Paolo Carlini  <paolo.carlini@oracle.com>
850
851         PR c++/37554
852         * call.c (build_over_call): If convert_for_arg_passing returns
853         error_mark_node unconditionally return it.
854
855 2009-01-22  Adam Nemet  <anemet@caviumnetworks.com>
856
857         * class.c (check_field_decls): Also inherit packed for bitfields
858         regardless of their type.
859
860 2009-01-22  Dodji Seketeli  <dodji@redhat.com>
861
862         PR c++/38930
863         * decl2.c (grokfield): Reverting changes of PR c++/26693
864         (save_template_attributes): Likewise.
865         * decl.c (grokdeclarator): Likewise.
866         * name-lookup.c (pushdecl_maybe_friend): Likewise.
867         * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
868         (append_type_to_template_for_access_check): Likewise.
869         * semantics.c (check_accessibility_of_qualified_id): Likewise.
870         * pt.c (instantiate_class_template, instantiate_template ): Likewise.
871         (tsubst): Likewise.
872         (resolve_type_name_type): Likewise.
873         (append_type_to_template_for_access_check): Likewise.
874
875 2009-01-21  Dodji Seketeli  <dodji@redhat.com>
876
877         PR c++/26693
878         * decl2.c (grokfield): when a typedef appears in a
879         class, create the typedef variant type node for it.
880         (save_template_attributes): Creating typedef variant type node
881          here is now useless.
882         * decl.c (grokdeclarator): If the typedef'ed struct/class was
883         anonymous, set the proper type name to all its type variants.
884         * name-lookup.c (pushdecl_maybe_friend): Reuse the
885         set_underlying_type function to install typedef variant types.
886         * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
887         macro.
888         (append_type_to_template_for_access_check): New entry points.
889         * semantics.c (check_accessibility_of_qualified_id):
890         When a typedef that is a member of a class appears in a template,
891         add it to the template. It will be ...
892         * pt.c (instantiate_class_template, instantiate_template ): ... access
893         checked at template instantiation time.
894         (tsubst): Handle the case of being called with NULL args.
895         (resolve_type_name_type): The type name should be the name of the
896         main type variant.
897         (append_type_to_template_for_access_check): New entry point.
898
899 2009-01-19  Jason Merrill  <jason@redhat.com>
900
901         PR c++/23287
902         * parser.c (cp_parser_unqualified_id): In a template,
903         accept ~identifier.
904         * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
905
906 2009-01-16  Jason Merrill  <jason@redhat.com>
907
908         PR c++/38877
909         * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
910         * init.c (build_new): Don't call describable_type unless we
911         have an auto.
912
913         PR c++/29470
914         * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
915
916         PR c++/38579
917         * search.c (protected_accessible_p): N doesn't vary.
918
919 2009-01-15  Jason Merrill  <jason@redhat.com>
920
921         PR c++/38850
922         * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
923         accept hidden friends.
924
925 2009-01-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
926
927         PR C++/29388
928         * decl.c (grokdeclarator): Check for a non namespace/class context.
929
930 2009-01-15  Jason Merrill  <jason@redhat.com>
931
932         PR c++/36334
933         PR c++/37646
934         * tree.c (lvalue_p_1): Handle BASELINK.  A COMPONENT_REF to
935         a function isn't necessarily an lvalue. Take tree, not const_tree.
936         (lvalue_p, real_lvalue_p): Take tree, not const_tree.
937         * typeck.c (lvalue_or_else): Likewise.
938         * cp-tree.h: Adjust prototypes.
939
940 2009-01-15  Steve Ellcey  <sje@cup.hp.com>
941
942         PR c++/38357
943         * pt.c (tsubst): Check for NULL args.
944
945 2009-01-15  Dodji Seketeli  <dodji@redhat.com>
946
947         PR c++/38636
948         * name-lookup.c (pushtag): Don't create members to types that are not
949         being created.
950
951 2009-01-14  Nick Clifton  <nickc@redhat.com>
952
953         PR c++/37862
954         * parser.c: Pass cp_id_kind computed in
955         cp_parser_postfix_dot_deref_expression to
956         cp_parser_primary_expression.
957
958 2009-01-13  Jakub Jelinek  <jakub@redhat.com>
959
960         PR c++/38795
961         * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
962         STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
963         as CAST_EXPR.
964
965 2009-01-12  Jason Merrill  <jason@redhat.com>
966             Steve Ellcey  <sje@cup.hp.com>
967
968         PR c++/35109
969         * name-lookup.c (lookup_name_real): Keep looking past a hidden 
970         binding.
971
972 2009-01-12  Dodji Seketeli  <dodji@redhat.com>
973
974         PR c++/36019
975         * pt.c (parameter_of_template_p): New function.
976         * cp-tree.h: Declare it.
977         * name-lookup.c (binding_to_template_parms_of_scope_p): New
978         function.
979         (outer_binding): Take template parameters in account when looking for
980         a name binding.
981
982 2009-01-12  Jason Merrill  <jason@redhat.com>
983
984         PR c++/31488
985         * tree.c (pod_type_p): Return 1 for structs created by the back end.
986
987 2009-01-12  Jakub Jelinek  <jakub@redhat.com>
988
989         PR c/32041
990         * parser.c (cp_parser_builtin_offsetof): Allow `->' in
991         offsetof member-designator, handle it as `[0].'.
992
993         PR c++/38794
994         * decl.c (start_function): If grokdeclarator hasn't returned
995         FUNCTION_DECL nor error_mark_node, issue diagnostics.
996
997 2009-01-11  Jakub Jelinek  <jakub@redhat.com>
998
999         PR c++/36254
1000         * cp-gimplify.c (genericize_if_stmt): Renamed from ...
1001         (gimplify_if_stmt): ... this.
1002         (cp_gimplify_expr): Don't handle IF_STMT here.
1003         (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
1004
1005 2009-01-10  Andrew Pinski  <pinskia@gmail.com>
1006
1007         PR c++/38648
1008         * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
1009
1010         PR c++/36695
1011         * typeck2.c (build_functional_cast): Check for reference type and NULL
1012         PARMS.
1013
1014 2009-01-09  Steve Ellcey  <sje@cup.hp.com>
1015
1016         * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
1017
1018 2009-01-09  Jakub Jelinek  <jakub@redhat.com>
1019
1020         PR c++/35335
1021         * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
1022
1023 2009-01-09  John F. Carr  <jfc@mit.edu>
1024
1025         PR c++/37877
1026         * parser.c (cp_parser_class_specifier): Clear
1027         parser->in_unbraced_linkage_specification_p while parsing class
1028         specifiers.
1029
1030 2009-01-07  Jakub Jelinek  <jakub@redhat.com>
1031
1032         PR c++/38725
1033         * semantics.c (finish_goto_stmt): Convert destination to
1034         void *.
1035
1036 2009-01-06  Jason Merrill  <jason@redhat.com>
1037
1038         PR c++/35297
1039         PR c++/35477
1040         PR c++/35784
1041         PR c++/36846
1042         PR c++/38276
1043         * pt.c (check_default_tmpl_args): Don't complain about
1044         out-of-order parameter packs in the enclosing class
1045         or parameter packs after default args.
1046         (coerce_template_parms): If we have more than one
1047         parameter pack, don't flatten argument packs.
1048         (template_args_equal): Handle argument packs.
1049         (comp_template_args): Don't flatten argument packs.
1050         (check_instantiated_arg): Split out from...
1051         (check_instantiated_args): Here.  Handle arg packs.
1052         (convert_template_argument): Just check that nontype argument
1053         packs have the right type.
1054
1055 2009-01-05  Dodji Seketeli  <dodji@redhat.com>
1056
1057         PR c++/38472
1058         * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
1059
1060 2009-01-05  Jason Merrill  <jason@redhat.com>
1061
1062         PR c++/38698
1063         * typeck2.c (process_init_constructor_union): Handle union with
1064         no fields.
1065
1066         * mangle.c (write_expression): Remove mangling for zero-operand
1067         casts.
1068
1069         PR c++/38701
1070         * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
1071         defaulting.
1072
1073         PR c++/38702
1074         * class.c (defaultable_fn_p): Only operator== can be a copy
1075         assignment operator.
1076
1077 2009-01-02  Jason Merrill  <jason@redhat.com>
1078
1079         PR c++/38698
1080         * typeck2.c (process_init_constructor_union): Handle excess
1081         initializers.
1082         (process_init_constructor_record): Likewise.
1083
1084         PR c++/38684
1085         * typeck2.c (digest_init_r): Don't use process_init_constructor
1086         for non-aggregate classes.
1087
1088 \f
1089 Copyright (C) 2009 Free Software Foundation, Inc.
1090
1091 Copying and distribution of this file, with or without modification,
1092 are permitted in any medium without royalty provided the copyright
1093 notice and this notice are preserved.