summaryrefslogtreecommitdiff
path: root/gcc/cp/ChangeLog
blob: d762ddf7b26a3dc6d55c0b90002aef6b5e29c2bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
2022-01-10  Patrick Palka  <ppalka@redhat.com>

	PR c++/103879
	* constexpr.c (cxx_fold_indirect_ref): Split out object/offset
	canonicalization step into a local lambda.  Strengthen it to
	absorb more components at position 0.  Use it before both calls
	to cxx_fold_indirect_ref_1.

2022-01-10  Patrick Palka  <ppalka@redhat.com>

	PR c++/103783
	* call.c (cand_parms_match): Skip over 'this' when given one
	static and one non-static member function.

2022-01-10  Jakub Jelinek  <jakub@redhat.com>

	PR c++/103912
	* semantics.c (expand_or_defer_fn): For immediate functions, set
	node->body_removed to true and clear analyzed, definition and
	force_output.
	* decl2.c (c_parse_final_cleanups): Ignore immediate functions for
	expand_or_defer_fn.

2022-01-08  Jakub Jelinek  <jakub@redhat.com>

	PR c++/89074
	* constexpr.c (cxx_maybe_fold_addr_pointer_plus): New function.
	(cxx_eval_binary_expression): Use it.

2022-01-08  Jason Merrill  <jason@redhat.com>

	PR c++/103946
	* init.c (build_vec_init): Remove assert.
	* tree.c (build_vec_init_expr): Likewise.

2022-01-08  Jason Merrill  <jason@redhat.com>

	PR c++/100588
	* call.c (build_op_delete_call): Ignore destroying delete
	if alloc_fn.

2022-01-07  Jason Merrill  <jason@redhat.com>

	PR c++/20040
	* init.c (build_new_1): Also build pointer cleanup if
	TYPE_GETS_DELETE.
	* cp-tree.h (TYPE_GETS_VEC_DELETE): New.

2022-01-07  Jason Merrill  <jason@redhat.com>

	PR c++/103936
	PR c++/65591
	* cp-gimplify.c (cp_gimplify_expr): Restore VEC_INIT_EXPR handling.

2022-01-07  Jason Merrill  <jason@redhat.com>

	PR c++/103711
	* init.c (perform_target_ctor): Select destructor by in_chrg.

2022-01-07  Jason Merrill  <jason@redhat.com>

	PR c++/61611
	* except.c (in_nested_catch): New.
	(expand_end_catch_block): Check it.

2022-01-07  Jason Merrill  <jason@redhat.com>

	PR c++/33799
	PR c++/102191
	* except.c (maybe_splice_retval_cleanup): Check
	current_binding_level.
	* semantics.c (do_poplevel): Call it here.
	* parser.c (cp_parser_compound_statement): Not here.

2022-01-07  Jason Merrill  <jason@redhat.com>

	PR c++/53868
	* decl.c (cp_finish_decl): Use wrap_temporary_cleanups for
	cleanups from set_up_extended_ref_temp.
	(wrap_temporary_cleanups): Ignore array cleanups.
	(initialize_local_var): Don't check for array here.
	* cp-tree.h (BIND_EXPR_VEC_DTOR): New.
	* init.c (build_vec_delete_1): Set it.

2022-01-07  Jason Merrill  <jason@redhat.com>

	PR c++/66451
	* init.c (build_vec_delete_1): Handle throwing dtor.
	(build_vec_init): Tell it we're in a cleanup already.

2022-01-07  Jason Merrill  <jason@redhat.com>

	* typeck2.c (split_nonconstant_init_1): Don't cleanup the last elt.
	(split_nonconstant_init): Adjust.

2022-01-07  Jason Merrill  <jason@redhat.com>

	PR c++/66139
	PR c++/52320
	* constexpr.c (replace_decl): Rename from replace_result_decl.
	* cp-tree.h (replace_decl): Declare it.
	* cp-gimplify.c (cp_gimplify_init_expr): Call it.
	(cp_gimplify_expr): Don't handle VEC_INIT_EXPR.
	(cp_genericize_init, cp_genericize_init_expr)
	(cp_genericize_target_expr): New.
	(cp_fold_r): Call them.
	* tree.c (build_array_copy): Add a TARGET_EXPR.
	* typeck2.c (digest_init_r): Look through a TARGET_EXPR.

2022-01-07  Jason Merrill  <jason@redhat.com>

	PR c++/94041
	* decl.c (initialize_local_var): Fix comment.
	* init.c (build_new_1): Do stabilize array init.
	(build_vec_init): Use TARGET_EXPR for cleanup.  Initialization
	of an element from an explicit initializer is not a
	full-expression.
	* tree.c (expand_vec_init_expr): Pass flags through.
	* typeck2.c (split_nonconstant_init_1): Handle VEC_INIT_EXPR.
	(split_nonconstant_init): Handle array cleanups.
	* cp-tree.h: Adjust.

2022-01-07  Jason Merrill  <jason@redhat.com>

	PR c++/94041
	* decl.c (check_initializer): Remove obsolete comment.
	(wrap_cleanups_r): Don't wrap CLEANUP_EH_ONLY.
	(initialize_local_var): Change assert to test.
	* typeck2.c (maybe_push_temp_cleanup): New.
	(split_nonconstant_init_1): Use it.
	(split_nonconstant_init): Clear cleanup flags.

2022-01-07  Jason Merrill  <jason@redhat.com>

	PR c++/92385
	* typeck2.c (PICFLAG_VEC_INIT): New.
	(process_init_constructor_array): Set it.
	(process_init_constructor): Handle it.
	(split_nonconstant_init_1): Handle VEC_INIT_EXPR.
	* init.c (build_vec_init): Likewise.
	* cp-gimplify.c (cp_gimplify_expr): Factor out...
	* tree.c (expand_vec_init_expr): ...this function.
	(build_vec_init_elt): Handle BRACE_ENCLOSED_INITIALIZER_P.
	(build_vec_init_expr): Likewise.
	* constexpr.c (cxx_eval_vec_init): Likewise.
	(reduced_constant_expression_p): Check arrays before C++20.
	* cp-tree.h (expand_vec_init_expr): Declare.

2022-01-07  Jason Merrill  <jason@redhat.com>

	* init.c (build_new_1): Remove preevaluation code.

2022-01-05  Nathan Sidwell  <nathan@acm.org>

	* pt.c (instantiate_class_template_1): Process attribute((used)) set
	in class's context.

2022-01-05  Nathan Sidwell  <nathan@acm.org>

	* init.c (build_new_1): Check complain before alignment warning.

2022-01-04  Jason Merrill  <jason@redhat.com>

	* cp-tree.h (class releasing_vec): Add begin/end fns.

2022-01-04  Jason Merrill  <jason@redhat.com>

	* init.c: Include -*- C++ -*- on first line.

2022-01-03  Marek Polacek  <polacek@redhat.com>

	PR c++/103758
	* parser.c (cp_parser_decl_specifier_seq): Replace %<decl-specifier%>
	with %qD.

2022-01-03  Marek Polacek  <polacek@redhat.com>

	* parser.c (make_char_string_pack): Add a cast to const unsigned
	char *.

2022-01-03  Jakub Jelinek  <jakub@redhat.com>

	PR c++/103600
	* rtti.c (get_tinfo_decl_direct): Add "non overlapping" attribute
	to DECL_TINFO_P VAR_DECLs.

2022-01-02  Jason Merrill  <jason@redhat.com>

	* init.c (build_vec_init): Append the decrement to elt_init.

2022-01-02  Jason Merrill  <jason@redhat.com>

	* decl.c (wrap_cleanups_r): Don't wrap if noexcept.


Copyright (C) 2022 Free Software Foundation, Inc.

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.