]>
Commit | Line | Data |
---|---|---|
b67b23f0 NS |
1 | 2017-05-26 Nathan Sidwell <nathan@acm.org> |
2 | ||
3c9feefc NS |
3 | Inline and using namespace representation change. |
4 | * cp-tree.h (struct lang_decl_ns): Delete ns_using. Add usings, | |
5 | inlinees as vector. | |
6 | (DECL_NAMESPACE_USING): Adjust. | |
7 | (DECL_NAMESPACE_INLINEES): New. | |
8 | * name-lookup.h (struct cp_binding_level): Change usings | |
9 | representation. | |
10 | * name-lookup.c (name_lookup::do_queue_usings, | |
11 | name_lookup::queue_usings): Adjust. | |
12 | (name_lookup::search_namespace, name_lookup::search_usings, | |
13 | name_lookup::queue_namespace): Adjust. | |
14 | (name_lookup::adl_namespace_only): Adjust. | |
15 | (add_using_namespace, push_namespace): Push onto vector. | |
16 | (pop_namespace): Add timing logic. | |
17 | ||
e1cad930 NS |
18 | * call.c (build_operator_new_call): Do namelookup and ADL here. |
19 | (build_new_op_1): Likewise. | |
20 | * name-lookup.h (lookup_function_nonclass): Delete declaration. | |
21 | (do_using_directive): Likewise. | |
22 | * name-lookup.c (set_namespace_binding, push_local_binding): Don't | |
23 | declare early. | |
24 | (struct scope_binding): Delete. | |
25 | (EMPTY_SCOPE_BINDING): Delete. | |
26 | (set_decl_namespace): Use OVL_P. | |
27 | (finish_local_using_decl): Lose unnecesary checks. | |
28 | (lookup_function_nonclass): Delete. | |
29 | (cp_emit_debug_info_for_using): Use MAYBE_BASELINK_P. | |
30 | ||
32196b87 NS |
31 | * cp-tree.h (OVL_CHAIN): Check looking at OVERLOAD. |
32 | (ovl_iterator): Add allow_inner field. Adjust ctor. Make | |
33 | unduplicatable. | |
34 | (ovl_iterator::maybe_push, ovl_iterator::pop): New. | |
35 | (lkp_iterator): Add outer field. Adjust ctor. | |
36 | (lkp_iterator::operator++): New. | |
37 | (lookup_mark, lookup_maybe_add): Declare. | |
38 | * name-lookup.c (name_lookup): Delete fn_set member. | |
39 | (name_lookup::preserve_state, name_lookup::restore_state): Unmark | |
40 | and mark lookup. | |
41 | (name_lookup::add_value): Use lookup_add directly. | |
42 | (name_lookup::add_fns: Use lookup_maybe_add. | |
43 | (name_lookup::search_adl): Mark and unmark fns. | |
44 | (pushdecl): Adjust. | |
45 | * pt.c (check_explicit_specialization): Use lookup_add directly. | |
46 | * ptree.c (cxx_print_xnode): Show complete overload structure. | |
47 | * tree.c (lookup_mark, lookup_maybe_add): New. | |
48 | ||
b67b23f0 NS |
49 | * name-lookup.c (name_lookup::search_adl): ADL OMP UDR type args. |
50 | ||
6fc9f7aa JJ |
51 | 2017-05-26 Jakub Jelinek <jakub@redhat.com> |
52 | ||
53 | * cp-tree.h (struct lang_decl_decomp): New type. | |
54 | (struct lang_decl): Add u.decomp. | |
55 | (LANG_DECL_DECOMP_CHECK): Define. | |
56 | (DECL_DECOMPOSITION_P): Note it is set also on the vars | |
57 | for user identifiers. | |
58 | (DECL_DECOMP_BASE): Define. | |
59 | (retrofit_lang_decl): Add extra int = 0 argument. | |
60 | * lex.c (retrofit_lang_decl): Add SEL argument, if non-zero | |
61 | use it to influence the selector choices and for selector | |
62 | 0 to non-zero transition copy old content. | |
63 | (cxx_dup_lang_specific_decl): Handle DECL_DECOMPOSITION_P. | |
64 | * decl.c (poplevel): For DECL_DECOMPOSITION_P, check | |
65 | !DECL_DECOMP_BASE instead of !DECL_VALUE_EXPR. Adjust warning | |
66 | wording if decl is a structured binding. | |
67 | (cp_finish_decomp): Pass 4 as the new argument to retrofit_lang_decl. | |
68 | Set DECL_DECOMP_BASE. Ignore DECL_READ_P sets from initialization | |
69 | of individual variables for tuple structured bindings. | |
70 | (grokdeclarator): Pass 4 as the new argument to retrofit_lang_decl. | |
71 | Clear DECL_DECOMP_BASE. | |
72 | * decl2.c (mark_used): Mark DECL_DECOMP_BASE TREE_USED as well. | |
73 | * pt.c (tsubst_decomp_names): Assert DECL_DECOMP_BASE matches what | |
74 | is expected. | |
75 | * expr.c (mark_exp_read): Recurse on DECL_DECOMP_BASE instead of | |
76 | DECL_VALUE_EXPR. | |
77 | ||
0fa367aa JM |
78 | 2017-05-25 Jason Merrill <jason@redhat.com> |
79 | ||
80 | PR c++/80605 - __is_standard_layout and zero-length array | |
81 | * class.c (check_bases): Use DECL_FIELD_IS_BASE. | |
82 | ||
44e00a7a NS |
83 | 2017-05-25 Nathan Sidwell <nathan@acm.org> |
84 | ||
87c976ae NS |
85 | Kill OVL_CURRENT, OVL_NEXT. |
86 | * cp-tree.h (OVL_CURRENT, OVL_NEXT): Delete. | |
87 | * name-lookup.c (set_decl_namespace): Use ovl_iterator. | |
88 | (consider_binding_level): Use OVL_FIRST. | |
89 | (cp_emit_debug_info_for_using): Use lkp_iterator. | |
90 | * pt.c (check_explicit_specialization): Use ovl_iterator. | |
91 | ||
44e00a7a NS |
92 | Kill DECL_NAMESPACE_USERS, DECL_NAMESPACE_ASSOCIATIONS. |
93 | * cp-tree.h (lang_decl_ns): Remove ns_users field. | |
94 | (DECL_NAMESPACE_USERS, DECL_NAMESPACE_ASSOCIATIONS): Delete. | |
95 | (TREE_INDIRECT_USING): Delete. | |
96 | * name-lookup.h (is_associated_namespace): Delete. | |
97 | * name-lookup.c (name_lookup::search_usings, | |
98 | name_lookup::do_queue_usings): Usings are always direct. | |
99 | (is_associated_namespace): Delete. | |
100 | (handle_namespace_attrs): Use DECL_NAMESPACE_INLINE_P. | |
101 | (namespace_ancestor_1, namespace_ancestor): Delete. | |
102 | (push_using_directive_1, push_using_directive): Delete. | |
103 | (add_using_namespace_1): Delete. | |
104 | (add_using_namespace): Reimplement. | |
105 | (emit_debug_info_using_namespace): New. | |
106 | (finish_namespace_using_directive, finish_local_using_directive, | |
107 | push_namespace): Adjust. | |
108 | * tree.c (cp_free_lang_data): Remove DECL_NAMESPACE_USERS handling. | |
109 | ||
63dbcd13 VR |
110 | 2017-05-25 Volker Reichelt <v.reichelt@netcologne.de> |
111 | ||
112 | * semantics.c (finish_handler_parms): Warn about non-reference type | |
113 | catch handlers. | |
114 | ||
f35a733d NS |
115 | 2017-05-25 Nathan Sidwell <nathan@acm.org> |
116 | ||
932f48ac NS |
117 | Reimplement unqualified namespace lookup. |
118 | * name-lookup.c (name_lookup::using_pair, | |
119 | name_lookup::using_queue): New typedefs. | |
120 | (name_lookup::queue_namespace, name_lookup::do_queue_usings, | |
121 | name_lookup::queue_usings): New. | |
122 | (name_lookup::search_unqualified): New. | |
123 | (merge_functions, same_entity_p, ambiguous_decl, | |
124 | unqualified_namespace_lookup_1, unqualified_namespace_lookup, | |
125 | lookup_using_namespace): Delete. | |
126 | (lookup_name_real_1): Adjust. | |
127 | ||
9dda0ace NS |
128 | Reimplement qualified namespace lookup. |
129 | * name-lookup.c (name_lookup::flags): New member. Adjust ctor. | |
130 | (name_lookup::ambiguous, name_lookup::add_value, | |
131 | name_lookup::add_type, name_lookup::process_binding): New. | |
132 | (name_lookup::search_namespace_only, | |
133 | name_lookup::search_namespace, name_lookup::search_usings): New. | |
134 | (name_lookup::search_qualified): New. | |
135 | (do_nonmember_using_decl, suggest_alternatives_for, | |
136 | lookup_qualified_name): Adjust. | |
137 | (tree_vec_contains): Delete. | |
138 | (qualified_lookup_using_namespace): Rename to ... | |
139 | (qualified_namespace_lookup): ... here. Reimplement. | |
140 | ||
141 | Reimplement ADL. | |
f35a733d NS |
142 | * cp-tree.h (LOOKUP_SEEN_P, LOOKUP_FOUND_P): New. |
143 | * name-lookup.h (lookup_arg_dependent): Return plain tree. | |
144 | * name-lookup.c (arg_lookup, arg_assoc, arg_assoc_args, | |
145 | arg_assoc_args_vec, arg_assoc_type, add_function, | |
146 | arg_assoc_namespace, arg_assoc_class_only, arg_assoc_bases, | |
147 | arg_assoc_class, arg_assoc_template_arg, arg_assoc, | |
148 | lookup_arg_dependent_1): Delete. | |
149 | (name_lookup): New lookup object. | |
150 | (name_lookup::preserve_state, name_lookup::restore_state, | |
151 | name_lookup::mark_seen, name_lookup::find_and_mark, | |
152 | name_lookup::add_fns, name_lookup::adl_namespace_only, | |
153 | name_lookup::adl_namespace, name_lookup::adl_class_only, | |
154 | name_lookup::adl_bases, name_lookup::adl_class, | |
155 | name_lookup::adl_expr, name_lookup::adl_type, | |
156 | name_lookup::adl_template_arg, name_lookup::search_adl): New. | |
157 | (lookup_arg_dependent): Return a plain tree. Adjust. | |
158 | (is_associated_namespace): Move later. | |
159 | ||
d48b9bbe NS |
160 | 2017-05-24 Nathan Sidwell <nathan@acm.org> |
161 | ||
5ad4f1c8 NS |
162 | * friend.c (do_friend): Remove check for existing decl. |
163 | * name-lookup.h (lookup_name_innermost_nonclass_level): Delete. | |
164 | * name-lookup.c (push_local_binding): Directly look for binding. | |
165 | (lookup_name_innermost_nonclass_level_1): Delete. | |
166 | (lookup_name_innermost_nonclass_level): Delete. | |
167 | ||
6cdb26f2 NS |
168 | * Make-lang.in (CXX_AND_OBJCXX_OBJS): Alphabetize. |
169 | ||
d48b9bbe NS |
170 | * cp-tree.h (cp_free_lang_data): Add extern. |
171 | (ovl_skip_hidden, is_overloaded_fn, really_overloaded_fn): Add | |
172 | ATTRIBUTE_PURE. | |
173 | (type_unknown_p): Return bool, make inline, lose TREE_LIST check. | |
174 | * typeck.c (type_unknown_p): Delete. | |
175 | * tree.c (is_overloaded_fn): Use MAYBE_BASELINE_FUNCTIONS, adjust | |
176 | overload management. | |
177 | (dependent_name): Likewise. | |
178 | (decl_anon_ns_mem_p): Simplify. | |
179 | ||
d4a760d8 JW |
180 | 2017-05-24 Jonathan Wakely <jwakely@redhat.com> |
181 | ||
182 | PR c++/80544 | |
183 | * tree.c (reshape_init): Use unqualified type for direct enum init. | |
184 | * typeck.c (maybe_warn_about_cast_ignoring_quals): New. | |
185 | (build_static_cast_1, build_reinterpret_cast_1): Strip cv-quals from | |
186 | non-class destination types. | |
187 | (build_const_cast_1): Strip cv-quals from destination types. | |
188 | (build_static_cast, build_reinterpret_cast, build_const_cast) | |
189 | (cp_build_c_cast): Add calls to maybe_warn_about_cast_ignoring_quals. | |
190 | ||
3cd211af MS |
191 | 2017-05-24 Martin Sebor <msebor@redhat.com> |
192 | ||
193 | PR c/80731 | |
194 | * call.c (fully_fold_internal): Adjust. | |
195 | ||
ef4c5e78 NS |
196 | 2017-05-24 Nathan Sidwell <nathan@acm.org> |
197 | ||
c0edbb32 NS |
198 | * cp-tree.h (ovl_skip_hidden): Declare. |
199 | * tree.c (ovl_skip_hidden): New. | |
200 | * name-lookup.c (arg_assoc_namespace): Call ovl_skip_hidden. | |
201 | (lookup_arg_dependent_1): Likewise. | |
202 | (ambiguous_decl): Use DECL_HIDDEN_P, ovl_skip_hidden. | |
203 | (hidden_name_p, remove_hidden_names): Delete. | |
204 | (lookup_name_real_1): Do not strip hidden names. | |
205 | * name-lookup.h (hidden_name_p, remove_hidden_names): Delete. | |
206 | ||
ef4c5e78 NS |
207 | * cp-tree.h (OVL_HIDDEN_P): New. |
208 | (ovl_iterator::hidden_p, ovl_iterator::reveal_node): New. | |
209 | (ovl_iterator::reveal_node): Declare. | |
210 | * tree.c (ovl_copy): Copy OVL_HIDDEN_P. | |
211 | (ovl_insert): Order on hiddenness. | |
212 | (ovl_iterator::reveal_node): New. | |
213 | * name-lookup.c (anticipated_builtin_p): New. | |
214 | (supplement_binding_1): Use it. | |
215 | (set_local_extern_decl_linkage): Use hidden_p. | |
216 | (do_pushdecl): Deal with unhiding a hidden decl, use | |
217 | anticipated_builtin_p. | |
218 | (do_nonmember_using_decl): Use anticipated_decl_p. | |
219 | (lookup_name_real_1): Use DECL_HIDDEN_P. | |
220 | ||
5726acd7 JM |
221 | 2017-05-23 Jason Merrill <jason@redhat.com> |
222 | ||
223 | -Wunused and C++17 structured bindings | |
224 | * decl.c (poplevel): Don't warn about unused structured bindings, | |
225 | only real variables. | |
226 | * error.c (dump_simple_decl): Handle structured bindings. | |
227 | * expr.c (mark_exp_read): Look through DECL_VALUE_EXPR. | |
228 | ||
3a9cc685 NS |
229 | 2017-05-23 Nathan Sidwell <nathan@acm.org> |
230 | ||
231 | * cp-tree.h (PUSH_GLOBAL, PUSH_LOCAL, PUSH_USING): Delete. | |
232 | * name-lookup.c (create_local_binding): New. | |
233 | (update_binding): New. | |
234 | (pushdecl_maybe_friend_1): Rename to ... | |
235 | (do_pushdecl): ... this. Reimplement. | |
236 | (pushdecl): Adjust. | |
237 | (push_overloaded_decl_1, push_overloaded_decl): Delete. | |
238 | ||
f0c1ade4 JM |
239 | 2017-05-23 Jason Merrill <jason@redhat.com> |
240 | ||
241 | PR c++/80396 - built-in for make_integer_sequence. | |
242 | * pt.c (builtin_pack_fn_p, builtin_pack_call_p) | |
243 | (expand_integer_pack, expand_builtin_pack_call): New. | |
244 | (find_parameter_packs_r): Check builtin_pack_call_p. | |
245 | (check_for_bare_parameter_packs): Handle it. | |
246 | (tsubst_pack_expansion): Call expand_builtin_pack_call. | |
247 | (declare_integer_pack): New. | |
248 | (init_template_processing): Call it. | |
249 | * decl2.c (mark_used): Check builtin_pack_fn_p. | |
250 | ||
e4ea7a4c NS |
251 | 2017-05-23 Nathan Sidwell <nathan@acm.org> |
252 | ||
aa7bda5f NS |
253 | * name-lookup.c (find_namespace_binding): New. |
254 | (pushdecl_maybe_friend_1): Use CP_DECL_CONTEXT. | |
255 | (set_identifier_type_value_with_scope): Use find_namespace_binding. | |
256 | (find_binding, cp_binding_level_find_binding_for_name, | |
257 | binding_for_name, namespace_binding_1): Delete. | |
258 | (push_overloaded_decl_1): Use CP_DECL_CONTEXT. | |
259 | (get_namespace_binding, set_namespace_binding, | |
260 | finish_namespace_using_decl, unqualified_namespace_lookup_1, | |
261 | qualified_lookup_using_namespace, lookup_type_scope_1, | |
262 | lookup_name_innermost_nonclass_level_1): Use find_namespace_binding. | |
263 | ||
6131102c NS |
264 | PR c++/80866 |
265 | * parser.c (cp_parser_template_id): Keep the lookup when stashing | |
266 | the template_id. | |
267 | ||
e4ea7a4c NS |
268 | * cp-tree.h (DECL_HIDDEN_P): New. |
269 | * name-lookup.c (set_decl_context, | |
270 | set_local_extern_decl_linkage): New, broken out of ... | |
271 | (pushdecl_maybe_friend_1): ... here. Call them. | |
272 | ||
fd71a9a2 TS |
273 | 2017-05-23 Thomas Schwinge <thomas@codesourcery.com> |
274 | ||
275 | * parser.c (OACC_KERNELS_CLAUSE_MASK): Add | |
276 | "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS", | |
277 | "VECTOR_LENGTH". | |
278 | ||
9d029ddf NS |
279 | 2017-05-23 Nathan Sidwell <nathan@acm.org> |
280 | ||
281 | * cp-tree.h (OVL_P): New. | |
282 | * name-lookup.h (push_local_binding): Delete. | |
283 | (do_toplevel_using_decl, do_local_using_decl): Rename to ... | |
284 | (finish_namespace_using_decl, finish_local_using_decl): ... here | |
285 | * name-lookup.c (add_decl_to_level): Swap args. | |
286 | (pop_bindings_and_leave_scope): Look inside TREE_LIST. | |
287 | (diagnose_name_conflict): Check contexts are same for redecl. | |
288 | (update_local_overload): New. | |
289 | (compparms_for_decl_and_using): Rename to ... | |
290 | (matching_fn_p): ... here. | |
291 | (pushdecl_maybe_friend_1): Adjust add_decl_to_level, | |
292 | push_local_bindings call. | |
293 | (push_local_binding): Make static, replace FLAGS arg with | |
294 | IS_USING. | |
295 | (validate_nonmember_using_decl): Use OVL_FIRST. | |
296 | (do_nonmember_using_decl): Use in/out parameters. Use | |
297 | lkp_iterator and simplify. | |
298 | (do_toplevel_using_decl, do_local_using_decl): Rename to ... | |
299 | (finish_namespace_using_decl, finish_local_using_decl): ... here. | |
300 | Adjust. | |
301 | (lookup_type_current_level): Delete. | |
302 | * parser.c (cp_parser_using_declaration): Adjust. | |
303 | * pt.c (tsubst_expr): Adjust. | |
304 | ||
c405923d NS |
305 | 2017-05-22 Nathan Sidwell <nathan@acm.org> |
306 | ||
65cc1407 NS |
307 | * name-lookup.h (parse_using_directive): Replace with ... |
308 | (finish_namespace_using_directive): ... this and ... | |
309 | (finish_local_using_directive): ... this. | |
310 | * name-lookup.c (add_using_namespace_1): Move later. | |
311 | (add_using_namespace): Move later, add namespace_p arg, remove | |
312 | indirect arg. | |
313 | (push_using_directive_1): Directly recurse. | |
314 | (do_using_directive, parse_using_directive): Delete, split into ... | |
315 | (finish_namespace_using_directive): ... this and ... | |
316 | (finish_local_using_directive): ... this. | |
317 | (push_namespace): Use add_using_namespace. | |
318 | * parser.c (cp_parser_using_directive): Call | |
319 | finish_namespace_using_directive or finish_local_using_directive. | |
320 | * pt.c (tsubst_expr): Call finish_local_using_directive. | |
321 | ||
58aca9d9 NS |
322 | * cp-objcp-common.c (cp_register_dumps): Register raw dumper. |
323 | * cp-tree.h (raw_dump_id): Declare. | |
324 | * decl2.c (raw_dump_id): Define. | |
325 | (dump_tu): Use raw_dump_id. | |
326 | ||
3b205ea1 NS |
327 | * config-lang.in (gtfiles): Sort list, break lines. |
328 | ||
1a66d857 NS |
329 | * cp-tree.h (CPTI_TERMINATE, CPTI_CALL_UNEXPECTED): Rename to ... |
330 | (CPTI_TERMINATE_FN, CPTI_CALL_UNEXPECTED_FN): ... here. | |
331 | ( CPTI_GET_EXCEPTION_PTR_FN, CPTI_BEGIN_CATCH_FN, CPTI_END_CATCH_FN, | |
332 | CPTI_ALLOCATE_EXCEPTION_FN, CPTI_FREE_EXCEPTION_FN, CPTI_THROW_FN, | |
333 | CPTI_RETHROW_FN): New. | |
334 | (noexcept_deferred_spec): New. | |
335 | (terminate_node, call_unexpected_node): Rename to ... | |
336 | (terminate_fn, call_unexpected_fn): ... here. | |
337 | (get_exception_ptr_fn, begin_catch_fn, end_catch_fn, | |
338 | allocate_exception_fn, free_exception_fn, throw_fn, rethrow_fn): New. | |
339 | * except.c (fn1..fn5, throw_fn, rethrow_rn, spec): Delete. | |
340 | (init_exception_processing): Adjust. | |
341 | (declare_library_fn): Create and push the fns here. | |
342 | (do_get_exception_ptr, do_begin_catch, do_end_catch, | |
343 | do_allocate_exception_ptr, do_free_exception_ptr): Adjust | |
344 | declare_library_fn use. | |
345 | (unevaluated_noexcept_spec): Adjust. | |
346 | * cp-gimplify.c (genericize_eh_spec_block, | |
347 | gimplify_most_not_throw_expr): Adjust. | |
348 | ||
c405923d NS |
349 | * name-lookup.c (pushdecl_top_level, |
350 | pushdecl_top_level_and_finish): Move after namespace pushing and | |
351 | popping functions. | |
352 | (push_to_top_level): Rename to ... | |
353 | (do_push_to_top_level): ... here. Remove timing code. | |
354 | (pop_from_top_level_1): Rename to ... | |
355 | (do_pop_from_top_level): ... here. | |
356 | (do_push_nested_namespace, do_pop_nested_namespace) | |
357 | (push_to_top_level): New wrapper for do_push_to_top_level. | |
358 | (pop_from_top_level): Adjust. | |
359 | (push_nested_namepace, pop_nested_namespace): Wrappers for workers. | |
360 | ||
ff502317 BE |
361 | 2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de> |
362 | ||
363 | * config-lang.in (gtfiles): Add c-family/c-format.c, | |
364 | except.c, init.c, lambda.c and friend.c. | |
365 | * class.c (dvirt_fn): Move out of function scope, | |
366 | add GTY attribute. | |
367 | * except.c (fn1-5, throw_fn, rethrow_fn, spec): Likewise. | |
368 | * init.c (fn): Likewise. | |
369 | * lambda.c (ptr_id, max_id): Likewise. | |
370 | * friend.c (global_friend): Add GTY attribute. | |
371 | ||
6f2f4050 NS |
372 | 2017-05-19 Nathan Sidwell <nathan@acm.org> |
373 | ||
374 | * call.c (add_list_candidates): Use OVL_FIRST. | |
375 | (build_new_method_call_1): Likewise. | |
376 | * cp-tree.h (OVL_SINGLE_P): New. | |
377 | (TYPE_HIDDEN_P): New. | |
378 | * decl.c (xref_tag_1): Use TYPE_HIDDEN_P. | |
379 | * dump.c (cp_tump_tree): Adjust overload dumping. | |
380 | * error.c (dump_decl): Use OVL_SINGLE_P, simplify context | |
381 | printing. | |
382 | * method.c (lazily_declare_fn): Assert we added it. | |
383 | * parser.c (cp_parser_nested_name_specifier): Use OVL_SINGLE_P, | |
384 | OVL_FIRST. | |
385 | (cp_parser_template_name): Use lkp_iterator. | |
386 | * pt.c (begin_template_parm_list): Fixup comment. | |
387 | (instantiate_class_template_1): Use TYPE_HIDDEN_P. | |
388 | * tree.c (ovl_iterator::remove_node): Cope with inherited ctors. | |
389 | (ovl_scope): Use lkp_iterator. | |
390 | ||
9740ed54 TS |
391 | 2017-05-19 Thomas Schwinge <thomas@codesourcery.com> |
392 | ||
7fd549d2 TS |
393 | * parser.c (cp_parser_omp_clause_default): Handle |
394 | "OMP_CLAUSE_DEFAULT_PRESENT". | |
395 | ||
9740ed54 TS |
396 | * parser.c (cp_parser_omp_clause_default): Avoid printing more |
397 | than one syntax error message. | |
398 | ||
2a8a8d7b NS |
399 | 2017-05-19 Nathan Sidwell <nathan@acm.org> |
400 | ||
401 | * class.c (class_dump_id): Define. | |
402 | (dump_class_hierarchy, dump_vtable, dump_vtt): Use it. | |
403 | * cp-objcp-common.c (cp_register_dumps): New. | |
404 | * cp-objcp-common.h (cp_register_dumps): Declare. | |
405 | (LANG_HOOKS_REGISTER_DUMPS): Override. | |
406 | * cp-tree.h (class_dump_id): Declare. | |
407 | ||
59a4ede9 NS |
408 | 2017-05-18 Nathan Sidwell <nathan@acm.org> |
409 | ||
1bf07cc3 NS |
410 | * cp-tree.h (OVL_ARG_DEPENDENT): Delete. |
411 | (OVL_USED_P): New. | |
412 | (lookup_keep): Declare. | |
413 | * name-lookup.c (add_function): Don't set OVL_ARG_DEPENDENT. | |
414 | * pt.c (tsubst_copy): Assert lookup is persistent. | |
415 | * semantics.c (finish_call_expr): Use lkp_iterator, call | |
416 | lookup_keep. | |
417 | * tree.c (ovl_copy): New. | |
418 | (ovl_insert, ovl_iterator::remove_node): Copy immutable nodes. | |
419 | (lookup_keep): New. | |
420 | ||
2063b07f NS |
421 | * cp-tree.h (OVL_USED): Replace with ... |
422 | (OVL_USING_P): ... this. | |
423 | (ovl_iterator::using_p): Adjust. | |
424 | * name-lookup.c (push_overloaded_decl_1, | |
425 | do_nonmember_using_decl): Adjust. | |
426 | * search.c (lookup_field_r): Adjust. | |
427 | * tree.c (ovl_insert, ovl_scope): Adjust. | |
428 | ||
31ab89c1 NS |
429 | * cp-tree.h (lookup_add): Swap args. |
430 | (ovl_cons, build_overload): Delete. | |
431 | * name-lookup.c (add_function, push_overloaded_decl_1, | |
432 | do_nonmember_using_decl, merge_functions, remove_hidden_names): | |
433 | Use lookup_add, ovl_insert. | |
434 | * pt.c (check_explicit_specialization): Use lookup_add. | |
435 | (do_class_deduction): Likewise. Refactor if. | |
436 | * tree.c (lookup_add): Swap args. | |
437 | (ovl_cons, build_overload): Delete. | |
438 | ||
59a4ede9 NS |
439 | * name-lookup.c (find_local_binding): New, broken out of ... |
440 | (lookup_name_innermost_nonclass_level_1): ... here. Call it. | |
441 | (set_namespace_binding): Swap scope & name args. | |
442 | (namespace_binding_1): Likewise. | |
443 | (pushdecl_maybe_friend_1): Adjust set_namespace_binding call. | |
444 | (push_overloaded_decl_1): Likewise. | |
445 | (set_global_binding): Likewise. | |
446 | (get_namespace_binding): Adjust namespace_binding_1 call. | |
447 | ||
539f481a NS |
448 | 2017-05-17 Nathan Sidwell <nathan@acm.org> |
449 | ||
450 | * cp-tree.h (default_hash_traits <lang_identifier *>): New | |
451 | specialization. | |
452 | * name-lookup.c (lookup_extern_c_fun_in_all_ns): Delete. | |
453 | (extern_c_fns): New hash table. | |
454 | (check_extern_c_conflict): New, broken out of ... | |
455 | (pushdecl_maybe_friend_1): ... here. Call it. | |
456 | (c_linkage_bindings): Just look in hash table. | |
457 | ||
b42cc3ca VV |
458 | 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com> |
459 | ||
460 | PR c++/80654 | |
461 | PR c++/80682 | |
462 | Implement new C++ intrinsics __is_assignable and __is_constructible. | |
463 | * cp-tree.h (CPTK_IS_ASSIGNABLE, CPTK_IS_CONSTRUCTIBLE): New. | |
464 | (is_xible): New. | |
465 | * cxx-pretty-print.c (pp_cxx_trait_expression): Handle | |
466 | CPTK_IS_ASSIGNABLE and CPTK_IS_CONSTRUCTIBLE. | |
467 | * method.c (constructible_expr): Set cp_unevaluated. | |
468 | (is_xible_helper): New. | |
469 | (is_trivially_xible): Adjust. | |
470 | (is_xible): New. | |
471 | * parser.c (cp_parser_primary_expression): Handle | |
472 | RID_IS_ASSIGNABLE and RID_IS_CONSTRUCTIBLE. | |
473 | (cp_parser_trait_expr): Likewise. | |
474 | * semantics.c (trait_expr_value): Handle | |
475 | CPTK_IS_ASSIGNABLE and CPTK_IS_CONSTRUCTIBLE. | |
476 | ||
19b476fb NS |
477 | 2017-05-17 Nathan Sidwell <nathan@acm.org> |
478 | ||
36f4bc9c NS |
479 | * cp-tree.h (ovl_iterator::using_p): New predicate. |
480 | (ovl_iterator::remove_node): New worker. | |
481 | (ovl_insert): Declare. | |
482 | * tree.c (ovl_insert): New. | |
483 | (ovl_iterator::remove_node): New. | |
484 | * class.c (add_method): Use ovl_iterator, ovl_insert. | |
485 | (clone_function_decl): Fix description. | |
486 | (clone_constructors_and_destructors): Use ovl_iterator. | |
487 | ||
19b476fb NS |
488 | * class.c (handle_using_decl): Use OVL_FIRST, ovl_iterator. |
489 | (maybe_warn_about_overly_private_class): Use ovl_iterator. | |
490 | (method_name_cmp, resort_method_name_cmp): Use OVL_NAME. | |
491 | (resort_type_method_vec, finish_struct_methods): Use OVL_FIRST. | |
492 | (get_base_fndecls): Use ovl_iterator. | |
493 | (warn_hidden): Use OVL_NAME, ovl_iterator. | |
494 | (add_implicitly_declared_members): Use ovl_iterator. | |
495 | * constraint.cc (normalize_template_id_expression): Use OVL_FIRST, | |
496 | flatten nested if. | |
497 | (finish_shorthand_constraint): Simplify, use ovl_make. | |
498 | * pt.c (make_constrained_auto): Simplify. Use ovl_make. | |
499 | * search.c (shared_member_p): Use ovl_iterator. | |
500 | (lookup_field_fuzzy_info::fuzzy_lookup_fn): Use OVL_NAME. | |
501 | (lookup_conversion_operator): Use OVL_FIRST. | |
502 | (lookup_fnfiels_idx_nolazy): Use OVL_FIRST, OVL_NAME. | |
503 | (look_for_overrides_here): Use ovl_iterator. | |
504 | (lookup_conversions_r): Use OVL_FIRST, OVL_NAME, ovl_iterator. | |
505 | * typeck.c (build_x_unary_op): Use ovl_make. | |
506 | ||
1a817418 ML |
507 | 2017-05-17 Martin Liska <mliska@suse.cz> |
508 | ||
509 | * class.c (dump_class_hierarchy): Introduce dump_flags_t type and | |
510 | use it instead of int type. | |
511 | (dump_vtable): Likewise. | |
512 | (dump_vtt): Likewise. | |
513 | * decl2.c (dump_tu): Likewise. | |
514 | ||
10791753 DM |
515 | 2017-05-16 David Malcolm <dmalcolm@redhat.com> |
516 | ||
517 | * call.c (enforce_access): Add access_failure_info * param and use | |
518 | it to record access failures. | |
519 | * cp-tree.h (class access_failure_info): New class. | |
520 | (enforce_access): Add access_failure_info * param, defaulting to | |
521 | NULL. | |
522 | (lookup_member): Likewise. | |
523 | (locate_field_accessor): New function decl. | |
524 | (perform_or_defer_access_check): Add access_failure_info * param, | |
525 | defaulting to NULL. | |
526 | * search.c (lookup_member): Add access_failure_info * param and | |
527 | pass it on to call to perform_or_defer_access_check. | |
528 | (matches_code_and_type_p): New function. | |
529 | (field_access_p): New function. | |
530 | (direct_accessor_p): New function. | |
531 | (reference_accessor_p): New function. | |
532 | (field_accessor_p): New function. | |
533 | (struct locate_field_data): New struct. | |
534 | (dfs_locate_field_accessor_pre): New function. | |
535 | (locate_field_accessor): New function. | |
536 | * semantics.c (perform_or_defer_access_check): Add | |
537 | access_failure_info * param, and pass it on to call to | |
538 | enforce_access. | |
539 | * typeck.c (access_failure_info::record_access_failure): New method. | |
540 | (access_failure_info::maybe_suggest_accessor): New method. | |
541 | (finish_class_member_access_expr): Pass an access_failure_info | |
542 | instance to the lookup_member call, and call its | |
543 | maybe_suggest_accessor method afterwards. | |
544 | ||
6b6ae9eb MP |
545 | 2017-05-16 Marek Polacek <polacek@redhat.com> |
546 | ||
547 | PR sanitizer/80536 | |
548 | PR sanitizer/80386 | |
549 | * cp-gimplify.c (cp_fold): Handle SAVE_EXPR. | |
550 | ||
c20c3b42 NS |
551 | 2017-05-16 Nathan Sidwell <nathan@acm.org> |
552 | ||
c0c24822 NS |
553 | * name-lookup.c (check_local_shadow): New, broke out of ... |
554 | (pushdecl_maybe_friend_1): ... here. Call it. | |
555 | ||
e09ae857 NS |
556 | * cp-tree.h (OVL_NESTED_P, OVL_LOOKUP_P): New. |
557 | (ovl_first): Move inline definition to end of file. | |
558 | (ovl_make, lookup_add): Declare. | |
559 | (get_fns, get_first_fn): Make pure. | |
560 | * tree.c (ovl_cache): New. | |
561 | (ovl_make, lookup_add): New. | |
562 | * pt.c (do_class_deduction): Don't add candidates that will be | |
563 | elided. | |
564 | ||
a736411a | 565 | * call.c (build_user_type_conversion_1): Use OVL_FIRST. |
e09ae857 | 566 | (print_error_for_call_failure): Use OVL_NAME. |
a736411a NS |
567 | (build_op_call_1): Use ovl_iterator. |
568 | (add_candidates): Use OVL_FIRST & lkp_iterator. | |
569 | (build_op_delete_call): Use MAYBE_BASELINK_FUNCTIONS & | |
570 | lkp_iterator. | |
571 | * class.c (deduce_noexcept_on_destructors): Use ovl_iterator. | |
572 | (type_has_user_nondefault_constructor, | |
573 | in_class_defaulted_default_constructor, | |
574 | type_has_user_provided_constructor, | |
575 | type_has_user_provided_or_explicit_constructor, | |
576 | type_has_non_user_provided_default_constructor, | |
577 | vbase_has_user_provided_move_assign, | |
578 | type_has_move_constructor, type_has_move_assign, | |
579 | type_has_user_declared_move_constructor, | |
580 | type_has_user_declared_move_assign, | |
581 | type_build_ctor_call, type_build_dtor_call, | |
582 | type_requires_array_cookie, explain_non_literal_class): Likewise. | |
583 | (finish_struct): Use lkp_iterator. | |
584 | (resolve_address_of_overloaded_function): Use OVL_NAME, lkp_iterator. | |
585 | (note_name_declared_in_class): Use OVL_NAME. | |
586 | * cxx-pretty-print.c (pp_cxx_unqualified_id): Use OVL_FIRST. | |
587 | (pp_cxx_qualified_id, cxx_pretty_printer::id_expression, | |
588 | cxx_pretty_printer::expression): Likewise. | |
589 | * decl2.c (check_classfn): Use ovl_iterator. | |
590 | * pt.c (retrieve_specialization): Use ovl_iterator. | |
591 | * tree.c (cp_tree_equal): Use lkp_iterator. | |
592 | (type_has_nontrivial_copy_init): Use ovl_iterator. | |
593 | ||
c20c3b42 NS |
594 | * typeck2.c (cxx_incomplete_type_diagnostic): Revert change and |
595 | check is_overloaded_fn. | |
596 | ||
ef6cb4c7 ML |
597 | 2017-05-16 Martin Liska <mliska@suse.cz> |
598 | ||
599 | * parser.c (cp_lexer_print_token): Add default value for flags | |
600 | argument of print_gimple_stmt, print_gimple_expr, | |
601 | print_generic_stmt and print_generic_expr. | |
602 | ||
322763f5 NS |
603 | 2017-05-16 Nathan Sidwell <nathan@acm.org> |
604 | ||
3f267553 NS |
605 | * cp-tree.h (class ovl_iterator, class lkp_iterator): New OVERLOAD |
606 | iterators. | |
607 | (MAYBE_BASELINK_FUNCTIONS): New. | |
608 | * constraint.cc (resolve_constraint_check): Use lkp_iterator. | |
609 | * decl2.c (maybe_warn_sized_delete): Use ovl_iterator. | |
610 | * lambda.c (maybe_generic_this_capture): Use lkp_iterator. | |
611 | * method.c (inherited_ctor_binfo): Use ovl_iterator. | |
612 | (binfo_inherited_from): Likewise. | |
613 | * parser.c (lookup_literal_operator): Use lkp_iterator. | |
614 | * pt.c (iterative_hash_template_arg): Use lkp_iterator. | |
615 | (print_candidates_1): Likewise. | |
616 | (determine_specialization): Likewise. | |
617 | (resolve_overloaded_unification): Likewise. | |
618 | (resolve_nondeduced_context): Likewise. | |
619 | (type_dependent_expression_p): Likewise. | |
620 | (dependent_template_p): Likewise. | |
621 | * ptree.c (cxx_print_xnode): Likewise. | |
622 | * semantics.c (omp_reduction_lookup): Use lkp_iterator. | |
623 | (classtype_has_nothrow_assign_or_copy_p): Use ovl_iterator. | |
624 | * typeck.c (check_template_keyword): Use lkp_iterator. | |
625 | ||
848bf88d NS |
626 | * cp-tree.h (OVL_FIRST, OVL_NAME): New. |
627 | (ovl_first): New. | |
628 | * constexpr.c (function_concept_check): Use OVL_FIRST. | |
629 | * cvt.c (build_expr_type_conversion): Likewise. | |
630 | * decl.c (poplevel, grokdeclarator): Use OVL_NAME. | |
631 | * decl2.c (mark_used): Use OVL_FIRST. | |
632 | * error.c (dump_decl): Use OVL_FIRST, OVL_NAME. | |
633 | (dump_expr, location_of): Use OVL_FIRST. | |
634 | * friend.c (do_friend): Use OVL_NAME. | |
635 | * init.c (build_offset_ref): Use OVL_FIRST. | |
636 | * mangle.c (write_member_name): Likewise. | |
637 | (write_expression): Use OVL_NAME. | |
638 | * method.c (strip_inheriting_ctors): Use OVL_FIRST. | |
639 | * name-lookup.c (pushdecl_class_level): Use OVL_NAME. | |
640 | * pt.c (check_explicit_specialization): Use OVL_FIRST. | |
641 | (check_template_shadow): Likewise. | |
642 | (tsubst_template_args): Use OVL_NAME. | |
643 | (tsubst_baselink): Use OVL_FIRST. | |
644 | * semantics.c (perform_koenig_lookup): Use OVL_NAME. | |
645 | * tree.c (get_first_fn): Use OVL_FIRST. | |
646 | * typeck.c (finish_class_member_access_expr): Use OVL_NAME. | |
647 | (cp_build_addr_expr_1): Use OVL_FIRST. | |
648 | ||
1f0ed17c NS |
649 | * pt.c (tsubst_copy_and_build): Remove unnecessary COMPONENT_REF |
650 | peeking. | |
651 | * semantics.c (finish_id_expression): Directly init local var. | |
652 | (finish_omp_reduction_clause): Use really_overloaded_fn. | |
653 | * tree.c (get_fns): Document. Assert we got an overload. | |
654 | (get_first_fn) Document. | |
655 | * typeck.c (cp_build_addr_expr_1): Pass arg directly to | |
656 | really_overloaded_fn. | |
c20c3b42 | 657 | * typeck2.c (cxx_incomplete_type_diagnostic): Use get_first_fn directly. |
1f0ed17c | 658 | |
322763f5 NS |
659 | * cp-tree.h (SCOPE_DEPTH): New. |
660 | * name-lookup.h (is_nested_namespace): Declare. | |
661 | * name-lookup.c (is_nested_namespace): New. | |
662 | (is_ancestor): Use it. | |
663 | (set_decl_namespace): Likewise. | |
664 | (push_namespace): Set SCOPE_DEPTH. | |
665 | * pt.c (check_specialization_namespace): Use is_nested_namespace. | |
666 | (check_unqualigied_spec_or_inst): Likewise. | |
667 | ||
3a77e7cc NS |
668 | 2017-05-15 Nathan Sidwell <nathan@acm.org> |
669 | ||
670 | PR c++/79369 | |
671 | * cp-tree.h (DECL_NAMESPACE_INLINE_P): New. | |
672 | * name-lookup.h (push_namespace): Return int, add make_inline arg. | |
673 | * name-lookup.c (push_namespace): Deal with inline directly. | |
674 | Return pushed count. | |
675 | * parser.c (cp_parser_namespace_definition): Adjust for | |
676 | push_namespace change. | |
677 | ||
9c82d7b6 NS |
678 | 2017-05-11 Nathan Sidwell <nathan@acm.org> |
679 | ||
505dd180 NS |
680 | * cp-lang.c (get_global_decls, cxx_pushdecl, LANG_HOOK_GETDECLS, |
681 | LANG_HOOKS_PUSHDECL): Move to ... | |
682 | * cp-objcp-common.c (cp_get_global_decls, cp_pushdec, | |
683 | LANG_HOOK_DECLS, LANG_HOOKS_PUSHDECL): ... here. | |
684 | * cp-objcp-common.h (cp_get_global_decls, cp_pushdecl): Declare. | |
685 | ||
4f15a5da NS |
686 | * name-lookup.h (pushdecl): Add default friend parm. |
687 | (pushdecl_maybe_friend): Delete. | |
688 | (pushdecl_top_level): Add default friend parm. | |
689 | (pushdecl_top_level_maybe_friend): Delete. | |
690 | * name-lookup.c (pushdecl_maybe_friend): Delete. | |
691 | (pushdecl): Add is_friend parm. | |
692 | (pushdecl_top_level): Add is friend_parm. | |
693 | (pushdecl_top_level_maybe_friend, pushdecl_top_level_1): Delete. | |
694 | (pushdecl_top_level_and_finish): Do pushing and finishing directly. | |
695 | * friend.c (do_friend): Adjust. | |
696 | * pt.c (tsubst_friend_class): Adjust. | |
697 | ||
2e3757e7 NS |
698 | Revert pushdecl_top_level_and_finish name change. |
699 | * name-lookup.h (pushdecl_top_level_and_finish): Resurrect old name. | |
700 | * name-lookup.c (pushdecl_top_level_and_finish): Likewise. | |
701 | * decl.c (cp_make_fname_decl): Adjust. | |
702 | * decl2.c (get_guard, handle_tls_init): Adjust. | |
703 | * rtti.c (get_tinfo_decl, tinfo_base_init): Adjust. | |
704 | ||
c8634a1a NS |
705 | * name-lookup.c (pushdecl_outermost_localscope): Always |
706 | conditionally stop timer. | |
707 | ||
c443f3d5 NS |
708 | * decl.c (xref_tag_1): Don't frob ts_lambda scope here. |
709 | * name-lookup.c (pushtag_1): Deal with ts_lambda scope. | |
710 | ||
056a17ee NS |
711 | * cp-tree.h (pushdecl, pushdecl_maybe_friend, pushtag, |
712 | pushtag_top_level_maybe_friend, | |
713 | pushdecl_top_level_and_finish): Move declarations to ... | |
714 | * name-lookup.h: ... here. Group pushdecl variants. | |
715 | (pushdecl_top_level_and_finish): Rename to ... | |
716 | (pushdecl_top_level_with_init): ... here. | |
717 | * decl.c (cp_make_fname_decl): Use pushdecl_top_level_with_init. | |
718 | * decl2.c (get_guard, handle_tls_init): Likewise. | |
719 | * rtti.c (get_tinfo_decl, tinfo_base_init): Likewise. | |
720 | * lambda.c (maybe_add_lambda_conv_op): Use namespace_bindings_p. | |
721 | * method.c (implicitly_declare_fn): Likewise. | |
722 | * searchc (node_debug_info_needed): Likewise. | |
723 | * name-lookup.c (pushdecl_top_level_and_finish): Rename to ... | |
724 | (pushdecl_top_level_with_init): ... here. | |
725 | (pop_everything): Use namespace_bindings_p. | |
726 | ||
9c82d7b6 NS |
727 | * name-lookup.h (pop_binding): Rename to pop_local_binding. |
728 | (getdecls): Rename to get_local_decls. | |
729 | * name-lookup.c (pop_binding): Rename to ... | |
730 | (pop_local_binding): ... here. | |
731 | (pop_bindings_and_leave_scope): Adjust. | |
732 | (getdecls): Rename to ... | |
733 | (get_local_decls): ... here. Assert local scope. | |
734 | * decl.c (poplevel): Assert not namespace. Adjust and simplify | |
735 | logic. | |
736 | (store_parm_decls): Adjust get_local_decls call. | |
737 | (parser.c (synthesize_implicit_template_parm): Likewise. | |
738 | ||
e81c8328 VV |
739 | 2017-05-11 Ville Voutilainen <ville.voutilainen@gmail.com> |
740 | ||
741 | PR c++/80682 | |
742 | * method.c (is_trivially_xible): Reject void types. | |
743 | ||
268de039 NS |
744 | 2017-05-10 Nathan Sidwell <nathan@acm.org> |
745 | ||
3aa0a770 NS |
746 | * class.c (handle_using_decl): Always use OVL_CURRENT. |
747 | (resolve_address_of_overloaded_function): Move iterator decl into | |
748 | for scope. Don't strip anticipated decls here. | |
749 | ||
3dd83617 NS |
750 | * pt.c (print_candidates_1): Separate TREE_LIST and OVERLOAD |
751 | printing. | |
752 | (print_candidates): Adjust. | |
753 | ||
268de039 NS |
754 | * cp-tree.h (build_new_function_call): Lose koenig_p arg. Fix |
755 | line breaking. | |
756 | * call.c (build_new_function_call): Lose koenig_p arg. Remove | |
757 | koenig_p handling here. | |
758 | * pt.c (push_template_decl_real): Unconditionally retrofit_lang_decl. | |
759 | (tsubst_omp_clauses): Likewise. | |
760 | (do_class_deduction): Adjust buld_new_function_call calls. | |
761 | * semantics.c (finish_call_expr): Likewise. | |
762 | ||
0ea37ae1 JM |
763 | 2017-05-10 Jason Merrill <jason@redhat.com> |
764 | ||
dd54ca56 JM |
765 | * pt.c (unify_parameter_deduction_failure, unify_cv_qual_mismatch) |
766 | (unify_type_mismatch, unify_parameter_pack_mismatch) | |
767 | (unify_ptrmem_cst_mismatch, unify_expression_unequal) | |
768 | (unify_parameter_pack_inconsistent, unify_inconsistency) | |
769 | (unify_vla_arg, unify_method_type_error, unify_arity) | |
770 | (unify_arg_conversion, unify_no_common_base) | |
771 | (unify_inconsistent_template_template_parameters) | |
772 | (unify_template_deduction_failure) | |
773 | (unify_template_argument_mismatch) | |
774 | (unify_overload_resolution_failure): Call unify_invalid. | |
775 | ||
00e08b0f JM |
776 | CWG 1847 - Clarifying compatibility during partial ordering |
777 | * pt.c (more_specialized_fn): No order between two non-deducible | |
778 | parameters. | |
779 | ||
415dcf96 JM |
780 | * pt.c (dependent_type_p): Make sure we aren't called with |
781 | global_type_node. | |
782 | ||
0ea37ae1 JM |
783 | PR c++/79549 - C++17 ICE with non-type auto template parameter pack |
784 | * pt.c (convert_template_argument): Just return an argument pack. | |
785 | (coerce_template_parameter_pack, template_parm_to_arg) | |
786 | (extract_fnparm_pack, make_argument_pack, tsubst_template_args) | |
787 | (tsubst_decl, tsubst, type_unification_real, unify_pack_expansion): | |
788 | Don't set the type of a NONTYPE_ARGUMENT_PACK. | |
789 | * parser.c (make_char_string_pack, make_string_pack): Likewise. | |
790 | ||
d5a2f455 NS |
791 | 2017-05-10 Nathan Sidwell <nathan@acm.org> |
792 | ||
793 | * cp-tree.h (add_method, clone_function_decl): Change last arg to | |
794 | bool. | |
795 | * class.c (add_method): Change third arg to bool. Adjust. | |
796 | (one_inheriting_sig, one_inherited_ctor): Adjust. | |
797 | (clone_function_decl): Change 2nd arg to bool. Adjust. | |
798 | (clone_constructors_and_destructors): Adjust. | |
799 | * lambda.c (maybe_add_lambda_conv_op): Adjust. | |
800 | * method.c (lazily_declare_fn): Adjust. | |
801 | * pt.c (tsubst_decl, instantiate_template_1): Adjust. | |
802 | * semantics.c (finish_member_declaration): Adjust. | |
803 | ||
f00b411f PC |
804 | 2017-05-10 Paolo Carlini <paolo.carlini@oracle.com> |
805 | ||
806 | PR c++/80145 | |
807 | * decl.c (finish_function): To improve error recovery, change the | |
808 | logic for calling apply_deduced_return_type. | |
809 | ||
54069e59 JM |
810 | 2017-05-09 Jason Merrill <jason@redhat.com> |
811 | ||
0fa367aa | 812 | PR c++/80605 - __is_standard_layout and empty base |
c0aad677 JM |
813 | * class.c (check_bases): Ignore empty bases. |
814 | ||
65d7adba JM |
815 | PR c++/70979 - literal class and closure types |
816 | * class.c (finalize_literal_type_property): Handle closures | |
817 | specifically. | |
818 | (explain_non_literal_class): Likewise. | |
819 | ||
54069e59 JM |
820 | PR c++/66297, DR 1684 - literal class and constexpr member fns |
821 | * constexpr.c (is_valid_constexpr_fn): Only complain about | |
822 | non-literal enclosing class in C++11. | |
823 | * class.c (finalize_literal_type_property): Likewise. | |
824 | ||
cc49d15a PC |
825 | 2017-05-09 Paolo Carlini <paolo.carlini@oracle.com> |
826 | ||
827 | PR c++/80186 | |
828 | * pt.c (tsubst_decl): Early return error_mark_node if | |
829 | grok_ctor_properties returns false. | |
830 | ||
60648580 JM |
831 | 2017-05-09 Jason Merrill <jason@redhat.com> |
832 | ||
833 | PR c++/70167 - array prvalue treated as lvalue | |
834 | * cp-tree.h (CONSTRUCTOR_C99_COMPOUND_LITERAL): New. | |
835 | (enum fcl_t): New. | |
836 | * semantics.c (finish_compound_literal): Add fcl_context parameter. | |
837 | Only make a static variable for C99 syntax. | |
838 | * parser.c (cp_parser_postfix_expression): Pass it. | |
839 | * pt.c (tsubst_copy_and_build): Likewise. | |
840 | * call.c (extend_ref_init_temps): Set | |
841 | DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P. | |
842 | ||
641da50a NS |
843 | 2017-05-09 Nathan Sidwell <nathan@acm.org> |
844 | ||
845 | * cp-lang.c (get_global_decls, cxx_pushdecl): New. | |
846 | (LANG_HOOKS_GETDECLS, LANG_HOOKS_PUSHDECL): Override. | |
847 | * name-lookup.h (pushdecl_top_level): Declare. | |
848 | ||
f3ec182d JM |
849 | 2017-05-08 Jason Merrill <jason@redhat.com> |
850 | ||
851 | PR c++/80178 - parameter passing for uncopyable classes | |
852 | * tree.c (type_has_nontrivial_copy_init): True for classes with only | |
853 | deleted copy/move ctors. | |
854 | (remember_deleted_copy, maybe_warn_parm_abi): New. | |
855 | * decl.c (require_complete_types_for_parms, check_function_type): | |
856 | Call maybe_warn_parm_abi. | |
857 | * call.c (convert_for_arg_passing, build_cxx_call): Likewise. | |
858 | ||
06aa5490 NS |
859 | 2017-05-08 Nathan Sidwell <nathan@acm.org> |
860 | ||
641da50a | 861 | * decl.c (builtin_function_1): Set DECL_ANTICIPATED before pushing. |
507e429b NS |
862 | (start_preparsed_function): Do decl pushing before setting |
863 | current_funciton_decl and announcing it. | |
864 | ||
d16d5eac NS |
865 | * name-lookup.h (pushdecl_with_scope): Replace with ... |
866 | (pushdecl_outermost_localscope): ... this. | |
867 | * name-lookup.c (pushdecl_with_scope): Replace with ... | |
868 | (pushdecl_outermost_localscope): ... this. | |
869 | (pushdecl_namespace_level): Adjust. | |
870 | * decl.c (cp_make_fname_decl): Use pushdecl_outermost_localscope. | |
871 | * lambda.c (insert_capture_proxy): Likewise. | |
872 | ||
7574e458 NS |
873 | * class.c (build_vtbl_initializer): Don't shadow outer variable |
874 | with static var. | |
875 | ||
06aa5490 NS |
876 | Revert _binding -> _value change. |
877 | * name-lookup.h (get_namespace_value, set_global_value): Rename to ... | |
878 | (get_namespace_binding, set_global_binding): ... these. | |
879 | * name-lookup.c (get_namespace_value, set_global_value): Rename to ... | |
880 | (get_namespace_binding, set_global_binding): ... these. | |
881 | (arg_assoc_namespace, pushdecl_maybe_friend_1, | |
882 | check_for_out_of_scope_variable, push_overloaded_decl_1, | |
883 | lookup_name_innermost_nonclass_level, push_namespace): Adjust. | |
884 | * cp-tree.h (IDENTIFIER_GLOBAL_VALUE, | |
885 | SET_IDENTIFIER_GLOBAL_VALUE): Adjust. | |
886 | * decl.c (poplevel): Adjust. | |
887 | * pt.c (make_constrained_auto): Likewise. | |
888 | ||
d4a5c4eb VR |
889 | 2017-05-07 Volker Reichelt <v.reichelt@netcologne.de> |
890 | ||
891 | PR translation/80280 | |
892 | * call.c (print_z_candidate): Fix quoting. | |
893 | ||
56d35585 DM |
894 | 2017-05-05 David Malcolm <dmalcolm@redhat.com> |
895 | ||
896 | * error.c (pedwarn_cxx98): Replace report_diagnostic | |
897 | with diagnostic_report_diagnostic. | |
898 | ||
30318029 NS |
899 | 2017-05-05 Nathan Sidwell <nathan@acm.org> |
900 | ||
4b4b2e58 NS |
901 | * cp-tree.h (IDENTIFIER_GLOBAL_VALUE): Use get_namespace_value. |
902 | (SET_IDENTIFIER_GLOBAL_VALUE): Use set_global_value. | |
903 | (IDENTIFIER_NAMESPACE_VALUE): Delete. | |
904 | * name-lookup.h (namespace_binding, set_namespace_binding): Replace | |
905 | with ... | |
906 | (get_namespace_value, set_global_value): ... these. | |
907 | (get_global_value_if_present, is_typename_at_global_scope): Delete. | |
908 | * decl.c (poplevel): Use get_namespace_value. | |
909 | (grokdeclarator): Use IDENTIFIER_GLOBAL_VALUE. | |
910 | * class.c (build_vtbl_initializer): Stash library decl in | |
911 | static var. Use IDENTIFIER_GLOBAL_VALUE. | |
912 | * except.c (do_get_exception_ptr, do_begin_catch, do_end_catch, | |
913 | do_allocate_exception, do_free_exception, build_throw): Likewise. | |
914 | * init.c (throw_bad_array_new_length): Likewise. | |
915 | * rtti.c (throw_bad_cast, throw_bad_typeid): Likewise. | |
916 | * name-lookup.c (arg_assoc_namespace, pushdecl_maybe_friend_1, | |
917 | check_for_our_of_scope_variable, push_overloaded_decl_1): Use | |
918 | get_namespace_value. | |
919 | (set_namespace_binding_1): Rename to | |
920 | (set_namespace_binding): ... here. | |
921 | (set_global_value): New. | |
922 | (lookup_name_innermost_nonclass_level_1, push_namespace): Use | |
923 | get_namespace_value. | |
924 | * pt.c (listify): Use get_namespace_value. | |
925 | ||
77fa3ec1 NS |
926 | * call.c (make_temporary_var_for_ref_to_temp): Push decl into |
927 | current scope. | |
928 | * lex.c (unqualified_name_lookup_error): Likewise. | |
929 | ||
7187a6c8 NS |
930 | * class.c (alter_class): Use retrofit_lang_decl directly. |
931 | * decl.c (push_local_name, dupliate_decls): Likewise. | |
932 | * semantics.c (omp_privatize_field): Likewise. | |
933 | ||
b6263c5d NS |
934 | Kill walk_namespaces. |
935 | * cp-tree.h (walk_namespaces_fn, walk_namespaces): Delete. | |
936 | * decl.c (walk_namespaces_r, walk_namespaces): Delete. | |
937 | ||
30318029 NS |
938 | Kill per-namespace static_decls. |
939 | * cp-tree.h (static_decls): Declare. | |
940 | (wrapup_globals_for_namespace, | |
941 | diagnose_inline_vars_for_namespace): Replace with ... | |
942 | (wrapup_namespace_globals): ... this. | |
943 | * decl.c (static_decls): Define. | |
944 | (wrapup_globals_for_namespace, | |
945 | diagnose_inline_vars_for_namespace): Replace with ... | |
946 | (wrapup_namespace_globals): ... this. | |
947 | (cxx_init_decl_processing): Initialize static_decls. | |
948 | * decl2.c (c_parse_final_cleanups): Adjust. | |
949 | * name-lookup.h (cp_binding_level): Remove static_decls member. | |
950 | * name-lookup.c (add_decl_to_level): Adjust. | |
951 | (begin_scope): Adjust. | |
952 | ||
dfae9048 PC |
953 | 2017-05-05 Paolo Carlini <paolo.carlini@oracle.com> |
954 | ||
955 | PR c++/71577 | |
956 | * decl.c (reshape_init): Unconditionally return error_mark_node | |
957 | upon error about too many initializers. | |
958 | ||
0f05d905 NS |
959 | 2017-05-04 Nathan Sidwell <nathan@acm.org> |
960 | ||
961 | * constraint.cc (diagnose_check_constraint): Fix %E thinko. | |
962 | ||
0f2c4a8f MS |
963 | 2017-05-04 Martin Sebor <msebor@redhat.com> |
964 | ||
965 | PR translation/80280 | |
966 | * call.c (print_z_candidate): Add missing quoting to %D and other | |
967 | like directives. | |
968 | (build_op_call_1): Same. | |
969 | * constraint.cc (diagnose_check_constraint): Same. | |
970 | * mangle.c (mangle_decl): Same. | |
971 | * name-lookup.c (cp_binding_level_debug): Same. | |
972 | (set_decl_namespace): Same. | |
973 | * parser.c (cp_parser_tx_qualifier_opt): Same. | |
974 | * pt.c (print_candidates_1): Same. | |
975 | (check_template_variable): Same. | |
976 | (tsubst_default_argument): Same. | |
977 | (most_specialized_partial_spec): Same. | |
978 | * semantics.c (omp_reduction_lookup): Same. | |
979 | * tree.c (check_abi_tag_redeclaration): Same. | |
980 | * typeck.c (comptypes): Same. | |
981 | * typeck2.c (abstract_virtuals_error_sfinae): Same. | |
982 | ||
b655c310 NS |
983 | 2017-05-04 Nathan Sidwell <nathan@acm.org> |
984 | ||
ad9870f2 NS |
985 | More global trees. |
986 | * cp-tree.h (enum cp_tree_index): Add CPTI_GLOBAL, | |
987 | CPTI_GLOBAL_TYPE, CPTI_GLOBAL_IDENTIFIER, CPTI_ANON_IDENTIFIER, | |
988 | CPTI_INIT_LIST_IDENTIFIER. | |
989 | (global_namespace, global_type_node, global_identifier, | |
990 | anon_identifier, init_list_identifier): New. | |
991 | * decl.c (global_type_node, global_scope_name): Delete. | |
992 | (initialize_predefined_identifiers): Add new identifiers. | |
993 | (cxx_init_decl_processing): Adjust. | |
994 | * name-lookup.h (global_namespace, global_type_node): Delete. | |
995 | * name-lookup.c (global_namespace, anonymous_namespace_name, | |
996 | get_anonymous_namespace_name): Delete. | |
997 | (namespace_scope_ht_size, begin_scope, pushtag_1, | |
998 | push_namespace): Adjust, | |
999 | * call.c (type_has_extended_temps): Use init_list_identifier. | |
1000 | * pt.c (listify): Likewise. | |
1001 | ||
b655c310 NS |
1002 | * name-lookup.c: Reorder functions to make merging from modules |
1003 | branch simpler. | |
1004 | ||
8108ea30 JM |
1005 | 2017-05-03 Jason Merrill <jason@redhat.com> |
1006 | ||
1007 | * constexpr.c (cxx_eval_outermost_constant_expr): Use TV_CONSTEXPR. | |
1008 | ||
5bb64c41 NS |
1009 | 2017-05-03 Nathan Sidwell <nathan@acm.org> |
1010 | ||
1011 | * cp-tree.h (enum cp_tree_index, cp_global_trees): Move earlier, | |
1012 | along with #defines, to before name-lookup include. | |
1013 | ||
c3b73151 PC |
1014 | 2017-05-02 Paolo Carlini <paolo.carlini@oracle.com> |
1015 | ||
1016 | * pt.c (is_auto_or_concept): Remove. | |
1017 | (type_uses_auto_or_concept): Remove, unused. | |
1018 | (find_parameter_packs_r, extract_autos_r, is_auto_r): Adjust. | |
1019 | * parser.c (tree_type_is_auto_or_concept): Remove, unused. | |
1020 | * cp-tree.h (is_auto_or_concept): Remove. | |
1021 | ||
815d9cc6 XR |
1022 | 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn> |
1023 | ||
1024 | PR c++/80038 | |
1025 | * cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Don't | |
1026 | add pedigree operation and detach call here. | |
1027 | * cp-gimplify.c (cp_gimplify_expr): Remove the calls to | |
1028 | cilk_cp_gimplify_call_params_in_spawned_fn. | |
1029 | (cilk_cp_gimplify_call_params_in_spawned_fn): Remove function. | |
1030 | * semantics.c (simplify_aggr_init_expr): Copy EXPR_CILK_SPAWN. | |
1031 | ||
6bbb3a69 VR |
1032 | 2017-04-29 Volker Reichelt <v.reichelt@netcologne.de> |
1033 | ||
1034 | * parser.c (cp_parser_member_declaration): Add fix-it hints for | |
1035 | stray comma and missing semicolon at end of member declaration. | |
1036 | ||
8211c4a2 VR |
1037 | 2017-04-27 Volker Reichelt <v.reichelt@netcologne.de> |
1038 | ||
1039 | * parser.c (cp_parser_cast_expression): Add target type of cast to | |
1040 | diagnostic. | |
1041 | * error.c (type_to_string): Add '{enum}' suffix to enumeration types. | |
1042 | ||
c8040757 PC |
1043 | 2017-04-26 Paolo Carlini <paolo.carlini@oracle.com> |
1044 | ||
1045 | * decl.c (grok_ctor_properties, ambi_op_p, unary_op_p): Change | |
1046 | return type to bool. | |
1047 | * cp-tree.h (grok_ctor_properties): Update. | |
1048 | ||
a480422d VR |
1049 | 2017-04-26 Volker Reichelt <v.reichelt@netcologne.de> |
1050 | ||
1051 | * parser.c (cp_parser_nested_name_specifier_opt): Add fix-it | |
1052 | information to diagnostic of invalid colon in nested-name-specifier. | |
1053 | ||
70caf430 VR |
1054 | 2017-04-25 Volker Reichelt <v.reichelt@netcologne.de> |
1055 | ||
1056 | * parser.c (cp_parser_elaborated_type_specifier): Add fix-it to | |
1057 | diagnostic of invalid class/struct keyword after enum. | |
1058 | ||
fbe91804 DM |
1059 | 2017-04-25 David Malcolm <dmalcolm@redhat.com> |
1060 | ||
1061 | * parser.c (cp_parser_member_declaration): Add fix-it hint | |
1062 | for removing stray semicolons. | |
1063 | ||
5ca28c1d DM |
1064 | 2017-04-25 David Malcolm <dmalcolm@redhat.com> |
1065 | ||
1066 | * name-lookup.c (get_std_name_hint): New function. | |
1067 | (maybe_suggest_missing_header): New function. | |
1068 | (suggest_alternative_in_explicit_scope): Call | |
1069 | maybe_suggest_missing_header. | |
1070 | ||
7d5dbb22 DM |
1071 | 2017-04-25 David Malcolm <dmalcolm@redhat.com> |
1072 | ||
1073 | PR c++/80177 | |
1074 | * name-lookup.c (suggest_alternative_in_explicit_scope): Convert | |
1075 | candidate type of bm from tree to const char *. | |
1076 | (consider_binding_level): Likewise. | |
1077 | (lookup_name_fuzzy): Likewise, using this to merge the best | |
1078 | result from the preprocessor into bm, rather than immediately | |
1079 | returning, so that better matches from reserved words can "win". | |
1080 | Guard the rejection of keywords that don't start decl-specifiers | |
1081 | so it only happens for FUZZY_LOOKUP_TYPENAME. | |
1082 | ||
761ad35c VR |
1083 | 2017-04-24 Volker Reichelt <v.reichelt@netcologne.de> |
1084 | ||
1085 | * decl.c (grokdeclarator): Use %qT instead of %<%T%> in diagnostics. | |
1086 | (start_enum): Likewise. | |
1087 | (build_enumerator): Likewise. Use %qE instead of plain %E. | |
1088 | * parser.c (cp_parser_mem_initializer_list): Use %qD instead of | |
1089 | %<%D%> in diagnostics. | |
1090 | (cp_parser_elaborated_type_specifier): Likewise. | |
1091 | * pt.c (make_pack_expansion): Use %qT and %qE instead of | |
1092 | %<%T%> and %<%E%> in diagnostics. | |
1093 | (tsubst_pack_expansion): Likewise. | |
1094 | ||
412f61f0 DM |
1095 | 2017-04-24 David Malcolm <dmalcolm@redhat.com> |
1096 | ||
1097 | PR c++/80016 | |
1098 | * parser.c (cp_parser_unary_expression): Generate a location | |
1099 | range for alignof and sizeof expressions. | |
1100 | ||
ec856f5f VR |
1101 | 2017-04-24 Volker Reichelt <v.reichelt@netcologne.de> |
1102 | ||
1103 | * parser.c (cp_parser_cv_qualifier_seq_opt): Add fix-it info to | |
1104 | error message. | |
1105 | (cp_parser_virt_specifier_seq_opt): Likewise. | |
1106 | (set_and_check_decl_spec_loc): Likewise twice. | |
1107 | ||
176e79b5 JM |
1108 | 2017-04-21 Jason Merrill <jason@redhat.com> |
1109 | ||
1110 | PR c++/80179 - ICE with initialized flexible array member. | |
1111 | * constexpr.c (verify_ctor_sanity): Handle flexible array members. | |
1112 | ||
ad32f067 RB |
1113 | 2017-04-21 Richard Biener <rguenther@suse.de> |
1114 | ||
1115 | * cp-tree.h (copy_decl): Annotate with CXX_MEM_STAT_INFO. | |
1116 | (copy_type): Likewise. | |
1117 | * lex.c (copy_decl): Pass down mem-stat info. | |
1118 | (copy_type): Likewise. | |
1119 | ||
34d57a10 JW |
1120 | 2017-04-20 Jonathan Wakely <jwakely@redhat.com> |
1121 | ||
1122 | PR c++/80473 | |
1123 | * init.c (build_new_1): Suppress notes about over-aligned new when | |
1124 | the warning is suppressed. | |
1125 | ||
c3cbcd45 VR |
1126 | 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de> |
1127 | ||
1128 | * parser.c (cp_parser_member_declaration): Add warning with fixit | |
1129 | information for extra semicolon after in-class function definition. | |
1130 | ||
8a59d466 JJ |
1131 | 2017-04-20 Jakub Jelinek <jakub@redhat.com> |
1132 | ||
1133 | PR middle-end/80423 | |
1134 | * tree.c (build_cplus_array_type): Call build_array_type | |
1135 | with the intended TYPE_TYPELESS_STORAGE flag value, instead | |
1136 | of calling build_array_type and modifying later TYPE_TYPELESS_STORAGE | |
1137 | on the shared type. | |
1138 | ||
be7c73ae MP |
1139 | 2017-04-18 Marek Polacek <polacek@redhat.com> |
1140 | ||
1141 | PR c++/80244 - ICE with attribute in template alias. | |
1142 | * tree.c (strip_typedefs): Handle UNDERLYING_TYPE. | |
1143 | ||
d6e3e8a5 MP |
1144 | PR c++/80241 - ICE with alignas pack expansion. |
1145 | * error.c (dump_expr): Handle TREE_LIST. | |
1146 | * parser.c (cp_parser_std_attribute_list): Return error_mark if | |
1147 | make_pack_expansion returns an error. | |
1148 | ||
1adb82e1 BE |
1149 | 2017-04-17 Bernd Edlinger <bernd.edlinger@hotmail.de> |
1150 | ||
1151 | PR c++/80287 | |
1152 | * class.c (fixup_may_alias): Fix all type variants. | |
1153 | ||
6864d849 JM |
1154 | 2017-04-17 Jason Merrill <jason@redhat.com> |
1155 | ||
d478f1e4 JM |
1156 | PR c++/80415 - wrong error with default arg and array reference. |
1157 | * tree.c (lvalue_kind): Return clk_class for an array prvalue. | |
1158 | ||
6864d849 JM |
1159 | * pt.c (tsubst_init): Set TARGET_EXPR_DIRECT_INIT_P. |
1160 | ||
e072b0c4 AO |
1161 | 2017-04-15 Alexandre Oliva <aoliva@redhat.com> |
1162 | ||
1163 | * decl.c (name_unnamed_type): Split out of... | |
1164 | (grokdeclarator): ... this. | |
1165 | * decl.h (name_unnamed_type): Declare. | |
1166 | ||
350792ff RB |
1167 | 2017-04-12 Richard Biener <rguenther@suse.de> |
1168 | Bernd Edlinger <bernd.edlinger@hotmail.de> | |
1169 | ||
1170 | PR middle-end/79671 | |
1171 | * tree.c (build_cplus_array_type): Set TYPE_TYPELESS_STORAGE | |
1172 | for arrays of character or std::byte type. | |
1173 | ||
125db6a1 JM |
1174 | 2017-04-11 Jason Merrill <jason@redhat.com> |
1175 | ||
1176 | PR c++/80294 - ICE with constexpr and inheritance. | |
1177 | * constexpr.c (reduced_constant_expression_p): | |
1178 | A null constructor element is non-constant. | |
1179 | (cxx_eval_indirect_ref): Don't VERIFY_CONSTANT before | |
1180 | returning an empty base. | |
1181 | ||
347e1f77 JJ |
1182 | 2017-04-11 Jakub Jelinek <jakub@redhat.com> |
1183 | ||
1184 | PR c++/80370 | |
1185 | * decl.c (cp_finish_decomp): If processing_template_decl on | |
1186 | non-dependent decl, only set TREE_TYPE on the v[i] decls, but don't | |
1187 | change their DECL_VALUE_EXPR nor cp_finish_decl them. Instead make | |
1188 | sure DECL_VALUE_EXPR is the canonical NULL type ARRAY_REF for tsubst | |
1189 | processing. | |
1190 | * pt.c (value_dependent_expression_p) <case VAR_DECL>: For variables | |
1191 | with DECL_VALUE_EXPR, return true if DECL_VALUE_EXPR is type | |
1192 | dependent. | |
1193 | ||
82665822 JJ |
1194 | 2017-04-11 Jakub Jelinek <jakub@redhat.com> |
1195 | ||
1196 | PR c++/80363 | |
1197 | * error.c (dump_expr): Handle VEC_COND_EXPR like COND_EXPR. | |
1198 | ||
b447b28c JJ |
1199 | 2017-04-10 Jakub Jelinek <jakub@redhat.com> |
1200 | ||
1201 | PR c++/80176 | |
1202 | * tree.c (lvalue_kind): For COMPONENT_REF with BASELINK second | |
1203 | operand, if it is a static member function, recurse on the | |
1204 | BASELINK. | |
1205 | ||
98a7a34e MP |
1206 | 2017-04-10 Marek Polacek <polacek@redhat.com> |
1207 | ||
1208 | PR sanitizer/80348 | |
1209 | * typeck.c (cp_build_binary_op): Use NULL_TREE instead of NULL. Set | |
1210 | ORIG_TYPE earlier and not only when shortening. | |
1211 | ||
c60faeee JM |
1212 | 2017-04-07 Jason Merrill <jason@redhat.com> |
1213 | ||
3f4334cb JM |
1214 | PR c++/80356 - ICE with reference to function template argument. |
1215 | PR c++/79294 | |
1216 | * pt.c (convert_nontype_argument_function): Adjust type even with a | |
1217 | value-dependent argument. | |
1218 | ||
c60faeee JM |
1219 | PR c++/80267 - ICE with nested capture of reference |
1220 | PR c++/60992 | |
1221 | * pt.c (tsubst_copy): Handle lookup finding a capture proxy. | |
1222 | ||
1ef532f4 MP |
1223 | 2017-04-07 Marek Polacek <polacek@redhat.com> |
1224 | ||
1225 | PR sanitizer/80348 | |
1226 | * typeck.c (cp_build_binary_op): Convert COP[01] to ORIG_TYPE. | |
1227 | ||
2166aeb3 MP |
1228 | PR c++/80095 |
1229 | * call.c (build_over_call): Don't check cxx_dialect. | |
1230 | * cp-gimplify.c (cp_gimplify_init_expr): Don't check cxx_dialect nor | |
1231 | whether SUB is a CONSTRUCTOR. | |
1232 | * init.c (build_new_1): Don't check cxx_dialect. | |
1233 | * tree.c (replace_placeholders): Add a function comment. Return if | |
1234 | not in C++14, or if the object isn't a (member of a) class. | |
1235 | * typeck2.c (store_init_value): Don't check cxx_dialect nor whether | |
1236 | TYPE is CLASS_TYPE_P. | |
1237 | ||
98568e03 JJ |
1238 | 2017-04-05 Jakub Jelinek <jakub@redhat.com> |
1239 | ||
1240 | PR c++/80309 | |
1241 | * pt.c (canonical_type_parameter): Use vec_safe_grow_cleared instead | |
1242 | of a loop doing vec_safe_push of NULL. Formatting fixes. | |
1243 | (rewrite_template_parm): Copy TEMPLATE_PARM_PARAMETER_PACK from oldidx | |
1244 | to newidx before calling canonical_type_parameter on newtype. | |
1245 | ||
c0ea338b VR |
1246 | 2017-04-04 Volker Reichelt <v.reichelt@netcologne.de> |
1247 | ||
1248 | PR c++/80296 | |
1249 | * cxx-pretty-print.c (cxx_pretty_printer::expression): Add | |
1250 | UNARY_PLUS_EXPR case. | |
1251 | ||
e4307389 JM |
1252 | 2017-04-03 Jason Merrill <jason@redhat.com> |
1253 | ||
1254 | * semantics.c (finish_template_type): Check CLASSTYPE_TEMPLATE_INFO. | |
1255 | ||
5764ee3c JW |
1256 | 2017-04-03 Jonathan Wakely <jwakely@redhat.com> |
1257 | ||
1258 | * class.c (update_vtable_entry_for_fn): Fix typo in comment. | |
1259 | * decl2.c (one_static_initialization_or_destruction): Likewise. | |
1260 | * name-lookup.c (store_bindings): Likewise. | |
1261 | * parser.c (make_call_declarator): Likewise. | |
1262 | * pt.c (check_explicit_specialization): Likewise. | |
1263 | ||
5a68fae7 JM |
1264 | 2017-04-03 Jason Merrill <jason@redhat.com> |
1265 | ||
1266 | PR sanitizer/79993 - ICE with VLA initialization from string | |
1267 | PR c++/69487 - wrong VLA initialization from string | |
1268 | * init.c (finish_length_check): Split out from build_vec_init. | |
1269 | (build_vec_init): Handle STRING_CST. | |
1270 | * typeck2.c (split_nonconstant_init): Handle STRING_CST. | |
1271 | (digest_init_r): Don't give a STRING_CST VLA type. | |
1272 | ||
af88f557 JJ |
1273 | 2017-03-31 Jakub Jelinek <jakub@redhat.com> |
1274 | ||
6f3af356 JJ |
1275 | PR c++/79572 |
1276 | * cp-gimplify.c (cp_genericize_r): Sanitize INTEGER_CSTs with | |
1277 | REFERENCE_TYPE. Adjust ubsan_maybe_instrument_reference caller | |
1278 | for NOP_EXPR to REFERENCE_TYPE. | |
1279 | ||
af88f557 JJ |
1280 | PR libstdc++/80251 |
1281 | * cp-tree.h (enum cp_trait_kind): Add CPTK_IS_AGGREGATE. | |
1282 | * cxx-pretty-print.c (pp_cxx_trait_expression): Handle | |
1283 | CPTK_IS_AGGREGATE. | |
1284 | * semantics.c (trait_expr_value): Handle CPTK_IS_AGGREGATE. | |
1285 | Remove extraneous parens. | |
1286 | (finish_trait_expr): Handle CPTK_IS_AGGREGATE. | |
1287 | * parser.c (cp_parser_primary_expression): Handle RID_IS_AGGREGATE. | |
1288 | (cp_parser_trait_expr): Likewise. | |
1289 | ||
a9e4a1a5 JJ |
1290 | 2017-03-27 Jakub Jelinek <jakub@redhat.com> |
1291 | ||
1292 | PR middle-end/80162 | |
1293 | * cp-tree.h (cxx_mark_addressable): Add array_ref_p argument. | |
1294 | * typeck.c (cxx_mark_addressable): Likewise. Look through | |
1295 | VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE | |
1296 | to ARRAY_TYPE. | |
1297 | (cp_build_array_ref): Pass true as array_ref_p to cxx_mark_addressable. | |
1298 | ||
90471a3d JM |
1299 | 2017-03-24 Jason Merrill <jason@redhat.com> |
1300 | ||
1301 | PR c++/77339 - ICE with invalid use of alias template. | |
1302 | * pt.c (lookup_template_class_1): Don't try to enter the scope of an | |
1303 | alias template. | |
1304 | ||
c8b1fbc1 MP |
1305 | 2017-03-24 Marek Polacek <polacek@redhat.com> |
1306 | ||
1307 | PR c++/80119 | |
1308 | * cp-gimplify.c (cp_fold): Strip CLEANUP_POINT_EXPR if the expression | |
1309 | doesn't have side effects. | |
1310 | ||
16e9eaa6 JM |
1311 | 2017-03-23 Jason Merrill <jason@redhat.com> |
1312 | ||
842562b4 JM |
1313 | PR c++/80150 - ICE with overloaded variadic deduction. |
1314 | * pt.c (try_one_overload): Remove asserts. | |
1315 | ||
16e9eaa6 JM |
1316 | PR c++/77563 - missing ambiguous conversion error. |
1317 | * call.c (convert_like_real): Use LOOKUP_IMPLICIT. | |
1318 | ||
ee3ff394 MP |
1319 | 2017-03-23 Marek Polacek <polacek@redhat.com> |
1320 | ||
1321 | * cp-tree.h: Remove a C_RID_YYCODE reference. | |
1322 | ||
f13e9cd5 JJ |
1323 | 2017-03-22 Jakub Jelinek <jakub@redhat.com> |
1324 | ||
1325 | PR c++/80141 | |
1326 | * semantics.c (finish_omp_clause) <case OMP_CLAUSE_SIMDLEN, | |
1327 | case OMP_CLAUSE_ALIGNED>: Call maybe_constant_value only when not | |
1328 | processing_template_decl. | |
1329 | ||
d3e19c2c PC |
1330 | 2017-03-21 Paolo Carlini <paolo.carlini@oracle.com> |
1331 | ||
1332 | PR c++/77752 | |
1333 | * name-lookup.c (pushtag_1): Add check for bogus, non template, | |
1334 | std::initializer_list. | |
1335 | ||
8bee092e JJ |
1336 | 2017-03-21 Jakub Jelinek <jakub@redhat.com> |
1337 | ||
1338 | PR c++/35878 | |
1339 | * init.c (std_placement_new_fn_p, build_new_1): Formatting fixes. | |
1340 | ||
ece3b7e6 VV |
1341 | 2017-03-21 Ville Voutilainen <ville.voutilainen@gmail.com> |
1342 | ||
1343 | PR c++/35878 | |
8bee092e | 1344 | * init.c (std_placement_new_fn_p): New. |
ece3b7e6 VV |
1345 | (build_new_1): Call it. |
1346 | ||
8afd9c45 JM |
1347 | 2017-03-20 Jason Merrill <jason@redhat.com> |
1348 | ||
55b11c60 JM |
1349 | PR c++/80096 - ICE with C++17 non-type auto. |
1350 | * pt.c (tsubst): Delay tsubst of type of template non-type | |
1351 | parameter. | |
1352 | ||
18f73c5f JM |
1353 | PR c++/79519 - ICE with deleted template friend. |
1354 | * decl.c (grokdeclarator): Complain about misplaced function | |
1355 | definition using =, as well. | |
1356 | ||
8afd9c45 JM |
1357 | PR c++/79640 - infinite recursion with generic lambda. |
1358 | * pt.c (tsubst_copy) [VAR_DECL]: Register the dummy instantiation | |
1359 | before substituting its initializer. | |
1360 | ||
92377255 MP |
1361 | 2017-03-20 Marek Polacek <polacek@redhat.com> |
1362 | Paolo Carlini <paolo.carlini@oracle.com> | |
1363 | ||
1364 | PR c++/80059 - ICE with noexcept and __transaction_atomic | |
1365 | * except.c (build_must_not_throw_expr): Call | |
9da12bea | 1366 | instantiate_non_dependent_expr. |
92377255 | 1367 | |
c8816908 JM |
1368 | 2017-03-19 Jason Merrill <jason@redhat.com> |
1369 | ||
a4dfaae1 JM |
1370 | PR c++/80084 - wrong C++17 decomposition by reference of parameter. |
1371 | * decl.c (cp_finish_decomp): Don't pull out the DECL_INITIAL of a | |
1372 | reference decomposition. | |
1373 | ||
c8816908 JM |
1374 | PR c++/80077 - error with constexpr and -fno-elide-constructors. |
1375 | * constexpr.c (cxx_eval_call_expression): Set ctx->call while | |
1376 | expanding trivial constructor. | |
1377 | ||
c7ec585d JM |
1378 | 2017-03-17 Jason Merrill <jason@redhat.com> |
1379 | ||
d1a73b0b JM |
1380 | PR c++/78345 - ICE initializing array from lambda. |
1381 | * init.c (build_aggr_init): Check array initializer. | |
1382 | (build_vec_init): Check the type of a CONSTRUCTOR. | |
1383 | ||
c7ec585d JM |
1384 | PR c++/80073 - C++17 ICE with virtual base. |
1385 | * decl.c (xref_basetypes): Also check for indirect vbases. | |
1386 | ||
fbd603c4 JM |
1387 | 2017-03-16 Jason Merrill <jason@redhat.com> |
1388 | ||
2e92d7ad JM |
1389 | * decl.c (start_enum): std::byte aliases anything. |
1390 | ||
fbd603c4 JM |
1391 | PR c++/79797 |
1392 | * constexpr.c (lookup_placeholder): Tweak. | |
1393 | ||
559a77e1 JM |
1394 | 2017-03-15 Jason Merrill <jason@redhat.com> |
1395 | ||
1396 | PR c++/80043 - ICE with -fpermissive | |
1397 | * typeck.c (convert_for_assignment): Handle instantiate_type | |
1398 | not giving an error. | |
1399 | ||
9b74f933 NS |
1400 | 2017-03-14 Nathan Sidwell <nathan@acm.org> |
1401 | ||
1402 | PR c++/79393 DR 1658 workaround | |
1403 | * method.c (synthesized_method_base_walk): Inihibit abstract class | |
1404 | virtual base access check here. | |
1405 | (synthesized_method_walk): Not here. | |
1406 | ||
16e93e4b NS |
1407 | 2017-03-13 Nathan Sidwell <nathan@acm.org> |
1408 | ||
1409 | PR c++/79393 DR 1658 workaround | |
1410 | * method.c (synthesized_method_walk): Check vbases of abstract | |
1411 | classes for dtor walk. | |
1412 | ||
2f6f187a DM |
1413 | 2017-03-10 David Malcolm <dmalcolm@redhat.com> |
1414 | ||
1415 | PR translation/79848 | |
1416 | * decl.c (grokfndecl): Simplify uses of "%<%s%>" to "%qs". | |
1417 | ||
0c942f3e JM |
1418 | 2017-03-10 Jason Merrill <jason@redhat.com> |
1419 | ||
1420 | PR c++/79960 - alias templates and partial ordering | |
1421 | * pt.c (comp_template_args): Add partial_order parm. | |
1422 | (template_args_equal): Likewise. | |
1423 | (comp_template_args_porder): New. | |
1424 | (get_partial_spec_bindings): Use it. | |
1425 | ||
455d833c MP |
1426 | 2017-03-10 Marek Polacek <polacek@redhat.com> |
1427 | ||
1428 | PR c++/79967 | |
1429 | * decl.c (grokdeclarator): Check ATTRLIST before dereferencing it. | |
1430 | ||
cdd669f9 JJ |
1431 | 2017-03-10 Jakub Jelinek <jakub@redhat.com> |
1432 | ||
e260b0a7 JJ |
1433 | PR c++/79899 |
1434 | * optimize.c (maybe_thunk_body): Don't ICE if fns[0] is NULL. | |
1435 | Use XALLOCAVEC macro. | |
1436 | ||
cdd669f9 JJ |
1437 | PR c++/79896 |
1438 | * decl.c (finish_enum_value_list): If value is error_mark_node, | |
1439 | don't copy it and change its type. | |
1440 | * init.c (constant_value_1): Return error_mark_node if DECL_INITIAL | |
1441 | of CONST_DECL is error_mark_node. | |
1442 | ||
423aec8b MP |
1443 | 2017-03-09 Marek Polacek <polacek@redhat.com> |
1444 | ||
1445 | PR c++/79900 - ICE in strip_typedefs | |
1446 | * tree.c (strip_typedefs): Skip the attribute handling if T is | |
1447 | a variant type which hasn't been updated yet. | |
1448 | ||
6443c7c0 MP |
1449 | PR c++/79687 - wrong code with pointer-to-member |
1450 | * init.c (constant_value_1): Break if the variable has a dynamic | |
1451 | initializer. | |
1452 | ||
89262ec6 JM |
1453 | 2017-03-08 Jason Merrill <jason@redhat.com> |
1454 | ||
1455 | PR c++/79797 - ICE with self-reference in array DMI. | |
1456 | * constexpr.c (lookup_placeholder): Split out... | |
1457 | (cxx_eval_constant_expression): ...from here. | |
1458 | ||
a71dbc63 JJ |
1459 | 2017-03-07 Jakub Jelinek <jakub@redhat.com> |
1460 | ||
1461 | PR c/79834 | |
1462 | * parser.c (cp_parser_omp_cancellation_point, | |
1463 | cp_parser_omp_target_enter_data, cp_parser_omp_target_exit_data, | |
1464 | cp_parser_omp_target_update): Change "may only be used in compound | |
1465 | statements" diagnostics, such that the same translatable string is | |
1466 | used for all pragmas. | |
1467 | (cp_parser_pragma): Likewise. Use error_at instead of | |
1468 | cp_parser_error for that diagnostics. | |
1469 | ||
bdbbf28d MP |
1470 | 2017-03-06 Marek Polacek <polacek@redhat.com> |
1471 | ||
1472 | PR c++/79796 - ICE with NSDMI and this pointer | |
1473 | * call.c (build_over_call): Handle NSDMI with a 'this' by calling | |
1474 | replace_placeholders. | |
1475 | ||
345edb37 JJ |
1476 | 2017-03-06 Jakub Jelinek <jakub@redhat.com> |
1477 | ||
1478 | PR c++/79822 | |
1479 | * constexpr.c (cxx_eval_statement_list): Treat empty ({ }) like | |
1480 | ({ (void) 0; }). | |
1481 | ||
90d9a8e6 JM |
1482 | 2017-03-06 Jason Merrill <jason@redhat.com> |
1483 | ||
1484 | Revert "Allow deduction guides to look into primary template." | |
1485 | * cp-tree.h, parser.c, pt.c, search.c: Revert. | |
1486 | ||
d8b4baeb PC |
1487 | 2017-03-05 Paolo Carlini <paolo.carlini@oracle.com> |
1488 | ||
1489 | PR c++/70266 | |
1490 | * except.c (build_must_not_throw_expr): Perform the implicit | |
1491 | conversions on the condition. | |
1492 | ||
4cdeb234 JM |
1493 | 2017-03-03 Jason Merrill <jason@redhat.com> |
1494 | ||
108154ff JM |
1495 | * mangle.c (mangle_decl): Check -Wnoexcept-type instead of |
1496 | -Wc++1z-compat. | |
1497 | ||
4cdeb234 JM |
1498 | Core issues 2273 and 2277 |
1499 | * call.c (joust): Adjust using-declaration tiebreaker to handle | |
1500 | the intermediate base case. | |
1501 | * method.c (strip_inheriting_ctors): Just return the argument if | |
1502 | !flag_new_inheriting_ctors. | |
1503 | ||
30d309aa RB |
1504 | 2017-03-03 Richard Biener <rguenther@suse.de> |
1505 | ||
1506 | PR c++/79825 | |
1507 | * cp-gimplify.c (simple_empty_class_p): Handle EMPTY_CLASS_EXPR. | |
1508 | ||
7278b0a2 MP |
1509 | 2017-03-03 Marek Polacek <polacek@redhat.com> |
1510 | ||
1511 | PR c++/79791 | |
1512 | * typeck.c (string_conv_p): In C++11, always call pedwarn with | |
1513 | OPT_Wwrite_strings. | |
1514 | ||
de35db42 JM |
1515 | 2017-03-02 Jason Merrill <jason@redhat.com> |
1516 | ||
fb5ce608 JM |
1517 | Update overload resolution with deduction guides. |
1518 | * pt.c (do_class_deduction): Always build the copy guide. | |
1519 | (copy_guide_p, template_guide_p): New. | |
1520 | (build_deduction_guide): Remember the original constructor. | |
1521 | * call.c (joust): Prefer the copy guide and non-template guides. | |
1522 | ||
de35db42 JM |
1523 | Allow deduction guides to look into primary template. |
1524 | * cp-tree.h (struct saved_scope): Add deduction_guide_type. | |
1525 | (struct cp_decl_specifier_seq): Add constructor_p. | |
1526 | * parser.c (cp_parser_decl_specifier_seq): Set constructor_p. | |
1527 | (cp_parser_init_declarator): Check it. Set ctor_dtor_or_conv_p. | |
1528 | Clear deduction_guide_type. Don't handle deduction guide names. | |
1529 | (cp_parser_declarator): Don't clear ctor_dtor_or_conv_p. | |
1530 | (cp_parser_direct_declarator): Likewise. Handle deduction guides. | |
1531 | (cp_parser_member_declaration, cp_parser_cache_defarg) | |
1532 | (cp_parser_objc_class_ivars): Set ctor_dtor_or_conv_p. | |
1533 | * pt.c (tsubst_copy, tsubst_copy_and_build): Revert last change. | |
1534 | (build_deduction_guide): Set deduction_guide_type. | |
1535 | (dependent_scope_p): Check deduction_guide_type. | |
1536 | * search.c (lookup_member): Likewise. | |
1537 | ||
50bea0c5 JJ |
1538 | 2017-03-02 Jakub Jelinek <jakub@redhat.com> |
1539 | ||
1540 | PR c++/79782 | |
1541 | * init.c (mark_exp_read_r): New function. | |
1542 | (emit_mem_initializers): Use cp_walk_tree with mark_exp_read_r on | |
1543 | whole arguments instead of plain mark_exp_read on TREE_LIST values. | |
1544 | ||
9a642cca JM |
1545 | 2017-03-01 Jason Merrill <jason@redhat.com> |
1546 | ||
1547 | Class template argument deduction in new-expression | |
1548 | * init.c (build_new): Handle deduction from no initializer. | |
1549 | * parser.c (cp_parser_new_expression): Don't require a single | |
1550 | expression for class template deduction. | |
1551 | * typeck2.c (cxx_incomplete_type_diagnostic): Fix diagnostic for | |
1552 | class template placeholder. | |
1553 | * pt.c (tsubst_copy) [TEMPLATE_DECL]: Handle dependent context. | |
1554 | (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: Handle SCOPE_REF. | |
1555 | (redeclare_class_template): Set TEMPLATE_TYPE_PARM_FOR_CLASS. | |
1556 | ||
e3e9e8ca JJ |
1557 | 2017-03-01 Jakub Jelinek <jakub@redhat.com> |
1558 | ||
1559 | PR c++/79746 | |
1560 | * init.c (emit_mem_initializers): When not constructing vbases of | |
1561 | abstract classes, mark arguments as read for | |
1562 | -Wunused-but-set-parameter. | |
1563 | ||
853ef4e5 JM |
1564 | 2017-02-28 Jason Merrill <jason@redhat.com> |
1565 | ||
1566 | Class template argument deduction refinements | |
1567 | * call.c (joust): Move deduction guide tiebreaker down. | |
1568 | * decl.c (start_decl_1, cp_finish_decl, grokdeclarator): Allow class | |
1569 | deduction with no initializer. | |
1570 | * pt.c (build_deduction_guide): Handle implicit default/copy ctor. | |
1571 | (do_class_deduction): Use that rather than special case. | |
1572 | (do_auto_deduction): Handle null initializer. | |
1573 | ||
324ff1a0 JJ |
1574 | 2017-02-28 Jakub Jelinek <jakub@redhat.com> |
1575 | ||
1576 | * decl.c (find_decomp_class_base): Use cond ? G_("...") : G_("...") | |
1577 | instead of just cond ? "..." : "...". | |
1578 | (grokdeclarator): Likewise. | |
1579 | (build_enumerator): Likewise. | |
1580 | * init.c (build_new_1): Likewise. | |
1581 | * call.c (build_new_method_call_1): Likewise. | |
1582 | * parser.c: Include intl.h. | |
1583 | (cp_parser_oacc_enter_exit_data): Use %s and ternary operator only for | |
1584 | "enter"/"exit" keyword. | |
1585 | (cp_finalize_oacc_routine): Don't use %s to supply portions of the | |
1586 | message. | |
1587 | ||
080384d6 JM |
1588 | 2017-02-27 Jason Merrill <jason@redhat.com> |
1589 | ||
1590 | PR c++/71568 - SFINAE forming pointer to member function | |
1591 | * init.c (build_offset_ref): Check the return value of | |
1592 | perform_or_defer_access_check. | |
1593 | ||
d66d4590 MP |
1594 | 2017-02-27 Marek Polacek <polacek@redhat.com> |
1595 | ||
1596 | * decl.c (expand_static_init): Add missing } in a comment. | |
1597 | ||
24f12823 VR |
1598 | 2017-02-27 Volker Reichelt <v.reichelt@netcologne.de> |
1599 | ||
1600 | * init.c: Include intl.h. | |
1601 | (build_new_1): Move message strings into pedwarn to make them | |
1602 | -Wformat-security friendly. Mark string for translation. | |
1603 | * pt.c (tsubst_copy_and_build): Mark string for translation. | |
1604 | Make the pointer const. | |
1605 | * semantics.c (finish_id_expression): Mark strings for translation. | |
1606 | ||
9d975cb6 JJ |
1607 | 2017-02-25 Jakub Jelinek <jakub@redhat.com> |
1608 | ||
1609 | * call.c (build_op_delete_call): Make msg1 and msg2 const. | |
1610 | ||
4227c9ad JJ |
1611 | 2017-02-24 Jakub Jelinek <jakub@redhat.com> |
1612 | ||
1613 | PR c++/79588 | |
1614 | * call.c (build_over_call): Call check_function_arguments even for | |
1615 | -Wrestrict, adjust check_function_arguments caller. | |
1616 | * parser.c (cp_parser_postfix_expression): Don't handle -Wrestrict | |
1617 | here. | |
1618 | * typeck.c (cp_build_function_call_vec): Adjust | |
1619 | check_function_arguments caller. | |
1620 | ||
5713d448 MP |
1621 | 2017-02-24 Marek Polacek <polacek@redhat.com> |
1622 | ||
1623 | PR translation/79705 | |
1624 | * decl.c (check_redeclaration_exception_specification): Mark a string | |
1625 | for translation. Make the pointer const. | |
1626 | ||
e3beb191 PC |
1627 | 2017-02-23 Paolo Carlini <paolo.carlini@oracle.com> |
1628 | ||
1629 | PR c++/79361 | |
1630 | * pt.c (register_specialization): Check duplicate_decls return value | |
1631 | for error_mark_node and pass it back. | |
1632 | ||
349c6351 JM |
1633 | 2017-02-22 Jason Merrill <jason@redhat.com> |
1634 | ||
680ed106 JM |
1635 | PR c++/79679 - missing destructor for argument |
1636 | * call.c (build_over_call): Don't pass tf_no_cleanup to argument | |
1637 | conversions. | |
1638 | ||
349c6351 JM |
1639 | * pt.c (do_class_deduction): Handle 0 argument case. |
1640 | ||
e40b6fc7 JJ |
1641 | 2017-02-22 Jakub Jelinek <jakub@redhat.com> |
1642 | ||
1643 | PR c++/79664 | |
1644 | * parser.c (cp_parser_omp_teams, cp_parser_omp_target): Use | |
1645 | SET_EXPR_LOCATION on OMP_TARGET/OMP_TEAMS tree. | |
1646 | * constexpr.c (potential_constant_expression_1): Handle | |
1647 | OMP_*, OACC_* and CILK_* trees. Use error_at with | |
1648 | EXPR_LOC_OR_LOC (t, input_location) computed early | |
1649 | instead of error, or error_at with location_of (t). | |
1650 | ||
78af14ae MP |
1651 | 2017-02-22 Marek Polacek <polacek@redhat.com> |
1652 | ||
1653 | PR c++/79653 | |
1654 | * parser.c (cp_parser_std_attribute_spec): Don't build the attribute | |
1655 | if the alignas expression is erroneous. | |
1656 | * pt.c (tsubst_attribute): If tsubst_pack_expansion fails, return | |
1657 | error_mark_node. | |
1658 | ||
8fdddd3d MP |
1659 | PR c++/79657 |
1660 | * semantics.c (finish_underlying_type): Bail out for incomplete enums. | |
1661 | ||
46b48ef5 JM |
1662 | 2017-02-21 Jason Merrill <jason@redhat.com> |
1663 | ||
626aeaa7 JM |
1664 | PR c++/50308 - wrong deprecated warning with ADL |
1665 | PR c++/17729 - duplicate deprecated warning | |
1666 | * semantics.c (finish_id_expression): Only call mark_used on a | |
1667 | function if we aren't building a call. | |
1668 | ||
46b48ef5 JM |
1669 | PR c++/41727 - ICE with partial spec of partial instantiation |
1670 | * pt.c (process_partial_specialization): For now, don't check more | |
1671 | specialized if there is more than one level of args. | |
1672 | ||
a232a1cb MP |
1673 | 2017-02-21 Marek Polacek <polacek@redhat.com> |
1674 | ||
1675 | PR c++/79535 | |
1676 | * cp-tree.h (maybe_reject_flexarray_init): Declare. | |
1677 | * init.c (maybe_reject_flexarray_init): No longer static. | |
1678 | Add check for current_function_decl. | |
1679 | * parser.c (cp_parser_late_parse_one_default_arg): Reject | |
1680 | a default mem-initializer for a flexible array. | |
1681 | ||
b7280ac2 JJ |
1682 | 2017-02-21 Jakub Jelinek <jakub@redhat.com> |
1683 | Paolo Carlini <paolo.carlini@oracle.com> | |
1684 | ||
1685 | PR c++/79654 | |
1686 | * decl.c (cp_finish_decomp): Don't set decl's type to error_mark_node | |
1687 | on error. | |
1688 | * pt.c (tsubst_decomp_names): Return error_mark_node if the first | |
1689 | decl after the decomposition artificial decl has error_mark_node. | |
1690 | * decl2.c (prune_vars_needing_no_initialization): Use error_operand_p | |
1691 | instead of just == error_mark_node comparison. | |
1692 | ||
664beaf2 JJ |
1693 | 2017-02-21 Jakub Jelinek <jakub@redhat.com> |
1694 | ||
5c3f1d7b JJ |
1695 | PR sanitizer/79589 |
1696 | * decl.c: Include gimplify.h. | |
1697 | (cp_finish_decomp): Make sure there is no sharing of trees | |
1698 | in between DECL_VALUE_EXPR of decomposition decls. | |
1699 | ||
3bb43119 JJ |
1700 | PR c++/79655 |
1701 | * constexpr.c (cxx_eval_array_reference): Diagnose negative subscript. | |
1702 | ||
664beaf2 JJ |
1703 | PR c++/79639 |
1704 | * constexpr.c (cxx_eval_store_expression): If *valp is a PTRMEM_CST, | |
1705 | call cplus_expand_constant on it first. | |
1706 | ||
b80dfe44 JM |
1707 | 2017-02-19 Jason Merrill <jason@redhat.com> |
1708 | ||
0e53a276 JM |
1709 | PR c++/78139 - destructor needed by new-expression |
1710 | * call.c (build_special_member_call): Use tf_no_cleanup. | |
1711 | ||
8f712b76 JM |
1712 | PR c++/78282 - auto template and pack expansion |
1713 | * pt.c (find_parameter_packs_r): Don't walk into the type of | |
1714 | templates other than template template-parameters. | |
1715 | ||
bcbdfa4c JM |
1716 | PR c++/79606 - ICE with this->base_member in NSDMI |
1717 | * class.c (build_base_path): Check processing_template_decl. | |
1718 | ||
736a933c JM |
1719 | PR c++/79607 - ICE with T{} initializer |
1720 | * decl.c (type_dependent_init_p): Check the type of a CONSTRUCTOR. | |
1721 | ||
7950124e JM |
1722 | PR c++/79566 - elaborated-type-specifier in range for |
1723 | * parser.c (cp_parser_simple_declaration): Fix check for type | |
1724 | definition. | |
1725 | ||
bea40d11 JM |
1726 | PR c++/79400 - confusing suggestion of 'noexcept' |
1727 | * parser.c (cp_parser_exception_specification_opt): Remove | |
1728 | suggestion for deprecated dynamic exception-specification. | |
1729 | ||
4cd15931 JM |
1730 | PR c++/79470 - partial ordering with reference parameters |
1731 | * pt.c (unify) [INDIRECT_REF]: Handle pack expansions. | |
1732 | ||
cfb82564 JM |
1733 | PR c++/79500 - ICE with non-template deduction guide |
1734 | * pt.c (do_class_deduction): Use STRIP_TEMPLATE rather than | |
1735 | DECL_TEMPLATE_RESULT. | |
1736 | ||
de59c92b JM |
1737 | PR c++/79580 - ICE with compound literal |
1738 | * parser.c (cp_parser_class_head): If we're in the middle of an | |
1739 | expression, use ts_within_enclosing_non_class. | |
1740 | ||
b80dfe44 JM |
1741 | PR c++/79503 - inherited ctor taking base class |
1742 | * call.c (add_function_candidate): Also check that | |
1743 | DECL_INHERITED_CTOR_BASE is reference-related to the parameter type. | |
1744 | ||
f46e2bc9 PC |
1745 | 2017-02-19 Paolo Carlini <paolo.carlini@oracle.com> |
1746 | ||
1747 | PR c++/79380 | |
1748 | * typeck.c (cxx_alignas_expr): Reject a non-integral alignas | |
1749 | argument. | |
1750 | ||
7dfa657b JW |
1751 | 2017-02-19 Eric Fiselier <eric@efcs.ca> |
1752 | Jonathan Wakely <jwakely@redhat.com> | |
1753 | ||
1754 | PR c++/69523 | |
1755 | * parser.c (cp_parser_unqualified_id): Use OPT_Wliteral_suffix to | |
1756 | control warning about literal suffix identifiers without a leading | |
1757 | underscore. | |
1758 | ||
1ee26047 JM |
1759 | 2017-02-17 Jason Merrill <jason@redhat.com> |
1760 | ||
cb94c700 JM |
1761 | PR c++/79508 - lookup error with member template |
1762 | * parser.c (cp_parser_template_name): Clear | |
1763 | parser->context->object_type if we aren't doing lookup. | |
1764 | ||
7c586749 JM |
1765 | PR c++/78690 - ICE with using and global type with same name |
1766 | * pt.c (type_dependent_object_expression_p): True for | |
1767 | IDENTIFIER_NODE. | |
1768 | ||
edf1849a JM |
1769 | PR c++/79549 - C++17 ICE with non-type auto template parameter pack |
1770 | * pt.c (convert_template_argument): Just return an auto arg pack. | |
1771 | (tsubst_template_args): Don't tsubst an auto pack type. | |
1772 | ||
b10c7cd7 JM |
1773 | PR c++/79556 - C++17 ICE with non-type auto |
1774 | * pt.c (do_auto_deduction): Don't try to deduce from null type. | |
1775 | ||
1ee26047 JM |
1776 | PR c++/79533 - C++17 ICE with temporary cast to reference |
1777 | * call.c (build_over_call): Conversion to a reference prevents copy | |
1778 | elision. | |
1779 | ||
790ecf85 JJ |
1780 | 2017-02-16 Jakub Jelinek <jakub@redhat.com> |
1781 | Jason Merrill <jason@redhat.com> | |
1782 | ||
1783 | PR c++/79502 - lost nodiscard attribute | |
1784 | * pt.c (apply_late_template_attributes): Do apply non-dependent | |
1785 | attributes to types. | |
1786 | ||
61cee260 JM |
1787 | 2017-02-16 Jason Merrill <jason@redhat.com> |
1788 | ||
1e163090 JM |
1789 | PR c++/78572 - ICE with self-modifying array initializer |
1790 | * constexpr.c (cxx_eval_store_expression): The object we're | |
1791 | initializing is outside the constant-expression. | |
1792 | (cxx_eval_call_expression): Set ctx->call. | |
1793 | ||
61cee260 JM |
1794 | PR c++/79050 - ICE with undeduced auto and LTO |
1795 | * decl.c (poplevel): Remove undeduced auto decls. | |
1796 | ||
bcac0b4d JJ |
1797 | 2017-02-16 Jakub Jelinek <jakub@redhat.com> |
1798 | ||
1799 | PR c++/79512 | |
1800 | * parser.c (cp_parser_omp_target): For -fopenmp-simd | |
1801 | ignore #pragma omp target even when not followed by identifier. | |
1802 | ||
19e8a45f JM |
1803 | 2017-02-15 Jason Merrill <jason@redhat.com> |
1804 | Jakub Jelinek <jakub@redhat.com> | |
1805 | ||
1806 | PR c++/79464 - ICE in IPA with omitted constructor parms | |
1807 | * class.c (build_clone): Also omit parms from TYPE_ARG_TYPES. | |
1808 | (adjust_clone_args): Adjust. | |
1809 | (add_method): Remember omitted parms. | |
1810 | * call.c (add_function_candidate): Likewise. | |
1811 | * mangle.c (write_method_parms): Likewise. | |
1812 | * method.c (ctor_omit_inherited_parms): Return false if there are no | |
1813 | parms to omit. | |
1814 | ||
945c17d8 MS |
1815 | 2017-02-15 Martin Sebor <msebor@redhat.com> |
1816 | ||
1817 | PR c++/79363 | |
1818 | * init.c (maybe_reject_flexarray_init): New function. | |
1819 | (perform_member_init): Call it. | |
1820 | ||
4f5e5fcb JJ |
1821 | 2017-02-15 Jakub Jelinek <jakub@redhat.com> |
1822 | ||
e7202857 JJ |
1823 | PR c++/79301 |
1824 | * parser.c (cp_parser_std_attribute): Don't pedwarn about | |
1825 | [[deprecated]] with -std=c++11 and [[fallthrough]] with | |
1826 | -std=c++11 and -std=c++14. | |
1827 | ||
4f5e5fcb JJ |
1828 | PR c++/79288 |
1829 | * decl.c (grokdeclarator): For static data members, handle thread_p | |
1830 | only after handling inline. | |
1831 | ||
6f207d58 MP |
1832 | 2017-02-14 Marek Polacek <polacek@redhat.com> |
1833 | ||
1834 | PR c++/79420 | |
1835 | PR c++/79463 | |
1836 | * parser.c (cp_parser_postfix_dot_deref_expression): Avoid | |
1837 | clobbering if the postfix expression isn't an EXPR_P. | |
1838 | ||
8cb7aaa1 JM |
1839 | 2017-02-13 Jason Merrill <jason@redhat.com> |
1840 | ||
1841 | PR c++/79461 - ICE with lambda in constexpr constructor | |
1842 | * constexpr.c (build_data_member_initialization): Ignore | |
1843 | initialization of a local variable. | |
1844 | ||
b84702c0 JJ |
1845 | 2017-02-13 Jakub Jelinek <jakub@redhat.com> |
1846 | ||
5995f597 JJ |
1847 | * init.c (warn_placement_new_too_small): Add missing space in |
1848 | diagnostics. | |
1849 | * parser.c (cp_parser_oacc_declare): Likewise. | |
1850 | * mangle.c (maybe_check_abi_tags): Likewise. | |
1851 | ||
b84702c0 JJ |
1852 | PR c++/79232 |
1853 | * typeck.c (cp_build_modify_expr): Handle properly COMPOUND_EXPRs | |
1854 | on lhs that have {PRE{DEC,INC}REMENT,MODIFY,MIN,MAX,COND}_EXPR | |
1855 | in the rightmost operand. | |
1856 | ||
b9a161ff NS |
1857 | 2017-02-13 Nathan Sidwell <nathan@acm.org> |
1858 | ||
1859 | PR c++/79296 - ICE mangling localized template instantiation | |
1860 | * decl2.c (determine_visibility): Use template fn context for | |
1861 | local class instantiations. | |
1862 | ||
bc61048a JM |
1863 | 2017-02-11 Jason Merrill <jason@redhat.com> |
1864 | ||
817a77e4 JM |
1865 | PR c++/77659 - ICE with new and C++14 aggregate NSDMI |
1866 | * init.c (build_new): Make backups of any CONSTRUCTORs in init. | |
1867 | (build_new_1): Use replace_placeholders. | |
1868 | * tree.c (replace_placeholders_t): Also track whether we've seen a | |
1869 | placeholder. | |
1870 | (replace_placeholders, replace_placeholders_r): Adjust. | |
1871 | * cp-tree.h: Adjust. | |
1872 | ||
bc61048a JM |
1873 | PR c++/77790 - ICE with auto function in C++11 mode |
1874 | * decl.c (undeduced_auto_decl): Remove C++14 limitation. | |
1875 | (require_deduced_type): Add complain parm, return bool. | |
1876 | * cp-tree.h: Adjust. | |
1877 | * decl2.c (mark_used): Use require_deduced_type. | |
1878 | ||
c16b872c JM |
1879 | 2017-02-10 Jason Merrill <jason@redhat.com> |
1880 | ||
6a2cc46b JM |
1881 | PR c++/78908 - template ops and bitfields |
1882 | * tree.c (build_min_non_dep): Use unlowered_expr_type. | |
1883 | ||
5c97093b JM |
1884 | PR c++/78897 - constexpr union |
1885 | * constexpr.c (cxx_eval_store_expression): A store to a union member | |
1886 | erases a previous store to another member. | |
1887 | ||
f494ac0e JM |
1888 | PR c++/71285 - member of fold-expression |
1889 | * semantics.c (finish_unary_fold_expr) | |
1890 | (finish_binary_fold_expr): Use null type for fold-expressions. | |
1891 | ||
c16b872c JM |
1892 | PR c++/79401 - protected inherited constructor |
1893 | * call.c (enforce_access): For inheriting constructor, find a base | |
1894 | binfo in the path we already have. | |
1895 | ||
6f4f30bf MP |
1896 | 2017-02-10 Marek Polacek <polacek@redhat.com> |
1897 | ||
1898 | PR c++/79435 | |
1899 | * pt.c (type_dependent_expression_p): Check if the expression type | |
1900 | is null. | |
1901 | ||
3799a5b8 MP |
1902 | PR c++/79184 |
1903 | * cvt.c (ocp_convert): Add a sentinel against -Wint-in-bool-context | |
1904 | if warnings shouldn't be given. | |
1905 | ||
a7c8ed0c PC |
1906 | 2017-02-10 Paolo Carlini <paolo.carlini@oracle.com> |
1907 | ||
1908 | PR c++/71737 | |
1909 | * pt.c (tsubst_decl): Don't try to preserve a typedef that names | |
1910 | an error_mark_node as type. | |
1911 | ||
9bfc55d0 JJ |
1912 | 2017-02-09 Jakub Jelinek <jakub@redhat.com> |
1913 | Jason Merrill <jason@redhat.com> | |
1914 | ||
1915 | PR c++/79143 | |
1916 | * pt.c (instantiate_class_template_1): Copy CLASSTYPE_NON_AGGREGATE | |
1917 | from pattern to type. | |
1918 | ||
a56c0ac0 JM |
1919 | 2017-02-09 Jason Merrill <jason@redhat.com> |
1920 | ||
1921 | PR c++/79316 - default argument in deduction guide | |
1922 | PR c++/79350 - explicit deduction guide | |
1923 | * parser.c (cp_parser_constructor_declarator_p) | |
1924 | (cp_parser_direct_declarator): Parse deduction guides more like | |
1925 | constructors. | |
1926 | * cp-tree.h (enum special_function_kind): Add sfk_deduction_guide. | |
1927 | * tree.c (special_function_p): Return it. | |
1928 | * decl.c (check_special_function_return_type): Handle it. | |
1929 | (grokdeclarator, grokfndecl): Adjust. | |
1930 | (cp_finish_decl): Pass flags to do_auto_deduction. | |
1931 | * error.c (dump_decl_name): Use TFF_UNQUALIFIED_NAME. | |
1932 | * pt.c (dguide_name_p): Take a const_tree. | |
1933 | (do_class_deduction): Handle explicit. | |
1934 | (do_auto_deduction): Pass flags through. | |
1935 | (build_deduction_guide): Copy explicit flag. | |
1936 | ||
56f71478 JJ |
1937 | 2017-02-09 Jakub Jelinek <jakub@redhat.com> |
1938 | ||
f08683a1 JJ |
1939 | PR c++/79429 |
1940 | * parser.c (cp_parser_omp_ordered): Don't check for non-pragma_stmt | |
1941 | non-pragma_compound context here. | |
1942 | (cp_parser_omp_target): Likewise. | |
1943 | (cp_parser_pragma): Don't call push_omp_privatization_clauses and | |
1944 | parsing for ordered and target omp pragmas in non-pragma_stmt | |
1945 | non-pragma_compound contexts. | |
1946 | ||
56f71478 JJ |
1947 | PR c/79431 |
1948 | * parser.c (cp_parser_oacc_declare): Formatting fix. | |
1949 | (cp_parser_omp_declare_target): Don't invoke symtab_node::get on | |
1950 | automatic variables. | |
1951 | ||
02889d23 CLT |
1952 | 2016-02-09 Nathan Sidwell <nathan@codesourcery.com> |
1953 | Chung-Lin Tang <cltang@codesourcery.com> | |
1954 | ||
1955 | * parser.c (cp_parser_oacc_clause_tile): Disallow collapse. Fix | |
1956 | parsing. Parse constant expression. Remove semantic checking. | |
1957 | (cp_parser_omp_clause_collapse): Disallow tile. | |
1958 | (cp_parser_omp_for_loop): Deal with tile clause. Don't emit a parse | |
1959 | error about missing for after already emitting one. Use more | |
1960 | conventional for idiom for unbounded loop. | |
1961 | * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_TILE. | |
1962 | * semantics.c (finish_omp_clauses): Correct TILE semantic check. | |
1963 | (finish_omp_for): Deal with tile clause. | |
1964 | ||
8e956c22 NS |
1965 | 2017-02-07 Nathan Sidwell <nathan@acm.org> |
1966 | ||
1967 | * method.c (synthesized_method_base_walk): New. Broken out of ... | |
1968 | (synthesized_method_walk): ... here. Call it. Cleanup | |
1969 | initializations. | |
1970 | ||
bb7d75ff PP |
1971 | 2017-02-07 Patrick Palka <ppalka@gcc.gnu.org> |
1972 | ||
1973 | PR c++/79360 | |
1974 | * typeck2.c (process_init_constructor_union): Consider only | |
1975 | FIELD_DECLs when looking for an NSDMI. | |
1976 | ||
44a6da7b JM |
1977 | 2017-02-06 Jason Merrill <jason@redhat.com> |
1978 | ||
1979 | PR c++/71193 - incomplete types in templates | |
1980 | * parser.c (cp_parser_postfix_dot_deref_expression): In a template | |
1981 | handle incomplete type by pedwarning and then treating as dependent. | |
1982 | ||
a5e8cbd1 JJ |
1983 | 2017-02-06 Jakub Jelinek <jakub@redhat.com> |
1984 | ||
98e09245 JJ |
1985 | PR c++/79379 |
1986 | * constexpr.c (cxx_eval_constant_expression): Handle ANNOTATE_EXPR. | |
1987 | (potential_constant_expression_1): Likewise. | |
1988 | ||
e8b0383c JJ |
1989 | PR c++/79377 |
1990 | * tree.c (build_min_non_dep_op_overload): For POST{INC,DEC}REMENT_EXPR | |
1991 | allow one fewer than expected arguments if flag_permissive. | |
1992 | ||
a5e8cbd1 JJ |
1993 | PR c++/79372 |
1994 | * decl.c (cp_finish_decomp): On error set decl type to error_mark_node. | |
1995 | * pt.c (tsubst_expr): Don't call tsubst_decomp_names on decompositions | |
1996 | with error_mark_node type. | |
1997 | ||
99be38ec JM |
1998 | 2017-02-03 Jason Merrill <jason@redhat.com> |
1999 | ||
77095a6a JM |
2000 | PR c++/78689 - ICE on constructor with label |
2001 | * optimize.c (maybe_clone_body): Replace omitted parameters with | |
2002 | null lvalues. | |
2003 | * class.c (build_clone): Fix logic for omitting inherited parms. | |
2004 | ||
8a87daca JM |
2005 | PR c++/12245 - excessive memory use |
2006 | * constexpr.c (maybe_constant_value): Fold maybe_constant_value_1 | |
2007 | back in. Don't cache constants. | |
2008 | (maybe_constant_init): Don't cache constants. | |
2009 | ||
99be38ec JM |
2010 | PR c++/79294 - ICE with invalid template argument |
2011 | * pt.c (convert_nontype_argument_function): Check value-dependence. | |
2012 | (convert_nontype_argument): Don't check it here for function ptrs. | |
2013 | ||
27de0fab RB |
2014 | 2017-02-02 Richard Biener <rguenther@suse.de> |
2015 | ||
2016 | PR cp/14179 | |
2017 | * cp-gimplify.c (cp_fold): When folding a CONSTRUCTOR copy | |
2018 | it lazily on the first changed element only and copy it | |
2019 | fully upfront, only storing changed elements. | |
2020 | ||
d8d58893 PC |
2021 | 2017-02-02 Paolo Carlini <paolo.carlini@oracle.com> |
2022 | ||
2023 | PR c++/69637 | |
2024 | * decl2.c (grokbitfield): In case of error don't set-up DECL_INITIAL | |
2025 | to the width. | |
2026 | ||
19bdccb4 JJ |
2027 | 2017-01-31 Jakub Jelinek <jakub@redhat.com> |
2028 | ||
2029 | PR c++/79304 | |
2030 | * error.c (dump_expr) <case COMPONENT_REF>: Don't print . | |
2031 | after ARROW_EXPR. | |
2032 | ||
fcb2cdfc DM |
2033 | 2017-01-31 David Malcolm <dmalcolm@redhat.com> |
2034 | ||
2035 | PR c++/79298 | |
2036 | * name-lookup.c (suggest_alternative_in_explicit_scope): Resolve | |
2037 | any namespace aliases. | |
2038 | ||
7f357c61 NS |
2039 | 2017-01-31 Nathan Sidwell <nathan@acm.org> |
2040 | ||
5ae37bdf NS |
2041 | PR c++/79290 |
2042 | * typeck.c (build_ptrmemfunc_access_expr): Set TREE_NO_WARNING. | |
2043 | ||
de3fbef6 NS |
2044 | PR c++/67273 |
2045 | PR c++/79253 | |
2046 | * pt.c: (instantiate_decl): Push to top level when current | |
2047 | function scope doesn't match. Only push lmabda scope stack when | |
2048 | pushing to top. | |
2049 | ||
1a5bac38 NS |
2050 | * cp-tree.h (instantiate_decl): Make defer_ok bool. |
2051 | * pt.c: Fix instantiate_decl calls to pass true/false not 0/1 | |
2052 | (instantiate_decl): Simplify and reorder state saving and restoration. | |
2053 | ||
7f357c61 NS |
2054 | PR c++/79264 |
2055 | * lambda.c (maybe_generic_this_capture): Deal with template-id-exprs. | |
2056 | * semantics.c (finish_member_declaration): Assert class is being | |
2057 | defined. | |
2058 | ||
8db29d88 AO |
2059 | 2017-01-30 Alexandre Oliva <aoliva@redhat.com> |
2060 | ||
2061 | Introduce C++ support in libcc1. | |
2062 | * cp-tree.h (struct lang_identifier): Add oracle_looked_up. | |
2063 | (ansi_opname): Rename to... | |
2064 | (cp_operator_id): ... this. Adjust all callers. | |
2065 | (ansi_assopname): Rename to... | |
2066 | (cp_assignment_operator_id): ... this. Adjust all callers. | |
2067 | (cp_literal_operator_id): Declare. | |
2068 | (set_global_friend): Declare. | |
2069 | (is_global_friend): Declare. | |
2070 | (enum cp_oracle_request): New type. | |
2071 | (cp_binding_oracle_function): New type. | |
2072 | (cp_binding_oracle): Declare. | |
2073 | (cp_finish_injected_record_type): Declare. | |
2074 | * friend.c (global_friend): New var. | |
2075 | (set_global_friend): New fn. | |
2076 | (is_global_friend): New fn. | |
2077 | (is_friend): Call is_global_friend. | |
2078 | * name-lookup.c (cp_binding_oracle): New var. | |
2079 | (query_oracle): New fn. | |
2080 | (qualified_lookup_using_namespace): Call query_oracle. | |
2081 | (lookup_name_real_1): Likewise. | |
2082 | * parser.c (cp_literal_operator_id): Drop static. | |
2083 | * search.c (friend_accessible_p): Call is_global_friend. | |
2084 | * semantics.c (is_this_parameter): Accept a variable if the | |
2085 | binding oracle is enabled. | |
2086 | ||
20f058d0 JM |
2087 | 2017-01-27 Jason Merrill <jason@redhat.com> |
2088 | ||
2089 | PR c++/78771 - ICE with inherited constructor. | |
2090 | * call.c (build_over_call): Call deduce_inheriting_ctor here. | |
2091 | * pt.c (tsubst_decl): Not here. | |
2092 | * class.c (add_method): Or here. | |
2093 | * method.c (deduce_inheriting_ctor): Handle clones. | |
2094 | (implicitly_declare_fn): Don't deduce inheriting ctors yet. | |
2095 | ||
bb6a6ee9 AB |
2096 | 2017-01-27 Adam Butcher <adam@jessamine.co.uk> |
2097 | ||
2098 | PR c++/64382 | |
2099 | * cp/parser.c (parsing_default_capturing_generic_lambda_in_template): | |
2100 | New function. | |
2101 | * cp/cp-tree.h: Declare it. | |
2102 | * cp/semantics.c (finish_id_expression): Resolve names within a default | |
2103 | capturing generic lambda defined within a template prior to | |
2104 | instantiation to allow for captures to be added to the closure type. | |
2105 | ||
905d2812 JJ |
2106 | 2017-01-26 Jakub Jelinek <jakub@redhat.com> |
2107 | ||
2108 | PR c++/68727 | |
2109 | * cp-tree.def (OFFSETOF_EXPR): Bump number of operands to 2. | |
2110 | * cp-tree.h (finish_offsetof): Add OBJECT_PTR argument. | |
2111 | * parser.c (cp_parser_builtin_offsetof): Pass result of | |
2112 | build_static_cast of null_pointer_node to finish_offsetof. | |
2113 | * semantics.c (finish_offsetof): Add OBJECT_PTR argument, use | |
2114 | it for -Winvalid-offsetof pedwarn instead of trying to guess | |
2115 | original offsetof type from EXPR. Save OBJECT_PTR as a new | |
2116 | second operand to OFFSETOF_EXPR. | |
2117 | * pt.c (tsubst_copy_and_build) <case OFFSETOF_EXPR>: Adjust | |
2118 | finish_offsetof caller, pass the second operand of OFFSETOF_EXPR | |
2119 | as OBJECT_PTR. | |
2120 | ||
effdaefe JM |
2121 | 2017-01-26 Jason Merrill <jason@redhat.com> |
2122 | ||
5668970a JM |
2123 | * name-lookup.c (parse_using_directive): Deprecate strong using. |
2124 | ||
effdaefe JM |
2125 | PR c++/79176 - lambda ICE with -flto -Os |
2126 | * decl2.c (vague_linkage_p): Handle decloned 'tors. | |
2127 | * tree.c (decl_linkage): Likewise. | |
2128 | ||
58feaa5f MS |
2129 | 2017-01-25 Martin Sebor <msebor@redhat.com> |
2130 | ||
9f35c953 | 2131 | * decl.c (grokdeclarator): Fix a typo in a comment. |
58feaa5f | 2132 | |
0e343868 JJ |
2133 | 2017-01-25 Jakub Jelinek <jakub@redhat.com> |
2134 | ||
a25608aa JJ |
2135 | PR c++/78896 |
2136 | * decl.c (cp_finish_decomp): Disallow memberwise decomposition of | |
2137 | lambda expressions. | |
2138 | ||
0e343868 JJ |
2139 | PR c++/77914 |
2140 | * parser.c (cp_parser_lambda_declarator_opt): Pedwarn with | |
2141 | OPT_Wpedantic on lambda templates for -std=c++14 and higher. | |
2142 | ||
e5e391d6 MO |
2143 | 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com> |
2144 | ||
2145 | PR lto/79061 | |
2146 | * decl.c (cxx_init_decl_processing): Pass main_input_filename | |
2147 | to build_translation_unit_decl. | |
2148 | ||
7cfd79d6 JJ |
2149 | 2017-01-24 Jakub Jelinek <jakub@redhat.com> |
2150 | ||
2151 | PR c++/79205 | |
2152 | * cp-gimplify.c (cp_genericize_r): Add result of | |
2153 | convert_from_reference on invisiref parm to p_set. | |
2154 | ||
3e4b91f2 NS |
2155 | 2017-01-24 Nathan Sidwell <nathan@acm.org> |
2156 | ||
1d7bc790 NS |
2157 | PR c++/78469 - defaulted ctor and inaccessible dtor |
2158 | * cp-tree.h (tsubst_flags): Add tf_no_cleanup. | |
2159 | * init.c (build_new_1): Pass tf_no_cleanup to build_value_init. | |
2160 | * tree.c (build_target_expr): Check tf_no_cleanup. | |
2161 | ||
3e4b91f2 NS |
2162 | PR c++/79118 - anon-members and constexpr |
2163 | * constexpr.c (cx_check_missing_mem_inits): Caller passes type not | |
2164 | ctor decl. Recursively check anonymous members. | |
2165 | (register_constexpr_fundef): Adjust cx_check_missing_mem_inits | |
2166 | call. | |
2167 | (explain_invalid_constexpr_fn): Likewise. | |
2168 | ||
e6b8075c NS |
2169 | 2017-01-23 Nathan Sidwell <nathan@acm.org> |
2170 | ||
fc7612fd NS |
2171 | PR c++/71710 - template using directive of field |
2172 | * pt.c (tsubst_copy_and_build [COMPONENT_REF]): Move FIELD_DECL | |
2173 | check earlier. | |
2174 | ||
e6b8075c NS |
2175 | PR c++/71406 - ICE with scope-ref'd template id exprs |
2176 | PR c++/77508 | |
2177 | * typeck.c (finish_class_member_access_expr): Break up SCOPE_REF | |
2178 | before breaking up TEMPLATE_ID_EXPR. | |
2179 | ||
4b9f2115 NS |
2180 | 2017-01-20 Nathan Sidwell <nathan@acm.org> |
2181 | ||
2182 | PR c++/78495 - wrong code inherited ctor and invisi-ref parm | |
2183 | * cp-gimplify.c (cp_generize_r): Don't skip thunks. | |
2184 | ||
ebed7175 DM |
2185 | 2017-01-20 David Malcolm <dmalcolm@redhat.com> |
2186 | ||
2187 | PR c++/77829 | |
2188 | PR c++/78656 | |
2189 | * cp-tree.h (suggest_alternatives_for): Add bool param. | |
2190 | (suggest_alternative_in_explicit_scope): New decl. | |
2191 | * error.c (qualified_name_lookup_error): When SCOPE is a namespace | |
2192 | that isn't the global one, call new function | |
2193 | suggest_alternative_in_explicit_scope, only calling | |
2194 | suggest_alternatives_for if it fails, and disabling near match | |
2195 | searches fort that case. When SCOPE is the global namespace, | |
2196 | pass true for new param to suggest_alternatives_for to allow for | |
2197 | fuzzy name lookups. | |
2198 | * lex.c (unqualified_name_lookup_error): Pass true for new param | |
2199 | to suggest_alternatives_for. | |
2200 | * name-lookup.c (consider_binding_level): Add forward decl. | |
2201 | (suggest_alternatives_for): Add "suggest_misspellings" param, | |
2202 | using it to conditionalize the fuzzy name-lookup code. | |
2203 | (suggest_alternative_in_explicit_scope): New function. | |
2204 | * parser.c (cp_parser_primary_expression): When calling | |
2205 | finish_id_expression, pass location of id_expression rather | |
2206 | than that of id_expr_token. | |
2207 | (cp_parser_id_expression): Convert local "unqualified_id" from | |
2208 | tree to cp_expr to avoid implicitly dropping location information. | |
2209 | ||
2ebd93e1 MP |
2210 | 2017-01-20 Marek Polacek <polacek@redhat.com> |
2211 | ||
2212 | PR c/64279 | |
2213 | * call.c (build_conditional_expr_1): Warn about duplicated branches. | |
2214 | * semantics.c (finish_expr_stmt): Build statement using the proper | |
2215 | location. | |
2216 | ||
0655c6d5 JM |
2217 | 2017-01-19 Jason Merrill <jason@redhat.com> |
2218 | ||
b2c06d05 JM |
2219 | US 20 - forwarding references and class template argument deduction |
2220 | * cp-tree.h (TEMPLATE_TYPE_PARM_FOR_CLASS): New. | |
2221 | * pt.c (push_template_decl_real): Set it. | |
2222 | (maybe_adjust_types_for_deduction): Check it. | |
2223 | (rewrite_template_parm): Copy it. | |
2224 | ||
689f867c JM |
2225 | US 19 - deduction guides and constructors |
2226 | * call.c (joust): Prefer deduction guides to constructors. | |
2227 | * pt.c (build_deduction_guide): Set DECL_ARTIFICIAL. | |
2228 | (deduction_guide_p): Check DECL_P. | |
2229 | ||
a0889599 JM |
2230 | * decl.c (check_initializer): Always use build_aggr_init for array |
2231 | decomposition. | |
2232 | ||
0655c6d5 JM |
2233 | PR c++/79130 - decomposition and direct-initialization |
2234 | * init.c (build_aggr_init): Communicate direct-initialization to | |
2235 | build_vec_init. | |
2236 | (build_vec_init): Check for array copy sooner. | |
2237 | * parser.c (cp_parser_decomposition_declaration): Remove call to | |
2238 | build_x_compound_expr_from_list. | |
2239 | ||
8b1346a8 JM |
2240 | 2017-01-18 Jason Merrill <jason@redhat.com> |
2241 | ||
2242 | PR c++/68666 - member variable template-id | |
2243 | * typeck.c (finish_class_member_access_expr): Handle variable | |
2244 | template-id. | |
2245 | * pt.c (lookup_and_finish_template_variable): No longer static. | |
2246 | * cp-tree.h: Declare it. | |
2247 | ||
c484627c NS |
2248 | 2017-01-18 Nathan Sidwell <nathan@acm.org> |
2249 | ||
2250 | PR c++/78488 | |
2251 | * call.c (build_over_call): When checking ellipsis conversions for | |
2252 | an inherited ctor, make sure there is at least one conversion. | |
2253 | ||
46c4e8a1 | 2254 | 2017-01-18 Jason Merrill <jason@redhat.com> |
e3aeb9d3 JM |
2255 | |
2256 | PR c++/78894 - ICE with class deduction and default arg | |
2257 | * pt.c (build_deduction_guide): Set DECL_PRIMARY_TEMPLATE. | |
2258 | ||
0c6299bb MT |
2259 | 2017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de> |
2260 | ||
2261 | PR c++/77489 | |
2262 | * mangle.c (write_discriminator): Reorganize abi warning check. | |
2263 | ||
2c65d990 NS |
2264 | 2017-01-18 Nathan Sidwell <nathan@acm.org> |
2265 | ||
96176bb3 NS |
2266 | * cp-tree.h: Clarify exception spec node comment. |
2267 | * except.c (nothrow_spec_p): Simplify by checking node-equality. | |
2268 | ||
2c65d990 NS |
2269 | PR c++/79091 |
2270 | * mangle.c (write_exception_spec): Check nothrow explicitly. | |
2271 | (write_encoding): Don't increment processing_template_decl around | |
2272 | encoding. | |
2273 | ||
4bbc35f3 MT |
2274 | 2017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de> |
2275 | ||
2276 | PR c++/70182 | |
2277 | * mangle.c (write_template_args): Add "on" for operator names. | |
2278 | ||
f6efea51 MT |
2279 | 2017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de> |
2280 | ||
2281 | PR c++/77489 | |
2282 | * mangle.c (write_discriminator): Handle discriminator >= 10. | |
2283 | ||
8ddfdbc2 NS |
2284 | 2017-01-17 Nathan Sidwell <nathan@acm.org> |
2285 | ||
2286 | PR c++/61636 | |
2287 | * cp-tree.h (maybe_generic_this_capture): Declare. | |
2288 | * lambda.c (resolvable_dummy_lambda): New, broken out of ... | |
2289 | (maybe_resolve_dummy): ... here. Call it. | |
2290 | (maybe_generic_this_capture): New. | |
2291 | * parser.c (cp_parser_postfix_expression): Speculatively capture | |
2292 | this in generic lambda in unresolved member function call. | |
2293 | * pt.c (tsubst_copy_and_build): Force hard error from failed | |
2294 | member function lookup in generic lambda. | |
2295 | ||
893ffa2c AH |
2296 | 2017-01-17 Aldy Hernandez <aldyh@redhat.com> |
2297 | ||
2298 | PR c++/70565 | |
2299 | * cp-array-notation.c (expand_array_notation_exprs): Handle | |
2300 | OMP_PARALLEL. | |
2301 | ||
91d01bf4 JM |
2302 | 2017-01-11 Jason Merrill <jason@redhat.com> |
2303 | ||
2304 | PR c++/78337 - ICE on invalid with generic lambda | |
2305 | * semantics.c (process_outer_var_ref): Check if containing_function | |
2306 | is null. Move inform call under complain test. | |
2307 | ||
01bfd257 NS |
2308 | 2017-01-11 Nathan Sidwell <nathan@acm.org> |
2309 | ||
2310 | PR c++/77812 | |
2311 | * name-lookup.c (set_namespace_binding_1): An overload of 1 decl | |
2312 | is a new overload. | |
2313 | ||
5b33cc83 NS |
2314 | 2017-01-11 Nathan Sidwell <nathan@acm.org> |
2315 | ||
2316 | * name-lookup.c (push_overloaded_decl_1): Refactor OVERLOAD creation. | |
2317 | ||
6b5b4e9c JJ |
2318 | 2017-01-11 Jakub Jelinek <jakub@redhat.com> |
2319 | ||
1f258a55 JJ |
2320 | PR c++/78341 |
2321 | * parser.c (cp_parser_std_attribute_spec): Remove over-eager | |
2322 | assertion. Formatting fix. | |
2323 | ||
6b5b4e9c JJ |
2324 | PR c++/72813 |
2325 | * decl2.c (c_parse_final_cleanups): Set flag_syntax_only to 1 after | |
2326 | writing PCH file. | |
2327 | ||
b9f4757f DM |
2328 | 2017-01-10 David Malcolm <dmalcolm@redhat.com> |
2329 | ||
2330 | PR c++/77949 | |
2331 | * parser.c (cp_parser_class_specifier_1): Only suggest inserting | |
2332 | a missing semicolon if we have a valid insertion location for | |
2333 | the fix-it hint. | |
2334 | ||
2af5cb50 JM |
2335 | 2017-01-10 Jason Merrill <jason@redhat.com> |
2336 | ||
2337 | FI 20, decomposition declaration with parenthesized initializer. | |
2338 | * parser.c (cp_parser_decomposition_declaration): Use | |
2339 | cp_parser_initializer. | |
2340 | ||
f4da28a0 JM |
2341 | 2017-01-09 Jason Merrill <jason@redhat.com> |
2342 | ||
2343 | Implement P0195R2, C++17 variadic using. | |
2344 | * parser.c (cp_parser_using_declaration): Handle ellipsis and comma. | |
2345 | * pt.c (tsubst_decl): Handle pack expansion in USING_DECL_SCOPE. | |
2346 | * error.c (dump_decl): Likewise. | |
2347 | ||
bd2c6270 JJ |
2348 | 2017-01-09 Jakub Jelinek <jakub@redhat.com> |
2349 | ||
2350 | PR translation/79019 | |
2351 | PR translation/79020 | |
2352 | * semantics.c (finish_omp_clauses): Add missing whitespace to | |
2353 | translatable strings. | |
2354 | * cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Fix comment typo. | |
2355 | ||
38285dd7 JM |
2356 | 2017-01-07 Jason Merrill <jason@redhat.com> |
2357 | ||
2358 | PR c++/78948 - instantiation from discarded statement | |
2359 | * parser.h (struct cp_parser): Remove in_discarded_stmt field. | |
2360 | * cp-tree.h (in_discarded_stmt): Declare it. | |
2361 | (struct saved_scope): Add discarded_stmt bitfield. | |
2362 | (in_discarded_stmt): New macro. | |
2363 | * decl2.c (mark_used): Check it. | |
2364 | * parser.c (cp_parser_selection_statement): Adjust. | |
2365 | (cp_parser_jump_statement): Adjust. | |
2366 | ||
962c5679 JJ |
2367 | 2017-01-05 Jakub Jelinek <jakub@redhat.com> |
2368 | ||
26f20371 JJ |
2369 | PR c++/78931 |
2370 | * decl.c (cp_finish_decomp): Remove probe variable, if tt is | |
2371 | REFERENCE_REF_P, set tt to its operand. | |
2372 | ||
962c5679 JJ |
2373 | PR c++/78890 |
2374 | * class.c (check_field_decls): Diagnose REFERENCE_TYPE fields in | |
2375 | unions even for C++11 and later. | |
2376 | ||
dc7650cc NS |
2377 | 2017-01-05 Nathan Sidwell <nathan@acm.org> |
2378 | ||
2379 | PR c++/78765 | |
2380 | * pt.c (convert_nontype_argument): Don't try and see if integral | |
2381 | or enum expressions are constants prematurely. | |
2382 | ||
a9342885 MP |
2383 | 2017-01-04 Marek Polacek <polacek@redhat.com> |
2384 | ||
2385 | PR c++/64767 | |
2386 | * typeck.c (cp_build_binary_op): Warn when a pointer is compared with | |
2387 | a zero character literal. | |
2388 | ||
066435fe JJ |
2389 | 2017-01-04 Jakub Jelinek <jakub@redhat.com> |
2390 | ||
abec4284 JJ |
2391 | PR c++/78949 |
2392 | * typeck.c (cp_build_unary_op): Call mark_rvalue_use on arg if it has | |
2393 | vector type. | |
2394 | ||
26c43e27 JJ |
2395 | PR c++/78693 |
2396 | * parser.c (cp_parser_simple_declaration): Only complain about | |
2397 | inconsistent auto deduction if auto_result doesn't use auto. | |
2398 | ||
c9cf3863 JJ |
2399 | * parser.c (cp_parser_simple_declaration): Diagnose function |
2400 | declaration among more than one init-declarators with auto | |
2401 | specifier. | |
2402 | ||
066435fe JJ |
2403 | PR c++/71182 |
2404 | * parser.c (cp_lexer_previous_token): Use vec_safe_address in the | |
2405 | assertion, as lexer->buffer may be NULL. | |
2406 | ||
baf9ebc8 MP |
2407 | 2017-01-04 Marek Polacek <polacek@redhat.com> |
2408 | ||
2409 | PR c++/77545 | |
2410 | PR c++/77284 | |
2411 | * constexpr.c (potential_constant_expression_1): Handle CLEANUP_STMT. | |
2412 | ||
4bf07f3f NS |
2413 | 2017-01-04 Nathan Sidwell <nathan@acm.org> |
2414 | ||
2415 | PR c++/66735 | |
2416 | * cp-tree.h (DECLTYPE_FOR_REF_CAPTURE): New. | |
2417 | (lambda_capture_field_type): Update prototype. | |
2418 | * lambda.c (lambda_capture_field_type): Add is_reference parm. | |
2419 | Add referenceness here. | |
2420 | (add_capture): Adjust lambda_capture_field_type call, refactor | |
2421 | error checking. | |
2422 | * pt.c (tsubst): Adjust lambda_capture_field_type call. | |
2423 | ||
cbe34bb5 | 2424 | 2017-01-01 Jakub Jelinek <jakub@redhat.com> |
5624e564 JJ |
2425 | |
2426 | Update copyright years. | |
ad41bd84 | 2427 | \f |
cbe34bb5 | 2428 | Copyright (C) 2017 Free Software Foundation, Inc. |
ad41bd84 JM |
2429 | |
2430 | Copying and distribution of this file, with or without modification, | |
2431 | are permitted in any medium without royalty provided the copyright | |
2432 | notice and this notice are preserved. |