]> gcc.gnu.org Git - gcc.git/blame - gcc/cp/ChangeLog
[PR c++/86610] lambda captures in templates
[gcc.git] / gcc / cp / ChangeLog
CommitLineData
e32fc449
NS
12019-01-17 Nathan Sidwell <nathan@acm.org>
2
3 PR c++/86610
4 * semantics.c (process_outer_var_ref): Only skip dependent types
5 in templates.
6
b25a3756
AO
72019-01-17 Alexandre Oliva <aoliva@redhat.com>
8
b00e9be0
AO
9 PR c++/87768
10 * cp-tree.h (saved_scope): Add suppress_location_wrappers.
11 * name-lookup.c (do_push_to_top_level): Save and reset it.
12 (do_pop_from_top_level): Restore it.
13
33f746e5
AO
14 PR c++/86648
15 * pt.c (make_template_placeholder): Use auto_identifier.
16 (is_auto): Drop CLASS_PLACEHOLDER_TEMPLATE test.
17 * error.c (dump_type): Handle template placeholders.
18 * cxx-pretty-print.c (pp_cx_unqualified_id): Likewise.
19
b25a3756
AO
20 PR c++/88146
21 * cvt.c (convert_to_void): Handle all cdtor calls as if
22 returning void.
23
59ec4914
PC
242019-01-16 Paolo Carlini <paolo.carlini@oracle.com>
25
26 * decl.c (grokdeclarator): Use locations[ds_storage_class] in
27 error messages about ill-formed uses of mutable.
28
2ea2a74d
MP
292019-01-16 Marek Polacek <polacek@redhat.com>
30
31 PR c++/78244 - narrowing conversion in template not detected.
32 * call.c (perform_implicit_conversion_flags): Set
33 IMPLICIT_CONV_EXPR_BRACED_INIT.
34 * cp-tree.h (IMPLICIT_CONV_EXPR_BRACED_INIT): New.
35 * pt.c (tsubst_copy_and_build): Use it.
36
1abb44f8
DM
372019-01-15 David Malcolm <dmalcolm@redhat.com>
38
39 PR c++/88795
40 * pt.c (build_deduction_guide): Bail out if tsubst_arg_types
41 fails.
42
079a6680
PC
432019-01-15 Paolo Carlini <paolo.carlini@oracle.com>
44
45 * decl.c (start_decl): Improve error location.
46 * decl2.c (grokfield): Likewise.
47
482019-01-15 Paolo Carlini <paolo.carlini@oracle.com>
49
50 * decl.c (grokdeclarator): Move further up the location_t loc
51 declaration and use the location when building a TYPE_DECL for
52 a typedef name.
53 * decl2.c (grokbitfield): Use DECL_SOURCE_LOCATION in the error
54 about an ill-formed bit-field as typedef.
55
345364cf
MP
562019-01-14 Marek Polacek <polacek@redhat.com>
57
58 PR c++/88830 - ICE with abstract class.
59 * decl2.c (maybe_emit_vtables): Check CLASSTYPE_LAZY_DESTRUCTOR.
60 Fix formatting.
61
f80aa399
MP
62 PR c++/88825 - ICE with bogus function return type deduction.
63 * typeck.c (can_do_nrvo_p): Check error_mark_node.
64
2d91f79d
TH
652019-01-14 Tom Honermann <tom@honermann.net>
66
67 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
68 * cvt.c (type_promotes_to): Handle char8_t promotion.
69 * decl.c (grokdeclarator): Handle invalid type specifier
70 combinations involving char8_t.
71 * lex.c (init_reswords): Add char8_t as a reserved word.
72 * mangle.c (write_builtin_type): Add name mangling for char8_t (Du).
73 * parser.c (cp_keyword_starts_decl_specifier_p)
74 (cp_parser_simple_type_specifier): Recognize char8_t as a simple
75 type specifier.
76 (cp_parser_string_literal): Use char8_array_type_node for the type
77 of CPP_UTF8STRING.
78 (cp_parser_set_decl_spec_type): Tolerate char8_t typedefs in system
79 headers.
80 * rtti.c (emit_support_tinfos): type_info support for char8_t.
81 * tree.c (char_type_p): Recognize char8_t as a character type.
82 * typeck.c (string_conv_p): Handle conversions of u8 string
83 literals of char8_t type.
84 (check_literal_operator_args): Handle UDLs with u8 string literals
85 of char8_t type.
86 * typeck2.c (ordinary_char_type_p): New.
87 (digest_init_r): Disallow initializing a char array with a u8 string
88 literal.
89
15f4e33d
ML
902019-01-14 Martin Liska <mliska@suse.cz>
91
92 PR gcov-profile/88263
93 * decl2.c (get_tls_wrapper_fn): Use DECL_SOURCE_LOCATION
94 as location of the TLS wrapper.
95
062ab459
PC
962019-01-12 Paolo Carlini <paolo.carlini@oracle.com>
97
98 * decl.c (cp_finish_decl): Improve error location.
99 * decl2.c (grokfield): Likewise, improve two locations.
100
1439f355
MP
1012019-01-11 Marek Polacek <polacek@redhat.com>
102
103 PR c++/88692, c++/87882 - -Wredundant-move false positive with *this.
104 * typeck.c (maybe_warn_pessimizing_move): Return if ARG isn't
105 ADDR_EXPR.
106
3ddf08b3
JM
1072019-01-11 Jason Merrill <jason@redhat.com>
108
109 PR c++/88312 - pack expansion of decltype.
110 * pt.c (instantiation_dependent_r): A template non-type parameter
111 pack is instantiation-dependent.
112
f43e0585
JM
1132019-01-11 Jason Merrill <jason@redhat.com>
114
115 PR c++/88613 - ICE with use of const var in lambda.
116 * expr.c (mark_use): Fix location wrapper handling.
117 * cp-gimplify.c (cp_fold_maybe_rvalue): Call mark_rvalue_use.
118
b13091dd
TB
1192019-01-11 Tobias Burnus <burnus@net-b.de>
120
121 PR C++/88114
122 * decl2.c (maybe_emit_vtables): If needed, generate code for
123 the destructor of an abstract class.
124 (mark_used): Update comment for older function-name change.
125
a8766179
PC
1262019-01-11 Paolo Carlini <paolo.carlini@oracle.com>
127
128 * decl.c (start_decl): Improve error location.
129 (grokdeclarator): Likewise, improve two locations.
130
67914693
SL
1312019-01-09 Sandra Loosemore <sandra@codesourcery.com>
132
133 PR other/16615
134
135 * cp-tree.h: Mechanically replace "can not" with "cannot".
136 * parser.c: Likewise.
137 * pt.c: Likewise.
138
73075e06
PC
1392019-01-08 Paolo Carlini <paolo.carlini@oracle.com>
140
141 * decl.c (grok_reference_init): Improve error location.
142 (grokdeclarator): Likewise, improve two locations.
143
e01ffb47
MP
1442019-01-08 Marek Polacek <polacek@redhat.com>
145
96e768c3
MP
146 PR c++/88538 - braced-init-list in template-argument-list.
147 * parser.c (cp_parser_template_argument): Handle braced-init-list when
148 in C++20.
149
e01ffb47
MP
150 PR c++/88548 - this accepted in static member functions.
151 * parser.c (cp_debug_parser): Adjust printing of
152 local_variables_forbidden_p.
153 (cp_parser_new): Set local_variables_forbidden_p to 0 rather than false.
154 (cp_parser_primary_expression): When checking
155 local_variables_forbidden_p, use THIS_FORBIDDEN or
156 LOCAL_VARS_FORBIDDEN.
157 (cp_parser_lambda_body): Update the type of
158 local_variables_forbidden_p. Set it to 0 rather than false.
159 (cp_parser_condition): Adjust call to cp_parser_declarator.
160 (cp_parser_explicit_instantiation): Likewise.
161 (cp_parser_init_declarator): Likewise.
162 (cp_parser_declarator): New parameter. Use it.
163 (cp_parser_direct_declarator): New parameter. Use it to set
164 local_variables_forbidden_p. Adjust call to cp_parser_declarator.
165 (cp_parser_type_id_1): Adjust call to cp_parser_declarator.
166 (cp_parser_parameter_declaration): Likewise.
167 (cp_parser_default_argument): Update the type of
168 local_variables_forbidden_p. Set it to LOCAL_VARS_AND_THIS_FORBIDDEN
169 rather than true.
170 (cp_parser_member_declaration): Tell cp_parser_declarator if we saw
171 'static' or 'friend'.
172 (cp_parser_exception_declaration): Adjust call to cp_parser_declarator.
173 (cp_parser_late_parsing_default_args): Update the type of
174 local_variables_forbidden_p. Set it to LOCAL_VARS_AND_THIS_FORBIDDEN
175 rather than true.
176 (cp_parser_cache_defarg): Adjust call to cp_parser_declarator.
177 (cp_parser_objc_class_ivars): Likewise.
178 (cp_parser_objc_struct_declaration): Likewise.
179 (cp_parser_omp_for_loop_init): Likewise.
180 * parser.h (cp_parser): Change the type of local_variables_forbidden_p
181 to unsigned char.
182 (LOCAL_VARS_FORBIDDEN, LOCAL_VARS_AND_THIS_FORBIDDEN, THIS_FORBIDDEN):
183 Define.
184
30fa2068
PC
1852019-01-08 Paolo Carlini <paolo.carlini@oracle.com>
186
187 * decl.c (start_decl): Improve permerror location.
188
ff0425cd
JW
1892019-01-08 Jonathan Wakely <jwakely@redhat.com>
190 Jakub Jelinek <jakub@redhat.com>
191
192 PR c++/88554
193 * decl.c (finish_function): For -Wreturn-type don't add a return *this;
194 fixit hint if current_class_ref is NULL. Use a single if instead of
195 two nested ones.
196
2c86a574
PC
1972019-01-07 Paolo Carlini <paolo.carlini@oracle.com>
198
199 * decl.c (start_decl): Improve two error_at locations.
200 (expand_static_init): Likewise.
201
25a34b02
MP
2022019-01-07 Marek Polacek <polacek@redhat.com>
203
204 PR c++/88741 - wrong error with initializer-string.
205 * decl.c (cp_complete_array_type): Strip any location wrappers.
206
08c35030
BE
2072019-01-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
208
209 PR c++/88261
210 PR c++/69338
211 PR c++/69696
212 PR c++/69697
213 * cp-tree.h (LOOKUP_ALLOW_FLEXARRAY_INIT): New flag value.
214 * typeck2.c (digest_init_r): Raise an error for non-static
215 initialization of a flexible array member.
216 (process_init_constructor, massage_init_elt,
217 process_init_constructor_array, process_init_constructor_record,
218 process_init_constructor_union, process_init_constructor): Add the
219 flags parameter and pass it thru.
220 (store_init_value): Pass LOOKUP_ALLOW_FLEXARRAY_INIT parameter to
221 digest_init_flags for static decls.
222
d8fcab68
JJ
2232019-01-07 Jakub Jelinek <jakub@redhat.com>
224
225 PR c++/85052
226 * cp-tree.h (cp_build_vec_convert): Declare.
227 * parser.c (cp_parser_postfix_expression): Parse
228 __builtin_convertvector.
229 * constexpr.c: Include fold-const-call.h.
230 (cxx_eval_internal_function): Handle IFN_VEC_CONVERT.
231 (potential_constant_expression_1): Likewise.
232 * semantics.c (cp_build_vec_convert): New function.
233 * pt.c (tsubst_copy_and_build): Handle CALL_EXPR to
234 IFN_VEC_CONVERT.
235
cc3dac97
JJ
2362019-01-03 Jakub Jelinek <jakub@redhat.com>
237
238 PR c++/88636
239 * decl.c (builtin_function_1): Return result of pushdecl_top_level
240 or pushdecl rather than decl.
241
7dae2950
PC
2422019-01-03 Paolo Carlini <paolo.carlini@oracle.com>
243
244 * tree.c (handle_nodiscard_attribute): Improve warning location.
245
5b81a980
MP
2462019-01-02 Marek Polacek <polacek@redhat.com>
247
248 PR c++/88612 - ICE with -Waddress-of-packed-member.
249 * call.c (convert_for_arg_passing): Only give warnings with tf_warning.
250 * typeck.c (convert_for_assignment): Likewise.
251
29bb9224
MP
252 PR c++/88631 - CTAD failing for value-initialization.
253 * typeck2.c (build_functional_cast): Try deducing the template
254 arguments even if there are no arguments to deduce from.
255
a5544970 2562019-01-01 Jakub Jelinek <jakub@redhat.com>
19c37faa 257
85ec4feb 258 Update copyright years.
ad41bd84 259\f
a5544970 260Copyright (C) 2019 Free Software Foundation, Inc.
ad41bd84
JM
261
262Copying and distribution of this file, with or without modification,
263are permitted in any medium without royalty provided the copyright
264notice and this notice are preserved.
This page took 3.866711 seconds and 5 git commands to generate.