]> gcc.gnu.org Git - gcc.git/blame - gcc/cp/ChangeLog
libcpp: Fix up -fdirectives-only preprocessing [PR98882]
[gcc.git] / gcc / cp / ChangeLog
CommitLineData
548b75d8
GA
12021-02-02 Jason Merrill <jason@redhat.com>
2
3 PR c++/98929
4 PR c++/96199
5 * error.c (dump_expr): Ignore dummy object.
6 * pt.c (tsubst_baselink): Handle dependent scope.
7
f7884fb1
GA
82021-02-01 Patrick Palka <ppalka@redhat.com>
9
10 PR c++/98295
11 * constexpr.c (cxx_eval_array_reference): Also set
12 new_ctx.object when setting new_ctx.ctor.
13
142021-02-01 Marek Polacek <polacek@redhat.com>
15
16 PR c++/98355
17 * parser.c (cp_parser_has_attribute_expression): Use
18 uses_template_parms instead of type_dependent_expression_p.
19
202021-02-01 Jason Merrill <jason@redhat.com>
21
22 PR c++/98570
23 * cp-tree.h: Declare it.
24 * pt.c (comparing_dependent_aliases): New flag.
25 (template_args_equal, spec_hasher::equal): Set it.
26 (dependent_alias_template_spec_p): Assert that we don't
27 get non-types other than error_mark_node.
28 (instantiate_alias_template): SET_TYPE_STRUCTURAL_EQUALITY
29 on complex alias specializations. Set TYPE_DEPENDENT_P here.
30 (tsubst_decl): Not here.
31 * module.cc (module_state::read_cluster): Set
32 comparing_dependent_aliases instead of
33 comparing_specializations.
34 * tree.c (cp_tree_equal): Remove comparing_specializations
35 module handling.
36 * typeck.c (structural_comptypes): Adjust.
37 (comptypes): Remove comparing_specializations handling.
38
2900f2f2
GA
392021-01-29 Nathan Sidwell <nathan@acm.org>
40
41 PR c++/98843
42 * module.cc (module_state_config): Add num_entities field.
43 (module_state::read_entities): The entity_ary span is
44 already allocated.
45 (module_state::write_config): Write num_entities.
46 (module_state::read_config): Read num_entities.
47 (module_state::write): Set config's num_entities.
48 (module_state::read_initial): Allocate the entity ary
49 span here.
50 (module_state::read_language): Do not set entity_lwm
51 here.
52
532021-01-29 Marek Polacek <polacek@redhat.com>
54
55 PR c++/96137
56 * parser.c (cp_parser_class_name): If parser->scope is
57 error_mark_node, return it, otherwise continue.
58
85d04a2e
GA
592021-01-28 Jakub Jelinek <jakub@redhat.com>
60
61 PR c++/98841
62 * typeck.c (build_x_indirect_ref): For *this, return current_class_ref.
63
642021-01-28 Jakub Jelinek <jakub@redhat.com>
65
66 PR c++/33661
67 PR c++/98847
68 * decl.c (cp_finish_decl): For register vars with asmspec in templates
69 call set_user_assembler_name and set DECL_HARD_REGISTER.
70 * pt.c (tsubst_expr): When instantiating DECL_HARD_REGISTER vars,
71 pass asmspec_tree to cp_finish_decl.
72
732021-01-28 Nathan Sidwell <nathan@acm.org>
74
75 PR c++/98770
76 * module.cc (trees_out::decl_value): Swap is_typedef & TYPE_NAME
77 check order.
78 (trees_in::decl_value): Do typedef frobbing only when installing
79 a new typedef, adjust is_matching_decl call. Swap is_typedef
80 & TYPE_NAME check.
81 (trees_in::is_matching_decl): Add is_typedef parm. Adjust variable
82 names and deal with typedef checking.
83
aa69f0a8
GA
842021-01-27 Jason Merrill <jason@redhat.com>
85
86 PR c++/97874
87 * name-lookup.c (lookup_using_decl): Clean up handling
88 of dependency and inherited constructors.
89 (finish_nonmember_using_decl): Handle DECL_DEPENDENT_P.
90 * pt.c (tsubst_expr): Handle DECL_DEPENDENT_P.
91
e62bb7f0
GA
922021-01-26 Jason Merrill <jason@redhat.com>
93
94 PR c++/97474
95 * call.c (type_passed_as): Don't mark invisiref restrict.
96
972021-01-26 Jason Merrill <jason@redhat.com>
98
99 PR c++/97566
100 PR c++/98463
101 * class.c (layout_class_type): An empty field gets size 0.
102 (is_empty_field): New.
103 (check_bases): Check it.
104 * cp-tree.h (is_empty_field): Declare it.
105 * constexpr.c (cxx_eval_store_expression): Check it.
106 (cx_check_missing_mem_inits): Likewise.
107 * init.c (perform_member_init): Likewise.
108 * typeck2.c (process_init_constructor_record): Likewise.
109
161e4c08
GA
1102021-01-25 Martin Sebor <msebor@redhat.com>
111
112 PR c++/98646
113 * cvt.c (cp_fold_convert): Propagate TREE_NO_WARNING.
114
1152021-01-25 Jason Merrill <jason@redhat.com>
116
117 PR c++/98463
118 * constexpr.c (get_or_insert_ctor_field): Add check.
119 (cxx_eval_store_expression): Handle discontinuity of refs.
120
6b163337
GA
1212021-01-23 Anthony Sharp <anthonysharp15@gmail.com>
122
123 * call.c (complain_about_access): Altered function.
124 * cp-tree.h (complain_about_access): Changed parameters of function.
125 (get_parent_with_private_access): Declared new function.
126 * search.c (get_parent_with_private_access): Defined new function.
127 * semantics.c (enforce_access): Modified function.
128 * typeck.c (complain_about_unrecognized_member): Updated function
129 arguments in complain_about_access.
130
1312021-01-23 Patrick Palka <ppalka@redhat.com>
132
133 PR c++/97399
134 * cp-tree.h (shared_member_p): Adjust declaration.
135 * parser.c (cp_parser_init_declarator): If the storage class
136 specifier is sc_static, pass true for static_p to
137 cp_parser_declarator.
138 (cp_parser_direct_declarator): Don't do inject_this_parm when
139 the declarator is a friend.
140 * search.c (shared_member_p): Change return type to bool and
141 adjust function body accordingly. Return false for a dependent
142 USING_DECL instead of aborting.
143 * semantics.c (finish_qualified_id_expr): Rely on shared_member_p
144 even when type-dependent.
145
8502e23d
GA
1462021-01-22 Marek Polacek <polacek@redhat.com>
147
148 PR c++/96623
149 * parser.c (inject_parm_decls): Remove a redundant assignment.
150 (cp_parser_class_specifier_1): Clear current_class_{ptr,ref}
151 before calling inject_parm_decls.
152
1532021-01-22 Jason Merrill <jason@redhat.com>
154
155 PR c++/98744
156 * call.c (make_base_init_ok): Use DECL_HAS_VTT_PARM_P.
157
1582021-01-22 Jakub Jelinek <jakub@redhat.com>
159
160 PR sanitizer/95693
161 * init.c (build_zero_init_1): Revert the 2018-03-06 change to
162 return build_zero_cst for reference types.
163 * typeck2.c (process_init_constructor_record): Instead call
164 build_zero_cst here during error recovery instead of build_zero_init.
165
1662021-01-22 Marek Polacek <polacek@redhat.com>
167
168 PR c++/98545
169 * mangle.c (write_member_name): Emit abi_warn_or_compat_version_crosses
170 warnings regardless of abi_version_at_least.
171 (write_expression): When the expression is a dependent name
172 and an operator name, write "on" before writing its name.
173
1742021-01-22 Marek Polacek <polacek@redhat.com>
175
176 PR c++/97966
177 * pt.c (instantiate_class_template_1): Instantiate members
178 marked with attribute used only after we're done instantiating
179 the class.
180
7559d465
GA
1812021-01-21 Patrick Palka <ppalka@redhat.com>
182
183 PR c++/71879
184 * semantics.c (finish_decltype_type): Set up a cp_unevaluated
185 sentinel at the start of the function. Remove a now-redundant
186 manual adjustment of cp_unevaluated_operand.
187
1882021-01-21 Nathan Sidwell <nathan@acm.org>
189
190 PR c++/98624
191 * module.cc (depset::hash::find_dependencies): Add
192 module arg.
193 (trees_out::core_vals): Check state before calling
194 write_location.
195 (sort_cluster, module_state::write): Adjust
196 find_dependencies call.
197
1982021-01-21 Jakub Jelinek <jakub@redhat.com>
199
200 PR c++/98672
201 * constexpr.c (check_for_return_continue_data): Add break_stmt member.
202 (check_for_return_continue): Also look for BREAK_STMT. Handle
203 SWITCH_STMT by ignoring break_stmt from its body.
204 (potential_constant_expression_1) <case FOR_STMT>,
205 <case WHILE_STMT>: If the condition isn't constant true, check if
206 the loop body can contain a return stmt.
207 <case SWITCH_STMT>: Adjust check_for_return_continue_data initializer.
208 <case IF_STMT>: If recursion with tf_none is successful,
209 merge *jump_target from the branches - returns with highest priority,
210 breaks or continues lower. If then branch is potentially constant and
211 doesn't return, check the else branch if it could return, break or
212 continue.
213
2142021-01-21 Nathan Sidwell <nathan@acm.org>
215
216 PR c++/98530
217 * name-lookup.c (lookup_class_binding): Rearrange a stat-hack.
218
b93d0e36
GA
2192021-01-20 Nathan Sidwell <nathan@acm.org>
220
221 * module.cc (bytes_in::i, bytes_in::wi): Avoid left shift of
222 signed type.
223
2242021-01-20 Patrick Palka <ppalka@redhat.com>
225
226 PR c++/95434
227 * pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: If tsubsting
228 CLASS_PLACEHOLDER_TEMPLATE yields a TEMPLATE_TEMPLATE_PARM,
229 adjust to its TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
230
2312021-01-20 Patrick Palka <ppalka@redhat.com>
232
233 PR c++/82613
234 * parser.c (cp_parser_class_head): Defer access checking when
235 parsing the base-clause until all bases are seen and attached
236 to the class type.
237 * pt.c (instantiate_class_template): Likewise when substituting
238 into dependent bases.
239
2402021-01-20 Jakub Jelinek <jakub@redhat.com>
241
242 PR c++/98742
243 * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_DETACH>: If
244 error_operand_p, remove clause without further checking. Check
245 for non-NULL TYPE_NAME.
246
f35a4f96
GA
2472021-01-19 Marek Polacek <polacek@redhat.com>
248
249 PR c++/98659
250 * pt.c (maybe_instantiate_noexcept): Return false if FN is
251 error_mark_node.
252
2532021-01-19 Marek Polacek <polacek@redhat.com>
254
255 PR c++/98687
256 * name-lookup.c (push_using_decl_bindings): New, broken out of...
257 (finish_nonmember_using_decl): ...here.
258 * name-lookup.h (push_using_decl_bindings): Update declaration.
259 * pt.c (tsubst_expr): Update the call to push_using_decl_bindings.
260
2612021-01-19 Patrick Palka <ppalka@redhat.com>
262
263 PR c++/41437
264 PR c++/58993
265 * search.c (friend_accessible_p): If scope is a hidden friend
266 defined inside a dependent class, consider access from the
267 class.
268 * parser.c (cp_parser_late_parsing_for_member): Don't push a
269 dk_no_check access state.
270
2712021-01-19 Marek Polacek <polacek@redhat.com>
272
273 PR c++/98333
274 * parser.c (cp_parser_class_specifier_1): Perform late-parsing
275 of NSDMIs before late-parsing of noexcept-specifiers.
276
2772021-01-19 Nathan Sidwell <nathan@acm.org>
278
279 * module.cc (identifier): Merge overloads.
280
2812021-01-19 Nathan Sidwell <nathan@acm.org>
282
283 PR c++/98624
284 * module.cc (trees_out::write_location): Make static.
285
59cf67d1
GA
2862021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
287
288 * parser.c (cp_parser_omp_clause_detach): New.
289 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH.
290 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
291 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
292 * semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
293 Prevent use of detach with mergeable and overriding the data sharing
294 mode of the event handle.
295
2f7f0d32
GA
2962021-01-15 Nathan Sidwell <nathan@acm.org>
297
298 PR c++/98538
299 * tree.c (cp_build_qualified_type_real): Propagate an array's
300 dependentness to the copy, if known.
301
3022021-01-15 Jason Merrill <jason@redhat.com>
303
304 PR c++/98642
305 * call.c (unsafe_return_slot_p): Return int.
306 (init_by_return_slot_p): Split out from...
307 (unsafe_copy_elision_p): ...here.
308 (unsafe_copy_elision_p_opt): New name for old meaning.
309 (build_over_call): Adjust.
310 (make_safe_copy_elision): New.
311 * typeck2.c (split_nonconstant_init_1): Elide copy from safe
312 list-initialization.
313 * cp-tree.h: Adjust.
314
3152021-01-15 Jason Merrill <jason@redhat.com>
316
317 * call.c (base_ctor_for, make_base_init_ok): New.
318 (build_over_call): Use make_base_init_ok.
319
3202021-01-15 Jason Merrill <jason@redhat.com>
321
322 PR c++/63707
323 * tree.c (build_vec_init_expr): Don't call build_vec_init_elt
324 if we got a CONSTRUCTOR.
325
3262021-01-15 Nathan Sidwell <nathan@acm.org>
327
328 PR c++/98591
329 * lang-specs.h: Fix handling of -fmodule-only with -fsyntax-only.
330
5fff80fd
GA
3312021-01-14 Jason Merrill <jason@redhat.com>
332
333 * typeck2.c (process_init_constructor_record): Use fldtype
334 variable consistently.
335
3362021-01-14 Nathan Sidwell <nathan@acm.org>
337
338 PR c++/98372
339 * tree.c (cp_tree_equal): Correct map_context logic.
340
be0851b8
GA
3412021-01-13 Marek Polacek <polacek@redhat.com>
342
343 PR c++/98231
344 * name-lookup.c (push_using_decl_bindings): New.
345 * name-lookup.h (push_using_decl_bindings): Declare.
346 * pt.c (tsubst_expr): Call push_using_decl_bindings.
347
3482021-01-13 Nathan Sidwell <nathan@acm.org>
349
350 PR c++/98626
351 * module.cc (module_add_import_initializers): Pass a
352 zero-element argument vector.
353
6851dda2
GA
3542021-01-12 Patrick Palka <ppalka@redhat.com>
355
356 PR c++/98611
357 * tree.c (cp_walk_subtrees) <case TEMPLATE_TYPE_PARM>: Visit
358 the template of a CTAD placeholder.
359
3602021-01-12 Marek Polacek <polacek@redhat.com>
361
362 PR c++/98620
363 * typeck2.c (process_init_constructor_record): Don't emit
364 -Wmissing-field-initializers warnings in unevaluated contexts.
365
67fbb7f0
GA
3662021-01-11 Jakub Jelinek <jakub@redhat.com>
367
368 PR c++/98481
369 * class.c (find_abi_tags_r): Set *walk_subtrees to 2 instead of 1
370 for types.
371 (mark_abi_tags_r): Likewise.
372 * decl2.c (min_vis_r): Likewise.
373 * tree.c (cp_walk_subtrees): If *walk_subtrees_p is 2, look through
374 typedefs.
375
bf5cbb9e
GA
3762021-01-08 Patrick Palka <ppalka@redhat.com>
377
378 PR c++/98551
379 * constexpr.c (cxx_eval_call_expression): Check CLASS_TYPE_P
380 instead of AGGREGATE_TYPE_P before calling replace_result_decl.
381
3822021-01-08 Patrick Palka <ppalka@redhat.com>
383
384 PR c++/98515
385 * semantics.c (check_accessibility_of_qualified_id): Punt if
386 we're checking access of a scoped non-static member inside a
387 class template.
388
7d187e4f
GA
3892021-01-07 Jakub Jelinek <jakub@redhat.com>
390
391 PR c++/98329
392 * pt.c (tsubst_copy) <case BIT_CAST_EXPR>: Don't call
393 cp_build_bit_cast here, instead just build_min a BIT_CAST_EXPR and set
394 its location.
395 (tsubst_copy_and_build): Handle BIT_CAST_EXPR.
396
3972021-01-07 Marek Polacek <polacek@redhat.com>
398
399 PR c++/98441
400 * decl.c (grokdeclarator): Move the !funcdecl_p check inside the
401 !late_return_type block.
402
4032021-01-07 Jason Merrill <jason@redhat.com>
404
405 * constexpr.c (cxx_bind_parameters_in_call): Add comment.
406 (cxx_eval_store_expression): Add comment.
407
4082021-01-07 Jason Merrill <jason@redhat.com>
409
410 * call.c (has_next): Factor out from...
411 (next_conversion): ...here.
412 (strip_standard_conversion): And here.
413 (is_subseq): And here.
414 (build_conv): Check it.
415 (standard_conversion): Don't call build_conv
416 for ck_identity.
417
942ae5be
GA
4182021-01-06 Martin Sebor <msebor@redhat.com>
419
420 PR c++/95768
421 * error.c (dump_expr): Call c_pretty_printer::unary_expression.
422
651b8a50
GA
4232021-01-05 Patrick Palka <ppalka@redhat.com>
424
425 * pt.c (unify) <case TEMPLATE_PARM_INDEX>: After walking into
426 the type of the NTTP, substitute into the type again. If the
427 type is still dependent, don't unify the NTTP.
428
4292021-01-05 Jakub Jelinek <jakub@redhat.com>
430
431 * Make-lang.in (cc1plus-checksum, cc1plus$(exeext): Add
432 $(CODYLIB) after $(BACKEND).
433
4342021-01-05 Jakub Jelinek <jakub@redhat.com>
435
436 PR c++/98469
437 * constexpr.c (cxx_eval_constant_expression) <case BIT_CAST_EXPR>:
438 Punt if lval is true.
439 * semantics.c (cp_build_bit_cast): Call get_target_expr_sfinae on
440 the result if it has a class type.
441
4422021-01-05 Marek Polacek <polacek@redhat.com>
443
444 PR c++/82099
445 * pt.c (resolve_overloaded_unification): Call
446 maybe_instantiate_noexcept after instantiating the function
447 decl.
448
4492021-01-05 Nathan Sidwell <nathan@acm.org>
450
451 * parser.c (cp_parser_module_declaration): Alter diagnostic
452 text to say where is permissable.
453
4542021-01-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
455
456 PR c++/98316
457 * Make-lang.in (cc1plus$(exeext)): Add $(CODYLIB), $(NETLIBS).
458
2eacfdbd
GA
4592021-01-02 Jan Hubicka <jh@suse.cz>
460
461 * cp-tree.h (cp_tree_c_finish_parsing): Declare.
462 * decl2.c (c_parse_final_cleanups): Call cp_tree_c_finish_parsing.
463 * tree.c (cp_tree_c_finish_parsing): New function.
464
b6dd195a
GA
4652021-01-01 Jakub Jelinek <jakub@redhat.com>
466
467 * ChangeLog-2020: Rotate ChangeLog. New file.
468
ad41bd84 469\f
618e665a 470Copyright (C) 2021 Free Software Foundation, Inc.
ad41bd84
JM
471
472Copying and distribution of this file, with or without modification,
473are permitted in any medium without royalty provided the copyright
474notice and this notice are preserved.
This page took 3.833917 seconds and 5 git commands to generate.