aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/ChangeLog
blob: 0cacefa674d158b8933b6caa0686a2eedc10d509 (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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
2018-01-18  Nathan Sidwell  <nathan@acm.org>

	PR c++/83160
	* cp-tree.h (mark_use): Declare.
	* expr.c (mark_use): Make extern.
	* call.c (direct_reference_binding): Set inner conv's
	rvaluedness_matches_p, if it is an identity.
	(convert_like_real): Mark lvalue or rvalue use for identity as
	rvaledness_matches_p demands.

2018-01-18  Jakub Jelinek  <jakub@redhat.com>

	PR c++/83824
	* parser.c (attr_chainon): New function.
	(cp_parser_label_for_labeled_statement, cp_parser_decl_specifier_seq,
	cp_parser_namespace_definition, cp_parser_init_declarator,
	cp_parser_type_specifier_seq, cp_parser_parameter_declaration,
	cp_parser_gnu_attributes_opt): Use it.
	(cp_parser_member_declaration, cp_parser_objc_class_ivars,
	cp_parser_objc_struct_declaration): Likewise.  Don't reset
	prefix_attributes if attributes is error_mark_node.

2018-01-17  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/78344
	* decl.c (grokdeclarator): Do not append the error_mark_node
	due to an erroneous optional attribute-specifier-seq.

2018-01-17  Jakub Jelinek  <jakub@redhat.com>

	PR c++/83897
	* cp-gimplify.c (cp_maybe_instrument_return): Handle
	CLEANUP_POINT_EXPR.

2018-01-17  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/81054
	* constexpr.c (ensure_literal_type_for_constexpr_object): Return
	error_mark_node when we give an error.
	* decl.c (cp_finish_decl): Use the latter.

2018-01-17  Nathan Sidwell  <nathan@acm.org>

	PR c++/83287
	* init.c (build_raw_new_expr): Scan list for lookups to keep.

2018-01-17  David Malcolm  <dmalcolm@redhat.com>

	PR c++/83814
	* expr.c (fold_for_warn): Move from c-common.c, reducing to just
	the C++ part.  If processing a template, call
	fold_non_dependent_expr rather than fully folding.

2018-01-17  Jason Merrill  <jason@redhat.com>

	PR c++/81067 - redundant NULL warning.
	* call.c (convert_like_real): Restore null_node handling.

2018-01-17  Jason Merrill  <jason@redhat.com>

	PR c++/81843 - ICE with variadic member template.
	PR c++/72801
	* pt.c (unify_pack_expansion): Don't try to deduce enclosing
	template args.

2018-01-17  David Malcolm  <dmalcolm@redhat.com>

	PR c++/83799
	* pt.c (type_dependent_expression_p): Strip any location wrapper
	before testing tree codes.
	(selftest::test_type_dependent_expression_p): New function.
	(selftest::cp_pt_c_tests): Call it.

2018-01-17  Nathan Sidwell  <nathan@acm.org>

	PR c++/83739
	* pt.c (tsubst_expr) <case RANGE_FOR_STMT>: Rebuild a range_for if
	this not a final instantiation.

2018-01-16  Jason Merrill  <jason@redhat.com>

	PR c++/83714 - ICE checking return in template.
	* typeck.c (check_return_expr): Call build_non_dependent_expr.

2018-01-16  Jakub Jelinek  <jakub@redhat.com>

	PR c++/83817
	* pt.c (tsubst_copy_and_build) <case CALL_EXPR>: If function
	is AGGR_INIT_EXPR rather than CALL_EXPR, set AGGR_INIT_FROM_THUNK_P
	instead of CALL_FROM_THUNK_P.

	PR c++/83825
	* name-lookup.c (member_vec_dedup): Return early if len is 0.
	(resort_type_member_vec, set_class_bindings,
	insert_late_enum_def_bindings): Use vec qsort method instead of
	calling qsort directly.

2018-01-15  Martin Sebor  <msebor@redhat.com>

	PR c++/83588
	* class.c (find_flexarrays): Make a record of multiple flexible array
	members.

2018-01-12  Jason Merrill  <jason@redhat.com>

	PR c++/83186 - ICE with static_cast of list-initialized temporary.
	* typeck.c (build_static_cast): Use build_non_dependent_expr.

2018-01-12  Nathan Sidwell  <nathan@acm.org>

	* cp-tree.h (mark_rvalue_use): Add parm name.
	* expr.c (mark_lvalue_use, mark_lvalue_use_nonread): Move next to
	mark_rvalue_use.
	* call.c (convert_like_real): Fix formatting.

2018-01-11  Jason Merrill  <jason@redhat.com>

	PR c++/82728 - wrong -Wunused-but-set-variable
	PR c++/82799
	PR c++/83690
	* call.c (perform_implicit_conversion_flags): Call mark_rvalue_use.
	* decl.c (case_conversion): Likewise.
	* semantics.c (finish_static_assert): Call
	perform_implicit_conversion_flags.

2018-01-11  Nathan Sidwell  <nathan@acm.org>

	* method.c (enum mangling_flags): Delete long-dead enum.

2018-01-10  Paolo Carlini  <paolo.carlini@oracle.com>

	* parser.c (cp_parser_std_attribute_spec): When
        token_pair::require_open / require_close return false simply
	return error_mark_node, avoid duplicate cp_parser_error about
	expected '(' / ')', respectively.

2018-01-10  David Malcolm  <dmalcolm@redhat.com>

	PR c++/43486
	* call.c (null_ptr_cst_p): Strip location wrappers when
	converting from '0' to a pointer type in C++11 onwards.
	(conversion_null_warnings): Replace comparison with null_node with
	call to null_node_p.
	(build_over_call): Likewise.
	* cp-gimplify.c (cp_fold): Remove the early bailout when
	processing_template_decl.
	* cp-lang.c (selftest::run_cp_tests): Call
	selftest::cp_pt_c_tests and selftest::cp_tree_c_tests.
	* cp-tree.h (cp_expr::maybe_add_location_wrapper): New method.
	(selftest::run_cp_tests): Move decl to bottom of file.
	(null_node_p): New inline function.
	(selftest::cp_pt_c_tests): New decl.
	(selftest::cp_tree_c_tests): New decl.
	* cvt.c (build_expr_type_conversion): Replace comparison with
	null_node with call to null_node_p.
	* error.c (args_to_string): Likewise.
	* except.c (build_throw): Likewise.
	* mangle.c (write_expression): Skip location wrapper nodes.
	* parser.c (literal_integer_zerop): New function.
	(cp_parser_postfix_expression): Call maybe_add_location_wrapper on
	the result for RID_TYPEID. Pass true for new "wrap_locations_p"
	param of cp_parser_parenthesized_expression_list.  When calling
	warn_for_memset, replace integer_zerop calls with
	literal_integer_zerop, eliminating the double logical negation
	cast to bool.  Eliminate the special-casing for CONST_DECL in
	favor of the fold_for_warn within warn_for_memset.
	(cp_parser_parenthesized_expression_list): Add "wrap_locations_p"
	param, defaulting to false.  Convert "expr" to a cp_expr, and call
	maybe_add_location_wrapper on it when wrap_locations_p is true.
	(cp_parser_unary_expression): Call maybe_add_location_wrapper on
	the result for RID_ALIGNOF and RID_SIZEOF.
	(cp_parser_builtin_offsetof): Likewise.
	* pt.c: Include "selftest.h".
	(tsubst_copy): Handle location wrappers.
	(tsubst_copy_and_build): Likewise.
	(build_non_dependent_expr): Likewise.
	(selftest::test_build_non_dependent_expr): New function.
	(selftest::cp_pt_c_tests): New function.
	* tree.c: Include "selftest.h".
	(lvalue_kind): Handle VIEW_CONVERT_EXPR location wrapper nodes.
	(selftest::test_lvalue_kind): New function.
	(selftest::cp_tree_c_tests): New function.
	* typeck.c (string_conv_p): Strip any location wrapper from "exp".
	(cp_build_binary_op): Replace comparison with null_node with call
	to null_node_p.
	(build_address): Use location of operand when building address
	expression.

2018-01-10  Marek Polacek  <polacek@redhat.com>

	PR c++/82541
	* call.c (build_conditional_expr_1): Check complain before warning.
	* pt.c (tsubst_copy_and_build) <case COND_EXPR>: Suppress
	-Wduplicated-branches.

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

	PR c++/81327
	* call.c (maybe_warn_class_memaccess): Add forward declaration.
	Change last argument from tree * to const vec<tree, va_gc> *, adjust
	args uses and check number of operands too.  Don't strip away any
	nops.  Use maybe_constant_value when looking for INTEGER_CST args.
	Deal with src argument not having pointer type.  Check
	tree_fits_uhwi_p before calling tree_to_uhwi.  Remove useless
	test.
	(build_over_call): Call maybe_warn_class_memaccess here on the
	original arguments.
	(build_cxx_call): Rather than here on converted arguments.

2018-01-10  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/81055
	* init.c (build_vec_init): Avoid building an INIT_EXPR with
	error_mark_node as second argument.

2018-01-09  Jakub Jelinek  <jakub@redhat.com>

	PR c++/83734
	* constexpr.c (cxx_eval_statement_list): Ignore DEBUG_BEGIN_STMTs
	in STATEMENT_LIST.  Remove unneeded assert.

2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* constexpr.c (cxx_eval_array_reference): Handle polynomial
	VECTOR_CST_NELTS.
	(cxx_fold_indirect_ref): Handle polynomial TYPE_VECTOR_SUBPARTS.
	* call.c (build_conditional_expr_1): Likewise.
	* decl.c (cp_finish_decomp): Likewise.
	* mangle.c (write_type): Likewise.
	* typeck.c (structural_comptypes): Likewise.
	(cp_build_binary_op): Likewise.
	* typeck2.c (process_init_constructor_array): Likewise.

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

	PR c++/83555
	* typeck.c (build_static_cast_1): For static casts to reference types,
	call build_base_path with flag_delete_null_pointer_checks as nonnull
	instead of always false.  When -fsanitize=null, call
	ubsan_maybe_instrument_reference on the NULL reference INTEGER_CST.
	* cp-gimplify.c (cp_genericize_r): Don't walk subtrees of UBSAN_NULL
	call if the first argument is INTEGER_CST with REFERENCE_TYPE.

2018-01-03  Nathan Sidwell  <nathan@acm.org>

	PR c++/83667
	* method.c (make_alias_for): Copy DECL_CONTEXT.

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

	PR c++/83592
	* decl.c (grokdeclarator): Don't warn about MVP in typename context.

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

	PR preprocessor/83602
	* name-lookup.c (lookup_name_fuzzy): Don't use macro_use_before_def
	for builtin macros.

	PR c++/83634
	* cp-gimplify.c (cp_fold) <case NOP_EXPR>: If the operand folds to
	error_mark_node, return error_mark_node.

	Update copyright years.

2018-01-02  Jakub Jelinek  <jakub@redhat.com>

	PR c++/83556
	* tree.c (replace_placeholders_r): Pass NULL as last argument to
	cp_walk_tree instead of d->pset.  If non-TREE_CONSTANT and
	non-PLACEHOLDER_EXPR tree has been seen already, set *walk_subtrees
	to false and return.
	(replace_placeholders): Pass NULL instead of &pset as last argument
	to cp_walk_tree.

2018-01-02  Nathan Sidwell  <nathan@acm.org>

	* constexpr.c (cxx_bind_parameters_in_call): Remove unneeded local
	lval var.

Copyright (C) 2018 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.