OSDN Git Service

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