]>
Commit | Line | Data |
---|---|---|
077fefbf GA |
1 | 2020-12-22 Nathan Sidwell <nathan@acm.org> |
2 | ||
3 | * module.cc (has_definition): Check DECL_LANG_SPECIFIC. | |
4 | ||
5 | 2020-12-22 Jakub Jelinek <jakub@redhat.com> | |
6 | ||
7 | PR c++/93480 | |
8 | * method.c (common_comparison_type): If comps[i] is a TREE_LIST, | |
9 | use its TREE_VALUE instead. | |
10 | (build_comparison_op): Handle array members. | |
11 | ||
12 | 2020-12-22 Gerald Pfeifer <gerald@pfeifer.com> | |
13 | ||
14 | * module.cc (INCLUDE_STRING): Define. | |
15 | (INCLUDE_VECTOR): Ditto. | |
16 | ||
17 | 2020-12-22 Jason Merrill <jason@redhat.com> | |
18 | ||
19 | * mangle.c (write_member_name): Add assert. | |
20 | (write_expression): Add asserts. | |
21 | ||
1a5e728a GA |
22 | 2020-12-21 Nathan Sidwell <nathan@acm.org> |
23 | ||
24 | * module.cc (create_dirs): Add logging. | |
25 | (finish_module_processing): Unlink before rename. | |
26 | ||
27 | 2020-12-21 Nathan Sidwell <nathan@acm.org> | |
28 | ||
29 | PR bootstrap/98412 | |
30 | * mapper-client.cc: INCLUDE_STRING, INCLUDE_VECTOR. | |
31 | (module_client::open_module_client): Avoid std::stoul. | |
32 | * mapper-resolver.cc: INCLUDE_STRING, INCLUDE_VECTOR. | |
33 | ||
b1a2242e GA |
34 | 2020-12-18 Kwok Cheung Yeung <kcy@codesourcery.com> |
35 | ||
36 | * cp-lang.c (cxx_get_decl_init): New. | |
37 | (cxx_omp_finish_decl_inits): New. | |
38 | (LANG_HOOKS_GET_DECL_INIT): New. | |
39 | (LANG_HOOKS_OMP_FINISH_DECL_INITS): New. | |
40 | * cp-tree.h (dynamic_initializers): New. | |
41 | * decl.c (dynamic_initializers): New. | |
42 | * decl2.c (c_parse_final_cleanups): Add initializer entries | |
43 | from vars to dynamic_initializers. | |
44 | ||
45 | 2020-12-18 Nathan Sidwell <nathan@acm.org> | |
46 | ||
47 | * module.cc (O_CLOEXEC, O_BINARY): Add window's support. | |
48 | (elf_in::defrost, module_state::do_import) | |
49 | (finish_module_processing): Use O_BINARY. | |
50 | ||
51 | 2020-12-18 Jakub Jelinek <jakub@redhat.com> | |
52 | ||
53 | PR c++/98343 | |
54 | * cp-gimplify.c (source_location_table_entry_hash::pch_nx): Override | |
55 | static member functions from ggc_remove. | |
56 | ||
57 | 2020-12-18 Patrick Palka <ppalka@redhat.com> | |
58 | ||
59 | * constraint.cc (satisfying_constraint): Move up definition | |
60 | and give it bool type. | |
61 | (failed_type_completion_count): Replace with ... | |
62 | (failed_type_completions): ... this. | |
63 | (note_failed_type_completion_for_satisfaction): Append the | |
64 | supplied argument to failed_type_completions. | |
65 | (some_type_complete_p): Define. | |
66 | (sat_entry::maybe_unstable): Replace with ... | |
67 | (sat_entry::ftc_begin, sat_entry::ftc_end): ... these. | |
68 | (satisfaction_cache::ftc_count): Replace with ... | |
69 | (satisfaction_cache::ftc_begin): ... this. | |
70 | (satisfaction_cache::satisfaction_cache): Adjust accordingly. | |
71 | (satisfaction_cache::get): Adjust accordingly, using | |
72 | some_type_complete_p. | |
73 | (satisfaction_cache::save): Adjust accordingly. | |
74 | (satisfying_constraint_p): Remove unused function. | |
75 | (satisfy_constraint): Set satisfying_constraint. | |
76 | (satisfy_declaration_constraints): Likewise. | |
77 | * decl.c (require_deduced_type): Call | |
78 | note_failed_type_completion_for_satisfaction. | |
79 | ||
80 | 2020-12-18 Patrick Palka <ppalka@redhat.com> | |
81 | ||
82 | * constraint.cc (sat_entry::evaluating): New member. | |
83 | (satisfaction_cache::get): If entry->evaluating, diagnose | |
84 | self-recursive satisfaction. Otherwise, set entry->evaluating | |
85 | if we're not reusing a cached satisfaction result. | |
86 | (satisfaction_cache::save): Clear entry->evaluating. | |
87 | (satisfy_atom): Set up diagnosing_failed_constraint before the | |
88 | first call to get(). | |
89 | ||
90 | 2020-12-18 Patrick Palka <ppalka@redhat.com> | |
91 | ||
92 | * constraint.cc (failed_type_completion_count): New. | |
93 | (note_failed_type_completion_for_satisfaction): New. | |
94 | (sat_entry::constr): Rename to ... | |
95 | (sat_entry::atom): ... this. | |
96 | (sat_entry::location): New member. | |
97 | (sat_entry::maybe_unstable): New member. | |
98 | (sat_entry::diagnose_instability): New member. | |
99 | (struct sat_hasher): Adjust after the above renaming. | |
100 | (get_satisfaction, save_satisfaction): Remove. | |
101 | (satisfaction_cache): Rewrite completely. | |
102 | (satisfy_atom): When instantiation of the parameter mapping | |
103 | fails, set diagnose_instability. Propagate location from | |
104 | inst_cache.entry to cache.entry if the secondary lookup | |
105 | succeeded. | |
106 | (satisfy_declaration_constraints): When | |
107 | failed_type_completion_count differs before and after | |
108 | satisfaction, then don't cache the satisfaction result. | |
109 | * cp-tree.h (note_failed_type_completion_for_satisfaction): | |
110 | Declare. | |
111 | * pt.c (tsubst) <case TYPENAME_TYPE>: Use | |
112 | complete_type_or_maybe_complain instead of open-coding it. | |
113 | * typeck.c (complete_type_or_maybe_complain): Call | |
114 | note_failed_type_completion_for_satisfaction when type | |
115 | completion fails. | |
116 | ||
cd69e3d5 GA |
117 | 2020-12-17 Nathan Sidwell <nathan@acm.org> |
118 | ||
119 | PR c++/98340 | |
120 | * module.cc (uintset<T>::hash::add): Use uintset (0u).MEMBER, | |
121 | rather than uintset::MEMBER. | |
122 | ||
123 | 2020-12-17 Nathan Sidwell <nathan@acm.org> | |
124 | ||
125 | PR bootstrap/98300 | |
126 | * module.cc: Fix ::read, ::write result signedness comparisons. | |
127 | ||
eefe499f GA |
128 | 2020-12-16 Nathan Sidwell <nathan@acm.org> |
129 | ||
130 | * mapper-resolver.cc: Remove early include of | |
131 | sys/socket.h. Specify no CODY_NETWORKING instead. | |
132 | * module.cc: Specify no CODY_NETWORKING. | |
133 | ||
134 | 2020-12-16 Nathan Sidwell <nathan@acm.org> | |
135 | ||
136 | * parser.c (cp_parser_elaborated_type_specifier): Test | |
137 | BOUND_TEMPLATE_TEMPLATE_PARM before checking for instantiation. | |
138 | ||
139 | 2020-12-16 Nathan Sidwell <nathan@acm.org> | |
140 | ||
141 | * module.cc (dumper::push): Clangify offsetof use. | |
142 | ||
143 | 2020-12-16 Nathan Sidwell <nathan@acm.org> | |
144 | ||
145 | * mapper-resolver.cc: #include sys/socket before system.h | |
146 | due to poisoned bcopy use. | |
147 | ||
148 | 2020-12-16 Nathan Sidwell <nathan@acm.org> | |
149 | ||
150 | * module.cc (loc_spans): Make spans a pointer, not inline. | |
151 | Adjust all accesses. | |
152 | ||
153 | 2020-12-16 Nathan Sidwell <nathan@acm.org> | |
154 | ||
155 | * mapper-client.cc: Include sys/socket.h before system.h. | |
156 | ||
6e9d8651 GA |
157 | 2020-12-15 Patrick Palka <ppalka@redhat.com> |
158 | ||
159 | * pt.c (in_template_function): Inspect cfun->decl instead of | |
160 | current_function_decl. | |
161 | ||
162 | 2020-12-15 Nathan Sidwell <nathan@acm.org> | |
163 | ||
164 | * module.cc: Replace stubs with implementation. | |
165 | ||
166 | 2020-12-15 Nathan Sidwell <nathan@acm.org> | |
167 | ||
168 | * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add mapper-client & | |
169 | mapper-resolver. | |
170 | * mapper-client.h: New. | |
171 | * mapper-client.cc: New. | |
172 | * mapper-resolver.cc: New. | |
173 | ||
174 | 2020-12-15 Nathan Sidwell <nathan@acm.org> | |
175 | ||
176 | * name-lookup.c (do_namespace_alias): Set originating module | |
177 | before pushing. | |
178 | ||
54f75d8f GA |
179 | 2020-12-11 Jason Merrill <jason@redhat.com> |
180 | ||
181 | PR libstdc++/97600 | |
182 | * call.c (build_user_type_conversion_1): Avoid considering | |
183 | conversion functions that return a clearly unsuitable type. | |
184 | ||
185 | 2020-12-11 Jason Merrill <jason@redhat.com> | |
186 | ||
187 | * cp-tree.h (make_binding_vec): Add CXX_MEM_STAT_INFO. | |
188 | ||
189 | 2020-12-11 Nathan Sidwell <nathan@acm.org> | |
190 | ||
191 | * config-lang.in (gtfiles): Add cp/module.cc. | |
192 | * decl2.c (c_parse_final_cleanups): Add module support. | |
193 | * lambda.c (record_lambda_scope): Call maybe_attach_decl. | |
194 | * module.cc (maybe_attach_decl, lazy_load_specializations): Stubs. | |
195 | (finish_module_procesing): Stub. | |
196 | * pt.c (lookup_template_class_1): Lazy load specializations. | |
197 | (instantiate_template_1): Likewise. | |
198 | ||
199 | 2020-12-11 Nathan Sidwell <nathan@acm.org> | |
200 | ||
201 | * decl2.c (c_parse_final_cleanups): Refactor loop. | |
202 | ||
35af8778 GA |
203 | 2020-12-11 Nathan Sidwell <nathan@acm.org> |
204 | ||
205 | * cp-tree.h (map_context_from, map_context_to): Declare. | |
206 | * module.cc (map_context_from, map_context_to): Define. | |
207 | * tree.c (cp_tree_equal): Check map_context_{from,to} for parm | |
208 | context difference. Allow NON_LVALUE_EXPR and VIEW_CONVERT_EXPR | |
209 | with null types. | |
210 | ||
211 | 2020-12-11 Nathan Sidwell <nathan@acm.org> | |
212 | ||
213 | * cp-lang.c (LANG_HOOKS_PREPROCESS_MAIN_FILE): Override. | |
214 | (LANG_HOOKS_PREPROCESS_OPTIONS): Override. | |
215 | (LANG_HOOKS_PREPROCESS_TOKEN): Override. | |
216 | * cp-objcp-common.c (cp_register_dumps): Add module dump. | |
217 | (cp_handle_option): New. | |
218 | * cp-objcp-common.h (cp_handle_option): Declare. | |
219 | (LANG_HOOKS_HANDLE_OPTION): Override. | |
220 | * cp-tree.h (module_dump_id): Declare. | |
221 | * module.cc (module_dump_id): Define. | |
222 | (module_begin_main_file, handle_module_option) | |
223 | (module_preproces_options): Stubs. | |
224 | ||
225 | 2020-12-11 Nathan Sidwell <nathan@acm.org> | |
226 | ||
227 | * module.cc (lazy_specializations_p): Stub. | |
228 | * name-lookup.h (append_imported_binding_slot) | |
229 | (mergeable_namespacE_slots, lookup_class_binding) | |
230 | (walk_module_binding, import_module_binding, set_module_binding) | |
231 | (note_pending_specializations, load_pending_specializations) | |
232 | (add_module_decl, add_imported_namespace): Declare. | |
233 | (get_cxx_dialect_name): Declare. | |
234 | (enum WMB_flags): New. | |
235 | * name-lookup.c (append_imported_binding_slot) | |
236 | (mergeable_namespacE_slots, lookup_class_binding) | |
237 | (walk_module_binding, import_module_binding, set_module_binding) | |
238 | (note_pending_specializations, load_pending_specializations) | |
239 | (add_module_decl, add_imported_namespace): New. | |
240 | (get_cxx_dialect_name): Make extern. | |
241 | ||
242 | 2020-12-11 Patrick Palka <ppalka@redhat.com> | |
243 | ||
244 | PR c++/78173 | |
245 | * typeck.c (pointer_diff): Use complete_type_or_maybe_complain | |
246 | instead of complete_type_or_else. | |
247 | ||
248 | 2020-12-10 Jason Merrill <jason@redhat.com> | |
249 | ||
250 | * cp-tree.h (struct type_identity): New. | |
251 | (make_temp_override): New. | |
252 | * decl.c (grokdeclarator): Use it. | |
253 | * except.c (maybe_noexcept_warning): Use it. | |
254 | * parser.c (cp_parser_enum_specifier): Use it. | |
255 | (cp_parser_parameter_declaration_clause): Use it. | |
256 | (cp_parser_gnu_attributes_opt): Use it. | |
257 | (cp_parser_std_attribute): Use it. | |
258 | ||
259 | 2020-12-10 Nathan Sidwell <nathan@acm.org> | |
260 | ||
261 | * name-lookup.c (do_nonmember_using_decl): Add INSERT_P parm. | |
262 | Deal with exporting using decls. | |
263 | (finish_nonmember_using_decl): Examine BINDING_VECTOR. | |
264 | ||
265 | 2020-12-10 Nathan Sidwell <nathan@acm.org> | |
266 | ||
267 | * cp-tree.h (visible_instantiation_path): Renamed. | |
268 | * module.cc (get_originating_module_decl, lazy_load_binding) | |
269 | (lazy_load_members, visible_instantiation_path): Stubs. | |
270 | * name-lookup.c (STAT_TYPE_VISIBLE_P, STAT_VISIBLE): New. | |
271 | (search_imported_binding_slot, init_global_partition) | |
272 | (get_fixed_binding_slot): New. | |
273 | (name_lookup::process_module_binding): New. | |
274 | (name_lookup::search_namespace_only): Search BINDING_VECTOR. | |
275 | (name_lookup::adl_namespace_fns): Likewise. | |
276 | (name_lookip::search_adl): Search visible instantiation path. | |
277 | (maybe_lazily_declare): Maybe lazy load members. | |
278 | (implicitly_exporT_namespace): New. | |
279 | (maybe_record_mergeable_decl): New. | |
280 | (check_module_override): New. | |
281 | (do_pushdecl): Deal with BINDING_VECTOR, check override. | |
282 | (add_mergeable_namespace_entity): New. | |
283 | (get_namespace_binding): Deal with BINDING_VECTOR. | |
284 | (do_namespace_alias): Call set_originating_module. | |
285 | (lookup_elaborated_type_1): Deal with BINDING_VECTOR. | |
286 | (do_pushtag): Call set_originating_module. | |
287 | (reuse_namespace): New. | |
288 | (make_namespace_finish): Add FROM_IMPORT parm. | |
289 | (push_namespace): Deal with BINDING_VECTOR & namespace reuse. | |
290 | (maybe_save_operator_binding): Save when module CMI in play. | |
291 | * name-lookup.h (add_mergeable_namespace_entity): Declare. | |
292 | ||
293 | 2020-12-10 Nathan Sidwell <nathan@acm.org> | |
294 | ||
295 | * name-lookup.c: Include bitmap.h. | |
296 | (enum binding_slots): New. | |
297 | (maybe_add_fuzzy_binding): Return bool true if found. | |
298 | (consider_binding_level): Add module support. | |
299 | * module.cc (get_import_bitmap): Stub. | |
300 | ||
301 | 2020-12-10 Nathan Sidwell <nathan@acm.org> | |
302 | ||
303 | * name-lookup.c (pop_local_binding): Check for IDENTIFIER_ANON_P. | |
304 | (update_binding): Level may be null, don't add namespaces to | |
305 | level. | |
306 | (newbinding_bookkeeping): New, broken out of ... | |
307 | (do_pushdecl): ... here, call it. Don't push anonymous decls. | |
308 | (pushdecl, add_using_namespace): Correct comments. | |
309 | (do_push_nested_namespace): Remove assert. | |
310 | (make_namespace, make_namespace_finish): New, broken out of ... | |
311 | (push_namespace): ... here. Call them. Add namespace to level | |
312 | here. | |
313 | ||
314 | 2020-12-10 Nathan Sidwell <nathan@acm.org> | |
315 | ||
316 | * error.c (dump_module_suffix): New. | |
317 | (dump_aggr_type, dump_simple_decl, dump_function_name): Call it. | |
318 | * ptree.c (cxx_print_decl): Print module information. | |
319 | * module.cc (module_name, get_importing_module): Stubs. | |
320 | ||
321 | 2020-12-10 Nathan Sidwell <nathan@acm.org> | |
322 | ||
323 | * name-lookup.h (set_class_bindings): Return vector, take signed | |
324 | 'extra' parm. | |
325 | * name-lookup.c (maybe_lazily_declare): Break out ... | |
326 | (get_class_binding): .. of here, call it. | |
327 | (find_member_slot): Adjust get_class_bindings call. | |
328 | (set_class_bindings): Allow -ve extra. Return the vector. | |
329 | (set_identifier_type_value_with_scope): Remove checking assert. | |
330 | (lookup_using_decl): Set decl's context. | |
331 | (do_pushtag): Adjust set_identifier_type_value_with_scope handling. | |
332 | ||
ca2bd949 GA |
333 | 2020-12-09 Nathan Sidwell <nathan@acm.org> |
334 | ||
335 | * parser.h (struct cp_token): Add main_source_p field. | |
336 | * parser.c (cp_lexer_new_main): Pass thought module token filter. | |
337 | Check macros. | |
338 | (cp_lexer_get_preprocessor_token): Set main_source_p. | |
339 | (enum module_parse): New. | |
340 | (cp_parser_diagnose_invalid_type_name): Deal with unrecognized | |
341 | module-directives. | |
342 | (cp_parser_skip_to_closing_parenthesize_1): Skip module-directivres. | |
343 | (cp_parser_skip_to_end_of_statement): Likewise. | |
344 | (cp_parser_skiup_to_end_of_block_or_statement): Likewise. | |
345 | (cp_parser_translation_unit): Add module parsing calls. | |
346 | (cp_parser_module_name, cp_parser_module_declaration): New. | |
347 | (cp_parser_import_declaration, cp_parser_module_export): New. | |
348 | (cp_parser_declaration): Add module export detection. | |
349 | (cp_parser_template_declaration): Adjust 'export' error message. | |
350 | (cp_parser_function_definition_after_declarator): Add | |
351 | module-specific logic. | |
352 | * module.cc (import_module, declare_module) | |
353 | (maybe_check_all_macros): Stubs. | |
354 | ||
355 | 2020-12-09 Marek Polacek <polacek@redhat.com> | |
356 | ||
357 | PR c++/97517 | |
358 | * cxx-pretty-print.c (cxx_pretty_printer::simple_type_specifier): Handle | |
359 | NULLPTR_TYPE. | |
360 | (pp_cxx_type_specifier_seq): Likewise. | |
361 | (cxx_pretty_printer::type_id): Likewise. | |
362 | ||
363 | 2020-12-09 Nathan Sidwell <nathan@acm.org> | |
364 | ||
365 | * decl.c (duplicate_decls): Add module-specific redeclaration | |
366 | logic. | |
367 | (cxx_init_decl_processing): Export the global namespace, maybe | |
368 | initialize modules. | |
369 | (start_decl): Reject local-extern in a module, adjust linkage of | |
370 | template var. | |
371 | (xref_tag_1): Add module-specific redeclaration logic. | |
372 | (start_enum): Likewise. | |
373 | (finish_enum_value_list): Export unscoped members of an exported | |
374 | enum. | |
375 | (grokmethod): Implement p1779 linkage of in-class defined | |
376 | functions. | |
377 | * decl2.c (no_linkage_error): Imports are ok. | |
378 | (c_parse_final_cleanups): Call fini_modules. | |
379 | * lex.c (cxx_dup_lang_specific): Clear some module flags in the | |
380 | copy. | |
381 | * module.cc (module_kind): Define. | |
382 | (module_may_redeclare, set_defining_module): Stubs. | |
383 | (init_modules): Error on modules. | |
384 | (fini_modules): Stub. | |
385 | * rtti.c (push_abi_namespace): Save and reset module_kind. | |
386 | (pop_abi_namespace): Restore module kind. | |
387 | (build_dynamic_cast_1, tinfo_base_init): Adjust. | |
388 | * semantics.c (begin_class_definition): Add module-specific logic. | |
389 | (expand_or_defer_fn_1): Keep bodies of more fns when modules_p. | |
390 | ||
391 | 2020-12-09 Tobias Burnus <tobias@codesourcery.com> | |
392 | ||
393 | * parser.c (cp_parser_omp_allocate): New. | |
394 | (cp_parser_omp_construct, cp_parser_pragma): Call it. | |
395 | ||
396 | 2020-12-09 Jason Merrill <jason@redhat.com> | |
397 | ||
398 | PR c++/98019 | |
399 | * cvt.c (maybe_warn_nodiscard): Check c_inhibit_evaluation_warnings. | |
400 | ||
401 | 2020-12-09 Jason Merrill <jason@redhat.com> | |
402 | ||
403 | PR c++/59238 | |
404 | * init.c (expand_default_init): Pass tf_no_cleanup when building | |
405 | a TARGET_EXPR to go on the RHS of an INIT_EXPR. | |
406 | * typeck.c (cp_build_modify_expr): Likewise. | |
407 | ||
f6e8e279 GA |
408 | 2020-12-08 Marek Polacek <polacek@redhat.com> |
409 | ||
410 | PR c++/98103 | |
411 | * constexpr.c (cxx_eval_dynamic_cast_fn): If the evaluating of vtable | |
412 | yields a null pointer, give an error and return. Use objtype. | |
413 | ||
414 | 2020-12-08 Nathan Sidwell <nathan@acm.org> | |
415 | ||
416 | * class.c (layout_class_type): Call set_instantiating_module. | |
417 | (build_self_reference): Likewise. | |
418 | * decl.c (grokfndecl): Call set_originating_module. | |
419 | (grokvardecl): Likewise. | |
420 | (grokdeclarator): Likewise. | |
421 | * pt.c (maybe_new_partial_specialization): Call | |
422 | set_instantiating_module, propagate DECL_MODULE_EXPORT_P. | |
423 | (lookup_template_class_1): Likewise. | |
424 | (tsubst_function_decl): Likewise. | |
425 | (tsubst_decl, instantiate_template_1): Likewise. | |
426 | (build_template_decl): Propagate module flags. | |
427 | (tsubst_template_dcl): Likewise. | |
428 | (finish_concept_definition): Call set_originating_module. | |
429 | * module.cc (set_instantiating_module, set_originating_module): Stubs. | |
430 | ||
431 | 2020-12-08 Jason Merrill <jason@redhat.com> | |
432 | ||
433 | PR c++/96299 | |
434 | * cp-tree.h (build_new_op): Add overload that omits some parms. | |
435 | (genericize_spaceship): Add location_t parm. | |
436 | * constexpr.c (cxx_eval_binary_expression): Pass it. | |
437 | * cp-gimplify.c (genericize_spaceship): Pass it. | |
438 | * method.c (genericize_spaceship): Handle class-type arguments. | |
439 | (build_comparison_op): Fall back to op</== when appropriate. | |
440 | ||
441 | 2020-12-08 Jason Merrill <jason@redhat.com> | |
442 | ||
443 | * call.c (build_new_op_1): Set *overload for ambiguity. | |
444 | (build_new_method_call_1): Likewise. | |
445 | ||
446 | 2020-12-08 Bernd Edlinger <bernd.edlinger@hotmail.de> | |
447 | ||
448 | * decl2.c: (is_atomic_expensive_p): New helper function. | |
449 | (build_atomic_load_byte): Rename to... | |
450 | (build_atomic_load_type): ... and add new parameter type. | |
451 | (get_guard_cond): Skip the atomic here if that is expensive. | |
452 | Use the correct type for the atomic load on certain targets. | |
453 | ||
454 | 2020-12-08 Nathan Sidwell <nathan@acm.org> | |
455 | ||
456 | * cp-tree.h (struct tinst_level): Add path & visible fields. | |
457 | (build_cdtor_clones): Declare. | |
458 | (match_mergeable_specialization): Use a spec_entry, add insert parm. | |
459 | * class.c (build_cdtor_clones): Externalize. | |
460 | * pt.c (push_tinst_level_loc): Clear new fields. | |
461 | (match_mergeable_specialization): Adjust API. | |
462 | ||
463 | 2020-12-08 Nathan Sidwell <nathan@acm.org> | |
464 | ||
465 | * decl2.c (start_objects): Refactor and adjust for named module | |
466 | initializers. | |
467 | (finish_objects): Likewise. | |
468 | (generate_ctor_or_dtor_function): Likewise. | |
469 | * module.cc (module_initializer_kind) | |
470 | (module_add_import_initializers): Stubs. | |
471 | ||
472 | 2020-12-08 Nathan Sidwell <nathan@acm.org> | |
473 | ||
474 | * Make-lang.in (MODULE_VERSION): Override when DEVPHASE not empty. | |
475 | * module.cc: Comment. | |
476 | ||
477 | 2020-12-08 Nathan Sidwell <nathan@acm.org> | |
478 | ||
479 | * cp-tree.h (mangle_module_substitution, mangle_identifier) | |
480 | (mangle_module_global_init): Declare. | |
481 | * mangle.c (struct globals): Add mod field. | |
482 | (mangle_module_substitution, mangle_identifier) | |
483 | (mangle_module_global_init): Define. | |
484 | (write_module, maybe_write_module): New. | |
485 | (write_name): Call it. | |
486 | (start_mangling): Clear mod field. | |
487 | (finish_mangling_internal): Adjust. | |
488 | * module.cc (mangle_module, mangle_module_fini) | |
489 | (get_originating_module): Stubs. | |
490 | ||
491 | 2020-12-08 Nathan Sidwell <nathan@acm.org> | |
492 | ||
493 | * cp-tree.h (module_token_pre, module_token_cdtor) | |
494 | (module_token_lang): Declare. | |
495 | * lex.c: Include langhooks. | |
496 | (struct module_token_filter): New. | |
497 | * cp-tree.h (module_token_pre, module_token_cdtor) | |
498 | (module_token_lang): Define. | |
499 | * module.cc (get_module, preprocess_module, preprocessed_module): | |
500 | Nop stubs. | |
501 | ||
502 | 2020-12-08 Nathan Sidwell <nathan@acm.org> | |
503 | ||
504 | * Make-lang.in (MODULE_VERSION): Define. | |
505 | * module.cc: Add includes. | |
506 | ||
507 | 2020-12-08 Jakub Jelinek <jakub@redhat.com> | |
508 | ||
509 | PR c++/98187 | |
510 | * parser.c (cp_parser_omp_parallel): For parallel master with | |
511 | -fopenmp-simd only, just call cp_parser_omp_master instead of | |
512 | wrapping it in OMP_PARALLEL. | |
513 | ||
bc8a7013 GA |
514 | 2020-12-07 Marek Polacek <polacek@redhat.com> |
515 | ||
516 | PR c++/98043 | |
517 | * decl.c (pop_switch): If SWITCH_STMT_TYPE is a scoped enum type, | |
518 | set it to the type of SWITCH_STMT_COND. | |
519 | ||
520 | 2020-12-07 Nathan Sidwell <nathan@acm.org> | |
521 | ||
522 | * cp-tree.h (build_cplus_array_type): Add defaulted DEP parm. | |
523 | * tree.c (set_array_type_common): Add DEP parm. | |
524 | (build_cplus_array_type): Add DEP parm, determine dependency if | |
525 | needed. Mark dependency of new types. | |
526 | (cp_build_qualified_type_real): Adjust array-building call, assert | |
527 | no surprising dependency. | |
528 | (strip_typedefs): Likewise. | |
529 | ||
530 | 2020-12-07 Nathan Sidwell <nathan@acm.org> | |
531 | ||
532 | PR c++/98116 | |
533 | * typeck.c (structural_comptypes): Move early outs to comptype. | |
534 | Always check template-alias match when comparing_specializations. | |
535 | (comptypes): Do early out checking here. | |
536 | ||
6e1edf48 GA |
537 | 2020-12-05 Patrick Palka <ppalka@redhat.com> |
538 | ||
539 | PR c++/97093 | |
540 | * constraint.cc (parameter_mapping_equivalent_p): Add some | |
541 | sanity checks. Clarify comment. | |
542 | (tsubst_nested_requirement): Always perform satisfaction | |
543 | quietly first. If that yields an erroneous result, emit a | |
544 | context message and replay satisfaction noisily with the | |
545 | diagnostic normal form. | |
546 | (finish_nested_requirement): Normalize the constraint-expression | |
547 | twice, once with diagnostic information and once without. Store | |
548 | them in a TREE_LIST within the TREE_TYPE. | |
549 | (diagnose_nested_requirement): When replaying satisfaction, use | |
550 | the diagnostic normal form instead of renormalizing on the spot. | |
551 | ||
552 | 2020-12-05 Patrick Palka <ppalka@redhat.com> | |
553 | ||
554 | PR c++/97093 | |
555 | * constraint.cc (struct sat_info): Define. | |
556 | (tsubst_nested_requirement): Pass a sat_info object to | |
557 | satisfy_constraint. | |
558 | (satisfy_constraint_r): Take a sat_info argument instead of | |
559 | subst_info. | |
560 | (satisfy_conjunction): Likewise. | |
561 | (satisfy_disjunction): Likewise. Instead of first evaluating | |
562 | each branch quietly, evaluate each branch only with | |
563 | unsatisfaction diagnostics disabled. Exit early if evaluation | |
564 | of a branch returns error_mark_node. | |
565 | (satisfy_atom): Take a sat_info argument instead of subst_info. | |
566 | Fix a comment. Check diagnose_unsatisfaction_p() instead of | |
567 | noisy() before replaying a substitution failure. | |
568 | (satisfy_constraint): Take a sat_info argument instead of | |
569 | subst_info. | |
570 | (satisfy_associated_constraints): Likewise. | |
571 | (satisfy_constraint_expression): Likewise. | |
572 | (satisfy_declaration_constraints): Likewise. | |
573 | (constraint_satisfaction_value): Likewise and adjust | |
574 | accordingly. Fix formatting. | |
575 | (constraints_satisfied_p): Pass a sat_info object to | |
576 | constraint_satisfaction_value. | |
577 | (evaluate_concept_check): Pass a sat_info object to | |
578 | satisfy_constraint_expression. | |
579 | (diagnose_nested_requirement): Likewise. | |
580 | (diagnose_constraints): Pass an appropriate sat_info object to | |
581 | constraint_satisfaction_value. | |
582 | ||
583 | 2020-12-05 Jakub Jelinek <jakub@redhat.com> | |
584 | ||
585 | PR c++/98122 | |
586 | * constexpr.c (cxx_union_active_member): New function. | |
587 | (cxx_fold_indirect_ref_1): Add ctx argument, pass it through to | |
588 | recursive call. Handle UNION_TYPE. | |
589 | (cxx_fold_indirect_ref): Add ctx argument, pass it to recursive calls | |
590 | and cxx_fold_indirect_ref_1. | |
591 | (cxx_eval_indirect_ref): Adjust cxx_fold_indirect_ref calls. | |
592 | ||
c5fd8a91 GA |
593 | 2020-12-04 Jason Merrill <jason@redhat.com> |
594 | ||
595 | PR c++/93083 | |
596 | * pt.c (convert_template_argument): Handle equivalent placeholders. | |
597 | (do_class_deduction): Look through EXPR_PACK_EXPANSION, too. | |
598 | ||
599 | 2020-12-04 Jason Merrill <jason@redhat.com> | |
600 | ||
601 | * decl2.c (clear_consteval_vfns): Remove *. | |
602 | * pt.c (do_auto_deduction): Remove *. | |
603 | * parser.c (cp_parser_late_parsing_default_args): Change loop | |
604 | to use range 'for'. | |
605 | ||
606 | 2020-12-04 Nathan Sidwell <nathan@acm.org> | |
607 | ||
608 | PR c++/98116 | |
609 | * cp-tree.h (comparing_typenames): Delete. | |
610 | (cplus_build_array_type): Remove default parm. | |
611 | * pt.c (comparing_typenames): Delete. | |
612 | (spec_hasher::equal): Don't increment it. | |
613 | * tree.c (set_array_type_canon): Remove dep parm. | |
614 | (build_cplus_array_type): Remove dep parm changes. | |
615 | (cp_build_qualified_type_real): Remove dependent array type | |
616 | changes. | |
617 | (strip_typedefs): Likewise. | |
618 | * typeck.c (structural_comptypes): Revert comparing_typename | |
619 | changes. | |
620 | ||
621 | 2020-12-04 Nathan Sidwell <nathan@acm.org> | |
622 | ||
623 | * cp-tree.h: Add various inline module state predicates, and | |
624 | declare the API that will be provided by modules.cc | |
625 | ||
626 | 2020-12-04 Jakub Jelinek <jakub@redhat.com> | |
627 | ||
628 | PR c++/80780 | |
629 | * cp-gimplify.c (fold_builtin_source_location): Use 2 instead of 0 | |
630 | as last argument to cxx_printable_name. | |
631 | ||
b8dd0ef7 GA |
632 | 2020-12-03 Jason Merrill <jason@redhat.com> |
633 | ||
634 | * cp-tree.h (releasing_vec::operator[]): Change parameter type to | |
635 | ptrdiff_t. | |
636 | ||
637 | 2020-12-03 Nathan Sidwell <nathan@acm.org> | |
638 | ||
639 | * cp-tree.h (OVL_EXPORT): New. | |
640 | (class ovl_iterator): Add get_using, exporting_p. | |
641 | * tree.c (ovl_insert): Extend using_or_hidden meaning to include | |
642 | an exported using. | |
643 | ||
644 | 2020-12-03 Nathan Sidwell <nathan@acm.org> | |
645 | ||
646 | * cp-tree.h (DECL_UNINSTANTIATED_TEMPLATE_FRIEND): New. | |
647 | * pt.c (push_template_decl): Set it. | |
648 | (tsubst_friend_function): Clear it. | |
649 | ||
650 | 2020-12-03 Nathan Sidwell <nathan@acm.org> | |
651 | ||
652 | * cp-tree.h (make_unbound_class_template_raw): Declare. | |
653 | (canonical_type_parameter): Declare. | |
654 | * decl.c (make_unbound_class_template_raw): Break out of ... | |
655 | (make_unboud_class_template): ... here. Call it. | |
656 | * pt.c (canonical_type_parameter): Externalize. Refactor & set | |
657 | structural_equality for type parms. | |
658 | ||
659 | 2020-12-03 Nathan Sidwell <nathan@acm.org> | |
660 | ||
661 | PR c++/98107 | |
662 | * tree.c (build_cplus_array_type): Mark dependency of new variant. | |
663 | (cp_build_qualified_type_real, strip_typedefs): Assert | |
664 | TYPE_DEPENDENT_P_VALID, or not a dependent type. | |
665 | ||
666 | 2020-12-03 Jakub Jelinek <jakub@redhat.com> | |
667 | ||
668 | PR libstdc++/93121 | |
669 | * cp-tree.h (cp_build_bit_cast): Declare. | |
670 | * cp-tree.def (BIT_CAST_EXPR): New tree code. | |
671 | * cp-objcp-common.c (names_builtin_p): Handle RID_BUILTIN_BIT_CAST. | |
672 | (cp_common_init_ts): Handle BIT_CAST_EXPR. | |
673 | * cxx-pretty-print.c (cxx_pretty_printer::postfix_expression): | |
674 | Likewise. | |
675 | * parser.c (cp_parser_postfix_expression): Handle | |
676 | RID_BUILTIN_BIT_CAST. | |
677 | * semantics.c (cp_build_bit_cast): New function. | |
678 | * tree.c (cp_tree_equal): Handle BIT_CAST_EXPR. | |
679 | (cp_walk_subtrees): Likewise. | |
680 | * pt.c (tsubst_copy): Likewise. | |
681 | * constexpr.c (check_bit_cast_type, cxx_eval_bit_cast): New functions. | |
682 | (cxx_eval_constant_expression): Handle BIT_CAST_EXPR. | |
683 | (potential_constant_expression_1): Likewise. | |
684 | * cp-gimplify.c (cp_genericize_r): Likewise. | |
685 | ||
686 | 2020-12-03 Jason Merrill <jason@redhat.com> | |
687 | ||
688 | * parser.c (cp_parser_primary_expression): Distinguish | |
689 | parms from vars in error. | |
690 | (cp_parser_late_parsing_default_args): Pushdecl parms | |
691 | as we go. | |
692 | ||
693 | 2020-12-03 Jason Merrill <jason@redhat.com> | |
694 | ||
695 | * name-lookup.c (begin_scope): Set immediate_fn_ctx_p. | |
696 | * parser.c (cp_parser_late_parsing_default_args): Push | |
697 | sk_function_parms scope. | |
698 | ||
11860cf4 GA |
699 | 2020-12-03 Peter Bergner <bergner@linux.ibm.com> |
700 | ||
701 | PR c++/97947 | |
702 | * typeck2.c (digest_init_r): Handle OPAQUE_TYPE as an aggregate type. | |
703 | ||
704 | 2020-12-02 Jakub Jelinek <jakub@redhat.com> | |
705 | ||
706 | PR c++/80780 | |
707 | PR c++/93093 | |
708 | * cp-tree.h (source_location_current_p): Declare. | |
709 | * tree.c (source_location_current_p): New function. | |
710 | * call.c (immediate_invocation_p): New function. | |
711 | (build_over_call): Use it to resolve LWG3396. | |
712 | * constexpr.c (cxx_eval_builtin_function_call): Temporarily set | |
713 | current_function_decl from ctx->call->fundef->decl if any. | |
714 | * cp-gimplify.c (cp_genericize_r) <case CALL_EXPR>: Fold calls | |
715 | to immediate function std::source_location::current (). | |
716 | ||
717 | 2020-12-02 Jason Merrill <jason@redhat.com> | |
718 | ||
719 | * decl.c (grokdeclarator): Improve diagnostic for | |
720 | disallowed CTAD placeholder. | |
721 | ||
722 | 2020-12-02 Jason Merrill <jason@redhat.com> | |
723 | ||
724 | * decl.c (check_initializer): Also look through STMT_EXPR | |
725 | and BIND_EXPR. | |
726 | ||
727 | 2020-12-02 Nathan Sidwell <nathan@acm.org> | |
728 | ||
729 | * cp-tree.h (comparing_typenames): Declare. | |
730 | * pt.c (comparing_typenames): Define. | |
731 | (spec_hasher::equal): Increment it around comparisons. | |
732 | * typeck.c (structural_comptypes): Adjust TYPENAME resolution | |
733 | check. | |
734 | ||
735 | 2020-12-02 Marek Polacek <polacek@redhat.com> | |
736 | ||
737 | PR c++/97975 | |
738 | * constexpr.c (fold_non_dependent_init): Add a tree parameter. | |
739 | Use it. | |
740 | * cp-tree.h (fold_non_dependent_init): Add a tree parameter with | |
741 | a default value. | |
742 | * typeck2.c (store_init_value): Call fold_non_dependent_expr | |
743 | only when checking the initializer for constexpr variables. | |
744 | Call fold_non_dependent_init instead of maybe_constant_init. | |
745 | ||
746 | 2020-12-02 Marek Polacek <polacek@redhat.com> | |
747 | ||
748 | PR c++/97187 | |
749 | PR c++/97993 | |
750 | * pt.c (tsubst_copy_and_build) <case NEW_EXPR>: Return error_mark_node | |
751 | if init is erroneous. | |
752 | ||
753 | 2020-12-02 Nathan Sidwell <nathan@acm.org> | |
754 | ||
755 | * cp-tree.h (DECL_MODULE_PURVIEW_P, DECL_MODULE_IMPORT_P) | |
756 | (DECL_MODULE_ENTITY_P): New. | |
757 | (DECL_MODULE_PENDING_SPECIALIZATIONS_P): New. | |
758 | (DECL_MODULE_PENDING_MEMBERS_P): New. | |
759 | (DECL_MODULE_ATTACHMENTS_P): New. | |
760 | (DECL_MODULE_EXPORT_P): New. | |
761 | (struct lang_decl_base): Shrink sel field. Add new | |
762 | module-specific fields. | |
763 | ||
764 | 2020-12-02 Nathan Sidwell <nathan@acm.org> | |
765 | ||
766 | * cp-tree.h (DECL_TINFO_P): Also for TYPE_DECLs. | |
767 | (get_tinfo_decl_direct): Declare. | |
768 | (get_pseudo_tinfo_index, get_pseudo_tinfo_type): Declare. | |
769 | * rtti.c (get_tinfo_decl_direct): Externalize. | |
770 | (get_tinfo_desc): Set DECL_TINFO_P on the typedef. | |
771 | (get_pseudo_tinfo_index, get_pseudo_tinfo_type): New. | |
772 | ||
773 | 2020-12-02 Nathan Sidwell <nathan@acm.org> | |
774 | ||
775 | * cp-tree.h (maybe_add_lang_decl_raw, maybe_add_lang_type_raw): | |
776 | Declare. | |
777 | * lex.c (maybe_add_lang_decl_raw, maybe_add_lang_type_raw): | |
778 | Externalize, reformat. | |
779 | ||
780 | 2020-12-02 Nathan Sidwell <nathan@acm.org> | |
781 | ||
782 | * cp-tree.h (build_cplus_array_type): Add defaulted DEP parm. | |
783 | * tree.c (set_array_type_common): Add DEP parm. | |
784 | (build_cplus_array_type): Add DEP parm, determine dependency if | |
785 | needed. | |
786 | (cp_build_qualified_type_real): Adjust array-building call. | |
787 | (strip_typedefs): Likewise. | |
788 | ||
789 | 2020-12-02 Nathan Sidwell <nathan@acm.org> | |
790 | ||
791 | * ptree.c (cxx_print_xnode): Increase binding-vector prefix size. | |
792 | ||
793 | 2020-12-02 Nathan Sidwell <nathan@acm.org> | |
794 | ||
795 | * cp-tree.def (BINDING_VECTOR): New. | |
796 | * name-lookup.h (struct binding_slot): New. | |
797 | (BINDING_VECTOR_SLOTS_PER_CLUSTER): New. | |
798 | (struct binding_index, struct binding_cluster): New. | |
799 | (BINDING_VECTOR_ALLOC_CLUSTERS, BINDING_VECTOR_CLUSTER_BASE) | |
800 | (BINDING_VECTOR_CLUSTER): New. | |
801 | (struct tree_binding_vec): New. | |
802 | (BINDING_VECTOR_NAME, BINDING_VECTOR_GLOBAL_DUPS_P) | |
803 | (BINDING_VECTOR_PARTITION_DUPS_P): New. | |
804 | (BINDING_BINDING_GLOBAL_P, BINDING_BINDING_PARTITION_P): New. | |
805 | (BINDING_VECTOR_PENDING_SPECIALIZATIONS) | |
806 | (BINDING_VECTOR_PENDING_IS_HEADER_P) | |
807 | (BINDING_VECTOR_PENDING_IS_PARTITION_P): New. | |
808 | * cp-tree.h (enum cp_tree_node_structure_enum): Add | |
809 | TS_CP_BINDING_VECTOR. | |
810 | (union lang_tree_node): Add binding_vec field. | |
811 | (make_binding_vec): Declare. | |
812 | (named_decl_hash::hash, named_decl_hash::equal): Check for binding | |
813 | vector. | |
814 | * decl.c (cp_tree_node_structure): Add BINDING_VECTOR case. | |
815 | * ptree.c (cxx_print_xnode): Add BINDING_VECTOR case. | |
816 | * tree.c (make_binding_vec): New. | |
817 | ||
e0f5e792 GA |
818 | 2020-12-01 Ville Voutilainen <ville.voutilainen@gmail.com> |
819 | ||
820 | PR c++/98054 | |
821 | * cxx-pretty-print.c (pp_cxx_trait_expression): | |
822 | Add support for __is_nothrow_{assignable,constructible}. | |
823 | ||
824 | 2020-12-01 Jakub Jelinek <jakub@redhat.com> | |
825 | ||
826 | PR c++/98072 | |
827 | * parser.c (cp_parser_omp_depobj): Suppress location wrappers when | |
828 | parsing depend clause. | |
829 | ||
830 | 2020-12-01 Nathan Sidwell <nathan@acm.org> | |
831 | ||
832 | * lex.c (init_reswords): Maybe enable module keywords. | |
833 | ||
834 | 2020-12-01 Nathan Sidwell <nathan@acm.org> | |
835 | ||
836 | * lang-specs.h: Add module-related options. | |
837 | ||
838 | 2020-12-01 Iain Sandoe <iain@sandoe.co.uk> | |
839 | ||
840 | * parser.c (cp_parser_declaration): Add a not about where | |
841 | attributes may be placed. | |
842 | ||
e87559d2 GA |
843 | 2020-11-27 Martin Sebor <msebor@redhat.com> |
844 | ||
845 | * error.c (add_quotes): Revert previous change and use pragma to | |
846 | suppress -Wformat-diag. | |
847 | ||
d48df6f2 GA |
848 | 2020-11-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> |
849 | ||
850 | * g++spec.c (TIMELIB, TIME_LIBRARY): Remove. | |
851 | (lang_specific_driver): Remove TIME_LIBRARY handling. | |
852 | ||
853 | 2020-11-26 Thomas Schwinge <thomas@codesourcery.com> | |
854 | ||
855 | * parser.c (cp_parser_omp_var_list_no_open): Assert that array | |
856 | section's 'low_bound', 'length' are not location wrapper nodes. | |
857 | (cp_parser_oacc_all_clauses, cp_parser_oacc_cache): Instantiate | |
858 | 'auto_suppress_location_wrappers'. | |
859 | ||
360258da GA |
860 | 2020-11-25 Martin Sebor <msebor@redhat.com> |
861 | ||
862 | PR bootstrap/94982 | |
863 | * constraint.cc (debug_argument_list): Avoid -Wformat-diag. | |
864 | * error.c (function_category): Same. | |
865 | (print_template_differences): Same. | |
866 | * logic.cc (debug): Same. | |
867 | * name-lookup.c (lookup_using_decl): Same. | |
868 | * parser.c (maybe_add_cast_fixit): Same. | |
869 | (cp_parser_template_introduction): Same. | |
870 | * typeck.c (access_failure_info::add_fixit_hint): Same. | |
871 | ||
872 | 2020-11-25 Thomas Schwinge <thomas@codesourcery.com> | |
873 | ||
874 | * pt.c (tsubst_omp_clauses): Handle 'OMP_CLAUSE__CACHE_'. | |
875 | (tsubst_expr): Handle 'OACC_CACHE'. | |
876 | ||
1e2c9a27 GA |
877 | 2020-11-24 Jason Merrill <jason@redhat.com> |
878 | ||
879 | PR c++/97899 | |
880 | * typeck2.c (store_init_value): Don't split_nonconstant_init in a | |
881 | template. | |
882 | ||
883 | 2020-11-24 Jakub Jelinek <jakub@redhat.com> | |
884 | ||
885 | PR tree-optimization/96929 | |
886 | * constexpr.c (cxx_eval_binary_expression): For shifts by constant | |
887 | with MSB set, emulate older wide_int_binop behavior to preserve | |
888 | diagnostics and -fpermissive behavior. | |
889 | ||
8e6198d0 GA |
890 | 2020-11-23 Nathan Sidwell <nathan@acm.org> |
891 | ||
892 | * module.cc: New dummy file. | |
893 | * Make-lang.in: Add rules to build module.o | |
894 | ||
895 | 2020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com> | |
896 | ||
897 | * decl.c (start_decl): Set DECL_INITIAL for initialized decls | |
898 | before attribute processing. | |
899 | ||
900 | 2020-11-23 Richard Sandiford <richard.sandiford@arm.com> | |
901 | ||
902 | PR c++/97904 | |
903 | * pt.c (tsubst): Use verify_type_context to check the type | |
904 | of an array element. | |
905 | ||
7a97e2fc GA |
906 | 2020-11-21 Marek Polacek <polacek@redhat.com> |
907 | ||
908 | PR c++/94695 | |
909 | * parser.c (warn_for_range_copy): Warn when the loop variable is | |
910 | initialized with a value of a different type resulting in a copy. | |
911 | ||
912 | 2020-11-21 Marek Polacek <polacek@redhat.com> | |
913 | ||
914 | PR c++/97846 | |
915 | * constexpr.c (potential_constant_expression_1): Reject | |
916 | LABEL_EXPRs that use non-artifical LABEL_DECLs. | |
917 | ||
918 | 2020-11-21 Marek Polacek <polacek@redhat.com> | |
919 | ||
920 | PR c++/97881 | |
921 | * parser.c (warn_about_ambiguous_parse): Only assume "int" if we | |
922 | actually saw any type-specifiers. | |
923 | ||
924 | 2020-11-21 Marek Polacek <polacek@redhat.com> | |
925 | ||
926 | PR c++/97839 | |
927 | * parser.c (cp_parser_lambda_declarator_opt): Don't require (). | |
928 | ||
929 | 2020-11-21 Marek Polacek <polacek@redhat.com> | |
930 | ||
931 | PR c++/97427 | |
932 | * constexpr.c (cxx_set_object_constness): New function. | |
933 | (cxx_eval_call_expression): Set new_obj for destructors too. | |
934 | Call cxx_set_object_constness to set/unset TREE_READONLY of | |
935 | the object under construction/destruction. | |
936 | ||
937 | 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com> | |
938 | ||
939 | * error.c (dump_type): Handle opaque types. | |
940 | (dump_type_prefix): Handle opaque types. | |
941 | (dump_type_suffix): Handle opaque types. | |
942 | (dump_expr): Handle opaque types. | |
943 | * pt.c (tsubst): Allow opaque types in templates. | |
944 | (unify): Allow opaque types in templates. | |
945 | * typeck.c (structural_comptypes): Handle comparison | |
946 | of opaque types. | |
947 | ||
82e5048e GA |
948 | 2020-11-20 Jakub Jelinek <jakub@redhat.com> |
949 | ||
950 | PR other/97911 | |
951 | * Make-lang.in (c++.serial): Change from goal to a variable. | |
952 | (.PHONY): Drop c++.serial and c++.prev. | |
953 | (cc1plus$(exeext)): Depend on $(c++.serial) rather than c++.serial. | |
954 | ||
d62586ee GA |
955 | 2020-11-19 Nathan Sidwell <nathan@acm.org> |
956 | ||
957 | * cp-tree.h (struct spec_entry): Moved from pt.c. | |
958 | (walk_specializations, match_mergeable_specialization) | |
959 | (get_mergeable_specialization_flags) | |
960 | (add_mergeable_specialization): Declare. | |
961 | * pt.c (struct spec_entry): Moved to cp-tree.h. | |
962 | (walk_specializations, match_mergeable_specialization) | |
963 | (get_mergeable_specialization_flags) | |
964 | (add_mergeable_specialization): New. | |
965 | ||
966 | 2020-11-19 Nathan Sidwell <nathan@acm.org> | |
967 | ||
968 | * cp-tree.h (struct constexpr_fundef): Moved from constexpr.c. | |
969 | (maybe_save_constexpr_fundef): Declare. | |
970 | (register_constexpr_fundef): Take constexpr_fundef object, return | |
971 | void. | |
972 | * decl.c (mabe_save_function_definition): Delete, functionality | |
973 | moved to maybe_save_constexpr_fundef. | |
974 | (emit_coro_helper, finish_function): Adjust. | |
975 | * constexpr.c (struct constexpr_fundef): Moved to cp-tree.h. | |
976 | (constexpr_fundef_hasher::equal): Constify. | |
977 | (constexpr_fundef_hasher::hash): Constify. | |
978 | (retrieve_constexpr_fundef): Make non-static. | |
979 | (maybe_save_constexpr_fundef): Break out checking and duplication | |
980 | from ... | |
981 | (register_constexpr_fundef): ... here. Just register the constexpr. | |
982 | ||
983 | 2020-11-19 Marek Polacek <polacek@redhat.com> | |
984 | ||
985 | PR c++/97523 | |
986 | * init.c (build_new): When value-initializing an array new, | |
987 | leave the INIT as an empty vector. | |
988 | ||
989 | 2020-11-19 Marek Polacek <polacek@redhat.com> | |
990 | ||
991 | PR c++/97895 | |
992 | * pt.c (do_auto_deduction): Don't crash when the constructor has | |
993 | zero elements. | |
994 | ||
995 | 2020-11-19 Nathan Sidwell <nathan@acm.org> | |
996 | ||
997 | PR c++/97905 | |
998 | * decl.c (duplicate_decls): Relax new assert. | |
999 | ||
25bb75f8 GA |
1000 | 2020-11-18 Iain Sandoe <iain@sandoe.co.uk> |
1001 | ||
1002 | * parser.c (cp_parser_objc_valid_prefix_attributes): Check | |
1003 | for empty attributes. | |
1004 | ||
1005 | 2020-11-18 Jakub Jelinek <jakub@redhat.com> | |
1006 | ||
1007 | * Make-lang.in (c++.serial): New goal. | |
1008 | (.PHONY): Add c++.serial c++.prev. | |
1009 | (cc1plus$(exeext)): Depend on c++.prev. Call LINK_PROGRESS. | |
1010 | ||
4dabb037 GA |
1011 | 2020-11-17 Nathan Sidwell <nathan@acm.org> |
1012 | ||
1013 | PR c++/97877 | |
1014 | * decl.c (duplicate_decls): Deal with duplicated DECL_LOCAL_DECL_P | |
1015 | decls. Extend decl_lang_specific checking assert. | |
1016 | ||
1017 | 2020-11-17 Nathan Sidwell <nathan@acm.org> | |
1018 | ||
1019 | * cp-tree.h (enum cp_tree_index): Reorder to place lazy fields | |
1020 | after newly-added CPTI_MODULE_HWM. | |
1021 | ||
1022 | 2020-11-17 Iain Sandoe <iain@sandoe.co.uk> | |
1023 | ||
1024 | PR c++/97871 | |
1025 | * parser.c (cp_parser_declaration): Remove checking assert. | |
1026 | ||
cba30651 GA |
1027 | 2020-11-15 Jason Merrill <jason@redhat.com> |
1028 | ||
1029 | * decl.c (cp_finish_decl): Only check abstractness on definition. | |
1030 | (require_complete_types_for_parms): Check abstractness here. | |
1031 | (create_array_type_for_decl): Not here. | |
1032 | (grokdeclarator, grokparms, complete_vars): Not here. | |
1033 | * pt.c (tsubst, tsubst_arg_types, tsubst_function_type): Not here. | |
1034 | * typeck2.c (struct pending_abstract_type): Remove. | |
1035 | (struct abstract_type_hasher): Remove. | |
1036 | (abstract_pending_vars, complete_type_check_abstract): Remove. | |
1037 | (abstract_virtuals_error_sfinae): Handle arrays. | |
1038 | * call.c (conv_is_prvalue): Split out from... | |
1039 | (conv_binds_ref_to_prvalue): ...here. | |
1040 | (implicit_conversion_1): Rename from implicit_conversion. | |
1041 | (implicit_conversion): An abstract prvalue is bad. | |
1042 | (convert_like_internal): Don't complain if expr is already | |
1043 | error_mark_node. | |
1044 | ||
77f67db2 GA |
1045 | 2020-11-13 Jason Merrill <jason@redhat.com> |
1046 | ||
1047 | * cp-tree.h (USING_DECL_UNRELATED_P): New. | |
1048 | (CONST_DECL_USING_P): New. | |
1049 | * class.c (handle_using_decl): If USING_DECL_UNRELATED_P, | |
1050 | clone the CONST_DECL. | |
1051 | * name-lookup.c (supplement_binding_1): A clone hides its | |
1052 | using-declaration. | |
1053 | (lookup_using_decl): Rewrite to separate lookup and validation. | |
1054 | (do_class_using_decl): Adjust. | |
1055 | (finish_nonmember_using_decl): Adjust. | |
1056 | * parser.c (make_location): Add cp_token overload. | |
1057 | (finish_using_decl): Split out from... | |
1058 | (cp_parser_using_declaration): ...here. Don't look through enums. | |
1059 | (cp_parser_using_enum): New. | |
1060 | (cp_parser_block_declaration): Call it. | |
1061 | (cp_parser_member_declaration): Call it. | |
1062 | * semantics.c (finish_id_expression_1): Handle enumerator | |
1063 | used from class scope. | |
1064 | ||
1065 | 2020-11-13 Vladimir N. Makarov <vmakarov@redhat.com> | |
1066 | ||
1067 | * parser.c (cp_parser_asm_definition): Parse outputs for asm | |
1068 | goto too. | |
1069 | ||
1070 | 2020-11-13 Iain Sandoe <iain@sandoe.co.uk> | |
1071 | ||
1072 | PR objc/77404 | |
1073 | * parser.c (cp_parser_objc_class_interface): Pass the | |
1074 | location of the class name to the interface declaration. | |
1075 | ||
a5a11525 GA |
1076 | 2020-11-13 Patrick Palka <ppalka@redhat.com> |
1077 | ||
1078 | * semantics.c (finish_compound_literal): Don't wrap the original | |
1079 | compound literal in a TARGET_EXPR when inside a template. | |
1080 | ||
1081 | 2020-11-12 Jakub Jelinek <jakub@redhat.com> | |
1082 | ||
1083 | PR c++/97790 | |
1084 | * constexpr.c (cxx_eval_constant_expression) <case CLEANUP_POINT_EXPR, | |
1085 | case TRY_FINALLY_EXPR, case CLEANUP_STMT>: Don't pass jump_target to | |
1086 | cxx_eval_constant_expression when evaluating the cleanups. | |
1087 | ||
0f5f9ed5 GA |
1088 | 2020-11-11 Iain Sandoe <iain@sandoe.co.uk> |
1089 | ||
1090 | * parser.c (cp_parser_declaration): Unless we are compiling for | |
1091 | Ojective-C++, warn about and discard any attributes that prefix | |
1092 | a linkage specification. | |
1093 | ||
1094 | 2020-11-11 Patrick Palka <ppalka@redhat.com> | |
1095 | ||
1096 | PR c++/88115 | |
1097 | * mangle.c (write_expression): Mangle __alignof_ differently | |
1098 | from alignof when the ABI version is at least 15. | |
1099 | ||
1100 | 2020-11-11 Patrick Palka <ppalka@redhat.com> | |
1101 | ||
1102 | PR c++/88115 | |
1103 | * cp-tree.h (cxx_sizeof_or_alignof_expr): Add bool parameter. | |
1104 | * decl.c (fold_sizeof_expr): Pass false to | |
1105 | cxx_sizeof_or_alignof_expr. | |
1106 | * parser.c (cp_parser_unary_expression): Pass std_alignof to | |
1107 | cxx_sizeof_or_alignof_expr. | |
1108 | * pt.c (tsubst_copy): Pass false to cxx_sizeof_or_alignof_expr. | |
1109 | (tsubst_copy_and_build): Pass std_alignof to | |
1110 | cxx_sizeof_or_alignof_expr. | |
1111 | * typeck.c (cxx_alignof_expr): Add std_alignof bool parameter | |
1112 | and pass it to cxx_sizeof_or_alignof_type. Set ALIGNOF_EXPR_STD_P | |
1113 | appropriately. | |
1114 | (cxx_sizeof_or_alignof_expr): Add std_alignof bool parameter | |
1115 | and pass it to cxx_alignof_expr. Assert op is either | |
1116 | SIZEOF_EXPR or ALIGNOF_EXPR. | |
1117 | ||
1118 | 2020-11-11 Marek Polacek <polacek@redhat.com> | |
1119 | ||
1120 | PR c++/97518 | |
1121 | * pt.c (tsubst_qualified_id): Use EXPR_LOCATION of the qualified-id. | |
1122 | Use it to maybe_wrap_with_location the final expression. | |
1123 | ||
bb622641 GA |
1124 | 2020-11-10 Marek Polacek <polacek@redhat.com> |
1125 | ||
1126 | PR c++/97518 | |
1127 | * cp-tree.h (finish_static_assert): Adjust declaration. | |
1128 | * parser.c (cp_parser_static_assert): Pass false to | |
1129 | finish_static_assert. | |
1130 | * pt.c (tsubst_expr): Pass true to finish_static_assert. | |
1131 | * semantics.c (find_failing_clause_r): New function. | |
1132 | (find_failing_clause): New function. | |
1133 | (finish_static_assert): Add a bool parameter. Use | |
1134 | iloc_sentinel. Call contextual_conv_bool instead of | |
1135 | perform_implicit_conversion_flags. Don't check for INTEGER_CST before | |
1136 | calling integer_zerop. Call find_failing_clause and maybe use its | |
1137 | location. Print the original condition or the failing clause if | |
1138 | SHOW_EXPR_P. | |
1139 | ||
1140 | 2020-11-10 Strager Neds <strager.nds@gmail.com> | |
1141 | ||
1142 | * decl.c (duplicate_decls): Use new overload of | |
1143 | set_decl_section_name. | |
1144 | * method.c (use_thunk): Same. | |
1145 | * optimize.c (maybe_clone_body): Same. | |
1146 | * coroutines.cc (act_des_fn): Same. | |
1147 | ||
1148 | 2020-11-10 Jakub Jelinek <jakub@redhat.com> | |
1149 | ||
1150 | PR c/97748 | |
1151 | * cvt.c (convert_to_void): Check (complain & tf_warning) in the outer | |
1152 | if rather than twice times in the inner one. Use warn_if_unused_value. | |
1153 | Formatting fix. | |
1154 | ||
1155 | 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com> | |
1156 | ||
1157 | * parser.c (cp_parser_omp_target_data): Add use of | |
1158 | new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as | |
1159 | handled map clause kind. | |
1160 | (cp_parser_omp_target_enter_data): Likewise. | |
1161 | (cp_parser_omp_target_exit_data): Likewise. | |
1162 | (cp_parser_omp_target): Likewise. | |
1163 | * semantics.c (handle_omp_array_sections): Adjust COMPONENT_REF case to | |
1164 | use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type. Fix | |
1165 | interaction between reference case and attach/detach. | |
1166 | (finish_omp_clauses): Adjust bitmap checks to allow struct decl and | |
1167 | same struct field access to co-exist on OpenMP construct. | |
1168 | ||
2bee28dd GA |
1169 | 2020-11-09 Marek Polacek <polacek@redhat.com> |
1170 | ||
1171 | DR 1914 | |
1172 | * parser.c (cp_parser_check_std_attribute): Return bool. Add a | |
1173 | location_t parameter. Return true if the attribute wasn't duplicated. | |
1174 | Give a warning instead of an error. Check more attributes. | |
1175 | (cp_parser_std_attribute_list): Don't add duplicated attributes to | |
1176 | the list. Pass location to cp_parser_check_std_attribute. | |
1177 | ||
1178 | 2020-11-09 Patrick Palka <ppalka@redhat.com> | |
1179 | ||
1180 | * constraint.cc (norm_info::norm_info): Initialize orig_decl. | |
1181 | (norm_info::orig_decl): New data member. | |
1182 | (normalize_atom): When caching an atom for the first time, | |
1183 | compute a list of template parameters used in the targets of the | |
1184 | parameter mapping and store it in the TREE_TYPE of the mapping. | |
1185 | (get_normalized_constraints_from_decl): Set current_function_decl | |
1186 | appropriately when normalizing. As an optimization, don't | |
1187 | set up a push_nested_class_guard when decl has no constraints. | |
1188 | (sat_hasher::hash): Use this list to hash only the template | |
1189 | arguments that are relevant to the atom. | |
1190 | (satisfy_atom): Use this list to compare only the template | |
1191 | arguments that are relevant to the atom. | |
1192 | * pt.c (keep_template_parm): Do a sanity check on the parameter's | |
1193 | index when flag_checking. | |
1194 | ||
1195 | 2020-11-09 Patrick Palka <ppalka@redhat.com> | |
1196 | ||
1197 | * cp-tree.h (ATOMIC_CONSTR_MAP_INSTANTIATED_P): Define this flag | |
1198 | for ATOMIC_CONSTRs. | |
1199 | * constraint.cc (sat_hasher::hash): Use hash_atomic_constraint | |
1200 | if the flag is set, otherwise keep using a pointer hash. | |
1201 | (sat_hasher::equal): Return false if the flag's setting differs | |
1202 | on two atoms. Call atomic_constraints_identical_p if the flag | |
1203 | is set, otherwise keep using a pointer equality test. | |
1204 | (satisfy_atom): After instantiating the parameter mapping, form | |
1205 | another ATOMIC_CONSTR using the instantiated mapping and query | |
1206 | the cache again. Cache the satisfaction value of both atoms. | |
1207 | (diagnose_atomic_constraint): Simplify now that the supplied | |
1208 | atom has an instantiated mapping. | |
1209 | ||
1210 | 2020-11-09 Patrick Palka <ppalka@redhat.com> | |
1211 | ||
1212 | * constraint.cc (atom_cache): Define this deletable hash_table. | |
1213 | (normalize_atom): Use it to cache ATOMIC_CONSTRs when not | |
1214 | generating diagnostics. | |
1215 | (sat_hasher::hash): Use htab_hash_pointer instead of | |
1216 | hash_atomic_constraint. | |
1217 | (sat_hasher::equal): Test for pointer equality instead of | |
1218 | atomic_constraints_identical_p. | |
1219 | * cp-tree.h (struct atom_hasher): Moved and renamed from ... | |
1220 | * logic.cc (struct constraint_hash): ... here. | |
1221 | (clause::m_set): Adjust accordingly. | |
1222 | ||
1223 | 2020-11-09 Patrick Palka <ppalka@redhat.com> | |
1224 | ||
1225 | PR c++/93907 | |
1226 | * constraint.cc (tsubst_parameter_mapping): Also canonicalize | |
1227 | the type arguments of a TYPE_ARGUMENT_PACk. | |
1228 | ||
1229 | 2020-11-09 Jason Merrill <jason@redhat.com> | |
1230 | ||
1231 | * pt.c (tsubst): Replace *_ARGUMENT_PACK code with | |
1232 | a call to tsubst_argument_pack. | |
1233 | ||
1234 | 2020-11-09 Jason Merrill <jason@redhat.com> | |
1235 | ||
1236 | * class.c (handle_using_decl): Add an iloc_sentinel. | |
1237 | ||
1238 | 2020-11-09 Marek Polacek <polacek@redhat.com> | |
1239 | ||
1240 | PR c++/97762 | |
1241 | * parser.c (warn_about_ambiguous_parse): Handle the case when | |
1242 | there is no type in the decl-specifiers. | |
1243 | ||
1244 | 2020-11-09 Nathan Sidwell <nathan@acm.org> | |
1245 | ||
1246 | * cp-tree.h (LOOKUP_FOUND_P): Add ENUMERAL_TYPE. | |
1247 | * name-lookup.c (class name_lookup): Add comments. | |
1248 | (name_lookup::adl_namespace_only): Replace with ... | |
1249 | (name_lookup::adl_class_fns): ... this and ... | |
1250 | (name_lookup::adl_namespace_fns): ... this. | |
1251 | (name_lookup::adl_namespace): Deal with inline nests here. | |
1252 | (name_lookup::adl_class): Complete the type here. | |
1253 | (name_lookup::adl_type): Call broken-out enum .. | |
1254 | (name_lookup::adl_enum): New. No need to call the namespace adl | |
1255 | if it is class-scope. | |
1256 | (name_lookup::search_adl): Iterate over collected scopes here. | |
1257 | ||
1258 | 2020-11-09 Nathan Sidwell <nathan@acm.org> | |
1259 | ||
1260 | * name-lookup.c (lookup_qualified_name): Expose an overload of a | |
1261 | singleton with known type. | |
1262 | (lookup_name_1): Just check the overload's type to expose it. | |
1263 | * parser.c (cp_parser_lookup_name): Do not do that check here. | |
1264 | ||
fb95de7a GA |
1265 | 2020-11-08 Iain Sandoe <iain@sandoe.co.uk> |
1266 | ||
1267 | * parser.c (cp_parser_objc_at_property_declaration): Handle | |
1268 | class keywords in @property attribute context. | |
1269 | ||
44cab2d8 GA |
1270 | 2020-11-06 Marek Polacek <polacek@redhat.com> |
1271 | ||
1272 | PR c++/81660 | |
1273 | * except.c (can_convert_eh): Change the return type to bool. If | |
1274 | the type TO and FROM are the same, return true. | |
1275 | ||
1276 | 2020-11-06 Iain Sandoe <iain@sandoe.co.uk> | |
1277 | ||
1278 | * parser.c (cp_parser_objc_at_property_declaration): | |
1279 | Improve parsing fidelity. Associate better location info | |
1280 | with @property attributes. Clean up the interface to | |
1281 | objc_add_property_declaration (). | |
1282 | ||
1283 | 2020-11-06 Jakub Jelinek <jakub@redhat.com> | |
1284 | ||
1285 | PR c++/67453 | |
1286 | * decl.c (duplicate_decls): Propagate DECL_ATTRIBUTES and | |
1287 | DECL_PRESERVE_P from olddecl to its clones if any. | |
1288 | ||
1289 | 2020-11-06 Nathan Sidwell <nathan@acm.org> | |
1290 | ||
1291 | * cp-tree.h (DECL_UNDECLARED_BUILTIN_P): Delete. | |
1292 | * cp-objcp-common.c (names_bultin_p): Rename | |
1293 | DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN. | |
1294 | * decl.c (decls_match): Likewise. Replace | |
1295 | DECL_UNDECLARED_BUILTIN_P with DECL_IS_UNDECLARED_BUILTIN. | |
1296 | (duplicate_decls): Likewise. | |
1297 | * decl2.c (collect_source_refs): Likewise. | |
1298 | * name-lookup.c (anticipated_builtin_p, print_binding_level) | |
1299 | (do_nonmember_using_decl): Likewise. | |
1300 | * pt.c (builtin_pack_fn_p): Likewise. | |
1301 | * typeck.c (error_args_num): Likewise. | |
1302 | ||
1303 | 2020-11-06 Nathan Sidwell <nathan@acm.org> | |
1304 | ||
1305 | * parser.c (cp_parser_template_declaration): Adjust 'export' warning. | |
1306 | (cp_parser_explicit_specialization): Remove unneeded bool setting. | |
1307 | ||
1308 | 2020-11-06 Jan Hubicka <jh@suse.cz> | |
1309 | ||
1310 | * tree.c (cp_fix_function_decl_p): Do not access ipa_ref_list dirrectly. | |
1311 | ||
1312 | 2020-11-06 Tobias Burnus <tobias@codesourcery.com> | |
1313 | ||
1314 | * parser.c (cp_parser_omp_atomic): Add openacc parameter and update | |
1315 | OpenACC matching. | |
1316 | (cp_parser_omp_construct): Update call. | |
1317 | ||
0cfd9109 GA |
1318 | 2020-11-05 Marek Polacek <polacek@redhat.com> |
1319 | ||
1320 | * except.c (check_handlers_1): Add auto_diagnostic_group. | |
1321 | ||
1322 | 2020-11-05 Marek Polacek <polacek@redhat.com> | |
1323 | ||
1324 | PR c++/78209 | |
1325 | * pt.c (do_auto_deduction): If init is REFERENCE_REF_P, use its | |
1326 | first operand. | |
1327 | ||
1328 | 2020-11-05 Marek Polacek <polacek@redhat.com> | |
1329 | ||
1330 | PR c++/97675 | |
1331 | * except.c (check_handlers_1): Use OPT_Wexceptions for the | |
1332 | warning. Use inform for the second part of the warning. | |
1333 | ||
1334 | 2020-11-05 Marek Polacek <polacek@redhat.com> | |
1335 | ||
1336 | PR c++/25814 | |
1337 | * cp-tree.h (enum cp_tree_index): Add CPTI_EXPLICIT_VOID_LIST. | |
1338 | (explicit_void_list_node): Define. | |
1339 | (PARENTHESIZED_LIST_P): New macro. | |
1340 | (struct cp_declarator): Add function::parens_loc. | |
1341 | * decl.c (cxx_init_decl_processing): Initialize explicit_void_list_node. | |
1342 | (grokparms): Also break when explicit_void_list_node. | |
1343 | * parser.c (make_call_declarator): New location_t parameter. Use it | |
1344 | to set declarator->u.function.parens_loc. | |
1345 | (cp_parser_lambda_declarator_opt): Pass UNKNOWN_LOCATION to | |
1346 | make_call_declarator. | |
1347 | (warn_about_ambiguous_parse): New function. | |
1348 | (cp_parser_init_declarator): Call warn_about_ambiguous_parse. | |
1349 | (cp_parser_declarator): Set *parenthesized_p to false rather than to | |
1350 | true. | |
1351 | (cp_parser_direct_declarator): Create a location for the function's | |
1352 | parentheses and pass it to make_call_declarator. | |
1353 | (cp_parser_parameter_declaration_clause): Return explicit_void_list_node | |
1354 | for (void). | |
1355 | (cp_parser_parameter_declaration_list): Set PARENTHESIZED_LIST_P | |
1356 | in the parameters tree. | |
1357 | ||
35c125cb GA |
1358 | 2020-11-04 Jakub Jelinek <jakub@redhat.com> |
1359 | ||
1360 | PR c++/97670 | |
1361 | * semantics.c (finish_omp_clauses): Look through array reductions to | |
1362 | find underlying decl to clear in the aligned_head bitmap. Use | |
1363 | DECL_UID (t) instead of DECL_UID (OMP_CLAUSE_DECL (c)) when clearing | |
1364 | in the bitmap. Only diagnose errors about allocate vars not being | |
1365 | privatized on the same construct on allocate clause if it has | |
1366 | a DECL_P OMP_CLAUSE_DECL. | |
1367 | ||
1368 | 2020-11-04 Iain Sandoe <iain@sandoe.co.uk> | |
1369 | ||
1370 | * constexpr.c (potential_constant_expression_1): Handle | |
1371 | expressions known to be non-constant for Objective-C. | |
1372 | ||
fd2325ea GA |
1373 | 2020-11-03 Jason Merrill <jason@redhat.com> |
1374 | ||
1375 | * tree.c (is_byte_access_type): Don't use char_type_p. | |
1376 | ||
1377 | 2020-11-03 Jakub Jelinek <jakub@redhat.com> | |
1378 | ||
1379 | PR c++/97663 | |
1380 | * parser.c (cp_parser_init_declarator): Don't try to parse | |
1381 | C++17 deduction guides if there are any type specifiers even when | |
1382 | type is NULL. | |
1383 | ||
1384 | 2020-11-03 Kamlesh Kumar <kamleshbhalui@gmail.com> | |
1385 | Jason Merrill <jason@redhat.com> | |
1386 | ||
1387 | PR c++/97453 | |
1388 | DR2303 | |
1389 | * pt.c (get_template_base): Consider closest base in template | |
1390 | deduction when base of base also matches. | |
1391 | ||
1392 | 2020-11-03 Nathan Sidwell <nathan@acm.org> | |
1393 | ||
1394 | * pt.c (tsubst_expr): Simplify using decl instantiation, add | |
1395 | asserts. | |
1396 | ||
1397 | 2020-11-03 Nathan Sidwell <nathan@acm.org> | |
1398 | ||
1399 | * class.c (copy_fndecl_with_name): Always not top level. | |
1400 | (build_cdtor_clones): Add update_methods parm, use it to | |
1401 | conditionally update the method vec. Return void | |
1402 | (clone_cdtor): Adjust. | |
1403 | (clone_constructors_and_destructors): Adjust comment. | |
1404 | ||
1405 | 2020-11-03 Nathan Sidwell <nathan@acm.org> | |
1406 | ||
1407 | * pt.c (primary_template_specialization_p): Use | |
1408 | VAR_OR_FUNCTION_DECL_P. | |
1409 | (tsubst_template_decl): Check for FUNCTION_DECL, not !TYPE && !VAR | |
1410 | for registering a specialization. | |
1411 | ||
1412 | 2020-11-03 Nathan Sidwell <nathan@acm.org> | |
1413 | ||
1414 | * cp-tree.h (fixup_deferred_exception_variants): Declare. | |
1415 | * parser.c (cp_parser_class_specifier_1): Call it when | |
1416 | completing deferred parses rather than creating a variant. | |
1417 | (cp_parser_member_declaration): Move comment from ... | |
1418 | (cp_parser_noexcept_specification_opt): ... here. Refactor the | |
1419 | deferred parse. | |
1420 | * tree.c (fixup_deferred_exception_variants): New. | |
1421 | ||
1422 | 2020-11-03 Nathan Sidwell <nathan@acm.org> | |
1423 | ||
1424 | * pt.c (tsubst_lambda_expr): Reorder extra-scope handling to match | |
1425 | the non-template case. | |
1426 | (instantiate_body): Move a couple of declarations to their | |
1427 | initializers. | |
1428 | ||
1429 | 2020-11-03 Nathan Sidwell <nathan@acm.org> | |
1430 | ||
1431 | * decl.c (duplicate_decls): Return error_mark_node fo extern-c | |
1432 | mismatch. | |
1433 | ||
1434 | 2020-11-03 Marek Polacek <polacek@redhat.com> | |
1435 | ||
1436 | * constexpr.c (potential_constant_expression_1): Treat | |
1437 | __PRETTY_FUNCTION__ inside a template function as | |
1438 | potentially-constant. | |
1439 | * pt.c (uses_template_parms): Call | |
1440 | instantiation_dependent_expression_p instead of | |
1441 | value_dependent_expression_p. | |
1442 | (instantiation_dependent_expression_p): Check | |
1443 | potential_constant_expression before calling | |
1444 | value_dependent_expression_p. | |
1445 | ||
1446 | 2020-11-03 Marek Polacek <polacek@redhat.com> | |
1447 | ||
1448 | PR c++/97632 | |
1449 | * init.c (build_new_1): Disable -Winit-list-lifetime for an unevaluated | |
1450 | operand. | |
1451 | ||
1452 | 2020-11-03 Nathan Sidwell <nathan@acm.org> | |
1453 | ||
1454 | * tree.c (bind_template_template_parm): Mark the parm as a | |
1455 | template parm. | |
1456 | (cp_tree_equal): Refactor CALL_EXPR. Use comp_template_args for | |
1457 | TREE_VECs. | |
1458 | ||
1459 | 2020-11-03 Nathan Sidwell <nathan@acm.org> | |
1460 | ||
1461 | * rtti.c (init_rtti_processing): Move var decl to its init. | |
1462 | (get_tinfo_decl): Likewise. Break out creation to called helper | |
1463 | ... | |
1464 | (get_tinfo_decl_direct): ... here. | |
1465 | (build_dynamic_cast_1): Move var decls to their initializers. | |
1466 | (tinfo_base_init): Set decl's location to BUILTINS_LOCATION. | |
1467 | (get_tinfo_desc): Only push ABI namespace when needed. Set type's | |
1468 | context. | |
1469 | ||
88ce3d5f GA |
1470 | 2020-11-02 Nathan Sidwell <nathan@acm.org> |
1471 | ||
1472 | * decl.c (start_decl_1): Refactor declarations. Fixup some | |
1473 | whitespace. | |
1474 | (lookup_and_check_tag): Fixup some whitespace. | |
1475 | ||
1476 | 2020-11-02 Nathan Sidwell <nathan@acm.org> | |
1477 | ||
1478 | * decl.c (duplicate_decls): Refactor some template & builtin | |
1479 | handling. | |
1480 | ||
1481 | 2020-11-02 Nathan Sidwell <nathan@acm.org> | |
1482 | ||
1483 | * cp-tree.h (struct cxx_int_tree_map): Delete. | |
1484 | (struct cxx_int_tree_map_hasher): Delete. | |
1485 | * cp-gimplify.c (cxx_int_tree_map_hasher::equal): Delete. | |
1486 | (cxx_int_tree_map_hasher::hash): Delete. | |
1487 | ||
1488 | 2020-11-02 Patrick Palka <ppalka@redhat.com> | |
1489 | ||
1490 | * class.c (finish_struct_1): Don't call clear_satisfaction_cache. | |
1491 | * constexpr.c (clear_cv_and_fold_caches): Likewise. Remove bool | |
1492 | parameter. | |
1493 | * constraint.cc (clear_satisfaction_cache): Remove definition. | |
1494 | * cp-tree.h (clear_satisfaction_cache): Remove declaration. | |
1495 | (clear_cv_and_fold_caches): Remove bool parameter. | |
1496 | * typeck2.c (store_init_value): Remove argument to | |
1497 | clear_cv_and_fold_caches. | |
1498 | ||
1499 | 2020-11-01 Iain Sandoe <iain@sandoe.co.uk> | |
1500 | ||
1501 | * parser.c (cp_parser_objc_at_property_declaration): Use any | |
1502 | exisiting syntax error to suppress complaints about a missing | |
1503 | closing parenthesis in parsing property attributes. | |
1504 | ||
1505 | 2020-10-30 Jakub Jelinek <jakub@redhat.com> | |
1506 | ||
1507 | * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_ALLOCATE>: Handle | |
1508 | non-static members in methods. | |
1509 | * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_ALLOCATE. | |
1510 | ||
4f0606fe GA |
1511 | 2020-10-29 Marek Polacek <polacek@redhat.com> |
1512 | ||
1513 | DR 625 | |
1514 | PR c++/97479 | |
1515 | * parser.c (cp_parser_type_id_1): Reject using auto as | |
1516 | a template-argument in C++20. | |
1517 | ||
1518 | 2020-10-29 Marek Polacek <polacek@redhat.com> | |
1519 | ||
1520 | PR c++/93107 | |
1521 | * pt.c (do_auto_deduction): Call resolve_nondeduced_context for | |
1522 | the elements of a { } list. | |
1523 | ||
1524 | 2020-10-29 Marek Polacek <polacek@redhat.com> | |
1525 | ||
1526 | * typeck.c (do_warn_enum_conversions): Don't warn for SPACESHIP_EXPR. | |
1527 | (cp_build_binary_op): Reject float <=> enum or enum <=> float. Use | |
1528 | CP_INTEGRAL_TYPE_P instead of INTEGRAL_OR_ENUMERATION_TYPE_P. | |
1529 | ||
1530 | 2020-10-29 Patrick Palka <ppalka@redhat.com> | |
1531 | ||
1532 | * constraint.cc (get_normalized_constraints): Remove 'args' | |
1533 | parameter. Pass NULL_TREE as the initial template arguments to | |
1534 | normalize_expression. | |
1535 | (get_normalized_constraints_from_info): Remove 'args' parameter | |
1536 | and adjust the call to get_normalized_constraints. | |
1537 | (get_normalized_constraints_from_decl): Remove 'args' local | |
1538 | variable and adjust call to get_normalized_constraints_from_info. | |
1539 | (normalize_concept_definition): Remove 'args' local variable | |
1540 | and adjust call to get_normalized_constraints. | |
1541 | (normalize_constraint_expression): Remove the two-parameter | |
1542 | overload. Remove 'args' parameter from the three-parameter | |
1543 | overload and update function comment accordingly. Remove | |
1544 | default argument from 'diag' parameter. Adjust call to | |
1545 | get_normalized_constraints. | |
1546 | (finish_nested_requirement): Adjust call to | |
1547 | normalize_constraint_expression. | |
1548 | (strictly_subsumes): Remove 'args' parameter. Adjust call to | |
1549 | get_normalized_constraints_from_info. | |
1550 | (weakly_subsumes): Likewise. | |
1551 | * cp-tree.h (strictly_subsumes): Remove 'args' parameter. | |
1552 | (weakly_subsumes): Likewise. | |
1553 | * pt.c (process_partial_specialization): Adjust call to | |
1554 | strictly_subsumes. | |
1555 | (is_compatible_template_arg): Adjust call to weakly_subsumes. | |
1556 | ||
1557 | 2020-10-29 Patrick Palka <ppalka@redhat.com> | |
1558 | ||
1559 | PR c++/97412 | |
1560 | * constraint.cc (normalize_concept_check): Don't call | |
1561 | tsubst_template_args when 'args' is NULL. | |
1562 | ||
1563 | 2020-10-29 Jason Merrill <jason@redhat.com> | |
1564 | ||
1565 | PR c++/97388 | |
1566 | * constexpr.c (cxx_eval_outermost_constant_expr): Revert to | |
1567 | original expression if evaluation sets non_constant_p. | |
1568 | ||
1569 | 2020-10-29 Jakub Jelinek <jakub@redhat.com> | |
1570 | Jason Merrill <jason@redhat.com> | |
1571 | ||
1572 | PR c++/97388 | |
1573 | * constexpr.c (cxx_bind_parameters_in_call): Set non_constant_args | |
1574 | if the parameter type has a non-trivial destructor. | |
1575 | (cxx_eval_call_expression): Only unshare arguments if we're | |
1576 | memoizing this evaluation. | |
1577 | ||
1578 | 2020-10-29 Jakub Jelinek <jakub@redhat.com> | |
1579 | ||
1580 | PR c++/95808 | |
1581 | * cp-tree.h (enum cp_tree_index): Add CPTI_HEAP_VEC_UNINIT_IDENTIFIER | |
1582 | and CPTI_HEAP_VEC_IDENTIFIER. | |
1583 | (heap_vec_uninit_identifier, heap_vec_identifier): Define. | |
1584 | * decl.c (initialize_predefined_identifiers): Initialize those | |
1585 | identifiers. | |
1586 | * constexpr.c (cxx_eval_call_expression): Reject array allocations | |
1587 | deallocated with non-array deallocation or non-array allocations | |
1588 | deallocated with array deallocation. | |
1589 | (non_const_var_error): Handle heap_vec_uninit_identifier and | |
1590 | heap_vec_identifier too. | |
1591 | (cxx_eval_constant_expression): Handle also heap_vec_uninit_identifier | |
1592 | and in that case during initialization replace it with | |
1593 | heap_vec_identifier. | |
1594 | (find_heap_var_refs): Handle heap_vec_uninit_identifier and | |
1595 | heap_vec_identifier too. | |
1596 | ||
1597 | 2020-10-29 Nathan Sidwell <nathan@acm.org> | |
1598 | ||
1599 | * pt.c (push_template_decl): Do not give function-scope entities | |
1600 | other than implicit typedefs a template header. Do not readd | |
1601 | template info to a redeclared template. | |
1602 | ||
e93aae4a GA |
1603 | 2020-10-28 Marek Polacek <polacek@redhat.com> |
1604 | ||
1605 | * decl.c (grokdeclarator): Offer a fix-it hint for the "unnecessary | |
1606 | parentheses in declaration" warning. | |
1607 | * parser.c (cp_parser_direct_declarator): When setting | |
1608 | declarator->parenthesized, use a location range. | |
1609 | ||
1610 | 2020-10-28 Marek Polacek <polacek@redhat.com> | |
1611 | ||
1612 | PR c++/97573 | |
1613 | * call.c (build_conditional_expr_1): Warn about the deprecated | |
1614 | enum/real type conversion in C++20. Also warn about a non-enumerated | |
1615 | and enumerated type in ?: when -Wenum-conversion is on. | |
1616 | * typeck.c (do_warn_enum_conversions): New function. | |
1617 | (cp_build_binary_op): Call it. | |
1618 | ||
1619 | 2020-10-28 Marek Polacek <polacek@redhat.com> | |
1620 | ||
1621 | PR c++/96675 | |
1622 | PR c++/96742 | |
1623 | * pt.c (tsubst_copy_and_build): Call value_dependent_expression_p or | |
1624 | type_dependent_expression_p instead of type_dependent_expression_p_push. | |
1625 | But only call value_dependent_expression_p for expressions that are | |
1626 | potential_constant_expression. | |
1627 | ||
1628 | 2020-10-28 Marek Polacek <polacek@redhat.com> | |
1629 | ||
1630 | PR c++/94799 | |
1631 | * parser.c (cp_parser_class_name): Use parser->scope when | |
1632 | setting typename_p. | |
1633 | ||
1634 | 2020-10-28 Marek Polacek <polacek@redhat.com> | |
1635 | ||
1636 | PR c++/86773 | |
1637 | * parser.c (cp_parser_fold_expression): Return error_mark_node | |
1638 | if a left fold is preceded by an expression. | |
1639 | ||
1640 | 2020-10-28 Nathan Sidwell <nathan@acm.org> | |
1641 | ||
1642 | * parser.c (cp_parser_omp_declare_reduction): Set | |
1643 | DECL_LOCAL_DECL_P before push_template_decl. | |
1644 | * pt.c (instantiate_body): Nested fns do not have template_info. | |
1645 | ||
1646 | 2020-10-28 Patrick Palka <ppalka@redhat.com> | |
1647 | ||
1648 | PR c++/95132 | |
1649 | * decl2.c (mark_used): Move up the constraints_satisfied_p check | |
1650 | so that we check constraints before calling maybe_instantiate_decl. | |
1651 | ||
1652 | 2020-10-28 Nathan Sidwell <nathan@acm.org> | |
1653 | ||
1654 | * pt.c (push_template_decl): Refactor for some RAII. | |
1655 | ||
1656 | 2020-10-28 Jakub Jelinek <jakub@redhat.com> | |
1657 | ||
1658 | * parser.c (cp_parser_omp_clause_name): Handle allocate. | |
1659 | (cp_parser_omp_clause_allocate): New function. | |
1660 | (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE. | |
1661 | (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK, | |
1662 | OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK, | |
1663 | OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK, | |
1664 | OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK, | |
1665 | OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add | |
1666 | PRAGMA_OMP_CLAUSE_ALLOCATE. | |
1667 | * semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE. | |
1668 | * pt.c (tsubst_omp_clauses): Likewise. | |
1669 | ||
89bb01e7 GA |
1670 | 2020-10-27 Nathan Sidwell <nathan@acm.org> |
1671 | ||
1672 | * cp-tree.h (struct lang_type): Delete nested_udts field. | |
1673 | (CLASSTYPE_NESTED_UTDS): Delete. | |
1674 | * name-lookup.h (binding_table, binding_entry): Delete typedefs. | |
1675 | (bt_foreach_proc): Likewise. | |
1676 | (struct binding_entry_s): Delete. | |
1677 | (SCOPE_DEFAULT_HT_SIZE, CLASS_SCOPE_HT_SIZE) | |
1678 | (NAMESPACE_ORDINARY_HT_SIZE, NAMESPACE_STD_HT_SIZE) | |
1679 | (GLOBAL_SCOPE_HT_SIZE): Delete. | |
1680 | (binding_table_foreach, binding_table_find): Delete declarations. | |
1681 | * name-lookup.c (ENTRY_INDEX): Delete. | |
1682 | (free_binding_entry): Delete. | |
1683 | (binding_entry_make, binding_entry_free): Delete. | |
1684 | (struct binding_table_s): Delete. | |
1685 | (binding_table_construct, binding_table_free): Delete. | |
1686 | (binding_table_new, binding_table_expand): Delete. | |
1687 | (binding_table_insert, binding_table_find): Delete. | |
1688 | (binding_table_foreach): Delete. | |
1689 | (maybe_process_template_type_declaration): Delete | |
1690 | CLASSTYPE_NESTED_UTDS insertion. | |
1691 | (do_pushtag): Likewise. | |
1692 | * decl2.c (bt_reset_linkage_1): Fold into reset_type_linkage_1. | |
1693 | (reset_type_linkage_2, bt_reset_linkage_2): Fold into | |
1694 | reset_type_linkage. | |
1695 | * pt.c (instantiate_class_template_1): Delete NESTED_UTDs comment. | |
1696 | (bt_instantiate_type_proc): Delete. | |
1697 | (do_type_instantiation): Instantiate implicit typedef fields. | |
1698 | Delete NESTED_UTD walk. | |
1699 | * search.c (lookup_field_r): Delete unreachable NESTED_UTD | |
1700 | search. | |
1701 | ||
1702 | 2020-10-27 Nathan Sidwell <nathan@acm.org> | |
1703 | ||
1704 | * parser.c (cp_parser_explicit_instantiation): Refactor some RAII. | |
1705 | * pt.c (bt_instantiate_type_proc): DATA is the tree, pass type to | |
1706 | do_type_instantiation. | |
1707 | (do_type_instantiation): Require T to be a type. Refactor for | |
1708 | some RAII. | |
1709 | ||
f19e7c8d GA |
1710 | 2020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com> |
1711 | ||
1712 | * cp-tree.h (CPTK_IS_NOTHROW_ASSIGNABLE): New. | |
1713 | (CPTK_IS_NOTHROW_CONSTRUCTIBLE): Likewise. | |
1714 | (is_nothrow_xible): Likewise. | |
1715 | * method.c (is_nothrow_xible): New. | |
1716 | (is_trivially_xible): Tweak. | |
1717 | * parser.c (cp_parser_primary_expression): Handle the new RID_*. | |
1718 | (cp_parser_trait_expr): Likewise. | |
1719 | * semantics.c (trait_expr_value): Handle the new RID_*. | |
1720 | (finish_trait_expr): Likewise. | |
1721 | ||
d7ddd287 GA |
1722 | 2020-10-24 Marek Polacek <polacek@redhat.com> |
1723 | ||
1724 | PR c++/96241 | |
1725 | * constexpr.c (cxx_eval_array_reference): Set up ctx->ctor if we | |
1726 | are initializing an aggregate. Call free_constructor on the new | |
1727 | CONSTRUCTOR if it isn't returned from cxx_eval_constant_expression. | |
1728 | ||
efe71fcc GA |
1729 | 2020-10-23 Marek Polacek <polacek@redhat.com> |
1730 | ||
1731 | PR c++/91741 | |
1732 | * typeck.c (cp_build_binary_op): Implement -Wsizeof-array-div. | |
1733 | ||
43868df3 GA |
1734 | 2020-10-22 Patrick Palka <ppalka@redhat.com> |
1735 | ||
1736 | PR c++/97328 | |
1737 | * constexpr.c (init_subob_ctx): Don't punt on RANGE_EXPR | |
1738 | indexes, instead build a sub-aggregate initialization context | |
1739 | with no subobject. | |
1740 | ||
1741 | 2020-10-22 Patrick Palka <ppalka@redhat.com> | |
1742 | ||
1743 | PR c++/96575 | |
1744 | * constexpr.c (cxx_eval_constant_expression) | |
1745 | <case EMPTY_CLASS_EXPR>: Lower it to a CONSTRUCTOR. | |
1746 | (potential_constant_expression_1) <case COMPOUND_EXPR>: Remove | |
1747 | now-redundant handling of COMPOUND_EXPR with EMPTY_CLASS_EXPR | |
1748 | second operand. | |
1749 | <case EMPTY_CLASS_EXPR>: Return true instead of false. | |
1750 | ||
1751 | 2020-10-22 Patrick Palka <ppalka@redhat.com> | |
1752 | ||
1753 | PR c++/97511 | |
1754 | * decl.c (duplicate_decls): Return NULL_TREE if | |
1755 | DECL_TEMPLATE_PARM_P differ. | |
1756 | ||
e2e04288 GA |
1757 | 2020-10-20 Nathan Sidwell <nathan@acm.org> |
1758 | ||
1759 | * name-lookup.c (push_local_extern_decl_alias): Reconstextualize | |
1760 | alias' parm decls. Drop any default args. | |
1761 | ||
970d683f GA |
1762 | 2020-10-19 Iain Sandoe <iain@sandoe.co.uk> |
1763 | ||
1764 | PR c++/97438 | |
1765 | * coroutines.cc (struct coroutine_info): Add a field to | |
1766 | record that we emitted a promise type error. | |
1767 | (coro_promise_type_found_p): Check for the case that the | |
1768 | promise type contains both return_void and return_value. | |
1769 | Emit an error if so, with information about the wrong | |
1770 | type methods. | |
1771 | ||
56e4eee9 GA |
1772 | 2020-10-16 Nathan Sidwell <nathan@acm.org> |
1773 | ||
1774 | PR c++/97460 | |
1775 | * pt.c (push_template_decl): Check DECL_LANG_SPECIFIC in friend | |
1776 | case. | |
1777 | ||
1778 | 2020-10-16 Nathan Sidwell <nathan@acm.org> | |
1779 | ||
1780 | PR c++/96258 | |
1781 | * parser.c (cp_parser_declaration): Make token2 point to EOF if | |
1782 | token1 was EOF. | |
1783 | ||
b85d5dc5 GA |
1784 | 2020-10-15 Jason Merrill <jason@redhat.com> |
1785 | ||
1786 | PR c++/95844 | |
1787 | * decl.c (copy_fn_p): Return false for a function that is neither a | |
1788 | constructor nor an assignment operator. | |
1789 | (move_signature_fn_p): Likewise. | |
1790 | ||
1791 | 2020-10-15 Marek Polacek <polacek@redhat.com> | |
1792 | ||
1793 | PR c++/97406 | |
1794 | PR c++/85901 | |
1795 | * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Handle OFFSET_TYPE. | |
1796 | (cxx_pretty_printer::abstract_declarator): Fix the printing of ')'. | |
1797 | (cxx_pretty_printer::direct_abstract_declarator): Handle OFFSET_TYPE. | |
1798 | (cxx_pretty_printer::type_id): Likewise. Print the abstract declarator | |
1799 | for pointers-to-members. | |
1800 | ||
b2698c21 GA |
1801 | 2020-10-14 Jason Merrill <jason@redhat.com> |
1802 | ||
1803 | PR c++/97358 | |
1804 | * pt.c (check_for_bare_parameter_packs): Diagnose use of | |
1805 | capture pack. | |
1806 | ||
1807 | 2020-10-14 Nathan Sidwell <nathan@acm.org> | |
1808 | ||
1809 | * cp-tree.h (struct lang_decl_fn): Adjust context comment. | |
1810 | (DECL_FRIEND_P): Replace with ... | |
1811 | (DECL_UNIQUE_FRIEND_P): ... this. Only for FUNCTION_DECLs. | |
1812 | (DECL_FRIEND_CONTEXT): Adjust. | |
1813 | * class.c (add_implicitly_declared_members): Detect friendly | |
1814 | spaceship from context. | |
1815 | * constraint.cc (remove_constraints): Use a checking assert. | |
1816 | (maybe_substitute_reqs_for): Use DECL_UNIQUE_FRIEND_P. | |
1817 | * decl.c (check_no_redeclaration_friend_default_args): | |
1818 | DECL_UNIQUE_FRIEND_P is signficant, not hiddenness. | |
1819 | (duplicate_decls): Adjust DECL_UNIQUE_FRIEND_P clearing. | |
1820 | (redeclaration_error_message): Use DECL_UNIQUE_FRIEND_P. | |
1821 | (start_preparsed_function): Correct in-class friend processing. | |
1822 | Refactor some initializers. | |
1823 | (grokmethod): Directly check friend decl-spec. | |
1824 | * decl2.c (grokfield): Check DECL_UNIQUE_FRIEND_P. | |
1825 | * friend.c (do_friend): Set DECL_UNIQUE_FRIEND_P first, remove | |
1826 | extraneous conditions. Don't re set it afterwards. | |
1827 | * name-lookup.c (lookup_elaborated_type_1): Simplify revealing | |
1828 | code. | |
1829 | (do_pushtag): Likewise. | |
1830 | * pt.c (optimize_specialization_lookup_p): Check | |
1831 | DECL_UNIQUE_FRIEND_P. | |
1832 | (push_template_decl): Likewise. Drop unneeded friend setting. | |
1833 | (type_dependent_expression_p): Check DECL_UNIQUE_FRIEND_P. | |
1834 | ||
1835 | 2020-10-14 Nathan Sidwell <nathan@acm.org> | |
1836 | ||
1837 | * name-lookup.c (push_local_extern_decl_alias): Push into alias's | |
1838 | namespace and use pushdecl. | |
1839 | (do_pushdecl_with_scope): Clarify behaviour. | |
1840 | ||
8be127ca GA |
1841 | 2020-10-12 Martin Sebor <msebor@redhat.com> |
1842 | ||
1843 | PR c++/97201 | |
1844 | * error.c (dump_type_suffix): Handle both the C and C++ forms of | |
1845 | zero-length arrays. | |
1846 | ||
1847 | 2020-10-12 Martin Sebor <msebor@redhat.com> | |
1848 | ||
1849 | PR c++/96511 | |
1850 | PR middle-end/96384 | |
1851 | * init.c (warn_placement_new_too_small): Call builtin_objsize instead | |
1852 | of duplicating what it does. | |
1853 | ||
da9df699 GA |
1854 | 2020-10-08 Jason Merrill <jason@redhat.com> |
1855 | ||
1856 | PR c++/96805 | |
1857 | PR c++/96199 | |
1858 | * pt.c (tsubst_aggr_type): Don't build a TYPENAME_TYPE when | |
1859 | entering_scope. | |
1860 | (tsubst_template_decl): Use tsubst_aggr_type. | |
1861 | ||
1862 | 2020-10-08 Patrick Palka <ppalka@redhat.com> | |
1863 | ||
1864 | PR c++/97052 | |
1865 | * constraint.cc (build_type_constraint): Temporarily increment | |
1866 | processing_template_decl before calling build_concept_check. | |
1867 | * pt.c (make_constrained_placeholder_type): Likewise. | |
1868 | ||
1869 | 2020-10-08 Patrick Palka <ppalka@redhat.com> | |
1870 | ||
1871 | PR c++/96229 | |
1872 | * parser.c (cp_parser_class_specifier_1): Move call to | |
1873 | associate_classtype_constraints from here to ... | |
1874 | (cp_parser_class_head): ... here. | |
1875 | * pt.c (is_compatible_template_arg): Correct documentation to | |
1876 | say "argument is _no_ more constrained than the parameter". | |
1877 | ||
6caec77e GA |
1878 | 2020-10-07 Marek Polacek <polacek@redhat.com> |
1879 | ||
1880 | PR c++/97010 | |
1881 | * pt.c (tsubst_copy_and_build) <case TEMPLATE_ID_EXPR>: Call | |
1882 | tsubst_copy_and_build explicitly instead of using the RECUR macro. | |
1883 | Handle a TEMPLATE_ID_EXPR with an IDENTIFIER_NODE as its operand. | |
1884 | <case CALL_EXPR>: Perform ADL for a TEMPLATE_ID_EXPR with an | |
1885 | IDENTIFIER_NODE as its operand. | |
1886 | ||
1887 | 2020-10-07 Patrick Palka <ppalka@redhat.com> | |
1888 | ||
1889 | PR c++/88115 | |
1890 | PR libstdc++/97273 | |
1891 | * tree.c (cp_tree_equal) <case ALIGNOF_EXPR>: Return false if | |
1892 | ALIGNOF_EXPR_STD_P differ. | |
1893 | ||
1894 | 2020-10-07 Nathan Sidwell <nathan@acm.org> | |
1895 | ||
1896 | * cp-tree.h (struct language_function): Delete extern_decl_map. | |
1897 | (DECL_LOCAL_DECL_ALIAS): New. | |
1898 | * name-lookup.h (is_local_extern): Delete. | |
1899 | * name-lookup.c (set_local_extern_decl_linkage): Replace with ... | |
1900 | (push_local_extern_decl): ... this new function. | |
1901 | (do_pushdecl): Call new function after pushing new decl. Unhide | |
1902 | hidden non-functions. | |
1903 | (is_local_extern): Delete. | |
1904 | * decl.c (layout_var_decl): Do not allow VLA local externs. | |
1905 | * decl2.c (mark_used): Also mark DECL_LOCAL_DECL_ALIAS. Drop old | |
1906 | local-extern treatment. | |
1907 | * parser.c (cp_parser_oacc_declare): Deal with local extern aliases. | |
1908 | * pt.c (tsubst_expr): Adjust local extern instantiation. | |
1909 | * cp-gimplify.c (cp_genericize_r): Remap DECL_LOCAL_DECLs. | |
1910 | ||
1911 | 2020-10-07 Nathan Sidwell <nathan@acm.org> | |
1912 | ||
1913 | * cp-tree.h (DECL_BUILTIN_P): Rename to ... | |
1914 | (DECL_UNDECLARED_BUILTIN_P): ... here. | |
1915 | * decl.c (duplicate_decls): Adjust. | |
1916 | * name-lookup.c (anticipated_builtin_p): Adjust. | |
1917 | (do_nonmember_using_decl): Likewise. | |
1918 | ||
1919 | 2020-10-07 Nathan Sidwell <nathan@acm.org> | |
1920 | ||
1921 | * tree.c (build_cp_fntype_variant): Clear | |
1922 | TYPE_DEPENDENT_P_VALID if necessary. | |
1923 | ||
8e97b905 GA |
1924 | 2020-10-06 Marek Polacek <polacek@redhat.com> |
1925 | ||
1926 | PR c++/97297 | |
1927 | * parser.c (cp_parser_direct_declarator): When checking if a | |
1928 | name is a function template declaration for the P0634R3 case, | |
1929 | look in uninstantiated templates too. | |
1930 | ||
7e9282ae GA |
1931 | 2020-10-05 Marek Polacek <polacek@redhat.com> |
1932 | ||
1933 | * cp-tree.h (NON_UNION_CLASS_TYPE_P): Fix typo in a comment. | |
1934 | ||
1935 | 2020-10-05 Richard Biener <rguenther@suse.de> | |
1936 | Jakub Jelinek <jakub@redhat.com> | |
1937 | ||
1938 | PR c++/97197 | |
1939 | * error.c (dump_expr): Handle TARGET_MEM_REF. | |
1940 | ||
1941 | 2020-10-05 Nathan Sidwell <nathan@acm.org> | |
1942 | ||
1943 | * name-lookup.c (maybe_add_fuzzy_decl): New. | |
1944 | (maybe_add_fuzzy_binding): New. | |
1945 | (consider_binding_level): Use intermediate sortable vector for | |
1946 | namespace bindings. | |
1947 | ||
b0b9b8f0 GA |
1948 | 2020-10-02 Marek Polacek <polacek@redhat.com> |
1949 | ||
1950 | PR c++/97014 | |
1951 | * cxx-pretty-print.c (pp_cxx_template_argument_list): If the | |
1952 | argument is template_parm_object_p, print its DECL_INITIAL. | |
1953 | ||
1954 | 2020-10-02 Nathan Sidwell <nathan@acm.org> | |
1955 | ||
1956 | * cp-tree.h (lang_decl_base): anticipated_p is not used for | |
1957 | anticipatedness. | |
1958 | (DECL_ANTICIPATED): Delete. | |
1959 | * decl.c (duplicate_decls): Delete DECL_ANTICIPATED_management, | |
1960 | use was_hidden. | |
1961 | (cxx_builtin_function): Drop DECL_ANTICIPATED setting. | |
1962 | (xref_tag_1): Drop DECL_ANTICIPATED assert. | |
1963 | * name-lookup.c (name_lookup::adl_class_only): Drop | |
1964 | DECL_ANTICIPATED check. | |
1965 | (name_lookup::search_adl): Always dedup. | |
1966 | (anticipated_builtin_p): Reimplement. | |
1967 | (do_pushdecl): Drop DECL_ANTICIPATED asserts & update. | |
1968 | (lookup_elaborated_type_1): Drop DECL_ANTICIPATED update. | |
1969 | (do_pushtag): Drop DECL_ANTICIPATED setting. | |
1970 | * pt.c (push_template_decl): Likewise. | |
1971 | (tsubst_friend_class): Likewise. | |
1972 | ||
1973 | 2020-10-02 Nathan Sidwell <nathan@acm.org> | |
1974 | ||
1975 | * name-lookup.c (consider_decl): New, broken out of ... | |
1976 | (consider_binding_level): ... here. Iterate the hash table for | |
1977 | namespace bindings. | |
1978 | ||
1979 | 2020-10-02 Nathan Sidwell <nathan@acm.org> | |
1980 | ||
1981 | * cp-tree.h (base_ctor_omit_inherited_parms): Declare. | |
1982 | * class.c (add_method): Refactor main loop, only pass fns to | |
1983 | ctor_omit_inherited_parms. | |
1984 | (build_cdtor_clones): Rename bool parms. | |
1985 | (clone_cdtor): Call base_ctor_omit_inherited_parms. | |
1986 | * method.c (base_ctor_omit_inherited_parms): New, broken out of | |
1987 | ... | |
1988 | (ctor_omit_inherited_parms): ... here, call it with | |
1989 | DECL_CLONED_FUNCTION. | |
1990 | ||
1991 | 2020-10-02 Nathan Sidwell <nathan@acm.org> | |
1992 | ||
1993 | * cp-tree.h (cp_fname_init): Delete declaration. | |
1994 | * decl.c (cp_fname_init): Merge into only caller ... | |
1995 | (cp_make_fname): ... here & refactor. | |
1996 | ||
1997 | 2020-10-02 Jason Merril <jason@redhat.com> | |
1998 | ||
1999 | * call.c (build_operator_new_call): Set CALL_FROM_NEW_OR_DELETE_P. | |
2000 | (build_op_delete_call): Likewise. | |
2001 | * init.c (build_new_1, build_vec_delete_1, build_delete): Not here. | |
2002 | (build_delete): | |
2003 | ||
2004 | 2020-10-02 Jason Merril <jason@redhat.com> | |
2005 | ||
2006 | * lambda.c (call_from_lambda_thunk_p): New. | |
2007 | * cp-gimplify.c (cp_genericize_r): Use it. | |
2008 | * pt.c (tsubst_copy_and_build): Use it. | |
2009 | * typeck.c (check_return_expr): Use it. | |
2010 | * cp-tree.h: Declare it. | |
2011 | (CALL_FROM_NEW_OR_DELETE_P): Move to gcc/tree.h. | |
2012 | ||
6c2675fa GA |
2013 | 2020-10-01 Nathan Sidwell <nathan@acm.org> |
2014 | ||
2015 | * cp-tree.h (DECL_ANTICIPATED): Adjust comment. | |
2016 | (DECL_HIDDEN_P, TYPE_HIDDEN_P): Delete. | |
2017 | * tree.c (ovl_insert): Delete DECL_HIDDEN_P assert. | |
2018 | (ovl_skip_hidden): Likewise. | |
2019 | ||
2020 | 2020-10-01 Nathan Sidwell <nathan@acm.org> | |
2021 | ||
2022 | * name-lookup.c (pushdecl_top_level): Assert incoming context is | |
2023 | null, add global_namespace context. | |
2024 | (pushdecl_top_level_and_finish): Likewise. | |
2025 | * pt.c (get_template_parm_object): Clear decl context before | |
2026 | pushing. | |
2027 | * semantics.c (finish_compound_literal): Likewise. | |
2028 | ||
2029 | 2020-10-01 Nathan Sidwell <nathan@acm.org> | |
2030 | ||
2031 | * decl.c (lookup_and_check_tag): Refactor. | |
2032 | ||
2033 | 2020-10-01 Jakub Jelinek <jakub@redhat.com> | |
2034 | ||
2035 | PR c++/96994 | |
2036 | * call.c (build_over_call): If obj_arg is non-NULL, return INIT_EXPR | |
2037 | setting obj_arg to call. | |
2038 | ||
2039 | 2020-10-01 Jakub Jelinek <jakub@redhat.com> | |
2040 | ||
2041 | PR c++/97195 | |
2042 | * constexpr.c (cxx_eval_call_expression): Don't VERIFY_CONSTANT the | |
2043 | second argument. | |
2044 | ||
2045 | 2020-10-01 Marek Polacek <polacek@redhat.com> | |
2046 | ||
2047 | PR c++/90210 | |
2048 | * pt.c (do_class_deduction): Don't prune explicit deduction guides | |
2049 | in copy-list-initialization. In copy-list-initialization, if an | |
2050 | explicit deduction guide was selected, give an error. | |
2051 | ||
660bfe61 GA |
2052 | 2020-09-30 Nathan Sidwell <nathan@acm.org> |
2053 | ||
2054 | * cp-tree.h (struct lang_decl_fn): Remove hidden_friend_p. | |
2055 | (DECL_HIDDEN_FRIEND_P): Delete. | |
2056 | * call.c (add_function_candidate): Drop assert about anticipated | |
2057 | decl. | |
2058 | (build_new_op_1): Drop koenig lookup flagging for hidden friend. | |
2059 | * decl.c (duplicate_decls): Drop HIDDEN_FRIEND_P updating. | |
2060 | * name-lookup.c (do_pushdecl): Likewise. | |
2061 | (set_decl_namespace): Discover hiddenness from OVL_HIDDEN_P. | |
2062 | * pt.c (check_explicit_specialization): Record found_hidden | |
2063 | explicitly. | |
2064 | ||
93bca37c GA |
2065 | 2020-09-29 Marek Polacek <polacek@redhat.com> |
2066 | ||
2067 | PR c++/94695 | |
2068 | * call.c (ref_conv_binds_directly_p): New function. | |
2069 | * cp-tree.h (ref_conv_binds_directly_p): Declare. | |
2070 | * parser.c (warn_for_range_copy): New function. | |
2071 | (cp_convert_range_for): Call it. | |
2072 | ||
2073 | 2020-09-29 Nathan Sidwell <nathan@acm.org> | |
2074 | ||
2075 | * cp-tree.h (ovl_insert): Change final parm to hidden-or-using | |
2076 | indicator. | |
2077 | * name-lookup.h (HIDDEN_TYPE_BINDING_P): New. | |
2078 | (struct cxx_binding): Add type_is_hidden flag. | |
2079 | * tree.c (ovl_insert): Change using_p parm to using_or_hidden, | |
2080 | adjust. | |
2081 | (ovl_skip_hidden): Assert we never see a naked hidden decl. | |
2082 | * decl.c (xref_tag_1): Delete unhiding friend from here (moved to | |
2083 | lookup_elaborated_type_1). | |
2084 | * name-lookup.c (STAT_TYPE_HIDDEN_P, STAT_DECL_HIDDEN_P): New. | |
2085 | (name_lookup::search_namespace_only): Check new hidden markers. | |
2086 | (cxx_binding_make): Clear HIDDEN_TYPE_BINDING_P. | |
2087 | (update_binding): Update new hidden markers. | |
2088 | (lookup_name_1): Check HIDDEN_TYPE_BINDING_P and simplify friend | |
2089 | ignoring. | |
2090 | (lookup_elaborated_type_1): Use new hidden markers. Reveal the | |
2091 | decl here. | |
2092 | ||
2093 | 2020-09-29 Nathan Sidwell <nathan@acm.org> | |
2094 | ||
2095 | * name-lookup.c (create_local_binding): Do not clear | |
2096 | INHERITED_VALUE_BINDING_P here. | |
2097 | (name_lookup::process_binding): Move done hidden-decl triage to ... | |
2098 | (name_lookup::search_namespace_only): ... here, its only caller. | |
2099 | (cxx_binding_make): Clear flags here. | |
2100 | (push_binding): Not here. | |
2101 | (pop_local_binding): RAII. | |
2102 | (update_binding): Refactor. | |
2103 | (do_pushdecl): Assert we're never revealing a local binding. | |
2104 | (do_pushdecl_with_scope): Directly call do_pushdecl. | |
2105 | (get_class_binding): Do not clear LOCAL_BINDING_P here. | |
2106 | * pt.c (push_template_decl): Set friend & anticipated before | |
2107 | pushing. | |
2108 | ||
2109 | 2020-09-29 Nathan Sidwell <nathan@acm.org> | |
2110 | ||
2111 | * name-lookup.c (update_binding): We never meet two implicit | |
2112 | typedefs. | |
2113 | (do_pushdecl): Adjust set_identifier_type_value_with_scope calls. | |
2114 | (set_identifier_type_value_with_scope): Do not update binding in | |
2115 | the namespace-case. Assert it is already there. | |
2116 | ||
cdd8f031 GA |
2117 | 2020-09-25 Nathan Sidwell <nathan@acm.org> |
2118 | ||
2119 | * cp-tree.h (duplicate_decls): Replace 'is_friend' with 'hiding' | |
2120 | and add 'was_hidden'. | |
2121 | * name-lookup.h (pushdecl_namespace_level): Replace 'is_friend' | |
2122 | with 'hiding'. | |
2123 | (pushdecl): Likewise. | |
2124 | (pushdecl_top_level): Drop is_friend parm. | |
2125 | * decl.c (check_no_redeclaration_friend_default_args): Rename parm | |
2126 | olddelc_hidden_p. | |
2127 | (duplicate_decls): Replace 'is_friend' with 'hiding' | |
2128 | and 'was_hidden'. Do minimal adjustments in body. | |
2129 | (cxx_builtin_function): Pass 'hiding' to pushdecl. | |
2130 | * friend.c (do_friend): Pass 'hiding' to pushdecl. | |
2131 | * name-lookup.c (supplement_binding_1): Drop defaulted arg to | |
2132 | duplicate_decls. | |
2133 | (update_binding): Replace 'is_friend' with 'hiding'. Drop | |
2134 | defaulted arg to duplicate_decls. | |
2135 | (do_pushdecl): Replace 'is_friend' with 'hiding'. Assert no | |
2136 | surprise hidhing. Adjust duplicate_decls calls to inform of old | |
2137 | decl's hiddennes. | |
2138 | (pushdecl): Replace 'is_friend' with 'hiding'. | |
2139 | (set_identifier_type_value_with_scope): Adjust update_binding | |
2140 | call. | |
2141 | (do_pushdecl_with_scope): Replace 'is_friend' with 'hiding'. | |
2142 | (pushdecl_outermost_localscope): Drop default arg to | |
2143 | do_pushdecl_with_scope. | |
2144 | (pushdecl_namespace_level): Replace 'is_friend' with 'hiding'. | |
2145 | (pushdecl_top_level): Drop is_friend parm. | |
2146 | * pt.c (register_specialization): Comment duplicate_decls call | |
2147 | args. | |
2148 | (push_template_decl): Commont pushdecl_namespace_level. | |
2149 | (tsubst_friend_function, tsubst_friend_class): Likewise. | |
2150 | ||
2151 | 2020-09-25 Nathan Sidwell <nathan@acm.org> | |
2152 | ||
2153 | * name-lookup.h (enum tag_scope): Replace with ... | |
2154 | (enum class TAG_how): ... this. Add HIDDEN_FRIEND value. | |
2155 | (lookup_type_scope): Replace with ... | |
2156 | (lookup_elaborated_type): ... this. | |
2157 | (pushtag): Use TAG_how, not tag_scope. | |
2158 | * cp-tree.h (xref_tag): Parameter is TAG_how, not tag_scope. | |
2159 | * decl.c (lookup_and_check_tag): Likewise. Adjust. | |
2160 | (xref_tag_1, xref_tag): Likewise. adjust. | |
2161 | (start_enum): Adjust lookup_and_check_tag call. | |
2162 | * name-lookup.c (lookup_type_scope_1): Rename to ... | |
2163 | (lookup_elaborated_type_1) ... here. Use TAG_how, not tag_scope. | |
2164 | (lookup_type_scope): Rename to ... | |
2165 | (lookup_elaborated_type): ... here. Use TAG_how, not tag_scope. | |
2166 | (do_pushtag): Use TAG_how, not tag_scope. Adjust. | |
2167 | (pushtag): Likewise. | |
2168 | * parser.c (cp_parser_elaborated_type_specifier): Adjust. | |
2169 | (cp_parser_class_head): Likewise. | |
2170 | ||
2171 | 2020-09-25 Nathan Sidwell <nathan@acm.org> | |
2172 | ||
2173 | * cp-tree.h (DECL_BUILTIN_P): New. | |
2174 | * decl.c (duplicate_decls): Use it. Do not treat omp-udr as a | |
2175 | builtin. | |
2176 | * name-lookup.c (anticipated_builtin): Use it. | |
2177 | (set_decl_context_in_fn): Function-scope OMP UDRs have function context. | |
2178 | (do_nonmember_using_decl): Use DECL_BUILTIN_P. | |
2179 | * parser.c (cp_parser_omp_declare_reduction): Function-scope OMP | |
2180 | UDRs have function context. Assert we never find a valid duplicate. | |
2181 | * pt.c (tsubst_expr): Function-scope OMP UDRs have function context. | |
2182 | ||
a2b7397b GA |
2183 | 2020-09-24 Nathan Sidwell <nathan@acm.org> |
2184 | ||
2185 | * cp-tree.h (duplicate_decls): Default is_friend to false. | |
2186 | (xref_tag): Default tag_scope & tpl_header_p to ts_current & false. | |
2187 | (push_template_decl_real): Default is_friend to false. Rename to | |
2188 | ... | |
2189 | (push_template_decl): ... here. Delete original decl. | |
2190 | * name-lookup.h (pushdecl_namespace_level): Default is_friend to | |
2191 | false. | |
2192 | (pushtag): Default tag_scope to ts_current. | |
2193 | * coroutines.cc (morph_fn_to_coro): Drop default args to xref_tag. | |
2194 | * decl.c (start_decl): Drop default args to duplicate_decls. | |
2195 | (start_enum): Drop default arg to pushtag & xref_tag. | |
2196 | (start_preparsed_function): Pass DECL_FRIEND_P to | |
2197 | push_template_decl. | |
2198 | (grokmethod): Likewise. | |
2199 | * friend.c (do_friend): Rename push_template_decl_real calls. | |
2200 | * lambda.c (begin_lamnbda_type): Drop default args to xref_tag. | |
2201 | (vla_capture_type): Likewise. | |
2202 | * name-lookup.c (maybe_process_template_type_declaration): Rename | |
2203 | push_template_decl_real call. | |
2204 | (pushdecl_top_level_and_finish): Drop default arg to | |
2205 | pushdecl_namespace_level. | |
2206 | * pt.c (push_template_decl_real): Assert no surprising friend | |
2207 | functions. Rename to ... | |
2208 | (push_template_decl): ... here. Delete original function. | |
2209 | (lookup_template_class_1): Drop default args from pushtag. | |
2210 | (instantiate_class_template_1): Likewise. | |
2211 | * ptree.c (debug_overload): Print hidden and using markers. | |
2212 | * rtti.c (init_rtti_processing): Drop refault args from xref_tag. | |
2213 | (build_dynamic_cast_1, tinfo_base_init): Likewise. | |
2214 | * semantics.c (begin_class_definition): Drop default args to | |
2215 | pushtag. | |
2216 | ||
2217 | 2020-09-24 Nathan Sidwell <nathan@acm.org> | |
2218 | ||
2219 | PR c++/97186 | |
2220 | * pt.c (maybe_instantiate_noexcept): Local externs are never | |
2221 | member fns. | |
2222 | ||
82b77dee GA |
2223 | 2020-09-23 Nathan Sidwell <nathan@acm.org> |
2224 | ||
2225 | * name-lookup.h (typedef cxx_binding): Delete tdef. | |
2226 | (typedef cp_binding_level): Likewise. | |
2227 | (struct cxx_binding): Flags are bools. | |
2228 | ||
2229 | 2020-09-23 Nathan Sidwell <nathan@acm.org> | |
2230 | ||
2231 | PR c++/97171 | |
2232 | * pt.c (tsubst_copy) [FUNCTION_DECL,VAR_DECL]: Retrieve local | |
2233 | specialization for DECL_LOCAL_P decls. | |
2234 | ||
521d2711 GA |
2235 | 2020-09-22 Patrick Palka <ppalka@redhat.com> |
2236 | ||
2237 | PR c++/95310 | |
2238 | * pt.c (corresponding_template_parameter): Define. | |
2239 | (keep_template_parm): Use it to adjust the given template | |
2240 | parameter to the corresponding in-scope one from ctx_parms. | |
2241 | ||
2242 | 2020-09-22 Nathan Sidwell <nathan@acm.org> | |
2243 | ||
2244 | * cp-tree.h (xref_tag_from_type): Don't declare. | |
2245 | * decl.c (xref_tag_from_type): Delete. | |
2246 | * pt.c (lookup_template_class_1): Erroneously located class | |
2247 | definitions just give error_mark, don't try and inject it into the | |
2248 | namespace. | |
2249 | ||
2250 | 2020-09-22 Jakub Jelinek <jakub@redhat.com> | |
2251 | ||
2252 | PR c++/97145 | |
2253 | * constexpr.c (cxx_eval_builtin_function_call): Return void_node for | |
2254 | calls to __sanitize_ptr_{sub,cmp} builtins. | |
2255 | ||
2256 | 2020-09-22 Nathan Sidwell <nathan@acm.org> | |
2257 | ||
2258 | * pt.c (instantiate_class_template_1): Do not repush and unhide | |
2259 | injected friend. | |
2260 | ||
44135373 GA |
2261 | 2020-09-21 Marek Polacek <polacek@redhat.com> |
2262 | ||
2263 | PR c++/90583 | |
2264 | DR 1722 | |
2265 | * lambda.c (maybe_add_lambda_conv_op): Mark the conversion function | |
2266 | as noexcept. | |
2267 | ||
2268 | 2020-09-21 Marek Polacek <polacek@redhat.com> | |
2269 | ||
2270 | * pt.c (deduction_guides_for): Add a bool parameter. Set it. | |
2271 | (do_class_deduction): Warn when CTAD succeeds but the type doesn't | |
2272 | have any explicit deduction guides. | |
2273 | ||
2274 | 2020-09-21 Nathan Sidwell <nathan@acm.org> | |
2275 | ||
2276 | * decl.c (xref_tag_1): Use IDENTIFIER_LAMBDA_P to detect lambdas. | |
2277 | * lambda.c (begin_lambda_type): Use ts_current to push the tag. | |
2278 | * name-lookup.h (enum tag_scope): Drop ts_lambda. | |
2279 | ||
2280 | 2020-09-21 Marek Polacek <polacek@redhat.com> | |
2281 | ||
2282 | PR c++/97099 | |
2283 | * decl.c (redeclaration_error_message): Detect a redeclaration of | |
2284 | deduction guides. | |
2285 | ||
2fe5b7d1 GA |
2286 | 2020-09-19 Sandra Loosemore <sandra@codesourcery.com> |
2287 | ||
2288 | * cp-gimplify.c (enum bc_t, bc_label): Move to c-family. | |
2289 | (begin_bc_block, finish_bc_block, get_bc_label): Likewise. | |
2290 | (genericize_cp_loop): Likewise. | |
2291 | (genericize_for_stmt, genericize_while_stmt): Likewise. | |
2292 | (genericize_do_stmt, genericize_switch_stmt): Likewise. | |
2293 | (genericize_continue_stmt, genericize_break_stmt): Likewise. | |
2294 | (genericize_omp_for_stmt): Likewise. | |
2295 | (cp_genericize_r): Call c_genericize_control_stmt instead of | |
2296 | above functions directly. | |
2297 | (cp_genericize): Call save_bc_state and restore_bc_state instead | |
2298 | of manipulating bc_label directly. | |
2299 | * cp-objcp-common.c (cxx_block_may_fallthru): Defer to | |
2300 | c_block_may_fallthru instead of handling SWITCH_STMT here. | |
2301 | (cp_common_init_ts): Move handling of loop and switch-related | |
2302 | statements to c-family. | |
2303 | * cp-tree.def (FOR_STMT, WHILE_STMT, DO_STMT): Move to c-family. | |
2304 | (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise. | |
2305 | * cp-tree.h (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise. | |
2306 | (WHILE_COND, WHILE_BODY): Likewise. | |
2307 | (DO_COND, DO_BODY): Likewise. | |
2308 | (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise. | |
2309 | (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise. | |
2310 | (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise. | |
2311 | (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise. | |
2312 | * cxx-pretty-print.c (cxx_pretty_printer::statement): Move code | |
2313 | to handle structured loop and switch tree nodes to c-family. | |
2314 | * dump.c (cp_dump_tree): Likewise. | |
2315 | ||
2316 | 2020-09-19 Patrick Palka <ppalka@redhat.com> | |
2317 | ||
2318 | PR c++/96531 | |
2319 | PR c++/97103 | |
2320 | * constraint.cc (map_arguments): Call template_parm_to_arg | |
2321 | in the self-mapping case. | |
2322 | (finish_shorthand_constraint): No need to build a TREE_LIST | |
2323 | before calling template_parm_to_arg. | |
2324 | * pt.c (template_parm_to_arg): Rewrite to handle TEMPLATE_PARM_P | |
2325 | nodes as well as DECL_TEMPLATE_PARM_P nodes, and to make the | |
2326 | overlying TREE_LIST node optional. | |
2327 | (keep_template_parm): Don't record a BOUND_TEMPLATE_TEMPLATE_PARM, | |
2328 | instead record its corresponding TEMPLATE_TEMPLATE_PARM. | |
2329 | (convert_generic_types_to_packs): Don't call | |
2330 | template_parm_to_arg. | |
2331 | ||
2332 | 2020-09-19 Patrick Palka <ppalka@redhat.com> | |
2333 | ||
2334 | PR c++/97051 | |
2335 | * constraint.cc (satisfy_atom): Pass true as the | |
2336 | manifestly_const_eval argument to maybe_constant_value. | |
2337 | ||
239601c5 GA |
2338 | 2020-09-18 Jason Merrill <jason@redhat.com> |
2339 | ||
2340 | PR bootstrap/97118 | |
2341 | * decl.c (complete_vars): Only call layout_var_decl if completing | |
2342 | the type succeeded. | |
2343 | ||
2344 | 2020-09-18 Jason Merrill <jason@redhat.com> | |
2345 | ||
2346 | * decl.c (complete_vars): Call layout_var_decl. | |
2347 | ||
2aad20c0 GA |
2348 | 2020-09-17 Patrick Palka <ppalka@redhat.com> |
2349 | ||
2350 | PR c++/96409 | |
2351 | PR c++/96410 | |
2352 | * constraint.cc (tsubst_requires_expr): Use REQUIRES_EXPR_PARMS | |
2353 | and REQUIRES_EXPR_REQS. Use REQUIRES_EXPR_EXTRA_ARGS, | |
2354 | add_extra_args and build_extra_args to defer substitution until | |
2355 | we have all the template arguments. | |
2356 | (finish_requires_expr): Adjust the call to build_min so that | |
2357 | REQUIRES_EXPR_EXTRA_ARGS gets set to NULL_TREE. | |
2358 | * cp-tree.def (REQUIRES_EXPR): Give it a third operand. | |
2359 | * cp-tree.h (REQUIRES_EXPR_PARMS, REQUIRES_EXPR_REQS, | |
2360 | REQUIRES_EXPR_EXTRA_ARGS): Define. | |
2361 | (add_extra_args, build_extra_args): Declare. | |
2362 | ||
ecde1b0a GA |
2363 | 2020-09-16 Nathan Sidwell <nathan@acm.org> |
2364 | ||
2365 | * cp-tree.h (cp_check_omp_declare_reduction): Return bool. | |
2366 | * semantics.c (cp_check_omp_declare_reduction): Return true on for | |
2367 | success. | |
2368 | * pt.c (push_template_decl_real): OMP reductions do not get a | |
2369 | template header. | |
2370 | (tsubst_function_decl): Remove special casing for local decl omp | |
2371 | reductions. | |
2372 | (tsubst_expr): Call instantiate_body for a local omp reduction. | |
2373 | (instantiate_body): Add nested_p parm, and deal with such | |
2374 | instantiations. | |
2375 | (instantiate_decl): Reject FUNCTION_SCOPE entities, adjust | |
2376 | instantiate_body call. | |
2377 | ||
2378 | 2020-09-16 Nathan Sidwell <nathan@acm.org> | |
2379 | ||
2380 | * pt.c (instantiate_body): Remove 'nested' var, simplify | |
2381 | push_to_top logic. | |
2382 | ||
2383 | 2020-09-16 Nathan Sidwell <nathan@acm.org> | |
2384 | ||
2385 | * pt.c (instantiate_body): New, broken out of .. | |
2386 | (instantiate_decl): ... here. Call it. | |
2387 | ||
9f7ab8c5 GA |
2388 | 2020-09-15 Nathan Sidwell <nathan@acm.org> |
2389 | ||
2390 | * pt.c (push_template_decl_real): OMP reductions retain a template | |
2391 | header. | |
2392 | (tsubst_function_decl): Likewise. | |
2393 | ||
2394 | 2020-09-15 Tobias Burnus <tobias@codesourcery.com> | |
2395 | ||
2396 | PR fortran/96668 | |
2397 | * cp-gimplify.c (cxx_omp_finish_clause): Add bool openacc arg. | |
2398 | * cp-tree.h (cxx_omp_finish_clause): Likewise | |
2399 | * semantics.c (handle_omp_for_class_iterator): Update call. | |
2400 | ||
50a71cd0 GA |
2401 | 2020-09-14 Marek Polacek <polacek@redhat.com> |
2402 | ||
2403 | * pt.c (push_template_decl_real): Use VAR_OR_FUNCTION_DECL_P. | |
2404 | ||
2405 | 2020-09-14 Nathan Sidwell <nathan@acm.org> | |
2406 | ||
2407 | * pt.c (push_template_decl_real): Don't attach a template head to | |
2408 | local externs. | |
2409 | (tsubst_function_decl): Add support for headless local extern | |
2410 | decls. | |
2411 | (tsubst_decl): Add support for headless local extern decls. | |
2412 | ||
ac35c090 GA |
2413 | 2020-09-11 Nathan Sidwell <nathan@acm.org> |
2414 | ||
2415 | * decl.c (grokfndecl): Don't attach to local extern. | |
2416 | ||
2417 | 2020-09-11 Nathan Sidwell <nathan@acm.org> | |
2418 | ||
2419 | * parser.c (cp_parser_objc_method_definition_list): Reimplement | |
2420 | loop, make sure we pop scope. | |
2421 | ||
2422 | 2020-09-11 Marek Polacek <polacek@redhat.com> | |
2423 | ||
2424 | * cp-tree.h (LOOKUP_CONSTINIT): Remove. | |
2425 | (LOOKUP_REWRITTEN): Adjust. | |
2426 | * decl.c (duplicate_decls): Set DECL_DECLARED_CONSTINIT_P. | |
2427 | (check_initializer): Use DECL_DECLARED_CONSTINIT_P instead of | |
2428 | LOOKUP_CONSTINIT. | |
2429 | (cp_finish_decl): Don't set DECL_DECLARED_CONSTINIT_P. Use | |
2430 | DECL_DECLARED_CONSTINIT_P instead of LOOKUP_CONSTINIT. | |
2431 | (grokdeclarator): Set DECL_DECLARED_CONSTINIT_P. | |
2432 | * decl2.c (grokfield): Don't handle LOOKUP_CONSTINIT. | |
2433 | * parser.c (cp_parser_decomposition_declaration): Remove | |
2434 | LOOKUP_CONSTINIT handling. | |
2435 | (cp_parser_init_declarator): Likewise. | |
2436 | * pt.c (tsubst_expr): Likewise. | |
2437 | (instantiate_decl): Likewise. | |
2438 | * typeck2.c (store_init_value): Use DECL_DECLARED_CONSTINIT_P instead | |
2439 | of LOOKUP_CONSTINIT. | |
2440 | ||
fdcc0283 GA |
2441 | 2020-09-10 Nathan Sidwell <nathan@acm.org> |
2442 | ||
2443 | * cp-tree.h (TINFO_VAR_DECLARED_CONSTINIT): Replace with ... | |
2444 | (DECL_DECLARED_CONSTINIT_P): ... this. | |
2445 | * decl.c (start_decl): No need to retrofit_lang_decl for constinit | |
2446 | flag. | |
2447 | (cp_finish_decl): Use DECL_DECLARED_CONSTINIT_P. | |
2448 | * pt.c (tsubst_decl): No need to handle constinit flag | |
2449 | propagation. | |
2450 | (tsubst_expr): Or here. | |
2451 | ||
2452 | 2020-09-10 Nathan Sidwell <nathan@acm.org> | |
2453 | ||
2454 | * cp-tree.h (DECL_LOCAL_FUNCTION_P): Rename to ... | |
2455 | (DECL_LOCAL_DECL_P): ... here. Accept both fns and vars. | |
2456 | * decl.c (start_decl): Set DECL_LOCAL_DECL_P for local externs. | |
2457 | (omp_declare_variant_finalize_one): Use DECL_LOCAL_DECL_P. | |
2458 | (local_variable_p): Simplify. | |
2459 | * name-lookup.c (set_decl_context_in_fn): Assert DECL_LOCAL_DECL_P | |
2460 | is as expected. Simplify. | |
2461 | (do_pushdecl): Don't set decl_context_in_fn for friends. | |
2462 | (is_local_extern): Simplify. | |
2463 | * call.c (equal_functions): Use DECL_LOCAL_DECL_P. | |
2464 | * parser.c (cp_parser_postfix_expression): Likewise. | |
2465 | (cp_parser_omp_declare_reduction): Likewise. | |
2466 | * pt.c (check_default_tmpl_args): Likewise. | |
2467 | (tsubst_expr): Assert nested reduction function is local. | |
2468 | (type_dependent_expression_p): Use DECL_LOCAL_DECL_P. | |
2469 | * semantics.c (finish_call_expr): Likewise. | |
2470 | ||
80f86e78 GA |
2471 | 2020-09-09 Marek Polacek <polacek@redhat.com> |
2472 | ||
2473 | PR c++/77841 | |
2474 | * decl.c (reshape_init): If we're initializing a char array from | |
2475 | a string-literal that is enclosed in braces, unwrap it. | |
2476 | * init.c (build_new_1): Don't handle string-initializers here. | |
2477 | (build_new): Handle new-expression with paren-init when the | |
2478 | array bound is known. Always pass string constants to build_new_1 | |
2479 | enclosed in braces. Don't handle string-initializers in any | |
2480 | special way. | |
2481 | ||
2482 | 2020-09-09 Marek Polacek <polacek@redhat.com> | |
2483 | ||
2484 | PR c++/95164 | |
2485 | * decl.c (reshape_init_r): When initializing an aggregate member | |
2486 | with an initializer from an initializer-list, also consider | |
2487 | COMPOUND_LITERAL_P. | |
2488 | ||
2489 | 2020-09-09 Nathan Sidwell <nathan@acm.org> | |
2490 | ||
2491 | * parser.c (cp_parser_omp_declare_reduction): Refactor to avoid | |
2492 | code duplication. Update DECL_TI_TEMPLATE's context. | |
2493 | * pt.c (tsubst_expr): For OMP reduction function, set context to | |
2494 | global_namespace before pushing. | |
2495 | (tsubst_omp_udr): Assert current_function_decl, add comment about | |
2496 | decl context. | |
2497 | ||
2498 | 2020-09-09 Patrick Palka <ppalka@redhat.com> | |
2499 | ||
2500 | PR c++/96647 | |
2501 | * class.c (resolve_address_of_overloaded_function): Check | |
2502 | constraints_satisfied_p and perform return-type deduction via | |
2503 | maybe_instantiate_decl when considering non-template functions | |
2504 | in the overload set. | |
2505 | * cp-tree.h (maybe_instantiate_decl): Declare. | |
2506 | * decl2.c (maybe_instantiate_decl): Remove static. | |
2507 | ||
bec05c98 GA |
2508 | 2020-09-04 Jason Merrill <jason@redhat.com> |
2509 | ||
2510 | * expr.c (mark_use): Use iloc_sentinel. | |
2511 | ||
6e82b6cf GA |
2512 | 2020-09-03 Jakub Jelinek <jakub@redhat.com> |
2513 | ||
2514 | PR c++/96901 | |
2515 | * constexpr.c (fundef_copies_table): Change type from | |
2516 | hash_map<tree, tree> * to decl_tree_map *. | |
2517 | ||
2518 | 2020-09-03 Marek Polacek <polacek@redhat.com> | |
2519 | ||
2520 | PR c++/92812 | |
2521 | * cp-tree.h (do_aggregate_paren_init): Declare. | |
2522 | * decl.c (do_aggregate_paren_init): New. | |
2523 | (grok_reference_init): Use it. | |
2524 | (check_initializer): Likewise. | |
2525 | * init.c (perform_member_init): Handle initializing an array from | |
2526 | a ()-list. Use do_aggregate_paren_init. | |
2527 | ||
2528 | 2020-09-03 Jakub Jelinek <jakub@redhat.com> | |
2529 | ||
2530 | PR c++/96862 | |
2531 | * constexpr.c (cxx_eval_outermost_constant_expr): Temporarily disable | |
2532 | flag_rounding_math during manifestly constant evaluation. | |
2533 | ||
e1a4a8a0 GA |
2534 | 2020-09-01 Marek Polacek <polacek@redhat.com> |
2535 | ||
2536 | PR c++/77841 | |
2537 | * init.c (build_new_1): Call reshape_init. | |
2538 | ||
2539 | 2020-09-01 Jakub Jelinek <jakub@redhat.com> | |
2540 | ||
2541 | PR c++/96867 | |
2542 | * semantics.c (handle_omp_array_sections_1): Test | |
2543 | DECL_ARRAY_PARAMETER_P only on PARM_DECLs. | |
2544 | ||
13e4ba28 GA |
2545 | 2020-08-31 Marek Polacek <polacek@redhat.com> |
2546 | Jason Merrill <jason@redhat.com> | |
2547 | ||
2548 | PR c++/93529 | |
2549 | * call.c (build_new_method_call_1): Use build_constructor_from_vec | |
2550 | instead of build_tree_list_vec + build_constructor_from_list. | |
2551 | * init.c (build_new_1): Handle new char[]{"foo"}. Use | |
2552 | build_constructor_from_vec instead of build_tree_list_vec + | |
2553 | build_constructor_from_list. | |
2554 | (build_new): Deduce the array size in new-expression if not | |
2555 | present. Handle ()-init. Handle initializing an array from | |
2556 | a string literal. | |
2557 | * parser.c (cp_parser_new_type_id): Leave [] alone. | |
2558 | (cp_parser_direct_new_declarator): Allow []. | |
2559 | * pt.c (type_dependent_expression_p): In a NEW_EXPR, consider | |
2560 | array types whose dimension has to be deduced type-dependent. | |
2561 | ||
8b394f01 GA |
2562 | 2020-08-27 Martin Liska <mliska@suse.cz> |
2563 | ||
2564 | * class.c (build_vtbl_initializer): Set exact argument of a vector | |
2565 | growth function to true. | |
2566 | * constraint.cc (get_mapped_args): Likewise. | |
2567 | * decl.c (cp_maybe_mangle_decomp): Likewise. | |
2568 | (cp_finish_decomp): Likewise. | |
2569 | * parser.c (cp_parser_omp_for_loop): Likewise. | |
2570 | * pt.c (canonical_type_parameter): Likewise. | |
2571 | * rtti.c (get_pseudo_ti_init): Likewise. | |
2572 | ||
57ea0894 GA |
2573 | 2020-08-26 Nathan Sidwell <nathan@acm.org> |
2574 | ||
2575 | * decl.c (poplevel): A local-binding tree list holds the name in | |
2576 | TREE_PURPOSE. | |
2577 | * name-lookup.c (update_local_overload): Add id to TREE_PURPOSE. | |
2578 | (lookup_name_1): Deal with local-binding error_mark_node marker. | |
2579 | (op_unqualified_lookup): Return error_mark_node for 'nothing | |
2580 | found'. Retain global binding, check class binding here. | |
2581 | (maybe_save_operator_binding): Reimplement to always cache a | |
2582 | result. | |
2583 | (push_operator_bindings): Deal with 'ignore' marker. | |
2584 | ||
db0f6efe GA |
2585 | 2020-08-25 Tobias Burnus <tobias@codesourcery.com> |
2586 | ||
2587 | PR c/96678 | |
2588 | * semantics.c (handle_omp_array_sections_1): Talk about | |
2589 | array function parameter in the error message. | |
2590 | ||
2591 | 2020-08-25 Jakub Jelinek <jakub@redhat.com> | |
2592 | ||
2593 | PR c++/96721 | |
2594 | * cp-tree.h (build_trivial_dtor_call): Add bool argument defaulted | |
2595 | to false. | |
2596 | * call.c (build_trivial_dtor_call): Add NO_PTR_DEREF argument. If | |
2597 | instance is a pointer and NO_PTR_DEREF is true, clobber the pointer | |
2598 | rather than what it points to. | |
2599 | * semantics.c (finish_call_expr): Call build_trivial_dtor_call with | |
2600 | true as NO_PTR_DEREF. | |
2601 | ||
2602 | 2020-08-25 Jason Merrill <jason@redhat.com> | |
2603 | ||
2604 | PR c++/95428 | |
2605 | * optimize.c (populate_clone_array): Revert PR70462 change. | |
2606 | (maybe_clone_body): Likewise. | |
2607 | ||
b2b24d30 GA |
2608 | 2020-08-24 Nathan Sidwell <nathan@acm.org> |
2609 | ||
2610 | * ptree.c (debug_overload): New. | |
2611 | ||
04e23a40 GA |
2612 | 2020-08-19 Jason Merrill <jason@redhat.com> |
2613 | ||
2614 | DR 2369 | |
2615 | * cp-tree.h (push_tinst_level, push_tinst_level_loc): Declare. | |
2616 | * constraint.cc (satisfy_declaration_constraints): | |
2617 | Use add_outermost_template_args and push_tinst_level. | |
2618 | * pt.c (add_outermost_template_args): Handle getting | |
2619 | a TEMPLATE_DECL as the first argument. | |
2620 | (push_tinst_level, push_tinst_level_loc): No longer static. | |
2621 | (fn_type_unification): Check satisfaction before non-dependent | |
2622 | conversions. | |
2623 | ||
5c265693 GA |
2624 | 2020-08-18 Nathan Sidwell <nathan@acm.org> |
2625 | ||
2626 | * cp-tree.h (SET_TYPE_TEMPLTE_INFO): Do not deal with ALIAS templates. | |
2627 | * pt.c (lookup_template_class_1): Special-case alias template | |
2628 | template_info setting. | |
2629 | ||
2630 | 2020-08-18 Jason Merrill <jason@redhat.com> | |
2631 | ||
2632 | PR c++/96199 | |
2633 | * pt.c (tsubst_aggr_type): Rewrite in C++17, too. | |
2634 | (maybe_dependent_member_ref): Likewise. | |
2635 | (build_deduction_guide): Re-substitute template parms. | |
2636 | * cp-tree.h (struct push_nested_class_guard): New. | |
2637 | * constraint.cc (get_normalized_constraints_from_decl): Use it. | |
2638 | ||
2639 | 2020-08-18 Jason Merrill <jason@redhat.com> | |
2640 | ||
2641 | PR c++/96199 | |
2642 | * pt.c (maybe_dependent_member_ref): New. | |
2643 | (tsubst_copy) [CONST_DECL]: Use it. | |
2644 | [VAR_DECL]: Likewise. | |
2645 | (tsubst_aggr_type): Handle nested type. | |
2646 | ||
2647 | 2020-08-18 Nathan Sidwell <nathan@acm.org> | |
2648 | ||
2649 | * name-lookup.c (qualify_lookup): Drop lambda checking here. | |
2650 | Reorder namespace & type checking. | |
2651 | (lookup_name_1): Do hidden lambda checking here. | |
2652 | ||
661ee09b GA |
2653 | 2020-08-14 Nathan Sidwell <nathan@acm.org> |
2654 | ||
2655 | * name-lookup.h (lookup_name_real, lookup_name_nonclass): Rename | |
2656 | to ... | |
2657 | (lookup_name): ... these new overloads. | |
2658 | * name-lookup.c (identifier_type_value_1): Rename lookup_name_real | |
2659 | call. | |
2660 | (lookup_name_real_1): Rename to ... | |
2661 | (lookup_name_1): ... here. | |
2662 | (lookup_name_real): Rename to ... | |
2663 | (lookup_name): ... here. Rename lookup_name_real_1 call. | |
2664 | (lookup_name_nonclass): Delete. | |
2665 | * call.c (build_operator_new_call): Rename lookup_name_real call. | |
2666 | (add_operator_candidates): Likewise. | |
2667 | (build_op_delete_call): Rename lookup_name_nonclass call. | |
2668 | * parser.c (cp_parser_lookup_name): Likewise. | |
2669 | * pt.c (tsubst_friend_class, lookup_init_capture_pack): Likewise. | |
2670 | (tsubst_expr): Likewise. | |
2671 | * semantics.c (capture_decltype): Likewise. | |
2672 | ||
2673 | 2020-08-14 Nathan Sidwell <nathan@acm.org> | |
2674 | ||
2675 | * cp-tree.h (LOOKUP_HIDDEN): Delete. | |
2676 | (LOOKUP_PREFER_RVALUE): Adjust initializer. | |
2677 | * name-lookup.h (enum class LOOK_want): Add HIDDEN_FRIEND and | |
2678 | HIDDEN_LAMBDA flags. | |
2679 | (lookup_name_real): Drop flags parm. | |
2680 | (lookup_qualified_name): Drop find_hidden parm. | |
2681 | * name-lookup.c (class name_lookup): Drop hidden field, adjust | |
2682 | ctors. | |
2683 | (name_lookup::add_overload): Check want for hiddenness. | |
2684 | (name_lookup::process_binding): Likewise. | |
2685 | (name_lookup::search_unqualified): Likewise. | |
2686 | (identifier_type_value_1): Adjust lookup_name_real call. | |
2687 | (set_decl_namespace): Adjust name_lookup ctor. | |
2688 | (qualify_lookup): Drop flags parm, use want for hiddenness. | |
2689 | (lookup_qualified_name): Drop find_hidden parm. | |
2690 | (lookup_name_real_1): Drop flags parm, adjust qualify_lookup | |
2691 | calls. | |
2692 | (lookup_name_real): Drop flags parm. | |
2693 | (lookup_name_nonclass, lookup_name): Adjust lookup_name_real | |
2694 | calls. | |
2695 | (lookup_type_scope_1): Adjust qualify_lookup calls. | |
2696 | * call.c (build_operator_new_call): Adjust lookup_name_real call. | |
2697 | (add_operator_candidates): Likewise. | |
2698 | * coroutines.cc (morph_fn_to_coro): Adjust lookup_qualified_name | |
2699 | call. | |
2700 | * parser.c (cp_parser_lookup_name): Adjust lookup_name_real calls. | |
2701 | * pt.c (check_explicit_specialization): Adjust | |
2702 | lookup_qualified_name call. | |
2703 | (deduction_guides_for): Likewise. | |
2704 | (tsubst_friend_class): Adjust lookup_name_real call. | |
2705 | (lookup_init_capture_pack): Likewise. | |
2706 | (tsubst_expr): Likewise, don't look in namespaces. | |
2707 | * semantics.c (capture_decltype): Adjust lookup_name_real. Don't | |
2708 | look in namespaces. | |
2709 | ||
2710 | 2020-08-14 Jason Merrill <jason@redhat.com> | |
2711 | ||
2712 | PR c++/90254 | |
2713 | PR c++/93711 | |
2714 | * cp-tree.h (unsafe_return_slot_p): Declare. | |
2715 | * call.c (is_base_field_ref): Rename to unsafe_return_slot_p. | |
2716 | (build_over_call): Check unsafe_return_slot_p. | |
2717 | (build_special_member_call): Likewise. | |
2718 | * init.c (expand_default_init): Likewise. | |
2719 | * typeck2.c (split_nonconstant_init_1): Likewise. | |
2720 | ||
2721 | 2020-08-14 Nathan Sidwell <nathan@acm.org> | |
2722 | ||
2723 | * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES) | |
2724 | (LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY) | |
2725 | (LOOKUP_QUALIFIERS_ONL): Delete. | |
2726 | (LOOKUP_HIDDEN): Adjust. | |
2727 | * name-lookup.h (enum class LOOK_want): New. | |
2728 | (operator|, operator&): Overloads for it. | |
2729 | (lookup_name_real): Replace prefer_type & namespaces_only with | |
2730 | LOOK_want parm. | |
2731 | (lookup_qualified_name): Replace prefer_type with LOOK_want. | |
2732 | (lookup_name_prefer_type): Replace with ... | |
2733 | (lookup_name): ... this. New overload with LOOK_want parm. | |
2734 | * name-lookup.c (struct name_lookup): Replace flags with want and | |
2735 | hidden fields. Adjust constructors. | |
2736 | (name_lookyp::add_overload): Correct hidden stripping test. Update | |
2737 | for new LOOK_want type. | |
2738 | (name_lookup::process_binding): Likewise. | |
2739 | (name_lookup::search_unqualified): Use hidden flag. | |
2740 | (identifier_type_value_1): Adjust lookup_name_real call. | |
2741 | (set_decl_namespace): Adjust name_lookup ctor. | |
2742 | (lookup_flags): Delete. | |
2743 | (qualify_lookup): Add LOOK_want parm, adjust. | |
2744 | (lookup_qualified_name): Replace prefer_type parm with LOOK_want. | |
2745 | (lookup_name_real_1): Replace prefer_type and namespaces_only with | |
2746 | LOOK_want parm. | |
2747 | (lookup_name_real): Likewise. | |
2748 | (lookup_name_nonclass, lookup_name): Adjust lookup_name_real call. | |
2749 | (lookup_name_prefer_type): Rename to ... | |
2750 | (lookup_name): ... here. New overload with LOOK_want parm. | |
2751 | (lookup_type_scope_1): Adjust qualify_lookup calls. | |
2752 | * call.c (build_operator_new_call) | |
2753 | (add_operator_candidates): Adjust lookup_name_real calls. | |
2754 | * coroutines.cc (find_coro_traits_template_decl) | |
2755 | (find_coro_handle_template_decl, morph_fn_to_coro): Adjust | |
2756 | lookup_qualified_name calls. | |
2757 | * cp-objcp-common.c (identifier_global_tag): Likewise. | |
2758 | * decl.c (get_tuple_size, get_tuple_decomp_init): Likewise. | |
2759 | (lookup_and_check_tag): Use lookup_name overload. | |
2760 | * parser.c (cp_parser_userdef_numeric_literal): Adjust | |
2761 | lookup_qualified_name call. | |
2762 | (prefer_arg_type): Drop template_mem_access parm, return LOOK_want | |
2763 | value. | |
2764 | (cp_parser_lookup_name): Adjust lookup_member, lookup_name_real | |
2765 | calls. | |
2766 | * pt.c (check_explicit_specialization): Adjust lookup_qualified_name | |
2767 | call. | |
2768 | (tsubst_copy_and_build, tsubst_qualified_name): Likewise | |
2769 | (deduction_guides_for): Likewise. | |
2770 | (tsubst_friend_class): Adjust lookup_name_real call. | |
2771 | (lookup_init_capture, tsubst_expr): Likewise. | |
2772 | * rtti.c (emit_support_tinfos): Adjust lookup_qualified_name call. | |
2773 | * semantics.c (omp_reduction_lookup): Likewise. | |
2774 | (capture_decltype): Adjust lookup_name_real call. | |
2775 | ||
b3cb5606 GA |
2776 | 2020-08-13 Nathan Sidwell <nathan@acm.org> |
2777 | ||
2778 | * name-lookup.h (enum class LOOK_where): New. | |
2779 | (operator|, operator&): Overloads for it. | |
2780 | (lookup_name_real): Replace NONCLASS & BLOCK_P parms with WHERE. | |
2781 | * name-lookup.c (identifier_type_value_w): Adjust | |
2782 | lookup_name_real call. | |
2783 | (lookup_name_real_1): Replace NONCLASS and BLOCK_P parameters | |
2784 | with WHERE bitmask. Don't search namespaces if not asked to. | |
2785 | (lookup_name_real): Adjust lookup_name_real_1 call. | |
2786 | (lookup_name_nonclass, lookup_name) | |
2787 | (lookup_name_prefer_type): Likewise. | |
2788 | * call.c (build_operator_new_call) | |
2789 | (add_operator_candidates): Adjust lookup_name_real calls. | |
2790 | * parser.c (cp_parser_lookup_name): Likewise. | |
2791 | * pt.c (tsubst_friend_class, lookup_init_capture_pack) | |
2792 | (tsubst_expr): Likewise. | |
2793 | * semantics.c (capture_decltype): Likewise. | |
2794 | ||
2795 | 2020-08-13 Marek Polacek <polacek@redhat.com> | |
2796 | ||
2797 | PR c++/92812 | |
2798 | * typeck.c (build_static_cast_1): Implement P1975R0 by allowing | |
2799 | static_cast to aggregate type. | |
2800 | ||
84005b8a GA |
2801 | 2020-08-10 Jakub Jelinek <jakub@redhat.com> |
2802 | ||
2803 | PR c++/96497 | |
2804 | * constexpr.c (cxx_eval_binary_expression): For SPACESHIP_EXPR, tail | |
2805 | call cxx_eval_constant_expression after genericize_spaceship to avoid | |
2806 | undesirable further VERIFY_CONSTANT. | |
2807 | ||
2808 | 2020-08-10 Patrick Palka <ppalka@redhat.com> | |
2809 | ||
2810 | * pt.c (resolve_overloaded_unification): Drop functions with | |
2811 | unsatisfied constraints. | |
2812 | (resolve_nondeduced_context): Likewise. | |
2813 | ||
aa5ea20c GA |
2814 | 2020-08-05 Patrick Palka <ppalka@redhat.com> |
2815 | Jason Merrill <jason@redhat.com> | |
2816 | ||
2817 | PR c++/96282 | |
2818 | * constexpr.c (cxx_eval_vec_init_1): Truncate ctx->ctor and | |
2819 | then clear CONSTRUCTOR_NO_CLEARING on each appended element | |
2820 | initializer if we're initializing a previously zero-initialized | |
2821 | array object. | |
2822 | ||
abba2591 GA |
2823 | 2020-08-04 Marek Polacek <polacek@redhat.com> |
2824 | ||
2825 | PR c++/96082 | |
2826 | * parser.c (cp_parser_elaborated_type_specifier): Allow | |
2827 | 'template' following ::. | |
2828 | ||
2829 | 2020-08-04 Nathan Sidwell <nathan@acm.org> | |
2830 | ||
2831 | * parser.c (cp_parser_explicit_specialization): Refactor | |
2832 | to avoid leak of num_template_parameter_lists value. | |
2833 | ||
2834 | 2020-08-04 Patrick Palka <ppalka@redhat.com> | |
2835 | ||
2836 | PR c++/94024 | |
2837 | * init.c (sort_mem_initializers): Preserve TREE_TYPE of the | |
2838 | member initializer list node. | |
2839 | (emit_mem_initializers): Set input_location when performing each | |
2840 | member initialization. | |
2841 | * parser.c (cp_parser_mem_initializer): Attach the source | |
2842 | location of this initializer to a dummy EMPTY_CLASS_EXPR | |
2843 | within the TREE_TYPE of the list node. | |
2844 | * pt.c (tsubst_initializer_list): Preserve TREE_TYPE of the | |
2845 | member initializer list node. | |
2846 | ||
6a1ad710 GA |
2847 | 2020-08-03 Marek Polacek <polacek@redhat.com> |
2848 | ||
2849 | * cp-tree.h (after_nsdmi_defaulted_late_checks): Remove. | |
2850 | ||
2851 | 2020-08-03 Marek Polacek <polacek@redhat.com> | |
2852 | ||
2853 | DR 2032 | |
2854 | PR c++/96218 | |
2855 | * pt.c (check_default_tmpl_args): Also consider variable | |
2856 | templates. | |
2857 | ||
48cc2e46 GA |
2858 | 2020-07-31 Jakub Jelinek <jakub@redhat.com> |
2859 | ||
2860 | PR c++/96182 | |
2861 | * decl.c (finish_function): In constexpr functions use for C++14 and | |
2862 | later error instead of warning if no return statement is present and | |
2863 | diagnose it regardless of warn_return_type. Move the warn_return_type | |
2864 | diagnostics earlier in the function. | |
2865 | ||
2866 | 2020-07-31 Martin Sebor <msebor@redhat.com> | |
2867 | ||
2868 | PR c++/96003 | |
2869 | * class.c (build_base_path): Set no-warning bit on the synthesized | |
2870 | conditional expression in static_cast. | |
2871 | ||
2872 | 2020-07-31 Richard Biener <rguenther@suse.de> | |
2873 | ||
2874 | PR debug/96383 | |
2875 | * cp-objcp-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG): | |
2876 | Define to c_common_finalize_early_debug. | |
2877 | ||
2878 | 2020-07-31 Patrick Palka <ppalka@redhat.com> | |
2879 | ||
2880 | PR c++/96197 | |
2881 | * constexpr.c (cxx_eval_constant_expression) <case CONST_DECL>: | |
2882 | Pass false to decl_constant_value and decl_really_constant_value | |
2883 | so that they don't unshare their result. | |
2884 | * cp-tree.h (decl_constant_value): New declaration with an added | |
2885 | bool parameter. | |
2886 | (decl_really_constant_value): Add bool parameter defaulting to | |
2887 | true to existing declaration. | |
2888 | * init.c (constant_value_1): Add bool parameter which controls | |
2889 | whether to unshare the initializer before returning. Call | |
2890 | unshare_expr at most once. | |
2891 | (scalar_constant_value): Pass true to constant_value_1's new | |
2892 | bool parameter. | |
2893 | (decl_really_constant_value): Add bool parameter and forward it | |
2894 | to constant_value_1. | |
2895 | (decl_constant_value): Likewise, but instead define a new | |
2896 | overload with an added bool parameter. | |
2897 | ||
d48cca8f GA |
2898 | 2020-07-30 Patrick Palka <ppalka@redhat.com> |
2899 | ||
2900 | PR c++/64194 | |
2901 | * pt.c (resolve_overloaded_unification): If the function | |
2902 | template specialization has a placeholder return type, | |
2903 | then instantiate it before attempting unification. | |
2904 | ||
2905 | 2020-07-30 Patrick Palka <ppalka@redhat.com> | |
2906 | ||
2907 | PR c++/95486 | |
2908 | * pt.c (alias_ctad_tweaks): Call remove_constraints before | |
2909 | calling set_constraints. | |
2910 | ||
2911 | 2020-07-30 Patrick Palka <ppalka@redhat.com> | |
2912 | ||
2913 | PR c++/96106 | |
2914 | * pt.c (reduce_template_parm_level): Propagate DECL_VIRTUAL_P | |
2915 | from the original TEMPLATE_PARM_DECL to the new lowered one. | |
2916 | ||
2917 | 2020-07-30 Patrick Palka <ppalka@redhat.com> | |
2918 | ||
2919 | PR c++/96164 | |
2920 | * constraint.cc (constraints_satisfied_p): Return true if | |
2921 | !flags_concepts. | |
2922 | * pt.c (do_type_instantiation): Update a paragraph taken from | |
2923 | [temp.explicit] to reflect the latest specification. Don't | |
2924 | instantiate a member with unsatisfied constraints. | |
2925 | ||
bea7a391 GA |
2926 | 2020-07-29 Jason Merrill <jason@redhat.com> |
2927 | ||
2928 | PR c++/91427 | |
2929 | * cp-tree.h (IMPLICIT_RVALUE_P): New. | |
2930 | (enum cp_lvalue_kind_flags): Add clk_implicit_rval. | |
2931 | (implicit_rvalue_p, set_implicit_rvalue_p): New. | |
2932 | * call.c (reference_binding): Check clk_implicit_rval. | |
2933 | (build_over_call): Adjust C++20 implicit move. | |
2934 | * coroutines.cc (finish_co_return_stmt): Simplify implicit move. | |
2935 | * except.c (build_throw): Adjust C++20 implicit move. | |
2936 | * pt.c (tsubst_copy_and_build) [STATIC_CAST_EXPR]: Propagate | |
2937 | IMPLICIT_RVALUE_P. | |
2938 | * tree.c (lvalue_kind): Set clk_implicit_rval. | |
2939 | * typeck.c (treat_lvalue_as_rvalue_p): Overhaul. | |
2940 | (maybe_warn_pessimizing_move): Adjust. | |
2941 | (check_return_expr): Adjust C++20 implicit move. | |
2942 | ||
2943 | 2020-07-29 Jason Merrill <jason@redhat.com> | |
2944 | ||
2945 | PR c++/91212 | |
2946 | * call.c (build_over_call): Don't call a const ref | |
2947 | overload for implicit move. | |
2948 | ||
7ebb7d0c GA |
2949 | 2020-07-28 Nathan Sidwell <nathan@acm.org> |
2950 | ||
2951 | * cp-gimplify.c (cp_genericize_r): Set IMPORTED_DECL's context. | |
2952 | * cp-objcp-common.c (cp_pushdecl): Set decl's context. | |
2953 | * decl.c (grokfndecl): Make DECL_CONTEXT setting clearer. | |
2954 | ||
2955 | 2020-07-28 Nathan Sidwell <nathan@acm.org> | |
2956 | ||
2957 | * class.c (fixup_type_variants): Copy TYPE_SIZE and | |
2958 | TYPE_SIZE_UINIT. | |
2959 | (finish_struct): Call it. | |
2960 | ||
2961 | 2020-07-28 Nathan Sidwell <nathan@acm.org> | |
2962 | ||
2963 | * ptree.c (cxx_print_decl): Better indentation. | |
2964 | ||
2965 | 2020-07-28 Jakub Jelinek <jakub@redhat.com> | |
2966 | Mark Wielaard <mark@klomp.org> | |
2967 | ||
2968 | PR c++/96328 | |
2969 | * parser.c (cp_lexer_safe_previous_token): Don't call | |
2970 | cp_lexer_previous_token, instead inline it by hand and return NULL | |
2971 | instead of failing assertion if all previous tokens until the first | |
2972 | one are purged. | |
2973 | (cp_parser_error_1): Optimize - only call cp_lexer_safe_previous_token | |
2974 | if token->type is CPP_NAME. Use cp_lexer_safe_previous_token instead | |
2975 | of cp_lexer_previous_token for the missing_token_desc != RT_NONE | |
2976 | case too. | |
2977 | ||
e71dab87 GA |
2978 | 2020-07-27 Nathan Sidwell <nathan@acm.org> |
2979 | ||
2980 | * cp-tree.h (enum cp_tree_index): Add CPTI_AS_BASE_IDENTIFIER. | |
2981 | (as_base_identifier): Define. | |
2982 | * decl.c (initialize_predifined_identifiers): Initialize as_base | |
2983 | identifier. | |
2984 | * class.c (layout_class_type): Name the as-base type. Zap | |
2985 | NSDMI its fields may have. | |
2986 | ||
3ea9abca GA |
2987 | 2020-07-22 Nathan Sidwell <nathan@acm.org> |
2988 | ||
2989 | * class.c (maybe_add_class_template_decl_list): Don't add CONST_DECLs. | |
2990 | ||
2991 | 2020-07-22 Nathan Sidwell <nathan@acm.org> | |
2992 | ||
2993 | * typeck.c (structural_comptypes): [DECLTYPE_TYPE] break | |
2994 | apart complex if. | |
2995 | [UNDERLYING_TYPE]: Use an if. | |
2996 | [TYPEOF_TYPE]: New. | |
2997 | ||
2998 | 2020-07-22 Nathan Sidwell <nathan@acm.org> | |
2999 | ||
3000 | * decl.c (decls_match): Move variables into scopes | |
3001 | they're needed in. | |
3002 | (duplicate_decls): Use STRIP_TEMPLATE. | |
3003 | (build_typename_type): Move var decls to their assignments. | |
3004 | (begin_function_body): Likewise. | |
3005 | * decl2.c (get_guard): Likewise. | |
3006 | (mark_used): Use true for truthiness. | |
3007 | * error.c (dump_aggr_type): Hold the decl in a var called | |
3008 | 'decl', not 'name'. | |
3009 | ||
3010 | 2020-07-22 Nathan Sidwell <nathan@acm.org> | |
3011 | ||
3012 | * cp-tree.h (struct tree_lambda_expr): Shrink | |
3013 | default_capture_mode & discriminator. | |
3014 | ||
3015 | 2020-07-22 Nathan Sidwell <nathan@acm.org> | |
3016 | ||
3017 | * mangle.c (decl_is_template_id): Rename to ... | |
3018 | (maybe_template_info): ... here. Return the template info, | |
3019 | rather than use a pointer. Adjust all callers. | |
3020 | (find_substitution): Use template_args_equal, rather than | |
3021 | local check. | |
3022 | ||
3023 | 2020-07-22 Tobias Burnus <tobias@codesourcery.com> | |
3024 | ||
3025 | * parser.c (cp_parser_omp_clause_hint): Require nonnegative hint. | |
3026 | (cp_parser_omp_critical): Permit hint(0) clause without named critical. | |
3027 | * pt.c (tsubst_expr): Re-check the latter for templates. | |
3028 | ||
30430061 GA |
3029 | 2020-07-21 Sunil K Pandey <skpgkp2@gmail.com> |
3030 | ||
3031 | PR target/95237 | |
3032 | * decl.c (cp_finish_decl): Call target hook | |
3033 | lower_local_decl_alignment to lower local decl alignment. | |
3034 | ||
3035 | 2020-07-21 Nathan Sidwell <nathan@acm.org> | |
3036 | ||
3037 | * parser.c (cp_lexer_consume_token): Drop PRAGMA_EOL assert. | |
3038 | (cp_parser_skip_to_closing_parenthesis_1): Only pass start token | |
3039 | to pragma skipper if recovering. | |
3040 | (cp_parser_skip_to_pragma_eol): Only purge and change pragma | |
3041 | state when recovering. | |
3042 | ||
0933f508 GA |
3043 | 2020-07-20 Jason Merrill <jason@redhat.com> |
3044 | ||
3045 | * pt.c (type_dependent_expression_p): A pseudo-dtor can be | |
3046 | dependent. | |
3047 | * semantics.c (finish_call_expr): Use build_trivial_dtor_call for | |
3048 | pseudo-destructor. | |
3049 | (finish_pseudo_destructor_expr): Leave type NULL for dependent arg. | |
3050 | ||
3051 | 2020-07-20 Jason Merrill <jason@redhat.com> | |
3052 | ||
3053 | * mangle.c (write_base_ref): New. | |
3054 | (write_expression): Use it for base field COMPONENT_REFs. | |
3055 | * pt.c (invalid_tparm_referent_p): Canonicalize the type | |
3056 | of array offsets. Allow subobjects. | |
3057 | ||
3058 | 2020-07-20 Jason Merrill <jason@redhat.com> | |
3059 | ||
3060 | * pt.c (collect_ctor_idx_types): Add 'const' when deducing from | |
3061 | a string constant. | |
3062 | ||
ab660b01 GA |
3063 | 2020-07-17 Marek Polacek <polacek@redhat.com> |
3064 | ||
3065 | PR c++/79815 | |
3066 | * decl.c (grokdeclarator): Detect cv-qual decltype(auto). | |
3067 | * pt.c (do_auto_deduction): Likewise. | |
3068 | ||
96686b3f GA |
3069 | 2020-07-16 Iain Sandoe <iain@sandoe.co.uk> |
3070 | ||
3071 | PR c++/95591 | |
3072 | PR c++/95599 | |
3073 | PR c++/95823 | |
3074 | PR c++/95824 | |
3075 | PR c++/95895 | |
3076 | * coroutines.cc (struct coro_ret_data): Delete. | |
3077 | (coro_maybe_expand_co_return): Delete. | |
3078 | (co_return_expander): Delete. | |
3079 | (expand_co_returns): Delete. | |
3080 | (co_await_find_in_subtree): Remove unused name. | |
3081 | (build_actor_fn): Remove unused parm, remove handling | |
3082 | for co_return expansion. | |
3083 | (register_await_info): Demote duplicate info message to a | |
3084 | warning. | |
3085 | (coro_make_frame_entry): Move closer to use site. | |
3086 | (struct susp_frame_data): Add fields for final suspend label | |
3087 | and a flag to indicate await expressions with initializers. | |
3088 | (captures_temporary): Delete. | |
3089 | (register_awaits): Remove unused code, update comments. | |
3090 | (find_any_await): New. | |
3091 | (tmp_target_expr_p): New. | |
3092 | (struct interesting): New. | |
3093 | (find_interesting_subtree): New. | |
3094 | (struct var_nest_node): New. | |
3095 | (flatten_await_stmt): New. | |
3096 | (handle_nested_conditionals): New. | |
3097 | (process_conditional): New. | |
3098 | (replace_statement_captures): Rename to... | |
3099 | (maybe_promote_temps): ... this. | |
3100 | (maybe_promote_captured_temps): Delete. | |
3101 | (analyze_expression_awaits): Check for await expressions with | |
3102 | initializers. Simplify handling for truth-and/or-if. | |
3103 | (expand_one_truth_if): Simplify (map cases that need expansion | |
3104 | to COND_EXPR). | |
3105 | (await_statement_walker): Handle CO_RETURN_EXPR. Simplify the | |
3106 | handling for truth-and/or-if expressions. | |
3107 | (register_local_var_uses): Ensure that we create names in the | |
3108 | implementation namespace. | |
3109 | (morph_fn_to_coro): Add final suspend label to suspend frame | |
3110 | callback data and remove it from the build_actor_fn call. | |
3111 | ||
3112 | 2020-07-16 Marek Polacek <polacek@redhat.com> | |
3113 | ||
3114 | * call.c (convert_like): Remove macro and introduce a new | |
3115 | wrapper instead. | |
3116 | (convert_like_with_context): Likewise. | |
3117 | (convert_like_real): Rename to convert_like. | |
3118 | (convert_like_real_1): Rename to convert_like_internal. Call | |
3119 | convert_like instead of convert_like_real therein. | |
3120 | (perform_direct_initialization_if_possible): Call convert_like | |
3121 | instead of convert_like_real. | |
3122 | ||
3123 | 2020-07-16 Iain Sandoe <iain@sandoe.co.uk> | |
3124 | ||
3125 | * coroutines.cc: Correct some spelling errors | |
3126 | in comments. | |
3127 | ||
fe8185b5 GA |
3128 | 2020-07-15 Nathan Sidwell <nathan@acm.org> |
3129 | ||
3130 | * parser.c (cp_parser_declaration): Avoid copying tokens. | |
3131 | (cp_parser_block_declaration): RAII token pointer. | |
3132 | ||
3133 | 2020-07-15 Nathan Sidwell <nathan@acm.org> | |
3134 | ||
3135 | * parser.c (cp_parser_skip_to_closing_parenthesis_1): Deal with | |
3136 | meeting a deferred pragma. | |
3137 | (cp_parser_skip_to_end_of_statement): Likewise. | |
3138 | (cp_parser_skip_to_end_of_block_or_statement): Likewise. | |
3139 | (cp_parser_skip_to_pragma_eol): We should never meet EOF. | |
3140 | (cp_parser_omp_declare_simd): Likewise. | |
3141 | (cp_parser_omp_declare_reduction, cp_parser_oacc_routine) | |
3142 | (pragma_lex): Likewise. | |
3143 | ||
8ca07a30 GA |
3144 | 2020-07-14 Marek Polacek <polacek@redhat.com> |
3145 | ||
3146 | PR c++/95789 | |
3147 | PR c++/96104 | |
3148 | PR c++/96179 | |
3149 | * call.c (convert_like_real_1): Renamed from convert_like_real. | |
3150 | (convert_like_real): New wrapper for convert_like_real_1. | |
3151 | ||
3152 | 2020-07-14 Nathan Sidwell <nathan@acm.org> | |
3153 | ||
3154 | * parser.c (cp_lexer_alloc): Do not deal with PCH here. | |
3155 | (cp_lexer_new_main): Deal with PCH here. Store the tokens directly | |
3156 | into the buffer. | |
3157 | (cp_lexer_new_from_tokens): Assert last token isn't purged either. | |
3158 | (cp_lexer_get_preprocessor_token): Change first arg to flags, adjust. | |
3159 | (cp_parser_new): Pass the lexer in, don't create it here. | |
3160 | (cp_parser_translation_unit): Initialize access checks here. | |
3161 | (cp_parser_initial_pragma): First token is provided by caller, | |
3162 | don't deal with PCH stopping here. Adjust error message. | |
3163 | (c_parse_file): Adjust, change error message to avoid C++20 module | |
3164 | confusion. | |
3165 | ||
3166 | 2020-07-14 Nathan Sidwell <nathan@acm.org> | |
3167 | ||
3168 | * ptree.c (cxx_print_type): Add TYPEOF_TYPE and BASES. | |
3169 | ||
3170 | 2020-07-14 Nathan Sidwell <nathan@acm.org> | |
3171 | ||
3172 | * class.c (build_base_field_1): Cache CLASSTYPE_AS_BASE. | |
3173 | (build_self_reference): Rename value -> decl. | |
3174 | (dump_class_hierarchy_1): Cache CLASSTYPE_AS_BASE. | |
3175 | ||
3176 | 2020-07-14 Marek Polacek <polacek@redhat.com> | |
3177 | ||
3178 | PR c++/95820 | |
3179 | * decl.c (grokdeclarator) <case cdk_function>: Check also | |
3180 | pointers/references/... to functions. | |
3181 | ||
3182 | 2020-07-14 Nathan Sidwell <nathan@acm.org> | |
3183 | ||
3184 | * cp-tree.h: Correct some tree lang flag comments, | |
3185 | reformat some structure definitions. Note some structure | |
3186 | sizes. Clarify some comments. | |
3187 | (yyungetc): Delete. Not been a thing for some time. | |
3188 | * class.c (copy_fndecl_with_name): Comment. | |
3189 | (check_bases_and_members): Unnecessary {}. | |
3190 | (layout_class_type): Comment. | |
3191 | * cp-tree.def (UNBOUND_CLASS_TEMPLATE): Adjust comment. | |
3192 | * decl.c: Fix some formatting & whitespace issues. | |
3193 | (function_requirements_equivalent_p): Note why | |
3194 | substitutions are needed. | |
3195 | * decl2.c (no_linkage_error): Note that heroics about | |
3196 | 'typedef struct { ... };' are no longer needed. | |
3197 | * method.c: Whitespace. | |
3198 | * name-lookup.c: Whitespace. | |
3199 | (add_decl_to_level): Reformat a line. | |
3200 | (print_binding_stack): Mark as DEBUG_FUNCTION. | |
3201 | (has_using_namespace_std_directive_p): Delete comment. | |
3202 | * pt.c: Whitespace | |
3203 | * ptree.c: Whitespace. | |
3204 | * rtti.c: Whitespace & comment. | |
3205 | * tree.c: Comment. | |
3206 | * typeck.c (structural_comptypes): Add comment. | |
3207 | ||
ea69fcf9 GA |
3208 | 2020-07-13 Nathan Sidwell <nathan@acm.org> |
3209 | ||
3210 | * Make-lang.in (c++.disclean): Likewise. | |
3211 | ||
3212 | 2020-07-13 Marek Polacek <polacek@redhat.com> | |
3213 | ||
3214 | PR c++/96077 | |
3215 | * parser.c (cp_parser_enum_specifier): Commit to tentative parse | |
3216 | after we've seen an opening brace. | |
3217 | ||
86536295 GA |
3218 | 2020-07-10 Jason Merrill <jason@redhat.com> |
3219 | ||
3220 | * tree.c (structural_type_p): Allow unions. | |
3221 | * mangle.c (write_expression): Express unions with a designator. | |
3222 | ||
3223 | 2020-07-10 Jason Merrill <jason@redhat.com> | |
3224 | ||
3225 | * pt.c (convert_nontype_argument): Handle REAL_TYPE. | |
3226 | (invalid_nontype_parm_type_p): Allow all structural types. | |
3227 | * tree.c (structural_type_p): Use SCALAR_TYPE_P. | |
3228 | ||
3229 | 2020-07-10 Jason Merrill <jason@redhat.com> | |
3230 | ||
3231 | PR c++/96105 | |
3232 | PR c++/96052 | |
3233 | PR c++/95976 | |
3234 | * class.c (check_field_decls): An array of empty classes is not an | |
3235 | empty data member. | |
3236 | (layout_empty_base_or_field): Handle explicit alignment. | |
3237 | Fix union handling. | |
3238 | ||
3f8ca9cb GA |
3239 | 2020-07-09 Julian Brown <julian@codesourcery.com> |
3240 | Thomas Schwinge <thomas@codesourcery.com> | |
3241 | ||
3242 | PR middle-end/95270 | |
3243 | * semantics.c (finish_omp_clauses): Likewise. | |
3244 | ||
3245 | 2020-07-09 Patrick Palka <ppalka@redhat.com> | |
3246 | ||
3247 | PR c++/96132 | |
3248 | * constexpr.c (potential_constant_expression_1) <case PARM_DECL>: | |
3249 | Restore dependent_type_p check that guarded the call to | |
3250 | is_really_empty_class. | |
3251 | ||
50873cc5 GA |
3252 | 2020-07-08 Patrick Palka <ppalka@redhat.com> |
3253 | ||
3254 | PR c++/95497 | |
3255 | * constexpr.c (potential_constant_expression_1) <case PARM_DECL>: | |
3256 | When processing_template_decl, check COMPLETE_TYPE_P before | |
3257 | calling is_really_empty_class. Don't check dependent_type_p. | |
3258 | ||
3259 | 2020-07-08 Marek Polacek <polacek@redhat.com> | |
3260 | ||
3261 | PR c++/96103 | |
3262 | * parser.c (cp_parser_decltype): Print error about using decltype(auto) | |
3263 | in C++11. Check that the token following "auto" is ")". | |
3264 | ||
f60ee68d GA |
3265 | 2020-07-07 Patrick Palka <ppalka@redhat.com> |
3266 | ||
3267 | PR c++/95303 | |
3268 | * cxx-pretty-print.c (pp_cxx_unqualified_id): Check | |
3269 | PRIMARY_TEMPLATE_P before printing the innermost template | |
3270 | arguments. | |
3271 | ||
3272 | 2020-07-07 Martin Sebor <msebor@redhat.com> | |
3273 | ||
3274 | PR c++/96063 | |
3275 | * parser.c (class_decl_loc_t::diag_mismatched_tags): Print notes only | |
3276 | if warning_at returns nonzero. | |
3277 | ||
4077d74c GA |
3278 | 2020-07-06 Martin Sebor <msebor@redhat.com> |
3279 | ||
3280 | PR c++/95984 | |
3281 | * call.c (build_over_call): Check calls only when tf_warning is set. | |
3282 | ||
3283 | 2020-07-06 Nathan Sidwell <nathan@acm.org> | |
3284 | ||
3285 | * decl.c (push_library_fn): Return the decl pushdecl_toplevel returns. | |
3286 | * except.c (verify_library_fn): Replace with ... | |
3287 | (declare_library_fn_1): ... this fn. Always push the fn. | |
3288 | (declare_library_fn): Call it. | |
3289 | (build_throw): Call declare_library_fn_1. | |
3290 | ||
3291 | 2020-07-06 Jonathan Wakely <jwakely@redhat.com> | |
3292 | ||
3293 | PR c++/96068 | |
3294 | * parser.c (cp_parser_toplevel_declaration): Only do pedwarn for | |
3295 | empty-declaration in C++98. | |
3296 | ||
b5f24739 GA |
3297 | 2020-07-02 Jason Merrill <jason@redhat.com> |
3298 | Jakub Jelinek <jakub@redhat.com> | |
3299 | ||
3300 | * decl.c (grokfndecl): Allow consteval virtual. | |
3301 | * search.c (check_final_overrider): Check consteval mismatch. | |
3302 | * constexpr.c (cxx_eval_thunk_call): New. | |
3303 | (cxx_eval_call_expression): Call it. | |
3304 | * cvt.c (cp_get_fndecl_from_callee): Handle FDESC_EXPR. | |
3305 | * decl2.c (mark_vtable_entries): Track vtables with consteval. | |
3306 | (maybe_emit_vtables): Pass consteval_vtables through. | |
3307 | (clear_consteval_vfns): Replace consteval with nullptr. | |
3308 | (c_parse_final_cleanups): Call it. | |
3309 | ||
64f761e4 GA |
3310 | 2020-07-01 Nathan Sidwell <nathan@acm.org> |
3311 | ||
3312 | * class.c (copy_fndecl_with_name): Add additional predicate args, do | |
3313 | not deduce them locally. | |
3314 | (copy_operator_fn): Adjust copy_fndecl_with_name call. | |
3315 | (build_clone): Add vtt and inherited predicate args. Pass through | |
3316 | to copy_fndecl_with_name call. | |
3317 | (build_cdtor_clones): Likewise, pass through to build_clone as | |
3318 | needed. | |
3319 | (build_cdtor): Determine vtt and inherited here. | |
3320 | * cp-tree.h (DECL_NEEDS_CTT_PARM_P): Delete. | |
3321 | ||
46fbb6c6 GA |
3322 | 2020-06-30 Nathan Sidwell <nathan@acm.org> |
3323 | ||
3324 | * cp-tree.h (copy_fndecl_with_name): Rename to ... | |
3325 | (copy_operatorn_fn): ... this. Change arg type. | |
3326 | (clone_function_decl): Rename to ... | |
3327 | (clone_cdtor): ... this. | |
3328 | * class.c (copy_fndecl_with_name): Make static. | |
3329 | (copy_operator_fn): New wrapper. | |
3330 | (build_clones): Rename to ... | |
3331 | (build_cdtor_clones): ... this. | |
3332 | (clone_function_decl): Rename to ... | |
3333 | (clone_cdtor): ... this. Adjust build_clones calls. | |
3334 | (clone_constructors_and_destructors): Adjust clone_function_decl | |
3335 | calls. | |
3336 | * method.c (implicitly_declare_fn): Adjust copy_fndecl_with_name | |
3337 | call. | |
3338 | (lazily_declare_fn): Adjust clone_function_decl call. | |
3339 | * pt.c (tsubst_function_decl): Likewise. | |
3340 | (instantiate_template_1): Likewise. | |
3341 | ||
3342 | 2020-06-30 Iain Sandoe <iain@sandoe.co.uk> | |
3343 | ||
3344 | * coroutines.cc (morph_fn_to_coro): Remove trailing | |
3345 | space in a diagnostic. | |
3346 | ||
458f12ed GA |
3347 | 2020-06-30 Iain Sandoe <iain@sandoe.co.uk> |
3348 | ||
3349 | * coroutines.cc (expand_one_await_expression): Remove | |
3350 | code dealing with initial suspend. | |
3351 | (build_actor_fn): Remove code special-casing initial | |
3352 | and final suspend. Handle the final suspend and marking | |
3353 | of the coroutine as done. | |
3354 | (coro_rewrite_function_body): New. | |
3355 | (bind_expr_find_in_subtree): Remove. | |
3356 | (coro_body_contains_bind_expr_p): Remove. | |
3357 | (morph_fn_to_coro): Split the rewrite of the original | |
3358 | function into coro_rewrite_function_body and call it. | |
3359 | ||
3360 | 2020-06-29 Marek Polacek <polacek@redhat.com> | |
3361 | ||
3362 | PR c++/94553 | |
3363 | * decl.c (duplicate_decls): Make sure a concept or a variable | |
3364 | template is unique in its declarative region. | |
3365 | ||
3366 | 2020-06-29 Marek Polacek <polacek@redhat.com> | |
3367 | ||
3368 | PR c++/95568 | |
3369 | * pt.c (collect_ctor_idx_types): Use TREE_TYPE. | |
3370 | ||
69273534 GA |
3371 | 2020-06-28 Iain Sandoe <iain@sandoe.co.uk> |
3372 | ||
3373 | PR c++/95711 | |
3374 | * coroutines.cc (register_local_var_uses): Skip past | |
3375 | namespace decls. | |
3376 | ||
9a33c41f GA |
3377 | 2020-06-27 Iain Sandoe <iain@sandoe.co.uk> |
3378 | ||
3379 | PR c++/95736 | |
3380 | * coroutines.cc (get_awaitable_var): New helper. | |
3381 | (build_co_await): Check more carefully before | |
3382 | copying an awaitable. | |
3383 | (expand_one_await_expression): No initializer | |
3384 | is required when the awaitable is not a temp. | |
3385 | (register_awaits): Remove handling that is now | |
3386 | completed when the await expression is built. | |
3387 | ||
3388 | 2020-06-27 Iain Sandoe <iain@sandoe.co.uk> | |
3389 | ||
3390 | * coroutines.cc (morph_fn_to_coro): Diagnose unavailable | |
3391 | get_return_object_on_allocation_failure. | |
3392 | ||
c9c05f73 GA |
3393 | 2020-06-26 Iain Sandoe <iain@sandoe.co.uk> |
3394 | ||
3395 | PR c++/95519 | |
3396 | * coroutines.cc (struct coroutine_info):Add a field | |
3397 | to hold computed p.return_void expressions. | |
3398 | (coro_build_promise_expression): New. | |
3399 | (get_coroutine_return_void_expr): New. | |
3400 | (finish_co_yield_expr): Build the promise expression | |
3401 | using coro_build_promise_expression. | |
3402 | (finish_co_return_stmt): Likewise. | |
3403 | (build_init_or_final_await): Likewise. | |
3404 | (morph_fn_to_coro): Likewise, for several cases. | |
3405 | ||
3406 | 2020-06-26 Iain Sandoe <iain@sandoe.co.uk> | |
3407 | ||
3408 | * coroutines.cc (morph_fn_to_coro): Handle error | |
3409 | returns in building g-r-o-o-a-f expressions. | |
3410 | ||
2e546c26 GA |
3411 | 2020-06-24 Nicholas Krause <xerofoify@gmail.com> |
3412 | ||
3413 | PR c++/95672 | |
3414 | * typeck2.c (cxx_incomplete_type_diagnostic): Add missing | |
3415 | TYPE_EXPANSION_PACK check for diagnosing incomplete types in | |
3416 | cxx_incomplete_type_diagnostic. | |
3417 | ||
3418 | 2020-06-24 Iain Sandoe <iain@sandoe.co.uk> | |
3419 | ||
3420 | PR c++/95518 | |
3421 | PR c++/95813 | |
3422 | * coroutines.cc (act_des_fn): Copy function | |
3423 | attributes onto the outlined coroutine helpers. | |
3424 | ||
3425 | 2020-06-24 Jason Merrill <jason@redhat.com> | |
3426 | ||
3427 | * call.c (build_over_call): Only call build_base_path once. | |
3428 | ||
3429 | 2020-06-24 Jason Merrill <jason@redhat.com> | |
3430 | ||
3431 | PR c++/95719 | |
3432 | * call.c (build_over_call): Look up the overrider in base_binfo. | |
3433 | * class.c (lookup_vfn_in_binfo): Look through BINFO_PRIMARY_P. | |
3434 | ||
4543acc8 GA |
3435 | 2020-06-23 Jason Merrill <jason@redhat.com> |
3436 | ||
3437 | PR c++/93976 | |
3438 | Implement C++20 P2082R1, Fixing CTAD for aggregates. | |
3439 | * cp-tree.h (TPARMS_PRIMARY_TEMPLATE): Split out from... | |
3440 | (DECL_PRIMARY_TEMPLATE): ...here. | |
3441 | (builtin_guide_p): Declare. | |
3442 | * decl.c (reshape_init_class): Handle bases of a template. | |
3443 | (reshape_init_r): An array with dependent bound takes a single | |
3444 | initializer. | |
3445 | * pt.c (tsubst_default_argument): Shortcut {}. | |
3446 | (unify_pack_expansion): Allow omitted arguments to trailing pack. | |
3447 | (builtin_guide_p): New. | |
3448 | (collect_ctor_idx_types): Give a trailing pack a {} default | |
3449 | argument. Handle arrays better. | |
3450 | ||
3451 | 2020-06-23 Iain Sandoe <iain@sandoe.co.uk> | |
3452 | ||
3453 | PR c++/95477 | |
3454 | * coroutines.cc (morph_fn_to_coro): Apply a cleanup to | |
3455 | the get return object when the DTOR is non-trivial. | |
3456 | ||
bbac3886 GA |
3457 | 2020-06-20 Iain Sandoe <iain@sandoe.co.uk> |
3458 | ||
3459 | PR c++/95505 | |
3460 | * coroutines.cc (morph_fn_to_coro): Update handling of | |
3461 | get-return-object-on-allocation-fail and diagnose missing | |
3462 | std::nothrow. | |
3463 | ||
3464 | 2020-06-20 Jason Merrill <jason@redhat.com> | |
3465 | ||
3466 | * call.c (joust): Only compare constraints for non-template | |
3467 | candidates with matching parameters. | |
3468 | * pt.c (tsubst_pack_expansion): Fix getting a type parameter | |
3469 | pack. | |
3470 | (more_specialized_fn): Only compare constraints for candidates with | |
3471 | matching parameters. | |
3472 | ||
e37658df GA |
3473 | 2020-06-19 Jason Merrill <jason@redhat.com> |
3474 | ||
3475 | * method.c (early_check_defaulted_comparison): Allow defaulting | |
3476 | comparison outside class. Complain if non-member operator isn't a | |
3477 | friend. | |
3478 | ||
aae80e83 GA |
3479 | 2020-06-18 Jason Merrill <jason@redhat.com> |
3480 | ||
3481 | * method.c (early_check_defaulted_comparison): Check for &&. | |
3482 | (build_comparison_op): Allow empty union. Diagnose non-category | |
3483 | type. | |
3484 | (common_comparison_type): Remove handling for non-category type. | |
3485 | ||
3486 | 2020-06-18 Marek Polacek <polacek@redhat.com> | |
3487 | ||
3488 | PR c++/95735 | |
3489 | * pt.c (finish_template_variable): Return if | |
3490 | coerce_innermost_template_parms return error_mark_node. | |
3491 | ||
3492 | 2020-06-18 Marek Polacek <polacek@redhat.com> | |
3493 | ||
3494 | PR c++/95728 | |
3495 | * pt.c (tsubst_copy_and_build) <case NEW_EXPR>: Return error_mark_node | |
3496 | if placement is erroneous. | |
3497 | ||
aff95ee7 GA |
3498 | 2020-06-17 Jonathan Wakely <jwakely@redhat.com> |
3499 | ||
3500 | PR c++/66159 | |
3501 | * parser.c (cp_parser_elaborated_type_specifier): Do not warn | |
3502 | unless in a declaration. | |
3503 | ||
3504 | 2020-06-17 Jason Merrill <jason@redhat.com> | |
3505 | ||
3506 | * cp-tree.h (copy_fndecl_with_name): Declare. | |
3507 | * class.c (copy_fndecl_with_name): Split out from... | |
3508 | (build_clone): ...here. | |
3509 | (add_implicitly_declared_members): Add op== to TYPE_FIELDS. | |
3510 | * method.c (implicitly_declare_fn): Use copy_fndecl_with_name. | |
3511 | ||
3512 | 2020-06-17 Jason Merrill <jason@redhat.com> | |
3513 | ||
3514 | * call.c (build_new_op_1): Don't look for a CALL_EXPR when | |
3515 | calling a consteval function. | |
3516 | ||
3517 | 2020-06-17 Jason Merrill <jason@redhat.com> | |
3518 | ||
3519 | * decl2.c (grokfield): Pass SD_DEFAULTED and SD_DELETED. | |
3520 | * decl.c (duplicate_decls): Reduce error for delete | |
3521 | after earlier declaration to pedwarn. | |
3522 | ||
3523 | 2020-06-17 Marek Polacek <polacek@redhat.com> | |
3524 | ||
3525 | PR c++/95508 | |
3526 | * constexpr.c (maybe_fold_non_dependent_expr): New. | |
3527 | * cp-tree.h (maybe_fold_non_dependent_expr): Declare. | |
3528 | * typeck.c (cp_build_array_ref): Call maybe_fold_non_dependent_expr | |
3529 | instead of maybe_constant_value. | |
3530 | ||
56638b9b GA |
3531 | 2020-06-16 Marek Polacek <polacek@redhat.com> |
3532 | ||
3533 | PR c++/95369 | |
3534 | * call.c (add_list_candidates): Return if a designated initializer | |
3535 | is used with a non-aggregate. | |
3536 | (implicit_conversion_error): Give an error for the case above. | |
3537 | ||
3538 | 2020-06-16 Marek Polacek <polacek@redhat.com> | |
3539 | ||
3540 | PR c++/95560 | |
3541 | * name-lookup.c (check_local_shadow): Check if types are | |
3542 | non-null before calling same_type_p. | |
3543 | ||
3544 | 2020-06-16 Jakub Jelinek <jakub@redhat.com> | |
3545 | ||
3546 | * semantics.c (handle_omp_for_class_iterator): Adjust | |
3547 | c_omp_check_loop_iv_exprs caller. | |
3548 | (finish_omp_for): Likewise. Don't call fold_build_cleanup_point_expr | |
3549 | before calling c_finish_omp_for and c_omp_check_loop_iv, move it | |
3550 | after those calls. | |
3551 | * pt.c (tsubst_omp_for_iterator): Handle non-rectangular loops. | |
3552 | ||
3553 | 2020-06-16 Jakub Jelinek <jakub@redhat.com> | |
3554 | ||
3555 | * parser.c (cp_parser_omp_clause_schedule): Reject modifier separated | |
3556 | from kind by comma rather than colon. | |
3557 | ||
3558 | 2020-06-16 Patrick Palka <ppalka@redhat.com> | |
3559 | ||
3560 | * pt.c (perform_instantiation_time_access_checks): No need to | |
3561 | tsubst into decl. | |
3562 | * semantics.c (enforce_access): Verify that decl is not | |
3563 | dependent. | |
3564 | ||
3565 | 2020-06-16 Patrick Palka <ppalka@redhat.com> | |
3566 | ||
3567 | PR c++/41437 | |
3568 | PR c++/47346 | |
3569 | * cp-tree.h (qualified_typedef_usage_s): Delete. | |
3570 | (qualified_typedef_usage_t): Delete. | |
3571 | (deferred_access_check): Move up in file. | |
3572 | (tree_template_info::typedefs_needing_access_checking): Delete. | |
3573 | (tree_template_info::deferred_access_checks): New field. | |
3574 | (TI_TYPEDEFS_NEEDING_ACCESS_CHECKING): Rename to ... | |
3575 | (TI_DEFERRED_ACCESS_CHECKS): ... this, and adjust accordingly. | |
3576 | * pt.c (perform_typedefs_access_check): Rename to ... | |
3577 | (perform_instantiation_time_access_checks): ... this, and adjust | |
3578 | accordingly. Remove unnecessary tree tests. | |
3579 | (instantiate_class_template_1): Adjust accordingly. | |
3580 | (instantiate_decl): Likewise. | |
3581 | * semantics.c (enforce_access): Likewise. | |
3582 | ||
3583 | 2020-06-16 Patrick Palka <ppalka@redhat.com> | |
3584 | ||
3585 | PR c++/41437 | |
3586 | PR c++/47346 | |
3587 | * call.c (enforce_access): Move to semantics.c. | |
3588 | * cp-tree.h (enforce_access): Delete. | |
3589 | (get_types_needing_access_check): Delete. | |
3590 | (add_typedef_to_current_template_for_access_check): Delete. | |
3591 | * decl.c (make_typename_type): Adjust accordingly. Use | |
3592 | check_accessibility_of_qualified_id instead of directly using | |
3593 | perform_or_defer_access_check. | |
3594 | * parser.c (cp_parser_template_declaration_after_parameters): | |
3595 | Don't push a dk_no_check access state when parsing a template. | |
3596 | * pt.c (get_types_needing_access_check): Delete. | |
3597 | (append_type_to_template_for_access_check_1): Delete. | |
3598 | (perform_typedefs_access_check): Adjust. If type_decl is a | |
3599 | FIELD_DECL, also check its DECL_CONTEXT for dependence. Use | |
3600 | tsubst_copy instead of tsubst to substitute into type_decl so | |
3601 | that we substitute into the DECL_CONTEXT of a FIELD_DECL. | |
3602 | (append_type_to_template_for_access_check): Delete. | |
3603 | * search.c (accessible_p): Remove the processing_template_decl | |
3604 | early exit. | |
3605 | * semantics.c (enforce_access): Moved from call.c. If we're | |
3606 | parsing a template and the access check failed, add the check to | |
3607 | TI_TYPEDEFS_NEEDING_ACCESS_CHECKING. | |
3608 | (perform_or_defer_access_check): Adjust comment. | |
3609 | (add_typedef_to_current_template_for_access_check): Delete. | |
3610 | (check_accessibility_of_qualified_id): Adjust accordingly. | |
3611 | Exit early if the scope is dependent. | |
3612 | ||
e68e80c8 GA |
3613 | 2020-06-11 Patrick Palka <ppalka@redhat.com> |
3614 | ||
3615 | PR c++/93467 | |
3616 | * constraint.cc (associate_classtype_constraints): If there is a | |
3617 | discrepancy between the current template depth and the template | |
3618 | depth of the original declaration, then adjust the template | |
3619 | parameter depth within the current constraints appropriately. | |
3620 | * pt.c (tsubst_friend_class): Substitute into and set the | |
3621 | constraints on the injected declaration. | |
3622 | ||
3623 | 2020-06-11 Iain Sandoe <iain@sandoe.co.uk> | |
3624 | ||
3625 | * coroutines.cc (instantiate_coro_traits): Pass a reference | |
3626 | to lambda closure objects to traits instantiation. | |
3627 | (morph_fn_to_coro): Likewise for promise parameter | |
3628 | preview and allocator lookup. | |
3629 | ||
ec6ffbb9 GA |
3630 | 2020-06-10 Iain Sandoe <iain@sandoe.co.uk> |
3631 | ||
3632 | PR c++/95440 | |
3633 | * call.c (add_candidates): Use vec_safe_length() for | |
3634 | testing the arguments list. | |
3635 | (build_new_method_call_1): Use vec_safe_is_empty() when | |
3636 | checking for an empty args list. | |
3637 | ||
3638 | 2020-06-10 Marek Polacek <polacek@redhat.com> | |
3639 | ||
3640 | PR c++/95562 | |
3641 | * parser.c (cp_parser_direct_declarator): Clear | |
3642 | CP_PARSER_FLAGS_DELAY_NOEXCEPT if the declarator kind is not | |
3643 | cdk_id. | |
3644 | ||
b952c2cf GA |
3645 | 2020-06-09 Iain Sandoe <iain@sandoe.co.uk> |
3646 | ||
3647 | PR c++/95137 | |
3648 | * coroutines.cc (expand_one_await_expression): Build separate | |
3649 | DTOR trees for the awaitable object on the destroy and resume | |
3650 | paths. | |
3651 | ||
3652 | 2020-06-09 Jason Merrill <jason@redhat.com> | |
3653 | ||
3654 | PR c++/95552 | |
3655 | * cp-gimplify.c (predeclare_vla): Only predeclare a VLA if it's | |
3656 | wrapped in a pointer type. | |
3657 | ||
1a59f3db GA |
3658 | 2020-06-05 Marek Polacek <polacek@redhat.com> |
3659 | ||
3660 | PR c++/95369 | |
3661 | * call.c (build_converted_constant_expr_internal): Allow | |
3662 | list-initialization. | |
3663 | ||
3664 | 2020-06-05 Iain Sandoe <iain@sandoe.co.uk> | |
3665 | ||
3666 | * cp-tree.def (CO_RETURN_EXPR): Correct the class | |
3667 | to use tcc_statement. | |
3668 | ||
3669 | 2020-06-05 Jason Merrill <jason@redhat.com> | |
3670 | ||
3671 | * error.c (dump_binary_op): Handle negative operand to | |
3672 | POINTER_PLUS_EXPR. | |
3673 | ||
3add3425 GA |
3674 | 2020-06-04 Jason Merrill <jason@redhat.com> |
3675 | ||
3676 | PR c++/93310 | |
3677 | * constexpr.c (cxx_eval_constant_expression) [OBJ_TYPE_REF]: | |
3678 | Evaluate OBJ_TYPE_REF_EXPR. | |
3679 | ||
3680 | 2020-06-04 Jason Merrill <jason@redhat.com> | |
3681 | ||
3682 | PR c++/95158 | |
3683 | * class.c (lookup_vfn_in_binfo): New. | |
3684 | * call.c (build_over_call): Use it. | |
3685 | * cp-tree.h (resolves_to_fixed_type_p): Add default argument. | |
3686 | (lookup_vfn_in_binfo): Declare. | |
3687 | ||
3688 | 2020-06-04 Iain Sandoe <iain@sandoe.co.uk> | |
3689 | ||
3690 | PR c++/95346 | |
3691 | * coroutines.cc (morph_fn_to_coro): Ensure that the get- | |
3692 | return-object is constructed correctly; When it is not the | |
3693 | final return value, pass it to the CTOR of the return type | |
3694 | as an rvalue, per the standard comment. | |
3695 | ||
3696 | 2020-06-04 Jakub Jelinek <jakub@redhat.com> | |
3697 | ||
3698 | PR c++/82304 | |
3699 | PR c++/95307 | |
3700 | * constexpr.c (cxx_eval_constant_expression): Diagnose CONVERT_EXPR | |
3701 | conversions from pointer types to arithmetic types here... | |
3702 | (cxx_eval_outermost_constant_expr): ... instead of here. | |
3703 | ||
9a5b7438 GA |
3704 | 2020-06-03 Mark Wielaard <mark@klomp.org> |
3705 | ||
3706 | * parser.c (cp_lexer_safe_previous_token): New function. | |
3707 | (cp_parser_error_1): Add name_hint if the previous token is | |
3708 | a string literal and next token is a CPP_NAME and we have a | |
3709 | missing header suggestion for the name. | |
3710 | ||
3711 | 2020-06-03 Patrick Palka <ppalka@redhat.com> | |
3712 | ||
3713 | * pt.c (process_partial_specialization): Pass the full set of | |
3714 | generic template arguments to strictly_subsumes. | |
3715 | ||
3716 | 2020-06-03 Patrick Palka <ppalka@redhat.com> | |
3717 | ||
3718 | PR c++/92103 | |
3719 | * pt.c (most_specialized_partial_spec): Reorganize the loop over | |
3720 | DECL_TEMPLATE_SPECIALIZATIONS. Check constraints_satisfied_p on | |
3721 | the original template declaration, not on the tsubsted one. | |
3722 | ||
3723 | 2020-06-03 Iain Sandoe <iain@sandoe.co.uk> | |
3724 | ||
3725 | PR c++/95345 | |
3726 | * coroutines.cc (finish_co_await_expr): Revise to allow for | |
3727 | parameter packs. | |
3728 | (finish_co_yield_expr): Likewise. | |
3729 | ||
3730 | 2020-06-03 Jason Merrill <jason@redhat.com> | |
3731 | ||
3732 | PR c++/95232 | |
3733 | * cp-tree.h (predeclare_vla): Declare. | |
3734 | * cp-gimplify.c (predeclare_vla): Handle getting a decl. | |
3735 | * pt.c (tsubst_expr) [DECL_EXPR]: Use it. | |
3736 | ||
3737 | 2020-06-03 Tobias Burnus <tobias@codesourcery.com> | |
3738 | ||
3739 | * cp-gimplify.c (cxx_omp_predetermined_mapping): New. | |
3740 | * cp-objcp-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redfine. | |
3741 | * cp-tree.h (cxx_omp_predetermined_mapping): Declare. | |
3742 | ||
a9312a79 GA |
3743 | 2020-06-02 Jason Merrill <jason@redhat.com> |
3744 | ||
3745 | PR c++/95193 | |
3746 | * pt.c (tsubst_decl): Relax assert. | |
3747 | ||
3748 | 2020-06-02 Iain Sandoe <iain@sandoe.co.uk> | |
3749 | ||
3750 | PR c++/95050 | |
3751 | * coroutines.cc (build_co_await): Wrap the co_await expression | |
3752 | in a TARGET_EXPR, where needed. | |
3753 | (finish_co_yield_expr): Likewise. | |
3754 | ||
3755 | 2020-06-02 Patrick Palka <ppalka@redhat.com> | |
3756 | ||
3757 | PR c++/92633 | |
3758 | PR c++/92838 | |
3759 | * pt.c (tsubst_function_decl): Don't do set_constraints when | |
3760 | regenerating a lambda. | |
3761 | (tsubst_lambda_expr): Substitute into the lambda's constraints | |
3762 | and do set_constraints here. | |
3763 | ||
4a9aa9de GA |
3764 | 2020-06-01 Jason Merrill <jason@redhat.com> |
3765 | ||
3766 | PR c++/95466 | |
3767 | PR c++/95311 | |
3768 | PR c++/95221 | |
3769 | * class.c (build_vfn_ref): Revert 95311 change. | |
3770 | * cp-ubsan.c (cp_ubsan_maybe_instrument_member_call): Build a | |
3771 | COMPOUND_EXPR. | |
3772 | ||
3773 | 2020-06-01 Iain Sandoe <iain@sandoe.co.uk> | |
3774 | ||
3775 | PR c++/95350 | |
3776 | * coroutines.cc (struct param_info): Remove rv_ref field. | |
3777 | (build_actor_fn): Remove specifial rvalue ref handling. | |
3778 | (morph_fn_to_coro): Likewise. | |
3779 | ||
e7340ed7 GA |
3780 | 2020-05-31 Iain Sandoe <iain@sandoe.co.uk> |
3781 | ||
3782 | PR c++/95087 | |
3783 | * coroutines.cc (morph_fn_to_coro): If we see an | |
3784 | early fatal error, drop the erroneous function body. | |
3785 | ||
3786 | 2020-05-31 Iain Sandoe <iain@sandoe.co.uk> | |
3787 | ||
3788 | * coroutines.cc (build_co_await): Remove unused | |
3789 | variable. | |
3790 | (finish_co_await_expr): Likewise. | |
3791 | (finish_co_yield_expr): Likewise; revise comment. | |
3792 | ||
945b53cc GA |
3793 | 2020-05-30 Iain Sandoe <iain@sandoe.co.uk> |
3794 | ||
3795 | * coroutines.cc (morph_fn_to_coro): Revise initialization | |
3796 | of the frame pointer to avoid an unused value. | |
3797 | ||
3798 | 2020-05-30 Patrick Palka <ppalka@redhat.com> | |
3799 | ||
3800 | PR c++/95386 | |
3801 | * constraint.cc (satisfaction_value): Accept INTEGER_CST of any | |
3802 | boolean type. | |
3803 | ||
885ef72f GA |
3804 | 2020-05-29 Patrick Palka <ppalka@redhat.com> |
3805 | Jason Merrill <jason@redhat.com> | |
3806 | ||
3807 | PR c++/95181 | |
3808 | * class.c (add_method): Let special member function templates | |
3809 | coexist if they are not equivalently constrained, or in a class | |
3810 | template. | |
3811 | ||
3812 | 2020-05-29 Jason Merrill <jason@redhat.com> | |
3813 | ||
3814 | PR c++/95371 | |
3815 | * pt.c (process_template_parm): Set DECL_TEMPLATE_INFO | |
3816 | on the DECL_TEMPLATE_RESULT. | |
3817 | ||
3818 | 2020-05-29 Marek Polacek <polacek@redhat.com> | |
3819 | ||
3820 | PR c++/95344 | |
3821 | * cp-gimplify.c (cp_fold) <case MODIFY_EXPR>: Don't set | |
3822 | TREE_THIS_VOLATILE here. | |
3823 | (cp_fold): Set it here along with TREE_NO_WARNING. | |
3824 | ||
3825 | 2020-05-29 Jason Merrill <jason@redhat.com> | |
3826 | ||
3827 | PR c++/95311 | |
3828 | PR c++/95221 | |
3829 | * class.c (build_vfn_ref): Don't fold the INDIRECT_REF. | |
3830 | ||
3831 | 2020-05-29 Patrick Palka <ppalka@redhat.com> | |
3832 | ||
3833 | PR c++/92652 | |
3834 | PR c++/93698 | |
3835 | PR c++/94128 | |
3836 | * parser.c (cp_parser_requires_clause_expression): Temporarily | |
3837 | increment processing_template_decl only if it is 0. | |
3838 | (cp_parser_constraint_expression): Likewise. | |
3839 | (cp_parser_requires_expression): Likewise. | |
3840 | ||
3841 | 2020-05-29 Patrick Palka <ppalka@redhat.com> | |
3842 | ||
3843 | PR c++/95241 | |
3844 | * constexpr.c (get_or_insert_ctor_field): Add limited support | |
3845 | for RANGE_EXPR index lookups. | |
3846 | ||
53ffb43a GA |
3847 | 2020-05-28 Jakub Jelinek <jakub@redhat.com> |
3848 | ||
3849 | PR c++/95328 | |
3850 | * decl.c (cp_finish_decomp): Call complete_type before checking | |
3851 | COMPLETE_TYPE_P. | |
3852 | ||
3853 | 2020-05-28 Jason Merrill <jason@redhat.com> | |
3854 | ||
3855 | PR c++/94926 | |
3856 | * decl.c (cp_finish_decl): Revert r9-297 change. | |
3857 | (check_static_variable_definition): Likewise. | |
3858 | * constexpr.c (ensure_literal_type_for_constexpr_object): Likewise. | |
3859 | * pt.c (instantiate_decl): Return early on type error. | |
3860 | ||
61f3b605 GA |
3861 | 2020-05-27 Jason Merrill <jason@redhat.com> |
3862 | ||
3863 | PR c++/95319 | |
3864 | * decl.c (reshape_init_array_1): Don't reuse in overload context. | |
3865 | ||
3866 | 2020-05-27 Jason Merrill <jason@redhat.com> | |
3867 | ||
931fdcc5 | 3868 | PR c++/95242 |
61f3b605 GA |
3869 | * call.c (build_new_op_1): Suppress |
3870 | warn_zero_as_null_pointer_constant across comparison of <=> result | |
3871 | to 0. | |
3872 | ||
3873 | 2020-05-27 Jason Merrill <jason@redhat.com> | |
3874 | ||
3875 | PR c++/95222 | |
3876 | * decl.c (grokdeclarator): Don't shift attributes in TYPENAME | |
3877 | context. | |
3878 | ||
3879 | 2020-05-27 Nathan Sidwell <nathan@acm.org> | |
3880 | ||
3881 | PR c++/95263 | |
3882 | * pt.c (lookup_template_class_1): Restore alias template mutation. | |
3883 | ||
c3a4169b GA |
3884 | 2020-05-26 Jakub Jelinek <jakub@redhat.com> |
3885 | ||
3886 | PR c++/95197 | |
3887 | * cp-gimplify.c: Include omp-general.h. | |
3888 | (cp_genericize_r) <case OMP_DISTRIBUTE>: For class iteration | |
3889 | variables in composite distribute parallel for, instantiate copy | |
3890 | ctor of their types. | |
3891 | ||
6d1556ec PP |
3892 | 2020-05-23 Patrick Palka <ppalka@redhat.com> |
3893 | ||
3894 | PR c++/94038 | |
3895 | * constexpr.c (cxx_eval_constant_expression) | |
3896 | <case TEMPLATE_ID_EXPR>: Don't evaluate the concept when | |
3897 | constexpr evaluation is uid-sensitive. | |
3898 | ||
931fdcc5 JM |
3899 | 2020-05-22 Jason Merrill <jason@redhat.com> |
3900 | ||
3901 | * cp-gimplify.c (cp_gimplify_expr) [CALL_EXPR]: Don't preevaluate | |
3902 | the function address if the call used operator syntax. | |
3903 | ||
3904 | 2020-05-21 Jason Merrill <jason@redhat.com> | |
3905 | ||
3906 | PR c++/95221 | |
3907 | * cp-ubsan.c (cp_ubsan_maybe_instrument_member_call): For a virtual | |
3908 | call, instrument the OBJ_TYPE_REF. | |
3909 | ||
3910 | * decl.c (compute_array_index_type_loc): Diagnose expressions | |
3911 | in a template that can't be constant. | |
3912 | * parser.c (cp_parser_direct_declarator): Don't check | |
3913 | non-constant array bounds here. | |
3914 | ||
3915 | * cp-tree.h (is_rvalue_constant_expression): Declare. | |
3916 | * constexpr.c (is_rvalue_constant_expression): New. | |
3917 | * parser.c (cp_parser_constant_expression): Use it. | |
3918 | * decl.c (cp_finish_decl): Try to treat a constexpr initializer in a | |
3919 | template as constant. | |
3920 | ||
3921 | * typeck.c (build_x_modify_expr): Handle error_mark_node arguments. | |
3922 | ||
3923 | * decl.c (grokparms): Return NULL_TREE if any parms were erroneous. | |
3924 | ||
3925 | 2020-05-21 Iain Sandoe <iain@sandoe.co.uk> | |
3926 | ||
3927 | * coroutines.cc (finish_co_return_stmt): Revert change to use | |
3928 | finish_expr_stmt. | |
3929 | ||
f65a3299 PP |
3930 | 2020-05-21 Patrick Palka <ppalka@redhat.com> |
3931 | ||
3932 | PR c++/94038 | |
3933 | * constexpr.c (constexpr_ctx::uid_sensitive): Remove field. | |
3934 | (uid_sensitive_constexpr_evaluation_value): Define. | |
3935 | (uid_sensitive_constexpr_evaluation_true_counter): Define. | |
3936 | (uid_sensitive_constexpr_evaluation_p): Define. | |
3937 | (uid_sensitive_constexpr_evaluation_sentinel): Define its | |
3938 | constructor. | |
3939 | (uid_sensitive_constexpr_evaluation_checker): Define its | |
3940 | constructor and its evaluation_restricted_p method. | |
3941 | (get_fundef_copy): Remove 'ctx' parameter. Use u_s_c_e_p | |
3942 | instead of constexpr_ctx::uid_sensitive. | |
3943 | (cxx_eval_call_expression): Use u_s_c_e_p instead, and test it | |
3944 | last. Adjust call to get_fundef_copy. | |
3945 | (instantiate_cx_fn_r): Test u_s_c_e_p so that we increment the | |
3946 | counter if necessary. | |
3947 | (cxx_eval_outermost_constant_expr): Remove 'uid_sensitive' | |
3948 | parameter. Adjust function body accordingly. | |
3949 | (maybe_constant_value): Remove 'uid_sensitive' parameter and | |
3950 | adjust function body accordingly. Set up a | |
3951 | uid_sensitive_constexpr_evaluation_checker, and use it to | |
3952 | conditionally update the cv_cache. | |
3953 | * cp-gimplify.c (cp_fold): Set up a | |
3954 | uid_sensitive_constexpr_evaluation_checker, and use it to | |
3955 | conditionally update the fold_cache. | |
3956 | * cp-tree.h (maybe_constant_value): Update declaration. | |
3957 | (struct uid_sensitive_constexpr_evaluation_sentinel): Define. | |
3958 | (struct sensitive_constexpr_evaluation_checker): Define. | |
3959 | * expr.c (fold_for_warn): Set up a | |
3960 | uid_sensitive_constexpr_evaluation_sentinel before calling | |
3961 | the folding subroutines. Drop all but the first argument to | |
3962 | maybe_constant_value. | |
3963 | ||
4b38d56d MP |
3964 | 2020-05-20 Marek Polacek <polacek@redhat.com> |
3965 | ||
3966 | DR 2237 | |
3967 | * parser.c (cp_parser_unqualified_id): Reject simple-template-id as | |
3968 | the declarator-id of a destructor. | |
3969 | (cp_parser_constructor_declarator_p): Reject simple-template-id as | |
3970 | the declarator-id of a constructor. | |
3971 | ||
2a8565fa MP |
3972 | 2020-05-20 Marek Polacek <polacek@redhat.com> |
3973 | ||
3974 | DR 2289 | |
3975 | PR c++/94553 | |
3976 | * cp-tree.h (SD_DECOMPOSITION): New flag. | |
3977 | * decl.c (duplicate_decls): Make sure a structured binding is unique | |
3978 | in its declarative region. | |
3979 | (start_decl): If INITIALIZED is SD_DECOMPOSITION, call | |
3980 | fit_decomposition_lang_decl. | |
3981 | (grokdeclarator): Compare INITIALIZED directly to SD_* flags. | |
3982 | * parser.c (cp_parser_decomposition_declaration): Pass SD_DECOMPOSITION | |
3983 | to start_decl. | |
3984 | ||
610ae2db PP |
3985 | 2020-05-20 Patrick Palka <ppalka@redhat.com> |
3986 | ||
3987 | PR c++/95223 | |
3988 | * typeck.c (structural_comptypes): Don't perform | |
3989 | context-dependent resolution of TYPENAME_TYPEs when | |
3990 | comparing_specializations. | |
3991 | ||
74744bb1 NS |
3992 | 2020-05-19 Nathan Sidwell <nathan@acm.org> |
3993 | ||
3994 | * pt.c (lookup_template_class_1): Do not reinit template_info of an | |
3995 | alias here. | |
3996 | ||
c0d8623c MS |
3997 | 2020-05-18 Martin Sebor <msebor@redhat.com> |
3998 | ||
3999 | PR c++/94923 | |
4000 | * call.c ((maybe_warn_class_memaccess): Use is_byte_access_type. | |
4001 | * cp-tree.h (is_dummy_object): Return bool. | |
4002 | (is_byte_access_type): Declare new function. | |
4003 | * tree.c (is_dummy_object): Return bool. | |
4004 | (is_byte_access_type): Define new function. | |
4005 | ||
864fed4a PP |
4006 | 2020-05-19 Patrick Palka <ppalka@redhat.com> |
4007 | ||
573e5f05 PP |
4008 | PR c++/87847 |
4009 | * pt.c (init_template_processing): Enable sanitization for | |
4010 | decl_specializations and type_specializations. | |
4011 | ||
864fed4a PP |
4012 | PR c++/66439 |
4013 | * pt.c (fn_type_unification): Pass 'fn' instead of NULL_TREE as | |
4014 | the 'in_decl' parameter to coerce_template_parms. | |
4015 | ||
2d4e1e14 MP |
4016 | 2020-05-18 Marek Polacek <polacek@redhat.com> |
4017 | ||
4018 | PR c++/94955 | |
4019 | * typeck.c (cp_build_binary_op): Use fold_for_warn instead of | |
4020 | cp_fold_rvalue. | |
4021 | ||
bf732686 MP |
4022 | 2020-05-18 Marek Polacek <polacek@redhat.com> |
4023 | ||
4024 | PR c++/94937 | |
4025 | * cvt.c (cp_get_fndecl_from_callee): Return NULL_TREE if the function | |
4026 | type is not INDIRECT_TYPE_P. | |
4027 | * decl.c (omp_declare_variant_finalize_one): Call | |
4028 | cp_get_callee_fndecl_nofold instead of looking for the function decl | |
4029 | manually. | |
4030 | ||
5d2246a3 MP |
4031 | 2020-05-18 Marek Polacek <polacek@redhat.com> |
4032 | ||
4033 | PR c++/90915 | |
4034 | * parser.c (cp_parser_has_attribute_expression): Sorry on a | |
4035 | type-dependent argument. | |
4036 | ||
ae8ed736 MP |
4037 | 2020-05-18 Marek Polacek <polacek@redhat.com> |
4038 | ||
4039 | DR 1512 | |
4040 | PR c++/87699 | |
4041 | * call.c (add_builtin_candidate) <case EQ_EXPR>: Create candidate | |
4042 | operator functions when type is std::nullptr_t for ==/!=. | |
4043 | * typeck.c (composite_pointer_type_r): Add a bool * parameter. Use it | |
4044 | to maybe add "const" to the pointer type. | |
4045 | (composite_pointer_type): Update the call to composite_pointer_type_r. | |
4046 | (cp_build_binary_op): Turn two warning_at into error_at. Print the | |
4047 | types. | |
4048 | ||
29579071 JM |
4049 | 2020-05-18 Jason Merrill <jason@redhat.com> |
4050 | ||
4051 | * call.c (build_over_call): Remove unnecessary | |
4052 | cp_stabilize_reference. | |
4053 | ||
100fdb1f MP |
4054 | 2020-05-18 Marek Polacek <polacek@redhat.com> |
4055 | ||
4056 | * call.c (add_builtin_candidate): Don't create a builtin overload | |
4057 | candidate for ++ when type is bool in C++17. | |
4058 | ||
4059 | 2020-05-18 Marek Polacek <polacek@redhat.com> | |
642dc602 MP |
4060 | |
4061 | * cfns.h: Regenerated. | |
4062 | ||
2b9a271b IS |
4063 | 2020-05-17 Iain Sandoe <iain@sandoe.co.uk> |
4064 | ||
4065 | * coroutines.cc (morph_fn_to_coro): Initialize the gro variable. | |
4066 | ||
5ef067eb IS |
4067 | 2020-05-16 Iain Sandoe <iain@sandoe.co.uk> |
4068 | ||
4069 | * coroutines.cc (finish_co_return_stmt): Implement rules | |
4070 | from [class.copy.elision] /3. | |
4071 | ||
115232b7 PP |
4072 | 2020-05-16 Patrick Palka <ppalka@redhat.com> |
4073 | ||
4074 | PR c++/57943 | |
4075 | * semantics.c (finish_decltype_type): Call | |
4076 | instantiate_non_dependent_expr_sfinae on the expression. | |
4077 | ||
289fbbe7 PP |
4078 | 2020-05-15 Patrick Palka <ppalka@redhat.com> |
4079 | ||
4080 | Revert: | |
4081 | ||
4082 | 2020-04-07 Patrick Palka <ppalka@redhat.com> | |
4083 | ||
4084 | PR c++/90996 | |
4085 | * typeck2.c (process_init_constructor_array): Propagate | |
4086 | CONSTRUCTOR_PLACEHOLDER_BOUNDARY up from each element initializer to | |
4087 | the array initializer. | |
4088 | ||
cda6396a JM |
4089 | 2020-05-15 Jason Merrill <jason@redhat.com> |
4090 | ||
4091 | PR c++/93286 - ICE with __is_constructible and variadic template. | |
4092 | * pt.c (tsubst_tree_list): New. | |
4093 | (tsubst, tsubst_copy_and_build): Use it. | |
4094 | * decl2.c (is_late_template_attribute): Handle error_mark_node args. | |
4095 | ||
271e3da8 NS |
4096 | 2020-05-15 Nathan Sidwell <nathan@acm.org> |
4097 | ||
4098 | * pt.c (template_args_equal): Fix thinkos in previous 'cleanup'. | |
4099 | ||
4e1592f8 JM |
4100 | 2020-05-14 Jason Merrill <jason@redhat.com> |
4101 | ||
4102 | PR c++/93901 | |
4103 | * pt.c (maybe_instantiate_noexcept): Change clone handling. | |
4104 | ||
098cf31a PP |
4105 | 2020-05-14 Patrick Palka <ppalka@redhat.com> |
4106 | ||
4107 | PR c++/78446 | |
4108 | * call.c (build_op_call): Pass complain to lookup_fnfields. | |
4109 | (build_special_member_call): Likewise. | |
4110 | * class.c (type_requires_array_cookie): Pass tf_warning_or_error | |
4111 | to lookup_fnfields. | |
4112 | * cp-tree.h (lookup_fnfields): Add tsubst_flags_t parameter. | |
4113 | * except.c (build_throw): Pass tf_warning_or_error to | |
4114 | lookup_fnfields. | |
4115 | * init.c (build_new_1): Pass complain to lookup_fnfields. | |
4116 | * method.c (locate_fn_flags): Likewise. | |
4117 | * name-lookup.c (lookup_name_real_1): Pass tf_warning_or_error | |
4118 | to lookup_fnfields. | |
4119 | * pt.c (tsubst_baselink): Pass complain to lookup_fnfields. | |
4120 | * search.c (lookup_fnfields): New 'complain' parameter. Pass it | |
4121 | to lookup_member. | |
4122 | ||
c4bff4c2 NS |
4123 | 2020-05-14 Nathan Sidwell <nathan@acm.org> |
4124 | ||
68f1d74f NS |
4125 | * parser.c (cp_parser_diagnose_invalid_typename): Mention |
4126 | std=c++20 not 2a, reformat dependent binfo inform loops. | |
4127 | ||
f497e36a NS |
4128 | * pt.c (tsubst_template_decl): Reorder and commonize some control |
4129 | paths. | |
4130 | ||
ddbaab13 NS |
4131 | * pt.c (tsubst_friend_function): Simplify control flow. |
4132 | ||
ea5a33d4 NS |
4133 | * pt.c (lookup_template_class_1): Remove unnecessary else by |
4134 | simply grabbing TYPE_NAME earlier. | |
4135 | ||
5adbd090 NS |
4136 | * pt.c (push_template_decl_real): Adjust friend pushing logic. |
4137 | Reinit template type. | |
4138 | ||
c4bff4c2 NS |
4139 | * pt.c (build_template_decl): Init DECL_TEMPLATE_RESULT & |
4140 | TREE_TYPE here ... | |
4141 | (process_partial_specialization): ... not here ... | |
4142 | (push_template_decl_real, add_inherited_template_parms) | |
4143 | (build_deduction_guide): ... or here. | |
4144 | ||
49ddde69 JJ |
4145 | 2020-05-14 Jakub Jelinek <jakub@redhat.com> |
4146 | ||
4147 | * cp-gimplify.c (cp_genericize_r): Set cfun->has_omp_target. | |
4148 | ||
4924293a PP |
4149 | 2020-05-13 Patrick Palka <ppalka@redhat.com> |
4150 | ||
4151 | PR c++/79706 | |
4152 | * init.c (build_vec_delete_1): Just return error_mark_node if | |
4153 | deallocate_expr is error_mark_node. | |
4154 | (build_delete): Just return error_mark_node if do_delete is | |
4155 | error_mark_node. | |
4156 | ||
7e52f8b1 PP |
4157 | 2020-05-13 Patrick Palka <ppalka@redhat.com> |
4158 | ||
4159 | PR c++/95020 | |
e12516e1 | 4160 | * constraint.cc (tsubst_requires_expr): Produce a new |
7e52f8b1 PP |
4161 | requires-expression when processing_template_decl, even if |
4162 | template arguments are not dependent. | |
4163 | ||
661232da MP |
4164 | 2020-05-13 Marek Polacek <polacek@redhat.com> |
4165 | ||
4166 | PR c++/95066 | |
4167 | * decl.c (duplicate_decls): Set DECL_HAS_DEPENDENT_EXPLICIT_SPEC_P. | |
4168 | ||
7e6a72cb NS |
4169 | 2020-05-13 Nathan Sidwell <nathan@acm.org> |
4170 | ||
7040894c NS |
4171 | * pt.c (template_args_equal): Reorder category checking for |
4172 | clarity. | |
4173 | ||
2bb30de6 NS |
4174 | * pt.c (perform_typedefs_access_check): Cache expensively |
4175 | calculated object references. | |
4176 | (check_auto_in_tmpl_args): Just assert we do not get unexpected | |
4177 | nodes, rather than silently do nothing. | |
4178 | (append_type_to_template_for_access): Likewise, cache expensie | |
4179 | object reference. | |
4180 | ||
833c7b4b NS |
4181 | * pt.c (canonical_type_parameter): Simplify. |
4182 | ||
7e6a72cb NS |
4183 | Formatting fixups & some simplifications. |
4184 | * pt.c (spec_hash_table): New typedef. | |
4185 | (decl_specializations, type_specializations): Use it. | |
4186 | (retrieve_specialization): Likewise. | |
4187 | (register_specialization): Remove unnecessary casts. | |
4188 | (push_template_decl_real): Reformat. | |
4189 | (instantiate_class_template_1): Use more RAII. | |
4190 | (make_argument_pack): Simplify. | |
4191 | (instantiate_template_1): Use gcc_checking_assert for expensive | |
4192 | asserts. | |
4193 | (instantiate_decl): Likewise. | |
4194 | (resolve_typename_type): Reformat comment. | |
4195 | * semantics.c (struct deferred_access): Remove unnecessary GTY on | |
4196 | member. | |
4197 | (begin_class_definition): Fix formatting. | |
4198 | ||
b04445d4 JM |
4199 | 2020-05-13 Jason Merrill <jason@redhat.com> |
4200 | ||
4201 | * call.c, class.c, constexpr.c, constraint.cc, decl.c, init.c, | |
4202 | lambda.c, lex.c, method.c, name-lookup.c, parser.c, pt.c, tree.c, | |
4203 | typeck2.c: Change cxx2a to cxx20. | |
4204 | ||
90b160f8 MP |
4205 | 2020-05-12 Marek Polacek <polacek@redhat.com> |
4206 | ||
4207 | PR c++/95074 | |
4208 | * parser.c (cp_parser_postfix_expression) <case CPP_OPEN_PAREN>: When | |
4209 | looking for a block-scope function declaration, look through the whole | |
4210 | set, not just the first function in the overload set. | |
4211 | ||
99b0c9ec JJ |
4212 | 2020-05-12 Jakub Jelinek <jakub@redhat.com> |
4213 | ||
4214 | PR c++/95063 | |
4215 | * pt.c (tsubst_decl): Deal with DECL_OMP_PRIVATIZED_MEMBER for | |
4216 | a bit-field. | |
4217 | ||
52c5933f JM |
4218 | 2020-05-11 Jason Merrill <jason@redhat.com> |
4219 | ||
4220 | Resolve C++20 NB comment CA104 | |
4221 | * pt.c (determine_specialization): Compare constraints for | |
4222 | specialization of member template of class instantiation. | |
4223 | ||
0f50f6da JM |
4224 | 2020-05-11 Jason Merrill <jason@redhat.com> |
4225 | ||
4226 | PR c++/92583 | |
4227 | PR c++/92654 | |
4228 | * tree.c (cp_walk_subtrees): Stop at typedefs. | |
4229 | Handle TYPENAME_TYPE here. | |
4230 | * pt.c (find_parameter_packs_r): Not here. | |
4231 | (for_each_template_parm_r): Clear *walk_subtrees. | |
4232 | * decl2.c (min_vis_r): Look through typedefs. | |
4233 | ||
42e9f80b JM |
4234 | 2020-05-11 Jason Merrill <jason@redhat.com> |
4235 | ||
4236 | * call.c (implicit_conversion_error): Split out from... | |
4237 | (perform_implicit_conversion_flags): ...here. | |
4238 | (build_converted_constant_expr_internal): Use it. | |
4239 | ||
f981395c JM |
4240 | 2020-05-11 Jason Merrill <jason@redhat.com> |
4241 | ||
4242 | PR c++/90748 | |
4243 | * parser.c (inject_parm_decls): Set current_class_ptr here. | |
4244 | (cp_parser_direct_declarator): And here. | |
4245 | (cp_parser_late_return_type_opt): Not here. | |
4246 | (cp_parser_noexcept_specification_opt): Nor here. | |
4247 | (cp_parser_exception_specification_opt) | |
4248 | (cp_parser_late_noexcept_specifier): Remove unneeded parameters. | |
4249 | ||
aa2c9784 JM |
4250 | 2020-05-11 Jason Merrill <jason@redhat.com> |
4251 | ||
4252 | * decl.c (cxx_init_decl_processing): Call declare_weak for | |
4253 | __cxa_pure_virtual. | |
4254 | ||
e5ccab83 JM |
4255 | 2020-05-11 Jason Merrill <jason@redhat.com> |
4256 | ||
4257 | * pt.c (instantiate_class_template_1): Call tsubst_expr for | |
4258 | STATIC_ASSERT member. | |
4259 | * ptree.c (cxx_print_xnode): Handle STATIC_ASSERT. | |
4260 | ||
f3f9cc41 JM |
4261 | 2020-05-11 Jason Merrill <jason@redhat.com> |
4262 | ||
4263 | * pt.c (find_parameter_packs_r) [LAMBDA_EXPR]: Remove redundant | |
4264 | walking of capture list. | |
4265 | ||
08434b02 JM |
4266 | 2020-05-11 Jason Merrill <jason@redhat.com> |
4267 | ||
4268 | * cp-tree.h (LOOKUP_EXPLICIT_TMPL_ARGS): Remove. | |
4269 | * call.c (build_new_function_call): Don't set it. | |
4270 | (build_new_method_call_1): Likewise. | |
4271 | (build_over_call): Check cand->explicit_targs instead. | |
4272 | ||
f315d147 JM |
4273 | 2020-05-11 Jason Merrill <jason@redhat.com> |
4274 | ||
4275 | * decl.c (compute_array_index_type_loc): Stabilize before building | |
4276 | the MINUS_EXPR. | |
4277 | ||
3a3e1ea9 JM |
4278 | 2020-05-11 Jason Merrill <jason@redhat.com> |
4279 | ||
4280 | * decl.c (grokdeclarator): Adjust deprecated_state here. | |
4281 | (start_decl): Not here. | |
4282 | ||
234681ea IS |
4283 | 2020-05-08 Iain Sandoe <iain@sandoe.co.uk> |
4284 | ||
4285 | PR c++/95003 | |
4286 | * coroutines.cc (build_actor_fn): Ensure that bind scopes | |
4287 | are marked as having side-effects where necessary. | |
4288 | (replace_statement_captures): Likewise. | |
4289 | (morph_fn_to_coro): Likewise. | |
4290 | ||
debfaee5 NS |
4291 | 2020-05-08 Nathan Sidwell <nathan@acm.org> |
4292 | ||
810a2bd8 NS |
4293 | * NEWS: Delete, it is so stale. |
4294 | ||
debfaee5 NS |
4295 | * parser.c (cp_lexer_set_source_position_from_token): EOF has a |
4296 | location too. | |
4297 | ||
c7100843 IS |
4298 | 2020-05-07 Iain Sandoe <iain@sandoe.co.uk> |
4299 | ||
4300 | PR c++/94817 | |
4301 | PR c++/94829 | |
4302 | * coroutines.cc (morph_fn_to_coro): Set unformed outline | |
4303 | functions to error_mark_node. For early error returns suppress | |
4304 | warnings about missing ramp return values. Fix reinstatement | |
4305 | of the function body on pre-existing initial error. | |
4306 | * decl.c (finish_function): Use the normal error path for fails | |
4307 | in the ramp function, do not try to compile the helpers if the | |
4308 | transform fails. | |
4309 | ||
5d5dcc65 MP |
4310 | 2020-05-07 Marek Polacek <polacek@redhat.com> |
4311 | ||
4312 | PR c++/94590 - Detect long double -> double narrowing. | |
4313 | * typeck2.c (check_narrowing): Detect long double -> double | |
4314 | narrowing even when double and long double have the same | |
4315 | precision. Make it handle conversions to float too. | |
4316 | ||
21968d4a MP |
4317 | 2020-05-07 Marek Polacek <polacek@redhat.com> |
4318 | ||
4319 | PR c++/94255 | |
4320 | * parser.c (cp_parser_class_specifier_1): Check that the scope is | |
4321 | nested inside current scope before pushing it. | |
4322 | ||
0ca22d02 MP |
4323 | 2020-05-07 Marek Polacek <polacek@redhat.com> |
4324 | ||
4325 | P1957R2 | |
4326 | * typeck2.c (check_narrowing): Consider T* to bool narrowing | |
4327 | in C++11 and up. | |
4328 | ||
d20b7173 MP |
4329 | 2020-05-07 Marek Polacek <polacek@redhat.com> |
4330 | ||
4331 | * decl.c (grok_op_properties): Fix spelling of non-static. | |
4332 | * typeck.c (build_class_member_access_expr): Likewise. | |
4333 | ||
eb72dc66 RB |
4334 | 2020-05-07 Richard Biener <rguenther@suse.de> |
4335 | ||
4336 | PR middle-end/94703 | |
4337 | * optimize.c (update_cloned_parm): Copy DECL_NOT_GIMPLE_REG_P. | |
4338 | ||
1e891788 MP |
4339 | 2020-05-06 Marek Polacek <polacek@redhat.com> |
4340 | ||
4341 | PR c++/94938 | |
4342 | * pt.c (tsubst_copy_and_build): Call type_dependent_expression_p_push | |
4343 | instead of uses_template_parms. Move the warning_sentinels after the | |
4344 | RECURs. | |
4345 | ||
25ee2155 JJ |
4346 | 2020-05-06 Jakub Jelinek <jakub@redhat.com> |
4347 | ||
46fcef99 JJ |
4348 | PR c++/94951 |
4349 | * typeck.c (cp_strict_aliasing_warning): New function. | |
4350 | (cp_build_indirect_ref_1, build_reinterpret_cast_1): Use | |
4351 | it instead of strict_aliasing_warning. | |
4352 | ||
25ee2155 JJ |
4353 | PR c++/94907 |
4354 | * method.c (defaulted_late_check): Don't call synthesize_method | |
4355 | on constexpr sfk_comparison if it has been called on it already. | |
4356 | ||
bc95e478 NS |
4357 | 2020-05-06 Nathan Sidwell <nathan@acm.org> |
4358 | ||
4359 | PR c++/94946 | |
4360 | * decl.c (grokdeclarator): Don't splice template attributes in | |
4361 | parm context -- they can apply to the parm. | |
4362 | ||
80644a67 IS |
4363 | 2020-05-05 Iain Sandoe <iain@sandoe.co.uk> |
4364 | ||
4365 | * coroutines.cc: Remove references to n4849 throughout. | |
4366 | ||
e42f3426 JM |
4367 | 2020-05-05 Jason Merrill <jason@redhat.com> |
4368 | ||
4369 | CWG 2235 | |
4370 | * pt.c (more_specialized_fn): Do consider parms with no deducible | |
4371 | template parameters. | |
4372 | ||
04b89192 JM |
4373 | 2020-05-05 Jason Merrill <jason@redhat.com> |
4374 | ||
4375 | PR c++/90212 | |
4376 | * constexpr.c (potential_constant_expression_1): In a lambda | |
4377 | function, consider a captured variable directly. | |
4378 | ||
f1656ae9 IS |
4379 | 2020-05-05 Iain Sandoe <iain@sandoe.co.uk> |
4380 | ||
4381 | * coroutines.cc (transform_await_wrapper): Check that we have | |
4382 | no unlowered co_yields. | |
4383 | (captures_temporary): Likewise. | |
4384 | (register_awaits): Likewise. | |
4385 | ||
733195e3 NS |
4386 | 2020-05-05 Nathan Sidwell <nathan@acm.org> |
4387 | ||
4388 | PR c++/94807 | |
4389 | * coroutines.cc (morph_fn_to_coro): Just check for | |
4390 | closure_identifier. | |
4391 | * pt.c (tsubst_function_decl): Update lambda fn's this_ptr name. | |
4392 | ||
ef3479af MP |
4393 | 2020-05-05 Marek Polacek <polacek@redhat.com> |
4394 | Jason Merrill <jason@redhat.com> | |
4395 | ||
4396 | PR c++/94799 | |
4397 | * parser.c (cp_parser_postfix_dot_deref_expression): If we have | |
4398 | a type-dependent object of class type, stash it to | |
4399 | parser->context->object_type. If the postfix expression doesn't have | |
4400 | a type, use typeof. | |
4401 | (cp_parser_class_name): Consider object scope too. | |
4402 | (cp_parser_lookup_name): Remove code dealing with the case when | |
4403 | object_type is unknown_type_node. | |
4404 | ||
a700b4a9 PP |
4405 | 2020-05-04 Patrick Palka <ppalka@redhat.com> |
4406 | ||
4407 | PR c++/94038 | |
4408 | * cp-gimplify.c (cp_fold) <case CALL_EXPR>: Move some variable | |
4409 | declarations closer to their uses. Copy the CALL_EXPR only | |
4410 | when one of its arguments has changed. | |
4411 | <case TREE_VEC>: Instead of first collecting the folded | |
4412 | arguments into a releasing_vec, just make a copy of the TREE_VEC | |
4413 | as soon as folding changes one of its arguments. | |
4414 | ||
0719055a IS |
4415 | 2020-05-04 Iain Sandoe <iain@sandoe.co.uk> |
4416 | ||
4417 | * coroutines.cc (morph_fn_to_coro): Mark the coro.gro variable | |
4418 | as artificial and ignored. | |
4419 | ||
f1621d18 NS |
4420 | 2020-05-04 Nathan Sidwell <nathan@acm.org> |
4421 | ||
97268c37 NS |
4422 | pt.c (process_template_parm): Don't walk the template list twice, |
4423 | remember the final node instead. | |
4424 | (end_template_parm_list): Refactor. Comment on why we do a pop | |
4425 | and a push. | |
4426 | ||
f1621d18 NS |
4427 | PR c++/94827 -- don't save parms in nested requirement |
4428 | * constraint.cc (tsubst_nested_requirement): TYPE directly holds | |
4429 | notmalized requirement. | |
4430 | (finish_nested_requirement): Don't stash current tpl parms into | |
4431 | the requirement. | |
4432 | (diagnose_nested_requirement): TYPE directly holds notmalized | |
4433 | requirement. | |
4434 | ||
4f6c1ca2 PP |
4435 | 2020-05-01 Patrick Palka <ppalka@redhat.com> |
4436 | ||
4437 | PR c++/90880 | |
4438 | * cp-tree.h (check_accessibility_of_qualified_id): Add | |
4439 | tsubst_flags_t parameter and change return type to bool. | |
4440 | * parser.c (cp_parser_lookup_name): Pass tf_warning_to_error to | |
4441 | check_accessibility_of_qualified_id. | |
4442 | * pt.c (tsubst_qualified_id): Return error_mark_node if | |
4443 | check_accessibility_of_qualified_id returns false. | |
4444 | * semantics.c (check_accessibility_of_qualified_id): Add | |
4445 | complain parameter. Pass complain instead of | |
4446 | tf_warning_or_error to perform_or_defer_access_check. Return | |
4447 | true unless perform_or_defer_access_check returns false. | |
4448 | ||
30da2906 MP |
4449 | 2020-05-01 Marek Polacek <polacek@redhat.com> |
4450 | ||
4451 | PR c++/94885 | |
4452 | * typeck2.c (process_init_constructor_record): Return PICFLAG_ERRONEOUS | |
4453 | if an initializer element was erroneous. | |
4454 | ||
82d5dece JM |
4455 | 2020-05-01 Jason Merrill <jason@redhat.com> |
4456 | ||
4457 | PR c++/90479 | |
4458 | * init.c (get_nsdmi): Don't push_to_top_level for a local class. | |
4459 | ||
a2f32550 JM |
4460 | 2020-05-01 Jason Merrill <jason@redhat.com> |
4461 | ||
4462 | PR c++/91529 | |
4463 | * decl.c (cp_finish_decl): Also clear TREE_READONLY if | |
4464 | -fmerge-all-constants. | |
4465 | ||
bcbf334a JM |
4466 | 2020-05-01 Jason Merrill <jason@redhat.com> |
4467 | ||
4468 | PR c++/93822 | |
4469 | * pt.c (tsubst_decl): Make sure DECL_VALUE_EXPR continues to have | |
4470 | the same type as the variable. | |
4471 | ||
c416c52b NS |
4472 | 2020-04-30 Jason Merrill <jason@redhat.com> |
4473 | Nathan Sidwell <nathan@acm.org> | |
4474 | ||
4475 | PR c++/94827 | |
4476 | * constraint.cc (map_arguments): If ARGS is null, it's a | |
4477 | self-mapping of parms. | |
4478 | (finish_nested_requirement): Do not pass argified | |
4479 | current_template_parms to normalization. | |
4480 | (tsubst_nested_requirement): Don't assert no template parms. | |
4481 | ||
448c89d5 IS |
4482 | 2020-04-30 Iain Sandoe <iain@sandoe.co.uk> |
4483 | ||
4484 | PR c++/94886 | |
4485 | * coroutines.cc (transform_local_var_uses): Defer walking | |
4486 | the DECL_INITIALs of BIND_EXPR vars until all the frame | |
4487 | allocations have been made. | |
4488 | ||
aa94a22f IS |
4489 | 2020-04-30 Iain Sandoe <iain@sandoe.co.uk> |
4490 | ||
4491 | PR c++/94883 | |
4492 | * coroutines.cc (register_awaits): Update target | |
4493 | expressions for awaitable and suspend handle | |
4494 | initializers. | |
4495 | ||
b16fd5fd IS |
4496 | 2020-04-30 Iain Sandoe <iain@sandoe.co.uk> |
4497 | ||
4498 | PR c++/94879 | |
4499 | * coroutines.cc (build_co_await): Account for variables | |
4500 | with DECL_VALUE_EXPRs. | |
4501 | (captures_temporary): Likewise. | |
4502 | (register_awaits): Likewise. | |
4503 | ||
a7201a08 PP |
4504 | 2020-04-29 Patrick Palka <ppalka@redhat.com> |
4505 | ||
4506 | PR c++/94830 | |
4507 | * pt.c (find_template_parameter_info::parm_list): New field. | |
4508 | (keep_template_parm): Use the new field to build up the | |
4509 | parameter list here instead of ... | |
4510 | (find_template_parameters): ... here. Return ftpi.parm_list. | |
4511 | ||
575ac27f JJ |
4512 | 2020-04-29 Jakub Jelinek <jakub@redhat.com> |
4513 | ||
4514 | PR target/94707 | |
4515 | * class.c (build_base_field): Set DECL_FIELD_ABI_IGNORED on C++17 empty | |
4516 | base artificial FIELD_DECLs. | |
4517 | (layout_class_type): Set DECL_FIELD_ABI_IGNORED on empty class | |
4518 | field_poverlapping_p FIELD_DECLs. | |
4519 | ||
43439d5e PP |
4520 | 2020-04-29 Patrick Palka <ppalka@redhat.com> |
4521 | ||
1d2290ca PP |
4522 | PR c++/94819 |
4523 | * constraint.cc (satisfy_declaration_constraints): Use saved_t | |
4524 | instead of t as the key to decl_satisfied_cache. | |
4525 | ||
43439d5e PP |
4526 | PR c++/94808 |
4527 | * error.c (print_requires_expression_info): Print the dependent | |
4528 | form of the parameter list with its template parameter mapping, | |
4529 | rather than printing the substituted form. | |
4530 | ||
bce54ed4 JM |
4531 | 2020-04-28 Jason Merrill <jason@redhat.com> |
4532 | ||
4533 | PR c++/94583 | |
4534 | * decl.c (use_eh_spec_block): Check nothrow type after | |
4535 | DECL_DEFAULTED_FN. | |
4536 | * pt.c (maybe_instantiate_noexcept): Call synthesize_method for | |
4537 | DECL_MAYBE_DELETED fns here. | |
4538 | * decl2.c (mark_used): Not here. | |
4539 | * method.c (get_defaulted_eh_spec): Reject DECL_MAYBE_DELETED here. | |
4540 | ||
f5edc76a IS |
4541 | 2020-04-28 Iain Sandoe <iain@sandoe.co.uk> |
4542 | ||
4543 | PR c++/94760 | |
4544 | * coroutines.cc (instantiate_coro_traits): Pass a reference to | |
4545 | object type rather than a pointer type for 'this', for method | |
4546 | coroutines. | |
4547 | (struct param_info): Add a field to hold that the parm is a lambda | |
4548 | closure pointer. | |
4549 | (morph_fn_to_coro): Check for lambda closure pointers in the | |
4550 | args. Use a reference to *this when building the args list for the | |
4551 | promise allocator lookup. | |
4552 | ||
b9c91b7f IS |
4553 | 2020-04-28 Iain Sandoe <iain@sandoe.co.uk> |
4554 | ||
4555 | PR c++/94759 | |
4556 | * coroutines.cc (coro_promise_type_found_p): Do not | |
4557 | exclude non-classes here (this needs to be handled in the | |
4558 | coroutine header). | |
4559 | (morph_fn_to_coro): Allow for the case where the coroutine | |
4560 | returns void. | |
4561 | ||
174b6f73 IS |
4562 | 2020-04-27 Iain Sandoe <iain@sandoe.co.uk> |
4563 | ||
4564 | PR c++/94701 | |
4565 | * coroutines.cc (struct local_var_info): Add fields for static | |
4566 | variables and those with DECL_VALUE_EXPR redirection. | |
4567 | (transform_local_var_uses): Skip past typedefs and static vars | |
4568 | and then account for redirected variables. | |
4569 | (register_local_var_uses): Likewise. | |
4570 | ||
5f1cd1da JM |
4571 | 2020-04-27 Jason Merrill <jason@redhat.com> |
4572 | ||
4573 | PR c++/90750 | |
4574 | PR c++/79585 | |
4575 | * decl.c (grokdeclarator): Move dependent attribute to decl. | |
4576 | * decl2.c (splice_template_attributes): No longer static. | |
4577 | ||
64da1b76 PP |
4578 | 2020-04-27 Patrick Palka <ppalka@redhat.com> |
4579 | ||
4580 | PR c++/94772 | |
4581 | * constexpr.c (cxx_eval_call_expression): Don't set new_obj if we're | |
4582 | evaluating the target constructor of a delegating constructor. | |
4583 | (cxx_eval_store_expression): Don't set TREE_READONLY if the LHS of the | |
4584 | INIT_EXPR is '*this'. | |
4585 | ||
bfdea9ae | 4586 | 2020-04-26 Marek Polacek <polacek@redhat.com> |
feb801f6 MP |
4587 | |
4588 | PR c++/90320 | |
4589 | * call.c (struct conversion): Add copy_init_p. | |
4590 | (standard_conversion): Set copy_init_p in ck_base and ck_rvalue | |
4591 | if FLAGS demands LOOKUP_ONLYCONVERTING. | |
4592 | (convert_like_real) <case ck_base>: If copy_init_p is set, or | |
4593 | LOOKUP_ONLYCONVERTING into FLAGS. | |
4594 | ||
29f55115 IS |
4595 | 2020-04-26 Iain Sandoe <iain@sandoe.co.uk> |
4596 | ||
4597 | PR c++/94752 | |
4598 | * coroutines.cc (morph_fn_to_coro): Ensure that | |
4599 | unnamed function params have a usable and distinct | |
4600 | frame field name. | |
4601 | ||
35281187 JM |
4602 | 2020-04-24 Jason Merrill <jason@redhat.com> |
4603 | ||
4604 | PR c++/94583 | |
4605 | * decl.c (redeclaration_error_message): Reject defaulted comparison | |
4606 | operator that has been previously declared. | |
4607 | ||
5e7e8b98 PP |
4608 | 2020-04-25 Patrick Palka <ppalka@redhat.com> |
4609 | ||
4610 | * parser.c (cp_parser_diagnose_invalid_type_name): Suggest enabling | |
4611 | concepts if the invalid identifier is 'requires'. | |
4612 | ||
4ff685a8 JJ |
4613 | 2020-04-25 Jakub Jelinek <jakub@redhat.com> |
4614 | ||
4615 | PR c++/94742 | |
4616 | * semantics.c (finish_call_expr): When looking if all overloads | |
4617 | are noreturn, use STRIP_TEMPLATE to look through TEMPLATE_DECLs. | |
4618 | ||
6f6c7992 ML |
4619 | 2020-04-24 Martin Liska <mliska@suse.cz> |
4620 | ||
4621 | * coroutines.cc: Fix compilation error for release checking | |
4622 | where we miss declaration of ‘coro_body_contains_bind_expr_p’. | |
4623 | ||
f9f16625 PP |
4624 | 2020-04-23 Patrick Palka <ppalka@redhat.com> |
4625 | ||
9a453da5 PP |
4626 | * tree.c (zero_init_expr_p): Use uses_template_parms instead of |
4627 | dependent_type_p. | |
4628 | ||
f9f16625 PP |
4629 | PR c++/94645 |
4630 | * pt.c (template_class_depth): Walk into the DECL_FRIEND_CONTEXT of a | |
4631 | friend declaration rather than into its CP_DECL_CONTEXT. | |
4632 | ||
3dbc7721 IS |
4633 | 2020-04-23 Iain Sandoe <iain@sandoe.co.uk> |
4634 | ||
4635 | PR c++/94288 | |
4636 | * coroutines.cc (await_statement_expander): Simplify cases. | |
4637 | (struct susp_frame_data): Add fields for truth and/or if | |
4638 | cases, rename one field. | |
4639 | (analyze_expression_awaits): New. | |
4640 | (expand_one_truth_if): New. | |
4641 | (add_var_to_bind): New helper. | |
4642 | (coro_build_add_if_not_cond_break): New helper. | |
4643 | (await_statement_walker): Handle conditional expressions, | |
4644 | handle expansion of truth-and/or-if cases. | |
4645 | (bind_expr_find_in_subtree): New, checking-only. | |
4646 | (coro_body_contains_bind_expr_p): New, checking-only. | |
4647 | (morph_fn_to_coro): Ensure that we have a top level bind | |
4648 | expression. | |
4649 | ||
cf88e25a JW |
4650 | 2020-04-22 Jonathan Wakely <jwakely@redhat.com> |
4651 | ||
4652 | PR translation/94698 | |
4653 | * class.c (check_field_decls): Change "define" to "declare" in | |
4654 | -Weffc++ diagnostics. | |
4655 | ||
72d0ef73 PP |
4656 | 2020-04-22 Patrick Palka <ppalka@redhat.com> |
4657 | ||
4658 | PR c++/94719 | |
4659 | PR c++/94549 | |
4660 | * constraint.cc (satisfy_declaration_constraints): If the inherited | |
4661 | constructor points to an instantiation of a constructor template, | |
4662 | remember and use its attached template arguments. | |
4663 | ||
c95d1dd7 JW |
4664 | 2020-04-22 Jonathan Wakely <jwakely@redhat.com> |
4665 | ||
4666 | PR translation/94698 | |
4667 | * class.c (check_field_decls): Change "override" to "define" in | |
4668 | -Weffc++ diagnostics. | |
4669 | ||
38644f81 IS |
4670 | 2020-04-22 Iain Sandoe <iain@sandoe.co.uk> |
4671 | ||
4672 | PR c++/94682 | |
4673 | * coroutines.cc (struct param_info): Add a field to note that | |
4674 | the param is 'this'. | |
4675 | (morph_fn_to_coro): Convert this to a reference before using it | |
4676 | in the promise parameter preview. | |
4677 | ||
aedd04ca JM |
4678 | 2020-04-22 Jason Merrill <jason@redhat.com> |
4679 | ||
4680 | PR c++/94546 | |
4681 | * pt.c (register_parameter_specializations): If the instantiation is | |
4682 | still a parameter pack, don't wrap it in a NONTYPE_ARGUMENT_PACK. | |
4683 | (tsubst_pack_expansion, tsubst_expr): Adjust. | |
4684 | ||
58797021 MS |
4685 | 2020-04-22 Martin Sebor <msebor@redhat.com> |
4686 | Jason Merrill <jason@redhat.com> | |
4687 | ||
4688 | PR c++/94510 | |
4689 | * decl.c (reshape_init_array_1): Avoid stripping redundant trailing | |
4690 | zero initializers... | |
4691 | * mangle.c (write_expression): ...and handle them here even for | |
4692 | pointers to members by calling zero_init_expr_p. | |
4693 | * cp-tree.h (zero_init_expr_p): Declare. | |
4694 | * tree.c (zero_init_expr_p): Define. | |
4695 | (type_initializer_zero_p): Remove. | |
4696 | * pt.c (tparm_obj_values): New hash_map. | |
4697 | (get_template_parm_object): Store to it. | |
4698 | (tparm_object_argument): New. | |
4699 | ||
05f14938 PP |
4700 | 2020-04-22 Patrick Palka <ppalka@redhat.com> |
4701 | ||
4702 | PR c++/67825 | |
4703 | * constraint.cc (diagnose_valid_expression): Check convert_to_void here | |
4704 | as well as in tsubst_valid_expression_requirement. | |
4705 | ||
08d6ec14 PP |
4706 | 2020-04-21 Patrick Palka <ppalka@redhat.com> |
4707 | ||
0e665f25 PP |
4708 | PR c++/94549 |
4709 | * constraint.cc (satisfy_declaration_constraints): Don't strip the | |
4710 | inherited constructor if it already has template information. | |
4711 | ||
08d6ec14 PP |
4712 | PR c++/94597 |
4713 | * pt.c (any_template_parm_r) <case IDENTIFIER_NODE>: New case. If this | |
4714 | is a conversion operator, visit its TREE_TYPE. | |
4715 | ||
f2c8be18 NS |
4716 | 2020-04-21 Nathan Sidwell <nathan@acm.org> |
4717 | ||
4718 | * pt.c (tsubst_copy_and_build) [POINTER_PLUS_EXPR]: Check for | |
4719 | error_mark_node. | |
4720 | ||
cd08718d IS |
4721 | 2020-04-21 Iain Sandoe <iain@sandoe.co.uk> |
4722 | ||
4723 | PR c++/94661 | |
4724 | * coroutines.cc (morph_fn_to_coro): Simplify return | |
4725 | value computation. | |
4726 | ||
d419e176 MP |
4727 | 2020-04-17 Marek Polacek <polacek@redhat.com> |
4728 | ||
4729 | PR c++/94592 | |
4730 | * constexpr.c (cxx_eval_outermost_constant_expr): Return when T is | |
4731 | a BRACE_ENCLOSED_INITIALIZER_P. | |
4732 | (is_nondependent_constant_expression): Don't check | |
4733 | BRACE_ENCLOSED_INITIALIZER_P. | |
4734 | (is_nondependent_static_init_expression): Likewise. | |
4735 | ||
a3a4f6be PP |
4736 | 2020-04-20 Patrick Palka <ppalka@redhat.com> |
4737 | ||
4738 | PR c++/94628 | |
4739 | * cp-tree.h (lss_policy::lss_nop): New enumerator. | |
4740 | * pt.c (local_specialization_stack::local_specialization_stack): Handle | |
4741 | an lss_nop policy. | |
4742 | (local_specialization_stack::~local_specialization_stack): Likewise. | |
4743 | (tsubst_pack_expansion): Use a local_specialization_stack instead of | |
4744 | manually saving and restoring local_specializations. Conditionally | |
4745 | replace local_specializations sooner, before the handling of the | |
4746 | unsubstituted_packs case. | |
4747 | ||
5bdd4c5d MP |
4748 | 2020-04-20 Marek Polacek <polacek@redhat.com> |
4749 | ||
4750 | PR c++/94505 - bogus -Wparentheses warning with fold-expression. | |
4751 | * pt.c (fold_expression): Add warning_sentinel for -Wparentheses | |
4752 | before calling build_x_binary_op. | |
4753 | ||
c5e4be6b MP |
4754 | 2020-04-20 Marek Polacek <polacek@redhat.com> |
4755 | ||
4756 | * coroutines.cc (captures_temporary): Don't assign the result of | |
4757 | STRIP_NOPS to the same variable. | |
4758 | ||
aa576f2a NS |
4759 | 2020-04-20 Nathan Sidwell <nathan@acm.org> |
4760 | ||
f2c8be18 | 4761 | PR c++/94454 - tpl-tpl-parms are not canonicalizable types |
a6f40023 NS |
4762 | * pt.c (canonical_type_parameter): Assert not a tpl-tpl-parm. |
4763 | (process_template_parm): tpl-tpl-parms are structural. | |
4764 | (rewrite_template_parm): Propagate structuralness. | |
4765 | ||
f2c8be18 NS |
4766 | PR c++/94454 - Expr pack expansion equality |
4767 | * tree.c (cp_tree_equal) [TEMPLATE_ID_EXPR, default]: Refactor. | |
7fcb9343 NS |
4768 | [EXPR_PACK_EXPANSION]: Add. |
4769 | ||
aa576f2a NS |
4770 | PR c++/94454 Template Argument Hashing |
4771 | * pt.c (iterative_hash_template_arg): Strip nodes as | |
4772 | template_args_equal does. | |
4773 | [ARGUMENT_PACK_SELECT, TREE_VEC, CONSTRUCTOR]: Refactor. | |
4774 | [node_class:TEMPLATE_TEMPLATE_PARM]: Hash by level & index. | |
4775 | [node_class:default]: Refactor. | |
4776 | ||
e43b28ae PP |
4777 | 2020-04-18 Patrick Palka <ppalka@redhat.com> |
4778 | ||
f83adb68 PP |
4779 | PR c++/94632 |
4780 | * tree.c (cp_tree_equal) <case PARM_DECL>: Ignore | |
4781 | comparing_specializations if the parameters' contexts are identical. | |
4782 | ||
e43b28ae PP |
4783 | PR c++/92187 |
4784 | * pt.c (splice_late_return_type): Propagate cv-qualifiers and | |
4785 | PLACEHOLDER_TYPE_CONSTRAINTS from the original auto node to the new one. | |
4786 | ||
3f5af3f7 PP |
4787 | 2020-04-17 Patrick Palka <ppalka@redhat.com> |
4788 | ||
a28edad3 PP |
4789 | PR c++/94483 |
4790 | * lambda.c (lambda_capture_field_type): Avoid doing auto deduction if | |
4791 | the explicit initializer has parameter packs. | |
4792 | ||
3f5af3f7 PP |
4793 | PR c++/88754 |
4794 | * parser.c (cp_parser_check_template_parameters): Before issuing a hard | |
4795 | error, first try simulating an error instead. | |
4796 | ||
2e389749 JJ |
4797 | 2020-04-17 Jakub Jelinek <jakub@redhat.com> |
4798 | ||
4799 | PR other/94629 | |
4800 | * call.c (build_conditional_expr_1): Remove redundant assignment to | |
4801 | arg2. | |
4802 | ||
effcb418 PP |
4803 | 2020-04-16 Patrick Palka <ppalka@redhat.com> |
4804 | ||
4805 | PR c++/94475 | |
4806 | * cvt.c (ocp_convert): If the result of scalar_constant_value is | |
4807 | erroneous, ignore it and use the original expression. | |
4808 | ||
e4658c7d JJ |
4809 | 2020-04-16 Jakub Jelinek <jakub@redhat.com> |
4810 | ||
4811 | PR c++/94571 | |
4812 | * parser.c (cp_parser_simple_declaration): Fix up a pasto in | |
4813 | diagnostics. | |
4814 | ||
2dc9294c JJ |
4815 | 2020-04-15 Jakub Jelinek <jakub@redhat.com> |
4816 | ||
4817 | PR c/94593 | |
4818 | * parser.c (cp_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject | |
4819 | requires directive when not at file or namespace scope. | |
4820 | ||
a126a157 IS |
4821 | 2020-04-14 Iain Sandoe <iain@sandoe.co.uk> |
4822 | ||
4823 | PR c++/94359 | |
4824 | * coroutines.cc (build_actor_fn): Check that the target can | |
4825 | support the resume tailcall before mandating it. | |
4826 | ||
b2562229 PP |
4827 | 2020-04-14 Patrick Palka <ppalka@redhat.com> |
4828 | ||
58a29af8 PP |
4829 | PR c++/85278 |
4830 | * cxx-pretty-print.c (cxx_pretty_printer:simple_type_specifier) | |
4831 | <case DECLTYPE_TYPE>: Handle DECLTYPE_TYPE here instead of ... | |
4832 | (pp_cxx_type_specifier_seq) <case DECLTYPE_TYPE>: ... here. | |
4833 | (cxx_pretty_printer::direct_abstract_declarator) <case DECLTYPE_TYPE>: | |
4834 | New no-op case. | |
4835 | ||
b2562229 PP |
4836 | PR c++/94034 |
4837 | * constexpr.c (replace_result_decl_data): New struct. | |
4838 | (replace_result_decl_data_r): New function. | |
4839 | (replace_result_decl): New function. | |
4840 | (cxx_eval_call_expression): Use it. | |
4841 | * tree.c (build_aggr_init_expr): Set the location of the AGGR_INIT_EXPR | |
4842 | to that of its initializer. | |
4843 | ||
7eee265e MP |
4844 | 2020-04-13 Marek Polacek <polacek@redhat.com> |
4845 | ||
4846 | PR c++/94588 | |
4847 | * name-lookup.c (check_local_shadow): Add an inform call. | |
4848 | ||
077dd9b3 PP |
4849 | 2020-04-13 Patrick Palka <ppalka@redhat.com> |
4850 | ||
1dcb7799 PP |
4851 | PR c++/94521 |
4852 | * error.c (dump_scope): Pass TFF_NO_FUNCTION_ARGUMENTS to | |
4853 | dump_function_decl when printing a function template instantiation as a | |
4854 | scope. | |
4855 | ||
077dd9b3 PP |
4856 | PR c++/94470 |
4857 | * constexpr.c (get_or_insert_ctor_field): Set default value of parameter | |
4858 | 'pos_hint' to -1. | |
4859 | (cxx_eval_bare_aggregate): Use get_or_insert_ctor_field instead of | |
4860 | assuming the the next index belongs at the end of the new CONSTRUCTOR. | |
4861 | (cxx_eval_store_expression): Revert PR c++/78572 fix. | |
4862 | ||
8d213cbb NS |
4863 | 2020-04-13 Nathan Sidwell <nathan@acm.org> |
4864 | ||
4865 | PR c++/94426 lambdas with internal linkage are different to no-linkage | |
4866 | * decl2.c (determine_visibility): A lambda's visibility is | |
4867 | affected by its extra scope. | |
4868 | * pt.c (instantiate_decl): Determine var's visibility before | |
4869 | instantiating its initializer. | |
4870 | * tree.c (no_linkage_check): Revert code looking at visibility of | |
4871 | lambda's extra scope. | |
4872 | ` | |
0666767e IS |
4873 | 2020-04-10 Iain Sandoe <iain@sandoe.co.uk> |
4874 | ||
a02558a3 | 4875 | PR c++/94528 |
0666767e IS |
4876 | * coroutines.cc (co_await_expander): Remove. |
4877 | (expand_one_await_expression): New. | |
4878 | (process_one_statement): New. | |
4879 | (await_statement_expander): New. | |
4880 | (build_actor_fn): Revise to use per-statement expander. | |
4881 | (struct susp_frame_data): Reorder and comment. | |
4882 | (register_awaits): Factor code. | |
4883 | (replace_statement_captures): New, factored from... | |
4884 | (maybe_promote_captured_temps):.. here. | |
4885 | (await_statement_walker): Revise to process per statement. | |
4886 | (morph_fn_to_coro): Use revised susp_frame_data layout. | |
4887 | ||
62c25d7a MP |
4888 | 2020-04-10 Marek Polacek <polacek@redhat.com> |
4889 | ||
4890 | PR c++/94149 | |
4891 | * method.c (constructible_expr): In C++20, try using parenthesized | |
4892 | initialization of aggregates to determine the result of | |
4893 | __is_constructible. | |
4894 | ||
6c4a05f2 BC |
4895 | 2020-04-10 Bin Cheng <bin.cheng@linux.alibaba.com> |
4896 | ||
4897 | * coroutines.cc (co_await_expander): Simplify. | |
4898 | ||
ef529765 JM |
4899 | 2020-04-09 Jason Merrill <jason@redhat.com> |
4900 | ||
4901 | PR c++/94523 | |
4902 | * constexpr.c (cxx_eval_constant_expression) [VAR_DECL]: Look at | |
4903 | ctx->object and ctx->global->values first. | |
4904 | ||
830c5724 MP |
4905 | 2020-04-09 Marek Polacek <polacek@redhat.com> |
4906 | ||
4907 | PR c++/93790 | |
4908 | * call.c (initialize_reference): If the reference binding failed, maybe | |
4909 | try initializing from { }. | |
4910 | * decl.c (grok_reference_init): For T& t(e), set | |
4911 | LOOKUP_AGGREGATE_PAREN_INIT but don't build up a constructor yet. | |
4912 | ||
926d39c3 | 4913 | 2020-04-08 Iain Sandoe <iain@sandoe.co.uk> |
e4658c7d | 4914 | Jun Ma <JunMa@linux.alibaba.com> |
926d39c3 IS |
4915 | |
4916 | * coroutines.cc (maybe_promote_captured_temps): Add a cleanup | |
4917 | expression, if needed, to any call from which we promoted | |
4918 | temporaries captured by reference. | |
4919 | ||
77d6dfc9 MP |
4920 | 2020-04-08 Marek Polacek <polacek@redhat.com> |
4921 | ||
4922 | PR c++/94507 - ICE-on-invalid with lambda template. | |
4923 | * pt.c (tsubst_lambda_expr): Cope when tsubst_template_decl or | |
4924 | tsubst_function_decl returns error_mark_node. | |
4925 | ||
70df40ca ML |
4926 | 2020-04-08 Martin Liska <mliska@suse.cz> |
4927 | ||
4928 | PR c++/94314 | |
4929 | * decl.c (duplicate_decls): Duplicate also DECL_IS_REPLACEABLE_OPERATOR. | |
4930 | (cxx_init_decl_processing): Mark replaceable all implicitly defined | |
4931 | operators. | |
4932 | ||
12f55e03 PP |
4933 | 2020-04-08 Patrick Palka <ppalka@redhat.com> |
4934 | ||
4935 | Core issues 1001 and 1322 | |
4936 | PR c++/92010 | |
4937 | * pt.c (rebuild_function_or_method_type): Split function out from ... | |
4938 | (tsubst_function_type): ... here. | |
4939 | (maybe_rebuild_function_decl_type): New function. | |
4940 | (tsubst_function_decl): Use it. | |
4941 | ||
4cf6b06c JJ |
4942 | 2020-04-08 Jakub Jelinek <jakub@redhat.com> |
4943 | ||
4944 | PR c++/94325 | |
4945 | * decl.c (begin_destructor_body): For CLASSTYPE_VBASECLASSES class | |
4946 | dtors, if CLASSTYPE_PRIMARY_BINFO is non-NULL, but not BINFO_VIRTUAL_P, | |
4947 | look at CLASSTYPE_PRIMARY_BINFO of its BINFO_TYPE if it is not | |
4948 | BINFO_VIRTUAL_P, and so on. | |
4949 | ||
a6479aa4 MP |
4950 | 2020-04-08 Marek Polacek <polacek@redhat.com> |
4951 | ||
4952 | PR c++/94478 - ICE with defaulted comparison operator | |
4953 | * method.c (early_check_defaulted_comparison): Give an error when the | |
4954 | context is null. | |
4955 | ||
13e41d8b TB |
4956 | 2020-04-08 Tobias Burnus <tobias@codesourcery.com> |
4957 | ||
4958 | PR middle-end/94120 | |
4959 | * paser.c (cp_parser_oacc_declare): Add check that variables | |
4960 | are declared in the same scope as the directive. | |
4961 | ||
31449cf8 JM |
4962 | 2020-04-07 Jason Merrill <jason@redhat.com> |
4963 | ||
845d451e JM |
4964 | PR c++/94480 |
4965 | * parser.c (cp_parser_requires_expression): Use tentative_firewall. | |
4966 | ||
31449cf8 JM |
4967 | PR c++/94481 |
4968 | * parser.c (cp_parser_placeholder_type_specifier): Use | |
4969 | matching_parens. | |
4970 | ||
89b01e86 IS |
4971 | 2020-04-07 Iain Sandoe <iain@sandoe.co.uk> |
4972 | ||
4973 | * coroutines.cc (maybe_promote_captured_temps): Ensure that | |
4974 | reference capture placeholder vars are properly declared. | |
4975 | ||
23f1f679 PP |
4976 | 2020-04-07 Patrick Palka <ppalka@redhat.com> |
4977 | ||
4978 | PR c++/90996 | |
4979 | * tree.c (replace_placeholders): Look through all handled components, | |
4980 | not just COMPONENT_REFs. | |
4981 | * typeck2.c (process_init_constructor_array): Propagate | |
4982 | CONSTRUCTOR_PLACEHOLDER_BOUNDARY up from each element initializer to | |
4983 | the array initializer. | |
4984 | ||
4df50a05 JJ |
4985 | 2020-04-07 Jakub Jelinek <jakub@redhat.com> |
4986 | ||
4987 | PR c++/94512 | |
4988 | * parser.c (cp_parser_omp_parallel): Set OMP_PARALLEL_COMBINED | |
4989 | if cp_parser_omp_master succeeded. | |
4990 | ||
467fc7c8 JM |
4991 | 2020-04-06 Jason Merrill <jason@redhat.com> |
4992 | ||
4993 | PR c++/94462 | |
4994 | * decl.c (duplicate_decls): Fix handling of DECL_HIDDEN_FRIEND_P. | |
4995 | ||
f84aded8 MP |
4996 | 2020-04-04 Marek Polacek <polacek@redhat.com> |
4997 | Jason Merrill <jason@redhat.com> | |
4998 | ||
4999 | PR c++/94155 - crash in gimplifier with paren init of aggregates. | |
5000 | * init.c (build_vec_init): Fill in indexes. | |
5001 | ||
75c8d6e5 JM |
5002 | 2020-04-04 Jason Merrill <jason@redhat.com> |
5003 | ||
5004 | PR c++/91377 | |
5005 | * mangle.c (write_expression): Skip IMPLICIT_CONV_EXPR. | |
5006 | ||
37244b21 PP |
5007 | 2020-04-04 Patrick Palka <ppalka@redhat.com> |
5008 | ||
49a86fce PP |
5009 | PR c++/94205 |
5010 | PR c++/79937 | |
5011 | * constexpr.c (struct constexpr_ctx): New field 'parent'. | |
5012 | (cxx_eval_bare_aggregate): Propagate CONSTRUCTOR_PLACEHOLDER_BOUNDARY | |
5013 | flag from the original constructor to the reduced constructor. | |
5014 | (lookup_placeholder): Prefer to return the outermost matching object | |
5015 | by recursively calling lookup_placeholder on the 'parent' context, | |
5016 | but don't cross CONSTRUCTOR_PLACEHOLDER_BOUNDARY constructors. | |
5017 | (cxx_eval_constant_expression): Link the 'ctx' context to the 'new_ctx' | |
5018 | context via 'new_ctx.parent' when being expanded without an explicit | |
5019 | target. Don't call replace_placeholders. | |
5020 | (cxx_eval_outermost_constant_expr): Initialize 'ctx.parent' to NULL. | |
5021 | ||
37244b21 PP |
5022 | PR c++/94219 |
5023 | PR c++/94205 | |
5024 | * constexpr.c (get_or_insert_ctor_field): Split out (while adding | |
5025 | support for VECTOR_TYPEs, and optimizations for the common case) | |
5026 | from ... | |
5027 | (cxx_eval_store_expression): ... here. Rename local variable | |
5028 | 'changed_active_union_member_p' to 'activated_union_member_p'. Record | |
5029 | the sequence of indexes into 'indexes' that yields the subobject we're | |
5030 | assigning to. Record the integer offsets of the constructor indexes | |
5031 | we're assigning through into 'index_pos_hints'. After evaluating the | |
5032 | initializer of the store expression, recompute 'valp' using 'indexes' | |
5033 | and using 'index_pos_hints' as hints. | |
5034 | (cxx_eval_bare_aggregate): Tweak comments. Use get_or_insert_ctor_field | |
5035 | to recompute the constructor_elt pointer we're assigning through after | |
5036 | evaluating each initializer. | |
5037 | ||
f1ad7bac JM |
5038 | 2020-04-04 Jason Merrill <jason@redhat.com> |
5039 | ||
5040 | PR c++/67825 | |
5041 | * constraint.cc (tsubst_valid_expression_requirement): Call | |
5042 | convert_to_void. | |
5043 | ||
9f143008 JM |
5044 | 2020-04-04 Jason Merrill <jason@redhat.com> |
5045 | ||
5046 | PR c++/94453 | |
5047 | * constexpr.c (maybe_constant_value): Use break_out_target_exprs. | |
5048 | * expr.c (mark_use) [VIEW_CONVERT_EXPR]: Don't wrap a TARGET_EXPR in | |
5049 | NON_LVALUE_EXPR. | |
5050 | ||
0c809f72 JJ |
5051 | 2020-04-04 Jakub Jelinek <jakub@redhat.com> |
5052 | ||
aae5d08a JJ |
5053 | PR debug/94441 |
5054 | * parser.c (cp_parser_omp_for_loop): Use | |
5055 | protected_set_expr_location_if_unset. | |
5056 | * cp-gimplify.c (genericize_if_stmt, genericize_cp_loop): Likewise. | |
5057 | ||
0c809f72 JJ |
5058 | PR c++/94477 |
5059 | * pt.c (tsubst_expr) <case OMP_MASTER>: Clear | |
5060 | omp_parallel_combined_clauses. | |
5061 | ||
bcafd874 JM |
5062 | 2020-04-03 Jason Merrill <jason@redhat.com> |
5063 | ||
5064 | PR c++/91966 | |
5065 | * pt.c (complex_pack_expansion_r): New. | |
5066 | (complex_alias_template_p): Use it. | |
5067 | ||
76f09260 JM |
5068 | 2020-03-31 Jason Merrill <jason@redhat.com> |
5069 | ||
5070 | PR c++/94205 | |
5071 | * constexpr.c (cxx_eval_constant_expression) [TARGET_EXPR]: Call | |
5072 | replace_placeholders. | |
5073 | * typeck2.c (store_init_value): Fix arguments to | |
5074 | fold_non_dependent_expr. | |
5075 | ||
595f1b12 JM |
5076 | 2020-03-31 Jason Merrill <jason@redhat.com> |
5077 | ||
5078 | * constexpr.c (cxx_eval_constant_expression) [TARGET_EXPR]: Use | |
5079 | local variables. | |
5080 | ||
5830f753 JM |
5081 | 2020-03-30 Jason Merrill <jason@redhat.com> |
5082 | ||
5083 | PR c++/90711 | |
5084 | * tree.c (cp_tree_equal) [CALL_EXPR]: Compare KOENIG_LOOKUP_P. | |
5085 | (called_fns_equal): Check DECL_CONTEXT. | |
5086 | ||
1cb1986c JJ |
5087 | 2020-03-30 Jakub Jelinek <jakub@redhat.com> |
5088 | ||
5089 | PR c++/94385 | |
5090 | * semantics.c (add_stmt): Only set STMT_IS_FULL_EXPR_P on trees with | |
5091 | STATEMENT_CODE_P code. | |
5092 | ||
75defde9 PP |
5093 | 2020-03-28 Patrick Palka <ppalka@redhat.com> |
5094 | ||
7981c06a PP |
5095 | PR c++/94306 |
5096 | * parser.c (cp_parser_requires_clause_opt): Diagnose and recover from | |
5097 | "requires {" when "requires requires {" was probably intended. | |
5098 | ||
a7ea3d2c PP |
5099 | PR c++/94252 |
5100 | * constraint.cc (tsubst_compound_requirement): Always suppress errors | |
5101 | from type_deducible_p and expression_convertible_p, as they're not | |
5102 | substitution errors. | |
5103 | (diagnose_atomic_constraint) <case INTEGER_CST>: Remove this case so | |
5104 | that we diagnose INTEGER_CST expressions of non-bool type via the | |
5105 | default case. | |
5106 | * cp-gimplify.c (cp_genericize_r) <case REQUIRES_EXPR>: New case. | |
5107 | * parser.c (cp_parser_requires_expression): Always parse the requirement | |
5108 | body as if we're processing a template, by temporarily incrementing | |
5109 | processing_template_decl. Afterwards, if we're not actually in a | |
5110 | template context, perform semantic processing to diagnose any invalid | |
5111 | types and expressions. | |
5112 | * pt.c (tsubst_copy_and_build) <case REQUIRES_EXPR>: Remove dead code. | |
5113 | * semantics.c (finish_static_assert): Explain an assertion failure | |
5114 | when the condition is a REQUIRES_EXPR like we do when it is a concept | |
5115 | check. | |
5116 | ||
cd68edf8 PP |
5117 | * constraint.cc (diagnose_compound_requirement): When diagnosing a |
5118 | compound requirement, maybe replay the satisfaction failure, subject to | |
5119 | the current diagnosis depth. | |
5120 | ||
75defde9 PP |
5121 | * constraint.cc (finish_constraint_binary_op): Set the location of EXPR |
5122 | as well as its range, because build_x_binary_op doesn't always do so. | |
5123 | (current_constraint_diagnosis_depth): New. | |
5124 | (concepts_diagnostics_max_depth_exceeded_p): New. | |
5125 | (collect_operands_of_disjunction): New. | |
5126 | (satisfy_disjunction): When diagnosing a satisfaction failure, maybe | |
5127 | replay each branch of the disjunction, subject to the current diagnosis | |
5128 | depth. | |
5129 | (diagnose_valid_expression): When diagnosing a satisfaction failure, | |
5130 | maybe replay the substitution error, subject to the current diagnosis | |
5131 | recursion. | |
5132 | (diagnose_valid_type): Likewise. | |
5133 | (diagnose_nested_requiremnet): Likewise. | |
5134 | (diagnosing_failed_constraint::diagnosing_failed_constraint): Increment | |
5135 | current_constraint_diagnosis_depth when diagnosing. | |
5136 | (diagnosing_failed_constraint::~diagnosing_failed_constraint): Decrement | |
5137 | current_constraint_diagnosis_depth when diagnosing. | |
5138 | (diagnosing_failed_constraint::replay_errors_p): New static member | |
5139 | function. | |
5140 | (diagnose_constraints): Don't diagnose if concepts_diagnostics_max_depth | |
5141 | is 0. Emit a one-off note to increase -fconcepts-diagnostics-depth if | |
5142 | the limit was exceeded. | |
5143 | * cp-tree.h (diagnosing_failed_constraint::replay_errors_p): Declare. | |
5144 | ||
c7fc15f5 NS |
5145 | 2020-03-27 Nathan Sidwell <nathan@acm.org> |
5146 | ||
5147 | PR c++/84733 | |
5148 | * name-lookup.c (do_pushdecl): Look through cleanp levels. | |
5149 | ||
04dd734b MS |
5150 | 2020-03-27 Martin Sebor <msebor@redhat.com> |
5151 | ||
5152 | PR c++/94078 | |
5153 | PR c++/93824 | |
5154 | PR c++/93810 | |
5155 | * cp-tree.h (most_specialized_partial_spec): Declare. | |
5156 | * parser.c (cp_parser_elaborated_type_specifier): Distinguish alias | |
5157 | from declarations. | |
5158 | (specialization_of): New function. | |
5159 | (cp_parser_check_class_key): Move code... | |
5160 | (class_decl_loc_t::add): ...to here. Add parameters. Avoid issuing | |
5161 | -Wredundant-tags on first-time declarations in other declarators. | |
5162 | Correct handling of template specializations. | |
5163 | (class_decl_loc_t::diag_mismatched_tags): Also expect to be called | |
5164 | when -Wredundant-tags is enabled. Use primary template or partial | |
5165 | specialization as the guide for uses of implicit instantiations. | |
5166 | * pt.c (most_specialized_partial_spec): Declare extern. | |
5167 | ||
9dba6013 NS |
5168 | 2020-03-27 Nathan Sidwell <nathan@acm.org> |
5169 | ||
5170 | PR c++/94257 | |
5171 | * name-lookup.c (push_namespace): Triage ambiguous lookups that | |
5172 | contain namespaces. | |
5173 | ||
72809d6f JJ |
5174 | 2020-03-27 Jakub Jelinek <jakub@redhat.com> |
5175 | ||
2eea00c5 JJ |
5176 | PR c++/94326 |
5177 | * call.c (set_flags_from_callee): Don't update | |
5178 | cp_function_chain->can_throw or current_function_returns_abnormally | |
5179 | if cp_unevaluated_operand. | |
5180 | ||
72809d6f JJ |
5181 | PR c++/94339 |
5182 | * cvt.c (ocp_convert): Handle COMPOUND_EXPR by recursion on the second | |
5183 | operand and creating a new COMPOUND_EXPR if anything changed. | |
5184 | ||
71d69548 MP |
5185 | 2020-03-26 Marek Polacek <polacek@redhat.com> |
5186 | ||
5187 | PR c++/94336 - template keyword accepted before destructor names. | |
5188 | * parser.c (cp_parser_unqualified_id): Give an error when 'template' | |
5189 | is followed by a destructor name. | |
5190 | ||
54f58e94 PP |
5191 | 2020-03-27 Patrick Palka <ppalka@redhat.com> |
5192 | ||
5193 | * decl.c (compute_array_index_type_loc): Remove redundant | |
5194 | type_dependent_expression_p check that is subsumed by | |
5195 | value_dependent_expression_p. | |
5196 | * decl2.c (is_late_template_attribute): Likewise. | |
5197 | * pt.c (uses_template_parms): Likewise. | |
5198 | (dependent_template_arg_p): Likewise. | |
5199 | ||
517f5356 MP |
5200 | 2020-03-26 Marek Polacek <polacek@redhat.com> |
5201 | ||
5202 | DR 1710 | |
5203 | PR c++/94057 - template keyword in a typename-specifier. | |
5204 | * parser.c (check_template_keyword_in_nested_name_spec): New. | |
5205 | (cp_parser_nested_name_specifier_opt): Implement DR1710, optional | |
5206 | 'template'. Call check_template_keyword_in_nested_name_spec. | |
5207 | (cp_parser_simple_type_specifier): Assume that a < | |
5208 | following a qualified-id in a typename-specifier begins | |
5209 | a template argument list. | |
5210 | ||
6d85947d IS |
5211 | 2020-03-26 Iain Sandoe <iain@sandoe.co.uk> |
5212 | ||
5213 | * coroutines.cc (coro_init_identifiers): Initialize an identifier | |
5214 | for the cororoutine handle 'address' method name. | |
5215 | (struct coro_aw_data): Add fields to cover the continuations. | |
5216 | (co_await_expander): Determine the kind of await_suspend in use. | |
5217 | If we have the case that returns a continuation handle, then save | |
5218 | this and make the target for 'scope exit without cleanup' be the | |
5219 | continuation resume label. | |
5220 | (expand_co_awaits): Remove. | |
5221 | (struct suspend_point_info): Remove fields that kept the returned | |
5222 | await_suspend handle type. | |
5223 | (transform_await_expr): Remove code tracking continuation handles. | |
5224 | (build_actor_fn): Add the continuation handle as an actor-function | |
5225 | scope var. Build the symmetric transfer continuation point. Call | |
5226 | the tree walk for co_await expansion directly, rather than via a | |
5227 | trivial shim function. | |
5228 | (register_await_info): Remove fields tracking continuation handles. | |
5229 | (get_await_suspend_return_type): Remove. | |
5230 | (register_awaits): Remove code tracking continuation handles. | |
5231 | (morph_fn_to_coro): Remove code tracking continuation handles. | |
5232 | ||
2a1f0f64 IS |
5233 | 2020-03-26 Iain Sandoe <iain@sandoe.co.uk> |
5234 | ||
5235 | * coroutines.cc (co_await_expander): If we are expanding the | |
5236 | initial await expression, set a boolean flag to show that we | |
5237 | have now reached the initial await_resume() method call. | |
5238 | (expand_co_awaits): Handle the 'initial await resume called' flag. | |
5239 | (build_actor_fn): Insert the initial await expression into the | |
5240 | start of the user-authored function-body. Handle the 'initial await | |
5241 | resume called' flag. | |
5242 | (morph_fn_to_coro): Initialise the 'initial await resume called' | |
5243 | flag. Modify the unhandled exception catch clause to recognise | |
5244 | exceptions that occur before the initial await_resume() and re- | |
5245 | throw them. | |
5246 | ||
5a1706f6 JJ |
5247 | 2020-03-26 Jakub Jelinek <jakub@redhat.com> |
5248 | ||
dab932d1 JJ |
5249 | PR c++/81349 |
5250 | * class.c (user_provided_p): Use STRIP_TEMPLATE instead of returning | |
5251 | true for all TEMPLATE_DECLs. | |
5252 | ||
5a1706f6 JJ |
5253 | PR c++/94272 |
5254 | * cp-gimplify.c (cp_genericize_r): Handle STATEMENT_LIST. | |
5255 | ||
c7a252ba PP |
5256 | 2020-03-25 Patrick Palka <ppalka@redhat.com> |
5257 | ||
5258 | PR c++/94265 | |
5259 | * parser.c (cp_parser_selection_statement) <case RID_IF>: Invalidate the | |
5260 | current condition chain when the if-statement has a non-empty | |
5261 | init-statement. | |
5262 | ||
83dfa06c IS |
5263 | 2020-03-25 Iain Sandoe <iain@sandoe.co.uk> |
5264 | ||
5265 | PR c++/94319 | |
5266 | * coroutines.cc (captures_temporary): Fix a missing dereference. | |
5267 | ||
75b7b7fd MP |
5268 | 2020-03-24 Marek Polacek <polacek@redhat.com> |
5269 | ||
5270 | PR c++/94190 - wrong no post-decrement operator error in template. | |
5271 | * call.c (convert_like_real): Use convert_from_reference on the result. | |
5272 | ||
fddfd3ce JM |
5273 | 2020-03-24 Jason Merrill <jason@redhat.com> |
5274 | ||
5275 | PR c++/94186 | |
5276 | * constraint.cc (constraint_satisfaction_value): Repeat noisily on | |
5277 | error. | |
5278 | (tsubst_nested_requirement): Likewise. | |
5279 | (get_constraint_error_location): Allow missing context. | |
5280 | (diagnose_atomic_constraint): Diagnose non-bool constraint here. | |
5281 | (satisfy_atom): Not here. Only diagnose non-constant when noisy. | |
5282 | ||
5c161741 JM |
5283 | 2020-03-24 Jason Merrill <jason@redhat.com> |
5284 | ||
5285 | * pt.c (any_template_parm_r): Look into the type of a non-type | |
5286 | template parm. | |
5287 | ||
6e771c08 JM |
5288 | 2020-03-24 Jason Merrill <jason@redhat.com> |
5289 | ||
5290 | * cp-tree.h (cp_expr): When constructing from an expr and a | |
5291 | location, call protected_set_expr_location. | |
5292 | ||
1f6c1c82 PP |
5293 | 2020-03-23 Patrick Palka <ppalka@redhat.com> |
5294 | ||
5295 | PR c++/93805 | |
5296 | * except.c (maybe_noexcept_warning): Add TODO. | |
5297 | * method.c (walk_field_subobs): Pass tf_none to expr_noexcept_p. | |
5298 | ||
26b3e568 NS |
5299 | 2020-03-23 nathans <nathan@acm.org> |
5300 | ||
5301 | PR c++/94044 | |
5302 | * tree.c (cp_tree_equal) [SIZEOF_EXPR]: Detect argument pack | |
5303 | operand. | |
5304 | ||
b599bf9d PP |
5305 | 2020-03-21 Patrick Palka <ppalka@redhat.com> |
5306 | ||
5307 | PR c++/94066 | |
5308 | * constexpr.c (reduced_constant_expression_p) [CONSTRUCTOR]: Properly | |
5309 | handle unions without an initializer. | |
5310 | (cxx_eval_component_reference): Emit a different diagnostic when the | |
5311 | constructor element corresponding to a union member is NULL. | |
5312 | (cxx_eval_bare_aggregate): When constructing a union, always set the | |
5313 | active union member before evaluating the initializer. Relax assertion | |
5314 | that verifies the index of the constructor element we're initializing | |
5315 | hasn't been changed. | |
5316 | (cxx_eval_store_expression): Diagnose changing the active union member | |
5317 | while the union is in the process of being initialized. After setting | |
5318 | an active union member, clear CONSTRUCTOR_NO_CLEARING on the underlying | |
5319 | CONSTRUCTOR. | |
5320 | (cxx_eval_constant_expression) [PLACEHOLDER_EXPR]: Don't re-reduce a | |
5321 | CONSTRUCTOR returned by lookup_placeholder. | |
5322 | ||
828878c3 PP |
5323 | 2020-03-20 Patrick Palka <ppalka@redhat.com> |
5324 | ||
5325 | * cxx-pretty-print.c (pp_cxx_parameter_mapping): Make extern. Move | |
5326 | the "[with ]" bits to here from ... | |
5327 | (pp_cxx_atomic_constraint): ... here. | |
5328 | * cxx-pretty-print.h (pp_cxx_parameter_mapping): Declare. | |
5329 | * error.c (rebuild_concept_check): Delete. | |
5330 | (print_concept_check_info): Print the dependent form of the constraint and the | |
5331 | preferably substituted parameter mapping alongside it. | |
5332 | ||
94e24187 JM |
5333 | 2020-03-19 Jason Merrill <jason@redhat.com> |
5334 | ||
5335 | PR c++/94175 | |
5336 | * cp-gimplify.c (simple_empty_class_p): Look through | |
5337 | SIMPLE_TARGET_EXPR_P. | |
5338 | (cp_gimplify_expr) [MODIFY_EXPR]: Likewise. | |
5339 | [RETURN_EXPR]: Avoid producing 'return *retval;'. | |
5340 | * call.c (build_call_a): Strip TARGET_EXPR from empty class arg. | |
5341 | * cp-tree.h (SIMPLE_TARGET_EXPR_P): Check that TARGET_EXPR_INITIAL | |
5342 | is non-null. | |
5343 | ||
02f7334a JJ |
5344 | 2020-03-19 Jakub Jelinek <jakub@redhat.com> |
5345 | ||
5346 | PR c++/93931 | |
5347 | * parser.c (cp_parser_omp_var_list_no_open): Call process_outer_var_ref | |
5348 | on outer_automatic_var_p decls. | |
5349 | * cp-gimplify.c (cxx_omp_disregard_value_expr): Return true also for | |
5350 | capture proxy decls. | |
5351 | ||
11cf25c4 NS |
5352 | 2020-03-18 Nathan Sidwell <nathan@acm.org> |
5353 | ||
5354 | PR c++/94147 - mangling of lambdas assigned to globals | |
5355 | * parser.c (cp_parser_init_declarator): Namespace-scope variables | |
5356 | provide a lambda scope. | |
5357 | * tree.c (no_linkage_check): Lambdas with a variable for extra | |
5358 | scope have a linkage from the variable. | |
5359 | ||
af8656be JJ |
5360 | 2020-03-18 Jakub Jelinek <jakub@redhat.com> |
5361 | ||
d5029d45 JJ |
5362 | * constraint.cc (resolve_function_concept_check, subsumes_constraints, |
5363 | strictly_subsumes): Fix up duplicated word issue in a comment. | |
5364 | * coroutines.cc (build_init_or_final_await, captures_temporary): | |
5365 | Likewise. | |
5366 | * logic.cc (dnf_size_r, cnf_size_r): Likewise. | |
5367 | * pt.c (append_type_to_template_for_access_check): Likewise. | |
5368 | ||
af8656be JJ |
5369 | PR c++/91759 |
5370 | * decl.c (grokfndecl): Restore old diagnostics about deduction | |
5371 | guide declared in different scope if in_namespace is NULL_TREE. | |
5372 | ||
cd0b7124 JJ |
5373 | 2020-03-17 Jakub Jelinek <jakub@redhat.com> |
5374 | ||
5375 | PR c++/90995 | |
5376 | * parser.c (cp_parser_enum_specifier): Use temp_override for | |
5377 | parser->colon_corrects_to_scope_p, replace goto out with return. | |
5378 | If scoped enum or enum with underlying type is not followed by | |
5379 | { or ;, call cp_parser_commit_to_tentative_parse before calling | |
5380 | cp_parser_error and make sure to return error_mark_node instead of | |
5381 | NULL_TREE. Formatting fixes. | |
5382 | ||
887085be VV |
5383 | 2020-03-17 Ville Voutilainen <ville.voutilainen@gmail.com> |
5384 | ||
887085be | 5385 | PR c++/94197 |
1fef0148 | 5386 | * method.c (assignable_expr): Use cp_unevaluated. |
887085be VV |
5387 | (is_xible_helper): Push a non-deferred access check for |
5388 | the stub objects created by assignable_expr and constructible_expr. | |
5389 | ||
700d4cb0 JJ |
5390 | 2020-03-17 Jakub Jelinek <jakub@redhat.com> |
5391 | ||
5392 | * pt.c (tsubst): Fix up duplicated word issue in a diagnostic message. | |
5393 | (lookup_template_class_1, tsubst_expr): Fix up duplicated word issue | |
5394 | in a comment. | |
5395 | * parser.c (cp_parser_statement, cp_parser_linkage_specification, | |
5396 | cp_parser_placeholder_type_specifier, | |
5397 | cp_parser_constraint_requires_parens): Likewise. | |
5398 | * name-lookup.c (suggest_alternative_in_explicit_scope): Likewise. | |
5399 | ||
ced66da3 IS |
5400 | 2020-03-15 Iain Sandoe <iain@sandoe.co.uk> |
5401 | ||
5402 | * coroutines.cc (co_await_expander): Fix indentation. | |
5403 | ||
3a285529 JM |
5404 | 2020-03-14 Jason Merrill <jason@redhat.com> |
5405 | ||
5406 | PR c++/92068 | |
5407 | * pt.c (process_partial_specialization): Error rather than crash on | |
5408 | extra pack expansion. | |
5409 | ||
b3b0c671 JM |
5410 | 2020-03-14 Jason Merrill <jason@redhat.com> |
5411 | ||
5412 | PR c++/92909 | |
5413 | * pt.c (find_parameter_packs_r): [DECL_EXPR]: Walk | |
5414 | DECL_ORIGINAL_TYPE of a typedef. | |
5415 | ||
c393c99d JM |
5416 | 2020-03-14 Jason Merrill <jason@redhat.com> |
5417 | ||
5418 | PR c++/93248 | |
5419 | * pt.c (build_deduction_guide): Clear cp_unevaluated_operand for | |
5420 | substituting DECL_ARGUMENTS. | |
5421 | ||
53b28abf JJ |
5422 | 2020-03-14 Jakub Jelinek <jakub@redhat.com> |
5423 | ||
5424 | * logic.cc (formula::formula): Change "a an" to "an" in a comment. | |
5425 | * parser.c (cp_debug_parser): Change "a an" to "an" in a string | |
5426 | literal. | |
5427 | ||
80a13af7 PP |
5428 | 2020-03-13 Patrick Palka <ppalka@redhat.com> |
5429 | ||
5430 | PR c++/67960 | |
5431 | * call.c (build_over_call): Use a warning_sentinel to disable | |
5432 | warn_deprecated_decl before calling build_addr_func. | |
5433 | ||
4069adf4 JJ |
5434 | 2020-03-12 Jakub Jelinek <jakub@redhat.com> |
5435 | ||
5436 | PR c++/94124 | |
5437 | * decl.c (reshape_init_array_1): Don't unshare constructor if there | |
5438 | aren't any trailing zero elts, otherwise only unshare the first | |
5439 | nelts. | |
5440 | ||
bde31a76 JM |
5441 | 2020-03-11 Jason Merrill <jason@redhat.com> |
5442 | ||
5443 | PR c++/93907 | |
5444 | * constraint.cc (tsubst_parameter_mapping): Canonicalize type | |
5445 | argument. | |
5446 | ||
7eb5be6a MP |
5447 | 2020-03-11 Marek Polacek <polacek@redhat.com> |
5448 | Jason Merrill <jason@redhat.com> | |
5449 | ||
5450 | PR c++/94074 - wrong modifying const object error for COMPONENT_REF. | |
5451 | * constexpr.c (cref_has_const_field): New function. | |
5452 | (modifying_const_object_p): Consider a COMPONENT_REF | |
5453 | const only if any of its fields are const. | |
5454 | (cxx_eval_store_expression): Mark a CONSTRUCTOR of a const type | |
5455 | as readonly after its initialization has been done. | |
5456 | ||
e11d05c1 MP |
5457 | 2020-03-10 Marek Polacek <polacek@redhat.com> |
5458 | ||
5459 | PR c++/94124 - wrong conversion error with non-viable overload. | |
5460 | * decl.c (reshape_init_array_1): Unshare a constructor if we | |
5461 | stripped trailing zero-initializers. | |
5462 | ||
481fcfe6 JM |
5463 | 2020-03-10 Jason Merrill <jason@redhat.com> |
5464 | ||
5465 | PR c++/93901 | |
5466 | * pt.c (maybe_instantiate_noexcept): Always update clones. | |
5467 | ||
df15a828 JM |
5468 | 2020-03-10 Jason Merrill <jason@redhat.com> |
5469 | ||
4069adf4 | 5470 | PR c++/93596 |
df15a828 JM |
5471 | * pt.c (maybe_aggr_guide): Check BRACE_ENCLOSED_INITIALIZER_P. |
5472 | ||
14af5d9b JM |
5473 | 2020-03-10 Jason Merrill <jason@redhat.com> |
5474 | ||
5475 | PR c++/93922 | |
5476 | PR c++/94041 | |
5477 | PR c++/52320 | |
5478 | PR c++/66139 | |
5479 | * cp-gimplify.c (cp_gimplify_init_expr): Partially revert patch for | |
5480 | 66139: Don't split_nonconstant_init. Remove pre_p parameter. | |
5481 | ||
d417b4f5 MP |
5482 | 2020-03-09 Marek Polacek <polacek@redhat.com> |
5483 | ||
5484 | PR c++/92031 - bogus taking address of rvalue error. | |
5485 | PR c++/91465 - ICE with template codes in check_narrowing. | |
5486 | PR c++/93870 - wrong error when converting template non-type arg. | |
5487 | PR c++/94068 - ICE with template codes in check_narrowing. | |
5488 | * call.c (convert_like_real): Return IMPLICIT_CONV_EXPR | |
5489 | in a template when not ck_identity and we're dealing with a class. | |
5490 | (convert_like_real) <case ck_ref_bind>: Return IMPLICIT_CONV_EXPR | |
5491 | in a template if we need a temporary. | |
5492 | * decl.c (compute_array_index_type_loc): Remove | |
5493 | instantiate_non_dependent_expr_sfinae call. Call | |
5494 | fold_non_dependent_expr instead of maybe_constant_value. | |
5495 | (build_explicit_specifier): Don't instantiate or create a sentinel | |
5496 | before converting the expression. | |
5497 | * except.c (build_noexcept_spec): Likewise. | |
5498 | * pt.c (convert_nontype_argument): Don't build IMPLICIT_CONV_EXPR. | |
5499 | Set IMPLICIT_CONV_EXPR_NONTYPE_ARG if that's what | |
5500 | build_converted_constant_expr returned. | |
5501 | * typeck2.c (check_narrowing): Call fold_non_dependent_expr instead | |
5502 | of maybe_constant_value. | |
5503 | ||
81fa6d73 JJ |
5504 | 2020-03-09 Jakub Jelinek <jakub@redhat.com> |
5505 | ||
5506 | PR c++/94067 | |
5507 | Revert | |
5508 | 2019-10-11 Paolo Carlini <paolo.carlini@oracle.com> | |
5509 | ||
5510 | * constexpr.c (cxx_eval_constant_expression): Do not handle | |
5511 | RROTATE_EXPR and LROTATE_EXPR. | |
5512 | ||
8475f290 MP |
5513 | 2020-03-09 Marek Polacek <polacek@redhat.com> |
5514 | ||
5515 | PR c++/94050 - ABI issue with alignas on armv7hl. | |
5516 | * class.c (layout_class_type): Don't replace a class's | |
5517 | CLASSTYPE_AS_BASE if their TYPE_USER_ALIGN don't match. | |
5518 | ||
016d0f9e BC |
5519 | 2020-03-09 Bin Cheng <bin.cheng@linux.alibaba.com> |
5520 | ||
5521 | * coroutines.cc (build_actor_fn): Factor out code inserting the | |
5522 | default return_void call to... | |
5523 | (morph_fn_to_coro): ...here, also hoist local var declarations. | |
5524 | ||
ff0a6284 PP |
5525 | 2020-03-08 Patrick Palka <ppalka@redhat.com> |
5526 | ||
5e1b4e60 PP |
5527 | PR c++/93729 |
5528 | * call.c (convert_like_real): Check complain before emitting an error | |
5529 | about binding a bit-field to a reference. | |
5530 | ||
ff0a6284 PP |
5531 | * cxx-pretty-print.c (cxx_pretty_printer::simple_type_specifier) |
5532 | [TYPENAME_TYPE]: Print the TYPENAME_TYPE_FULLNAME instead of the | |
5533 | TYPE_NAME. | |
5534 | ||
191bcd0f NS |
5535 | 2020-03-06 Nathan Sidwell <nathan@acm.org> |
5536 | ||
5537 | PR c++/94027 | |
5538 | * mangle.c (find_substitution): Don't call same_type_p on template | |
5539 | args that cannot match. | |
5540 | ||
cb2409c6 MS |
5541 | 2020-03-04 Martin Sebor <msebor@redhat.com> |
5542 | ||
5543 | PR c++/90938 | |
5544 | * tree.c (type_initializer_zero_p): Fail for structs initialized | |
5545 | with non-structs. | |
5546 | ||
6876b269 JM |
5547 | 2020-03-04 Jason Merrill <jason@redhat.com> |
5548 | ||
5549 | PR c++/90432 | |
5550 | * init.c (perform_member_init): Don't do aggregate initialization of | |
5551 | empty field. | |
5552 | * constexpr.c (cx_check_missing_mem_inits): Don't enforce | |
5553 | initialization of empty field. | |
5554 | ||
2e032851 ML |
5555 | 2020-03-04 Martin Liska <mliska@suse.cz> |
5556 | ||
5557 | * method.c: Wrap array in ctor with braces in order | |
5558 | to silent clang warnings. | |
5559 | ||
6b3302da MP |
5560 | 2020-03-03 Jason Merrill <jason@redhat.com> |
5561 | Marek Polacek <polacek@redhat.com> | |
5562 | ||
5563 | PR c++/90505 - mismatch in template argument deduction. | |
5564 | * pt.c (tsubst): Don't reduce the template level of template | |
5565 | parameters when tf_partial. | |
5566 | ||
0e0ffbfc JJ |
5567 | 2020-03-03 Jakub Jelinek <jakub@redhat.com> |
5568 | ||
5569 | PR c++/93998 | |
5570 | * constexpr.c (cxx_eval_constant_expression) | |
5571 | <case TARGET_EXPR, case SAVE_EXPR>: Don't record anything if | |
5572 | *non_constant_p is true. | |
5573 | ||
5574 | 2020-03-03 Jun Ma <JunMa@linux.alibaba.com> | |
fd9e021c | 5575 | |
7f327e87 J |
5576 | * coroutines.cc (captures_temporary): Strip component_ref |
5577 | to its base object. | |
5578 | ||
e4658c7d | 5579 | 2020-03-03 Jun Ma <JunMa@linux.alibaba.com> |
7f327e87 | 5580 | |
fd9e021c J |
5581 | * coroutines.cc (finish_co_await_expr): Build co_await_expr |
5582 | with unknown_type_node. | |
5583 | (finish_co_yield_expr): Ditto. | |
5584 | *pt.c (type_dependent_expression_p): Set co_await/yield_expr | |
5585 | with unknown type as dependent. | |
5586 | ||
cd14f288 IS |
5587 | 2020-03-02 Iain Sandoe <iain@sandoe.co.uk> |
5588 | ||
5589 | * coroutines.cc (struct local_var_info): Adjust to remove the | |
5590 | reference to the captured var, and just to note that this is a | |
5591 | lambda capture proxy. | |
5592 | (transform_local_var_uses): Handle lambda captures specially. | |
5593 | (struct param_frame_data): Add a visited set. | |
5594 | (register_param_uses): Also check for param uses in lambda | |
5595 | capture proxies. | |
5596 | (struct local_vars_frame_data): Remove captures list. | |
5597 | (register_local_var_uses): Handle lambda capture proxies by | |
5598 | noting and bypassing them. | |
5599 | (morph_fn_to_coro): Update to remove lifetime extension of | |
5600 | lambda capture-by-copy vars. | |
5601 | ||
005530eb IS |
5602 | 2020-03-02 Iain Sandoe <iain@sandoe.co.uk> |
5603 | ||
5604 | * coroutines.cc (build_co_await): Do not build frame | |
5605 | awaitable proxy vars when the co_await expression is | |
5606 | a function parameter or local var. | |
5607 | (co_await_expander): Do not initialise a frame var with | |
5608 | itself. | |
5609 | (transform_await_expr): Only substitute the awaitable | |
5610 | frame var if it's needed. | |
5611 | (register_awaits): Do not make frame copies for param | |
5612 | or local vars that are awaitables. | |
5613 | ||
586b016c JM |
5614 | 2020-02-28 Jason Merrill <jason@redhat.com> |
5615 | ||
117baab8 JM |
5616 | Implement P2092R0, Disambiguating Nested-Requirements |
5617 | * parser.c (cp_parser_requirement_parameter_list): Pass | |
5618 | CP_PARSER_FLAGS_TYPENAME_OPTIONAL. | |
5619 | ||
586b016c JM |
5620 | * call.c (build_user_type_conversion_1): Don't look at the second |
5621 | conversion of a non-viable candidate. | |
5622 | ||
18396541 JJ |
5623 | 2020-02-28 Jakub Jelinek <jakub@redhat.com> |
5624 | ||
5625 | P1937R2 - Fixing inconsistencies between const{expr,eval} functions | |
5626 | * typeck.c (cp_build_addr_expr_1): Allow taking address of immediate | |
5627 | functions in unevaluated contexts. | |
5628 | ||
da5f369d NS |
5629 | 2020-02-27 Nathan Sidwell <nathan@acm.org> |
5630 | ||
9d2d2833 NS |
5631 | PR c++/93933 |
5632 | * pt.c (template_args_equal): Pass ARGUMENT_PACKS through to | |
5633 | cp_tree_equal. | |
5634 | * tree.c (cp_tree_equal): Compare ARGUMENT_PACKS here, | |
5635 | * typeck.c (comptypes): Assert we don't get any argument packs. | |
5636 | ||
da5f369d NS |
5637 | * class.c (adjust_clone_args): Correct arg-checking assert. |
5638 | * typeck.c (comptypes): Assert not nulls. | |
5639 | ||
1231f71f MP |
5640 | 2020-02-26 Marek Polacek <polacek@redhat.com> |
5641 | ||
5642 | PR c++/93789 - ICE with invalid array bounds. | |
5643 | * decl.c (compute_array_index_type_loc): Don't use the folded | |
5644 | size when folding cleared TREE_CONSTANT. | |
5645 | ||
dc192bbd IS |
5646 | 2020-02-26 Iain Sandoe <iain@sandoe.co.uk> |
5647 | ||
5648 | * class.c (classtype_has_non_deleted_copy_ctor): New. | |
5649 | * coroutines.cc (struct param_info): Keep track of params | |
5650 | that are references, and cache the original type and whether | |
5651 | the DTOR is trivial. | |
5652 | (build_actor_fn): Handle param copies always, and adjust the | |
5653 | handling for references. | |
5654 | (register_param_uses): Only handle uses here. | |
5655 | (classtype_has_non_deleted_copy_ctor): New. | |
5656 | (morph_fn_to_coro): Adjust param copy handling to match n4849 | |
5657 | by reordering ahead of the promise CTOR and always making a | |
5658 | frame copy, even if the param is unused in the coroutine body. | |
5659 | * cp-tree.h (classtype_has_non_deleted_copy_ctor): New. | |
5660 | ||
44f6b7fb PP |
5661 | 2020-02-26 Patrick Palka <ppalka@redhat.com> |
5662 | ||
5663 | * constraint.cc (finish_constraint_binary_op): Set expr's location range | |
5664 | to the range of its operands. | |
5665 | (satisfy_atom): Pass MAP instead of ARGS to diagnose_atomic_constraint. | |
5666 | (diagnose_trait_expr): Take the instantiated parameter mapping MAP | |
5667 | instead of the corresponding template arguments ARGS and adjust body | |
5668 | accordingly. | |
5669 | (diagnose_requires_expr): Likewise. | |
5670 | (diagnose_atomic_constraint): Likewise. When printing an atomic | |
5671 | constraint expression, print the instantiated parameter mapping | |
5672 | alongside it. | |
5673 | * cxx-pretty-print.cc (cxx_pretty_printer::expression) | |
5674 | [NONTYPE_ARGUMENT_PACK]: Print braces around a NONTYPE_ARGUMENT_PACK. | |
5675 | (cxx_pretty_printer::type_id): Handle TYPE_ARGUMENT_PACK. | |
5676 | ||
38e10026 MP |
5677 | 2020-02-26 Marek Polacek <polacek@redhat.com> |
5678 | ||
5679 | PR c++/93676 - value-init crash in template. | |
5680 | * init.c (build_new_1): Don't call build_vec_init in a template. | |
5681 | ||
4a305fa2 MP |
5682 | 2020-02-26 Marek Polacek <polacek@redhat.com> |
5683 | ||
5684 | PR c++/93862 - ICE with static_cast when converting from int[]. | |
5685 | * call.c (reference_compatible_p): No longer static. | |
5686 | * cp-tree.h (reference_compatible_p): Declare. | |
5687 | * typeck.c (build_static_cast_1): Use reference_compatible_p instead | |
5688 | of reference_related_p. | |
5689 | ||
d6ff2207 MP |
5690 | 2020-02-26 Marek Polacek <polacek@redhat.com> |
5691 | ||
5692 | PR c++/93803 - ICE with constexpr init and [[no_unique_address]]. | |
5693 | * constexpr.c (reduced_constant_expression_p): Don't crash on a null | |
5694 | field. | |
5695 | ||
b73547e4 MS |
5696 | 2020-02-24 Martin Sebor <msebor@redhat.com> |
5697 | ||
5698 | PR c++/93804 | |
5699 | * parser.c (cp_parser_check_class_key): Avoid issuing -Wredundant-tags | |
5700 | in shared C/C++ code in headers. | |
fb77bf1c | 5701 | Remove a duplicate hunk of code. |
b73547e4 | 5702 | |
cae5ff60 MP |
5703 | 2020-02-24 Marek Polacek <polacek@redhat.com> |
5704 | ||
5705 | PR c++/93869 - ICE with -Wmismatched-tags. | |
5706 | * parser.c (cp_parser_check_class_key): Check class_key earlier. | |
5707 | ||
b07c0855 MP |
5708 | 2020-02-24 Marek Polacek <polacek@redhat.com> |
5709 | ||
5710 | PR c++/93712 - ICE with ill-formed array list-initialization. | |
5711 | * call.c (next_conversion): Return NULL for ck_aggr. | |
5712 | (build_aggr_conv): Set u.expr instead of u.next. | |
5713 | (build_array_conv): Likewise. | |
5714 | (build_complex_conv): Likewise. | |
5715 | (conv_get_original_expr): Handle ck_aggr. | |
5716 | ||
fb6a8b23 JJ |
5717 | 2020-02-24 Jakub Jelinek <jakub@redhat.com> |
5718 | ||
5719 | P1937R2 - Fixing inconsistencies between const{expr,eval} functions | |
5720 | * call.c (build_over_call): Don't evaluate immediate functions in | |
5721 | unevaluated operands. | |
5722 | ||
32b8f5df JM |
5723 | 2020-02-24 Jason Merrill <jason@redhat.com> |
5724 | ||
5725 | P0780R2: Resolve lambda init-capture pack grammar. | |
5726 | * parser.c (cp_parser_lambda_introducer): Expect &...x=y rather than | |
5727 | ...&x=y. | |
5728 | ||
6cd5024c MP |
5729 | 2020-02-22 Marek Polacek <polacek@redhat.com> |
5730 | ||
5731 | PR c++/93882 | |
5732 | * decl.c (grokdeclarator): Use %qs in a diagnostic message. | |
5733 | ||
dbfba41e MS |
5734 | 2020-02-21 Martin Sebor <msebor@redhat.com> |
5735 | ||
5736 | PR gcov-profile/93753 | |
5737 | * class.c (check_flexarrays): Tighten up a test for potential members | |
5738 | of anonymous structs or unions. | |
5739 | ||
96cbc56e MS |
5740 | 2020-02-20 Martin Sebor <msebor@redhat.com> |
5741 | ||
5742 | PR c++/93801 | |
5743 | * parser.c (cp_parser_check_class_key): Only handle true C++ class-keys. | |
5744 | ||
4a172be3 ML |
5745 | 2020-02-20 Martin Liska <mliska@suse.cz> |
5746 | ||
5747 | PR translation/93841 | |
5748 | * config/or1k/or1k.opt: Remove superfluous word. | |
5749 | * doc/invoke.texi: Likewise. | |
5750 | ||
6c39d0b7 ML |
5751 | 2020-02-20 Martin Liska <mliska@suse.cz> |
5752 | ||
5753 | PR translation/93838 | |
5754 | * parser.c (cp_parser_decl_specifier_seq): Remove trailing space. | |
5755 | ||
8f9dd1b0 MP |
5756 | 2020-02-19 Marek Polacek <polacek@redhat.com> |
5757 | ||
5758 | PR c++/93169 - wrong-code with a non-constexpr constructor. | |
5759 | * constexpr.c (cxx_eval_call_expression): Only set TREE_READONLY | |
5760 | on constant CONSTRUCTORs. | |
5761 | ||
eef65c47 MP |
5762 | 2020-02-15 Marek Polacek <polacek@redhat.com> |
5763 | ||
5764 | PR c++/93710 - poor diagnostic for array initializer. | |
5765 | * call.c (build_user_type_conversion_1): Use cp_expr_loc_or_input_loc | |
5766 | for an error call. | |
5767 | ||
d7136542 JM |
5768 | 2020-02-15 Jason Merrill <jason@redhat.com> |
5769 | ||
1e166191 JM |
5770 | PR c++/92556 |
5771 | * pt.c (any_template_parm_r): Look into lambda body. | |
5772 | ||
d7136542 JM |
5773 | PR c++/92583 |
5774 | * pt.c (any_template_parm_r): Remove CONSTRUCTOR handling. | |
5775 | ||
994e0ad4 JJ |
5776 | 2020-02-14 Jakub Jelinek <jakub@redhat.com> |
5777 | ||
519a33f9 JJ |
5778 | PR c++/61414 |
5779 | * class.c (enum_min_precision): Change prec type from int to int &. | |
5780 | ||
994e0ad4 JJ |
5781 | PR libstdc++/92906 |
5782 | * cp-tree.h (enum cp_tree_index): Add CPTI_FALLBACK_DFLOAT32_TYPE, | |
5783 | CPTI_FALLBACK_DFLOAT64_TYPE and CPTI_FALLBACK_DFLOAT128_TYPE. | |
5784 | (fallback_dfloat32_type, fallback_dfloat64_type, | |
5785 | fallback_dfloat128_type): Define. | |
5786 | * mangle.c (write_builtin_type): Handle fallback_dfloat*_type like | |
5787 | dfloat*_type_node. | |
5788 | * rtti.c (emit_support_tinfos): Emit DFP typeinfos even when dfp | |
5789 | is disabled for compatibility. | |
5790 | ||
abc79c64 JM |
5791 | 2020-02-13 Jason Merrill <jason@redhat.com> |
5792 | ||
9a0c4f5b JM |
5793 | PR c++/93713 |
5794 | * name-lookup.c (matching_fn_p): A function does not match a | |
5795 | template. | |
5796 | ||
abc79c64 JM |
5797 | PR c++/93643 |
5798 | PR c++/91476 | |
5799 | * tree.c (decl_linkage): Always lk_none for locals. | |
5800 | ||
c2368db5 JM |
5801 | 2020-02-12 Jason Merrill <jason@redhat.com> |
5802 | ||
5803 | PR c++/92583 | |
5804 | PR c++/92654 | |
5805 | * tree.c (cp_walk_subtrees): Walk CONSTRUCTOR types here. | |
5806 | * pt.c (find_parameter_packs_r): Not here. | |
5807 | ||
e4658c7d | 5808 | 2020-02-12 Iain Sandoe <iain@sandoe.co.uk> |
68bb7e3b IS |
5809 | |
5810 | * coroutines.cc (build_actor_fn): Implement deallocation function | |
5811 | selection per n4849, dcl.fct.def.coroutine bullet 12. | |
5812 | (morph_fn_to_coro): Implement allocation function selection per | |
5813 | n4849, dcl.fct.def.coroutine bullets 9 and 10. | |
5814 | ||
e428a9cf MP |
5815 | 2020-02-12 Marek Polacek <polacek@redhat.com> |
5816 | ||
5817 | PR c++/93684 - ICE-on-invalid with broken attribute. | |
5818 | * parser.c (cp_parser_std_attribute): Peek a token first before | |
5819 | consuming it. | |
5820 | ||
d6ef77e0 JM |
5821 | 2020-02-11 Jason Merrill <jason@redhat.com> |
5822 | ||
5823 | PR c++/93675 | |
5824 | * class.c (add_implicitly_declared_members): Use do_friend. | |
5825 | * method.c (implicitly_declare_fn): Fix friend handling. | |
5826 | (decl_remember_implicit_trigger_p): New. | |
5827 | (synthesize_method): Use it. | |
5828 | * decl2.c (mark_used): Use it. | |
5829 | ||
dfffecb8 JM |
5830 | 2020-02-11 Jason Merrill <jason@redhat.com> |
5831 | ||
5832 | PR c++/93650 | |
5833 | PR c++/90691 | |
5834 | * constexpr.c (maybe_constant_value): Correct earlier change. | |
5835 | (cxx_eval_binary_expression) [SPACESHIP_EXPR]: Pass lval through. | |
5836 | * method.c (genericize_spaceship): Wrap result in TARGET_EXPR. | |
5837 | ||
91f4fc40 PP |
5838 | 2020-02-12 Patrick Palka <ppalka@redhat.com> |
5839 | ||
a6ee556c PP |
5840 | PR c++/69448 |
5841 | PR c++/80471 | |
5842 | * type-utils.h (find_type_usage): Refactor to take a tree * and to | |
5843 | return a tree *, and update documentation accordingly. | |
5844 | * pt.c (make_auto_1): Set AUTO_IS_DECLTYPE when building a | |
5845 | decltype(auto) node. | |
5846 | (make_constrained_decltype_auto): No need to explicitly set | |
5847 | AUTO_IS_DECLTYPE anymore. | |
5848 | (splice_late_return_type): Use find_type_usage to find and | |
5849 | replace a possibly nested auto node instead of using is_auto. | |
5850 | Check test for is_auto into an assert when deciding whether | |
5851 | to late_return_type. | |
5852 | (type_uses_auto): Adjust the call to find_type_usage. | |
5853 | * parser.c (cp_parser_decltype): No need to explicitly set | |
5854 | AUTO_IS_DECLTYPE anymore. | |
5855 | ||
91f4fc40 PP |
5856 | * error.c (dump_decl) [CONCEPT_DECL]: Use dump_simple_decl. |
5857 | (dump_simple_decl): Handle standard concept definitions as well as | |
5858 | variable concept definitions. | |
5859 | ||
13686ece JJ |
5860 | 2020-02-10 Jakub Jelinek <jakub@redhat.com> |
5861 | ||
5862 | PR other/93641 | |
5863 | * error.c (dump_decl_name): Fix up last argument to strncmp. | |
5864 | ||
59dbb04d JM |
5865 | 2020-02-10 Jason Merrill <jason@redhat.com> |
5866 | ||
5867 | PR c++/93618 | |
5868 | * tree.c (array_of_unknown_bound_p): New. | |
5869 | * init.c (perform_member_init): Do nothing for flexible arrays. | |
5870 | ||
81958cd6 JJ |
5871 | 2020-02-09 Jakub Jelinek <jakub@redhat.com> |
5872 | ||
5873 | PR c++/93633 | |
5874 | * constexpr.c (cxx_eval_constant_expression): If obj is heap var with | |
5875 | ARRAY_TYPE, use the element type. Punt if objtype after that is not | |
5876 | a class type. | |
5877 | ||
c151a342 JM |
5878 | 2020-02-08 Jason Merrill <jason@redhat.com> |
5879 | ||
aaa26bf4 JM |
5880 | PR c++/90691 |
5881 | * expr.c (fold_for_warn): Call maybe_constant_value. | |
5882 | * constexpr.c (struct constexpr_ctx): Add uid_sensitive bit-field. | |
5883 | (maybe_constant_value): Add uid_sensitive parm. | |
5884 | (get_fundef_copy): Don't copy if it's true. | |
5885 | (cxx_eval_call_expression): Don't instantiate if it's true. | |
5886 | (cxx_eval_outermost_constant_expr): Likewise. | |
5887 | ||
173c8def JM |
5888 | PR c++/92852 |
5889 | * constexpr.c (maybe_constant_value): Don't unshare if the cached | |
5890 | value is the same as the argument. | |
5891 | ||
61f5369f JM |
5892 | * typeck.c (maybe_warn_about_returning_address_of_local): Add |
5893 | location parameter. | |
5894 | ||
c151a342 JM |
5895 | * typeck2.c (process_init_constructor): Also clear TREE_SIDE_EFFECTS |
5896 | if appropriate. | |
5897 | ||
c7c09af8 JJ |
5898 | 2020-02-08 Jakub Jelinek <jakub@redhat.com> |
5899 | ||
5900 | PR c++/93549 | |
5901 | * constexpr.c (find_array_ctor_elt): If last element has no index, | |
5902 | for flag_checking verify all elts have no index. If i is within the | |
5903 | elts, return it directly, if it is right after the last elt, append | |
5904 | if NULL index, otherwise force indexes on all elts. | |
5905 | (cxx_eval_store_expression): Allow cep->index to be NULL. | |
5906 | ||
ac6eaa55 MP |
5907 | 2020-02-07 Marek Polacek <polacek@redhat.com> |
5908 | ||
5909 | PR c++/92947 - Paren init of aggregates in unevaluated context. | |
5910 | * call.c (build_new_method_call_1): Don't check | |
5911 | cp_unevaluated_operand. Check the return value of digest_init. | |
5912 | ||
1e042b39 JM |
5913 | 2020-02-06 Jason Merrill <jason@redhat.com> |
5914 | ||
5915 | PR c++/92654 | |
5916 | * tree.c (cp_walk_subtrees): Walk into type template arguments. | |
5917 | * cp-tree.h (TYPE_TEMPLATE_INFO_MAYBE_ALIAS): Use typedef_variant_p | |
5918 | instead of TYPE_ALIAS_P. | |
5919 | * pt.c (push_template_decl_real): Likewise. | |
5920 | (find_parameter_packs_r): Likewise. Remove dead code. | |
5921 | * error.c (find_typenames_r): Remove dead code. | |
5922 | ||
82aee6dd JM |
5923 | 2020-02-06 Jason Merrill <jason@redhat.com> |
5924 | ||
5925 | PR c++/92517 | |
5926 | * parser.c (cp_parser_constraint_primary_expression): Do the main | |
5927 | parse non-tentatively. | |
5928 | ||
4a136a21 MP |
5929 | 2020-02-06 Marek Polacek <polacek@redhat.com> |
5930 | ||
5931 | PR c++/93597 - ICE with lambda in operator function. | |
5932 | * name-lookup.c (maybe_save_operator_binding): Check is_overloaded_fn. | |
5933 | ||
f6bef097 JM |
5934 | 2020-02-05 Jason Merrill <jason@redhat.com> |
5935 | ||
5936 | PR c++/93140 | |
5937 | * pt.c (tsubst_decl) [PARM_DECL]: Check cp_unevaluated_operand in | |
5938 | handling of TREE_CHAIN for empty pack. | |
5939 | ||
f214002b MP |
5940 | 2020-02-05 Jakub Jelinek <jakub@redhat.com> |
5941 | ||
5942 | PR c++/93557 | |
5943 | * semantics.c (cp_build_vec_convert): Call decay_conversion on arg | |
5944 | prior to passing it to c_build_vec_convert. | |
5945 | ||
78c4eb1c MP |
5946 | 2020-02-05 Marek Polacek <polacek@redhat.com> |
5947 | ||
5948 | PR c++/93559 - ICE with CONSTRUCTOR flags verification. | |
5949 | * decl.c (reshape_init_array_1): Don't reuse a CONSTRUCTOR with | |
5950 | TREE_SIDE_EFFECTS. | |
5951 | ||
fa0c6e29 JM |
5952 | 2020-02-05 Jason Merrill <jason@redhat.com> |
5953 | ||
5954 | PR c++/92593 | |
5955 | * decl.c (grokdeclarator): Reject field of current class type even | |
5956 | in a template. | |
5957 | ||
a2155f7d BC |
5958 | 2020-02-05 Bin Cheng <bin.cheng@linux.alibaba.com> |
5959 | ||
5960 | * coroutines.cc (maybe_promote_captured_temps): Increase the index | |
5961 | number for temporary variables' name. | |
5962 | ||
e4658c7d | 5963 | 2020-02-05 Jun Ma <JunMa@linux.alibaba.com> |
3ef39186 J |
5964 | |
5965 | * coroutines.cc (build_co_await): Call convert_from_reference | |
5966 | to wrap co_await_expr with indirect_ref which avoid | |
5967 | reference/non-reference type confusion. | |
5968 | ||
5969 | (co_await_expander): Sink to call_expr if await_resume | |
5970 | is wrapped by indirect_ref. | |
5971 | ||
a1c9c9ff JM |
5972 | 2020-02-04 Jason Merrill <jason@redhat.com> |
5973 | ||
85409531 JM |
5974 | PR c++/93551 |
5975 | * constraint.cc (satisfy_declaration_constraints): Check return | |
5976 | value of push_tinst_level. | |
5977 | ||
0712ea63 JM |
5978 | PR c++/90951 |
5979 | * constexpr.c (cxx_eval_array_reference): {}-initialize missing | |
5980 | elements instead of value-initializing them. | |
5981 | ||
a1c9c9ff JM |
5982 | PR c++/86917 |
5983 | * init.c (perform_member_init): Simplify. | |
5984 | * constexpr.c (cx_check_missing_mem_inits): Allow uninitialized | |
5985 | flexarray. | |
5986 | (cxx_eval_vec_init_1): Handle CONSTRUCTOR. | |
5987 | ||
5bc9d2f5 IS |
5988 | 2020-02-04 Iain Sandoe <iain@sandoe.co.uk> |
5989 | ||
5990 | * coroutines.cc (find_promise_type): Delete unused forward | |
5991 | declaration. | |
5992 | (struct coroutine_info): Add a bool for no promise type error. | |
5993 | (coro_promise_type_found_p): Only emit the error for a missing | |
5994 | promise once in each affected coroutine. | |
5995 | ||
87fbd534 JM |
5996 | 2020-02-03 Jason Merrill <jason@redhat.com> |
5997 | ||
5998 | PR c++/66477 | |
5999 | * constexpr.c (cxx_eval_constant_expression) [PARM_DECL]: Don't | |
6000 | defer loading the value of a reference. | |
6001 | ||
8fda2c27 JM |
6002 | 2020-02-03 Jason Merrill <jason@redhat.com> |
6003 | ||
6004 | PR c++/91953 | |
6005 | * constexpr.c (potential_constant_expression_1) [PARM_DECL]: Allow | |
6006 | empty class type. | |
6007 | [COMPONENT_REF]: A member function reference doesn't use the object | |
6008 | as an rvalue. | |
6009 | ||
d60c25fa IS |
6010 | 2020-02-03 Iain Sandoe <iain@sandoe.co.uk> |
6011 | ||
6012 | PR c++/93458 | |
6013 | * coroutines.cc (struct coroutine_info): Add a bool flag to note | |
6014 | that we emitted an error for a bad function return type. | |
6015 | (get_coroutine_info): Tolerate an unset info table in case of | |
6016 | missing traits. | |
6017 | (find_coro_traits_template_decl): In case of error or if we didn't | |
6018 | find a type template, note we emitted the error and suppress | |
6019 | duplicates. | |
6020 | (find_coro_handle_template_decl): Likewise. | |
6021 | (instantiate_coro_traits): Only check for error_mark_node in the | |
6022 | return from lookup_qualified_name. | |
6023 | (coro_promise_type_found_p): Reorder initialization so that we check | |
6024 | for the traits and their usability before allocation of the info | |
6025 | table. Check for a suitable return type and emit a diagnostic for | |
6026 | here instead of relying on the lookup machinery. This allows the | |
6027 | error to have a better location, and means we can suppress multiple | |
6028 | copies. | |
6029 | (coro_function_valid_p): Re-check for a valid promise (and thus the | |
6030 | traits) before proceeding. Tolerate missing info as a fatal error. | |
6031 | ||
3539fc13 JM |
6032 | 2020-02-03 Jason Merrill <jason@redhat.com> |
6033 | ||
6034 | PR c++/88256 | |
6035 | * cp-gimplify.c (predeclare_vla): New. | |
6036 | (cp_genericize_r) [NOP_EXPR]: Call it. | |
6037 | ||
e4658c7d | 6038 | 2020-02-03 Jun Ma <JunMa@linux.alibaba.com> |
c3ccce5b J |
6039 | |
6040 | * coroutines.cc (transform_await_wrapper): Set actor funcion as | |
6041 | new context of label_decl. | |
6042 | (build_actor_fn): Fill new field of await_xform_data. | |
6043 | ||
b817be03 MP |
6044 | 2020-02-02 Marek Polacek <polacek@redhat.com> |
6045 | ||
6046 | PR c++/93530 - ICE on invalid alignas in a template. | |
6047 | * decl.c (grokdeclarator): Call cplus_decl_attributes instead of | |
6048 | decl_attributes. | |
6049 | ||
d2b9548f JM |
6050 | 2020-01-31 Jason Merrill <jason@redhat.com> |
6051 | ||
00a49cd8 JM |
6052 | PR c++/86216 |
6053 | * semantics.c (process_outer_var_ref): Capture VLAs even in | |
6054 | unevaluated context. | |
6055 | ||
e98ebda0 JM |
6056 | PR c++/14179 |
6057 | * decl.c (reshape_init_array_1): Reuse a single CONSTRUCTOR with | |
6058 | non-aggregate elements. | |
6059 | (reshape_init_array): Add first_initializer_p parm. | |
6060 | (reshape_init_r): Change first_initializer_p from bool to tree. | |
6061 | (reshape_init): Pass init to it. | |
6062 | ||
d2b9548f JM |
6063 | PR c++/14179 |
6064 | * parser.c (cp_parser_initializer_list): Suppress location wrappers | |
6065 | after 256 elements. | |
6066 | ||
4dd468a0 JM |
6067 | 2020-01-29 Jason Merrill <jason@redhat.com> |
6068 | ||
6069 | PR c++/82521 | |
6070 | * pt.c (tsubst_copy_and_build) [EQ_EXPR]: Only suppress warnings if | |
6071 | the expression was dependent before substitution. | |
6072 | ||
3904cc10 BC |
6073 | 2020-01-30 Bin Cheng <bin.cheng@linux.alibaba.com> |
6074 | ||
6075 | * coroutines.cc (act_des_fn): New. | |
6076 | (morph_fn_to_coro): Call act_des_fn to build actor/destroy decls. | |
6077 | Access promise via actor function's frame pointer argument. | |
6078 | (build_actor_fn, build_destroy_fn): Use frame pointer argument. | |
6079 | ||
3b35b3d4 BC |
6080 | 2020-01-30 Bin Cheng <bin.cheng@linux.alibaba.com> |
6081 | ||
6082 | * coroutines.cc (co_await_expander): Handle type conversion case. | |
6083 | ||
245e40af JM |
6084 | 2020-01-29 Jason Merrill <jason@redhat.com> |
6085 | ||
6086 | PR c++/90333 | |
6087 | PR c++/89640 | |
6088 | PR c++/60503 | |
6089 | * parser.c (cp_parser_type_specifier_seq): Don't parse attributes in | |
6090 | a trailing return type. | |
6091 | (cp_parser_lambda_declarator_opt): Parse C++11 attributes before | |
6092 | parens. | |
6093 | ||
e3b60da8 MP |
6094 | 2020-01-29 Marek Polacek <polacek@redhat.com> |
6095 | ||
6096 | PR c++/91754 - Fix template arguments comparison with class NTTP. | |
6097 | * pt.c (class_nttp_const_wrapper_p): New. | |
6098 | (template_args_equal): See through class_nttp_const_wrapper_p | |
6099 | arguments. | |
6100 | ||
42328405 MP |
6101 | 2020-01-29 Marek Polacek <polacek@redhat.com> |
6102 | ||
6103 | PR c++/92948 - Fix class NTTP with template arguments. | |
6104 | * pt.c (convert_nontype_argument): Use IMPLICIT_CONV_EXPR when | |
6105 | converting a value-dependent expression to a class type. | |
6106 | (tsubst_copy) <case VIEW_CONVERT_EXPR>: Allow IMPLICIT_CONV_EXPR | |
6107 | as the result of the tsubst_copy call. | |
6108 | ||
8d7c0bf8 JJ |
6109 | 2020-01-29 Jakub Jelinek <jakub@redhat.com> |
6110 | ||
6111 | PR c++/91118 | |
6112 | * cp-gimplify.c (cxx_omp_predetermined_sharing): Return | |
6113 | OMP_CLAUSE_DEFAULT_SHARED for typeinfo decls. | |
6114 | ||
0968f7da JM |
6115 | 2020-01-28 Jason Merrill <jason@redhat.com> |
6116 | ||
a4b4b1e3 JM |
6117 | PR c++/93442 |
6118 | * parser.c (cp_parser_lambda_expression): Clear in_discarded_stmt. | |
6119 | ||
25d62480 JM |
6120 | PR c++/93477 |
6121 | PR c++/91476 | |
6122 | * decl2.c (copy_linkage): Do copy DECL_ONE_ONLY and DECL_WEAK. | |
6123 | ||
14e320db JM |
6124 | PR c++/90546 |
6125 | * call.c (build_user_type_conversion_1): Allow a template conversion | |
6126 | returning an rvalue reference to bind directly to an lvalue. | |
6127 | ||
0968f7da JM |
6128 | PR c++/90731 |
6129 | * decl.c (grokdeclarator): Propagate eh spec from typedef. | |
6130 | ||
1d859307 ML |
6131 | 2020-01-28 Martin Liska <mliska@suse.cz> |
6132 | ||
6133 | PR c++/92440 | |
6134 | * pt.c (redeclare_class_template): Group couple of | |
6135 | errors and inform messages with auto_diagnostic_group. | |
6136 | ||
d3c00969 ML |
6137 | 2020-01-28 Martin Liska <mliska@suse.cz> |
6138 | ||
6139 | PR c++/92440 | |
6140 | * pt.c (redeclare_class_template): Use inform | |
6141 | for the second location. | |
6142 | ||
8f25c39c JM |
6143 | 2020-01-27 Jason Merrill <jason@redhat.com> |
6144 | ||
6145 | PR c++/90966 | |
6146 | * pt.c (tsubst_copy) [STRING_CST]: Don't use fold_convert. | |
6147 | ||
1f2e8423 IS |
6148 | 2020-01-27 Iain Sandoe <iain@sandoe.co.uk> |
6149 | ||
6150 | PR c++/93443 | |
6151 | * coroutines.cc (morph_fn_to_coro): Check the ramp return | |
6152 | value when it is constructed from the 'get return object'. | |
6153 | ||
feaa1640 NS |
6154 | 2020-01-27 Nathan Sidwell <nathan@acm.org> |
6155 | ||
6156 | PR c++/91826 | |
6157 | * name-lookup.c (is_ancestor): Allow CHILD to be a namespace alias. | |
6158 | ||
da11ffbb JM |
6159 | 2020-01-26 Jason Merrill <jason@redhat.com> |
6160 | ||
5035cd66 JM |
6161 | PR c++/90992 |
6162 | * except.c (maybe_noexcept_warning): Check DECL_IN_SYSTEM_HEADER and | |
6163 | temporarily enable -Wsystem-headers. Change second warning to | |
6164 | conditional inform. | |
6165 | ||
da11ffbb JM |
6166 | PR c++/90997 |
6167 | * semantics.c (finish_call_expr): Don't call | |
6168 | instantiate_non_dependent_expr before warn_for_memset. | |
6169 | ||
de0684bf MP |
6170 | 2020-01-25 Marek Polacek <polacek@redhat.com> |
6171 | ||
6172 | PR c++/93414 - poor diagnostic for dynamic_cast in constexpr context. | |
6173 | * constexpr.c (cxx_eval_dynamic_cast_fn): Add a reference | |
6174 | dynamic_cast diagnostic. | |
6175 | ||
9c1179c3 JM |
6176 | 2020-01-24 Jason Merrill <jason@redhat.com> |
6177 | ||
6178 | PR c++/93400 - ICE with constrained friend. | |
6179 | * constraint.cc (maybe_substitute_reqs_for): New. | |
6180 | * decl.c (function_requirements_equivalent_p): Call it. | |
6181 | * pt.c (tsubst_friend_function): Only substitute | |
6182 | TEMPLATE_PARMS_CONSTRAINTS. | |
6183 | (tsubst_template_parms): Copy constraints. | |
6184 | ||
8b91e848 JM |
6185 | 2020-01-24 Jason Merrill <jason@redhat.com> |
6186 | ||
6187 | PR c++/93279 - ICE with lambda in member operator. | |
6188 | * name-lookup.c (maybe_save_operator_binding): Don't remember | |
6189 | class-scope bindings. | |
6190 | ||
55dd4453 JM |
6191 | 2020-01-24 Jason Merrill <jason@redhat.com> |
6192 | ||
6193 | PR c++/93377 - ICE with member alias in constraint. | |
6194 | * pt.c (any_template_parm_r): Look at template arguments for all | |
6195 | aliases, not only alias templates. | |
6196 | ||
d54a86cd MP |
6197 | 2020-01-24 Marek Polacek <polacek@redhat.com> |
6198 | ||
6199 | PR c++/93299 - ICE in tsubst_copy with parenthesized expression. | |
6200 | * pt.c (tsubst_copy): Handle a REF_PARENTHESIZED_P VIEW_CONVERT_EXPR. | |
6201 | ||
28a5d5c3 JM |
6202 | 2020-01-24 Jason Merrill <jason@redhat.com> |
6203 | ||
6204 | PR c++/92852 - ICE with generic lambda and reference var. | |
6205 | * constexpr.c (maybe_constant_value): Likewise. | |
6206 | ||
c9107224 PC |
6207 | 2020-01-23 Paolo Carlini <paolo.carlini@oracle.com> |
6208 | ||
6209 | PR c++/92804 | |
6210 | * parser.c (cp_parser_nested_name_specifier_opt): Properly | |
6211 | diagnose concept-ids. | |
6212 | ||
20afdcd3 JM |
6213 | 2020-01-23 Jason Merrill <jason@redhat.com> |
6214 | ||
6f346913 JM |
6215 | PR c++/93331 - ICE with __builtin_strchr. |
6216 | * constexpr.c (cxx_eval_builtin_function_call): Use the original | |
6217 | argument if we didn't manage to extract a STRING_CST. | |
6218 | ||
20afdcd3 JM |
6219 | PR c++/93345 - ICE with defaulted dtor and template. |
6220 | PR c++/33799 | |
6221 | * decl.c (cxx_maybe_build_cleanup): Don't try to set | |
6222 | throwing_cleanup in a template. | |
6223 | ||
e1fd0408 MP |
6224 | 2020-01-22 Marek Polacek <polacek@redhat.com> |
6225 | ||
6226 | PR c++/92907 - noexcept does not consider "const" in member functions. | |
6227 | * g++.dg/cpp0x/noexcept56.C: New test. | |
6228 | ||
15ed55ea MP |
6229 | 2020-01-22 Marek Polacek <polacek@redhat.com> |
6230 | ||
6231 | PR c++/93324 - ICE with -Wall on constexpr if. | |
6232 | * semantics.c (is_std_constant_evaluated_p): Check fndecl. | |
6233 | ||
bf91504d PP |
6234 | 2020-01-22 Patrick Palka <ppalka@redhat.com> |
6235 | ||
6236 | * constraint.cc (get_mapped_args): Avoid using auto_vec | |
6237 | as a vector element. Release the vectors inside the lists | |
6238 | vector. | |
6239 | * parser.c (cp_literal_operator_id): Free the buffer. | |
6240 | ||
44a9d801 | 6241 | 2020-01-22 Jun Ma <JunMa@linux.alibaba.com> |
6ac6529e J |
6242 | |
6243 | * coroutines.cc (finish_co_await_expr): Add error check on return | |
6244 | value of build_co_await. | |
6245 | (finish_co_yield_expr,): Ditto. | |
6246 | ||
44a9d801 | 6247 | 2020-01-22 Jun Ma <JunMa@linux.alibaba.com> |
c75199b7 J |
6248 | |
6249 | * coroutines.cc (lookup_awaitable_member): Lookup an awaitable member. | |
6250 | (lookup_promise_method): Emit diagnostic when get NULL_TREE back only. | |
6251 | (build_co_await): Use lookup_awaitable_member instead of lookup_member. | |
6252 | ||
27626519 JM |
6253 | 2020-01-21 Jason Merrill <jason@redhat.com> |
6254 | ||
ad09440a JM |
6255 | PR c++/60855 - ICE with sizeof VLA capture. |
6256 | * lambda.c (is_lambda_ignored_entity): Don't look past VLA capture. | |
6257 | ||
27626519 JM |
6258 | PR c++/90732 - ICE with VLA capture and generic lambda. |
6259 | * pt.c (tsubst_lambda_expr): Repeat add_capture for VLAs. | |
6260 | ||
a312c801 IS |
6261 | 2020-01-21 Iain Sandoe <iain@sandoe.co.uk> |
6262 | Bin Cheng <bin.cheng@linux.alibaba.com> | |
6263 | ||
6264 | * coroutines.cc (coro_promise_type_found_p): Check for NULL return | |
6265 | from complete_type_or_else. | |
6266 | (register_param_uses): Likewise. | |
6267 | (build_co_await): Do not try to use complete_type_or_else for void | |
6268 | types, otherwise for incomplete types, check for NULL return from | |
6269 | complete_type_or_else. | |
6270 | ||
8158a464 JM |
6271 | 2020-01-21 Jason Merrill <jason@redhat.com> |
6272 | ||
6273 | PR c++/91476 - anon-namespace reference temp clash between TUs. | |
6274 | * decl2.c (copy_linkage): Factor out of get_guard. | |
6275 | * call.c (make_temporary_var_for_ref_to_temp): Use it. | |
6276 | * decl.c (cp_finish_decomp): Use it. | |
6277 | (cp_finish_decl): determine_visibility sooner. | |
6278 | ||
b313d3c4 BC |
6279 | 2020-01-21 Bin Cheng <bin.cheng@linux.alibaba.com> |
6280 | ||
6281 | * coroutines.cc (finish_co_await_expr): Set return value flag. | |
6282 | (finish_co_yield_expr, morph_fn_to_coro): Ditto. | |
6283 | ||
303484a7 JM |
6284 | 2020-01-19 Jason Merrill <jason@redhat.com> |
6285 | ||
bcfc2227 JM |
6286 | PR c++/33799 - destroy return value, take 2. |
6287 | * cp-tree.h (current_retval_sentinel): New macro. | |
6288 | (struct language_function): Add throwing_cleanup bitfield. | |
6289 | * decl.c (cxx_maybe_build_cleanup): Set it. | |
6290 | * except.c (maybe_set_retval_sentinel) | |
6291 | (maybe_splice_retval_cleanup): New functions. | |
6292 | * parser.c (cp_parser_compound_statement): Call | |
6293 | maybe_splice_retval_cleanup. | |
6294 | * typeck.c (check_return_expr): Call maybe_set_retval_sentinel. | |
6295 | ||
303484a7 JM |
6296 | * parser.c (cp_parser_lambda_body): Use cp_parser_function_body. |
6297 | ||
dba33cb7 JJ |
6298 | 2020-01-18 Jakub Jelinek <jakub@redhat.com> |
6299 | ||
6300 | * coroutines.cc (get_fn_local_identifier): Fix NO_DOT_IN_LABEL | |
6301 | but non-NO_DOLLAR_IN_LABEL case build. | |
6302 | ||
49789fd0 IS |
6303 | 2020-01-18 Iain Sandoe <iain@sandoe.co.uk> |
6304 | ||
6305 | * Make-lang.in: Add coroutines.o. | |
6306 | * cp-tree.h (lang_decl-fn): coroutine_p, new bit. | |
6307 | (DECL_COROUTINE_P): New. | |
6308 | * lex.c (init_reswords): Enable keywords when the coroutine flag | |
6309 | is set, | |
6310 | * operators.def (co_await): New operator. | |
6311 | * call.c (add_builtin_candidates): Handle CO_AWAIT_EXPR. | |
6312 | (op_error): Likewise. | |
6313 | (build_new_op_1): Likewise. | |
6314 | (build_new_function_call): Validate coroutine builtin arguments. | |
6315 | * constexpr.c (potential_constant_expression_1): Handle | |
6316 | CO_AWAIT_EXPR, CO_YIELD_EXPR, CO_RETURN_EXPR. | |
6317 | * coroutines.cc: New file. | |
6318 | * cp-objcp-common.c (cp_common_init_ts): Add CO_AWAIT_EXPR, | |
6319 | CO_YIELD_EXPR, CO_RETRN_EXPR as TS expressions. | |
6320 | * cp-tree.def (CO_AWAIT_EXPR, CO_YIELD_EXPR, (CO_RETURN_EXPR): New. | |
6321 | * cp-tree.h (coro_validate_builtin_call): New. | |
6322 | * decl.c (emit_coro_helper): New. | |
6323 | (finish_function): Handle the case when a function is found to | |
6324 | be a coroutine, perform the outlining and emit the outlined | |
6325 | functions. Set a bit to signal that this is a coroutine component. | |
6326 | * parser.c (enum required_token): New enumeration RT_CO_YIELD. | |
6327 | (cp_parser_unary_expression): Handle co_await. | |
6328 | (cp_parser_assignment_expression): Handle co_yield. | |
6329 | (cp_parser_statement): Handle RID_CO_RETURN. | |
6330 | (cp_parser_jump_statement): Handle co_return. | |
6331 | (cp_parser_operator): Handle co_await operator. | |
6332 | (cp_parser_yield_expression): New. | |
6333 | (cp_parser_required_error): Handle RT_CO_YIELD. | |
6334 | * pt.c (tsubst_copy): Handle CO_AWAIT_EXPR. | |
6335 | (tsubst_expr): Handle CO_AWAIT_EXPR, CO_YIELD_EXPR and | |
6336 | CO_RETURN_EXPRs. | |
6337 | * tree.c (cp_walk_subtrees): Likewise. | |
6338 | ||
eff9c61d JM |
6339 | 2020-01-17 Jason Merrill <jason@redhat.com> |
6340 | ||
6341 | PR c++/92531 - ICE with noexcept(lambda). | |
6342 | * pt.c (uses_template_parms): Don't try to enumerate all the | |
6343 | expression cases. | |
6344 | ||
c60a18f8 JJ |
6345 | 2020-01-17 Jakub Jelinek <jakub@redhat.com> |
6346 | ||
6347 | PR c++/93228 | |
6348 | * parser.c (cp_parser_template_name): Look up deprecated attribute | |
6349 | in DECL_TEMPLATE_RESULT or its type's attributes. | |
6350 | ||
801f5b96 JM |
6351 | 2020-01-16 Jason Merrill <jason@redhat.com> |
6352 | ||
5194b51e JM |
6353 | PR c++/93286 - ICE with __is_constructible and variadic template. |
6354 | * pt.c (tsubst) [TREE_LIST]: Handle pack expansion. | |
6355 | (tsubst_copy_and_build) [TRAIT_EXPR]: Always use tsubst for type2. | |
6356 | ||
801f5b96 JM |
6357 | PR c++/93280 - ICE with aggregate assignment and DMI. |
6358 | * init.c (get_nsdmi): Set TARGET_EXPR_DIRECT_INIT_P here. | |
6359 | * typeck2.c (digest_nsdmi_init): Not here. | |
6360 | ||
83fe2b92 PC |
6361 | 2020-01-15 Paolo Carlini <paolo.carlini@oracle.com> |
6362 | ||
6363 | PR c++/91073 | |
6364 | * cp-tree.h (is_constrained_auto): New. | |
6365 | * parser.c (cp_parser_maybe_commit_to_declaration): Correctly | |
6366 | handle concept-check expressions; take a cp_decl_specifier_seq* | |
6367 | instead of a bool. | |
6368 | (cp_parser_condition): Update call. | |
6369 | (cp_parser_simple_declaration): Likewise. | |
6370 | (cp_parser_placeholder_type_specifier): Correctly handle | |
6371 | concept-check expressions. | |
6372 | ||
7192b1ec JM |
6373 | 2020-01-15 Jason Merrill <jason@redhat.com> |
6374 | ||
299ddc61 JM |
6375 | Revert |
6376 | PR c++/33799 - destroy return value if local cleanup throws. | |
6377 | * cp-tree.h (current_retval_sentinel): New macro. | |
6378 | * decl.c (start_preparsed_function): Set up cleanup for retval. | |
6379 | * typeck.c (check_return_expr): Set current_retval_sentinel. | |
6380 | ||
596334fa JM |
6381 | PR c++/93257 - consteval void function. |
6382 | * constexpr.c (verify_constant): Allow void_node. | |
6383 | ||
7192b1ec JM |
6384 | PR c++/92871 - bad code with xvalue and GNU ?: extension. |
6385 | * call.c (prevent_lifetime_extension): New. | |
6386 | (build_conditional_expr_1): Use it. | |
6387 | ||
a5a3c2dc NS |
6388 | 2020-01-14 Nathan Sidwell <nathan@acm.org> |
6389 | ||
1918e70d | 6390 | PR c++/90916 |
ddd792fa NS |
6391 | * pt.c (retrieve_specialization): Use get_template_info, not open |
6392 | coding access. | |
6393 | ||
a5a3c2dc NS |
6394 | PR c++/90916 |
6395 | * pt.c (retrieve_specialization): Get the TI from the decl or the | |
6396 | classtype as appropriate. | |
6397 | ||
7ca50de0 DM |
6398 | 2020-01-14 David Malcolm <dmalcolm@redhat.com> |
6399 | ||
6400 | * cp-gimplify.c (source_location_table_entry_hash::empty_zero_p): | |
6401 | New static constant. | |
6402 | * cp-tree.h (named_decl_hash::empty_zero_p): Likewise. | |
6403 | (struct named_label_hash::empty_zero_p): Likewise. | |
6404 | * decl2.c (mangled_decl_hash::empty_zero_p): Likewise. | |
6405 | ||
80de0002 JM |
6406 | 2020-01-14 Jason Merrill <jason@redhat.com> |
6407 | ||
08c8c973 JM |
6408 | PR c++/92590 - wrong handling of inherited default ctor. |
6409 | * class.c (add_method): A constrained inherited ctor doesn't hide an | |
6410 | implicit derived ctor. | |
6411 | Revert: | |
6412 | PR c++/92552 - ICE with inherited constrained default ctor. | |
6413 | * pt.c (instantiate_class_template_1): Copy | |
6414 | TYPE_HAS_USER_CONSTRUCTOR. | |
6415 | PR c++/91930 - ICE with constrained inherited default ctor. | |
6416 | * name-lookup.c (do_class_using_decl): Set TYPE_HAS_USER_CONSTRUCTOR | |
6417 | for inherited constructor. | |
6418 | PR c++/92594 - ICE with inherited trivial default ctor. | |
6419 | * method.c (trivial_fn_p): Treat an inherited default constructor | |
6420 | like a normal default constructor. | |
6421 | ||
8982b553 JM |
6422 | PR c++/92594 - ICE with inherited trivial default ctor. |
6423 | * method.c (trivial_fn_p): Treat an inherited default constructor | |
6424 | like a normal default constructor. | |
6425 | ||
80de0002 JM |
6426 | PR c++/92009 - ICE with punning of typeid. |
6427 | * rtti.c (get_tinfo_desc): Call xref_basetypes. | |
6428 | * constexpr.c (cxx_fold_indirect_ref): Don't strip | |
6429 | REINTERPRET_CAST_P. | |
6430 | ||
f1acad4e JM |
6431 | 2020-01-13 Jason Merrill <jason@redhat.com> |
6432 | ||
edabbec3 JM |
6433 | PR c++/92746 - ICE with noexcept of function concept check. |
6434 | * except.c (check_noexcept_r): Handle concept-check. | |
6435 | ||
8ca4435f JM |
6436 | PR c++/92582 - ICE with member template as requirement. |
6437 | * pt.c (struct find_template_parameter_info): Add ctx_parms. | |
6438 | (any_template_parm_r): Handle TEMPLATE_DECL. | |
6439 | (find_template_parameters): Take parms instead of their depth. | |
6440 | * constraint.cc (build_parameter_mapping): Pass them. | |
6441 | ||
7c82dd6c JM |
6442 | PR c++/33799 - destroy return value if local cleanup throws. |
6443 | * cp-tree.h (current_retval_sentinel): New macro. | |
6444 | * decl.c (start_preparsed_function): Set up cleanup for retval. | |
6445 | * typeck.c (check_return_expr): Set current_retval_sentinel. | |
6446 | ||
f1acad4e JM |
6447 | PR c++/93238 - short right-shift with enum. |
6448 | * typeck.c (cp_build_binary_op): Use folded op1 for short_shift. | |
6449 | ||
640b23d7 JM |
6450 | 2020-01-10 Jason Merrill <jason@redhat.com> |
6451 | ||
337ea6b2 JM |
6452 | * typeck.c (cp_build_binary_op): Restore short_shift code. |
6453 | ||
e0804c9b JM |
6454 | PR c++/93143 - incorrect tree sharing with constexpr. |
6455 | * constexpr.c (cxx_eval_outermost_constant_expr): Don't assume | |
6456 | CONSTRUCTORs are already unshared. | |
6457 | ||
640b23d7 JM |
6458 | PR c++/93173 - incorrect tree sharing. |
6459 | PR c++/93033 | |
6460 | * cp-gimplify.c (cp_gimplify_init_expr, cp_gimplify_expr): Use | |
6461 | copy_if_shared after cp_genericize_tree. | |
6462 | * typeck2.c (split_nonconstant_init): Don't unshare here. | |
6463 | ||
08f594eb JM |
6464 | 2020-01-08 Jason Merrill <jason@redhat.com> |
6465 | ||
6466 | * cp-gimplify.c (cp_gimplify_expr) [TARGET_EXPR]: Check | |
6467 | TARGET_EXPR_DIRECT_INIT_P. | |
6468 | * constexpr.c (cxx_eval_constant_expression): Likewise. | |
6469 | ||
10d2f801 JM |
6470 | 2020-01-08 Jason Merrill <jason@redhat.com> |
6471 | ||
6472 | PR c++/91369 - constexpr destructor and member initializer. | |
6473 | * constexpr.c (cxx_eval_store_expression): Look through TARGET_EXPR | |
6474 | when not preevaluating. | |
6475 | ||
cd3ca6cb JM |
6476 | 2020-01-08 Jason Merrill <jason@redhat.com> |
6477 | ||
6478 | * constexpr.c (cxx_eval_call_expression): Remove DECL_BY_REFERENCE | |
6479 | support. | |
6480 | ||
87d3f828 PC |
6481 | 2020-01-07 Paolo Carlini <paolo.carlini@oracle.com> |
6482 | ||
6483 | * init.c (build_new): Add location_t parameter and use it throughout. | |
6484 | (build_raw_new_expr): Likewise. | |
6485 | * parser.c (cp_parser_new_expression): Pass the combined_loc. | |
6486 | * pt.c (tsubst_copy_and_build): Adjust call. | |
6487 | * cp-tree.h: Update declarations. | |
6488 | ||
bd65538a JM |
6489 | 2020-01-07 Jason Merrill <jason@redhat.com> |
6490 | ||
6491 | PR c++/47877 - -fvisibility-inlines-hidden and member templates. | |
6492 | * decl2.c (determine_visibility): -fvisibility-inlines-hidden beats | |
6493 | explicit class visibility for a template. | |
6494 | ||
c4b30920 RS |
6495 | 2020-01-07 Richard Sandiford <richard.sandiford@arm.com> |
6496 | ||
6497 | * mangle.c (mangle_type_attribute_p): New function, split out from... | |
6498 | (write_CV_qualifiers_for_type): ...here. Don't mangle attributes | |
6499 | that contain a space. | |
6500 | ||
f74f6092 JJ |
6501 | 2020-01-07 Jakub Jelinek <jakub@redhat.com> |
6502 | ||
6503 | PR c++/91369 | |
6504 | * constexpr.c (struct constexpr_global_ctx): Add heap_alloc_count | |
6505 | member, initialize it to zero in ctor. | |
6506 | (cxx_eval_call_expression): Bump heap_dealloc_count when deleting | |
6507 | a heap object. Don't cache calls to functions which allocate some | |
6508 | heap objects and don't deallocate them or deallocate some heap | |
6509 | objects they didn't allocate. | |
6510 | ||
665e3b21 JM |
6511 | 2020-01-06 Jason Merrill <jason@redhat.com> |
6512 | ||
6513 | PR c++/92552 - ICE with inherited constrained default ctor. | |
6514 | * pt.c (instantiate_class_template_1): Copy | |
6515 | TYPE_HAS_USER_CONSTRUCTOR. | |
6516 | * class.c (one_inherited_ctor): Don't set it here. | |
6517 | ||
e4bcf1f5 AS |
6518 | 2020-01-06 Andrew Sutton <asutton@lock3software.com> |
6519 | ||
6520 | PR c++/92739 - parsing requires clause with attributes. | |
6521 | * parser.c (cp_parser_constraint_requires_parens): Exclude | |
6522 | attributes as postfix expressions. | |
6523 | ||
39bec8cd JJ |
6524 | 2020-01-05 Jakub Jelinek <jakub@redhat.com> |
6525 | ||
6526 | PR c++/93138 | |
6527 | * parser.c (cp_parser_check_class_key): Disable access checks for the | |
6528 | simple name lookup. | |
6529 | (cp_parser_maybe_warn_enum_key): Likewise. Return early if | |
6530 | !warn_redundant_tags. | |
6531 | ||
72036b59 JJ |
6532 | 2010-01-05 Jakub Jelinek <jakub@redhat.com> |
6533 | ||
6534 | PR c++/93046 | |
6535 | * cp-gimplify.c (cp_gimplify_init_expr): Don't look through | |
6536 | TARGET_EXPR if it has been gimplified already. | |
6537 | ||
8b5d34fc JM |
6538 | 2020-01-03 Jason Merrill <jason@redhat.com> |
6539 | ||
6540 | PR c++/93033 - incorrect tree node sharing with array init. | |
6541 | * typeck2.c (split_nonconstant_init): Unshare non-decl. | |
6542 | * cp-gimplify.c (cp_gimplify_init_expr): Only split if -fexceptions. | |
6543 | ||
657fea97 JM |
6544 | 2020-01-02 Jason Merrill <jason@redhat.com> |
6545 | ||
6546 | * pt.c (invalid_nontype_parm_type_p): Reject class placeholder in | |
6547 | C++17. | |
6548 | ||
4a08009e JJ |
6549 | 2020-01-02 Jakub Jelinek <jakub@redhat.com> |
6550 | ||
6551 | PR c/90677 | |
6552 | * cp-objcp-common.c (identifier_global_tag): Return NULL_TREE if name | |
6553 | has not been found, rather than error_mark_node. | |
6554 | ||
8d9254fc | 6555 | 2020-01-01 Jakub Jelinek <jakub@redhat.com> |
19c37faa | 6556 | |
85ec4feb | 6557 | Update copyright years. |
ad41bd84 | 6558 | \f |
8d9254fc | 6559 | Copyright (C) 2020 Free Software Foundation, Inc. |
ad41bd84 JM |
6560 | |
6561 | Copying and distribution of this file, with or without modification, | |
6562 | are permitted in any medium without royalty provided the copyright | |
6563 | notice and this notice are preserved. |