1 2019-01-23 Jakub Jelinek <jakub@redhat.com>
4 * cp-gimplify.c (genericize_switch_stmt): Move cond genericization
5 before the begin_bc_block call.
7 2019-01-21 Jason Merrill <jason@redhat.com>
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.
13 (cxx_eval_outermost_constant_expr): Return early for void type.
15 2019-01-21 Jakub Jelinek <jakub@redhat.com>
18 * optimize.c (cxx_copy_decl): New function.
19 (clone_body): Use it instead of copy_decl_no_change.
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.
26 2019-01-18 Jason Merrill <jason@redhat.com>
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.
33 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
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.
41 2019-01-17 Jason Merrill <jason@redhat.com>
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.
48 PR c++/86740, ICE with constexpr if and nested generic lambdas.
49 * tree.c (cp_walk_subtrees): Handle LAMBDA_EXPR.
51 2019-01-17 Paolo Carlini <paolo.carlini@oracle.com>
53 * decl.c (grokdeclarator): Use typespec_loc in error messages
54 about 'auto' and trailing return type.
56 2019-01-17 David Malcolm <dmalcolm@redhat.com>
59 * class.c (add_method): Don't use DECL_DESTRUCTOR_P on
62 2019-01-17 Nathan Sidwell <nathan@acm.org>
65 * semantics.c (process_outer_var_ref): Only skip dependent types
68 2019-01-17 Alexandre Oliva <aoliva@redhat.com>
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.
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.
82 * cvt.c (convert_to_void): Handle all cdtor calls as if
85 2019-01-16 Paolo Carlini <paolo.carlini@oracle.com>
87 * decl.c (grokdeclarator): Use locations[ds_storage_class] in
88 error messages about ill-formed uses of mutable.
90 2019-01-16 Marek Polacek <polacek@redhat.com>
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.
98 2019-01-15 David Malcolm <dmalcolm@redhat.com>
101 * pt.c (build_deduction_guide): Bail out if tsubst_arg_types
104 2019-01-15 Paolo Carlini <paolo.carlini@oracle.com>
106 * decl.c (start_decl): Improve error location.
107 * decl2.c (grokfield): Likewise.
109 2019-01-15 Paolo Carlini <paolo.carlini@oracle.com>
111 * decl.c (grokdeclarator): Move further up the location_t loc
112 declaration and use the location when building a TYPE_DECL for
114 * decl2.c (grokbitfield): Use DECL_SOURCE_LOCATION in the error
115 about an ill-formed bit-field as typedef.
117 2019-01-14 Marek Polacek <polacek@redhat.com>
119 PR c++/88830 - ICE with abstract class.
120 * decl2.c (maybe_emit_vtables): Check CLASSTYPE_LAZY_DESTRUCTOR.
123 PR c++/88825 - ICE with bogus function return type deduction.
124 * typeck.c (can_do_nrvo_p): Check error_mark_node.
126 2019-01-14 Tom Honermann <tom@honermann.net>
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
137 (cp_parser_string_literal): Use char8_array_type_node for the type
139 (cp_parser_set_decl_spec_type): Tolerate char8_t typedefs in system
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
147 * typeck2.c (ordinary_char_type_p): New.
148 (digest_init_r): Disallow initializing a char array with a u8 string
151 2019-01-14 Martin Liska <mliska@suse.cz>
153 PR gcov-profile/88263
154 * decl2.c (get_tls_wrapper_fn): Use DECL_SOURCE_LOCATION
155 as location of the TLS wrapper.
157 2019-01-12 Paolo Carlini <paolo.carlini@oracle.com>
159 * decl.c (cp_finish_decl): Improve error location.
160 * decl2.c (grokfield): Likewise, improve two locations.
162 2019-01-11 Marek Polacek <polacek@redhat.com>
164 PR c++/88692, c++/87882 - -Wredundant-move false positive with *this.
165 * typeck.c (maybe_warn_pessimizing_move): Return if ARG isn't
168 2019-01-11 Jason Merrill <jason@redhat.com>
170 PR c++/88312 - pack expansion of decltype.
171 * pt.c (instantiation_dependent_r): A template non-type parameter
172 pack is instantiation-dependent.
174 2019-01-11 Jason Merrill <jason@redhat.com>
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.
180 2019-01-11 Tobias Burnus <burnus@net-b.de>
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.
187 2019-01-11 Paolo Carlini <paolo.carlini@oracle.com>
189 * decl.c (start_decl): Improve error location.
190 (grokdeclarator): Likewise, improve two locations.
192 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
196 * cp-tree.h: Mechanically replace "can not" with "cannot".
197 * parser.c: Likewise.
200 2019-01-08 Paolo Carlini <paolo.carlini@oracle.com>
202 * decl.c (grok_reference_init): Improve error location.
203 (grokdeclarator): Likewise, improve two locations.
205 2019-01-08 Marek Polacek <polacek@redhat.com>
207 PR c++/88538 - braced-init-list in template-argument-list.
208 * parser.c (cp_parser_template_argument): Handle braced-init-list when
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
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
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
243 (LOCAL_VARS_FORBIDDEN, LOCAL_VARS_AND_THIS_FORBIDDEN, THIS_FORBIDDEN):
246 2019-01-08 Paolo Carlini <paolo.carlini@oracle.com>
248 * decl.c (start_decl): Improve permerror location.
250 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
251 Jakub Jelinek <jakub@redhat.com>
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
258 2019-01-07 Paolo Carlini <paolo.carlini@oracle.com>
260 * decl.c (start_decl): Improve two error_at locations.
261 (expand_static_init): Likewise.
263 2019-01-07 Marek Polacek <polacek@redhat.com>
265 PR c++/88741 - wrong error with initializer-string.
266 * decl.c (cp_complete_array_type): Strip any location wrappers.
268 2019-01-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
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.
284 2019-01-07 Jakub Jelinek <jakub@redhat.com>
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
297 2019-01-03 Jakub Jelinek <jakub@redhat.com>
300 * decl.c (builtin_function_1): Return result of pushdecl_top_level
301 or pushdecl rather than decl.
303 2019-01-03 Paolo Carlini <paolo.carlini@oracle.com>
305 * tree.c (handle_nodiscard_attribute): Improve warning location.
307 2019-01-02 Marek Polacek <polacek@redhat.com>
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.
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.
317 2019-01-01 Jakub Jelinek <jakub@redhat.com>
319 Update copyright years.
321 Copyright (C) 2019 Free Software Foundation, Inc.
323 Copying and distribution of this file, with or without modification,
324 are permitted in any medium without royalty provided the copyright
325 notice and this notice are preserved.