OSDN Git Service

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