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