]>
Commit | Line | Data |
---|---|---|
c9281ef8 | 1 | 2017-12-19 Jakub Jelinek <jakub@redhat.com> |
2 | ||
3 | * name-lookup.c (get_std_name_hint): Replace Yoda conditions with | |
4 | typical order conditions. | |
5 | * class.c (check_bitfield_decl): Likewise. | |
6 | * pt.c (convert_template_argument): Likewise. | |
7 | * decl.c (duplicate_decls): Likewise. | |
8 | * typeck.c (commonparms): Likewise. | |
9 | ||
998700c9 | 10 | 2017-12-19 Paolo Carlini <paolo.carlini@oracle.com> |
11 | ||
12 | * cp-tree.h: Fix typo in comment. | |
13 | ||
167a09fb | 14 | 2017-12-18 Marek Polacek <polacek@redhat.com> |
15 | ||
16 | PR c++/83116 | |
17 | * constexpr.c (cxx_eval_call_expression): Only look into | |
18 | constexpr_call_table if ctx->strict. | |
19 | ||
21e97277 | 20 | 2017-12-18 Jakub Jelinek <jakub@redhat.com> |
21 | ||
22 | PR c++/83300 | |
23 | * decl2.c (save_template_attributes): Add flags argument, if | |
24 | not ATTR_FLAG_TYPE_IN_PLACE, *decl_p is a type and we want to | |
25 | modify TYPE_ATTRIBUTES, add them on type attribute variant. | |
26 | ||
90144cb9 | 27 | 2017-12-18 Nathan Sidwell <nathan@acm.org> |
28 | ||
29 | PR c++/59930 | |
30 | * name-lookup.c (name_lookup::search_unqualified): Don't search | |
31 | parent namespace when looking for hidden things. | |
32 | * pt.c (tsubst_friend_class): Always push to friend scope, drop | |
33 | unneeded self-friend check. Inject new hidden friend into correct | |
34 | scope. | |
35 | ||
672bc44d | 36 | 2017-12-15 Jakub Jelinek <jakub@redhat.com> |
37 | ||
827a415c | 38 | PR c++/83205 |
39 | * decl.c (cp_finish_decomp): Handle the case when tsize is not | |
40 | error_mark_node, but doesn't fit into uhwi. Split up count != eltscnt | |
41 | and !tree_fits_uhwi_p (tsize) error_at calls into error_n and inform_n | |
42 | to handle plural forms properly. | |
43 | ||
aa996a7a | 44 | PR c++/81197 |
45 | * cp-tree.h (cp_maybe_mangle_decomp): Declare. | |
46 | * decl.c (cp_maybe_mangle_decomp): New function. | |
47 | (cp_finish_decomp): Don't SET_DECL_ASSEMBLER_NAME here. | |
48 | * parser.c (cp_convert_range_for, | |
49 | cp_parser_decomposition_declaration): Call cp_maybe_mangle_decomp. | |
50 | * pt.c (tsubst_expr): Likewise. | |
51 | * mangle.c (find_decomp_unqualified_name): New function. | |
52 | (write_unqualified_name): Handle DECL_DECOMPOSITION_P | |
53 | where DECL_ASSEMBLER_NAME is already set. | |
54 | ||
7aac6ee6 | 55 | PR c++/80135 |
56 | PR c++/81922 | |
57 | * typeck2.c (digest_init_r): Change nested argument type from bool to | |
58 | int. Use code instead of TREE_CODE (type) where possible. If | |
59 | nested == 2, diagnose initialization of flexible array member with | |
60 | STRING_CST. Pass nested to process_init_constructor. Formatting fix. | |
61 | (digest_init, digest_init_flags): Adjust digest_init_r caller. | |
62 | (massage_init_elt): Add nested argument. Pass 2 instead of 1 to | |
63 | digest_init_r's nested argument if nested is non-zero. | |
64 | (process_init_constructor_array): Add nested argument. If nested == 2, | |
65 | diagnose initialization of flexible array member with non-empty | |
66 | braced enclosed list. Pass nested to massage_init_elt. | |
67 | (process_init_constructor_record, process_init_constructor_union): Add | |
68 | nested argument, pass it to massage_init_elt. | |
69 | (process_init_constructor): Add nested argument, pass it to | |
70 | process_init_constructor_{array,record,union}. | |
71 | * init.c (find_field_init): Renamed to ... | |
72 | (find_flexarray_init): ... this. Return NULL_TREE if init is | |
73 | error_mark_node. Don't look through nested CONSTRUCTORs. | |
74 | (warn_placement_new_too_small): Adjust caller. | |
75 | ||
5b5ac2fb | 76 | PR c++/83217 |
77 | * decl.c (cp_finish_decomp): If decl's type is REFERENCE_TYPE, | |
78 | call complete_type (TREE_TYPE (type)). | |
79 | ||
672bc44d | 80 | * tree.c (cxx_attribute_table, std_attribute_table): Swap |
81 | affects_type_identity and handler fields, adjust comments. | |
82 | ||
ca932088 | 83 | 2017-12-15 Nathan Sidwell <nathan@acm.org> |
84 | ||
85 | PR c++/59930 | |
86 | * decl.c (xref_tag_1): Correct comments about template friends and | |
87 | default args. | |
88 | * friend.c (make_friend_class): Move comments concerning | |
89 | self-friendliness to code dealing with such. | |
90 | * pt.c (check_default_tmpl_args): Deal with template friend | |
91 | classes too. | |
92 | (push_template_decl_real): Check default args for non-function | |
93 | template friends. | |
94 | ||
d76c514d | 95 | 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de> |
96 | ||
97 | * decl2.c (start_static_storage_duration_function): Avoid warning. | |
98 | * typeck.c (cxx_safe_arg_type_equiv_p, | |
99 | cxx_safe_function_type_cast_p): New function. | |
100 | (build_reinterpret_cast_1): Implement -Wcast-function-type. | |
101 | ||
62634750 | 102 | 2017-12-14 Jakub Jelinek <jakub@redhat.com> |
103 | ||
104 | PR c++/79650 | |
105 | * pt.c (convert_nontype_argument): Diagnose | |
106 | reduced_constant_expression_p expressions that aren't INTEGER_CST. | |
107 | ||
184dcc4e | 108 | 2017-12-13 Paolo Carlini <paolo.carlini@oracle.com> |
109 | ||
110 | PR c++/81061 | |
111 | * typeck.c (cp_build_modify_expr): Upon cxx_readonly_error | |
112 | immediately return error_mark_node. | |
113 | ||
7643d6c0 | 114 | 2017-12-13 Nathan Sidwell <nathan@acm.org> |
115 | ||
116 | PR c++/15272 | |
117 | * pt.c (tsubst_baselink): Don't repeat the lookup for | |
118 | non-dependent baselinks. | |
119 | ||
0b5993cf | 120 | 2017-12-12 Jason Merrill <jason@redhat.com> |
121 | ||
911779d8 | 122 | * decl.c (value_dependent_init_p): Check the type of a CONSTRUCTOR. |
123 | (type_dependent_init_p): Remove. | |
124 | ||
0b5993cf | 125 | PR c++/82115 - ICE with variable initialized with its own address. |
126 | * cp-tree.h (struct lang_decl_base): Add dependent_init_p. | |
127 | (DECL_DEPENDENT_INIT_P, SET_DECL_DEPENDENT_INIT_P): New. | |
128 | * decl.c (cp_finish_decl): Set it. | |
129 | (duplicate_decls): Copy it. | |
130 | * pt.c (tsubst_decl): Clear it. | |
131 | (value_dependent_expression_p): Revert earlier change. Check it. | |
132 | ||
90567983 | 133 | 2017-12-12 Alexandre Oliva <aoliva@redhat.com> |
134 | ||
135 | * constexpr.c (check_constexpr_ctor_body_1): Skip begin stmt | |
136 | markers. | |
137 | (constexpr_fn_retval): Likewise. | |
138 | (potential_constant_expression_1): Likewise. | |
139 | (cxx_eval_statement_list): Check that a begin stmt marker is | |
140 | not used as the value of a statement list. | |
141 | (cxx_eval_constant_expression): Return begin stmt markers | |
142 | unchanged. | |
143 | * cp-array-notation.c (stmt_location): New. | |
144 | (cp_expand_cond_array_notations): Use it. | |
145 | * cp-objcp-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true. | |
146 | * parser.c (add_debug_begin_stmt): New. | |
147 | (cp_parser_statement): Call it. | |
148 | * pt.c (tsubst_copy): Handle begin stmt markers. | |
149 | ||
dab0e385 | 150 | 2017-12-07 Martin Sebor <msebor@redhat.com> |
151 | ||
152 | PR c/81544 | |
153 | * cp-tree.h (decls_match): Add default argument. | |
154 | * decl.c (decls_match): Avoid calling into the target back end | |
155 | and triggering an error. | |
156 | * decl2.c (cplus_decl_attributes): Look up existing declaration and | |
157 | pass it to decl_attributes. | |
158 | * tree.c (cxx_attribute_table): Initialize new member of struct | |
159 | attribute_spec. | |
160 | ||
288b3981 | 161 | 2017-12-06 Jakub Jelinek <jakub@redhat.com> |
162 | ||
163 | PR c++/80259 | |
164 | * decl2.c (grokfield): Diagnose = delete redefinition of a friend. | |
165 | ||
edf8f3f6 | 166 | 2017-12-06 Jason Merrill <jason@redhat.com> |
167 | ||
d279e49d | 168 | * call.c (convert_for_arg_passing): Pass NULL_TREE to |
169 | targetm.calls.promote_prototypes. | |
170 | (type_passed_as): Likewise. | |
171 | ||
edf8f3f6 | 172 | PR c++/82115 - ICE with variable initialized with its own address. |
173 | * pt.c (value_dependent_expression_p): Add lval parameter. Don't | |
174 | consider DECL_INITIAL if it's true. | |
175 | ||
08233401 | 176 | 2017-12-06 David Malcolm <dmalcolm@redhat.com> |
177 | ||
178 | PR c/83236 | |
179 | * name-lookup.c (consider_binding_level): Don't suggest names that | |
180 | are reserved for use by the implementation. | |
181 | ||
aa0e50a0 | 182 | 2017-12-06 David Malcolm <dmalcolm@redhat.com> |
183 | ||
184 | * name-lookup.c: Include "c-family/c-spellcheck.h". | |
185 | ||
3ead9ac3 | 186 | 2017-12-05 Jason Merrill <jason@redhat.com> |
187 | ||
188 | PR c++/82331 - ICE with variadic partial specialization of auto | |
189 | * pt.c (unify) [TEMPLATE_PARM_INDEX]: Set processing_template_decl | |
190 | around call to tsubst. | |
191 | ||
0b040903 | 192 | 2017-12-05 Nathan Sidwell <nathan@acm.org> |
193 | ||
194 | PR c++/83287 | |
195 | * tree.c (build_min): Check CAST_EXPR arg for OVERLOADs. | |
196 | ||
eabe2d94 | 197 | 2017-12-05 Martin Liska <mliska@suse.cz> |
198 | Jakub Jelinek <jakub@redhat.com> | |
199 | ||
200 | * typeck.c (pointer_diff): Add new argument and instrument | |
201 | pointer subtraction. | |
202 | (cp_build_binary_op): Create compound expression if doing an | |
203 | instrumentation. | |
204 | ||
9987c8d5 | 205 | 2017-12-05 Jakub Jelinek <jakub@redhat.com> |
206 | ||
207 | * cp-gimplify.c (cp_maybe_instrument_return): Don't add | |
208 | __builtin_unreachable if -O0 or if -fsanitize=unreachable. | |
209 | ||
27db1f50 | 210 | 2017-12-04 Jason Merrill <jason@redhat.com> |
211 | ||
212 | PR c++/83273 - constexpr if allows non-constant condition | |
213 | * semantics.c (finish_if_stmt_cond): Use require_constant_expression | |
214 | rather than is_constant_expression. | |
215 | * constexpr.c (potential_constant_expression_1) [LAMBDA_EXPR]: Allow | |
216 | in C++17. | |
217 | ||
b05da963 | 218 | 2017-12-01 Jason Merrill <jason@redhat.com> |
219 | ||
ad453544 | 220 | Give #include hints for <complex>. |
221 | * name-lookup.c (get_std_name_hint): Add <complex>. | |
222 | * parser.c (cp_parser_diagnose_invalid_type_name): Call | |
223 | suggest_alternative_in_explicit_scope. | |
224 | (cp_parser_namespace_name): Likewise. | |
225 | ||
b05da963 | 226 | PR c++/79228 - extensions hide C++14 complex literal operators |
227 | * parser.c (cp_parser_userdef_numeric_literal): Be helpful about | |
228 | 'i' in C++14 and up. | |
229 | ||
17cf92d6 | 230 | 2017-12-01 Jakub Jelinek <jakub@redhat.com> |
231 | ||
4d62fce5 | 232 | * parser.c (cp_parser_new): Don't clear cilk_simd_fn_info. |
233 | (parsing_nsdmi): Adjust comment. | |
234 | (cp_parser_omp_for_loop_init): Likewise. | |
235 | * parser.h (struct cp_omp_declare_simd_data): Adjust comment. | |
236 | (struct cp_parser): Remove cilk_simd_fn_info field. | |
237 | * cp-tree.h (cilk_valid_spawn): Remove. | |
238 | ||
17cf92d6 | 239 | PR c/79153 |
240 | * cp-gimplify.c (genericize_switch_stmt): Emit LABEL_EXPR for the | |
241 | break label into SWITCH_BODY instead of after it and set | |
242 | SWITCH_BREAK_LABEL_P on it. | |
243 | * parser.c (cp_parser_objc_expression): Add FALLTHRU comment to avoid | |
244 | -Wimplicit-fallthrough warning. | |
245 | ||
207beb37 | 246 | 2017-11-30 Jason Merrill <jason@redhat.com> |
247 | ||
248 | PR c++/82219 - bogus -Wignored-qualifiers with template | |
249 | * pt.c (tsubst_copy_and_build) [STATIC_CAST_EXPR]: Suppress | |
250 | -Wignored-qualifiers. | |
251 | ||
f2d40c10 | 252 | 2017-11-29 David Malcolm <dmalcolm@redhat.com> |
253 | ||
254 | * parser.c (cp_parser_unary_expression): Generate a location for | |
255 | "noexcept". | |
256 | (cp_parser_trait_expr): Generate and return a location_t, | |
257 | converting the return type from tree to cp_expr. | |
258 | (cp_parser_static_assert): Pass location of the condition to | |
259 | finish_static_assert, rather than that of the "static_assert" | |
260 | token, where available. | |
261 | ||
069eebda | 262 | 2017-11-29 Paolo Carlini <paolo.carlini@oracle.com> |
263 | ||
264 | PR c++/82293 | |
265 | * lambda.c (nonlambda_method_basetype): Don't use LAMBDA_TYPE_P | |
266 | on a null type. | |
267 | ||
f8c7ac65 | 268 | 2017-11-29 Jason Merrill <jason@redhat.com> |
269 | ||
270 | PR c++/82760 - memory corruption with aligned new. | |
271 | * call.c (build_operator_new_call): Update *args if we add the | |
272 | align_arg. | |
273 | ||
3501ad33 | 274 | 2017-11-28 Jakub Jelinek <jakub@redhat.com> |
275 | ||
276 | PR sanitizer/81275 | |
277 | * cp-tree.h (SWITCH_STMT_ALL_CASES_P): Define. | |
278 | (SWITCH_STMT_NO_BREAK_P): Define. | |
279 | (note_break_stmt, note_iteration_stmt_body_start, | |
280 | note_iteration_stmt_body_end): Declare. | |
281 | * decl.c (struct cp_switch): Add has_default_p, break_stmt_seen_p | |
069eebda | 282 | and in_loop_body_p fields. |
3501ad33 | 283 | (push_switch): Clear them. |
284 | (pop_switch): Set SWITCH_STMT_CANNOT_FALLTHRU_P if has_default_p | |
285 | and !break_stmt_seen_p. Assert in_loop_body_p is false. | |
286 | (note_break_stmt, note_iteration_stmt_body_start, | |
287 | note_iteration_stmt_body_end): New functions. | |
288 | (finish_case_label): Set has_default_p when both low and high | |
289 | are NULL_TREE. | |
290 | * parser.c (cp_parser_iteration_statement): Use | |
291 | note_iteration_stmt_body_start and note_iteration_stmt_body_end | |
292 | around parsing iteration body. | |
293 | * pt.c (tsubst_expr): Likewise. | |
294 | * cp-objcp-common.c (cxx_block_may_fallthru): Return false for | |
295 | SWITCH_STMT which contains no BREAK_STMTs, contains a default: | |
296 | CASE_LABEL_EXPR and where SWITCH_STMT_BODY isn't empty and | |
297 | can't fallthru. | |
298 | * semantics.c (finish_break_stmt): Call note_break_stmt. | |
299 | * cp-gimplify.c (genericize_switch_stmt): Copy SWITCH_STMT_ALL_CASES_P | |
300 | bit to SWITCH_ALL_CASES_P. Assert that if SWITCH_STMT_NO_BREAK_P then | |
301 | the break label is not TREE_USED. | |
302 | ||
efa02472 | 303 | 2017-11-28 Julia Koval <julia.koval@intel.com> |
304 | Sebastian Peryt <sebastian.peryt@intel.com> | |
305 | ||
306 | * Make-lang.in (cp/cp-array-notation.o, cp/cp-cilkplus.o): Delete. | |
307 | * call.c (convert_for_arg_passing, build_cxx_call): Remove cilkplus. | |
308 | * constexpr.c (potential_constant_expression_1): Ditto. | |
309 | * cp-array-notation.c: Delete. | |
310 | * cp-cilkplus.c: Ditto. | |
311 | * cp-cilkplus.h: Ditto. | |
312 | * cp-gimplify.c (cp_gimplify_expr, cp_fold_r, cp_genericize): Remove | |
313 | cilkplus condition. | |
314 | * cp-objcp-common.c (ARRAY_NOTATION_REF): Delete. | |
315 | * cp-tree.h (cilkplus_an_triplet_types_ok_p): Delete. | |
316 | * decl.c (grokfndecl, finish_function): Remove cilkplus condition. | |
317 | * error.c (dump_decl, dump_expr): Remove ARRAY_NOTATION_REF condition. | |
318 | * lambda.c (cp-cilkplus.h): Remove. | |
319 | * parser.c (cp_parser_cilk_simd, cp_parser_cilk_for, | |
320 | cp_parser_cilk_simd_vectorlength): Delete. | |
321 | (cp_debug_parser, cp_parser_ctor_initializer_opt_and_function_body, | |
322 | cp_parser_postfix_expression, | |
323 | cp_parser_postfix_open_square_expression, | |
324 | cp_parser_statement, cp_parser_jump_statement, | |
325 | cp_parser_direct_declarator, | |
326 | cp_parser_late_return_type_opt, cp_parser_gnu_attribute_list, | |
327 | cp_parser_omp_clause_name, cp_parser_omp_clause_aligned, | |
328 | cp_parser_omp_clause_linear, cp_parser_omp_all_clauses, | |
329 | cp_parser_omp_flush, | |
330 | cp_parser_omp_for_cond, cp_parser_omp_for_incr, | |
331 | cp_parser_omp_for_loop_init, | |
332 | cp_parser_omp_for_loop, | |
333 | cp_parser_omp_declare_simd): Remove cilkplus support. | |
334 | (CILK_SIMD_FN_CLAUSE_MASK, cp_parser_late_parsing_cilk_simd_fn_info, | |
335 | cp_parser_cilk_grainsize): Remove. | |
336 | (cp_parser_pragma, c_parse_file): Remove cilkplus support. | |
337 | (cp_parser_cilk_simd_vectorlength, cp_parser_cilk_simd_linear, | |
338 | cp_parser_cilk_simd_clause_name, cp_parser_cilk_simd_all_clauses, | |
339 | cp_parser_cilk_simd, cp_parser_cilk_for): Remove. | |
340 | * parser.h (IN_CILK_SIMD_FOR, IN_CILK_SPAWN): Remove. | |
341 | * pt.c (tsubst_attribute, tsubst_expr, tsubst_copy_and_build): Remove | |
342 | cilkplus support. | |
343 | * semantics.c (finish_goto_stmt, begin_while_stmt, finish_do_body, | |
344 | finish_init_stmt, finish_switch_cond, simplify_aggr_init_expr, | |
345 | finish_omp_clauses, finish_omp_clauses, finish_omp_for): Remove | |
346 | cilkplus | |
347 | support. | |
348 | * tree.c (lvalue_kind): Remove ARRAY_NOTATION_REF conditon. | |
349 | * typeck.c (cp_build_array_ref, cp_build_compound_expr, | |
350 | check_return_expr): Remove cilkplus support. | |
351 | ||
bd37ce3e | 352 | 2017-11-28 Jakub Jelinek <jakub@redhat.com> |
353 | ||
354 | * cp-gimplify.c (genericize_switch_stmt): Build SWITCH_EXPR using | |
355 | build2_loc instead of build3_loc. | |
356 | ||
1a53b263 | 357 | 2017-11-27 Martin Sebor <msebor@redhat.com> |
358 | ||
359 | PR c++/83058 | |
360 | * init.c (warn_placement_new_too_small): Use offset_int instead of | |
361 | HOST_WIDE_INT. | |
362 | ||
bdc04723 | 363 | 2017-11-27 Jakub Jelinek <jakub@redhat.com> |
364 | ||
365 | PR c++/81888 | |
366 | * parser.c (cp_parser_decomposition_declaration): Reject just | |
367 | BRACE_ENCLOSED_INITIALIZER_P initializers with nelts != 1 rather | |
368 | than all such CONSTRUCTORs, and only if is_direct_init is true. | |
369 | ||
681f91a5 | 370 | 2017-11-27 Jason Merrill <jason@redhat.com> |
371 | ||
372 | * pt.c (primary_template_specialization_p): Rename from | |
373 | primary_template_instantiation_p. Don't check | |
374 | DECL_TEMPLATE_INSTANTIATION. | |
375 | * call.c, cp-tree.h, decl2.c: Adjust. | |
376 | ||
3c382e05 | 377 | 2017-11-27 Jakub Jelinek <jakub@redhat.com> |
378 | ||
379 | PR c++/81675 | |
380 | * cp-gimplify.c (cp_fold) <case COND_EXPR>: Don't return immediately | |
381 | for VOID_TYPE_P COND_EXPRs, instead fold the operands and if op0 is | |
382 | INTEGER_CST, ensure that both op1 and op2 are non-NULL and fall | |
383 | through into normal folding, otherwise just rebuild x if any op | |
384 | changed. | |
385 | ||
3c382e05 | 386 | 2017-11-14 Boris Kolpackov <boris@codesynthesis.com> |
864319e6 | 387 | |
388 | * Make-lang.in (c++.install-plugin): Install backend import library. | |
389 | ||
3b3858a1 | 390 | 2017-11-23 Jakub Jelinek <jakub@redhat.com> |
391 | ||
392 | * parser.c (cp_parser_omp_declare): Change return type to bool from | |
393 | void, return true for declare simd. | |
394 | (cp_parser_pragma): Return cp_parser_omp_declare returned value | |
395 | rather than always false. | |
396 | ||
2a09b28c | 397 | 2017-11-23 Mike Stump <mikestump@comcast.net> |
398 | Eric Botcazou <ebotcazou@adacore.com> | |
399 | ||
400 | * pt.c (tsubst_expr) <ANNOTATE_EXPR>: Recurse on 3rd operand. | |
401 | * semantics.c (finish_while_stmt_cond): Pass 3rd operand to | |
402 | ANNOTATE_EXPR. | |
403 | (finish_do_stmt): Likewise. | |
404 | (finish_for_cond): Likewise. | |
405 | ||
474af845 | 406 | 2017-11-22 Jakub Jelinek <jakub@redhat.com> |
407 | ||
408 | PR c++/82401 | |
409 | * name-lookup.c (member_name_cmp): Return 0 if a == b. | |
410 | ||
8e4391a5 | 411 | 2017-11-22 David Malcolm <dmalcolm@redhat.com> |
412 | ||
413 | PR c++/62170 | |
414 | * error.c (type_to_string): Add leading comment. Add params | |
415 | "postprocessed", "quote", and "show_color", using them to fix | |
416 | quoting of the "aka" for types involving typedefs. | |
417 | (arg_to_string): Update for new params to type_to_string. | |
418 | (cxx_format_postprocessor::handle): Likewise. | |
419 | (cp_printer): Convert penultimate param from bool to bool *. | |
420 | Update call to type_to_string and calls to | |
421 | defer_phase_2_of_type_diff. | |
422 | ||
532d84ff | 423 | 2017-11-22 Marek Polacek <polacek@redhat.com> |
424 | ||
425 | PR c++/60336 | |
426 | PR middle-end/67239 | |
427 | PR target/68355 | |
428 | * class.c (layout_class_type): Set DECL_PADDING_P on padding. | |
429 | * decl.c (cxx_init_decl_processing): Set TRANSLATION_UNIT_WARN_EMPTY_P. | |
430 | (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields. | |
431 | ||
5967b28b | 432 | 2017-11-21 Martin Liska <mliska@suse.cz> |
433 | ||
434 | * class.c (finalize_literal_type_property): Add quotes for | |
435 | constexpr keyword. | |
436 | (explain_non_literal_class): Likewise. | |
437 | * constexpr.c (ensure_literal_type_for_constexpr_object): Likewise. | |
438 | (is_valid_constexpr_fn): Likewise. | |
439 | (check_constexpr_ctor_body): Likewise. | |
440 | (register_constexpr_fundef): Likewise. | |
441 | (explain_invalid_constexpr_fn): Likewise. | |
442 | (cxx_eval_builtin_function_call): Likewise. | |
443 | (cxx_eval_call_expression): Likewise. | |
444 | (cxx_eval_loop_expr): Likewise. | |
445 | (potential_constant_expression_1): Likewise. | |
446 | * decl.c (check_previous_goto_1): Likewise. | |
447 | (check_goto): Likewise. | |
448 | (grokfndecl): Likewise. | |
449 | (grokdeclarator): Likewise. | |
450 | * error.c (maybe_print_constexpr_context): Likewise. | |
451 | * method.c (process_subob_fn): Likewise. | |
452 | (defaulted_late_check): Likewise. | |
453 | * parser.c (cp_parser_compound_statement): Likewise. | |
454 | ||
57e83b58 | 455 | 2017-11-21 Marc Glisse <marc.glisse@inria.fr> |
456 | ||
457 | * constexpr.c (cxx_eval_constant_expression, | |
458 | potential_constant_expression_1): Handle POINTER_DIFF_EXPR. | |
459 | * cp-gimplify.c (cp_fold): Likewise. | |
460 | * error.c (dump_expr): Likewise. | |
461 | * typeck.c (pointer_diff): Use POINTER_DIFF_EXPR. | |
462 | ||
805f9bbc | 463 | 2017-11-21 Jakub Jelinek <jakub@redhat.com> |
464 | ||
465 | P0428R2 - familiar template syntax for generic lambdas | |
466 | * parser.c (cp_parser_lambda_declarator_opt): Don't pedwarn | |
467 | for cxx2a and above, reword pedwarn for C++14/C++17. | |
468 | ||
145fb49f | 469 | 2017-11-20 David Malcolm <dmalcolm@redhat.com> |
470 | ||
471 | PR c/81404 | |
472 | * name-lookup.c: Include "c-family/known-headers.h" | |
473 | (lookup_name_fuzzy): Call get_cp_stdlib_header_for_name and | |
474 | potentially return a new suggest_missing_header hint. | |
475 | ||
dbfb2c43 | 476 | 2017-11-20 David Malcolm <dmalcolm@redhat.com> |
477 | ||
478 | PR c++/72786 | |
479 | * name-lookup.c (class macro_use_before_def): New class. | |
480 | (lookup_name_fuzzy): Detect macro that were used before being | |
481 | defined, and report them as such. | |
482 | ||
f918c2c9 | 483 | 2017-11-20 Jason Merrill <jason@redhat.com> |
484 | ||
485 | * decl2.c (constrain_class_visibility): Don't warn about artificial | |
486 | fields. | |
487 | ||
8e79b5ff | 488 | 2017-11-20 Jakub Jelinek <jakub@redhat.com> |
489 | ||
490 | P0329R4: Designated Initialization | |
491 | * parser.c (cp_parser_initializer_clause): List in comment grammar | |
492 | designated-initializer-list. | |
493 | (cp_parser_initializer_list): Allow .identifier = without pedwarn for | |
494 | C++2A, parse .identifier { ... }. Improve location_t argument to | |
495 | pedwarn. Add pedwarn for [cst] = designators. Diagnose ... in | |
496 | designated initializer list. Diagnose mixing designated and | |
497 | non-designated initializer clauses for C++2A. Diagnose duplicated | |
498 | identifiers in designators. | |
499 | * name-lookup.h (search_anon_aggr): New declaration. | |
500 | * name-lookup.c (fields_linear_search): Use search_anon_aggr. | |
501 | (search_anon_aggr): New function. | |
502 | * typeck2.c (process_init_constructor_record): Allow designator | |
503 | to skip over some non-static data members. Handle anonymous | |
504 | aggregates. Add diagnostics for designator order not matching | |
505 | member declaration order. | |
506 | ||
dd008336 | 507 | 2017-11-20 David Malcolm <dmalcolm@redhat.com> |
508 | ||
509 | * name-lookup.c: Define INCLUDE_UNIQUE_PTR before including system.h. | |
510 | Include "c-family/name-hint.h" | |
511 | (suggest_alternatives_for): Convert "fuzzy_name" from const char * | |
512 | to name_hint, and rename to "hint". Pass location to | |
513 | lookup_name_fuzzy. | |
514 | (lookup_name_fuzzy): Convert return type from const char * | |
515 | to name_hint. Add location_t param. | |
516 | * parser.c: Define INCLUDE_UNIQUE_PTR before including system.h. | |
517 | Include "c-family/name-hint.h" | |
518 | (cp_parser_diagnose_invalid_type_name): Convert | |
519 | "suggestion" from const char * to name_hint, and rename to "hint". | |
520 | Pass location to lookup_name_fuzzy. | |
521 | ||
cbc3b89f | 522 | 2017-11-20 Nathan Sidwell <nathan@acm.org> |
523 | ||
524 | PR c++/82878 | |
525 | PR c++/78495 | |
526 | * call.c (build_call_a): Don't set CALL_FROM_THUNK_P for inherited | |
527 | ctor. | |
528 | * cp-gimplify.c (cp_genericize_r): Restore THUNK dereference | |
529 | inhibibition check removed in previous c++/78495 change. | |
530 | ||
31595caf | 531 | 2017-11-20 Jakub Jelinek <jakub@redhat.com> |
532 | ||
533 | PR c++/82781 | |
534 | * constexpr.c (cxx_eval_vector_conditional_expression): New function. | |
535 | (cxx_eval_constant_expression) <case VEC_COND_EXPR>: Use it instead | |
536 | of cxx_eval_conditional_expression. | |
537 | ||
69cd03b2 | 538 | 2017-11-19 Jakub Jelinek <jakub@redhat.com> |
539 | ||
540 | PR c/66618 | |
541 | PR c/69960 | |
542 | * cp-gimplify.c (c_fully_fold): Add LVAL argument, call | |
543 | cp_fold_maybe_rvalue instead of cp_fold_rvalue and pass it !LVAL. | |
544 | ||
44677b54 | 545 | 2017-11-16 Jason Merrill <jason@redhat.com> |
546 | ||
547 | PR c++/79092 - non-type args of different types are different | |
548 | * tree.c (cp_tree_equal): Check the type of constants. | |
549 | * pt.c (unify) [TEMPLATE_PARM_INDEX]: Handle UNIFY_ALLOW_INTEGER | |
550 | when comparing to previously deduced argument. | |
551 | (maybe_convert_nontype_argument): New. | |
552 | (convert_nontype_argument): Call it. | |
553 | (tsubst_copy_and_build): Handle partial instantiation of | |
554 | IMPLICIT_CONV_EXPR. | |
555 | (unify): Ignore type when deducing from array bound. | |
556 | (dependent_type_p_r): Handle DEFERRED_NOEXCEPT. | |
557 | (value_dependent_expression_p): Any type-dependent expression is | |
558 | value-dependent. Handle IMPLICIT_CONV_EXPR. | |
559 | * cp-tree.h (IMPLICIT_CONV_EXPR_NONTYPE_ARG): New. | |
560 | * mangle.c (write_template_arg): Strip IMPLICIT_CONV_EXPR. | |
561 | ||
6c48fa17 | 562 | 2017-11-16 Nathan Sidwell <nathan@acm.org> |
563 | ||
7c129b68 | 564 | PR c++/82836 |
565 | PR c++/82737 | |
566 | * cp-objcp-common.h (LANG_HOOKS_OVERWRITE_DECL_ASSEMBLER_NAME): | |
567 | Override. | |
568 | * cp-tree.h (overwrite_mangling): Declare. | |
569 | * decl2.c (struct mangled_decl_hash): Entries are deletable. | |
570 | (overwrite_mangling): New. | |
571 | ||
6c48fa17 | 572 | PR c++/81060 |
573 | * decl.c (xref_tag_1): Push lambda into current scope. | |
574 | * name-lookup.c (do_pushtag): Don't deal with ts_lambda here. | |
575 | ||
d46b9539 | 576 | 2017-11-15 Nathan Sidwell <nathan@acm.org> |
577 | ||
578 | PR c++/81574 | |
579 | * lambda.c (lambda_capture_field_type): Function references are | |
580 | always catured by reference. | |
581 | ||
ef60df19 | 582 | 2017-11-15 Martin Liska <mliska@suse.cz> |
583 | ||
584 | * decl.c (begin_destructor_body): Use cp_build_fold_indirect_ref | |
585 | instead of cp_build_indirect_ref. | |
586 | ||
f1278899 | 587 | 2017-11-15 Martin Liska <mliska@suse.cz> |
588 | ||
589 | * decl.c (begin_destructor_body): In case of VPTR sanitization | |
590 | (with disabled recovery), zero vptr in order to catch virtual calls | |
591 | after lifetime of an object. | |
592 | ||
8bcf9382 | 593 | 2017-11-14 Jason Merrill <jason@redhat.com> |
594 | ||
595 | Use GTY((cache)) on some hash tables. | |
596 | * decl.c (decomp_type_table): Use tree_cache_map. | |
597 | * init.c (nsdmi_inst): Likewise. | |
598 | * pt.c (defarg_ints): Likewise. | |
599 | * cp-objcp-common.c (cp_get_debug_type): Likewise. | |
600 | ||
c36e63fe | 601 | 2017-11-13 Jason Merrill <jason@redhat.com> |
602 | ||
297de7bc | 603 | Capture adjustments for P0588R1. |
604 | * semantics.c (process_outer_var_ref): Capture variables when | |
605 | they are named; complain about non-capture uses when odr-used. | |
606 | * expr.c (mark_use): Rvalue use looks through capture proxy. | |
607 | * constexpr.c (potential_constant_expression_1): Improve error about | |
608 | use of captured variable. | |
609 | * lambda.c (need_generic_capture, dependent_capture_r) | |
610 | (do_dependent_capture, processing_nonlambda_template): Remove. | |
611 | * call.c (build_this): Remove uses of the above. | |
612 | * decl.c (cp_finish_decl): Likewise. | |
613 | * semantics.c (maybe_cleanup_point_expr) | |
614 | (maybe_cleanup_point_expr_void, finish_goto_stmt) | |
615 | (maybe_convert_cond): Likewise. | |
616 | * typeck.c (check_return_expr): Likewise. | |
617 | ||
0744a0c1 | 618 | Defer folding of *&. |
619 | * typeck.c (cp_build_fold_indirect_ref): New. | |
620 | (cp_build_indirect_ref_1): Split out from cp_build_indirect_ref. | |
621 | Add 'fold' parameter. | |
622 | * cp-tree.h: Declare cp_build_fold_indirect_ref. | |
623 | * call.c, class.c, cp-ubsan.c, decl.c, except.c, init.c, lambda.c, | |
624 | parser.c, rtti.c, tree.c, typeck.c, typeck2.c: Use it. | |
625 | * parser.c (do_range_for_auto_deduction): Use RO_UNARY_STAR. | |
626 | (cp_convert_range_for): Likewise. | |
627 | * typeck2.c (build_x_arrow): Use RO_ARROW. | |
628 | ||
e6b3d9d0 | 629 | * cp-ubsan.c (cp_ubsan_check_member_access_r): Fix handling of |
630 | INDIRECT_REF of ADDR_EXPR. | |
631 | ||
c36e63fe | 632 | PR c++/82360 - ICE with static_cast in template. |
633 | * call.c (perform_direct_initialization_if_possible): Check | |
634 | processing_template_decl. | |
635 | * typeck.c (build_static_cast_1): Likewise. | |
636 | ||
cbf33885 | 637 | 2017-11-13 Ville Voutilainen <ville.voutilainen@gmail.com> |
638 | ||
639 | Remove the null check from placement new in all modes | |
640 | * init.c (build_new_1): Don't do a null check for | |
641 | a namespace-scope non-replaceable placement new | |
642 | in any mode unless -fcheck-new is provided. | |
643 | ||
482ccb7f | 644 | 2017-11-07 Boris Kolpackov <boris@codesynthesis.com> |
645 | ||
646 | * Make-lang.in (CP_PLUGIN_HEADERS): Add operators.def since included | |
647 | in cp-tree.h. | |
648 | ||
c06d7bdd | 649 | 2017-11-07 Jakub Jelinek <jakub@redhat.com> |
650 | ||
651 | PR c++/82835 | |
652 | * cp-gimplify.c (cxx_omp_clause_apply_fn): For methods pass i - 1 to | |
653 | convert_default_arg instead of i. | |
654 | ||
5753ddf9 | 655 | 2017-11-06 Jason Merrill <jason@redhat.com> |
656 | ||
657 | P0704R1 - fixing const-qualified pointers to members | |
658 | * typeck2.c (build_m_component_ref): Also accept in lower stds with | |
659 | a pedwarn. | |
660 | ||
44de00a1 | 661 | 2017-11-06 Paolo Carlini <paolo.carlini@oracle.com> |
662 | ||
663 | PR c++/65579 | |
664 | * decl2.c (finish_static_data_member_decl): If there's an initializer, | |
665 | complete the type and re-apply the quals. | |
666 | ||
2fb20ba2 | 667 | 2017-11-06 Martin Liska <mliska@suse.cz> |
668 | ||
669 | PR middle-end/82404 | |
670 | * constexpr.c (cxx_eval_builtin_function_call): Handle | |
671 | __builtin_unreachable call. | |
672 | (get_function_named_in_call): Declare function earlier. | |
673 | (constexpr_fn_retval): Skip __builtin_unreachable. | |
674 | * cp-gimplify.c (cp_ubsan_maybe_instrument_return): Rename to | |
675 | ... | |
676 | (cp_maybe_instrument_return): ... this. | |
677 | (cp_genericize): Call the function unconditionally. | |
678 | ||
b43bd76b | 679 | 2017-11-03 Nathan Sidwell <nathan@acm.org> |
680 | ||
681 | PR c++/82710 | |
682 | * decl.c (grokdeclarator): Protect MAYBE_CLASS things from paren | |
683 | warning too. | |
684 | ||
a89b3333 | 685 | 2017-11-02 Paolo Carlini <paolo.carlini@oracle.com> |
686 | ||
687 | PR c++/81957 | |
688 | * pt.c (make_pack_expansion): Add tsubst_flags_t parameter. | |
689 | (expand_integer_pack, convert_template_argument, coerce_template_parms, | |
690 | gen_elem_of_pack_expansion_instantiation, tsubst_pack_expansion, | |
691 | unify): Adjust calls. | |
692 | * tree.c (cp_build_qualified_type_real): Likewise. | |
693 | * cp-tree.h (make_pack_expansion): Adjust declaration. | |
694 | ||
bbbf4a06 | 695 | 2017-11-02 Nathan Sidwell <nathan@acm.org> |
696 | ||
4767026d | 697 | * cp-tree.h (IDENTIFIER_NEWDEL_OP_P): Restore, adjust. |
698 | (IDENTIFIER_NEW_OP_P): New. | |
699 | * decl.c (grokdeclarator): Restore IDENTIFIER_NEWDEL_OP_P use. | |
700 | * pt.c (push_template_decl_real): Likewise. | |
701 | * typeck.c (check_return_expr): Use IDENTIFIER_NEW_OP_P. | |
702 | ||
bbbf4a06 | 703 | PR c++/82710 |
704 | * decl.c (grokdeclarator): Don't warn when parens protect a return | |
705 | type from a qualified name. | |
706 | ||
a543234d | 707 | 2017-11-01 Nathan Sidwell <nathan@acm.org> |
708 | ||
816659f9 | 709 | * cp-tree.h (enum cp_identifier_kind): Delete cik_newdel_op. |
710 | Renumber and reserve udlit value. | |
4767026d | 711 | (IDENTIFIER_NEWDEL_OP_P): Delete. |
712 | (IDENTIFIER_OVL_OP_P): New. | |
713 | (IDENTIFIER_ASSIGN_OP_P): Adjust. | |
714 | (IDENTIFIER_CONV_OP_P): Adjust. | |
816659f9 | 715 | (IDENTIFIER_OVL_OP_INFO): Adjust. |
716 | (IDENTIFIER_OVL_OP_FLAGS): New. | |
717 | * decl.c (grokdeclarator): Use IDENTIFIER_OVL_OP_FLAGS. | |
718 | * lex.c (get_identifier_kind_name): Adjust. | |
719 | (init_operators): Don't special case new/delete ops. | |
4767026d | 720 | * mangle.c (write_unqualified_id): Use IDENTIFIER_OVL_OP_P. |
816659f9 | 721 | * pt.c (push_template_decl_real): Use IDENTIFIER_OVL_OP_FLAGS. |
722 | * typeck.c (check_return_expr): Likewise. | |
723 | ||
2cc899e0 | 724 | * cp-tree.h (assign_op_identifier, call_op_identifier): Use |
725 | compressed code. | |
726 | (struct lang_decl_fn): Use compressed operator code. | |
727 | (DECL_OVERLOADED_OPERATOR_CODE): Replace with ... | |
728 | (DECL_OVERLOADED_OPERATOR_CODE_RAW): ... this. | |
729 | (DECL_OVERLOADED_OPERATOR_CODE_IS): Use it. | |
730 | * decl.c (duplicate_decls): Use DECL_OVERLOADED_OPERATOR_CODE_RAW. | |
731 | (build_library_fn): Likewise. | |
732 | (grok_op_properties): Likewise. | |
733 | * mangle.c (write_unqualified_name): Likewise. | |
734 | * method.c (implicitly_declare_fn): Likewise. | |
735 | * typeck.c (check_return_expr): Use DECL_OVERLOADED_OPERATOR_IS. | |
736 | ||
a543234d | 737 | * cp-tree.h (IDENTIFIER_CP_INDEX): Define. |
738 | (enum ovl_op_flags): Add OVL_OP_FLAG_AMBIARY. | |
739 | (enum ovl_op_code): New. | |
740 | (struct ovl_op_info): Add ovl_op_code field. | |
741 | (ovl_op_info): Size by OVL_OP_MAX. | |
742 | (ovl_op_mapping, ovl_op_alternate): Declare. | |
743 | (OVL_OP_INFO): Adjust for mapping array. | |
744 | (IDENTIFIER_OVL_OP_INFO): New. | |
745 | * decl.c (ambi_op_p, unary_op_p): Delete. | |
746 | (grok_op_properties): Use IDENTIFIER_OVL_OP_INFO and | |
747 | ovl_op_alternate. | |
748 | * lex.c (ovl_op_info): Adjust and static initialize. | |
749 | (ovl_op_mappings, ovl_op_alternate): Define. | |
750 | (init_operators): Iterate over ovl_op_info array and init mappings | |
751 | & alternate arrays. | |
752 | * mangle.c (write_unqualified_id): Use IDENTIFIER_OVL_OP_INFO. | |
753 | * operators.def (DEF_OPERATOR): Remove KIND parm. | |
754 | (DEF_SIMPLE_OPERATOR): Delete. | |
755 | (OPERATOR_TRANSITION): Expand if defined. | |
756 | ||
53bc543a | 757 | 2017-10-31 David Malcolm <dmalcolm@redhat.com> |
758 | ||
759 | * pt.c (listify): Use %< and %> for description of #include. | |
760 | ||
3b6578b3 | 761 | 2017-10-31 David Malcolm <dmalcolm@redhat.com> |
762 | ||
763 | * class.c (explain_non_literal_class): Use UNKNOWN_LOCATION rather | |
764 | than 0. | |
765 | * name-lookup.c (suggest_alternatives_for): Update for renaming of | |
766 | inform_at_rich_loc. | |
767 | (maybe_suggest_missing_header): Likewise. | |
768 | (suggest_alternative_in_explicit_scope): Likewise. | |
769 | * parser.c (cp_parser_diagnose_invalid_type_name): Likewise for | |
770 | renaming of error_at_rich_loc. | |
771 | (cp_parser_string_literal): Likewise. | |
772 | (cp_parser_nested_name_specifier_opt): Likewise. | |
773 | (cp_parser_cast_expression): Likewise for renaming of | |
774 | warning_at_rich_loc. | |
775 | (cp_parser_decl_specifier_seq): Likewise for renaming of | |
776 | error_at_rich_loc and warning_at_rich_loc. | |
777 | (cp_parser_elaborated_type_specifier): Likewise for renaming of | |
778 | pedwarn_at_rich_loc. | |
779 | (cp_parser_cv_qualifier_seq_opt): Likewise for renaming of | |
780 | error_at_rich_loc. | |
781 | (cp_parser_virt_specifier_seq_opt): Likewise. | |
782 | (cp_parser_class_specifier_1): Likewise. | |
783 | (cp_parser_class_head): Likewise. | |
784 | (cp_parser_member_declaration): Likewise for renaming of | |
785 | pedwarn_at_rich_loc, warning_at_rich_loc, and error_at_rich_loc. | |
786 | (cp_parser_enclosed_template_argument_list): Likewise for renaming | |
787 | of error_at_rich_loc. | |
788 | (set_and_check_decl_spec_loc): Likewise. | |
789 | * pt.c (listify): Likewise. | |
790 | * rtti.c (typeid_ok_p): Likewise. | |
791 | * semantics.c (process_outer_var_ref): Use UNKNOWN_LOCATION rather | |
792 | than 0. | |
793 | * typeck.c (access_failure_info::maybe_suggest_accessor): Update | |
794 | for renaming of inform_at_rich_loc. | |
795 | (finish_class_member_access_expr): Likewise for renaming of | |
796 | error_at_rich_loc. | |
797 | ||
ef8f6502 | 798 | 2017-10-31 Nathan Sidwell <nathan@acm.org> |
799 | ||
61fae5c4 | 800 | * cp-tree.h (struct operator_name_info_t): Rename to ... |
801 | (struct ovl_op_info_t): ... here. Add tree_code field. | |
802 | (operator_name_info, assignment_operator_name_info): Delete. | |
803 | (ovl_op_info): Declare. | |
804 | (OVL_OP_INFO): Adjust. | |
805 | * decl.c (grok_op_properties): Use ovl_op_flags. | |
806 | * lex.c (operator_name_info, assignment_operator_name_info): | |
807 | Delete. | |
808 | (ovl_op_info): Define. | |
809 | (set_operator_ident): Adjust. | |
810 | (init_operators): Set tree_code. | |
811 | * mangle.c (write_unqualified_id): Adjust operator array scan. | |
812 | ||
daad7ad7 | 813 | * lex.c (init_operators): Allow NULL operator name. Don't add |
814 | special cases. | |
815 | * operators.def: Use NULL for mangling only operators. Move to | |
816 | after regular operators but move assignment operators last. | |
817 | ||
02938df3 | 818 | * cp-tree.h (enum ovl_op_flags): New. |
819 | (struct operator_name_info_t): Rename arity to flags. | |
820 | * lex.c (set_operator_ident): New. | |
821 | (init_operators): Use it. Adjust for flags. | |
822 | * mangle.c (write_unqualified_id): Adjust for flags. | |
823 | * operators.def: Replace arity with flags. | |
824 | ||
ca16a224 | 825 | * cp-tree.h (ovl_op_identifier): New. |
826 | (assign_op_identifier, call_op_identifier): Adjust. | |
827 | (cp_operator_id, cp_assignment_operator_ide): Delete. | |
828 | (SET_OVERLOADED_OPERATOR_CODE): Delete. | |
829 | (OVL_OP_INFO): New. | |
830 | * call.c (op_error): Use OVL_OP_INFO. | |
831 | (build_conditional_expr_1): Use ovl_op_identifier. | |
832 | (build_new_op_1): Use OVL_OP_INFO & ovl_op_identifier. | |
833 | (build_op_delete_call): Likewise. | |
834 | * class.c (type_requires_array_cookie): Use ovl_op_identifier. | |
835 | * decl.c (duplicate_decls): Directly copy operator code. | |
836 | (builtin_function_1): Do not set operator code. | |
837 | (build_library_fn): Directly set operator code. | |
838 | (push_cp_library_fn): Use ovl_op_identifier. | |
839 | (grok_op_properties): Directly set operator code. | |
840 | * decl2.c (maybe_warn_sized_delete): Use ovl_op_identifier. | |
841 | * error.c (dump_expr): Use OVL_OP_INFO. | |
842 | (op_to_string): Add assop arg. Use OVL_OP_INFO. | |
843 | (assop_to_string): Delete. | |
844 | (args_to_string): Adjust. | |
845 | * init.c (build_new_1): Use ovl_op_identifier. | |
846 | * mangle.c (write_unqualified_name): Use OVL_OP_INFO. | |
847 | (write_expression): Likewise. | |
848 | * method.c (synthesized_method_walk): Use ovl_op_identifier. | |
849 | (implicitly_declare_fn): Use assign_op_identifier. Directly set | |
850 | operator code. | |
851 | * name-lookup.c (get_class_binding): Use assign_op_identifier. | |
852 | * parser.c (cp_parser_operator): Use ovl_op_identifier. | |
853 | (cp_parser_omp_clause_reduction): Likewise. | |
854 | * semantics.c (omp_reduction_id): Likewise. | |
855 | * typeck.c (cxx_sizeof_or_alignof_type): Use OVL_OP_INFO. | |
856 | ||
ef8f6502 | 857 | * cp-tree.h (assign_op_identifier, call_op_identifier): Define. |
858 | (LAMBDA_FUNCTION_P): Use DECL_OVERLOADED_OPERATOR_IS. | |
859 | (DECL_OVERLOADED_OPERATOR_P): Just retuurn true/false. | |
860 | (DECL_OVERLOADED_OPERATOR_CODE, DECL_OVERLOADED_OPERATOR_IS): Define. | |
861 | * call.c (add_function_candidate): Use | |
862 | DECL_OVERLOADED_OPERATOR_IS. | |
863 | (build_op_call_1): Use call_op_identifier & | |
864 | DECL_OVERLOADED_OPERATOR_IS. | |
865 | (build_over_call): Likewise. | |
866 | (has_trivial_copy_assign_p): Use assign_op_identifier. | |
867 | (build_special_member_call): Likewise. | |
868 | * class.c (dfs_declare_virt_assop_and_dtor): Likewise. | |
869 | (vbase_has_user_provided_move_assign, | |
870 | classtype_has_move_assign_or_move_ctor_p): Likewise. | |
871 | * decl.c (duplicate_decls): Use DECL_OVERLOADED_OPERATOR_CODE. | |
872 | (grok_special_member_properties): Use assign_op_identifier. | |
873 | (start_preparsed_function): Use DECL_OVERLOADED_OPERATOR_IS. | |
874 | * decl2.c (mark_used): Use DECL_CONV_FN_P. | |
875 | * dump.c (dump_access): Delete prototype. | |
876 | (dump_op): Delete. | |
877 | (cp_dump_tree): Don't call it. | |
878 | * lambda.c (lambda_function): Use call_op_identifier. | |
879 | (maybe_add_lambda_conv_op): Not an overloaded operator. Remove | |
880 | unneeded braces. | |
881 | * mangle.c (write_unqualified_name): Use DECL_OVERLOADED_OPERTOR_CODE. | |
882 | * method.c (do_build_copy_assign): Use assign_op_identifier. | |
883 | (synthesize_method): Use DECL_OVERLOADED_OPERATOR_IS. | |
884 | (get_copy_assign): Use assign_op_identifier. | |
885 | (synthesized_method_walk): Likewise. | |
886 | (defaultable_fn_check): Use DECL_OVERLOADED_OPERATOR_IS. | |
887 | * parser.c (cp_parser_lambda_declarator_opt): Use | |
888 | call_op_identifier. | |
889 | * semanitics.c (classtype_has_nothrow_assign_or_copy_p): Use | |
890 | assign_op_identifier. | |
891 | * tree.c (special_function_p): Use DECL_OVERLOADED_OPERATOR_IS. | |
892 | * typeck.c (check_return_expr): Use DECL_OVERLOADED_OPERATOR_CODE. | |
893 | (check_return_expr): Use assign_op_identifier. | |
894 | ||
6302f203 | 895 | 2017-10-30 Paolo Carlini <paolo.carlini@oracle.com> |
896 | ||
897 | PR c++/82085 | |
898 | * pt.c (tsubst_copy_and_build, [INDIRECT_REF]): For a REFERENCE_REF_P, | |
899 | unconditionally call convert_from_reference. | |
900 | ||
e2665e8b | 901 | 2017-10-30 Nathan Sidwell <nathan@acm.org> |
902 | ||
903 | * call.c (build_op_call_1): Test for FUNCTION_DECL in same manner | |
904 | as a few lines earlier. | |
905 | * cp-tree.h (PACK_EXPANSION_PATTERN): Fix white space. | |
906 | * decl.c (grokfndecl): Fix indentation. | |
907 | (compute_array_index_type): Use processing_template_decl_sentinel. | |
908 | (grok_op_properties): Move warnings to end. Reorder other checks | |
909 | to group similar entities. Tweak diagnostics. | |
910 | * lex.c (unqualified_name_lookup_error): No need to check name is | |
911 | not ERROR_MARK operator. | |
912 | * parser.c (cp_parser_operator): Select operator code before | |
913 | looking it up. | |
914 | * typeck.c (check_return_expr): Fix indentation and line wrapping. | |
915 | ||
64ab8e1e | 916 | 2017-10-27 Paolo Carlini <paolo.carlini@oracle.com> |
917 | ||
918 | * pt.c (invalid_nontype_parm_type_p): Return a bool instead of an int. | |
919 | ||
b931302e | 920 | 2017-10-26 Nathan Sidwell <nathan@acm.org> |
921 | ||
922 | * decl.c (sort_labels): Restore function. | |
923 | (pop_labels): Sort labels | |
924 | (identify_goto): Add translation markup. | |
925 | ||
c6e67a74 | 926 | 2017-10-25 Nathan Sidwell <nathan@acm.org> |
927 | ||
dc684a8c | 928 | Kill IDENTIFIER_LABEL_VALUE. |
929 | * cp-tree.h (lang_identifier): Delete label_value slot. | |
930 | (IDENTIFIER_LABEL_VALUE, SET_IDENTIFIER_LABEL_VALUE): Delete. | |
931 | (struct named_label_hasher): Rename to ... | |
932 | (struct named_label_hash): ... here. Reimplement. | |
933 | (struct language_function): Adjust x_named_labels. | |
934 | * name-lookup.h (struct cp_label_binding): Delete. | |
935 | (struct cp_binding_level): Delete shadowed_labels slot. | |
936 | * decl.c (struct named_label_entry): Add name and outer slots. | |
937 | (pop_label): Rename to ... | |
938 | (check_label_used): ... here. Don't pop. | |
939 | (note_label, sort_labels): Delete. | |
940 | (pop_labels, pop_local_label): Reimplement. | |
941 | (poplevel): Pop local labels as any other decl. Remove | |
942 | shadowed_labels handling. | |
943 | (named_label_hash::hash, named_label_hash::equal): New. | |
944 | (make_label_decl): Absorb into ... | |
945 | (lookup_label_1): ... here. Add making_local_p arg, reimplement. | |
946 | (lookup_label, declare_local_label): Adjust. | |
947 | (check_goto, define_label): Adjust. | |
948 | * lex.c (make_conv_op_name): Don't clear IDENTIFIER_LABEL_VALUE. | |
949 | * ptree.c (cxx_print_identifier): Don't print identifier binding. | |
950 | ||
c6e67a74 | 951 | * decl.c (identifier_goto): Reduce duplication. |
952 | (check_previous_goto_1): Likewise. | |
953 | (check_goto): Move var decls to initialization. | |
954 | (check_omp_return, define_label_1, define_label): Likewise. | |
955 | ||
ac50cb09 | 956 | 2017-10-25 Jakub Jelinek <jakub@redhat.com> |
957 | ||
958 | PR libstdc++/81706 | |
959 | * decl.c (duplicate_decls): Copy "omp declare simd" attributes from | |
960 | newdecl to corresponding __builtin_ if any. | |
961 | ||
41ca0095 | 962 | 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com> |
963 | ||
964 | PR c++/82466 | |
965 | * decl.c (duplicate_decls): Warn for built-in functions declared as | |
966 | non-function, use OPT_Wbuiltin_declaration_mismatch. | |
967 | ||
968 | * decl.c (duplicate_decls): Avoid redundant '+' in warning_at. | |
969 | ||
ec873e79 | 970 | 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com> |
971 | ||
972 | PR c++/80991 | |
973 | * pt.c (value_dependent_expression_p, [TRAIT_EXPR]): Handle | |
974 | a TREE_LIST as TRAIT_EXPR_TYPE2. | |
975 | ||
c042ba6f | 976 | 2017-10-24 Mukesh Kapoor <mukesh.kapoor@oracle.com> |
977 | Paolo Carlini <paolo.carlini@oracle.com> | |
978 | ||
979 | PR c++/82307 | |
980 | * cvt.c (type_promotes_to): Implement C++17, 7.6/4, about unscoped | |
981 | enumeration type whose underlying type is fixed. | |
982 | ||
6940f1f1 | 983 | 2017-10-23 Paolo Carlini <paolo.carlini@oracle.com> |
984 | ||
985 | PR c++/80449 | |
986 | * semantics.c (finish_compound_literal): Check do_auto_deduction | |
987 | return value for error_mark_node. | |
988 | ||
e176a945 | 989 | 2017-10-23 Jason Merrill <jason@redhat.com> |
990 | ||
991 | PR c++/77369 - wrong noexcept handling in C++14 and below | |
992 | * tree.c (strip_typedefs): Canonicalize TYPE_RAISES_EXCEPTIONS. | |
993 | ||
9f23bd8e | 994 | 2017-10-20 Nathan Sidwell <nathan@acm.org> |
995 | ||
996 | * class.c (layout_class_type): Cleanup as-base creation, determine | |
997 | mode here. | |
998 | (finish_struct_1): ... not here. | |
999 | ||
e6e98789 | 1000 | 2017-10-19 Jakub Jelinek <jakub@redhat.com> |
1001 | ||
1002 | PR c++/82600 | |
1003 | * typeck.c (check_return_expr): Don't call | |
1004 | maybe_warn_about_returning_address_of_local in templates. | |
1005 | ||
6273fc17 | 1006 | 2017-10-17 Nathan Sidwell <nathan@acm.org> |
1007 | ||
8d47c1c5 | 1008 | PR c++/82560 |
1009 | * call.c (build_over_call): Don't pass tf_no_cleanup to nested | |
1010 | calls. | |
1011 | ||
6273fc17 | 1012 | PR middle-end/82546 |
1013 | * cp-objcp-common.c (cp_tree_size): Reformat. Adjust returns size | |
1014 | of TYPE nodes. | |
1015 | ||
621490ee | 1016 | 2017-10-13 Jason Merrill <jason@redhat.com> |
1017 | ||
1018 | PR c++/82357 - bit-field in template | |
1019 | * tree.c (cp_stabilize_reference): Just return a NON_DEPENDENT_EXPR. | |
1020 | ||
c7cae137 | 1021 | 2017-10-13 David Malcolm <dmalcolm@redhat.com> |
1022 | ||
1023 | * cp-tree.h (maybe_show_extern_c_location): New decl. | |
1024 | * decl.c (grokfndecl): When complaining about literal operators | |
1025 | with C linkage, issue a note giving the location of the | |
1026 | extern "C". | |
1027 | * parser.c (cp_parser_new): Initialize new field | |
1028 | "innermost_linkage_specification_location". | |
1029 | (cp_parser_linkage_specification): Store the location | |
1030 | of the linkage specification within the cp_parser. | |
1031 | (cp_parser_explicit_specialization): When complaining about | |
1032 | template specializations with C linkage, issue a note giving the | |
1033 | location of the extern "C". | |
1034 | (cp_parser_explicit_template_declaration): Likewise for templates. | |
1035 | (maybe_show_extern_c_location): New function. | |
1036 | * parser.h (struct cp_parser): New field | |
1037 | "innermost_linkage_specification_location". | |
1038 | ||
d47990c0 | 1039 | 2017-10-12 Nathan Sidwell <nathan@acm.org> |
1040 | ||
1041 | * cp-tree.h (cp_expr): Add const operator * and operator-> | |
1042 | accessors. | |
1043 | (cp_tree_node_structure_enum): Delete TS_CP_BINDING, | |
1044 | TS_CP_WRAPPER, LAST_TS_CP_ENUM. | |
1045 | ||
74578794 | 1046 | 2017-10-12 David Malcolm <dmalcolm@redhat.com> |
1047 | ||
1048 | * parser.c (get_required_cpp_ttype): New function. | |
1049 | (cp_parser_error_1): Call it, using the result to call | |
1050 | maybe_suggest_missing_token_insertion. | |
1051 | ||
9af3e7f6 | 1052 | 2017-10-12 David Malcolm <dmalcolm@redhat.com> |
1053 | ||
1054 | * parser.c (get_matching_symbol): Move to before... | |
1055 | (cp_parser_error): Split out into... | |
1056 | (cp_parser_error_1): ...this new function, merging in content | |
1057 | from... | |
1058 | (cp_parser_required_error): ...here. Eliminate partial duplicate | |
1059 | of body of cp_parser_error in favor of a call to the new | |
1060 | cp_parser_error_1 helper function. | |
1061 | ||
971295a0 | 1062 | 2017-10-11 Nathan Sidwell <nathan@acm.org> |
1063 | ||
1064 | * decl2.c (struct mangled_decl_hash): Use DECL_ASSEMBLER_NAME_RAW. | |
1065 | (record_mangling): Likewise. | |
1066 | ||
6ff24f58 | 1067 | 2017-10-10 Nathan Sidwell <nathan@acm.org> |
1068 | ||
e48db267 | 1069 | * name-lookup.c (extern_c_fns): Rename to ... |
1070 | (extern_c_decls): ... here. | |
1071 | (check_extern_c_conflict, extern_c_linkage_bindings): Update. | |
1072 | (do_pushdecl): Check extern-c fns and vars. | |
1073 | ||
61f9c18c | 1074 | * cp-tree.h (default_hash_traits <lang_identifier *>): Delete |
1075 | specialization. | |
1076 | ||
6ff24f58 | 1077 | * decl2.c (struct mangled_decl_hash): New hash traits. |
1078 | (mangled_decls): Make hash_table<mangled_decl_hash>. | |
1079 | (generate_mangling_alias, record_mangling): Adjust. | |
1080 | ||
8b001668 | 1081 | 2017-10-10 Jason Merrill <jason@redhat.com> |
1082 | ||
c017458d | 1083 | More delayed lambda capture fixes. |
1084 | * call.c (add_function_candidate): Use build_address. | |
1085 | (build_op_call_1): Call mark_lvalue_use early. | |
1086 | (build_over_call): Handle error from build_this. | |
1087 | * constexpr.c (cxx_bind_parameters_in_call): Use build_address. | |
1088 | (cxx_eval_increment_expression): Don't use rvalue(). | |
1089 | * cvt.c (convert_to_void): Use mark_discarded_use. | |
1090 | * expr.c (mark_use): Handle PARM_DECL, NON_DEPENDENT_EXPR. Fix | |
1091 | reference handling. Don't copy the expression. | |
1092 | (mark_discarded_use): New. | |
1093 | * lambda.c (insert_capture_proxy): Add some sanity checking. | |
1094 | (maybe_add_lambda_conv_op): Set cp_unevaluated_operand. | |
1095 | * pt.c (register_local_specialization): Add sanity check. | |
1096 | * semantics.c (process_outer_var_ref): Fix check for existing proxy. | |
1097 | * typeck.c (cp_build_addr_expr_1): Handle error from | |
1098 | mark_lvalue_use. | |
1099 | (cp_build_modify_expr): Call mark_lvalue_use_nonread, handle error | |
1100 | from rvalue. | |
1101 | ||
1102 | Handle generic lambda capture in dependent expressions. | |
1103 | * lambda.c (need_generic_capture, dependent_capture_r) | |
1104 | (do_dependent_capture): New. | |
1105 | * pt.c (processing_nonlambda_template): Use need_generic_capture. | |
1106 | * semantics.c (maybe_cleanup_point_expr) | |
1107 | (maybe_cleanup_point_expr_void, finish_goto_stmt) | |
1108 | (maybe_convert_cond): Call do_dependent_capture. | |
1109 | * typeck.c (build_static_cast): Remove dependent capture handling. | |
1110 | ||
672871ce | 1111 | * typeck.c (condition_conversion): Assert !processing_template_decl. |
1112 | * semantics.c (finish_omp_clauses): Don't | |
1113 | fold_build_cleanup_point_expr if processing_template_decl. | |
1114 | (outer_var_p): A temporary can't be from an outer scope. | |
1115 | * pt.c (type_dependent_expression_p): Fix dependency checking of | |
1116 | functions without DECL_TEMPLATE_INFO. | |
1117 | (instantiate_decl): Use lss_copy. | |
1118 | * constexpr.c (is_valid_constexpr_fn): Fix lambdas before C++17. | |
1119 | ||
8b001668 | 1120 | * typeck.c (check_return_expr): Check non-dependent conversion in |
1121 | templates. | |
1122 | * constraint.cc (check_function_concept): Don't complain about an | |
1123 | empty concept if seen_error. | |
1124 | ||
e3d0f65c | 1125 | 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org> |
1126 | ||
1127 | * cvt.c (ignore_overflows): Use wi::to_wide when | |
1128 | operating on trees as wide_ints. | |
1129 | * decl.c (check_array_designated_initializer): Likewise. | |
1130 | * mangle.c (write_integer_cst): Likewise. | |
1131 | * semantics.c (cp_finish_omp_clause_depend_sink): Likewise. | |
1132 | ||
4b688b2f | 1133 | 2017-10-10 Nathan Sidwell <nathan@acm.org> |
1134 | ||
1135 | * name-lookup.c (set_global_binding): Don't deal with STAT_HACK. | |
1136 | ||
3b81eedb | 1137 | 2017-10-06 Paolo Carlini <paolo.carlini@oracle.com> |
4775c814 | 1138 | |
1139 | PR c++/47791 | |
1140 | * decl.c (finish_function): Take a bool intead of an int; adjust. | |
1141 | * cp-tree.h (finish_function): Adjust declaration. | |
1142 | * decl2.c (generate_tls_wrapper, finish_objects, | |
1143 | finish_static_storage_duration_function): Adjust calls. | |
1144 | * lambda.c (maybe_add_lambda_conv_op, finish_lambda_function): | |
1145 | Likewise. | |
1146 | * method.c (synthesize_method): Likewise. | |
1147 | * optimize.c (maybe_thunk_body, maybe_clone_body): Likewise. | |
1148 | * pt.c (instantiate_decl): Likewise. | |
1149 | * parser.c (cp_parser_function_definition_after_declarator, | |
1150 | cp_parser_late_parsing_for_member, cp_parser_omp_declare_reduction): | |
1151 | Likewise. | |
1152 | (cp_parser_ctor_initializer_opt, | |
1153 | cp_parser_ctor_initializer_opt_and_function_body, | |
1154 | cp_parser_function_try_block, | |
1155 | cp_parser_function_definition_after_declarator, | |
1156 | cp_parser_function_transaction): Return void; adjust declarations. | |
1157 | ||
ce6abecd | 1158 | 2017-10-06 Nathan Sidwell <nathan@acm.org> |
1159 | ||
1160 | PR c++/82424 | |
1161 | * name-lookup.c (check_local_shadow): Don't try and convert | |
1162 | dependent types. | |
1163 | ||
dabb58ae | 1164 | 2017-10-06 Jakub Jelinek <jakub@redhat.com> |
1165 | ||
3d866864 | 1166 | PR c++/82299 |
1167 | * decl.c (reshape_init): Suppress warn_useless_cast for direct enum | |
1168 | init. | |
1169 | * typeck.c (convert_for_assignment): Likewise. | |
1170 | ||
dabb58ae | 1171 | P0704R1 - fixing const-qualified pointers to members |
1172 | * typeck2.c (build_m_component_ref): For -std=c++2a allow | |
1173 | pointer to const & qualified method on rvalue. | |
1174 | ||
1cc0785d | 1175 | 2017-10-06 Nathan Sidwell <nathan@acm.org> |
1176 | ||
1dba4775 | 1177 | Use hash_table for extern "C" names |
1178 | * name-lookup.c (extern_c_fns): Use hash_table. | |
1179 | (check_extern_c_conflict): Adjust. | |
1180 | (c_linkage_bindings): Adjust. | |
1181 | ||
1cc0785d | 1182 | Use hash_table for namespace bindings |
1183 | * cp-tree.h (struct named_decl_hash): New. | |
1184 | (lang_decl_ns): Change type of bindings field. | |
1185 | * lex.c (maybe_add_lang_decl_raw): Adjust. | |
1186 | * name-lookup.c (find_namespace_slot): Adjust. | |
1187 | (do_pushdecl): Push NULL-named namespace. | |
1188 | (do_push_nested_namespace): Adjust. | |
1189 | (push_namespace): Push anonymous namespace as NULL name. | |
1190 | ||
4cd565ae | 1191 | 2017-10-05 Jason Merrill <jason@redhat.com> |
1192 | ||
1cc0785d | 1193 | Pass variadic class objects exactly like named by-value args. |
4cd565ae | 1194 | * call.c (convert_arg_to_ellipsis): Use the result of force_rvalue. |
1195 | ||
391f5d5d | 1196 | 2017-10-05 Nathan Sidwell <nathan@acm.org> |
1197 | ||
a94975e5 | 1198 | Warn on MVP declarations |
1199 | * cp-tree.h (struct cp_declarator): Add parenthesized field. | |
1200 | * decl.c (grokdeclarator): Warn about unnecessary parens. | |
1201 | * parser.c (make_declarator): Init parenthesized field. | |
1202 | (cp_parser_direct_declarator): Set parenthesized field. | |
1203 | ||
64924d1d | 1204 | Kill IDENTIFIER_GLOBAL_VALUE, SET_IDENTIFIER_GLOBAL_VALUE |
1205 | * cp-tree.h (IDENTIFIER_GLOBAL_VALUE, | |
1206 | SET_IDENTIFIER_GLOBAL_VALUE): Delete. | |
1207 | * name-lookup.h (set_global_binding): Remove NAME parm. | |
1208 | (get_global_binding): New inline fn. | |
1209 | * name-lookup.c (set_global_binding): Remove NAME parm. Adjust. | |
1210 | (identifier_global_value): Move to ... | |
1211 | * cp-objcp-common.c (identifier_global_value): ... here. | |
1212 | * class.c (build_ctor_vtbl_group, build_vtbl_initializer): Adjust. | |
1213 | * decl.c (record_builtin_type, expand_static_init, | |
1214 | grokdeclarator): Adjust. | |
1215 | * decl2.c (get_guard, get_local_tls_init_fn, get_tls_init_fn, | |
1216 | get_tls_wrapper_fn, maybe_warn_sized_delete): Adjust. | |
1217 | * except.c (declare_library_fn, build_throw): Adjust. | |
1218 | * init.c (throw_bad_array_length): Adjust. | |
1219 | * rtti.c (throw_bad_cast, throw_bad_typeid, get_tinfo_decl): Adjust. | |
1220 | ||
391f5d5d | 1221 | * decl2.c (record_mangling): Fix spello and formatting from |
1222 | previous patch. | |
1223 | ||
b51f8f71 | 1224 | 2017-10-04 Nathan Sidwell <nathan@acm.org> |
1225 | ||
1226 | Give builtin types the correct name. | |
1227 | * name-lookup.c (set_global_binding): Assert name is DECL_NAME. | |
1228 | * decl.c (record_builtin_type): Reimplement, use new TYPE_DECL for | |
1229 | rname. | |
1230 | ||
ee124fad | 1231 | 2017-10-04 Paolo Carlini <paolo.carlini@oracle.com> |
1232 | Andrew Pinski <apinski@cavium.com> | |
1233 | ||
1234 | PR c++/71946 | |
1235 | * parser.c (cp_parser_lambda_body): Set parser->in_function_body. | |
1236 | ||
e845448c | 1237 | 2017-10-04 Nathan Sidwell <nathan@acm.org> |
1238 | ||
1239 | Move mangling aliases out of global namespace. | |
1240 | * cp-tree.h (record_mangling): New. | |
1241 | (maybe_remove_implicit_alias): Delete. | |
1242 | * decl2.c (mangled_decls): New hash map. | |
1243 | (generate_mangling_alias): Reimplement using mangled_decls. | |
1244 | (record_mangling): New. | |
1245 | * mangle.c (decl_implicit_alias_p, | |
1246 | maybe_remove_implicit_alias): Delete. | |
1247 | (mangle_decl): Use record_mangling. | |
1248 | * name-lookup.c (supplement_binding_1): Remove | |
1249 | maybe_remove_implicit_alias check. | |
1250 | ||
4dfac60f | 1251 | 2017-10-04 Jakub Jelinek <jakub@redhat.com> |
1252 | ||
1253 | PR c++/82373 | |
1254 | * error.c (dump_function_decl): If show_return, call dump_type_suffix | |
1255 | on the same return type dump_type_prefix has been called on. | |
1256 | ||
629de8b3 | 1257 | 2017-10-04 Jason Merrill <jason@redhat.com> |
1258 | ||
1259 | PR c++/81525 - broken handling of auto in generic lambda. | |
1260 | * pt.c (tsubst_decl) [VAR_DECL]: Use strip_innermost_template_args. | |
1261 | ||
0cf8fb34 | 1262 | 2017-10-04 Nathan Sidwell <nathan@acm.org> |
1263 | ||
1264 | * call.c (convert_arg_to_ellipsis): Correct comment about passing | |
1265 | by reference. | |
1266 | ||
cb7bca5f | 1267 | 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org> |
1268 | ||
1269 | * constexpr.c (cxx_eval_store_expression): Use wi::to_widest | |
1270 | when comparing the array bounds with an ARRAY_REF index. | |
1271 | ||
a9d3f824 | 1272 | 2017-09-30 Paolo Carlini <paolo.carlini@oracle.com> |
1273 | ||
1274 | PR c++/68754 | |
1275 | * method.c (defaulted_late_check): Early return if the defaulted | |
1276 | declaration does not match the expected signature. | |
1277 | ||
234c25a6 | 1278 | 2017-09-29 Jakub Jelinek <jakub@redhat.com> |
1279 | ||
811c4f15 | 1280 | P0683R1 - default member initializers for bit-fields |
1281 | * cp-tree.h (grokbitfield): Add INIT parameter. | |
1282 | * parser.c (cp_parser_constant_expression): Add STRICT_P argument, | |
1283 | if true, parse a conditional-expression rather than | |
1284 | assignment-expression. | |
1285 | (cp_parser_member_declaration): For C++11 and later pass true | |
1286 | as STRICT_P to cp_parser_constant_expression. Parse C++2A bitfield | |
1287 | NSDMIs. Adjust grokbitfield caller. Handle DECL_INITIAL also for | |
1288 | DECL_C_BIT_FIELDs. | |
1289 | (cp_parser_objc_class_ivars): Adjust grokbitfield caller. | |
1290 | * class.c (check_field_decl): Recurse even for DECL_C_BIT_FIELDs. | |
1291 | (check_field_decls): Call check_field_decl even for DECL_C_BIT_FIELDs. | |
1292 | * decl2.c (grokbitfield): Add INIT parameter, pass it to | |
1293 | cp_finish_decl. | |
1294 | * pt.c (tsubst_decl): Handle DECL_INITIAL for all FIELD_DECLs, not | |
1295 | just non-bitfields. | |
1296 | ||
52f26f82 | 1297 | * class.c (check_bitfield_decl): Retrieve and clear width from |
1298 | DECL_BIT_FIELD_REPRESENTATIVE rather than DECL_INITIAL. | |
1299 | (check_field_decls): Test DECL_BIT_FIELD_REPRESENTATIVE rather than | |
1300 | DECL_INITIAL. | |
1301 | (remove_zero_width_bit_fields): Adjust comment. | |
1302 | * decl2.c (grokbitfield): Stash width into | |
1303 | DECL_BIT_FIELD_REPRESENTATIVE rather than DECL_INITIAL. | |
1304 | * pt.c (tsubst_decl): For DECL_C_BIT_FIELD, tsubst_expr | |
1305 | DECL_BIT_FIELD_REPRESENTATIVE rather than DECL_INITIAL for width. | |
1306 | ||
6d8d47f6 | 1307 | * parser.c (cp_parser_member_declaration): Parse attributes before |
1308 | colon of a bitfield in addition to after colon. | |
1309 | ||
234c25a6 | 1310 | * Make-lang.in (check-c++-all): Test also c++2a. |
1311 | ||
153f22fa | 1312 | 2017-09-28 Jason Merrill <jason@redhat.com> |
1313 | ||
4cedc476 | 1314 | PR c++/56973, DR 696 - capture constant variables only as needed. |
1315 | * expr.c (mark_use): Split out from mark_rvalue_use and | |
1316 | mark_lvalue_use. Handle lambda capture of constant variables. | |
1317 | (mark_lvalue_use_nonread): New. | |
1318 | * semantics.c (process_outer_var_ref): Don't capture a constant | |
1319 | variable until forced. | |
1320 | * pt.c (processing_nonlambda_template): New. | |
1321 | * call.c (build_this): Check it. | |
1322 | * decl2.c (grok_array_decl): Call mark_rvalue_use and | |
1323 | mark_lvalue_use_nonread. | |
1324 | * init.c (constant_value_1): Don't call mark_rvalue_use. | |
1325 | * typeck.c (build_static_cast): Handle lambda capture. | |
1326 | ||
6f20c785 | 1327 | Use local_specializations to find capture proxies. |
1328 | * cp-tree.h (DECL_CAPTURED_VARIABLE): New. | |
1329 | * lambda.c (build_capture_proxy): Set it. | |
1330 | (add_capture): Pass initializer to build_capture_proxy. | |
1331 | (start_lambda_function): Likewise. | |
1332 | (insert_capture_proxy): Use register_local_specialization. | |
1333 | (is_lambda_ignored_entity): Always ignore proxies. | |
1334 | * name-lookup.c (qualify_lookup): Don't check | |
1335 | is_lambda_ignored_entity if LOOKUP_HIDDEN is set. | |
1336 | * semantics.c (process_outer_var_ref): Use | |
1337 | retrieve_local_specialization. | |
1338 | * parser.c (cp_parser_lambda_body): Push local_specializations. | |
1339 | * pt.c (tsubst_expr): Pass LOOKUP_HIDDEN when looking for a proxy. | |
1340 | (tsubst_lambda_expr): Push local_specializations sooner. | |
1341 | (tsubst_copy_and_build): Don't register_local_specialization. | |
1342 | ||
153f22fa | 1343 | * call.c (build_special_member_call): Use the return value of |
1344 | mark_lvalue_use. | |
1345 | * decl.c (compute_array_index_type): Likewise. | |
1346 | * parser.c (cp_parser_oacc_wait_list): Likewise. | |
1347 | * lambda.c (is_normal_capture_proxy): Handle *this capture. | |
1348 | (add_capture): Clarify internal_error message. | |
1349 | ||
28484ead | 1350 | 2017-09-22 Eric Botcazou <ebotcazou@adacore.com> |
1351 | ||
1352 | PR bootstrap/81926 | |
1353 | * cp-objcp-common.c (cp_get_debug_type): Do only one lookup. | |
1354 | ||
c0b15009 | 1355 | 2017-09-22 Jakub Jelinek <jakub@redhat.com> |
1356 | ||
1357 | PR sanitizer/81929 | |
1358 | * tree.c (struct replace_placeholders_t): Add pset field. | |
1359 | (replace_placeholders_r): Call cp_walk_tree with d->pset as | |
1360 | last argument instead of NULL. Formatting fix. | |
1361 | (replace_placeholders): Add pset variable, add its address | |
1362 | into data. Pass &pset instead of NULL to cp_walk_tree. | |
1363 | ||
5d78d423 | 1364 | 2017-09-22 David Malcolm <dmalcolm@redhat.com> |
1365 | ||
1366 | * call.c (get_fndecl_argument_location): New function. | |
1367 | (convert_like_real): Use it when complaining about argument type | |
1368 | mismatches. | |
1369 | * cp-tree.h (struct cp_parameter_declarator): Add "loc" field. | |
1370 | * parser.c (make_parameter_declarator): Add "loc" param and use | |
1371 | it to initialize the new field. | |
1372 | (cp_parser_translation_unit): Add UNKNOWN_LOCATION for "loc" of | |
1373 | the "no_parameters" parameter. | |
1374 | (cp_parser_parameter_declaration_list): Set the location of the | |
1375 | result of grokdeclarator to be the parameter's loc, assuming no | |
1376 | errors. | |
1377 | (cp_parser_parameter_declaration): Generate a location for the | |
1378 | parameter and pass to make_parameter_declarator. | |
1379 | ||
0ea6df15 | 1380 | 2017-09-20 Nathan Sidwell <nathan@acm.org> |
1381 | ||
1382 | * name-lookup.c (member_name_cmp): Use DECL_UID for final | |
1383 | ordering. | |
1384 | ||
e6b5fa17 | 1385 | 2017-09-20 Jakub Jelinek <jakub@redhat.com> |
1386 | ||
1387 | P0409R2 - allow lambda capture [=, this] | |
1388 | * parser.c (cp_parser_lambda_introducer): For cxx2a don't pedwarn on | |
1389 | redundant [=, this]. | |
1390 | ||
20c4114f | 1391 | 2017-09-18 Jason Merrill <jason@redhat.com> |
1392 | ||
1393 | PR c++/82069 - ICE with lambda in template | |
1394 | * semantics.c (process_outer_var_ref): Check uses_template_parms | |
1395 | instead of any_dependent_template_arguments_p. | |
1396 | ||
f64621cd | 1397 | 2017-09-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org> |
1398 | Paolo Carlini <paolo.carlini@oracle.com> | |
1399 | ||
1400 | PR c++/64644 | |
1401 | * decl2.c (finish_anon_union): Complain about "anonymous union with | |
1402 | no members" with a pedwarn. | |
1403 | ||
7ceee42d | 1404 | 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de> |
1405 | ||
1406 | * typeck.c (build_reinterpret_cast_1, | |
1407 | build_const_cast_1): Implement -Wcast-align=strict. | |
1408 | ||
40e2decb | 1409 | 2017-09-15 Jakub Jelinek <jakub@redhat.com> |
1410 | ||
1411 | * decl.c (redeclaration_error_message): Use cxx17 instead of cxx1z, | |
1412 | adjust diagnostics refering to C++1z or -std=gnu++1z or -std=c++1z | |
1413 | to C++17 or -std=gnu++17 or -std=c++17. Adjust comments. | |
1414 | (cxx_init_decl_processing, next_initializable_field, | |
1415 | is_direct_enum_init, check_initializer, cp_finish_decl, | |
1416 | mark_inline_variable, grokdeclarator, grokparms, xref_basetypes, | |
1417 | finish_function): Likewise. | |
1418 | * cp-tree.h (DECL_INLINE_VAR_P): Likewise. | |
1419 | * pt.c (mark_template_parm, convert_nontype_argument, | |
1420 | instantiate_class_template_1, type_unification_real, unify, | |
1421 | get_partial_spec_bindings, dependent_type_p_r): Likewise. | |
1422 | * typeck.c (cp_build_unary_op): Likewise. | |
1423 | * constexpr.c (var_in_maybe_constexpr_fn): Likewise. | |
1424 | * call.c (build_user_type_conversion_1, build_over_call, | |
1425 | build_special_member_call): Likewise. | |
1426 | * lambda.c (begin_lambda_type): Likewise. | |
1427 | * typeck2.c (process_init_constructor_record): Likewise. | |
1428 | * class.c (build_base_field, finalize_literal_type_property, | |
1429 | explain_non_literal_class): Likewise. | |
1430 | * parser.c (cp_parser_diagnose_invalid_type_name, | |
1431 | cp_parser_primary_expression, cp_parser_lambda_introducer, | |
1432 | cp_parser_lambda_declarator_opt, cp_parser_selection_statement, | |
1433 | cp_convert_range_for, cp_parser_perform_range_for_lookup, | |
1434 | cp_parser_decomposition_declaration, cp_parser_linkage_specification, | |
1435 | cp_parser_static_assert, cp_parser_simple_type_specifier, | |
1436 | cp_parser_namespace_definition, cp_parser_using_declaration, | |
1437 | cp_parser_init_declarator, cp_parser_type_parameter_key, | |
1438 | cp_parser_exception_specification_opt, cp_parser_std_attribute_spec, | |
1439 | cp_parser_constructor_declarator_p): Likewise. | |
1440 | * mangle.c (struct globals): Rename need_cxx1z_warning to | |
1441 | need_cxx17_warning. | |
1442 | (write_exception_spec, start_mangling, mangle_decl): Likewise. | |
1443 | * Make-lang.in (check-c++1z): Rename to check-c++17, depend on | |
1444 | it. | |
1445 | (check-c++17): New goal. Use 17 instead of 1z. | |
1446 | (check-c++-all): Use 17 instead of 1z. | |
1447 | ||
a3ee44e4 | 1448 | 2017-09-14 Jakub Jelinek <jakub@redhat.com> |
1449 | ||
1450 | PR c++/81314 | |
1451 | * cp-gimplify.c (omp_var_to_track): Look through references. | |
1452 | (omp_cxx_notice_variable): Likewise. | |
1453 | ||
b44d8617 | 1454 | 2017-09-13 Nathan Sidwell <nathan@acm.org> |
1455 | ||
ae257606 | 1456 | Conv-op identifers not in identifier hash table |
1457 | * lex.c (conv_type_hasher): Make member fns inline. | |
1458 | (make_conv_op_name): Directly clone conv_op_identifier. | |
1459 | ||
b44d8617 | 1460 | Rename CLASSTYPE_METHOD_VEC to CLASSTYPE_MEMBER_VEC. |
1461 | * cp-tree.h (struct lang_type): Rename methods to members. | |
1462 | (CLASSTYPE_METHOD_VEC): Rename to ... | |
1463 | (CLASSTYPE_MEMBER_VEC): ... this. | |
1464 | * name-lookup.h (get_method_slot): Rename to ... | |
1465 | (get_member_slot): ... this. | |
1466 | (resort_type_method_vec): Rename to ... | |
1467 | (resort_type_member_vec): ... this. | |
1468 | * class.c (add_method, warn_hidden): Adjust. | |
1469 | * search.c (dfs_locate_field_accessor_pre): Adjust. | |
1470 | * name-lookup.c (method_vec_binary_search): Rename to ... | |
1471 | (member_vec_binary_search): ... this and adjust. | |
1472 | (method_vec_linear_search): Rename to ... | |
1473 | (member_vec_linear_search): ... this and adjust. | |
1474 | (fields_linear_search, get_class_binding_direct): Adjust. | |
1475 | (get_method_slot): Rename to ... | |
1476 | (get_member_slot): ... this and adjust. | |
1477 | (method_name_slot): Rename to ... | |
1478 | (member_name_slot): ... this and adjust. | |
1479 | (resort_type_method_vec): Rename to ... | |
1480 | (resort_type_member_vec): ... this and adjust. | |
1481 | (method_vec_append_class_fields): Rename to ... | |
1482 | (member_vec_append_class_fields): ... this and adjust. | |
1483 | (method_vec_append_enum_values): Rename to ... | |
1484 | (member_vec_append_enum_values): ... this and adjust. | |
1485 | (method_vec_dedup): Rename to ... | |
1486 | (member_vec_dedup): ... this and adjust. | |
1487 | (set_class_bindings, insert_late_enum_def_bindings): Adjust. | |
1488 | ||
78b2cdff | 1489 | 2017-09-12 Paolo Carlini <paolo.carlini@oracle.com> |
1490 | ||
1491 | PR c++/70621 | |
1492 | * decl.c (start_decl): Early return error_mark_node if duplicate_decls | |
1493 | returns it; avoid misleading error message. | |
1494 | ||
c8c010c3 | 1495 | 2017-09-12 Nathan Sidwell <nathan@acm.org> |
1496 | ||
7c06dc60 | 1497 | Kill CLASSTYPE_SORTED_FIELDS. |
1498 | * cp-tree.h (struct lang_type): Lose sorted_fields member. | |
1499 | (CLASSTYPE_SORTED_FIELDS): Delete. | |
1500 | * name-lookup.h (set_class_bindings): Add EXTRA arg. | |
1501 | * name-lookup.c (fields_linear_search): New, broken out of ... | |
1502 | (lookup_field_1): ... here. Delete remainder of function. | |
1503 | (get_class_binding_direct): Reimplement without sorted_fields. | |
1504 | (get_class_binding): Rename TYPE arg to KLASS, for consistency. | |
1505 | (get_method_slot): Call set_class_binding when creating method_vec | |
1506 | on complete type. | |
1507 | (method_name_cmp): Order identically named slots. | |
1508 | (sorted_fields_type_new): Delete. | |
1509 | (field_vc_append_class_fields): Rename to ... | |
1510 | (method_vec_append_class_fields): ... here. Adjust. | |
1511 | (field_vec_append_enum_values): Renme to ... | |
1512 | (method_vec_append_enum_values): ... here. Adjust. | |
1513 | (method_vec_dedup): New. | |
1514 | (set_class_bindings): Reimplement. | |
1515 | (insert_late_enum_def_bindings): Reimplement. | |
1516 | ||
c8c010c3 | 1517 | * name-lookup.c (get_class_binding): Rename TYPE arg to KLASS for |
1518 | consistency. | |
1519 | (restort_data): Move later. | |
1520 | (method_name_cmp, resort_method_name_cmp): Simplify. | |
1521 | (resort_type_method_vec): Reformat. | |
1522 | ||
56da7fe6 | 1523 | 2017-09-09 Jason Merrill <jason@redhat.com> |
1524 | ||
1525 | * constexpr.c (reduced_constant_expression_p): If | |
1526 | CONSTRUCTOR_NO_IMPLICIT_ZERO, check that all fields are initialized. | |
1527 | ||
e256a0fe | 1528 | 2017-09-09 Eric Botcazou <ebotcazou@adacore.com> |
1529 | ||
1530 | PR bootstrap/81926 | |
1531 | * cp-objcp-common.c (struct debug_type_hasher): New class. | |
1532 | (debug_type_hash): New variable. | |
1533 | (cp_get_debug_type): Associate the OFFSET_TYPEs with the types. | |
1534 | ||
4edbdd46 | 1535 | 2017-09-08 Jason Merrill <jason@redhat.com> |
1536 | ||
1537 | PR c++/70029 - ICE with ref-qualifier and -flto | |
1538 | * tree.c (cxx_copy_lang_qualifiers): New. | |
1539 | * cp-tree.h: Declare it. | |
1540 | * cp-objcp-common.h: Define LANG_HOOKS_COPY_LANG_QUALIFIERS. | |
1541 | ||
19afaf9a | 1542 | 2017-09-06 Jason Merrill <jason@redhat.com> |
1543 | ||
a372b306 | 1544 | PR c++/82053 - ICE with default argument in lambda in template |
1545 | * pt.c (tsubst_arg_types): Substitute default arguments for lambdas | |
1546 | in templates. | |
1547 | (retrieve_specialization): Use lambda_fn_in_template_p. | |
1548 | * cp-tree.h: Declare it. | |
1549 | ||
19afaf9a | 1550 | PR c++/82070 - error with nested lambda capture |
1551 | * pt.c (tsubst_expr) [DECL_EXPR]: Register capture proxies with | |
1552 | register_local_specialization. | |
1553 | ||
e12c5305 | 1554 | 2017-09-06 Nathan Sidwell <nathan@acm.org> |
1555 | ||
446b42ca | 1556 | * name-lookup.h (lookup_field_1): Delete. |
1557 | (get_class_binding_direct, get_class_binding): Add type_or_fns arg. | |
1558 | * name-lookup.c (lookup_field_1): make static | |
1559 | (method_vec_binary_search, method_vec_linear_search): New. Broken | |
1560 | out of ... | |
1561 | (get_class_binding_direct): ... here. Add TYPE_OR_FNS argument. | |
1562 | Do complete search of this level. | |
1563 | (get_class_binding): Adjust. | |
1564 | * decl.c (reshape_init_class): Call get_class_binding. | |
1565 | * search.c (lookup_field_r): Move field searching into | |
1566 | get_class_binding_direct. | |
1567 | ||
4d26487b | 1568 | * class.c (warn_hidden): Don't barf on non-functions. |
1569 | * decl2.c (check_classfn): Likewise. Check template match earlier. | |
1570 | ||
b6a9b2f6 | 1571 | * name-lookup.c (count_fields): Rename to ... |
1572 | (count_class_fields): ... here. Take a class, don't count | |
1573 | NULL-named fields. | |
1574 | (add_fields_to_record_type): Rename to ... | |
1575 | (field_vec_append_class_fields): ... here. Take a class, don't | |
1576 | add NULL-named fields. | |
1577 | (add_enum_fields_to_record_type): Rename to ... | |
1578 | (field_vec_append_enum_values): ... here. | |
1579 | (set_class_bindings): Adjust, assert we added expected number. | |
1580 | (insert_late_enum_def_bindings): Reimplement. Create vector if | |
1581 | there are now sufficient entries. | |
1582 | ||
e12c5305 | 1583 | * name-lookup.h (lookup_fnfields_slot_nolazy, |
1584 | lookup_fnfields_slot): Rename to ... | |
1585 | (get_class_binding_direct, get_class_binding): ... here. | |
1586 | * name-lookup.c (lookup_fnfields_slot_nolazy, | |
1587 | lookup_fnfields_slot): Rename to ... | |
1588 | (get_class_binding_direct, get_class_binding): ... here. | |
1589 | * cp-tree.h (CLASSTYPE_CONSTRUCTORS, CLASSTYPE_DESTRUCTOR): Adjust. | |
1590 | * call.c (build_user_type_conversion_1): Adjust. | |
1591 | (has_trivial_copy_assign_p): Adjust. | |
1592 | (has_trivial_copy_p): Adjust. | |
1593 | * class.c (get_basefndecls) Adjust. | |
1594 | (vbase_has_user_provided_move_assign) Adjust. | |
1595 | (classtype_has_move_assign_or_move_ctor_p): Adjust. | |
1596 | (type_build_ctor_call, type_build_dtor_call): Adjust. | |
1597 | * decl.c (register_dtor_fn): Adjust. | |
1598 | * decl2.c (check_classfn): Adjust. | |
1599 | * pt.c (retrieve_specialization): Adjust. | |
1600 | (check_explicit_specialization): Adjust. | |
1601 | (do_class_deduction): Adjust. | |
1602 | * search.c (lookup_field_r): Adjust. | |
1603 | (look_for_overrides_here, lookup_conversions_r): Adjust. | |
1604 | * semantics.c (classtype_has_nothrow_assign_or_copy_p): Adjust. | |
1605 | * tree.c (type_has_nontrivial_copy_init): Adjust. | |
1606 | * method.c (lazily_declare_fn): Adjust comment. | |
1607 | ||
17f6e81c | 1608 | 2017-09-05 Nathan Sidwell <nathan@acm.org> |
1609 | ||
67622d53 | 1610 | * name-lookup.c (do_class_using_decl): Elide read-once temps. |
1611 | Move declarations to initializations. | |
1612 | ||
c682337f | 1613 | * class.c (add_method): Move slot search and insertion to ... |
1614 | * name-lookup.c (get_method_slot): ... this new function. | |
1615 | (lookup_fnfields_slot_nolazy): Cope with NULL slot. | |
1616 | * name-lookup.h (get_method_slot): Declare. | |
1617 | * decl.c (cxx_init_decl_processinng): Give conv_op_marker a more | |
1618 | realistic type. | |
1619 | (grok_special_member_properties): Set | |
1620 | TYPE_HAS_CONVERSION. Expicitly look at DECL_NAME for specialness. | |
1621 | Improve TYPE_HAS_CONSTEXPR_CTOR setting. | |
1622 | ||
8b46f76d | 1623 | * cp-tree.h (lang_decl_base): Rename template_conv_p to |
1624 | unknown_bound_p. | |
1625 | (DECL_CONV_FN_P): Don't check NULL DECL_NAME. | |
1626 | (DECL_CONV_FN_TYPE): FN must be conv op. | |
1627 | (DECL_TEMPLATE_CONV_FN_P): Delete. | |
1628 | (VAR_HAD_UNKNOWN_BOUND, SET_VAR_HAD_UNKNOWN_BOUND): Adjust. | |
1629 | * pt.c (push_template_decl_real): Delete DECL_TEMPLATE_CONV_FN_P | |
1630 | setting. | |
1631 | ||
17f6e81c | 1632 | * class.c (unreverse_member_declarations): Remove extraneous if. |
1633 | * pt.c (push_template_decl_real): Use string concatenation, not | |
1634 | \<newline>. Add %<..%>. | |
1635 | ||
d29e4e8c | 1636 | 2017-09-05 Paolo Carlini <paolo.carlini@oracle.com> |
1637 | ||
1638 | PR c++/81942 | |
1639 | * cp-tree.h (LABEL_DECL_CDTOR): Add and document. | |
1640 | * decl.c (start_preparsed_function): Set LABEL_DECL_CDTOR when | |
1641 | creating cdtor_label. | |
1642 | * constexpr.c (returns): Add the case of a constructor/destructor | |
1643 | returning via a LABEL_DECL_CDTOR label. | |
1644 | (cxx_eval_constant_expression, case [GOTO_EXPR]): Likewise. | |
1645 | ||
a7dd9a0d | 1646 | 2017-09-01 Nathan Sidwell <nathan@acm.org> |
1647 | ||
7904fe55 | 1648 | * cp-tree.h (resort_type_method_vec): Move declaration to ... |
1649 | * name-lookup.h (resort_type_method_vec): ... here. | |
1650 | (set_class_bindings): Lose 2nd arg. | |
1651 | * class.c (finish_struct_1, finish_struct): Adjust | |
1652 | set_class_bindings call. Don't call finish_struct_methods. | |
1653 | (resort_data, method_name_cmp, resort_method_name_cmp, | |
1654 | resort_type_method_vec, finish_struct_methods): Move to ... | |
1655 | * name-lookup.c (resort_data, method_name_cmp, | |
1656 | resort_method_name_cmp, resort_type_method_vec): ... here. | |
1657 | (set_class_bindings): Lose fields arg. Swallow finish_struct_methods. | |
1658 | ||
14b3ed18 | 1659 | * class.c (finish_struct): Call set_class_bindings for the |
1660 | template case too. | |
1661 | ||
1662 | * class.c (finish_struct_methods): Dont clear DECL_IN_AGGR_P here. | |
bb20d9b6 | 1663 | Don't call maybe_warn_about_overly_private_class here. |
1664 | (warn_hidden): Cleanup declarations and comments. | |
1665 | (type_has_user_provided_constructor): No need to check | |
1666 | CLASSTYPE_METHOD_VEC. | |
1667 | (type_has_user_provided_or_explicit_constructor): Likewise. | |
1668 | (classtype_has_move_assign_or_move_ctor_p): Likewise. | |
1669 | (check_bases_and_members): Don't call finish_struct_methods here. | |
1670 | (finish_struct_1): Call finish_struct_methods and | |
1671 | set_class_bindings immediately after layout. Clear DECL_IN_AGGR_P | |
1672 | here. | |
1673 | (finish_struct): For templates process USING_DECLS and clear | |
1674 | DECL_IN_AGGR_P before calling finish_struct_methods. Call | |
1675 | maybe_warn_about_overly_private_class here. | |
1676 | ||
a7dd9a0d | 1677 | Revert 2017-08-28 Nathan Sidwell <nathan@acm.org> |
1678 | Restore sorted_fields vector. | |
1679 | * cp-tree.h (lang_type): Restore sorted_fields vector. | |
1680 | (CLASSTYPE_SORTED_FIELDS): Restore. | |
1681 | (CLASSTYPE_BINDINGS): Delete. | |
1682 | * name-lookup.c (lookup_field_1): Restore binary search. | |
1683 | (sorted_fields_type_new, count_fields, | |
1684 | add_fields_to_record_type, add_enum_fields_to_record_type): Restore | |
1685 | (set_class_bindings): Revert. | |
1686 | (insert_late_enum_def_binding): Restore field_vec insertion. | |
1687 | ||
1e52a582 | 1688 | 2017-09-01 Jakub Jelinek <jakub@redhat.com> |
1689 | ||
1690 | PR c/81887 | |
1691 | * parser.c (cp_parser_omp_ordered): Handle -fopenmp-simd. | |
1692 | ||
e55400dd | 1693 | 2017-09-01 Marek Polacek <polacek@redhat.com> |
1694 | ||
1695 | PR c++/82040 | |
1696 | * typeck.c (cp_build_unary_op): Avoid re-entering reporting routines. | |
1697 | ||
54ebe9c2 | 1698 | 2017-08-30 Jason Merrill <jason@redhat.com> |
1699 | ||
683fb446 | 1700 | PR c++/82029 - __PRETTY_FUNCTION__ in lambda in template |
1701 | * pt.c (enclosing_instantiation_of, lambda_fn_in_template_p) | |
1702 | (regenerated_lambda_fn_p): New. | |
1703 | (tsubst_decl) [VAR_DECL]: Use enclosing_instantiation_of. | |
1704 | (tsubst_copy) [VAR_DECL]: Likewise. | |
1705 | ||
54ebe9c2 | 1706 | PR c++/82030 - ICE inheriting from multiple lambdas |
1707 | PR c++/80767 | |
1708 | * call.c (compare_ics): Handle null candidate. | |
1709 | ||
0a60ad45 | 1710 | 2017-08-30 Ville Voutilainen <ville.voutilainen@gmail.com> |
1711 | ||
1712 | Make taking the address of an overloaded function a non-deduced context | |
1713 | ||
1714 | * pt.c (unify_overload_resolution_failure): Remove. | |
1715 | (unify_one_argument): Adjust. | |
1716 | ||
3d2b0034 | 1717 | 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org> |
1718 | Alan Hayward <alan.hayward@arm.com> | |
1719 | David Sherwood <david.sherwood@arm.com> | |
1720 | ||
1721 | * typeck.c (cp_build_binary_op): Use SCALAR_TYPE_MODE. | |
1722 | ||
03b7a719 | 1723 | 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org> |
1724 | Alan Hayward <alan.hayward@arm.com> | |
1725 | David Sherwood <david.sherwood@arm.com> | |
1726 | ||
1727 | * cvt.c (cp_convert_to_pointer): Use SCALAR_INT_TYPE_MODE. | |
1728 | ||
299dd9fa | 1729 | 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org> |
1730 | Alan Hayward <alan.hayward@arm.com> | |
1731 | David Sherwood <david.sherwood@arm.com> | |
1732 | ||
1733 | * mangle.c (write_real_cst): Use SCALAR_FLOAT_TYPE_MODE | |
1734 | instead of TYPE_MODE. | |
1735 | ||
d202935a | 1736 | 2017-08-29 Jason Merrill <jason@redhat.com> |
52e76545 | 1737 | |
9e6bae05 | 1738 | PR c++/81236 - ICE with template-id in generic lambda |
1739 | * semantics.c (finish_id_expression): Remove special dependent case. | |
1740 | Avoid some later pieces when dependent. | |
1741 | (finish_qualified_id_expr): Do normal BASELINK handling in a | |
1742 | template. Always build a SCOPE_REF for a destructor BIT_NOT_EXPR. | |
1743 | (parsing_default_capturing_generic_lambda_in_template): Remove. | |
1744 | * parser.c (cp_parser_postfix_dot_deref_expression): Always give an | |
1745 | error for types that will never be complete. | |
1746 | * mangle.c (write_expression): Add sanity check. | |
1747 | * tree.c (build_qualified_name): Add sanity check. | |
1748 | (cp_walk_subtrees): Walk into the class context of a BASELINK. | |
1749 | * lambda.c (add_capture): Improve diagnostic for generic lambda | |
1750 | capture failure. | |
1751 | * call.c (build_new_method_call_1): Print the right constructor | |
1752 | name. | |
1753 | ||
52e76545 | 1754 | Reimplement handling of lambdas in templates. |
1755 | * cp-tree.h (LAMBDA_FUNCTION_P): Check DECL_DECLARES_FUNCTION_P. | |
1756 | * decl.c (start_preparsed_function): Call start_lambda_scope. | |
1757 | (finish_function): Call finish_lambda_scope. | |
1758 | * init.c (get_nsdmi): Call start/finish_lambda_scope. | |
1759 | * lambda.c (start_lambda_scope): Only ignore VAR_DECL in a function. | |
1760 | * parser.c (cp_parser_function_definition_after_declarator): Don't | |
1761 | call start/finish_lambda_scope. | |
1762 | * pt.c (retrieve_specialization): Ignore lambda functions in | |
1763 | templates. | |
1764 | (find_parameter_packs_r): Ignore capture proxies. Look into | |
1765 | lambdas. | |
1766 | (check_for_bare_parameter_packs): Allow bare packs in lambdas. | |
1767 | (tsubst_default_argument): Call start/finish_lambda_scope. | |
1768 | (tsubst_function_decl): Handle lambda functions differently. | |
1769 | (tsubst_template_decl): Likewise. | |
1770 | (tsubst_expr) [DECL_EXPR]: Skip closure declarations and capture | |
1771 | proxies. | |
1772 | (tsubst_lambda_expr): Create a new closure rather than instantiate | |
1773 | the one from the template. | |
1774 | (tsubst_copy_and_build): Don't register a specialization of a pack. | |
1775 | (regenerate_decl_from_template): Call start/finish_lambda_scope. | |
1776 | (instantiate_decl): Remove special lambda function handling. | |
1777 | * semantics.c (process_outer_var_ref): Remove special generic lambda | |
1778 | handling. Don't implicitly capture in a lambda in a template. Look | |
1779 | for an existing proxy. | |
1780 | * class.c (current_nonlambda_class_type): Use decl_type_context. | |
1781 | ||
f86dd47b | 1782 | * cp-tree.h (LAMBDA_EXPR_CLOSURE): Use TREE_TYPE. |
1783 | (LAMBDA_EXPR_RETURN_TYPE): Remove. | |
1784 | (struct tree_lambda_expr): Remove closure and return_type fields. | |
1785 | * lambda.c (build_lambda_expr): Don't set LAMBDA_EXPR_RETURN_TYPE. | |
1786 | * pt.c (tsubst_copy_and_build): Likewise. | |
1787 | * parser.c (cp_parser_lambda_declarator_opt): Track return type. | |
1788 | (cp_parser_lambda_body): Adjust unspecified return type check. | |
1789 | * ptree.c (cxx_print_lambda_node): Don't print closure or | |
1790 | return type. | |
b7e4a558 | 1791 | |
1792 | PR c++/80935 - wrong C++17 error with lambda | |
1793 | * decl.c (check_for_uninitialized_const_var): Check | |
1794 | is_instantiation_of_constexpr. | |
1795 | * constexpr.c (ensure_literal_type_for_constexpr_object): Check | |
1796 | is_instantiation_of_constexpr. | |
1797 | (potential_constant_expression_1): Check var_in_maybe_constexpr_fn. | |
1798 | ||
1dcd84cf | 1799 | * lambda.c (build_lambda_object): Check for error_mark_node. |
1800 | * pt.c (make_pack_expansion): Set PACK_EXPANSION_LOCAL_P on the type | |
1801 | pack as well. | |
1802 | (tsubst_decl) [FUNCTION_DECL]: Set DECL_CONTEXT on the parameters. | |
1803 | (tsubst) [TEMPLATE_PARM_INDEX]: Check for error_mark_node. | |
1804 | ||
b38367d9 | 1805 | PR c++/80767 - unnecessary instantiation of generic lambda |
1806 | * call.c (convert_like_real): Call build_user_type_conversion_1 if | |
1807 | cand is null. | |
1808 | (add_conv_candidate): Build a ck_user conversion with no candidate. | |
1809 | ||
2ffc5005 | 1810 | Fix lambdas in template default argument of inherited ctor. |
1811 | * method.c (synthesized_method_base_walk): Replace an inherited | |
1812 | template with its specialization. | |
1813 | (synthesized_method_walk): Make inheriting_ctor a pointer. | |
1814 | (maybe_explain_implicit_delete, explain_implicit_non_constexpr) | |
1815 | (deduce_inheriting_ctor, implicitly_declare_fn): Adjust. | |
1816 | ||
5164d9e9 | 1817 | * pt.c (build_deduction_guide): Set DECL_ABSTRACT_ORIGIN on the |
1818 | template, not the function. | |
1819 | (template_guide_p): Adjust. | |
1820 | ||
d90b1767 | 1821 | Support copying local_specializations. |
1822 | * cp-tree.h (enum lss_policy): New. | |
1823 | (local_specialization_stack): Add policy parameter to default ctor. | |
1824 | * pt.c (local_specialization_stack): Copy local_specializations if | |
1825 | lss_copy. | |
1826 | ||
7e1f8be4 | 1827 | * constexpr.c (potential_constant_expression_1): Add "now" parm. |
1828 | (is_constant_expression, require_constant_expression): New. | |
1829 | (is_static_init_expression, is_nondependent_constant_expression) | |
1830 | (is_nondependent_static_init_expression): Drop "potential". | |
1831 | * except.c (build_must_not_throw_expr): Do type conversion on | |
1832 | value-dependent argument. | |
1833 | * pt.c, semantics.c, typeck2.c: Use variants without "potential". | |
1834 | ||
ea3e8c99 | 1835 | Instantiate default arguments/member initializers once. |
1836 | * init.c (get_nsdmi): Remember NSDMI instantiations. | |
1837 | * parser.c (inject_this_parameter): Be more picky about | |
1838 | current_class_ptr. | |
1839 | * pt.c (tsubst_copy): Simplify 'this' handling. | |
1840 | (tsubst_default_argument): Remember default argument | |
1841 | instantiations. Take parameter number. | |
1842 | (tsubst_default_arguments): Pass it. | |
1843 | * call.c (convert_default_arg): Likewise. | |
1844 | ||
0386bbee | 1845 | Fix default argument conversion failure and SFINAE. |
1846 | * call.c (build_over_call): Check convert_default_arg result for | |
1847 | error_mark_node. | |
1848 | * parser.c (cp_parser_late_parsing_default_args): Remember | |
1849 | error_mark_node. | |
1850 | ||
2ecceb78 | 1851 | 2017-08-28 Nathan Sidwell <nathan@acm.org> |
1852 | ||
fa01f3de | 1853 | * cp-tree.h (lang_type): Replace sorted_fields vector with |
1854 | bindings map. | |
1855 | (CLASSTYPE_SORTED_FIELDS): Delete. | |
1856 | (CLASSTYPE_BINDINGS): New. | |
1857 | * decl.c (finish_enum_value_list): Swap args of | |
1858 | insert_late_enum_def_bindings. | |
1859 | * name-lookup.c (lookup_field_1): Replace binary search of sorted | |
1860 | fields with map->get. | |
1861 | (sorted_fields_type_new, count_fields, | |
1862 | add_fields_to_record_type, add_enum_fields_to_record_type): Delete. | |
1863 | (add_class_member, add_class_members): New. | |
1864 | (set_class_bindings): Create map and insert. | |
1865 | (insert_late_enum_def_binding): Swap parms. Use add_clasS_member. | |
1866 | * ptree.c (cxx_print_type): Delete sorted fields printing. | |
1867 | ||
2ecceb78 | 1868 | * cp-tree.h (insert_late_enum_def_into_classtype_sorted_fields): |
1869 | Delete. | |
1870 | * name-lookup.h (set_class_bindings, | |
1871 | insert_late_enum_def_bindings): Declare. | |
1872 | * decl.c (finish_enum_value_list): Adjust for | |
1873 | insert_late_enum_def_bindings name change. | |
1874 | * class.c (finish_struct_1): Call set_class_bindings. | |
1875 | (count_fields, add_fields_to_record_type, | |
1876 | add_enum_fields_to_record_type, sorted_fields_type_new, | |
1877 | insert_into_classtype_sorted_fields, | |
1878 | insert_late_enum_def_into_classtype_sorted_fields): Move to ... | |
1879 | * name-lookup.h (count_fields, add_fields_to_record_type, | |
1880 | add_enum_fields_to_record_type, sorted_fields_type_new, | |
1881 | set_class_bindings, insert_late_enum_def_bindings): ... here. | |
1882 | ||
2edde495 | 1883 | 2017-08-25 Nathan Sidwell <nathan@acm.org> |
1884 | ||
2ecceb78 | 1885 | * class.c (method_name_cmp, resort_method_name_cmp): Methods |
1e2de451 | 1886 | can never be NULL. |
1887 | ||
2edde495 | 1888 | Conversion operators have a special name |
1889 | * cp-tree.h (CPTI_CONV_OP_MARKER, CPTI_CONV_OP_IDENTIFIER): New. | |
1890 | (conv_op_marker, conv_op_identifier): New. | |
1891 | (CLASSTYPE_FIRST_CONVERSION_SLOT): Delete. | |
1892 | * decl.c (initialize_predefined_identifiers): Add | |
1893 | conv_op_identifier. | |
1894 | (cxx_init_decl_processing): Create conv_op_marker. | |
1895 | * decl2.c (check_classfn): Lookup conv-ops by name. | |
1896 | * class.c (add_method): Use conv_op_identifier & conv_op_marker. | |
1897 | (resort_type_method_vec): Don't skip conv-ops. | |
1898 | (finish_struct_methods, warn_hidden): Likewise. | |
1899 | * name-lookup.h (lookup_all_conversions): Delete. | |
1900 | * name-lookup.c (lookup_conversion_operator): Replace with ... | |
1901 | (extract_conversion_operator): ... this. | |
1902 | (lookup_fnfields_slot_nolazy): Find conv-ops by name. | |
1903 | (lookup_all_conversions): Delete. | |
1904 | * pt.c (check_explicit_specialization): Find conv-ops by name. | |
1905 | * search.c (lookup_conversions_r): Likewise. | |
1906 | ||
ca9219bf | 1907 | 2017-08-24 Nathan Sidwell <nathan@acm.org> |
1908 | ||
1909 | Conversion operators kept on single overload set | |
1910 | * class.c (add_method): Keep all conv-ops on one slot. | |
1911 | * name-lookup.c (lookup_conversion_operator): Pull the desired | |
1912 | conv op out of overload set. | |
1913 | * search.c (lookup_conversions_r): Lose template/non-template | |
1914 | distinction. | |
1915 | (lookup_conversions): Likewise. | |
1916 | ||
fcc3d956 | 1917 | 2017-08-23 Nathan Sidwell <nathan@acm.org> |
1918 | ||
03d9ebc0 | 1919 | * cp-tree.h (lookup_field_1, lookup_fnfields_slot, |
1920 | lookup_fnfields_slot_nolazy, lookup_all_conversions): Move | |
1921 | declatations to ... | |
1922 | * name-lookup.h (lookup_field_1, lookup_fnfields_slot, | |
1923 | lookup_fnfields_slot_nolazy, lookup_all_conversions): ... here. | |
1924 | * search.c (lookup_conversion_operator, | |
1925 | lookup_fnfields_slot_nolazy, lookup_field_1, lookup_fnfields_slot, | |
1926 | lookup_all_conversions): Move to ... | |
1927 | * name-lookup.c (lookup_conversion_operator, | |
1928 | lookup_fnfields_slot_nolazy, lookup_field_1, lookup_fnfields_slot, | |
1929 | lookup_all_conversions): ... here. | |
1930 | ||
912ee294 | 1931 | * semantics.c (finish_member_declaration): Move USING_DECL check |
1932 | earlier. Always set C++ linkage. Commonize TYPE_FIELD and | |
1933 | template decl list insertion. | |
1934 | ||
163fe99f | 1935 | * cp-tree.h (maybe_version_functions): Declare. |
1936 | * decl.c (decls_match): Break function versioning check to | |
1937 | separate function. Call it. | |
1938 | (maybe_version_functions): Broken out of decls_match. | |
1939 | * class.c (add_method): Use maybe_version_functions. | |
1940 | ||
fcc3d956 | 1941 | * cp-tree.h (print_search_statistics, |
1942 | reinit_search_statistics): Don't declare. | |
1943 | * search.c (n_fields_searched, n_calls_lookup_field, | |
1944 | n_calls_lookup_field_1, n_calls_lookup_fnfields, | |
1945 | n_calls_lookup_fnfields_1, n_calls_get_base_type, | |
1946 | n_outer_fields_searched, n_contexts_saved): Delete. | |
1947 | (lookup_field_1, lookup_member, | |
1948 | lookup_fnfields_slot_nolazy): Remove stat gathering. | |
1949 | (print_search_statistics, reinit_search_statistics): Delete. | |
1950 | * tree.c (cxx_print_statistics): Don't print search stats. | |
1951 | ||
06340e70 | 1952 | 2017-08-21 Nathan Sidwell <nathan@acm.org> |
1953 | ||
e7fb31a0 | 1954 | * search.c (lookup_field_r): Remove obsolete code for type-named |
1955 | field in PoD. | |
1956 | ||
06340e70 | 1957 | * search.c (lookup_field_1): Assert TYPE is a class and VFIELD |
1958 | isn't special. | |
1959 | (lookup_field_fuzzy_info::fuzzy_lookup_fnfields): Delete. | |
1960 | (lookup_field_fuzzy_r): Adjust. | |
1961 | ||
a115c319 | 1962 | 2017-08-21 David Malcolm <dmalcolm@redhat.com> |
1963 | ||
1964 | * call.c (build_over_call): Pass NULL for new parameter to | |
1965 | check_function_arguments. | |
1966 | * typeck.c (cp_build_function_call_vec): Likewise. | |
1967 | ||
d580f97a | 1968 | 2017-08-21 Nathan Sidwell <nathan@acm.org> |
1969 | ||
1970 | PR c++/81899 | |
1971 | * pt.c (instantiate_class_template_1): | |
1972 | BOUND_TEMPLATE_TEMPLATE_PARM is never friend-injected. | |
1973 | ||
55058771 | 1974 | 2017-08-18 David Malcolm <dmalcolm@redhat.com> |
1975 | ||
1976 | PR c++/81514 | |
1977 | * name-lookup.c (maybe_suggest_missing_header): Convert return | |
1978 | type from void to bool; return true iff a suggestion was offered. | |
1979 | (suggest_alternative_in_explicit_scope): Move call to | |
1980 | maybe_suggest_missing_header to before use of best_match, and | |
1981 | return true if the former offers a suggestion. | |
1982 | ||
4bec7283 | 1983 | 2017-08-18 H.J. Lu <hongjiu.lu@intel.com> |
1984 | ||
1985 | PR c/53037 | |
1986 | * decl.c (duplicate_decls): Also merge DECL_WARN_IF_NOT_ALIGN. | |
1987 | * decl2.c (grokbitfield): Don't allow bit-field with | |
1988 | warn_if_not_aligned type. | |
1989 | ||
276845d6 | 1990 | 2017-08-17 Nathan Sidwell <nathan@acm.org> |
1991 | ||
2e3e3876 | 1992 | * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Remove stale comment. |
1993 | * cp-tree.h (ENUM_TEMPLATE_INFO): Delete. | |
1994 | (TYPE_TEMPLATE_INFO): Simplify. | |
1995 | (SET_TYPE_TEMPLATE_INFO): Simplify. | |
1996 | ||
49a669e2 | 1997 | * lex.c (maybe_add_lang_type_raw): BOUND_TEMPLATE_TEMPLATE_PARMs |
1998 | don't need lang_type. | |
1999 | (cxx_make_type): Use maybe_add_lang_type_raw return value. | |
2000 | * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Don't rely on | |
2001 | TYPE_LANG_SPECIFIC. | |
2002 | ||
276845d6 | 2003 | * cp-tree.h (struct lang_type): Remove template_info field. |
2004 | (CLASSTYPE_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1. | |
2005 | (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise. | |
2006 | ||
c8616982 | 2007 | 2017-08-14 Martin Sebor <msebor@redhat.com> |
2008 | ||
2009 | PR c/81117 | |
2010 | * error.c (cp_printer): Handle 'G'. | |
2011 | ||
07b8a412 | 2012 | 2017-08-11 Martin Liska <mliska@suse.cz> |
2013 | ||
2014 | * decl2.c (get_tls_init_fn): Replace ASM_OUTPUT_DEF with | |
2015 | TARGET_SUPPORTS_ALIASES. | |
2016 | (handle_tls_init): Likewise. | |
2017 | (note_mangling_alias): Likewise. Remove ATTRIBUTE_UNUSED for | |
2018 | both arguments. | |
2019 | * optimize.c (can_alias_cdtor): Likewise. | |
2020 | ||
f283da52 | 2021 | 2017-08-11 Jason Merrill <jason@redhat.com> |
2022 | ||
2023 | PR c++/81671 - nullptr_t template parameter | |
2024 | * pt.c (convert_nontype_argument): Fix nullptr_t check. | |
2025 | ||
ff00c674 | 2026 | 2017-08-10 Jason Merrill <jason@redhat.com> |
2027 | ||
c79a9a24 | 2028 | PR c++/81359 - Unparsed NSDMI error from SFINAE context. |
2029 | * method.c (synthesized_method_walk): Don't diagnose lack of | |
2030 | operator delete. | |
2031 | ||
ff00c674 | 2032 | PR c++/80452 - Core 1579, implicit move semantics on return/throw |
2033 | * cp-tree.h (LOOKUP_PREFER_RVALUE): Now means that we've already | |
2034 | tentatively changed the lvalue to an rvalue. | |
2035 | * call.c (reference_binding): Remove LOOKUP_PREFER_RVALUE handling. | |
2036 | (build_over_call): If LOOKUP_PREFER_RVALUE, check that the first | |
2037 | parameter is an rvalue reference. | |
2038 | * except.c (build_throw): Do maybe-rvalue overload resolution twice. | |
2039 | * typeck.c (check_return_expr): Likewise. | |
2040 | ||
3fe34694 | 2041 | 2017-08-10 David Malcolm <dmalcolm@redhat.com> |
2042 | ||
2043 | * parser.c (cp_parser_error): Update for new param to | |
2044 | c_parse_error. | |
2045 | (class token_pair): New class. | |
2046 | (struct matching_paren_traits): New struct. | |
2047 | (matching_parens): New typedef. | |
2048 | (struct matching_brace_traits): New struct. | |
2049 | (matching_braces): New typedef. | |
2050 | (cp_parser_statement_expr): Convert explicit parsing of | |
2051 | CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of | |
2052 | class matching_parens, so that the pertinent open parenthesis is | |
2053 | highlighted when there are problems locating the close | |
2054 | parenthesis. | |
2055 | (cp_parser_primary_expression): Likewise. | |
2056 | (cp_parser_compound_literal_p): Remove consumption of opening | |
2057 | paren. | |
2058 | (cp_parser_postfix_expression): Convert explicit parsing of | |
2059 | CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use matching parens, as | |
2060 | above. Use it to consume the opening paren previously consumed by | |
2061 | cp_parser_compound_literal_p. | |
2062 | (cp_parser_parenthesized_expression_list): Likewise. | |
2063 | (cp_parser_unary_expression): Likewise. | |
2064 | (cp_parser_new_expression): Likewise. | |
2065 | (cp_parser_cast_expression): Likewise. | |
2066 | (cp_parser_builtin_offsetof): Likewise. | |
2067 | (cp_parser_trait_expr): Likewise. | |
2068 | (cp_parser_lambda_declarator_opt): Likewise. | |
2069 | (cp_parser_lambda_body): Likewise, for matching_braces. | |
2070 | (cp_parser_compound_statement): Likewise. | |
2071 | (cp_parser_selection_statement): Likewise, for matching_parens. | |
2072 | (cp_parser_iteration_statement): Likewise. | |
2073 | (cp_parser_already_scoped_statement): Likewise, for | |
2074 | matching_braces. | |
2075 | (cp_parser_linkage_specification): Likewise. | |
2076 | (cp_parser_static_assert): Likewise, for matching_parens. | |
2077 | (cp_parser_decltype): Likewise. | |
2078 | (cp_parser_operator): Likewise. | |
2079 | (cp_parser_enum_specifier): Likewise. | |
2080 | (cp_parser_namespace_definition): Likewise. | |
2081 | (cp_parser_direct_declarator): Likewise. | |
2082 | (cp_parser_braced_list): Likewise. | |
2083 | (cp_parser_class_specifier_1): Likewise, for matching_braces. | |
2084 | (cp_parser_constant_initializer): Likewise. | |
2085 | (cp_parser_noexcept_specification_opt): Likewise, for | |
2086 | matching_parens. | |
2087 | (cp_parser_exception_specification_opt): Likewise. | |
2088 | (cp_parser_handler): Likewise. | |
2089 | (cp_parser_asm_specification_opt): Likewise. | |
2090 | (cp_parser_asm_operand_list): Likewise. | |
2091 | (cp_parser_gnu_attributes_opt): Likewise. | |
2092 | (cp_parser_std_attribute_spec): Likewise. | |
2093 | (cp_parser_requirement_parameter_list): Likewise. | |
2094 | (cp_parser_requirement_body): Likewise, for matching_braces. | |
2095 | (cp_parser_compound_requirement): Likewise. | |
2096 | (cp_parser_template_introduction): Likewise. | |
2097 | (cp_parser_sizeof_pack): Likewise, for matching_parens. | |
2098 | (cp_parser_sizeof_operand): Likewise; use it to consume the | |
2099 | opening paren previously consumed by cp_parser_compound_literal_p. | |
2100 | (get_matching_symbol): New function. | |
2101 | (cp_parser_required_error): Add param "matching_location". Remove | |
2102 | calls to cp_parser_error, instead setting a non-NULL gmsgid, and | |
2103 | handling it if set by calling c_parse_error, potentially with a | |
2104 | secondary location if matching_location was set. | |
2105 | (cp_parser_require): Add param "matching_location", with a default | |
2106 | value of UNKNOWN_LOCATION. | |
2107 | (cp_parser_require_keyword): Update for new param of | |
2108 | cp_parser_required_error. | |
2109 | (cp_parser_objc_encode_expression): Update to class matching_parens | |
2110 | as above. | |
2111 | (cp_parser_objc_defs_expression): Likewise. | |
2112 | (cp_parser_objc_protocol_expression): Likewise. | |
2113 | (cp_parser_objc_selector_expression): Likewise. | |
2114 | (cp_parser_objc_typename): Likewise. | |
2115 | (cp_parser_objc_superclass_or_category): Likewise. | |
2116 | (cp_parser_objc_try_catch_finally_statement): Likewise. | |
2117 | (cp_parser_objc_synchronized_statement): Likewise. | |
2118 | (cp_parser_objc_at_property_declaration): Likewise. | |
2119 | (cp_parser_oacc_single_int_clause): Likewise. | |
2120 | (cp_parser_oacc_shape_clause): Likewise. | |
2121 | (cp_parser_omp_clause_collapse): Likewise. | |
2122 | (cp_parser_omp_clause_default): Likewise. | |
2123 | (cp_parser_omp_clause_final): Likewise. | |
2124 | (cp_parser_omp_clause_if): Likewise. | |
2125 | (cp_parser_omp_clause_num_threads): Likewise. | |
2126 | (cp_parser_omp_clause_num_tasks): Likewise. | |
2127 | (cp_parser_omp_clause_grainsize): Likewise. | |
2128 | (cp_parser_omp_clause_priority): Likewise. | |
2129 | (cp_parser_omp_clause_hint): Likewise. | |
2130 | (cp_parser_omp_clause_defaultmap): Likewise. | |
2131 | (cp_parser_omp_clause_ordered): Likewise. | |
2132 | (cp_parser_omp_clause_schedule): Likewise. | |
2133 | (cp_parser_omp_clause_num_teams): Likewise. | |
2134 | (cp_parser_omp_clause_thread_limit): Likewise. | |
2135 | (cp_parser_omp_clause_aligned): Likewise. | |
2136 | (cp_parser_omp_clause_linear): Likewise. | |
2137 | (cp_parser_omp_clause_safelen): Likewise. | |
2138 | (cp_parser_omp_clause_simdlen): Likewise. | |
2139 | (cp_parser_omp_clause_depend): Likewise. | |
2140 | (cp_parser_omp_clause_device): Likewise. | |
2141 | (cp_parser_omp_clause_dist_schedule): Likewise. | |
2142 | (cp_parser_oacc_clause_async): Likewise. | |
2143 | (cp_parser_omp_critical): Likewise. | |
2144 | (cp_parser_omp_for_loop): Likewise. | |
2145 | (cp_parser_omp_sections_scope): Likewise. | |
2146 | (cp_parser_omp_declare_reduction_exprs): Likewise. | |
2147 | Update for new param to cp_parser_required_error. | |
2148 | (cp_parser_oacc_routine): Likewise. | |
2149 | (cp_parser_transaction_expression): Likewise. | |
2150 | (cp_parser_cilk_simd_vectorlength): Likewise. | |
2151 | ||
b9e17a4a | 2152 | 2017-08-09 Jason Merrill <jason@redhat.com> |
2153 | ||
ec04b34c | 2154 | PR c++/81525 - wrong constant value with generic lambda |
2155 | * pt.c (tsubst_decl) [VAR_DECL]: Avoid clobbering auto. | |
2156 | (tsubst_copy) [VAR_DECL]: Handle auto. | |
2157 | ||
b9e17a4a | 2158 | PR c++/81359 - Unparsed NSDMI error from SFINAE context. |
2159 | * init.c (get_nsdmi): Add complain parm. | |
2160 | * typeck2.c (digest_nsdmi_init): Add complain parm. | |
2161 | (process_init_constructor_record): Pass complain to get_nsdmi. | |
2162 | * pt.c (maybe_instantiate_noexcept): Add complain parm, return bool. | |
2163 | * method.c (get_defaulted_eh_spec): Add complain parm. Pass it into | |
2164 | synthesized_method_walk. | |
2165 | (synthesized_method_walk): Adjust. | |
2166 | (walk_field_subobs): Pass complain to get_nsdmi. | |
2167 | (defaulted_late_check): Skip other checks if deleted. | |
2168 | * decl2.c (mark_used): Pass complain to maybe_instantiate_noexcept. | |
2169 | * call.c (build_aggr_conv): Pass complain to get_nsdmi. | |
2170 | * parser.c (defarg_location): New. | |
2171 | * error.c (location_of): Use it. | |
2172 | ||
623ee358 | 2173 | 2017-08-09 Marek Polacek <polacek@redhat.com> |
2174 | ||
2175 | * parser.c (cp_parser_perform_range_for_lookup): Use false instead of 0. | |
2176 | * typeck.c (build_binary_op): Change the type of a parameter to bool. | |
2177 | (cp_truthvalue_conversion): Use true instead of 1. | |
2178 | ||
ec72e2f7 | 2179 | 2017-08-08 Marek Polacek <polacek@redhat.com> |
2180 | ||
2181 | PR c++/81607 | |
2182 | * cp-gimplify.c (cp_fold): If folding exposed a branch of | |
2183 | a COND_EXPR, convert it to the original type of the COND_EXPR, if | |
2184 | they differ. | |
2185 | ||
30a86690 | 2186 | 2017-08-08 Martin Liska <mliska@suse.cz> |
2187 | ||
2188 | * call.c: Include header files. | |
2189 | * cp-gimplify.c: Likewise. | |
2190 | * cp-ubsan.c: Likewise. | |
2191 | * cvt.c: Likewise. | |
2192 | * init.c: Likewise. | |
2193 | * search.c: Likewise. | |
2194 | * semantics.c: Likewise. | |
2195 | * typeck.c: Likewise. | |
2196 | ||
1610e7fb | 2197 | 2017-08-07 Martin Liska <mliska@suse.cz> |
2198 | ||
2199 | * parser.c (cp_parser_gnu_attribute_list): Canonicalize name of an | |
2200 | attribute. | |
2201 | (cp_parser_std_attribute): Likewise. | |
2202 | * tree.c: Add new include. | |
2203 | ||
390f62de | 2204 | 2017-08-04 Paolo Carlini <paolo.carlini@oracle.com> |
2205 | ||
2206 | PR c++/79790 | |
2207 | * pt.c (do_class_deduction): Handle the case of no viable implicit | |
2208 | deduction guides; simplify the code generating implicit deduction | |
2209 | guides. | |
2210 | ||
c5e55d1c | 2211 | 2017-08-03 Paolo Carlini <paolo.carlini@oracle.com> |
2212 | ||
2213 | PR c++/71440 | |
2214 | * typeck.c (build_x_unary_op): Avoid pretty-printing constructor / | |
2215 | destructor as expressions. | |
2216 | ||
10f48b3d | 2217 | 2017-08-02 Jakub Jelinek <jakub@redhat.com> |
2218 | ||
2219 | PR c++/81640 | |
2220 | * call.c (build_user_type_conversion_1): Only call | |
2221 | lookup_fnfields_slot if totype is CLASS_TYPE_P. | |
2222 | ||
e5fdf441 | 2223 | 2017-07-31 Jason Merrill <jason@redhat.com> |
2224 | ||
2225 | * decl.c (declare_global_var): Set DECL_CONTEXT. | |
2226 | ||
38ef3642 | 2227 | 2017-07-31 Jan Hubicka <hubicka@ucw.cz> |
2228 | Martin Liska <mliska@suse.cz> | |
2229 | ||
2230 | * pt.c (tsubst_copy): Copy PREDICT_EXPR. | |
2231 | * semantics.c (finish_goto_stmt): Build gimple predict | |
2232 | stament. | |
2233 | * constexpr.c (potential_constant_expression_1): Handle | |
2234 | PREDICT_EXPR. | |
2235 | ||
dadc219c | 2236 | 2017-07-31 Martin Liska <mliska@suse.cz> |
2237 | ||
2238 | PR sanitize/81530 | |
2239 | * cp-gimplify.c (cp_genericize): Guard condition with flag_sanitize_p | |
2240 | also with current_function_decl non-null equality. | |
2241 | * cp-ubsan.c (cp_ubsan_instrument_vptr_p): Likewise. | |
2242 | * decl.c (compute_array_index_type): Likewise. | |
2243 | * init.c (finish_length_check): Likewise. | |
2244 | * typeck.c (cp_build_binary_op): Likewise. | |
2245 | ||
41d01e67 | 2246 | 2017-07-29 Jakub Jelinek <jakub@redhat.com> |
2247 | ||
2248 | * cp-objcp-common.c (cp_decl_dwarf_attribute): Handle | |
2249 | DW_AT_export_symbols. | |
2250 | * name-lookup.c (emit_debug_info_using_namespace): Add IMPLICIT | |
2251 | argument, pass it through to the debug hook. | |
2252 | (finish_namespace_using_directive): Adjust | |
2253 | emit_debug_info_using_namespace caller. | |
2254 | (push_namespace): Likewise. Call it after setting | |
2255 | DECL_NAMESPACE_INLINE_P. | |
2256 | (cp_emit_debug_info_for_using): Pass false as new argument to | |
2257 | the imported_module_or_decl debug hook. | |
2258 | ||
8a50b528 | 2259 | 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> |
2260 | ||
2261 | * lex.c (copy_decl): Adjust. | |
2262 | (copy_type): Likewise. | |
2263 | ||
c8766acf | 2264 | 2017-07-26 Paolo Carlini <paolo.carlini@oracle.com> |
2265 | ||
2266 | PR c++/71570 | |
2267 | * lambda.c (add_capture): Early return if we cannot capture by | |
2268 | reference. | |
2269 | ||
36ded4e1 | 2270 | 2017-07-26 Jason Merrill <jason@redhat.com> |
2271 | ||
2272 | P0702R1 - List deduction of vector. | |
2273 | * pt.c (do_class_deduction): Special-case deduction from a single | |
2274 | element of related type. | |
2275 | ||
0df3ceda | 2276 | 2017-07-26 Leonid Koppel <lkoppel@uwaterloo.ca> |
2277 | ||
2278 | PR c++/67054 - Inherited ctor with non-default-constructible members | |
2279 | * method.c (walk_field_subobs) Consider member initializers (NSDMIs) | |
2280 | when deducing an inheriting constructor. | |
2281 | ||
045a1d9e | 2282 | 2017-07-21 Nathan Sidwell <nathan@acm.org> |
2283 | ||
0091498c | 2284 | * search.c (lookup_conversion_operator): Return overloads. |
2285 | (lookup_fnfields_idx_nolazy): Absorb into ... | |
2286 | (lookup_fnfields_slot_nolaxy): ... here. | |
2287 | (lookup_fnfields_1): Absorb into ... | |
2288 | (lookup_fnfields_slot): ... here. | |
2289 | ||
35ea2ff7 | 2290 | Remove special CDtor METHOD_VEC slots. |
2291 | * cp-tree.h (CLASSTYPE_CONSTRUCTOR_SLOT, | |
2292 | CLASSTYPE_DESTRUCTOR_SLOT): Delete. | |
2293 | (CLASSTYPE_CONSTRUCTORS): Use lookup_fnfields_slot_nolazy. | |
2294 | (CLASSTYPE_DESTRUCTOR): Likewise. | |
2295 | * class (add_method): Don't use special cdtor slots. | |
2296 | * search.c (lookup_fnfields_idx_nolazy): Likewise. | |
2297 | (look_for_overrides_here): Use lookup_fnfields_slot. | |
2298 | * semantics (classtype_has_nothrow_assign_or_copy_p): Likewise. | |
2299 | ||
045a1d9e | 2300 | * call.c (add_candidates): Move decls to initialization. Don't |
2301 | use !!. | |
2302 | ||
ab87ee8f | 2303 | 2017-07-20 Nathan Sidwell <nathan@acm.org> |
2304 | ||
2305 | Remove TYPE_METHODS. | |
2306 | * class.c (maybe_warn_about_overly_private_class, | |
2307 | finish_struct_methods, one_inheriting_sig, count_fields, | |
2308 | add_fields_to_record_type, check_field_decls, check_methods, | |
2309 | clone_function_decl, set_method_tm_attributes, | |
2310 | finalize_literal_type_property, check_bases_and_members, | |
2311 | create_vtable_ptr, determine_key_method, | |
2312 | unreverse_member_declarations, finish_struct, | |
2313 | add_vcall_offset_vtbl_entries_1): Member fns are on TYPE_FIELDS. | |
2314 | * decl.c (fixup_anonymous_aggr): Likewise. | |
2315 | * decl2.c (reset_type_linkage_2): Likewise. | |
2316 | * method.c (after_nsdmi_defaulted_late_checks, | |
2317 | lazily_declare_fn): Likewise. | |
2318 | * optimize.c (maybe_thunk_body, maybe_clone_body): Likewise. | |
2319 | * pt.c (instantiate_class_template_1, tsubst_expr, | |
2320 | do_type_instantiation, instantiate_pending_templates): Likewise. | |
2321 | * search.c (lookup_field_1): Likewise. | |
2322 | * semantics.c (finish_member_declaration, | |
2323 | finish_omp_declare_simd_methods): Likewise. | |
2324 | ||
c6f56d33 | 2325 | 2017-07-19 Nathan Sidwell <nathan@acm.org> |
2326 | ||
303419ea | 2327 | * class.c (add_implicitly_declared_members): Use |
2328 | classtype_has_move_assign_or_move_ctor_p. | |
2329 | (classtype_has_move_assign_or_move_ctor, | |
2330 | classtype_has_user_move_assign_or_move_ctor_p): Merge into ... | |
2331 | (classtype_has_move_assign_or_move_ctor_p): ... this new function. | |
2332 | * cp-tree.h (classtype_has_user_move_assign_or_move_ctor_p): | |
2333 | Replace with ... | |
2334 | (classtype_has_move_assign_or_move_ctor_p): ... this. | |
2335 | * method.c (maybe_explain_implicit_delete, lazily_declare_fn): Adjust. | |
2336 | * tree.c (type_has_nontrivial_copy_init): Adjust. | |
2337 | ||
c6f56d33 | 2338 | * cp-tree.h (PACK_EXPANSION_PARAMETER_PACKS, |
2339 | PACK_EXPANSION_EXTRA_ARGS): Use TYPE_{MIN,MAX}_VALUE_RAW. | |
2340 | ||
35559e84 | 2341 | 2017-07-18 Nathan Sidwell <nathan@acm.org> |
2342 | ||
a8de6c92 | 2343 | * cp-array-notation.c (build_array_notation_ref): Use |
2344 | TYPE_{MIN,MAX}_VALUE. | |
2345 | ||
35559e84 | 2346 | * class.c (classtype_has_move_assign_or_move_ctor): Declare. |
2347 | (add_implicitly_declared_members): Use it. | |
2348 | (type_has_move_constructor, type_has_move_assign): Merge into ... | |
2349 | (classtype_has_move_assign_or_move_ctor): ... this new function. | |
2350 | * cp-tree.h (type_has_move_constructor, type_has_move_assign): Delete. | |
2351 | ||
d2166684 | 2352 | 2017-07-17 Volker Reichelt <v.reichelt@netcologne.de> |
2353 | ||
2354 | * parser.c (cp_parser_decl_specifier_seq): Add fix-it hints for | |
2355 | friend outside class and obsolete auto as storage-class-specifier. | |
2356 | ||
55d57ab7 | 2357 | 2017-07-17 Nathan Sidwell <nathan@acm.org> |
2358 | ||
05b11131 | 2359 | * class.c (maybe_warn_about_overly_private_class): Ignore public |
2360 | copy ctors. | |
2361 | ||
cd77b36c | 2362 | * class.c (type_has_user_declared_move_constructor, |
2363 | type_has_user_declared_move_assign): Combine into ... | |
2364 | (classtype_has_user_move_assign_or_move_ctor_p): ... this new function. | |
2365 | * cp-tree.h (type_has_user_declared_move_constructor, | |
2366 | type_has_user_declared_move_assign): Combine into ... | |
2367 | (classtype_has_user_move_assign_or_move_ctor_p): ... this. Declare. | |
2368 | * method.c (maybe_explain_implicit_delete): Use it. | |
2369 | (lazily_declare_fn): Use it. | |
2370 | * tree.c (type_has_nontrivial_copy_init): Use it. | |
2371 | ||
55d57ab7 | 2372 | * semantics.c (classtype_has_nothrow_assign_or_copy_p): Clarify |
2373 | semantics, simplify implementation. | |
2374 | ||
b129a37a | 2375 | 2017-07-16 Volker Reichelt <v.reichelt@netcologne.de> |
2376 | ||
2377 | * parser.c (cp_parser_cast_expression): Use %q#T instead of %qT | |
2378 | in old-style cast diagnostic. | |
2379 | * typeck.c (maybe_warn_about_useless_cast): Use %q#T instead of %qT | |
2380 | in useless cast diagnostic. | |
2381 | * error.c (type_to_string): Remove enum special handling. | |
2382 | ||
7f9c8569 | 2383 | 2017-07-14 David Malcolm <dmalcolm@redhat.com> |
2384 | ||
2385 | * name-lookup.c (get_std_name_hint): Add '<' and '>' around | |
2386 | the header names. | |
2387 | (maybe_suggest_missing_header): Update for addition of '<' and '>' | |
2388 | to above. Provide a fix-it hint. | |
2389 | * pt.c: Include "gcc-rich-location.h" | |
2390 | (listify): Attempt to add fix-it hint for missing | |
2391 | #include <initializer_list>. | |
2392 | * rtti.c: Include "gcc-rich-location.h". | |
2393 | (typeid_ok_p): Attempt to add fix-it hint for missing | |
2394 | #include <typeinfo>. | |
2395 | ||
7e6d9656 | 2396 | 2017-07-12 Jason Merrill <jason@redhat.com> |
2397 | ||
2398 | P0512R0 - Deduction from an initializer list. | |
2399 | * pt.c (do_class_deduction): Do list deduction in two phases. | |
2400 | ||
c0a09bf1 | 2401 | 2017-07-12 Nathan Sidwell <nathan@acm.org> |
2402 | ||
2403 | * cp-tree.h (DECL_CONSTRUCTOR_P, DECL_MAYBE_IN_CHARGE_CONSTRUCTOR, | |
2404 | DECL_DESTRUCTOR_P, DECL_MAYBE_IN_CHARGE_DESTRCTOR): Look at | |
2405 | identifier flags. | |
2406 | * decl.c (grokfndecl): Set DECL_CXX_CONSTRUCTOR and | |
2407 | DECL_CXX_DESTRUCTOR explicitly. | |
2408 | * decl2.c (grokclassfn): Likewise. | |
2409 | * friend.c (do_friend): Likewise. | |
2410 | * method.c (make_thunk, make_alias_for, | |
2411 | implicitly_declare_fn): Likewise. | |
2412 | ||
bad0417c | 2413 | 2017-07-11 Jason Merrill <jason@redhat.com> |
2414 | ||
2415 | Core DR 393 | |
2416 | * decl.c (grokparms): Downgrade error about array of unknown bound | |
2417 | to pedwarn and disable it for C++17. | |
2418 | ||
d4bcda1c | 2419 | 2017-07-11 Nathan Sidwell <nathan@acm.org> |
2420 | ||
2421 | * decl2.c (reset_type_linkage_2): Dont't change ctor name. | |
2422 | ||
41961c16 | 2423 | 2017-07-10 Martin Sebor <msebor@redhat.com> |
2424 | ||
2425 | * cp-tree.h (cp_operator_id, cp_assignment_operator_id): Document. | |
2426 | ||
a53f6185 | 2427 | 2017-07-06 Jason Merrill <jason@redhat.com> |
2428 | ||
2429 | PR c++/81204 - parse error with dependent template-name | |
2430 | * parser.c (cp_parser_lookup_name): Revert previous change. | |
2431 | ||
7051d239 | 2432 | 2017-07-06 David Malcolm <dmalcolm@redhat.com> |
2433 | ||
2434 | * cp-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): Define as | |
2435 | selftest::run_cp_tests. | |
2436 | (selftest::run_cp_tests): New function. | |
2437 | * cp-tree.h (selftest::run_cp_tests): New decl. | |
2438 | ||
728119d0 | 2439 | 2017-07-04 Jakub Jelinek <jakub@redhat.com> |
2440 | ||
70e112cc | 2441 | * parser.c (cp_parser_decomposition_declaration): Replace |
2442 | decomposition declaration with structured binding in diagnostics. | |
2443 | * decl.c (cp_finish_decomp): Likewise. | |
2444 | (grokdeclarator): Likewise. | |
2445 | ||
728119d0 | 2446 | PR c++/81258 |
2447 | * parser.c (cp_parser_decomposition_declaration): Diagnose invalid | |
2448 | forms of structured binding initializers. | |
2449 | ||
fb10536b | 2450 | 2017-07-03 Paolo Carlini <paolo.carlini@oracle.com> |
2451 | ||
2452 | PR c++/65775 | |
2453 | * decl.c (grokdeclarator): Move checks on function return type after | |
2454 | the splice_late_return_type call; if declspecs->locations[ds_type_spec] | |
2455 | is UNKNOWN_LOCATION fall back to input_location. | |
2456 | ||
968b90de | 2457 | 2017-07-03 David Malcolm <dmalcolm@redhat.com> |
2458 | ||
2459 | * parser.c (enum required_token): Fix spelling of | |
2460 | RT_INTERATION to RT_ITERATION. | |
2461 | (cp_parser_iteration_statement): Likewise. | |
2462 | (cp_parser_required_error): Likewise. | |
2463 | ||
2c48667d | 2464 | 2017-06-30 Jason Merrill <jason@redhat.com> |
2465 | ||
2466 | PR c++/81257 - ICE with invalid ::template. | |
2467 | PR c++/54769 - wrong lookup of dependent template-name. | |
2468 | * parser.c (cp_parser_template_name): Revert part of last change. | |
2469 | ||
b423f98b | 2470 | 2017-06-30 Nathan Sidwell <nathan@acm.org> |
2471 | ||
2472 | * config-lang.in (gtfiles): Add cp/lex.c. | |
2473 | * cp-tree.h (mangle_convop_name_for_type): Rename ... | |
2474 | (make_conv_op_name): ... here. Move to lex. | |
2475 | * lambda.c (maybe_add_lambda_conv_op): Update. | |
2476 | * parser.c (cp_parser_conversion_function_id): Update. | |
2477 | * pt.c (tsubst_decl, tsubst_baselink, tsubst_copy, | |
2478 | tsubst_copy_and_build): Update. | |
2479 | * semantics.c (apply_deduced_return_type): Update. | |
2480 | * mangle.c (conv_type_hasher, conv_type_names, | |
2481 | mangle_conv_op_name_for_type): Move to ... | |
2482 | * lex.c (conv_type_hasher, conv_type_names, make_convop_name): | |
2483 | ... here. Rename. | |
2484 | ||
ac476716 | 2485 | 2017-06-30 David Malcolm <dmalcolm@redhat.com> |
2486 | ||
2487 | PR c++/80014 | |
2488 | * parser.c (cp_parser_postfix_expression): Construct a location | |
2489 | for typeid expressions. | |
2490 | ||
a1adbef0 | 2491 | 2017-06-30 Nathan Sidwell <nathan@acm.org> |
2492 | ||
5a6b88f6 | 2493 | * cp-tree.h (lookup_fnfields_1, class_method_index_for_fn): Don't |
2494 | declare. | |
2495 | (lookup_all_conversions): Declare. | |
2496 | * class.c (get_basefndecls): Use lookup_fnfields_slot. | |
2497 | * decl.c (register_dtor_fn): Use lookup_fnfields_slot. | |
2498 | * decl2.c (check_class_fn): Use lookup_fnfields_slot. Rework | |
2499 | diagnostics. | |
2500 | * pt.c (retrieve_specialization): Use lookup_fnfields_slot. | |
2501 | (check_explicit_specialization): Use lookup_fnfields_slot_nolazy, | |
2502 | lookup_all_conversions. | |
2503 | * search.c (lookup_fnfields_1): Make static. | |
2504 | (lookup_all_conversions): New. | |
2505 | (class_method_index_for_fn): Delete. | |
2506 | * semantics.c (classtype_has_nothrow_assign_or_copy_p): Use | |
2507 | lookup_fnfields_slot. | |
2508 | ||
1c7ba3eb | 2509 | * call.c (build_new_method_call_1): Use constructo_name to get |
2510 | ctor name. Move argument processing earlier to merge cdtor | |
2511 | handling blocks. | |
2512 | * decl.c (grokfndecl): Cdtors have special names. | |
2513 | * method.c (implicitly_declare_fn): Likewise. Simplify flag setting. | |
2514 | * pt.c (check_explicit_specialization): Cdtor name is already | |
2515 | special. | |
2516 | * search.c (class_method_index_for_fn): Likewise. | |
2517 | ||
a1adbef0 | 2518 | PR c++/81229 |
2519 | * name-lookup.c (do_pushdecl): Reset IDENTIFIER_TYPE when finding | |
2520 | a matching TYPE_DECL. | |
2521 | ||
a7c84a3c | 2522 | 2017-06-29 Paolo Carlini <paolo.carlini@oracle.com> |
2523 | ||
2524 | * class.c (add_method): Change pair of errors to error + inform. | |
2525 | (handle_using_decl): Likewise. | |
2526 | ||
cbe9130c | 2527 | 2017-06-29 Jason Merrill <jason@redhat.com> |
2528 | ||
31b343e9 | 2529 | * constexpr.c, error.c, tree.c: Remove WITH_CLEANUP_EXPR handling. |
2530 | ||
9a3e49bd | 2531 | PR c++/81180 - ICE with C++17 deduction of member class template. |
2532 | * pt.c (build_deduction_guide): Correct member template handling. | |
2533 | ||
cbe9130c | 2534 | PR c++/81188 - matching decltype of member function call. |
2535 | * tree.c (cp_tree_equal): Remove COMPONENT_REF special case. | |
2536 | ||
4fbdcec5 | 2537 | 2017-06-29 Nathan Sidwell <nathan@acm.org> |
2538 | ||
2539 | PR c++/81247 | |
2540 | * parser.c (cp_parser_namespace_definition): Immediately close the | |
2541 | namespace if there's no open-brace. | |
2542 | * name-lookup.c (do_pushdecl): Reset OLD when pushing into new | |
2543 | namespace. | |
2544 | ||
b56115ac | 2545 | 2017-06-29 Jason Merrill <jason@redhat.com> |
2546 | ||
2547 | PR c++/81164 - ICE with invalid inherited constructor. | |
2548 | * search.c (binfo_direct_p): New. | |
2549 | * name-lookup.c (do_class_using_decl): Use it. | |
2550 | ||
67d5f2c7 | 2551 | 2017-06-29 Nathan Sidwell <nathan@acm.org> |
2552 | ||
842e108c | 2553 | * cp-tree.h (THIS_NAME, IN_CHARGE_NAME, VTBL_PTR_TYPE, |
2554 | VTABLE_DELTA_NAME, VTABLE_PFN_NAME): Delete. | |
2555 | * decl.c (initialize_predefined_identifiers): Name cdtor special | |
2556 | names consistently. Use literals for above deleted defines. | |
2557 | (cxx_init_decl_processing): Use literal for vtbl_ptr_type name, | |
2558 | ||
6f2dbf5d | 2559 | * lex.c (maybe_add_lang_type_raw): Exit early, rather than use a |
2560 | flag. | |
2561 | ||
6c26e5e5 | 2562 | * call.c (check_dtor_name): Use constructor_name for enums too. |
2563 | (build_new_method_call_1): Use constructor_name for cdtors and | |
2564 | show ~ for dtor. | |
2565 | * class.c (build_self_reference): Use TYPE_NAME to get name of | |
2566 | self reference. | |
2567 | * name-lookup (constructor_name): Use DECL_NAME directly. | |
2568 | (constructor_name_p): Reimplement. | |
2569 | (push_class_level_binding_1): Use TYPE_NAME directly. | |
2570 | ||
85de0156 | 2571 | * class.c (finish_struct): Use OVL_P. |
2572 | (get_vfield_name): Measure constructor_name length. | |
2573 | * cp-tree.h (SET_CLASS_TYPE_P): Add RECORD_OR_UNION_CHECK. | |
2574 | (NON_UNION_CLASS_TYPE_P): Check RECORD_TYPE up front. | |
2575 | * cxx-pretty-print.c (is_destructor_name): Delete. | |
2576 | (pp_cxx_unqualified_id): Remove bogus destructor name checking. | |
2577 | * decl.c (grokfndecl): Move cheap checks first when looking for | |
2578 | implicit extern cness. | |
2579 | ||
7cbc1a01 | 2580 | * parser.c (cp_parser_direct_declarator): Reorder if to avoid |
2581 | indentation. Remove unnecessary assignment of constructor name. | |
2582 | ||
67d5f2c7 | 2583 | Whitespace cleanups. |
2584 | * call.c (name_as_c_string): Move CONST_CAST to return. | |
2585 | (build_new_method_call_1): Remove unneeded bracing. | |
2586 | * class.c (include_empty_classes): Unbreak line. | |
2587 | * constraint.cc (tsubst_check_constraint): Add space. | |
2588 | * cp-tree.h (lang_decl_ns): Add comment. | |
2589 | (PTRMEM_CST_MEMBER): Break line. | |
2590 | * decl.c (grokfndecl): Add blank lines. Unbreak some others. | |
2591 | (grokdeclarator): Remove lines, move declaration to first use. | |
2592 | * decl2.c (decl_needed_p): Fix indentation. | |
2593 | (c_parse_final_cleanups): Remove blank line. | |
2594 | * method.c (implicitly_declare_fn): Move declaration to first use. | |
2595 | * search.c (current_scope): Add blank lines. | |
2596 | ||
cdafef2b | 2597 | 2017-06-28 Jason Merrill <jason@redhat.com> |
2598 | ||
1fa67b63 | 2599 | PR c++/72764 - ICE with invalid template typename. |
2600 | * decl.c (build_typename_type): No longer static. | |
2601 | * tree.c (strip_typedefs): Use it instead of make_typename_type. | |
2602 | ||
da4289a4 | 2603 | PR c++/69300 - ICE with self-referential noexcept |
2604 | * pt.c (maybe_instantiate_noexcept): Check for recursion. | |
2605 | ||
51629b85 | 2606 | PR c++/61022 - error with variadic template template parm |
2607 | * pt.c (convert_template_argument): Keep the TYPE_PACK_EXPANSION. | |
2608 | ||
34e40032 | 2609 | PR c++/72801 - ICE with variadic partial specialization |
2610 | * pt.c (unify_pack_expansion): Use PACK_EXPANSION_EXTRA_ARGS. | |
2611 | ||
faa0428f | 2612 | PR c++/55639 - partial specialization with ::template |
2613 | * parser.c (cp_parser_class_head): Handle ::template. | |
2614 | ||
cdb7b30c | 2615 | PR c++/45976 - error with ::template in declarator. |
2616 | * pt.c (resolve_typename_type): Fix TEMPLATE_ID_EXPR handling. | |
2617 | ||
b4865a3e | 2618 | PR c++/54769 - wrong lookup of dependent template-name. |
2619 | * parser.c (cp_parser_template_name): Handle dependent object type. | |
2620 | (cp_parser_nested_name_specifier_opt): Make template_keyword_p a | |
2621 | parameter. | |
2622 | (cp_parser_id_expression): Pass it. | |
2623 | (cp_parser_diagnose_invalid_type_name): Handle TEMPLATE_ID_EXPR. | |
2624 | ||
b5405c91 | 2625 | * parser.c (cp_parser_template_id): Use the range location on the |
2626 | TEMPLATE_ID_EXPR. | |
2627 | ||
cdafef2b | 2628 | PR c++/81204 - parse error with dependent template-name |
2629 | * parser.c (cp_parser_lookup_name): Disqualify function templates | |
2630 | after lookup. | |
2631 | ||
3461db54 | 2632 | 2017-06-27 Nathan Sidwell <nathan@acm.org> |
2633 | ||
ed575723 | 2634 | * pt.c (tsubst_decl <FUNCTION_DECL>): Move var decls to |
2635 | initialization point. Don't unnecessarily check for ctor name. | |
2636 | ||
6cbc5102 | 2637 | * cp-tree.h (CLASSTYPE_DESTRUCTORS): Rename to ... |
2638 | (CLASSTYPE_DESTRUCTOR): ... this. | |
2639 | * class.c (accessible_nvdtor_p, | |
2640 | maybe_warn_about_overly_private_class, | |
2641 | add_implicitly_declared_members, | |
2642 | clone_constructors_and_destructors, type_has_virtual_destructor): | |
2643 | Adjust for CLASSTYPE_DESTRUCTOR. | |
2644 | (deduce_noexcept_on_destructors): Absorb into ... | |
2645 | (check_bases_and_members): ... here. | |
2646 | * except.c (dtor_nothrow): Adjust for CLASSTYPE_DESTRUCTOR. | |
2647 | * init.c (build_delete): Likewise. | |
2648 | * parser.c (cp_parser_lookup_name): Likewise. | |
2649 | * pt.c (check_explicit_specialization): Likewise. | |
2650 | * rtti.c (emit_support_tinfos): Likewise. | |
2651 | * search.c (lookup_fnfields_idx_nolazy): Likewise. | |
2652 | ||
3461db54 | 2653 | Kill IDENTIFIER_TEMPLATE. |
2654 | * cp-tree.h (lang_identifier): Remove class_template_info field. | |
2655 | (IDENTIFIER_TEMPLATE): Delete. | |
2656 | * name-lookup.c (constructor_name_full): Subsume into ... | |
2657 | (constructor_name): ... here. Don't check IDENTIFIER_TEMPLATE. | |
2658 | (constructor_name_p): Likewise. | |
2659 | * mangle.c (write_source_name): Likewise. | |
2660 | * ptree.c (cxx_print_identifier): Likewise. | |
2661 | ||
d87af292 | 2662 | 2017-06-27 Marek Polacek <polacek@redhat.com> |
2663 | ||
2664 | PR bootstrap/81216 | |
2665 | * parser.c (cp_parser_already_scoped_statement): Initialize | |
2666 | LOC_AFTER_LABELS. | |
2667 | ||
f4048734 | 2668 | 2017-06-26 Jason Merrill <jason@redhat.com> |
2669 | ||
2670 | PR c++/81215 - deduction failure with variadic TTP. | |
2671 | * pt.c (unify_bound_ttp_args): Restore old logic for C++14 and down. | |
2672 | ||
c7042331 | 2673 | 2017-06-26 Martin Sebor <msebor@redhat.com> |
2674 | ||
2675 | PR c++/81169 | |
2676 | * call.c (maybe_warn_class_memaccess): Preserve explicit conversions | |
2677 | to detect casting away cv-qualifiers. | |
2678 | ||
9fb36780 | 2679 | 2017-06-26 Nathan Sidwell <nathan@acm.org> |
2680 | ||
2681 | * cp-tree.h (lang_decl_fn): Remove assignment_operator_p field. | |
2682 | (DECL_COMPLETE_CONSTRUCTOR_P): Directly compare | |
2683 | identifier. | |
2684 | (DECL_BASE_CONSTRUCTOR_P, DECL_COMPLETE_DESTRUCTOR_P, | |
2685 | DECL_BASE_DESTRUCTOR_P, DECL_DELETING_DESTRUCTOR_P): Likewise. | |
2686 | (DECL_ASSIGNMENT_OPERATOR_P): Use IDENTIFIER_ASSIGN_OP_P. | |
2687 | * decl.c (grok_op_properties): Adjust identifier checking. | |
2688 | * init.c (expand_default_init): Adjust identifier descision. | |
2689 | * method.c (implicitly_declare_fn): Don't use | |
2690 | DECL_ASSIGNMENT_OPERATOR_P. | |
2691 | * search.c (lookup_fnfields_1): Use IDENTIFIER_CTOR_P, | |
2692 | IDENTIFIER_DTOR_P. | |
2693 | * call.c (in_charge_arg_for_name): Reimplement. | |
2694 | (build_special_member_call): Use IDENTIFIER_CDTOR_P, | |
2695 | IDENTIFIER_DTOR_P. | |
2696 | ||
2bfb0686 | 2697 | 2017-06-26 Marek Polacek <polacek@redhat.com> |
2698 | ||
2699 | PR c/80116 | |
2700 | * parser.c (cp_parser_statement): Add a default argument. Save the | |
2701 | location of the expression-statement after labels have been parsed. | |
2702 | (cp_parser_implicitly_scoped_statement): Set the location of the | |
2703 | body of the conditional after parsing all the labels. Call | |
2704 | warn_for_multistatement_macros. | |
2705 | (cp_parser_already_scoped_statement): Likewise. | |
2706 | ||
56e5cf36 | 2707 | 2017-06-24 Paolo Carlini <paolo.carlini@oracle.com> |
2708 | ||
2709 | PR c++/62315 | |
2710 | * parser.c (cp_parser_diagnose_invalid_type_name): Don't print | |
2711 | 'typename' in error messages about missing 'typename'. | |
2712 | ||
7377eb47 | 2713 | 2017-06-23 Jason Merrill <jason@redhat.com> |
2714 | ||
2715 | PR c++/79056 - C++17 ICE with invalid template syntax. | |
2716 | * parser.c (cp_parser_simple_type_specifier): Don't assume that type | |
2717 | is a TYPE_DECL. | |
2718 | (cp_parser_check_for_invalid_template_id): Handle TYPE_DECL. | |
2719 | * pt.c (template_placeholder_p): New. | |
2720 | * cp-tree.h: Declare it. | |
2721 | ||
4e551c7d | 2722 | 2017-06-23 Marc Glisse <marc.glisse@inria.fr> |
2723 | ||
2724 | * decl.c (duplicate_decls): Use builtin_structptr_types. | |
2725 | ||
991449b2 | 2726 | 2017-06-22 Nathan Sidwell <nathan@acm.org> |
2727 | ||
2728 | Reorder IDENTIFIER flags | |
2729 | gcc/cp/ | |
2730 | * cp-tree.h (enum cp_identifier_kind): New. | |
2731 | (IDENTIFIER_KIND_BIT_0, IDENTIFIER_KIND_BIT_1, | |
2732 | IDENTIFIER_KIND_BIT_2): New. | |
2733 | (IDENTIFIER_MARKED): Move to TREE_LANG_FLAG_4. | |
2734 | (IDENTIFIER_VIRTUAL_P, IDENTIFIER_REPO_CHOSEN): Add IDENTIFIER_CHECK. | |
2735 | (C_IS_RESERVED_WORD): Replace with ... | |
2736 | (IDENTIFIER_KEYWORD_P): ... this. | |
2737 | (IDENTIFIER_CTOR_OR_DTOR_P): Replace with ... | |
2738 | (IDENTIFIER_CDTOR_P): ... this. | |
2739 | (IDENTIFIER_CTOR_P, IDENTIFIER_DTOR_P): New. | |
2740 | (IDENTIFIER_OPNAME_P): Replace with ... | |
2741 | (IDENTIFIER_ANY_OP_P): ... this. | |
2742 | (IDENTIFIER_ASSIGN_OP_P): New. | |
2743 | (IDENTIFIER_TYPENAME_P): Replace with ... | |
2744 | (IDENTIFIER_CONV_OP_P): ... this. | |
2745 | (NEW_DELETE_OPNAME_P): Replace with ... | |
2746 | (IDENTIFIER_NEWDEL_OP_P): ... this. | |
2747 | (DECL_CONV_FN_P, DECL_OVERLOADED_OPERATOR_P): Adjust. | |
2748 | (get_identifier_kind_name, set_identifier_kind): Declare. | |
2749 | * lex.c (get_identifier_kind_name, set_identifier_kind): New. | |
2750 | (init_operators): Adjust to avoid keywords, use | |
2751 | set_identifier_kind. Copy TYPE_EXPR slot. | |
2752 | (init_reswords): Call set_identifier_kind. | |
2753 | (unqualified_name_lookup_error): Adjust. | |
2754 | * operators.def (TYPE_EXPR): Remove. | |
2755 | * decl.c (struct predefined_identifier): Move into ... | |
2756 | (initialize_predefined_identifiers): ... here. Call | |
2757 | set_identifier_kind. | |
2758 | (grokfndecl, check_var_type, grokdeclarator): Adjust. | |
2759 | (grok_op_properties): Use IDENTIFIER_ANY_ASSIGN_OP to halve search | |
2760 | space. Adjust. | |
2761 | * call.c (name_as_c_string): Adjust. | |
2762 | (build_new_method_call_1): Likewise. | |
2763 | * cp-cilkplus.c (is_conversion_operator_function_decl_p): Likewise. | |
2764 | * cxx-pretty-print.c (pp_cxx_unqualified_id): Adjust. | |
2765 | * dump.c (cp_dump_tree): Adjust. | |
2766 | * error.c (dump_decl_name): Adjust. | |
2767 | * mangle.c (write_unqualified_id, write_member_name, | |
2768 | write_expression): Adjust. | |
2769 | (mangle_conv_op_name_for_type): Use set_identifier_kind. | |
2770 | * name-lookup.c (do_class_using_decl): Adjust. | |
2771 | (lookup_name_fuzzy, lookup_name_real_1): Likewise. | |
2772 | * parser.c (cp_lexer_get_preprocessor_token, | |
2773 | cp_parser_direct_declarator): Likewise. | |
2774 | * pt.c (push_template_decl_real, tsubst_decl, tsubst_baselink, | |
2775 | tsubst_copy, tsubst_copy_and_build): Adjust. | |
2776 | * ptree.c (cxx_print_identifier): Print identifier kind. | |
2777 | * search.c (lookup_field_r, lookup_member, | |
2778 | lookup_fnfields_idx_nolazy): Adjust. | |
2779 | * semantics.c (finish_id_expression): Adjust.. | |
2780 | * typeck.c (cp_build_addr_expr_1): Adjust. | |
2781 | ||
f4678453 | 2782 | 2017-06-21 Jakub Jelinek <jakub@redhat.com> |
2783 | ||
2784 | PR c++/81154 | |
2785 | * semantics.c (handle_omp_array_sections_1, finish_omp_clauses): | |
2786 | Complain about t not being a variable if t is OVERLOAD even | |
2787 | when processing_template_decl. | |
2788 | ||
681aa995 | 2789 | 2017-06-21 David Malcolm <dmalcolm@redhat.com> |
2790 | ||
2791 | * parser.c (get_cast_suggestion): New function. | |
2792 | (maybe_add_cast_fixit): New function. | |
2793 | (cp_parser_cast_expression): Capture the location of the closing | |
2794 | parenthesis. Call maybe_add_cast_fixit when emitting warnings | |
2795 | about old-style casts. | |
2796 | ||
e67b8ee3 | 2797 | 2017-06-20 Jason Merrill <jason@redhat.com> |
2798 | ||
2799 | PR c++/80972 - C++17 ICE with attribute packed. | |
2800 | * call.c (build_over_call): Allow a TARGET_EXPR from reference | |
2801 | binding. | |
2802 | ||
acf2785b | 2803 | 2017-06-20 Nathan Sidwell <nathan@acm.org> |
2804 | ||
63508d36 | 2805 | * cp-tree.h (CPTI_NELTS_IDENTIFIER): Delete. |
2806 | (nelts_identifier): Delete. | |
2807 | * decl.c (initialize_predefined_identifiers): Remove nelts. | |
2808 | ||
acf2785b | 2809 | PR c++/67074 - namespace aliases |
2810 | * decl.c (duplicate_decls): Don't error here on mismatched | |
2811 | namespace alias. | |
2812 | * name-lookup.c (name_lookup::add_value): Matching namespaces are | |
2813 | not ambiguous. | |
2814 | (diagnose_name_conflict): Namespaces are never redeclarations. | |
2815 | (update_binding): An alias can match a real namespace. | |
2816 | ||
79cdb4f5 | 2817 | 2017-06-19 Jason Merrill <jason@redhat.com> |
2818 | ||
77253cd0 | 2819 | PR c++/80562 - ICE with constexpr if. |
2820 | * semantics.c (finish_if_stmt_cond): Call | |
2821 | instantiate_non_dependent_expr. | |
2822 | ||
79cdb4f5 | 2823 | PR c++/80829 - ICE with constexpr copy of base subobject. |
2824 | * constexpr.c (clear_no_implicit_zero): New. | |
2825 | (cxx_eval_call_expression): Call it. | |
2826 | ||
7edb2551 | 2827 | 2017-06-19 Nathan Sidwell <nathan@acm.org> |
2828 | ||
2829 | PR c++/81124 | |
2830 | PR c++/79766 | |
2831 | * name-lookup.c (set_decl_namespace): Don't follow using | |
2832 | directives and ignore using decls. Only check overly-explicit | |
2833 | scope after discovering decl. | |
2834 | ||
8d6486e1 | 2835 | 2017-06-19 Jason Merrill <jason@redhat.com> |
2836 | ||
2837 | PR c++/81073 - constexpr and static var in statement-expression. | |
2838 | * typeck2.c (store_init_value): Always call | |
2839 | require_potential_constant_expression. | |
2840 | * pt.c (convert_nontype_argument): Likewise. | |
2841 | * constexpr.c (potential_constant_expression_1): Adjust message. | |
2842 | Use decl_maybe_constant_var_p instead of decl_constant_var_p. | |
2843 | * decl2.c (decl_maybe_constant_var_p): Consider initializer. | |
2844 | ||
9a612744 | 2845 | 2017-06-19 Nathan Sidwell <nathan@acm.org> |
2846 | ||
1198270c | 2847 | * pt.c (coerce_template_parms): Fix indentation. |
2848 | (tsubst_decl): Remove repeated SET_DECL_RTL. Move VAR_P handling | |
2849 | in to single block. | |
2850 | ||
9a612744 | 2851 | PR c++/81119 |
2852 | * name-lookup.c (update_binding): Only warn about constructors | |
2853 | hidden by functions. | |
2854 | ||
fcf98edc | 2855 | 2017-06-17 Jason Merrill <jason@redhat.com> |
2856 | ||
bbff63af | 2857 | PR c++/60063 - -Wunused-local-typedefs and templates. |
2858 | * decl2.c (is_late_template_attribute): Return false for "used". | |
2859 | ||
fcf98edc | 2860 | PR c++/70844 - -Wuseless-cast and inheriting constructor. |
2861 | * method.c (forward_parm): Suppress warn_useless_cast. | |
2862 | ||
9e37fbc2 | 2863 | 2017-06-16 Jason Merrill <jason@redhat.com> |
2864 | ||
058e778f | 2865 | PR c++/81045 - Wrong type-dependence with auto return type. |
2866 | * pt.c (type_dependent_expression_p): An undeduced auto outside the | |
2867 | template isn't dependent. | |
2868 | * call.c (build_over_call): Instantiate undeduced auto even in a | |
2869 | template. | |
2870 | ||
23f59d67 | 2871 | PR c++/80465 - ICE with generic lambda with noexcept-specifier. |
2872 | * lambda.c (maybe_add_lambda_conv_op): Keep processing_template_decl | |
2873 | set longer for a generic lambda. | |
2874 | ||
c2ca6e19 | 2875 | PR c++/80614 - Wrong mangling for C++17 noexcept type |
2876 | * mangle.c (write_type): Put the eh spec back on the function type. | |
2877 | ||
77aee073 | 2878 | PR c++/81102 - Wrong error with partial specialization. |
2879 | * pt.c (unify) [TEMPLATE_PARM_INDEX]: Strip reference when comparing | |
2880 | types. Do type deduction later. | |
2881 | ||
d99a23f0 | 2882 | PR c++/81074 - ICE with partial specialization of member template. |
689770fa | 2883 | PR c++/71747 |
2884 | * pt.c (get_partial_spec_bindings): Only coerce innermost args. | |
2885 | ||
bb9012bf | 2886 | PR c++/80831 - ICE with -fsyntax-only. |
2887 | * decl2.c (c_parse_final_cleanups): Use cgraph_node::get_create. | |
2888 | ||
9e37fbc2 | 2889 | PR c++/80639 - ICE with invalid PMF initialization. |
2890 | PR c++/80043 - ICE with -fpermissive | |
2891 | * typeck.c (convert_for_assignment): Recurse when instantiate_type | |
2892 | returns without an error. | |
2893 | ||
8c13b782 | 2894 | 2017-06-16 Nathan Sidwell <nathan@acm.org> |
2895 | ||
3fff8ec1 | 2896 | * pt.c (tsubst_baselink): Fix & clarify formatting. |
2897 | ||
aa3ab9ba | 2898 | * cp-tree.h (build_this_parm, cp_build_parm_decl, |
2899 | build_artificial_parm): Add FN parm. | |
2900 | * decl.c (start_cleanup_fn): Adjust. | |
2901 | (build_this_parm): Add FN parm, pass it through. | |
2902 | (grokfndecl): Adjust parm building. | |
2903 | * decl2.c (cp_build_parm_decl): Add FN parm, set context. | |
2904 | (build_artificial_parm): Add FN parm, pass through. | |
2905 | (maybe_retrofit_in_chrg): Adjust parm building. | |
2906 | (start_static_storage_duration_function): Likwise. | |
2907 | * lambda.c (maybe_aadd_lambda_conv_op): Likewise. | |
2908 | * method.c (implicitly_declare_fn): Likewise. | |
2909 | * parser.c (inject_this_parameter): Likewise. | |
2910 | ||
777563b9 | 2911 | Symbol tables are insert only. |
2912 | * cp-tree.h (default_hash_traits <lang_identifier *>): Don't | |
2913 | derive from pointer_hash. Make undeletable. | |
2914 | ||
26b422d5 | 2915 | * class.c (resort_type_method_vec): Avoid potential unsigned |
2916 | overflow. | |
2917 | ||
af96e5ab | 2918 | Don't defer noexcept_deferred_spec. |
2919 | * cp-tree.h (unevaluated_noexcept_spec): Don't declare. | |
2920 | * decl.c (cxx_init_decl_processing): Initialize | |
2921 | noexcept_deferred_spec. | |
2922 | * except.c (unevaluated_noexcept_spec): Delete. | |
2923 | * class.c (deduce_noexcept_on_destructor): Use | |
2924 | noexcept_deferred_spec directly. | |
2925 | * method.c (implicitly_declare_fn): Likewise. | |
2926 | ||
2927 | Make keyed_classes a vector. | |
2928 | * cp-tree.h (CPTI_KEYED_CLASSES, keyed_classes): Delete. | |
2929 | (keyed_classes): Declare as vector. | |
2930 | * decl.c (keyed_classes): Define. | |
2931 | (cxx_init_decl_processing): Allocate it. | |
2932 | (record_key_method_defined): Use vec_safe_push. | |
2933 | * class.c (finish_struct_1): Likewise. | |
2934 | * pt.c (instantiate_class_template_1): Likewise. | |
2935 | * decl2.c (c_parse_final_cleanups): Reverse iterate keyed_classes. | |
2936 | ||
8c13b782 | 2937 | Make rtti lazier |
2938 | * rtti.c (enum tinfo_kind): Add TK_DERIVED_TYPES, | |
2939 | TK_VMI_CLASS_TYPES, TK_MAX. Delete TK_FIXED. | |
2940 | (tinfo_names): New. | |
2941 | (typeid_ok_p): Add quotes to error messages. Use get_tinfo_desc. | |
2942 | (get_tinfo_decl): Use get_tinfo_desc. | |
2943 | (get_pseudo_ti_init): Likewise. Adjust VMI construction. | |
2944 | (create_pseudo_type_info): Delete. | |
2945 | (get_pseudo_ti_index): Just determine the index. | |
2946 | (get_tinfo_desc): New. Create all types lazily. | |
2947 | (create_tinfo_types): Just allocate the descriptor array. | |
2948 | (emit_support_tinfos): Use non-inserting type lookup. Set builtin | |
2949 | location. | |
2950 | ||
a324786b | 2951 | 2017-06-15 Martin Sebor <msebor@redhat.com> |
2952 | ||
2953 | PR c++/80560 | |
2954 | * call.c (first_non_public_field, maybe_warn_class_memaccess): New | |
2955 | functions. | |
2956 | (has_trivial_copy_assign_p, has_trivial_copy_p): Ditto. | |
2957 | (build_cxx_call): Call maybe_warn_class_memaccess. | |
2958 | ||
cc9e1a64 | 2959 | 2017-06-14 Jakub Jelinek <jakub@redhat.com> |
2960 | ||
2961 | * cp-gimplify.c (cp_genericize_r): Turn most of the function | |
2962 | into a switch (TREE_CODE (stmt)) statement from long else if | |
2963 | sequence. | |
2964 | ||
1f10c59c | 2965 | 2017-06-13 Jakub Jelinek <jakub@redhat.com> |
2966 | ||
9564446e | 2967 | PR c++/80973 |
2968 | * cp-gimplify.c (cp_genericize_r): Don't instrument MEM_REF second | |
2969 | argument even if it has REFERENCE_TYPE. | |
2970 | ||
1f10c59c | 2971 | PR c++/80984 |
2972 | * cp-gimplify.c (cp_genericize): Only look for VAR_DECLs in | |
2973 | BLOCK_VARS (outer) chain. | |
2974 | (cxx_omp_const_qual_no_mutable): Likewise. | |
2975 | ||
9917317a | 2976 | 2017-06-13 Martin Liska <mliska@suse.cz> |
2977 | ||
2978 | PR sanitize/78204 | |
2979 | * class.c (build_base_path): Use sanitize_flags_p. | |
2980 | * cp-gimplify.c (cp_genericize_r): Likewise. | |
2981 | (cp_genericize_tree): Likewise. | |
2982 | (cp_genericize): Likewise. | |
2983 | * cp-ubsan.c (cp_ubsan_instrument_vptr_p): Likewise. | |
2984 | * decl.c (compute_array_index_type): Likewise. | |
2985 | (start_preparsed_function): Likewise. | |
2986 | * decl2.c (one_static_initialization_or_destruction): Likewise. | |
2987 | * init.c (finish_length_check): Likewise. | |
2988 | * lambda.c (maybe_add_lambda_conv_op): Likewise. | |
2989 | * typeck.c (cp_build_binary_op): Likewise. | |
2990 | (build_static_cast_1): Likewise. | |
2991 | ||
e34c848a | 2992 | 2017-06-11 Jason Merrill <jason@redhat.com> |
2993 | ||
e3384c9f | 2994 | * error.c (dump_expr): Use is_this_parameter. |
2995 | ||
e34c848a | 2996 | * cp-tree.h, decl2.c, mangle.c, parser.c, pt.c, semantics.c: Use |
2997 | id_equal. | |
2998 | ||
997bbf70 | 2999 | 2017-06-09 Jason Merrill <jason@redhat.com> |
3000 | ||
2104a0fd | 3001 | Missing bits from N4268, constant evaluation for all non-type args. |
3002 | * call.c (build_converted_constant_expr): Rename from | |
3003 | build_integral_nontype_arg_conv, handle all types. | |
3004 | * pt.c (convert_nontype_argument): In C++17 call it for all types. | |
3005 | Move NOP stripping inside pointer case, don't strip ADDR_EXPR. | |
3006 | * cvt.c (strip_fnptr_conv): Also strip conversions to the same type. | |
3007 | ||
0a8a2108 | 3008 | Overhaul pointer-to-member conversion and template argument handling. |
3009 | * call.c (standard_conversion): Avoid creating ck_pmem when the | |
3010 | class type is the same. | |
3011 | * cvt.c (can_convert_qual): Split from | |
3012 | perform_qualification_conversions. | |
3013 | * constexpr.c (cxx_eval_constant_expression): Check it. | |
3014 | * typeck.c (convert_ptrmem): Only cplus_expand_constant if | |
3015 | adjustment is necessary. | |
3016 | * pt.c (check_valid_ptrmem_cst_expr): Compare class types. | |
3017 | (convert_nontype_argument): Avoid redundant error. | |
3018 | ||
d93ee6f8 | 3019 | * call.c (convert_like_real): Remove "inner" parameter. |
3020 | Don't replace a constant with its value. | |
3021 | * cp-gimplify.c (cp_fully_fold): Use cp_fold_rvalue. | |
3022 | ||
d1b716e4 | 3023 | * pt.c (convert_nontype_argument): Check NULLPTR_TYPE_P rather than |
3024 | nullptr_node. | |
3025 | ||
b8d82afa | 3026 | * parser.c (cp_parser_constant_expression): Check |
3027 | potential_rvalue_constant_expression after decay_conversion. | |
3028 | * pt.c (convert_nontype_argument): Don't require linkage in C++17. | |
3029 | ||
0a1f7fdb | 3030 | PR c++/80384 - ICE with dependent noexcept-specifier |
3031 | * pt.c (dependent_type_p_r) [FUNCTION_TYPE]: Check for dependent | |
3032 | noexcept-specifier. | |
3033 | ||
997bbf70 | 3034 | * constexpr.c (potential_constant_expression_1): Allow 'this' capture. |
3035 | ||
642860fc | 3036 | 2017-06-09 Jan Hubicka <hubicka@ucw.cz> |
3037 | ||
3038 | * class.c (build_vtbl_initializer): Mark dvirt_fn as cold. | |
3039 | * decl.c (cxx_init_decl_processing, push_throw_library_fn): Likewise. | |
3040 | (excpet.c): Mark terminate as cold. | |
3041 | ||
1c3f8c56 | 3042 | 2017-06-08 Jakub Jelinek <jakub@redhat.com> |
3043 | ||
37ce62dc | 3044 | PR c/81006 |
3045 | * semantics.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE | |
3046 | to sizetype before size_binop. | |
3047 | ||
1c3f8c56 | 3048 | PR c++/81011 |
3049 | * cp-gimplify.c (cxx_omp_finish_clause): When changing clause | |
3050 | to OMP_CLAUSE_SHARED, also clear OMP_CLAUSE_SHARED_FIRSTPRIVATE | |
3051 | and OMP_CLAUSE_SHARED_READONLY flags. | |
3052 | ||
57d50ab1 | 3053 | 2017-06-08 Jan Hubicka <hubicka@ucw.cz> |
3054 | ||
3055 | * cp-tree.h (lang_check_failed): Annotate by ATTRIBUTE_COLD. | |
3056 | ||
e8c653c6 | 3057 | 2017-06-07 Nathan Sidwell <nathan@acm.org> |
3058 | ||
3059 | * class.c (layout_class_type): Restructure overlong-bitfield tpe | |
3060 | search. | |
3061 | ||
907b83ae | 3062 | 2017-06-07 Jonathan Wakely <jwakely@redhat.com> |
3063 | ||
3064 | PR c++/80990 | |
3065 | * pt.c (do_class_deduction): Build qualified type. | |
3066 | ||
56e1183f | 3067 | 2017-06-06 Nathan Sidwell <nathan@acm.org> |
3068 | ||
5ab16b09 | 3069 | * name-lookup.c (suggest_alternatives_for): Use qualified lookup |
3070 | sans using directives. Don't walk into inline namespaces. | |
3071 | ||
56e1183f | 3072 | PR c++/80979 |
3073 | * name-lookup.c (adl_class_only): Don't add visible friends. | |
3074 | ||
009cb465 | 3075 | 2017-06-05 Volker Reichelt <v.reichelt@netcologne.de> |
3076 | ||
3077 | * parser.c (cp_parser_base_specifier): Fix typos in error messages. | |
3078 | ||
f7564df4 | 3079 | 2017-06-02 Nathan Sidwell <nathan@acm.org> |
3080 | ||
5f5862ae | 3081 | Remove lang_type_ptrmem. |
3082 | * cp-tree.h (lang_type_header): Remove is_lang_type_class. Move | |
3083 | into ... | |
3084 | (lang_type_class): ... this. Reorder bitfields. Rename to ... | |
3085 | (lang_type): ... this. Delete old definition. | |
3086 | (lang_type_ptrmem): Delete. | |
3087 | (LANG_TYPE_CLASS_CHECK): Simply get TYPE_LANG_SPECIFIC. Adjust uses. | |
3088 | (LANG_TYPE_PTRMEM_CHECK): Delete. | |
3089 | (TYPE_GET_PTRMEMFUNC_TYPE, TYPE_SET_PTRMEMFUNC_TYPE): Delete. | |
3090 | (TYPE_PTRMEMFUNC_TYPE): New. Use TYPE_LANG_SLOT_1. | |
3091 | * decl.c (build_ptrmemfunc_type): Adjust. | |
3092 | * lex.c (copy_lang_type): Remove lang_type_ptrmem handling. | |
3093 | (maybe_add_lang_type_raw): Don't set u.c.h.is_lang_type_class. | |
3094 | ||
3095 | * class.c (check_bases_and_members): Adjust vec_new_uses_cookie | |
3096 | setting. | |
3097 | ||
3098 | Remove cp_binding_level::namespaces | |
f7564df4 | 3099 | * name-lookup.h (cp_binding_level): Lose namespaces field. |
3100 | * name-lookup.c (add_decl_to_level): Chain namespaces on the names | |
3101 | list. | |
3102 | (suggest_alternatives_for): Adjust for namespace list. Do | |
3103 | breadth-first search. | |
3104 | * decl2.c (collect_source_refs): Namespaces are on the regulr | |
3105 | list. | |
3106 | (collect_ada_namespace): Likewise. | |
3107 | ||
0ca70bfd | 3108 | 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de> |
3109 | ||
3110 | * typeck.c (cp_build_binary_op): Implement the -Wsizeof_pointer_div | |
3111 | warning. | |
3112 | ||
348a4dd2 | 3113 | 2017-06-01 Ville Voutilainen <ville.voutilainen@gmail.com> |
3114 | ||
3115 | PR c++/80812 | |
3116 | * method.c (constructible_expr): Strip array types before calling | |
3117 | build_value_init. | |
3118 | ||
409bb09c | 3119 | 2017-06-01 Paolo Carlini <paolo.carlini@oracle.com> |
3120 | ||
3121 | PR c++/80896 | |
3122 | * cvt.c (convert_to_void): Possibly call maybe_warn_nodiscard | |
3123 | for case INDIRECT_REF too in the main switch. | |
3124 | ||
ad99200f | 3125 | 2017-05-31 Jason Merrill <jason@redhat.com> |
3126 | ||
3127 | PR c++/80840 - ICE with constexpr and reference | |
3128 | * pt.c (convert_nontype_argument): Don't test whether a decl is | |
3129 | value-dependent when binding to a reference. | |
3130 | ||
be2b7add | 3131 | 2017-05-31 Nathan Sidwell <nathan@acm.org> |
3132 | ||
3133 | * cp-tree.h (lang_decl_slector): New enum. | |
3134 | (lang_decl_base): Make selector an enum. Drop decomposition_p | |
3135 | field. | |
3136 | (lang_decl): Use enum for discrimination. | |
3137 | (LANG_DECL_FN_CHECK, LANG_DECL_NS_CHECK, LANG_DECL_PARM_CHECK, | |
3138 | LANG_DECL_DEOMP_CHECK): Use enum. | |
3139 | (DECL_DECOMPOSITION_P): Use selector value. | |
3140 | (SET_DECL_DECOMPOSITION_P): Delete. | |
3141 | (retrofit_lang_decl): Lose SEL parm. | |
3142 | (fit_decomposition_lang_decl): Declare. | |
3143 | * decl.c (cp_finish_decomp, grokdeclarator): Use | |
3144 | fit_decomposition_lang_decl. | |
3145 | * lex.c (maybe_add_lang_decl_raw): New. Broken out of | |
3146 | retrofit_lang_decl. | |
3147 | (set_decl_linkage): New. Broken out of retrofit_lang_decl. Use enum. | |
3148 | (fit_decomposition_lang_decl): Likewise. | |
3149 | (retrofit_lang_decl): Use worker functions. | |
3150 | (cxx_dup_lang_specific_decl): Use selector enum. | |
3151 | (maybe_add_lang_type_raw): New. Broken out of ... | |
3152 | (cxx_make_type_name): ... here. Call it. | |
3153 | ||
c11227a5 | 3154 | 2017-05-30 Jason Merrill <jason@redhat.com> |
3155 | ||
3156 | PR c++/80856 - ICE with local extern in template | |
3157 | * semantics.c (finish_call_expr): Replace a local extern overload | |
3158 | set in a template with the IDENTIFIER_NODE. | |
3159 | ||
4d1eda3a | 3160 | 2017-05-30 David Malcolm <dmalcolm@redhat.com> |
3161 | ||
3162 | * call.c (perform_implicit_conversion_flags): Convert | |
3163 | "from %qT to %qT" to "from %qH to %qI" in diagnostic. | |
3164 | (print_conversion_rejection): Replace pairs of %qT with | |
3165 | %qH and %qI in various places. | |
3166 | (build_user_type_conversion_1): Likewise. | |
3167 | (build_integral_nontype_arg_conv): Likewise. | |
3168 | (build_conditional_expr_1): Likewise. | |
3169 | (convert_like_real): Likewise. | |
3170 | (convert_arg_to_ellipsis): Likewise. | |
3171 | (joust): Likewise. | |
3172 | (initialize_reference): Likewise. | |
3173 | * cvt.c (cp_convert_to_pointer): Likewise. | |
3174 | (cp_convert_to_pointer): Likewise. | |
3175 | (convert_to_reference): Likewise. | |
3176 | (ocp_convert): Likewise. | |
3177 | * error.c (cp_printer): Gain bool and const char ** parameters. | |
3178 | (struct deferred_printed_type): New struct. | |
3179 | (class cxx_format_postprocessor): New class. | |
3180 | (cxx_initialize_diagnostics): Wire up a cxx_format_postprocessor | |
3181 | to pp->m_format_postprocessor. | |
3182 | (comparable_template_types_p): New function. | |
3183 | (newline_and_indent): New function. | |
3184 | (arg_to_string): New function. | |
3185 | (print_nonequal_arg): New function. | |
3186 | (print_template_differences): New function. | |
3187 | (type_to_string_with_compare): New function. | |
3188 | (print_template_tree_comparison): New function. | |
3189 | (append_formatted_chunk): New function. | |
3190 | (add_quotes): New function. | |
3191 | (cxx_format_postprocessor::handle): New function. | |
3192 | (defer_phase_2_of_type_diff): New function. | |
3193 | (cp_printer): Add "quoted" and "buffer_ptr" params. Implement | |
3194 | %H and %I. | |
3195 | * typeck.c (cp_build_binary_op): Replace pairs of %qT with | |
3196 | %qH and %qI in various places. | |
3197 | (convert_member_func_to_ptr): Likewise. | |
3198 | (build_reinterpret_cast_1): Likewise. | |
3199 | (convert_for_assignment): Likewise. | |
3200 | * typeck2.c (check_narrowing): Likewise. | |
3201 | ||
3ec46e3d | 3202 | 2017-05-30 Nathan Sidwell <nathan@acm.org> |
3203 | ||
1458d1aa | 3204 | Kill IDENTIFIER_NAMESPACE_BINDINGS |
3205 | * cp-tree.h (lang_identifier): Delete namespace_bindings. | |
3206 | (IDENTIFIER_NAMESPACE_BINDINGS): Delete. | |
3207 | (lang_decl_ns): Add bindings. | |
3208 | (DECL_NAMESPACE_BINDINGS): New. | |
3209 | * lex.c (retrofit_lang_decl): Create namespace hash table. | |
3210 | * name-lookup.c (find_namespace_slot): Change to use hash-map. | |
3211 | * ptree.c (cxx_print_binding): Delete. | |
3212 | (cxx_print_identifier): Remove NAMESPACE_BINDING printing. | |
3213 | ||
d6cc2ec2 | 3214 | * cp-tree.def (OVERLOAD): Fix comment. |
3215 | * cp-tree.h: Fix comments and whitespace. | |
3216 | * error.c (dump_decl): Use pp_cxx_colon_colon, ovl_scope. | |
3217 | * name-lookup.c (add_decl_to_level): Assert not class. | |
3218 | (check_local_shadow): Use OVL_P. | |
3219 | (pushdecl_with_scope_1): Rename to ... | |
3220 | (do_pushdecl_with_Scope): ... here. | |
3221 | (do_nonmember_using_decl): Use qualified_namespace_lookup return | |
3222 | value. | |
3223 | (push_class_level_binding_1): Use OVL_P. | |
3224 | (pushdecl_namespace_level): Use do_pushdecl_with_scope. | |
3225 | (pushtag_1): Rename to ... | |
3226 | (do_pushtag): ... here. Adjust do_pushdecl_with_scope call. | |
3227 | (pushtag): Adjust. | |
3228 | (store_class_bindings): Do not time here. | |
3229 | * name-lookup.h (pushdecl_outermost_localscope): Reorder. | |
3230 | * pt.c (listify): Declare argvec at point of initialization. | |
3231 | ||
3ec46e3d | 3232 | PR c++/80913 |
3233 | * name-lookup.c (add_decl_to_level): Assert not making a circular | |
3234 | chain. | |
3235 | (update_binding): Don't prematurely slide artificial decl. | |
3236 | ||
24a60993 | 3237 | 2017-05-29 Alexandre Oliva <aoliva@redhat.com> |
3238 | ||
3239 | * cp-tree.h (lang_identifier): Drop oracle_looked_up, unused. | |
3240 | ||
bd5c2b15 | 3241 | 2017-05-29 Nathan Sidwell <nathan@acm.org> |
3242 | ||
6fbf0ce6 | 3243 | PR c++/80891 (#1,#5) |
3244 | * cp-tree.h (lookup_maybe_add): Add DEDUPING argument. | |
3245 | * name-lookup.c (name_lookup): Add deduping field. | |
3246 | (name_lookup::preserve_state, name_lookup::restore_state): Deal | |
3247 | with deduping. | |
3248 | (name_lookup::add_overload): New. | |
3249 | (name_lookup::add_value, name_lookup::add_fns): Call add_overload. | |
3250 | (name_lookup::search_adl): Set deduping. Don't unmark here. | |
3251 | * pt.c (most_specialized_instantiation): Revert previous change, | |
3252 | Assert not given duplicates. | |
3253 | * tree.c (lookup_mark): Just mark the underlying decls. | |
3254 | (lookup_maybe_add): Dedup using marked decls. | |
3255 | ||
87229d1e | 3256 | PR c++/80891 (#4) |
3257 | * ptree.c (cxx_print_xnode): Show internal OVERLOAD structure. | |
3258 | * tree.c (ovl_insert, ovl_iterator_remove_node): Fix copying assert. | |
3259 | ||
17d66324 | 3260 | Stat hack representation |
3261 | * name-lookup.c (STAT_HACK_P, STAT_TYPE, STAT_DECL, | |
3262 | MAYBE_STAT_DECL, MAYBE_STAT_TYPE): New. | |
3263 | (stat_hack): New. | |
3264 | (find_namespace_binding): Replace with ... | |
3265 | (find_namespace_slot): ... this. | |
3266 | (find_namespace_value): New. | |
3267 | (name_lookup::search_namespace_only, | |
3268 | name_lookup::adl_namespace_only): Adjust. | |
3269 | (update_binding): Add SLOT parameter, adjust. | |
3270 | (check_local_shadow): Use find_namespace_value. | |
3271 | (set_local_extern_decl_linkage): Likewise. | |
3272 | (do_pushdecl): Adjust for namespace slot. | |
3273 | (push_local_binding): Assert not a namespace binding. | |
3274 | (check_for_out_of_scope_variable): Use find_namespace_value. | |
3275 | (set_identifier_type_value_with_scope): Likewise. | |
3276 | (get_namespace_binding): Likewise. | |
3277 | (set_namespace_binding): Delete. | |
3278 | (set_global_binding): Directly update the binding. | |
3279 | (finish_namespace_using_decl): Likewise. | |
3280 | (lookup_type_scope_1): Use find_namespace_slot and update. | |
3281 | (do_push_nested_namespace): Use find_namespace_value. | |
3282 | ||
9f724124 | 3283 | PR c++/80891 (#1) |
3284 | * pt.c (most_specialized_instantiation): Cope with duplicate | |
3285 | instantiations. | |
3286 | ||
bd5c2b15 | 3287 | PR c++/80891 (#3) |
3288 | * cp-tree.h (build_min_nt_call_vec): Declare. | |
3289 | * decl.c (build_offset_ref_call_from_tree): Call it. | |
3290 | * parser.c (cp_parser_postfix_expression): Likewise. | |
3291 | * pt.c (tsubst_copy_and_build): Likewise. | |
3292 | * semantics.c (finish_call_expr): Likewise. | |
3293 | * tree.c (build_min_nt_loc): Keep unresolved lookups. | |
3294 | (build_min): Likewise. | |
3295 | (build_min_non_dep): Likewise. | |
3296 | (build_min_non_dep_call_vec): Likewise. | |
3297 | (build_min_nt_call_vec): New. | |
82b795da | 3298 | |
5fde1152 | 3299 | PR c++/80891 (#2) |
3300 | * tree.c (ovl_copy): Adjust assert, copy OVL_LOOKUP. | |
3301 | (ovl_used): New. | |
3302 | (lookup_keep): Call it. | |
3303 | ||
bd5c2b15 | 3304 | 2017-05-26 Nathan Sidwell <nathan@acm.org> |
3305 | ||
2e33510a | 3306 | Implement DR2061 |
3307 | * name-lookup.c (push_inline_namespaces): New. | |
3308 | (push_namespace): Look inside inline namespaces. | |
3309 | ||
0a2455c5 | 3310 | Inline and using namespace representation change. |
3311 | * cp-tree.h (struct lang_decl_ns): Delete ns_using. Add usings, | |
3312 | inlinees as vector. | |
3313 | (DECL_NAMESPACE_USING): Adjust. | |
3314 | (DECL_NAMESPACE_INLINEES): New. | |
3315 | * name-lookup.h (struct cp_binding_level): Change usings | |
3316 | representation. | |
3317 | * name-lookup.c (name_lookup::do_queue_usings, | |
3318 | name_lookup::queue_usings): Adjust. | |
3319 | (name_lookup::search_namespace, name_lookup::search_usings, | |
3320 | name_lookup::queue_namespace): Adjust. | |
3321 | (name_lookup::adl_namespace_only): Adjust. | |
3322 | (add_using_namespace, push_namespace): Push onto vector. | |
3323 | (pop_namespace): Add timing logic. | |
3324 | ||
a5aae789 | 3325 | * call.c (build_operator_new_call): Do namelookup and ADL here. |
3326 | (build_new_op_1): Likewise. | |
3327 | * name-lookup.h (lookup_function_nonclass): Delete declaration. | |
3328 | (do_using_directive): Likewise. | |
3329 | * name-lookup.c (set_namespace_binding, push_local_binding): Don't | |
3330 | declare early. | |
3331 | (struct scope_binding): Delete. | |
3332 | (EMPTY_SCOPE_BINDING): Delete. | |
3333 | (set_decl_namespace): Use OVL_P. | |
3334 | (finish_local_using_decl): Lose unnecesary checks. | |
3335 | (lookup_function_nonclass): Delete. | |
3336 | (cp_emit_debug_info_for_using): Use MAYBE_BASELINK_P. | |
3337 | ||
41ff145b | 3338 | * cp-tree.h (OVL_CHAIN): Check looking at OVERLOAD. |
3339 | (ovl_iterator): Add allow_inner field. Adjust ctor. Make | |
3340 | unduplicatable. | |
3341 | (ovl_iterator::maybe_push, ovl_iterator::pop): New. | |
3342 | (lkp_iterator): Add outer field. Adjust ctor. | |
3343 | (lkp_iterator::operator++): New. | |
3344 | (lookup_mark, lookup_maybe_add): Declare. | |
3345 | * name-lookup.c (name_lookup): Delete fn_set member. | |
3346 | (name_lookup::preserve_state, name_lookup::restore_state): Unmark | |
3347 | and mark lookup. | |
3348 | (name_lookup::add_value): Use lookup_add directly. | |
3349 | (name_lookup::add_fns: Use lookup_maybe_add. | |
3350 | (name_lookup::search_adl): Mark and unmark fns. | |
3351 | (pushdecl): Adjust. | |
3352 | * pt.c (check_explicit_specialization): Use lookup_add directly. | |
3353 | * ptree.c (cxx_print_xnode): Show complete overload structure. | |
3354 | * tree.c (lookup_mark, lookup_maybe_add): New. | |
3355 | ||
82b795da | 3356 | * name-lookup.c (name_lookup::search_adl): ADL OMP UDR type args. |
3357 | ||
3f430531 | 3358 | 2017-05-26 Jakub Jelinek <jakub@redhat.com> |
3359 | ||
3360 | * cp-tree.h (struct lang_decl_decomp): New type. | |
3361 | (struct lang_decl): Add u.decomp. | |
3362 | (LANG_DECL_DECOMP_CHECK): Define. | |
3363 | (DECL_DECOMPOSITION_P): Note it is set also on the vars | |
3364 | for user identifiers. | |
3365 | (DECL_DECOMP_BASE): Define. | |
3366 | (retrofit_lang_decl): Add extra int = 0 argument. | |
3367 | * lex.c (retrofit_lang_decl): Add SEL argument, if non-zero | |
3368 | use it to influence the selector choices and for selector | |
3369 | 0 to non-zero transition copy old content. | |
3370 | (cxx_dup_lang_specific_decl): Handle DECL_DECOMPOSITION_P. | |
3371 | * decl.c (poplevel): For DECL_DECOMPOSITION_P, check | |
3372 | !DECL_DECOMP_BASE instead of !DECL_VALUE_EXPR. Adjust warning | |
3373 | wording if decl is a structured binding. | |
3374 | (cp_finish_decomp): Pass 4 as the new argument to retrofit_lang_decl. | |
3375 | Set DECL_DECOMP_BASE. Ignore DECL_READ_P sets from initialization | |
3376 | of individual variables for tuple structured bindings. | |
3377 | (grokdeclarator): Pass 4 as the new argument to retrofit_lang_decl. | |
3378 | Clear DECL_DECOMP_BASE. | |
3379 | * decl2.c (mark_used): Mark DECL_DECOMP_BASE TREE_USED as well. | |
3380 | * pt.c (tsubst_decomp_names): Assert DECL_DECOMP_BASE matches what | |
3381 | is expected. | |
3382 | * expr.c (mark_exp_read): Recurse on DECL_DECOMP_BASE instead of | |
3383 | DECL_VALUE_EXPR. | |
3384 | ||
618e587a | 3385 | 2017-05-25 Jason Merrill <jason@redhat.com> |
3386 | ||
3387 | PR c++/80605 - __is_standard_layout and zero-length array | |
3388 | * class.c (check_bases): Use DECL_FIELD_IS_BASE. | |
3389 | ||
475205a0 | 3390 | 2017-05-25 Nathan Sidwell <nathan@acm.org> |
3391 | ||
5637ac62 | 3392 | Kill OVL_CURRENT, OVL_NEXT. |
3393 | * cp-tree.h (OVL_CURRENT, OVL_NEXT): Delete. | |
3394 | * name-lookup.c (set_decl_namespace): Use ovl_iterator. | |
3395 | (consider_binding_level): Use OVL_FIRST. | |
3396 | (cp_emit_debug_info_for_using): Use lkp_iterator. | |
3397 | * pt.c (check_explicit_specialization): Use ovl_iterator. | |
3398 | ||
475205a0 | 3399 | Kill DECL_NAMESPACE_USERS, DECL_NAMESPACE_ASSOCIATIONS. |
3400 | * cp-tree.h (lang_decl_ns): Remove ns_users field. | |
3401 | (DECL_NAMESPACE_USERS, DECL_NAMESPACE_ASSOCIATIONS): Delete. | |
3402 | (TREE_INDIRECT_USING): Delete. | |
3403 | * name-lookup.h (is_associated_namespace): Delete. | |
3404 | * name-lookup.c (name_lookup::search_usings, | |
3405 | name_lookup::do_queue_usings): Usings are always direct. | |
3406 | (is_associated_namespace): Delete. | |
3407 | (handle_namespace_attrs): Use DECL_NAMESPACE_INLINE_P. | |
3408 | (namespace_ancestor_1, namespace_ancestor): Delete. | |
3409 | (push_using_directive_1, push_using_directive): Delete. | |
3410 | (add_using_namespace_1): Delete. | |
3411 | (add_using_namespace): Reimplement. | |
3412 | (emit_debug_info_using_namespace): New. | |
3413 | (finish_namespace_using_directive, finish_local_using_directive, | |
3414 | push_namespace): Adjust. | |
3415 | * tree.c (cp_free_lang_data): Remove DECL_NAMESPACE_USERS handling. | |
3416 | ||
6c547211 | 3417 | 2017-05-25 Volker Reichelt <v.reichelt@netcologne.de> |
3418 | ||
3419 | * semantics.c (finish_handler_parms): Warn about non-reference type | |
3420 | catch handlers. | |
3421 | ||
69232621 | 3422 | 2017-05-25 Nathan Sidwell <nathan@acm.org> |
3423 | ||
9ff63f75 | 3424 | Reimplement unqualified namespace lookup. |
3425 | * name-lookup.c (name_lookup::using_pair, | |
3426 | name_lookup::using_queue): New typedefs. | |
3427 | (name_lookup::queue_namespace, name_lookup::do_queue_usings, | |
3428 | name_lookup::queue_usings): New. | |
3429 | (name_lookup::search_unqualified): New. | |
3430 | (merge_functions, same_entity_p, ambiguous_decl, | |
3431 | unqualified_namespace_lookup_1, unqualified_namespace_lookup, | |
3432 | lookup_using_namespace): Delete. | |
3433 | (lookup_name_real_1): Adjust. | |
3434 | ||
421bfc0f | 3435 | Reimplement qualified namespace lookup. |
3436 | * name-lookup.c (name_lookup::flags): New member. Adjust ctor. | |
3437 | (name_lookup::ambiguous, name_lookup::add_value, | |
3438 | name_lookup::add_type, name_lookup::process_binding): New. | |
3439 | (name_lookup::search_namespace_only, | |
3440 | name_lookup::search_namespace, name_lookup::search_usings): New. | |
3441 | (name_lookup::search_qualified): New. | |
3442 | (do_nonmember_using_decl, suggest_alternatives_for, | |
3443 | lookup_qualified_name): Adjust. | |
3444 | (tree_vec_contains): Delete. | |
3445 | (qualified_lookup_using_namespace): Rename to ... | |
3446 | (qualified_namespace_lookup): ... here. Reimplement. | |
3447 | ||
3448 | Reimplement ADL. | |
69232621 | 3449 | * cp-tree.h (LOOKUP_SEEN_P, LOOKUP_FOUND_P): New. |
3450 | * name-lookup.h (lookup_arg_dependent): Return plain tree. | |
3451 | * name-lookup.c (arg_lookup, arg_assoc, arg_assoc_args, | |
3452 | arg_assoc_args_vec, arg_assoc_type, add_function, | |
3453 | arg_assoc_namespace, arg_assoc_class_only, arg_assoc_bases, | |
3454 | arg_assoc_class, arg_assoc_template_arg, arg_assoc, | |
3455 | lookup_arg_dependent_1): Delete. | |
3456 | (name_lookup): New lookup object. | |
3457 | (name_lookup::preserve_state, name_lookup::restore_state, | |
3458 | name_lookup::mark_seen, name_lookup::find_and_mark, | |
3459 | name_lookup::add_fns, name_lookup::adl_namespace_only, | |
3460 | name_lookup::adl_namespace, name_lookup::adl_class_only, | |
3461 | name_lookup::adl_bases, name_lookup::adl_class, | |
3462 | name_lookup::adl_expr, name_lookup::adl_type, | |
3463 | name_lookup::adl_template_arg, name_lookup::search_adl): New. | |
3464 | (lookup_arg_dependent): Return a plain tree. Adjust. | |
3465 | (is_associated_namespace): Move later. | |
3466 | ||
1016d09b | 3467 | 2017-05-24 Nathan Sidwell <nathan@acm.org> |
3468 | ||
60fadde6 | 3469 | * friend.c (do_friend): Remove check for existing decl. |
3470 | * name-lookup.h (lookup_name_innermost_nonclass_level): Delete. | |
3471 | * name-lookup.c (push_local_binding): Directly look for binding. | |
3472 | (lookup_name_innermost_nonclass_level_1): Delete. | |
3473 | (lookup_name_innermost_nonclass_level): Delete. | |
3474 | ||
03f335a5 | 3475 | * Make-lang.in (CXX_AND_OBJCXX_OBJS): Alphabetize. |
3476 | ||
1016d09b | 3477 | * cp-tree.h (cp_free_lang_data): Add extern. |
3478 | (ovl_skip_hidden, is_overloaded_fn, really_overloaded_fn): Add | |
3479 | ATTRIBUTE_PURE. | |
3480 | (type_unknown_p): Return bool, make inline, lose TREE_LIST check. | |
3481 | * typeck.c (type_unknown_p): Delete. | |
3482 | * tree.c (is_overloaded_fn): Use MAYBE_BASELINE_FUNCTIONS, adjust | |
3483 | overload management. | |
3484 | (dependent_name): Likewise. | |
3485 | (decl_anon_ns_mem_p): Simplify. | |
3486 | ||
220a51b0 | 3487 | 2017-05-24 Jonathan Wakely <jwakely@redhat.com> |
3488 | ||
3489 | PR c++/80544 | |
3490 | * tree.c (reshape_init): Use unqualified type for direct enum init. | |
3491 | * typeck.c (maybe_warn_about_cast_ignoring_quals): New. | |
3492 | (build_static_cast_1, build_reinterpret_cast_1): Strip cv-quals from | |
3493 | non-class destination types. | |
3494 | (build_const_cast_1): Strip cv-quals from destination types. | |
3495 | (build_static_cast, build_reinterpret_cast, build_const_cast) | |
3496 | (cp_build_c_cast): Add calls to maybe_warn_about_cast_ignoring_quals. | |
3497 | ||
645b0f8d | 3498 | 2017-05-24 Martin Sebor <msebor@redhat.com> |
3499 | ||
3500 | PR c/80731 | |
3501 | * call.c (fully_fold_internal): Adjust. | |
3502 | ||
788172b2 | 3503 | 2017-05-24 Nathan Sidwell <nathan@acm.org> |
3504 | ||
d10e0468 | 3505 | * cp-tree.h (ovl_skip_hidden): Declare. |
3506 | * tree.c (ovl_skip_hidden): New. | |
3507 | * name-lookup.c (arg_assoc_namespace): Call ovl_skip_hidden. | |
3508 | (lookup_arg_dependent_1): Likewise. | |
3509 | (ambiguous_decl): Use DECL_HIDDEN_P, ovl_skip_hidden. | |
3510 | (hidden_name_p, remove_hidden_names): Delete. | |
3511 | (lookup_name_real_1): Do not strip hidden names. | |
3512 | * name-lookup.h (hidden_name_p, remove_hidden_names): Delete. | |
3513 | ||
788172b2 | 3514 | * cp-tree.h (OVL_HIDDEN_P): New. |
3515 | (ovl_iterator::hidden_p, ovl_iterator::reveal_node): New. | |
3516 | (ovl_iterator::reveal_node): Declare. | |
3517 | * tree.c (ovl_copy): Copy OVL_HIDDEN_P. | |
3518 | (ovl_insert): Order on hiddenness. | |
3519 | (ovl_iterator::reveal_node): New. | |
3520 | * name-lookup.c (anticipated_builtin_p): New. | |
3521 | (supplement_binding_1): Use it. | |
3522 | (set_local_extern_decl_linkage): Use hidden_p. | |
3523 | (do_pushdecl): Deal with unhiding a hidden decl, use | |
3524 | anticipated_builtin_p. | |
3525 | (do_nonmember_using_decl): Use anticipated_decl_p. | |
3526 | (lookup_name_real_1): Use DECL_HIDDEN_P. | |
3527 | ||
a440faa5 | 3528 | 2017-05-23 Jason Merrill <jason@redhat.com> |
3529 | ||
3530 | -Wunused and C++17 structured bindings | |
3531 | * decl.c (poplevel): Don't warn about unused structured bindings, | |
3532 | only real variables. | |
3533 | * error.c (dump_simple_decl): Handle structured bindings. | |
3534 | * expr.c (mark_exp_read): Look through DECL_VALUE_EXPR. | |
3535 | ||
bba28d3f | 3536 | 2017-05-23 Nathan Sidwell <nathan@acm.org> |
3537 | ||
3538 | * cp-tree.h (PUSH_GLOBAL, PUSH_LOCAL, PUSH_USING): Delete. | |
3539 | * name-lookup.c (create_local_binding): New. | |
3540 | (update_binding): New. | |
3541 | (pushdecl_maybe_friend_1): Rename to ... | |
3542 | (do_pushdecl): ... this. Reimplement. | |
3543 | (pushdecl): Adjust. | |
3544 | (push_overloaded_decl_1, push_overloaded_decl): Delete. | |
3545 | ||
c9051796 | 3546 | 2017-05-23 Jason Merrill <jason@redhat.com> |
3547 | ||
3548 | PR c++/80396 - built-in for make_integer_sequence. | |
3549 | * pt.c (builtin_pack_fn_p, builtin_pack_call_p) | |
3550 | (expand_integer_pack, expand_builtin_pack_call): New. | |
3551 | (find_parameter_packs_r): Check builtin_pack_call_p. | |
3552 | (check_for_bare_parameter_packs): Handle it. | |
3553 | (tsubst_pack_expansion): Call expand_builtin_pack_call. | |
3554 | (declare_integer_pack): New. | |
3555 | (init_template_processing): Call it. | |
3556 | * decl2.c (mark_used): Check builtin_pack_fn_p. | |
3557 | ||
369e5e40 | 3558 | 2017-05-23 Nathan Sidwell <nathan@acm.org> |
3559 | ||
76794ade | 3560 | * name-lookup.c (find_namespace_binding): New. |
3561 | (pushdecl_maybe_friend_1): Use CP_DECL_CONTEXT. | |
3562 | (set_identifier_type_value_with_scope): Use find_namespace_binding. | |
3563 | (find_binding, cp_binding_level_find_binding_for_name, | |
3564 | binding_for_name, namespace_binding_1): Delete. | |
3565 | (push_overloaded_decl_1): Use CP_DECL_CONTEXT. | |
3566 | (get_namespace_binding, set_namespace_binding, | |
3567 | finish_namespace_using_decl, unqualified_namespace_lookup_1, | |
3568 | qualified_lookup_using_namespace, lookup_type_scope_1, | |
3569 | lookup_name_innermost_nonclass_level_1): Use find_namespace_binding. | |
3570 | ||
81a73aa8 | 3571 | PR c++/80866 |
3572 | * parser.c (cp_parser_template_id): Keep the lookup when stashing | |
3573 | the template_id. | |
3574 | ||
369e5e40 | 3575 | * cp-tree.h (DECL_HIDDEN_P): New. |
3576 | * name-lookup.c (set_decl_context, | |
3577 | set_local_extern_decl_linkage): New, broken out of ... | |
3578 | (pushdecl_maybe_friend_1): ... here. Call them. | |
3579 | ||
9d5c2cca | 3580 | 2017-05-23 Thomas Schwinge <thomas@codesourcery.com> |
3581 | ||
3582 | * parser.c (OACC_KERNELS_CLAUSE_MASK): Add | |
3583 | "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS", | |
3584 | "VECTOR_LENGTH". | |
3585 | ||
eb9d4ee4 | 3586 | 2017-05-23 Nathan Sidwell <nathan@acm.org> |
3587 | ||
3588 | * cp-tree.h (OVL_P): New. | |
3589 | * name-lookup.h (push_local_binding): Delete. | |
3590 | (do_toplevel_using_decl, do_local_using_decl): Rename to ... | |
3591 | (finish_namespace_using_decl, finish_local_using_decl): ... here | |
3592 | * name-lookup.c (add_decl_to_level): Swap args. | |
3593 | (pop_bindings_and_leave_scope): Look inside TREE_LIST. | |
3594 | (diagnose_name_conflict): Check contexts are same for redecl. | |
3595 | (update_local_overload): New. | |
3596 | (compparms_for_decl_and_using): Rename to ... | |
3597 | (matching_fn_p): ... here. | |
3598 | (pushdecl_maybe_friend_1): Adjust add_decl_to_level, | |
3599 | push_local_bindings call. | |
3600 | (push_local_binding): Make static, replace FLAGS arg with | |
3601 | IS_USING. | |
3602 | (validate_nonmember_using_decl): Use OVL_FIRST. | |
3603 | (do_nonmember_using_decl): Use in/out parameters. Use | |
3604 | lkp_iterator and simplify. | |
3605 | (do_toplevel_using_decl, do_local_using_decl): Rename to ... | |
3606 | (finish_namespace_using_decl, finish_local_using_decl): ... here. | |
3607 | Adjust. | |
3608 | (lookup_type_current_level): Delete. | |
3609 | * parser.c (cp_parser_using_declaration): Adjust. | |
3610 | * pt.c (tsubst_expr): Adjust. | |
3611 | ||
5872305e | 3612 | 2017-05-22 Nathan Sidwell <nathan@acm.org> |
3613 | ||
3a591284 | 3614 | * name-lookup.h (parse_using_directive): Replace with ... |
3615 | (finish_namespace_using_directive): ... this and ... | |
3616 | (finish_local_using_directive): ... this. | |
3617 | * name-lookup.c (add_using_namespace_1): Move later. | |
3618 | (add_using_namespace): Move later, add namespace_p arg, remove | |
3619 | indirect arg. | |
3620 | (push_using_directive_1): Directly recurse. | |
3621 | (do_using_directive, parse_using_directive): Delete, split into ... | |
3622 | (finish_namespace_using_directive): ... this and ... | |
3623 | (finish_local_using_directive): ... this. | |
3624 | (push_namespace): Use add_using_namespace. | |
3625 | * parser.c (cp_parser_using_directive): Call | |
3626 | finish_namespace_using_directive or finish_local_using_directive. | |
3627 | * pt.c (tsubst_expr): Call finish_local_using_directive. | |
3628 | ||
88df6264 | 3629 | * cp-objcp-common.c (cp_register_dumps): Register raw dumper. |
3630 | * cp-tree.h (raw_dump_id): Declare. | |
3631 | * decl2.c (raw_dump_id): Define. | |
3632 | (dump_tu): Use raw_dump_id. | |
3633 | ||
3d1f0156 | 3634 | * config-lang.in (gtfiles): Sort list, break lines. |
3635 | ||
c4bac24d | 3636 | * cp-tree.h (CPTI_TERMINATE, CPTI_CALL_UNEXPECTED): Rename to ... |
3637 | (CPTI_TERMINATE_FN, CPTI_CALL_UNEXPECTED_FN): ... here. | |
3638 | ( CPTI_GET_EXCEPTION_PTR_FN, CPTI_BEGIN_CATCH_FN, CPTI_END_CATCH_FN, | |
3639 | CPTI_ALLOCATE_EXCEPTION_FN, CPTI_FREE_EXCEPTION_FN, CPTI_THROW_FN, | |
3640 | CPTI_RETHROW_FN): New. | |
3641 | (noexcept_deferred_spec): New. | |
3642 | (terminate_node, call_unexpected_node): Rename to ... | |
3643 | (terminate_fn, call_unexpected_fn): ... here. | |
3644 | (get_exception_ptr_fn, begin_catch_fn, end_catch_fn, | |
3645 | allocate_exception_fn, free_exception_fn, throw_fn, rethrow_fn): New. | |
3646 | * except.c (fn1..fn5, throw_fn, rethrow_rn, spec): Delete. | |
3647 | (init_exception_processing): Adjust. | |
3648 | (declare_library_fn): Create and push the fns here. | |
3649 | (do_get_exception_ptr, do_begin_catch, do_end_catch, | |
3650 | do_allocate_exception_ptr, do_free_exception_ptr): Adjust | |
3651 | declare_library_fn use. | |
3652 | (unevaluated_noexcept_spec): Adjust. | |
3653 | * cp-gimplify.c (genericize_eh_spec_block, | |
3654 | gimplify_most_not_throw_expr): Adjust. | |
3655 | ||
5872305e | 3656 | * name-lookup.c (pushdecl_top_level, |
3657 | pushdecl_top_level_and_finish): Move after namespace pushing and | |
3658 | popping functions. | |
3659 | (push_to_top_level): Rename to ... | |
3660 | (do_push_to_top_level): ... here. Remove timing code. | |
3661 | (pop_from_top_level_1): Rename to ... | |
3662 | (do_pop_from_top_level): ... here. | |
3663 | (do_push_nested_namespace, do_pop_nested_namespace) | |
3664 | (push_to_top_level): New wrapper for do_push_to_top_level. | |
3665 | (pop_from_top_level): Adjust. | |
3666 | (push_nested_namepace, pop_nested_namespace): Wrappers for workers. | |
3667 | ||
5407f1e9 | 3668 | 2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de> |
3669 | ||
3670 | * config-lang.in (gtfiles): Add c-family/c-format.c, | |
3671 | except.c, init.c, lambda.c and friend.c. | |
3672 | * class.c (dvirt_fn): Move out of function scope, | |
3673 | add GTY attribute. | |
3674 | * except.c (fn1-5, throw_fn, rethrow_fn, spec): Likewise. | |
3675 | * init.c (fn): Likewise. | |
3676 | * lambda.c (ptr_id, max_id): Likewise. | |
3677 | * friend.c (global_friend): Add GTY attribute. | |
3678 | ||
d14ef710 | 3679 | 2017-05-19 Nathan Sidwell <nathan@acm.org> |
3680 | ||
3681 | * call.c (add_list_candidates): Use OVL_FIRST. | |
3682 | (build_new_method_call_1): Likewise. | |
3683 | * cp-tree.h (OVL_SINGLE_P): New. | |
3684 | (TYPE_HIDDEN_P): New. | |
3685 | * decl.c (xref_tag_1): Use TYPE_HIDDEN_P. | |
3686 | * dump.c (cp_tump_tree): Adjust overload dumping. | |
3687 | * error.c (dump_decl): Use OVL_SINGLE_P, simplify context | |
3688 | printing. | |
3689 | * method.c (lazily_declare_fn): Assert we added it. | |
3690 | * parser.c (cp_parser_nested_name_specifier): Use OVL_SINGLE_P, | |
3691 | OVL_FIRST. | |
3692 | (cp_parser_template_name): Use lkp_iterator. | |
3693 | * pt.c (begin_template_parm_list): Fixup comment. | |
3694 | (instantiate_class_template_1): Use TYPE_HIDDEN_P. | |
3695 | * tree.c (ovl_iterator::remove_node): Cope with inherited ctors. | |
3696 | (ovl_scope): Use lkp_iterator. | |
3697 | ||
23e84ab6 | 3698 | 2017-05-19 Thomas Schwinge <thomas@codesourcery.com> |
3699 | ||
6acf639f | 3700 | * parser.c (cp_parser_omp_clause_default): Handle |
3701 | "OMP_CLAUSE_DEFAULT_PRESENT". | |
3702 | ||
23e84ab6 | 3703 | * parser.c (cp_parser_omp_clause_default): Avoid printing more |
3704 | than one syntax error message. | |
3705 | ||
0fa326f5 | 3706 | 2017-05-19 Nathan Sidwell <nathan@acm.org> |
3707 | ||
3708 | * class.c (class_dump_id): Define. | |
3709 | (dump_class_hierarchy, dump_vtable, dump_vtt): Use it. | |
3710 | * cp-objcp-common.c (cp_register_dumps): New. | |
3711 | * cp-objcp-common.h (cp_register_dumps): Declare. | |
3712 | (LANG_HOOKS_REGISTER_DUMPS): Override. | |
3713 | * cp-tree.h (class_dump_id): Declare. | |
3714 | ||
8a864c4b | 3715 | 2017-05-18 Nathan Sidwell <nathan@acm.org> |
3716 | ||
f2369872 | 3717 | * cp-tree.h (OVL_ARG_DEPENDENT): Delete. |
3718 | (OVL_USED_P): New. | |
3719 | (lookup_keep): Declare. | |
3720 | * name-lookup.c (add_function): Don't set OVL_ARG_DEPENDENT. | |
3721 | * pt.c (tsubst_copy): Assert lookup is persistent. | |
3722 | * semantics.c (finish_call_expr): Use lkp_iterator, call | |
3723 | lookup_keep. | |
3724 | * tree.c (ovl_copy): New. | |
3725 | (ovl_insert, ovl_iterator::remove_node): Copy immutable nodes. | |
3726 | (lookup_keep): New. | |
3727 | ||
6f3e4f4c | 3728 | * cp-tree.h (OVL_USED): Replace with ... |
3729 | (OVL_USING_P): ... this. | |
3730 | (ovl_iterator::using_p): Adjust. | |
3731 | * name-lookup.c (push_overloaded_decl_1, | |
3732 | do_nonmember_using_decl): Adjust. | |
3733 | * search.c (lookup_field_r): Adjust. | |
3734 | * tree.c (ovl_insert, ovl_scope): Adjust. | |
3735 | ||
6f6c873e | 3736 | * cp-tree.h (lookup_add): Swap args. |
3737 | (ovl_cons, build_overload): Delete. | |
3738 | * name-lookup.c (add_function, push_overloaded_decl_1, | |
3739 | do_nonmember_using_decl, merge_functions, remove_hidden_names): | |
3740 | Use lookup_add, ovl_insert. | |
3741 | * pt.c (check_explicit_specialization): Use lookup_add. | |
3742 | (do_class_deduction): Likewise. Refactor if. | |
3743 | * tree.c (lookup_add): Swap args. | |
3744 | (ovl_cons, build_overload): Delete. | |
3745 | ||
8a864c4b | 3746 | * name-lookup.c (find_local_binding): New, broken out of ... |
3747 | (lookup_name_innermost_nonclass_level_1): ... here. Call it. | |
3748 | (set_namespace_binding): Swap scope & name args. | |
3749 | (namespace_binding_1): Likewise. | |
3750 | (pushdecl_maybe_friend_1): Adjust set_namespace_binding call. | |
3751 | (push_overloaded_decl_1): Likewise. | |
3752 | (set_global_binding): Likewise. | |
3753 | (get_namespace_binding): Adjust namespace_binding_1 call. | |
3754 | ||
03b3dcbd | 3755 | 2017-05-17 Nathan Sidwell <nathan@acm.org> |
3756 | ||
3757 | * cp-tree.h (default_hash_traits <lang_identifier *>): New | |
3758 | specialization. | |
3759 | * name-lookup.c (lookup_extern_c_fun_in_all_ns): Delete. | |
3760 | (extern_c_fns): New hash table. | |
3761 | (check_extern_c_conflict): New, broken out of ... | |
3762 | (pushdecl_maybe_friend_1): ... here. Call it. | |
3763 | (c_linkage_bindings): Just look in hash table. | |
3764 | ||
b4d90ee2 | 3765 | 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com> |
3766 | ||
3767 | PR c++/80654 | |
3768 | PR c++/80682 | |
3769 | Implement new C++ intrinsics __is_assignable and __is_constructible. | |
3770 | * cp-tree.h (CPTK_IS_ASSIGNABLE, CPTK_IS_CONSTRUCTIBLE): New. | |
3771 | (is_xible): New. | |
3772 | * cxx-pretty-print.c (pp_cxx_trait_expression): Handle | |
3773 | CPTK_IS_ASSIGNABLE and CPTK_IS_CONSTRUCTIBLE. | |
3774 | * method.c (constructible_expr): Set cp_unevaluated. | |
3775 | (is_xible_helper): New. | |
3776 | (is_trivially_xible): Adjust. | |
3777 | (is_xible): New. | |
3778 | * parser.c (cp_parser_primary_expression): Handle | |
3779 | RID_IS_ASSIGNABLE and RID_IS_CONSTRUCTIBLE. | |
3780 | (cp_parser_trait_expr): Likewise. | |
3781 | * semantics.c (trait_expr_value): Handle | |
3782 | CPTK_IS_ASSIGNABLE and CPTK_IS_CONSTRUCTIBLE. | |
3783 | ||
c9d02844 | 3784 | 2017-05-17 Nathan Sidwell <nathan@acm.org> |
3785 | ||
a1dda1ac | 3786 | * cp-tree.h (ovl_iterator::using_p): New predicate. |
3787 | (ovl_iterator::remove_node): New worker. | |
3788 | (ovl_insert): Declare. | |
3789 | * tree.c (ovl_insert): New. | |
3790 | (ovl_iterator::remove_node): New. | |
3791 | * class.c (add_method): Use ovl_iterator, ovl_insert. | |
3792 | (clone_function_decl): Fix description. | |
3793 | (clone_constructors_and_destructors): Use ovl_iterator. | |
3794 | ||
c9d02844 | 3795 | * class.c (handle_using_decl): Use OVL_FIRST, ovl_iterator. |
3796 | (maybe_warn_about_overly_private_class): Use ovl_iterator. | |
3797 | (method_name_cmp, resort_method_name_cmp): Use OVL_NAME. | |
3798 | (resort_type_method_vec, finish_struct_methods): Use OVL_FIRST. | |
3799 | (get_base_fndecls): Use ovl_iterator. | |
3800 | (warn_hidden): Use OVL_NAME, ovl_iterator. | |
3801 | (add_implicitly_declared_members): Use ovl_iterator. | |
3802 | * constraint.cc (normalize_template_id_expression): Use OVL_FIRST, | |
3803 | flatten nested if. | |
3804 | (finish_shorthand_constraint): Simplify, use ovl_make. | |
3805 | * pt.c (make_constrained_auto): Simplify. Use ovl_make. | |
3806 | * search.c (shared_member_p): Use ovl_iterator. | |
3807 | (lookup_field_fuzzy_info::fuzzy_lookup_fn): Use OVL_NAME. | |
3808 | (lookup_conversion_operator): Use OVL_FIRST. | |
3809 | (lookup_fnfiels_idx_nolazy): Use OVL_FIRST, OVL_NAME. | |
3810 | (look_for_overrides_here): Use ovl_iterator. | |
3811 | (lookup_conversions_r): Use OVL_FIRST, OVL_NAME, ovl_iterator. | |
3812 | * typeck.c (build_x_unary_op): Use ovl_make. | |
3813 | ||
3f6e5ced | 3814 | 2017-05-17 Martin Liska <mliska@suse.cz> |
3815 | ||
3816 | * class.c (dump_class_hierarchy): Introduce dump_flags_t type and | |
3817 | use it instead of int type. | |
3818 | (dump_vtable): Likewise. | |
3819 | (dump_vtt): Likewise. | |
3820 | * decl2.c (dump_tu): Likewise. | |
3821 | ||
8134a948 | 3822 | 2017-05-16 David Malcolm <dmalcolm@redhat.com> |
3823 | ||
3824 | * call.c (enforce_access): Add access_failure_info * param and use | |
3825 | it to record access failures. | |
3826 | * cp-tree.h (class access_failure_info): New class. | |
3827 | (enforce_access): Add access_failure_info * param, defaulting to | |
3828 | NULL. | |
3829 | (lookup_member): Likewise. | |
3830 | (locate_field_accessor): New function decl. | |
3831 | (perform_or_defer_access_check): Add access_failure_info * param, | |
3832 | defaulting to NULL. | |
3833 | * search.c (lookup_member): Add access_failure_info * param and | |
3834 | pass it on to call to perform_or_defer_access_check. | |
3835 | (matches_code_and_type_p): New function. | |
3836 | (field_access_p): New function. | |
3837 | (direct_accessor_p): New function. | |
3838 | (reference_accessor_p): New function. | |
3839 | (field_accessor_p): New function. | |
3840 | (struct locate_field_data): New struct. | |
3841 | (dfs_locate_field_accessor_pre): New function. | |
3842 | (locate_field_accessor): New function. | |
3843 | * semantics.c (perform_or_defer_access_check): Add | |
3844 | access_failure_info * param, and pass it on to call to | |
3845 | enforce_access. | |
3846 | * typeck.c (access_failure_info::record_access_failure): New method. | |
3847 | (access_failure_info::maybe_suggest_accessor): New method. | |
3848 | (finish_class_member_access_expr): Pass an access_failure_info | |
3849 | instance to the lookup_member call, and call its | |
3850 | maybe_suggest_accessor method afterwards. | |
3851 | ||
2af642bf | 3852 | 2017-05-16 Marek Polacek <polacek@redhat.com> |
3853 | ||
3854 | PR sanitizer/80536 | |
3855 | PR sanitizer/80386 | |
3856 | * cp-gimplify.c (cp_fold): Handle SAVE_EXPR. | |
3857 | ||
126b78a0 | 3858 | 2017-05-16 Nathan Sidwell <nathan@acm.org> |
3859 | ||
22d17e4f | 3860 | * name-lookup.c (check_local_shadow): New, broke out of ... |
3861 | (pushdecl_maybe_friend_1): ... here. Call it. | |
3862 | ||
d76490ca | 3863 | * cp-tree.h (OVL_NESTED_P, OVL_LOOKUP_P): New. |
3864 | (ovl_first): Move inline definition to end of file. | |
3865 | (ovl_make, lookup_add): Declare. | |
3866 | (get_fns, get_first_fn): Make pure. | |
3867 | * tree.c (ovl_cache): New. | |
3868 | (ovl_make, lookup_add): New. | |
3869 | * pt.c (do_class_deduction): Don't add candidates that will be | |
3870 | elided. | |
3871 | ||
05b229bf | 3872 | * call.c (build_user_type_conversion_1): Use OVL_FIRST. |
d76490ca | 3873 | (print_error_for_call_failure): Use OVL_NAME. |
05b229bf | 3874 | (build_op_call_1): Use ovl_iterator. |
3875 | (add_candidates): Use OVL_FIRST & lkp_iterator. | |
3876 | (build_op_delete_call): Use MAYBE_BASELINK_FUNCTIONS & | |
3877 | lkp_iterator. | |
3878 | * class.c (deduce_noexcept_on_destructors): Use ovl_iterator. | |
3879 | (type_has_user_nondefault_constructor, | |
3880 | in_class_defaulted_default_constructor, | |
3881 | type_has_user_provided_constructor, | |
3882 | type_has_user_provided_or_explicit_constructor, | |
3883 | type_has_non_user_provided_default_constructor, | |
3884 | vbase_has_user_provided_move_assign, | |
3885 | type_has_move_constructor, type_has_move_assign, | |
3886 | type_has_user_declared_move_constructor, | |
3887 | type_has_user_declared_move_assign, | |
3888 | type_build_ctor_call, type_build_dtor_call, | |
3889 | type_requires_array_cookie, explain_non_literal_class): Likewise. | |
3890 | (finish_struct): Use lkp_iterator. | |
3891 | (resolve_address_of_overloaded_function): Use OVL_NAME, lkp_iterator. | |
3892 | (note_name_declared_in_class): Use OVL_NAME. | |
3893 | * cxx-pretty-print.c (pp_cxx_unqualified_id): Use OVL_FIRST. | |
3894 | (pp_cxx_qualified_id, cxx_pretty_printer::id_expression, | |
3895 | cxx_pretty_printer::expression): Likewise. | |
3896 | * decl2.c (check_classfn): Use ovl_iterator. | |
3897 | * pt.c (retrieve_specialization): Use ovl_iterator. | |
3898 | * tree.c (cp_tree_equal): Use lkp_iterator. | |
3899 | (type_has_nontrivial_copy_init): Use ovl_iterator. | |
3900 | ||
126b78a0 | 3901 | * typeck2.c (cxx_incomplete_type_diagnostic): Revert change and |
3902 | check is_overloaded_fn. | |
3903 | ||
1ffa4346 | 3904 | 2017-05-16 Martin Liska <mliska@suse.cz> |
3905 | ||
3906 | * parser.c (cp_lexer_print_token): Add default value for flags | |
3907 | argument of print_gimple_stmt, print_gimple_expr, | |
3908 | print_generic_stmt and print_generic_expr. | |
3909 | ||
ccb7f6c9 | 3910 | 2017-05-16 Nathan Sidwell <nathan@acm.org> |
3911 | ||
97a86f58 | 3912 | * cp-tree.h (class ovl_iterator, class lkp_iterator): New OVERLOAD |
3913 | iterators. | |
3914 | (MAYBE_BASELINK_FUNCTIONS): New. | |
3915 | * constraint.cc (resolve_constraint_check): Use lkp_iterator. | |
3916 | * decl2.c (maybe_warn_sized_delete): Use ovl_iterator. | |
3917 | * lambda.c (maybe_generic_this_capture): Use lkp_iterator. | |
3918 | * method.c (inherited_ctor_binfo): Use ovl_iterator. | |
3919 | (binfo_inherited_from): Likewise. | |
3920 | * parser.c (lookup_literal_operator): Use lkp_iterator. | |
3921 | * pt.c (iterative_hash_template_arg): Use lkp_iterator. | |
3922 | (print_candidates_1): Likewise. | |
3923 | (determine_specialization): Likewise. | |
3924 | (resolve_overloaded_unification): Likewise. | |
3925 | (resolve_nondeduced_context): Likewise. | |
3926 | (type_dependent_expression_p): Likewise. | |
3927 | (dependent_template_p): Likewise. | |
3928 | * ptree.c (cxx_print_xnode): Likewise. | |
3929 | * semantics.c (omp_reduction_lookup): Use lkp_iterator. | |
3930 | (classtype_has_nothrow_assign_or_copy_p): Use ovl_iterator. | |
3931 | * typeck.c (check_template_keyword): Use lkp_iterator. | |
3932 | ||
6767ca9a | 3933 | * cp-tree.h (OVL_FIRST, OVL_NAME): New. |
3934 | (ovl_first): New. | |
3935 | * constexpr.c (function_concept_check): Use OVL_FIRST. | |
3936 | * cvt.c (build_expr_type_conversion): Likewise. | |
3937 | * decl.c (poplevel, grokdeclarator): Use OVL_NAME. | |
3938 | * decl2.c (mark_used): Use OVL_FIRST. | |
3939 | * error.c (dump_decl): Use OVL_FIRST, OVL_NAME. | |
3940 | (dump_expr, location_of): Use OVL_FIRST. | |
3941 | * friend.c (do_friend): Use OVL_NAME. | |
3942 | * init.c (build_offset_ref): Use OVL_FIRST. | |
3943 | * mangle.c (write_member_name): Likewise. | |
3944 | (write_expression): Use OVL_NAME. | |
3945 | * method.c (strip_inheriting_ctors): Use OVL_FIRST. | |
3946 | * name-lookup.c (pushdecl_class_level): Use OVL_NAME. | |
3947 | * pt.c (check_explicit_specialization): Use OVL_FIRST. | |
3948 | (check_template_shadow): Likewise. | |
3949 | (tsubst_template_args): Use OVL_NAME. | |
3950 | (tsubst_baselink): Use OVL_FIRST. | |
3951 | * semantics.c (perform_koenig_lookup): Use OVL_NAME. | |
3952 | * tree.c (get_first_fn): Use OVL_FIRST. | |
3953 | * typeck.c (finish_class_member_access_expr): Use OVL_NAME. | |
3954 | (cp_build_addr_expr_1): Use OVL_FIRST. | |
3955 | ||
bc9c1170 | 3956 | * pt.c (tsubst_copy_and_build): Remove unnecessary COMPONENT_REF |
3957 | peeking. | |
3958 | * semantics.c (finish_id_expression): Directly init local var. | |
3959 | (finish_omp_reduction_clause): Use really_overloaded_fn. | |
3960 | * tree.c (get_fns): Document. Assert we got an overload. | |
3961 | (get_first_fn) Document. | |
3962 | * typeck.c (cp_build_addr_expr_1): Pass arg directly to | |
3963 | really_overloaded_fn. | |
126b78a0 | 3964 | * typeck2.c (cxx_incomplete_type_diagnostic): Use get_first_fn directly. |
bc9c1170 | 3965 | |
ccb7f6c9 | 3966 | * cp-tree.h (SCOPE_DEPTH): New. |
3967 | * name-lookup.h (is_nested_namespace): Declare. | |
3968 | * name-lookup.c (is_nested_namespace): New. | |
3969 | (is_ancestor): Use it. | |
3970 | (set_decl_namespace): Likewise. | |
3971 | (push_namespace): Set SCOPE_DEPTH. | |
3972 | * pt.c (check_specialization_namespace): Use is_nested_namespace. | |
3973 | (check_unqualigied_spec_or_inst): Likewise. | |
3974 | ||
b8604e18 | 3975 | 2017-05-15 Nathan Sidwell <nathan@acm.org> |
3976 | ||
3977 | PR c++/79369 | |
3978 | * cp-tree.h (DECL_NAMESPACE_INLINE_P): New. | |
3979 | * name-lookup.h (push_namespace): Return int, add make_inline arg. | |
3980 | * name-lookup.c (push_namespace): Deal with inline directly. | |
3981 | Return pushed count. | |
3982 | * parser.c (cp_parser_namespace_definition): Adjust for | |
3983 | push_namespace change. | |
3984 | ||
6c2a7aff | 3985 | 2017-05-11 Nathan Sidwell <nathan@acm.org> |
3986 | ||
3fd4f7d8 | 3987 | * cp-lang.c (get_global_decls, cxx_pushdecl, LANG_HOOK_GETDECLS, |
3988 | LANG_HOOKS_PUSHDECL): Move to ... | |
3989 | * cp-objcp-common.c (cp_get_global_decls, cp_pushdec, | |
3990 | LANG_HOOK_DECLS, LANG_HOOKS_PUSHDECL): ... here. | |
3991 | * cp-objcp-common.h (cp_get_global_decls, cp_pushdecl): Declare. | |
3992 | ||
2e33aaef | 3993 | * name-lookup.h (pushdecl): Add default friend parm. |
3994 | (pushdecl_maybe_friend): Delete. | |
3995 | (pushdecl_top_level): Add default friend parm. | |
3996 | (pushdecl_top_level_maybe_friend): Delete. | |
3997 | * name-lookup.c (pushdecl_maybe_friend): Delete. | |
3998 | (pushdecl): Add is_friend parm. | |
3999 | (pushdecl_top_level): Add is friend_parm. | |
4000 | (pushdecl_top_level_maybe_friend, pushdecl_top_level_1): Delete. | |
4001 | (pushdecl_top_level_and_finish): Do pushing and finishing directly. | |
4002 | * friend.c (do_friend): Adjust. | |
4003 | * pt.c (tsubst_friend_class): Adjust. | |
4004 | ||
eab1674f | 4005 | Revert pushdecl_top_level_and_finish name change. |
4006 | * name-lookup.h (pushdecl_top_level_and_finish): Resurrect old name. | |
4007 | * name-lookup.c (pushdecl_top_level_and_finish): Likewise. | |
4008 | * decl.c (cp_make_fname_decl): Adjust. | |
4009 | * decl2.c (get_guard, handle_tls_init): Adjust. | |
4010 | * rtti.c (get_tinfo_decl, tinfo_base_init): Adjust. | |
4011 | ||
0b6fbbbb | 4012 | * name-lookup.c (pushdecl_outermost_localscope): Always |
4013 | conditionally stop timer. | |
4014 | ||
99661a78 | 4015 | * decl.c (xref_tag_1): Don't frob ts_lambda scope here. |
4016 | * name-lookup.c (pushtag_1): Deal with ts_lambda scope. | |
4017 | ||
a3145045 | 4018 | * cp-tree.h (pushdecl, pushdecl_maybe_friend, pushtag, |
4019 | pushtag_top_level_maybe_friend, | |
4020 | pushdecl_top_level_and_finish): Move declarations to ... | |
4021 | * name-lookup.h: ... here. Group pushdecl variants. | |
4022 | (pushdecl_top_level_and_finish): Rename to ... | |
4023 | (pushdecl_top_level_with_init): ... here. | |
4024 | * decl.c (cp_make_fname_decl): Use pushdecl_top_level_with_init. | |
4025 | * decl2.c (get_guard, handle_tls_init): Likewise. | |
4026 | * rtti.c (get_tinfo_decl, tinfo_base_init): Likewise. | |
4027 | * lambda.c (maybe_add_lambda_conv_op): Use namespace_bindings_p. | |
4028 | * method.c (implicitly_declare_fn): Likewise. | |
4029 | * searchc (node_debug_info_needed): Likewise. | |
4030 | * name-lookup.c (pushdecl_top_level_and_finish): Rename to ... | |
4031 | (pushdecl_top_level_with_init): ... here. | |
4032 | (pop_everything): Use namespace_bindings_p. | |
4033 | ||
6c2a7aff | 4034 | * name-lookup.h (pop_binding): Rename to pop_local_binding. |
4035 | (getdecls): Rename to get_local_decls. | |
4036 | * name-lookup.c (pop_binding): Rename to ... | |
4037 | (pop_local_binding): ... here. | |
4038 | (pop_bindings_and_leave_scope): Adjust. | |
4039 | (getdecls): Rename to ... | |
4040 | (get_local_decls): ... here. Assert local scope. | |
4041 | * decl.c (poplevel): Assert not namespace. Adjust and simplify | |
4042 | logic. | |
4043 | (store_parm_decls): Adjust get_local_decls call. | |
4044 | (parser.c (synthesize_implicit_template_parm): Likewise. | |
4045 | ||
b2a1a1f5 | 4046 | 2017-05-11 Ville Voutilainen <ville.voutilainen@gmail.com> |
4047 | ||
4048 | PR c++/80682 | |
4049 | * method.c (is_trivially_xible): Reject void types. | |
4050 | ||
47a5f618 | 4051 | 2017-05-10 Nathan Sidwell <nathan@acm.org> |
4052 | ||
495cd7fe | 4053 | * class.c (handle_using_decl): Always use OVL_CURRENT. |
4054 | (resolve_address_of_overloaded_function): Move iterator decl into | |
4055 | for scope. Don't strip anticipated decls here. | |
4056 | ||
bfaf762c | 4057 | * pt.c (print_candidates_1): Separate TREE_LIST and OVERLOAD |
4058 | printing. | |
4059 | (print_candidates): Adjust. | |
4060 | ||
47a5f618 | 4061 | * cp-tree.h (build_new_function_call): Lose koenig_p arg. Fix |
4062 | line breaking. | |
4063 | * call.c (build_new_function_call): Lose koenig_p arg. Remove | |
4064 | koenig_p handling here. | |
4065 | * pt.c (push_template_decl_real): Unconditionally retrofit_lang_decl. | |
4066 | (tsubst_omp_clauses): Likewise. | |
4067 | (do_class_deduction): Adjust buld_new_function_call calls. | |
4068 | * semantics.c (finish_call_expr): Likewise. | |
4069 | ||
f0ee2825 | 4070 | 2017-05-10 Jason Merrill <jason@redhat.com> |
4071 | ||
690fc8d0 | 4072 | * pt.c (unify_parameter_deduction_failure, unify_cv_qual_mismatch) |
4073 | (unify_type_mismatch, unify_parameter_pack_mismatch) | |
4074 | (unify_ptrmem_cst_mismatch, unify_expression_unequal) | |
4075 | (unify_parameter_pack_inconsistent, unify_inconsistency) | |
4076 | (unify_vla_arg, unify_method_type_error, unify_arity) | |
4077 | (unify_arg_conversion, unify_no_common_base) | |
4078 | (unify_inconsistent_template_template_parameters) | |
4079 | (unify_template_deduction_failure) | |
4080 | (unify_template_argument_mismatch) | |
4081 | (unify_overload_resolution_failure): Call unify_invalid. | |
4082 | ||
a7e8daac | 4083 | CWG 1847 - Clarifying compatibility during partial ordering |
4084 | * pt.c (more_specialized_fn): No order between two non-deducible | |
4085 | parameters. | |
4086 | ||
8004fb17 | 4087 | * pt.c (dependent_type_p): Make sure we aren't called with |
4088 | global_type_node. | |
4089 | ||
f0ee2825 | 4090 | PR c++/79549 - C++17 ICE with non-type auto template parameter pack |
4091 | * pt.c (convert_template_argument): Just return an argument pack. | |
4092 | (coerce_template_parameter_pack, template_parm_to_arg) | |
4093 | (extract_fnparm_pack, make_argument_pack, tsubst_template_args) | |
4094 | (tsubst_decl, tsubst, type_unification_real, unify_pack_expansion): | |
4095 | Don't set the type of a NONTYPE_ARGUMENT_PACK. | |
4096 | * parser.c (make_char_string_pack, make_string_pack): Likewise. | |
4097 | ||
9320a233 | 4098 | 2017-05-10 Nathan Sidwell <nathan@acm.org> |
4099 | ||
4100 | * cp-tree.h (add_method, clone_function_decl): Change last arg to | |
4101 | bool. | |
4102 | * class.c (add_method): Change third arg to bool. Adjust. | |
4103 | (one_inheriting_sig, one_inherited_ctor): Adjust. | |
4104 | (clone_function_decl): Change 2nd arg to bool. Adjust. | |
4105 | (clone_constructors_and_destructors): Adjust. | |
4106 | * lambda.c (maybe_add_lambda_conv_op): Adjust. | |
4107 | * method.c (lazily_declare_fn): Adjust. | |
4108 | * pt.c (tsubst_decl, instantiate_template_1): Adjust. | |
4109 | * semantics.c (finish_member_declaration): Adjust. | |
4110 | ||
658b632c | 4111 | 2017-05-10 Paolo Carlini <paolo.carlini@oracle.com> |
4112 | ||
4113 | PR c++/80145 | |
4114 | * decl.c (finish_function): To improve error recovery, change the | |
4115 | logic for calling apply_deduced_return_type. | |
4116 | ||
d66f34cf | 4117 | 2017-05-09 Jason Merrill <jason@redhat.com> |
4118 | ||
618e587a | 4119 | PR c++/80605 - __is_standard_layout and empty base |
452d5214 | 4120 | * class.c (check_bases): Ignore empty bases. |
4121 | ||
9fb9d0ee | 4122 | PR c++/70979 - literal class and closure types |
4123 | * class.c (finalize_literal_type_property): Handle closures | |
4124 | specifically. | |
4125 | (explain_non_literal_class): Likewise. | |
4126 | ||
d66f34cf | 4127 | PR c++/66297, DR 1684 - literal class and constexpr member fns |
4128 | * constexpr.c (is_valid_constexpr_fn): Only complain about | |
4129 | non-literal enclosing class in C++11. | |
4130 | * class.c (finalize_literal_type_property): Likewise. | |
4131 | ||
df98e412 | 4132 | 2017-05-09 Paolo Carlini <paolo.carlini@oracle.com> |
4133 | ||
4134 | PR c++/80186 | |
4135 | * pt.c (tsubst_decl): Early return error_mark_node if | |
4136 | grok_ctor_properties returns false. | |
4137 | ||
27fa8466 | 4138 | 2017-05-09 Jason Merrill <jason@redhat.com> |
4139 | ||
4140 | PR c++/70167 - array prvalue treated as lvalue | |
4141 | * cp-tree.h (CONSTRUCTOR_C99_COMPOUND_LITERAL): New. | |
4142 | (enum fcl_t): New. | |
4143 | * semantics.c (finish_compound_literal): Add fcl_context parameter. | |
4144 | Only make a static variable for C99 syntax. | |
4145 | * parser.c (cp_parser_postfix_expression): Pass it. | |
4146 | * pt.c (tsubst_copy_and_build): Likewise. | |
4147 | * call.c (extend_ref_init_temps): Set | |
4148 | DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P. | |
4149 | ||
cdf05a3f | 4150 | 2017-05-09 Nathan Sidwell <nathan@acm.org> |
4151 | ||
4152 | * cp-lang.c (get_global_decls, cxx_pushdecl): New. | |
4153 | (LANG_HOOKS_GETDECLS, LANG_HOOKS_PUSHDECL): Override. | |
4154 | * name-lookup.h (pushdecl_top_level): Declare. | |
4155 | ||
5d11282b | 4156 | 2017-05-08 Jason Merrill <jason@redhat.com> |
4157 | ||
4158 | PR c++/80178 - parameter passing for uncopyable classes | |
4159 | * tree.c (type_has_nontrivial_copy_init): True for classes with only | |
4160 | deleted copy/move ctors. | |
4161 | (remember_deleted_copy, maybe_warn_parm_abi): New. | |
4162 | * decl.c (require_complete_types_for_parms, check_function_type): | |
4163 | Call maybe_warn_parm_abi. | |
4164 | * call.c (convert_for_arg_passing, build_cxx_call): Likewise. | |
4165 | ||
9d79db40 | 4166 | 2017-05-08 Nathan Sidwell <nathan@acm.org> |
4167 | ||
cdf05a3f | 4168 | * decl.c (builtin_function_1): Set DECL_ANTICIPATED before pushing. |
93a0f220 | 4169 | (start_preparsed_function): Do decl pushing before setting |
4170 | current_funciton_decl and announcing it. | |
4171 | ||
adf347c7 | 4172 | * name-lookup.h (pushdecl_with_scope): Replace with ... |
4173 | (pushdecl_outermost_localscope): ... this. | |
4174 | * name-lookup.c (pushdecl_with_scope): Replace with ... | |
4175 | (pushdecl_outermost_localscope): ... this. | |
4176 | (pushdecl_namespace_level): Adjust. | |
4177 | * decl.c (cp_make_fname_decl): Use pushdecl_outermost_localscope. | |
4178 | * lambda.c (insert_capture_proxy): Likewise. | |
4179 | ||
5f0b0ddf | 4180 | * class.c (build_vtbl_initializer): Don't shadow outer variable |
4181 | with static var. | |
4182 | ||
9d79db40 | 4183 | Revert _binding -> _value change. |
4184 | * name-lookup.h (get_namespace_value, set_global_value): Rename to ... | |
4185 | (get_namespace_binding, set_global_binding): ... these. | |
4186 | * name-lookup.c (get_namespace_value, set_global_value): Rename to ... | |
4187 | (get_namespace_binding, set_global_binding): ... these. | |
4188 | (arg_assoc_namespace, pushdecl_maybe_friend_1, | |
4189 | check_for_out_of_scope_variable, push_overloaded_decl_1, | |
4190 | lookup_name_innermost_nonclass_level, push_namespace): Adjust. | |
4191 | * cp-tree.h (IDENTIFIER_GLOBAL_VALUE, | |
4192 | SET_IDENTIFIER_GLOBAL_VALUE): Adjust. | |
4193 | * decl.c (poplevel): Adjust. | |
4194 | * pt.c (make_constrained_auto): Likewise. | |
4195 | ||
903ed196 | 4196 | 2017-05-07 Volker Reichelt <v.reichelt@netcologne.de> |
4197 | ||
4198 | PR translation/80280 | |
4199 | * call.c (print_z_candidate): Fix quoting. | |
4200 | ||
56b8400f | 4201 | 2017-05-05 David Malcolm <dmalcolm@redhat.com> |
4202 | ||
4203 | * error.c (pedwarn_cxx98): Replace report_diagnostic | |
4204 | with diagnostic_report_diagnostic. | |
4205 | ||
90305f89 | 4206 | 2017-05-05 Nathan Sidwell <nathan@acm.org> |
4207 | ||
f906dcc3 | 4208 | * cp-tree.h (IDENTIFIER_GLOBAL_VALUE): Use get_namespace_value. |
4209 | (SET_IDENTIFIER_GLOBAL_VALUE): Use set_global_value. | |
4210 | (IDENTIFIER_NAMESPACE_VALUE): Delete. | |
4211 | * name-lookup.h (namespace_binding, set_namespace_binding): Replace | |
4212 | with ... | |
4213 | (get_namespace_value, set_global_value): ... these. | |
4214 | (get_global_value_if_present, is_typename_at_global_scope): Delete. | |
4215 | * decl.c (poplevel): Use get_namespace_value. | |
4216 | (grokdeclarator): Use IDENTIFIER_GLOBAL_VALUE. | |
4217 | * class.c (build_vtbl_initializer): Stash library decl in | |
4218 | static var. Use IDENTIFIER_GLOBAL_VALUE. | |
4219 | * except.c (do_get_exception_ptr, do_begin_catch, do_end_catch, | |
4220 | do_allocate_exception, do_free_exception, build_throw): Likewise. | |
4221 | * init.c (throw_bad_array_new_length): Likewise. | |
4222 | * rtti.c (throw_bad_cast, throw_bad_typeid): Likewise. | |
4223 | * name-lookup.c (arg_assoc_namespace, pushdecl_maybe_friend_1, | |
4224 | check_for_our_of_scope_variable, push_overloaded_decl_1): Use | |
4225 | get_namespace_value. | |
4226 | (set_namespace_binding_1): Rename to | |
4227 | (set_namespace_binding): ... here. | |
4228 | (set_global_value): New. | |
4229 | (lookup_name_innermost_nonclass_level_1, push_namespace): Use | |
4230 | get_namespace_value. | |
4231 | * pt.c (listify): Use get_namespace_value. | |
4232 | ||
3e584e1f | 4233 | * call.c (make_temporary_var_for_ref_to_temp): Push decl into |
4234 | current scope. | |
4235 | * lex.c (unqualified_name_lookup_error): Likewise. | |
4236 | ||
708ecb3e | 4237 | * class.c (alter_class): Use retrofit_lang_decl directly. |
4238 | * decl.c (push_local_name, dupliate_decls): Likewise. | |
4239 | * semantics.c (omp_privatize_field): Likewise. | |
4240 | ||
211cb67b | 4241 | Kill walk_namespaces. |
4242 | * cp-tree.h (walk_namespaces_fn, walk_namespaces): Delete. | |
4243 | * decl.c (walk_namespaces_r, walk_namespaces): Delete. | |
4244 | ||
90305f89 | 4245 | Kill per-namespace static_decls. |
4246 | * cp-tree.h (static_decls): Declare. | |
4247 | (wrapup_globals_for_namespace, | |
4248 | diagnose_inline_vars_for_namespace): Replace with ... | |
4249 | (wrapup_namespace_globals): ... this. | |
4250 | * decl.c (static_decls): Define. | |
4251 | (wrapup_globals_for_namespace, | |
4252 | diagnose_inline_vars_for_namespace): Replace with ... | |
4253 | (wrapup_namespace_globals): ... this. | |
4254 | (cxx_init_decl_processing): Initialize static_decls. | |
4255 | * decl2.c (c_parse_final_cleanups): Adjust. | |
4256 | * name-lookup.h (cp_binding_level): Remove static_decls member. | |
4257 | * name-lookup.c (add_decl_to_level): Adjust. | |
4258 | (begin_scope): Adjust. | |
4259 | ||
add0a8db | 4260 | 2017-05-05 Paolo Carlini <paolo.carlini@oracle.com> |
4261 | ||
4262 | PR c++/71577 | |
4263 | * decl.c (reshape_init): Unconditionally return error_mark_node | |
4264 | upon error about too many initializers. | |
4265 | ||
e0e3c67a | 4266 | 2017-05-04 Nathan Sidwell <nathan@acm.org> |
4267 | ||
4268 | * constraint.cc (diagnose_check_constraint): Fix %E thinko. | |
4269 | ||
8c41abe8 | 4270 | 2017-05-04 Martin Sebor <msebor@redhat.com> |
4271 | ||
4272 | PR translation/80280 | |
4273 | * call.c (print_z_candidate): Add missing quoting to %D and other | |
4274 | like directives. | |
4275 | (build_op_call_1): Same. | |
4276 | * constraint.cc (diagnose_check_constraint): Same. | |
4277 | * mangle.c (mangle_decl): Same. | |
4278 | * name-lookup.c (cp_binding_level_debug): Same. | |
4279 | (set_decl_namespace): Same. | |
4280 | * parser.c (cp_parser_tx_qualifier_opt): Same. | |
4281 | * pt.c (print_candidates_1): Same. | |
4282 | (check_template_variable): Same. | |
4283 | (tsubst_default_argument): Same. | |
4284 | (most_specialized_partial_spec): Same. | |
4285 | * semantics.c (omp_reduction_lookup): Same. | |
4286 | * tree.c (check_abi_tag_redeclaration): Same. | |
4287 | * typeck.c (comptypes): Same. | |
4288 | * typeck2.c (abstract_virtuals_error_sfinae): Same. | |
4289 | ||
4fd9bd13 | 4290 | 2017-05-04 Nathan Sidwell <nathan@acm.org> |
4291 | ||
c99e91fe | 4292 | More global trees. |
4293 | * cp-tree.h (enum cp_tree_index): Add CPTI_GLOBAL, | |
4294 | CPTI_GLOBAL_TYPE, CPTI_GLOBAL_IDENTIFIER, CPTI_ANON_IDENTIFIER, | |
4295 | CPTI_INIT_LIST_IDENTIFIER. | |
4296 | (global_namespace, global_type_node, global_identifier, | |
4297 | anon_identifier, init_list_identifier): New. | |
4298 | * decl.c (global_type_node, global_scope_name): Delete. | |
4299 | (initialize_predefined_identifiers): Add new identifiers. | |
4300 | (cxx_init_decl_processing): Adjust. | |
4301 | * name-lookup.h (global_namespace, global_type_node): Delete. | |
4302 | * name-lookup.c (global_namespace, anonymous_namespace_name, | |
4303 | get_anonymous_namespace_name): Delete. | |
4304 | (namespace_scope_ht_size, begin_scope, pushtag_1, | |
4305 | push_namespace): Adjust, | |
4306 | * call.c (type_has_extended_temps): Use init_list_identifier. | |
4307 | * pt.c (listify): Likewise. | |
4308 | ||
4fd9bd13 | 4309 | * name-lookup.c: Reorder functions to make merging from modules |
4310 | branch simpler. | |
4311 | ||
c300fe28 | 4312 | 2017-05-03 Jason Merrill <jason@redhat.com> |
4313 | ||
4314 | * constexpr.c (cxx_eval_outermost_constant_expr): Use TV_CONSTEXPR. | |
4315 | ||
3b1b295c | 4316 | 2017-05-03 Nathan Sidwell <nathan@acm.org> |
4317 | ||
4318 | * cp-tree.h (enum cp_tree_index, cp_global_trees): Move earlier, | |
4319 | along with #defines, to before name-lookup include. | |
4320 | ||
9a436a3a | 4321 | 2017-05-02 Paolo Carlini <paolo.carlini@oracle.com> |
4322 | ||
4323 | * pt.c (is_auto_or_concept): Remove. | |
4324 | (type_uses_auto_or_concept): Remove, unused. | |
4325 | (find_parameter_packs_r, extract_autos_r, is_auto_r): Adjust. | |
4326 | * parser.c (tree_type_is_auto_or_concept): Remove, unused. | |
4327 | * cp-tree.h (is_auto_or_concept): Remove. | |
4328 | ||
92bc38e7 | 4329 | 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn> |
4330 | ||
4331 | PR c++/80038 | |
4332 | * cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Don't | |
4333 | add pedigree operation and detach call here. | |
4334 | * cp-gimplify.c (cp_gimplify_expr): Remove the calls to | |
4335 | cilk_cp_gimplify_call_params_in_spawned_fn. | |
4336 | (cilk_cp_gimplify_call_params_in_spawned_fn): Remove function. | |
4337 | * semantics.c (simplify_aggr_init_expr): Copy EXPR_CILK_SPAWN. | |
4338 | ||
f4a96630 | 4339 | 2017-04-29 Volker Reichelt <v.reichelt@netcologne.de> |
4340 | ||
4341 | * parser.c (cp_parser_member_declaration): Add fix-it hints for | |
4342 | stray comma and missing semicolon at end of member declaration. | |
4343 | ||
c6bcb79f | 4344 | 2017-04-27 Volker Reichelt <v.reichelt@netcologne.de> |
4345 | ||
4346 | * parser.c (cp_parser_cast_expression): Add target type of cast to | |
4347 | diagnostic. | |
4348 | * error.c (type_to_string): Add '{enum}' suffix to enumeration types. | |
4349 | ||
e2d2952e | 4350 | 2017-04-26 Paolo Carlini <paolo.carlini@oracle.com> |
4351 | ||
4352 | * decl.c (grok_ctor_properties, ambi_op_p, unary_op_p): Change | |
4353 | return type to bool. | |
4354 | * cp-tree.h (grok_ctor_properties): Update. | |
4355 | ||
82d479d0 | 4356 | 2017-04-26 Volker Reichelt <v.reichelt@netcologne.de> |
4357 | ||
4358 | * parser.c (cp_parser_nested_name_specifier_opt): Add fix-it | |
4359 | information to diagnostic of invalid colon in nested-name-specifier. | |
4360 | ||
0a2dc096 | 4361 | 2017-04-25 Volker Reichelt <v.reichelt@netcologne.de> |
4362 | ||
4363 | * parser.c (cp_parser_elaborated_type_specifier): Add fix-it to | |
4364 | diagnostic of invalid class/struct keyword after enum. | |
4365 | ||
83e4d5c3 | 4366 | 2017-04-25 David Malcolm <dmalcolm@redhat.com> |
4367 | ||
4368 | * parser.c (cp_parser_member_declaration): Add fix-it hint | |
4369 | for removing stray semicolons. | |
4370 | ||
53d4aae8 | 4371 | 2017-04-25 David Malcolm <dmalcolm@redhat.com> |
4372 | ||
4373 | * name-lookup.c (get_std_name_hint): New function. | |
4374 | (maybe_suggest_missing_header): New function. | |
4375 | (suggest_alternative_in_explicit_scope): Call | |
4376 | maybe_suggest_missing_header. | |
4377 | ||
945c6159 | 4378 | 2017-04-25 David Malcolm <dmalcolm@redhat.com> |
4379 | ||
4380 | PR c++/80177 | |
4381 | * name-lookup.c (suggest_alternative_in_explicit_scope): Convert | |
4382 | candidate type of bm from tree to const char *. | |
4383 | (consider_binding_level): Likewise. | |
4384 | (lookup_name_fuzzy): Likewise, using this to merge the best | |
4385 | result from the preprocessor into bm, rather than immediately | |
4386 | returning, so that better matches from reserved words can "win". | |
4387 | Guard the rejection of keywords that don't start decl-specifiers | |
4388 | so it only happens for FUZZY_LOOKUP_TYPENAME. | |
4389 | ||
5b8d71d1 | 4390 | 2017-04-24 Volker Reichelt <v.reichelt@netcologne.de> |
4391 | ||
4392 | * decl.c (grokdeclarator): Use %qT instead of %<%T%> in diagnostics. | |
4393 | (start_enum): Likewise. | |
4394 | (build_enumerator): Likewise. Use %qE instead of plain %E. | |
4395 | * parser.c (cp_parser_mem_initializer_list): Use %qD instead of | |
4396 | %<%D%> in diagnostics. | |
4397 | (cp_parser_elaborated_type_specifier): Likewise. | |
4398 | * pt.c (make_pack_expansion): Use %qT and %qE instead of | |
4399 | %<%T%> and %<%E%> in diagnostics. | |
4400 | (tsubst_pack_expansion): Likewise. | |
4401 | ||
35f228e4 | 4402 | 2017-04-24 David Malcolm <dmalcolm@redhat.com> |
4403 | ||
4404 | PR c++/80016 | |
4405 | * parser.c (cp_parser_unary_expression): Generate a location | |
4406 | range for alignof and sizeof expressions. | |
4407 | ||
1db009e8 | 4408 | 2017-04-24 Volker Reichelt <v.reichelt@netcologne.de> |
4409 | ||
4410 | * parser.c (cp_parser_cv_qualifier_seq_opt): Add fix-it info to | |
4411 | error message. | |
4412 | (cp_parser_virt_specifier_seq_opt): Likewise. | |
4413 | (set_and_check_decl_spec_loc): Likewise twice. | |
4414 | ||
d9751a3c | 4415 | 2017-04-21 Jason Merrill <jason@redhat.com> |
4416 | ||
4417 | PR c++/80179 - ICE with initialized flexible array member. | |
4418 | * constexpr.c (verify_ctor_sanity): Handle flexible array members. | |
4419 | ||
0b97e551 | 4420 | 2017-04-21 Richard Biener <rguenther@suse.de> |
4421 | ||
4422 | * cp-tree.h (copy_decl): Annotate with CXX_MEM_STAT_INFO. | |
4423 | (copy_type): Likewise. | |
4424 | * lex.c (copy_decl): Pass down mem-stat info. | |
4425 | (copy_type): Likewise. | |
4426 | ||
fe620f97 | 4427 | 2017-04-20 Jonathan Wakely <jwakely@redhat.com> |
4428 | ||
4429 | PR c++/80473 | |
4430 | * init.c (build_new_1): Suppress notes about over-aligned new when | |
4431 | the warning is suppressed. | |
4432 | ||
dc993150 | 4433 | 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de> |
4434 | ||
4435 | * parser.c (cp_parser_member_declaration): Add warning with fixit | |
4436 | information for extra semicolon after in-class function definition. | |
4437 | ||
6bac87c3 | 4438 | 2017-04-20 Jakub Jelinek <jakub@redhat.com> |
4439 | ||
4440 | PR middle-end/80423 | |
4441 | * tree.c (build_cplus_array_type): Call build_array_type | |
4442 | with the intended TYPE_TYPELESS_STORAGE flag value, instead | |
4443 | of calling build_array_type and modifying later TYPE_TYPELESS_STORAGE | |
4444 | on the shared type. | |
4445 | ||
a89c2c4e | 4446 | 2017-04-18 Marek Polacek <polacek@redhat.com> |
4447 | ||
4448 | PR c++/80244 - ICE with attribute in template alias. | |
4449 | * tree.c (strip_typedefs): Handle UNDERLYING_TYPE. | |
4450 | ||
58a20866 | 4451 | PR c++/80241 - ICE with alignas pack expansion. |
4452 | * error.c (dump_expr): Handle TREE_LIST. | |
4453 | * parser.c (cp_parser_std_attribute_list): Return error_mark if | |
4454 | make_pack_expansion returns an error. | |
4455 | ||
13be6c20 | 4456 | 2017-04-17 Bernd Edlinger <bernd.edlinger@hotmail.de> |
4457 | ||
4458 | PR c++/80287 | |
4459 | * class.c (fixup_may_alias): Fix all type variants. | |
4460 | ||
2dfff7ee | 4461 | 2017-04-17 Jason Merrill <jason@redhat.com> |
4462 | ||
73ae962c | 4463 | PR c++/80415 - wrong error with default arg and array reference. |
4464 | * tree.c (lvalue_kind): Return clk_class for an array prvalue. | |
4465 | ||
2dfff7ee | 4466 | * pt.c (tsubst_init): Set TARGET_EXPR_DIRECT_INIT_P. |
4467 | ||
a57c52b8 | 4468 | 2017-04-15 Alexandre Oliva <aoliva@redhat.com> |
4469 | ||
4470 | * decl.c (name_unnamed_type): Split out of... | |
4471 | (grokdeclarator): ... this. | |
4472 | * decl.h (name_unnamed_type): Declare. | |
4473 | ||
3721b151 | 4474 | 2017-04-12 Richard Biener <rguenther@suse.de> |
4475 | Bernd Edlinger <bernd.edlinger@hotmail.de> | |
4476 | ||
4477 | PR middle-end/79671 | |
4478 | * tree.c (build_cplus_array_type): Set TYPE_TYPELESS_STORAGE | |
4479 | for arrays of character or std::byte type. | |
4480 | ||
ce4ffd9e | 4481 | 2017-04-11 Jason Merrill <jason@redhat.com> |
4482 | ||
4483 | PR c++/80294 - ICE with constexpr and inheritance. | |
4484 | * constexpr.c (reduced_constant_expression_p): | |
4485 | A null constructor element is non-constant. | |
4486 | (cxx_eval_indirect_ref): Don't VERIFY_CONSTANT before | |
4487 | returning an empty base. | |
4488 | ||
78cecf8e | 4489 | 2017-04-11 Jakub Jelinek <jakub@redhat.com> |
4490 | ||
4491 | PR c++/80370 | |
4492 | * decl.c (cp_finish_decomp): If processing_template_decl on | |
4493 | non-dependent decl, only set TREE_TYPE on the v[i] decls, but don't | |
4494 | change their DECL_VALUE_EXPR nor cp_finish_decl them. Instead make | |
4495 | sure DECL_VALUE_EXPR is the canonical NULL type ARRAY_REF for tsubst | |
4496 | processing. | |
4497 | * pt.c (value_dependent_expression_p) <case VAR_DECL>: For variables | |
4498 | with DECL_VALUE_EXPR, return true if DECL_VALUE_EXPR is type | |
4499 | dependent. | |
4500 | ||
7fcd7802 | 4501 | 2017-04-11 Jakub Jelinek <jakub@redhat.com> |
4502 | ||
4503 | PR c++/80363 | |
4504 | * error.c (dump_expr): Handle VEC_COND_EXPR like COND_EXPR. | |
4505 | ||
f70998b5 | 4506 | 2017-04-10 Jakub Jelinek <jakub@redhat.com> |
4507 | ||
4508 | PR c++/80176 | |
4509 | * tree.c (lvalue_kind): For COMPONENT_REF with BASELINK second | |
4510 | operand, if it is a static member function, recurse on the | |
4511 | BASELINK. | |
4512 | ||
69450474 | 4513 | 2017-04-10 Marek Polacek <polacek@redhat.com> |
4514 | ||
4515 | PR sanitizer/80348 | |
4516 | * typeck.c (cp_build_binary_op): Use NULL_TREE instead of NULL. Set | |
4517 | ORIG_TYPE earlier and not only when shortening. | |
4518 | ||
4841d4ef | 4519 | 2017-04-07 Jason Merrill <jason@redhat.com> |
4520 | ||
8e6dfb5b | 4521 | PR c++/80356 - ICE with reference to function template argument. |
4522 | PR c++/79294 | |
4523 | * pt.c (convert_nontype_argument_function): Adjust type even with a | |
4524 | value-dependent argument. | |
4525 | ||
4841d4ef | 4526 | PR c++/80267 - ICE with nested capture of reference |
4527 | PR c++/60992 | |
4528 | * pt.c (tsubst_copy): Handle lookup finding a capture proxy. | |
4529 | ||
5eca48eb | 4530 | 2017-04-07 Marek Polacek <polacek@redhat.com> |
4531 | ||
4532 | PR sanitizer/80348 | |
4533 | * typeck.c (cp_build_binary_op): Convert COP[01] to ORIG_TYPE. | |
4534 | ||
ffc5ad9b | 4535 | PR c++/80095 |
4536 | * call.c (build_over_call): Don't check cxx_dialect. | |
4537 | * cp-gimplify.c (cp_gimplify_init_expr): Don't check cxx_dialect nor | |
4538 | whether SUB is a CONSTRUCTOR. | |
4539 | * init.c (build_new_1): Don't check cxx_dialect. | |
4540 | * tree.c (replace_placeholders): Add a function comment. Return if | |
4541 | not in C++14, or if the object isn't a (member of a) class. | |
4542 | * typeck2.c (store_init_value): Don't check cxx_dialect nor whether | |
4543 | TYPE is CLASS_TYPE_P. | |
4544 | ||
d430756d | 4545 | 2017-04-05 Jakub Jelinek <jakub@redhat.com> |
4546 | ||
4547 | PR c++/80309 | |
4548 | * pt.c (canonical_type_parameter): Use vec_safe_grow_cleared instead | |
4549 | of a loop doing vec_safe_push of NULL. Formatting fixes. | |
4550 | (rewrite_template_parm): Copy TEMPLATE_PARM_PARAMETER_PACK from oldidx | |
4551 | to newidx before calling canonical_type_parameter on newtype. | |
4552 | ||
e4b93196 | 4553 | 2017-04-04 Volker Reichelt <v.reichelt@netcologne.de> |
4554 | ||
4555 | PR c++/80296 | |
4556 | * cxx-pretty-print.c (cxx_pretty_printer::expression): Add | |
4557 | UNARY_PLUS_EXPR case. | |
4558 | ||
03719af8 | 4559 | 2017-04-03 Jason Merrill <jason@redhat.com> |
4560 | ||
4561 | * semantics.c (finish_template_type): Check CLASSTYPE_TEMPLATE_INFO. | |
4562 | ||
2fbe7a32 | 4563 | 2017-04-03 Jonathan Wakely <jwakely@redhat.com> |
4564 | ||
4565 | * class.c (update_vtable_entry_for_fn): Fix typo in comment. | |
4566 | * decl2.c (one_static_initialization_or_destruction): Likewise. | |
4567 | * name-lookup.c (store_bindings): Likewise. | |
4568 | * parser.c (make_call_declarator): Likewise. | |
4569 | * pt.c (check_explicit_specialization): Likewise. | |
4570 | ||
c571b0c6 | 4571 | 2017-04-03 Jason Merrill <jason@redhat.com> |
4572 | ||
4573 | PR sanitizer/79993 - ICE with VLA initialization from string | |
4574 | PR c++/69487 - wrong VLA initialization from string | |
4575 | * init.c (finish_length_check): Split out from build_vec_init. | |
4576 | (build_vec_init): Handle STRING_CST. | |
4577 | * typeck2.c (split_nonconstant_init): Handle STRING_CST. | |
4578 | (digest_init_r): Don't give a STRING_CST VLA type. | |
4579 | ||
ca2af7df | 4580 | 2017-03-31 Jakub Jelinek <jakub@redhat.com> |
4581 | ||
3ddb3278 | 4582 | PR c++/79572 |
4583 | * cp-gimplify.c (cp_genericize_r): Sanitize INTEGER_CSTs with | |
4584 | REFERENCE_TYPE. Adjust ubsan_maybe_instrument_reference caller | |
4585 | for NOP_EXPR to REFERENCE_TYPE. | |
4586 | ||
ca2af7df | 4587 | PR libstdc++/80251 |
4588 | * cp-tree.h (enum cp_trait_kind): Add CPTK_IS_AGGREGATE. | |
4589 | * cxx-pretty-print.c (pp_cxx_trait_expression): Handle | |
4590 | CPTK_IS_AGGREGATE. | |
4591 | * semantics.c (trait_expr_value): Handle CPTK_IS_AGGREGATE. | |
4592 | Remove extraneous parens. | |
4593 | (finish_trait_expr): Handle CPTK_IS_AGGREGATE. | |
4594 | * parser.c (cp_parser_primary_expression): Handle RID_IS_AGGREGATE. | |
4595 | (cp_parser_trait_expr): Likewise. | |
4596 | ||
3385a573 | 4597 | 2017-03-27 Jakub Jelinek <jakub@redhat.com> |
4598 | ||
4599 | PR middle-end/80162 | |
4600 | * cp-tree.h (cxx_mark_addressable): Add array_ref_p argument. | |
4601 | * typeck.c (cxx_mark_addressable): Likewise. Look through | |
4602 | VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE | |
4603 | to ARRAY_TYPE. | |
4604 | (cp_build_array_ref): Pass true as array_ref_p to cxx_mark_addressable. | |
4605 | ||
b4e232ea | 4606 | 2017-03-24 Jason Merrill <jason@redhat.com> |
4607 | ||
4608 | PR c++/77339 - ICE with invalid use of alias template. | |
4609 | * pt.c (lookup_template_class_1): Don't try to enter the scope of an | |
4610 | alias template. | |
4611 | ||
d1cd4a64 | 4612 | 2017-03-24 Marek Polacek <polacek@redhat.com> |
4613 | ||
4614 | PR c++/80119 | |
4615 | * cp-gimplify.c (cp_fold): Strip CLEANUP_POINT_EXPR if the expression | |
4616 | doesn't have side effects. | |
4617 | ||
94b464a5 | 4618 | 2017-03-23 Jason Merrill <jason@redhat.com> |
4619 | ||
e73288d3 | 4620 | PR c++/80150 - ICE with overloaded variadic deduction. |
4621 | * pt.c (try_one_overload): Remove asserts. | |
4622 | ||
94b464a5 | 4623 | PR c++/77563 - missing ambiguous conversion error. |
4624 | * call.c (convert_like_real): Use LOOKUP_IMPLICIT. | |
4625 | ||
5c1d51e3 | 4626 | 2017-03-23 Marek Polacek <polacek@redhat.com> |
4627 | ||
4628 | * cp-tree.h: Remove a C_RID_YYCODE reference. | |
4629 | ||
d4d3d389 | 4630 | 2017-03-22 Jakub Jelinek <jakub@redhat.com> |
4631 | ||
4632 | PR c++/80141 | |
4633 | * semantics.c (finish_omp_clause) <case OMP_CLAUSE_SIMDLEN, | |
4634 | case OMP_CLAUSE_ALIGNED>: Call maybe_constant_value only when not | |
4635 | processing_template_decl. | |
4636 | ||
67dd55bd | 4637 | 2017-03-21 Paolo Carlini <paolo.carlini@oracle.com> |
4638 | ||
4639 | PR c++/77752 | |
4640 | * name-lookup.c (pushtag_1): Add check for bogus, non template, | |
4641 | std::initializer_list. | |
4642 | ||
3b7f953b | 4643 | 2017-03-21 Jakub Jelinek <jakub@redhat.com> |
4644 | ||
4645 | PR c++/35878 | |
4646 | * init.c (std_placement_new_fn_p, build_new_1): Formatting fixes. | |
4647 | ||
4885982f | 4648 | 2017-03-21 Ville Voutilainen <ville.voutilainen@gmail.com> |
4649 | ||
4650 | PR c++/35878 | |
3b7f953b | 4651 | * init.c (std_placement_new_fn_p): New. |
4885982f | 4652 | (build_new_1): Call it. |
4653 | ||
9a964bc1 | 4654 | 2017-03-20 Jason Merrill <jason@redhat.com> |
4655 | ||
a1f4b308 | 4656 | PR c++/80096 - ICE with C++17 non-type auto. |
4657 | * pt.c (tsubst): Delay tsubst of type of template non-type | |
4658 | parameter. | |
4659 | ||
96ffae61 | 4660 | PR c++/79519 - ICE with deleted template friend. |
4661 | * decl.c (grokdeclarator): Complain about misplaced function | |
4662 | definition using =, as well. | |
4663 | ||
9a964bc1 | 4664 | PR c++/79640 - infinite recursion with generic lambda. |
4665 | * pt.c (tsubst_copy) [VAR_DECL]: Register the dummy instantiation | |
4666 | before substituting its initializer. | |
4667 | ||
7f690134 | 4668 | 2017-03-20 Marek Polacek <polacek@redhat.com> |
4669 | Paolo Carlini <paolo.carlini@oracle.com> | |
4670 | ||
4671 | PR c++/80059 - ICE with noexcept and __transaction_atomic | |
4672 | * except.c (build_must_not_throw_expr): Call | |
2e5e78a2 | 4673 | instantiate_non_dependent_expr. |
7f690134 | 4674 | |
0ce12360 | 4675 | 2017-03-19 Jason Merrill <jason@redhat.com> |
4676 | ||
b5f774d6 | 4677 | PR c++/80084 - wrong C++17 decomposition by reference of parameter. |
4678 | * decl.c (cp_finish_decomp): Don't pull out the DECL_INITIAL of a | |
4679 | reference decomposition. | |
4680 | ||
0ce12360 | 4681 | PR c++/80077 - error with constexpr and -fno-elide-constructors. |
4682 | * constexpr.c (cxx_eval_call_expression): Set ctx->call while | |
4683 | expanding trivial constructor. | |
4684 | ||
0c2b7cde | 4685 | 2017-03-17 Jason Merrill <jason@redhat.com> |
4686 | ||
91781282 | 4687 | PR c++/78345 - ICE initializing array from lambda. |
4688 | * init.c (build_aggr_init): Check array initializer. | |
4689 | (build_vec_init): Check the type of a CONSTRUCTOR. | |
4690 | ||
0c2b7cde | 4691 | PR c++/80073 - C++17 ICE with virtual base. |
4692 | * decl.c (xref_basetypes): Also check for indirect vbases. | |
4693 | ||
def8e41f | 4694 | 2017-03-16 Jason Merrill <jason@redhat.com> |
4695 | ||
85d41712 | 4696 | * decl.c (start_enum): std::byte aliases anything. |
4697 | ||
def8e41f | 4698 | PR c++/79797 |
4699 | * constexpr.c (lookup_placeholder): Tweak. | |
4700 | ||
2c7d98a7 | 4701 | 2017-03-15 Jason Merrill <jason@redhat.com> |
4702 | ||
4703 | PR c++/80043 - ICE with -fpermissive | |
4704 | * typeck.c (convert_for_assignment): Handle instantiate_type | |
4705 | not giving an error. | |
4706 | ||
e6c88bc4 | 4707 | 2017-03-14 Nathan Sidwell <nathan@acm.org> |
4708 | ||
4709 | PR c++/79393 DR 1658 workaround | |
4710 | * method.c (synthesized_method_base_walk): Inihibit abstract class | |
4711 | virtual base access check here. | |
4712 | (synthesized_method_walk): Not here. | |
4713 | ||
11c999a2 | 4714 | 2017-03-13 Nathan Sidwell <nathan@acm.org> |
4715 | ||
4716 | PR c++/79393 DR 1658 workaround | |
4717 | * method.c (synthesized_method_walk): Check vbases of abstract | |
4718 | classes for dtor walk. | |
4719 | ||
ca1f4c7a | 4720 | 2017-03-10 David Malcolm <dmalcolm@redhat.com> |
4721 | ||
4722 | PR translation/79848 | |
4723 | * decl.c (grokfndecl): Simplify uses of "%<%s%>" to "%qs". | |
4724 | ||
12ac1288 | 4725 | 2017-03-10 Jason Merrill <jason@redhat.com> |
4726 | ||
4727 | PR c++/79960 - alias templates and partial ordering | |
4728 | * pt.c (comp_template_args): Add partial_order parm. | |
4729 | (template_args_equal): Likewise. | |
4730 | (comp_template_args_porder): New. | |
4731 | (get_partial_spec_bindings): Use it. | |
4732 | ||
91158b2e | 4733 | 2017-03-10 Marek Polacek <polacek@redhat.com> |
4734 | ||
4735 | PR c++/79967 | |
4736 | * decl.c (grokdeclarator): Check ATTRLIST before dereferencing it. | |
4737 | ||
19bf26a8 | 4738 | 2017-03-10 Jakub Jelinek <jakub@redhat.com> |
4739 | ||
4611960c | 4740 | PR c++/79899 |
4741 | * optimize.c (maybe_thunk_body): Don't ICE if fns[0] is NULL. | |
4742 | Use XALLOCAVEC macro. | |
4743 | ||
19bf26a8 | 4744 | PR c++/79896 |
4745 | * decl.c (finish_enum_value_list): If value is error_mark_node, | |
4746 | don't copy it and change its type. | |
4747 | * init.c (constant_value_1): Return error_mark_node if DECL_INITIAL | |
4748 | of CONST_DECL is error_mark_node. | |
4749 | ||
0eea69ee | 4750 | 2017-03-09 Marek Polacek <polacek@redhat.com> |
4751 | ||
4752 | PR c++/79900 - ICE in strip_typedefs | |
4753 | * tree.c (strip_typedefs): Skip the attribute handling if T is | |
4754 | a variant type which hasn't been updated yet. | |
4755 | ||
182bef63 | 4756 | PR c++/79687 - wrong code with pointer-to-member |
4757 | * init.c (constant_value_1): Break if the variable has a dynamic | |
4758 | initializer. | |
4759 | ||
85de9604 | 4760 | 2017-03-08 Jason Merrill <jason@redhat.com> |
4761 | ||
4762 | PR c++/79797 - ICE with self-reference in array DMI. | |
4763 | * constexpr.c (lookup_placeholder): Split out... | |
4764 | (cxx_eval_constant_expression): ...from here. | |
4765 | ||
d87f668a | 4766 | 2017-03-07 Jakub Jelinek <jakub@redhat.com> |
4767 | ||
4768 | PR c/79834 | |
4769 | * parser.c (cp_parser_omp_cancellation_point, | |
4770 | cp_parser_omp_target_enter_data, cp_parser_omp_target_exit_data, | |
4771 | cp_parser_omp_target_update): Change "may only be used in compound | |
4772 | statements" diagnostics, such that the same translatable string is | |
4773 | used for all pragmas. | |
4774 | (cp_parser_pragma): Likewise. Use error_at instead of | |
4775 | cp_parser_error for that diagnostics. | |
4776 | ||
1be5de3f | 4777 | 2017-03-06 Marek Polacek <polacek@redhat.com> |
4778 | ||
4779 | PR c++/79796 - ICE with NSDMI and this pointer | |
4780 | * call.c (build_over_call): Handle NSDMI with a 'this' by calling | |
4781 | replace_placeholders. | |
4782 | ||
efea7c64 | 4783 | 2017-03-06 Jakub Jelinek <jakub@redhat.com> |
4784 | ||
4785 | PR c++/79822 | |
4786 | * constexpr.c (cxx_eval_statement_list): Treat empty ({ }) like | |
4787 | ({ (void) 0; }). | |
4788 | ||
f282fca6 | 4789 | 2017-03-06 Jason Merrill <jason@redhat.com> |
4790 | ||
4791 | Revert "Allow deduction guides to look into primary template." | |
4792 | * cp-tree.h, parser.c, pt.c, search.c: Revert. | |
4793 | ||
cf1bf3ab | 4794 | 2017-03-05 Paolo Carlini <paolo.carlini@oracle.com> |
4795 | ||
4796 | PR c++/70266 | |
4797 | * except.c (build_must_not_throw_expr): Perform the implicit | |
4798 | conversions on the condition. | |
4799 | ||
15c1cd60 | 4800 | 2017-03-03 Jason Merrill <jason@redhat.com> |
4801 | ||
957a727b | 4802 | * mangle.c (mangle_decl): Check -Wnoexcept-type instead of |
4803 | -Wc++1z-compat. | |
4804 | ||
15c1cd60 | 4805 | Core issues 2273 and 2277 |
4806 | * call.c (joust): Adjust using-declaration tiebreaker to handle | |
4807 | the intermediate base case. | |
4808 | * method.c (strip_inheriting_ctors): Just return the argument if | |
4809 | !flag_new_inheriting_ctors. | |
4810 | ||
550c1405 | 4811 | 2017-03-03 Richard Biener <rguenther@suse.de> |
4812 | ||
4813 | PR c++/79825 | |
4814 | * cp-gimplify.c (simple_empty_class_p): Handle EMPTY_CLASS_EXPR. | |
4815 | ||
b4b5f44c | 4816 | 2017-03-03 Marek Polacek <polacek@redhat.com> |
4817 | ||
4818 | PR c++/79791 | |
4819 | * typeck.c (string_conv_p): In C++11, always call pedwarn with | |
4820 | OPT_Wwrite_strings. | |
4821 | ||
e04737a5 | 4822 | 2017-03-02 Jason Merrill <jason@redhat.com> |
4823 | ||
387e18c9 | 4824 | Update overload resolution with deduction guides. |
4825 | * pt.c (do_class_deduction): Always build the copy guide. | |
4826 | (copy_guide_p, template_guide_p): New. | |
4827 | (build_deduction_guide): Remember the original constructor. | |
4828 | * call.c (joust): Prefer the copy guide and non-template guides. | |
4829 | ||
e04737a5 | 4830 | Allow deduction guides to look into primary template. |
4831 | * cp-tree.h (struct saved_scope): Add deduction_guide_type. | |
4832 | (struct cp_decl_specifier_seq): Add constructor_p. | |
4833 | * parser.c (cp_parser_decl_specifier_seq): Set constructor_p. | |
4834 | (cp_parser_init_declarator): Check it. Set ctor_dtor_or_conv_p. | |
4835 | Clear deduction_guide_type. Don't handle deduction guide names. | |
4836 | (cp_parser_declarator): Don't clear ctor_dtor_or_conv_p. | |
4837 | (cp_parser_direct_declarator): Likewise. Handle deduction guides. | |
4838 | (cp_parser_member_declaration, cp_parser_cache_defarg) | |
4839 | (cp_parser_objc_class_ivars): Set ctor_dtor_or_conv_p. | |
4840 | * pt.c (tsubst_copy, tsubst_copy_and_build): Revert last change. | |
4841 | (build_deduction_guide): Set deduction_guide_type. | |
4842 | (dependent_scope_p): Check deduction_guide_type. | |
4843 | * search.c (lookup_member): Likewise. | |
4844 | ||
aea47f82 | 4845 | 2017-03-02 Jakub Jelinek <jakub@redhat.com> |
4846 | ||
4847 | PR c++/79782 | |
4848 | * init.c (mark_exp_read_r): New function. | |
4849 | (emit_mem_initializers): Use cp_walk_tree with mark_exp_read_r on | |
4850 | whole arguments instead of plain mark_exp_read on TREE_LIST values. | |
4851 | ||
11aaa98e | 4852 | 2017-03-01 Jason Merrill <jason@redhat.com> |
4853 | ||
4854 | Class template argument deduction in new-expression | |
4855 | * init.c (build_new): Handle deduction from no initializer. | |
4856 | * parser.c (cp_parser_new_expression): Don't require a single | |
4857 | expression for class template deduction. | |
4858 | * typeck2.c (cxx_incomplete_type_diagnostic): Fix diagnostic for | |
4859 | class template placeholder. | |
4860 | * pt.c (tsubst_copy) [TEMPLATE_DECL]: Handle dependent context. | |
4861 | (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: Handle SCOPE_REF. | |
4862 | (redeclare_class_template): Set TEMPLATE_TYPE_PARM_FOR_CLASS. | |
4863 | ||
bd66dbce | 4864 | 2017-03-01 Jakub Jelinek <jakub@redhat.com> |
4865 | ||
4866 | PR c++/79746 | |
4867 | * init.c (emit_mem_initializers): When not constructing vbases of | |
4868 | abstract classes, mark arguments as read for | |
4869 | -Wunused-but-set-parameter. | |
4870 | ||
42decc18 | 4871 | 2017-02-28 Jason Merrill <jason@redhat.com> |
4872 | ||
4873 | Class template argument deduction refinements | |
4874 | * call.c (joust): Move deduction guide tiebreaker down. | |
4875 | * decl.c (start_decl_1, cp_finish_decl, grokdeclarator): Allow class | |
4876 | deduction with no initializer. | |
4877 | * pt.c (build_deduction_guide): Handle implicit default/copy ctor. | |
4878 | (do_class_deduction): Use that rather than special case. | |
4879 | (do_auto_deduction): Handle null initializer. | |
4880 | ||
1caf9cb4 | 4881 | 2017-02-28 Jakub Jelinek <jakub@redhat.com> |
4882 | ||
4883 | * decl.c (find_decomp_class_base): Use cond ? G_("...") : G_("...") | |
4884 | instead of just cond ? "..." : "...". | |
4885 | (grokdeclarator): Likewise. | |
4886 | (build_enumerator): Likewise. | |
4887 | * init.c (build_new_1): Likewise. | |
4888 | * call.c (build_new_method_call_1): Likewise. | |
4889 | * parser.c: Include intl.h. | |
4890 | (cp_parser_oacc_enter_exit_data): Use %s and ternary operator only for | |
4891 | "enter"/"exit" keyword. | |
4892 | (cp_finalize_oacc_routine): Don't use %s to supply portions of the | |
4893 | message. | |
4894 | ||
8e5d6d2a | 4895 | 2017-02-27 Jason Merrill <jason@redhat.com> |
4896 | ||
4897 | PR c++/71568 - SFINAE forming pointer to member function | |
4898 | * init.c (build_offset_ref): Check the return value of | |
4899 | perform_or_defer_access_check. | |
4900 | ||
e420ba82 | 4901 | 2017-02-27 Marek Polacek <polacek@redhat.com> |
4902 | ||
4903 | * decl.c (expand_static_init): Add missing } in a comment. | |
4904 | ||
a3f68502 | 4905 | 2017-02-27 Volker Reichelt <v.reichelt@netcologne.de> |
4906 | ||
4907 | * init.c: Include intl.h. | |
4908 | (build_new_1): Move message strings into pedwarn to make them | |
4909 | -Wformat-security friendly. Mark string for translation. | |
4910 | * pt.c (tsubst_copy_and_build): Mark string for translation. | |
4911 | Make the pointer const. | |
4912 | * semantics.c (finish_id_expression): Mark strings for translation. | |
4913 | ||
7385b605 | 4914 | 2017-02-25 Jakub Jelinek <jakub@redhat.com> |
4915 | ||
4916 | * call.c (build_op_delete_call): Make msg1 and msg2 const. | |
4917 | ||
bbd5521e | 4918 | 2017-02-24 Jakub Jelinek <jakub@redhat.com> |
4919 | ||
4920 | PR c++/79588 | |
4921 | * call.c (build_over_call): Call check_function_arguments even for | |
4922 | -Wrestrict, adjust check_function_arguments caller. | |
4923 | * parser.c (cp_parser_postfix_expression): Don't handle -Wrestrict | |
4924 | here. | |
4925 | * typeck.c (cp_build_function_call_vec): Adjust | |
4926 | check_function_arguments caller. | |
4927 | ||
4d8987f7 | 4928 | 2017-02-24 Marek Polacek <polacek@redhat.com> |
4929 | ||
4930 | PR translation/79705 | |
4931 | * decl.c (check_redeclaration_exception_specification): Mark a string | |
4932 | for translation. Make the pointer const. | |
4933 | ||
c994735e | 4934 | 2017-02-23 Paolo Carlini <paolo.carlini@oracle.com> |
4935 | ||
4936 | PR c++/79361 | |
4937 | * pt.c (register_specialization): Check duplicate_decls return value | |
4938 | for error_mark_node and pass it back. | |
4939 | ||
5c566a08 | 4940 | 2017-02-22 Jason Merrill <jason@redhat.com> |
4941 | ||
1555b8a1 | 4942 | PR c++/79679 - missing destructor for argument |
4943 | * call.c (build_over_call): Don't pass tf_no_cleanup to argument | |
4944 | conversions. | |
4945 | ||
5c566a08 | 4946 | * pt.c (do_class_deduction): Handle 0 argument case. |
4947 | ||
d6a08f5c | 4948 | 2017-02-22 Jakub Jelinek <jakub@redhat.com> |
4949 | ||
4950 | PR c++/79664 | |
4951 | * parser.c (cp_parser_omp_teams, cp_parser_omp_target): Use | |
4952 | SET_EXPR_LOCATION on OMP_TARGET/OMP_TEAMS tree. | |
4953 | * constexpr.c (potential_constant_expression_1): Handle | |
4954 | OMP_*, OACC_* and CILK_* trees. Use error_at with | |
4955 | EXPR_LOC_OR_LOC (t, input_location) computed early | |
4956 | instead of error, or error_at with location_of (t). | |
4957 | ||
aba254d0 | 4958 | 2017-02-22 Marek Polacek <polacek@redhat.com> |
4959 | ||
4960 | PR c++/79653 | |
4961 | * parser.c (cp_parser_std_attribute_spec): Don't build the attribute | |
4962 | if the alignas expression is erroneous. | |
4963 | * pt.c (tsubst_attribute): If tsubst_pack_expansion fails, return | |
4964 | error_mark_node. | |
4965 | ||
2c2c1504 | 4966 | PR c++/79657 |
4967 | * semantics.c (finish_underlying_type): Bail out for incomplete enums. | |
4968 | ||
fc71eeab | 4969 | 2017-02-21 Jason Merrill <jason@redhat.com> |
4970 | ||
46b926f0 | 4971 | PR c++/50308 - wrong deprecated warning with ADL |
4972 | PR c++/17729 - duplicate deprecated warning | |
4973 | * semantics.c (finish_id_expression): Only call mark_used on a | |
4974 | function if we aren't building a call. | |
4975 | ||
fc71eeab | 4976 | PR c++/41727 - ICE with partial spec of partial instantiation |
4977 | * pt.c (process_partial_specialization): For now, don't check more | |
4978 | specialized if there is more than one level of args. | |
4979 | ||
8b744dc9 | 4980 | 2017-02-21 Marek Polacek <polacek@redhat.com> |
4981 | ||
4982 | PR c++/79535 | |
4983 | * cp-tree.h (maybe_reject_flexarray_init): Declare. | |
4984 | * init.c (maybe_reject_flexarray_init): No longer static. | |
4985 | Add check for current_function_decl. | |
4986 | * parser.c (cp_parser_late_parse_one_default_arg): Reject | |
4987 | a default mem-initializer for a flexible array. | |
4988 | ||
c209618b | 4989 | 2017-02-21 Jakub Jelinek <jakub@redhat.com> |
4990 | Paolo Carlini <paolo.carlini@oracle.com> | |
4991 | ||
4992 | PR c++/79654 | |
4993 | * decl.c (cp_finish_decomp): Don't set decl's type to error_mark_node | |
4994 | on error. | |
4995 | * pt.c (tsubst_decomp_names): Return error_mark_node if the first | |
4996 | decl after the decomposition artificial decl has error_mark_node. | |
4997 | * decl2.c (prune_vars_needing_no_initialization): Use error_operand_p | |
4998 | instead of just == error_mark_node comparison. | |
4999 | ||
6993e708 | 5000 | 2017-02-21 Jakub Jelinek <jakub@redhat.com> |
5001 | ||
6966c201 | 5002 | PR sanitizer/79589 |
5003 | * decl.c: Include gimplify.h. | |
5004 | (cp_finish_decomp): Make sure there is no sharing of trees | |
5005 | in between DECL_VALUE_EXPR of decomposition decls. | |
5006 | ||
0acc6340 | 5007 | PR c++/79655 |
5008 | * constexpr.c (cxx_eval_array_reference): Diagnose negative subscript. | |
5009 | ||
6993e708 | 5010 | PR c++/79639 |
5011 | * constexpr.c (cxx_eval_store_expression): If *valp is a PTRMEM_CST, | |
5012 | call cplus_expand_constant on it first. | |
5013 | ||
67378ae5 | 5014 | 2017-02-19 Jason Merrill <jason@redhat.com> |
5015 | ||
b50909bb | 5016 | PR c++/78139 - destructor needed by new-expression |
5017 | * call.c (build_special_member_call): Use tf_no_cleanup. | |
5018 | ||
02b6d4df | 5019 | PR c++/78282 - auto template and pack expansion |
5020 | * pt.c (find_parameter_packs_r): Don't walk into the type of | |
5021 | templates other than template template-parameters. | |
5022 | ||
8de85597 | 5023 | PR c++/79606 - ICE with this->base_member in NSDMI |
5024 | * class.c (build_base_path): Check processing_template_decl. | |
5025 | ||
9722fa48 | 5026 | PR c++/79607 - ICE with T{} initializer |
5027 | * decl.c (type_dependent_init_p): Check the type of a CONSTRUCTOR. | |
5028 | ||
c462f4c4 | 5029 | PR c++/79566 - elaborated-type-specifier in range for |
5030 | * parser.c (cp_parser_simple_declaration): Fix check for type | |
5031 | definition. | |
5032 | ||
3d83084a | 5033 | PR c++/79400 - confusing suggestion of 'noexcept' |
5034 | * parser.c (cp_parser_exception_specification_opt): Remove | |
5035 | suggestion for deprecated dynamic exception-specification. | |
5036 | ||
155f7f70 | 5037 | PR c++/79470 - partial ordering with reference parameters |
5038 | * pt.c (unify) [INDIRECT_REF]: Handle pack expansions. | |
5039 | ||
ef9d5293 | 5040 | PR c++/79500 - ICE with non-template deduction guide |
5041 | * pt.c (do_class_deduction): Use STRIP_TEMPLATE rather than | |
5042 | DECL_TEMPLATE_RESULT. | |
5043 | ||
a37a80f8 | 5044 | PR c++/79580 - ICE with compound literal |
5045 | * parser.c (cp_parser_class_head): If we're in the middle of an | |
5046 | expression, use ts_within_enclosing_non_class. | |
5047 | ||
67378ae5 | 5048 | PR c++/79503 - inherited ctor taking base class |
5049 | * call.c (add_function_candidate): Also check that | |
5050 | DECL_INHERITED_CTOR_BASE is reference-related to the parameter type. | |
5051 | ||
4488d9ee | 5052 | 2017-02-19 Paolo Carlini <paolo.carlini@oracle.com> |
5053 | ||
5054 | PR c++/79380 | |
5055 | * typeck.c (cxx_alignas_expr): Reject a non-integral alignas | |
5056 | argument. | |
5057 | ||
ac8df55e | 5058 | 2017-02-19 Eric Fiselier <eric@efcs.ca> |
5059 | Jonathan Wakely <jwakely@redhat.com> | |
5060 | ||
5061 | PR c++/69523 | |
5062 | * parser.c (cp_parser_unqualified_id): Use OPT_Wliteral_suffix to | |
5063 | control warning about literal suffix identifiers without a leading | |
5064 | underscore. | |
5065 | ||
a4d6d852 | 5066 | 2017-02-17 Jason Merrill <jason@redhat.com> |
5067 | ||
bb5c918a | 5068 | PR c++/79508 - lookup error with member template |
5069 | * parser.c (cp_parser_template_name): Clear | |
5070 | parser->context->object_type if we aren't doing lookup. | |
5071 | ||
b7204f70 | 5072 | PR c++/78690 - ICE with using and global type with same name |
5073 | * pt.c (type_dependent_object_expression_p): True for | |
5074 | IDENTIFIER_NODE. | |
5075 | ||
6757cb00 | 5076 | PR c++/79549 - C++17 ICE with non-type auto template parameter pack |
5077 | * pt.c (convert_template_argument): Just return an auto arg pack. | |
5078 | (tsubst_template_args): Don't tsubst an auto pack type. | |
5079 | ||
5928444e | 5080 | PR c++/79556 - C++17 ICE with non-type auto |
5081 | * pt.c (do_auto_deduction): Don't try to deduce from null type. | |
5082 | ||
a4d6d852 | 5083 | PR c++/79533 - C++17 ICE with temporary cast to reference |
5084 | * call.c (build_over_call): Conversion to a reference prevents copy | |
5085 | elision. | |
5086 | ||
e0ac1f17 | 5087 | 2017-02-16 Jakub Jelinek <jakub@redhat.com> |
5088 | Jason Merrill <jason@redhat.com> | |
5089 | ||
5090 | PR c++/79502 - lost nodiscard attribute | |
5091 | * pt.c (apply_late_template_attributes): Do apply non-dependent | |
5092 | attributes to types. | |
5093 | ||
08d009ac | 5094 | 2017-02-16 Jason Merrill <jason@redhat.com> |
5095 | ||
43b7271d | 5096 | PR c++/78572 - ICE with self-modifying array initializer |
5097 | * constexpr.c (cxx_eval_store_expression): The object we're | |
5098 | initializing is outside the constant-expression. | |
5099 | (cxx_eval_call_expression): Set ctx->call. | |
5100 | ||
08d009ac | 5101 | PR c++/79050 - ICE with undeduced auto and LTO |
5102 | * decl.c (poplevel): Remove undeduced auto decls. | |
5103 | ||
79878c89 | 5104 | 2017-02-16 Jakub Jelinek <jakub@redhat.com> |
5105 | ||
5106 | PR c++/79512 | |
5107 | * parser.c (cp_parser_omp_target): For -fopenmp-simd | |
5108 | ignore #pragma omp target even when not followed by identifier. | |
5109 | ||
b4c5b883 | 5110 | 2017-02-15 Jason Merrill <jason@redhat.com> |
5111 | Jakub Jelinek <jakub@redhat.com> | |
5112 | ||
5113 | PR c++/79464 - ICE in IPA with omitted constructor parms | |
5114 | * class.c (build_clone): Also omit parms from TYPE_ARG_TYPES. | |
5115 | (adjust_clone_args): Adjust. | |
5116 | (add_method): Remember omitted parms. | |
5117 | * call.c (add_function_candidate): Likewise. | |
5118 | * mangle.c (write_method_parms): Likewise. | |
5119 | * method.c (ctor_omit_inherited_parms): Return false if there are no | |
5120 | parms to omit. | |
5121 | ||
2c133d28 | 5122 | 2017-02-15 Martin Sebor <msebor@redhat.com> |
5123 | ||
5124 | PR c++/79363 | |
5125 | * init.c (maybe_reject_flexarray_init): New function. | |
5126 | (perform_member_init): Call it. | |
5127 | ||
84d1a421 | 5128 | 2017-02-15 Jakub Jelinek <jakub@redhat.com> |
5129 | ||
c0375791 | 5130 | PR c++/79301 |
5131 | * parser.c (cp_parser_std_attribute): Don't pedwarn about | |
5132 | [[deprecated]] with -std=c++11 and [[fallthrough]] with | |
5133 | -std=c++11 and -std=c++14. | |
5134 | ||
84d1a421 | 5135 | PR c++/79288 |
5136 | * decl.c (grokdeclarator): For static data members, handle thread_p | |
5137 | only after handling inline. | |
5138 | ||
0dd2f857 | 5139 | 2017-02-14 Marek Polacek <polacek@redhat.com> |
5140 | ||
5141 | PR c++/79420 | |
5142 | PR c++/79463 | |
5143 | * parser.c (cp_parser_postfix_dot_deref_expression): Avoid | |
5144 | clobbering if the postfix expression isn't an EXPR_P. | |
5145 | ||
4952bc85 | 5146 | 2017-02-13 Jason Merrill <jason@redhat.com> |
5147 | ||
5148 | PR c++/79461 - ICE with lambda in constexpr constructor | |
5149 | * constexpr.c (build_data_member_initialization): Ignore | |
5150 | initialization of a local variable. | |
5151 | ||
cd7580a0 | 5152 | 2017-02-13 Jakub Jelinek <jakub@redhat.com> |
5153 | ||
67af79be | 5154 | * init.c (warn_placement_new_too_small): Add missing space in |
5155 | diagnostics. | |
5156 | * parser.c (cp_parser_oacc_declare): Likewise. | |
5157 | * mangle.c (maybe_check_abi_tags): Likewise. | |
5158 | ||
cd7580a0 | 5159 | PR c++/79232 |
5160 | * typeck.c (cp_build_modify_expr): Handle properly COMPOUND_EXPRs | |
5161 | on lhs that have {PRE{DEC,INC}REMENT,MODIFY,MIN,MAX,COND}_EXPR | |
5162 | in the rightmost operand. | |
5163 | ||
5d5f1138 | 5164 | 2017-02-13 Nathan Sidwell <nathan@acm.org> |
5165 | ||
5166 | PR c++/79296 - ICE mangling localized template instantiation | |
5167 | * decl2.c (determine_visibility): Use template fn context for | |
5168 | local class instantiations. | |
5169 | ||
71d4cbd2 | 5170 | 2017-02-11 Jason Merrill <jason@redhat.com> |
5171 | ||
0bc8e9cf | 5172 | PR c++/77659 - ICE with new and C++14 aggregate NSDMI |
5173 | * init.c (build_new): Make backups of any CONSTRUCTORs in init. | |
5174 | (build_new_1): Use replace_placeholders. | |
5175 | * tree.c (replace_placeholders_t): Also track whether we've seen a | |
5176 | placeholder. | |
5177 | (replace_placeholders, replace_placeholders_r): Adjust. | |
5178 | * cp-tree.h: Adjust. | |
5179 | ||
71d4cbd2 | 5180 | PR c++/77790 - ICE with auto function in C++11 mode |
5181 | * decl.c (undeduced_auto_decl): Remove C++14 limitation. | |
5182 | (require_deduced_type): Add complain parm, return bool. | |
5183 | * cp-tree.h: Adjust. | |
5184 | * decl2.c (mark_used): Use require_deduced_type. | |
5185 | ||
d0ff7ded | 5186 | 2017-02-10 Jason Merrill <jason@redhat.com> |
5187 | ||
143b3290 | 5188 | PR c++/78908 - template ops and bitfields |
5189 | * tree.c (build_min_non_dep): Use unlowered_expr_type. | |
5190 | ||
ef782365 | 5191 | PR c++/78897 - constexpr union |
5192 | * constexpr.c (cxx_eval_store_expression): A store to a union member | |
5193 | erases a previous store to another member. | |
5194 | ||
eb80a58e | 5195 | PR c++/71285 - member of fold-expression |
5196 | * semantics.c (finish_unary_fold_expr) | |
5197 | (finish_binary_fold_expr): Use null type for fold-expressions. | |
5198 | ||
d0ff7ded | 5199 | PR c++/79401 - protected inherited constructor |
5200 | * call.c (enforce_access): For inheriting constructor, find a base | |
5201 | binfo in the path we already have. | |
5202 | ||
e40bdc89 | 5203 | 2017-02-10 Marek Polacek <polacek@redhat.com> |
5204 | ||
5205 | PR c++/79435 | |
5206 | * pt.c (type_dependent_expression_p): Check if the expression type | |
5207 | is null. | |
5208 | ||
493196c0 | 5209 | PR c++/79184 |
5210 | * cvt.c (ocp_convert): Add a sentinel against -Wint-in-bool-context | |
5211 | if warnings shouldn't be given. | |
5212 | ||
db462d66 | 5213 | 2017-02-10 Paolo Carlini <paolo.carlini@oracle.com> |
5214 | ||
5215 | PR c++/71737 | |
5216 | * pt.c (tsubst_decl): Don't try to preserve a typedef that names | |
5217 | an error_mark_node as type. | |
5218 | ||
48840b6b | 5219 | 2017-02-09 Jakub Jelinek <jakub@redhat.com> |
5220 | Jason Merrill <jason@redhat.com> | |
5221 | ||
5222 | PR c++/79143 | |
5223 | * pt.c (instantiate_class_template_1): Copy CLASSTYPE_NON_AGGREGATE | |
5224 | from pattern to type. | |
5225 | ||
f31d89ff | 5226 | 2017-02-09 Jason Merrill <jason@redhat.com> |
5227 | ||
5228 | PR c++/79316 - default argument in deduction guide | |
5229 | PR c++/79350 - explicit deduction guide | |
5230 | * parser.c (cp_parser_constructor_declarator_p) | |
5231 | (cp_parser_direct_declarator): Parse deduction guides more like | |
5232 | constructors. | |
5233 | * cp-tree.h (enum special_function_kind): Add sfk_deduction_guide. | |
5234 | * tree.c (special_function_p): Return it. | |
5235 | * decl.c (check_special_function_return_type): Handle it. | |
5236 | (grokdeclarator, grokfndecl): Adjust. | |
5237 | (cp_finish_decl): Pass flags to do_auto_deduction. | |
5238 | * error.c (dump_decl_name): Use TFF_UNQUALIFIED_NAME. | |
5239 | * pt.c (dguide_name_p): Take a const_tree. | |
5240 | (do_class_deduction): Handle explicit. | |
5241 | (do_auto_deduction): Pass flags through. | |
5242 | (build_deduction_guide): Copy explicit flag. | |
5243 | ||
b5c83b44 | 5244 | 2017-02-09 Jakub Jelinek <jakub@redhat.com> |
5245 | ||
b404970b | 5246 | PR c++/79429 |
5247 | * parser.c (cp_parser_omp_ordered): Don't check for non-pragma_stmt | |
5248 | non-pragma_compound context here. | |
5249 | (cp_parser_omp_target): Likewise. | |
5250 | (cp_parser_pragma): Don't call push_omp_privatization_clauses and | |
5251 | parsing for ordered and target omp pragmas in non-pragma_stmt | |
5252 | non-pragma_compound contexts. | |
5253 | ||
b5c83b44 | 5254 | PR c/79431 |
5255 | * parser.c (cp_parser_oacc_declare): Formatting fix. | |
5256 | (cp_parser_omp_declare_target): Don't invoke symtab_node::get on | |
5257 | automatic variables. | |
5258 | ||
719a7570 | 5259 | 2016-02-09 Nathan Sidwell <nathan@codesourcery.com> |
5260 | Chung-Lin Tang <cltang@codesourcery.com> | |
5261 | ||
5262 | * parser.c (cp_parser_oacc_clause_tile): Disallow collapse. Fix | |
5263 | parsing. Parse constant expression. Remove semantic checking. | |
5264 | (cp_parser_omp_clause_collapse): Disallow tile. | |
5265 | (cp_parser_omp_for_loop): Deal with tile clause. Don't emit a parse | |
5266 | error about missing for after already emitting one. Use more | |
5267 | conventional for idiom for unbounded loop. | |
5268 | * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_TILE. | |
5269 | * semantics.c (finish_omp_clauses): Correct TILE semantic check. | |
5270 | (finish_omp_for): Deal with tile clause. | |
5271 | ||
af18e61a | 5272 | 2017-02-07 Nathan Sidwell <nathan@acm.org> |
5273 | ||
5274 | * method.c (synthesized_method_base_walk): New. Broken out of ... | |
5275 | (synthesized_method_walk): ... here. Call it. Cleanup | |
5276 | initializations. | |
5277 | ||
b06ecd3c | 5278 | 2017-02-07 Patrick Palka <ppalka@gcc.gnu.org> |
5279 | ||
5280 | PR c++/79360 | |
5281 | * typeck2.c (process_init_constructor_union): Consider only | |
5282 | FIELD_DECLs when looking for an NSDMI. | |
5283 | ||
bd2417ed | 5284 | 2017-02-06 Jason Merrill <jason@redhat.com> |
5285 | ||
5286 | PR c++/71193 - incomplete types in templates | |
5287 | * parser.c (cp_parser_postfix_dot_deref_expression): In a template | |
5288 | handle incomplete type by pedwarning and then treating as dependent. | |
5289 | ||
b5cc540a | 5290 | 2017-02-06 Jakub Jelinek <jakub@redhat.com> |
5291 | ||
24c6ee98 | 5292 | PR c++/79379 |
5293 | * constexpr.c (cxx_eval_constant_expression): Handle ANNOTATE_EXPR. | |
5294 | (potential_constant_expression_1): Likewise. | |
5295 | ||
cba2f106 | 5296 | PR c++/79377 |
5297 | * tree.c (build_min_non_dep_op_overload): For POST{INC,DEC}REMENT_EXPR | |
5298 | allow one fewer than expected arguments if flag_permissive. | |
5299 | ||
b5cc540a | 5300 | PR c++/79372 |
5301 | * decl.c (cp_finish_decomp): On error set decl type to error_mark_node. | |
5302 | * pt.c (tsubst_expr): Don't call tsubst_decomp_names on decompositions | |
5303 | with error_mark_node type. | |
5304 | ||
41ac8cbf | 5305 | 2017-02-03 Jason Merrill <jason@redhat.com> |
5306 | ||
bfd3584e | 5307 | PR c++/78689 - ICE on constructor with label |
5308 | * optimize.c (maybe_clone_body): Replace omitted parameters with | |
5309 | null lvalues. | |
5310 | * class.c (build_clone): Fix logic for omitting inherited parms. | |
5311 | ||
b601ad30 | 5312 | PR c++/12245 - excessive memory use |
5313 | * constexpr.c (maybe_constant_value): Fold maybe_constant_value_1 | |
5314 | back in. Don't cache constants. | |
5315 | (maybe_constant_init): Don't cache constants. | |
5316 | ||
41ac8cbf | 5317 | PR c++/79294 - ICE with invalid template argument |
5318 | * pt.c (convert_nontype_argument_function): Check value-dependence. | |
5319 | (convert_nontype_argument): Don't check it here for function ptrs. | |
5320 | ||
4ecaaab2 | 5321 | 2017-02-02 Richard Biener <rguenther@suse.de> |
5322 | ||
5323 | PR cp/14179 | |
5324 | * cp-gimplify.c (cp_fold): When folding a CONSTRUCTOR copy | |
5325 | it lazily on the first changed element only and copy it | |
5326 | fully upfront, only storing changed elements. | |
5327 | ||
82c53ea9 | 5328 | 2017-02-02 Paolo Carlini <paolo.carlini@oracle.com> |
5329 | ||
5330 | PR c++/69637 | |
5331 | * decl2.c (grokbitfield): In case of error don't set-up DECL_INITIAL | |
5332 | to the width. | |
5333 | ||
636eeb71 | 5334 | 2017-01-31 Jakub Jelinek <jakub@redhat.com> |
5335 | ||
5336 | PR c++/79304 | |
5337 | * error.c (dump_expr) <case COMPONENT_REF>: Don't print . | |
5338 | after ARROW_EXPR. | |
5339 | ||
90b33123 | 5340 | 2017-01-31 David Malcolm <dmalcolm@redhat.com> |
5341 | ||
5342 | PR c++/79298 | |
5343 | * name-lookup.c (suggest_alternative_in_explicit_scope): Resolve | |
5344 | any namespace aliases. | |
5345 | ||
3ac2178b | 5346 | 2017-01-31 Nathan Sidwell <nathan@acm.org> |
5347 | ||
3ce5daa2 | 5348 | PR c++/79290 |
5349 | * typeck.c (build_ptrmemfunc_access_expr): Set TREE_NO_WARNING. | |
5350 | ||
42c456a7 | 5351 | PR c++/67273 |
5352 | PR c++/79253 | |
5353 | * pt.c: (instantiate_decl): Push to top level when current | |
5354 | function scope doesn't match. Only push lmabda scope stack when | |
5355 | pushing to top. | |
5356 | ||
655df35b | 5357 | * cp-tree.h (instantiate_decl): Make defer_ok bool. |
5358 | * pt.c: Fix instantiate_decl calls to pass true/false not 0/1 | |
5359 | (instantiate_decl): Simplify and reorder state saving and restoration. | |
5360 | ||
3ac2178b | 5361 | PR c++/79264 |
5362 | * lambda.c (maybe_generic_this_capture): Deal with template-id-exprs. | |
5363 | * semantics.c (finish_member_declaration): Assert class is being | |
5364 | defined. | |
5365 | ||
37af486a | 5366 | 2017-01-30 Alexandre Oliva <aoliva@redhat.com> |
5367 | ||
5368 | Introduce C++ support in libcc1. | |
5369 | * cp-tree.h (struct lang_identifier): Add oracle_looked_up. | |
5370 | (ansi_opname): Rename to... | |
5371 | (cp_operator_id): ... this. Adjust all callers. | |
5372 | (ansi_assopname): Rename to... | |
5373 | (cp_assignment_operator_id): ... this. Adjust all callers. | |
5374 | (cp_literal_operator_id): Declare. | |
5375 | (set_global_friend): Declare. | |
5376 | (is_global_friend): Declare. | |
5377 | (enum cp_oracle_request): New type. | |
5378 | (cp_binding_oracle_function): New type. | |
5379 | (cp_binding_oracle): Declare. | |
5380 | (cp_finish_injected_record_type): Declare. | |
5381 | * friend.c (global_friend): New var. | |
5382 | (set_global_friend): New fn. | |
5383 | (is_global_friend): New fn. | |
5384 | (is_friend): Call is_global_friend. | |
5385 | * name-lookup.c (cp_binding_oracle): New var. | |
5386 | (query_oracle): New fn. | |
5387 | (qualified_lookup_using_namespace): Call query_oracle. | |
5388 | (lookup_name_real_1): Likewise. | |
5389 | * parser.c (cp_literal_operator_id): Drop static. | |
5390 | * search.c (friend_accessible_p): Call is_global_friend. | |
5391 | * semantics.c (is_this_parameter): Accept a variable if the | |
5392 | binding oracle is enabled. | |
5393 | ||
a294cb9e | 5394 | 2017-01-27 Jason Merrill <jason@redhat.com> |
5395 | ||
5396 | PR c++/78771 - ICE with inherited constructor. | |
5397 | * call.c (build_over_call): Call deduce_inheriting_ctor here. | |
5398 | * pt.c (tsubst_decl): Not here. | |
5399 | * class.c (add_method): Or here. | |
5400 | * method.c (deduce_inheriting_ctor): Handle clones. | |
5401 | (implicitly_declare_fn): Don't deduce inheriting ctors yet. | |
5402 | ||
59fdc96f | 5403 | 2017-01-27 Adam Butcher <adam@jessamine.co.uk> |
5404 | ||
5405 | PR c++/64382 | |
5406 | * cp/parser.c (parsing_default_capturing_generic_lambda_in_template): | |
5407 | New function. | |
5408 | * cp/cp-tree.h: Declare it. | |
5409 | * cp/semantics.c (finish_id_expression): Resolve names within a default | |
5410 | capturing generic lambda defined within a template prior to | |
5411 | instantiation to allow for captures to be added to the closure type. | |
5412 | ||
d91fe718 | 5413 | 2017-01-26 Jakub Jelinek <jakub@redhat.com> |
5414 | ||
5415 | PR c++/68727 | |
5416 | * cp-tree.def (OFFSETOF_EXPR): Bump number of operands to 2. | |
5417 | * cp-tree.h (finish_offsetof): Add OBJECT_PTR argument. | |
5418 | * parser.c (cp_parser_builtin_offsetof): Pass result of | |
5419 | build_static_cast of null_pointer_node to finish_offsetof. | |
5420 | * semantics.c (finish_offsetof): Add OBJECT_PTR argument, use | |
5421 | it for -Winvalid-offsetof pedwarn instead of trying to guess | |
5422 | original offsetof type from EXPR. Save OBJECT_PTR as a new | |
5423 | second operand to OFFSETOF_EXPR. | |
5424 | * pt.c (tsubst_copy_and_build) <case OFFSETOF_EXPR>: Adjust | |
5425 | finish_offsetof caller, pass the second operand of OFFSETOF_EXPR | |
5426 | as OBJECT_PTR. | |
5427 | ||
d7670757 | 5428 | 2017-01-26 Jason Merrill <jason@redhat.com> |
5429 | ||
6b4374bc | 5430 | * name-lookup.c (parse_using_directive): Deprecate strong using. |
5431 | ||
d7670757 | 5432 | PR c++/79176 - lambda ICE with -flto -Os |
5433 | * decl2.c (vague_linkage_p): Handle decloned 'tors. | |
5434 | * tree.c (decl_linkage): Likewise. | |
5435 | ||
50a16e31 | 5436 | 2017-01-25 Martin Sebor <msebor@redhat.com> |
5437 | ||
329b8a24 | 5438 | * decl.c (grokdeclarator): Fix a typo in a comment. |
50a16e31 | 5439 | |
ff45b474 | 5440 | 2017-01-25 Jakub Jelinek <jakub@redhat.com> |
5441 | ||
ecdf7514 | 5442 | PR c++/78896 |
5443 | * decl.c (cp_finish_decomp): Disallow memberwise decomposition of | |
5444 | lambda expressions. | |
5445 | ||
ff45b474 | 5446 | PR c++/77914 |
5447 | * parser.c (cp_parser_lambda_declarator_opt): Pedwarn with | |
5448 | OPT_Wpedantic on lambda templates for -std=c++14 and higher. | |
5449 | ||
96afa092 | 5450 | 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com> |
5451 | ||
5452 | PR lto/79061 | |
5453 | * decl.c (cxx_init_decl_processing): Pass main_input_filename | |
5454 | to build_translation_unit_decl. | |
5455 | ||
0e899ffe | 5456 | 2017-01-24 Jakub Jelinek <jakub@redhat.com> |
5457 | ||
5458 | PR c++/79205 | |
5459 | * cp-gimplify.c (cp_genericize_r): Add result of | |
5460 | convert_from_reference on invisiref parm to p_set. | |
5461 | ||
2f4cab3c | 5462 | 2017-01-24 Nathan Sidwell <nathan@acm.org> |
5463 | ||
e07fb6a7 | 5464 | PR c++/78469 - defaulted ctor and inaccessible dtor |
5465 | * cp-tree.h (tsubst_flags): Add tf_no_cleanup. | |
5466 | * init.c (build_new_1): Pass tf_no_cleanup to build_value_init. | |
5467 | * tree.c (build_target_expr): Check tf_no_cleanup. | |
5468 | ||
2f4cab3c | 5469 | PR c++/79118 - anon-members and constexpr |
5470 | * constexpr.c (cx_check_missing_mem_inits): Caller passes type not | |
5471 | ctor decl. Recursively check anonymous members. | |
5472 | (register_constexpr_fundef): Adjust cx_check_missing_mem_inits | |
5473 | call. | |
5474 | (explain_invalid_constexpr_fn): Likewise. | |
5475 | ||
340a2497 | 5476 | 2017-01-23 Nathan Sidwell <nathan@acm.org> |
5477 | ||
76b0d9e5 | 5478 | PR c++/71710 - template using directive of field |
5479 | * pt.c (tsubst_copy_and_build [COMPONENT_REF]): Move FIELD_DECL | |
5480 | check earlier. | |
5481 | ||
340a2497 | 5482 | PR c++/71406 - ICE with scope-ref'd template id exprs |
5483 | PR c++/77508 | |
5484 | * typeck.c (finish_class_member_access_expr): Break up SCOPE_REF | |
5485 | before breaking up TEMPLATE_ID_EXPR. | |
5486 | ||
6f0a524c | 5487 | 2017-01-20 Nathan Sidwell <nathan@acm.org> |
5488 | ||
5489 | PR c++/78495 - wrong code inherited ctor and invisi-ref parm | |
5490 | * cp-gimplify.c (cp_generize_r): Don't skip thunks. | |
5491 | ||
f778e503 | 5492 | 2017-01-20 David Malcolm <dmalcolm@redhat.com> |
5493 | ||
5494 | PR c++/77829 | |
5495 | PR c++/78656 | |
5496 | * cp-tree.h (suggest_alternatives_for): Add bool param. | |
5497 | (suggest_alternative_in_explicit_scope): New decl. | |
5498 | * error.c (qualified_name_lookup_error): When SCOPE is a namespace | |
5499 | that isn't the global one, call new function | |
5500 | suggest_alternative_in_explicit_scope, only calling | |
5501 | suggest_alternatives_for if it fails, and disabling near match | |
5502 | searches fort that case. When SCOPE is the global namespace, | |
5503 | pass true for new param to suggest_alternatives_for to allow for | |
5504 | fuzzy name lookups. | |
5505 | * lex.c (unqualified_name_lookup_error): Pass true for new param | |
5506 | to suggest_alternatives_for. | |
5507 | * name-lookup.c (consider_binding_level): Add forward decl. | |
5508 | (suggest_alternatives_for): Add "suggest_misspellings" param, | |
5509 | using it to conditionalize the fuzzy name-lookup code. | |
5510 | (suggest_alternative_in_explicit_scope): New function. | |
5511 | * parser.c (cp_parser_primary_expression): When calling | |
5512 | finish_id_expression, pass location of id_expression rather | |
5513 | than that of id_expr_token. | |
5514 | (cp_parser_id_expression): Convert local "unqualified_id" from | |
5515 | tree to cp_expr to avoid implicitly dropping location information. | |
5516 | ||
3ef7eab1 | 5517 | 2017-01-20 Marek Polacek <polacek@redhat.com> |
5518 | ||
5519 | PR c/64279 | |
5520 | * call.c (build_conditional_expr_1): Warn about duplicated branches. | |
5521 | * semantics.c (finish_expr_stmt): Build statement using the proper | |
5522 | location. | |
5523 | ||
46fd36c9 | 5524 | 2017-01-19 Jason Merrill <jason@redhat.com> |
5525 | ||
fb14a947 | 5526 | US 20 - forwarding references and class template argument deduction |
5527 | * cp-tree.h (TEMPLATE_TYPE_PARM_FOR_CLASS): New. | |
5528 | * pt.c (push_template_decl_real): Set it. | |
5529 | (maybe_adjust_types_for_deduction): Check it. | |
5530 | (rewrite_template_parm): Copy it. | |
5531 | ||
d5d551c7 | 5532 | US 19 - deduction guides and constructors |
5533 | * call.c (joust): Prefer deduction guides to constructors. | |
5534 | * pt.c (build_deduction_guide): Set DECL_ARTIFICIAL. | |
5535 | (deduction_guide_p): Check DECL_P. | |
5536 | ||
6d0c5d85 | 5537 | * decl.c (check_initializer): Always use build_aggr_init for array |
5538 | decomposition. | |
5539 | ||
46fd36c9 | 5540 | PR c++/79130 - decomposition and direct-initialization |
5541 | * init.c (build_aggr_init): Communicate direct-initialization to | |
5542 | build_vec_init. | |
5543 | (build_vec_init): Check for array copy sooner. | |
5544 | * parser.c (cp_parser_decomposition_declaration): Remove call to | |
5545 | build_x_compound_expr_from_list. | |
5546 | ||
4e2cb1d9 | 5547 | 2017-01-18 Jason Merrill <jason@redhat.com> |
5548 | ||
5549 | PR c++/68666 - member variable template-id | |
5550 | * typeck.c (finish_class_member_access_expr): Handle variable | |
5551 | template-id. | |
5552 | * pt.c (lookup_and_finish_template_variable): No longer static. | |
5553 | * cp-tree.h: Declare it. | |
5554 | ||
5dd8ae13 | 5555 | 2017-01-18 Nathan Sidwell <nathan@acm.org> |
5556 | ||
5557 | PR c++/78488 | |
5558 | * call.c (build_over_call): When checking ellipsis conversions for | |
5559 | an inherited ctor, make sure there is at least one conversion. | |
5560 | ||
7ad17b58 | 5561 | 2017-01-18 Jason Merrill <jason@redhat.com> |
3af292f3 | 5562 | |
5563 | PR c++/78894 - ICE with class deduction and default arg | |
5564 | * pt.c (build_deduction_guide): Set DECL_PRIMARY_TEMPLATE. | |
5565 | ||
32d3ed1d | 5566 | 2017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de> |
5567 | ||
5568 | PR c++/77489 | |
5569 | * mangle.c (write_discriminator): Reorganize abi warning check. | |
5570 | ||
4afe894b | 5571 | 2017-01-18 Nathan Sidwell <nathan@acm.org> |
5572 | ||
8a0fefbc | 5573 | * cp-tree.h: Clarify exception spec node comment. |
5574 | * except.c (nothrow_spec_p): Simplify by checking node-equality. | |
5575 | ||
4afe894b | 5576 | PR c++/79091 |
5577 | * mangle.c (write_exception_spec): Check nothrow explicitly. | |
5578 | (write_encoding): Don't increment processing_template_decl around | |
5579 | encoding. | |
5580 | ||
322066d8 | 5581 | 2017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de> |
5582 | ||
5583 | PR c++/70182 | |
5584 | * mangle.c (write_template_args): Add "on" for operator names. | |
5585 | ||
a2929a3a | 5586 | 2017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de> |
5587 | ||
5588 | PR c++/77489 | |
5589 | * mangle.c (write_discriminator): Handle discriminator >= 10. | |
5590 | ||
e395357f | 5591 | 2017-01-17 Nathan Sidwell <nathan@acm.org> |
5592 | ||
5593 | PR c++/61636 | |
5594 | * cp-tree.h (maybe_generic_this_capture): Declare. | |
5595 | * lambda.c (resolvable_dummy_lambda): New, broken out of ... | |
5596 | (maybe_resolve_dummy): ... here. Call it. | |
5597 | (maybe_generic_this_capture): New. | |
5598 | * parser.c (cp_parser_postfix_expression): Speculatively capture | |
5599 | this in generic lambda in unresolved member function call. | |
5600 | * pt.c (tsubst_copy_and_build): Force hard error from failed | |
5601 | member function lookup in generic lambda. | |
5602 | ||
54b39471 | 5603 | 2017-01-17 Aldy Hernandez <aldyh@redhat.com> |
5604 | ||
5605 | PR c++/70565 | |
5606 | * cp-array-notation.c (expand_array_notation_exprs): Handle | |
5607 | OMP_PARALLEL. | |
5608 | ||
608d104a | 5609 | 2017-01-11 Jason Merrill <jason@redhat.com> |
5610 | ||
5611 | PR c++/78337 - ICE on invalid with generic lambda | |
5612 | * semantics.c (process_outer_var_ref): Check if containing_function | |
5613 | is null. Move inform call under complain test. | |
5614 | ||
a9306ccb | 5615 | 2017-01-11 Nathan Sidwell <nathan@acm.org> |
5616 | ||
5617 | PR c++/77812 | |
5618 | * name-lookup.c (set_namespace_binding_1): An overload of 1 decl | |
5619 | is a new overload. | |
5620 | ||
3b8d663f | 5621 | 2017-01-11 Nathan Sidwell <nathan@acm.org> |
5622 | ||
5623 | * name-lookup.c (push_overloaded_decl_1): Refactor OVERLOAD creation. | |
5624 | ||
9a26d403 | 5625 | 2017-01-11 Jakub Jelinek <jakub@redhat.com> |
5626 | ||
945272da | 5627 | PR c++/78341 |
5628 | * parser.c (cp_parser_std_attribute_spec): Remove over-eager | |
5629 | assertion. Formatting fix. | |
5630 | ||
9a26d403 | 5631 | PR c++/72813 |
5632 | * decl2.c (c_parse_final_cleanups): Set flag_syntax_only to 1 after | |
5633 | writing PCH file. | |
5634 | ||
9348467c | 5635 | 2017-01-10 David Malcolm <dmalcolm@redhat.com> |
5636 | ||
5637 | PR c++/77949 | |
5638 | * parser.c (cp_parser_class_specifier_1): Only suggest inserting | |
5639 | a missing semicolon if we have a valid insertion location for | |
5640 | the fix-it hint. | |
5641 | ||
593b46d1 | 5642 | 2017-01-10 Jason Merrill <jason@redhat.com> |
5643 | ||
5644 | FI 20, decomposition declaration with parenthesized initializer. | |
5645 | * parser.c (cp_parser_decomposition_declaration): Use | |
5646 | cp_parser_initializer. | |
5647 | ||
caba101f | 5648 | 2017-01-09 Jason Merrill <jason@redhat.com> |
5649 | ||
5650 | Implement P0195R2, C++17 variadic using. | |
5651 | * parser.c (cp_parser_using_declaration): Handle ellipsis and comma. | |
5652 | * pt.c (tsubst_decl): Handle pack expansion in USING_DECL_SCOPE. | |
5653 | * error.c (dump_decl): Likewise. | |
5654 | ||
d0abd9e0 | 5655 | 2017-01-09 Jakub Jelinek <jakub@redhat.com> |
5656 | ||
5657 | PR translation/79019 | |
5658 | PR translation/79020 | |
5659 | * semantics.c (finish_omp_clauses): Add missing whitespace to | |
5660 | translatable strings. | |
5661 | * cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Fix comment typo. | |
5662 | ||
66d09a96 | 5663 | 2017-01-07 Jason Merrill <jason@redhat.com> |
5664 | ||
5665 | PR c++/78948 - instantiation from discarded statement | |
5666 | * parser.h (struct cp_parser): Remove in_discarded_stmt field. | |
5667 | * cp-tree.h (in_discarded_stmt): Declare it. | |
5668 | (struct saved_scope): Add discarded_stmt bitfield. | |
5669 | (in_discarded_stmt): New macro. | |
5670 | * decl2.c (mark_used): Check it. | |
5671 | * parser.c (cp_parser_selection_statement): Adjust. | |
5672 | (cp_parser_jump_statement): Adjust. | |
5673 | ||
e6ceca69 | 5674 | 2017-01-05 Jakub Jelinek <jakub@redhat.com> |
5675 | ||
9d7b3aa6 | 5676 | PR c++/78931 |
5677 | * decl.c (cp_finish_decomp): Remove probe variable, if tt is | |
5678 | REFERENCE_REF_P, set tt to its operand. | |
5679 | ||
e6ceca69 | 5680 | PR c++/78890 |
5681 | * class.c (check_field_decls): Diagnose REFERENCE_TYPE fields in | |
5682 | unions even for C++11 and later. | |
5683 | ||
54631f19 | 5684 | 2017-01-05 Nathan Sidwell <nathan@acm.org> |
5685 | ||
5686 | PR c++/78765 | |
5687 | * pt.c (convert_nontype_argument): Don't try and see if integral | |
5688 | or enum expressions are constants prematurely. | |
5689 | ||
6124217c | 5690 | 2017-01-04 Marek Polacek <polacek@redhat.com> |
5691 | ||
5692 | PR c++/64767 | |
5693 | * typeck.c (cp_build_binary_op): Warn when a pointer is compared with | |
5694 | a zero character literal. | |
5695 | ||
424874ef | 5696 | 2017-01-04 Jakub Jelinek <jakub@redhat.com> |
5697 | ||
0b16b811 | 5698 | PR c++/78949 |
5699 | * typeck.c (cp_build_unary_op): Call mark_rvalue_use on arg if it has | |
5700 | vector type. | |
5701 | ||
eccc8e87 | 5702 | PR c++/78693 |
5703 | * parser.c (cp_parser_simple_declaration): Only complain about | |
5704 | inconsistent auto deduction if auto_result doesn't use auto. | |
5705 | ||
04e02ebd | 5706 | * parser.c (cp_parser_simple_declaration): Diagnose function |
5707 | declaration among more than one init-declarators with auto | |
5708 | specifier. | |
5709 | ||
424874ef | 5710 | PR c++/71182 |
5711 | * parser.c (cp_lexer_previous_token): Use vec_safe_address in the | |
5712 | assertion, as lexer->buffer may be NULL. | |
5713 | ||
fd130325 | 5714 | 2017-01-04 Marek Polacek <polacek@redhat.com> |
5715 | ||
5716 | PR c++/77545 | |
5717 | PR c++/77284 | |
5718 | * constexpr.c (potential_constant_expression_1): Handle CLEANUP_STMT. | |
5719 | ||
adcbdb02 | 5720 | 2017-01-04 Nathan Sidwell <nathan@acm.org> |
5721 | ||
5722 | PR c++/66735 | |
5723 | * cp-tree.h (DECLTYPE_FOR_REF_CAPTURE): New. | |
5724 | (lambda_capture_field_type): Update prototype. | |
5725 | * lambda.c (lambda_capture_field_type): Add is_reference parm. | |
5726 | Add referenceness here. | |
5727 | (add_capture): Adjust lambda_capture_field_type call, refactor | |
5728 | error checking. | |
5729 | * pt.c (tsubst): Adjust lambda_capture_field_type call. | |
5730 | ||
aad93da1 | 5731 | 2017-01-01 Jakub Jelinek <jakub@redhat.com> |
d353bf18 | 5732 | |
5733 | Update copyright years. | |
7dfbd804 | 5734 | \f |
aad93da1 | 5735 | Copyright (C) 2017 Free Software Foundation, Inc. |
7dfbd804 | 5736 | |
5737 | Copying and distribution of this file, with or without modification, | |
5738 | are permitted in any medium without royalty provided the copyright | |
5739 | notice and this notice are preserved. |