4ca833b5b134da4248f2abdd6bd036bf31cfb947
[gcc.git] / gcc / cp / ChangeLog
1 2021-01-21 Patrick Palka <ppalka@redhat.com>
2
3 PR c++/71879
4 * semantics.c (finish_decltype_type): Set up a cp_unevaluated
5 sentinel at the start of the function. Remove a now-redundant
6 manual adjustment of cp_unevaluated_operand.
7
8 2021-01-21 Nathan Sidwell <nathan@acm.org>
9
10 PR c++/98624
11 * module.cc (depset::hash::find_dependencies): Add
12 module arg.
13 (trees_out::core_vals): Check state before calling
14 write_location.
15 (sort_cluster, module_state::write): Adjust
16 find_dependencies call.
17
18 2021-01-21 Jakub Jelinek <jakub@redhat.com>
19
20 PR c++/98672
21 * constexpr.c (check_for_return_continue_data): Add break_stmt member.
22 (check_for_return_continue): Also look for BREAK_STMT. Handle
23 SWITCH_STMT by ignoring break_stmt from its body.
24 (potential_constant_expression_1) <case FOR_STMT>,
25 <case WHILE_STMT>: If the condition isn't constant true, check if
26 the loop body can contain a return stmt.
27 <case SWITCH_STMT>: Adjust check_for_return_continue_data initializer.
28 <case IF_STMT>: If recursion with tf_none is successful,
29 merge *jump_target from the branches - returns with highest priority,
30 breaks or continues lower. If then branch is potentially constant and
31 doesn't return, check the else branch if it could return, break or
32 continue.
33
34 2021-01-21 Nathan Sidwell <nathan@acm.org>
35
36 PR c++/98530
37 * name-lookup.c (lookup_class_binding): Rearrange a stat-hack.
38
39 2021-01-20 Nathan Sidwell <nathan@acm.org>
40
41 * module.cc (bytes_in::i, bytes_in::wi): Avoid left shift of
42 signed type.
43
44 2021-01-20 Patrick Palka <ppalka@redhat.com>
45
46 PR c++/95434
47 * pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: If tsubsting
48 CLASS_PLACEHOLDER_TEMPLATE yields a TEMPLATE_TEMPLATE_PARM,
49 adjust to its TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
50
51 2021-01-20 Patrick Palka <ppalka@redhat.com>
52
53 PR c++/82613
54 * parser.c (cp_parser_class_head): Defer access checking when
55 parsing the base-clause until all bases are seen and attached
56 to the class type.
57 * pt.c (instantiate_class_template): Likewise when substituting
58 into dependent bases.
59
60 2021-01-20 Jakub Jelinek <jakub@redhat.com>
61
62 PR c++/98742
63 * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_DETACH>: If
64 error_operand_p, remove clause without further checking. Check
65 for non-NULL TYPE_NAME.
66
67 2021-01-19 Marek Polacek <polacek@redhat.com>
68
69 PR c++/98659
70 * pt.c (maybe_instantiate_noexcept): Return false if FN is
71 error_mark_node.
72
73 2021-01-19 Marek Polacek <polacek@redhat.com>
74
75 PR c++/98687
76 * name-lookup.c (push_using_decl_bindings): New, broken out of...
77 (finish_nonmember_using_decl): ...here.
78 * name-lookup.h (push_using_decl_bindings): Update declaration.
79 * pt.c (tsubst_expr): Update the call to push_using_decl_bindings.
80
81 2021-01-19 Patrick Palka <ppalka@redhat.com>
82
83 PR c++/41437
84 PR c++/58993
85 * search.c (friend_accessible_p): If scope is a hidden friend
86 defined inside a dependent class, consider access from the
87 class.
88 * parser.c (cp_parser_late_parsing_for_member): Don't push a
89 dk_no_check access state.
90
91 2021-01-19 Marek Polacek <polacek@redhat.com>
92
93 PR c++/98333
94 * parser.c (cp_parser_class_specifier_1): Perform late-parsing
95 of NSDMIs before late-parsing of noexcept-specifiers.
96
97 2021-01-19 Nathan Sidwell <nathan@acm.org>
98
99 * module.cc (identifier): Merge overloads.
100
101 2021-01-19 Nathan Sidwell <nathan@acm.org>
102
103 PR c++/98624
104 * module.cc (trees_out::write_location): Make static.
105
106 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
107
108 * parser.c (cp_parser_omp_clause_detach): New.
109 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH.
110 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
111 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
112 * semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
113 Prevent use of detach with mergeable and overriding the data sharing
114 mode of the event handle.
115
116 2021-01-15 Nathan Sidwell <nathan@acm.org>
117
118 PR c++/98538
119 * tree.c (cp_build_qualified_type_real): Propagate an array's
120 dependentness to the copy, if known.
121
122 2021-01-15 Jason Merrill <jason@redhat.com>
123
124 PR c++/98642
125 * call.c (unsafe_return_slot_p): Return int.
126 (init_by_return_slot_p): Split out from...
127 (unsafe_copy_elision_p): ...here.
128 (unsafe_copy_elision_p_opt): New name for old meaning.
129 (build_over_call): Adjust.
130 (make_safe_copy_elision): New.
131 * typeck2.c (split_nonconstant_init_1): Elide copy from safe
132 list-initialization.
133 * cp-tree.h: Adjust.
134
135 2021-01-15 Jason Merrill <jason@redhat.com>
136
137 * call.c (base_ctor_for, make_base_init_ok): New.
138 (build_over_call): Use make_base_init_ok.
139
140 2021-01-15 Jason Merrill <jason@redhat.com>
141
142 PR c++/63707
143 * tree.c (build_vec_init_expr): Don't call build_vec_init_elt
144 if we got a CONSTRUCTOR.
145
146 2021-01-15 Nathan Sidwell <nathan@acm.org>
147
148 PR c++/98591
149 * lang-specs.h: Fix handling of -fmodule-only with -fsyntax-only.
150
151 2021-01-14 Jason Merrill <jason@redhat.com>
152
153 * typeck2.c (process_init_constructor_record): Use fldtype
154 variable consistently.
155
156 2021-01-14 Nathan Sidwell <nathan@acm.org>
157
158 PR c++/98372
159 * tree.c (cp_tree_equal): Correct map_context logic.
160
161 2021-01-13 Marek Polacek <polacek@redhat.com>
162
163 PR c++/98231
164 * name-lookup.c (push_using_decl_bindings): New.
165 * name-lookup.h (push_using_decl_bindings): Declare.
166 * pt.c (tsubst_expr): Call push_using_decl_bindings.
167
168 2021-01-13 Nathan Sidwell <nathan@acm.org>
169
170 PR c++/98626
171 * module.cc (module_add_import_initializers): Pass a
172 zero-element argument vector.
173
174 2021-01-12 Patrick Palka <ppalka@redhat.com>
175
176 PR c++/98611
177 * tree.c (cp_walk_subtrees) <case TEMPLATE_TYPE_PARM>: Visit
178 the template of a CTAD placeholder.
179
180 2021-01-12 Marek Polacek <polacek@redhat.com>
181
182 PR c++/98620
183 * typeck2.c (process_init_constructor_record): Don't emit
184 -Wmissing-field-initializers warnings in unevaluated contexts.
185
186 2021-01-11 Jakub Jelinek <jakub@redhat.com>
187
188 PR c++/98481
189 * class.c (find_abi_tags_r): Set *walk_subtrees to 2 instead of 1
190 for types.
191 (mark_abi_tags_r): Likewise.
192 * decl2.c (min_vis_r): Likewise.
193 * tree.c (cp_walk_subtrees): If *walk_subtrees_p is 2, look through
194 typedefs.
195
196 2021-01-08 Patrick Palka <ppalka@redhat.com>
197
198 PR c++/98551
199 * constexpr.c (cxx_eval_call_expression): Check CLASS_TYPE_P
200 instead of AGGREGATE_TYPE_P before calling replace_result_decl.
201
202 2021-01-08 Patrick Palka <ppalka@redhat.com>
203
204 PR c++/98515
205 * semantics.c (check_accessibility_of_qualified_id): Punt if
206 we're checking access of a scoped non-static member inside a
207 class template.
208
209 2021-01-07 Jakub Jelinek <jakub@redhat.com>
210
211 PR c++/98329
212 * pt.c (tsubst_copy) <case BIT_CAST_EXPR>: Don't call
213 cp_build_bit_cast here, instead just build_min a BIT_CAST_EXPR and set
214 its location.
215 (tsubst_copy_and_build): Handle BIT_CAST_EXPR.
216
217 2021-01-07 Marek Polacek <polacek@redhat.com>
218
219 PR c++/98441
220 * decl.c (grokdeclarator): Move the !funcdecl_p check inside the
221 !late_return_type block.
222
223 2021-01-07 Jason Merrill <jason@redhat.com>
224
225 * constexpr.c (cxx_bind_parameters_in_call): Add comment.
226 (cxx_eval_store_expression): Add comment.
227
228 2021-01-07 Jason Merrill <jason@redhat.com>
229
230 * call.c (has_next): Factor out from...
231 (next_conversion): ...here.
232 (strip_standard_conversion): And here.
233 (is_subseq): And here.
234 (build_conv): Check it.
235 (standard_conversion): Don't call build_conv
236 for ck_identity.
237
238 2021-01-06 Martin Sebor <msebor@redhat.com>
239
240 PR c++/95768
241 * error.c (dump_expr): Call c_pretty_printer::unary_expression.
242
243 2021-01-05 Patrick Palka <ppalka@redhat.com>
244
245 * pt.c (unify) <case TEMPLATE_PARM_INDEX>: After walking into
246 the type of the NTTP, substitute into the type again. If the
247 type is still dependent, don't unify the NTTP.
248
249 2021-01-05 Jakub Jelinek <jakub@redhat.com>
250
251 * Make-lang.in (cc1plus-checksum, cc1plus$(exeext): Add
252 $(CODYLIB) after $(BACKEND).
253
254 2021-01-05 Jakub Jelinek <jakub@redhat.com>
255
256 PR c++/98469
257 * constexpr.c (cxx_eval_constant_expression) <case BIT_CAST_EXPR>:
258 Punt if lval is true.
259 * semantics.c (cp_build_bit_cast): Call get_target_expr_sfinae on
260 the result if it has a class type.
261
262 2021-01-05 Marek Polacek <polacek@redhat.com>
263
264 PR c++/82099
265 * pt.c (resolve_overloaded_unification): Call
266 maybe_instantiate_noexcept after instantiating the function
267 decl.
268
269 2021-01-05 Nathan Sidwell <nathan@acm.org>
270
271 * parser.c (cp_parser_module_declaration): Alter diagnostic
272 text to say where is permissable.
273
274 2021-01-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
275
276 PR c++/98316
277 * Make-lang.in (cc1plus$(exeext)): Add $(CODYLIB), $(NETLIBS).
278
279 2021-01-02 Jan Hubicka <jh@suse.cz>
280
281 * cp-tree.h (cp_tree_c_finish_parsing): Declare.
282 * decl2.c (c_parse_final_cleanups): Call cp_tree_c_finish_parsing.
283 * tree.c (cp_tree_c_finish_parsing): New function.
284
285 2021-01-01 Jakub Jelinek <jakub@redhat.com>
286
287 * ChangeLog-2020: Rotate ChangeLog. New file.
288
289 \f
290 Copyright (C) 2021 Free Software Foundation, Inc.
291
292 Copying and distribution of this file, with or without modification,
293 are permitted in any medium without royalty provided the copyright
294 notice and this notice are preserved.