OSDN Git Service

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