Index declspecs.locations by ds_typedef rather than ds_thread.
[official-gcc.git] / gcc / cp / ChangeLog
blobcb861cb66744dbf80a93c698e4072b44c35003cc
1 2012-11-12  Ed Smith-Rowland  <3dw4rd@verizon.net>
3         * parser.c (cp_parser_objc_class_ivars):
4         Index declspecs.locations by ds_typedef rather than ds_thread.
6 2012-11-09  Ed Smith-Rowland  <3dw4rd@verizon.net>
8         PR c++/54413
9         * decl.c (grokfndecl): Adjust calls to interpret_x_suffix.
11 2012-11-09  Jason Merrill  <jason@redhat.com>
13         PR c++/54859
14         * pt.c (check_instantiated_arg): Don't complain about dependent args.
16         * tree.c (cxx_attribute_table): Add abi_tag attribute.
17         (check_abi_tag_redeclaration, handle_abi_tag_attribute): New.
18         * class.c (find_abi_tags_r, check_abi_tags): New.
19         (check_bases, check_field_decl): Call check_abi_tags.
20         * decl.c (redeclaration_error_message): Call
21         check_abi_tag_redeclaration.
22         * mangle.c (tree_string_cmp, write_abi_tags): New.
23         (write_unqualified_name): Call write_abi_tags.
25 2012-11-07  Paolo Carlini  <paolo.carlini@oracle.com>
27         PR c++/55226
28         Revert:
29         2012-10-23  Paolo Carlini  <paolo.carlini@oracle.com>
31         PR c++/54922
32         * semantics.c (cx_check_missing_mem_inits): Handle anonymous union
33         members.
35 2012-11-07  Florian Weimer  <fweimer@redhat.com>
37         * init.c (build_new_1): Do not check for arithmetic overflow if
38         inner array size is 1.
40 2012-11-05  Sriraman Tallam  <tmsriram@google.com>
42         * class.c (add_method): Change assembler names of function versions.
43         (mark_versions_used): New static function.
44         (resolve_address_of_overloaded_function): Create dispatcher decl and
45         return address of dispatcher instead.
46         * decl.c (decls_match): Make decls unmatched for versioned
47         functions.
48         (duplicate_decls): Remove ambiguity for versioned functions.
49         Delete versioned function data for merged decls.
50         * decl2.c (check_classfn): Check attributes of versioned functions
51         for match.
52         * call.c (get_function_version_dispatcher): New function.
53         (mark_versions_used): New static function.
54         (build_over_call): Make calls to multiversioned functions
55         to call the dispatcher.
56         (joust): For calls to multi-versioned functions, make the most
57         specialized function version win.
59 2012-10-31  Lawrence Crowl  <crowl@google.com>
61         * decl2.c (var_finalized_p): Rename varpool_node to
62         varpool_node_for_decl.
63         (maybe_emit_vtables): Likewise.
65 2012-10-31  Paolo Carlini  <paolo.carlini@oracle.com>
67         PR c++/54583
68         * tree.c (build_cplus_array_type): Set TREE_NO_WARNING on the
69         TYPE_SIZE of VLAs.
71 2012-10-31  Dodji Seketeli  <dodji@redhat.com>
73         PR c++/54955
74         * parser.c (cp_nth_tokens_can_be_std_attribute_p): Recognize the
75         'Alignas' keyword as the beginning of a c++11 attribute specifier.
76         Update the comment of the function.
77         (cp_next_tokens_can_be_gnu_attribute_p): Update the comment of the
78         function.
80 2012-10-29  Jonathan Wakely  <jwakely.gcc@gmail.com>
82         PR c++/54930
83         * typeck.c (maybe_warn_about_returning_address_of_local): Use
84         OPT_Wreturn_local_addr.
86 2012-10-26  Jakub Jelinek  <jakub@redhat.com>
88         PR c++/55081
89         * typeck2.c (store_init_value): Call fold_non_dependent_expr
90         and maybe_constant_init even for C++98.
92 2012-10-26  Paolo Carlini  <paolo.carlini@oracle.com>
94         PR c++/54984
95         * init.c (build_new): Don't turn a null *init into a pointer to
96         empty vector orig_init.
98 2012-10-25  Paolo Carlini  <paolo.carlini@oracle.com>
100         PR c++/53761
101         * class.c (finish_struct_1): Reject aggregates decorated with
102         __transparent_union__ which cannot be made transparent because
103         the type of the first field has a different ABI from the class
104         overall.
106 2012-10-25  Jason Merrill  <jason@redhat.com>
108         Core 1402
109         * call.c (joust): An implicitly deleted move function is
110         worse than any non-deleted function.
111         * method.c (process_subob_fn): No special rules for move.
112         (synthesized_method_walk, implicitly_declare_fn): Likewise.
113         Warn about virtual base with non-trivial move assignment.
114         * cp-tree.h (struct lang_decl_fn): Remove suppress_implicit_decl.
115         (FNDECL_SUPPRESS_IMPLICIT_DECL): Remove.
117         * semantics.c (finish_omp_threadprivate): Call complete_type.
119         * class.c (one_inherited_ctor): Warn about variadic inherited ctor.
121 2012-10-25  Marc Glisse  <marc.glisse@inria.fr>
123         PR c++/54427
124         * typeck.c (build_x_conditional_expr): Handle VEC_COND_EXPR.
125         * call.c (build_conditional_expr_1): Likewise.
127 2012-10-25  Paolo Carlini  <paolo.carlini@oracle.com>
129         PR c++/34892
130         * parser.c (cp_parser_template_parameter): When
131         cp_parser_parameter_declaration parsed a default argument don't
132         see if *is_parameter_pack needs setting.
134 2012-10-23  Paolo Carlini  <paolo.carlini@oracle.com>
136         PR c++/54922
137         * semantics.c (cx_check_missing_mem_inits): Handle anonymous union
138         members.
140 2012-10-23  Jakub Jelinek  <jakub@redhat.com>
142         PR c++/54844
143         * pt.c (tsubst_copy, tsubst_copy_and_build) <case SIZEOF_EXPR>: Use
144         tsubst instead of tsubst_copy* on types.
146         PR c++/54988
147         * decl2.c (cplus_decl_attributes): Don't return early
148         if attributes is NULL.
150 2012-10-18  Paolo Carlini  <paolo.carlini@oracle.com>
152         PR c++/54501
153         * decl.c (reshape_init_array_1): Avoid infinite loops.
155 2012-10-15  Alexandre Oliva  <aoliva@redhat.com>
156             Paolo Carlini  <paolo.carlini@oracle.com>
158         PR c++/17805
159         * call.c (build_new_op_1): Filter out operator functions that don't
160         satisfy enum-conversion match requirements.
162 2012-10-15  Paolo Carlini  <paolo.carlini@oracle.com>
164         PR c++/50080 (again)
165         * parser.c (cp_parser_optional_template_keyword): When -pedantic
166         and C++98 mode restore pre-Core/468 behavior.
168 2012-10-15  Paolo Carlini  <paolo.carlini@oracle.com>
170         PR c++/50080
171         * parser.c (cp_parser_optional_template_keyword): Implement
172         Core/468, allow outside template.
174 2012-10-14  Jason Merrill  <jason@redhat.com>
175             Ville Voutilainen  <ville.voutilainen@gmail.com>
177         Implement C++11 inheriting constructors.
178         * cp-tree.h (cpp0x_warn_str): Add CPP0X_INHERITING_CTORS.
179         (DECL_INHERITED_CTOR_BASE, SET_DECL_INHERITED_CTOR_BASE): New.
180         (special_function_kind): Add sfk_inheriting_constructor.
181         * class.c (add_method): An inheriting ctor is hidden by a
182         user-declared one.
183         (one_inheriting_sig, one_inherited_ctor): New.
184         (add_implicitly_declared_members): Handle inheriting ctors.
185         * error.c (maybe_warn_cpp0x): Handle CPP0X_INHERITING_CTORS.
186         * init.c (emit_mem_initializers): Don't set LOOKUP_DEFAULTED
187         for an inheriting constructor.
188         * method.c (type_has_trivial_fn): Handle sfk_inheriting_constructor.
189         (type_set_nontrivial_flag): Likewise.
190         (add_one_base_init): Split out from...
191         (do_build_copy_constructor): ...here.  Handle inheriting constructors.
192         (locate_fn_flags): Handle a list of arg types.
193         (synthesized_method_walk): Handle inheriting constructors.
194         (maybe_explain_implicit_delete): Likewise.
195         (deduce_inheriting_ctor): New.
196         (implicitly_declare_fn): Handle inheriting constructors.
197         * name-lookup.c (push_class_level_binding_1): An inheriting constructor
198         does not declare the base's name.
199         (do_class_using_decl): Allow inheriting constructors.
200         * pt.c (template_parms_to_args): Split from current_template_args.
201         (add_inherited_template_parms): New.
202         (tsubst_decl): Handle inheriting constructors.
203         * tree.c (special_function_p): Handle inheriting constructors.
205 2012-10-12  Jakub Jelinek  <jakub@redhat.com>
207         PR c/54381
208         * semantics.c (finish_call_expr): Pass array of 3 sizeof_arg
209         trees and locs (corresponding to first 3 arguments) to
210         sizeof_pointer_memaccess_warning.
212 2012-10-12  Paolo Carlini  <paolo.carlini@oracle.com>
214         PR c++/24449
215         * decl.c (grokfndecl): When checking for ::main declarations
216         use PROCESSING_REAL_TEMPLATE_DECL_P().
218 2012-10-12  Marc Glisse  <marc.glisse@inria.fr>
220         PR c++/53055
221         * call.c (build_new_op_1): Pass RO_ARROW_STAR to cp_build_indirect_ref.
222         * typeck.c (cp_build_indirect_ref): Handle RO_ARROW_STAR.
224 2012-10-11  Jason Merrill  <jason@redhat.com>
226         * cp-tree.h (DECL_THUNKS): NULL_TREE for non-virtual functions.
227         (SET_DECL_THUNKS): New.
228         * decl.c (duplicate_decls): Adjust.
229         * method.c (make_thunk): Adjust.
231         * decl.c (grokdeclarator): Set DECL_GNU_TLS_P for static data
232         members, too.
234 2012-10-09  Dodji Seketeli  <dodji@redhat.com>
236         PR c++/53540 - using fails to be equivalent to typedef
237         * cp-tree.h (TYPE_TEMPLATE_INFO): For an alias that is not an
238         instance of alias template, don't look for its TEMPLATE_INFO in
239         its declaration.
240         (alias_template_specialization_p): Take const_tree.
241         * pt.c (alias_template_specialization_p): Take a const_tree.
242         Don't call primary_template_instantiation_p.
243         (primary_template_instantiation_p): Call
244         alias_template_specialization_p.
246 2012-10-10  Dodji Seketeli  <dodji@redhat.com>
248         * parser (cp_parser_statement): Parse c++11 attributes
249         tentatively.
250         (cp_parser_std_attribute_spec_seq): Do not warn too early about
251         using c++11 attributes in non c++11 mode.
253 2012-10-10  Dehao Chen  <dehao@google.com>
255         * cp-gimplify.c (cp_genericize_r): Set location for TRY expr.
257 2012-10-09  Lawrence Crowl  <crowl@google.com>
259         * Make-lang.in (class.o): Add dependence on hash-table.h.
260         (tree.o): Likewise.
261         (semantics.o): Likewise.
262         * class.c (fixed_type_or_null): Change to new type-safe hash table.
263         * tree.c (verify_stmt_tree): Likewise.
264         (verify_stmt_tree_r): Likewise.
265         * semantics.c (struct nrv_data): Likewise.
267 2012-10-09  Paolo Carlini  <paolo.carlini@oracle.com>
269         PR c++/54194
270         * typeck.c (build_x_binary_op): Update warn_about_parentheses call.
271         * parser.c (cp_parser_binary_expression): Use SET_EXPR_LOCATION
272         on current.lhs.
274 2012-10-09  Marc Glisse  <marc.glisse@inria.fr>
276         PR c++/54427
277         * typeck.c (cp_build_binary_op): Handle mixed scalar-vector
278         operations.
279         [LSHIFT_EXPR, RSHIFT_EXPR]: Likewise.
281 2012-10-08  Jakub Jelinek  <jakub@redhat.com>
283         PR c++/54858
284         * tree.c (cp_tree_equal): Handle FIELD_DECL.
286 2012-10-08  Jason Merrill  <jason@redhat.com>
288         Allow dynamic initialization of thread_locals.
289         * decl.c: Define tls_aggregates.
290         (expand_static_init): Remove sorry.  Add to tls_aggregates.
291         * cp-tree.h: Declare tls_aggregates.
292         * call.c (set_up_extended_ref_temp): Add to tls_aggregates.
293         * decl2.c (var_needs_tls_wrapper): New.
294         (var_defined_without_dynamic_init): New.
295         (get_tls_init_fn, get_tls_wrapper_fn): New.
296         (generate_tls_wrapper, handle_tls_init): New.
297         (cp_write_global_declarations): Call handle_tls_init and
298         enerate_tls_wrapper.
299         * mangle.c (write_guarded_var_name): Split out from..
300         (mangle_guard_variable): ...here.
301         (mangle_tls_init_fn, mangle_tls_wrapper_fn): Use it.
302         (decl_tls_wrapper_p): New.
303         * semantics.c (finish_id_expression): Replace use of thread_local
304         variable with a call to its wrapper.
306         * decl.c (get_thread_atexit_node): New.
307         (register_dtor_fn): Use it for TLS.
309         Partial implementation of C++11 thread_local.
310         * decl.c (cp_finish_decl): Remove errors about non-trivial
311         initialization and destruction of TLS variables.
312         (register_dtor_fn): Add sorry about TLS variables.
313         (expand_static_init): Add sorry about non-local TLS variables,
314         or error with __thread.
315         Don't emit thread-safety guards for local TLS variables.
316         (grokdeclarator): thread_local in a function implies static.
317         * decl.h: Adjust prototype.
318         * decl2.c (get_guard): Copy DECL_TLS_MODEL.
319         * parser.c (cp_parser_set_storage_class, cp_parser_set_decl_spec_type)
320         (set_and_check_decl_spec_loc): Take the token rather than the location.
321         Distinguish between __thread and thread_local.
322         (cp_parser_set_storage_class): Don't complain about thread_local before
323         extern/static.
324         (token_is__thread): New.
325         * call.c (make_temporary_var_for_ref_to_temp): Handle TLS.
326         * cp-tree.h (DECL_GNU_TLS_P): New.
327         (cp_decl_specifier_seq): Add gnu_thread_keyword_p.
329 2012-10-08  Dodji Seketeli  <dodji@redhat.com>
331         PR c++/53528 C++11 attribute support
332         * cp-tree.h (enum cpp0x_warn_str::CPP0X_ATTRIBUTES): New member.
333         (enum cp_decl_spec::ds_std_attribute): New enumerator.
334         (struct cp_decl_specifier_seq::std_attributes): New field.
335         (cxx_alignas_expr, warn_misplaced_attr_for_class_type): Declare
336         new functions.
337         (check_tag_decl): Take an extra parameter for explicit
338         instantiations.
339         * decl.c (warn_misplaced_attr_for_class_type): Extract from ...
340         (check_tag_decl): ... here.  Add check for c++11 attributes being
341         applied to an explicit instantiation.  Take an extra parameter for
342         explicit instantiations.
343         (grokdeclarator): Make sure a c++11 attribute after an array
344         declarator appertains to the array, an attribute after a function
345         declarator appertains to the function type, an attribute after a
346         declarator-id appertains to the entity being declared, and an
347         attribute after a pointer declarator appertain to the pointer.
348         * decl2.c (is_late_template_attribute): Use get_attribute_name.
349         * error.c (maybe_warn_cpp0x): Support
350         CPP0X_GENERALIZED_ATTRIBUTES.
351         * parser.c (cp_next_tokens_can_be_attribute_p)
352         (cp_next_tokens_can_be_gnu_attribute_p)
353         (cp_next_tokens_can_be_std_attribute_p)
354         (cp_nth_tokens_can_be_attribute_p)
355         (cp_nth_tokens_can_be_gnu_attribute_p)
356         (cp_nth_tokens_can_be_std_attribute_p)
357         (cp_parser_gnu_attribute_list, cp_parser_std_attribute)
358         (cp_parser_std_attribute_spec, cp_parser_std_attribute_spec_seq)
359         (cp_parser_attributes_opt, cp_parser_std_attribute_list): New
360         static functions.
361         (cp_parser_gnu_attributes_opt): Replace cp_parser_attributes_opt.
362         (cp_parser_gnu_attribute_list): Replace cp_parser_attribute_list.
363         (cp_parser_postfix_expression): Disallow "[[" tokens here.
364         (cp_parser_label_for_labeled_statement): Use take an extra
365         parameter for attributes.
366         (cp_parser_block_declaration): Use
367         cp_nth_tokens_can_be_std_attribute_p here.
368         (cp_parser_decl_specifier_seq): Likewise.  Store C++11 attributes
369         that appears in in decl specifiers in cp_decl_specifier_seq::std_attributes.
370         declaration.  Emit proper warning about misplaced c++11 attributes
371         for class type.
372         (cp_parser_explicit_instantiation): Adjust call to check_tag_decl.
373         (cp_parser_init_declarator):  Parsing attributes here is no more a
374         GNU extension in c++-11.
375         (cp_parser_type_specifier_seq): Use
376         cp_next_tokens_can_be_attribute_p.
377         (cp_parser_direct_declarator): Likewise.  Hang c++11 attributes
378         following the declarator to its syntactic construct.  It'll later
379         be applied to the proper appertaining entity by grokdeclarator.
380         (cp_parser_ptr_operator): Likewise.
381         (make_declarator): Initialize cp_declarator::std_attribute.
382         (make_pointer_declarator, make_reference_declarator)
383         (make_ptrmem_declarator, cp_parser_make_indirect_declarator): Take
384         attributes that appertain to the pointer/reference in argument.
385         (cp_parser_ptr_operator): Take an out parameter for c++11
386         attributes.  Update comments.
387         (cp_parser_new_declarator_opt)
388         (cp_parser_conversion_declarator_opt): Adjust.
389         (cp_parser_declarator): Likewise.  Handle C++11 attributes.
390         Rename attributes to gnu_attribute for better legibility.
391         (cp_parser_simple_declaration): Update comment.
392         (cp_parser_class_specifier_1): Parse GNU attributes specifically
393         (cp_parser_enum_specifier): Accept only gnu attributes after the
394         specifier.
395         (cp_parser_member_declaration): Don't clear attributes -- intended
396         for the entity being declared -- too early because check_tag_decl
397         needs them.
398         (cp_parser_statement): Update comment.  Parse optional c++11
399         attributes at the beginning of the relevant kind of statements and
400         ignore them, for now, unless when calling
401         cp_parser_label_for_labeled_statement.
402         (cp_parser_label_for_labeled_statement): Take c++11 attributes
403         in parameter.
404         * semantics.c (potential_constant_expression_1): Likewise.
405         * typeck.c (fundamental_alignment_p, cxx_alignas_expr): New public
406         functions.
408 2012-10-07  Paolo Carlini  <paolo.carlini@oracle.com>
410         * pt.c (fold_non_dependent_expr_sfinae): Remove static specifier.
411         (tsubst_copy_and_build): Use get_target_expr_sfinae.
412         * call.c (build_conditional_expr_1, convert_like_real): Likewise.
413         * cvt.c (build_up_reference): Likewise.
414         (ocp_convert): Use abstract_virtuals_error_sfinae.
415         (build_up_reference): Propagate complain to cp_build_addr_expr.
416         * decl.c (compute_array_index_type): Use fold_non_dependent_expr_sfinae.
417         * cp-tree.h: Update declarations.
419         * cvt.c (build_expr_type_conversion): Tidy.
421         * tree.c (stabilize_aggr_init): Change to static.
423 2012-10-07  Paolo Carlini  <paolo.carlini@oracle.com>
425         PR c++/51422
426         * semantics.c (is_normal_capture_proxy): Return true for
427         error_mark_node as DECL_VALUE_EXPR.
429 2012-10-05  Jakub Jelinek  <jakub@redhat.com>
431         * cp-tree.h (SIZEOF_EXPR_TYPE_P): Define.
432         * tree.c (cp_tree_equal): Handle SIZEOF_EXPR with
433         SIZEOF_EXPR_TYPE_P.
434         * mangle.c (write_expression): Likewise.
435         * cxx-pretty-print.c (pp_cxx_unary_expression): Likewise.
436         * error.c (dump_expr): Likewise.
437         * parser.c (cp_parser_unary_expression): For sizeof call
438         cxx_sizeof_or_alignof_{type,expr} just for diagnostics and
439         return SIZEOF_EXPR with the operand.
440         * pt.c (tsubst_copy, tsubst_copy_and_build): For SIZEOF_EXPR,
441         call cxx_sizeof_or_alignof_{type,expr} for diagnostics, but
442         return SIZEOF_EXPR with tsubsted operand.
443         (value_dependent_expression_p): Handle SIZEOF_EXPR with
444         SIZEOF_EXPR_TYPE_P.
445         (instantiation_dependent_r): Likewise.
446         * call.c (null_ptr_cst_p): Call maybe_constant_value for C++98.
447         * semantics.c (finish_call_expr): Call
448         sizeof_pointer_memaccess_warning if needed.
449         (cxx_eval_constant_expression): Handle SIZEOF_EXPR.
450         (potential_constant_expression_1): Remove early exit for
451         C++98.  Handle PROPERTY_REF.
452         * decl.c (duplicate_decls): When redeclaring a builtin function,
453         keep the merged decl builtin also if newdecl is a gnu_inline
454         inline definition.
455         (fold_sizeof_expr_r): New function.
456         (compute_array_index_type): Fold SIZEOF_EXPRs in itype.
457         * cp-gimplify.c (cp_genericize_r): Fold SIZEOF_EXPR.
458         * typeck.c (cp_build_binary_op): For warn_for_sign_compare
459         try harder using maybe_constant_value to get INTEGER_CSTs.
461         * decl.c (stabilize_vla_size): Call pointer_set_destroy
462         at the end.
464 2012-10-04  Arnaud Charlet  <charlet@adacore.com>
465         
466         * decl2.c (cp_write_global_declarations): Fix handling of
467         -fdump-ada-spec*.
469 2012-10-03  Jakub Jelinek  <jakub@redhat.com>
471         PR c++/54777
472         * semantics.c (cxx_eval_constant_expression) <case COMPOUND_EXPR>: If
473         not ignoring the second operand, pass the original second operand
474         and not one with stripped nops to cxx_eval_constant_expression.
476 2012-10-01  Jason Merrill  <jason@redhat.com>
478         * decl.c (check_initializer): Set DECL_NONTRIVIALLY_INITIALIZED_P
479         for a constructor call.
480         (decl_jump_unsafe): So don't bother checking
481         type_has_nontrivial_default_init.
482         * call.c (set_up_extended_ref_temp): Set
483         DECL_NONTRIVIALLY_INITIALIZED_P.
485         * cp-tree.h (TYPE_FUNCTION_OR_TEMPLATE_DECL_CHECK): New.
486         (DECL_FRIEND_P, DECL_ANTICIPATED): Use it.
487         (TYPE_FUNCTION_OR_TEMPLATE_DECL_P): New.
488         * name-lookup.c (hidden_name_p): Use it.
490         * cp-tree.h (DECL_PRETTY_FUNCTION_P): Just look at the name.
491         * decl.c (cp_make_fname_decl): Adjust.
493 2012-09-30  Sharad Singhai  <singhai@google.com>
495         * decl2.c (cp_write_global_declarations): Use a different method
496         to determine if the dump has ben initialized.
498 2012-09-29  Paolo Carlini  <paolo.carlini@oracle.com>
500         PR c++/54738
501         * decl2.c (build_offset_ref_call_from_tree): Add tsubst_flags_t
502         parameter.
503         * pt.c (tsubst_copy_and_build): Adjust.
504         * parser.c (cp_parser_postfix_expression): Likewise.
505         * cp-tree.h: Adjust declaration.
507 2012-09-28  Dodji Seketeli  <dodji@redhat.com>
509         PR c++/54372 - unused attribute inactive on dependant entities
510         * decl2.c (is_late_template_attribute): "unused" attribute is to
511         be applied at compile time.
513 2012-09-25  Dodji Seketeli  <dodji@redhat.com>
515         PR c++/29028 - Missed unused warning on using declaration
516         * decl.c (poplevel<warn_unused*>): Do not forget that some local
517         bindings are represented by a TREE_LIST.
519 2012-09-25  Dodji Seketeli  <dodji@redhat.com>
521         PR c++/53551 - -Wunused-local-typedefs misses uses
522         * decl.c (make_typename_type): Record the use of typedefs.
524 2012-09-27  Jakub Jelinek  <jakub@redhat.com>
526         * init.c (build_new_1): Don't test TREE_CONSTANT
527         of INTEGER_CST.
529 2012-09-25  Paolo Carlini  <paolo.carlini@oracle.com>
531         PR c++/54526
532         * parser.c (cp_parser_template_id): In C++11 mode simply accept
533         X<::A>.
535 2012-09-25  Zhenqiang Chen <zhenqiang.chen@linaro.org>
537         PR c++/50970
538         * typeck.c (cp_build_binary_op): Check side effects before generating
539         pfn and delta related expressions.
541 2012-09-24  Lawrence Crowl  <crowl@google.com>
543         * init.c (build_new_1): Change to new double_int API.
544         * decl.c (build_enumerator): Likewise.
545         * typeck2.c (process_init_constructor_array): Likewise.
546         * mangle.c (write_array_type): Likewise.
548 2012-09-24  Paolo Carlini  <paolo.carlini@oracle.com>
550         PR c++/50828
551         * error.c (dump_function_decl): Strip TFF_TEMPLATE_NAME from flags
552         at the outset.
554 2012-09-24  Jason Merrill  <jason@redhat.com>
556         * decl.c (get_atexit_node): Remove dead code.
558         * Make-lang.in (cp/parser.o): Depend on decl.h.
560 2012-09-20  Paolo Carlini  <paolo.carlini@oracle.com>
562         PR c++/52432
563         * pt.c (tsubst_copy_and_build): If tf_error is not set in the complain
564         argument don't call unqualified_name_lookup_error.
566 2012-09-19  Marc Glisse  <marc.glisse@inria.fr>
568         PR c++/54581
569         * semantics.c (finish_decltype_type): Make vectors not opaque.
571 2012-09-17  Jason Merrill  <jason@redhat.com>
573         PR c++/54575
574         * pt.c (instantiate_alias_template): New.
575         (tsubst): Use it.
576         (push_access_scope): Allow TYPE_DECL.
578 2012-09-14  Jason Merrill  <jason@redhat.com>
580         PR c++/53661
581         * typeck2.c (check_narrowing): Avoid false positives on conversion
582         from enumeral type.
584 2012-09-14  Marc Glisse  <marc.glisse@inria.fr>
586         PR c++/54427
587         * typeck.c (cp_build_binary_op) [LSHIFT_EXPR, RSHIFT_EXPR, EQ_EXPR,
588         NE_EXPR, LE_EXPR, GE_EXPR, LT_EXPR, GT_EXPR]: Handle VECTOR_TYPE.
590 2012-09-14  Paolo Carlini  <paolo.carlini@oracle.com>
592         * decl.c (make_typename_type): Only error out if tf_error is set
593         in complain.
595 2012-09-13  Paolo Carlini  <paolo.carlini@oracle.com>
596             Manuel LĂłpez-Ibåñez  <manu@gcc.gnu.org>
598         PR c++/53210
599         * init.c (perform_member_init): Use OPT_Winit_self instead of
600         OPT_Wuninitialized.
602 2012-09-13  Paolo Carlini  <paolo.carlini@oracle.com>
604         * typeck.c (build_indirect_ref, build_function_call,
605         build_function_call_vec, build_binary_op, build_unary_op,
606         build_compound_expr, build_c_cast, build_modify_expr): Remove
607         uses of ATTRIBUTE_UNUSED on the parameters.
608         * class.c (set_linkage_according_to_type, resort_type_method_vec,
609         dfs_find_final_overrider_post, empty_base_at_nonzero_offset_p):
610         Likewise.
611         * decl.c (local_variable_p_walkfn): Likewise.
612         * except.c (wrap_cleanups_r, check_noexcept_r): Likewise.
613         * error.c (find_typenames_r): Likewise.
614         * tree.c (verify_stmt_tree_r, bot_replace,
615         handle_java_interface_attribute, handle_com_interface_attribute,
616         handle_init_priority_attribute, c_register_addr_space): Likewise.
617         * cp-gimplify.c (cxx_omp_clause_default_ctor): Likewise.
618         * cp-lang.c (objcp_tsubst_copy_and_build): Likewise.
619         * pt.c (unify_success, unify_invalid, instantiation_dependent_r):
620         Likewise.
621         * semantics.c (dfs_calculate_bases_pre): Likewise.
622         * decl2.c (fix_temporary_vars_context_r, clear_decl_external):
623         Likewise.
624         * parser.c (cp_lexer_token_at, cp_parser_omp_clause_mergeable,
625         cp_parser_omp_clause_nowait, cp_parser_omp_clause_ordered,
626         cp_parser_omp_clause_untied): Likewise.
627         * mangle.c (write_unnamed_type_name,
628         discriminator_for_string_literal): Likewise.
629         * search.c (dfs_accessible_post, dfs_debug_mark): Likewise.
630         * lex.c (handle_pragma_vtable, handle_pragma_unit,
631         handle_pragma_interface, handle_pragma_implementation,
632         handle_pragma_java_exceptions): Likewise.
634 2012-09-13  Jason Merrill  <jason@redhat.com>
636         PR c++/53839
637         * semantics.c (cxx_eval_indirect_ref): If we aren't looking for an
638         address, make sure the value is constant.
640         PR c++/54511
641         * pt.c (tsubst_decl) [VAR_DECL]: Handle DECL_ANON_UNION_VAR_P.
643         PR c++/53836
644         * pt.c (value_dependent_expression_p): A TREE_LIST initializer must
645         be dependent.
647 2012-09-10  Paolo Carlini  <paolo.carlini@oracle.com>
649         PR c++/54541
650         PR c++/54542
651         * call.c (build_cxx_call): Add tsubst_flags_t parameter, use
652         require_complete_type_sfinae.
653         (build_op_delete_call, build_over_call): Adjust.
654         * typeck.c (build_x_compound_expr_from_vec): Add tsubst_flags_t
655         parameter.
656         (cp_build_function_call_vec): Adjust.
657         * init.c (build_new_1): Likewise.
658         * rtti.c (throw_bad_cast, throw_bad_typeid, build_dynamic_cast_1):
659         Likewise.
660         * optimize.c (build_delete_destructor_body): Likewise.
661         * cp-tree.h: Adjust declarations.
663         * call.c (convert_arg_to_ellipsis): Use require_complete_type_sfinae.
665 2012-09-10  Jason Merrill  <jason@redhat.com>
667         PR c++/54538
668         PR c++/53783
669         * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Go back to using RECUR
670         for LAMBDA_EXPR_EXTRA_SCOPE except for function scope.
672         PR c++/54506
673         * decl.c (move_signature_fn_p): Split out from move_fn_p.
674         * method.c (process_subob_fn): Use it.
675         * cp-tree.h: Declare it.
677 2012-09-07  Jason Merrill  <jason@redhat.com>
679         * semantics.c (sort_constexpr_mem_initializers): Tweak.
681 2012-09-09  Mark Kettenis  <kettenis@openbsd.org>
683         * decl.c (reshape_init_class): Avoid dereferencing a
684         past-the-end pointer.
686 2012-09-07  Paolo Carlini  <paolo.carlini@oracle.com>
688         * pt.c (num_template_headers_for_class): Rework per the code
689         inline in cp_parser_check_declarator_template_parameters.
690         * parser.c (cp_parser_check_declarator_template_parameters):
691         Use num_template_headers_for_class.
693 2012-09-06  Jason Merrill  <jason@redhat.com>
695         PR c++/54341
696         PR c++/54253
697         * semantics.c (sort_constexpr_mem_initializers): New.
698         (build_constexpr_constructor_member_initializers): Use it.
699         (cx_check_missing_mem_inits): Skip artificial fields.
700         * init.c (expand_aggr_init_1): Don't zero out a class
701         with no data.
703 2012-09-05  Paolo Carlini  <paolo.carlini@oracle.com>
705         PR c++/54191
706         * search.c (lookup_base): Add tsubst_flags_t parameter.
707         (adjust_result_of_qualified_name_lookup, check_final_overrider):
708         Adjust.
709         * name-lookup.c (do_class_using_decl): Adjust.
710         * typeck2.c (binfo_or_else, build_scoped_ref, build_m_component_ref):
711         Likewise.
712         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
713         build_up_reference): Likewise.
714         * rtti.c (build_dynamic_cast_1): Likewise.
715         * tree.c (maybe_dummy_object): Likewise.
716         * call.c (build_conditional_expr_1, build_over_call): Likewise.
717         * cp-tree.h (UNIQUELY_DERIVED_FROM_P, PUBLICLY_UNIQUELY_DERIVED_P):
718         Remove.
719         (enum base_access_flags, ba_quiet): Remove.
720         (uniquely_derived_from_p, publicly_uniquely_derived_p): Declare.
721         * except.c (can_convert_eh): Adjust.
722         * decl.c (grokdeclarator): Likewise.
723         * typeck.c (comp_except_types, build_class_member_access_expr,
724         finish_class_member_access_expr, get_member_function_from_ptrfunc,
725         build_static_cast_1, get_delta_difference_1): Likewise.
726         * class.c (build_base_path, convert_to_base, build_vtbl_ref_1,
727         warn_about_ambiguous_bases): Likewise.
728         (uniquely_derived_from_p, publicly_uniquely_derived_p): Define.
730 2012-09-04  Jason Merrill  <jason@redhat.com>
732         PR c++/54441
733         * decl.c (reshape_init_class): Handle invalid initializer for
734         0-length array member.
736         * error.c (dump_type_suffix): Correct handling of 0-length arrays.
738         PR c++/54420
739         * cp-tree.h (LAMBDANAME_P): Remove.
740         (LAMBDA_TYPE_P): Check CLASSTYPE_LAMBDA_EXPR instead.
741         * cp-lang.c (cxx_dwarf_name): Likewise.
742         * error.c (dump_aggr_type): Likewise.
743         * semantics.c (begin_lambda_type): Set CLASSTYPE_LAMBDA_EXPR sooner.
745         PR c++/54198
746         * decl.c (check_default_argument): Set cp_unevaluated_operand
747         around call to perform_implicit_conversion_flags.
749         PR c++/54437
750         PR c++/51213
751         * pt.c (fn_type_unification): Call coerce_template_parms before
752         entering substitution context.
754 2012-08-31  Paolo Carlini  <paolo.carlini@oracle.com>
755             Jason Merrill  <jason@redhat.com>
757         PR c++/18747
758         * pt.c (check_template_variable): New.
759         (num_template_headers_for_class): Split out...
760         * decl.c (grokdeclarator): ...from here.
761         (start_decl): Remove redundant diagnostic.
762         * cp-tree.h: Declare them
763         * parser.c (cp_parser_single_declaration): Call check_template_variable.
765 2012-08-31  Ollie Wild  <aaw@google.com>
767         PR c++/54197
768         * call.c (extend_ref_init_temps_1): Handle COMPOUND_EXPR trees.
770 2012-08-30  Jason Merrill  <jason@redhat.com>
772         PR c++/50545
773         PR c++/51222
774         * pt.c (instantiation_dependent_r): New.
775         (instantiation_dependent_expression_p): New.
776         (value_dependent_expression_p): Use it.  SCOPE_REF is always dependent.
777         * semantics.c (finish_decltype_type): Use it.
778         * cp-tree.h: Declare it.
780         * semantics.c (finish_qualified_id_expr): Handle building up a
781         non-dependent SCOPE_REF here.
782         (finish_id_expression): Not here.
783         * error.c (dump_decl) [SCOPE_REF]: Only pass TFF_UNQUALIFIED_NAME.
785         * friend.c (make_friend_class): Handle template template parameters.
786         * parser.c (cp_parser_template_declaration_after_export): Likewise.
787         * pt.c (tsubst_friend_class): Likewise.
788         (instantiate_class_template_1): Likewise
789         * decl.c (check_elaborated_type_specifier): Likewise.
790         (lookup_and_check_tag): Likewise.
792         * pt.c (get_class_bindings): Call coerce_template_parms.  Add
793         main_tmpl parameter.
794         (more_specialized_class): Add main_tmpl parameter.
795         (most_specialized_class): Adjust calls.
797         * decl.c (cp_finish_decl): Check for invalid multiple initializers
798         even if the initializer is dependent.
800         * pt.c (instantiate_template_1): Keep processing_template_decl set
801         if there are dependent args.
803 2012-08-25  Paolo Carlini  <paolo.carlini@oracle.com>
805         PR c++/51421
806         * decl2.c (mark_used): Consistently return false after errors
807         about uses before deduction of auto.
808         * semantics.c (finish_id_expression): Check mark_used return
809         value and return error_mark_node in case of failure.
811 2012-08-24  Jason Merrill  <jason@redhat.com>
813         PR c++/51213 (again)
814         * pt.c (deduction_tsubst_fntype): Remove.
815         (fn_type_unification): Check deduction depth and call
816         instantiate_template here.  Handle default argument access checks.
817         (determine_specialization): Suppress access control.
818         (tsubst_decl): Check for excessive deduction depth.
819         (recheck_decl_substitution): Make sure access control is on.
820         (type_unification_real): Don't mess with access deferring here.
821         (get_bindings): Adjust for fn_type_unification return type.
822         * call.c (enum rejection_reason_code): Drop rr_template_instantiation.
823         (template_instantiation_rejection): Remove.
824         (struct rejection_reason): Change targs to num_targs.
825         (template_unification_rejection, print_z_candidate): Adjust.
826         (add_template_candidate_real): Adjust for fn_type_unification change.
827         * class.c (resolve_address_of_overloaded_function): Likewise.
828         * cp-tree.h: Adjust declaration.
830         * pt.c (tsubst_default_argument): Indicate where the default
831         argument is being instantiated for.
832         (tsubst_expr): Restore previous location.
833         (tsubst_copy_and_build): Set and restore location.
834         * call.c (build_new_method_call_1): Remember location of call.
835         * semantics.c (finish_call_expr): Here too.
836         * parser.c (cp_parser_omp_for_loop): Remember the location of the
837         increment expression.
839         * pt.c (resolve_overloaded_unification): Use coerce_template_parms
840         instead of get_bindings.
841         (resolve_nondeduced_context): Likewise.
843         * pt.c (register_specialization): Correct argument to
844         check_specialization_namespace.
845         (determine_specialization): Don't consider members of
846         unspecialized types.
848 2012-08-23  Jason Merrill  <jason@redhat.com>
850         * decl.c (compute_array_index_type): Use type_dependent_expression_p.
852 2012-08-23  Paolo Carlini  <paolo.carlini@oracle.com>
854         PR c++/20420
855         * name-lookup.c (supplement_binding_1): Handle specially enums
856         only in class templates.
857         (validate_nonmember_using_decl): Enforce 7.3.3/10 about duplicate
858         using declarations at function scope.
860 2012-08-21  Richard Guenther  <rguenther@suse.de>
862         * cp-tree.h (TREE_INDIRECT_USING): Use TREE_LANG_FLAG_0 accessor.
863         (ATTR_IS_DEPENDENT): Likewise.
864         (ARGUMENT_PACK_INCOMPLETE_P): Use TREE_ADDRESSABLE instead of
865         TREE_LANG_FLAG_0 on TREE_VECs.
867 2012-08-20  Florian Weimer  <fweimer@redhat.com>
869         PR c++/19351
870         * call.c (build_operator_new_call): Add size_check argument and
871         evaluate it.
872         * cp-tree.h (build_operator_new_call): Adjust declaration.
873         * init.c (build_new_1): Compute array size check and apply it.
875 2012-08-20  Paolo Carlini  <paolo.carlini@oracle.com>
877         PR c++/10416
878         * decl.c (poplevel): Check TYPE_HAS_NONTRIVIAL_DESTRUCTOR for
879         Wunused_variable too.
881 2012-08-20  Diego Novillo  <dnovillo@google.com>
883         * decl.c (poplevel): Start TV_NAME_LOOKUP conditionally.
885 2012-08-20  Richard Guenther  <rguenther@suse.de>
887         * name-lookup.c (store_binding_p): New predicate, split out from ...
888         (store_binding): ... here.  Always store binding and require
889         target vector with enough space.
890         (store_bindings): Collect to store bindings and reserve space
891         for them, then store them.
892         (store_class_bindings): Likewise.
894 2012-08-19  Mikael Morin  <mikael@gcc.gnu.org>
896         * Make-lang.in: Fix typo.
898 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
900         * cp-tree.def (SIZEOF_EXPR): Move to c-common.def.
902 2012-08-14   Diego Novillo  <dnovillo@google.com>
904         Merge from cxx-conversion branch.  Re-write VEC in C++.
906         * call.c (add_function_candidate): Remove const qualifier
907         from call to VEC_index.
909 2012-08-10  Richard Guenther  <rguenther@suse.de>
911         * error.c (dump_expr): Handle anonymous SSA names.
913 2012-08-07  Steven Bosscher  <steven@gcc.gnu.org>
915         * error.c (print_instantiation_context): Pretty-print a newline before
916         diagnostic_flush_buffer.
917         * cxx-pretty-print.c (pp_cxx_function_definition): Use
918         pp_newline_and_flush instead of separate pp_newline and pp_flush.
920 2012-08-06  Dodji Seketeli  <dodji@redhat.com>
922         Avoid crashing on erroneous static_assert usage
923         * semantics.c (finish_static_assert): Don't crash on erroneous
924         message or condition.
926 2012-08-06  Marc Glisse  <marc.glisse@inria.fr>
927             Paolo Carlini  <paolo.carlini@oracle.com>
929         PR c++/54165
930         * typeck.c (build_static_cast_1): Move the conversion to void case
931         before the perform_direct_initialization_if_possible call.
933 2012-08-03  Marc Glisse  <marc.glisse@inria.fr>
935         * pt.c (tsubst_copy_and_build): Handle VECTOR_TYPE like scalars.
936         * cp-tree.h (scalarish_type_p): Declare.
937         * tree.c (scalarish_type_p): Make non-static.
939 2012-08-02  Jason Merrill  <jason@redhat.com>
940             Paolo Carlini  <paolo.carlini@oracle.com>
942         PR c++/51213 (again)
943         * pt.c (type_unification_real): Call push_deferring_access_checks /
944         pop_deferring_access_checks around the substitution of default
945         template args.
946         (instantiate_template_1): When the specialization returned by
947         retrieve_specialization has FNDECL_HAS_ACCESS_ERRORS set and we
948         are in a SFINAE context, simply return error_mark_node.
949         * cp-tree.h (FNDECL_RECHECK_ACCESS_P): Rename FNDECL_HAS_ACCESS_ERRORS.
951 2012-07-31  Paolo Carlini  <paolo.carlini@oracle.com>
953         * pt.c (check_default_tmpl_args): Change is_primary and is_partial
954         parameters to bool type, adjust.
955         (push_template_decl_real): Tidy.
956         * parser.c (cp_parser_init_declarator): Adjust.
957         * decl.c (redeclaration_error_message): Likewise.
958         * cp-tree.h (check_default_tmpl_args): Update prototype.
960 2012-07-31  Paolo Carlini  <paolo.carlini@oracle.com>
962         PR c++/53624
963         * pt.c (check_default_tmpl_args): Don't check local types.
965 2012-07-25  Sandra Loosemore  <sandra@codesourcery.com>
966             Paul Brook  <paul@codesourcery.com>
968         PR target/53633
969         * decl.c (finish_function): Check targetm.warn_func_return.
971 2012-07-25  Jason Merrill  <jason@redhat.com>
973         PR c++/54086
974         * decl.c (grokdeclarator): Allow const and constexpr together.
976         PR c++/54020
977         * semantics.c (potential_constant_expression_1) [COND_EXPR]: Call
978         maybe_constant_value.
980         * cp-tree.h (tsubst_flags): Remove tf_no_access_control.
981         * call.c (standard_conversion): Don't set it.
982         * class.c (resolve_address_of_overloaded_function): Don't check it.
983         * decl.c (check_default_argument): Call
984         perform_implicit_conversion_flags.
986         * pt.c (print_candidates_1): Use inform instead of error.
988 2012-07-24  Paolo Carlini  <paolo.carlini@oracle.com>
990         * pt.c (convert_template_argument, tsubst): Simplify fourth argument
991         to make_typename_type (complain & tf_error -> complain).
993 2012-07-24  Steven Bosscher  <steven@gcc.gnu.org>
995         * class.c (n_vtables, n_vtable_entries, n_vtable_searches,
996         n_vtable_elems, n_convert_harshness, n_compute_conversion_costs,
997         n_inner_fields_searched): Always define.
998         (build_primary_vtable): Convert #ifdef GATHER_STATISTICS to if-code.
999         (print_class_statistics): Convert #ifdef GATHER_STATISTICS to if-code.
1000         * tree.c (depth_reached): Always define global.
1001         (cxx_print_statistics): Convert #ifdef GATHER_STATISTICS to if-code.
1002         * pt.c (depth_reached): Always define.
1003         (push_tinst_level): Convert #ifdef GATHER_STATISTICS to if-code.
1004         * search.c (n_fields_searched, n_calls_lookup_field,
1005         n_calls_lookup_field_1, n_calls_lookup_fnfields,
1006         n_calls_lookup_fnfields_1, n_calls_get_base_type,
1007         n_outer_fields_searched, n_contexts_saved): Always define.
1008         (lookup_field_1): Convert #ifdef GATHER_STATISTICS to if-code.
1009         (lookup_member): Likewise.
1010         (lookup_fnfields_idx_nolazy): Likewise.
1011         (print_search_statistics): Likewise.
1012         (reinit_search_statistics): Unconditionally re-set counters.
1013         * lex.c (retrofit_lang_decl): Convert #ifdef GATHER_STATISTICS
1014         to if-code.
1015         (cxx_dup_lang_specific_decl): Likewise.
1016         (copy_lang_type): Likewise.
1017         (cxx_make_type): Likewise.
1019 2012-07-20  Jason Merrill  <jason@redhat.com>
1021         PR c++/54038
1022         * tree.c (build_cplus_array_type): Use build_cplus_array_type to build
1023         canonical array type rather than mess with its TYPE_*_VARIANT.
1025 2012-07-19  Jason Merrill  <jason@redhat.com>
1027         PR c++/54026
1028         * typeck.c (cp_apply_type_quals_to_decl): Check COMPLETE_TYPE_P.
1030         PR c++/54021
1031         * call.c (build_cxx_call): Set optimize when folding
1032         __builtin_constant_p in a constexpr function.
1034 2012-07-18  Jason Merrill  <jason@redhat.com>
1036         * pt.c (instantiate_decl): Don't recheck substitutions.
1038 2012-07-18  Paolo Carlini  <paolo.carlini@oracle.com>
1039             Jason Merrill  <jason@redhat.com>
1041         DR 1170
1042         PR c++/51213
1043         * semantics.c (perform_access_checks): Add complain parm, return bool.
1044         (perform_deferred_access_checks): Likewise.
1045         (perform_or_defer_access_check): Likewise.
1046         (speculative_access_check): Remove.
1047         * call.c (enforce_access): Add complain parm, return bool.
1048         * decl.c, friend.c, class.c, init.c, parser.c: Adjust callers.
1049         * search.c: Adjust callers.
1050         * cp-tree.h (TINFO_RECHECK_ACCESS_P): New macro.
1051         (FNDECL_RECHECK_ACCESS_P): New macro.
1052         * method.c (synthesized_method_walk): Stop deferring access checks.
1053         * pt.c (recheck_decl_substitution): New.
1054         (instantiate_template_1): Set and check FNDECL_RECHECK_ACCESS_P.
1056 2012-07-18  Jason Merrill  <jason@redhat.com>
1058         * method.c (process_subob_fn): Make sure no_implicit_p is non-null
1059         before trying to store through it.
1061 2012-07-17  Jason Merrill  <jason@redhat.com>
1063         PR c++/53995
1064         * decl.c (finish_enum_value_list): Only call
1065         insert_late_enum_def_into_classtype_sorted_fields in class scope.
1067         PR c++/53989
1068         * tree.c (build_cplus_array_type): Also add TYPE_CANONICAL
1069         to the list of variants.
1071         * decl.c (xref_basetypes): Complain about incomplete template base.
1072         * class.c (finish_struct): Adjust variants in templates, too.
1074         PR c++/53549
1075         * parser.c (cp_parser_class_head): Call xref_basetypes here.
1076         (cp_parser_class_specifier_1): Not here.
1077         * pt.c (tsubst_decl) [USING_DECL]: Check uses_template_parms
1078         as well as DECL_DEPENDENT_P.
1080 2012-07-16  Jason Merrill  <jason@redhat.com>
1082         * cp-tree.h (struct deferred_access_check): Add location.
1083         * semantics.c (perform_access_checks): Use it.
1084         (perform_or_defer_access_check): Store it.
1086 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
1088         * dump.c (dump_stmt): Moved here from c-dump.c.
1089         * optimize.c: Include dumpfile.h instead of tree-dump.h.
1090         * class.c: Likewise.
1091         * decl2.c: Likewise.
1092         * Make-lang.in: Fix dependencies.
1094 2012-07-13  Jason Merrill  <jason@redhat.com>
1096         PR c++/53953
1097         * method.c (synthesized_method_walk): Initialize no_implicit_p sooner.
1099 2012-07-12  Jason Merrill  <jason@redhat.com>
1101         * pt.c (instantiate_decl): Check typedefs access here.
1102         (instantiate_template_1): Not here.
1104         * pt.c (deduction_tsubst_fntype): Just suppress access checking.
1105         (instantiate_template_1): Set DECL_TI_TEMPLATE before access checking.
1106         (push_deduction_access_scope, pop_deduction_access_scope): Remove.
1108 2012-07-11  Jason Merrill  <jason@redhat.com>
1110         DR 1402
1111         * method.c (synthesized_method_walk): Replace uses of msg with diag.
1112         Correct handling of virtual bases with move operations.
1113         (process_subob_fn, walk_field_subobs): Replace uses of msg with diag.
1115 2012-07-11  Steven Bosscher  <steven@gcc.gnu.org>
1117         * method.c: Do not include tree-pass.h.
1119 2012-07-10  Jason Merrill  <jason@redhat.com>
1121         DR 1402
1122         PR c++/53733
1123         * cp-tree.h (FNDECL_SUPPRESS_IMPLICIT_DECL): New.
1124         (struct lang_decl_fn): Add suppress_implicit_decl field.
1125         * method.c (implicitly_declare_fn): Check it.
1126         (process_subob_fn): Add no_implicit_p parm.
1127         (walk_field_subobs, synthesized_method_walk): Likewise.
1128         (maybe_explain_implicit_delete): Adjust.
1129         (explain_implicit_non_constexpr): Adjust.
1131         * method.c (synthesized_method_walk): Avoid changing
1132         EH spec based on cleanups in other places, too.
1134 2012-07-09  Sterling Augustine  <saugustine@google.com>
1136         * error.c (lang_decl_name): Use TFF_UNQUALIFIED_NAME flag.
1138 2012-07-08  Steven Bosscher  <steven@gcc.gnu.org>
1140         * decl.c (cp_finish_decl): Add FIXME at add_local_decl call site.
1142 2012-07-06  Jason Merrill  <jason@redhat.com>
1144         PR c++/53862
1145         * pt.c (tsubst_arg_types): Add "end" parameter.
1146         (check_undeduced_parms): Use it.
1148         * cp-tree.h (DECL_DECLARES_TYPE_P): Check DECL_TYPE_TEMPLATE_P.
1150         PR c++/53858
1151         * name-lookup.c (ambiguous_decl): Use DECL_TYPE_TEMPLATE_P.
1153 2012-07-05  Jason Merrill  <jason@redhat.com>
1155         PR c++/53039
1156         * pt.c (arg_from_parm_pack_p): Go back to using same_type_p or
1157         cp_tree_equal.
1159         * cp-tree.h (TEMPLATE_PARM_NUM_SIBLINGS): Remove.
1160         (struct template_parm_index_s): Remove num_siblings.
1161         * pt.c (fixup_template_parms, fixup_template_parm_index): Remove.
1162         (fixup_template_type_parm_type): Remove.
1163         (build_template_parm_index): Remove num_siblings parm.
1164         (process_template_parm): Likewise.
1165         * parser.c (cp_parser_template_parameter_list): Adjust.
1166         * tree.c (cp_tree_equal): Don't compare num_siblings.
1167         * typeck.c (comp_template_parms_position): Likewise.
1169         PR c++/50852
1170         PR c++/53039
1171         * tree.c (strip_typedefs_expr): New.
1172         * cp-tree.h: Declare it.
1173         * pt.c (convert_template_argument, unify): Use it.
1174         * parser.c (cp_parser_template_declaration_after_export): Don't call
1175         fixup_template_parms.
1177 2012-07-04  Jason Merrill  <jason@redhat.com>
1179         PR c++/53848
1180         PR c++/53524
1181         * decl.c (build_enumerator): Don't use build_lang_decl_loc.
1183 2012-07-03  Jakub Jelinek  <jakub@redhat.com>
1185         PR c++/53812
1186         * semantics.c (finish_goto_stmt): Surround computed goto argument
1187         with CLEANUP_POINT_EXPR if needed.
1189 2012-07-02  Jason Merrill  <jason@redhat.com>
1191         PR c++/53619
1192         * pt.c (in_template_function): New.
1193         * cp-tree.h: Declare it.
1194         * class.c (build_base_path, resolves_to_fixed_type_p): Use it.
1196         PR c++/53783
1197         * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Use tsubst
1198         for LAMBDA_EXPR_EXTRA_SCOPE.
1200         PR c++/53788
1201         * pt.c (build_non_dependent_expr): Don't wrap a dummy object.
1203         PR c++/53816
1204         * class.c (resolves_to_fixed_type_p): Check uses_template_parms
1205         (current_function_decl) instead of processing_template_decl.
1207         PR c++/53821
1208         * semantics.c (maybe_add_lambda_conv_op): Don't set
1209         DECL_INTERFACE_KNOWN.
1211         PR c++/53524
1212         * call.c (build_conditional_expr_1): Don't warn about comparison of
1213         two enumerators before their enumeration is complete.
1214         (build_new_op_1): Call decay_conversion before warn_logical_operator.
1215         * decl.c (build_enumerator): Set DECL_CONTEXT of an enumerator to
1216         its enumeration.
1217         * decl2.c (mark_used): Call used_types_insert for enums.
1218         * semantics.c (finish_id_expression): Don't decay CONST_DECL.
1219         (finish_member_declaration): Don't change DECL_CONTEXT of enumerators.
1220         * class.c (check_field_decls): Don't change DECL_CONTEXT of enums.
1221         * typeck.c (convert_for_assignment): Don't decay CONST_DECL.
1222         (build_class_member_access_expr): Look through unscoped enums.
1223         * search.c (context_for_name_lookup): Look through unscoped enums.
1224         * pt.c (tsubst_copy_and_build): Don't decay CONST_DECL.
1225         (tsubst_copy): Use DECL_CONTEXT to find the enumeration.
1226         * tree.c (decl_linkage): Likewise.
1227         * cvt.c (ocp_convert): Check decayed expr for enum range warning.
1229 2012-06-29  Steven Bosscher  <steven@gcc.gnu.org>
1231         * Make-lang.in: Remove tree-mudflap.o from CXX_AND_OBJCXX_OBJS.
1233 2012-06-27  Jason Merrill  <jason@redhat.com>
1235         * parser.c (cp_parser_check_for_invalid_template_id): tag_type parm.
1236         (cp_parser_simple_type_specifier, cp_parser_class_head): Adjust.
1237         (cp_parser_elaborated_type_specifier): Adjust.
1238         * decl.c (duplicate_decls): Return error_mark_node on template
1239         mismatch.
1241         PR c++/53563
1242         * parser.c (cp_parser_template_id): Add tag_type parm.
1243         (cp_parser_template_name): Likewise.
1244         (cp_parser_id_expression, cp_parser_unqualified_id): Adjust.
1245         (cp_parser_pseudo_destructor_name, cp_parser_type_name): Adjust.
1246         (cp_parser_simple_type_specifier, cp_parser_class_name): Adjust.
1247         (cp_parser_elaborated_type_specifier, cp_parser_class_head): Adjust.
1249 2012-06-27  Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>
1251         PR C++/51033
1252         * semantics.c (constexpr_call): Fix typo in comment.
1253         (cxx_eval_vec_perm_expr): New.
1254         (cxx_eval_constant_expression): Fold VEC_PERM_EXPRs.
1256 2012-06-26  Richard Guenther  <rguenther@suse.de>
1258         PR c++/53752
1259         * mangle.c (write_array_type): Truncate the number-of-elements
1260         result.
1262 2012-06-25  Jason Merrill  <jason@redhat.com>
1264         PR c++/53498
1265         PR c++/53305
1266         * pt.c (tsubst_decl) [PARM_DECL]: Don't recurse into DECL_CHAIN
1267         if cp_unevaluated_operand is set.
1268         (tsubst_copy) [PARM_DECL]: Don't copy before tsubsting.
1270         PR c++/52988
1271         * typeck.c (decay_conversion): Don't discard side-effects from
1272         expressions of nullptr_t.
1274 2012-06-25  Florian Weimer  <fweimer@redhat.com>
1276         * init.c (build_new_1): Warn about (T[N]) for variable N, and
1277         reject T[M][N].
1279         * parser.c (cp_parser_direct_new_declarator): Accept non-constant
1280         expressions.  Handled now in build_new_1.
1282 2012-06-25  Jason Merrill  <jason@redhat.com>
1284         PR c++/53202
1285         * semantics.c (build_data_member_initialization): Always keep
1286         initializer for empty base.
1287         (cxx_eval_bare_aggregate): Discard it here.
1289         PR c++/53565
1290         * pt.c (tsubst_omp_for_iterator): Simplify DECL_EXPR handling.
1291         (tsubst_expr) [OMP_FOR]: Here, too.
1293 2012-06-25  Jakub Jelinek  <jakub@redhat.com>
1295         PR c++/53594
1296         * class.c (check_bases_and_members): Avoid -Wuninitialized
1297         diagnostics for non-static const members or references if they
1298         use NSDMI.
1300 2012-06-16  Ville Voutilainen  <ville.voutilainen@gmail.com>
1302         * parser.c (cp_parser_direct_declarator): Move virt-specifier
1303         parsing after late-specified return type parsing.
1305 2012-06-14  Jason Merrill  <jason@redhat.com>
1307         PR c++/53651
1308         * name-lookup.c (constructor_name_p): Don't try to look at the
1309         name of a DECLTYPE_TYPE.
1311 2012-06-18  Lawrence Crowl  <crowl@google.com>
1313         * decl2.c (cp_write_global_declarations): Rename use of TV_PHASE_CGRAPH
1314         to TV_PHASE_OPT_GEN.
1316 2012-06-18  Steven Bosscher  <steven@gcc.gnu.org>
1318         * decl.c (finish_function): Remove code conditional on VMS_TARGET.
1320 2012-06-15  Marc Glisse  <marc.glisse@inria.fr>
1322         PR c++/51033
1323         * semantics.c (literal_type_p): Handle VECTOR_TYPE.
1324         (potential_constant_expression_1): Handle VEC_PERM_EXPR.
1325         * parser.c (cp_parser_postfix_expression): Handle RID_BUILTIN_SHUFFLE.
1327 2012-06-09  Jason Merrill  <jason@redhat.com>
1329         * pt.c (tsubst_expr) [TAG_DEFN]: Instantiate local class.
1330         * class.c (finish_struct): Don't add a TAG_DEFN for a lambda.
1331         * decl2.c (finish_static_data_member_decl): Avoid redundant error.
1333         PR c++/53599
1334         * name-lookup.c (pushtag_1): Add a DECL_EXPR for a local class.
1335         * semantics.c (finish_cond): Build a COMPOUND_EXPR.
1336         * pt.c (tsubst_expr) [COMPOUND_EXPR]: Handle.
1337         [DECL_EXPR]: Don't call cp_finish_decl for an implicit typedef.
1338         Don't return the decl.
1340 2012-06-11  Richard Guenther  <rguenther@suse.de>
1342         PR c++/53605
1343         * mangle.c (write_array_type): Use double-ints for array domain
1344         arithmetic.
1346 2012-06-07  Fabien ChĂȘne  <fabien@gcc.gnu.org>
1348         PR c++/51214
1349         * cp-tree.h (insert_late_enum_def_into_classtype_sorted_fields):
1350         Declare.
1351         * class.c (insert_into_classtype_sorted_fields): New.
1352         (add_enum_fields_to_record_type): New.
1353         (count_fields): Adjust the comment.
1354         (add_fields_to_record_type): Likewise.
1355         (finish_struct_1): Move the code that inserts the fields for the
1356         sorted case, into insert_into_classtype_sorted_fields, and call
1357         it.
1358         (insert_late_enum_def_into_classtype_sorted_fields): Define.
1359         * decl.c (finish_enum_value_list): Call
1360         insert_late_enum_def_into_classtype_sorted_fields if a late enum
1361         definition is encountered.
1363 2012-06-06  Paolo Carlini  <paolo.carlini@oracle.com>
1365         PR c++/53567
1366         * typeck.c (cp_perform_integral_promotions): New, like
1367         perform_integral_promotions but also takes a tsubst_flags_t parameter.
1368         (pointer_diff): Add tsubst_flags_t parameter.
1369         (decay_conversion, cp_default_conversion, cp_build_array_ref,
1370         cp_build_binary_op, cp_build_unary_op, build_static_cast_1,
1371         build_reinterpret_cast_1, cp_build_modify_expr,
1372         convert_for_assignment): Adjust.
1373         * optimize.c (build_delete_destructor_body): Adjust.
1374         * init.c (expand_virtual_init, expand_default_init, build_new_1,
1375         build_new, build_vec_delete_1, build_vec_init, build_delete): Adjust.
1376         (construct_virtual_base): Adjust LOOKUP_COMPLAIN -> 0.
1377         * class.c (build_base_path): Adjust.
1378         * decl.c (compute_array_index_type, finish_destructor_body): Likewise.
1379         * method.c (synthesized_method_walk): Adjust flag and complain.
1380         * rtti.c (ifnonnull): Add tsubst_flags_t parameter.
1381         (build_typeid, build_dynamic_cast_1): Adjust.
1382         * except.c (initialize_handler_parm): Likewise.
1383         * typeck2.c (process_init_constructor_record): Likewise.
1384         * pt.c (tsubst_friend_class): Don't change flags.
1385         * semantics.c (finish_goto_stmt, handle_omp_for_class_iterator,
1386         finish_static_assert): Likewise.
1387         * parser.c (cp_parser_lookup_name): Just pass 0 as flags to
1388         lookup_name_real.
1389         * call.c (build_op_delete_call): Add tsubst_flags_t parameter.
1390         (convert_like_real, convert_arg_to_ellipsis, convert_for_arg_passing):
1391         Adjust.
1392         (standard_conversion): Adjust LOOKUP_COMPLAIN -> 0.
1393         (implicit_conversion): Mask out tf_error with a FIXME.
1394         (build_user_type_conversion_1, build_new_op_1, build_over_call): Use
1395         complain & tf_error instead of flags & LOOKUP_COMPLAIN.
1396         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
1397         build_up_reference, convert_to_reference, cp_convert,
1398         cp_convert_and_check, ocp_convert, convert_force): Add tsubst_flags_t
1399         parameter.
1400         (convert_to_reference, ocp_convert): Use complain & tf_error instead
1401         of flags & LOOKUP_COMPLAIN.
1402         (convert_force): Adjust LOOKUP_COMPLAIN -> 0.
1403         * name-lookup.c (identifier_type_value_1, lookup_qualified_name,
1404         lookup_name_real, lookup_function_nonclass, lookup_name,
1405         lookup_name_prefer_type): Adjust LOOKUP_COMPLAIN -> 0.
1406         * cp-tree.h: Adjust prototypes; remove LOOKUP_COMPLAIN.
1408 2012-06-06  Steven Bosscher  <steven@gcc.gnu.org>
1410         * decl.c: Do not include output.h.
1411         (start_decl): Remove code for flag_conserve_space.
1413 2012-06-06  Fabien ChĂȘne  <fabien@gcc.gnu.org>
1415         PR c++/52841
1416         * parser.c (cp_parser_alias_declaration): Return earlier
1417         if an error occured.
1419 2012-06-04  Paolo Carlini  <paolo.carlini@oracle.com>
1421         PR c++/53524
1422         * call.c (build_conditional_expr_1): Use OPT_Wenum_compare
1423         to control enumeral mismatch in conditional expression too.
1425 2012-06-04   Sterling Augustine  <saugustine@google.com>
1427         * cp-tree.h: Declare decl_as_dwarf_string, lang_decl_dwarf_name.
1428         * cp-lang.c (cxx_dwarf_name): Call them.
1430 2012-06-04  Steven Bosscher  <steven@gcc.gnu.org>
1432         * semantics.c: Do not include output.h.
1433         * decl2.c: Likewise.
1434         * friend.c: Likewise.
1435         * typeck.c: Likewise.
1436         * typeck2.c: Likewise.
1437         * Make-lang.in: Fix dependencies.
1439 2012-06-01  Jason Merrill  <jason@redhat.com>
1441         PR c++/52973
1442         * parser.c (cp_parser_class_head): Apply attributes here.
1443         * semantics.c (begin_class_definition): Not here.
1444         * cp-tree.h: Adjust.
1446         PR c++/52725
1447         * parser.c (cp_parser_binary_expression): Bail early if we're parsing
1448         tentatively and the LHS has a parse error.
1450         PR c++/53137
1451         * pt.c (instantiate_class_template_1): Set LAMBDA_EXPR_THIS_CAPTURE.
1452         (instantiate_decl): Don't push_to_top_level for local class methods.
1453         (instantiate_class_template_1): Or for local classes.
1455         PR c++/53484
1456         * pt.c (do_auto_deduction): Don't try to deduce from a
1457         type-dependent initializer.
1459 2012-06-01  Paolo Carlini  <paolo.carlini@oracle.com>
1461         PR c++/26155
1462         * name-lookup.c (push_namespace): When error recovery is
1463         impossible just error out in duplicate_decls.
1465 2012-05-31  Steven Bosscher  <steven@gcc.gnu.org>
1467         * call.c: Do not include output.h.
1468         * class.c: Likewise.
1469         * except.c: Likewise.
1470         * friend.c: Likewise.
1471         * init.c: Likewise.
1472         * lex.c: Likewise.
1473         * method.c: Likewise.
1474         * parser.c: Likewise.
1475         * pt.c: Likewise.
1476         * rtti.c: Likewise.
1477         * search.c: Likewise.
1479 2012-05-30  Jason Merrill  <jason@redhat.com>
1481         PR c++/53356
1482         * tree.c (stabilize_init): Handle stabilizing a TARGET_EXPR
1483         representing a bitwise copy of a glvalue.
1485         * tree.c (stabilize_expr): Tweak logic.
1487         PR c++/53356
1488         * tree.c (stabilize_init): Side effects make the init unstable.
1490 2012-05-28  Paolo Carlini  <paolo.carlini@oracle.com>
1492         PR c++/53503
1493         * semantics.c (potential_constant_expression_1): Handle LTGT_EXPR.
1495 2012-05-26  Paolo Carlini  <paolo.carlini@oracle.com>
1497         PR c++/53491
1498         * tree.c (stabilize_expr): Handle exp of void type.
1500 2012-05-26  Jason Merrill  <jason@redhat.com>
1502         PR c++/53220
1503         * call.c (convert_like_real) [ck_list]: Take array address directly.
1504         * typeck.c (decay_conversion): Reject decay of an array compound
1505         literal.
1507 2012-05-25  Paolo Carlini  <paolo.carlini@oracle.com>
1509         PR c++/32054
1510         * parser.c (cp_parser_member_declaration): A storage class is not
1511         allowed in a declaration of an anonymous aggregate in a class scope.
1513 2012-05-24  Uros Bizjak  <ubizjak@gmail.com>
1515         PR obj-c++/53441
1516         * decl.c (grokdeclarator): Check that current_class_type is non-NULL
1517         before calling constructor_name_p.
1519 2012-05-24  Paolo Carlini  <paolo.carlini@oracle.com>
1521         PR c++/32080
1522         * parser.c (cp_parser_ctor_initializer_opt_and_function_body,
1523         cp_parser_function_body): Add a bool parameter, true when parsing
1524         a function-try-block.
1525         (cp_parser_function_try_block): Pass true to the above.
1526         (cp_parser_function_definition_after_declarator,
1527         cp_parser_function_transaction): Adjust.
1529 2012-05-23  Paolo Carlini  <paolo.carlini@oracle.com>
1531         PR c++/29185
1532         * decl2.c (delete_sanity): Extend 'deleting array' warning to
1533         any array type.
1535 2012-05-21  Paolo Carlini  <paolo.carlini@oracle.com>
1537         PR c++/51184
1538         * decl.c (grokdeclarator): Diagnose functions returning abstract
1539         class types as TYPENAME.
1540         * cp-tree.h (ABSTRACT_CLASS_TYPE_P): Add.
1541         * except.c (is_admissible_throw_operand_or_catch_parameter): Use it.
1542         * pt.c (tsubst): Likewise.
1543         * semantics.c (trait_expr_value): Likewise.
1545 2012-05-21  Paolo Carlini  <paolo.carlini@oracle.com>
1547         PR c++/40821
1548         * parser.c (cp_parser_attributes_opt): Enforce error checking of
1549         unbalanced parentheses in the presence of tentative parsing.
1551 2012-05-17  Paolo Carlini  <paolo.carlini@oracle.com>
1553         PR c++/39681
1554         * parser.c (cp_parser_new_type_id): Early return error_mark_node
1555         if the cp_parser_type_specifier_seq call has type_specifier_seq.type
1556         error_mark_node; tidy.
1557         (cp_parser_new_expression): Always initialize nelts to NULL_TREE to
1558         avoid uninitialized warnings.
1559         (cp_parser_init_declarator, cp_parser_late_parse_one_default_arg):
1560         Call cp_parser_skip_to_end_of_statement if cp_parser_initializer
1561         returns error_mark_node.
1563 2012-05-17  Paolo Carlini  <paolo.carlini@oracle.com>
1565         PR c++/53371
1566         * except.c (is_admissible_throw_operand): Rename to
1567         is_admissible_throw_operand_or_catch_parameter and handle
1568         catch parameter too.
1569         (expand_start_catch_block): Use it.
1570         (build_throw): Adjust.
1572 2012-05-17  Paolo Carlini  <paolo.carlini@oracle.com>
1574         PR c++/44516
1575         * typeck.c (build_x_array_ref, build_x_conditional_expr,
1576         build_x_compound_expr, build_x_modify_expr): Add location_t parameter.
1577         (finish_class_member_access_expr, build_x_indirect_ref,
1578         build_x_binary_op, build_x_compound_expr_from_list,
1579         build_x_compound_expr_from_vec): Adjust callers.
1580         * tree.c (build_min_nt_loc): New.
1581         (build_min_nt): Remove.
1582         * typeck2.c (build_x_arrow): Adjust callers.
1583         * pt.c (tsubst_qualified_id, tsubst_omp_for_iterator,
1584         tsubst_copy_and_build): Likewise.
1585         * semantics.c (finish_mem_initializers, handle_omp_for_class_iterator,
1586          finish_omp_atomic): Likewise.
1587         * decl2.c (grok_array_decl, build_anon_union_vars): Adjust.
1588         * parser.c (cp_parser_question_colon_clause,
1589         cp_parser_assignment_expression, cp_parser_expression,
1590         cp_parser_template_id, cp_parser_omp_for_loop): Likewise.
1591         * cp-tree.h: Update.
1593 2012-05-16  Dodji Seketeli  <dodji@redhat.com>
1595         PR preprocessor/7263
1596         * cp-tree.h (enum cp_decl_spec): Add new enumerators to cover all
1597         the possible declarator specifiers so far.
1598         (struct cp_decl_specifier_seq::locations): Declare new member.
1599         (cp_decl_specifier_seq::{specs, type_location}): Remove.
1600         (decl_spec_seq_has_spec_p): Declare new function.
1601         * parser.c (cp_parser_check_decl_spec): Remove.
1602         (set_and_check_decl_spec_loc): Define new static function.
1603         (decl_spec_seq_has_spec_p): Define new public function.
1604         (cp_parser_decl_specifier_seq, cp_parser_function_specifier_opt)
1605         (cp_parser_type_specifier, cp_parser_simple_type_specifier)
1606         (cp_parser_set_storage_class, cp_parser_set_decl_spec_type)
1607         (cp_parser_alias_declaration): Set the locations for each
1608         declspec, using set_and_check_decl_spec_loc.
1609         (cp_parser_explicit_instantiation, cp_parser_init_declarator)
1610         (cp_parser_member_declaration, cp_parser_init_declarator): Use the
1611         new declspec location for specifiers.  Use the new
1612         decl_spec_seq_has_spec_p.
1613         (cp_parser_type_specifier_seq): Use the new
1614         set_and_check_decl_spec_loc.  Stop using
1615         cp_parser_check_decl_spec.  Use the new decl_spec_seq_has_spec_p.
1616         (, cp_parser_init_declarator): Use the new
1617         set_and_check_decl_spec_loc.
1618         (cp_parser_single_declaration, cp_parser_friend_p)
1619         (cp_parser_objc_class_ivars, cp_parser_objc_struct_declaration):
1620         Use the new decl_spec_seq_has_spec_p.
1621         * decl.c (check_tag_decl): Use new decl_spec_seq_has_spec_p.  Use
1622         the more precise ds_redefined_builtin_type_spec location for
1623         diagnostics about re-declaring C++ built-in types.
1624         (start_decl, grokvardecl, grokdeclarator): Use the new
1625         decl_spec_seq_has_spec_p.
1627 2012-05-15  Paolo Carlini  <paolo.carlini@oracle.com>
1629         PR c++/11856
1630         * pt.c (tsubst_copy_and_build): Increase / decrease
1631         c_inhibit_evaluation_warnings around build_x_binary_op call.
1633 2012-05-12  Paolo Carlini  <paolo.carlini@oracle.com>
1635         * cp-tree.h (TYPE_PTRMEM_P): Rename to TYPE_PTRDATAMEM_P.
1636         (TYPE_PTR_TO_MEMBER_P): Rename to TYPE_PTRMEM_P.
1637         (TYPE_PTR_OR_PTRMEM_P): Add.
1638         * typeck.c (composite_pointer_type_r, composite_pointer_type,
1639         common_pointer_type, cp_build_indirect_ref, cp_build_binary_op,
1640         cp_truthvalue_conversion, convert_ptrmem, build_static_cast_1,
1641         build_reinterpret_cast_1, build_const_cast_1, comp_ptr_ttypes_real,
1642         casts_away_constness_r, casts_away_constness): Adjust.
1643         * init.c (build_zero_init_1): Adjust.
1644         * class.c (check_field_decls): Likewise.
1645         * decl.c (check_default_argument): Likewise.
1646         * rtti.c (target_incomplete_p): Likewise.
1647         * tree.c (zero_init_p): Likewise.
1648         * cxx-pretty-print.c (pp_cxx_ptr_operator,
1649         pp_cxx_abstract_declarator): Likewise.
1650         * typeck2.c (build_m_component_ref): Likewise.
1651         * pt.c (convert_nontype_argument, invalid_nontype_parm_type_p,
1652         dependent_type_p_r): Likewise.
1653         * call.c (null_member_pointer_value_p, standard_conversion,
1654         add_builtin_candidate, build_conditional_expr_1, compare_ics):
1655         Likewise.
1656         * cp-objcp-common.c (cp_var_mod_type_p): Likewise.
1657         * cvt.c (cp_convert_to_pointer, ocp_convert,
1658         perform_qualification_conversions): Likewise.
1659         * mangle.c (write_type): Likewise.
1660         * name-lookup.c (arg_assoc_type): Likewise.
1662 2012-05-12  Paolo Carlini  <paolo.carlini@oracle.com>
1664         * parser.c (struct cp_parser_expression_stack_entry): Add location_t
1665         field.
1666         (cp_parser_binary_expression): Rework to always update at the same
1667         time tree_type and loc.
1668         * call.c (print_z_candidate): Add location_t parameter.
1669         (print_z_candidates, convert_like_real, joust): Adjust.
1671 2012-05-11  Alexandre Oliva  <aoliva@redhat.com>
1673         PR c++/53209
1674         * pt.c (tsubst_decl): Bail out if argvec is error_mark_node.
1676 2012-05-11  Paolo Carlini  <paolo.carlini@oracle.com>
1678         PR c++/53305
1679         * pt.c (tsubst_copy: case PARM_DECL): Return error_mark_node if
1680         tsubst_decl returns NULL_TREE.
1681         * cxx-pretty-print.c (pp_cxx_simple_type_specifier): Handle
1682         BOUND_TEMPLATE_TEMPLATE_PARM.
1684 2012-05-10  Paolo Carlini  <paolo.carlini@oracle.com>
1686         PR c++/53158
1687         * cvt.c (ocp_convert): Error out early for void -> bool conversions.
1688         * typeck.c (decay_conversion): Use error_at.
1689         * call.c (build_integral_nontype_arg_conv, convert_like_real,
1690         convert_arg_to_ellipsis, perform_implicit_conversion_flags,
1691         initialize_reference): Likewise.
1692         * cvt.c (warn_ref_binding): Add location_t parameter.
1693         (cp_convert_to_pointer, convert_to_reference, ocp_convert,
1694         convert_to_void, ): Use error_at and warning_at.
1696 2012-05-10  Paolo Carlini  <paolo.carlini@oracle.com>
1698         PR c++/53301
1699         * decl.c (check_default_argument): Fix typo (POINTER_TYPE_P
1700         instead of TYPE_PTR_P) in zero-as-null-pointer-constant warning.
1702 2012-05-06  Paolo Carlini  <paolo.carlini@oracle.com>
1704         PR c++/53152
1705         * call.c (op_error, build_new_op_1, build_new_op): Add location_t
1706         parameter.
1707         (build_conditional_expr_1): Adjust.
1708         * typeck.c (build_x_indirect_ref, build_x_binary_op,
1709         build_x_unary_op): Add location_t parameter.
1710         (rationalize_conditional_expr, build_x_array_ref,
1711         build_x_compound_expr, cp_build_modify_expr, build_x_modify_expr):
1712         Adjust.
1713         * typeck2.c (build_x_arrow): Add location_t parameter.
1714         * semantics.c (finish_unary_op_expr): Likewise.
1715         (finish_increment_expr, handle_omp_for_class_iterator): Adjust.
1716         * decl2.c (grok_array_decl): Add location_t parameter.
1717         * parser.c (cp_parser_postfix_open_square_expression,
1718         cp_parser_postfix_dot_deref_expression, cp_parser_unary_expression,
1719         cp_parser_binary_expression, cp_parser_builtin_offsetof,
1720         do_range_for_auto_deduction, cp_convert_range_for,
1721         cp_parser_template_argument, cp_parser_omp_for_cond): Pass the
1722         location, adjust.
1723         * pt.c (tsubst_copy_and_build): Adjust.
1724         * tree.c (maybe_dummy_object): Likewise.
1725         * cp-tree.h: Update declarations.
1727 2012-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
1729         * semantics.c (cxx_eval_constant_expression, case CONVERT_EXPR): Tidy.
1731 2012-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
1733         PR c++/53166
1734         * pt.c (instantiate_class_template_1): Increase / decrease
1735         c_inhibit_evaluation_warnings around the tsubst_expr call
1736         for STATIC_ASSERT_CONDITION.
1737         (tsubst_expr, case STATIC_ASSERT): Likewise.
1738         * typeck.c (cp_build_binary_op, case EQ_EXPR/NE_EXPR): Check
1739         c_inhibit_evaluation_warnings in the OPT_Waddress warnings.
1741 2012-05-03  Paolo Carlini  <paolo.carlini@oracle.com>
1743         PR c++/53186
1744         * call.c (build_over_call): Handle final member functions
1745         and class types.
1746         (build_new_method_call_1): Do not handle here.
1748 2012-05-02  Richard Guenther  <rguenther@suse.de>
1750         * decl.c (grokdeclarator): Properly check for sizes that
1751         cover more than half of the address-space.
1753 2012-04-30  Marc Glisse  <marc.glisse@inria.fr>
1755         PR c++/51033
1756         * typeck.c (cp_build_array_ref): Handle VECTOR_TYPE.
1757         * decl2.c (grok_array_decl): Likewise.
1759         PR c++/51314
1760         * parser.c (cp_parser_sizeof_operand): Require parentheses for
1761         sizeof...
1763 2012-04-30  Dodji Seketeli  <dodji@redhat.com>
1765         Fix location for static class members
1766         * decl.c (grokdeclarator): Use the location carried by the
1767         declarator for the DECL of the static class member.
1769         Fix va_arg type location
1770         * cp-tree.h (build_x_va_arg): Take an additional location
1771         parameter.
1772         * call.c (build_x_va_arg): Take a loc parameter for the location
1773         of the type of the va_arg expression.
1774         * parser.c (cp_parser_primary_expression): Pass the type of the
1775         type in the va_arg expression to build_x_va_arg.
1776         * pt.c (tsubst_copy): Adjust calls to build_x_va_arg.
1778         Make conversion warnings work on NULL with -ftrack-macro-expansion
1779         * call.c (conversion_null_warnings): Use the new
1780         expansion_point_location_if_in_system_header.
1781         * cvt.c (build_expr_type_conversion): Likewise.
1782         * typeck.c (cp_build_binary_op): Likewise.
1784 2012-04-30  Manuel LĂłpez-Ibåñez  <manu@gcc.gnu.org>
1786         * typeck.c (convert_for_assignment):  Replace
1787         Wmissing-format-attribute with Wsuggest-attribute=format.
1788         * call.c (convert_for_arg_passing): Likewise.
1790 2012-04-26  Paolo Carlini  <paolo.carlini@oracle.com>
1792         PR c++/53096
1793         * class.c (check_bases_and_members): Implement core/1333, do not
1794         disallow defaulted in the class body non-const ref special members.
1796 2012-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
1798         PR c++/52363
1799         * call.c (tourney, perform_overload_resolution,
1800         build_operator_new_call, build_user_type_conversion_1,
1801         build_user_type_conversion, perform_overload_resolution,
1802         add_template_candidate, add_template_candidate_real,
1803         add_template_conv_candidate, add_builtin_candidates,
1804         add_builtin_candidate, build_builtin_candidate,
1805         add_conv_candidate, add_function_candidate, implicit_conversion,
1806         reference_binding, build_list_conv, conditional_conversion,
1807         add_candidates, can_convert_array, build_aggr_conv,
1808         build_array_conv, build_complex_conv, conditional_conversion):
1809         Add tsubst_flags_t parameter.
1810         (joust): Likewise, use it to handle SFINAE as if pedantic.
1811         (add_list_candidates, build_integral_nontype_arg_conv,
1812         perform_overload_resolution, build_new_function_call,
1813         build_operator_new_call, build_op_call_1,
1814         build_conditional_expr_1, build_new_op_1, convert_like_real,
1815         convert_arg_to_ellipsis, convert_default_arg,
1816         convert_for_arg_passing, build_over_call,
1817         build_new_method_call_1, can_convert_arg, can_convert_arg_bad,
1818         perform_implicit_conversion_flags,
1819         perform_direct_initialization_if_possible,
1820         initialize_reference): Adjust.
1821         * typeck.c (casts_away_constness, casts_away_constness_r):
1822         Add tsubst_flags_t parameter.
1823         (convert_arguments, check_for_casting_away_constness,
1824         build_static_cast_1, build_ptrmemfunc, convert_for_assignment):
1825         Adjust.
1826         * decl.c (reshape_init_r, check_default_argument): Likewise.
1827         * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
1828         * pt.c (convert_nontype_argument, check_non_deducible_conversion):
1829         Likewise.
1830         * init.c (build_new_1): Likewise.
1831         * cvt.c (convert_to_reference, ocp_convert, build_type_conversion,
1832         build_expr_type_conversion, ): Likewise.
1833         * search.c (check_final_overrider): Likewise.
1834         * cp-tree.h (build_user_type_conversion,
1835         build_operator_new_call, can_convert, can_convert_arg,
1836         can_convert_arg_bad, convert_default_arg,
1837         convert_arg_to_ellipsis, convert_for_arg_passing):
1838         Adjust declaration.
1840 2012-04-22  Jan Hubicka  <jh@suse.cz>
1842         * decl2.c (maybe_make_one_only): Mark keyed COMDATs as USED so they
1843         gets finalized.
1845 2012-04-22  Manuel LĂłpez-Ibåñez  <manu@gcc.gnu.org>
1847         PR c/44774
1848         * typeck.c (composite_pointer_type): Likewise.
1849         (cxx_sizeof_or_alignof_type): Likewise.
1850         (cp_build_array_ref): Likewise.
1851         (cp_build_function_call_vec): Likewise.
1852         (cp_build_addr_expr_1): Likewise.
1853         (convert_member_func_to_ptr): Likewise.
1854         * decl.c (check_tag_decl): Likewise.
1855         (check_static_variable_definition): Likewise.
1856         (compute_array_index_type): Likewise.
1857         (create_array_type_for_decl): Likewise.
1858         (grokdeclarator): Likewise.
1859         (grok_op_properties): Likewise.
1860         * error.c (maybe_warn_cpp0x): Likewise.
1861         * pt.c (maybe_process_partial_specialization): Likewise.
1862         (convert_template_argument): Likewise.
1863         (do_decl_instantiation): Likewise.
1864         (do_type_instantiation): Likewise.
1865         * parser.c (cp_parser_primary_expression): Likewise.
1866         (cp_parser_postfix_expression): Likewise.
1867         (cp_parser_unary_expression): Likewise.
1868         (cp_parser_question_colon_clause): Likewise.
1869         (cp_parser_lambda_introducer): Likewise.
1870         (cp_parser_lambda_declarator_opt): Likewise.
1871         (cp_parser_compound_statement): Likewise.
1872         (cp_parser_jump_statement): Likewise.
1873         (cp_parser_declaration_seq_opt): Likewise.
1874         (cp_parser_enum_specifier): Likewise.
1875         (cp_parser_enumerator_list): Likewise.
1876         (cp_parser_initializer_list): Likewise.
1877         (cp_parser_member_declaration): Likewise.
1878         * call.c (build_conditional_expr_1): Likewise.
1879         * friend.c (make_friend_class): Likewise.
1880         * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
1882 2012-04-21  Jan Hubicka  <jh@suse.cz>
1884         * method.c (make_alias_for): Do not set TREE_SYMBOL_REFERENCED.
1885         * decl2.c (mark_needed): Likewise.
1886         (decl_needed_p): Do not test TREE_SYMBOL_REFERENCED.
1888         * decl2.c (cxx_callgraph_analyze_expr): Remove.
1889         * cp-objcp-common.h (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): Remove.
1890         * cp-tree.h (cxx_callgraph_analyze_expr): Remove.
1892 2012-04-21  Manuel LĂłpez-Ibåñez  <manu@gcc.gnu.org>
1894         PR 35441
1895         * typeck.c (cp_build_function_call_vec): Do not pretty-print
1896         expressions when caret is enabled.
1898 2012-04-20  Jan Hubicka  <jh@suse.cz>
1900         PR target/53042
1901         * decl2.c (maybe_emit_vtables): Do not initialize same_comdat_group
1902         list when target has no support for it.
1904 2012-04-20  Michael Matz  <matz@suse.de>
1906         * error.c (pedwarn_cxx98): Move va_end call after user
1907         of the va_list.
1909 2012-04-18  Paolo Carlini  <paolo.carlini@oracle.com>
1911         PR c++/52422
1912         * cp-tree.h (build_addr_func, decay_conversion,
1913         get_member_function_from_ptrfunc,
1914         build_m_component_ref, convert_member_func_to_ptr):
1915         Add tsubst_flags_t parameter.
1916         * typeck.c (cp_default_conversion): Add.
1917         (decay_conversion, default_conversion,
1918         get_member_function_from_ptrfunc, convert_member_func_to_ptr):
1919         Add tsubst_flags_t parameter and use it throughout.
1920         (cp_build_indirect_ref, cp_build_array_ref,
1921         cp_build_function_call_vec, convert_arguments, build_x_binary_op,
1922         cp_build_binary_op, cp_build_unary_op, build_reinterpret_cast_1,
1923         build_const_cast_1, expand_ptrmemfunc_cst,
1924         convert_for_initialization): Adjust.
1925         * init.c (build_vec_init): Adjust.
1926         * decl.c (grok_reference_init, get_atexit_node): Likewise.
1927         * rtti.c (build_dynamic_cast_1, tinfo_base_init): Likewise.
1928         * except.c (build_throw): Likewise.
1929         * typeck2.c (build_x_arrow): Likewise.
1930         (build_m_component_ref): Add tsubst_flags_t parameter and
1931         use it throughout.
1932         * pt.c (convert_nontype_argument): Adjust.
1933         * semantics.c (finish_asm_stmt, maybe_add_lambda_conv_op): Likewise.
1934         * decl2.c (build_offset_ref_call_from_tree): Likewise.
1935         * call.c (build_addr_func): Add tsubst_flags_t parameter and
1936         use it throughout.
1937         (build_call_a, build_conditional_expr_1, build_new_op_1,
1938         convert_like_real, convert_arg_to_ellipsis, build_over_call,
1939         build_special_member_call): Adjust.
1940         * cvt.c (cp_convert_to_pointer, force_rvalue,
1941         build_expr_type_conversion): Likewise.
1943 2012-04-17  Tom de Vries  <tom@codesourcery.com>
1945         * cp-gimplify.c (begin_bc_block): Add location parameter and use as
1946         location argument to create_artificial_label.
1947         (finish_bc_block): Change return type to void.  Remove body_seq
1948         parameter, and add block parameter.  Append label to STMT_LIST and
1949         return in block.
1950         (gimplify_cp_loop, gimplify_for_stmt, gimplify_while_stmt)
1951         (gimplify_do_stmt, gimplify_switch_stmt): Remove function.
1952         (genericize_cp_loop, genericize_for_stmt, genericize_while_stmt)
1953         (genericize_do_stmt, genericize_switch_stmt, genericize_continue_stmt)
1954         (genericize_break_stmt, genericize_omp_for_stmt): New function.
1955         (cp_gimplify_omp_for): Remove bc_continue processing.
1956         (cp_gimplify_expr): Genericize VEC_INIT_EXPR.
1957         (cp_gimplify_expr): Mark FOR_STMT, WHILE_STMT, DO_STMT, SWITCH_STMT,
1958         CONTINUE_STMT, and BREAK_STMT as unreachable.
1959         (cp_genericize_r): Genericize FOR_STMT, WHILE_STMT, DO_STMT,
1960         SWITCH_STMT, CONTINUE_STMT, BREAK_STMT and OMP_FOR.
1961         (cp_genericize_tree): New function, factored out of ...
1962         (cp_genericize): ... this function.
1964 2012-04-17  Paolo Carlini  <paolo.carlini@oracle.com>
1966         PR c++/52599
1967         * semantics.c (build_constexpr_constructor_member_initializers):
1968         Check for function-try-block as function-body.
1970 2012-04-17  Paolo Carlini  <paolo.carlini@oracle.com>
1972         PR c++/53003
1973         * parser.c (cp_parser_member_declaration): Check that
1974         initializer_token_start is non null before dereferencing it.
1976 2012-04-16  Jason Merrill  <jason@redhat.com>
1978         PR c++/38543
1979         * pt.c (determine_specialization): Instead of comparing the number
1980         of parms, check that tsubst gives the right answer.
1982         PR c++/52008
1983         * pt.c (process_partial_specialization): Complain about a partial
1984         specialization with fewer args than primary template parms.
1986         PR c++/50830
1987         * pt.c (convert_template_argument): Handle template template
1988         argument packs.
1990         PR c++/50303
1991         * pt.c (tsubst_pack_expansion): Use tsubst_expr for template
1992         template parameters.
1994 2012-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
1996         PR c++/49152
1997         * call.c (op_error): Print types; when flag_diagnostics_show_caret
1998         is false print expressions too.
1999         (op_error_string): Add.
2001 2012-04-16  Jason Merrill  <jason@redhat.com>
2003         PR c++/51148
2004         * friend.c (make_friend_class): Call check_for_bare_parameter_packs.
2006 2012-04-16  Jan Hubicka  <jh@suse.cz>
2008         * decl2.c (collect_candidates_for_java_method_alias): Use FOR_EACH
2009         walkers to walk cgraph and varpool.
2011 2012-04-15  Jason Merrill  <jason@redhat.com>
2013         PR c++/47220
2014         * pt.c (coerce_template_parameter_pack): Check for error_mark_node.
2016         PR c++/52292
2017         PR c++/52380
2018         * pt.c (coerce_template_parms): Even if we aren't converting we
2019         want to expand argument packs.
2021         PR c++/52706
2022         * mangle.c (write_type): nullptr_t is a builtin type.
2024 2012-04-14  Jan Hubicka  <jh@suse.cz>
2026         * tree.c: Update field referenced for new cgraph/varpool layout.
2027         * decl2.c: Likewise.
2029 2012-04-13  Jason Merrill  <jason@redhat.com>
2031         PR c++/52824
2032         * pt.c (any_pack_expanson_args_p): New.
2033         (coerce_template_parms): Use it.
2035         PR c++/52905
2036         * call.c (joust): Handle comparing list and non-list ctors.
2038         PR c++/52915
2039         * decl2.c (finish_anon_union): Use cp_finish_decl.
2040         * error.c (dump_function_name): Avoid showing anonymous "name".
2042 2012-04-11  Fabien ChĂȘne  <fabien@gcc.gnu.org>
2044         PR c++/52465
2045         * parser.c (cp_parser_class_name): Call strip_using_decl and
2046         return the target decl.
2047         * name-lookup.c (strip_using_decl): Returns NULL_TREE if the decl
2048         to be stripped is NULL_TREE.
2049         (qualify_lookup): Call strip_using_decl and perform some checks on
2050         the target decl.
2052 2012-04-11  Jason Merrill  <jason@redhat.com>
2054         PR debug/45088
2055         * decl.c (grokdeclarator): Strip the injected-class-name typedef
2056         if we are building a declaration or compound type.
2058         PR c++/52906
2059         * decl.c (check_tag_decl): Don't complain about attributes if we
2060         don't even have a type.
2062 2012-04-10  Manuel LĂłpez-Ibåñez  <manu@gcc.gnu.org>
2064         * cvt.c (convert_to_void): Update comment.
2066 2012-04-05  Jason Merrill  <jason@redhat.com>
2068         PR c++/52596
2069         * semantics.c (finish_non_static_data_member): In templates, pass
2070         the decl to build_qualified_name.
2071         * tree.c (lvalue_kind) [SCOPE_REF]: Handle FIELD_DECL.
2073 2012-04-04  Jason Merrill  <jason@redhat.com>
2075         PR c++/52845
2076         * decl.c (finish_function): Update fntype after deducing return type.
2078 2012-04-03  Jason Merrill  <jason@redhat.com>
2080         PR c++/52796
2081         * pt.c (tsubst_initializer_list): A pack expansion with no elements
2082         means value-initialization.
2084 2012-04-01  Paolo Carlini  <paolo.carlini@oracle.com>
2086         PR c++/50043
2087         * class.c (deduce_noexcept_on_destructor,
2088         deduce_noexcept_on_destructors): New.
2089         (check_bases_and_members): Call the latter.
2090         * decl.c (grokfndecl): Call the former.
2091         * method.c (implicitly_declare_fn): Not static.
2092         * cp-tree.h (deduce_noexcept_on_destructor, implicitly_declare_fn):
2093         Declare
2095 2012-03-29  Paolo Carlini  <paolo.carlini@oracle.com>
2097         PR c++/52718
2098         * decl.c (check_default_argument): With -Wzero-as-null-pointer-constant
2099         warn for a zero as null pointer constant default argument.
2101 2012-03-29  Jason Merrill  <jason@redhat.com>
2103         PR c++/52685
2104         * tree.c (copy_binfo): Handle BINFO_DEPENDENT_BASE_P.
2106 2012-03-29  Jakub Jelinek  <jakub@redhat.com>
2108         PR c++/52759
2109         * decl.c (start_decl): Don't call maybe_apply_pragma_weak
2110         if processing_template_decl.
2112 2012-03-29  Jason Merrill  <jason@redhat.com>
2114         PR c++/52743
2115         * call.c (compare_ics): Handle ck_aggr like ck_list.
2117 2012-03-28  Jason Merrill  <jason@redhat.com>
2119         PR c++/52746
2120         * typeck.c (lookup_destructor): Clear BASELINK_QUALIFIED_P if
2121         we didn't get an explicit scope.
2122         * pt.c (tsubst_baselink): Likewise.
2124 2012-03-28  Richard Guenther  <rguenther@suse.de>
2126         * typeck2.c (process_init_constructor_array): Use the proper
2127         type for computing the array length.
2129 2012-03-27  Meador Inge  <meadori@codesourcery.com>
2131         PR c++/52672
2132         * semantics.c (cxx_fold_indirect_ref): Don't attempt to fold
2133         stripped child trees that are not pointer types.
2135 2012-03-21  Jason Merrill  <jason@redhat.com>
2137         Implement return type deduction for normal functions with -std=c++1y.
2138         * cp-tree.h (FNDECL_USED_AUTO): New macro.
2139         (LAMBDA_EXPR_DEDUCE_RETURN_TYPE_P): Remove.
2140         (dependent_lambda_return_type_node): Remove.
2141         (CPTI_DEPENDENT_LAMBDA_RETURN_TYPE): Remove.
2142         (struct language_function): Add x_auto_return_pattern field.
2143         (current_function_auto_return_pattern): New.
2144         (enum tsubst_flags): Add tf_partial.
2145         * decl.c (decls_match): Handle auto return comparison.
2146         (duplicate_decls): Adjust error message for auto return.
2147         (cxx_init_decl_processing): Remove dependent_lambda_return_type_node.
2148         (cp_finish_decl): Don't do auto deduction for functions.
2149         (grokdeclarator): Allow auto return without trailing return type in
2150         C++1y mode.
2151         (check_function_type): Defer checking of deduced return type.
2152         (start_preparsed_function): Set current_function_auto_return_pattern.
2153         (finish_function): Set deduced return type to void if not previously
2154         deduced.
2155         * decl2.c (change_return_type): Handle error_mark_node.
2156         (mark_used): Always instantiate functions with deduced return type.
2157         Complain about use if deduction isn't done.
2158         * parser.c (cp_parser_lambda_declarator_opt): Use 'auto' for
2159         initial return type.
2160         (cp_parser_lambda_body): Don't deduce return type in a template.
2161         (cp_parser_conversion_type_id): Allow auto in C++1y.
2162         * pt.c (instantiate_class_template_1): Don't mess with
2163         LAMBDA_EXPR_DEDUCE_RETURN_TYPE_P.
2164         (tsubst_copy_and_build): Likewise.
2165         (fn_type_unification, tsubst): Don't reduce the template parm level
2166         of 'auto' during deduction.
2167         (unify): Compare 'auto' specially.
2168         (get_bindings): Change test.
2169         (always_instantiate_p): Always instantiate functions with deduced
2170         return type.
2171         (do_auto_deduction): Handle error_mark_node and lambda context.
2172         Don't check for use in initializer.
2173         (contains_auto_r): Remove.
2174         * search.c (lookup_conversions_r): Handle auto conversion function.
2175         * semantics.c (lambda_return_type): Handle null return.  Don't mess
2176         with dependent_lambda_return_type_node.
2177         (apply_deduced_return_type): Rename from apply_lambda_return_type.
2178         * typeck.c (merge_types): Handle auto.
2179         (check_return_expr): Do auto deduction.
2180         * typeck2.c (add_exception_specifier): Fix complain check.
2182 2012-03-22  Paolo Carlini  <paolo.carlini@oracle.com>
2184         PR c++/52487
2185         * class.c (check_field_decls): Call literal_type_p only
2186         on complete types.
2188 2012-03-22  Jakub Jelinek  <jakub@redhat.com>
2190         PR c++/52671
2191         * decl.c (check_tag_decl): Only use CLASSTYPE_TEMPLATE_INSTANTIATION
2192         on CLASS_TYPE_P types.
2194 2012-03-20  Jason Merrill  <jason@redhat.com>
2196         * lex.c (init_reswords): Use >= for cxx_dialect test.
2197         * parser.c (cp_parser_exception_specification_opt): Likewise.
2199         * mangle.c (write_type): Handle 'auto'.
2200         * init.c (build_new): Don't do auto deduction where it might
2201         affect template mangling.
2203         PR c++/52510
2204         * decl.c (reshape_init_class): Handle repeated reshaping.
2205         * search.c (lookup_field_1): Add sanity check.
2207 2012-03-19  Paolo Carlini  <paolo.carlini@oracle.com>
2209         PR c++/14710
2210         * cp-tree.h (xvalue_p, maybe_warn_about_useless_cast): Declare.
2211         * tree.c (xvalue_p): Define.
2212         * typeck.c (maybe_warn_about_useless_cast): Define.
2213         (build_reinterpret_cast, build_const_cast,
2214         build_static_cast, cp_build_c_cast): Use maybe_warn_about_useless_cast.
2215         * rtti.c (build_dynamic_cast): Likewise.
2216         * pt.c (tsubst_copy_and_build, case CAST_EXPR): Increment/decrement
2217         c_inhibit_evaluation_warnings before/after the build_* calls.
2219 2012-03-15  Jason Merrill  <jason@redhat.com>
2221         PR c++/52582
2222         * method.c (implicitly_declare_fn): Set DECL_EXTERNAL.
2224 2012-03-15  Manuel LĂłpez-Ibåñez  <manu@gcc.gnu.org>
2226         PR c++/44783
2227         * error.c (print_instantiation_partial_context): Use
2228         template_backtrace_limit.
2230 2012-03-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2232         * Make-lang.in (doc/g++.1): Remove IRIX 6.5 reference.
2234 2012-03-14  Jakub Jelinek  <jakub@redhat.com>
2236         PR c++/52521
2237         * parser.c (lookup_literal_operator): Return fn only if
2238         processed all arguments from args vector and argtypes is
2239         void_list_node.
2241 2012-01-30  Dodji Seketeli  <dodji@redhat.com>
2243         PR c++/51641
2244         * cp-tree.h (template_type_parameter_p): Declare new function.
2245         (parameter_of_template_p): Remove.
2246         * pt.c (template_type_parameter_p): Define new function.
2247         (parameter_of_template_p): Remove.
2248         * name-lookup.c (binding_to_template_parms_of_scope_p): Don't rely
2249         on parameter_of_template_p anymore.  Compare the level of the
2250         template parameter to the depth of the template.
2252 2011-12-15  Dodji Seketeli  <dodji@redhat.com>
2254         * call.c (standard_conversion, build_integral_nontype_arg_conv)
2255         (build_new_op_1, convert_like_real, is_subseq)
2256         (maybe_handle_implicit_object, maybe_handle_ref_bind, compare_ics)
2257         (joust): Use next_conversion instead of accessing fields of struct
2258         conversion directly.
2260 2012-03-12  Paolo Carlini  <paolo.carlini@oracle.com>
2262         PR c++/52299
2263         * pt.c (tsubst_copy_and_build, case COND_EXPR): Avoid bogus
2264         division by zero warnings.
2266 2012-03-08  Paolo Carlini  <paolo.carlini@oracle.com>
2268         * typeck.c (build_array_ref, cp_build_addr_expr_1, convert_ptrmem,
2269         build_ptrmemfunc): Consistently forward the tsubst_flags_t
2270         parameter.
2271         * call.c (resolve_args): Likewise.
2273 2012-03-07  Jason Merrill  <jason@redhat.com>
2275         PR c++/52521
2276         * mangle.c (write_literal_operator_name): The length comes after the
2277         operator prefix.
2279 2012-03-05  Jakub Jelinek  <jakub@redhat.com>
2281         * pt.c (local_specializations): Change from htab_t into
2282         struct pointer_map_t *.
2283         (retrieve_local_specializations, register_local_specialization,
2284         tsubst_pack_expansion, instantiate_decl): Adjust users.
2285         (eq_local_specializations, hash_local_specialization): Remove.
2287 2012-03-05  Jason Merrill  <jason@redhat.com>
2289         PR c++/51930
2290         * decl2.c (determine_visibility): Correct calculation of class
2291         args depth.
2292         * decl.c (check_tag_decl): Adjust warning.
2294         * method.c (synthesized_method_walk): Cleanups don't affect the EH
2295         spec either.
2297 2012-03-03  Jason Merrill  <jason@redhat.com>
2299         * init.c (perform_member_init): Cope with uninstantiated NSDMI.
2301         Core 1270
2302         * call.c (build_aggr_conv): Call reshape_init.
2303         (convert_like_real): Likewise.
2304         * typeck2.c (process_init_constructor): Clear TREE_CONSTANT if
2305         not all constant.
2307         * mangle.c (write_nested_name): Use decl_mangling_context.
2308         (write_prefix, write_template_prefix): Likewise.
2310         PR c++/36797
2311         * mangle.c (write_expression): Improve diagnostic for TRAIT_EXPR.
2313         * class.c (add_method): Always build an OVERLOAD for using-decls.
2314         * search.c (lookup_member): Handle getting an OVERLOAD for a
2315         single function.
2317 2012-03-02  Paolo Carlini  <paolo.carlini@oracle.com>
2319         PR c++/51989
2320         * typeck2.c (build_x_arrow): Take a tsubst_flags_t argument and
2321         propagate it.
2322         * cp-tree.h (build_x_arrow): Adjust prototype.
2323         * pt.c (tsubst_copy_and_build): Adjust call.
2324         * parser.c (cp_parser_postfix_dot_deref_expression): Likewise.
2326 2012-03-02  Paolo Carlini  <paolo.carlini@oracle.com>
2328         * name-lookup.c (binding_to_template_parms_of_scope_p): Clean up.
2330 2012-02-29  Jason Merrill  <jason@redhat.com>
2332         PR c++/51930
2333         * decl.c (check_tag_decl): Move warning for misplaced attributes here.
2334         (shadow_tag): From here.
2335         * parser.c (cp_parser_explicit_instantiation): Don't warn here.
2337 2012-02-21  Jakub Jelinek  <jakub@redhat.com>
2339         PR c++/52312
2340         * typeck.c (check_literal_operator_args): Initialize *long_double_p
2341         and *long_long_unsigned_p even if processing_template_decl.
2343 2012-02-16  Jason Merrill  <jason@redhat.com>
2345         PR c++/52248
2346         * decl.c (define_label): Use timevar_cond_start/stop.
2348 2012-02-16  Fabien ChĂȘne  <fabien@gcc.gnu.org>
2350         PR c++/52126
2351         * decl.c (xref_basetypes): call dependent_scope_p instead of
2352         dependent_type_p.
2354 2012-02-16  Jason Merrill  <jason@redhat.com>
2356         PR c++/51415
2357         * error.c (dump_expr): Handle lambda closures specifically.
2359 2012-02-14  Jason Merrill  <jason@redhat.com>
2361         * parser.c (cp_parser_explicit_instantiation): Give a warning
2362         for ignored attributes on explicit class instantiation.
2364 2012-02-14  Jakub Jelinek  <jakub@redhat.com>
2366         PR c++/52247
2367         * pt.c (tsubst_copy_asm_operands): For LABEL_DECL values call
2368         lookup_label on label's name and set TREE_USED.
2370 2012-02-14  Jason Merrill  <jason@redhat.com>
2372         PR c++/39055
2373         * decl.c (local_variable_p_walkfn): Don't check DECL_ARTIFICIAL.
2375 2012-02-14  Jakub Jelinek  <jakub@redhat.com>
2377         PR c/52181
2378         * decl.c (duplicate_decls): If olddecl has bigger DECL_ALIGN than
2379         newdecl, copy DECL_ALIGN to newdecl and or DECL_USER_ALIGN bits.
2381 2012-02-07  Jason Merrill  <jason@redhat.com>
2383         PR c++/51675
2384         * semantics.c (cx_check_missing_mem_inits): Handle unions.
2385         Fix constexpr default constructor logic.
2387         PR c++/52035
2388         * pt.c (tsubst): Strip uninstantiated typedef.
2390 2012-02-06  Jason Merrill  <jason@redhat.com>
2392         PR c++/52088
2393         * cvt.c (build_expr_type_conversion): Check for template conversion.
2395 2012-01-31  Jason Merrill  <jason@redhat.com>
2397         PR c++/52043
2398         * cp-tree.h (PACK_EXPANSION_LOCAL_P): New.
2399         * pt.c (make_pack_expansion, tsubst_initializer_list): Set it.
2400         (tsubst_pack_expansion): Check it.
2402 2012-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
2404         PR c++/51327
2405         * class.c (explain_non_literal_class): Correctly handle implicitly
2406         deleted constructors.
2408 2012-01-27  Jakub Jelinek  <jakub@redhat.com>
2410         PR c++/51852
2411         * pt.c (tsubst_pack_expansion): Delete and restore
2412         local_specialization whenever need_local_specialization, not just
2413         when saved_local_specializations is non-NULL.
2415 2012-01-26  Paolo Carlini  <paolo.carlini@oracle.com>
2417         PR c++/51370
2418         * error.c (dump_decl, [TEMPLATE_ID_EXPR]): Handle error_mark_node
2419         as TREE_OPERAND (t, 1).
2421 2012-01-24  Jason Merrill  <jason@redhat.com>
2423         PR c++/51917
2424         * decl.c (xref_basetypes): Check VEC_length instead of VEC_space.
2426         PR c++/51973
2427         * tree.c (called_fns_equal): Check template args.
2428         (cp_tree_equal): Call it.
2430 2012-01-24  Aldy Hernandez  <aldyh@redhat.com>
2431             Patrick Marlier  <patrick.marlier@gmail.com>
2433         PR c++/51928
2434         * class.c (set_method_tm_attributes): Use TARGET_THUNK instead of
2435         thunk for set_one_vmethod_tm_attributes.
2437 2012-01-24  Paolo Carlini  <paolo.carlini@oracle.com>
2439         PR c++/51223
2440         * call.c (build_over_call): Check for error_mark_node as
2441         TREE_VALUE when default arguments are processed.
2443 2012-01-23  Jason Merrill  <jason@redhat.com>
2445         PR c++/51930
2446         * decl2.c (determine_visibility): Check for visibility attribute
2447         on template specialization.
2449 2012-01-23  Paolo Carlini  <paolo.carlini@oracle.com>
2451         PR c++/51398
2452         * pt.c (parameter_of_template_p): Skip error_mark_node parameters.
2454 2012-01-23  Jason Merrill  <jason@redhat.com>
2456         PR c++/51925
2457         * class.c (add_method): Set OVL_USED for using-decls.
2458         * tree.c (ovl_scope): New.
2459         * cp-tree.h: Declare it.
2460         * parser.c (cp_parser_template_name): Use it.
2461         * semantics.c (baselink_for_fns): Likewise.
2462         * name-lookup.c (set_inherited_value_binding_p): Likewise.
2464 2012-01-20  Paolo Carlini  <paolo.carlini@oracle.com>
2466         PR c++/51402
2467         * pt.c (lookup_template_class_1): Check context returned by
2468         tsubst for error_mark_node.
2470 2012-01-19  Kai Tietz  <ktietz@redhat.com>
2472         PR c++/51344
2473         * decl2.c (save_template_attributes): Use merge_attributes
2474         instead of chaining up via TREE_CHAIN.
2476 2012-01-19  Jason Merrill  <jason@redhat.com>
2478         PR c++/51889
2479         * class.c (finish_struct): Call add_method here for function usings.
2480         * semantics.c (finish_member_declaration): Not here.
2482 2012-01-18  Paolo Carlini  <paolo.carlini@oracle.com>
2484         PR c++/51225
2485         * typeck2.c (store_init_value): Within a template guard
2486         cxx_constant_value with require_potential_constant_expression.
2487         * pt.c (convert_nontype_argument): Likewise.
2489 2012-01-16  Jakub Jelinek  <jakub@redhat.com>
2491         PR c++/51854
2492         * mangle.c (write_template_arg_literal): Handle complex.
2494 2012-01-16  Jason Merrill  <jason@redhat.com>
2496         PR c++/51827
2497         * mangle.c (mangle_decl): Don't mangle uninstantiated templates.
2499         PR c++/51868
2500         * typeck.c (build_static_cast_1): Handle bit-fields properly.
2502 2012-01-13  Ian Lance Taylor  <iant@google.com>
2504         PR c++/50012
2505         * typeck.c (enum_cast_to_int): New static function.
2506         (cp_build_binary_op): When handling warn_sign_compare, don't test
2507         for TREE_NO_WARNING.  Do call enum_cast_to_int.
2508         * call.c (avoid_sign_compare_warnings): Remove static function.
2509         (build_new_op_1): Don't call avoid_sign_compare_warnings.
2511 2012-01-13  Steven Bosscher  <steven@gcc.gnu.org>
2513         * decl2.c: Do not include tree-mudflap.h
2514         * semantics.c: Likewise.
2516 2012-01-13  Jason Merrill  <jason@redhat.com>
2518         PR c++/20681
2519         * semantics.c (finish_break_stmt): Avoid adding an unreachable
2520         BREAK_STMT.
2522         PR c++/51813
2523         * decl2.c (constrain_visibility): Clear DECL_VISIBILITY_SPECIFIED
2524         when reducing the visibility.
2526         PR c++/51620
2527         * class.c (build_vtbl_initializer): Use __cxa_deleted_virtual.
2529 2012-01-12  Jason Merrill  <jason@redhat.com>
2531         PR c++/51714
2532         * pt.c (value_dependent_expression_p): Treat STMT_EXPR as
2533         value-dependent.
2535 2012-01-13  Dodji Seketeli  <dodji@redhat.com>
2537         PR c++/51633
2538         * semantics.c (cp_parser_ctor_initializer_opt_and_function_body):
2539         Set the pointer to the last block of the constructor to the
2540         current statement.
2541         (build_constexpr_constructor_member_initializers): Get
2542         build_data_member_initialization a chance to deal with more
2543         statements before we choke.
2545 2012-01-12  Jason Merrill  <jason@redhat.com>
2547         PR c++/48051
2548         * mangle.c (write_expression): Mangle BASELINK scope if
2549         BASELINK_QUALIFIED_P.
2550         * search.c (adjust_result_of_qualified_name_lookup): Set
2551         BASELINK_QUALIFIED_P.
2552         * tree.c (cp_tree_equal) [BASELINK]: Compare BASELINK_QUALIFIED_P.
2553         * parser.c (cp_parser_postfix_dot_deref_expression): Don't call
2554         adjust_result_of_qualified_name_lookup for non-qualified names.
2556         PR c++/51403
2557         * pt.c (unify): Handle error_mark_node.
2559 2012-01-11  Jason Merrill  <jason@redhat.com>
2561         PR c++/51565
2562         * call.c (standard_conversion): For ptrmemfuncs, compare the
2563         static_fn_types.
2565         PR c++/51818
2566         * mangle.c (find_substitution): A type is only a substitution
2567         match if we're looking for a type.
2568         (write_nested_name): Use decl_mangling_context.
2570         * decl.c (decls_match): Assert that the arguments are decls.
2572         PR c++/51613
2573         * pt.c (resolve_overloaded_unification): Compare types with
2574         same_type_p, not decls_match.
2576 2012-01-10  Jason Merrill  <jason@redhat.com>
2578         PR c++/51614
2579         * class.c (build_base_path): Diagnose ambiguous base.
2581         PR c++/51433
2582         * semantics.c (cxx_eval_call_expression): Always retry previously
2583         non-constant expressions.
2585 2012-01-06  Jason Merrill  <jason@redhat.com>
2587         DR 686
2588         PR c++/47450
2589         * parser.c (cp_parser_new_expression): Set
2590         type_definition_forbidden_message.
2592         PR c++/6057
2593         PR c++/48051
2594         PR c++/50855
2595         PR c++/51322
2596         * mangle.c (write_expression): Support NEW_EXPR, DELETE_EXPR,
2597         THROW_EXPR, CONSTRUCTOR, OVERLOAD.  Fix PREINCREMENT_EXPR and
2598         PREDECREMENT_EXPR.
2599         (write_template_arg): Fix mangling of class-scope functions and
2600         argument packs.
2601         (mangle_decl): Update suggested -fabi-version argument.
2602         * operators.def: Add DOTSTAR_EXPR, REINTERPRET_CAST_EXPR,
2603         DYNAMIC_CAST_EXPR; correct CONST_CAST_EXPR, STATIC_CAST_EXPR.
2604         * tree.c (dependent_name): No longer static.
2605         * cp-tree.h: Declare it.
2606         * pt.c (unify): Defer handling of unconverted functions.
2608         * mangle.c (mangle_decl): Don't generate mangling aliases
2609         for maybe-in-charge [cd]tors.
2611         * error.c (dump_expr): Print type of CONSTRUCTOR.
2613 2012-01-05  Dodji Seketeli  <dodji@redhat.com>
2615         PR c++/51541
2616         * parser.c (cp_parser_alias_declaration): Get out early upon
2617         errors in the identifier or the attributes.
2619 2012-01-04  Paolo Carlini  <paolo.carlini@oracle.com>
2621         PR c++/51064
2622         * pt.c (tsubst_copy_and_build): Maybe set TREE_NO_WARNING on
2623         the tree returned by build_x_binary_op.
2625 2012-01-03  Paolo Carlini  <paolo.carlini@oracle.com>
2627         PR c++/51738
2628         * parser.c (cp_parser_postfix_open_square_expression): Handle
2629         postfix-expression [ braced-init-list ].
2631 2012-01-03  Paolo Carlini  <paolo.carlini@oracle.com>
2633         PR c++/29273
2634         * rtti.c (build_dynamic_cast_1): In case of T a pointer type,
2635         call decay_conversion on v.
2637 2012-01-03  Paolo Carlini  <paolo.carlini@oracle.com>
2639         PR c++/15867
2640         * decl.c (duplicate_decls): With -Wredundant-decls don't warn for
2641         declaration followed by specialization.
2643 2012-01-03  Jakub Jelinek  <jakub@redhat.com>
2645         PR c++/51669
2646         * semantics.c (finish_omp_clauses): Call fold_build_cleanup_point_expr
2647         on OMP_CLAUSE_{IF,FINAL,NUM_THREADS,SCHEDULE_CHUNK}_EXPR.
2649 2012-01-02  Jason Merrill  <jason@redhat.com>
2651         DR 1359
2652         PR c++/51675
2653         * method.c (walk_field_subobs): Don't check for uninitialized
2654         fields in a union.
2655         (synthesized_method_walk): Check here.
2657         DR 325
2658         PR c++/51666
2659         * parser.c (cp_parser_cache_defarg): Split out...
2660         (cp_parser_parameter_declaration): ...from here.
2661         (cp_parser_save_nsdmi): Use it.
2662         (cp_parser_cache_group): Remove CPP_COMMA support.
2664 2012-01-02  Dodji Seketeli  <dodji@redhat.com>
2666         PR c++/51462
2667         * semantics.c (cx_check_missing_mem_inits): Don't assert in case
2668         of error.
2670 2012-01-02  Paolo Carlini  <paolo.carlini@oracle.com>
2672         PR c++/20140
2673         * typeck2.c (digest_init_r): Use copy_init when initializing
2674         an array of chars.
2676 2012-01-01  Paolo Carlini  <paolo.carlini@oracle.com>
2678         PR c++/16603
2679         * decl.c (build_enumerator): Don't call perform_integral_promotions
2680         on the value.
2682 2012-01-01  Paolo Carlini  <paolo.carlini@oracle.com>
2684         PR c++/51379
2685         * typeck.c (build_reinterpret_cast_1): Implement resolution of
2686         DR 799.
2688 2012-01-01  Fabien ChĂȘne  <fabien@gcc.gnu.org>
2690         * parser.c (cp_parser_using_declaration): Add a warning about
2691         deprecated access declarations when no errors were encountered
2692         while parsing the access declaration. Save the first token in
2693         order to emit the warning at the right place.
2695 Copyright (C) 2012 Free Software Foundation, Inc.
2697 Copying and distribution of this file, with or without modification,
2698 are permitted in any medium without royalty provided the copyright
2699 notice and this notice are preserved.