PR C++/88114 Gen destructor of an abstract class
[official-gcc.git] / gcc / cp / ChangeLog
blob5a5256f13fc5b5d57cbe4eb7ce8dfe1a96e274c3
1 2019-01-11  Tobias Burnus  <burnus@net-b.de>
3         PR C++/88114
4         * decl2.c (maybe_emit_vtables): If needed, generate code for
5         the destructor of an abstract class.
6         (mark_used): Update comment for older function-name change.
8 2019-01-11  Paolo Carlini  <paolo.carlini@oracle.com>
10         * decl.c (start_decl): Improve error location.
11         (grokdeclarator): Likewise, improve two locations.
13 2019-01-09  Sandra Loosemore  <sandra@codesourcery.com>
15         PR other/16615
17         * cp-tree.h: Mechanically replace "can not" with "cannot".
18         * parser.c: Likewise.
19         * pt.c: Likewise.
21 2019-01-08  Paolo Carlini  <paolo.carlini@oracle.com>
23         * decl.c (grok_reference_init): Improve error location.
24         (grokdeclarator): Likewise, improve two locations.
26 2019-01-08  Marek Polacek  <polacek@redhat.com>
28         PR c++/88538 - braced-init-list in template-argument-list.
29         * parser.c (cp_parser_template_argument): Handle braced-init-list when
30         in C++20.
32         PR c++/88548 - this accepted in static member functions.
33         * parser.c (cp_debug_parser): Adjust printing of
34         local_variables_forbidden_p.
35         (cp_parser_new): Set local_variables_forbidden_p to 0 rather than false.
36         (cp_parser_primary_expression): When checking
37         local_variables_forbidden_p, use THIS_FORBIDDEN or
38         LOCAL_VARS_FORBIDDEN.
39         (cp_parser_lambda_body): Update the type of
40         local_variables_forbidden_p.  Set it to 0 rather than false.
41         (cp_parser_condition): Adjust call to cp_parser_declarator.
42         (cp_parser_explicit_instantiation): Likewise.
43         (cp_parser_init_declarator): Likewise.
44         (cp_parser_declarator): New parameter.  Use it.
45         (cp_parser_direct_declarator): New parameter.  Use it to set
46         local_variables_forbidden_p.  Adjust call to cp_parser_declarator.
47         (cp_parser_type_id_1): Adjust call to cp_parser_declarator.
48         (cp_parser_parameter_declaration): Likewise.
49         (cp_parser_default_argument): Update the type of
50         local_variables_forbidden_p.  Set it to LOCAL_VARS_AND_THIS_FORBIDDEN
51         rather than true.
52         (cp_parser_member_declaration): Tell cp_parser_declarator if we saw
53         'static' or 'friend'.
54         (cp_parser_exception_declaration): Adjust call to cp_parser_declarator.
55         (cp_parser_late_parsing_default_args): Update the type of
56         local_variables_forbidden_p.  Set it to LOCAL_VARS_AND_THIS_FORBIDDEN
57         rather than true.
58         (cp_parser_cache_defarg): Adjust call to cp_parser_declarator.
59         (cp_parser_objc_class_ivars): Likewise.
60         (cp_parser_objc_struct_declaration): Likewise.
61         (cp_parser_omp_for_loop_init): Likewise.
62         * parser.h (cp_parser): Change the type of local_variables_forbidden_p
63         to unsigned char.
64         (LOCAL_VARS_FORBIDDEN, LOCAL_VARS_AND_THIS_FORBIDDEN, THIS_FORBIDDEN):
65         Define.
67 2019-01-08  Paolo Carlini  <paolo.carlini@oracle.com>
69         * decl.c (start_decl): Improve permerror location.
71 2019-01-08  Jonathan Wakely  <jwakely@redhat.com>
72             Jakub Jelinek  <jakub@redhat.com>
74         PR c++/88554
75         * decl.c (finish_function): For -Wreturn-type don't add a return *this;
76         fixit hint if current_class_ref is NULL.  Use a single if instead of
77         two nested ones.
79 2019-01-07  Paolo Carlini  <paolo.carlini@oracle.com>
81         * decl.c (start_decl): Improve two error_at locations.
82         (expand_static_init): Likewise.
84 2019-01-07  Marek Polacek  <polacek@redhat.com>
86         PR c++/88741 - wrong error with initializer-string.
87         * decl.c (cp_complete_array_type): Strip any location wrappers.
89 2019-01-07  Bernd Edlinger  <bernd.edlinger@hotmail.de>
91         PR c++/88261
92         PR c++/69338
93         PR c++/69696
94         PR c++/69697
95         * cp-tree.h (LOOKUP_ALLOW_FLEXARRAY_INIT): New flag value.
96         * typeck2.c (digest_init_r): Raise an error for non-static
97         initialization of a flexible array member.
98         (process_init_constructor, massage_init_elt,
99         process_init_constructor_array, process_init_constructor_record,
100         process_init_constructor_union, process_init_constructor): Add the
101         flags parameter and pass it thru.
102         (store_init_value): Pass LOOKUP_ALLOW_FLEXARRAY_INIT parameter to
103         digest_init_flags for static decls.
105 2019-01-07  Jakub Jelinek  <jakub@redhat.com>
107         PR c++/85052
108         * cp-tree.h (cp_build_vec_convert): Declare.
109         * parser.c (cp_parser_postfix_expression): Parse
110         __builtin_convertvector.
111         * constexpr.c: Include fold-const-call.h.
112         (cxx_eval_internal_function): Handle IFN_VEC_CONVERT.
113         (potential_constant_expression_1): Likewise.
114         * semantics.c (cp_build_vec_convert): New function.
115         * pt.c (tsubst_copy_and_build): Handle CALL_EXPR to
116         IFN_VEC_CONVERT.
118 2019-01-03  Jakub Jelinek  <jakub@redhat.com>
120         PR c++/88636
121         * decl.c (builtin_function_1): Return result of pushdecl_top_level
122         or pushdecl rather than decl.
124 2019-01-03  Paolo Carlini  <paolo.carlini@oracle.com>
126         * tree.c (handle_nodiscard_attribute): Improve warning location.
128 2019-01-02  Marek Polacek  <polacek@redhat.com>
130         PR c++/88612 - ICE with -Waddress-of-packed-member.
131         * call.c (convert_for_arg_passing): Only give warnings with tf_warning.
132         * typeck.c (convert_for_assignment): Likewise.
134         PR c++/88631 - CTAD failing for value-initialization.
135         * typeck2.c (build_functional_cast): Try deducing the template
136         arguments even if there are no arguments to deduce from.
138 2019-01-01  Jakub Jelinek  <jakub@redhat.com>
140         Update copyright years.
142 Copyright (C) 2019 Free Software Foundation, Inc.
144 Copying and distribution of this file, with or without modification,
145 are permitted in any medium without royalty provided the copyright
146 notice and this notice are preserved.