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