]>
Commit | Line | Data |
---|---|---|
620e594b DM |
1 | 2018-11-13 David Malcolm <dmalcolm@redhat.com> |
2 | ||
3 | * call.c: Replace "source_location" with "location_t". | |
4 | * cp-tree.h: Likewise. | |
5 | * cvt.c: Likewise. | |
6 | * name-lookup.c: Likewise. | |
7 | * parser.c: Likewise. | |
8 | * typeck.c: Likewise. | |
9 | ||
16e723e6 JM |
10 | 2018-11-12 Jason Merrill <jason@redhat.com> |
11 | ||
0c1e0d63 JM |
12 | Implement P0315R4, Lambdas in unevaluated contexts. |
13 | * decl2.c (min_vis_expr_r): Handle LAMBDA_EXPR. | |
14 | * mangle.c (write_expression): Handle LAMBDA_EXPR. | |
15 | * parser.c (cp_parser_lambda_expression): Allow lambdas in | |
16 | unevaluated context. Start the tentative firewall sooner. | |
17 | (cp_parser_lambda_body): Use cp_evaluated. | |
18 | * pt.c (iterative_hash_template_arg): Handle LAMBDA_EXPR. | |
19 | (tsubst_function_decl): Substitute a lambda even if it isn't | |
20 | dependent. | |
21 | (tsubst_lambda_expr): Use cp_evaluated. Always complain. | |
22 | (tsubst_copy_and_build) [LAMBDA_EXPR]: Do nothing if tf_partial. | |
23 | * semantics.c (begin_class_definition): Allow in template parm list. | |
24 | * tree.c (strip_typedefs_expr): Pass through LAMBDA_EXPR. | |
25 | (cp_tree_equal): Handle LAMBDA_EXPR. | |
26 | ||
7d119905 JM |
27 | * pt.c (fn_type_unification): If we have a full set of explicit |
28 | arguments, go straight to substitution. | |
29 | ||
7c23c87c JM |
30 | * decl2.c (min_vis_expr_r, expr_visibility): New. |
31 | (min_vis_r): Call expr_visibility. | |
32 | (constrain_visibility_for_template): Likewise. | |
33 | ||
a6bb6b07 JM |
34 | Implement P0722R3, destroying operator delete. |
35 | * call.c (std_destroying_delete_t_p, destroying_delete_p): New. | |
36 | (aligned_deallocation_fn_p, usual_deallocation_fn_p): Use | |
37 | destroying_delete_p. | |
38 | (build_op_delete_call): Handle destroying delete. | |
39 | * decl2.c (coerce_delete_type): Handle destroying delete. | |
40 | * init.c (build_delete): Don't call dtor with destroying delete. | |
41 | * optimize.c (build_delete_destructor_body): Likewise. | |
42 | ||
7de37c97 JM |
43 | Implement P0780R2, pack expansion in lambda init-capture. |
44 | * parser.c (cp_parser_lambda_introducer): Parse pack init-capture. | |
45 | * pt.c (tsubst_pack_expansion): Handle init-capture packs. | |
46 | (lookup_init_capture_pack): New. | |
47 | (tsubst_expr) [DECL_EXPR]: Use it. | |
48 | (tsubst_lambda_expr): Remember field pack expansions for | |
49 | init-captures. | |
50 | ||
16e723e6 JM |
51 | * cp-tree.h (struct cp_evaluated): New. |
52 | * init.c (get_nsdmi): Use it. | |
53 | * parser.c (cp_parser_enclosed_template_argument_list): Use it. | |
54 | * pt.c (coerce_template_parms, tsubst_aggr_type): Use it. | |
55 | ||
3179ebae JJ |
56 | 2018-11-09 Jakub Jelinek <jakub@redhat.com> |
57 | ||
81a227c6 JJ |
58 | * parser.c (cp_parser_omp_clause_final, cp_parser_omp_clause_if): Use |
59 | cp_parser_assignment_expression instead of cp_parser_condition. | |
60 | (cp_parser_omp_clause_num_threads, cp_parser_omp_clause_num_tasks, | |
61 | cp_parser_omp_clause_grainsize, cp_parser_omp_clause_priority, | |
62 | cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit, | |
63 | cp_parser_omp_clause_linear, cp_parser_omp_clause_device): Use | |
64 | cp_parser_assignment_expression instead of cp_parser_expression. | |
65 | (cp_parser_omp_clause_hint): Likewise. Formatting fix. | |
66 | ||
98c91c56 JJ |
67 | * parser.c (cp_parser_omp_clause_reduction): Call sorry_at on |
68 | reduction clause with inscan modifier. | |
69 | ||
3179ebae JJ |
70 | * parser.c (cp_parser_omp_requires): Call sorry_at on requires |
71 | clauses other than atomic_default_mem_order. | |
72 | ||
79a2c428 MS |
73 | 2018-11-09 Martin Sebor <msebor@redhat.com> |
74 | ||
75 | PR middle-end/81824 | |
76 | * pt.c (warn_spec_missing_attributes): Move code to attribs.c. | |
77 | Call decls_mismatched_attributes. | |
78 | ||
28567c40 JJ |
79 | 2018-11-08 Jakub Jelinek <jakub@redhat.com> |
80 | ||
81 | * constexpr.c (potential_constant_expression_1): Handle OMP_DEPOBJ. | |
82 | * cp-gimplify.c (cp_genericize_r): Handle | |
83 | OMP_CLAUSE_{IN,TASK}_REDUCTION. | |
84 | (cxx_omp_predetermined_sharing_1): Don't return | |
85 | OMP_CLAUSE_DEFAULT_SHARED for const qualified decls with no mutable | |
86 | member. Return OMP_CLAUSE_DEFAULT_FIRSTPRIVATE for this pointer. | |
87 | * cp-objcp-common.c (cp_common_init_ts): Handle OMP_DEPOBJ. | |
88 | * cp-tree.def (OMP_DEPOBJ): New tree code. | |
89 | * cp-tree.h (OMP_ATOMIC_DEPENDENT_P): Return true also for first | |
90 | argument being OMP_CLAUSE. | |
91 | (OMP_DEPOBJ_DEPOBJ, OMP_DEPOBJ_CLAUSES): Define. | |
92 | (cp_convert_omp_range_for, cp_finish_omp_range_for): Declare. | |
93 | (finish_omp_atomic): Add LOC, CLAUSES and MO arguments. Remove | |
94 | SEQ_CST argument. | |
95 | (finish_omp_for_block): Declare. | |
96 | (finish_omp_flush): Add MO argument. | |
97 | (finish_omp_depobj): Declare. | |
98 | * cxx-pretty-print.c (cxx_pretty_printer::statement): Handle | |
99 | OMP_DEPOBJ. | |
100 | * dump.c (cp_dump_tree): Likewise. | |
101 | * lex.c (cxx_init): Likewise. | |
102 | * parser.c: Include memmodel.h. | |
103 | (cp_parser_for): Pass false as new is_omp argument to | |
104 | cp_parser_range_for. | |
105 | (cp_parser_range_for): Add IS_OMP argument, return before finalizing | |
106 | if it is true. | |
107 | (cp_parser_omp_clause_name): Handle nontemporal, in_reduction and | |
108 | task_reduction clauses. | |
109 | (cp_parser_omp_var_list_no_open): Handle | |
110 | OMP_CLAUSE_{IN,TASK}_REDUCTION. For OMP_CLAUSE_DEPEND, parse clause | |
111 | operands as either an array section, or lvalue assignment expression. | |
112 | (cp_parser_omp_clause_if): Handle cancel and simd modifiers. | |
113 | (cp_parser_omp_clause_defaultmap): Parse new kinds of defaultmap | |
114 | clause. | |
115 | (cp_parser_omp_clause_reduction): Add IS_OMP and KIND arguments. | |
116 | Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list. | |
117 | (cp_parser_omp_clause_lastprivate, cp_parser_omp_iterators): New | |
118 | functions. | |
119 | (cp_parser_omp_clause_depend): Parse iterator modifier and handle | |
120 | iterators. Parse mutexinoutset and depobj kinds. | |
121 | (cp_parser_oacc_all_clauses): Adjust cp_parser_omp_clause_reduction | |
122 | callers. | |
123 | (cp_parser_omp_all_clauses): Likewise. Handle | |
124 | PRAGMA_OMP_CLAUSE_NONTEMPORAL and | |
125 | PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION. Call | |
126 | cp_parser_omp_clause_lastprivate for OpenMP lastprivate clause. | |
127 | (cp_parser_omp_atomic): Pass pragma_tok->location as | |
128 | LOC to finish_omp_atomic. Parse hint and memory order clauses. | |
129 | Handle default memory order from requires directive if any. Adjust | |
130 | finish_omp_atomic caller. | |
131 | (cp_parser_omp_critical): Allow comma in between (name) and hint | |
132 | clause. | |
133 | (cp_parser_omp_depobj): New function. | |
134 | (cp_parser_omp_flush): Parse flush with memory-order-clause. | |
135 | (cp_parser_omp_for_cond): Allow NE_EXPR even in OpenMP loops. | |
136 | (cp_convert_omp_range_for, cp_finish_omp_range_for): New functions. | |
137 | (cp_parser_omp_for_loop): Parse C++11 range for loops among omp | |
138 | loops. Handle OMP_CLAUSE_IN_REDUCTION like OMP_CLAUSE_REDUCTION. | |
139 | (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses. | |
140 | (cp_parser_omp_simd, cp_parser_omp_for): Call keep_next_level before | |
141 | begin_omp_structured_block and call finish_omp_for_block on | |
142 | finish_omp_structured_block result. | |
143 | (cp_parser_omp_master): Add p_name, mask and cclauses arguments. | |
144 | Allow to be called while parsing combined parallel master. | |
145 | Parse combined master taskloop{, simd}. | |
146 | (cp_parser_omp_parallel): Parse combined | |
147 | parallel master{, taskloop{, simd}} constructs. | |
148 | (cp_parser_omp_single): Use SET_EXPR_LOCATION. | |
149 | (OMP_TASK_CLAUSE_MASK): Add in_reduction clause. | |
150 | (OMP_TASKWAIT_CLAUSE_MASK): Define. | |
151 | (cp_parser_omp_taskwait): Handle taskwait with depend clauses. | |
152 | (OMP_TASKGROUP_CLAUSE_MASK): Define. | |
153 | (cp_parser_omp_taskgroup): Parse taskgroup clauses, adjust | |
154 | c_finish_omp_taskgroup caller. | |
155 | (cp_parser_omp_distribute): Call keep_next_level before | |
156 | begin_omp_structured_block and call finish_omp_for_block on | |
157 | finish_omp_structured_block result. | |
158 | (cp_parser_omp_teams): Force a BIND_EXPR with BLOCK around teams | |
159 | body. | |
160 | (cp_parser_omp_target_data): Allow target data with only | |
161 | use_device_ptr clauses. | |
162 | (cp_parser_omp_target): Set OMP_REQUIRES_TARGET_USED bit in | |
163 | omp_requires_mask. | |
164 | (cp_parser_omp_requires): New function. | |
165 | (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses. | |
166 | (cp_parser_omp_taskloop): Add forward declaration. Disallow | |
167 | in_reduction clause when combined with parallel master. Call | |
168 | keep_next_level before begin_omp_structured_block and call | |
169 | finish_omp_for_block on finish_omp_structured_block result. | |
170 | (cp_parser_omp_construct): Adjust cp_parser_omp_master caller. | |
171 | (cp_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES. | |
172 | * pt.c (tsubst_omp_clause_decl): Add iterators_cache argument. | |
173 | Adjust recursive calls. Handle iterators. | |
174 | (tsubst_omp_clauses): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION and | |
175 | OMP_CLAUSE_NONTEMPORAL. Adjust tsubst_omp_clause_decl callers. | |
176 | (tsubst_decomp_names): | |
177 | (tsubst_omp_for_iterator): Change orig_declv into a reference. | |
178 | Handle range for loops. Move orig_declv handling after declv/initv | |
179 | handling. | |
180 | (tsubst_expr): Force a BIND_EXPR with BLOCK around teams body. | |
181 | Adjust finish_omp_atomic caller. Call keep_next_level before | |
182 | begin_omp_structured_block. Call cp_finish_omp_range_for for range | |
183 | for loops and use {begin,finish}_omp_structured_block instead of | |
184 | {push,pop}_stmt_list if there are any range for loops. Call | |
185 | finish_omp_for_block on finish_omp_structured_block result. | |
186 | Handle OMP_DEPOBJ. Handle taskwait with depend clauses. For | |
187 | OMP_ATOMIC call tsubst_omp_clauses on clauses if any, adjust | |
188 | finish_omp_atomic caller. Use OMP_ATOMIC_MEMORY_ORDER rather | |
189 | than OMP_ATOMIC_SEQ_CST. Handle clauses on OMP_TASKGROUP. | |
190 | (dependent_omp_for_p): Always return true for range for loops if | |
191 | processing_template_decl. Return true if class type iterator | |
192 | does not have INTEGER_CST increment. | |
193 | * semantics.c: Include memmodel.h. | |
194 | (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION | |
195 | like OMP_CLAUSE_REDUCTION. | |
196 | (handle_omp_array_sections): Likewise. Call save_expr on array | |
197 | reductions before calling build_index_type. Handle depend clauses | |
198 | with iterators. | |
199 | (finish_omp_reduction_clause): Call save_expr for whole array | |
200 | reduction sizes. Don't mark OMP_CLAUSE_DECL addressable if it has | |
201 | reference type. Do mark decl_placeholder addressable if needed. | |
202 | Use error_at with OMP_CLAUSE_LOCATION (c) as first argument instead | |
203 | of error. | |
204 | (cp_omp_finish_iterators): New function. | |
205 | (finish_omp_clauses): Don't diagnose nonmonotonic clause with static, | |
206 | runtime or auto schedule kinds. Diagnose nogroup clause used with | |
207 | reduction clause(s). Handle depend clause with | |
208 | OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require | |
209 | omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and | |
210 | some different type for other kinds. Use cp_build_addr_expr | |
211 | and cp_build_indirect_ref instead of cxx_mark_addressable. | |
212 | Handle depend clauses with iterators. Only handle static data members | |
213 | in the special case that const qualified vars may be specified in | |
214 | firstprivate clause. Complain if const qualified vars without mutable | |
215 | members are mentioned in data-sharing clauses other than firstprivate | |
216 | or shared. Use error_at with OMP_CLAUSE_LOCATION (c) as first | |
217 | argument instead of error. Diagnose more than one nontemporal clause | |
218 | refering to the same variable. Use error_at rather than error for | |
219 | priority and hint clause diagnostics. Fix pasto for hint clause. | |
220 | Diagnose hint expression that doesn't fold into INTEGER_CST. | |
221 | Diagnose if clause with modifier other than cancel. Handle | |
222 | OMP_CLAUSE_{IN,TASK}_REDUCTION like OMP_CLAUSE_REDUCTION. Allow any | |
223 | lvalue as OMP_CLAUSE_DEPEND operand (besides array section), adjust | |
224 | diagnostics. | |
225 | (handle_omp_for_class_iterator): Don't create a new TREE_LIST if one | |
226 | has been created already for range for, just fill TREE_PURPOSE and | |
227 | TREE_VALUE. Call cp_fully_fold on incr. | |
228 | (finish_omp_for): Don't check cond/incr if cond is global_namespace. | |
229 | Pass to c_omp_check_loop_iv_exprs orig_declv if non-NULL. Don't | |
230 | use IS_EMPTY_STMT on NULL pre_body. Adjust c_finish_omp_for caller. | |
231 | (finish_omp_for_block): New function. | |
232 | (finish_omp_atomic): Add LOC argument, pass it through | |
233 | to c_finish_omp_atomic and set it as location of OMP_ATOMIC* trees. | |
234 | Remove SEQ_CST argument. Add CLAUSES and MO arguments. Adjust | |
235 | c_finish_omp_atomic caller. Stick clauses if any into first argument | |
236 | of wrapping OMP_ATOMIC. | |
237 | (finish_omp_depobj): New function. | |
238 | (finish_omp_flush): Add MO argument, if not | |
239 | MEMMODEL_LAST, emit __atomic_thread_fence call with the given value. | |
240 | (finish_omp_cancel): Diagnose if clause with modifier other than | |
241 | cancel. | |
242 | ||
72a7649a NS |
243 | 2018-11-07 Nathan Sidwell <nathan@acm.org> |
244 | ||
245 | PR c++/87904 | |
246 | * cp-tree.h (struct tree_overload): Fix comment. | |
247 | * tree.c (ovl_iterator::reveal_node): Propagate OVL_DEDUP_P. | |
248 | ||
c24c8a4b JM |
249 | 2018-11-04 Jason Merrill <jason@redhat.com> |
250 | ||
b008f16b JM |
251 | Implement UDL changes from P0732R2. |
252 | * cp-tree.h (struct releasing_vec): Move from mangle.c. | |
253 | Add get_ref method. | |
254 | * parser.c (cp_parser_userdef_string_literal): Use it. Handle | |
255 | passing the string to a single template parameter of class type. | |
256 | (cp_parser_template_declaration_after_parameters): Allow it. | |
257 | Pedwarn about the character pack template that was proposed but not | |
258 | accepted for C++14, and don't suggest it. | |
259 | ||
4be5c72c JM |
260 | Implement P0732R2, class types in non-type template parameters. |
261 | * error.c (dump_simple_decl): Look through a template parm object. | |
262 | * mangle.c (write_template_arg): Likewise. | |
263 | (mangle_template_parm_object): New. | |
264 | * pt.c (template_parm_object_p, get_template_parm_object): New. | |
265 | (invalid_tparm_referent_p): Factor from convert_nontype_argument. | |
266 | (convert_nontype_argument, invalid_nontype_parm_type_p): Handle | |
267 | class-type template arguments. | |
268 | * tree.c (lvalue_kind): Likewise. | |
269 | ||
5dab8b11 JM |
270 | * cvt.c (ocp_convert): Don't wrap a CONSTRUCTOR in a NOP_EXPR. |
271 | * constexpr.c (initialized_type): Fix AGGR_INIT_EXPR handling. | |
272 | (cxx_eval_vec_init_1): Correct type of AGGR_INIT_EXPR. | |
273 | (cxx_eval_outermost_constant_expr): Make sure a CONSTRUCTOR has the | |
274 | right type. Don't wrap a CONSTRUCTOR if one was passed in. | |
275 | * tree.c (build_aggr_init_expr): Check for void. | |
276 | ||
c24c8a4b JM |
277 | PR c++/60503 - wrong lambda attribute syntax. |
278 | * parser.c (cp_parser_lambda_declarator_opt): Fix attribute | |
279 | handling. | |
280 | ||
4155777d NS |
281 | 2018-11-02 Nathan Sidwell <nathan@acm.org> |
282 | ||
283 | * decl.c (duplicate_decls): Refactor checks. | |
284 | ||
5d9a0e3b MP |
285 | 2018-11-01 Marek Polacek <polacek@redhat.com> |
286 | ||
287 | Implement P0846R0, ADL and function templates. | |
288 | * decl.c (grokfndecl): Allow FUNCTION_DECL in assert. | |
289 | * lex.c (unqualified_fn_lookup_error): Handle TEMPLATE_ID_EXPR. | |
290 | * parser.c (cp_parser_postfix_expression): Do ADL for a template-name. | |
291 | (cp_parser_template_id): Give errors if parsing the template argument | |
292 | list didn't go well. Allow FUNCTION_DECL in assert. | |
293 | (cp_parser_template_name): Consider a name to refer to a template if | |
294 | it is an unqualified-id followed by a <. Don't return the identifier | |
295 | if the decl is a function and dependent. | |
296 | * pt.c (tsubst_copy) <case OVERLOAD>: Remove assert. | |
297 | ||
41f927f4 NS |
298 | 2018-11-01 Nathan Sidwell <nathan@acm.org> |
299 | ||
300 | * cp-tree.h (struct lang_function): Delete x_local_names field. | |
301 | (struct lang_decl_base): Rename u2sel to spare. | |
302 | (struct lang_decl_min): Remove lang_decl_u2 union. Keep access | |
303 | field. | |
304 | (LANG_DECL_U2_CHECK): Delete. | |
305 | (DECL_DISCRIMINATOR_P): Require function scope. | |
306 | (DECL_DISCRIMINATOR): Adjust. | |
307 | (DECL_DISCRIMINATOR_SET_P): Delete. | |
308 | (DECL_CAPTURED_VARIABLE, DECL_ACCESS, THUnK_VIRTUAL_OFFSET): Adjust. | |
309 | (local_classes): Don't declare. | |
310 | (determine_local_discriminator): Declare. | |
311 | * decl.c (push_local_name): Delete. | |
312 | (local_entities, determina_local_discrminator): New. | |
313 | (duplicate_decls): Copy DECL_ACCESS. Fix formatting. | |
314 | (cp_finish_decl): Use determine_local_discriminator. | |
315 | (save_function_data): Drop x_local_names. | |
316 | (finish_function): Drop local_names. | |
317 | * decl2.c (finish_anon_union): Use determine_local_disciminator. | |
318 | * mangle.c (write_unnamed_type_name): Use | |
319 | discriminator_for_local_entity. | |
320 | (local_class_index): Delete. | |
321 | (discriminator_for_local_entity): Reimplement. | |
322 | (write_local_name): Adjust discriminator code. | |
323 | * name-lookup.c (do_pushtag): Call determine_local_discrimiator. | |
324 | * semantics.c (finish_omp_threadprivate): Drop DECL_DISCRIMINATOR | |
325 | handling. | |
326 | * class.c (local_classes): Delete. | |
327 | (init_class_processing): Don't init it. | |
328 | ||
ddd0d18c ML |
329 | 2018-11-01 Martin Liska <mliska@suse.cz> |
330 | Jason Merrill <jason@redhat.com> | |
331 | ||
332 | PR c++/64266 | |
333 | PR bootstrap/70422 | |
334 | PR ipa/81277 | |
335 | * cp-tree.h (DECL_FNAME_P): New macro. | |
336 | * decl.c (cp_make_fname_decl): Set DECL_DECLARED_CONSTEXPR_P, | |
337 | DECL_VALUE_EXPR, DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P. | |
338 | (cp_finish_decl): | |
339 | * lambda.c (is_capture_proxy): Use DECL_FNAME_P. | |
340 | * pt.c (tsubst_expr): Handle DECL_PRETTY_FUNCTION_P. | |
341 | ||
8e82c473 NS |
342 | 2018-10-31 Nathan Sidwell <nathan@acm.org> |
343 | ||
344 | * cp-tree.h (OVL_DEDUP_P): New. | |
345 | * name-lookup.c (name_lookup::add_overload): Check OVL_DEDUP_P. | |
346 | (get_class_binding_direct): Likwise. | |
347 | * tree.c (ovl_make): Propagate OVL_DEDUP_P. | |
348 | (ovl_copy): Copy it. | |
349 | (ovl_insert): Do not keep using-decls ordered. | |
350 | (lookup_maybe_add): Adjust comment. | |
351 | ||
b5ff4f5c MP |
352 | 2018-10-30 Marek Polacek <polacek@redhat.com> |
353 | ||
354 | Implement P0892R2, explicit(bool). | |
355 | * call.c (add_template_candidate_real): Return if the declaration is | |
356 | explicit and we're only looking for non-converting constructor. | |
357 | * cp-tree.h (lang_decl_fn): Add has_dependent_explicit_spec_p bit. | |
358 | (DECL_HAS_DEPENDENT_EXPLICIT_SPEC_P): New macro. | |
359 | (cp_decl_specifier_seq): Add explicit_specifier field. | |
360 | (build_explicit_specifier, store_explicit_specifier): Declare. | |
361 | * decl.c (grokdeclarator): Call store_explicit_specifier. | |
362 | (build_explicit_specifier): New function. | |
363 | * parser.c (cp_parser_function_specifier_opt) <case RID_EXPLICIT>: | |
364 | Parse C++20 explicit(bool). | |
365 | * pt.c (store_explicit_specifier, lookup_explicit_specifier): New. | |
366 | (tsubst_function_decl): Handle explicit(dependent-expr). | |
367 | ||
190facef PC |
368 | 2018-10-30 Paolo Carlini <paolo.carlini@oracle.com> |
369 | ||
370 | * decl.c (grokdeclarator): Use declarator->id_loc in diagnostic | |
371 | about flexible array members. | |
372 | ||
7e2de6df DM |
373 | 2018-10-29 David Malcolm <dmalcolm@redhat.com> |
374 | ||
375 | * cp-name-hint.h: New file. | |
376 | * cp-tree.h (expr_to_string): New decl. | |
377 | (suggest_alternatives_for): Move to cp-name-hint.h, changing | |
378 | return type from bool to name_hint. | |
379 | (suggest_alternative_in_explicit_scope): Likewise. | |
380 | * error.c: Define INCLUDE_UNIQUE_PTR. Include "cp-name-hint.h". | |
381 | (expr_to_string): Make non-static. | |
382 | (qualified_name_lookup_error): For the non-"::" case, take | |
383 | responsibity for issuing any suggestion from | |
384 | suggest_alternative_in_explicit_scope, as it changes from | |
385 | returning a bool to returning a name_hint. Replace fallback call | |
386 | to suggest_alternatives_for to a call to | |
387 | suggest_alternatives_in_other_namespaces, capturing the fact that | |
388 | we don't have enough location information to issue a fix-it hint | |
389 | for this case. Update the error to support emitting a fix-it hint | |
390 | where appropriate. For the "::" case, take responsibility for | |
391 | issuing any suggestion from suggest_alternatives_for, supporting | |
392 | emitting a fix-it hint. | |
393 | * lex.c: Define INCLUDE_UNIQUE_PTR. Include "gcc-rich-location.h" | |
394 | and "cp-name-hint.h". | |
395 | (unqualified_name_lookup_error): Take responsibility for issuing | |
396 | any suggestion from suggest_alternatives_for, supporting emitting | |
397 | a fix-it hint. | |
398 | * name-lookup.c (class namespace_limit_reached): New subclass of | |
399 | deferred_diagnostic. | |
400 | (class show_candidate_location): Likewise. | |
401 | (class suggest_alternatives): Likewise. | |
402 | (class namespace_hints): New class. | |
403 | (suggest_alternatives_for): Convert return type from bool to | |
404 | name_hint, replacing all direct diagnostic emission by setting | |
405 | suggestions on the return value, or creating deferred diagnostics. | |
406 | Specifically, split out initial traversal of namespaces into | |
407 | namespace_hints' ctor, and maybe_decorate_with_limit, and move the | |
408 | rest of the implementation to | |
409 | namespace_hints::convert_candidates_to_name_hint and | |
410 | suggest_alternatives_for_1. | |
411 | (namespace_hints::namespace_hints): New ctor, adapted from | |
412 | suggest_alternatives_for's initial namespace traversal, storing | |
413 | location and name, and converting locals "candidates", "limited" | |
414 | and "limit" into members. | |
415 | (namespace_hints::convert_candidates_to_name_hint): New member | |
416 | function. | |
417 | (namespace_hints::maybe_decorate_with_limit): New member function. | |
418 | (suggest_alternatives_for_1): New function, based on second half | |
419 | of old implementation of suggest_alternatives_for, converting from | |
420 | immediate emission of suggestions to using name_hint. | |
421 | (suggest_alternatives_in_other_namespaces): New function. | |
422 | (maybe_suggest_missing_std_header): Convert from immediate | |
423 | emission of suggestions to using name_hint, moving emission | |
424 | implementation to... | |
425 | (class missing_std_header): New subclass of deferred_diagnostic. | |
426 | (maybe_suggest_missing_header): Convert return type from bool to | |
427 | name_hint. | |
428 | (suggest_alternative_in_explicit_scope): Convert from immediate | |
429 | emission of suggestions to using name_hint. | |
430 | * parser.c: Replace include of "c-family/name-hint.h" with | |
431 | "cp-name-hint.h". | |
432 | (cp_parser_diagnose_invalid_type_name): Update | |
433 | "is there a suggestion" logic for change to | |
434 | name_hint::operator bool. Take responsibility for emitting | |
435 | fix-it hints from suggest_alternative_in_explicit_scope. | |
436 | (cp_parser_namespace_name): Take responsibility for emitting | |
437 | fix-it hints from suggest_alternative_in_explicit_scope. Don't | |
438 | emit the "expected namespace-name" error if we've already emitted | |
439 | an "is not a namespace-name" error. | |
440 | ||
b2bf438c DM |
441 | 2018-10-29 David Malcolm <dmalcolm@redhat.com> |
442 | ||
443 | PR c++/56856 | |
444 | * call.c (build_over_call): Eliminate the "arglocs" array, and the | |
445 | call to maybe_constant_value when building "fargs". | |
446 | ||
ebdb73c0 PC |
447 | 2018-10-29 Paolo Carlini <paolo.carlini@oracle.com> |
448 | ||
449 | * decl.c (create_array_type_for_decl): Add location_t parameter | |
450 | and use it. | |
451 | (grokdeclarator): Adjust call. | |
452 | ||
a385474c MP |
453 | 2018-10-29 Marek Polacek <polacek@redhat.com> |
454 | ||
455 | PR c++/87594 - constexpr rejects-valid with range-based for. | |
456 | * constexpr.c (potential_constant_expression_1): If the condition | |
457 | can't be evaluated, return true. | |
458 | ||
87a5ccfb JM |
459 | 2018-10-29 Joseph Myers <joseph@codesourcery.com> |
460 | Julian Brown <julian@codesourcery.com> | |
461 | ||
462 | PR c++/66053 | |
463 | * semantics.c (handle_omp_array_sections_1): Allow array | |
464 | sections with "this" pointer for OpenACC. | |
465 | ||
b15e2802 JM |
466 | 2018-10-25 Jason Merrill <jason@redhat.com> |
467 | ||
468 | * parser.c (cp_parser_sizeof_operand): Remove redundant use of | |
469 | grokdeclarator. | |
470 | ||
df51934d JJ |
471 | 2018-10-24 Jakub Jelinek <jakub@redhat.com> |
472 | ||
473 | PR c++/86288 | |
474 | * parser.c (cp_parser_std_attribute): Canonicalize attr_ns, and when | |
475 | :: is not present and attr_ns non-NULL, canonicalize also attr_id. | |
476 | (cp_parser_attribute_spec): Fix comment typo. | |
477 | ||
fd85b888 MS |
478 | 2018-10-24 Martin Sebor <msebor@redhat.com> |
479 | ||
480 | PR c++/84851 | |
481 | * call.c (maybe_warn_class_memaccess): Tighten up. | |
482 | ||
033eb567 DM |
483 | 2018-10-17 David Malcolm <dmalcolm@redhat.com> |
484 | ||
485 | * Make-lang.in (selftest-c++): New. | |
486 | (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++) | |
487 | (selftest-c++-gdb, selftest-c++-valgrind): Move here from | |
488 | gcc/Makefile.in. | |
489 | ||
2be99998 PC |
490 | 2018-10-17 Paolo Carlini <paolo.carlini@oracle.com> |
491 | ||
492 | PR c++/84705 | |
cd1e244a | 493 | * tree.c (build_cplus_new): Avoid duplicate diagnostic about |
2be99998 PC |
494 | incomplete type, early return error_mark_node if the second |
495 | argument is error_mark_node. | |
496 | ||
7fa072de NS |
497 | 2018-10-12 Nathan Sidwell <nathan@acm.org> |
498 | ||
499 | * parser.h (struct cp_parser): Drop implicit_extern_c. | |
500 | * parser.c (cp_debug_parser): Drop implicit_extern_c. | |
501 | (cp_parser_new): Likewise. | |
502 | (cp_parser_translation_unit): Handle implicit extern c here. Call | |
503 | cp_parser_toplevel_declaration. | |
504 | (cp_parser_toplevel_declaration): New, broken out of ... | |
505 | (cp_parser_declaration_seq_opt): ... here. Call it. Drop | |
506 | implicit extern C handling. | |
507 | ||
79371671 WW |
508 | 2018-10-11 Will Wray <wjwray@gmail.com> |
509 | ||
510 | PR c++/87364 | |
511 | * cxx-pretty-print.c (pp_cxx_enumeration_constant): New function. | |
512 | (cxx_pretty_printer::constant): Use it. | |
513 | ||
03f6d32e DM |
514 | 2018-10-11 David Malcolm <dmalcolm@redhat.com> |
515 | ||
516 | PR c++/84993 | |
517 | * call.c (enforce_access): Move diagnostics to... | |
518 | (complain_about_access): ...this new function. | |
519 | * cp-tree.h (class access_failure_info): Rename split out field | |
520 | "m_field_decl" into "m_decl" and "m_diag_decl". | |
521 | (access_failure_info::record_access_failure): Add tree param. | |
522 | (access_failure_info::was_inaccessible_p): New accessor. | |
523 | (access_failure_info::get_decl): New accessor. | |
524 | (access_failure_info::get_diag_decl): New accessor. | |
525 | (access_failure_info::get_any_accessor): New member function. | |
526 | (access_failure_info::add_fixit_hint): New static member function. | |
527 | (complain_about_access): New decl. | |
528 | * typeck.c (access_failure_info::record_access_failure): Update | |
529 | for change to fields. | |
530 | (access_failure_info::maybe_suggest_accessor): Split out into... | |
531 | (access_failure_info::get_any_accessor): ...this new function... | |
532 | (access_failure_info::add_fixit_hint): ...and this new function. | |
533 | (finish_class_member_access_expr): Split out "has no member named" | |
534 | error-handling into... | |
535 | (complain_about_unrecognized_member): ...this new function, and | |
536 | check that the guessed name is accessible along the access path. | |
537 | Only provide a spell-correction fix-it hint if it is; otherwise, | |
538 | attempt to issue an accessor fix-it hint. | |
539 | ||
c7f45560 NS |
540 | 2018-10-11 Nathan Sidwell <nathan@acm.org> |
541 | ||
542 | * parser.c (cp_parser_translation_unit): Return void. Don't fail | |
543 | at first extra }, simplify logic. | |
544 | (c_parse_file): Call finish_translation_unit here. | |
545 | ||
f7904392 JJ |
546 | 2018-10-11 Jakub Jelinek <jakub@redhat.com> |
547 | ||
f9f3b77c JJ |
548 | PR c++/87582 |
549 | * typeck.c (maybe_warn_about_returning_address_of_local): If | |
550 | whats_returned is a structured binding identifier and the structured | |
551 | binding is a reference, recurse on its initializer. | |
552 | ||
f7904392 JJ |
553 | PR c++/87547 |
554 | * rtti.c (get_tinfo_decl_dynamic): Use unlowered_expr_type instead | |
555 | of TREE_TYPE. | |
556 | ||
8e9558f0 MP |
557 | 2018-10-10 Marek Polacek <polacek@redhat.com> |
558 | ||
559 | PR c++/87567 - constexpr rejects call to non-constexpr function. | |
560 | * constexpr.c (potential_constant_expression_1) <case FOR_STMT>: Return | |
561 | true if the condition is always false. | |
562 | <case WHILE_STMT>: Likewise. | |
563 | ||
5abdb369 PC |
564 | 2018-10-09 Paolo Carlini <paolo.carlini@oracle.com> |
565 | ||
566 | PR c++/84423 | |
567 | * pt.c (convert_template_argument): Immediately return error_mark_node | |
568 | if the second argument is erroneous. | |
569 | * parser.c (cp_parser_type_id): Add location_t * parameter. | |
570 | (cp_parser_type_id_1): Likewise. | |
571 | (cp_parser_alias_declaration): Adjust cp_parser_type_id call, | |
572 | obtain the location of the type and save it. | |
573 | (cp_parser_template_type_arg): Adjust. | |
574 | (cp_parser_trailing_type_id): Likewise. | |
575 | * decl.c (grokdeclarator): Improve error message for 'auto' in | |
576 | alias declaration. | |
577 | ||
a52cdecf PC |
578 | 2018-10-08 Paolo Carlini <paolo.carlini@oracle.com> |
579 | ||
580 | PR c++/71128 | |
581 | * pt.c (do_decl_instantiation): Per 12.6.8/5, a concept cannot be | |
582 | explicitly instantiated. | |
583 | ||
0d48e877 DM |
584 | 2018-10-05 David Malcolm <dmalcolm@redhat.com> |
585 | ||
586 | PR c++/56856 | |
587 | * call.c (build_over_call): Build a vec of locations of the | |
588 | arguments before the call to maybe_constant_value, and pass to | |
589 | check_function_arguments. | |
590 | * cp-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Define as | |
591 | c_get_substring_location. | |
592 | * parser.c (cp_parser_string_literal): Capture string | |
593 | concatenation locations. | |
594 | ||
668f8d45 NS |
595 | 2018-10-04 Nathan Sidwell <nathan@acm.org> |
596 | ||
597 | * lang-specs.h: Use string contatenation, not line splicing. | |
598 | ||
bedf03a2 JM |
599 | 2018-10-03 Jason Merrill <jason@redhat.com> |
600 | ||
601 | Implement P0840, language support for empty objects. | |
602 | * tree.c (handle_no_unique_addr_attribute): New. | |
603 | (cxx_attribute_table): Add [[no_unique_address]]. | |
604 | * class.c (field_poverlapping_p): New. | |
605 | (layout_class_type): Check it. Adjust DECL_SIZE of potentially | |
606 | overlapping fields. | |
607 | (layout_empty_base_or_field): Rename from layout_empty_base, handle | |
608 | FIELD_DECL as well. | |
609 | (build_base_field, record_subobject_offsets): Adjust. | |
610 | ||
f2db4602 ML |
611 | 2018-10-03 Martin Liska <mliska@suse.cz> |
612 | ||
613 | PR gcov-profile/86109 | |
614 | * parser.c (cp_parser_lambda_declarator_opt): | |
615 | Set DECL_LAMBDA_FUNCTION for lambdas. | |
616 | ||
0edf3afe RB |
617 | 2018-10-02 Richard Biener <rguenther@suse.de> |
618 | ||
619 | * name-lookup.c (check_local_shadow): Do not test DECL_FROM_INLINE. | |
620 | ||
44662f68 EB |
621 | 2018-09-28 Eric Botcazou <ebotcazou@adacore.com> |
622 | Pierre-Marie de Rodat <derodat@adacore.com> | |
623 | ||
624 | * method.c (use_thunk): Adjust call to cgraph_node::create_thunk. | |
625 | ||
dc16b007 RB |
626 | 2018-09-28 Richard Biener <rguenther@suse.de> |
627 | ||
628 | * error.c (cp_print_error_function): Simplify by eliding | |
629 | the BLOCK_ABSTRACT_ORIGIN chasing. | |
630 | ||
0798984a PC |
631 | 2018-09-27 Paolo Carlini <paolo.carlini@oracle.com> |
632 | ||
633 | PR c++/84940 | |
634 | * semantics.c (finish_unary_op_expr): Check return value of | |
635 | build_x_unary_op for error_mark_node. | |
636 | ||
69deaf14 JJ |
637 | 2018-09-25 Jakub Jelinek <jakub@redhat.com> |
638 | ||
639 | PR c++/87398 | |
640 | * constexpr.c (cxx_eval_constant_expression) <case OBJ_TYPE_REF>: Only | |
641 | look through COMPONENT_REFs with DECL_FIELD_IS_BASE FIELD_DECLs. | |
642 | ||
72744f65 ML |
643 | 2018-09-25 Martin Liska <mliska@suse.cz> |
644 | ||
645 | * name-lookup.c (namespace_scope_ht_size): Remove | |
646 | unused function. | |
647 | * parser.c (cp_lexer_next_token_is_not_keyword): Likewise. | |
648 | ||
06ff274f PC |
649 | 2018-09-24 Paolo Carlini <paolo.carlini@oracle.com> |
650 | ||
651 | PR c++/85070 | |
652 | * method.c (lazily_declare_fn): During error-recovery add_method | |
653 | may return false. | |
654 | ||
38295573 MP |
655 | 2018-09-21 Marek Polacek <polacek@redhat.com> |
656 | ||
657 | PR c++/87372 - __func__ constexpr evaluation. | |
658 | * constexpr.c (maybe_constant_init_1): Pass false for strict down to | |
659 | cxx_eval_outermost_constant_expr. | |
660 | ||
17b20aa9 MP |
661 | 2018-09-20 Marek Polacek <polacek@redhat.com> |
662 | ||
663 | PR c++/87109 - wrong ctor with maybe-rvalue semantics. | |
664 | * call.c (build_user_type_conversion_1): Refine the maybe-rvalue | |
665 | check to only return if we're converting the return value to a base | |
666 | class. | |
667 | ||
0b7fb27b ASJ |
668 | 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io> |
669 | ||
670 | * g++spec.c (lang_specific_driver): Handle -r like -nostdlib. | |
671 | ||
3ee378fb JM |
672 | 2018-09-20 Jason Merrill <jason@redhat.com> |
673 | ||
674 | PR c++/87075 - ICE with constexpr array initialization. | |
675 | * constexpr.c (cxx_eval_vec_init_1): Handle trivial initialization. | |
676 | ||
a599af84 MP |
677 | 2018-09-19 Marek Polacek <polacek@redhat.com> |
678 | ||
679 | Add -Wclass-conversion. | |
680 | * decl.c (grok_op_properties): Change a warning from -Wconversion to | |
681 | -Wclass-conversion. Make it print the types. | |
682 | ||
ff5c3c9d PC |
683 | 2018-09-19 Paolo Carlini <paolo.carlini@oracle.com> |
684 | ||
685 | PR c++/87324 | |
686 | * parser.c (cp_parser_initializer_list): Assign error_mark_node | |
687 | to the index upon error. | |
688 | ||
fce33808 MP |
689 | 2018-09-19 Marek Polacek <polacek@redhat.com> |
690 | ||
691 | PR c++/87357 - missing -Wconversion warning | |
692 | * decl.c (grok_op_properties): Remove diagnostic parts mentioning | |
693 | a conversion to a reference to void. Use | |
694 | same_type_ignoring_top_level_qualifiers_p rather than comparing types | |
695 | directly. | |
696 | ||
bf8d8309 MP |
697 | 2018-09-18 Marek Polacek <polacek@redhat.com> |
698 | ||
699 | P1064R0 - Allowing Virtual Function Calls in Constant Expressions | |
700 | * call.c (build_over_call): No longer check if we're outside a template | |
701 | function. | |
702 | * class.c (build_vtbl_initializer): Build vtable's constructor with | |
703 | indexes. | |
704 | * constexpr.c (cxx_eval_constant_expression): Don't ignore _vptr's | |
705 | initializer. Handle OBJ_TYPE_REF. | |
706 | (potential_constant_expression_1): Handle OBJ_TYPE_REF. | |
707 | * decl.c (maybe_commonize_var): Bail out for any DECL_ARTIFICIAL. | |
708 | (initialize_artificial_var): Mark the variable as constexpr. | |
709 | (grokdeclarator): Change error to pedwarn. Only warn when | |
710 | pedantic and not C++2a. | |
711 | ||
c99fcada PC |
712 | 2018-09-18 Paolo Carlini <paolo.carlini@oracle.com> |
713 | ||
714 | PR c++/85065 | |
715 | * cp-tree.h (NON_ERROR): New. | |
716 | * pt.c (auto_hash::hash): Use it. | |
717 | (do_auto_deduction): Likewise. | |
718 | ||
3897f134 NS |
719 | 2018-09-18 Nathan Sidwell <nathan@acm.org> |
720 | ||
721 | PR c++/86881 | |
722 | * name-lookup.c (check_local_shadow): Ignore auto types. | |
723 | ||
9c4a4b3c DM |
724 | 2018-09-17 David Malcolm <dmalcolm@redhat.com> |
725 | ||
726 | * error.c (range_label_for_type_mismatch::get_text): Update for | |
727 | new param. | |
728 | ||
0a4b0aa1 BE |
729 | 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de> |
730 | ||
731 | * typeck2.c (digest_init_r): Fix overlength strings. | |
0a4b0aa1 | 732 | |
b51da998 VV |
733 | 2018-09-13 Ville Voutilainen <ville.voutilainen@gmail.com> |
734 | ||
735 | PR c++/87093 | |
736 | * method.c (constructible_expr): We're in an unevaluated context | |
737 | in all cases, not just for class targets. | |
738 | ||
4911b24d DM |
739 | 2018-09-12 David Malcolm <dmalcolm@redhat.com> |
740 | ||
741 | PR c++/85110 | |
742 | * call.c (struct conversion_info): Add "loc" field. | |
743 | (arg_conversion_rejection): Add "loc" param, using it to | |
744 | initialize the new field. | |
745 | (bad_arg_conversion_rejection): Likewise. | |
746 | (explicit_conversion_rejection): Initialize the new field to | |
747 | UNKNOWN_LOCATION. | |
748 | (template_conversion_rejection): Likewise. | |
749 | (add_function_candidate): Pass on the argument location to the new | |
750 | param of arg_conversion_rejection. | |
751 | (add_conv_candidate): Likewise. | |
752 | (build_builtin_candidate): Likewise. | |
753 | (build_user_type_conversion_1): Likewise. | |
754 | (single_z_candidate): New function. | |
755 | (maybe_get_bad_conversion_for_unmatched_call): New function. | |
756 | (complain_about_bad_argument): New function, based on part of | |
757 | convert_for_assignment. | |
758 | (build_new_method_call_1): Split out handling of the "no viable | |
759 | candidates" case into... | |
760 | (complain_about_no_candidates_for_method_call): ...this new | |
761 | function, and use the new functions above to special-case the | |
762 | handling of a single non-viable candidate due to a bad argument. | |
763 | * cp-tree.h (complain_about_bad_argument): New decl. | |
764 | * typeck.c (convert_for_assignment): Split out one error-handling | |
765 | case into complain_about_bad_argument. | |
766 | ||
8e36332c CP |
767 | 2018-09-09 Cesar Philippidis <cesar@codesourcery.com> |
768 | Julian Brown <julian@codesourcery.com> | |
769 | ||
770 | PR middle-end/86336 | |
771 | * semantics.c (finish_omp_clauses): Treat C++ references the same in | |
772 | OpenACC as OpenMP. | |
773 | ||
7e7a6ed7 ML |
774 | 2018-08-28 Martin Liska <mliska@suse.cz> |
775 | ||
776 | * constexpr.c (cxx_eval_call_expression): Add quotes | |
777 | to -fconstexpr-depth=. | |
778 | ||
fe56b8a2 MP |
779 | 2018-09-10 Marek Polacek <polacek@redhat.com> |
780 | ||
781 | * class.c (build_vtbl_ref): Remove. | |
782 | (build_vtbl_ref_1): Rename to build_vtbl_ref. | |
783 | (build_vfn_ref): Call build_vtbl_ref instead of build_vtbl_ref_1. | |
784 | ||
e5ba9b70 MP |
785 | 2018-09-08 Marek Polacek <polacek@redhat.com> |
786 | ||
787 | PR c++/87150 - wrong ctor with maybe-rvalue semantics. | |
788 | * call.c (struct conversion): Update commentary. | |
789 | (standard_conversion): Set rvaluedness_matches_p if LOOKUP_PREFER_RVALUE | |
790 | for ck_base. | |
791 | ||
3075affd JM |
792 | 2018-09-08 Jason Merrill <jason@redhat.com> |
793 | ||
794 | PR c++/86678 - constexpr function with non-constant after return. | |
795 | * constexpr.c (potential_constant_expression_1): Add jump_target. | |
796 | (breaks): Check for BREAK_STMT. | |
797 | (continues): Check for CONTINUE_STMT. | |
798 | ||
61856507 MP |
799 | 2018-09-08 Marek Polacek <polacek@redhat.com> |
800 | ||
801 | * cxx-pretty-print.c (cxx_pretty_printer::statement) <case | |
802 | RANGE_FOR_SMT>: Handle RANGE_FOR_INIT_STMT. | |
803 | ||
8112667c MP |
804 | 2018-09-07 Marek Polacek <polacek@redhat.com> |
805 | ||
806 | PR c++/87152 - range-based for loops with initializer broken in templates. | |
807 | * constexpr.c (potential_constant_expression_1) <case RANGE_FOR_STMT>: | |
808 | Recur into RANGE_FOR_INIT_STMT. | |
809 | * cp-tree.def: Add RANGE_FOR_INIT_STMT to RANGE_FOR_STMT. | |
810 | * cp-tree.h (RANGE_FOR_INIT_STMT): Define. | |
811 | * dump.c (cp_dump_tree) <case RANGE_FOR_STMT>: Also dump | |
812 | RANGE_FOR_INIT_STMT. | |
813 | * pt.c (tsubst_expr) <case RANGE_FOR_STMT>: Recur into | |
814 | RANGE_FOR_INIT_STMT. | |
815 | * semantics.c (begin_range_for_stmt): Adjust call to build_stmt. | |
816 | Do put the init statement in RANGE_FOR_INIT_STMT. | |
817 | (finish_range_for_decl): Pop it for templates. | |
818 | ||
6d900107 BE |
819 | 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de> |
820 | ||
821 | * decl.c (check_initializer): Call cp_complete_array_type. | |
822 | ||
62c21cee MP |
823 | 2018-09-05 Marek Polacek <polacek@redhat.com> |
824 | ||
825 | PR c++/87109, wrong overload with ref-qualifiers. | |
826 | * call.c (build_user_type_conversion_1): Use NULL instead of 0. Bail | |
827 | out if performing the maybe-rvalue overload resolution and a conversion | |
828 | function is getting called. | |
829 | ||
308d9cda MP |
830 | PR c++/86982, -Wreturn-local-addr and std::move and std::forward. |
831 | * typeck.c (maybe_warn_about_returning_address_of_local): Handle calls | |
832 | to std::move or std::forward. | |
833 | (is_std_forward_p): New function. | |
834 | ||
62c21cee | 835 | 2018-09-05 Pádraig Brady <p@draigbrady.com> |
86e95f35 PB |
836 | |
837 | PR c++/87185 | |
838 | * lambda.c (prune_lambda_captures): Protect against const_vars.get | |
839 | returning NULL. | |
840 | ||
74be6f51 MP |
841 | 2018-09-04 Marek Polacek <polacek@redhat.com> |
842 | ||
843 | * cp-tree.h (treat_lvalue_as_rvalue_p): Declare. | |
844 | * except.c (build_throw): Use it. Use CP_TYPE_VOLATILE_P. | |
845 | * typeck.c (treat_lvalue_as_rvalue_p): No longer static. Add PARM_OK | |
846 | parameter. | |
847 | (maybe_warn_pessimizing_move): Adjust treat_lvalue_as_rvalue_p call. | |
848 | (check_return_expr): Likewise. | |
849 | ||
d1dfeff0 PC |
850 | 2018-09-03 Paolo Carlini <paolo.carlini@oracle.com> |
851 | ||
852 | PR c++/84980 | |
853 | * constraint.cc (finish_shorthand_constraint): Early return if the | |
854 | constraint is erroneous. | |
855 | ||
b5764229 BE |
856 | 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de> |
857 | ||
858 | * decl.c (eval_check_narrowing): Remove. | |
859 | (check_initializer): Move call to braced_list_to_string from here ... | |
860 | * typeck2.c (store_init_value): ... to here. | |
861 | (digest_init_r): Remove handing of signed/unsigned char strings. | |
862 | ||
5020c88e NS |
863 | 2018-08-31 Nathan Sidwell <nathan@acm.org> |
864 | ||
7a4e1f7d NS |
865 | PR c++/87155 |
866 | PR c++/84707 | |
867 | * name-lookup.c (name_lookup::search_namespace): Don't look at | |
868 | inlines when searching for NULL names. | |
869 | ||
5020c88e NS |
870 | * decl.c (decls_match): Remove SYSTEM_IMPLICIT_EXTERN_C matching |
871 | of return types and parms. | |
872 | * parser.c (cp_parser_parameter_declaration_clause): Likewise, | |
873 | '()' always means '(void)'. | |
874 | ||
d66ab7d1 JJ |
875 | 2018-08-29 Jakub Jelinek <jakub@redhat.com> |
876 | ||
877 | PR c++/87095 | |
878 | * decl.c (begin_destructor_body): If current_class_type has | |
879 | virtual bases and the primary base is nearly empty virtual base, | |
880 | voidify clearing of vptr and make it conditional on in-charge | |
881 | argument. | |
882 | ||
849ec6ca PC |
883 | 2018-08-29 Paolo Carlini <paolo.carlini@oracle.com> |
884 | ||
885 | PR c++/85265 | |
886 | * parser.c (cp_parser_introduction_list): If cp_parser_identifier | |
887 | returns error_mark_node early exit the loop. | |
888 | (cp_parser_template_introduction): Improve error-recovery, remove | |
889 | error call about empty introduction-list. | |
890 | ||
66e58259 DM |
891 | 2018-08-29 David Malcolm <dmalcolm@redhat.com> |
892 | ||
893 | PR c++/85110 | |
894 | * call.c (print_conversion_rejection): Add "fn" param and use it | |
895 | for "no known conversion" messages to underline the pertinent | |
896 | param. | |
897 | (print_z_candidate): Supply "fn" to the new param above. | |
898 | ||
f5b219cc JJ |
899 | 2018-08-29 Jakub Jelinek <jakub@redhat.com> |
900 | ||
901 | PR c++/87122 | |
902 | * pt.c (tsubst_expr) <case RANGE_FOR_STMT>: If | |
903 | processing_template_decl and decl is structured binding decl, call | |
904 | cp_finish_decomp. | |
905 | ||
f30bafb7 PC |
906 | 2018-08-28 Paolo Carlini <paolo.carlini@oracle.com> |
907 | ||
908 | PR c++/86546 | |
909 | * decl.c (finish_case_label): If the type is erroneous early | |
910 | return error_mark_node. | |
911 | ||
bdd03984 DM |
912 | 2018-08-27 David Malcolm <dmalcolm@redhat.com> |
913 | ||
914 | PR c++/63392 | |
915 | * parser.c (cp_parser_diagnose_invalid_type_name): Add fix-it | |
916 | hint. | |
917 | ||
d4714a1b JJ |
918 | 2018-08-27 Jakub Jelinek <jakub@redhat.com> |
919 | ||
920 | PR c++/86993 | |
921 | * cp-tree.h (cxx_readonly_error): Add location_t argument. | |
922 | * typeck2.c (cxx_readonly_error): Add LOC argument, pass it to | |
923 | ERROR_FOR_ASSIGNMENT macro and readonly_error. Add LOC argument | |
924 | to ERROR_FOR_ASSIGNMENT macro, use error_at instead of error and | |
925 | pass LOC to it. Formatting fixes. | |
926 | * typeck.c (cp_build_unary_op): Pass location to cxx_readonly_error. | |
927 | (cp_build_modify_expr): Pass loc to cxx_readonly_error. | |
928 | * semantics.c (finish_asm_stmt): Pass input_location to | |
929 | cxx_readonly_error. | |
930 | ||
85204e23 DM |
931 | 2018-08-27 David Malcolm <dmalcolm@redhat.com> |
932 | ||
d4714a1b | 933 | PR c++/87091 |
85204e23 DM |
934 | * decl.c (grokdeclarator): Update for conversion of show_caret_p |
935 | to a tri-state. | |
936 | * error.c (cp_printer): Likewise. | |
937 | * name-lookup.c (maybe_suggest_missing_std_header): Update call to | |
938 | maybe_add_include_fixit to suggest overriding the location, as it | |
939 | is for a note. | |
940 | * parser.c (cp_parser_string_literal): Update for conversion of | |
941 | show_caret_p to a tri-state. | |
942 | (cp_parser_elaborated_type_specifier): Likewise. | |
943 | (set_and_check_decl_spec_loc): Likewise. | |
944 | * pt.c (listify): Update call to maybe_add_include_fixit to not | |
945 | override the location, as it is for an error. | |
946 | * rtti.c (typeid_ok_p): Likewise. | |
947 | ||
3d78e008 ML |
948 | 2018-08-27 Martin Liska <mliska@suse.cz> |
949 | ||
950 | * call.c (build_call_a): Use new function | |
92a285c1 ML |
951 | fndecl_built_in_p and remove check for FUNCTION_DECL if |
952 | possible. | |
3d78e008 ML |
953 | (build_cxx_call): Likewise. |
954 | * constexpr.c (constexpr_fn_retval): Likewise. | |
955 | (cxx_eval_builtin_function_call): Likewise. | |
956 | (cxx_eval_call_expression): Likewise. | |
957 | (potential_constant_expression_1): Likewise. | |
958 | * cp-gimplify.c (cp_gimplify_expr): Likewise. | |
959 | (cp_fold): Likewise. | |
960 | * decl.c (decls_match): Likewise. | |
961 | (validate_constexpr_redeclaration): Likewise. | |
962 | (duplicate_decls): Likewise. | |
963 | (make_rtl_for_nonlocal_decl): Likewise. | |
964 | * name-lookup.c (consider_binding_level): Likewise. | |
965 | (cp_emit_debug_info_for_using): Likewise. | |
966 | * semantics.c (finish_call_expr): Likewise. | |
967 | * tree.c (builtin_valid_in_constant_expr_p): Likewise. | |
968 | ||
0940fe59 MP |
969 | 2018-08-26 Marek Polacek <polacek@redhat.com> |
970 | ||
971 | PR c++/87080 | |
972 | * typeck.c (maybe_warn_pessimizing_move): Do nothing in a template. | |
973 | ||
b5be6d0c MP |
974 | PR c++/87029, Implement -Wredundant-move. |
975 | * typeck.c (treat_lvalue_as_rvalue_p): New function. | |
976 | (maybe_warn_pessimizing_move): Call convert_from_reference. | |
977 | Warn about redundant moves. | |
978 | ||
13ff3e16 MP |
979 | 2018-08-24 Marek Polacek <polacek@redhat.com> |
980 | ||
981 | PR c++/67012 | |
982 | PR c++/86942 | |
983 | * decl.c (grokdeclarator): Disallow functions with trailing return | |
984 | type with decltype(auto) as its type. Also check the function if | |
985 | it's inner declarator doesn't exist | |
986 | ||
774fb6c4 MP |
987 | 2018-08-21 Marek Polacek <polacek@redhat.com> |
988 | ||
989 | PR c++/86499 | |
990 | * parser.c (cp_parser_lambda_introducer): Give error if a non-local | |
991 | lambda has a capture-default. | |
992 | ||
55082d81 PC |
993 | 2018-08-21 Paolo Carlini <paolo.carlini@oracle.com> |
994 | ||
995 | * decl.c (check_static_variable_definition): Change to return void. | |
996 | ||
d3e993e9 MP |
997 | 2018-08-21 Marek Polacek <polacek@redhat.com> |
998 | ||
79ca9c35 MP |
999 | PR c++/86981, Implement -Wpessimizing-move. |
1000 | * typeck.c (decl_in_std_namespace_p): New. | |
1001 | (is_std_move_p): New. | |
1002 | (maybe_warn_pessimizing_move): New. | |
1003 | (can_do_nrvo_p): New, factored out of ... | |
1004 | (check_return_expr): ... here. Warn about potentially harmful | |
1005 | std::move in a return statement. | |
1006 | ||
992931ba MP |
1007 | PR c++/65043 |
1008 | * call.c (standard_conversion): Set check_narrowing. | |
1009 | * typeck2.c (check_narrowing): Use CP_INTEGRAL_TYPE_P rather | |
1010 | than comparing with INTEGER_TYPE. | |
1011 | ||
d3e993e9 MP |
1012 | * cp-tree.h: Fix typo. |
1013 | ||
097f82ec DM |
1014 | 2018-08-20 David Malcolm <dmalcolm@redhat.com> |
1015 | ||
1016 | PR other/84889 | |
1017 | * call.c (build_user_type_conversion_1): Add auto_diagnostic_group | |
1018 | instance(s). | |
1019 | (print_error_for_call_failure): Likewise. | |
1020 | (build_op_call_1): Likewise. | |
1021 | (build_conditional_expr_1): Likewise. | |
1022 | (build_new_op_1): Likewise. | |
1023 | (build_op_delete_call): Likewise. | |
1024 | (convert_like_real): Likewise. | |
1025 | (build_over_call): Likewise. | |
1026 | (build_new_method_call_1): Likewise. | |
1027 | (joust): Likewise. | |
1028 | * class.c (check_tag): Likewise. | |
1029 | (finish_struct_anon_r): Likewise. | |
1030 | (one_inherited_ctor): Likewise. | |
1031 | (finalize_literal_type_property): Likewise. | |
1032 | (explain_non_literal_class): Likewise. | |
1033 | (find_flexarrays): Likewise. | |
1034 | (resolve_address_of_overloaded_function): Likewise. | |
1035 | * constexpr.c (ensure_literal_type_for_constexpr_object): Likewise. | |
1036 | (is_valid_constexpr_fn): Likewise. | |
1037 | (cx_check_missing_mem_inits): Likewise. | |
1038 | * cp-gimplify.c (cp_genericize_r): Likewise. | |
1039 | * cvt.c (maybe_warn_nodiscard): Likewise. | |
1040 | * decl.c (warn_extern_redeclared_static): Likewise. | |
1041 | (check_redeclaration_exception_specification): Likewise. | |
1042 | (check_no_redeclaration_friend_default_args): Likewise. | |
1043 | (duplicate_decls): Likewise. | |
1044 | (redeclaration_error_message): Likewise. | |
1045 | (warn_misplaced_attr_for_class_type): Likewise. | |
1046 | * decl2.c (finish_static_data_member_decl): Likewise. | |
1047 | (no_linkage_error): Likewise. | |
1048 | (cp_warn_deprecated_use): Likewise. | |
1049 | * error.c (qualified_name_lookup_error): Likewise. | |
1050 | * friend.c (make_friend_class): Likewise. | |
1051 | (do_friend): Likewise. | |
1052 | * init.c (perform_member_init): Likewise. | |
1053 | (build_new_1): Likewise. | |
1054 | (build_vec_delete_1): Likewise. | |
1055 | (build_delete): Likewise. | |
1056 | * lex.c (unqualified_name_lookup_error): Likewise. | |
1057 | * name-lookup.c (check_extern_c_conflict): Likewise. | |
1058 | (inform_shadowed): New function. | |
1059 | (check_local_shadow): Add auto_diagnostic_group instances, | |
1060 | replacing goto "inform_shadowed" label with call to subroutine. | |
1061 | (set_local_extern_decl_linkage): Add auto_diagnostic_group | |
1062 | instance(s). | |
1063 | * parser.c (cp_parser_diagnose_invalid_type_name): Likewise. | |
1064 | (cp_parser_namespace_name): Likewise. | |
1065 | * pt.c (check_specialization_namespace): Likewise. | |
1066 | (check_template_variable): Likewise. | |
1067 | (warn_spec_missing_attributes): Likewise. | |
1068 | (check_explicit_specialization): Likewise. | |
1069 | (process_partial_specialization): Likewise. | |
1070 | (lookup_template_class_1): Likewise. | |
1071 | (finish_template_variable): Likewise. | |
1072 | (do_auto_deduction): Likewise. | |
1073 | * search.c (check_final_overrider): Likewise. | |
1074 | (look_for_overrides_r): Likewise. | |
1075 | * tree.c (maybe_warn_parm_abi): Likewise. | |
1076 | * typeck.c (cxx_sizeof_expr): Likewise. | |
1077 | (cp_build_function_call_vec): Likewise. | |
1078 | (cp_build_binary_op): Likewise. | |
1079 | (convert_for_assignment): Likewise. | |
1080 | (maybe_warn_about_returning_address_of_local): Likewise. | |
1081 | * typeck2.c (abstract_virtuals_error_sfinae): Likewise. | |
1082 | (check_narrowing): Likewise. | |
1083 | ||
505ce5ab DM |
1084 | 2018-08-17 David Malcolm <dmalcolm@redhat.com> |
1085 | ||
1086 | * typeck.c (string_conv_p): Extract location from EXP and use it | |
1087 | in preference to input_location when issuing warnings. | |
1088 | ||
96e6ae57 DM |
1089 | 2018-08-15 David Malcolm <dmalcolm@redhat.com> |
1090 | ||
1091 | * call.c: Include "gcc-rich-location.h". | |
1092 | (convert_like_real): Add range label for "invalid conversion" | |
1093 | diagnostic. | |
1094 | (perform_implicit_conversion_flags): Add type label to the | |
1095 | "could not convert" error. | |
1096 | * error.c: Include "gcc-rich-location.h". | |
1097 | (range_label_for_type_mismatch::get_text): New function. | |
1098 | * typeck.c (convert_for_assignment): Add type label to | |
1099 | the "cannot convert" error if a location is available. | |
1100 | ||
0806181f PC |
1101 | 2018-08-15 Paolo Carlini <paolo.carlini@oracle.com> |
1102 | ||
1103 | * decl.c (check_previous_goto_1): When decl_jump_unsafe returns 2 | |
1104 | emit an error instead of a permerror. | |
1105 | ||
ed4f2c00 MP |
1106 | 2018-08-13 Marek Polacek <polacek@redhat.com> |
1107 | ||
1108 | PR c++/57891 | |
1109 | * call.c (struct conversion): Add check_narrowing_const_only. | |
1110 | (build_converted_constant_expr): Set check_narrowing and | |
1111 | check_narrowing_const_only. Give error if expr is error node. | |
1112 | (convert_like_real): Pass it to check_narrowing. | |
1113 | * cp-tree.h (check_narrowing): Add a default parameter. | |
1114 | * decl.c (compute_array_index_type): Use input_location instead of | |
1115 | location_of. | |
1116 | * pt.c (convert_nontype_argument): Return NULL_TREE if tf_error. | |
1117 | * typeck2.c (check_narrowing): Don't warn for instantiation-dependent | |
1118 | expressions. Call maybe_constant_value instead of | |
1119 | fold_non_dependent_expr. Don't mention { } in diagnostic. Only check | |
1120 | narrowing for constants if CONST_ONLY. | |
1121 | ||
23aa9f7c MS |
1122 | 2018-08-13 Martin Sebor <msebor@redhat.com> |
1123 | ||
1124 | PR tree-optimization/71625 | |
1125 | * decl.c (check_initializer): Call braced_list_to_string. | |
1126 | (eval_check_narrowing): New function. | |
1127 | * gcc/cp/typeck2.c (digest_init_r): Accept strings literals | |
1128 | as initilizers for all narrow character types. | |
1129 | ||
27a98312 MP |
1130 | 2018-08-13 Marek Polacek <polacek@redhat.com> |
1131 | ||
e6a1e5fe MP |
1132 | P0806R2 - Deprecate implicit capture of this via [=] |
1133 | * lambda.c (add_default_capture): Formatting fixes. Warn about | |
1134 | deprecated implicit capture of this via [=]. | |
1135 | ||
27a98312 MP |
1136 | PR c++/86915 |
1137 | * decl.c (create_array_type_for_decl): Handle null name. | |
1138 | ||
fc186cbd JM |
1139 | 2018-08-10 Jason Merrill <jason@redhat.com> |
1140 | ||
1141 | PR c++/86728 - C variadic generic lambda. | |
1142 | * parser.c (cp_parser_parameter_declaration): Don't turn 'auto' into | |
1143 | a pack if it's followed by a declarator-id. | |
1144 | ||
bf533db8 JJ |
1145 | 2018-08-08 Jakub Jelinek <jakub@redhat.com> |
1146 | ||
e4082611 JJ |
1147 | P0595R1 - is_constant_evaluated |
1148 | * cp-tree.h (enum cp_built_in_function): New. | |
1149 | (maybe_constant_init): Add pretend_const_required argument. | |
1150 | * typeck2.c (store_init_value): Pass true as new argument to | |
1151 | maybe_constant_init. | |
1152 | * constexpr.c (constexpr_fn_retval): Check also DECL_BUILT_IN_CLASS | |
1153 | for BUILT_IN_UNREACHABLE. | |
1154 | (struct constexpr_ctx): Add pretend_const_required field. | |
1155 | (cxx_eval_builtin_function_call): Use DECL_IS_BUILTIN_CONSTANT_P | |
1156 | macro. Handle CP_BUILT_IN_IS_CONSTANT_EVALUATED. Check also | |
1157 | DECL_BUILT_IN_CLASS for BUILT_IN_UNREACHABLE. | |
1158 | (cxx_eval_outermost_constant_expr): Add pretend_const_required | |
1159 | argument, initialize pretend_const_required field in ctx. If the | |
1160 | result is TREE_CONSTANT and non_constant_p, retry with | |
1161 | pretend_const_required false if it was true. | |
1162 | (is_sub_constant_expr): Initialize pretend_const_required_field in | |
1163 | ctx. | |
1164 | (cxx_constant_value): Pass true as pretend_const_required to | |
1165 | cxx_eval_outermost_constant_expr. | |
1166 | (maybe_constant_value): Pass false as pretend_const_required to | |
1167 | cxx_eval_outermost_constant_expr. | |
1168 | (fold_non_dependent_expr): Likewise. | |
1169 | (maybe_constant_init_1): Add pretend_const_required argument, pass it | |
1170 | down to cxx_eval_outermost_constant_expr. Pass !allow_non_constant | |
1171 | instead of false as strict to cxx_eval_outermost_constant_expr. | |
1172 | (maybe_constant_init): Add pretend_const_required argument, pass it | |
1173 | down to maybe_constant_init_1. | |
1174 | (cxx_constant_init): Pass true as pretend_const_required to | |
1175 | maybe_constant_init_1. | |
1176 | * cp-gimplify.c (cp_gimplify_expr): Handle CALL_EXPRs to | |
1177 | CP_BUILT_IN_IS_CONSTANT_EVALUATED. | |
1178 | (cp_fold): Don't fold CP_BUILT_IN_IS_CONSTANT_EVALUATED calls. | |
1179 | * decl.c: Include langhooks.h. | |
1180 | (cxx_init_decl_processing): Register __builtin_is_constant_evaluated | |
1181 | built-in. | |
1182 | * tree.c (builtin_valid_in_constant_expr_p): Return true for | |
1183 | CP_BUILT_IN_IS_CONSTANT_EVALUATED. | |
1184 | * pt.c (declare_integer_pack): Initialize DECL_FUNCTION_CODE. | |
1185 | ||
5e539332 JJ |
1186 | PR c++/86836 |
1187 | * pt.c (tsubst_expr): For structured bindings, call tsubst_decomp_names | |
1188 | before tsubst_init, not after it. | |
1189 | ||
bf533db8 JJ |
1190 | PR c++/86738 |
1191 | * constexpr.c (cxx_eval_binary_expression): For arithmetics involving | |
1192 | NULL pointer set *non_constant_p to true. | |
1193 | (cxx_eval_component_reference): For dereferencing of a NULL pointer, | |
1194 | set *non_constant_p to true and return t. | |
1195 | ||
6429b8e0 PC |
1196 | 2018-08-07 Paolo Carlini <paolo.carlini@oracle.com> |
1197 | ||
1198 | PR c++/59480, DR 136 | |
1199 | * decl.c (check_no_redeclaration_friend_default_args): New. | |
1200 | (duplicate_decls): Use the latter; also check that a friend | |
1201 | declaration specifying default arguments is a definition. | |
1202 | ||
63b48839 VV |
1203 | 2018-08-07 Ville Voutilainen <ville.voutilainen@gmail.com> |
1204 | ||
1205 | PR c++/79133 | |
1206 | * name-lookup.c (check_local_shadow): Reject captures and parameters | |
1207 | with the same name. | |
1208 | ||
0250ba58 MP |
1209 | 2018-08-06 Marek Polacek <polacek@redhat.com> |
1210 | ||
1211 | PR c++/86767 | |
1212 | * constexpr.c (cxx_eval_statement_list): Handle continue. | |
1213 | ||
bc31a87a DM |
1214 | 2018-08-03 David Malcolm <dmalcolm@redhat.com> |
1215 | Jonathan Wakely <jwakely@redhat.com> | |
1216 | ||
1217 | * decl.c: Include "gcc-rich-location.h". | |
1218 | (add_return_star_this_fixit): New function. | |
1219 | (finish_function): When warning about missing return statements in | |
1220 | functions returning non-void, add a "return *this;" fix-it hint for | |
1221 | assignment operators. | |
1222 | ||
d198fc5a JM |
1223 | 2018-08-03 Jason Merrill <jason@redhat.com> |
1224 | ||
1225 | PR c++/86706 | |
1226 | * class.c (build_base_path): Use currently_open_class. | |
1227 | ||
653fee19 DM |
1228 | 2018-08-02 David Malcolm <dmalcolm@redhat.com> |
1229 | ||
1230 | * error.c (cxx_print_error_function): Duplicate "file" before | |
1231 | passing it to pp_set_prefix. | |
1232 | (cp_print_error_function): Use pp_take_prefix when saving the | |
1233 | existing prefix. | |
1234 | ||
0b0c7dc6 UB |
1235 | 2018-08-02 Richard Biener <rguenther@suse.de> |
1236 | ||
1237 | PR c++/86763 | |
1238 | * class.c (layout_class_type): Copy TYPE_TYPELESS_STORAGE | |
1239 | to the CLASSTYPE_AS_BASE. | |
1240 | ||
8a45b051 MS |
1241 | 2018-08-01 Martin Sebor <msebor@redhat.com> |
1242 | ||
1243 | PR tree-optimization/86650 | |
1244 | * error.c (cp_printer): Move usage of EXPR_LOCATION (t) and | |
1245 | TREE_BLOCK (t) from within percent_K_format to this callsite. | |
1246 | ||
5ebbb72c PC |
1247 | 2018-08-01 Paolo Carlini <paolo.carlini@oracle.com> |
1248 | ||
1249 | PR c++/86661 | |
1250 | * class.c (note_name_declared_in_class): Use location_of in permerror | |
1251 | instead of DECL_SOURCE_LOCATION (for OVERLOADs). | |
1252 | ||
77b46042 TV |
1253 | 2018-07-31 Tom de Vries <tdevries@suse.de> |
1254 | ||
1255 | PR debug/86687 | |
1256 | * optimize.c (update_cloned_parm): Copy DECL_BY_REFERENCE. | |
1257 | ||
686dca76 JJ |
1258 | 2018-07-31 Jakub Jelinek <jakub@redhat.com> |
1259 | ||
1260 | P1008R1 - prohibit aggregates with user-declared constructors | |
1261 | * class.c (check_bases_and_members): For C++2a set | |
1262 | CLASSTYPE_NON_AGGREGATE based on TYPE_HAS_USER_CONSTRUCTOR rather than | |
1263 | type_has_user_provided_or_explicit_constructor. | |
1264 | ||
5dbc3940 ML |
1265 | 2018-07-31 Martin Liska <mliska@suse.cz> |
1266 | ||
92a285c1 | 1267 | PR c++/86653 |
5dbc3940 | 1268 | * parser.c (cp_parser_condition): Initialize non_constant_p |
92a285c1 | 1269 | to false. |
5dbc3940 | 1270 | |
081b70a9 DM |
1271 | 2018-07-28 David Malcolm <dmalcolm@redhat.com> |
1272 | ||
1273 | * error.c (cp_printer): In the leading comment, move "%H" and "%I" | |
1274 | into alphabetical order, and add missing "%G" and "%K". Within | |
1275 | the switch statement, move cases 'G', 'H', 'I' and 'K' so that the | |
1276 | cases are in alphabetical order. | |
1277 | ||
213f5e8a JJ |
1278 | 2018-07-25 Jakub Jelinek <jakub@redhat.com> |
1279 | ||
cf7fb52d JJ |
1280 | * cp-tree.h (enum cp_tree_index): Add |
1281 | CPTI_{ABI_TAG,ALIGNED,BEGIN,END,GET,TUPLE_{ELEMENT,SIZE}}_IDENTIFIER | |
1282 | and CPTI_{GNU,TYPE,VALUE,FUN,CLOSURE}_IDENTIFIER. | |
1283 | (abi_tag_identifier, aligned_identifier, begin_identifier, | |
1284 | end_identifier, get__identifier, gnu_identifier, | |
1285 | tuple_element_identifier, tuple_size_identifier, type_identifier, | |
1286 | value_identifier, fun_identifier, closure_identifier): Define. | |
1287 | * decl.c (initialize_predefined_identifiers): Initialize the above | |
1288 | identifiers. | |
1289 | (get_tuple_size): Use tuple_size_identifier instead of | |
1290 | get_identifier ("tuple_size") and value_identifier instead of | |
1291 | get_identifier ("value"). | |
1292 | (get_tuple_element_type): Use tuple_element_identifier instead of | |
1293 | get_identifier ("tuple_element") and type_identifier instead of | |
1294 | get_identifier ("type"). | |
1295 | (get_tuple_decomp_init): Use get__identifier instead of | |
1296 | get_identifier ("get"). | |
1297 | * lambda.c (maybe_add_lambda_conv_op): Use fun_identifier instead of | |
1298 | get_identifier ("_FUN"). | |
1299 | * parser.c (cp_parser_lambda_declarator_opt): Use closure_identifier | |
1300 | instead of get_identifier ("__closure"). | |
1301 | (cp_parser_std_attribute): Use gnu_identifier instead of | |
1302 | get_identifier ("gnu"). | |
1303 | (cp_parser_std_attribute_spec): Likewise. Use aligned_identifier | |
1304 | instead of get_identifier ("aligned"). | |
1305 | * class.c (check_abi_tags, inherit_targ_abi_tags): Use | |
1306 | abi_tag_identifier instead of get_identifier ("abi_tag"). | |
1307 | ||
213f5e8a JJ |
1308 | PR c++/85515 |
1309 | * cp-tree.h (enum cp_tree_index): Add | |
1310 | CPTI_FOR_{RANGE,BEGIN,END}{,_}_IDENTIFIER. | |
1311 | (for_range__identifier, for_begin__identifier, for_end__identifier, | |
1312 | for_range_identifier, for_begin_identifier, for_end_identifier): | |
1313 | Define. | |
1314 | * decl.c (initialize_predefined_identifiers): Initialize | |
1315 | for_{range,begin,end}{,_}_identifier. | |
1316 | * parser.c (build_range_temp): Use for_range__identifier instead of | |
1317 | get_identifier ("__for_range"). | |
1318 | (cp_convert_range_for): Use for_begin__identifier and | |
1319 | for_end__identifier instead of get_identifier ("__for_begin") and | |
1320 | get_identifier ("__for_end"). | |
1321 | * semantics.c (finish_for_stmt): Rename "__for_{range,begin,end} " | |
1322 | local symbols to "__for_{range,begin,end}". | |
1323 | ||
315aa691 JJ |
1324 | 2018-07-23 Jakub Jelinek <jakub@redhat.com> |
1325 | ||
1326 | PR c++/86569 | |
1327 | * cp-gimplify.c (cp_fold): Don't fold comparisons into other kind | |
1328 | of expressions other than INTEGER_CST regardless of TREE_NO_WARNING | |
1329 | or warn_nonnull_compare. | |
1330 | ||
0d214821 PC |
1331 | 2018-07-19 Paolo Carlini <paolo.carlini@oracle.com> |
1332 | ||
1333 | Revert fix for c++/59480 (and testsuite followup) | |
1334 | ||
1335 | 2019-07-18 Paolo Carlini <paolo.carlini@oracle.com> | |
1336 | ||
1337 | PR c++/59480, DR 136 | |
1338 | * decl.c (check_no_redeclaration_friend_default_args): New. | |
1339 | (duplicate_decls): Use the latter; also check that a friend | |
1340 | declaration specifying default arguments is a definition. | |
1341 | ||
a171a8bb JJ |
1342 | 2018-07-18 Jakub Jelinek <jakub@redhat.com> |
1343 | ||
1344 | PR c++/86550 | |
1345 | * parser.c (cp_parser_decl_specifier_seq): Diagnose invalid type | |
1346 | specifier if CP_PARSER_FLAGS_ONLY_MUTABLE_OR_CONSTEXPR. | |
1347 | ||
c56e9727 MP |
1348 | 2018-07-18 Marek Polacek <polacek@redhat.com> |
1349 | ||
1350 | PR c++/86190 - bogus -Wsign-conversion warning | |
1351 | * typeck.c (cp_build_binary_op): Fix formatting. Add a warning | |
1352 | sentinel. | |
1353 | ||
02920765 | 1354 | 2018-07-18 Paolo Carlini <paolo.carlini@oracle.com> |
6498dea6 PC |
1355 | |
1356 | PR c++/59480, DR 136 | |
1357 | * decl.c (check_no_redeclaration_friend_default_args): New. | |
1358 | (duplicate_decls): Use the latter; also check that a friend | |
1359 | declaration specifying default arguments is a definition. | |
1360 | ||
1361 | 2018-07-18 Paolo Carlini <paolo.carlini@oracle.com> | |
1362 | ||
1363 | * class.c (note_name_declared_in_class): Prefer permerror + inform | |
1364 | to a pair of permerrors; use DECL_SOURCE_LOCATION. | |
1365 | ||
97f13235 RB |
1366 | 2018-07-18 Richard Biener <rguenther@suse.de> |
1367 | ||
1368 | PR debug/86523 | |
1369 | * decl2.c (c_parse_final_cleanups): Call write_out_vars before | |
1370 | start_static_storage_duration_function sets current_function_decl. | |
1371 | ||
dd00049a JM |
1372 | 2018-07-17 Jason Merrill <jason@redhat.com> |
1373 | ||
1374 | PR c++/86480 - nested variadic lambda and constexpr if. | |
1375 | * pt.c (find_parameter_packs_r) [IF_STMT]: Don't walk into | |
1376 | IF_STMT_EXTRA_ARGS. | |
1377 | * tree.c (cp_walk_subtrees) [DECLTYPE_TYPE]: Set | |
1378 | cp_unevaluated_operand. | |
1379 | [ALIGNOF_EXPR] [SIZEOF_EXPR] [NOEXCEPT_EXPR]: Likewise. | |
1380 | ||
99422caa PC |
1381 | 2018-07-16 Paolo Carlini <paolo.carlini@oracle.com> |
1382 | ||
1383 | * class.c (resolve_address_of_overloaded_function): Don't emit an | |
1384 | inform if the matching permerror returns false. | |
1385 | * pt.c (check_specialization_namespace): Likewise. | |
1386 | ||
9e51f66f JJ |
1387 | 2018-07-16 Jakub Jelinek <jakub@redhat.com> |
1388 | ||
1389 | PR c++/3698 | |
1390 | PR c++/86208 | |
1391 | * cp-gimplify.c (cp_genericize_r): When using extern_decl_map, or | |
1392 | in TREE_USED flag from stmt to h->to. | |
1393 | ||
6b34716b NS |
1394 | 2018-07-13 Nathan Sidwell <nathan@acm.org> |
1395 | ||
1396 | PR c++/86374 | |
1397 | * pt.c (lookup_template_class_1): Use tsubst_aggr_type for | |
1398 | contexts that are classes. | |
1399 | * parser.c (cp_parser_template_id): Combine entering_scope decl & | |
1400 | initializer. | |
1401 | ||
9b452033 JJ |
1402 | 2018-07-12 Jakub Jelinek <jakub@redhat.com> |
1403 | ||
1404 | * decl2.c (cplus_decl_attributes): Don't diagnose vars without mappable | |
1405 | type here, instead add "omp declare target implicit" attribute. Add | |
1406 | that attribute instead of "omp declare target" also when | |
1407 | processing_template_decl. | |
1408 | * decl.c (cp_finish_decl): Diagnose vars without mappable type here, | |
1409 | and before calling cp_omp_mappable_type call complete_type. | |
1410 | ||
0b27c3ed JJ |
1411 | 2018-07-10 Jakub Jelinek <jakub@redhat.com> |
1412 | ||
f1bc6cae JJ |
1413 | PR sanitizer/86406 |
1414 | * cp-gimplify.c (cp_maybe_instrument_return): Skip trailing | |
1415 | DEBUG_BEGIN_STMTs. | |
1416 | ||
0b27c3ed JJ |
1417 | PR c++/86443 |
1418 | * semantics.c (handle_omp_for_class_iterator): Remove lastp argument, | |
1419 | instead of setting *lastp turn orig_declv elt into a TREE_LIST. | |
1420 | (finish_omp_for): Adjust handle_omp_for_class_iterator caller. | |
1421 | * pt.c (tsubst_omp_for_iterator): Allow OMP_FOR_ORIG_DECLS to contain | |
1422 | TREE_LIST for both the original class iterator and the "last" helper | |
1423 | var. | |
1424 | ||
7b3bc054 PC |
1425 | 2018-07-09 Paolo Carlini <paolo.carlini@oracle.com> |
1426 | ||
1427 | * decl.c (grokdeclarator): Use rich_location::add_range in three | |
1428 | more places; include gcc-rich-location.h. | |
1429 | ||
4a669ac3 AH |
1430 | 2018-07-07 Aldy Hernandez <aldyh@redhat.com> |
1431 | ||
1432 | * decl.c (build_enumerator): Change overflow type to overflow_type. | |
1433 | * init.c (build_new_1): Same. | |
1434 | ||
09cff37b NS |
1435 | 2018-07-05 Nathan Sidwell <nathan@acm.org> |
1436 | ||
1437 | * cp/decl.c (decls_match): Check SYSTEM_IMPLICIT_EXTERN_C not | |
1438 | NO_IMPLICIT_EXTERN_C. | |
1439 | * cp/parser.c (cp_parser_parameter_declaration_clause): Likewise. | |
1440 | ||
a617812f VV |
1441 | 2018-07-04 Ville Voutilainen <ville.voutilainen@gmail.com> |
1442 | ||
1443 | PR c++/86398 | |
1444 | * method.c (is_trivially_xible): Return false | |
1445 | if is_xible_helper returns a NULL_TREE. | |
1446 | ||
2dac4037 PC |
1447 | 2018-07-03 Paolo Carlini <paolo.carlini@oracle.com> |
1448 | ||
1449 | * decl.c (min_location): New. | |
1450 | (smallest_type_quals_location): Use the latter. | |
1451 | (check_concept_fn): Use DECL_SOURCE_LOCATION. | |
1452 | (grokdeclarator): Use accurate locations in a number of error | |
1453 | messages involving ds_thread, ds_storage_class, ds_virtual, | |
1454 | ds_constexpr, ds_typedef and ds_friend; exploit min_location. | |
1455 | ||
44b0c9ae MP |
1456 | 2018-07-03 Marek Polacek <polacek@redhat.com> |
1457 | ||
1458 | PR c++/86201 | |
1459 | * typeck.c (cp_build_binary_op): Check c_inhibit_evaluation_warnings. | |
1460 | ||
2831d681 JM |
1461 | 2018-07-03 Jason Merrill <jason@redhat.com> |
1462 | ||
1463 | PR c++/86378 - functional cast in noexcept-specifier. | |
1464 | * tree.c (strip_typedefs_expr) [TREE_LIST]: Fix iteration. | |
1465 | ||
a5eae716 PC |
1466 | 2018-07-02 Paolo Carlini <paolo.carlini@oracle.com> |
1467 | ||
1468 | * parser.c (set_and_check_decl_spec_loc): Use rich_location::add_range | |
1469 | in error message about __thread and thread_local at the same time. | |
1470 | ||
dd2a4498 MP |
1471 | 2018-06-29 Marek Polacek <polacek@redhat.com> |
1472 | ||
1473 | PR c++/86184 | |
1474 | * tree.c (cp_save_expr): Don't call save_expr for TARGET_EXPRs. | |
1475 | ||
eacb16dc DM |
1476 | 2018-06-28 David Malcolm <dmalcolm@redhat.com> |
1477 | ||
1478 | * parser.c (cp_parser_error_1): After issuing a conflict marker | |
1479 | error, consume tokens until the end of the source line. | |
1480 | ||
b8be1451 JM |
1481 | 2018-06-28 Jason Merrill <jason@redhat.com> |
1482 | ||
1483 | PR c++/86342 - -Wdeprecated-copy and system headers. | |
1484 | * decl2.c (cp_warn_deprecated_use): Don't warn about declarations | |
1485 | in system headers. | |
1486 | ||
5da1234b DM |
1487 | 2018-06-27 David Malcolm <dmalcolm@redhat.com> |
1488 | ||
1489 | PR c++/86329 | |
1490 | * name-lookup.c (consider_binding_level): Filter out names that | |
1491 | match anon_aggrname_p. | |
1492 | ||
8945521a JM |
1493 | 2018-06-27 Jason Merrill <jason@redhat.com> |
1494 | ||
1495 | * name-lookup.c (do_pushtag): If we skip a class level, also skip | |
1496 | its template level. | |
1497 | ||
6147a53a JM |
1498 | 2018-06-26 Jason Merrill <jason@redhat.com> |
1499 | ||
307193b8 JM |
1500 | PR c++/86320 - memory-hog with std::array of pair |
1501 | * typeck2.c (process_init_constructor_array): Only compute a | |
1502 | constant initializer once. | |
1503 | ||
6147a53a JM |
1504 | PR c++/80290 - memory-hog with std::pair. |
1505 | * pt.c (fn_type_unification): Add convs parameter. | |
1506 | (check_non_deducible_conversion): Remember conversion. | |
1507 | (check_non_deducible_conversions): New. Do checks here. | |
1508 | (type_unification_real): Not here. Remove flags parm. | |
1509 | * call.c (add_function_candidate): Make convs a parameter. | |
1510 | Don't recalculate the conversion if it's already set. | |
1511 | (add_template_candidate_real): Allocate convs here. | |
1512 | (good_conversion, conv_flags): New. | |
1513 | ||
f0391511 JJ |
1514 | 2018-06-26 Jakub Jelinek <jakub@redhat.com> |
1515 | ||
1516 | PR c++/86291 | |
1517 | * parser.c (cp_parser_omp_for_loop_init): Change for_block argument | |
1518 | type from vec<tree, va_gc> * to vec<tree, va_gc> *&. | |
1519 | ||
be68f3fa PC |
1520 | 2018-06-23 Paolo Carlini <paolo.carlini@oracle.com> |
1521 | ||
1522 | * decl.c (bad_specifiers): Add const location_t* parameter and | |
1523 | use locations in error messages about 'inline' and 'virtual'. | |
1524 | (mark_inline_variable): Add location_t parameter and use it in | |
1525 | error_at and pedwarn messages. | |
1526 | (grokdeclarator): Use declspecs->locations[ds_constexpr], | |
1527 | declspecs->locations[ds_concept], declspecs->locations[ds_virtual], | |
1528 | declspecs->locations[ds_inline] in many error messages; adjust | |
1529 | bad_specifiers and mark_inline_variable calls. | |
1530 | (grokvardecl): Use declspecs->locations[ds_concept] in error message. | |
1531 | ||
e4511ca2 JM |
1532 | 2018-06-22 Jason Merrill <jason@redhat.com> |
1533 | ||
e56f6629 JM |
1534 | PR c++/86219 - ICE with erroneous initializer in template. |
1535 | * constexpr.c (fold_non_dependent_expr): Add complain parm. | |
1536 | * call.c, expr.c, init.c, pt.c, semantics.c, typeck.c, typeck2.c: | |
1537 | Pass it. | |
1538 | * call.c (build_cxx_call): Don't mess with builtins in a template. | |
1539 | * typeck2.c (store_init_value): If fold_non_dependent_expr didn't | |
1540 | produce a constant value, go back to the uninstantiated form. | |
1541 | ||
e4511ca2 JM |
1542 | Avoid taking the address of something just because it's in parens. |
1543 | * constexpr.c (same_type_ignoring_tlq_and_bounds_p): New. | |
1544 | (cxx_fold_indirect_ref): Use it. | |
1545 | (cxx_eval_constant_expression) [VIEW_CONVERT_EXPR]: Use it. | |
1546 | * cp-tree.h (REF_PARENTHESIZED_P): Allow VIEW_CONVERT_EXPR. | |
1547 | * semantics.c (force_paren_expr): Use VIEW_CONVERT_EXPR instead of | |
1548 | static_cast to reference type. | |
1549 | (maybe_undo_parenthesized_ref): Handle VIEW_CONVERT_EXPR. | |
1550 | ||
6ec04704 JM |
1551 | 2018-06-21 Jason Merrill <jason@redhat.com> |
1552 | ||
40a380e4 JM |
1553 | * pt.c (tsubst) [TEMPLATE_TYPE_PARM]: Use TEMPLATE_PARM_DESCENDANTS. |
1554 | ||
50200c65 JM |
1555 | * name-lookup.c (do_push_to_top_level): Don't allocate |
1556 | current_lang_base. | |
1557 | (do_pop_from_top_level): Release current_lang_base. | |
1558 | ||
6ec04704 JM |
1559 | Let -fmem-report see callers of cxx_make_type. |
1560 | * lex.c (cxx_make_type): Add MEM_STAT_DECL. | |
1561 | (make_class_type): Likewise. | |
1562 | (cxx_make_type_hook): New. | |
1563 | * cp-objcp-common.h (LANG_HOOKS_MAKE_TYPE): Use cxx_make_type_hook. | |
1564 | ||
c1456656 NS |
1565 | 2018-06-20 Nathan Sidwell <nathan@acm.org> |
1566 | ||
1567 | PR c++/85634 | |
1568 | * friend.c (add_friend): Keep lookup sets of tempate sets. | |
1569 | ||
f2cb6e64 PC |
1570 | 2018-06-20 Paolo Carlini <paolo.carlini@oracle.com> |
1571 | ||
1572 | * decl.c (grokfndecl): Add const cp_decl_specifier_seq* parameter; | |
1573 | tidy handling of a null location_t argument; use proper location | |
1574 | information in a few additional error messages. | |
1575 | (grokdeclarator): Update calls. | |
1576 | ||
829c6349 CLT |
1577 | 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com> |
1578 | Thomas Schwinge <thomas@codesourcery.com> | |
1579 | Cesar Philippidis <cesar@codesourcery.com> | |
1580 | ||
1581 | * parser.c (cp_parser_omp_clause_name): Add support for finalize | |
1582 | and if_present. Make present_or_{copy,copyin,copyout,create} aliases | |
1583 | to their non-present_or_* counterparts. Make 'self' an alias to | |
1584 | PRAGMA_OACC_CLAUSE_HOST. | |
1585 | (cp_parser_oacc_data_clause): Update GOMP mappings for | |
1586 | PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove | |
1587 | PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}. | |
1588 | (cp_parser_oacc_all_clauses): Handle finalize and if_present clauses. | |
1589 | Remove support for present_or_* clauses. | |
1590 | (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses. | |
1591 | (OACC_PARALLEL_CLAUSE_MASK): Likewise. | |
1592 | (OACC_DECLARE_CLAUSE_MASK): Likewise. | |
1593 | (OACC_DATA_CLAUSE_MASK): Likewise. | |
1594 | (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses. | |
1595 | (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause. | |
1596 | (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT. | |
1597 | (cp_parser_oacc_declare): Remove PRESENT_OR_* clauses. | |
1598 | * pt.c (tsubst_omp_clauses): Handle IF_PRESENT and FINALIZE. | |
1599 | * semantics.c (finish_omp_clauses): Handle IF_PRESENT and FINALIZE. | |
1600 | ||
e28fadbc MP |
1601 | 2018-06-20 Marek Polacek <polacek@redhat.com> |
1602 | ||
1603 | PR c++/86240 | |
1604 | * constexpr.c (cxx_eval_constant_expression): Handle ABSU_EXPR. | |
1605 | (fold_simple_1): Likewise. | |
1606 | * error.c (dump_expr): Likewise. | |
1607 | ||
335a120f NS |
1608 | 2018-06-20 Nathan Sidwell <nathan@acm.org> |
1609 | ||
1610 | PR c++/85634 | |
1611 | * cp-tree.h (lookup_keep): Drop KEEP parm. | |
1612 | (lookup_list_keep): Delete. | |
1613 | (maybe_get_fns): Declare. | |
1614 | * parser.c (cp_parser_primary_expression): Call lookup_keep here. | |
1615 | (cp_parser_template_id): Not here ... | |
1616 | * decl.c (cp_finish_decl): ... nor here ... | |
1617 | * init.c (build_raw_new_expr): ... nor here ... | |
1618 | * pt.c (process_template_parm): ... nor here ... | |
1619 | * semantics.c (perform_koenig_lookup): Call lookup_keep. | |
1620 | (finish_call_expr): Not here. | |
1621 | * tree.c (ovl_cache): Delete. | |
1622 | (ovl_make, ovl_copy): No cache. | |
1623 | (lookup_keep): Always keep. | |
1624 | (lookup_list_keep): Delete. | |
1625 | (maybe_get_fns): New, broken out of ... | |
1626 | (get_fns): ... here. Call it. | |
1627 | (built_min_nt_loc, build_min, build_min_non_dep): Drop lookup_keep. | |
1628 | (build_min_nt_call_vec): Likewise. | |
1629 | ||
0e570cf8 JM |
1630 | 2018-06-19 Jason Merrill <jason@redhat.com> |
1631 | ||
e8c48716 JM |
1632 | * cp-tree.h (CONSTRUCTOR_NO_IMPLICIT_ZERO): Remove. |
1633 | * constexpr.c: Use CONSTRUCTOR_NO_CLEARING instead. | |
1634 | ||
8745500a | 1635 | PR c++/86182 - ICE with anonymous union passed to template. |
0e570cf8 JM |
1636 | * pt.c (tsubst_expr) [DECL_EXPR]: Handle an anonymous union type |
1637 | used to declare a named variable. | |
1638 | ||
5d4d0be8 JM |
1639 | 2018-06-18 Jason Merrill <jason@redhat.com> |
1640 | ||
6bdfada4 JM |
1641 | * tree.c (cp_expr_location): New. |
1642 | * cp-tree.h (cp_expr_loc_or_loc): New. | |
1643 | * call.c, cvt.c, constexpr.c, constraint.cc, cp-gimplify.c, decl.c, | |
1644 | error.c, init.c, lex.c, parser.c, pt.c, semantics.c, typeck.c, | |
1645 | typeck2.c: Use it instead of EXPR_LOC_OR_LOC. | |
1646 | ||
c0e11c6a JM |
1647 | * parser.c (cp_parser_lambda_expression): Use a range for |
1648 | LAMBDA_EXPR_LOCATION. | |
1649 | ||
44e3e545 JM |
1650 | PR c++/86200 - ICE with unexpanded pack in lambda parameter. |
1651 | * pt.c (find_parameter_packs_r) [LAMBDA_EXPR]: Also look into the | |
1652 | function type. | |
1653 | ||
cae39eb4 JM |
1654 | PR c++/81060 - ICE with unexpanded parameter pack. |
1655 | * pt.c (check_for_bare_parameter_packs): Add loc parameter. | |
1656 | * decl.c (grokdeclarator): Call it for qualifying_scope. | |
1657 | ||
5d4d0be8 JM |
1658 | PR c++/86171 - ICE with recursive alias instantiation. |
1659 | * pt.c (tsubst_decl): Handle recursive alias instantiation. | |
1660 | ||
9a977ce3 PC |
1661 | 2018-06-18 Paolo Carlini <paolo.carlini@oracle.com> |
1662 | ||
1663 | * decl.c (duplicate_decls): Consistently use DECL_SOURCE_LOCATION | |
1664 | in errors about redefined default arguments; tidy. | |
1665 | ||
e197e64e KV |
1666 | 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org> |
1667 | ||
1668 | * constexpr.c (potential_constant_expression_1): Handle ABSU_EXPR. | |
1669 | * cp-gimplify.c (cp_fold): Likewise. | |
1670 | ||
508f1cb5 JM |
1671 | 2018-06-15 Jason Merrill <jason@redhat.com> |
1672 | ||
94aedc1c JM |
1673 | PR c++/86147 - wrong capture for template argument. |
1674 | * expr.c (mark_use): Look through NOP_EXPR. | |
1675 | ||
fe7a23a6 JM |
1676 | * name-lookup.c (do_pushtag): Don't look through complete types, but |
1677 | don't add to them either. Get context from current_binding_level. | |
1678 | * pt.c (tsubst_default_argument): Use push_to/pop_from_top_level. | |
1679 | ||
b4cf2e42 JM |
1680 | * decl.c (start_enum): Do compare dependent underlying type. |
1681 | ||
582f844c JM |
1682 | PR c++/82882 - ICE with lambda in template default argument. |
1683 | * lambda.c (record_null_lambda_scope): New. | |
1684 | * pt.c (tsubst_lambda_expr): Use it. | |
1685 | * name-lookup.c (do_pushtag): Don't give a lambda DECL_CONTEXT of a | |
1686 | function that isn't open. | |
1687 | ||
508f1cb5 JM |
1688 | * tree.c (maybe_warn_parm_abi): Inform the location of the class. |
1689 | ||
cf4763bd MP |
1690 | 2018-06-14 Marek Polacek <polacek@redhat.com> |
1691 | ||
1692 | PR c++/86063 | |
1693 | * decl2.c (cp_check_const_attributes): Skip trees that are not | |
1694 | TREE_LISTs. | |
1695 | ||
bc04d1ff JJ |
1696 | 2018-06-14 Jakub Jelinek <jakub@redhat.com> |
1697 | ||
1698 | P0624R2 - Default constructible and assignable stateless lambdas | |
1699 | * method.c (synthesized_method_walk): For C++2a don't mark | |
1700 | sfk_constructor or sfk_copy_assignment as deleted if lambda has | |
1701 | no lambda-captures. | |
1702 | ||
d4d44753 PC |
1703 | 2018-06-14 Paolo Carlini <paolo.carlini@oracle.com> |
1704 | ||
1705 | * decl.c (duplicate_decls): Use DECL_SOURCE_LOCATION in | |
1706 | OPT_Wshadow warning_at. | |
1707 | (grokfndecl): Consistently use the location_t argument in | |
1708 | literal operator diagnostic messages. | |
1709 | (grokdeclarator): Use declspecs->locations[ds_storage_class] | |
1710 | in error_at call. | |
1711 | * decl2.c (finish_static_data_member_decl): Use DECL_SOURCE_LOCATION | |
1712 | in permerror call. | |
1713 | ||
34a7a230 JM |
1714 | 2018-06-13 Jason Merrill <jason@redhat.com> |
1715 | ||
4fdda3ce JM |
1716 | PR c++/86099 - ICE with trivial copy and non-trivial default ctor. |
1717 | * constexpr.c (instantiate_cx_fn_r): Don't synthesize trivial | |
1718 | constructors. | |
1719 | ||
34a7a230 JM |
1720 | PR c++/86094 - wrong code with defaulted move ctor. |
1721 | * class.c (classtype_has_non_deleted_move_ctor): New. | |
1722 | * tree.c (maybe_warn_parm_abi, type_has_nontrivial_copy_init): | |
1723 | Handle v12 breakage. | |
1724 | ||
79a9afa5 JM |
1725 | 2018-06-12 Jason Merrill <jason@redhat.com> |
1726 | ||
1727 | PR c++/86098 - ICE with template placeholder for TTP. | |
1728 | * typeck.c (structural_comptypes) [TEMPLATE_TYPE_PARM]: Check | |
1729 | CLASS_PLACEHOLDER_TEMPLATE. | |
1730 | ||
2d10ccaa PC |
1731 | 2018-06-12 Paolo Carlini <paolo.carlini@oracle.com> |
1732 | ||
1733 | * decl2.c (coerce_new_type, coerce_delete_type): Add location_t | |
1734 | parameter and adjust error_at calls. | |
1735 | * decl.c (grok_op_properties): Adjust calls. | |
1736 | * cp-tree.h (oerce_new_type, coerce_delete_type): Adjust decls. | |
1737 | ||
4db9ca86 MP |
1738 | 2018-06-12 Marek Polacek <polacek@redhat.com> |
1739 | ||
1740 | Core issue 1331 - const mismatch with defaulted copy constructor | |
1741 | * class.c (check_bases_and_members): When checking a defaulted | |
1742 | function, mark it as deleted rather than giving an error. | |
1743 | ||
c7e2d7ad JM |
1744 | 2018-06-11 Jason Merrill <jason@redhat.com> |
1745 | ||
ee7ae7ae JM |
1746 | PR c++/85792 -Wctor-dtor-privacy and inherited constructor. |
1747 | * class.c (maybe_warn_about_overly_private_class): Handle inherited | |
1748 | constructors. | |
1749 | ||
c7e2d7ad JM |
1750 | PR c++/85963 - -Wunused-but-set with ?: in template. |
1751 | * pt.c (tsubst_copy_and_build) [COND_EXPR]: Call mark_rvalue_use. | |
1752 | ||
fafd0db1 PC |
1753 | 2018-06-11 Paolo Carlini <paolo.carlini@oracle.com> |
1754 | ||
1755 | * decl.c (grok_op_properties): Consistently use the location | |
1756 | of the decl; remove special casing of POSTINCREMENT_EXPR and | |
1757 | POSTDECREMENT_EXPR wrt default arguments. | |
1758 | ||
9b0607de JM |
1759 | 2018-06-05 Jason Merrill <jason@redhat.com> |
1760 | ||
1761 | * constexpr.c (cxx_eval_binary_expression): Special case comparison | |
1762 | of pointers to members of the same union. | |
1763 | ||
46e318cf JM |
1764 | 2018-06-11 Jason Merrill <jason@redhat.com> |
1765 | ||
1766 | PR c++/86094 - wrong code with defaulted move ctor. | |
1767 | * tree.c (type_has_nontrivial_copy_init): Fix move ctor handling. | |
1768 | ||
874c7b7d PC |
1769 | 2018-06-10 Paolo Carlini <paolo.carlini@oracle.com> |
1770 | ||
1771 | * decl.c (grokfndecl): Use the location_t argument in two more places. | |
1772 | ||
e58c9d92 MP |
1773 | 2018-06-06 Marek Polacek <polacek@redhat.com> |
1774 | ||
1775 | PR c++/85977 | |
1776 | * pt.c (unify): If ELTTYPE has no deducible template parms, skip | |
1777 | deduction from the list elements. | |
1778 | (type_unification_real): Check convertibility of list elements. | |
1779 | ||
4dbdb49b JM |
1780 | 2018-06-06 Jason Merrill <jason@redhat.com> |
1781 | ||
b66ec0c0 JM |
1782 | PR c++/86060 - ICE on range for with -std=c++98. |
1783 | * parser.c (cp_parser_init_statement): Don't clobber *decl after | |
1784 | pedwarn. | |
1785 | ||
4dbdb49b JM |
1786 | PR c++/85710 - ICE with -Wmemset-elt-size. |
1787 | * semantics.c (finish_call_expr): Call warn_for_memset here. | |
1788 | * parser.c (cp_parser_postfix_expression): Not here. | |
1789 | (literal_integer_zerop): No longer static. | |
1790 | * pt.c (build_non_dependent_expr): Don't wrap CONST_DECL. | |
1791 | ||
05f9a806 MP |
1792 | 2018-06-05 Marek Polacek <polacek@redhat.com> |
1793 | ||
1794 | PR c++/85976 | |
1795 | * tree.c (cp_tree_equal): Handle USING_DECL. | |
1796 | ||
066c4268 JM |
1797 | 2018-06-05 Jason Merrill <jason@redhat.com> |
1798 | ||
1799 | PR c++/85731 - wrong error with qualified-id in template. | |
1800 | * semantics.c (finish_qualified_id_expr): build_qualified_name | |
1801 | for unbound names in the current class. | |
1802 | ||
92a38cfd JM |
1803 | 2018-06-04 Jason Merrill <jason@redhat.com> |
1804 | ||
ae177d35 JM |
1805 | PR c++/61806 - missed SFINAE with partial specialization. |
1806 | * cp-tree.h (deferring_access_check_sentinel): Add deferring_kind | |
1807 | parameter to constructor. | |
1808 | * pt.c (instantiate_class_template_1): Enable access checking | |
1809 | before call to most_specialized_partial_spec. | |
1810 | ||
92a38cfd JM |
1811 | PR c++/85765 - SFINAE and non-type default template arg. |
1812 | * pt.c (type_unification_real): Do full semantic processing if | |
1813 | substituting a partial args list replaces all template parms. | |
1814 | ||
c5f50290 JM |
1815 | 2018-06-03 Jason Merrill <jason@redhat.com> |
1816 | ||
1817 | PR c++/85739 - ICE with pointer to member template parm. | |
1818 | * cvt.c (perform_qualification_conversions): Use cp_fold_convert. | |
1819 | ||
57ea03ad JM |
1820 | 2018-06-02 Jason Merrill <jason@redhat.com> |
1821 | ||
1822 | PR c++/85761 - ICE with ill-formed use of const outer variable. | |
1823 | * expr.c (mark_use): Handle location wrappers. | |
1824 | ||
a6090779 | 1825 | 2018-06-01 Jason Merrill <jason@redhat.com> |
e079dced | 1826 | |
4cda703e JM |
1827 | PR c++/85764 - bogus 'this' not captured error. |
1828 | * lambda.c (resolvable_dummy_lambda): Use nonlambda_method_basetype. | |
1829 | (nonlambda_method_basetype): Handle NSDMI. | |
1830 | ||
e079dced JM |
1831 | CWG 1581: When are constexpr member functions defined? |
1832 | * constexpr.c (instantiate_cx_fn_r, instantiate_constexpr_fns): New. | |
1833 | (cxx_eval_outermost_constant_expr): Call instantiate_constexpr_fns. | |
1834 | ||
7d072b97 JM |
1835 | PR c++/58281 - explicit instantiation of constexpr |
1836 | * pt.c (mark_decl_instantiated): Clear DECL_EXTERNAL. | |
1837 | ||
9760467e JM |
1838 | * pt.c (instantiate_decl): Any defaulted function is defined. |
1839 | ||
d72a3672 JW |
1840 | 2018-05-30 Jonathan Wakely <jwakely@redhat.com> |
1841 | ||
1842 | PR c++/77777 | |
1843 | * call.c (resolve_args): Use location of expression, not current input | |
1844 | location. | |
1845 | ||
752e7593 VV |
1846 | 2018-05-30 Ville Voutilainen <ville.voutilainen@gmail.com> |
1847 | ||
1848 | Do not warn about zero-as-null when NULL is used. | |
1849 | * call.c (conversion_null_warnings): Check for pointer | |
1850 | types converted from zero constants. | |
1851 | (convert_like_real): Add a warning sentinel at the end. | |
1852 | * tree.c (maybe_warn_zero_as_null_pointer_constant): Also | |
1853 | check null_node_p. | |
1854 | ||
1ba9c854 | 1855 | 2018-05-30 Jason Merrill <jason@redhat.com> |
298434c9 JM |
1856 | |
1857 | PR c++/85807 - ICE with call in template NSDMI. | |
1858 | * init.c (get_nsdmi): Use push_to/pop_from_top_level. | |
1859 | * tree.c (bot_manip): Don't set_flags_from_callee in a template. | |
1860 | ||
5603790d JM |
1861 | PR c++/85873 - constant initializer_list array not in .rodata. |
1862 | * tree.c (build_target_expr): Set TREE_READONLY. | |
1863 | * call.c (set_up_extended_ref_temp): Set TREE_READONLY. | |
1864 | ||
cd7fa7a7 JM |
1865 | * parser.c (cp_parser_check_condition_declarator): Handle |
1866 | cp_error_declarator. | |
1867 | ||
b005486b JW |
1868 | 2018-05-30 Jonathan Wakely <jwakely@redhat.com> |
1869 | ||
1870 | * typeck.c (cxx_sizeof_or_alignof_type): Return size_one_node instead | |
1871 | of using it in dead store. | |
1872 | ||
04eb9c55 JM |
1873 | 2018-05-29 Jason Merrill <jason@redhat.com> |
1874 | ||
1875 | PR c++/67445 - returning temporary initializer_list. | |
1876 | PR c++/67711 - assigning from temporary initializer_list. | |
1877 | PR c++/48562 - new initializer_list. | |
1878 | * typeck.c (maybe_warn_about_returning_address_of_local): Also warn | |
1879 | about returning local initializer_list. | |
1880 | * cp-tree.h (AUTO_TEMP_NAME, TEMP_NAME_P): Remove. | |
1881 | * call.c (build_over_call): Warn about assignment from temporary | |
1882 | init_list. | |
1883 | * init.c (build_new_1): Warn about 'new std::initializer_list'. | |
1884 | (find_list_begin, maybe_warn_list_ctor): New. | |
1885 | (perform_member_init): Use maybe_warn_list_ctor. | |
1886 | ||
009bb506 MP |
1887 | 2018-05-29 Marek Polacek <polacek@redhat.com> |
1888 | ||
1889 | PR c++/85883 | |
1890 | * init.c (build_new): Handle deducing a class with new | |
1891 | with more than one argument. | |
1892 | ||
69ce0c8c JJ |
1893 | 2018-05-29 Jakub Jelinek <jakub@redhat.com> |
1894 | ||
1895 | PR c++/85952 | |
1896 | * init.c (build_aggr_init): For structured binding initialized from | |
1897 | array call mark_rvalue_use on the initializer. | |
1898 | ||
b0c31bc6 BE |
1899 | 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de> |
1900 | ||
1901 | * decl2.c (start_static_storage_duration_function): Use | |
1902 | splay_tree_delete_pointers. | |
1903 | ||
3983063e JM |
1904 | 2018-05-25 Jason Merrill <jason@redhat.com> |
1905 | ||
d9338471 JM |
1906 | PR c++/85815 - reference to member of enclosing template. |
1907 | * search.c (lookup_base): Use currently_open_class. | |
1908 | (lookup_member): Use it regardless of -fconcepts. | |
1909 | * parser.c (cp_parser_postfix_dot_deref_expression): Check it. | |
1910 | ||
3983063e JM |
1911 | CWG 616, 1213 - value category of subobject references. |
1912 | * tree.c (lvalue_kind): Fix handling of ARRAY_REF of pointer. | |
1913 | ||
520fe2e3 JM |
1914 | 2018-05-24 Jason Merrill <jason@redhat.com> |
1915 | ||
1916 | PR c++/85842 - -Wreturn-type, constexpr if and generic lambda. | |
1917 | * pt.c (tsubst_lambda_expr): Copy current_function_returns_* to | |
1918 | generic lambda. | |
1919 | ||
9635923d VV |
1920 | 2018-05-24 Ville Voutilainen <ville.voutilainen@gmail.com> |
1921 | ||
1922 | Pedwarn on a non-standard position of a C++ attribute. | |
1923 | * parser.c (cp_parser_namespace_definition): Pedwarn about attributes | |
1924 | after the namespace name. | |
1925 | ||
71a93b08 PC |
1926 | 2018-05-24 Paolo Carlini <paolo.carlini@oracle.com> |
1927 | ||
1928 | * cp-tree.h (INDIRECT_TYPE_P): New. | |
1929 | * call.c (build_trivial_dtor_call, maybe_warn_class_memaccess, | |
1930 | joust): Use it instead of POINTER_TYPE_P. | |
1931 | * class.c (update_vtable_entry_for_fn, find_flexarrays, | |
1932 | * fixed_type_or_null, resolves_to_fixed_type_p): Likewise. | |
1933 | * constexpr.c (cxx_eval_binary_expression, cxx_fold_indirect_ref, | |
1934 | * cxx_eval_increment_expression, potential_constant_expression_1): | |
1935 | Likewise. | |
1936 | * cp-gimplify.c (cp_gimplify_expr, cp_genericize_r): Likewise. | |
1937 | * cp-objcp-common.c (cxx_get_alias_set): Likewise. | |
1938 | * cp-ubsan.c (cp_ubsan_maybe_instrument_member_call, | |
1939 | cp_ubsan_maybe_instrument_downcast): Likewise. | |
1940 | * cvt.c (cp_convert_to_pointer, ocp_convert, | |
1941 | cp_get_fndecl_from_callee, maybe_warn_nodiscard, convert): Likewise. | |
1942 | * cxx-pretty-print.c (cxx_pretty_printer::abstract_declarator, | |
1943 | pp_cxx_offsetof_expression_1): Likewise. | |
1944 | * decl.c (grokparms, static_fn_type): Likewise. | |
1945 | * decl2.c (grokbitfield): Likewise. | |
1946 | * error.c (dump_expr): Likewise. | |
1947 | * except.c (initialize_handler_parm, check_noexcept_r): Likewise. | |
1948 | * init.c (warn_placement_new_too_small): Likewise. | |
1949 | * lambda.c (build_capture_proxy, add_capture): Likewise. | |
1950 | * parser.c (cp_parser_omp_for_loop): Likewise. | |
1951 | * pt.c (convert_nontype_argument, fn_type_unification, | |
1952 | uses_deducible_template_parms, check_cv_quals_for_unify, | |
1953 | dependent_type_p_r): Likewise. | |
1954 | * search.c (check_final_overrider): Likewise. | |
1955 | * semantics.c (handle_omp_array_sections, finish_omp_clauses, | |
1956 | finish_omp_for): Likewise. | |
1957 | * tree.c (cp_build_qualified_type_real): Likewise. | |
1958 | * typeck.c (build_class_member_access_expr, | |
1959 | finish_class_member_access_expr, build_x_indirect_ref, | |
1960 | cp_build_indirect_ref_1, cp_build_binary_op, build_const_cast_1): | |
1961 | Likewise. | |
1962 | ||
1268ecc2 JM |
1963 | 2018-05-24 Jason Merrill <jason@redhat.com> |
1964 | ||
1965 | PR c++/85864 - literal template and default template arg. | |
1966 | * pt.c (instantiation_dependent_r): Handle NONTYPE_ARGUMENT_PACK. | |
1967 | ||
ea219e6e MP |
1968 | 2018-05-24 Marek Polacek <polacek@redhat.com> |
1969 | ||
1970 | PR c++/85847 | |
1971 | * init.c (build_new_1): Use fold_non_dependent_expr. Use a dedicated | |
1972 | variable for its result. Fix a condition. | |
1973 | (build_new): Use fold_non_dependent_expr. Tweak a condition. | |
1974 | ||
955da5e5 JM |
1975 | 2018-05-23 Jason Merrill <jason@redhat.com> |
1976 | ||
a347241b JM |
1977 | Fix cast to rvalue reference from prvalue. |
1978 | * cvt.c (diagnose_ref_binding): Handle rvalue reference. | |
1979 | * rtti.c (build_dynamic_cast_1): Don't try to build a reference to | |
1980 | non-class type. Handle xvalue argument. | |
1981 | * typeck.c (build_reinterpret_cast_1): Allow cast from prvalue to | |
1982 | rvalue reference. | |
1983 | * semantics.c (finish_compound_literal): Do direct-initialization, | |
1984 | not cast, to initialize a reference. | |
1985 | ||
955da5e5 JM |
1986 | CWG 616, 1213 - value category of subobject references. |
1987 | * tree.c (lvalue_kind): A reference to a subobject of a prvalue is | |
1988 | an xvalue. | |
1989 | * typeck2.c (build_m_component_ref): Likewise. | |
1990 | * typeck.c (cp_build_addr_expr_1, lvalue_or_else): Remove diagnostic | |
1991 | distinction between temporary and xvalue. | |
1992 | ||
3d76db63 MP |
1993 | 2018-05-23 Marek Polacek <polacek@redhat.com> |
1994 | ||
1995 | Implement P0614R1, Range-based for statements with initializer. | |
1996 | * parser.c (cp_parser_range_based_for_with_init_p): New. | |
1997 | (cp_parser_init_statement): Use it. Parse the optional init-statement | |
1998 | for a range-based for loop. | |
1999 | (cp_parser_skip_to_closing_parenthesis_1): Handle balancing ?:. | |
2000 | ||
0d2e69cb JM |
2001 | 2018-05-22 Jason Merrill <jason@redhat.com> |
2002 | ||
3423a64d JM |
2003 | PR c++/81420 - not extending temporary lifetime. |
2004 | * call.c (extend_ref_init_temps_1): Handle ARRAY_REF. | |
2005 | * class.c (build_base_path): Avoid redundant move of an rvalue. | |
2006 | ||
0d2e69cb JM |
2007 | PR c++/85866 - error with .* in default template arg. |
2008 | * pt.c (tsubst_copy_and_build): Handle partial instantiation. | |
2009 | ||
54c22d96 PC |
2010 | 2018-05-21 Paolo Carlini <paolo.carlini@oracle.com> |
2011 | ||
2012 | * parser.c (cp_parser_parameter_declaration_list): Remove | |
2013 | bool* parameter. | |
2014 | (cp_parser_parameter_declaration_clause): Adjust. | |
2015 | (cp_parser_cache_defarg): Likewise. | |
2016 | ||
18759120 PC |
2017 | 2018-05-21 Paolo Carlini <paolo.carlini@oracle.com> |
2018 | ||
2019 | PR c++/84588 | |
2020 | * parser.c (cp_parser_maybe_commit_to_declaration, | |
2021 | cp_parser_check_condition_declarator): New. | |
2022 | (cp_parser_simple_declaration): Use the first above. | |
2023 | (cp_parser_condition): Use both the above; enforce | |
2024 | [stmt.stmt]/2 about the declarator not specifying | |
2025 | a function or an array; improve error-recovery. | |
2026 | ||
f3f7cefe JM |
2027 | 2018-05-20 Jason Merrill <jason@redhat.com> |
2028 | ||
2029 | PR libstdc++/85843 - warning in logic_error copy constructor. | |
2030 | * class.c (type_has_user_nondefault_constructor): Check for a | |
2031 | user-provided ctor, not user-declared. | |
2032 | ||
4b950a6d JM |
2033 | 2018-05-19 Jason Merrill <jason@redhat.com> |
2034 | ||
2035 | * pt.c (tsubst_pack_expansion): Sorry rather than abort | |
2036 | on __integer_pack as subexpression of pattern. | |
2037 | ||
b46b715d JM |
2038 | 2018-05-18 Jason Merrill <jason@redhat.com> |
2039 | ||
2040 | PR c++/58407 - deprecated implicit copy ops. | |
2041 | * call.c (build_over_call): Warn about deprecated trivial fns. | |
2042 | * class.c (classtype_has_user_copy_or_dtor): New. | |
2043 | (type_build_ctor_call): Check TREE_DEPRECATED. | |
2044 | (type_build_dtor_call): Likewise. | |
2045 | * decl2.c (cp_warn_deprecated_use): Move from tree.c. | |
2046 | Add checks. Return bool. Handle -Wdeprecated-copy. | |
2047 | (mark_used): Use it. | |
2048 | * decl.c (grokdeclarator): Remove redundant checks. | |
2049 | * typeck2.c (build_functional_cast): Likewise. | |
2050 | * method.c (lazily_declare_fn): Mark deprecated copy ops. | |
2051 | * init.c (build_aggr_init): Only set TREE_USED if there are | |
2052 | side-effects. | |
2053 | ||
950ad0ba CP |
2054 | 2018-05-18 Cesar Philippidis <cesar@codesourcery.com> |
2055 | ||
2056 | PR c++/85782 | |
2057 | * cp-gimplify.c (cp_genericize_r): Call genericize_omp_for_stmt for | |
2058 | OACC_LOOPs. | |
2059 | ||
c566cc9f RS |
2060 | 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org> |
2061 | ||
2062 | * constexpr.c (cxx_eval_constant_expression): Remove FMA_EXPR handling. | |
2063 | (potential_constant_expression_1): Likewise. | |
2064 | ||
0932d398 MP |
2065 | 2018-05-16 Marek Polacek <polacek@redhat.com> |
2066 | ||
2067 | PR c++/85363 | |
2068 | * call.c (set_flags_from_callee): Handle AGGR_INIT_EXPRs too. | |
2069 | * tree.c (bot_manip): Call set_flags_from_callee for | |
2070 | AGGR_INIT_EXPRs too. | |
2071 | ||
30a52a6d JM |
2072 | 2018-05-15 Jason Merrill <jason@redhat.com> |
2073 | ||
e4a14896 JM |
2074 | * cp-tree.h (cp_expr): Remove copy constructor. |
2075 | * mangle.c (struct releasing_vec): Declare copy constructor. | |
2076 | ||
dc5ca6c8 JM |
2077 | * constexpr.c (cxx_eval_vec_init_1): Pass tf_none if ctx->quiet. |
2078 | ||
30a52a6d JM |
2079 | PR c++/64372 - CWG 1560, gratuitous lvalue-rvalue conversion in ?: |
2080 | * call.c (build_conditional_expr_1): Don't force_rvalue when one arm | |
2081 | is a throw-expression. | |
2082 | ||
5f150326 PC |
2083 | 2018-05-15 Paolo Carlini <paolo.carlini@oracle.com> |
2084 | ||
2085 | * cp-tree.h (DECL_MAYBE_IN_CHARGE_CDTOR_P): New. | |
2086 | (FOR_EACH_CLONE): Update. | |
2087 | * decl.c (grokdeclarator): Use it. | |
2088 | * decl2.c (vague_linkage_p): Likewise. | |
2089 | * mangle.c (mangle_decl): Likewise. | |
2090 | * method.c (lazily_declare_fn): Likewise. | |
2091 | * optimize.c (can_alias_cdtor, maybe_clone_body): Likewise. | |
2092 | * repo.c (repo_emit_p): Likewise. | |
2093 | * tree.c (decl_linkage): Likewise. | |
2094 | ||
403f22aa JM |
2095 | 2018-05-14 Jason Merrill <jason@redhat.com> |
2096 | ||
2097 | Handle TYPE_HAS_LATE_RETURN_TYPE like ref-qualifier and eh spec. | |
2098 | * tree.c (build_cp_fntype_variant): New. | |
2099 | (build_ref_qualified_type, build_exception_variant) | |
2100 | (strip_typedefs, cxx_copy_lang_qualifiers): Use it. | |
2101 | (cxx_type_hash_eq, cp_check_qualified_type): Check | |
2102 | TYPE_HAS_LATE_RETURN_TYPE. | |
2103 | (cp_build_type_attribute_variant): Check cxx_type_hash_eq. | |
2104 | (cp_build_qualified_type_real): No need to preserve C++ qualifiers. | |
2105 | * class.c (build_clone): Use cxx_copy_lang_qualifiers. | |
2106 | (adjust_clone_args): Likewise. | |
2107 | * decl.c (grokfndecl): Add late_return_type_p parameter. Use | |
2108 | build_cp_fntype_variant. | |
2109 | (grokdeclarator): Pass late_return_type_p to grokfndecl. | |
2110 | (check_function_type): Use cxx_copy_lang_qualifiers. | |
2111 | (static_fn_type): Use cxx_copy_lang_qualifiers. | |
2112 | * decl2.c (build_memfn_type, maybe_retrofit_in_chrg) | |
2113 | (cp_reconstruct_complex_type, coerce_new_type, coerce_delete_type) | |
2114 | (change_return_type): Use cxx_copy_lang_qualifiers. | |
2115 | * mangle.c (write_type): Use cxx_copy_lang_qualifiers. | |
2116 | * parser.c (cp_parser_lambda_declarator_opt): Represent an explicit | |
2117 | return type on the declarator like a normal trailing return type. | |
2118 | * pt.c (tsubst_function_type): Use build_cp_fntype_variant. | |
2119 | (copy_default_args_to_explicit_spec): Use cxx_copy_lang_qualifiers. | |
2120 | * typeck.c (merge_types): Use build_cp_fntype_variant. | |
2121 | ||
9f613f06 PC |
2122 | 2018-05-14 Paolo Carlini <paolo.carlini@oracle.com> |
2123 | ||
2124 | * cp-tree.h (TYPE_REF_P): New. | |
2125 | (TYPE_OBJ_P, TYPE_REF_OBJ_P, TYPE_REFFN_P): Update. | |
2126 | * call.c (build_list_conv, build_aggr_conv, standard_conversion, | |
2127 | direct_reference_binding, reference_binding, implicit_conversion, | |
2128 | add_builtin_candidate, build_user_type_conversion_1, build_op_call_1, | |
2129 | build_new_op_1, build_x_va_arg, conv_binds_ref_to_prvalue, | |
2130 | build_over_call, perform_implicit_conversion_flags, | |
2131 | extend_ref_init_temps, type_has_extended_temps): Use it. | |
2132 | * class.c (one_inheriting_sig, check_field_decls, | |
2133 | check_bases_and_members, find_flexarrays, finish_struct, | |
2134 | fixed_type_or_null): Likewise. | |
2135 | * constexpr.c (literal_type_p, cxx_bind_parameters_in_call, | |
2136 | non_const_var_error, cxx_eval_constant_expression, | |
2137 | potential_constant_expression_1): Likewise. | |
2138 | * cp-gimplify.c (omp_var_to_track, omp_cxx_notice_variable, | |
2139 | cp_genericize_r, cxx_omp_privatize_by_reference, | |
2140 | cxx_omp_const_qual_no_mutable, cxx_omp_finish_clause, | |
2141 | cp_fold_maybe_rvalue): Likewise. | |
2142 | * cp-ubsan.c (cp_ubsan_maybe_instrument_downcast): Likewise. | |
2143 | * cvt.c (build_up_reference, convert_to_reference, | |
2144 | convert_from_reference, convert_to_void, noexcept_conv_p, | |
2145 | fnptr_conv_p): Likewise. | |
2146 | * decl.c (poplevel, check_for_uninitialized_const_var, | |
2147 | check_initializer, initialize_local_var, cp_finish_decl, | |
2148 | get_tuple_decomp_init, cp_finish_decomp, grokdeclarator, copy_fn_p, | |
2149 | move_signature_fn_p, grok_op_properties, finish_function): Likewise. | |
2150 | * decl2.c (grok_array_decl, cp_reconstruct_complex_type, | |
2151 | decl_maybe_constant_var_p): Likewise. | |
2152 | * error.c (dump_type_prefix, dump_expr): Likewise. | |
2153 | * except.c (initialize_handler_parm, complete_ptr_ref_or_void_ptr_p, | |
2154 | is_admissible_throw_operand_or_catch_parameter): Likewise. | |
2155 | * expr.c (mark_use): Likewise. | |
2156 | * init.c (build_zero_init_1, build_value_init_noctor, | |
2157 | perform_member_init, diagnose_uninitialized_cst_or_ref_member_1, | |
2158 | build_new, build_delete): Likewise. | |
2159 | * lambda.c (build_lambda_object): Likewise. | |
2160 | * mangle.c (write_expression, write_template_arg): Likewise. | |
2161 | * method.c (forward_parm, do_build_copy_constructor, | |
2162 | do_build_copy_assign, build_stub_object, constructible_expr, | |
2163 | walk_field_subobs): Likewise. | |
2164 | * parser.c (cp_parser_omp_for_loop_init, | |
2165 | cp_parser_omp_declare_reduction_exprs, | |
2166 | cp_parser_omp_declare_reduction): Likewise. | |
2167 | * pt.c (convert_nontype_argument_function, convert_nontype_argument, | |
2168 | convert_template_argument, tsubst_pack_expansion, | |
2169 | tsubst_function_decl, tsubst_decl, tsubst, tsubst_copy_and_build, | |
2170 | maybe_adjust_types_for_deduction, check_cv_quals_for_unify, unify, | |
2171 | more_specialized_fn, invalid_nontype_parm_type_p, dependent_type_p_r, | |
2172 | value_dependent_expression_p, build_deduction_guide): Likewise. | |
2173 | * semantics.c (finish_handler_parms, finish_non_static_data_member, | |
2174 | finish_compound_literal, omp_privatize_field, | |
2175 | handle_omp_array_sections_1, handle_omp_array_sections, | |
2176 | cp_check_omp_declare_reduction, finish_omp_reduction_clause, | |
2177 | finish_omp_declare_simd_methods, cp_finish_omp_clause_depend_sink, | |
2178 | finish_omp_clauses, finish_decltype_type, capture_decltype, | |
2179 | finish_builtin_launder): Likewise. | |
2180 | * tree.c (lvalue_kind, cp_build_reference_type, move, | |
2181 | cp_build_qualified_type_real, stabilize_expr, stabilize_init): Likewise. | |
2182 | * typeck.c (cxx_safe_arg_type_equiv_p, build_class_member_access_expr, | |
2183 | cp_build_indirect_ref_1, convert_arguments, warn_for_null_address, | |
2184 | cp_build_addr_expr_1, maybe_warn_about_useless_cast, | |
2185 | build_static_cast_1, build_static_cast, build_reinterpret_cast_1, | |
2186 | build_const_cast_1, cp_build_c_cast, cp_build_modify_expr, | |
2187 | convert_for_initialization, | |
2188 | maybe_warn_about_returning_address_of_local, check_return_expr, | |
2189 | cp_type_quals, casts_away_constness, non_reference): Likewise. | |
2190 | * typeck2.c (cxx_readonly_error, store_init_value, | |
2191 | process_init_constructor_record, build_x_arrow, build_functional_cast, | |
2192 | add_exception_specifier): Likewise. | |
2193 | ||
403962ea JM |
2194 | 2018-05-14 Jason Merrill <jason@redhat.com> |
2195 | ||
2196 | * pt.c (tsubst) [ARRAY_TYPE]: Check valid_array_size_p. | |
2197 | (tsubst_copy_and_build) [NEW_EXPR]: Clear in_decl. | |
2198 | ||
1c9ee609 JJ |
2199 | 2018-05-11 Jakub Jelinek <jakub@redhat.com> |
2200 | ||
2201 | PR c/85696 | |
2202 | * cp-tree.h (cxx_omp_predetermined_sharing_1): New prototype. | |
2203 | * cp-gimplify.c (cxx_omp_predetermined_sharing): New wrapper around | |
2204 | cxx_omp_predetermined_sharing_1. Rename old function to ... | |
2205 | (cxx_omp_predetermined_sharing_1): ... this. | |
2206 | * semantics.c (finish_omp_clauses): Use cxx_omp_predetermined_sharing_1 | |
2207 | instead of cxx_omp_predetermined_sharing. | |
2208 | ||
683be2f7 JM |
2209 | 2018-05-10 Jason Merrill <jason@redhat.com> |
2210 | ||
2211 | * decl.c (cp_finish_decl): Don't instantiate auto variable. | |
2212 | (check_static_variable_definition): Allow auto. | |
2213 | * constexpr.c (ensure_literal_type_for_constexpr_object): Likewise. | |
fa141e9b | 2214 | |
b947b54c JM |
2215 | * cp-tree.h (DECL_CONSTRUCTOR_P): Use DECL_CXX_CONSTRUCTOR_P. |
2216 | (DECL_DESTRUCTOR_P): Use DECL_CXX_DESTRUCTOR_P. | |
2217 | ||
f8e94a01 JM |
2218 | Core issue 2310 - conversion to base of incomplete type. |
2219 | * class.c (build_base_path): Check COMPLETE_TYPE_P for source type. | |
2220 | ||
d86d6e27 JM |
2221 | CWG 2267 - list-initialization of reference temporary |
2222 | * call.c (reference_binding): List-initializing a reference | |
2223 | temporary is copy-list-initialization. | |
2224 | ||
2c9c6ada JM |
2225 | * parser.c (cp_parser_class_head): Use num_template_headers_for_class. |
2226 | ||
5d7b4c6f JM |
2227 | * pt.c (instantiate_decl): Make sure we aren't trying to do a nested |
2228 | instantiation in template context. | |
2229 | ||
1e6da0c9 JM |
2230 | * class.c (vbase_has_user_provided_move_assign): Use |
2231 | user_provided_p. | |
2232 | ||
86cf1084 JM |
2233 | * lambda.c (lambda_expr_this_capture): Improve logic. |
2234 | ||
fa141e9b JM |
2235 | * decl.c (make_typename_type): s/parameters/arguments/. |
2236 | * parser.c (cp_parser_nested_name_specifier_opt): Likewise. | |
2237 | * pt.c (make_pack_expansion): Correct error message. | |
2238 | ||
79e7b1fe JJ |
2239 | 2018-05-10 Jakub Jelinek <jakub@redhat.com> |
2240 | ||
2241 | PR c++/85662 | |
2242 | * cp-gimplify.c (cp_fold): Use fold_offsetof rather than | |
2243 | fold_offsetof_1, pass TREE_TYPE (x) as TYPE to it and drop the | |
2244 | fold_convert. | |
2245 | ||
86c12f76 EB |
2246 | 2018-05-10 Eric Botcazou <ebotcazou@adacore.com> |
2247 | ||
2248 | PR c++/85400 | |
2249 | * decl2.c (adjust_var_decl_tls_model): New static function. | |
2250 | (comdat_linkage): Call it on a variable. | |
2251 | (maybe_make_one_only): Likewise. | |
2252 | ||
1a9f989a PC |
2253 | 2018-05-09 Paolo Carlini <paolo.carlini@oracle.com> |
2254 | ||
2255 | PR c++/85713 | |
2256 | Revert: | |
2257 | 2018-05-08 Paolo Carlini <paolo.carlini@oracle.com> | |
2258 | ||
2259 | PR c++/84588 | |
2260 | * parser.c (cp_parser_parameter_declaration_list): When the | |
2261 | entire parameter-declaration-list is erroneous maybe call | |
2262 | abort_fully_implicit_template. | |
2263 | ||
655b16da JM |
2264 | 2018-05-08 Jason Merrill <jason@redhat.com> |
2265 | ||
2266 | PR c++/85706 - class deduction under decltype | |
2267 | * pt.c (for_each_template_parm_r): Handle DECLTYPE_TYPE. Clear | |
2268 | *walk_subtrees whether or not we walked into the operand. | |
2269 | (type_uses_auto): Only look at deduced contexts. | |
2270 | ||
9f171abd PC |
2271 | 2018-05-08 Paolo Carlini <paolo.carlini@oracle.com> |
2272 | ||
2273 | PR c++/84588 | |
2274 | * parser.c (cp_parser_parameter_declaration_list): When the | |
2275 | entire parameter-declaration-list is erroneous maybe call | |
2276 | abort_fully_implicit_template. | |
2277 | ||
0e45c664 MP |
2278 | 2018-05-08 Marek Polacek <polacek@redhat.com> |
2279 | ||
2280 | PR c++/85695 | |
2281 | * semantics.c (finish_if_stmt_cond): See through typedefs. | |
2282 | ||
6b83a3c6 JM |
2283 | 2018-05-07 Jason Merrill <jason@redhat.com> |
2284 | ||
2285 | PR c++/85646 - lambda visibility. | |
2286 | * decl2.c (determine_visibility): Don't mess with template arguments | |
2287 | from the containing scope. | |
2288 | (vague_linkage_p): Check DECL_ABSTRACT_P before looking at a 'tor | |
2289 | thunk. | |
2290 | ||
ee336e84 NS |
2291 | 2018-05-07 Nathan Sidwell <nathan@acm.org> |
2292 | ||
2293 | Remove fno-for-scope | |
2294 | * cp-tree.h (DECL_ERROR_REPORTED, DECL_DEAD_FOR_LOCAL) | |
2295 | (DECL_HAS_SHADOWED_FOR_VAR_P, DECL_SHADOWED_FOR_VAR) | |
2296 | (SET_DECL_SHADOWED_FOR_VAR): Delete. | |
2297 | (decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert) | |
2298 | (check_for_out_of_scope_variable, init_shadowed_var_for_decl): | |
2299 | Don't declare. | |
2300 | * name-lookup.h (struct cp_binding_level): Remove | |
2301 | dead_vars_from_for field. | |
2302 | * cp-lang.c (cp_init_ts): Delete. | |
2303 | (LANG_HOOKS_INIT_TS): Override to cp_common_init_ts. | |
2304 | * cp-objcp-common.c (shadowed_var_for_decl): Delete. | |
2305 | (decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert) | |
2306 | (init_shadowed_var_for_decl): Delete. | |
2307 | * decl.c (poplevel): Remove shadowed for var handling. | |
2308 | (cxx_init_decl_processing): Remove -ffor-scope deprecation. | |
2309 | * name-lookup.c (find_local_binding): Remove shadowed for var | |
2310 | handling. | |
2311 | (check_local_shadow): Likewise. | |
2312 | (check_for_out_of_scope_variable): Delete. | |
2313 | * parser.c (cp_parser_primary_expression): Remove shadowed for var | |
2314 | handling. | |
2315 | * pt.c (tsubst_decl): Remove DECL_DEAD_FOR_LOCAL setting. | |
2316 | * semantics.c (begin_for_scope): Always have a scope. | |
2317 | (begin_for_stmt, finish_for_stmt): Remove ARM-for scope handling. | |
2318 | (begin_range_for_stmt, finish_id_expression): Likewise. | |
2319 | ||
1d473b8b JM |
2320 | 2018-05-07 Jason Merrill <jason@redhat.com> |
2321 | ||
2322 | PR c++/85618 - ICE with initialized VLA. | |
2323 | * tree.c (vla_type_p): New. | |
2324 | * typeck2.c (store_init_value, split_nonconstant_init_1): Check it | |
2325 | rather than array_of_runtime_bound_p. | |
2326 | ||
39d8c7d2 PC |
2327 | 2018-05-05 Paolo Carlini <paolo.carlini@oracle.com> |
2328 | ||
2329 | * cvt.c (ocp_convert): Early handle the special case of a | |
2330 | null_ptr_cst_p expr converted to a NULLPTR_TYPE_P type. | |
2331 | ||
9cbc7d65 JM |
2332 | 2018-05-03 Jason Merrill <jason@redhat.com> |
2333 | ||
2334 | PR c++/85600 - virtual delete failure. | |
2335 | * init.c (build_delete): Always save_expr when deleting. | |
2336 | ||
6c072e21 NS |
2337 | 2018-05-03 Nathan Sidwell <nathan@acm.org> |
2338 | ||
2339 | * decl.c (cxx_init_decl_processing): Remove flag_friend_injection. | |
2340 | * name-lookup.c (do_pushdecl): Likewise. | |
2341 | ||
006fbbe9 PC |
2342 | 2018-05-02 Paolo Carlini <paolo.carlini@oracle.com> |
2343 | Jason Merrill <jason@redhat.com> | |
2344 | ||
2345 | PR c++/68374 | |
2346 | * name-lookup.c (check_local_shadow): Don't handle static old | |
2347 | declarations in the block handling locals shadowing locals. | |
2348 | ||
1a142d6e JM |
2349 | 2018-05-01 Jason Merrill <jason@redhat.com> |
2350 | ||
2351 | PR c++/85587 - error with scoped enum in template. | |
2352 | * semantics.c (finish_qualified_id_expr): Don't return an | |
2353 | unqualified IDENTIFIER_NODE. | |
2354 | ||
94b2a1e5 JM |
2355 | 2018-04-30 Jason Merrill <jason@redhat.com> |
2356 | ||
38dff921 JM |
2357 | PR c++/85580 - extern "C" and local variables |
2358 | * name-lookup.c (check_extern_c_conflict): Ignore local decls. | |
2359 | ||
fe43c635 JM |
2360 | PR c++/84701 - unsigned typeof. |
2361 | * decl.c (grokdeclarator): Overhaul diagnostics for invalid use | |
2362 | of long/short/signed/unsigned. | |
2363 | ||
f026530a JM |
2364 | PR c++/85305 - pack in lambda init-capture. |
2365 | * parser.c (cp_parser_initializer): Add subexpression_p parm; don't | |
2366 | check_for_bare_parameter_packs in a subexpression. | |
2367 | (cp_parser_lambda_introducer): Use it. | |
2368 | ||
cdc18417 JM |
2369 | PR c++/61982 - dead stores to destroyed objects. |
2370 | * call.c (build_trivial_dtor_call): New, assigns a clobber. | |
2371 | (build_over_call, build_special_member_call): Use it. | |
2372 | * cp-tree.h: Declare it. | |
2373 | * init.c (build_delete): Remove trivial path. | |
2374 | ||
4d20f490 JM |
2375 | * init.c (build_dtor_call): Use build_special_member_call. |
2376 | (build_delete): Remove redundant uses of save_addr. | |
2377 | ||
94b2a1e5 JM |
2378 | * decl.c (build_clobber_this): Use build_clobber. |
2379 | ||
b2b1ea34 JJ |
2380 | 2018-04-27 Jakub Jelinek <jakub@redhat.com> |
2381 | ||
2382 | PR c++/85553 | |
2383 | * init.c (build_zero_init_1): For zero initialization of | |
2384 | NULLPTR_TYPE_P type use build_int_cst directly. | |
2385 | ||
66bd3086 DM |
2386 | 2018-04-27 David Malcolm <dmalcolm@redhat.com> |
2387 | ||
2388 | PR c++/85515 | |
2389 | * name-lookup.c (consider_binding_level): Skip compiler-generated | |
2390 | variables. | |
2391 | * search.c (lookup_field_fuzzy_info::fuzzy_lookup_field): Flatten | |
2392 | nested if statements into a series of rejection tests. Reject | |
2393 | lambda-ignored entities as suggestions. | |
2394 | ||
d760b068 JM |
2395 | 2018-04-27 Jason Merrill <jason@redhat.com> |
2396 | ||
2397 | * cvt.c (cp_fold_convert): Use convert_ptrmem. | |
2398 | * typeck.c (convert_ptrmem): Add a NOP even if no adjustment. | |
2399 | ||
a6e34898 PC |
2400 | 2018-04-27 Paolo Carlini <paolo.carlini@oracle.com> |
2401 | ||
2402 | PR c++/84691 | |
2403 | * decl.c (grokdeclarator): Clear friendp upon definition in local | |
2404 | class definition error. | |
2405 | ||
6d0e87b2 JM |
2406 | 2018-04-27 Jason Merrill <jason@redhat.com> |
2407 | ||
2408 | PR c++/85545 - ICE with noexcept PMF conversion. | |
2409 | * cvt.c (cp_fold_convert): Pass PMF CONSTRUCTORs to | |
2410 | build_ptrmemfunc. | |
2411 | * typeck.c (build_ptrmemfunc): Don't build a NOP_EXPR for zero | |
2412 | adjustment. | |
2413 | (build_ptrmemfunc_access_expr): Special-case CONSTRUCTORs. | |
2414 | ||
d4e15523 NS |
2415 | 2018-04-27 Nathan Sidwell <nathan@acm.org> |
2416 | ||
036b5ad1 NS |
2417 | * typeck.c (convert_ptrmem): Move local var decls to initialization. |
2418 | ||
d4e15523 NS |
2419 | * cp-tree.h (TEMPLATE_INFO): Fix comments. |
2420 | (TI_PENDING_TEMPLATE_FLAG): Check TEMPLATE_INFO. | |
2421 | (NON_DEFAULT_TEMPLATE_ARG_COUNT): Wrap line. | |
2422 | (dump, print_other_binding_stacks): Remove declarations. | |
2423 | * name-lookup.c (print_other_binding_stack): Make static. | |
2424 | * pt.c (build_template_decl): Make static. | |
2425 | ||
128d29a5 JM |
2426 | 2018-04-26 Jason Merrill <jason@redhat.com> |
2427 | ||
2428 | PR c++/85545 - ICE with noexcept PMF conversion. | |
2429 | * cvt.c (cp_fold_convert): Handle PMF CONSTRUCTORs directly. | |
2430 | ||
7d75ea04 JJ |
2431 | 2018-04-25 Nathan Sidwell <nathan@acm.org> |
2432 | ||
2433 | PR c++/85437 | |
2434 | PR c++/49171 | |
2435 | * cp-tree.h (REINTERPRET_CAST_P): New. | |
2436 | * constexpr.c (cxx_eval_constant_expression) <case NOP_EXPR>: | |
2437 | Reject REINTERPET_CAST_P conversions. Use cplus_expand_constant | |
2438 | for non-trivial PTRMEM_CST cases. | |
2439 | * typeck.c (build_nop_reinterpret): New. | |
2440 | (build_reinterpret_cast_1): Use it. Set REINTERPRET_CAST_P on | |
2441 | NOP_EXPRs returned by cp_convert. | |
2442 | ||
aa2b1055 JM |
2443 | 2018-04-23 Jason Merrill <jason@redhat.com> |
2444 | ||
2445 | PR c++/69560 - wrong alignof(double) on x86. | |
2446 | CWG 1879 - Inadequate definition of alignment requirement. | |
2447 | * cp-tree.h (ALIGNOF_EXPR_STD_P): New. | |
2448 | * typeck.c (cxx_sizeof_or_alignof_type): Add std_alignof parm. | |
2449 | (cxx_sizeof_expr, cxx_sizeof_nowarn, cxx_alignas_expr) | |
2450 | (cxx_alignof_expr): Pass it. | |
2451 | * parser.c (cp_parser_unary_expression): Pass it. | |
2452 | * pt.c (tsubst_copy): Copy it. | |
2453 | (tsubst_copy_and_build): Pass it. | |
2454 | * decl.c (fold_sizeof_expr): Pass it. | |
2455 | ||
53de8a7e JJ |
2456 | 2018-04-23 Jakub Jelinek <jakub@redhat.com> |
2457 | Jason Merrill <jason@redhat.com> | |
2458 | ||
2459 | PR c++/85470 - wrong error with static data member. | |
2460 | * decl.c (check_initializer): Check DECL_INITIALIZED_IN_CLASS_P. | |
2461 | * typeck2.c (store_init_value): Likewise. | |
2462 | ||
e00e6276 JJ |
2463 | 2018-04-20 Jakub Jelinek <jakub@redhat.com> |
2464 | ||
2465 | PR c++/85462 | |
2466 | * cp-tree.h (tinst_level): Remove in_system_header_p member, | |
2467 | change refcount member from unsigned char to unsigned short, | |
2468 | add refcount_infinity static data member, adjust comments. | |
2469 | * pt.c (tinst_level::refcount_infinity): Define. | |
2470 | (inc_refcount_use): Remove assert, don't increment if refcount | |
2471 | is already refcount_infinity, adjust comment. | |
2472 | (dec_refcount_use): Remove assert, don't decrement if refcount | |
2473 | is refcount_infinity, adjust comment. | |
2474 | (push_tinst_level_loc): Formatting fix. | |
2475 | ||
f62a0ddd PC |
2476 | 2018-04-19 Paolo Carlini <paolo.carlini@oracle.com> |
2477 | ||
2478 | PR c++/84611 | |
2479 | * pt.c (lookup_template_class_1): Check pushtag return value for | |
2480 | error_mark_node. | |
2481 | ||
4f3fc301 AO |
2482 | 2018-04-19 Alexandre Oliva <aoliva@redhat.com> |
2483 | ||
2484 | PR c++/80290 | |
2485 | * cp-tree.h (tinst_level::free): Fix whitespace. | |
2486 | ||
c18a88c5 PC |
2487 | 2018-04-18 Paolo Carlini <paolo.carlini@oracle.com> |
2488 | ||
2489 | PR c++/84630 | |
2490 | * pt.c (tsubst_lambda_expr): Check begin_lambda_type return value | |
2491 | for error_mark_node. | |
2492 | ||
715dd933 JJ |
2493 | 2018-04-18 Jakub Jelinek <jakub@redhat.com> |
2494 | ||
2495 | PR c++/84463 | |
2496 | * typeck.c (cp_build_addr_expr_1): Move handling of offsetof-like | |
2497 | tricks from here to ... | |
2498 | * cp-gimplify.c (cp_fold) <case ADDR_EXPR>: ... here. Only use it | |
2499 | if INDIRECT_REF's operand is INTEGER_CST cast to pointer type. | |
2500 | ||
a56e2f69 AO |
2501 | 2018-04-18 Alexandre Oliva <aoliva@redhat.com> |
2502 | ||
2503 | PR c++/80290 | |
2504 | * cp-tree.h (struct tinst_level): Split decl into tldcl and | |
2505 | targs. Add private split_list_p, tree_list_p, and not_list_p | |
2506 | inline const predicates; to_list private member function | |
2507 | declaration; free public member function declaration; list_p, | |
2508 | get_node and maybe_get_node accessors, and refcount data | |
2509 | member. Narrow errors to unsigned short. | |
2510 | * error.c (print_instantiation_full_context): Use new | |
2511 | accessors. | |
2512 | (print_instantiation_partial_context_line): Likewise. Drop | |
2513 | const from tinst_level-typed parameter. | |
2514 | * mangle.c (mangle_decl_string): Likewise. | |
2515 | * pt.c (freelist): New template class. | |
2516 | (tree_list_freelist_head): New var. | |
2517 | (tree_list_freelist): New fn, along with specializations. | |
2518 | (tinst_level_freelist_head): New var. | |
2519 | (pending_template_freelist_head): Likewise. | |
2520 | (tinst_level_freelist, pending_template_freelist): New fns. | |
2521 | (tinst_level::to_list, tinst_level::free): Define. | |
2522 | (inc_refcount_use, dec_refcount_use): New fns for tinst_level. | |
2523 | (set_refcount_ptr): New template fn. | |
2524 | (add_pending_template): Adjust for refcounting, freelists and | |
2525 | new accessors. | |
2526 | (neglectable_inst_p): Take a NULL d as a non-DECL. | |
2527 | (limit_bad_template_recursion): Use new accessors. | |
2528 | (push_tinst_level): New overload to create the list. | |
2529 | (push_tinst_level_loc): Make it static, split decl into two | |
2530 | args, adjust tests and initialization to cope with split | |
2531 | lists, use freelist, adjust for refcounting. | |
2532 | (push_tinst_level_loc): New wrapper with the old interface. | |
2533 | (pop_tinst_level): Adjust for refcounting. | |
2534 | (record_last_problematic_instantiation): Likewise. | |
2535 | (reopen_tinst_level): Likewise. Use new accessors. | |
2536 | (instantiate_alias_template): Adjust for split list. | |
2537 | (fn_type_unification): Likewise. | |
2538 | (get_partial_spec_bindings): Likewise. | |
2539 | (instantiate_pending_templates): Use new accessors. Adjust | |
2540 | for refcount. Release pending_template to freelist. | |
2541 | (instantiating_current_function_p): Use new accessors. | |
2542 | ||
7c5b407f AO |
2543 | 2018-04-16 Alexandre Oliva <aoliva@redhat.com> |
2544 | ||
2545 | PR c++/85039 | |
2546 | * parser.c (cp_parser_builtin_offset): Reject type definitions. | |
2547 | * mangle.c (nested_anon_class_index): Avoid crash returning -1 | |
2548 | if we've seen errors. | |
2549 | ||
b0cc1e53 DM |
2550 | 2018-04-12 David Malcolm <dmalcolm@redhat.com> |
2551 | ||
2552 | PR c++/85385 | |
2553 | * name-lookup.c (macro_use_before_def::maybe_make): New function, | |
2554 | checking that the use is indeed before the definition. | |
2555 | (macro_use_before_def::macro_use_before_def): Make private. | |
2556 | (macro_use_before_def::~macro_use_before_def): Make private. Move | |
2557 | check for UNKNOWN_LOCATION to macro_use_before_def::maybe_make. | |
2558 | (lookup_name_fuzzy): Call macro_use_before_def::maybe_make rather | |
2559 | than using new directly. | |
2560 | ||
38f3a877 JM |
2561 | 2018-04-12 Jason Merrill <jason@redhat.com> |
2562 | ||
2563 | PR c++/85356 - ICE with pointer to member function. | |
2564 | * pt.c (maybe_instantiate_noexcept): Do instantiate in templates if | |
2565 | flag_noexcept_type. Build the new spec within the function context. | |
2566 | * except.c (build_noexcept_spec): Do get constant value in templates | |
2567 | if flag_noexcept_type. | |
2568 | * decl.c (check_redeclaration_exception_specification): Don't | |
2569 | instantiate noexcept on a dependent declaration. | |
2570 | ||
4930c53e MP |
2571 | 2018-04-12 Marek Polacek <polacek@redhat.com> |
2572 | ||
2573 | PR c++/85258 | |
2574 | * constexpr.c (reduced_constant_expression_p): Return false for null | |
2575 | trees. | |
2576 | ||
fe0604d3 MP |
2577 | 2018-04-11 Marek Polacek <polacek@redhat.com> |
2578 | ||
2579 | PR c++/85032 | |
2580 | * constexpr.c (potential_constant_expression_1): Consider conversions | |
2581 | from classes to literal types potentially constant. | |
2582 | ||
310e77fe PC |
2583 | 2018-04-10 Paolo Carlini <paolo.carlini@oracle.com> |
2584 | ||
2585 | PR c++/70808 | |
2586 | * init.c (build_zero_init_1): Handle NULLPTR_TYPE_P being true of | |
2587 | the type like TYPE_PTR_OR_PTRMEM_P. | |
2588 | ||
45d14461 JM |
2589 | 2018-04-10 Jason Merrill <jason@redhat.com> |
2590 | ||
2591 | PR debug/65821 - wrong location for main(). | |
2592 | * call.c (clear_location_r, convert_default_arg): Revert. | |
2593 | * tree.c (break_out_target_exprs): Add clear_location parm. | |
2594 | (struct bot_data): New. | |
2595 | (bot_manip): Clear location if requested. | |
2596 | * init.c (get_nsdmi): Pass clear_location. | |
2597 | ||
672c767b DM |
2598 | 2018-04-10 David Malcolm <dmalcolm@redhat.com> |
2599 | ||
2600 | PR c++/85110 | |
2601 | * call.c (get_fndecl_argument_location): Make non-static. | |
2602 | * cp-tree.h (get_fndecl_argument_location): New decl. | |
2603 | * typeck.c (convert_for_assignment): When complaining due to | |
2604 | conversions for an argument, show the location of the parameter | |
2605 | within the decl. | |
2606 | ||
7e6b73b1 JJ |
2607 | 2018-04-10 Jakub Jelinek <jakub@redhat.com> |
2608 | ||
2609 | PR c++/85312 - P0962 cleanup | |
2610 | * parser.c (cp_parser_perform_range_for_lookup): Remove unreachable | |
2611 | diagnostics. | |
2612 | ||
05c602a1 JM |
2613 | 2018-04-10 Jason Merrill <jason@redhat.com> |
2614 | ||
6e2446b6 JM |
2615 | PR debug/65821 - wrong location for main(). |
2616 | * call.c (clear_location_r): New. | |
2617 | (convert_default_arg): Use it. | |
2618 | * tree.c (bot_manip): Remove builtin_LINE/FILE handling. | |
2619 | ||
05c602a1 JM |
2620 | PR c++/85285 - ICE with flexible array after substitution. |
2621 | * pt.c (instantiate_class_template_1): Check for flexible array in | |
2622 | union. | |
2623 | ||
52912c91 PC |
2624 | 2018-04-09 Paolo Carlini <paolo.carlini@oracle.com> |
2625 | ||
2626 | PR c++/85227 | |
2627 | * decl.c (cp_finish_decomp): In a template, if the type is incomplete | |
2628 | issue a pedwarn and defer trying to do bindings. | |
2629 | ||
68a8efea JM |
2630 | 2018-04-09 Jason Merrill <jason@redhat.com> |
2631 | ||
06756ed9 JM |
2632 | PR c++/85279 - dump_expr doesn't understand decltype. |
2633 | * error.c (dump_expr): Handle DECLTYPE_TYPE. | |
2634 | ||
17434237 JM |
2635 | PR c++/85262 - ICE with redundant qualification on constructor. |
2636 | * call.c (build_new_method_call_1): Move make_args_non_dependent | |
2637 | after A::A() handling. | |
2638 | ||
e9f59cfa JM |
2639 | PR c++/85277 - ICE with invalid offsetof. |
2640 | * semantics.c (finish_offsetof): Avoid passing non-DECL to %qD. | |
2641 | Adjust -Winvalid-offsetof diagnostic to say conditionally supported. | |
2642 | ||
68a8efea JM |
2643 | PR c++/85264 - ICE with excess template-parameter-list. |
2644 | * parser.c (cp_parser_check_template_parameters): Add template_id_p | |
2645 | parameter. Don't allow an extra template header if true. | |
2646 | (cp_parser_class_head): Pass template_id_p. | |
2647 | (cp_parser_elaborated_type_specifier): Likewise. | |
2648 | (cp_parser_alias_declaration): Likewise. | |
2649 | (cp_parser_check_declarator_template_parameters): Likewise. | |
2650 | ||
6e4f1148 JJ |
2651 | 2018-04-09 Jakub Jelinek <jakub@redhat.com> |
2652 | ||
2653 | PR c++/85194 | |
2654 | * parser.c (cp_parser_simple_declaration): For structured bindings, | |
2655 | if *maybe_range_for_decl is NULL after parsing it, set it to | |
2656 | error_mark_node. | |
2657 | ||
13c60208 JM |
2658 | 2018-04-09 Jason Merrill <jason@redhat.com> |
2659 | ||
2660 | PR c++/85256 - ICE capturing pointer to VLA. | |
2661 | * lambda.c (add_capture): Distinguish between variable-size and | |
2662 | variably-modified types. | |
2663 | ||
96975b11 JM |
2664 | 2018-04-06 Jason Merrill <jason@redhat.com> |
2665 | ||
2666 | PR c++/85214 - ICE with alias, generic lambda, constexpr if. | |
2667 | * pt.c (extract_locals_r): Remember local typedefs. | |
2668 | ||
e1c7971b DM |
2669 | 2018-04-06 David Malcolm <dmalcolm@redhat.com> |
2670 | ||
2671 | PR c++/84269 | |
2672 | * name-lookup.c (struct std_name_hint): Move out of | |
2673 | get_std_name_hint; add field "min_dialect". | |
2674 | (get_std_name_hint): Add min_dialect values to all initializers. | |
2675 | Add <any>, <atomic>, <bitset>, <condition_variable>, <functional>, | |
2676 | <future>, <istream>, <iterator>, <ostream>, <mutex>, <optional>, | |
2677 | <shared_mutex>, <string_view>, <thread>, and <variant>. | |
2678 | Add fstream, ifstream, and ofstream to <fstream>. | |
2679 | Add istringstream, ostringstream, and stringstream to <sstream>. | |
2680 | Add basic_string to <string>. | |
2681 | Add tuple_element and tuple_size to <tuple>. | |
2682 | Add declval to <utility>. | |
2683 | Fix ordering of <queue> and <tuple>. | |
2684 | Return a std_name_hint, rather than a const char *. | |
2685 | (get_cxx_dialect_name): New function. | |
2686 | (maybe_suggest_missing_std_header): Detect names that aren't yet | |
2687 | available in the current dialect, and instead of suggesting a | |
2688 | missing #include, warn about the dialect. | |
2689 | ||
e83bc9d7 JJ |
2690 | 2018-04-06 Jakub Jelinek <jakub@redhat.com> |
2691 | ||
2692 | PR c++/85210 | |
2693 | * pt.c (tsubst_decomp_names): Return error_mark_node and assert | |
2694 | errorcount is set if tsubst doesn't return a VAR_DECL. | |
2695 | ||
cb731872 DM |
2696 | 2018-04-06 David Malcolm <dmalcolm@redhat.com> |
2697 | ||
2698 | PR c++/85021 | |
2699 | * name-lookup.c (using_directives_contain_std_p): New function. | |
2700 | (has_using_namespace_std_directive_p): New function. | |
2701 | (suggest_alternatives_for): Simplify if/else logic using early | |
2702 | returns. If no candidates were found, and there's a | |
2703 | "using namespace std;" directive, call | |
2704 | maybe_suggest_missing_std_header. | |
2705 | (maybe_suggest_missing_header): Split later part of the function | |
2706 | into.. | |
2707 | (maybe_suggest_missing_std_header): New. | |
2708 | ||
0c923157 JM |
2709 | 2018-04-06 Jason Merrill <jason@redhat.com> |
2710 | ||
a82f886a JM |
2711 | PR c++/85242 - ICE with class definition in template parm. |
2712 | * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): False if | |
2713 | processing_template_parmlist. | |
2714 | ||
0c923157 JM |
2715 | PR c++/85240 - LTO ICE with using of undeduced auto fn. |
2716 | * cp-gimplify.c (cp_genericize_r): Discard using of undeduced auto. | |
2717 | ||
a1afa75e JJ |
2718 | 2018-04-05 Jakub Jelinek <jakub@redhat.com> |
2719 | ||
86c9f54b JJ |
2720 | PR c++/85209 |
2721 | * pt.c (tsubst_decomp_names): Don't fail or ICE if DECL_CHAIN (decl3) | |
2722 | is not prev, if prev == decl. | |
2723 | ||
a1afa75e JJ |
2724 | PR c++/85208 |
2725 | * decl.c (start_decl): For DECL_DECOMPOSITION_P decls, don't call | |
2726 | maybe_apply_pragma_weak here... | |
2727 | (cp_maybe_mangle_decomp): ... but call it here instead. | |
2728 | ||
da0c07b2 JM |
2729 | 2018-04-05 Jason Merrill <jason@redhat.com> |
2730 | ||
d600a0ce JM |
2731 | PR c++/85136 - ICE with designated init in template. |
2732 | * decl.c (maybe_deduce_size_from_array_init): Handle dependent | |
2733 | designated initializer. | |
2734 | (check_array_designated_initializer): Update ce->index with the | |
2735 | constant value. | |
2736 | ||
da0c07b2 JM |
2737 | PR c++/83808 - ICE with VLA initialization. |
2738 | * typeck2.c (process_init_constructor_array): Don't require a VLA | |
2739 | initializer to have VLA type. | |
2740 | ||
61f84e25 PC |
2741 | 2018-04-05 Paolo Carlini <paolo.carlini@oracle.com> |
2742 | ||
2743 | PR c++/80956 | |
2744 | * call.c (convert_like_real): Fail gracefully for a broken | |
2745 | std::initializer_list, missing a definition. | |
2746 | ||
2747 | * name-lookup.c (do_pushtag): Tweak message, use %< and %>. | |
2748 | ||
3b4a12aa PC |
2749 | 2018-04-05 Paolo Carlini <paolo.carlini@oracle.com> |
2750 | ||
2751 | PR c++/84792 | |
2752 | * decl.c (grokdeclarator): Fix diagnostic about typedef name used | |
2753 | as nested-name-specifier, keep type and TREE_TYPE (decl) in sync. | |
2754 | ||
4cbe585c JM |
2755 | 2018-04-05 Jason Merrill <jason@redhat.com> |
2756 | ||
be9d76c5 JM |
2757 | PR c++/82152 - ICE with class deduction and inherited ctor. |
2758 | * pt.c (do_class_deduction): Ignore inherited ctors. | |
2759 | ||
68218b64 JM |
2760 | PR c++/84665 - ICE with array of empty class. |
2761 | * decl2.c (cp_check_const_attributes): Use fold_non_dependent_expr. | |
2762 | ||
4cbe585c JM |
2763 | PR c++/85228 - ICE with lambda in enumerator in template. |
2764 | * pt.c (bt_instantiate_type_proc): Don't assume | |
2765 | CLASSTYPE_TEMPLATE_INFO is non-null. | |
2766 | ||
9aee04a4 VV |
2767 | 2018-04-05 Ville Voutilainen <ville.voutilainen@gmail.com> |
2768 | ||
2769 | Implement P0969 | |
2770 | * decl.c (find_decomp_class_base): Check accessibility instead | |
2771 | of declared access, adjust diagnostic. | |
2772 | ||
0fb90182 VV |
2773 | 2018-04-05 Ville Voutilainen <ville.voutilainen@gmail.com> |
2774 | ||
2775 | Implement P0961 | |
2776 | * decl.c (get_tuple_decomp_init): Check the templatedness | |
2777 | of a member get. | |
2778 | ||
e99d77c9 JM |
2779 | 2018-04-05 Jason Merrill <jason@redhat.com> |
2780 | ||
2781 | PR c++/85200 - ICE with constexpr if in generic lambda. | |
2782 | * pt.c (extract_locals_r): Don't record the local specs of variables | |
2783 | declared within the pattern. | |
2784 | ||
44780b91 AO |
2785 | 2018-04-05 Alexandre Oliva <aoliva@redhat.com> |
2786 | ||
2787 | PR c++/84979 | |
2788 | * pt.c (check_auto_in_tmpl_args): New. | |
2789 | (tsubst_qualified_id): Use it to reject template args | |
2790 | referencing auto for non-type templates. | |
2791 | * parser.c (cp_parser_template_id): Likewise. | |
2792 | * cp-tree.h (check_auto_in_tmpl_args): Declare. | |
2793 | * typeck2.c (build_functional_cast): Report correct location | |
2794 | for invalid use of auto. | |
2795 | ||
0dd285f9 JM |
2796 | 2018-04-04 Jason Merrill <jason@redhat.com> |
2797 | ||
da0c8d97 JM |
2798 | PR c++/85215 - ICE with copy-init from conversion. |
2799 | * call.c (merge_conversion_sequences): Fix type of direct binding | |
2800 | sequence. | |
2801 | ||
a7ec7182 JM |
2802 | PR c++/84938 - ICE with division by ~-1. |
2803 | * call.c (set_up_extended_ref_temp): Call cp_fully_fold. | |
2804 | ||
0dd285f9 JM |
2805 | PR c++/84936 - ICE with unexpanded pack in mem-initializer. |
2806 | * parser.c (cp_parser_mem_initializer_list): Call | |
2807 | check_for_bare_parameter_packs. | |
2808 | ||
628a1534 JJ |
2809 | 2018-04-04 Jakub Jelinek <jakub@redhat.com> |
2810 | ||
2ff7172a JJ |
2811 | PR inline-asm/85172 |
2812 | * constexpr.c (cxx_eval_builtin_function_call): For calls to | |
2813 | builtin_valid_in_constant_expr_p functions, don't call | |
2814 | cxx_eval_constant_expression if argument is not | |
2815 | potential_constant_expression. | |
2816 | ||
628a1534 JJ |
2817 | PR c++/85146 |
2818 | * cp-tree.h (calculate_bases, calculate_direct_bases): Add complain | |
2819 | argument. | |
2820 | * semantics.c (calculate_bases): Add complain argument. Use | |
2821 | complete_type_or_maybe_complain instead of just complete_type and | |
2822 | return an empty vector if it fails. Move make_tree_vector () call | |
2823 | after early return. Formatting fixes. | |
2824 | (calculate_direct_bases): Likewise. Call release_tree_vector at the | |
2825 | end. | |
2826 | (dfs_calculate_bases_post, calculate_bases_helper): Formatting fixes. | |
2827 | * pt.c (tsubst_pack_expansion): Adjust calculate_bases and | |
2828 | calculate_direct_bases callers, formatting fixes. | |
2829 | ||
239209c4 JM |
2830 | 2018-04-04 Jason Merrill <jason@redhat.com> |
2831 | ||
001db6cf JM |
2832 | PR c++/85006 - -fconcepts ICE with A<auto...> return type |
2833 | * pt.c (tsubst_pack_expansion): Allow unsubstituted auto pack. | |
2834 | ||
8859913e JM |
2835 | PR c++/85200 - ICE with constexpr if in generic lambda. |
2836 | * tree.c (cp_walk_subtrees): Walk into DECL_EXPR in templates. | |
2837 | ||
3dba92a9 JM |
2838 | PR c++/84221 - bogus -Wunused with attribute and template. |
2839 | * decl2.c (is_late_template_attribute): Handle unused and used | |
2840 | normally on non-TYPE_DECL. | |
2841 | ||
600583ab JM |
2842 | PR c++/85135 - ICE with omitted template arguments. |
2843 | * decl.c (grokdeclarator): Catch deduced class type in trailing | |
2844 | return type. | |
2845 | ||
6173fb51 JM |
2846 | PR c++/85133 - ICE with missing concept initializer. |
2847 | * decl.c (cp_finish_decl): If a concept initializer is missing, use | |
2848 | true. | |
2849 | ||
bd40bc8e JM |
2850 | PR c++/85118 - wrong error with generic lambda and std::bind. |
2851 | * call.c (add_template_conv_candidate): Disable if there are any | |
2852 | call operators. | |
2853 | ||
7447f1d7 JM |
2854 | PR c++/85141 - ICE with compound assignment and static member fn. |
2855 | * typeck.c (cp_build_modify_expr): Call decay_conversion for RHS of | |
2856 | compound assignment. | |
2857 | ||
239209c4 JM |
2858 | PR c++/85148 - ICE with 'this' in array NSDMI. |
2859 | * tree.c (replace_placeholders_r): Use handled_component_p. | |
2860 | ||
1229c56c VV |
2861 | 2018-04-04 Ville Voutilainen <ville.voutilainen@gmail.com> |
2862 | ||
2863 | PR c++/65923 | |
2864 | * decl.c (grokfndecl): Handle standard UDL diagnostics here.. | |
2865 | * parser.c (cp_parser_unqualified_id): ..not here. | |
2866 | ||
24d21a0b AO |
2867 | 2018-04-04 Alexandre Oliva <aoliva@redhat.com> |
2868 | ||
2869 | PR c++/84943 | |
2870 | * typeck.c (cp_build_addr_expr_1): Mark FUNCTION_DECL as | |
2871 | used. | |
2872 | * decl2.c (mark_used): Return without effects if tf_conv. | |
2873 | ||
fe736ffd JM |
2874 | 2018-04-03 Jason Merrill <jason@redhat.com> |
2875 | ||
8d0d49f8 JM |
2876 | PR c++/85092 - C++17 ICE with unused list constructor. |
2877 | * call.c (conv_binds_ref_to_prvalue): Also count ck_identity | |
2878 | from a TARGET_EXPR. | |
2879 | ||
fe736ffd JM |
2880 | PR c++/85113 - ICE with constexpr and __builtin_constant_p. |
2881 | * constexpr.c (cxx_eval_builtin_function_call): Only defer | |
2882 | __builtin_constant_p if ctx->quiet. | |
2883 | ||
e52c093a PC |
2884 | 2018-04-03 Paolo Carlini <paolo.carlini@oracle.com> |
2885 | ||
2886 | PR c++/84768 | |
2887 | * pt.c (rewrite_template_parm): If the first argument is | |
2888 | error_mark_node return it immediately. | |
2889 | (build_deduction_guide): Check the return value of the | |
2890 | latter for error_mark_node. | |
2891 | (do_class_deduction): Check the return value of the latter. | |
2892 | ||
3f759575 JM |
2893 | 2018-04-03 Jason Merrill <jason@redhat.com> |
2894 | ||
83afe9b5 JM |
2895 | * semantics.c (finish_if_stmt_cond): Use |
2896 | instantiation_dependent_expression_p. | |
2897 | ||
1456e764 JM |
2898 | PR c++/85149 - generic lambda and constexpr if. |
2899 | * pt.c (build_extra_args, add_extra_args): Split from | |
2900 | tsubst_pack_expansion. | |
2901 | (tsubst_expr) [IF_STMT]: Use them. | |
2902 | * cp-tree.h (IF_STMT_EXTRA_ARGS): New. | |
2903 | ||
3f759575 JM |
2904 | * typeck.c (merge_types): Limit matching attribute shortcut to |
2905 | the default case. | |
2906 | ||
b0493acb JJ |
2907 | 2018-04-03 Jakub Jelinek <jakub@redhat.com> |
2908 | ||
92c59b74 JJ |
2909 | PR c++/85147 |
2910 | * pt.c (fixed_parameter_pack_p_1): Punt if parm is error_mark_node. | |
2911 | ||
93e544c1 JJ |
2912 | PR c++/85140 |
2913 | * name-lookup.c (handle_namespace_attrs): Return early if attributes | |
2914 | is error_mark_node. | |
2915 | ||
b0493acb JJ |
2916 | PR c++/85134 |
2917 | * decl.c (cp_finish_decl): If ensure_literal_type_for_constexpr_object | |
2918 | fails, after clearing DECL_DECLARED_CONSTEXPR_P don't return early, | |
2919 | instead for static data members clear init and set DECL_EXTERNAL. | |
2920 | ||
82a926bf JM |
2921 | 2018-04-02 Jason Merrill <jason@redhat.com> |
2922 | ||
2923 | PR c++/64095 - auto... parameter pack. | |
2924 | * parser.c (cp_parser_parameter_declaration): Handle turning autos | |
2925 | into packs here. | |
2926 | (cp_parser_parameter_declaration_list): Not here. | |
2927 | ||
fc8b6741 AO |
2928 | 2018-03-31 Alexandre Oliva <aoliva@redhat.com> |
2929 | ||
2930 | PR c++/85027 | |
2931 | * class.c (instantiate_type): Peel off SAVE_EXPR before | |
2932 | BASELINK. | |
2933 | ||
6d92f131 JM |
2934 | 2018-03-30 Jason Merrill <jason@redhat.com> |
2935 | ||
2936 | * typeck2.c (process_init_constructor_record): Use | |
2937 | init_list_type_node for the CONSTRUCTOR around an anonymous union | |
2938 | designated initializer. | |
2939 | ||
9d620422 JJ |
2940 | 2018-03-30 Jakub Jelinek <jakub@redhat.com> |
2941 | ||
2942 | PR c++/84791 | |
2943 | * semantics.c (finish_omp_reduction_clause): If | |
2944 | OMP_CLAUSE_REDUCTION_PLACEHOLDER is error_mark_node, return true | |
2945 | even if processing_template_decl. | |
2946 | ||
62e98ef1 DM |
2947 | 2018-03-29 David Malcolm <dmalcolm@redhat.com> |
2948 | ||
2949 | PR c++/84269 | |
2950 | * name-lookup.c (get_std_name_hint): Add names from <memory>, | |
2951 | <tuple>, and <utility>. | |
2952 | ||
1e2b90c4 JM |
2953 | 2018-03-29 Jason Merrill <jason@redhat.com> |
2954 | ||
2955 | PR c++/85093 - too many template args with pack expansion. | |
2956 | * pt.c (coerce_template_parms): Keep pack expansion args that will | |
2957 | need to be empty. | |
2958 | ||
8de4a674 JM |
2959 | 2018-03-29 Jason Merrill <jason@redhat.com> |
2960 | ||
2961 | * pt.c (build_non_dependent_expr): Propagate expr location. | |
2962 | ||
e597f682 JM |
2963 | 2018-03-27 Jason Merrill <jason@redhat.com> |
2964 | ||
2965 | PR c++/85060 - wrong-code with call to base member in template. | |
2966 | * search.c (any_dependent_bases_p): Check uses_template_parms | |
2967 | rather than processing_template_decl. | |
2968 | ||
9fa1b661 DM |
2969 | 2018-03-29 David Malcolm <dmalcolm@redhat.com> |
2970 | ||
2971 | PR c++/85110 | |
2972 | * typeck.c (convert_for_assignment): When complaining due to | |
2973 | conversions for an argument, attempt to use the location of the | |
2974 | argument. | |
2975 | ||
427d369c PC |
2976 | 2018-03-28 Paolo Carlini <paolo.carlini@oracle.com> |
2977 | ||
2978 | PR c++/85028 | |
2979 | * pt.c (tsubst_default_argument): Early return if the type of the | |
2980 | parameter is erroneous. | |
2981 | ||
04acc378 AO |
2982 | 2018-03-28 Alexandre Oliva <aoliva@redhat.com> |
2983 | ||
977bc3ee AO |
2984 | PR c++/84973 |
2985 | * decl2.c (note_vague_linkage_fn): Don't defer uninstantiated | |
2986 | templates. | |
2987 | ||
04acc378 AO |
2988 | PR c++/84968 |
2989 | * tree.c (strip_typedefs_expr): Reject STATEMENT_LISTs. | |
2990 | ||
f7d9ed11 PC |
2991 | 2018-03-27 Paolo Carlini <paolo.carlini@oracle.com> |
2992 | ||
2993 | PR c++/85067 | |
2994 | * method.c (defaulted_late_check): Partially revert r253321 changes, | |
2995 | do not early return upon error. | |
2996 | ||
dc442cef JJ |
2997 | 2018-03-27 Jakub Jelinek <jakub@redhat.com> |
2998 | ||
153dba6c JJ |
2999 | PR c++/85077 |
3000 | * cp-gimplify.c (cp_fold) <case CONSTRUCTOR>: For ctors with vector | |
3001 | type call fold to generate VECTOR_CSTs when possible. | |
3002 | ||
dc442cef JJ |
3003 | PR c++/85076 |
3004 | * tree.c (cp_build_reference_type): If to_type is error_mark_node, | |
3005 | return it right away. | |
3006 | ||
d555040f VR |
3007 | 2018-03-27 Volker Reichelt <v.reichelt@netcologne.de> |
3008 | ||
3009 | * search.c (check_final_overrider): Use inform instead of error | |
3010 | for the diagnostics of the overridden functions. Tweak wording. | |
3011 | ||
8a5a37c0 JJ |
3012 | 2018-03-27 Jakub Jelinek <jakub@redhat.com> |
3013 | ||
3014 | PR c++/85068 | |
3015 | * class.c (update_vtable_entry_for_fn): Don't ICE if base_binfo | |
3016 | is NULL. Assert if thunk_binfo is NULL then errorcount is non-zero. | |
3017 | ||
e278212e PC |
3018 | 2018-03-27 Paolo Carlini <paolo.carlini@oracle.com> |
3019 | Jason Merrill <jason@redhat.com> | |
3020 | ||
3021 | PR c++/84632 | |
3022 | * init.c (build_aggr_init): When initializing from array, | |
3023 | reject anything but CONSTRUCTORs and TARGET_EXPRs. | |
3024 | (build_vec_init): Handle separately ARRAY_TYPEs. | |
3025 | ||
ddd5c5b7 JM |
3026 | 2018-03-26 Jason Merrill <jason@redhat.com> |
3027 | ||
125c297c JM |
3028 | PR c++/85062 - ICE with alignas in wrong place. |
3029 | * decl.c (grokdeclarator): Ignore attributes on type-specifiers | |
3030 | here. | |
3031 | ||
ddd5c5b7 JM |
3032 | PR c++/85049 - ICE with __integer_pack. |
3033 | * pt.c (unify_pack_expansion): Don't try to deduce generated packs. | |
3034 | * cp-tree.h (TEMPLATE_PARM_P): New. | |
3035 | ||
86771dcb JM |
3036 | 2018-03-23 Jason Merrill <jason@redhat.com> |
3037 | ||
3038 | PR c++/78489 - wrong SFINAE behavior. | |
3039 | ||
3040 | PR c++/84489 | |
3041 | * pt.c (type_unification_real): Don't defer substitution failure. | |
3042 | ||
c1e7c3f2 JJ |
3043 | 2018-03-23 Jakub Jelinek <jakub@redhat.com> |
3044 | ||
c9db39e1 JJ |
3045 | PR c++/85015 |
3046 | * decl.c (compute_array_index_type): Set osize to mark_rvalue_use | |
3047 | result. | |
3048 | ||
c1e7c3f2 JJ |
3049 | PR c++/84942 |
3050 | * pt.c (tsubst_copy_and_build) <case FIX_TRUNC_EXPR>: Replace | |
3051 | cp_build_unary_op call with gcc_unreachable (). | |
3052 | ||
889a3a30 MP |
3053 | 2018-03-23 Marek Polacek <polacek@redhat.com> |
3054 | ||
3055 | PR c++/85045 | |
3056 | * cxx-pretty-print.c (cxx_pretty_printer::multiplicative_expression): | |
3057 | Handle EXACT_DIV_EXPR and RDIV_EXPR. Tweak condition. | |
3058 | (cxx_pretty_printer::expression): Handle EXACT_DIV_EXPR and RDIV_EXPR. | |
3059 | ||
50531a2a VV |
3060 | 2018-03-23 Ville Voutilainen <ville.voutilainen@gmail.com> |
3061 | ||
3062 | Implement P0962 | |
3063 | * parser.c (cp_parser_perform_range_for_lookup): Change | |
3064 | the condition for deciding whether to use members. | |
3065 | ||
b01556f7 MP |
3066 | 2018-03-23 Marek Polacek <polacek@redhat.com> |
3067 | ||
3068 | PR c++/85033 | |
3069 | * semantics.c (finish_offsetof): Don't allow CONST_DECLs. | |
3070 | ||
631270a5 AO |
3071 | 2018-03-23 Alexandre Oliva <aoliva@redhat.com> |
3072 | ||
3073 | PR c++/71251 | |
3074 | * parser.c (cp_parser_alias_declaration): Call | |
3075 | parser_check_template_parameters. | |
91f9108f | 3076 | |
5904d9d9 AO |
3077 | PR c++/84789 |
3078 | * pt.c (resolve_typename_type): Drop assert that stopped | |
3079 | simplification to template-independent types. Add assert to | |
3080 | verify the initial scope is template dependent. | |
3081 | * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): | |
3082 | Reparse the id expression as a type-name, not a declarator. | |
3083 | ||
3ec16e36 AO |
3084 | PR c++/84729 |
3085 | * init.c (build_vec_init): Error at parenthesized array init. | |
3086 | ||
91f9108f AO |
3087 | PR c++/84610 |
3088 | PR c++/84642 | |
3089 | PR c++/84942 | |
3090 | * cp-tree.h (temp_override): New template class, generalizing | |
3091 | a cleanup that was only used... | |
3092 | * parser.c (cp_parser_parameter_declaration_clause): | |
3093 | ... here for auto_is_implicit_function_template_parm_p. | |
3094 | (cp_parser_gnu_attributes_opt): Use it here as well. | |
3095 | (cp_parser_std_attribute): Likewise. | |
3096 | ||
08ad2797 MP |
3097 | 2018-03-22 Marek Polacek <polacek@redhat.com> |
3098 | ||
3099 | PR c++/84854 | |
3100 | * semantics.c (finish_if_stmt_cond): Check if the type of the condition | |
3101 | is boolean. | |
3102 | ||
2170d4b6 JM |
3103 | 2018-03-21 Jason Merrill <jason@redhat.com> |
3104 | ||
3105 | PR c++/81311 - wrong C++17 overload resolution. | |
3106 | * call.c (build_user_type_conversion_1): Remove C++17 code. | |
3107 | (conv_binds_ref_to_prvalue): New. | |
3108 | (build_over_call): Handle C++17 copy elision. | |
3109 | (build_special_member_call): Only do C++17 copy elision here if the | |
3110 | argument is already the right type. | |
3111 | ||
7446b353 AO |
3112 | 2018-03-21 Alexandre Oliva <aoliva@redhat.com> |
3113 | ||
0186f684 AO |
3114 | PR c++/71965 |
3115 | * init.c (build_vec_init): Silence error, former sorry, | |
3116 | without tf_error. | |
3117 | ||
7446b353 AO |
3118 | PR c++/84610 |
3119 | PR c++/84642 | |
3120 | * parser.c (abort_fully_implicit_template_p): New. | |
3121 | (cp_parser_skip_to_end_of_statement): Use it. | |
3122 | (cp_parser_skip_to_end_of_block_or_statement): Likewise. | |
3123 | (finish_fully_implicit_template_p): Clear | |
3124 | implicit_template_parms and implicit_template_scope. | |
3125 | ||
e299d4fc PC |
3126 | 2018-03-21 Paolo Carlini <paolo.carlini@oracle.com> |
3127 | ||
3128 | PR c++/84972 | |
3129 | * decl.c (maybe_deduce_size_from_array_init): Set TREE_TYPE to | |
3130 | error_mark_node when check_array_designated_initializer fails. | |
3131 | ||
57e20f74 JJ |
3132 | 2018-03-21 Jakub Jelinek <jakub@redhat.com> |
3133 | ||
3134 | PR c++/84961 | |
3135 | * cp-tree.h (genericize_compound_lvalue): Declare. | |
3136 | * typeck.c (genericize_compound_lvalue): New function. | |
3137 | (unary_complex_lvalue, cp_build_modify_expr): Use it. | |
3138 | * semantics.c (finish_asm_stmt): Replace MODIFY_EXPR, PREINCREMENT_EXPR | |
3139 | and PREDECREMENT_EXPR in output and "m" constrained input operands with | |
3140 | COMPOUND_EXPR. Call cxx_mark_addressable on the rightmost | |
3141 | COMPOUND_EXPR operand. | |
3142 | ||
b2595987 NS |
3143 | 2018-03-21 Nathan Sidwell <nathan@acm.org> |
3144 | ||
3145 | PR c++/85008 | |
3146 | * tree.c (decl_linkage): Use DECL_CLONED_FUNCTION_P. | |
3147 | * decl2.c (vague_linkage_p): Likewise. | |
3148 | ||
5afef8b1 DM |
3149 | 2018-03-21 David Malcolm <dmalcolm@redhat.com> |
3150 | ||
3151 | PR c++/84994 | |
3152 | * constexpr.c (constexpr_fn_retval): Make non-"static". | |
3153 | * cp-tree.h (constexpr_fn_retval): New decl. | |
3154 | * search.c (direct_accessor_p): Update leading comment. | |
3155 | (reference_accessor_p): Likewise. | |
3156 | (field_accessor_p): Replace check that function body is a | |
3157 | RETURN_EXPR with a call to constexpr_fn_retval. Fix | |
3158 | indentation of "field_type" decl. | |
3159 | ||
5d011fcf NS |
3160 | 2018-03-21 Nathan Sidwell <nathan@acm.org> |
3161 | ||
3162 | PR c++/84804 | |
3163 | * name-lookup.c (do_pushtag): Permit lambdas to be pushed into | |
3164 | complete classes. | |
3165 | ||
e65fc7c5 MS |
3166 | 2018-03-21 Martin Sebor <msebor@redhat.com> |
3167 | ||
3168 | PR c++/84850 | |
3169 | * call.c (first_non_public_field): New template and function. | |
3170 | (first_non_trivial_field): New function. | |
3171 | (maybe_warn_class_memaccess): Call them. | |
3172 | ||
2a80d3ae DM |
3173 | 2018-03-21 David Malcolm <dmalcolm@redhat.com> |
3174 | ||
3175 | PR c++/84892 | |
3176 | * search.c (field_accessor_p): Use class_of_this_parm rather than | |
3177 | type_of_this_parm, to check that "this" is a "const T *", rather | |
3178 | than a "T *const". | |
3179 | ||
7cd9cf2f NS |
3180 | 2018-03-21 Nathan Sidwell <nathan@acm.org> |
3181 | ||
f82ece6b NS |
3182 | * class.c (finish_struct_anon_r): Refactor, deprecate anything |
3183 | other than public non-static data members. | |
3184 | * parser.c (cp_parser_init_declarator): Deprecate attributes after | |
3185 | parenthesized initializer. | |
3186 | ||
7cd9cf2f NS |
3187 | PR c++/84836 |
3188 | * name-lookup.c (update_binding): Correct logic for local binding | |
3189 | update. | |
3190 | ||
1bdbef09 MP |
3191 | 2018-03-21 Marek Polacek <polacek@redhat.com> |
3192 | ||
3193 | PR c++/71638, ICE with NSDMI and reference. | |
3194 | * constexpr.c (cxx_eval_bare_aggregate): Update constructor's flags | |
3195 | even when we replace an element. | |
3196 | ||
1efb1dc2 MP |
3197 | 2018-03-20 Marek Polacek <polacek@redhat.com> |
3198 | ||
3199 | PR c++/84978, ICE with NRVO. | |
3200 | * constexpr.c (cxx_eval_constant_expression): Handle the case when | |
3201 | a RESULT_DECL isn't in the hash map. | |
3202 | ||
f5f035a3 JM |
3203 | 2018-03-20 Jason Merrill <jason@redhat.com> |
3204 | ||
3205 | PR c++/84978, ICE with NRVO. | |
3206 | * cvt.c (cp_get_fndecl_from_callee): Add fold parameter. | |
3207 | (cp_get_callee_fndecl_nofold): New. | |
3208 | * cp-gimplify.c (cp_genericize_r): Use it instead. | |
3209 | * call.c (check_self_delegation): Likewise. | |
3210 | ||
5770bbac NS |
3211 | 2018-03-20 Nathan Sidwell <nathan@acm.org> |
3212 | ||
6f87580f NS |
3213 | PR c++/84962 |
3214 | * name-lookup.c (pushdecl_class_level): Push anon-struct's | |
3215 | member_vec, if there is one. | |
3216 | ||
5770bbac NS |
3217 | PR c++/84970 |
3218 | * cp-tree.h (lookup_list_keep): Declare. | |
3219 | * tree.c (lookup_list_keep): New, broken out of ... | |
3220 | (build_min): ... here. Call it. | |
3221 | * decl.c (cp_finish_decl): Call lookup_list_keep. | |
3222 | ||
d9bf40a1 JM |
3223 | 2018-03-19 Jason Merrill <jason@redhat.com> |
3224 | ||
3225 | PR c++/84937 - ICE with class deduction and auto. | |
3226 | * pt.c (rewrite_template_parm): Fix auto handling. | |
3227 | ||
e5cc0d54 MP |
3228 | 2018-03-19 Marek Polacek <polacek@redhat.com> |
3229 | ||
3230 | PR c++/84925 | |
3231 | * pt.c (enclosing_instantiation_of): Check if fn is null. | |
3232 | ||
ac9ec198 MP |
3233 | PR c++/84927 |
3234 | * constexpr.c (cxx_eval_bare_aggregate): Update constructor's flags | |
3235 | as we evaluate the elements. | |
3236 | (cxx_eval_constant_expression): Verify constructor's flags | |
3237 | unconditionally. | |
3238 | ||
d9bf40a1 | 3239 | 2018-03-19 Jason Merrill <jason@redhat.com> |
809c28c8 JM |
3240 | |
3241 | PR c++/71834 - template-id with too few arguments. | |
3242 | * pt.c (coerce_template_parms): Check fixed_parameter_pack_p. | |
3243 | ||
8f3284a4 NS |
3244 | 2018-03-19 Nathan Sidwell <nathan@acm.org> |
3245 | ||
143f00e1 NS |
3246 | PR c++/84835 |
3247 | * lambda.c (maybe_add_lambda_conv_op): Force C++ linkage. | |
3248 | * pt.c (build_template_decl): Propagate language linkage. | |
3249 | ||
8f3284a4 NS |
3250 | PR c++/84812 |
3251 | * name-lookup.c (set_local_extern_decl_linkage): Defend against | |
3252 | ambiguous lookups. | |
3253 | ||
63ecb626 JJ |
3254 | 2018-03-16 Jakub Jelinek <jakub@redhat.com> |
3255 | ||
3256 | PR c/84910 | |
3257 | * parser.c (cp_parser_lambda_introducer): Remove trailing space from | |
3258 | diagnostics. | |
3259 | * method.c (synthesize_method): Likewise. | |
3260 | * pt.c (convert_nontype_argument): Likewise. | |
3261 | ||
a8149569 JM |
3262 | 2018-03-16 Jason Merrill <jason@redhat.com> |
3263 | ||
83484be8 JM |
3264 | PR c++/84720 - ICE with rvalue ref non-type argument. |
3265 | * pt.c (invalid_nontype_parm_type_p): Prohibit rvalue reference. | |
3266 | (convert_nontype_argument): Revert earlier change. | |
3267 | ||
80fdaad1 JM |
3268 | PR c++/80227 - SFINAE and negative array size. |
3269 | * decl.c (compute_array_index_type): Use | |
3270 | build_converted_constant_expr and valid_constant_size_p. | |
3271 | ||
929a0122 JM |
3272 | PR c++/84906 - silent wrong code with ambiguous conversion. |
3273 | * call.c (build_user_type_conversion_1): Set need_temporary_p on | |
3274 | ambiguous conversion. | |
3275 | (convert_like_real): Check it. | |
3276 | ||
a8149569 JM |
3277 | PR c++/83937 - wrong C++17 handling of init-list ctor argument. |
3278 | * call.c (build_special_member_call): Don't convert an init-list | |
3279 | argument directly to the class type. | |
3280 | ||
570f86f9 JJ |
3281 | 2018-03-16 Jakub Jelinek <jakub@redhat.com> |
3282 | ||
3283 | PR c++/79937 | |
3284 | PR c++/82410 | |
3285 | * cp-tree.h (CONSTRUCTOR_PLACEHOLDER_BOUNDARY): Define. | |
3286 | (find_placeholder): Declare. | |
3287 | * tree.c (struct replace_placeholders_t): Add exp member. | |
3288 | (replace_placeholders_r): Don't walk into ctors with | |
3289 | CONSTRUCTOR_PLACEHOLDER_BOUNDARY flag set, unless they are equal to | |
3290 | d->exp. Replace PLACEHOLDER_EXPR with unshare_expr (x) rather than x. | |
3291 | (replace_placeholders): Initialize data.exp. | |
3292 | (find_placeholders_r, find_placeholders): New functions. | |
3293 | * typeck2.c (process_init_constructor_record, | |
3294 | process_init_constructor_union): Set CONSTRUCTOR_PLACEHOLDER_BOUNDARY | |
3295 | if adding NSDMI on which find_placeholder returns true. | |
3296 | * call.c (build_over_call): Don't call replace_placeholders here. | |
3297 | * cp-gimplify.c (cp_genericize_r): Set TARGET_EXPR_NO_ELIDE on | |
3298 | TARGET_EXPRs with CONSTRUCTOR_PLACEHOLDER_BOUNDARY set on | |
3299 | TARGET_EXPR_INITIAL. | |
3300 | (cp_fold): Copy over CONSTRUCTOR_PLACEHOLDER_BOUNDARY bit to new | |
3301 | ctor. | |
3302 | ||
aafdbe06 JM |
3303 | 2018-03-16 Jason Merrill <jason@redhat.com> |
3304 | ||
3305 | PR c++/83911 - ICE with multiversioned constructor. | |
3306 | * cp-gimplify.c (cp_genericize_r): Replace versioned function with | |
3307 | dispatchere here. | |
3308 | * call.c (build_over_call): Not here. | |
3309 | ||
828fd2fb JJ |
3310 | 2018-03-16 Jakub Jelinek <jakub@redhat.com> |
3311 | ||
3312 | PR c++/84874 | |
3313 | * decl.c (reshape_init_class): Don't assert d->cur->index == field | |
3314 | if d->cur->index is a FIELD_DECL, instead set field to d->cur->index. | |
3315 | ||
4a5a49b0 JJ |
3316 | 2018-03-15 Jakub Jelinek <jakub@redhat.com> |
3317 | ||
3318 | PR c++/84222 | |
3319 | * cp-tree.h (cp_warn_deprecated_use): Declare. | |
3320 | * tree.c (cp_warn_deprecated_use): New function. | |
3321 | * typeck2.c (build_functional_cast): Use it. | |
3322 | * decl.c (grokparms): Likewise. | |
3323 | (grokdeclarator): Likewise. Temporarily push nested class scope | |
3324 | around grokparms call for out of class member definitions. | |
3325 | ||
b149eb04 JM |
3326 | 2018-03-14 Jason Merrill <jason@redhat.com> |
3327 | ||
8cb1151b JM |
3328 | PR c++/84820 - no error for invalid qualified-id. |
3329 | * parser.c (cp_parser_make_indirect_declarator): Don't wrap | |
3330 | cp_error_declarator. | |
3331 | ||
e62d673d JM |
3332 | PR c++/84801 - ICE with unexpanded pack in lambda. |
3333 | * pt.c (check_for_bare_parameter_packs): Don't return early for a | |
3334 | lambda in non-template context. | |
3335 | ||
b149eb04 JM |
3336 | PR c++/81236 - auto variable and auto function |
3337 | * pt.c (tsubst_baselink): Update the type of the BASELINK after | |
3338 | mark_used. | |
3339 | ||
e493c503 JM |
3340 | 2018-03-14 Jason Merrill <jason@redhat.com> |
3341 | ||
3342 | PR c++/83916 - ICE with template template parameters. | |
3343 | * pt.c (convert_template_argument): Don't substitute into type of | |
3344 | non-type parameter if we don't have enough arg levels. | |
3345 | (unify): Likewise. | |
3346 | ||
8fef0dc6 MP |
3347 | 2018-03-14 Marek Polacek <polacek@redhat.com> |
3348 | ||
3349 | PR c++/84596 | |
3350 | * semantics.c (finish_static_assert): Check | |
3351 | instantiation_dependent_expression_p instead of | |
3352 | {type,value}_dependent_expression_p. | |
3353 | ||
024a6f45 PC |
3354 | 2018-03-13 Paolo Carlini <paolo.carlini@oracle.com> |
3355 | Jason Merrill <jason@redhat.com> | |
3356 | ||
3357 | PR c++/82336 - link error with list-init default argument. | |
3358 | * decl.c (check_default_argument): Unshare an initializer list. | |
3359 | ||
949aab19 JJ |
3360 | 2018-03-13 Jakub Jelinek <jakub@redhat.com> |
3361 | ||
3362 | PR c++/84843 | |
3363 | * decl.c (duplicate_decls): For redefinition of built-in, use error | |
3364 | and return error_mark_node. For redeclaration, return error_mark_node | |
3365 | rather than olddecl if !flag_permissive. | |
3366 | ||
515f874f JM |
3367 | 2018-03-13 Jason Merrill <jason@redhat.com> |
3368 | ||
3369 | PR c++/82565 - ICE with concepts and generic lambda. | |
3370 | * pt.c (instantiate_decl): Clear fn_context for lambdas. | |
3371 | ||
426c1e2e JM |
3372 | 2018-03-13 Jason Merrill <jason@redhat.com> |
3373 | ||
f71c1a18 JM |
3374 | PR c++/84720 - ICE with rvalue ref non-type argument. |
3375 | * pt.c (convert_nontype_argument): Handle rvalue references. | |
3376 | ||
a6515784 JM |
3377 | PR c++/84839 - ICE with decltype of parameter pack. |
3378 | * pt.c (tsubst_pack_expansion): Set cp_unevaluated_operand while | |
3379 | instantiating dummy parms. | |
3380 | ||
1d500c25 JM |
3381 | * parser.c (cp_parser_simple_type_specifier): Pedwarn about auto |
3382 | parameter even without -Wpedantic. | |
3383 | ||
426c1e2e JM |
3384 | PR c++/84798 - ICE with auto in abstract function declarator. |
3385 | * parser.c (cp_parser_parameter_declaration_clause): Check | |
3386 | parser->default_arg_ok_p. | |
3387 | ||
fe217ba0 JJ |
3388 | 2018-03-13 Jakub Jelinek <jakub@redhat.com> |
3389 | ||
3390 | PR c++/84808 | |
3391 | * constexpr.c (find_array_ctor_elt): Don't use elt reference after | |
3392 | first potential CONSTRUCTOR_ELTS reallocation. Convert dindex to | |
3393 | sizetype. Formatting fixes. | |
3394 | ||
11b782f7 JM |
3395 | 2018-03-12 Jason Merrill <jason@redhat.com> |
3396 | ||
d67b5d8d JM |
3397 | PR c++/84355 - ICE with deduction for member class template. |
3398 | * pt.c (tsubst) [TEMPLATE_TYPE_PARM]: Always substitute into | |
3399 | CLASS_PLACEHOLDER_TEMPLATE. | |
3400 | ||
11b782f7 JM |
3401 | PR c++/84802 - ICE capturing uninstantiated class. |
3402 | * lambda.c (build_capture_proxy): Call complete_type. | |
3403 | ||
3569f81f JM |
3404 | 2018-03-09 Jason Merrill <jason@redhat.com> |
3405 | ||
7ed12599 JM |
3406 | PR c++/84770 - ICE with typedef and parameter pack. |
3407 | * pt.c (verify_unstripped_args_1): Split out from | |
3408 | verify_unstripped_args. | |
3409 | ||
732a431d JM |
3410 | PR c++/84785 - ICE with alias template and default targs. |
3411 | * pt.c (type_unification_real): Set processing_template_decl if | |
3412 | saw_undeduced == 1. | |
3413 | ||
3569f81f JM |
3414 | PR c++/84752 - ICE with capture of constexpr array. |
3415 | * call.c (standard_conversion): Set rvaluedness_matches_p on the | |
3416 | identity conversion under ck_lvalue. | |
3417 | ||
79228fd2 | 3418 | 2018-03-09 Jason Merrill <jason@redhat.com> |
be977d08 JM |
3419 | Paolo Carlini <paolo.carlini@oracle.com> |
3420 | ||
3421 | PR c++/71169 | |
3422 | PR c++/71832 | |
3423 | * pt.c (any_erroneous_template_args_p): New. | |
3424 | * cp-tree.h (any_erroneous_template_args_p): Declare it. | |
3425 | * parser.c (cp_parser_class_specifier_1): Use it. | |
3426 | ||
1577f10a JM |
3427 | 2018-03-09 Jason Merrill <jason@redhat.com> |
3428 | ||
3429 | PR c++/84726 - unnecessary capture of constant vars. | |
3430 | * cp-tree.h (LAMBDA_CAPTURE_EXPLICIT_P) | |
3431 | (LAMBDA_EXPR_CAPTURE_OPTIMIZED): New. | |
3432 | * expr.c (mark_use): Set LAMBDA_EXPR_CAPTURE_OPTIMIZED. | |
3433 | * lambda.c (is_constant_capture_proxy) | |
3434 | (current_lambda_expr, var_to_maybe_prune, mark_const_cap_r) | |
3435 | (prune_lambda_captures): New. | |
3436 | (finish_lambda_function): Call prune_lambda_captures. | |
3437 | ||
5f2440b0 JM |
3438 | 2018-03-09 Jason Merrill <jason@redhat.com> |
3439 | Jakub Jelinek <jakub@redhat.com> | |
3440 | ||
3441 | PR c++/84076 | |
3442 | * call.c (convert_arg_to_ellipsis): Instead of cp_build_addr_expr | |
3443 | build ADDR_EXPR with REFERENCE_TYPE. | |
3444 | (build_over_call): For purposes of check_function_arguments, if | |
3445 | argarray[j] is ADDR_EXPR with REFERENCE_TYPE created above, use | |
3446 | its operand rather than the argument itself. | |
3447 | ||
060ad852 JJ |
3448 | 2018-03-09 Jakub Jelinek <jakub@redhat.com> |
3449 | ||
3450 | PR c++/84724 | |
3451 | * decl.c (duplicate_decls): Don't override __* prefixed builtins | |
3452 | except for __[^b]*_chk, instead issue permerror and for -fpermissive | |
3453 | also a note and return olddecl. | |
3454 | ||
d04e6ed5 NS |
3455 | 2018-03-09 Nathan Sidwell <nathan@acm.org> |
3456 | ||
3457 | PR c++/84733 | |
3458 | * name-lookup.c (do_pushdecl_with_scope): Only clear | |
3459 | current_function_decl when pushing a non-class (i.e. namespace) | |
3460 | scope. | |
3461 | ||
80bac2eb JM |
3462 | 2018-03-08 Jason Merrill <jason@redhat.com> |
3463 | Jakub Jelinek <jakub@redhat.com> | |
3464 | ||
3465 | PR c++/80598 | |
3466 | * call.c (build_over_call): In templates set TREE_USED (first_fn) when | |
3467 | not calling mark_used for the benefit of -Wunused-function warning. | |
3468 | ||
68ad1bf7 JM |
3469 | 2018-03-06 Jason Merrill <jason@redhat.com> |
3470 | ||
3471 | * lambda.c (is_capture_proxy_with_ref): Remove. | |
3472 | * constexpr.c, expr.c, cp-tree.h, semantics.c: Adjust. | |
3473 | ||
1dc23505 MP |
3474 | 2018-03-06 Marek Polacek <polacek@redhat.com> |
3475 | ||
3476 | PR c++/84684 | |
3477 | * constexpr.c (cxx_bind_parameters_in_call): Unshare evaluated | |
3478 | arguments. | |
3479 | ||
1ea71a82 AO |
3480 | 2018-03-06 Alexandre Oliva <aoliva@redhat.com> |
3481 | ||
23d63b45 AO |
3482 | PR c++/84231 |
3483 | * tree.c (lvalue_kind): Use presence/absence of REFERENCE_TYPE | |
3484 | only while processing template decls. | |
3485 | * typeck.c (build_x_conditional_expr): Move wrapping of | |
3486 | reference type around type... | |
3487 | * call.c (build_conditional_expr_1): ... here. Rename | |
3488 | is_lvalue to is_glvalue. | |
3489 | * parser.c (cp_parser_fold_expression): Catch REFERENCE_REF_P | |
3490 | INDIRECT_REF of COND_EXPR too. | |
3491 | ||
2e1a7ecb AO |
3492 | PR c++/84593 |
3493 | * init.c (build_zero_init_1): Zero-initialize references. | |
3494 | ||
1ea71a82 AO |
3495 | PR c++/84492 |
3496 | * semantics.c (finish_stmt_expr_expr): Reject unresolved | |
3497 | overloads used as stmt expr values. | |
3498 | ||
91e534b0 JM |
3499 | 2018-03-05 Jason Merrill <jason@redhat.com> |
3500 | ||
3501 | PR c++/84708 - ICE with lambda in local class NSDMI. | |
3502 | * lambda.c (lambda_expr_this_capture): Handle local class NSDMI | |
3503 | context. | |
3504 | ||
46cf7fa1 JJ |
3505 | 2018-03-05 Jakub Jelinek <jakub@redhat.com> |
3506 | ||
3507 | PR c++/84684 | |
3508 | * constexpr.c (constexpr_call_hasher::equal): Return false if | |
3509 | lhs->hash != rhs->hash. Change return 1 to return true and | |
3510 | return 0 to return false. | |
3511 | ||
f7af3ad6 NS |
3512 | 2018-03-05 Nathan Sidwell <nathan@acm.org> |
3513 | ||
3514 | PR c++/84702 | |
3515 | * pt.c (process_template_arg): Mark lookup_keep on a default arg. | |
3516 | ||
a2460abb MP |
3517 | 2018-03-05 Marek Polacek <polacek@redhat.com> |
3518 | ||
3519 | PR c++/84707 | |
3520 | * decl.c (duplicate_decls): Check DECL_NAME before accessing | |
3521 | UDLIT_OPER_P. | |
3522 | ||
a5dccd46 NS |
3523 | 2018-03-05 Nathan Sidwell <nathan@acm.org> |
3524 | ||
3525 | PR c++/84694 | |
3526 | * friend.c (do_friend): Restore check for identifier_p inside | |
3527 | TEMPLATE_ID_EXPR. | |
3528 | ||
5625e747 PC |
3529 | 2018-03-05 Paolo Carlini <paolo.carlini@oracle.com> |
3530 | ||
3531 | PR c++/84618 | |
3532 | * parser.c (cp_parser_lambda_introducer): Reject any capture not | |
3533 | involving a VAR_DECL or a PARM_DECL. | |
3534 | ||
35a313aa PB |
3535 | 2018-03-05 Pádraig Brady <P@draigBrady.com> |
3536 | Jason Merrill <jason@redhat.com> | |
3537 | Nathan Sidwell <nathan@acm.org> | |
3538 | ||
3539 | PR c++/84497 | |
3540 | * decl2.c (get_tls_init_fn): Check TYPE_HAS_TRIVIAL_DFLT too. | |
3541 | ||
38946ea1 JM |
3542 | 2018-03-03 Jason Merrill <jason@redhat.com> |
3543 | ||
3544 | PR c++/84686 - missing volatile loads. | |
3545 | * cvt.c (convert_to_void): Call maybe_undo_parenthesized_ref. | |
3546 | ||
c94a3f9f PC |
3547 | 2018-03-03 Paolo Carlini <paolo.carlini@oracle.com> |
3548 | ||
3549 | PR c++/71464 | |
3550 | * optimize.c (maybe_thunk_body): Bail out immediately if either | |
3551 | fns[0] or fns[1] is null. | |
3552 | ||
74f8705e MP |
3553 | 2018-03-02 Marek Polacek <polacek@redhat.com> |
3554 | ||
3555 | PR c++/84578 | |
3556 | * constexpr.c (get_array_or_vector_nelts): New. | |
3557 | (cxx_eval_array_reference): Use it. | |
3558 | (cxx_eval_vec_init_1): Likewise. | |
3559 | (cxx_eval_store_expression): Likewise. | |
3560 | ||
c945ee25 JM |
3561 | 2018-03-02 Jason Merrill <jason@redhat.com> |
3562 | ||
3563 | * semantics.c (force_paren_expr): Remove redundant test. | |
3564 | ||
8c8f2ab7 MP |
3565 | 2018-03-02 Marek Polacek <polacek@redhat.com> |
3566 | ||
3567 | PR c++/84663 | |
3568 | * decl.c (cp_complete_array_type): Check error_mark_node. | |
3569 | ||
743ee9d5 MP |
3570 | PR c++/84664 |
3571 | * typeck.c (cp_perform_integral_promotions): Check the result of | |
3572 | mark_rvalue_use. | |
3573 | ||
7299275f JJ |
3574 | 2018-03-02 Jakub Jelinek <jakub@redhat.com> |
3575 | ||
3576 | PR c++/84662 | |
3577 | * pt.c (tsubst_copy_and_build) <case TEMPLATE_ID_EXPR>: Use | |
3578 | RETURN instead of return. | |
3579 | <case POINTER_PLUS_EXPR>: Likewise. | |
3580 | <case CONVERT_EXPR>: If op0 is error_mark_node, just return | |
3581 | it instead of wrapping it into CONVERT_EXPR. | |
3582 | ||
e76feb5b JM |
3583 | 2018-03-02 Jason Merrill <jason@redhat.com> |
3584 | ||
3585 | Fix MIPS16 ICE. | |
3586 | * pt.c (type_dependent_expression_p): Check DECL_LANG_SPECIFIC. | |
3587 | ||
587b2f67 MP |
3588 | 2018-03-02 Marek Polacek <polacek@redhat.com> |
3589 | ||
3590 | PR c++/84590 | |
3591 | * cp-gimplify.c (cp_fully_fold): Unwrap TARGET_EXPR or a CONSTRUCTOR | |
3592 | wrapped in VIEW_CONVERT_EXPR. | |
3593 | ||
f454bd64 MS |
3594 | 2018-03-01 Martin Sebor <msebor@redhat.com> |
3595 | ||
3596 | PR c++/84294 | |
3597 | * decl.c (check_redeclaration_no_default_args): Merge attributes | |
3598 | specified on redeclarations of the same function template. | |
3599 | Remove dead code. | |
3600 | ||
1d4f0f3f MP |
3601 | 2018-03-01 Marek Polacek <polacek@redhat.com> |
3602 | Jason Merrill <jason@redhat.com> | |
3603 | ||
3604 | PR c++/84582 | |
3605 | * semantics.c (force_paren_expr): Create a PAREN_EXPR when in | |
3606 | a template. | |
3607 | (maybe_undo_parenthesized_ref): Unwrap PAREN_EXPR. | |
3608 | * typeck2.c (store_init_value): Call fold_non_dependent_expr instead | |
3609 | of instantiate_non_dependent_expr. | |
3610 | * tree.c (lvalue_kind): Handle PAREN_EXPR like NON_DEPENDENT_EXPR. | |
3611 | ||
303f4850 NS |
3612 | 2018-03-01 Nathan Sidwell <nathan@acm.org> |
3613 | ||
3614 | PR c++/84434 | |
3615 | * name-lookup.c (member_vec_dedup): Remove manually peeled | |
3616 | iteration. Ignore dependent ctor inheritance. | |
3617 | ||
eedaaaf7 JM |
3618 | 2018-03-01 Jason Merrill <jason@redhat.com> |
3619 | ||
3620 | PR c++/71569 - decltype of template. | |
3621 | * parser.c (cp_parser_decltype_expr): Handle missing template args. | |
3622 | ||
d8cff23f MP |
3623 | 2018-03-01 Marek Polacek <polacek@redhat.com> |
3624 | ||
3625 | PR c++/84596 | |
3626 | * constexpr.c (require_rvalue_constant_expression): New function. | |
3627 | * cp-tree.h: Declare it. | |
3628 | * semantics.c (finish_static_assert): Use it instead of | |
3629 | require_potential_rvalue_constant_expression. | |
3630 | ||
303a1e75 JM |
3631 | 2018-03-01 Jason Merrill <jason@redhat.com> |
3632 | Alexandre Oliva <aoliva@redhat.com> | |
3633 | ||
3634 | PR c++/71569 - ICE with redundant args on member variable template. | |
3635 | * decl.c (start_decl): Handle partial specialization of member | |
3636 | variable template. | |
3637 | * pt.c (determine_specialization): Allow partial specialization | |
3638 | of member variable template without specializing enclosing class. | |
3639 | (process_partial_specialization): Improve error message. | |
3640 | ||
9ea97097 JM |
3641 | 2018-02-28 Jason Merrill <jason@redhat.com> |
3642 | ||
3643 | PR c++/71784 - ICE with ref-qualifier and explicit specialization. | |
3644 | * pt.c (determine_specialization): Check ref-qualifier. | |
3645 | ||
f6eee6bf JJ |
3646 | 2018-02-28 Jakub Jelinek <jakub@redhat.com> |
3647 | ||
60d2d641 JJ |
3648 | PR c++/84609 |
3649 | * parser.c (cp_parser_attributes_opt): Formatting fix. | |
3650 | (cp_parser_skip_balanced_tokens, cp_parser_skip_gnu_attributes_opt, | |
3651 | cp_parser_skip_std_attribute_spec_seq, cp_parser_skip_attributes_opt): | |
3652 | New functions. | |
3653 | (cp_parser_member_declaration): Use cp_parser_skip_attributes_opt | |
3654 | instead of tentative parse to peek over optional attribute tokens | |
3655 | to check for CPP_COLON after them. | |
3656 | ||
f6eee6bf JJ |
3657 | PR c++/83871 |
3658 | PR c++/83503 | |
3659 | * pt.c (INCLUDE_STRING): Remove define. | |
3660 | (warn_spec_missing_attributes): Use pretty_printer instead of | |
3661 | std::string. Fix up inform call so that the list of attributes | |
3662 | is in %s argument. | |
3663 | ||
be583c04 MS |
3664 | 2018-02-28 Martin Sebor <msebor@redhat.com> |
3665 | ||
3666 | PR testsuite/84617 | |
3667 | * decl.c (duplicate_decls): Fully merge attributes const, pure, | |
3668 | and malloc. | |
3669 | ||
35129fd3 NS |
3670 | 2018-02-28 Nathan Sidwell <nathan@acm.org> |
3671 | ||
3672 | PR c++/84602 | |
3673 | * name-lookup.h (search_anon_aggr): Add defaulted WANT_TYPE arg. | |
3674 | * name-lookup.c (fields_linear_search): Look in an anon-aggr | |
3675 | regardless of want_type. | |
3676 | (search_anon_aggr): Just use get_class_binding_direct. | |
3677 | ||
c1299a9e JJ |
3678 | 2018-02-28 Jakub Jelinek <jakub@redhat.com> |
3679 | ||
3680 | * decl.c (cp_finish_decomp): Don't adjust eltscnt when calling | |
3681 | inform_n. | |
3682 | ||
2211eff6 MS |
3683 | 2018-02-27 Martin Sebor <msebor@redhat.com> |
3684 | ||
3685 | * pt.c: Avoid including <string> directly. | |
3686 | ||
d4cfd486 MS |
3687 | 2018-02-27 Martin Sebor <msebor@redhat.com> |
3688 | ||
3689 | PR c++/83871 | |
3690 | PR c++/83503 | |
3691 | * cp-tree.h (warn_spec_missing_attributes): New function. | |
3692 | ((check_explicit_specialization): Add an argument. Call the above | |
3693 | function. | |
3694 | * decl.c (duplicate_decls): Avoid applying primary function template's | |
3695 | attributes to its explicit specializations. | |
3696 | cp/pt.c (warn_spec_missing_attributes): Define. | |
3697 | ||
76bd270a HS |
3698 | 2018-02-27 HÃ¥kon Sandsmark <hsandsmark@gmail.com> |
3699 | ||
3700 | PR c++/71546 - lambda init-capture with qualified-id. | |
3701 | * parser.c (cp_parser_lambda_introducer): Clear scope after | |
3702 | each lambda capture. | |
3703 | ||
10b5c982 NS |
3704 | 2018-02-27 Nathan Sidwell <nathan@acm.org> |
3705 | ||
3706 | PR c++/84426 | |
3707 | * name-lookup.h (get_member_slot): Rename ... | |
3708 | (find_member_slot): ... here. | |
3709 | (add_member_slot): New. | |
3710 | * name-lookup.c (member_vec_linear_search): No need to check for | |
3711 | NULL slot. | |
3712 | (get_member_slot): Rename ... | |
3713 | (find_member_slot): ... here. Don't add slot for incomplete class. | |
3714 | (add_member_slot): New. | |
3715 | * class.c (add_method): Adjust get_member_slot rename. Bail out | |
3716 | if push_class_level_binding fails. Create slot and grok | |
3717 | properties once we're committed to insertion. | |
3718 | ||
e8ef9fdf JM |
3719 | 2018-02-27 Jason Merrill <jason@redhat.com> |
3720 | ||
3721 | PR c++/84489 - dependent default template argument | |
3722 | * pt.c (type_unification_real): Handle early substitution failure. | |
3723 | ||
8e9589bd JM |
3724 | 2018-02-26 Jason Merrill <jason@redhat.com> |
3725 | ||
ed75f594 JM |
3726 | PR c++/84560 - ICE capturing multi-dimensional VLA. |
3727 | * tree.c (array_of_runtime_bound_p): False if the element is | |
3728 | variably-modified. | |
3729 | ||
a2444ce9 JM |
3730 | PR c++/84441 - ICE with base initialized from ?: |
3731 | * call.c (unsafe_copy_elision_p): Handle COND_EXPR. | |
3732 | ||
ab5f26bb JM |
3733 | PR c++/84520 - ICE with generic lambda in NSDMI. |
3734 | * lambda.c (lambda_expr_this_capture): Don't look for fake NSDMI | |
3735 | 'this' in a generic lambda instantiation. | |
3736 | ||
8e9589bd JM |
3737 | PR c++/84559 - ICE with constexpr VLA. |
3738 | * constexpr.c (ensure_literal_type_for_constexpr_object): Check | |
3739 | for constexpr variable with VLA type. | |
3740 | ||
c2236b9b JJ |
3741 | 2018-02-26 Jakub Jelinek <jakub@redhat.com> |
3742 | ||
3743 | PR c++/84558 | |
3744 | * constexpr.c (cxx_eval_vec_init_1): For reuse, treat NULL eltinit like | |
3745 | a valid constant initializer. Formatting fixes. | |
3746 | ||
08735f53 PC |
3747 | 2018-02-26 Paolo Carlini <paolo.carlini@oracle.com> |
3748 | ||
3749 | PR c++/84540 | |
3750 | * pt.c (tsubst_attributes): Handle correctly tsubst_attribute | |
3751 | returning NULL_TREE. | |
3752 | (apply_late_template_attributes): Likewise. | |
3753 | ||
2bb03eb7 JJ |
3754 | 2018-02-26 Jakub Jelinek <jakub@redhat.com> |
3755 | ||
3756 | PR c++/84557 | |
3757 | * parser.c (cp_parser_omp_var_list_no_open): Only call | |
3758 | cp_parser_lookup_name_simple on names satisfying identifier_p. | |
3759 | (cp_parser_oacc_routine): Likewise. | |
3760 | ||
106b15ea JM |
3761 | 2018-02-26 Jason Merrill <jason@redhat.com> |
3762 | ||
3763 | PR c++/84551 - ICE with concepts and -g. | |
3764 | * parser.c (add_debug_begin_stmt): Do nothing in a concept. | |
3765 | ||
b671df81 MP |
3766 | 2018-02-26 Marek Polacek <polacek@redhat.com> |
3767 | ||
3768 | PR c++/84325 | |
3769 | * tree.c (replace_placeholders_r): Only check TREE_CONSTANT on | |
3770 | non-types. | |
3771 | ||
18101e73 JM |
3772 | 2018-02-26 Jason Merrill <jason@redhat.com> |
3773 | ||
3774 | PR c++/84447 - ICE with deleted inherited ctor with default arg. | |
3775 | * call.c (build_over_call): Handle deleted functions in one place. | |
3776 | ||
98c26210 PC |
3777 | 2018-02-26 Paolo Carlini <paolo.carlini@oracle.com> |
3778 | ||
3779 | PR c++/84533 | |
3780 | * decl.c (redeclaration_error_message): Don't try to use | |
3781 | DECL_DECLARED_CONSTEXPR_P on CONST_DECLs. | |
3782 | ||
856c79ea PC |
3783 | 2018-02-26 Paolo Carlini <paolo.carlini@oracle.com> |
3784 | ||
3785 | * lambda.c (build_capture_proxy): Define static. | |
3786 | * cp-tree.h (build_capture_proxy): Remove. | |
3787 | ||
7518398d MP |
3788 | 2018-02-26 Marek Polacek <polacek@redhat.com> |
3789 | ||
3790 | PR c++/84537 | |
3791 | * name-lookup.c (suggest_alternative_in_explicit_scope): Return false | |
3792 | if name is error node. | |
3793 | ||
a8a3f32d JM |
3794 | 2018-02-25 Jason Merrill <jason@redhat.com> |
3795 | ||
3796 | PR c++/84015 - ICE with class deduction and auto template parm. | |
3797 | * pt.c (rewrite_template_parm): Use tf_partial in first tsubst. | |
3798 | ||
118cd6ba MP |
3799 | 2018-02-24 Marek Polacek <polacek@redhat.com> |
3800 | ||
3801 | PR c++/83692 | |
3802 | * constexpr.c (maybe_constant_init_1): New function. | |
3803 | (maybe_constant_init): Make it a wrapper around maybe_constant_init_1. | |
3804 | (cxx_constant_init): New function. | |
3805 | * cp-tree.h (cxx_constant_init): Declare. | |
3806 | * typeck2.c (store_init_value): Call cxx_constant_init instead of | |
3807 | cxx_constant_value. Move the maybe_constant_init call under an 'else'. | |
3808 | ||
54fbd24d JM |
3809 | 2018-02-22 Jason Merrill <jason@redhat.com> |
3810 | ||
3811 | PR c++/70468 - ICE with constructor delegation via typedef. | |
3812 | * pt.c (tsubst_initializer_list): Check for other mem-initializers | |
3813 | with constructor delegation. | |
3814 | ||
6f11ddd8 JM |
3815 | 2018-02-22 Jason Merrill <jason@redhat.com> |
3816 | ||
3817 | PR c++/84424 - ICE with constexpr and __builtin_shuffle. | |
3818 | * constexpr.c (reduced_constant_expression_p): Handle CONSTRUCTOR of | |
3819 | VECTOR_TYPE. | |
3820 | ||
caa7952a MP |
3821 | 2018-02-22 Marek Polacek <polacek@redhat.com> |
3822 | ||
3823 | PR c++/84493 | |
3824 | * parser.c (cp_parser_braced_list): Use require_open instead of | |
3825 | consume_open. | |
3826 | ||
e6875743 JM |
3827 | 2018-02-21 Jason Merrill <jason@redhat.com> |
3828 | ||
3829 | PR c++/84454 - ICE with pack expansion in signature. | |
3830 | * error.c (find_typenames_r): Also stop on EXPR_PACK_EXPANSION. | |
3831 | ||
d3eb902f SP |
3832 | 2018-02-20 Siddhesh Poyarekar <siddhesh@sourceware.org> |
3833 | ||
3834 | * cp-objcp-common.c (cxx_block_may_fallthru): Add case for | |
3835 | IF_STMT. | |
3836 | ||
0b2513e2 PC |
3837 | 2018-02-20 Paolo Carlini <paolo.carlini@oracle.com> |
3838 | ||
3839 | PR c++/84446 | |
3840 | * parser.c (cp_parser_init_declarator): Don't call start_lambda_scope | |
3841 | on error_mark_node. | |
3842 | ||
dda0944c JJ |
3843 | 2018-02-20 Jakub Jelinek <jakub@redhat.com> |
3844 | ||
393d9df7 JJ |
3845 | PR c++/84445 |
3846 | * class.c (fixed_type_or_null) <case CALL_EXPR>: Only test | |
3847 | TREE_HAS_CONSTRUCTOR if instance is not an internal function call. | |
3848 | ||
7f5753d7 JJ |
3849 | PR c++/84449 |
3850 | * tree.c (bot_manip): If build_cplus_new or break_out_target_exprs | |
3851 | returns error_mark_node, return it immediately. | |
3852 | (break_out_target_exprs): If cp_walk_tree with bot_manip returns | |
3853 | error_mark_node, return error_mark_node. | |
3854 | ||
dda0944c JJ |
3855 | PR c++/84455 |
3856 | * pt.c (tsubst_lambda_expr): If not nested, increment temporarily | |
3857 | function_depth to avoid GC during finish_lambda_function. | |
3858 | ||
329a89d3 JM |
3859 | 2018-02-19 Jason Merrill <jason@redhat.com> |
3860 | ||
3861 | PR c++/84429 - ICE capturing VLA. | |
3862 | * lambda.c (build_capture_proxy): Handle reference refs. | |
3863 | ||
897064e2 JJ |
3864 | 2018-02-19 Jakub Jelinek <jakub@redhat.com> |
3865 | ||
4382537d JJ |
3866 | PR c++/84448 |
3867 | * parser.c (cp_parser_binary_expression): For no_toplevel_fold_p, if | |
3868 | either operand is error_mark_node, set current.lhs to that instead of | |
3869 | creating a binary op with error_mark_node operands. | |
3870 | ||
897064e2 JJ |
3871 | PR c++/84430 |
3872 | * constexpr.c (potential_constant_expression_1): Handle OMP_SIMD. | |
3873 | ||
50dbbe53 PC |
3874 | 2018-02-19 Paolo Carlini <paolo.carlini@oracle.com> |
3875 | ||
3876 | PR c++/84348 | |
3877 | * decl.c (grokdeclarator): Early return error_mark_node upon | |
3878 | ill-formed friend declaration. | |
3879 | ||
019e0ae8 MP |
3880 | 2018-02-16 Marek Polacek <polacek@redhat.com> |
3881 | Jakub Jelinek <jakub@redhat.com> | |
3882 | ||
3883 | PR c++/84192 | |
3884 | * constexpr.c (cxx_eval_constant_expression) <case RETURN_EXPR>: Don't | |
3885 | set *jump_target to anything if jump_target is NULL. | |
3886 | ||
280fa93e JM |
3887 | 2018-02-16 Jason Merrill <jason@redhat.com> |
3888 | ||
18afe4c9 JM |
3889 | PR c++/84151 - unnecessary volatile load with static member. |
3890 | * call.c (build_new_method_call_1): Avoid loading from a volatile | |
3891 | lvalue used as the object argument for a static member function. | |
3892 | ||
3664e317 JM |
3893 | PR c++/81853 - using-directive and constexpr. |
3894 | * constexpr.c (cxx_eval_constant_expression): Handle USING_STMT. | |
3895 | ||
6f58bc58 JM |
3896 | PR c++/84420 - ICE with structured binding in lambda. |
3897 | * lambda.c (is_capture_proxy): Check DECL_DECOMPOSITION_P. | |
3898 | ||
b76f3abc JM |
3899 | PR c++/83835 - C++17 error with constructor ctors. |
3900 | * call.c (build_special_member_call): Set TARGET_EXPR_DIRECT_INIT_P. | |
3901 | ||
aaec81f1 JM |
3902 | PR c++/82664 - ICE with reference to function template parm. |
3903 | * pt.c (convert_nontype_argument_function): Avoid obfuscationg | |
3904 | NOP_EXPRs. | |
3905 | ||
280fa93e JM |
3906 | PR c++/82764 - C++17 ICE with empty base |
3907 | * class.c (build_base_field_1): Set DECL_SIZE to zero for empty base. | |
3908 | ||
9dc20710 JM |
3909 | 2018-02-16 Jason Merrill <jason@redhat.com> |
3910 | ||
3911 | PR c++/84421 - type-dependent if constexpr | |
3912 | * semantics.c (finish_if_stmt_cond): Check type_dependent_expression_p. | |
3913 | ||
3943b161 NS |
3914 | 2018-02-16 Nathan Sidwell <nathan@acm.org> |
3915 | ||
3916 | Deprecate -ffriend-injection. | |
3917 | * decl.c (cxx_init_decl_processing): Emit warning on option. | |
3918 | * name-lookup.c (do_pushdecl): Emit warning if we push a visible | |
3919 | friend. | |
3920 | ||
d65da12f PC |
3921 | 2018-02-16 Paolo Carlini <paolo.carlini@oracle.com> |
3922 | ||
3923 | PR c++/82468 | |
3924 | * decl.c (check_special_function_return_type): Reject template | |
3925 | template parameter in deduction guide. | |
3926 | ||
b1a7e33d NS |
3927 | 2018-02-16 Nathan Sidwell <nathan@acm.org> |
3928 | ||
3929 | PR c++/84375 | |
3930 | * name-lookup.c (do_pushdecl): Bail out on bad local friend injection. | |
3931 | ||
4912defb JM |
3932 | 2018-02-15 Jason Merrill <jason@redhat.com> |
3933 | ||
d78aecf4 JM |
3934 | PR c++/83227 - C++17 ICE with init-list derived-to-base conversion. |
3935 | * call.c (convert_like_real): Don't use the copy-list-initialization | |
3936 | shortcut for ck_base. | |
3937 | ||
dd39c7d1 JM |
3938 | PR c++/84045 - ICE with typedef and noexcept. |
3939 | * except.c (build_noexcept_spec): Use strip_typedefs_expr. | |
3940 | ||
117ad0be JM |
3941 | PR c++/84376 - ICE with omitted template arguments. |
3942 | * pt.c (dguide_name_p): Check for IDENTIFIER_NODE. | |
3943 | ||
4912defb JM |
3944 | PR c++/84368 - wrong error with local variable in variadic lambda. |
3945 | * pt.c (tsubst_pack_expansion): Fix handling of non-packs in | |
3946 | local_specializations. | |
3947 | ||
47790631 PC |
3948 | 2018-02-15 Paolo Carlini <paolo.carlini@oracle.com> |
3949 | ||
3950 | PR c++/84330 | |
3951 | * constraint.cc (tsubst_constraint_info): Handle an error_mark_node | |
3952 | as first argument. | |
3953 | ||
2482a4ec PC |
3954 | 2018-02-14 Paolo Carlini <paolo.carlini@oracle.com> |
3955 | ||
3956 | PR c++/84350 | |
3957 | * pt.c (do_auto_deduction): Don't check the TREE_TYPE of a null | |
3958 | init, early return. | |
3959 | ||
486c5299 NS |
3960 | 2018-02-14 Nathan Sidwell <nathan@acm.org> |
3961 | ||
3962 | * decl2.c (mark_vtable_entries): Set input_location to decl's. | |
3963 | (c_parse_final_cleanups): Restore input_location after emitting | |
3964 | vtables. | |
3965 | ||
87ca4015 PC |
3966 | 2018-02-14 Paolo Carlini <paolo.carlini@oracle.com> |
3967 | ||
3968 | * cp-tree.h (do_auto_deduction (tree, tree, tree)): Remove. | |
3969 | (do_auto_deduction (tree, tree, tree, tsubst_flags_t, | |
3970 | auto_deduction_context, tree, int): Add defaults. | |
3971 | * pt.c (do_auto_deduction (tree, tree, tree)): Remove definition. | |
3972 | (tsubst_omp_for_iterator): Adjust do_auto_deduction call, forward | |
3973 | tsubst_flags_t argument. | |
3974 | * init.c (build_new): Likewise. | |
3975 | ||
dbf71703 JJ |
3976 | 2018-02-13 Jakub Jelinek <jakub@redhat.com> |
3977 | ||
3978 | PR c++/84364 | |
3979 | * typeck.c (check_return_expr): Don't emit -Weffc++ warning | |
3980 | about return other than *this in assignment operators if | |
3981 | retval is type dependent expression. | |
3982 | ||
3a9ad4c1 PC |
3983 | 2018-02-13 Paolo Carlini <paolo.carlini@oracle.com> |
3984 | ||
3985 | PR c++/84333 | |
3986 | * call.c (build_conditional_expr_1): Use cp_save_expr instead of | |
3987 | save_expr for the G++ extension. | |
3988 | ||
812c0795 JM |
3989 | 2018-02-13 Jason Merrill <jason@redhat.com> |
3990 | ||
9ef86762 JM |
3991 | PR c++/84080 - ICE with return type deduction and specialization. |
3992 | * pt.c (determine_specialization): Check uses_template_parms. | |
3993 | ||
29e10a68 JM |
3994 | Fix more variadic capture issues. |
3995 | * pt.c (find_parameter_packs_r): Also look at explicit captures. | |
3996 | (check_for_bare_parameter_packs): Check current_class_type for | |
3997 | lambda context. | |
3998 | (extract_locals_r): Handle seeing a full instantiation of a pack. | |
3999 | (tsubst_pack_expansion): Likewise. Force lambda capture. | |
4000 | * parser.c (cp_parser_lambda_introducer): Don't | |
4001 | check_for_bare_parameter_packs. | |
4002 | ||
812c0795 JM |
4003 | PR c++/84338 - wrong variadic sizeof. |
4004 | * pt.c (argument_pack_select_arg): Like the macro, but look through | |
4005 | a pack expansion. | |
4006 | (tsubst, tsubst_copy, dependent_template_arg_p): Use it. | |
4007 | (extract_fnparm_pack): Do make_pack_expansion. | |
4008 | (extract_locals_r): Do strip a pack expansion. | |
4009 | * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove. | |
4010 | ||
d69aeeee JJ |
4011 | 2018-02-12 Jakub Jelinek <jakub@redhat.com> |
4012 | ||
4013 | PR c++/84341 | |
4014 | * parser.c (cp_parser_binary_expression): Use build_min instead of | |
4015 | build2_loc to build the no_toplevel_fold_p toplevel binary expression. | |
4016 | ||
4ec4afa8 NS |
4017 | 2018-02-12 Nathan Sidwell <nathan@acm.org> |
4018 | ||
4019 | PR c++/84263 | |
4020 | * parser.c (cp_parser_decltype): Push and pop | |
4021 | deferring_access_checks. Reorganize to avoid goto. | |
4022 | ||
1e027956 RB |
4023 | 2018-02-12 Richard Biener <rguenther@suse.de> |
4024 | ||
4025 | PR c++/84281 | |
4026 | * constexpr.c (cxx_eval_vec_init_1): Use a RANGE_EXPR to compact | |
4027 | uniform constructors and delay allocating them fully. | |
4028 | ||
dc58fa9f JM |
4029 | 2018-02-09 Jason Merrill <jason@redhat.com> |
4030 | ||
4031 | PR c++/84036 - ICE with variadic capture. | |
4032 | Handle variadic capture proxies more like non-variadic. | |
4033 | * lambda.c (build_capture_proxy): Remove workaround. | |
4034 | * pt.c (find_parameter_packs_r): The proxy is a pack. | |
4035 | (instantiate_class_template_1): Remove dead lambda code. | |
4036 | (extract_fnparm_pack): Don't make_pack_expansion. | |
4037 | (extract_locals_r): Don't strip a pack expansion. | |
4038 | (tsubst_pack_expansion): Handle proxy packs. Use | |
4039 | PACK_EXPANSION_EXTRA_ARGS less. | |
4040 | (tsubst_decl) [FIELD_DECL]: Don't register_specialization. | |
4041 | (tsubst_copy) [FIELD_DECL]: Don't retrieve*_specialization. | |
4042 | [VAR_DECL]: Handle ARGUMENT_PACK_SELECT. | |
4043 | (tsubst_expr) [DECL_EXPR]: Handle proxy packs. | |
4044 | (tsubst_copy_and_build) [VAR_DECL]: Handle proxy packs normally. | |
4045 | ||
6724f8a6 JJ |
4046 | 2018-02-10 Jakub Jelinek <jakub@redhat.com> |
4047 | ||
4048 | PR sanitizer/83987 | |
4049 | * tree.c (cp_free_lang_data): Revert 2018-01-23 change. | |
4050 | ||
83fe399c JM |
4051 | 2018-02-09 Jason Merrill <jason@redhat.com> |
4052 | ||
4053 | PR c++/81917 - ICE with void_t and partial specialization. | |
4054 | * pt.c (instantiate_class_template_1): Set TYPE_BEING_DEFINED before | |
4055 | calling most_specialized_partial_spec. | |
4056 | ||
0444aa9c NS |
4057 | 2018-02-09 Nathan Sidwell <nathan@acm.org> |
4058 | ||
4059 | PR c/84293 | |
4060 | * typeck.c (cp_build_indirect_ref_1, build_reinterpret_cast_1): | |
4061 | Pass expr location to strict_aliasing_warning. | |
4062 | ||
dd2799cc JM |
4063 | 2018-02-09 Jason Merrill <jason@redhat.com> |
4064 | ||
4065 | PR c++/84296 - ICE with qualified-id in template. | |
4066 | PR c++/83714 | |
4067 | * pt.c (unknown_base_ref_p): New. | |
4068 | (instantiation_dependent_scope_ref_p): Use it instead of | |
4069 | any_dependent_bases_p. | |
4070 | ||
ebe4bf41 MP |
4071 | 2018-02-09 Marek Polacek <polacek@redhat.com> |
4072 | Jakub Jelinek <jakub@redhat.com> | |
4073 | ||
4074 | PR c++/83659 | |
4075 | * constexpr.c (cxx_fold_indirect_ref): Sync some changes from | |
4076 | fold_indirect_ref_1, including poly_*int64. Verify first that | |
4077 | tree_fits_poly_int64_p (op01). Formatting fixes. | |
4078 | ||
a7f8415c PC |
4079 | 2018-02-08 Paolo Carlini <paolo.carlini@oracle.com> |
4080 | ||
4081 | * constexpr.c (cxx_eval_component_reference): Use INDIRECT_REF_P. | |
4082 | * lambda.c (build_capture_proxy): Likewise. | |
4083 | * search.c (field_access_p): Likewise. | |
4084 | * semantics.c (omp_clause_decl, omp_privatize_field, | |
4085 | finish_omp_clauses): Likewise. | |
4086 | ||
73974561 PC |
4087 | 2018-02-08 Paolo Carlini <paolo.carlini@oracle.com> |
4088 | ||
4089 | PR c++/83806 | |
4090 | * typeck.c (decay_conversion): Use mark_rvalue_use for the special | |
4091 | case of nullptr too. | |
4092 | ||
a4296998 NS |
4093 | 2018-02-08 Nathan Sidwell <nathan@acm.org> |
4094 | ||
4095 | * class.c (finish_struct): Fix std:initializer_list diagnostic | |
4096 | formatting. | |
4097 | ||
66a90e86 PC |
4098 | 2018-02-08 Paolo Carlini <paolo.carlini@oracle.com> |
4099 | ||
4100 | PR c++/83204 | |
4101 | * pt.c (tsubst_copy_and_build): Use force_paren_expr for INDIRECT_REF. | |
4102 | ||
8f1f526b JJ |
4103 | 2018-02-07 Jakub Jelinek <jakub@redhat.com> |
4104 | ||
4105 | PR c++/84082 | |
4106 | * parser.c (cp_parser_dot_deref_incomplete): New function. | |
4107 | (cp_parser_postfix_dot_deref_expression): Use it. | |
4108 | ||
0d7d8e66 DM |
4109 | 2018-02-07 David Malcolm <dmalcolm@redhat.com> |
4110 | ||
4111 | PR c++/81610 | |
4112 | PR c++/80567 | |
4113 | * name-lookup.c (suggest_rid_p): New function. | |
4114 | (lookup_name_fuzzy): Replace enum-rid-filtering logic with call to | |
4115 | suggest_rid_p. | |
4116 | ||
828ca2ed JM |
4117 | 2018-02-07 Jason Merrill <jason@redhat.com> |
4118 | ||
4119 | PR c++/84182 - ICE with captured lambda | |
4120 | PR c++/84181 | |
4121 | * pt.c (extract_locals_r, extract_local_specs): New. | |
4122 | (tsubst_pack_expansion): Use them. | |
4123 | ||
43e4df5a ML |
4124 | 2018-02-07 Martin Liska <mliska@suse.cz> |
4125 | ||
4126 | PR c++/84059. | |
4127 | * class.c (add_method): Append argument value. | |
4128 | * cp-tree.h (maybe_version_functions): Add new argument. | |
4129 | * decl.c (decls_match): Call it if a declaration does not | |
4130 | have DECL_FUNCTION_VERSIONED. | |
4131 | (maybe_version_functions): record argument is added. | |
4132 | ||
5f25b464 MP |
4133 | 2018-02-05 Marek Polacek <polacek@redhat.com> |
4134 | ||
4135 | * class.c: Remove unused global variables. | |
4136 | (build_primary_vtable): Don't gather statistics. | |
4137 | (print_class_statistics): Remove. | |
4138 | * cp-tree.h (print_class_statistics): Remove. | |
4139 | * tree.c (cxx_print_statistics): Don't call print_class_statistics. | |
4140 | ||
7c30b12a PC |
4141 | 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com> |
4142 | ||
4143 | * class.c (is_really_empty_class): Use DECL_UNNAMED_BIT_FIELD. | |
4144 | * constexpr.c (cx_check_missing_mem_inits): Likewise. | |
4145 | * decl.c (next_initializable_field, find_decomp_class_base, | |
4146 | cp_finish_decomp): Likewise. | |
4147 | * typeck2.c (process_init_constructor_record): Likewise. | |
4148 | ||
b7d8e7e5 JM |
4149 | 2018-02-02 Jason Merrill <jason@redhat.com> |
4150 | ||
4151 | PR c++/84181 - ICE with lambda parm in template argument. | |
4152 | * tree.c (strip_typedefs_expr): Use cp_tree_operand_length. | |
4153 | ||
fe23b12a JM |
4154 | 2018-02-01 Jason Merrill <jason@redhat.com> |
4155 | ||
4156 | PR c++/84160 - ICE with nested variadic capture. | |
4157 | * lambda.c (is_capture_proxy_with_ref): New. | |
4158 | (insert_capture_proxy): Don't set DECL_CAPTURED_VARIABLE from a | |
4159 | COMPONENT_REF. | |
4160 | * expr.c (mark_use): Use is_capture_proxy_with_ref. | |
4161 | * constexpr.c (potential_constant_expression_1): Likewise. | |
4162 | * semantics.c (process_outer_var_ref): Likewise. | |
4163 | ||
d15f0fa7 MP |
4164 | 2018-02-01 Marek Polacek <polacek@redhat.com> |
4165 | ||
4166 | PR c++/84125 | |
4167 | * typeck.c (build_address): Relax the assert when | |
4168 | processing_template_decl. | |
4169 | ||
bfa28724 JM |
4170 | 2018-02-01 Jason Merrill <jason@redhat.com> |
4171 | ||
4172 | PR c++/84126 - ICE with variadic generic lambda | |
4173 | PR c++/84036 | |
4174 | PR c++/82249 | |
4175 | * pt.c (tsubst_pack_expansion): Handle function parameter_packs in | |
4176 | PACK_EXPANSION_EXTRA_ARGS. | |
4177 | ||
73b7d28f PC |
4178 | 2018-02-01 Paolo Carlini <paolo.carlini@oracle.com> |
4179 | ||
4180 | PR c++/83796 | |
4181 | * call.c (convert_like_real): If w're initializing from {} explicitly | |
4182 | call abstract_virtuals_error_sfinae. | |
4183 | ||
eddd715c JM |
4184 | 2018-01-31 Jason Merrill <jason@redhat.com> |
4185 | Jakub Jelinek <jakub@redhat.com> | |
4186 | ||
4187 | PR c++/83993 | |
4188 | * constexpr.c (cxx_eval_outermost_constant_expr): Build NOP_EXPR | |
4189 | around non-constant ADDR_EXPRs rather than clearing TREE_CONSTANT | |
4190 | on ADDR_EXPR. | |
4191 | ||
08b3748c JJ |
4192 | 2018-01-31 Jakub Jelinek <jakub@redhat.com> |
4193 | ||
4194 | PR c++/83993 | |
4195 | * constexpr.c (diag_array_subscript): Emit different diagnostics | |
4196 | if TYPE_DOMAIN (arraytype) is NULL. | |
4197 | (cxx_eval_array_reference, cxx_eval_store_expression): For arrays | |
4198 | with NULL TYPE_DOMAIN use size_zero_node as nelts. | |
4199 | ||
be197ade PC |
4200 | 2018-01-31 Paolo Carlini <paolo.carlini@oracle.com> |
4201 | ||
4202 | PR c++/84092 | |
4203 | * semantics.c (finish_qualified_id_expr): When handling an | |
4204 | UNBOUND_CLASS_TEMPLATE only adjust qualifying_class and expr. | |
4205 | ||
4ecd9c15 MP |
4206 | 2018-01-31 Marek Polacek <polacek@redhat.com> |
4207 | ||
4208 | PR c++/84138 | |
4209 | * cp-gimplify.c (cp_fold): Check if X is an error node before | |
4210 | calling useless_type_conversion_p. | |
4211 | ||
8d79f003 JM |
4212 | 2018-01-30 Jason Merrill <jason@redhat.com> |
4213 | ||
b1c7b29a JM |
4214 | PR c++/84091 - ICE with local class in lambda in template. |
4215 | * decl2.c (determine_visibility): Look for outer containing template | |
4216 | instantiation. | |
4217 | ||
8d79f003 JM |
4218 | PR c++/84098 - ICE with lambda in template NSDMI. |
4219 | * pt.c (instantiate_class_template_1): Ignore more lambdas. | |
4220 | ||
dcbb27dd JM |
4221 | 2018-01-29 Jason Merrill <jason@redhat.com> |
4222 | ||
4223 | PR c++/68810 - wrong location for reinterpret_cast error. | |
4224 | * cvt.c (cp_convert_to_pointer): Always build a CONVERT_EXPR when | |
4225 | !dofold. | |
4226 | ||
b07c3651 MP |
4227 | 2018-01-29 Marek Polacek <polacek@redhat.com> |
4228 | ||
4229 | PR c++/83996 | |
4230 | * constexpr.c (cxx_fold_indirect_ref): Compute ((foo *)&fooarray)[1] | |
4231 | => fooarray[1] in offset_int. | |
4232 | ||
82be290b JM |
4233 | 2018-01-29 Jason Merrill <jason@redhat.com> |
4234 | ||
4235 | PR c++/83942 - wrong unused warning with static_cast. | |
4236 | * cvt.c (ocp_convert): Call mark_rvalue_use. | |
4237 | ||
373d1f5f JM |
4238 | 2018-01-26 Jason Merrill <jason@redhat.com> |
4239 | ||
5bb1c2be JM |
4240 | PR c++/83956 - wrong dtor error with anonymous union |
4241 | * method.c (walk_field_subobs): Variant members only affect | |
4242 | deletedness. | |
4243 | (maybe_explain_implicit_delete): Pass &deleted_p for diagnostic. | |
4244 | ||
41d733d9 JM |
4245 | PR c++/84036 - ICE with variadic capture. |
4246 | PR c++/82249 | |
4247 | * pt.c (tsubst_pack_expansion): When optimizing a simple | |
4248 | substitution, pull a single pack expansion out of its pack. | |
4249 | ||
373d1f5f JM |
4250 | PR c++/82514 - ICE with local class in generic lambda. |
4251 | * pt.c (regenerated_lambda_fn_p): Remove. | |
4252 | (enclosing_instantiation_of): Don't use it. | |
4253 | (tsubst_function_decl): Call enclosing_instantiation_of. | |
4254 | ||
4255 | * pt.c (lookup_template_class_1): Add sanity check. | |
4256 | * name-lookup.c (do_pushtag): Don't add closures to local_classes. | |
4257 | ||
41df0109 JJ |
4258 | 2018-01-25 Jakub Jelinek <jakub@redhat.com> |
4259 | ||
4260 | PR c++/84031 | |
4261 | * decl.c (find_decomp_class_base): Ignore unnamed bitfields. Ignore | |
4262 | recursive calls that return ret. | |
4263 | (cp_finish_decomp): Ignore unnamed bitfields. | |
4264 | ||
018e9cb5 JM |
4265 | 2018-01-23 Jason Merrill <jason@redhat.com> |
4266 | ||
4267 | PR c++/82249 - wrong mismatched pack length error. | |
4268 | * pt.c (extract_fnparm_pack, tsubst_pack_expansion): Handle | |
4269 | unsubstituted function parameter pack. | |
4270 | ||
3885527d PC |
4271 | 2018-01-23 Paolo Carlini <paolo.carlini@oracle.com> |
4272 | ||
4273 | PR c++/83921 | |
4274 | * decl.c (check_for_uninitialized_const_var): Not static; add | |
4275 | bool and tsubst_flags_t parameters; adjust to be used both in | |
4276 | constexpr context and not. | |
4277 | * constexpr.c (potential_constant_expression_1): Use the above. | |
4278 | * cp-tree.h (check_for_uninitialized_const_var): Declare. | |
4279 | ||
d78201d3 JM |
4280 | 2018-01-23 Jason Merrill <jason@redhat.com> |
4281 | ||
4282 | PR c++/83947 - ICE with auto declarations. | |
4283 | * pt.c (do_auto_deduction): Don't deduce from an auto decl. | |
4284 | * decl.c (undeduced_auto_decl): Limit to vars and fns. | |
4285 | ||
7c719d08 DM |
4286 | 2018-01-23 David Malcolm <dmalcolm@redhat.com> |
4287 | ||
4288 | PR c++/83974 | |
4289 | * pt.c (tsubst_copy_and_build) <CONSTRUCTOR>: Remove early bailout | |
4290 | for pointer to member function types. | |
4291 | ||
508d0c3d JJ |
4292 | 2018-01-23 Jakub Jelinek <jakub@redhat.com> |
4293 | ||
4294 | PR sanitizer/83987 | |
4295 | * tree.c (cp_free_lang_data): Change DECL_VALUE_EXPR of | |
4296 | DECL_OMP_PRIVATIZED_MEMBER vars to error_mark_node. | |
4297 | ||
66ce8ff7 NS |
4298 | 2018-01-23 Nathan Sidwell <nathan@acm.org> |
4299 | ||
4300 | PR c++/83988 | |
4301 | * pt.c (tsubst_baselink): Remove optype assert. | |
4302 | * ptree.c (cxx_print_xnode): <case BASELINK> Print BASELINK_OPTYPE. | |
4303 | ||
941ae8b4 JJ |
4304 | 2018-01-23 Jakub Jelinek <jakub@redhat.com> |
4305 | ||
4306 | PR c++/83958 | |
4307 | * decl.c (cp_finish_decomp): Diagnose if reference structure binding | |
4308 | refers to incomplete type. | |
4309 | ||
d55d1e4f NS |
4310 | 2018-01-23 Nathan Sidwell <nathan@acm.org> |
4311 | ||
4312 | Deprecate ARM-era for scope handling | |
4313 | * decl.c (poplevel): Flag_new_for_scope is a boolean-like. | |
4314 | (cxx_init_decl_processing): Deprecate flag_new_for_scope being | |
4315 | cleared. | |
4316 | * name-lookup.c (check_for_out_of_scope_variable): Deprecate and | |
4317 | cleanup handling. | |
4318 | * semantics.c (begin_for_scope): Flag_new_for_scope is | |
4319 | boolean-like. | |
4320 | (finish_for_stmt, begin_range_for_stmt): Likewise. | |
4321 | ||
1fcaa1eb JM |
4322 | 2018-01-22 Jason Merrill <jason@redhat.com> |
4323 | ||
c3b56023 JM |
4324 | PR c++/83720 |
4325 | * decl2.c (determine_visibility): Fix template_decl handling | |
4326 | instead of blocking it. | |
4327 | ||
1fcaa1eb JM |
4328 | PR c++/83720 - ICE with lambda and LTO. |
4329 | * decl2.c (determine_visibility): Clear template_decl for | |
4330 | function-scope decls. Propagate anonymous linkage from containing | |
4331 | function. | |
4332 | ||
f25d7e06 MP |
4333 | 2018-01-22 Marek Polacek <polacek@redhat.com> |
4334 | ||
4335 | PR c++/81933 | |
4336 | * typeck2.c (split_nonconstant_init_1): Return false if we didn't | |
4337 | split out anything. | |
1fcaa1eb | 4338 | |
74e95ed0 VV |
4339 | 2018-01-22 Ville Voutilainen <ville.voutilainen@gmail.com> |
4340 | ||
4341 | PR c++/83895 | |
74e95ed0 VV |
4342 | * decl.c (grokdeclarator): Don't diagnose extra parens |
4343 | on typedefs. | |
4344 | ||
e6f97c3f JJ |
4345 | 2018-01-19 Jakub Jelinek <jakub@redhat.com> |
4346 | ||
1c9a0251 JJ |
4347 | PR c++/81167 |
4348 | * call.c (joust): Use TREE_TYPE (source) if source is | |
4349 | a POINTER_TYPE_P rather than if ! DECL_CONSTRUCTOR_P (w->fn). | |
4350 | ||
e6f97c3f JJ |
4351 | PR c++/83919 |
4352 | * typeck.c (convert_for_assignment): Suppress warn_ignored_qualifiers | |
4353 | for direct enum init. | |
4354 | * decl.c (reshape_init): Likewise. | |
4355 | ||
dba99244 MP |
4356 | 2018-01-19 Marek Polacek <polacek@redhat.com> |
4357 | ||
4358 | * constexpr.c (fold_simple): Simplify. | |
4359 | ||
b4cda6a6 JM |
4360 | 2018-01-18 Jason Merrill <jason@redhat.com> |
4361 | ||
4362 | PR c++/83714 | |
4363 | * search.c (any_dependent_bases_p): Handle null TREE_BINFO. | |
4364 | * pt.c (instantiation_dependent_scope_ref_p): True if | |
4365 | any_dependent_bases_p. | |
4366 | ||
48cdaab9 PC |
4367 | 2018-01-18 Paolo Carlini <paolo.carlini@oracle.com> |
4368 | ||
4369 | * cp-tree.h: Fix comment typo (DECL_NON_TRIVIALLY_INITIALIZED_P | |
4370 | vs DECL_NONTRIVIALLY_INITIALIZED_P). | |
4371 | ||
d3a9902e JM |
4372 | 2018-01-18 Jason Merrill <jason@redhat.com> |
4373 | ||
4374 | PR c++/82461 - constexpr list-initialized member | |
4375 | * constexpr.c (potential_constant_expression_1): Check | |
4376 | TARGET_EXPR_DIRECT_INIT_P. | |
4377 | ||
50b27938 PC |
4378 | 2018-01-18 Paolo Carlini <paolo.carlini@oracle.com> |
4379 | ||
4380 | PR c++/81013 | |
4381 | * decl.c (xref_basetypes): Early return upon error about derived | |
4382 | union. | |
4383 | ||
5a752e3f NS |
4384 | 2018-01-18 Nathan Sidwell <nathan@acm.org> |
4385 | ||
4386 | PR c++/83160 | |
4387 | * cp-tree.h (mark_use): Declare. | |
4388 | * expr.c (mark_use): Make extern. | |
4389 | * call.c (direct_reference_binding): Set inner conv's | |
4390 | rvaluedness_matches_p, if it is an identity. | |
4391 | (convert_like_real): Mark lvalue or rvalue use for identity as | |
4392 | rvaledness_matches_p demands. | |
4393 | ||
cfb14840 JJ |
4394 | 2018-01-18 Jakub Jelinek <jakub@redhat.com> |
4395 | ||
4396 | PR c++/83824 | |
4397 | * parser.c (attr_chainon): New function. | |
4398 | (cp_parser_label_for_labeled_statement, cp_parser_decl_specifier_seq, | |
4399 | cp_parser_namespace_definition, cp_parser_init_declarator, | |
4400 | cp_parser_type_specifier_seq, cp_parser_parameter_declaration, | |
4401 | cp_parser_gnu_attributes_opt): Use it. | |
4402 | (cp_parser_member_declaration, cp_parser_objc_class_ivars, | |
4403 | cp_parser_objc_struct_declaration): Likewise. Don't reset | |
4404 | prefix_attributes if attributes is error_mark_node. | |
4405 | ||
a533fc76 PC |
4406 | 2018-01-17 Paolo Carlini <paolo.carlini@oracle.com> |
4407 | ||
4408 | PR c++/78344 | |
4409 | * decl.c (grokdeclarator): Do not append the error_mark_node | |
4410 | due to an erroneous optional attribute-specifier-seq. | |
4411 | ||
78a5fce0 JJ |
4412 | 2018-01-17 Jakub Jelinek <jakub@redhat.com> |
4413 | ||
4414 | PR c++/83897 | |
4415 | * cp-gimplify.c (cp_maybe_instrument_return): Handle | |
4416 | CLEANUP_POINT_EXPR. | |
4417 | ||
9638f320 PC |
4418 | 2018-01-17 Paolo Carlini <paolo.carlini@oracle.com> |
4419 | ||
4420 | PR c++/81054 | |
4421 | * constexpr.c (ensure_literal_type_for_constexpr_object): Return | |
4422 | error_mark_node when we give an error. | |
4423 | * decl.c (cp_finish_decl): Use the latter. | |
4424 | ||
4436a3ce NS |
4425 | 2018-01-17 Nathan Sidwell <nathan@acm.org> |
4426 | ||
4427 | PR c++/83287 | |
4428 | * init.c (build_raw_new_expr): Scan list for lookups to keep. | |
4429 | ||
bb9869d5 DM |
4430 | 2018-01-17 David Malcolm <dmalcolm@redhat.com> |
4431 | ||
4432 | PR c++/83814 | |
4433 | * expr.c (fold_for_warn): Move from c-common.c, reducing to just | |
4434 | the C++ part. If processing a template, call | |
4435 | fold_non_dependent_expr rather than fully folding. | |
4436 | ||
d2edcd70 JM |
4437 | 2018-01-17 Jason Merrill <jason@redhat.com> |
4438 | ||
4439 | PR c++/81067 - redundant NULL warning. | |
4440 | * call.c (convert_like_real): Restore null_node handling. | |
4441 | ||
2625472f JM |
4442 | 2018-01-17 Jason Merrill <jason@redhat.com> |
4443 | ||
4444 | PR c++/81843 - ICE with variadic member template. | |
4445 | PR c++/72801 | |
4446 | * pt.c (unify_pack_expansion): Don't try to deduce enclosing | |
4447 | template args. | |
4448 | ||
ab612f39 DM |
4449 | 2018-01-17 David Malcolm <dmalcolm@redhat.com> |
4450 | ||
4451 | PR c++/83799 | |
4452 | * pt.c (type_dependent_expression_p): Strip any location wrapper | |
4453 | before testing tree codes. | |
4454 | (selftest::test_type_dependent_expression_p): New function. | |
4455 | (selftest::cp_pt_c_tests): Call it. | |
4456 | ||
f0fbe57d NS |
4457 | 2018-01-17 Nathan Sidwell <nathan@acm.org> |
4458 | ||
4459 | PR c++/83739 | |
4460 | * pt.c (tsubst_expr) <case RANGE_FOR_STMT>: Rebuild a range_for if | |
4461 | this not a final instantiation. | |
4462 | ||
035181c3 JM |
4463 | 2018-01-16 Jason Merrill <jason@redhat.com> |
4464 | ||
4465 | PR c++/83714 - ICE checking return in template. | |
4466 | * typeck.c (check_return_expr): Call build_non_dependent_expr. | |
4467 | ||
774ae645 JJ |
4468 | 2018-01-16 Jakub Jelinek <jakub@redhat.com> |
4469 | ||
2bbc5c34 JJ |
4470 | PR c++/83817 |
4471 | * pt.c (tsubst_copy_and_build) <case CALL_EXPR>: If function | |
4472 | is AGGR_INIT_EXPR rather than CALL_EXPR, set AGGR_INIT_FROM_THUNK_P | |
4473 | instead of CALL_FROM_THUNK_P. | |
4474 | ||
774ae645 JJ |
4475 | PR c++/83825 |
4476 | * name-lookup.c (member_vec_dedup): Return early if len is 0. | |
4477 | (resort_type_member_vec, set_class_bindings, | |
4478 | insert_late_enum_def_bindings): Use vec qsort method instead of | |
4479 | calling qsort directly. | |
4480 | ||
66a366a0 MS |
4481 | 2018-01-15 Martin Sebor <msebor@redhat.com> |
4482 | ||
4483 | PR c++/83588 | |
4484 | * class.c (find_flexarrays): Make a record of multiple flexible array | |
4485 | members. | |
4486 | ||
abdca01e JM |
4487 | 2018-01-12 Jason Merrill <jason@redhat.com> |
4488 | ||
4489 | PR c++/83186 - ICE with static_cast of list-initialized temporary. | |
4490 | * typeck.c (build_static_cast): Use build_non_dependent_expr. | |
4491 | ||
b8461915 NS |
4492 | 2018-01-12 Nathan Sidwell <nathan@acm.org> |
4493 | ||
4494 | * cp-tree.h (mark_rvalue_use): Add parm name. | |
4495 | * expr.c (mark_lvalue_use, mark_lvalue_use_nonread): Move next to | |
4496 | mark_rvalue_use. | |
4497 | * call.c (convert_like_real): Fix formatting. | |
4498 | ||
03943bbd JM |
4499 | 2018-01-11 Jason Merrill <jason@redhat.com> |
4500 | ||
4501 | PR c++/82728 - wrong -Wunused-but-set-variable | |
4502 | PR c++/82799 | |
4503 | PR c++/83690 | |
4504 | * call.c (perform_implicit_conversion_flags): Call mark_rvalue_use. | |
4505 | * decl.c (case_conversion): Likewise. | |
4506 | * semantics.c (finish_static_assert): Call | |
4507 | perform_implicit_conversion_flags. | |
4508 | ||
2a3af45c NS |
4509 | 2018-01-11 Nathan Sidwell <nathan@acm.org> |
4510 | ||
4511 | * method.c (enum mangling_flags): Delete long-dead enum. | |
4512 | ||
d90a2542 PC |
4513 | 2018-01-10 Paolo Carlini <paolo.carlini@oracle.com> |
4514 | ||
4515 | * parser.c (cp_parser_std_attribute_spec): When | |
92a285c1 | 4516 | token_pair::require_open / require_close return false simply |
d90a2542 PC |
4517 | return error_mark_node, avoid duplicate cp_parser_error about |
4518 | expected '(' / ')', respectively. | |
4519 | ||
9a004410 DM |
4520 | 2018-01-10 David Malcolm <dmalcolm@redhat.com> |
4521 | ||
4522 | PR c++/43486 | |
4523 | * call.c (null_ptr_cst_p): Strip location wrappers when | |
4524 | converting from '0' to a pointer type in C++11 onwards. | |
4525 | (conversion_null_warnings): Replace comparison with null_node with | |
4526 | call to null_node_p. | |
4527 | (build_over_call): Likewise. | |
4528 | * cp-gimplify.c (cp_fold): Remove the early bailout when | |
4529 | processing_template_decl. | |
4530 | * cp-lang.c (selftest::run_cp_tests): Call | |
4531 | selftest::cp_pt_c_tests and selftest::cp_tree_c_tests. | |
4532 | * cp-tree.h (cp_expr::maybe_add_location_wrapper): New method. | |
4533 | (selftest::run_cp_tests): Move decl to bottom of file. | |
4534 | (null_node_p): New inline function. | |
4535 | (selftest::cp_pt_c_tests): New decl. | |
4536 | (selftest::cp_tree_c_tests): New decl. | |
4537 | * cvt.c (build_expr_type_conversion): Replace comparison with | |
4538 | null_node with call to null_node_p. | |
4539 | * error.c (args_to_string): Likewise. | |
4540 | * except.c (build_throw): Likewise. | |
4541 | * mangle.c (write_expression): Skip location wrapper nodes. | |
4542 | * parser.c (literal_integer_zerop): New function. | |
4543 | (cp_parser_postfix_expression): Call maybe_add_location_wrapper on | |
4544 | the result for RID_TYPEID. Pass true for new "wrap_locations_p" | |
4545 | param of cp_parser_parenthesized_expression_list. When calling | |
4546 | warn_for_memset, replace integer_zerop calls with | |
4547 | literal_integer_zerop, eliminating the double logical negation | |
4548 | cast to bool. Eliminate the special-casing for CONST_DECL in | |
4549 | favor of the fold_for_warn within warn_for_memset. | |
4550 | (cp_parser_parenthesized_expression_list): Add "wrap_locations_p" | |
4551 | param, defaulting to false. Convert "expr" to a cp_expr, and call | |
4552 | maybe_add_location_wrapper on it when wrap_locations_p is true. | |
4553 | (cp_parser_unary_expression): Call maybe_add_location_wrapper on | |
4554 | the result for RID_ALIGNOF and RID_SIZEOF. | |
4555 | (cp_parser_builtin_offsetof): Likewise. | |
4556 | * pt.c: Include "selftest.h". | |
4557 | (tsubst_copy): Handle location wrappers. | |
4558 | (tsubst_copy_and_build): Likewise. | |
4559 | (build_non_dependent_expr): Likewise. | |
4560 | (selftest::test_build_non_dependent_expr): New function. | |
4561 | (selftest::cp_pt_c_tests): New function. | |
4562 | * tree.c: Include "selftest.h". | |
4563 | (lvalue_kind): Handle VIEW_CONVERT_EXPR location wrapper nodes. | |
4564 | (selftest::test_lvalue_kind): New function. | |
4565 | (selftest::cp_tree_c_tests): New function. | |
4566 | * typeck.c (string_conv_p): Strip any location wrapper from "exp". | |
4567 | (cp_build_binary_op): Replace comparison with null_node with call | |
4568 | to null_node_p. | |
4569 | (build_address): Use location of operand when building address | |
4570 | expression. | |
4571 | ||
6bebae75 MP |
4572 | 2018-01-10 Marek Polacek <polacek@redhat.com> |
4573 | ||
4574 | PR c++/82541 | |
4575 | * call.c (build_conditional_expr_1): Check complain before warning. | |
4576 | * pt.c (tsubst_copy_and_build) <case COND_EXPR>: Suppress | |
4577 | -Wduplicated-branches. | |
4578 | ||
e99ef408 JJ |
4579 | 2018-01-10 Jakub Jelinek <jakub@redhat.com> |
4580 | ||
4581 | PR c++/81327 | |
4582 | * call.c (maybe_warn_class_memaccess): Add forward declaration. | |
4583 | Change last argument from tree * to const vec<tree, va_gc> *, adjust | |
4584 | args uses and check number of operands too. Don't strip away any | |
4585 | nops. Use maybe_constant_value when looking for INTEGER_CST args. | |
4586 | Deal with src argument not having pointer type. Check | |
4587 | tree_fits_uhwi_p before calling tree_to_uhwi. Remove useless | |
4588 | test. | |
4589 | (build_over_call): Call maybe_warn_class_memaccess here on the | |
4590 | original arguments. | |
4591 | (build_cxx_call): Rather than here on converted arguments. | |
4592 | ||
143aa5cc PC |
4593 | 2018-01-10 Paolo Carlini <paolo.carlini@oracle.com> |
4594 | ||
4595 | PR c++/81055 | |
4596 | * init.c (build_vec_init): Avoid building an INIT_EXPR with | |
4597 | error_mark_node as second argument. | |
4598 | ||
6ef72c36 JJ |
4599 | 2018-01-09 Jakub Jelinek <jakub@redhat.com> |
4600 | ||
4601 | PR c++/83734 | |
4602 | * constexpr.c (cxx_eval_statement_list): Ignore DEBUG_BEGIN_STMTs | |
4603 | in STATEMENT_LIST. Remove unneeded assert. | |
4604 | ||
928686b1 RS |
4605 | 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org> |
4606 | Alan Hayward <alan.hayward@arm.com> | |
4607 | David Sherwood <david.sherwood@arm.com> | |
4608 | ||
4609 | * constexpr.c (cxx_eval_array_reference): Handle polynomial | |
4610 | VECTOR_CST_NELTS. | |
4611 | (cxx_fold_indirect_ref): Handle polynomial TYPE_VECTOR_SUBPARTS. | |
4612 | * call.c (build_conditional_expr_1): Likewise. | |
4613 | * decl.c (cp_finish_decomp): Likewise. | |
4614 | * mangle.c (write_type): Likewise. | |
4615 | * typeck.c (structural_comptypes): Likewise. | |
4616 | (cp_build_binary_op): Likewise. | |
4617 | * typeck2.c (process_init_constructor_array): Likewise. | |
4618 | ||
830421fc JJ |
4619 | 2018-01-03 Jakub Jelinek <jakub@redhat.com> |
4620 | ||
4621 | PR c++/83555 | |
4622 | * typeck.c (build_static_cast_1): For static casts to reference types, | |
4623 | call build_base_path with flag_delete_null_pointer_checks as nonnull | |
4624 | instead of always false. When -fsanitize=null, call | |
4625 | ubsan_maybe_instrument_reference on the NULL reference INTEGER_CST. | |
4626 | * cp-gimplify.c (cp_genericize_r): Don't walk subtrees of UBSAN_NULL | |
4627 | call if the first argument is INTEGER_CST with REFERENCE_TYPE. | |
4628 | ||
ce473498 NS |
4629 | 2018-01-03 Nathan Sidwell <nathan@acm.org> |
4630 | ||
4631 | PR c++/83667 | |
4632 | * method.c (make_alias_for): Copy DECL_CONTEXT. | |
4633 | ||
e164534f MP |
4634 | 2018-01-03 Marek Polacek <polacek@redhat.com> |
4635 | ||
4636 | PR c++/83592 | |
4637 | * decl.c (grokdeclarator): Don't warn about MVP in typename context. | |
4638 | ||
85ec4feb JJ |
4639 | 2018-01-03 Jakub Jelinek <jakub@redhat.com> |
4640 | ||
e30947eb JJ |
4641 | PR preprocessor/83602 |
4642 | * name-lookup.c (lookup_name_fuzzy): Don't use macro_use_before_def | |
4643 | for builtin macros. | |
4644 | ||
19c37faa JJ |
4645 | PR c++/83634 |
4646 | * cp-gimplify.c (cp_fold) <case NOP_EXPR>: If the operand folds to | |
4647 | error_mark_node, return error_mark_node. | |
4648 | ||
85ec4feb JJ |
4649 | Update copyright years. |
4650 | ||
0a552ae2 JJ |
4651 | 2018-01-02 Jakub Jelinek <jakub@redhat.com> |
4652 | ||
4653 | PR c++/83556 | |
4654 | * tree.c (replace_placeholders_r): Pass NULL as last argument to | |
4655 | cp_walk_tree instead of d->pset. If non-TREE_CONSTANT and | |
4656 | non-PLACEHOLDER_EXPR tree has been seen already, set *walk_subtrees | |
4657 | to false and return. | |
4658 | (replace_placeholders): Pass NULL instead of &pset as last argument | |
4659 | to cp_walk_tree. | |
4660 | ||
0e038601 NS |
4661 | 2018-01-02 Nathan Sidwell <nathan@acm.org> |
4662 | ||
4663 | * constexpr.c (cxx_bind_parameters_in_call): Remove unneeded local | |
4664 | lval var. | |
ad41bd84 | 4665 | \f |
85ec4feb | 4666 | Copyright (C) 2018 Free Software Foundation, Inc. |
ad41bd84 JM |
4667 | |
4668 | Copying and distribution of this file, with or without modification, | |
4669 | are permitted in any medium without royalty provided the copyright | |
4670 | notice and this notice are preserved. |