OSDN Git Service

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