OSDN Git Service

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