]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/cp/ChangeLog
2019-01-21 Dominique d'Humieres <dominiq@gcc.gnu.org>
[thirdparty/gcc.git] / gcc / cp / ChangeLog
CommitLineData
99bf4b63 12019-01-21 Jakub Jelinek <jakub@redhat.com>
2
3 PR sanitizer/88901
4 * typeck.c (cp_build_binary_op): Don't instrument
5 SANITIZE_POINTER_COMPARE if processing_template_decl.
6 (pointer_diff): Similarly for SANITIZE_POINTER_SUBTRACT.
7
ecd2d842 82019-01-18 Jason Merrill <jason@redhat.com>
9
10 PR c++/88875 - error with explicit list constructor.
11 * call.c (reference_binding): Don't modify EXPR. Set
12 need_temporary_p on the ck_user conversion for a temporary.
13 (convert_like_real): Check it.
14
6d4e8a95 152019-01-18 H.J. Lu <hongjiu.lu@intel.com>
16
17 PR c/51628
18 PR c/88664
19 * call.c (convert_for_arg_passing): Upate the
20 warn_for_address_or_pointer_of_packed_member call.
21 * typeck.c (convert_for_assignment): Likewise.
22
9d3c4130 232019-01-17 Jason Merrill <jason@redhat.com>
24
bc9c0483 25 PR c++/86205 - ICE with ?: of throw and template-id.
26 * pt.c (resolve_nondeduced_context_or_error): Split out from...
27 * typeck.c (decay_conversion): ...here.
28 * call.c (build_conditional_expr_1): Use it.
29
9d3c4130 30 PR c++/86740, ICE with constexpr if and nested generic lambdas.
31 * tree.c (cp_walk_subtrees): Handle LAMBDA_EXPR.
32
0f910e62 332019-01-17 Paolo Carlini <paolo.carlini@oracle.com>
34
35 * decl.c (grokdeclarator): Use typespec_loc in error messages
36 about 'auto' and trailing return type.
37
098cc8f0 382019-01-17 David Malcolm <dmalcolm@redhat.com>
39
40 PR c++/88699
41 * class.c (add_method): Don't use DECL_DESTRUCTOR_P on
42 USING_DECLs.
43
a395125a 442019-01-17 Nathan Sidwell <nathan@acm.org>
45
46 PR c++/86610
47 * semantics.c (process_outer_var_ref): Only skip dependent types
48 in templates.
49
5461905d 502019-01-17 Alexandre Oliva <aoliva@redhat.com>
51
c5f929a4 52 PR c++/87768
53 * cp-tree.h (saved_scope): Add suppress_location_wrappers.
54 * name-lookup.c (do_push_to_top_level): Save and reset it.
55 (do_pop_from_top_level): Restore it.
56
f97941b7 57 PR c++/86648
58 * pt.c (make_template_placeholder): Use auto_identifier.
59 (is_auto): Drop CLASS_PLACEHOLDER_TEMPLATE test.
60 * error.c (dump_type): Handle template placeholders.
61 * cxx-pretty-print.c (pp_cx_unqualified_id): Likewise.
62
5461905d 63 PR c++/88146
64 * cvt.c (convert_to_void): Handle all cdtor calls as if
65 returning void.
66
b92cc3ed 672019-01-16 Paolo Carlini <paolo.carlini@oracle.com>
68
69 * decl.c (grokdeclarator): Use locations[ds_storage_class] in
70 error messages about ill-formed uses of mutable.
71
9fc2172c 722019-01-16 Marek Polacek <polacek@redhat.com>
73
74 PR c++/78244 - narrowing conversion in template not detected.
75 * call.c (perform_implicit_conversion_flags): Set
76 IMPLICIT_CONV_EXPR_BRACED_INIT.
77 * cp-tree.h (IMPLICIT_CONV_EXPR_BRACED_INIT): New.
78 * pt.c (tsubst_copy_and_build): Use it.
79
727d210b 802019-01-15 David Malcolm <dmalcolm@redhat.com>
81
82 PR c++/88795
83 * pt.c (build_deduction_guide): Bail out if tsubst_arg_types
84 fails.
85
39a51021 862019-01-15 Paolo Carlini <paolo.carlini@oracle.com>
87
88 * decl.c (start_decl): Improve error location.
89 * decl2.c (grokfield): Likewise.
90
912019-01-15 Paolo Carlini <paolo.carlini@oracle.com>
92
93 * decl.c (grokdeclarator): Move further up the location_t loc
94 declaration and use the location when building a TYPE_DECL for
95 a typedef name.
96 * decl2.c (grokbitfield): Use DECL_SOURCE_LOCATION in the error
97 about an ill-formed bit-field as typedef.
98
affca1c8 992019-01-14 Marek Polacek <polacek@redhat.com>
100
101 PR c++/88830 - ICE with abstract class.
102 * decl2.c (maybe_emit_vtables): Check CLASSTYPE_LAZY_DESTRUCTOR.
103 Fix formatting.
104
9f8a8956 105 PR c++/88825 - ICE with bogus function return type deduction.
106 * typeck.c (can_do_nrvo_p): Check error_mark_node.
107
82362779 1082019-01-14 Tom Honermann <tom@honermann.net>
109
110 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
111 * cvt.c (type_promotes_to): Handle char8_t promotion.
112 * decl.c (grokdeclarator): Handle invalid type specifier
113 combinations involving char8_t.
114 * lex.c (init_reswords): Add char8_t as a reserved word.
115 * mangle.c (write_builtin_type): Add name mangling for char8_t (Du).
116 * parser.c (cp_keyword_starts_decl_specifier_p)
117 (cp_parser_simple_type_specifier): Recognize char8_t as a simple
118 type specifier.
119 (cp_parser_string_literal): Use char8_array_type_node for the type
120 of CPP_UTF8STRING.
121 (cp_parser_set_decl_spec_type): Tolerate char8_t typedefs in system
122 headers.
123 * rtti.c (emit_support_tinfos): type_info support for char8_t.
124 * tree.c (char_type_p): Recognize char8_t as a character type.
125 * typeck.c (string_conv_p): Handle conversions of u8 string
126 literals of char8_t type.
127 (check_literal_operator_args): Handle UDLs with u8 string literals
128 of char8_t type.
129 * typeck2.c (ordinary_char_type_p): New.
130 (digest_init_r): Disallow initializing a char array with a u8 string
131 literal.
132
bf4eb32b 1332019-01-14 Martin Liska <mliska@suse.cz>
134
135 PR gcov-profile/88263
136 * decl2.c (get_tls_wrapper_fn): Use DECL_SOURCE_LOCATION
137 as location of the TLS wrapper.
138
2fa582a9 1392019-01-12 Paolo Carlini <paolo.carlini@oracle.com>
140
141 * decl.c (cp_finish_decl): Improve error location.
142 * decl2.c (grokfield): Likewise, improve two locations.
143
0b5957b9 1442019-01-11 Marek Polacek <polacek@redhat.com>
145
146 PR c++/88692, c++/87882 - -Wredundant-move false positive with *this.
147 * typeck.c (maybe_warn_pessimizing_move): Return if ARG isn't
148 ADDR_EXPR.
149
d07c152b 1502019-01-11 Jason Merrill <jason@redhat.com>
151
152 PR c++/88312 - pack expansion of decltype.
153 * pt.c (instantiation_dependent_r): A template non-type parameter
154 pack is instantiation-dependent.
155
0c2ebbc4 1562019-01-11 Jason Merrill <jason@redhat.com>
157
158 PR c++/88613 - ICE with use of const var in lambda.
159 * expr.c (mark_use): Fix location wrapper handling.
160 * cp-gimplify.c (cp_fold_maybe_rvalue): Call mark_rvalue_use.
161
1b2f170e 1622019-01-11 Tobias Burnus <burnus@net-b.de>
163
164 PR C++/88114
165 * decl2.c (maybe_emit_vtables): If needed, generate code for
166 the destructor of an abstract class.
167 (mark_used): Update comment for older function-name change.
168
b385e516 1692019-01-11 Paolo Carlini <paolo.carlini@oracle.com>
170
171 * decl.c (start_decl): Improve error location.
172 (grokdeclarator): Likewise, improve two locations.
173
f4d3c071 1742019-01-09 Sandra Loosemore <sandra@codesourcery.com>
175
176 PR other/16615
177
178 * cp-tree.h: Mechanically replace "can not" with "cannot".
179 * parser.c: Likewise.
180 * pt.c: Likewise.
181
7cc45975 1822019-01-08 Paolo Carlini <paolo.carlini@oracle.com>
183
184 * decl.c (grok_reference_init): Improve error location.
185 (grokdeclarator): Likewise, improve two locations.
186
90e20c9c 1872019-01-08 Marek Polacek <polacek@redhat.com>
188
91902bb4 189 PR c++/88538 - braced-init-list in template-argument-list.
190 * parser.c (cp_parser_template_argument): Handle braced-init-list when
191 in C++20.
192
90e20c9c 193 PR c++/88548 - this accepted in static member functions.
194 * parser.c (cp_debug_parser): Adjust printing of
195 local_variables_forbidden_p.
196 (cp_parser_new): Set local_variables_forbidden_p to 0 rather than false.
197 (cp_parser_primary_expression): When checking
198 local_variables_forbidden_p, use THIS_FORBIDDEN or
199 LOCAL_VARS_FORBIDDEN.
200 (cp_parser_lambda_body): Update the type of
201 local_variables_forbidden_p. Set it to 0 rather than false.
202 (cp_parser_condition): Adjust call to cp_parser_declarator.
203 (cp_parser_explicit_instantiation): Likewise.
204 (cp_parser_init_declarator): Likewise.
205 (cp_parser_declarator): New parameter. Use it.
206 (cp_parser_direct_declarator): New parameter. Use it to set
207 local_variables_forbidden_p. Adjust call to cp_parser_declarator.
208 (cp_parser_type_id_1): Adjust call to cp_parser_declarator.
209 (cp_parser_parameter_declaration): Likewise.
210 (cp_parser_default_argument): Update the type of
211 local_variables_forbidden_p. Set it to LOCAL_VARS_AND_THIS_FORBIDDEN
212 rather than true.
213 (cp_parser_member_declaration): Tell cp_parser_declarator if we saw
214 'static' or 'friend'.
215 (cp_parser_exception_declaration): Adjust call to cp_parser_declarator.
216 (cp_parser_late_parsing_default_args): Update the type of
217 local_variables_forbidden_p. Set it to LOCAL_VARS_AND_THIS_FORBIDDEN
218 rather than true.
219 (cp_parser_cache_defarg): Adjust call to cp_parser_declarator.
220 (cp_parser_objc_class_ivars): Likewise.
221 (cp_parser_objc_struct_declaration): Likewise.
222 (cp_parser_omp_for_loop_init): Likewise.
223 * parser.h (cp_parser): Change the type of local_variables_forbidden_p
224 to unsigned char.
225 (LOCAL_VARS_FORBIDDEN, LOCAL_VARS_AND_THIS_FORBIDDEN, THIS_FORBIDDEN):
226 Define.
227
8f7d5246 2282019-01-08 Paolo Carlini <paolo.carlini@oracle.com>
229
230 * decl.c (start_decl): Improve permerror location.
231
6e5908c9 2322019-01-08 Jonathan Wakely <jwakely@redhat.com>
233 Jakub Jelinek <jakub@redhat.com>
234
235 PR c++/88554
236 * decl.c (finish_function): For -Wreturn-type don't add a return *this;
237 fixit hint if current_class_ref is NULL. Use a single if instead of
238 two nested ones.
239
2318c037 2402019-01-07 Paolo Carlini <paolo.carlini@oracle.com>
241
242 * decl.c (start_decl): Improve two error_at locations.
243 (expand_static_init): Likewise.
244
677576f7 2452019-01-07 Marek Polacek <polacek@redhat.com>
246
247 PR c++/88741 - wrong error with initializer-string.
248 * decl.c (cp_complete_array_type): Strip any location wrappers.
249
c38103e8 2502019-01-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
251
252 PR c++/88261
253 PR c++/69338
254 PR c++/69696
255 PR c++/69697
256 * cp-tree.h (LOOKUP_ALLOW_FLEXARRAY_INIT): New flag value.
257 * typeck2.c (digest_init_r): Raise an error for non-static
258 initialization of a flexible array member.
259 (process_init_constructor, massage_init_elt,
260 process_init_constructor_array, process_init_constructor_record,
261 process_init_constructor_union, process_init_constructor): Add the
262 flags parameter and pass it thru.
263 (store_init_value): Pass LOOKUP_ALLOW_FLEXARRAY_INIT parameter to
264 digest_init_flags for static decls.
265
59409f09 2662019-01-07 Jakub Jelinek <jakub@redhat.com>
267
268 PR c++/85052
269 * cp-tree.h (cp_build_vec_convert): Declare.
270 * parser.c (cp_parser_postfix_expression): Parse
271 __builtin_convertvector.
272 * constexpr.c: Include fold-const-call.h.
273 (cxx_eval_internal_function): Handle IFN_VEC_CONVERT.
274 (potential_constant_expression_1): Likewise.
275 * semantics.c (cp_build_vec_convert): New function.
276 * pt.c (tsubst_copy_and_build): Handle CALL_EXPR to
277 IFN_VEC_CONVERT.
278
0627c5c9 2792019-01-03 Jakub Jelinek <jakub@redhat.com>
280
281 PR c++/88636
282 * decl.c (builtin_function_1): Return result of pushdecl_top_level
283 or pushdecl rather than decl.
284
f9f7d90c 2852019-01-03 Paolo Carlini <paolo.carlini@oracle.com>
286
287 * tree.c (handle_nodiscard_attribute): Improve warning location.
288
37fb9cf6 2892019-01-02 Marek Polacek <polacek@redhat.com>
290
291 PR c++/88612 - ICE with -Waddress-of-packed-member.
292 * call.c (convert_for_arg_passing): Only give warnings with tf_warning.
293 * typeck.c (convert_for_assignment): Likewise.
294
6080dd2f 295 PR c++/88631 - CTAD failing for value-initialization.
296 * typeck2.c (build_functional_cast): Try deducing the template
297 arguments even if there are no arguments to deduce from.
298
fbd26352 2992019-01-01 Jakub Jelinek <jakub@redhat.com>
ca29c574 300
8e8f6434 301 Update copyright years.
7dfbd804 302\f
fbd26352 303Copyright (C) 2019 Free Software Foundation, Inc.
7dfbd804 304
305Copying and distribution of this file, with or without modification,
306are permitted in any medium without royalty provided the copyright
307notice and this notice are preserved.