1 2019-01-23 Marek Polacek <polacek@redhat.com>
3 PR c++/88757 - qualified name treated wrongly as type.
4 * parser.c (cp_parser_direct_declarator): Don't treat qualified-ids
5 in parameter-list as types if name lookup for declarator-id didn't
6 find one or more function templates.
8 2019-01-23 Jakub Jelinek <jakub@redhat.com>
11 * cp-gimplify.c (genericize_cp_loop): Call begin_bc_block only
12 after genericizing cond and incr expressions.
15 * cp-gimplify.c (genericize_switch_stmt): Move cond genericization
16 before the begin_bc_block call.
18 2019-01-21 Jason Merrill <jason@redhat.com>
20 PR c++/87893 - constexpr ctor ICE on ARM.
21 PR c++/88293 - ICE with comma expression.
22 * constexpr.c (initialized_type): Don't shortcut non-void type.
24 (cxx_eval_outermost_constant_expr): Return early for void type.
26 2019-01-21 Jakub Jelinek <jakub@redhat.com>
29 * optimize.c (cxx_copy_decl): New function.
30 (clone_body): Use it instead of copy_decl_no_change.
33 * typeck.c (cp_build_binary_op): Don't instrument
34 SANITIZE_POINTER_COMPARE if processing_template_decl.
35 (pointer_diff): Similarly for SANITIZE_POINTER_SUBTRACT.
37 2019-01-18 Jason Merrill <jason@redhat.com>
39 PR c++/88875 - error with explicit list constructor.
40 * call.c (reference_binding): Don't modify EXPR. Set
41 need_temporary_p on the ck_user conversion for a temporary.
42 (convert_like_real): Check it.
44 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
48 * call.c (convert_for_arg_passing): Upate the
49 warn_for_address_or_pointer_of_packed_member call.
50 * typeck.c (convert_for_assignment): Likewise.
52 2019-01-17 Jason Merrill <jason@redhat.com>
54 PR c++/86205 - ICE with ?: of throw and template-id.
55 * pt.c (resolve_nondeduced_context_or_error): Split out from...
56 * typeck.c (decay_conversion): ...here.
57 * call.c (build_conditional_expr_1): Use it.
59 PR c++/86740, ICE with constexpr if and nested generic lambdas.
60 * tree.c (cp_walk_subtrees): Handle LAMBDA_EXPR.
62 2019-01-17 Paolo Carlini <paolo.carlini@oracle.com>
64 * decl.c (grokdeclarator): Use typespec_loc in error messages
65 about 'auto' and trailing return type.
67 2019-01-17 David Malcolm <dmalcolm@redhat.com>
70 * class.c (add_method): Don't use DECL_DESTRUCTOR_P on
73 2019-01-17 Nathan Sidwell <nathan@acm.org>
76 * semantics.c (process_outer_var_ref): Only skip dependent types
79 2019-01-17 Alexandre Oliva <aoliva@redhat.com>
82 * cp-tree.h (saved_scope): Add suppress_location_wrappers.
83 * name-lookup.c (do_push_to_top_level): Save and reset it.
84 (do_pop_from_top_level): Restore it.
87 * pt.c (make_template_placeholder): Use auto_identifier.
88 (is_auto): Drop CLASS_PLACEHOLDER_TEMPLATE test.
89 * error.c (dump_type): Handle template placeholders.
90 * cxx-pretty-print.c (pp_cx_unqualified_id): Likewise.
93 * cvt.c (convert_to_void): Handle all cdtor calls as if
96 2019-01-16 Paolo Carlini <paolo.carlini@oracle.com>
98 * decl.c (grokdeclarator): Use locations[ds_storage_class] in
99 error messages about ill-formed uses of mutable.
101 2019-01-16 Marek Polacek <polacek@redhat.com>
103 PR c++/78244 - narrowing conversion in template not detected.
104 * call.c (perform_implicit_conversion_flags): Set
105 IMPLICIT_CONV_EXPR_BRACED_INIT.
106 * cp-tree.h (IMPLICIT_CONV_EXPR_BRACED_INIT): New.
107 * pt.c (tsubst_copy_and_build): Use it.
109 2019-01-15 David Malcolm <dmalcolm@redhat.com>
112 * pt.c (build_deduction_guide): Bail out if tsubst_arg_types
115 2019-01-15 Paolo Carlini <paolo.carlini@oracle.com>
117 * decl.c (start_decl): Improve error location.
118 * decl2.c (grokfield): Likewise.
120 2019-01-15 Paolo Carlini <paolo.carlini@oracle.com>
122 * decl.c (grokdeclarator): Move further up the location_t loc
123 declaration and use the location when building a TYPE_DECL for
125 * decl2.c (grokbitfield): Use DECL_SOURCE_LOCATION in the error
126 about an ill-formed bit-field as typedef.
128 2019-01-14 Marek Polacek <polacek@redhat.com>
130 PR c++/88830 - ICE with abstract class.
131 * decl2.c (maybe_emit_vtables): Check CLASSTYPE_LAZY_DESTRUCTOR.
134 PR c++/88825 - ICE with bogus function return type deduction.
135 * typeck.c (can_do_nrvo_p): Check error_mark_node.
137 2019-01-14 Tom Honermann <tom@honermann.net>
139 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
140 * cvt.c (type_promotes_to): Handle char8_t promotion.
141 * decl.c (grokdeclarator): Handle invalid type specifier
142 combinations involving char8_t.
143 * lex.c (init_reswords): Add char8_t as a reserved word.
144 * mangle.c (write_builtin_type): Add name mangling for char8_t (Du).
145 * parser.c (cp_keyword_starts_decl_specifier_p)
146 (cp_parser_simple_type_specifier): Recognize char8_t as a simple
148 (cp_parser_string_literal): Use char8_array_type_node for the type
150 (cp_parser_set_decl_spec_type): Tolerate char8_t typedefs in system
152 * rtti.c (emit_support_tinfos): type_info support for char8_t.
153 * tree.c (char_type_p): Recognize char8_t as a character type.
154 * typeck.c (string_conv_p): Handle conversions of u8 string
155 literals of char8_t type.
156 (check_literal_operator_args): Handle UDLs with u8 string literals
158 * typeck2.c (ordinary_char_type_p): New.
159 (digest_init_r): Disallow initializing a char array with a u8 string
162 2019-01-14 Martin Liska <mliska@suse.cz>
164 PR gcov-profile/88263
165 * decl2.c (get_tls_wrapper_fn): Use DECL_SOURCE_LOCATION
166 as location of the TLS wrapper.
168 2019-01-12 Paolo Carlini <paolo.carlini@oracle.com>
170 * decl.c (cp_finish_decl): Improve error location.
171 * decl2.c (grokfield): Likewise, improve two locations.
173 2019-01-11 Marek Polacek <polacek@redhat.com>
175 PR c++/88692, c++/87882 - -Wredundant-move false positive with *this.
176 * typeck.c (maybe_warn_pessimizing_move): Return if ARG isn't
179 2019-01-11 Jason Merrill <jason@redhat.com>
181 PR c++/88312 - pack expansion of decltype.
182 * pt.c (instantiation_dependent_r): A template non-type parameter
183 pack is instantiation-dependent.
185 2019-01-11 Jason Merrill <jason@redhat.com>
187 PR c++/88613 - ICE with use of const var in lambda.
188 * expr.c (mark_use): Fix location wrapper handling.
189 * cp-gimplify.c (cp_fold_maybe_rvalue): Call mark_rvalue_use.
191 2019-01-11 Tobias Burnus <burnus@net-b.de>
194 * decl2.c (maybe_emit_vtables): If needed, generate code for
195 the destructor of an abstract class.
196 (mark_used): Update comment for older function-name change.
198 2019-01-11 Paolo Carlini <paolo.carlini@oracle.com>
200 * decl.c (start_decl): Improve error location.
201 (grokdeclarator): Likewise, improve two locations.
203 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
207 * cp-tree.h: Mechanically replace "can not" with "cannot".
208 * parser.c: Likewise.
211 2019-01-08 Paolo Carlini <paolo.carlini@oracle.com>
213 * decl.c (grok_reference_init): Improve error location.
214 (grokdeclarator): Likewise, improve two locations.
216 2019-01-08 Marek Polacek <polacek@redhat.com>
218 PR c++/88538 - braced-init-list in template-argument-list.
219 * parser.c (cp_parser_template_argument): Handle braced-init-list when
222 PR c++/88548 - this accepted in static member functions.
223 * parser.c (cp_debug_parser): Adjust printing of
224 local_variables_forbidden_p.
225 (cp_parser_new): Set local_variables_forbidden_p to 0 rather than false.
226 (cp_parser_primary_expression): When checking
227 local_variables_forbidden_p, use THIS_FORBIDDEN or
228 LOCAL_VARS_FORBIDDEN.
229 (cp_parser_lambda_body): Update the type of
230 local_variables_forbidden_p. Set it to 0 rather than false.
231 (cp_parser_condition): Adjust call to cp_parser_declarator.
232 (cp_parser_explicit_instantiation): Likewise.
233 (cp_parser_init_declarator): Likewise.
234 (cp_parser_declarator): New parameter. Use it.
235 (cp_parser_direct_declarator): New parameter. Use it to set
236 local_variables_forbidden_p. Adjust call to cp_parser_declarator.
237 (cp_parser_type_id_1): Adjust call to cp_parser_declarator.
238 (cp_parser_parameter_declaration): Likewise.
239 (cp_parser_default_argument): Update the type of
240 local_variables_forbidden_p. Set it to LOCAL_VARS_AND_THIS_FORBIDDEN
242 (cp_parser_member_declaration): Tell cp_parser_declarator if we saw
243 'static' or 'friend'.
244 (cp_parser_exception_declaration): Adjust call to cp_parser_declarator.
245 (cp_parser_late_parsing_default_args): Update the type of
246 local_variables_forbidden_p. Set it to LOCAL_VARS_AND_THIS_FORBIDDEN
248 (cp_parser_cache_defarg): Adjust call to cp_parser_declarator.
249 (cp_parser_objc_class_ivars): Likewise.
250 (cp_parser_objc_struct_declaration): Likewise.
251 (cp_parser_omp_for_loop_init): Likewise.
252 * parser.h (cp_parser): Change the type of local_variables_forbidden_p
254 (LOCAL_VARS_FORBIDDEN, LOCAL_VARS_AND_THIS_FORBIDDEN, THIS_FORBIDDEN):
257 2019-01-08 Paolo Carlini <paolo.carlini@oracle.com>
259 * decl.c (start_decl): Improve permerror location.
261 2019-01-08 Jonathan Wakely <jwakely@redhat.com>
262 Jakub Jelinek <jakub@redhat.com>
265 * decl.c (finish_function): For -Wreturn-type don't add a return *this;
266 fixit hint if current_class_ref is NULL. Use a single if instead of
269 2019-01-07 Paolo Carlini <paolo.carlini@oracle.com>
271 * decl.c (start_decl): Improve two error_at locations.
272 (expand_static_init): Likewise.
274 2019-01-07 Marek Polacek <polacek@redhat.com>
276 PR c++/88741 - wrong error with initializer-string.
277 * decl.c (cp_complete_array_type): Strip any location wrappers.
279 2019-01-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
285 * cp-tree.h (LOOKUP_ALLOW_FLEXARRAY_INIT): New flag value.
286 * typeck2.c (digest_init_r): Raise an error for non-static
287 initialization of a flexible array member.
288 (process_init_constructor, massage_init_elt,
289 process_init_constructor_array, process_init_constructor_record,
290 process_init_constructor_union, process_init_constructor): Add the
291 flags parameter and pass it thru.
292 (store_init_value): Pass LOOKUP_ALLOW_FLEXARRAY_INIT parameter to
293 digest_init_flags for static decls.
295 2019-01-07 Jakub Jelinek <jakub@redhat.com>
298 * cp-tree.h (cp_build_vec_convert): Declare.
299 * parser.c (cp_parser_postfix_expression): Parse
300 __builtin_convertvector.
301 * constexpr.c: Include fold-const-call.h.
302 (cxx_eval_internal_function): Handle IFN_VEC_CONVERT.
303 (potential_constant_expression_1): Likewise.
304 * semantics.c (cp_build_vec_convert): New function.
305 * pt.c (tsubst_copy_and_build): Handle CALL_EXPR to
308 2019-01-03 Jakub Jelinek <jakub@redhat.com>
311 * decl.c (builtin_function_1): Return result of pushdecl_top_level
312 or pushdecl rather than decl.
314 2019-01-03 Paolo Carlini <paolo.carlini@oracle.com>
316 * tree.c (handle_nodiscard_attribute): Improve warning location.
318 2019-01-02 Marek Polacek <polacek@redhat.com>
320 PR c++/88612 - ICE with -Waddress-of-packed-member.
321 * call.c (convert_for_arg_passing): Only give warnings with tf_warning.
322 * typeck.c (convert_for_assignment): Likewise.
324 PR c++/88631 - CTAD failing for value-initialization.
325 * typeck2.c (build_functional_cast): Try deducing the template
326 arguments even if there are no arguments to deduce from.
328 2019-01-01 Jakub Jelinek <jakub@redhat.com>
330 Update copyright years.
332 Copyright (C) 2019 Free Software Foundation, Inc.
334 Copying and distribution of this file, with or without modification,
335 are permitted in any medium without royalty provided the copyright
336 notice and this notice are preserved.