111
|
1 2015-12-24 Jason Merrill <jason@redhat.com>
|
|
2
|
|
3 PR c++/69005
|
|
4 * call.c (add_template_candidate_real): Don't try to deduce X(X).
|
|
5
|
|
6 2015-12-22 Jason Merrill <jason@redhat.com>
|
|
7
|
|
8 PR c++/66921
|
|
9 * decl.c (cp_complete_array_type): Allow an initializer that
|
|
10 already has array type.
|
|
11
|
|
12 PR c++/67257
|
|
13 * parser.c (cp_parser_single_declaration): Reject a class template
|
|
14 that also declares a variable.
|
|
15
|
|
16 PR c++/67339
|
|
17 * parser.c (cp_parser_elaborated_type_specifier): Use CLASS_TYPE_P
|
|
18 rather than check for RECORD_TYPE.
|
|
19
|
|
20 2015-12-22 Patrick Palka <ppalka@gcc.gnu.org>
|
|
21
|
|
22 * pt.c (make_pack_expansion): Make sure to initialize
|
|
23 ppd.type_pack_expansion_p.
|
|
24
|
|
25 2015-12-21 David Malcolm <dmalcolm@redhat.com>
|
|
26
|
|
27 * typeck.c (cp_build_binary_op): Update for change in signature
|
|
28 of build_binary_op. Use error_at to replace an implicit use
|
|
29 of input_location with param "location" in "invalid operands"
|
|
30 error.
|
|
31 (cp_build_binary_op): Replace an error with an error_at, using
|
|
32 "location", rather than implicitly using input_location.
|
|
33
|
|
34 2015-12-20 Jason Merrill <jason@redhat.com>
|
|
35
|
|
36 PR c++/67411
|
|
37 * decl2.c (decl_maybe_constant_var_p): Use DECL_HAS_VALUE_EXPR_P.
|
|
38
|
|
39 PR c++/67411
|
|
40 * lambda.c (generic_lambda_fn_p): Split out from...
|
|
41 (maybe_add_lambda_conv_op): ...here.
|
|
42 * semantics.c (process_outer_var_ref): Don't defer maybe-constant
|
|
43 variables in a generic lambda.
|
|
44 * pt.c (instantiate_non_dependent_or_null): New.
|
|
45 * init.c (constant_value_1): Use it.
|
|
46 * cp-tree.h: Declare it and generic_lambda_fn_p.
|
|
47
|
|
48 PR c++/67411
|
|
49 * decl2.c (decl_maybe_constant_var_p): A proxy isn't constant.
|
|
50
|
|
51 2015-12-18 Patrick Palka <ppalka@gcc.gnu.org>
|
|
52
|
|
53 PR c++/68978
|
|
54 * tree.c (lvalue_kind) [MODOP_EXPR]: New case.
|
|
55
|
|
56 2015-12-18 Paolo Carlini <paolo.carlini@oracle.com>
|
|
57
|
|
58 PR c++/67592
|
|
59 * decl.c (grokdeclarator): Reject constexpr virtual member functions;
|
|
60 in error messages, prefer %<virtual%> and %<constexpr%> to virtual
|
|
61 and constexpr, respectively.
|
|
62
|
|
63 2015-12-18 Patrick Palka <ppalka@gcc.gnu.org>
|
|
64
|
|
65 PR c++/68831
|
|
66 * init.c (build_delete): Use a warning sentinel to disable
|
|
67 -Waddress warnings when building the conditional that tests
|
|
68 if the operand is NULL.
|
|
69
|
|
70 2015-12-17 Jason Merrill <jason@redhat.com>
|
|
71
|
|
72 PR c++/67550
|
|
73 * init.c (constant_value_1): Don't return a CONSTRUCTOR missing
|
|
74 non-constant elements.
|
|
75
|
|
76 PR c++/67576
|
|
77 PR c++/25466
|
|
78 * rtti.c (build_typeid): Use save_expr, not stabilize_reference.
|
|
79
|
|
80 2015-12-16 Patrick Palka <ppalka@gcc.gnu.org>
|
|
81
|
|
82 PR c++/16333
|
|
83 PR c++/41426
|
|
84 PR c++/59879
|
|
85 PR c++/66895
|
|
86 * typeck.c (convert_for_initialization): Don't perform an early
|
|
87 decaying conversion if converting to a class type.
|
|
88
|
|
89 2015-12-16 Patrick Palka <ppalka@gcc.gnu.org>
|
|
90
|
|
91 * tree.c (cp_tree_operand_length): Define in terms of
|
|
92 cp_tree_code_length.
|
|
93
|
|
94 2015-12-16 Martin Sebor <msebor@redhat.com>
|
|
95
|
|
96 PR objc++/68932
|
|
97 * decl.c (grokdeclarator): Avoid assuming ctype is non-null when
|
|
98 checking the validity of a flexible array member.
|
|
99
|
|
100 2015-12-16 Paolo Carlini <paolo.carlini@oracle.com>
|
|
101
|
|
102 * pt.c (comp_template_args): Remove.
|
|
103 (comp_template_args_with_info): Rename to comp_template_args;
|
|
104 not static.
|
|
105 (add_pending_template): Adjust call.
|
|
106 * cp-tree.h (comp_template_args): Add default arguments.
|
|
107
|
|
108 2015-12-16 Jason Merrill <jason@redhat.com>
|
|
109
|
|
110 PR c++/68309
|
|
111 * pt.c (instantiate_decl): Revert earlier change.
|
|
112
|
|
113 PR c++/63628
|
|
114 * pt.c (tsubst_pack_expansion): Also make dummy decls if
|
|
115 retrieve_local_specialization fails.
|
|
116
|
|
117 2015-12-16 David Malcolm <dmalcolm@redhat.com>
|
|
118
|
|
119 * parser.c (cp_lexer_peek_conflict_marker): New function.
|
|
120 (cp_parser_error): Detect conflict markers and report them as
|
|
121 such.
|
|
122
|
|
123 2015-12-15 Martin Sebor <msebor@redhat.com>
|
|
124
|
|
125 PR c++/42121
|
|
126 PR c++/68478
|
|
127 PR c++/68613
|
|
128 PR c++/68689
|
|
129 PR c++/68710
|
|
130 * class.c (walk_subobject_offsets): Avoid assuming type domain
|
|
131 is non-null or has an upper bound.
|
|
132 (layout_class_type): Include type size in error message.
|
|
133 (flexmems_t): New type.
|
|
134 (field_nonempty_p, find_flexarrays, diagnose_flexarrays)
|
|
135 (check_flexarrays): New functions.
|
|
136 (finish_struct_1): Call check_flexarrays.
|
|
137 * decl.c (compute_array_index_type): Distinguish flexible array
|
|
138 members from zero-length arrays.
|
|
139 (grokdeclarator): Reject flexible array members in unions. Avoid
|
|
140 rejecting members of incomplete types that are flexible array members.
|
|
141 * error.c (dump_type_suffix): Handle flexible array members with null
|
|
142 upper bound.
|
|
143 * init.c (perform_member_init): Same.
|
|
144 * pt.c (instantiate_class_template_1): Allow flexible array members.
|
|
145 (tsubst): Handle flexible array members with null upper bound.
|
|
146 * typeck2.c (digest_init_r): Warn for initialization of flexible
|
|
147 array members.
|
|
148 (process_init_constructor_record): Handle flexible array members.
|
|
149
|
|
150 2015-12-15 Patrick Palka <ppalka@gcc.gnu.org>
|
|
151
|
|
152 PR c++/21802
|
|
153 PR c++/53223
|
|
154 * cp-tree.h (cp_tree_code_length): Declare.
|
|
155 (build_min_non_dep_op_overload): Declare.
|
|
156 * tree.c (cp_tree_code_length): Define.
|
|
157 (build_min_non_dep_op_overload): Define.
|
|
158 (build_win_non_dep_call_vec): Copy the KOENIG_LOOKUP_P flag.
|
|
159 * typeck.c (build_x_indirect_ref): Use
|
|
160 build_min_non_dep_op_overload when the given expression
|
|
161 has been resolved to an operator overload.
|
|
162 (build_x_binary_op): Likewise.
|
|
163 (build_x_array_ref): Likewise.
|
|
164 (build_x_unary_op): Likewise.
|
|
165 (build_x_compound_expr): Likewise.
|
|
166 (build_x_modify_expr): Likewise.
|
|
167 * decl2.c (grok_array_decl): Likewise.
|
|
168 * call.c (build_new_op_1): If during template processing we
|
|
169 chose an operator overload that is a hidden friend function, set
|
|
170 the call's KOENIG_LOOKUP_P flag to 1.
|
|
171
|
|
172 2015-12-14 Jason Merrill <jason@redhat.com>
|
|
173
|
|
174 PR c++/68309
|
|
175 * pt.c (instantiate_decl): Copy local_specializations for nested
|
|
176 function.
|
|
177
|
|
178 2015-12-09 Paolo Carlini <paolo.carlini@oracle.com>
|
|
179
|
|
180 PR c++/60218
|
|
181 * semantics.c (calculate_bases_helper): Don't call dfs_walk_all
|
|
182 when TYPE_BINFO (type) is null.
|
|
183 (calculate_bases): Handle gracefully a null vector->length ().
|
|
184
|
|
185 2015-12-08 Martin Sebor <msebor@redhat.com>
|
|
186
|
|
187 PR c++/68711
|
|
188 * typeck.c (build_class_member_access_expr): Strip NOPs before
|
|
189 testing a potentially null operand for equality to zero.
|
|
190
|
|
191 2015-12-07 Jakub Jelinek <jakub@redhat.com>
|
|
192
|
|
193 PR c++/68760
|
|
194 * error.c (dump_global_iord): Use DECL_SOURCE_FILE (t)
|
|
195 instead of LOCATION_FILE (input_location).
|
|
196
|
|
197 2015-12-07 Ryan Burn <contact@rnburn.com>
|
|
198
|
|
199 PR c++/68683
|
|
200 * constraint.cc (satisfy_argument_deduction_constraint): Set
|
|
201 TYPE_CANONICAL to NULL_TREE if PLACEHOLDER_TYPE_CONSTRAINTS are
|
|
202 changed.
|
|
203
|
|
204 2015-12-07 Jason Merrill <jason@redhat.com>
|
|
205
|
|
206 PR c++/68464
|
|
207 * cp-gimplify.c (cp_fold): Don't assume X has TREE_TYPE.
|
|
208 (cp_genericize): Don't do cp_fold_r here.
|
|
209 (cp_fold_function): New.
|
|
210 * cp-tree.h: Declare it.
|
|
211 * decl.c (finish_function): Call it and the pre-genericize plugin
|
|
212 before NRV processing.
|
|
213
|
|
214 PR c++/68170
|
|
215 * pt.c (maybe_new_partial_specialization): The injected-class-name
|
|
216 is not a new partial specialization.
|
|
217
|
|
218 * Make-lang.in (check-c++1z, check-c++-all): Use GXX_TESTSUITE_STDS.
|
|
219
|
|
220 2015-12-06 Jason Merrill <jason@redhat.com>
|
|
221
|
|
222 * parser.c (struct tentative_firewall): New.
|
|
223 (cp_parser_template_id, cp_parser_decltype_expr): Use it.
|
|
224
|
|
225 * parser.h (struct cp_token): Tell GTY that CPP_DECLTYPE uses
|
|
226 tree_check_value.
|
|
227 * parser.c (cp_parser_decltype): Use tree_check_value.
|
|
228 (saved_checks_value): New.
|
|
229 (cp_parser_nested_name_specifier_opt): Use it.
|
|
230 (cp_parser_template_id): Use it.
|
|
231 (cp_parser_simple_type_specifier): Use it.
|
|
232 (cp_parser_pre_parsed_nested_name_specifier): Use it.
|
|
233
|
|
234 * semantics.c (finish_qualified_id_expr): Handle
|
|
235 UNBOUND_CLASS_TEMPLATE.
|
|
236
|
|
237 * parser.c (cp_parser_template_argument): Handle references in
|
|
238 C++1z mode.
|
|
239 * constexpr.c (potential_constant_expression_1): Don't error about
|
|
240 TREE_THIS_VOLATILE on declarations.
|
|
241 [COMPONENT_REF]: Don't consider the object if we're dealing with
|
|
242 an overloaded function.
|
|
243
|
|
244 * constraint.cc (strictly_subsumes): New.
|
|
245 * cp-tree.h: Declare it.
|
|
246 * pt.c (process_partial_specialization): Use it instead of
|
|
247 subsumes_constraints.
|
|
248 (maybe_new_partial_specialization): Do compare null constraints.
|
|
249 * search.c (lookup_member): Handle currently_open_class returning null.
|
|
250
|
|
251 PR c++/68597, fix auto9.C and auto-neg1.C with -std=c++1z.
|
|
252 * decl.c (check_tag_decl): Use ds_type_spec in auto diagnostic.
|
|
253 * typeck.c (check_return_expr): Check for inconsistent deduction.
|
|
254 * parser.c (class type_id_in_expr_sentinel): New.
|
|
255 (cp_parser_primary_expression) [RID_VA_ARG]: Use it.
|
|
256 (cp_parser_new_expression): Use it.
|
|
257 (cp_parser_trait_expr): Use it.
|
|
258 (cp_parser_type_id_1): Complain about auto if in_type_id_in_expr_p.
|
|
259 (cp_parser_default_type_template_argument): Check for auto.
|
|
260 (cp_parser_type_id_list): Likewise.
|
|
261 (cp_parser_simple_type_specifier): Allow auto parms if flag_concepts.
|
|
262 * pt.c (do_auto_deduction): Handle erroneous type.
|
|
263
|
|
264 2015-12-04 Jason Merrill <jason@redhat.com>
|
|
265
|
|
266 PR c++/68645
|
|
267 * parser.c (cp_parser_direct_declarator)
|
|
268 (cp_parser_late_return_type_opt): Put Cilk+ attributes on
|
|
269 declarator->attributes, not std_attributes.
|
|
270
|
|
271 2015-12-04 David Malcolm <dmalcolm@redhat.com>
|
|
272
|
|
273 * cp-tree.h (class cp_expr): New class.
|
|
274 (finish_parenthesized_expr): Convert return type and param to
|
|
275 cp_expr.
|
|
276 (perform_koenig_lookup): Convert return type and param from tree
|
|
277 to cp_expr.
|
|
278 (finish_increment_expr): Likewise.
|
|
279 (finish_unary_op_expr): Likewise.
|
|
280 (finish_id_expression): Likewise for return type.
|
|
281 (build_class_member_access_expr): Likewise for param.
|
|
282 (finish_class_member_access_expr): Likewise.
|
|
283 (build_x_unary_op): Likewise.
|
|
284 (build_c_cast): New decl.
|
|
285 (build_x_modify_expr): Convert return type from tree to cp_expr.
|
|
286 * cvt.c (cp_convert_and_check): When warning about conversions,
|
|
287 attempt to use the location of "expr" if available, otherwise
|
|
288 falling back to the old behavior of using input_location.
|
|
289 * name-lookup.c (lookup_arg_dependent_1): Convert return type from
|
|
290 tree to cp_expr.
|
|
291 (lookup_arg_dependent): Likewise; also for local "ret".
|
|
292 * name-lookup.h (lookup_arg_dependent): Likewise for return type.
|
|
293 * parser.c (cp_lexer_previous_token): Skip past purged tokens.
|
|
294 (struct cp_parser_expression_stack_entry): Convert field "lhs" to
|
|
295 cp_expr.
|
|
296 (cp_parser_identifier): Likewise for return type. Use cp_expr
|
|
297 ctor to preserve the token's location.
|
|
298 (cp_parser_string_literal): Likewise, building up a meaningful
|
|
299 location for the case where a compound string literal is built by
|
|
300 concatentation.
|
|
301 (cp_parser_userdef_char_literal): Likewise for return type.
|
|
302 (cp_parser_userdef_numeric_literal): Likewise.
|
|
303 (cp_parser_statement_expr): Convert return type to cp_expr.
|
|
304 Generate a suitable location for the expr and return it via the
|
|
305 cp_expr ctor.
|
|
306 (cp_parser_fold_expression): Convert return type to cp_expr.
|
|
307 (cp_parser_primary_expression): Likewise, and for locals "expr",
|
|
308 "lam", "id_expression", "decl".
|
|
309 Use cp_expr ctor when parsing literals, to preserve the spelling
|
|
310 location of the token. Preserve the locations of parentheses.
|
|
311 Preserve location when calling objc_lookup_ivar.
|
|
312 Preserve the location for "this" tokens. Generate suitable
|
|
313 locations for "__builtin_va_arg" constructs and for
|
|
314 Objective C 2.0 dot-syntax. Set the location for the result of
|
|
315 finish_id_expression.
|
|
316 (cp_parser_primary_expression): Convert return type from tree to
|
|
317 cp_expr.
|
|
318 (cp_parser_id_expression): Likewise.
|
|
319 (cp_parser_unqualified_id): Likewise. Also for local "id".
|
|
320 (cp_parser_postfix_expression): Likewise, also for local
|
|
321 "postfix_expression". Generate suitable locations for
|
|
322 C++-style casts, "_Cilk_spawn" constructs. Convert local
|
|
323 "initializer" to cp_expr and use it to preserve the location of
|
|
324 compound literals. Capture the location of the closing
|
|
325 parenthesis of a call site via
|
|
326 cp_parser_parenthesized_expression_list, and use it to build
|
|
327 a source range for a call. Use cp_expr in ternary expression.
|
|
328 (cp_parser_postfix_dot_deref_expression): Convert param from tree to
|
|
329 cp_expr. Generate and set a location.
|
|
330 (cp_parser_parenthesized_expression_list): Add "close_paren_loc"
|
|
331 out-param, and write back to it.
|
|
332 (cp_parser_unary_expression): Convert return type from tree to
|
|
333 cp_expr. Also for locals "cast_expression" and "expression".
|
|
334 Generate and use suitable locations for addresses of
|
|
335 labels and for cast expressions. Call cp_expr::set_location where
|
|
336 necessary. Preserve the locations of negated numeric literals.
|
|
337 (cp_parser_new_expression): Generate meaningful locations/ranges.
|
|
338 (cp_parser_cast_expression): Convert return type from tree to
|
|
339 cp_expr; also for local "expr". Use the paren location to generate a
|
|
340 meaningful range for the expression.
|
|
341 (cp_parser_binary_expression): Convert return type from tree to
|
|
342 cp_expr; also for local "rhs". Generate a meaningful location
|
|
343 for the expression, and use it. Replace call to
|
|
344 protected_set_expr_location by converting a build2 to a build2_loc
|
|
345 and using the location in the call to build_x_binary_op, adding a
|
|
346 cp_expr::set_location to the latter case.
|
|
347 (cp_parser_question_colon_clause): Convert param from tree to
|
|
348 cp_expr; also for local "assignment_expr". Set the spelling range
|
|
349 of the expression.
|
|
350 (cp_parser_assignment_expression): Likewise for return type and
|
|
351 locals "expr" and "rhs". Build a meaningful spelling range for
|
|
352 the expression. Remove saving of input_location in favor of a
|
|
353 call to cp_expr::set_location.
|
|
354 (cp_parser_expression): Convert return type and locals
|
|
355 "expression" and "assignment_expression" to cp_expr. Build a
|
|
356 meaningful spelling range for assignment expressions.
|
|
357 (cp_parser_constant_expression): Likewise for return type and
|
|
358 local "expression".
|
|
359 (cp_parser_builtin_offsetof): Convert return type and local "expr"
|
|
360 to cp_expr. Generate suitable locations.
|
|
361 (cp_parser_lambda_expression): Convert return return type to
|
|
362 cp_expr.
|
|
363 (cp_parser_operator_function_id): Likewise.
|
|
364 (cp_parser_operator): Likewise. Generate a meaningful range,
|
|
365 using cp_expr's ctor to return it.
|
|
366 (cp_parser_template_id): When converting a token to
|
|
367 CPP_TEMPLATE_ID, update the location.
|
|
368 (cp_parser_initializer_clause): Convert return type and local
|
|
369 "initializer" to cp_expr.
|
|
370 (cp_parser_braced_list): Likewise for return type. Generate
|
|
371 suitable locations.
|
|
372 (cp_parser_lookup_name): Likewise for return type. Use cp_expr's
|
|
373 ctor to preserve the location_t of the name.
|
|
374 (cp_parser_simple_cast_expression): Likewise for return type.
|
|
375 (cp_parser_functional_cast): Convert return type and local "cast"
|
|
376 to cp_expr. Generate suitable locations.
|
|
377 (cp_parser_objc_expression): Convert return type to cp_expr.k Generate
|
|
378 (cp_parser_objc_message_expression): Generate suitable locations.
|
|
379 (cp_parser_objc_encode_expression): Convert return type to
|
|
380 cp_expr. Generate suitable locations.
|
|
381 (cp_parser_objc_protocol_expression): Generate suitable locations.
|
|
382 (cp_parser_objc_selector_expression): Generate suitable locations.
|
|
383 (cp_parser_omp_for_cond): Attempt to use the location
|
|
384 of "cond" for the binary op.
|
|
385 (cp_parser_transaction_expression): Issue the tm-not-enabled error
|
|
386 at the location of the __transaction_foo token, rather than at
|
|
387 input_location.
|
|
388 * semantics.c (finish_parenthesized_expr): Convert return type and
|
|
389 param to cp_expr. Preserve location.
|
|
390 (perform_koenig_lookup): Likewise for return type
|
|
391 and param.
|
|
392 (finish_increment_expr): Likewise. Generate suitable locations.
|
|
393 (finish_unary_op_expr): Likewise for return type and local "result".
|
|
394 Generate suitable locations.
|
|
395 (finish_id_expression): Convert return type to cp_expr and use
|
|
396 cp_expr ctor to preserve location information.
|
|
397 * typeck.c (build_class_member_access_expr): Convert param to
|
|
398 cp_expr.
|
|
399 (finish_class_member_access_expr): Likewise.
|
|
400 (cp_build_binary_op): Convert a build2 to a build2_loc.
|
|
401 (build_x_unary_op): Convert param from tree to cp_expr.
|
|
402 (build_nop): Preserve the location of EXPR.
|
|
403 (build_c_cast): Provide an overloaded variant that takes a cp_expr
|
|
404 and returns a cp_expr.
|
|
405 (build_x_modify_expr): Convert return type from tree to cp_expr.
|
|
406
|
|
407 2015-12-03 Cesar Philippidis <cesar@codesourcery.com>
|
|
408
|
|
409 * parser.c (cp_ensure_no_oacc_routine): Update error message.
|
|
410 (cp_parser_oacc_routine): Likewise.
|
|
411 (cp_parser_late_parsing_oacc_routine): Likewise. Update comment
|
|
412 describing this function.
|
|
413 (cp_finalize_oacc_routine): Update error message.
|
|
414
|
|
415 2015-12-02 Jason Merrill <jason@redhat.com>
|
|
416
|
|
417 * Make-lang.in (check-c++1z, check-c++-all): New.
|
|
418
|
|
419 2015-12-02 Markus Trippelsdorf <markus@trippelsdorf.de>
|
|
420
|
|
421 PR c++/67337
|
|
422 * mangle.c (write_template_prefix): Guard against context==NULL.
|
|
423
|
|
424 2015-12-02 Jason Merrill <jason@redhat.com>
|
|
425
|
|
426 * call.c (build_new_op_1): Don't fold arguments to
|
|
427 warn_logical_operator or maybe_warn_bool_compare.
|
|
428
|
|
429 * cp-gimplify.c (cp_fold_maybe_rvalue, cp_fold_rvalue): New.
|
|
430 (c_fully_fold): Use cp_fold_rvalue.
|
|
431 (cp_fold): Use them for rvalue operands.
|
|
432
|
|
433 * cp-gimplify.c (c_fully_fold): Define.
|
|
434
|
|
435 * cp-gimplify.c (cp_fold): Use fold_build*.
|
|
436
|
|
437 2015-12-02 Joseph Myers <joseph@codesourcery.com>
|
|
438
|
|
439 PR c/68162
|
|
440 * tree.c (c_build_qualified_type): Add extra arguments.
|
|
441
|
|
442 2015-12-02 Eric Botcazou <ebotcazou@adacore.com>
|
|
443
|
|
444 PR c++/68290
|
|
445 * constraint.cc (make_constrained_auto): Move to...
|
|
446 * pt.c (make_auto_1): Add set_canonical parameter and set
|
|
447 TYPE_CANONICAL on the type only if it is true.
|
|
448 (make_decltype_auto): Adjust call to make_auto_1.
|
|
449 (make_auto): Likewise.
|
|
450 (splice_late_return_type): Likewise.
|
|
451 (make_constrained_auto): ...here. Call make_auto_1 instead of
|
|
452 make_auto and pass false. Set TYPE_CANONICAL directly.
|
|
453
|
|
454 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
|
|
455
|
|
456 * parser.c (cp_parser_omp_clause_name)
|
|
457 (cp_parser_oacc_all_clauses): Alphabetical sorting.
|
|
458 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_USE_DEVICE.
|
|
459
|
|
460 2015-12-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
|
|
461
|
|
462 PR gcov-profile/68603
|
|
463 * cp-gimplify.c (genericize_cp_loop): For the back-jump's location
|
|
464 use the start of the loop body only if the loop is unconditional.
|
|
465
|
|
466 2015-11-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
|
|
467
|
|
468 * cp-gimplify.c (genericize_cp_loop): Change LOOP_EXPR's location
|
|
469 to start of loop body instead of start of loop.
|
|
470
|
|
471 2015-12-01 Julian Brown <julian@codesourcery.com>
|
|
472 Cesar Philippidis <cesar@codesourcery.com>
|
|
473 James Norris <James_Norris@mentor.com>
|
|
474
|
|
475 * cp-tree.h (finish_oacc_host_data): Add prototype.
|
|
476 * parser.c (cp_parser_omp_clause_name): Add use_device support.
|
|
477 (cp_parser_oacc_all_clauses): Add use_device support.
|
|
478 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
|
|
479 (cp_parser_oacc_host_data): New function.
|
|
480 (cp_parser_omp_construct): Add host_data support.
|
|
481 (cp_parser_pragma): Add host_data support.
|
|
482 * semantics.c (finish_omp_clauses): Add use_device support.
|
|
483 (finish_oacc_host_data): New function.
|
|
484
|
|
485 2015-11-27 Martin Liska <mliska@suse.cz>
|
|
486
|
|
487 PR c++/68312
|
|
488 * cp-array-notation.c (expand_sec_reduce_builtin):
|
|
489 Likewise.
|
|
490 (create_array_refs): Replace argument with const reference.
|
|
491 (expand_an_in_modify_expr): Likewise.
|
|
492 (cp_expand_cond_array_notations): Likewise.
|
|
493 (expand_unary_array_notation_exprs): Likewise.
|
|
494
|
|
495 2015-11-27 Jakub Jelinek <jakub@redhat.com>
|
|
496
|
|
497 PR c/63326
|
|
498 * parser.c (cp_parser_statement): Clear in_compound after labels.
|
|
499
|
|
500 2015-11-27 Martin Liska <mliska@suse.cz>
|
|
501
|
|
502 * parser.c (cp_parser_late_parsing_cilk_simd_fn_info):
|
|
503 Release tokens.
|
|
504
|
|
505 2015-11-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
|
|
506
|
|
507 * cp-gimplify.c (genericize_cp_loop): Change LOOP_EXPR's location
|
|
508 to start of loop body instead of start of loop.
|
|
509
|
|
510 2015-11-26 Jakub Jelinek <jakub@redhat.com>
|
|
511
|
|
512 PR c++/68508
|
|
513 * cp-tree.h (cp_ubsan_maybe_instrument_downcast): Add INTYPE argument.
|
|
514 * cp-ubsan.c (cp_ubsan_maybe_instrument_downcast): Likewise. Use
|
|
515 it instead of or in addition to TREE_TYPE (op). Use
|
|
516 is_properly_derived_from, return NULL_TREE if TREE_TYPE (intype) and
|
|
517 TREE_TYPE (type) are the same type minus qualifiers.
|
|
518 * typeck.c (build_static_cast_1): Adjust callers.
|
|
519
|
|
520 2015-11-25 Martin Sebor <msebor@redhat.com>
|
|
521
|
|
522 PR c++/67876
|
|
523 * pt.c (convert_template_argument): Make sure number of tree
|
|
524 operands is greater than zero before attempting to extract one.
|
|
525
|
|
526 2015-11-25 Ryan Burn <contact@rnburn.com>
|
|
527
|
|
528 PR c++/68434
|
|
529 * pt.c (tsubst): Set PLACEHOLDER_TYPE_CONSTRAINTS before
|
|
530 calling canonical_type_parameter.
|
|
531
|
|
532 2015-11-25 Jason Merrill <jason@redhat.com>
|
|
533
|
|
534 * lambda.c (maybe_add_lambda_conv_op): Only set
|
|
535 no_sanitize_undefined if SANITIZE_NULL.
|
|
536
|
|
537 PR c++/67941
|
|
538 * lambda.c (maybe_add_lambda_conv_op): Mark _FUN as
|
|
539 no_sanitize_undefined.
|
|
540
|
|
541 * cp-ubsan.c (cp_ubsan_instrument_vptr_p): Use
|
|
542 do_ubsan_in_current_function.
|
|
543
|
|
544 2015-11-25 Markus Trippelsdorf <markus@trippelsdorf.de>
|
|
545 Paolo Carlini <paolo.carlini@oracle.com>
|
|
546
|
|
547 PR c++/68087
|
|
548 * constexpr.c (cxx_eval_array_reference): Use tree_fits_shwi_p before
|
|
549 tree_to_shwi to avoid ICEs.
|
|
550
|
|
551 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
|
|
552
|
|
553 * parser.c (cp_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
|
|
554 with "if (ENABLE_OFFLOADING)".
|
|
555
|
|
556 2015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
|
|
557
|
|
558 PR c++/68001
|
|
559 * cp-gimplify.c (cp_gimplify_expr): Stop the process if see an error.
|
|
560
|
|
561 2015-11-20 Jakub Jelinek <jakub@redhat.com>
|
|
562
|
|
563 PR c++/67354
|
|
564 * cp-tree.h (defer_mangling_aliases): Declare.
|
|
565 (generate_mangling_aliases): New prototype.
|
|
566 * decl2.c (defer_mangling_aliases): New variable.
|
|
567 (note_mangling_alias): Use !defer_mangling_aliases
|
|
568 instead of at_eof.
|
|
569 (generate_mangling_aliases): No longer static. Clear
|
|
570 defer_mangling_aliases.
|
|
571 * optimize.c (maybe_thunk_body): Defer emitting mangling aliases
|
|
572 if !defer_mangling_aliases until the fns are put into the same
|
|
573 comdat group.
|
|
574
|
|
575 2015-11-19 David Malcolm <dmalcolm@redhat.com>
|
|
576
|
|
577 * cp-tree.h (lookup_member_fuzzy): New decl.
|
|
578 * search.c: Include spellcheck.h.
|
|
579 (class lookup_field_fuzzy_info): New class.
|
|
580 (lookup_field_fuzzy_info::fuzzy_lookup_fnfields): New.
|
|
581 (lookup_field_fuzzy_info::fuzzy_lookup_field): New.
|
|
582 (lookup_field_fuzzy_r): New.
|
|
583 (lookup_member_fuzzy): New.
|
|
584 * typeck.c (finish_class_member_access_expr): When issuing
|
|
585 a "has no member named" error, call lookup_member_fuzzy, and
|
|
586 offer any result as a suggestion.
|
|
587
|
|
588 2015-11-19 Torvald Riegel <triegel@redhat.com>
|
|
589
|
|
590 * except.c (do_free_exception): Use transactional wrapper.
|
|
591
|
|
592 2015-11-19 Jason Merrill <jason@redhat.com>
|
|
593
|
|
594 PR c++/68422
|
|
595 * cp-tree.h (PACK_EXPANSION_SIZEOF_P): New.
|
|
596 * parser.c (cp_parser_sizeof_pack): Set it.
|
|
597 * pt.c (tsubst_copy) [SIZEOF_EXPR]: Likewise.
|
|
598 (tsubst_pack_expansion): Improve T... shortcut for expression packs.
|
|
599
|
|
600 2015-11-19 Ryan Burn <contact@rnburn.com>
|
|
601
|
|
602 PR c++/68396
|
|
603 * pt.c (find_parameter_packs_r) [DECLTYPE_TYPE]: When traversing
|
|
604 the DECLTYPE_TYPE_EXPR, set type_pack_expansion_p to false.
|
|
605
|
|
606 2015-11-19 Jakub Jelinek <jakub@redhat.com>
|
|
607 Manuel López-Ibáñez <manu@gcc.gnu.org>
|
|
608
|
|
609 PR c++/67409
|
|
610 * decl.c (identify_goto): Add LOC and DIAG_KIND arguments, call
|
|
611 emit_diagnostic instead of permerror.
|
|
612 (check_previous_goto_1): Adjust identify_goto callers, treat all
|
|
613 cases but crossing initialization and entering scope of decl with
|
|
614 non-trivial dtor as unconditional hard errors.
|
|
615 (check_goto): Use identify_goto. Treat all cases but crossing
|
|
616 initialization and entering scope of decl with non-trivial dtor
|
|
617 as unconditional hard errors.
|
|
618
|
|
619 2015-11-19 Cesar Philippidis <cesar@codesourcery.com>
|
|
620
|
|
621 * parser.h (struct cp_omp_declare_simd_data): Add clauses member.
|
|
622 (struct cp_parser): Change type the of oacc_routine to
|
|
623 cp_omp_declare_simd_data.
|
|
624 * parser.c (cp_ensure_no_oacc_routine): Rework to use
|
|
625 cp_omp_declare_simd_data.
|
|
626 (cp_parser_simple_declaration): Remove boolean first. Update call to
|
|
627 cp_parser_init_declarator. Don't NULL out oacc_routine.
|
|
628 (cp_parser_init_declarator): Remove boolean first parameter. Update
|
|
629 calls to cp_finalize_oacc_routine.
|
|
630 (cp_parser_late_return_type_opt): Handle acc routines.
|
|
631 (cp_parser_member_declaration): Remove first variable. Handle
|
|
632 acc routines like omp declare simd.
|
|
633 (cp_parser_function_definition_from_specifiers_and_declarator): Update
|
|
634 call to cp_finalize_oacc_routine.
|
|
635 (cp_parser_single_declaration): Update call to
|
|
636 cp_parser_init_declarator.
|
|
637 (cp_parser_save_member_function_body): Remove first_decl parameter.
|
|
638 Update call to cp_finalize_oacc_routine.
|
|
639 (cp_parser_finish_oacc_routine): Delete.
|
|
640 (cp_parser_oacc_routine): Rework to use cp_omp_declare_simd_data.
|
|
641 (cp_parser_late_parsing_oacc_routine): New function.
|
|
642 (cp_finalize_oacc_routine): Remove first argument. Add more error
|
|
643 handling and set the acc routine and 'omp declare target' attributes.
|
|
644 (cp_parser_pragma): Remove unnecessary call to
|
|
645 cp_ensure_no_oacc_routine.
|
|
646
|
|
647 2015-11-17 Cesar Philippidis <cesar@codesourcery.com>
|
|
648
|
|
649 * cp-gimplify.c (cp_fold_r): Add support for OACC_LOOP.
|
|
650
|
|
651 2015-11-17 Jason Merrill <jason@redhat.com>
|
|
652
|
|
653 PR bootstrap/68346
|
|
654 * typeck.c (build_static_cast_1): Force a NOP when converting to
|
|
655 the same type.
|
|
656
|
|
657 * cp-tree.h (LITERAL_ZERO_P): Remove.
|
|
658 * parser.c (cp_parser_postfix_expression, literal_zeros)
|
|
659 (cp_parser_parenthesized_expression_list): Don't mess with it.
|
|
660
|
|
661 * parser.c (cp_parser_unary_expression): Fold -constant here.
|
|
662 * typeck.c (cp_build_unary_op): Not here.
|
|
663
|
|
664 PR bootstrap/68361
|
|
665 * cvt.c (cp_convert_and_check): Use warning_sentinel to suppress
|
|
666 -Wparentheses.
|
|
667
|
|
668 2015-11-16 Jason Merrill <jason@redhat.com>
|
|
669
|
|
670 * constexpr.c (cxx_eval_builtin_function_call): Use cp_fully_fold
|
|
671 to fold arguments to __builtin_constant_p.
|
|
672
|
|
673 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
|
|
674
|
|
675 * parser.c (cp_parser_late_parsing_cilk_simd_fn_info): Look for
|
|
676 "simd" attribute as well. Update error message.
|
|
677
|
|
678 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
|
|
679
|
|
680 * parser.c (cp_parser_omp_declare_target): Adjust.
|
|
681
|
|
682 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
|
|
683
|
|
684 * vtable-class-hierarchy.c (vtv_generate_init_routine): Adjust.
|
|
685
|
|
686 2015-11-14 Jason Merrill <jason@redhat.com>
|
|
687
|
|
688 PR bootstrap/68346
|
|
689 * call.c (build_new_op_1): Don't fold arguments to
|
|
690 warn_tautological_cmp.
|
|
691
|
|
692 2015-11-14 Jakub Jelinek <jakub@redhat.com>
|
|
693
|
|
694 * semantics.c (finish_omp_clauses): Don't mark
|
|
695 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
|
|
696
|
|
697 2015-11-13 Kai Tietz <ktietz70@googlemail.com>
|
|
698 Marek Polacek <polacek@redhat.com>
|
|
699 Jason Merrill <jason@redhat.com>
|
|
700
|
|
701 * call.c (build_conditional_expr_1, convert_like_real)
|
|
702 (convert_arg_to_ellipsis, convert_for_arg_passing): Don't fold.
|
|
703 (build_new_op_1, build_over_call, build_cxx_call): Fold for warnings.
|
|
704 * class.c (build_base_path, determine_primary_bases)
|
|
705 (update_vtable_entry_for_fn, check_bitfield_decl)
|
|
706 (layout_nonempty_base_or_field, layout_empty_base)
|
|
707 (propagate_binfo_offsets, include_empty_classes)
|
|
708 (layout_class_type, build_vbase_offset_vtbl_entries): Use
|
|
709 fold_convert.
|
|
710 * constexpr.c (cxx_eval_builtin_function_call): Fold away the NOP_EXPR.
|
|
711 (cxx_eval_call_expression): Handle MEM_REF.
|
|
712 (cxx_eval_pointer_plus_expression): Fold the second operand.
|
|
713 (cxx_eval_constant_expression): Handle MEM_REF, UNARY_PLUS_EXPR.
|
|
714 (fold_simple_1, fold_simple): New.
|
|
715 (maybe_constant_value_1): Factor out from maybe_constant_value.
|
|
716 (cv_cache, maybe_constant_value): Cache results.
|
|
717 (maybe_constant_init): Handle null input.
|
|
718 (potential_constant_expression_1): Handle RESULT_DECL, EMPTY_CLASS_EXPR.
|
|
719 * cp-array-notation.c (build_array_notation_ref): Fold operands.
|
|
720 * cp-gimplify.c (cp_fold_r, cp_fold): New.
|
|
721 (cp_genericize_r): Use fold_convert. Don't fold SIZEOF_EXPR.
|
|
722 (cp_genericize): Fold everything.
|
|
723 (contains_label_1, contains_label_p): New.
|
|
724 (cp_fold, cp_fully_fold): New.
|
|
725 * cp-tree.h (class cache_map): New.
|
|
726 * cvt.c (cp_convert_to_pointer, ocp_convert): Use convert_to_*_nofold.
|
|
727 (cp_convert_and_check): Use cp_fully_fold.
|
|
728 (convert, convert_force): Don't fold.
|
|
729 * decl.c (fold_sizeof_expr): Change from fold_sizeof_expr_r.
|
|
730 (compute_array_index_type): Use cp_fully_fold.
|
|
731 (build_enumerator): Use fold_convert.
|
|
732 * decl2.c (get_guard_cond, set_guard): Use fold_convert.
|
|
733 * init.c (build_zero_init_1): Fold zero-initializers.
|
|
734 (build_new_1): Fold nelts calculations.
|
|
735 (build_vec_delete_1): Fold conversions.
|
|
736 (build_vec_init): Fold maxindex.
|
|
737 * parser.c (cp_parser_binary_expression): Fold LHS of || and &&.
|
|
738 (cp_parser_question_colon_clause): Fold LHS.
|
|
739 * pt.c (convert_nontype_argument): Fold nullptr conversion.
|
|
740 * semantics.c (finish_unary_op_expr): Fold for warnings.
|
|
741 (handle_omp_array_sections_1): Fold length and low bound.
|
|
742 (handle_omp_for_class_iterator): Fold various things.
|
|
743 * tree.c (builtin_valid_in_constant_expr_p): Add
|
|
744 BUILT_IN_ATOMIC_ALWAYS_LOCK_FREE.
|
|
745 (convert_bitfield_to_declared_type): Don't fold.
|
|
746 (handle_init_priority_attribute): Fold.
|
|
747 (fold_if_not_in_template): Remove.
|
|
748 * typeck.c (decay_conversion, build_class_member_access_expr)
|
|
749 (build_simple_component_ref, cp_build_array_ref, build_vec_cmp)
|
|
750 (cp_pointer_int_sum, pointer_diff): Don't fold.
|
|
751 (cp_build_binary_op): Fold for warnings and PMF ops.
|
|
752 (cp_build_unary_op): Fold negation of a constant, nothing else.
|
|
753 (expand_ptrmemfunc_cst): Fold operations.
|
|
754 * typeck2.c (split_nonconstant_init): Fold initializer.
|
|
755 (store_init_value): Likewise.
|
|
756 (check_narrowing): Try folding.
|
|
757 * config-lang.in (gtfiles): Add cp-gimplify.c.
|
|
758
|
|
759 2015-11-13 David Malcolm <dmalcolm@redhat.com>
|
|
760
|
|
761 * error.c (pedwarn_cxx98): Pass line_table to rich_location ctor.
|
|
762
|
|
763 2015-11-12 James Norris <jnorris@codesourcery.com>
|
|
764
|
|
765 * parser.c (cp_parser_oacc_declare): Remove unused.
|
|
766
|
|
767 2015-11-12 James Norris <jnorris@codesourcery.com>
|
|
768 Joseph Myers <joseph@codesourcery.com>
|
|
769
|
|
770 * parser.c (cp_parser_omp_clause_name): Handle 'device_resident'
|
|
771 clause.
|
|
772 (cp_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
|
|
773 and PRAGMA_OMP_CLAUSE_LINK.
|
|
774 (cp_paser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
|
|
775 and PRAGMA_OMP_CLAUSE_LINK.
|
|
776 (OACC_DECLARE_CLAUSE_MASK): New definition.
|
|
777 (cp_parser_oacc_declare): New function.
|
|
778 (cp_parser_pragma): Handle PRAGMA_OACC_DECLARE.
|
|
779 * pt.c (tsubst_expr): Handle OACC_DECLARE.
|
|
780
|
|
781 2015-11-12 Jason Merrill <jason@redhat.com>
|
|
782
|
|
783 * pt.c (check_explicit_specialization): Check the namespace after
|
|
784 we choose a template.
|
|
785
|
|
786 2015-11-11 Jason Merrill <jason@redhat.com>
|
|
787
|
|
788 * decl.c (duplicate_decls): When combining typedefs, remove the
|
|
789 new type from the variants list.
|
|
790
|
|
791 2015-11-11 Jason Merrill <jason@redhat.com>
|
|
792
|
|
793 * pt.c (instantiate_class_template_1): Set function_depth around
|
|
794 instantiation of lambda op().
|
|
795
|
|
796 2015-11-11 Marek Polacek <polacek@redhat.com>
|
|
797
|
|
798 PR c/68107
|
|
799 PR c++/68266
|
|
800 * decl.c (grokdeclarator): Call valid_array_size_p. Remove code
|
|
801 checking the size of an array.
|
|
802
|
|
803 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
|
|
804
|
|
805 PR bootstrap/68271
|
|
806 * parser.h (cp_token): Update pragma_kind to 8.
|
|
807
|
|
808 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
|
|
809
|
|
810 * call.c: Remove unused header files.
|
|
811 * class.c: Likewise.
|
|
812 * constexpr.c: Likewise.
|
|
813 * cp-array-notation.c: Likewise.
|
|
814 * cp-cilkplus.c: Likewise.
|
|
815 * cp-gimplify.c: Likewise.
|
|
816 * cp-lang.c: Likewise.
|
|
817 * cp-objcp-common.c: Likewise.
|
|
818 * cp-ubsan.c: Likewise.
|
|
819 * cvt.c: Likewise.
|
|
820 * cxx-pretty-print.c: Likewise.
|
|
821 * decl.c: Likewise.
|
|
822 * decl2.c: Likewise.
|
|
823 * dump.c: Likewise.
|
|
824 * error.c: Likewise.
|
|
825 * except.c: Likewise.
|
|
826 * expr.c: Likewise.
|
|
827 * friend.c: Likewise.
|
|
828 * g++spec.c: Likewise.
|
|
829 * init.c: Likewise.
|
|
830 * lambda.c: Likewise.
|
|
831 * lex.c: Likewise.
|
|
832 * mangle.c: Likewise.
|
|
833 * method.c: Likewise.
|
|
834 * name-lookup.c: Likewise.
|
|
835 * optimize.c: Likewise.
|
|
836 * parser.c: Likewise.
|
|
837 * pt.c: Likewise.
|
|
838 * ptree.c: Likewise.
|
|
839 * repo.c: Likewise.
|
|
840 * rtti.c: Likewise.
|
|
841 * search.c: Likewise.
|
|
842 * semantics.c: Likewise.
|
|
843 * tree.c: Likewise.
|
|
844 * typeck.c: Likewise.
|
|
845 * typeck2.c: Likewise.
|
|
846 * vtable-class-hierarchy.c: Likewise.
|
|
847
|
|
848 2015-11-09 Cesar Philippidis <cesar@codesourcery.com>
|
|
849
|
|
850 * parser.c (cp_finalize_oacc_routine): New boolean first argument.
|
|
851 (cp_ensure_no_oacc_routine): Update call to cp_finalize_oacc_routine.
|
|
852 (cp_parser_simple_declaration): Maintain a boolean first to keep track
|
|
853 of each new declarator. Propagate it to cp_parser_init_declarator.
|
|
854 (cp_parser_init_declarator): New boolean first argument. Propagate it
|
|
855 to cp_parser_save_member_function_body and cp_finalize_oacc_routine.
|
|
856 (cp_parser_member_declaration): Likewise.
|
|
857 (cp_parser_single_declaration): Update call to
|
|
858 cp_parser_init_declarator.
|
|
859 (cp_parser_save_member_function_body): New boolean first_decl argument.
|
|
860 Propagate it to cp_finalize_oacc_routine.
|
|
861 (cp_parser_finish_oacc_routine): New boolean first argument. Use it to
|
|
862 determine if multiple declarators follow a routine construct.
|
|
863 (cp_parser_oacc_routine): Update call to cp_parser_finish_oacc_routine.
|
|
864
|
|
865 2015-10-19 Martin Sebor <msebor@redhat.com>
|
|
866
|
|
867 PR c++/67913
|
|
868 PR c++/67927
|
|
869 * call.c (build_operator_new_call): Do not assume size_check
|
|
870 is non-null, analogously to the top half of the function.
|
|
871 * init.c (build_new_1): Detect and diagnose array sizes in
|
|
872 excess of the maximum of roughly SIZE_MAX / 2.
|
|
873 Insert a runtime check only for arrays with a non-constant size.
|
|
874 (build_new): Detect and diagnose negative array sizes.
|
|
875
|
|
876 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
|
|
877 Cesar Philippidis <cesar@codesourcery.com>
|
|
878 James Norris <jnorris@codesourcery.com>
|
|
879 Julian Brown <julian@codesourcery.com>
|
|
880 Nathan Sidwell <nathan@codesourcery.com>
|
|
881
|
|
882 * parser.h (struct cp_parser): Add oacc_routine field.
|
|
883 * parser.c (cp_ensure_no_oacc_routine): New.
|
|
884 (cp_parser_new): Initialize oacc_routine field.
|
|
885 (cp_parser_linkage_specification): Call cp_ensure_no_oacc_routine.
|
|
886 (cp_parser_namespace_definition,
|
|
887 cp_parser_class_specifier_1): Likewise.
|
|
888 (cp_parser_init_declarator): Call cp_finalize_oacc_routine.
|
|
889 (cp_parser_function_definition,
|
|
890 cp_parser_save_member_function_body): Likewise.
|
|
891 (OACC_ROUTINE_CLAUSE_MASK): New.
|
|
892 (cp_parser_finish_oacc_routine, cp_parser_oacc_routine,
|
|
893 cp_finalize_oacc_routine): New.
|
|
894 (cp_parser_pragma): Adjust omp_declare_simd checking. Call
|
|
895 cp_ensure_no_oacc_routine.
|
|
896 (cp_parser_pragma): Add OpenACC routine handling.
|
|
897
|
|
898 2015-11-08 Martin Sebor <msebor@redhat.com>
|
|
899
|
|
900 PR c++/67942
|
|
901 * cp/init.c (warn_placement_new_too_small): Convert integer
|
|
902 operand of POINTER_PLUS_EXPR to ssize_t to determine its signed
|
|
903 value.
|
|
904
|
|
905 2015-11-06 David Malcolm <dmalcolm@redhat.com>
|
|
906
|
|
907 * error.c (cp_printer): Update for new "caret_p" param for
|
|
908 textinfo::set_location.
|
|
909 (pedwarn_cxx98): Update for change in signature of
|
|
910 diagnostic_set_info.
|
|
911
|
|
912 2015-11-06 Jason Merrill <jason@redhat.com>
|
|
913
|
|
914 Support non-type constrained-type-specifiers.
|
|
915 * parser.c (check_type_concept): Remove.
|
|
916 (cp_parser_maybe_constrained_type_specifier): Don't call it.
|
|
917 (synthesize_implicit_template_parm): Handle non-type and template
|
|
918 template parameters. Also compare extra args. Return the decl.
|
|
919 (cp_parser_template_argument): Handle constrained-type-specifiers for
|
|
920 non-type template parameters.
|
|
921 (finish_constrained_template_template_parm): Split out from
|
|
922 cp_parser_constrained_template_template_parm.
|
|
923 (cp_parser_nonclass_name): Move some logic into
|
|
924 cp_parser_maybe_concept_name.
|
|
925 (cp_parser_init_declarator): Fix error recovery.
|
|
926 (get_concept_from_constraint): Remove.
|
|
927 (cp_parser_simple_type_specifier): Adjust for
|
|
928 synthesize_implicit_template_parm returning the decl.
|
|
929 * constraint.cc (placeholder_extract_concept_and_args)
|
|
930 (equivalent_placeholder_constraints): Also handle TYPE_DECL
|
|
931 constrained parms.
|
|
932
|
|
933 * pt.c (push_inline_template_parms_recursive): Don't recreate the
|
|
934 CONST_DECL.
|
|
935
|
|
936 2015-11-06 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
|
|
937
|
|
938 * init.c (warn_placement_new_too_small): Use %wu format
|
|
939 rather than %lu when printing bytes_avail.
|
|
940
|
|
941 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
|
|
942 Thomas Schwinge <thomas@codesourcery.com>
|
|
943 James Norris <jnorris@codesourcery.com>
|
|
944
|
|
945 * parser.c (cp_parser_omp_clause_name): Add support for
|
|
946 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
|
|
947 (cp_parser_oacc_shape_clause): Allow pointer variables as gang static
|
|
948 arguments.
|
|
949 (cp_parser_oacc_clause_tile): New function.
|
|
950 (cp_parser_omp_clause_default): Add is_oacc argument. Handle
|
|
951 default(none) in OpenACC.
|
|
952 (cp_parser_oacc_all_clauses): Add support for
|
|
953 (cp_parser_omp_all_clauses): Update call to
|
|
954 cp_parser_omp_clause_default.
|
|
955 PRAGMA_OACC_CLAUSE_{DEFAULT,INDEPENDENT,TILE,PRIVATE,FIRSTPRIVATE}.
|
|
956 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
|
|
957 TILE}.
|
|
958 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
|
|
959 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
|
|
960 FIRSTPRIVATE}.
|
|
961 (cp_parser_oacc_update): Update the error message for missing clauses.
|
|
962 * semantics.c (finish_omp_clauses): Add support for
|
|
963 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
|
|
964
|
|
965 2015-11-05 Martin Sebor <msebor@redhat.com>
|
|
966
|
|
967 PR c++/67942
|
|
968 * cp/init.c (warn_placement_new_too_small): Avoid assuming
|
|
969 the size of the first operand of placement new or its type
|
|
970 is known.
|
|
971
|
|
972 2015-11-05 Martin Sebor <msebor@redhat.com>
|
|
973
|
|
974 PR c++/67942
|
|
975 * cp/init.c (warn_placement_new_too_small): New function.
|
|
976 (build_new_1): Call it.
|
|
977
|
|
978 2015-11-05 Paolo Carlini <paolo.carlini@oracle.com>
|
|
979
|
|
980 PR c++/67846
|
|
981 * parser.c (cp_parser_lambda_body): Check lambda_return_type
|
|
982 return value.
|
|
983 * typeck2.c (cxx_incomplete_type_diagnostic): Print member or
|
|
984 member function used invalidly.
|
|
985
|
|
986 2015-11-05 Jakub Jelinek <jakub@redhat.com>
|
|
987 Ilya Verbin <ilya.verbin@intel.com>
|
|
988
|
|
989 * cp-tree.h (finish_omp_for): Add ORIG_INITS argument.
|
|
990 (omp_privatize_field): Add SHARED argument.
|
|
991 * parser.c: Include context.h.
|
|
992 (cp_parser_omp_clause_schedule): Parse schedule
|
|
993 modifiers, diagnose monotonic together with nonmonotonic.
|
|
994 (cp_parser_omp_clause_linear): Add DECLARE_SIMD argument. Parse
|
|
995 parameter name as linear step as id-expression rather than expression.
|
|
996 (cp_parser_omp_all_clauses): Adjust caller.
|
|
997 (cp_parser_omp_for_loop_init): Add ORIG_INIT argument,
|
|
998 initialize it. Adjust omp_privatize_field caller.
|
|
999 (cp_parser_omp_for_loop): Compute orig_inits, pass it's address
|
|
1000 to finish_omp_for.
|
|
1001 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
|
|
1002 (cp_parser_omp_target_data,
|
|
1003 cp_parser_omp_target_enter_data,
|
|
1004 cp_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER
|
|
1005 and GOMP_MAP_FIRSTPRIVATE_REFERENCE.
|
|
1006 (cp_parser_omp_target): Likewise. Evaluate num_teams and
|
|
1007 thread_limit expressions on combined target teams before the target.
|
|
1008 (cp_parser_omp_declare_target): If decl has "omp declare target" or
|
|
1009 "omp declare target link" attribute, and cgraph or varpool node already
|
|
1010 exists, then set corresponding flags. Call finish_omp_clauses
|
|
1011 in the parenthesized extended-list syntax case. Call
|
|
1012 cp_parser_require_pragma_eol instead of cp_parser_skip_to_pragma_eol.
|
|
1013 (cp_parser_omp_end_declare_target): Call cp_parser_require_pragma_eol
|
|
1014 instead of cp_parser_skip_to_pragma_eol.
|
|
1015 * decl2.c (cplus_decl_attributes): Don't diagnose block scope vars
|
|
1016 inside declare target.
|
|
1017 * pt.c (tsubst_omp_clauses): If OMP_CLAUSE_LINEAR_VARIABLE_STRIDE,
|
|
1018 use tsubst_omp_clause_decl instead of tsubst_expr on
|
|
1019 OMP_CLAUSE_LINEAR_STEP. Handle non-static data members in shared
|
|
1020 clauses.
|
|
1021 (tsubst_omp_for_iterator): Adjust omp_privatize_field caller.
|
|
1022 (tsubst_find_omp_teams): New function.
|
|
1023 (tsubst_expr): Evaluate num_teams and thread_limit expressions on
|
|
1024 combined target teams before the target. Use OMP_FOR_ORIG_DECLS for
|
|
1025 all OpenMP/OpenACC/Cilk+ looping constructs. Adjust finish_omp_for
|
|
1026 caller.
|
|
1027 * semantics.c (omp_privatize_field): Add SHARED argument, if true,
|
|
1028 always create artificial var and never put it into the hash table
|
|
1029 or vector.
|
|
1030 (handle_omp_array_sections_1): Adjust omp_privatize_field caller.
|
|
1031 Allow non-zero low-bound on OMP_CLAUSE_REDUCTION array sections.
|
|
1032 (handle_omp_array_sections): For structure element
|
|
1033 based array sections use GOMP_MAP_ALWAYS_POINTER instead of
|
|
1034 GOMP_MAP_FIRSTPRIVATE_POINTER. Encode low-bound into the MEM_REF,
|
|
1035 either into the constant offset, or for variable low-bound using
|
|
1036 POINTER_PLUS_EXPR.
|
|
1037 (finish_omp_clauses): Adjust omp_privatize_field caller. Drop
|
|
1038 generic_field_head, structure elements are now always mapped even
|
|
1039 as array section bases, diagnose same var in data sharing and
|
|
1040 mapping clauses. For references map what they refer to using
|
|
1041 GOMP_MAP_ALWAYS_POINTER for structure elements and
|
|
1042 GOMP_MAP_FIRSTPRIVATE_REFERENCE otherwise. Diagnose if linear step
|
|
1043 on declare simd is neither a constant nor a uniform parameter.
|
|
1044 Allow non-static data members on shared clauses. Look through
|
|
1045 POINTER_PLUS_EXPR for array section reductions. Diagnose nonmonotonic
|
|
1046 modifier on kinds other than dynamic or guided or nonmonotonic
|
|
1047 modifier together with ordered clause. Diagnose the same var or
|
|
1048 function appearing multiple times on the same directive. Fix up
|
|
1049 wording for the to clause if t is neither a FUNCTION_DECL nor a
|
|
1050 VAR_DECL, use special wording for OVERLOADs and TEMPLATE_ID_EXPR.
|
|
1051 (handle_omp_for_class_iterator): Add ORIG_DECLS argument. Call
|
|
1052 c_omp_check_loop_iv_exprs on cond.
|
|
1053 (finish_omp_for): Add ORIG_INITS argument. Call
|
|
1054 c_omp_check_loop_iv_exprs on ORIG_INITS elements. Adjust
|
|
1055 handle_omp_for_class_iterator caller. Call c_omp_check_loop_iv.
|
|
1056 Call add_stmt.
|
|
1057 (finish_omp_atomic): Adjust c_finish_omp_atomic caller.
|
|
1058
|
|
1059 2015-11-04 Cesar Philippidis <cesar@codesourcery.com>
|
|
1060
|
|
1061 * (cp_parser_oacc_single_int_clause): New function.
|
|
1062 (cp_parser_oacc_clause_vector_length): Delete.
|
|
1063 (cp_parser_omp_clause_num_gangs): Delete.
|
|
1064 (cp_parser_omp_clause_num_workers): Delete.
|
|
1065 (cp_parser_oacc_all_clauses): Use cp_parser_oacc_single_int_clause
|
|
1066 for num_gangs, num_workers and vector_length.
|
|
1067
|
|
1068 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
|
|
1069
|
|
1070 * call.c (validate_conversion_obstack): Define unconditionally.
|
|
1071 * constexpr.c (maybe_constant_value, fold_non_dependent_expr): Use
|
|
1072 gcc_checking_assert.
|
|
1073 * cp-tree.h: Use CHECKING_P instead of ENABLE_CHECKING.
|
|
1074 * decl2.c (cxx_post_compilation_parsing_cleanups): Use flag_checking.
|
|
1075 * mangle.c (add_substitution): Likewise.
|
|
1076 * method.c (maybe_explain_implicit_delete): Likewise.
|
|
1077 * parser.c (cp_parser_template_argument_list): Remove conditional
|
|
1078 compilation.
|
|
1079 * pt.c (check_unstripped_args): Rename to...
|
|
1080 (verify_unstripped_args): ... this and remove conditional compilation.
|
|
1081 (retrieve_specialization): Guard call of verify_unstripped_args with
|
|
1082 flag_checking.
|
|
1083 (template_parm_to_arg): Remove conditional compilation.
|
|
1084 (template_parms_to_args, coerce_template_parameter_pack,
|
|
1085 coerce_template_parms): Likewise.
|
|
1086 (tsubst_copy): Use flag_checking.
|
|
1087 (type_unification_real): Remove conditional compilation.
|
|
1088 (build_non_dependent_expr): Use flag_checking.
|
|
1089 * tree.c (build_target_expr): Remove conditional compilation, use
|
|
1090 gcc_checking_assert.
|
|
1091 * typeck.c (comptypes): Likewise.
|
|
1092 * typeck2.c (digest_init_r): Likewise.
|
|
1093
|
|
1094 2015-11-03 Jason Merrill <jason@redhat.com>
|
|
1095
|
|
1096 * pt.c (struct find_parameter_pack_data): Add
|
|
1097 type_pack_expansion_p field.
|
|
1098 (find_parameter_packs_r): Use it to turn 'auto' into a parameter pack.
|
|
1099 (uses_parameter_packs, make_pack_expansion)
|
|
1100 (check_for_bare_parameter_packs, fixed_parameter_pack_p): Set it.
|
|
1101
|
|
1102 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
|
|
1103 Chung-Lin Tang <cltang@codesourcery.com>
|
|
1104
|
|
1105 * parser.c (cp_parser_omp_construct, cp_parser_pragma): Handle
|
|
1106 PRAGMA_OACC_ATOMIC.
|
|
1107
|
|
1108 2015-10-31 Ville Voutilainen <ville.voutilainen@gmail.com>
|
|
1109
|
|
1110 Remove the implementation of N3994, terse range-for loops.
|
|
1111 * parser.c (cp_parser_for_init_statement): Remove the parsing
|
|
1112 of a terse range-for.
|
|
1113
|
|
1114 2015-10-31 Jason Merrill <jason@redhat.com>
|
|
1115
|
|
1116 Implement multiple 'auto' feature from Concepts TS.
|
|
1117 * parser.c (cp_parser_type_id_1): Allow 'auto' if -fconcepts.
|
|
1118 (cp_parser_template_type_arg): Likewise.
|
|
1119 (get_concept_from_constraint): Split out most logic to...
|
|
1120 * constraint.cc (placeholder_extract_concept_and_args): ...here.
|
|
1121 (equivalent_placeholder_constraints, hash_placeholder_constraint): New.
|
|
1122 * cxx-pretty-print.c (pp_cxx_constrained_type_spec): New.
|
|
1123 * cxx-pretty-print.h: Declare it.
|
|
1124 * error.c (dump_type) [TEMPLATE_TYPE_PARM]: Call it.
|
|
1125 * pt.c (is_auto_r, extract_autos_r, extract_autos, auto_hash): New.
|
|
1126 (type_uses_auto): Use is_auto_r.
|
|
1127 (do_auto_deduction): Handle multiple 'auto's if -fconcepts.
|
|
1128 * typeck.c (structural_comptypes) [TEMPLATE_TYPE_PARM]: Compare
|
|
1129 constraints.
|
|
1130
|
|
1131 * pt.c (for_each_template_parm_r): Use WALK_SUBTREE.
|
|
1132 Return a meaningful value rather than error_mark_node.
|
|
1133 (for_each_template_parm): Return a tree.
|
|
1134 (uses_template_parms_level): Return bool.
|
|
1135 * cp-tree.h: Adjust.
|
|
1136
|
|
1137 * pt.c (unify): Don't diagnose no common base if we already have
|
|
1138 the same template.
|
|
1139 (do_auto_deduction): Explain deduction failure.
|
|
1140
|
|
1141 * pt.c (hash_tmpl_and_args): Use iterative_hash_object on template
|
|
1142 uid.
|
|
1143
|
|
1144 * parser.c (synthesize_implicit_template_parm)
|
|
1145 (finish_fully_implicit_template): Make static.
|
|
1146
|
|
1147 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
|
|
1148
|
|
1149 * call.c: Reorder #include's and remove duplicates.
|
|
1150 * class.c: Likewise.
|
|
1151 * constexpr.c: Likewise.
|
|
1152 * cp-array-notation.c: Likewise.
|
|
1153 * cp-cilkplus.c: Likewise.
|
|
1154 * cp-gimplify.c: Likewise.
|
|
1155 * cp-lang.c: Likewise.
|
|
1156 * cp-objcp-common.c: Likewise.
|
|
1157 * cp-ubsan.c: Likewise.
|
|
1158 * cvt.c: Likewise.
|
|
1159 * cxx-pretty-print.c: Likewise.
|
|
1160 * decl.c: Likewise.
|
|
1161 * decl2.c: Likewise.
|
|
1162 * dump.c: Likewise.
|
|
1163 * error.c: Likewise.
|
|
1164 * except.c: Likewise.
|
|
1165 * expr.c: Likewise.
|
|
1166 * friend.c: Likewise.
|
|
1167 * init.c: Likewise.
|
|
1168 * lambda.c: Likewise.
|
|
1169 * lex.c: Likewise.
|
|
1170 * mangle.c: Likewise.
|
|
1171 * method.c: Likewise.
|
|
1172 * name-lookup.c: Likewise.
|
|
1173 * optimize.c: Likewise.
|
|
1174 * parser.c: Likewise.
|
|
1175 * pt.c: Likewise.
|
|
1176 * ptree.c: Likewise.
|
|
1177 * repo.c: Likewise.
|
|
1178 * rtti.c: Likewise.
|
|
1179 * search.c: Likewise.
|
|
1180 * semantics.c: Likewise.
|
|
1181 * tree.c: Likewise.
|
|
1182 * typeck.c: Likewise.
|
|
1183 * typeck2.c: Likewise.
|
|
1184 * vtable-class-hierarchy.c: Likewise.
|
|
1185
|
|
1186 2015-10-29 Paolo Carlini <paolo.carlini@oracle.com>
|
|
1187
|
|
1188 PR c++/67845
|
|
1189 * decl.c (grokfndecl): In case of erroneous cv-qualified non-member
|
|
1190 functions consistently reset TREE_TYPE (decl) too.
|
|
1191
|
|
1192 2015-10-28 Jason Merrill <jason@redhat.com>
|
|
1193
|
|
1194 DR 1518
|
|
1195 * class.c (type_has_user_provided_or_explicit_constructor): New.
|
|
1196 (check_bases_and_members): Use it.
|
|
1197 * cp-tree.h: Declare it.
|
|
1198
|
|
1199 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
|
|
1200 Thomas Schwinge <thomas@codesourcery.com>
|
|
1201 James Norris <jnorris@codesourcery.com>
|
|
1202 Joseph Myers <joseph@codesourcery.com>
|
|
1203 Julian Brown <julian@codesourcery.com>
|
|
1204 Nathan Sidwell <nathan@codesourcery.com>
|
|
1205 Bernd Schmidt <bschmidt@redhat.com>
|
|
1206
|
|
1207 * parser.c (cp_parser_omp_clause_name): Add auto, gang, seq,
|
|
1208 vector, worker.
|
|
1209 (cp_parser_oacc_simple_clause): New.
|
|
1210 (cp_parser_oacc_shape_clause): New.
|
|
1211 (cp_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
|
|
1212 (OACC_LOOP_CLAUSE_MASK): Likewise.
|
|
1213 * semantics.c (finish_omp_clauses): Add auto, gang, seq, vector,
|
|
1214 worker. Unify the handling of teams, tasks and vector_length with
|
|
1215 the other loop shape clauses.
|
|
1216
|
|
1217 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
|
|
1218 James Norris <jnorris@codesourcery.com>
|
|
1219 Cesar Philippidis <cesar@codesourcery.com>
|
|
1220
|
|
1221 PR c/64765
|
|
1222 PR c/64880
|
|
1223 * cp-tree.h (finish_oacc_kernels, finish_oacc_parallel): Don't
|
|
1224 declare functions.
|
|
1225 (finish_omp_construct): Declare function.
|
|
1226 * parser.c (cp_parser_oacc_loop): Add p_name, mask, cclauses
|
|
1227 formal parameters, and handle these. Adjust all users.
|
|
1228 (cp_parser_oacc_kernels, cp_parser_oacc_parallel): Merge functions
|
|
1229 into...
|
|
1230 (cp_parser_oacc_kernels_parallel): ... this new function. Adjust
|
|
1231 all users.
|
|
1232 * semantics.c (finish_oacc_kernels, finish_oacc_parallel): Merge functions into...
|
|
1233 (finish_omp_construct): ... this new function.
|
|
1234
|
|
1235 2015-10-25 Jason Merrill <jason@redhat.com>
|
|
1236
|
|
1237 DR 2179
|
|
1238 * pt.c (process_partial_specialization): Handle error_mark_node
|
|
1239 from most_specialized_partial_spec.
|
|
1240
|
|
1241 2015-10-23 Jason Merrill <jason@redhat.com>
|
|
1242
|
|
1243 DR 1518
|
|
1244 DR 1630
|
|
1245 PR c++/54835
|
|
1246 PR c++/60417
|
|
1247 * call.c (convert_like_real): Value-initialization can't use
|
|
1248 explicit constructors in C++11 and up.
|
|
1249
|
|
1250 PR c++/67813
|
|
1251 * constexpr.c (cxx_eval_store_expression): Always use *valp if
|
|
1252 set.
|
|
1253
|
|
1254 2015-10-22 Jason Merrill <jason@redhat.com>
|
|
1255
|
|
1256 * call.c (add_template_conv_candidate): Pass DEDUCE_CALL.
|
|
1257 (add_template_candidate_real): Handle it.
|
|
1258 * pt.c (fn_type_unification): Handle it.
|
|
1259
|
|
1260 * call.c (add_conv_candidate): Remove first_arg parm.
|
|
1261 (add_template_conv_candidate): Likewise.
|
|
1262 (add_template_candidate_real): Don't pass it.
|
|
1263 (build_op_call_1): Likewise.
|
|
1264
|
|
1265 2015-10-22 Richard Biener <rguenther@suse.de>
|
|
1266
|
|
1267 * semantics.c (cp_finish_omp_clause_depend_sink): Properly convert
|
|
1268 before folding a MINUS_EXPR.
|
|
1269 (finish_omp_clauses): Likewise.
|
|
1270
|
|
1271 2015-10-21 Paolo Carlini <paolo.carlini@oracle.com>
|
|
1272
|
|
1273 PR c++/66781
|
|
1274 * parser.c (cp_parser_enum_specifier): Upon error_at set
|
|
1275 nested_name_specifier to error_mark_node; improve error message.
|
|
1276
|
|
1277 2015-10-21 Paolo Carlini <paolo.carlini@oracle.com>
|
|
1278
|
|
1279 PR c++/67847
|
|
1280 * parser.c (cp_parser_enum_specifier): Reject a nested_name_specifier
|
|
1281 which doesn't name a class or namespace.
|
|
1282
|
|
1283 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
|
|
1284
|
|
1285 * call.c (build_conditional_expr_1): Use boolean vector
|
|
1286 type for vector comparison.
|
|
1287 * typeck.c (build_vec_cmp): New.
|
|
1288 (cp_build_binary_op): Use build_vec_cmp for comparison.
|
|
1289
|
|
1290 2015-10-20 Jason Merrill <jason@redhat.com>
|
|
1291
|
|
1292 PR c++/66583
|
|
1293 * init.c (innermost_aggr_scope): New.
|
|
1294 (build_field_list): Change uses_unions_p to uses_unions_or_anon_p.
|
|
1295 (sort_mem_initializers): Handle initializers for entire anonymous
|
|
1296 aggregates.
|
|
1297
|
|
1298 2015-10-20 Marek Polacek <polacek@redhat.com>
|
|
1299
|
|
1300 * parser.c (is_cilkplus_vector_p): Don't define here.
|
|
1301
|
|
1302 2015-10-19 Jason Merrill <jason@redhat.com>
|
|
1303
|
|
1304 PR c++/67064
|
|
1305 * semantics.c (force_paren_expr): Don't mess with hard register vars.
|
|
1306
|
|
1307 Implement N4268, Do constant evaluation of all non-type template args.
|
|
1308 * parser.c (cp_parser_template_argument): For C++1z just parse a
|
|
1309 constant-expression.
|
|
1310 * pt.c (convert_nontype_argument): For C++1z always call
|
|
1311 maybe_constant_value.
|
|
1312
|
|
1313 * constexpr.c (cxx_eval_constant_expression): Expand PTRMEM_CST
|
|
1314 only when necessary.
|
|
1315 (cxx_eval_component_reference): Like here.
|
|
1316 * decl2.c (lower_var_init): And here.
|
|
1317 (c_parse_final_cleanups): Call it.
|
|
1318 * typeck2.c (digest_init_r): Not here.
|
|
1319 * decl.c (complete_vars): Or here.
|
|
1320 (cp_finish_decl): Add local statics to symbol table.
|
|
1321
|
|
1322 2015-10-17 Jason Merrill <jason@redhat.com>
|
|
1323
|
|
1324 PR c++/68006
|
|
1325 * decl.c (implicit_default_ctor_p): New.
|
|
1326 (start_preparsed_function): Don't clobber on entry to one.
|
|
1327
|
|
1328 2015-10-16 Paolo Carlini <paolo.carlini@oracle.com>
|
|
1329
|
|
1330 PR c++/67926
|
|
1331 * constexpr.c (potential_constant_expression_1): Handle
|
|
1332 UNARY_LEFT_FOLD_EXPR, UNARY_RIGHT_FOLD_EXPR, BINARY_LEFT_FOLD_EXPR,
|
|
1333 BINARY_RIGHT_FOLD_EXPR.
|
|
1334
|
|
1335 2015-10-13 Jakub Jelinek <jakub@redhat.com>
|
|
1336 Aldy Hernandez <aldyh@redhat.com>
|
|
1337
|
|
1338 * class.c (finish_struct_1): Call finish_omp_declare_simd_methods.
|
|
1339 * cp-gimplify.c (cp_gimplify_expr): Handle OMP_TASKLOOP.
|
|
1340 (cp_genericize_r): Likewise.
|
|
1341 (cxx_omp_finish_clause): Don't diagnose references.
|
|
1342 (cxx_omp_disregard_value_expr): New function.
|
|
1343 * cp-objcp-common.h (LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR): Redefine.
|
|
1344 * cp-tree.h (OMP_FOR_GIMPLIFYING_P): Document for OMP_TASKLOOP.
|
|
1345 (DECL_OMP_PRIVATIZED_MEMBER): Define.
|
|
1346 (finish_omp_declare_simd_methods, push_omp_privatization_clauses,
|
|
1347 pop_omp_privatization_clauses, save_omp_privatization_clauses,
|
|
1348 restore_omp_privatization_clauses, omp_privatize_field,
|
|
1349 cxx_omp_disregard_value_expr): New prototypes.
|
|
1350 (finish_omp_clauses): Add two new arguments.
|
|
1351 (finish_omp_for): Add ORIG_DECLV argument.
|
|
1352 * parser.c (cp_parser_lambda_body): Call
|
|
1353 save_omp_privatization_clauses and restore_omp_privatization_clauses.
|
|
1354 (cp_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
|
|
1355 (cp_parser_omp_var_list_no_open): Handle structure elements for
|
|
1356 map, to and from clauses. Handle array sections in reduction
|
|
1357 clause. Parse this keyword. Formatting fixes.
|
|
1358 (cp_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
|
|
1359 if clause modifiers.
|
|
1360 (cp_parser_omp_clause_num_tasks, cp_parser_omp_clause_grainsize,
|
|
1361 cp_parser_omp_clause_priority, cp_parser_omp_clause_hint,
|
|
1362 cp_parser_omp_clause_defaultmap): New functions.
|
|
1363 (cp_parser_omp_clause_ordered): Parse optional parameter.
|
|
1364 (cp_parser_omp_clause_reduction): Handle array reductions.
|
|
1365 (cp_parser_omp_clause_schedule): Parse optional simd modifier.
|
|
1366 (cp_parser_omp_clause_nogroup, cp_parser_omp_clause_orderedkind):
|
|
1367 New functions.
|
|
1368 (cp_parser_omp_clause_linear): Parse linear clause modifiers.
|
|
1369 (cp_parser_omp_clause_depend_sink): New function.
|
|
1370 (cp_parser_omp_clause_depend): Parse source/sink depend kinds.
|
|
1371 (cp_parser_omp_clause_map): Parse release/delete map kinds and
|
|
1372 optional always modifier.
|
|
1373 (cp_parser_oacc_all_clauses): Adjust cp_parser_omp_clause_if
|
|
1374 and finish_omp_clauses callers.
|
|
1375 (cp_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
|
|
1376 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
|
|
1377 (OMP_CRITICAL_CLAUSE_MASK): Define.
|
|
1378 (cp_parser_omp_critical): Parse critical clauses.
|
|
1379 (cp_parser_omp_for_incr): Use cp_tree_equal if
|
|
1380 processing_template_decl.
|
|
1381 (cp_parser_omp_for_loop_init): Return tree instead of bool. Handle
|
|
1382 non-static data member iterators.
|
|
1383 (cp_parser_omp_for_loop): Handle doacross loops, adjust
|
|
1384 finish_omp_for and finish_omp_clauses callers.
|
|
1385 (cp_omp_split_clauses): Adjust finish_omp_clauses caller.
|
|
1386 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
|
|
1387 (cp_parser_omp_simd): Allow ordered clause if it has no parameter.
|
|
1388 (OMP_FOR_CLAUSE_MASK): Add linear clause.
|
|
1389 (cp_parser_omp_for): Disallow ordered clause when combined with
|
|
1390 distribute. Disallow linear clause when combined with distribute
|
|
1391 and not combined with simd.
|
|
1392 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
|
|
1393 (cp_parser_omp_ordered): Add CONTEXT argument, return bool instead
|
|
1394 of tree, parse clauses and if depend clause is found, don't parse
|
|
1395 a body.
|
|
1396 (cp_parser_omp_parallel): Disallow copyin clause on target parallel.
|
|
1397 Allow target parallel without for after it.
|
|
1398 (OMP_TASK_CLAUSE_MASK): Add priority clause.
|
|
1399 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
|
|
1400 (cp_parser_omp_target_data): Diagnose no map clauses or clauses with
|
|
1401 invalid kinds.
|
|
1402 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
|
|
1403 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
|
|
1404 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
|
|
1405 (cp_parser_omp_target_enter_data, cp_parser_omp_target_exit_data): New
|
|
1406 functions.
|
|
1407 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
|
|
1408 defaultmap and is_device_ptr clauses.
|
|
1409 (cp_parser_omp_target): Parse target parallel and target simd. Set
|
|
1410 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
|
|
1411 and target exit data. Diagnose invalid map kinds.
|
|
1412 (cp_parser_oacc_cache): Adjust finish_omp_clauses caller.
|
|
1413 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
|
|
1414 (cp_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
|
|
1415 construct.
|
|
1416 (OMP_TASKLOOP_CLAUSE_MASK): Define.
|
|
1417 (cp_parser_omp_taskloop): New function.
|
|
1418 (cp_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
|
|
1419 handle PRAGMA_OMP_TASKLOOP.
|
|
1420 (cp_parser_pragma): Handle PRAGMA_OMP_ORDERED here directly,
|
|
1421 handle PRAGMA_OMP_TASKLOOP, call push_omp_privatization_clauses
|
|
1422 and pop_omp_privatization_clauses around parsing calls.
|
|
1423 (cp_parser_cilk_for): Adjust finish_omp_clauses caller.
|
|
1424 * pt.c (apply_late_template_attributes): Adjust tsubst_omp_clauses
|
|
1425 and finish_omp_clauses callers.
|
|
1426 (tsubst_omp_clause_decl): Return NULL if decl is NULL.
|
|
1427 For TREE_LIST, copy over OMP_CLAUSE_DEPEND_SINK_NEGATIVE bit.
|
|
1428 Use tsubst_expr instead of tsubst_copy, undo convert_from_reference
|
|
1429 effects.
|
|
1430 (tsubst_omp_clauses): Add ALLOW_FIELDS argument. Handle new
|
|
1431 OpenMP 4.5 clauses. Use tsubst_omp_clause_decl for more clauses.
|
|
1432 If ALLOW_FIELDS, handle non-static data members in the clauses.
|
|
1433 Clear OMP_CLAUSE_LINEAR_STEP if it has been cleared before.
|
|
1434 (omp_parallel_combined_clauses): New variable.
|
|
1435 (tsubst_omp_for_iterator): Add ORIG_DECLV argument, recur on
|
|
1436 OMP_FOR_ORIG_DECLS, handle non-static data member iterators.
|
|
1437 Improve handling of clauses on combined constructs.
|
|
1438 (tsubst_expr): Call push_omp_privatization_clauses and
|
|
1439 pop_omp_privatization_clauses around instantiation of certain
|
|
1440 OpenMP constructs, improve handling of clauses on combined
|
|
1441 constructs, handle OMP_TASKLOOP, adjust tsubst_omp_for_iterator,
|
|
1442 tsubst_omp_clauses and finish_omp_for callers, handle clauses on
|
|
1443 critical and ordered, handle OMP_TARGET_{ENTER,EXIT}_DATA.
|
|
1444 (instantiate_decl): Call save_omp_privatization_clauses and
|
|
1445 restore_omp_privatization_clauses around instantiation.
|
|
1446 (dependent_omp_for_p): Fix up comment typo. Handle SCOPE_REF.
|
|
1447 * semantics.c (omp_private_member_map, omp_private_member_vec,
|
|
1448 omp_private_member_ignore_next): New variables.
|
|
1449 (finish_non_static_data_member): Return dummy decl for privatized
|
|
1450 non-static data members.
|
|
1451 (omp_clause_decl_field, omp_clause_printable_decl,
|
|
1452 omp_note_field_privatization, omp_privatize_field): New functions.
|
|
1453 (handle_omp_array_sections_1): Fix comment typo.
|
|
1454 Add IS_OMP argument, handle structure element bases, diagnose
|
|
1455 bitfields, pass IS_OMP recursively, diagnose known zero length
|
|
1456 array sections in depend clauses, handle array sections in reduction
|
|
1457 clause, diagnose negative length even for pointers.
|
|
1458 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
|
|
1459 types, pass IS_OMP down to handle_omp_array_sections_1, handle
|
|
1460 array sections in reduction clause, set
|
|
1461 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
|
|
1462 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
|
|
1463 (finish_omp_reduction_clause): Handle array sections and arrays.
|
|
1464 Use omp_clause_printable_decl.
|
|
1465 (finish_omp_declare_simd_methods, cp_finish_omp_clause_depend_sink):
|
|
1466 New functions.
|
|
1467 (finish_omp_clauses): Add ALLOW_FIELDS and DECLARE_SIMD arguments.
|
|
1468 Handle new OpenMP 4.5 clauses and new restrictions for the old
|
|
1469 ones, handle non-static data members, reject this keyword when not
|
|
1470 allowed.
|
|
1471 (push_omp_privatization_clauses, pop_omp_privatization_clauses,
|
|
1472 save_omp_privatization_clauses, restore_omp_privatization_clauses):
|
|
1473 New functions.
|
|
1474 (handle_omp_for_class_iterator): Handle OMP_TASKLOOP class iterators.
|
|
1475 Add collapse and ordered arguments. Fix handling of lastprivate
|
|
1476 iterators in doacross loops.
|
|
1477 (finish_omp_for): Add ORIG_DECLV argument, handle doacross loops,
|
|
1478 adjust c_finish_omp_for, handle_omp_for_class_iterator and
|
|
1479 finish_omp_clauses callers. Fill in OMP_CLAUSE_LINEAR_STEP on simd
|
|
1480 loops with non-static data member iterators.
|
|
1481
|
|
1482 2015-10-12 Ville Voutilainen <ville.voutilainen@gmail.com>
|
|
1483
|
|
1484 PR c++/58566
|
|
1485 * lambda.c (lambda_return_type): Return error_mark_node
|
|
1486 instead of void_type_node for the error cases.
|
|
1487
|
|
1488 2015-10-08 Jason Merrill <jason@redhat.com>
|
|
1489
|
|
1490 * cp-tree.h (SIMPLE_TARGET_EXPR_P): New.
|
|
1491 * init.c (get_nsdmi): Use it.
|
|
1492 * typeck2.c (massage_init_elt): Use it.
|
|
1493
|
|
1494 2015-10-07 Jason Merrill <jason@redhat.com>
|
|
1495
|
|
1496 PR c++/67557
|
|
1497 * call.c (is_base_field_ref): New.
|
|
1498 (unsafe_copy_elision_p): New.
|
|
1499 (build_over_call): Use it.
|
|
1500
|
|
1501 2015-10-07 Marek Polacek <polacek@redhat.com>
|
|
1502
|
|
1503 PR sanitizer/67867
|
|
1504 * search.c (accessible_p): Initialize OTYPE to NULL_TREE.
|
|
1505
|
|
1506 2015-10-07 Marek Polacek <polacek@redhat.com>
|
|
1507
|
|
1508 * cp-gimplify.c (genericize_if_stmt): Use protected_set_expr_location.
|
|
1509 (genericize_cp_loop): Likewise.
|
|
1510 * decl.c (cxx_maybe_build_cleanup): Likewise.
|
|
1511 * parser.c (cp_parser_binary_expression): Likewise.
|
|
1512 (cp_parser_omp_for_loop): Likewise.
|
|
1513 (cp_parser_omp_construct): Likewise.
|
|
1514 * semantics.c (finish_transaction_stmt): Likewise.
|
|
1515 (build_transaction_expr): Likewise.
|
|
1516
|
|
1517 2015-10-06 Jason Merrill <jason@redhat.com>
|
|
1518
|
|
1519 PR c++/67810
|
|
1520 * parser.c (cp_parser_fold_expr_p): Remove.
|
|
1521 (is_binary_op): New.
|
|
1522 (cp_parser_fold_expression): Take LHS as parameter.
|
|
1523 (cp_parser_primary_expression): Call it after parsing an expression.
|
|
1524 (cp_parser_binary_expression, cp_parser_assignment_operator_opt)
|
|
1525 (cp_parser_expression): Ignore an operator followed by '...'.
|
|
1526 (is_binary_op): New.
|
|
1527 * pt.c (tsubst_unary_left_fold, tsubst_binary_left_fold)
|
|
1528 (tsubst_unary_right_fold, tsubst_binary_right_fold): Handle errors.
|
|
1529
|
|
1530 2015-10-06 Marek Polacek <polacek@redhat.com>
|
|
1531
|
|
1532 PR c++/67863
|
|
1533 * call.c (build_conditional_expr_1): Build the COND_EXPR with
|
|
1534 a location.
|
|
1535
|
|
1536 2015-10-05 Paolo Carlini <paolo.carlini@oracle.com>
|
|
1537
|
|
1538 PR c++/53856
|
|
1539 * pt.c (check_default_tmpl_args): Per [temp.param]/9, do not
|
|
1540 reject default template arguments in out of class definitions
|
|
1541 of members of non-template classes.
|
|
1542
|
|
1543 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
|
|
1544
|
|
1545 * tree.c (cp_tree_equal): Use real_equal instead of
|
|
1546 REAL_VALUES_EQUAL.
|
|
1547
|
|
1548 2015-10-04 Jason Merrill <jason@redhat.com>
|
|
1549
|
|
1550 Implement N4514, C++ Extensions for Transactional Memory.
|
|
1551 * cp-tree.h (struct cp_declarator): Add tx_qualifier field.
|
|
1552 (BCS_NORMAL, BCS_TRANSACTION): New enumerators.
|
|
1553 * lex.c (init_reswords): Limit TM kewords to -fgnu-tm.
|
|
1554 * parser.c (cp_lexer_get_preprocessor_token): Fix @synchronized.
|
|
1555 (make_call_declarator): Take tx_qualifier.
|
|
1556 (cp_parser_tx_qualifier_opt): New.
|
|
1557 (cp_parser_lambda_declarator_opt): Use it.
|
|
1558 (cp_parser_direct_declarator): Likewise.
|
|
1559 (cp_parser_statement): Handle atomic_noexcept, atomic_cancel.
|
|
1560 (cp_parser_compound_statement): Change in_try parameter to bcs_flags.
|
|
1561 (cp_parser_std_attribute): Map optimize_for_synchronized to
|
|
1562 transaction_callable.
|
|
1563 (cp_parser_transaction): Take the token. Handle atomic_noexcept.
|
|
1564 * lambda.c (maybe_add_lambda_conv_op): Handle transaction-safety.
|
|
1565 * call.c (enum conversion_kind): Add ck_tsafe.
|
|
1566 (standard_conversion): Handle transaction-safety conversion.
|
|
1567 (convert_like_real, resolve_address_of_overloaded_function): Likewise.
|
|
1568 (check_methods): Diagnose transaction_safe_dynamic on non-virtual
|
|
1569 function.
|
|
1570 (look_for_tm_attr_overrides): Don't inherit transaction_safe_dynamic.
|
|
1571 * cvt.c (tx_safe_fn_type_p, tx_unsafe_fn_variant)
|
|
1572 (can_convert_tx_safety): New.
|
|
1573 * typeck.c (composite_pointer_type): Handle transaction-safety.
|
|
1574 * name-lookup.h (enum scope_kind): Add sk_transaction.
|
|
1575 * name-lookup.c (begin_scope): Handle it.
|
|
1576 * semantics.c (begin_compound_stmt): Pass it.
|
|
1577 * decl.c (check_previous_goto_1): Check it.
|
|
1578 (struct named_label_entry): Add in_transaction_scope.
|
|
1579 (poplevel_named_label_1): Set it.
|
|
1580 (check_goto): Check it.
|
|
1581 (duplicate_decls): A specialization can be transaction_safe
|
|
1582 independently of its template.
|
|
1583 (grokdeclarator): Handle tx-qualifier.
|
|
1584 * rtti.c (ptr_initializer): Handle transaction-safe.
|
|
1585 * search.c (check_final_overrider): Check transaction_safe_dynamic.
|
|
1586 Don't check transaction_safe.
|
|
1587 * mangle.c (write_function_type): Mangle transaction_safe here.
|
|
1588 (write_CV_qualifiers_for_type): Not here.
|
|
1589 (write_type): Preserve transaction_safe when stripping attributes.
|
|
1590 * error.c (dump_type_suffix): Print transaction_safe.
|
|
1591
|
|
1592 2015-10-02 Marek Polacek <polacek@redhat.com>
|
|
1593
|
|
1594 PR c/64249
|
|
1595 * parser.c (cp_parser_statement): Add CHAIN parameter and pass it
|
|
1596 down to cp_parser_selection_statement.
|
|
1597 (cp_parser_selection_statement): Add CHAIN parameter. Add code to
|
|
1598 warn about duplicated if-else-if conditions.
|
|
1599 (cp_parser_implicitly_scoped_statement): Add CHAIN parameter and pass
|
|
1600 it down to cp_parser_statement.
|
|
1601
|
|
1602 2015-10-01 Ville Voutilainen <ville.voutilainen@gmail.com>
|
|
1603
|
|
1604 PR c++/54430
|
|
1605 * name-lookup.c (push_binding): Make non-static.
|
|
1606 * name-lookup.h (push_binding): Declare it.
|
|
1607 * parser.c (cp_parser_range_for): Use it, get the range
|
|
1608 declaration away from the scope until the range expression
|
|
1609 has been parsed, then restore the declaration.
|
|
1610
|
|
1611 2015-09-23 Ville Voutilainen <ville.voutilainen@gmail.com>
|
|
1612
|
|
1613 Fix small typos in the coding rule enforcement warnings.
|
|
1614 * parser.c (cp_parser_namespace_definition): Replace 'namepace'
|
|
1615 with 'namespace'.
|
|
1616
|
|
1617 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
|
|
1618
|
|
1619 * decl.c (xref_basetypes): Check virtual and/or multiple
|
|
1620 inheritance warning.
|
|
1621 * parser.c (cp_parser_namespace_definition): Check namespaces
|
|
1622 warning.
|
|
1623 * pt.c (push_template_decl_real): Check templates warning.
|
|
1624
|
|
1625 2015-09-22 Jason Merrill <jason@redhat.com>
|
|
1626
|
|
1627 * mangle.c (abi_warn_or_compat_version_crosses): New.
|
|
1628 Use it instead of abi_version_crosses.
|
|
1629 (mangle_decl): Deal with -fabi-compat-version and -Wabi separately.
|
|
1630
|
|
1631 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
|
|
1632
|
|
1633 Complete the implementation of N4230, Nested namespace definition.
|
|
1634 * parser.c (cp_parser_namespace_definition): Support namespace
|
|
1635 attributes both before and after the namespace identifier.
|
|
1636
|
|
1637 2015-09-19 Trevor Saunders <tbsaunde@tbsaunde.org>
|
|
1638
|
|
1639 * cp-gimplify.c (gimplify_must_not_throw_expr): Adjust.
|
|
1640
|
|
1641 2015-09-18 Ville Voutilainen <ville.voutilainen@gmail.com>
|
|
1642
|
|
1643 Implement nested namespace definitions.
|
|
1644 * parser.c (cp_parser_namespace_definition): Grok nested namespace
|
|
1645 definitions.
|
|
1646
|
|
1647 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
|
|
1648
|
|
1649 * parser.c (pragma_lex): Add loc argument. Rearrange the code to
|
|
1650 make it more similar to the C version.
|
|
1651
|
|
1652 2015-09-17 Andrew Sutton <andrew.n.sutton@gmail.com>
|
|
1653 Jason Merrill <jason@redhat.com>
|
|
1654
|
|
1655 Implement N4295 fold-expressions.
|
|
1656 * cp-tree.def: Add UNARY_LEFT_FOLD_EXPR, UNARY_RIGHT_FOLD_EXPR,
|
|
1657 BINARY_LEFT_FOLD_EXPR, BINARY_RIGHT_FOLD_EXPR.
|
|
1658 * cp-objcp-common.c (cp_common_init_ts): Handle them.
|
|
1659 * cp-tree.h (FOLD_EXPR_CHECK, BINARY_FOLD_EXPR_CHECK, FOLD_EXPR_P)
|
|
1660 (FOLD_EXPR_MODIFY_P, FOLD_EXPR_OP, FOLD_EXPR_PACK, FOLD_EXPR_INIT): New.
|
|
1661 * parser.c (cp_parser_skip_to_closing_parenthesis): Split out...
|
|
1662 (cp_parser_skip_to_closing_parenthesis_1): This function. Change
|
|
1663 or_comma parameter to or_ttype.
|
|
1664 (cp_parser_fold_operator, cp_parser_fold_expr_p)
|
|
1665 (cp_parser_fold_expression): New.
|
|
1666 (cp_parser_primary_expression): Use them.
|
|
1667 * pt.c (expand_empty_fold, fold_expression, tsubst_fold_expr_pack)
|
|
1668 (tsubst_fold_expr_init, expand_left_fold, tsubst_unary_left_fold)
|
|
1669 (tsubst_binary_left_fold, expand_right_fold)
|
|
1670 (tsubst_unary_right_fold, tsubst_binary_right_fold): New.
|
|
1671 (tsubst_copy): Use them.
|
|
1672 (type_dependent_expression_p): Handle fold-expressions.
|
|
1673 * semantics.c (finish_unary_fold_expr)
|
|
1674 (finish_left_unary_fold_expr, finish_right_unary_fold_expr)
|
|
1675 (finish_binary_fold_expr): New.
|
|
1676
|
|
1677 2015-09-17 Richard Biener <rguenther@suse.de>
|
|
1678
|
|
1679 * cp-tree.h (note_decl_for_pch): Remove.
|
|
1680 * class.c (build_clone): Do not call note_decl_for_pch.
|
|
1681 * semantics.c (finish_member_declaration): Likewise.
|
|
1682 (note_decl_for_pch): Remove.
|
|
1683 * decl2.c (c_parse_final_cleanups): Mangle all globals before
|
|
1684 writing the PCH.
|
|
1685
|
|
1686 2015-09-14 Jason Merrill <jason@redhat.com>
|
|
1687
|
|
1688 PR c++/44282
|
|
1689 * mangle.c (write_CV_qualifiers_for_type): Also warn about regparm
|
|
1690 mangling with lower -fabi-version.
|
|
1691
|
|
1692 2015-09-14 Paolo Carlini <paolo.carlini@oracle.com>
|
|
1693
|
|
1694 PR c++/51911
|
|
1695 * parser.c (cp_parser_new_expression): Enforce 5.3.4/2 (as amended
|
|
1696 per the spirit of DR 1467).
|
|
1697
|
|
1698 2015-09-11 Mark Wielaard <mjw@redhat.com>
|
|
1699
|
|
1700 PR c/28901
|
|
1701 * cp-objcp-common.c (cxx_warn_unused_global_decl): Remove hard-coded
|
|
1702 VAR_P TREE_READONLY override.
|
|
1703
|
|
1704 2015-09-10 Paolo Carlini <paolo.carlini@oracle.com>
|
|
1705
|
|
1706 PR c++/67318
|
|
1707 * parser.c (cp_parser_parameter_declaration): Consume the ellipsis
|
|
1708 and set template_parameter_pack_p also when the type is null.
|
|
1709
|
|
1710 2015-09-09 Mark Wielaard <mjw@redhat.com>
|
|
1711
|
|
1712 * typeck.c (cp_build_binary_op): Check and warn when nonnull arg
|
|
1713 parm against NULL.
|
|
1714
|
|
1715 2015-09-10 Jakub Jelinek <jakub@redhat.com>
|
|
1716
|
|
1717 PR c++/67522
|
|
1718 * semantics.c (handle_omp_array_sections_1): Only run
|
|
1719 type_dependent_expression_p on VAR_DECL/PARM_DECLs.
|
|
1720 (finish_omp_clauses) <case OMP_CLAUSE_LINEAR>: Likewise.
|
|
1721 Don't adjust OMP_CLAUSE_LINEAR_STEP if OMP_CLAUSE_DECL
|
|
1722 is not a VAR_DECL/PARM_DECL.
|
|
1723
|
|
1724 PR c++/67511
|
|
1725 * semantics.c (handle_omp_for_class_iterator): Don't wrap
|
|
1726 error_mark_node into a NOP_EXPR to void_type_node.
|
|
1727
|
|
1728 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
|
|
1729
|
|
1730 PR c++/53184
|
|
1731 * decl2.c (constrain_class_visibility): Use Wsubobject-linkage.
|
|
1732
|
|
1733 2015-09-09 Jakub Jelinek <jakub@redhat.com>
|
|
1734
|
|
1735 PR c++/67504
|
|
1736 * parser.c (cp_parser_omp_clause_collapse): Test tree_fits_shwi_p
|
|
1737 before INTEGRAL_TYPE_P test.
|
|
1738
|
|
1739 2015-09-08 Jason Merrill <jason@redhat.com>
|
|
1740
|
|
1741 PR c++/67041
|
|
1742 * pt.c (tsubst_copy_and_build): Handle variables like functions.
|
|
1743
|
|
1744 2015-09-08 Paolo Carlini <paolo.carlini@oracle.com>
|
|
1745
|
|
1746 PR c++/67369
|
|
1747 * pt.c (tsubst_copy, [case FUNCTION_DECL]): Do not call tsubst
|
|
1748 if the first argument isn't a template.
|
|
1749
|
|
1750 2015-09-03 Martin Sebor <msebor@redhat.com>
|
|
1751
|
|
1752 PR c/66516
|
|
1753 * cp-tree.h (mark_rvalue_use, decay_conversion): Add new
|
|
1754 argument(s).
|
|
1755 * expr.c (mark_rvalue_use): Use new argument.
|
|
1756 * call.c (build_addr_func): Call decay_conversion with new
|
|
1757 argument.
|
|
1758 * pt.c (convert_template_argument): Call reject_gcc_builtin.
|
|
1759 * typeck.c (decay_conversion): Use new argument.
|
|
1760 (c_decl_implicit): Define.
|
|
1761
|
|
1762 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
|
|
1763
|
|
1764 PR middle-end/60586
|
|
1765 * cp-gimplify.c (cilk_cp_gimplify_call_params_in_spawned_fn): New
|
|
1766 function.
|
|
1767 (cp_gimplify_expr): Added a call to the function
|
|
1768 cilk_cp_gimplify_call_params_in_spawned_fn.
|
|
1769
|
|
1770 2015-09-01 Paolo Carlini <paolo.carlini@oracle.com>
|
|
1771
|
|
1772 PR c++/61753
|
|
1773 * decl.c (smallest_type_quals_location): New.
|
|
1774 (check_special_function_return_type): Use the latter; add int and
|
|
1775 const location_t* parameters.
|
|
1776 (grokdeclarator): Adjust check_special_function_return_type call.
|
|
1777
|
|
1778 2015-08-29 Markus Trippelsdorf <markus@trippelsdorf.de>
|
|
1779
|
|
1780 PR c++/67371
|
|
1781 * constexpr.c (potential_constant_expression_1): Remove IF_STMT
|
|
1782 case. Move label to COND_EXPR case. Remove checking of
|
|
1783 SWITCH_STMT_BODY.
|
|
1784
|
|
1785 2015-08-22 Paolo Carlini <paolo.carlini@oracle.com>
|
|
1786
|
|
1787 PR c++/63693
|
|
1788 * pt.c (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE_TYPE
|
|
1789 only on class types.
|
|
1790
|
|
1791 2015-08-21 Jason Merrill <jason@redhat.com>
|
|
1792
|
|
1793 PR c++/67240
|
|
1794 * constraint.cc (satisfy_implicit_conversion_constraint): Also
|
|
1795 check for NULL_TREE.
|
|
1796
|
|
1797 2015-08-21 Paolo Carlini <paolo.carlini@oracle.com>
|
|
1798
|
|
1799 * decl.c (grokvardecl): Simplify the latter.
|
|
1800
|
|
1801 2015-08-21 Paolo Carlini <paolo.carlini@oracle.com>
|
|
1802
|
|
1803 * decl.c (grokvardecl): Complete check added for c++/67065.
|
|
1804
|
|
1805 2015-08-20 Jason Merrill <jason@redhat.com>
|
|
1806
|
|
1807 * name-lookup.c (hidden_name_p): Handle OVERLOAD.
|
|
1808
|
|
1809 2015-08-20 Paolo Carlini <paolo.carlini@oracle.com>
|
|
1810
|
|
1811 PR c++/67065
|
|
1812 * decl.c (grokvardecl): Reject 'main' as global variable.
|
|
1813
|
|
1814 2015-08-19 Jason Merrill <jason@redhat.com>
|
|
1815
|
|
1816 PR c++/66957
|
|
1817 * search.c (protected_accessible_p): Remove redundant access_in_type.
|
|
1818 Add otype parm instead of walking binfo.
|
|
1819 (friend_accessible_p): Check SCOPE itself. Handle class
|
|
1820 templates. Pass through otype.
|
|
1821 (dfs_accessible_post): Handle all accessibility cases.
|
|
1822 (dfs_accessible_pre): New.
|
|
1823 (accessible_p): Use it. Don't check protected access here. Pass
|
|
1824 decl and otype to dfs_walk.
|
|
1825 (member_declared_in_type, dfs_access_in_type_pre): New.
|
|
1826 (access_in_type): Use dfs_access_in_type_pre.
|
|
1827 * friend.c (add_friend): Fix multiple friends with the same name.
|
|
1828
|
|
1829 * lambda.c (current_nonlambda_scope): New.
|
|
1830
|
|
1831 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
|
|
1832
|
|
1833 * call.c, class.c, cp-tree.h, decl.c, except.c, mangle.c,
|
|
1834 method.c, name-lookup.h, parser.c, parser.h, rtti.c,
|
|
1835 semantics.c, typeck2.c: Remove useless typedefs.
|
|
1836
|
|
1837 2015-08-18 Jason Merrill <jason@redhat.com>
|
|
1838
|
|
1839 DR 1155
|
|
1840 * pt.c (convert_nontype_argument): Allow internal linkage in C++11
|
|
1841 and up.
|
|
1842
|
|
1843 2015-08-17 Paolo Carlini <paolo.carlini@oracle.com>
|
|
1844
|
|
1845 PR c++/67216
|
|
1846 * call.c (null_ptr_cst_p): In C++11 return 'false' for 'false'.
|
|
1847
|
|
1848 2015-08-17 Jason Merrill <jason@redhat.com>
|
|
1849
|
|
1850 PR c++/67244
|
|
1851 * pt.c (tsubst_copy_and_build): Call insert_pending_capture_proxies.
|
|
1852
|
|
1853 PR c++/67104
|
|
1854 * constexpr.c (array_index_cmp, find_array_ctor_elt): New.
|
|
1855 (cxx_eval_array_reference, cxx_eval_store_expression): Use them.
|
|
1856
|
|
1857 * constexpr.c (cxx_eval_store_expression): Don't set
|
|
1858 CONSTRUCTOR_NO_IMPLICIT_ZERO if we have an enclosing CONSTRUCTOR
|
|
1859 without it.
|
|
1860 (cxx_eval_array_reference): Check it.
|
|
1861
|
|
1862 * except.c (check_noexcept_r): Assert that fn is POINTER_TYPE_P.
|
|
1863
|
|
1864 2015-08-14 Jason Merrill <jason@redhat.com>
|
|
1865
|
|
1866 PR c++/65974
|
|
1867 * decl2.c (mark_vtable_entries): Suppress -Wdeprecated.
|
|
1868
|
|
1869 2015-08-12 Jason Merrill <jason@redhat.com>
|
|
1870
|
|
1871 PR c++/67104
|
|
1872 * constexpr.c (cxx_eval_array_reference): Fix typo.
|
|
1873
|
|
1874 PR c++/67104
|
|
1875 * constexpr.c (cxx_eval_array_reference): Handle sparse
|
|
1876 CONSTRUCTORs.
|
|
1877
|
|
1878 PR c++/67108
|
|
1879 * decl2.c (c_parse_final_cleanups): Set at_eof to 2 at end.
|
|
1880 * error.c (dump_template_bindings): Don't tsubst in that case.
|
|
1881
|
|
1882 PR c++/67161
|
|
1883 * error.c (dump_decl) [TEMPLATE_ID_EXPR]: Pass
|
|
1884 TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS.
|
|
1885
|
|
1886 2015-08-08 Jason Merrill <jason@redhat.com>
|
|
1887
|
|
1888 PR c++/67152
|
|
1889 * pt.c (process_partial_specialization): Call
|
|
1890 associate_classtype_constraints.
|
|
1891
|
|
1892 PR c++/67159
|
|
1893 * constraint.cc (finish_template_introduction):
|
|
1894 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
|
|
1895
|
|
1896 PR c++/67142
|
|
1897 * pt.c (equal): Make sure tmpl is actually a template.
|
|
1898
|
|
1899 PR c++/67144
|
|
1900 * call.c (joust): Only call more_constrained on decls.
|
|
1901
|
|
1902 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
|
|
1903 Braden Obrzut <admin@maniacsvault.net>
|
|
1904 Jason Merrill <jason@redhat.com>
|
|
1905 Ville Voutilainen <ville.voutilainen@gmail.com>
|
|
1906
|
|
1907 Add C++ Concepts TS support.
|
|
1908 * constraint.cc, logic.cc: New files.
|
|
1909 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add constraint.o and logic.o.
|
|
1910 (c++.tags): Also process .cc files.
|
|
1911 * call.c (enum rejection_reason_code): Add rr_constraint_failure.
|
|
1912 (print_z_candidate): Handle it.
|
|
1913 (constraint_failure): New.
|
|
1914 (add_function_candidate): Check constraints.
|
|
1915 (build_new_function_call): Handle evaluating concepts.
|
|
1916 (joust): Check more_constrained.
|
|
1917 * class.c (add_method): Check equivalently_constrained.
|
|
1918 (build_clone): Copy constraints.
|
|
1919 (currently_open_class): Return tree.
|
|
1920 (resolve_address_of_overloaded_function): Check constraints.
|
|
1921 * constexpr.c (cxx_eval_constant_expression): Handle REQUIRES_EXPR.
|
|
1922 (potential_constant_expression_1): Likewise.
|
|
1923 * cp-objcp-common.c (cp_tree_size): Handle CONSTRAINT_INFO.
|
|
1924 (cp_common_init_ts): Handle WILDCARD_DECL and REQUIRES_EXPR.
|
|
1925 * cp-tree.def: Add CONSTRAINT_INFO, WILDCARD_DECL, REQUIRES_EXPR,
|
|
1926 SIMPLE_REQ, TYPE_REQ, COMPOUND_REQ, NESTED_REQ, PRED_CONSTR,
|
|
1927 EXPR_CONSTR, TYPE_CONSTR, ICONV_CONSTR, DEDUCT_CONSTR,
|
|
1928 EXCEPT_CONSTR, PARM_CONSTR, CONJ_CONSTR, DISJ_CONSTR.
|
|
1929 * cp-tree.h (struct tree_constraint_info, check_nonnull)
|
|
1930 (check_constraint_info, CI_TEMPLATE_REQS, CI_DECLARATOR_REQS)
|
|
1931 (CI_ASSOCIATED_CONSTRAINTS, CI_NORMALIZED_CONSTRAINTS)
|
|
1932 (CI_ASSUMPTIONS, TEMPLATE_PARMS_CONSTRAINTS)
|
|
1933 (TEMPLATE_PARM_CONSTRAINTS, COMPOUND_REQ_NOEXCEPT_P)
|
|
1934 (PLACEHOLDER_TYPE_CONSTRAINTS, PRED_CONSTR_EXPR, EXPR_CONSTR_EXPR)
|
|
1935 (TYPE_CONSTR_TYPE, ICONV_CONSTR_EXPR, ICONV_CONSTR_TYPE)
|
|
1936 (DEDUCT_CONSTR_EXPR, DEDUCT_CONSTR_PATTERN)
|
|
1937 (DEDUCT_CONSTR_PLACEHOLDER, EXCEPT_CONSTR_EXPR, PARM_CONSTR_PARMS)
|
|
1938 (PARM_CONSTR_OPERAND, CONSTRAINT_VAR_P, CONSTRAINED_PARM_CONCEPT)
|
|
1939 (CONSTRAINED_PARM_EXTRA_ARGS, CONSTRAINED_PARM_PROTOTYPE)
|
|
1940 (DECL_DECLARED_CONCEPT_P, WILDCARD_PACK_P, struct cp_unevaluated)
|
|
1941 (struct local_specialization_stack, enum auto_deduction_context)
|
|
1942 (variable_concept_p, concept_template_p)
|
|
1943 (struct deferring_access_check_sentinel): New.
|
|
1944 (enum cp_tree_node_structure_enum): Add TS_CP_CONSTRAINT_INFO.
|
|
1945 (union lang_tree_node): Add constraint_info field.
|
|
1946 (struct lang_decl_base): Add concept_p flag.
|
|
1947 (enum cp_decl_spec): Add ds_concept.
|
|
1948 (struct cp_declarator): Add requires_clause.
|
|
1949 * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
|
|
1950 (cxx_pretty_printer::expression): Handle REQUIRES_EXPR,
|
|
1951 TRAIT_EXPR, *_CONSTR.
|
|
1952 (pp_cxx_parameter_declaration_clause): Accept a chain of
|
|
1953 PARM_DECLs.
|
|
1954 (cxx_pretty_printer::declarator): Print requires-clause.
|
|
1955 (pp_cxx_template_declaration): Likewise.
|
|
1956 (pp_cxx_trait_expression): Handle CPTK_IS_SAME_AS.
|
|
1957 (pp_cxx_requires_clause, pp_cxx_requirement)
|
|
1958 (pp_cxx_requirement_list, pp_cxx_requirement_body)
|
|
1959 (pp_cxx_requires_expr, pp_cxx_simple_requirement)
|
|
1960 (pp_cxx_type_requirement, pp_cxx_compound_requirement)
|
|
1961 (pp_cxx_nested_requirement, pp_cxx_predicate_constraint)
|
|
1962 (pp_cxx_expression_constraint, pp_cxx_type_constraint)
|
|
1963 (pp_cxx_implicit_conversion_constraint)
|
|
1964 (pp_cxx_argument_deduction_constraint)
|
|
1965 (pp_cxx_exception_constraint, pp_cxx_parameterized_constraint)
|
|
1966 (pp_cxx_conjunction, pp_cxx_disjunction, pp_cxx_constraint): New.
|
|
1967 * cxx-pretty-print.h: Declare them.
|
|
1968 * decl.c (decls_match): Compare constraints.
|
|
1969 (duplicate_decls): Likewise. Remove constraints before freeing.
|
|
1970 (cxx_init_decl_processing): Call init_constraint_processing.
|
|
1971 (cp_finish_decl): Diagnose concept without initializer.
|
|
1972 (grokfndecl, grokvardecl): Handle concepts and constraints.
|
|
1973 (grokdeclarator): Handle concept, requires-clause.
|
|
1974 (grokparms): No longer static.
|
|
1975 (xref_tag_1): Check constraints.
|
|
1976 (finish_function): Call check_function_concept.
|
|
1977 (cp_tree_node_structure): Handle CONSTRAINT_INFO.
|
|
1978 (check_concept_refinement, is_concept_var, check_concept_fn): New.
|
|
1979 * decl2.c (check_classfn): Compare constraints.
|
|
1980 (mark_used): Don't instantiate concepts.
|
|
1981 * error.c (dump_template_decl): Print constraints.
|
|
1982 (dump_function_decl): Likewise.
|
|
1983 (dump_expr): Handle REQUIRES_EXPR, *_REQ, *_CONSTR.
|
|
1984 * lex.c (init_reswords): Set D_CXX_CONCEPTS.
|
|
1985 * method.c (implicitly_declare_fn): Copy constraints from
|
|
1986 inherited ctor.
|
|
1987 * parser.h (struct cp_parser): Add in_result_type_constraint_p and
|
|
1988 prevent_constrained_type_specifiers fields.
|
|
1989 * parser.c (make_call_declarator): Add requires_clause parm.
|
|
1990 (cp_parser_new): Clear prevent_constrained_type_specifiers.
|
|
1991 (cp_parser_primary_expression): Handle RID_IS_SAME_AS, RID_REQUIRES.
|
|
1992 (cp_parser_postfix_expression): Set prevent_constrained_type_specifiers.
|
|
1993 (cp_parser_trait_expr): Handle RID_IS_SAME_AS.
|
|
1994 (cp_parser_declaration): Handle concept introduction.
|
|
1995 (cp_parser_member_declaration): Likewise.
|
|
1996 (cp_parser_template_parameter): Handle constrained parameter.
|
|
1997 (cp_parser_type_parameter): Handle constraints.
|
|
1998 (cp_parser_decl_specifier_seq): Handle RID_CONCEPT.
|
|
1999 (cp_parser_template_id): Handle partial concept id.
|
|
2000 (cp_parser_type_name): Add overload that takes typename_keyword_p.
|
|
2001 Handle constrained parameter.
|
|
2002 (cp_parser_nonclass_name): Handle concept names.
|
|
2003 (cp_parser_alias_declaration): Handle constraints.
|
|
2004 (cp_parser_late_return_type_opt): Also handle requires-clause.
|
|
2005 (cp_parser_type_id_1): Handle deduction constraint.
|
|
2006 (cp_parser_parameter_declaration): Handle constrained parameters.
|
|
2007 (cp_parser_class_specifier_1): Handle constraints.
|
|
2008 (cp_parser_template_declaration_after_parameters): Split out from
|
|
2009 cp_parser_template_declaration_after_export.
|
|
2010 (cp_parser_single_declaration): Handle constraints.
|
|
2011 (synthesize_implicit_template_parm): Handle constraints.
|
|
2012 (cp_parser_maybe_concept_name, cp_parser_maybe_partial_concept_id)
|
|
2013 (cp_parser_introduction_list, get_id_declarator)
|
|
2014 (get_unqualified_id, is_constrained_parameter)
|
|
2015 (cp_parser_check_constrained_type_parm)
|
|
2016 (cp_parser_constrained_type_template_parm)
|
|
2017 (cp_parser_constrained_template_template_parm)
|
|
2018 (constrained_non_type_template_parm, finish_constrained_parameter)
|
|
2019 (declares_constrained_type_template_parameter)
|
|
2020 (declares_constrained_template_template_parameter)
|
|
2021 (check_type_concept, cp_parser_maybe_constrained_type_specifier)
|
|
2022 (cp_parser_maybe_concept_name, cp_parser_maybe_partial_concept_id)
|
|
2023 (cp_parser_requires_clause, cp_parser_requires_clause_opt)
|
|
2024 (cp_parser_requires_expression)
|
|
2025 (cp_parser_requirement_parameter_list, cp_parser_requirement_body)
|
|
2026 (cp_parser_requirement_list, cp_parser_requirement)
|
|
2027 (cp_parser_simple_requirement, cp_parser_type_requirement)
|
|
2028 (cp_parser_compound_requirement, cp_parser_nested_requirement)
|
|
2029 (cp_parser_template_introduction)
|
|
2030 (cp_parser_explicit_template_declaration)
|
|
2031 (get_concept_from_constraint): New.
|
|
2032 * pt.c (local_specialization_stack): Implement.
|
|
2033 (maybe_new_partial_specialization): New.
|
|
2034 (maybe_process_partial_specialization): Use it.
|
|
2035 (retrieve_local_specialization, register_local_specialization)
|
|
2036 (template_parm_to_arg, build_template_decl, extract_fnparm_pack)
|
|
2037 (tsubst_expr): No longer static.
|
|
2038 (spec_hasher::equal): Compare constraints.
|
|
2039 (determine_specialization): Handle constraints.
|
|
2040 (check_explicit_specialization): Handle concepts.
|
|
2041 (process_template_parm): Handle constraints.
|
|
2042 (end_template_parm_list): Add overload taking no arguments.
|
|
2043 (process_partial_specialization): Handle concepts and constraints.
|
|
2044 Register partial specializations of variable templates.
|
|
2045 (redeclare_class_template): Handle constraints.
|
|
2046 (convert_template_argument): Handle WILDCARD_DECL. Check
|
|
2047 is_compatible_template_arg.
|
|
2048 (coerce_template_parameter_pack): Handle wildcard packs.
|
|
2049 (coerce_template_parms): DR 1430 also applies to concepts. Add
|
|
2050 overloads taking fewer parameters.
|
|
2051 (lookup_template_class_1): Handle constraints.
|
|
2052 (lookup_template_variable): Concepts are always bool.
|
|
2053 (finish_template_variable): Handle concepts and constraints.
|
|
2054 (tsubst_friend_class): Handle constraints.
|
|
2055 (gen_elem_of_pack_expansion_instantiation): Handle constraints.
|
|
2056 (tsubst_pack_expansion): Handle local parameters.
|
|
2057 (tsubst_decl) [FUNCTION_DECL]: Handle constraints.
|
|
2058 (tsubst) [TEMPLATE_TYPE_PARM]: Handle deduction constraints.
|
|
2059 (tsubst_copy_and_build): Handle REQUIRES_EXPR.
|
|
2060 (more_specialized_fn, more_specialized_partial_spec): Check constraints.
|
|
2061 (more_specialized_inst): Split out from most_specialized_instantiation.
|
|
2062 (most_specialized_partial_spec): Check constraints.
|
|
2063 (instantiate_decl): Never instantiate a concept.
|
|
2064 (value_dependent_expression_p): Handle REQUIRES_EXPR, TYPE_REQ,
|
|
2065 variable concepts.
|
|
2066 (type_dependent_expression_p): Handle WILDCARD_DECL, REQUIRES_EXPR.
|
|
2067 (instantiation_dependent_r): Handle REQUIRES_EXPR and concepts.
|
|
2068 (do_auto_deduction): Add overload taking tsubst flags and context enum.
|
|
2069 Handle constraints.
|
|
2070 (get_template_for_ordering, most_constrained_function)
|
|
2071 (is_compatible_template_arg, convert_wildcard_argument)
|
|
2072 (struct constr_entry, struct constr_hasher, decl_constraints)
|
|
2073 (valid_constraints_p, get_constraints, set_constraints)
|
|
2074 (remove_constraints, init_constraint_processing): New.
|
|
2075 * ptree.c (cxx_print_xnode): Handle CONSTRAINT_INFO.
|
|
2076 * search.c (lookup_member): Do lookup in the open partial
|
|
2077 instantiation.
|
|
2078 * semantics.c (finish_template_template_parm): Handle constraints.
|
|
2079 (fixup_template_type): New.
|
|
2080 (finish_template_type): Call it.
|
|
2081 (trait_expr_value, finish_trait_expr): Handle CPTK_IS_SAME_AS.
|
|
2082 * tree.c (cp_tree_equal): Handle local parameters, CONSTRAINT_INFO.
|
|
2083 (cp_walk_subtrees): Handle REQUIRES_EXPR.
|
|
2084 * typeck.c (cp_build_function_call_vec): Check constraints.
|
|
2085
|
|
2086 2015-08-06 Jason Merrill <jason@redhat.com>
|
|
2087
|
|
2088 PR c++/66533
|
|
2089 * parser.c (cp_parser_primary_expression): Don't skip to the end
|
|
2090 of the statement if we're parsing tentatively.
|
|
2091
|
|
2092 PR c++/67130
|
|
2093 PR c++/67131
|
|
2094 PR c++/66260
|
|
2095 * mangle.c (write_expression) [TEMPLATE_ID_EXPR]: Handle variable
|
|
2096 templates.
|
|
2097 * pt.c (tsubst_copy_and_build): Check for argument substitution
|
|
2098 failure.
|
|
2099
|
|
2100 2015-08-05 Jason Merrill <jason@redhat.com>
|
|
2101
|
|
2102 * pt.c (determine_specialization): Print candidates after 'no
|
|
2103 match' error.
|
|
2104
|
|
2105 * decl.c (cp_finish_decl): Tidy.
|
|
2106 * typeck.c (finish_class_member_access_expr): Use
|
|
2107 type_dependent_expression_p.
|
|
2108 * semantics.c (finish_id_expression): Use
|
|
2109 type_dependent_expression_p. Don't build_qualified_name for a
|
|
2110 decl in non-dependent scope.
|
|
2111 * pt.c (type_dependent_expression_p): A TEMPLATE_ID_EXPR of an
|
|
2112 identifier is dependent. Remove variable_template_p check.
|
|
2113
|
|
2114 PR c++/66260
|
|
2115 PR c++/66596
|
|
2116 PR c++/66649
|
|
2117 PR c++/66923
|
|
2118 * pt.c (lookup_template_variable): Use NULL_TREE for type.
|
|
2119 (instantiate_template_1): Also set DECL_TI_ARGS based on
|
|
2120 the immediate parent.
|
|
2121 (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: Handle variable templates.
|
|
2122 (finish_template_variable): Add complain parm.
|
|
2123 * cp-tree.h: Adjust.
|
|
2124
|
|
2125 PR c++/65195
|
|
2126 PR c++/66619
|
|
2127 * semantics.c (finish_id_expression): Call convert_from_reference
|
|
2128 for variable template.
|
|
2129
|
|
2130 2015-08-04 Jason Merrill <jason@redhat.com>
|
|
2131
|
|
2132 * pt.c (lookup_template_class_1): Clear elt.spec.
|
|
2133
|
|
2134 * tree.c (build_target_expr): Copy the location from value.
|
|
2135
|
|
2136 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
|
|
2137
|
|
2138 * parser.c (cp_parser_selection_statement): Move handling of
|
|
2139 semicolon body to ...
|
|
2140 (cp_parser_implicitly_scoped_statement): .. here. Call
|
|
2141 warn_for_misleading_indentation even when the body is a
|
|
2142 semicolon. Extract token_indent_infos corresponding to the
|
|
2143 guard, body and next tokens. Adjust call to
|
|
2144 warn_for_misleading_indentation accordingly. Take
|
|
2145 token_indent_info argument.
|
|
2146 (cp_parser_already_scoped_statement): Likewise.
|
|
2147 (cp_parser_selection_statement, cp_parser_iteration_statement):
|
|
2148 Extract a token_indent_info corresponding to the guard token.
|
|
2149
|
|
2150 2015-08-01 Caroline Tice <cmtice@google.com>
|
|
2151
|
|
2152 PR 66521
|
|
2153 * mangle.c : Add vtable-verify.h to include files.
|
|
2154 (get_mangled_vtable_map_var_name): If the DECL_ASSEMBLER_NAME
|
|
2155 is "<anon>" get the real mangled name for the class instead, and
|
|
2156 also store the real mangled name in a vector for use later.
|
|
2157
|
|
2158 2015-07-31 Marek Polacek <polacek@redhat.com>
|
|
2159
|
|
2160 PR sanitizer/66977
|
|
2161 * typeck.c (get_member_function_from_ptrfunc): Don't sanitize
|
|
2162 RSHIFT_EXPR.
|
|
2163
|
|
2164 2015-07-30 Paolo Carlini <paolo.carlini@oracle.com>
|
|
2165
|
|
2166 * class.c (check_for_override): Use DECL_SOURCE_LOCATION and "%qD"
|
|
2167 in warning_at instead of "%q+D" in warning.
|
|
2168 (warn_hidden): Likewise but use location_of.
|
|
2169 (finish_struct_anon_r): Likewise use DECL_SOURCE_LOCATION in permerror.
|
|
2170 (check_bitfield_decl, check_field_decls): Likewise in warning_at.
|
|
2171 (check_field_decls): Likewise for permerror.
|
|
2172 (explain_non_literal_class): Likewise for inform.
|
|
2173 (check_bases_and_members, layout_class_type): Likewise for warning_at.
|
|
2174 (note_name_declared_in_class): Use location_of in permerror.
|
|
2175 * name-lookup.c (diagnose_name_conflict): Use location_of in inform.
|
|
2176 (pushdecl_maybe_friend_1): Use DECL_SOURCE_LOCATION in pedwarn,
|
|
2177 inform, and warning_at.
|
|
2178 (check_for_out_of_scope_variable): Likewise for warning_at and
|
|
2179 permerror.
|
|
2180
|
|
2181 2015-07-30 Jason Merrill <jason@redhat.com>
|
|
2182
|
|
2183 DR 1558
|
|
2184 PR c++/67021
|
|
2185 * pt.c (tsubst_decl) [TYPE_DECL]: Clear TYPE_DEPENDENT_P_VALID.
|
|
2186
|
|
2187 2015-07-28 Paolo Carlini <paolo.carlini@oracle.com>
|
|
2188
|
|
2189 * call.c (build_op_delete_call, convert_like_real, build_over_call):
|
|
2190 Use Use DECL_SOURCE_LOCATION and "%qD" in inform and pedwarn instead
|
|
2191 of "%q+D".
|
|
2192 * constexpr.c (explain_invalid_constexpr_fn): Likewise.
|
|
2193 * decl.c (duplicate_decls): Likewise for warning/warning_at.
|
|
2194 * except.c (maybe_noexcept_warning): Likewise.
|
|
2195 * friend.c (make_friend_class): Likewise for inform.
|
|
2196 * mangle.c (mangle_decl): Likewise for warning/warning_at.
|
|
2197 * method.c (process_subob_fn, walk_field_subobs,
|
|
2198 maybe_explain_implicit_delete): Likewise for inform.
|
|
2199 * parser.c (cp_parser_lambda_introducer): Likewise.
|
|
2200 * pt.c (check_specialization_namespace,
|
|
2201 maybe_process_partial_specialization): Likewise for permerror.
|
|
2202 (redeclare_class_template): Likewise for inform_n.
|
|
2203 (coerce_template_parms, tsubst_copy_and_build): Likewise for inform.
|
|
2204 * search.c (check_final_overrider): Likewise.
|
|
2205 * semantics.c (process_outer_var_ref): Likewise.
|
|
2206
|
|
2207 2015-07-27 Jason Merrill <jason@redhat.com>
|
|
2208
|
|
2209 * constexpr.c (cxx_eval_call_expression): Don't add this call to
|
|
2210 the hash table if !depth_ok.
|
|
2211
|
|
2212 2015-07-27 Marek Polacek <polacek@redhat.com>
|
|
2213
|
|
2214 PR c++/66555
|
|
2215 PR c/54979
|
|
2216 * call.c (build_new_op_1): Call warn_tautological_cmp.
|
|
2217 * pt.c (tsubst_copy_and_build): Use sentinel to suppress tautological
|
|
2218 compare warnings.
|
|
2219
|
|
2220 2015-07-26 Patrick Palka <ppalka@gcc.gnu.org>
|
|
2221
|
|
2222 PR c++/18969
|
|
2223 * typeck.c (check_return_expr): Also do the basic return-value
|
|
2224 validity checking if processing_template_decl and yet types are
|
|
2225 not dependent. Remove obsolete code.
|
|
2226
|
|
2227 2015-07-26 Paolo Carlini <paolo.carlini@oracle.com>
|
|
2228
|
|
2229 * decl.c (poplevel): Use Use DECL_SOURCE_LOCATION and "%qD"
|
|
2230 in warning_at instead of "%q+D" in warning.
|
|
2231 (warn_extern_redeclared_static): Likewise for inform.
|
|
2232 (check_redeclaration_no_default_args): Likewise for permerror.
|
|
2233 (duplicate_decls): Likewise.
|
|
2234 (check_previous_goto_1): Likewise for inform.
|
|
2235 (check_goto, start_decl, check_for_uninitialized_const_var,
|
|
2236 start_preparsed_function, finish_function§): Likewise.
|
|
2237 * decl2.c (build_anon_union_vars, c_parse_final_cleanups): Likewise.
|
|
2238 * init.c (sort_mem_initializers): Likewise.
|
|
2239 * typeck.c (convert_for_initialization): Likewise for inform.
|
|
2240 (maybe_warn_about_returning_address_of_local): Likewise.
|
|
2241 * typeck2.c (abstract_virtuals_error_sfinae): Likewise for inform.
|
|
2242 (cxx_incomplete_type_diagnostic): Likewise for emit_diagnostic.
|
|
2243
|
|
2244 2015-07-25 Patrick Palka <ppalka@gcc.gnu.org>
|
|
2245
|
|
2246 PR c++/66857
|
|
2247 * cvt.c (ocp_convert): Don't call scalar_constant_value when
|
|
2248 converting to a class type.
|
|
2249
|
|
2250 2015-07-24 Jason Merrill <jason@redhat.com>
|
|
2251
|
|
2252 PR c++/64969
|
|
2253 * pt.c (splice_late_return_type): Correct deduced return type for
|
|
2254 abbreviated function template.
|
|
2255
|
|
2256 2015-07-24 Richard Biener <rguenther@suse.de>
|
|
2257
|
|
2258 * init.c (build_vec_init): Build iterator bound in the same
|
|
2259 type as the iterator.
|
|
2260
|
|
2261 2015-07-23 Marek Polacek <polacek@redhat.com>
|
|
2262
|
|
2263 PR c++/66572
|
|
2264 * pt.c (tsubst_copy_and_build): Add warn_logical_op sentinel.
|
|
2265
|
|
2266 2015-07-23 Paolo Carlini <paolo.carlini@oracle.com>
|
|
2267
|
|
2268 PR c++/52987
|
|
2269 * parser.c (cp_parser_simple_declaration): Robustify check avoiding
|
|
2270 redundant error messages.
|
|
2271
|
|
2272 2015-07-21 Paolo Carlini <paolo.carlini@oracle.com>
|
|
2273
|
|
2274 * decl.c (grokdeclarator): For an erroneous template parameter
|
|
2275 propagate error_mark_node as type.
|
|
2276
|
|
2277 2015-07-20 Marek Polacek <polacek@redhat.com>
|
|
2278
|
|
2279 PR c++/55095
|
|
2280 * typeck.c (cp_build_binary_op): Warn about left shift overflows.
|
|
2281
|
|
2282 2015-07-15 Jason Merrill <jason@redhat.com>
|
|
2283
|
|
2284 PR c++/65091
|
|
2285 * parser.c (cp_parser_unqualified_id): Don't accept ~x in a
|
|
2286 template if there is no type x in scope.
|
|
2287
|
|
2288 2015-07-14 Patrick Palka <ppalka@gcc.gnu.org>
|
|
2289
|
|
2290 PR c++/66850
|
|
2291 * pt.c (redeclare_class_template): Set the DECL_CONTEXTs of each
|
|
2292 template template parm in the redeclaration.
|
|
2293 (lookup_template_class_1): Peel off irrelevant template levels
|
|
2294 from current_template_parms before augmenting the argument
|
|
2295 list.
|
|
2296
|
|
2297 2015-07-14 Andrea Azzarone <azzaronea@gmail.com>
|
|
2298
|
|
2299 PR c++/65071
|
|
2300 * parser.c (cp_parser_sizeof_pack): Also consider template template
|
|
2301 parameters.
|
|
2302
|
|
2303 2015-07-14 Jason Merrill <jason@redhat.com>
|
|
2304
|
|
2305 * call.c (build_new_method_call_1): Call reshape_init.
|
|
2306
|
|
2307 2015-07-14 Paolo Carlini <paolo.carlini@oracle.com>
|
|
2308
|
|
2309 * pt.c (check_template_shadow): Emit error + inform instead of
|
|
2310 two errors.
|
|
2311
|
|
2312 2015-07-13 Patrick Palka <ppalka@gcc.gnu.org>
|
|
2313
|
|
2314 PR c++/65186
|
|
2315 * pt.c (invalid_nontype_parm_type_p): Accept a bound template
|
|
2316 template parm type under C++11 and later.
|
|
2317
|
|
2318 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
|
|
2319
|
|
2320 * call.c: Fix double word typos.
|
|
2321 * cp-array-notation.c: Same.
|
|
2322 * cp-tree.h: Same.
|
|
2323 * init.c: Same.
|
|
2324 * name-lookup.c: Same.
|
|
2325 * parser.c: Same.
|
|
2326
|
|
2327 2015-07-10 Patrick Palka <ppalka@gcc.gnu.org>
|
|
2328
|
|
2329 PR c++/30044
|
|
2330 * pt.c (begin_template_parm_list): Add a dummy parameter level
|
|
2331 to current_template_parms.
|
|
2332 (end_template_parm_list): Remove the dummy parameter level
|
|
2333 before adding the real one.
|
|
2334 (tsubst): Don't attempt to substitute for template parameters
|
|
2335 corresponding to a dummy argument level.
|
|
2336 (template_parms_to_args): Remove obsolete hack for
|
|
2337 giving template template arguments the proper level.
|
|
2338 (splite_late_return_type): Remove obsolete hack for giving
|
|
2339 template template arguments the proper level.
|
|
2340 * error.c (dump_template_decl): Don't print dummy template
|
|
2341 levels.
|
|
2342
|
|
2343 2015-07-10 Paolo Carlini <paolo.carlini@oracle.com>
|
|
2344
|
|
2345 PR c++/54521
|
|
2346 * call.c (convert_like_real): Do not set LOOKUP_ONLYCONVERTING for
|
|
2347 the second step of copy-initialization.
|
|
2348
|
|
2349 2015-07-10 Jason Merrill <jason@redhat.com>
|
|
2350
|
|
2351 * pt.c (find_parameter_packs_r): Handle variable templates.
|
|
2352 (variable_template_specialization_p): New.
|
|
2353 * cp-tree.h: Declare it.
|
|
2354
|
|
2355 * parser.c (cp_parser_template_id): SET_EXPR_LOCATION.
|
|
2356
|
|
2357 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
|
|
2358
|
|
2359 * decl2.c (cpp_check): Revert latest change.
|
|
2360
|
|
2361 2015-07-09 Jason Merrill <jason@redhat.com>
|
|
2362
|
|
2363 * pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Call
|
|
2364 value_dependent_expression_p.
|
|
2365
|
|
2366 * cp-tree.h (struct cp_parameter_declarator): Rename ellipsis_p to
|
|
2367 template_parameter_pack_p.
|
|
2368 * parser.c (declarator_can_be_parameter_pack): False if
|
|
2369 parameter_pack_p is set.
|
|
2370 (make_parameter_declarator): Add template_parameter_pack_p parm.
|
|
2371 (cp_parser_template_parameter): Remove parameter pack parsing.
|
|
2372 (cp_parser_parameter_declaration): Handle all parameter packs.
|
|
2373 Tweak default argument permerror.
|
|
2374
|
|
2375 2015-07-09 Andrew Sutton <andrew.n.sutton@gmail.com>
|
|
2376
|
|
2377 * parser.c (cp_parser_default_type_template_argument)
|
|
2378 (cp_parser_default_template_template_argument): Factor out from
|
|
2379 cp_parser_type_parameter.
|
|
2380
|
|
2381 2015-07-09 Paolo Carlini <paolo.carlini@oracle.com>
|
|
2382
|
|
2383 * typeck.c (warn_args_num): Rename to error_args_num.
|
|
2384 (convert_arguments): Adjust calls.
|
|
2385
|
|
2386 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
|
|
2387
|
|
2388 * cp-ubsan.c: Don't include alloc-pool.h or lto-streamer.h.
|
|
2389
|
|
2390 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
|
|
2391
|
|
2392 * decl2.c (cpp_check): Deal with IS_CONSTEXPR.
|
|
2393
|
|
2394 2015-07-08 Jakub Jelinek <jakub@redhat.com>
|
|
2395
|
|
2396 * decl.c (grokfndecl): Handle flag_openmp_simd like flag_openmp.
|
|
2397 * pt.c (apply_late_template_attributes): Likewise.
|
|
2398
|
|
2399 2015-07-08 Marek Polacek <polacek@redhat.com>
|
|
2400
|
|
2401 PR c++/66748
|
|
2402 * tree.c (handle_abi_tag_attribute): Check for CLASS_TYPE_P before
|
|
2403 accessing TYPE_LANG_SPECIFIC node.
|
|
2404
|
|
2405 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
|
|
2406
|
|
2407 * call.c: Adjust includes.
|
|
2408 * class.c: Likewise.
|
|
2409 * constexpr.c: Likewise.
|
|
2410 * cp-array-notation.c: Likewise.
|
|
2411 * cp-gimplify.c: Likewise.
|
|
2412 * cp-lang.c: Likewise.
|
|
2413 * cp-objcp-common.c: Likewise.
|
|
2414 * cp-ubsan.c: Likewise.
|
|
2415 * cvt.c: Likewise.
|
|
2416 * decl.c: Likewise.
|
|
2417 * decl2.c: Likewise.
|
|
2418 * dump.c: Likewise.
|
|
2419 * error.c: Likewise.
|
|
2420 * except.c: Likewise.
|
|
2421 * expr.c: Likewise.
|
|
2422 * friend.c: Likewise.
|
|
2423 * init.c: Likewise.
|
|
2424 * lambda.c: Likewise.
|
|
2425 * lex.c: Likewise.
|
|
2426 * mangle.c: Likewise.
|
|
2427 * method.c: Likewise.
|
|
2428 * name-lookup.c: Likewise.
|
|
2429 * optimize.c: Likewise.
|
|
2430 * parser.c: Likewise.
|
|
2431 * pt.c: Likewise.
|
|
2432 * ptree.c: Likewise.
|
|
2433 * repo.c: Likewise.
|
|
2434 * rtti.c: Likewise.
|
|
2435 * search.c: Likewise.
|
|
2436 * semantics.c: Likewise.
|
|
2437 * tree.c: Likewise.
|
|
2438 * typeck.c: Likewise.
|
|
2439 * typeck2.c: Likewise.
|
|
2440
|
|
2441 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
|
|
2442
|
|
2443 * decl2.c (cpp_check): Deal with IS_MOVE_CONSTRUCTOR.
|
|
2444
|
|
2445 2015-07-06 Jason Merrill <jason@redhat.com>
|
|
2446
|
|
2447 * pt.c (reduce_template_parm_level): Also build the TYPE_DECL
|
|
2448 for a template template parameter.
|
|
2449 (tsubst_decl) [TEMPLATE_DECL]: Use the TEMPLATE_DECL built
|
|
2450 by reduce_template_parm_level.
|
|
2451
|
|
2452 * pt.c (argument_pack_element_is_expansion_p): A decl pack is an
|
|
2453 expansion.
|
|
2454
|
|
2455 2015-07-02 Jason Merrill <jason@redhat.com>
|
|
2456
|
|
2457 PR c++/66743
|
|
2458 * pt.c (for_each_template_parm_r) [UNDERLYING_TYPE]: Use
|
|
2459 TYPE_VALUES_RAW rather than TYPE_FIELDS.
|
|
2460
|
|
2461 2015-07-02 Andrew Sutton <andrew.n.sutton@gmail.com>
|
|
2462
|
|
2463 * pt.c (type_dependent_expression_p): Handle expressions
|
|
2464 that refer to variable templates.
|
|
2465
|
|
2466 2015-07-01 Jason Merrill <jason@redhat.com>
|
|
2467
|
|
2468 * lex.c (init_reswords): s/CXX0X/CXX11/.
|
|
2469 * parser.c (cp_lexer_get_preprocessor_token): Likewise.
|
|
2470
|
|
2471 * mangle.c (write_CV_qualifiers_for_type, write_nested_name):
|
|
2472 Attribute mangling is now -fabi-version=10.
|
|
2473
|
|
2474 PR c++/65945
|
|
2475 * decl.c (cxx_init_decl_processing): Set TYPE_ALIGN of nullptr_t.
|
|
2476 * class.c (layout_nonempty_base_or_field): Warn if that affects
|
|
2477 the offset of a field.
|
|
2478
|
|
2479 2015-07-01 Paolo Carlini <paolo.carlini@oracle.com>
|
|
2480
|
|
2481 PR c++/60365
|
|
2482 * parser.c (cp_parser_check_std_attribute): New.
|
|
2483 (cp_parser_std_attribute_list): Call it.
|
|
2484
|
|
2485 2015-07-01 Patrick Palka <ppalka@gcc.gnu.org>
|
|
2486
|
|
2487 PR c++/66686
|
|
2488 * pt.c (coerce_template_template_parm) [PARM_DECL]: Don't
|
|
2489 return 0 if tsubst returns a dependent type.
|
|
2490
|
|
2491 2015-06-30 Jason Merrill <jason@redhat.com>
|
|
2492
|
|
2493 PR debug/66653
|
|
2494 * decl2.c (is_late_template_attribute): True for tls_model.
|
|
2495
|
|
2496 PR debug/66653
|
|
2497 * cp-tree.h (CP_DECL_THREAD_LOCAL_P): New.
|
|
2498 (DECL_GNU_TLS_P): Use DECL_LANG_SPECIFIC field.
|
|
2499 (SET_DECL_GNU_TLS_P): New.
|
|
2500 * call.c (make_temporary_var_for_ref_to_temp): Use
|
|
2501 CP_DECL_THREAD_LOCAL_P.
|
|
2502 (set_up_extended_ref_temp): Likewise.
|
|
2503 * decl.c (duplicate_decls, expand_static_init): Likewise.
|
|
2504 (redeclaration_error_message, grokvardecl): Likewise.
|
|
2505 (start_decl, register_dtor_fn, grokdeclarator): Likewise.
|
|
2506 * decl2.c (get_guard, var_needs_tls_wrapper): Likewise.
|
|
2507 (handle_tls_init): Likewise.
|
|
2508 * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
|
|
2509 * semantics.c (finish_id_expression): Likewise.
|
|
2510 (handle_omp_array_sections_1, finish_omp_clauses): Likewise.
|
|
2511 (finish_omp_threadprivate): Likewise.
|
|
2512 * tree.c (decl_storage_duration): Likewise.
|
|
2513 * cp-gimplify.c (omp_var_to_track): Likewise.
|
|
2514 (cp_genericize_r): Check that it matches DECL_THREAD_LOCAL_P.
|
|
2515 * lex.c (retrofit_lang_decl): Return if DECL_LANG_SPECIFIC is
|
|
2516 already set.
|
|
2517
|
|
2518 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
|
|
2519
|
|
2520 Implement N4197 - Adding u8 character literals
|
|
2521 * parser.c (cp_parser_primary_expression()): Treat CPP_UTF8CHAR
|
|
2522 and CPP_UTF8CHAR_USERDEF tokens;
|
|
2523 (cp_parser_parenthesized_expression_list()): Treat CPP_UTF8CHAR token.
|
|
2524
|
|
2525 2015-06-29 Paolo Carlini <paolo.carlini@oracle.com>
|
|
2526
|
|
2527 PR c++/65977
|
|
2528 * decl.c (grokfndecl): Allow constexpr declarations of friend
|
|
2529 template specializations.
|
|
2530
|
|
2531 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
|
|
2532
|
|
2533 PR fortran/66605
|
|
2534 * decl.c (finish_function): Call do_warn_unused_parameter.
|
|
2535
|
|
2536 2015-06-29 Marek Polacek <polacek@redhat.com>
|
|
2537
|
|
2538 PR c/66322
|
|
2539 * decl.c (struct cp_switch): Add OUTSIDE_RANGE_P.
|
|
2540 (push_switch): Set OUTSIDE_RANGE_P.
|
|
2541 (pop_switch): Update c_do_switch_warnings call.
|
|
2542 (finish_case_label): Update c_add_case_label call.
|
|
2543 * semantics.c (finish_switch_cond): Don't warn about -Wswitch-bool
|
|
2544 here.
|
|
2545
|
|
2546 2015-06-27 Marek Polacek <polacek@redhat.com>
|
|
2547
|
|
2548 * call.c: Use VECTOR_TYPE_P.
|
|
2549 * constexpr.c: Likewise.
|
|
2550 * cvt.c: Likewise.
|
|
2551 * decl.c: Likewise.
|
|
2552 * decl2.c: Likewise.
|
|
2553 * init.c: Likewise.
|
|
2554 * semantics.c: Likewise.
|
|
2555 * tree.c: Likewise.
|
|
2556 * typeck.c: Likewise.
|
|
2557 * typeck2.c: Likewise.
|
|
2558
|
|
2559 2015-06-27 Marek Polacek <polacek@redhat.com>
|
|
2560
|
|
2561 * call.c (set_up_extended_ref_temp): Use VAR_P.
|
|
2562 * class.c: Use VAR_P throughout.
|
|
2563 * constexpr.c (cxx_eval_constant_expression): Use VAR_P.
|
|
2564 * cp-array-notation.c (make_triplet_val_inv): Likewise.
|
|
2565 * decl.c: Use VAR_OR_FUNCTION_DECL_P or VAR_P
|
|
2566 throughout.
|
|
2567 * decl2.c: Likewise.
|
|
2568 * error.c (dump_decl): Use VAR_P.
|
|
2569 * mangle.c (decl_implicit_alias_p): Likewise.
|
|
2570 * parser.c: Use VAR_P throughout.
|
|
2571 * pt.c: Likewise.
|
|
2572 * semantics.c: Likewise.
|
|
2573 * vtable-class-hierarchy.c: Likewise.
|
|
2574 * tree.c (handle_abi_tag_attribute): Use VAR_OR_FUNCTION_DECL_P.
|
|
2575
|
|
2576 2015-06-27 Andreas Schwab <schwab@linux-m68k.org>
|
|
2577
|
|
2578 * pt.c (check_unstripped_args): Mark parameter as unused.
|
|
2579
|
|
2580 2015-06-26 Jason Merrill <jason@redhat.com>
|
|
2581
|
|
2582 PR c++/66216
|
|
2583 * class.c (finish_struct): Call fixup_attribute_variants.
|
|
2584
|
|
2585 PR c++/66684
|
|
2586 * typeck2.c (merge_exception_specifiers): Allow different
|
|
2587 noexcept-specifiers if we've had errors.
|
|
2588
|
|
2589 PR c++/66255
|
|
2590 * pt.c (check_unstripped_args): Split out from...
|
|
2591 (retrieve_specialization): ...here. Allow typedefs in the type of
|
|
2592 a non-type argument.
|
|
2593
|
|
2594 PR c++/66067
|
|
2595 * mangle.c (write_nested_name): Limit TYPENAME_TYPE handling to
|
|
2596 TYPE_DECLs.
|
|
2597 * mangle.c (write_template_args): Handle 0 length TREE_VEC.
|
|
2598
|
|
2599 PR c++/66654
|
|
2600 * typeck2.c (digest_init_r): Only expect reshaping if the class is
|
|
2601 aggregate.
|
|
2602
|
|
2603 2015-06-26 Marek Polacek <polacek@redhat.com>
|
|
2604
|
|
2605 * cp-array-notation.c (expand_sec_reduce_builtin): Use INDIRECT_REF_P.
|
|
2606 * cp-ubsan.c (cp_ubsan_check_member_access_r): Likewise.
|
|
2607
|
|
2608 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
|
|
2609
|
|
2610 * call.c: Remove ipa-ref.h and plugin-api.h from include list.
|
|
2611 * class.c: Likewise.
|
|
2612 * cp-ubsan.c: Likewise.
|
|
2613 * decl.c: Likewise.
|
|
2614 * decl2.c: Likewise.
|
|
2615 * lambda.c: Likewise.
|
|
2616 * mangle.c: Likewise.
|
|
2617 * method.c: Likewise.
|
|
2618 * optimize.c: Likewise.
|
|
2619 * parser.c: Likewise.
|
|
2620 * semantics.c: Likewise.
|
|
2621 * tree.c: Likewise.
|
|
2622 * vtable-class-hierarchy.c: Likewise.
|
|
2623
|
|
2624 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
|
|
2625
|
|
2626 * constexpr.c (constexpr_fundef_hasher): Inherit from ggc_ptr_hash
|
|
2627 rather than ggc_hasher.
|
|
2628 (constexpr_call_hasher): Likewise.
|
|
2629 * cp-tree.h (cxx_int_tree_map_hasher, named_label_hasher): Likewise.
|
|
2630 * decl.c (typename_hasher): Likewise.
|
|
2631 * mangle.c (conv_type_hasher): Likewise.
|
|
2632 * pt.c (spec_hasher): Likewise.
|
|
2633 * tree.c (cplus_array_hasher, list_hasher): Likewise.
|
|
2634 * typeck2.c (abstract_type_hasher): Likewise.
|
|
2635
|
|
2636 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
|
|
2637
|
|
2638 * class.c (fixed_type_or_null_ref_ht): Inherit from nofree_ptr_hash
|
|
2639 rather than pointer_hash.
|
|
2640 (fixed_type_or_null): Use nofree_ptr_hash instead of pointer_hash.
|
|
2641 * semantics.c (nrv_data): Likewise.
|
|
2642 * tree.c (verify_stmt_tree_r, verify_stmt_tree): Likewise.
|
|
2643
|
|
2644 2015-06-24 Jason Merrill <jason@redhat.com>
|
|
2645
|
|
2646 PR c++/66647
|
|
2647 * pt.c (dependent_type_p_r): Check for dependent alias template
|
|
2648 specialization sooner.
|
|
2649
|
|
2650 PR c++/66501
|
|
2651 * class.c (type_has_nontrivial_assignment): Remove.
|
|
2652 * cp-tree.h: Remove declaration.
|
|
2653 * init.c (vec_copy_assign_is_trivial): New.
|
|
2654 (build_vec_init): Use it.
|
|
2655
|
|
2656 2015-06-24 Edward Smith-Rowland <3dw4rd@verizon.net>
|
|
2657
|
|
2658 Implement N3928 - Extending static_assert
|
|
2659 * parser.c (cp_parser_static_assert): Support static_assert with
|
|
2660 no message string. Supply an empty string in this case.
|
|
2661 * semantics.c (finish_static_assert): Don't try to print a message if
|
|
2662 the message strnig is empty.
|
|
2663
|
|
2664 2015-06-24 Adam Butcher <adam@jessamine.co.uk>
|
|
2665
|
|
2666 PR c++/65750
|
|
2667 * parser.c (cp_parser_simple_type_specifier): Don't synthesize
|
|
2668 implicit template parm if 'auto' is a placeholder for trailing
|
|
2669 return type.
|
|
2670
|
|
2671 2015-06-24 Patrick Palka <ppalka@gcc.gnu.org>
|
|
2672
|
|
2673 Revert:
|
|
2674 2015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
|
|
2675
|
|
2676 PR c++/30044
|
|
2677 * parser.c (cp_parser_template_parameter_list): Update
|
|
2678 current_template_parms right after processing a paramater.
|
|
2679 * pt.c (template_parms_to_args): Remove obsolete hack for
|
|
2680 giving template template arguments the proper level.
|
|
2681 (check_default_tmpl_args): Account for tested template
|
|
2682 parameter_lists.
|
|
2683 (splite_late_return_type): Remove obsolete hack for giving
|
|
2684 template template arguments the proper level.
|
|
2685
|
|
2686 2015-06-24 Paolo Carlini <paolo.carlini@oracle.com>
|
|
2687
|
|
2688 PR c++/65811
|
|
2689 * decl.c (duplicate_decls): Adjust DECL_COMDAT of newdecl.
|
|
2690
|
|
2691 2015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
|
|
2692
|
|
2693 PR c++/30044
|
|
2694 * parser.c (cp_parser_template_parameter_list): Update
|
|
2695 current_template_parms right after processing a paramater.
|
|
2696 * pt.c (template_parms_to_args): Remove obsolete hack for
|
|
2697 giving template template arguments the proper level.
|
|
2698 (check_default_tmpl_args): Account for tested template
|
|
2699 parameter_lists.
|
|
2700 (splite_late_return_type): Remove obsolete hack for giving
|
|
2701 template template arguments the proper level.
|
|
2702
|
|
2703 2015-06-23 Jason Merrill <jason@redhat.com>
|
|
2704
|
|
2705 PR c++/65879
|
|
2706 * decl.c (grokfndecl): Check the linkage of ctype, not just
|
|
2707 TYPE_ANONYMOUS_P.
|
|
2708 * tree.c (no_linkage_check): Skip the 'this' pointer.
|
|
2709
|
|
2710 PR c++/66501
|
|
2711 * class.c (type_has_nontrivial_assignment): New.
|
|
2712 * init.c (build_vec_init): Use it.
|
|
2713 * cp-tree.h: Declare it.
|
|
2714 * method.c (trivial_fn_p): Templates aren't trivial.
|
|
2715
|
|
2716 PR c++/66542
|
|
2717 * decl.c (expand_static_init): Make sure the destructor is callable
|
|
2718 here even if we have an initializer.
|
|
2719
|
|
2720 2015-06-04 Pierre-Marie de Rodat <derodat@adacore.com>
|
|
2721
|
|
2722 * lang-specs.h: Pass "-o %g.s" to cc1plus for headers even if
|
|
2723 -fdump-ada-spec is passed.
|
|
2724
|
|
2725 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
|
|
2726
|
|
2727 * decl2.c (cpp_check): Deal with HAS_DEPENDENT_TEMPLATE_ARGS.
|
|
2728
|
|
2729 2015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
|
|
2730
|
|
2731 * decl.c (grokdeclarator): Use declspecs->locations[ds_virtual].
|
|
2732
|
|
2733 2015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
|
|
2734
|
|
2735 * decl.c (grokdeclarator): Remove pointless code.
|
|
2736
|
|
2737 2015-06-22 Jason Merrill <jason@redhat.com>
|
|
2738
|
|
2739 PR c++/66515
|
|
2740 * call.c (implicit_conversion): Only reshape for classes.
|
|
2741
|
|
2742 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
|
|
2743
|
|
2744 * pt.c (maybe_adjust_types_for_deduction): Use std::swap instead of
|
|
2745 manually swapping.
|
|
2746 * semantics.c (finish_omp_atomic): Likewise.
|
|
2747 * typeck.c (cp_build_array_ref): Likewise.
|
|
2748
|
|
2749 2015-06-20 Mikhail Maltsev <maltsevm@gmail.com>
|
|
2750
|
|
2751 PR c++/65882
|
|
2752 * call.c (build_new_op_1): Check tf_warning flag in all cases.
|
|
2753
|
|
2754 2015-06-19 Jason Merrill <jason@redhat.com>
|
|
2755
|
|
2756 PR c++/66585
|
|
2757 * pt.c (instantiate_class_template_1): Clear
|
|
2758 cp_unevaluated_operand and c_inhibit_evaluation_warnings.
|
|
2759
|
|
2760 PR c++/65880
|
|
2761 * decl.c (build_ptrmemfunc_type): Check TYPE_GET_PTRMEMFUNC_TYPE after
|
|
2762 cv-qualifiers.
|
|
2763 * typeck.c (merge_types): build_ptrmemfunc_type before applying
|
|
2764 quals and attributes.
|
|
2765
|
|
2766 PR c++/65973
|
|
2767 * constexpr.c (build_constexpr_constructor_member_initializers):
|
|
2768 Handle an empty STATEMENT_LIST.
|
|
2769
|
|
2770 PR c++/65843
|
|
2771 * pt.c (tsubst_copy_and_build): Register a capture proxy in
|
|
2772 local_specializations.
|
|
2773
|
|
2774 2015-06-17 Jason Merrill <jason@redhat.com>
|
|
2775
|
|
2776 PR c++/66001
|
|
2777 * constexpr.c (cxx_eval_constant_expression): Handle TRY_BLOCK and
|
|
2778 TRY_FINALLY_EXPR.
|
|
2779 (potential_constant_expression_1): Likewise.
|
|
2780
|
|
2781 2015-06-17 Jason Merrill <jason@redhat.com>
|
|
2782
|
|
2783 PR c++/66515
|
|
2784 * call.c (implicit_conversion): Call reshape_init here, early.
|
|
2785 (build_aggr_conv): Not here.
|
|
2786
|
|
2787 2015-06-17 Jakub Jelinek <jakub@redhat.com>
|
|
2788
|
|
2789 PR c++/66571
|
|
2790 * pt.c (tsubst_omp_clause_decl): New function.
|
|
2791 (tsubst_omp_clauses): Use it or tsubst_copy instead of
|
|
2792 tsubst_expr on OMP_CLAUSE_DECL.
|
|
2793
|
|
2794 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
|
|
2795
|
|
2796 * cp-lang.c (cxx_dwarf_name): Use anon_aggrname_p.
|
|
2797 * cp-tree.h (TYPE_ANONYMOUS_P): Likewise.
|
|
2798 * decl.c (grokdeclarator, xref_tag_1): Likewise.
|
|
2799 * error.c (dump_aggr_type): likewise.
|
|
2800 * pt.c (push_template_decl_real): Likewise.
|
|
2801 * name-lookup.c (make_anon_name): Use anon_aggrname_format.
|
|
2802
|
|
2803 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
|
|
2804
|
|
2805 * call.c: Do not include input.h, line-map.h or is-a.h.
|
|
2806 * class.c: Likewise.
|
|
2807 * constexpr.c: Likewise.
|
|
2808 * cp-array-notation.c: Likewise.
|
|
2809 * cp-gimplify.c: Likewise.
|
|
2810 * cp-lang.c: Likewise.
|
|
2811 * cp-objcp-common.c: Likewise.
|
|
2812 * cp-tree.h: Likewise.
|
|
2813 * cp-ubsan.c: Likewise.
|
|
2814 * cvt.c: Likewise.
|
|
2815 * decl.c: Likewise.
|
|
2816 * decl2.c: Likewise.
|
|
2817 * dump.c: Likewise.
|
|
2818 * error.c: Likewise.
|
|
2819 * except.c: Likewise.
|
|
2820 * expr.c: Likewise.
|
|
2821 * friend.c: Likewise.
|
|
2822 * init.c: Likewise.
|
|
2823 * lambda.c: Likewise.
|
|
2824 * lex.c: Likewise.
|
|
2825 * mangle.c: Likewise.
|
|
2826 * method.c: Likewise.
|
|
2827 * name-lookup.c: Likewise.
|
|
2828 * optimize.c: Likewise.
|
|
2829 * parser.c: Likewise.
|
|
2830 * pt.c: Likewise.
|
|
2831 * ptree.c: Likewise.
|
|
2832 * repo.c: Likewise.
|
|
2833 * rtti.c: Likewise.
|
|
2834 * search.c: Likewise.
|
|
2835 * semantics.c: Likewise.
|
|
2836 * tree.c: Likewise.
|
|
2837 * typeck.c: Likewise.
|
|
2838 * typeck2.c: Likewise.
|
|
2839 * vtable-class-hierarchy.c: Likewise.
|
|
2840
|
|
2841 2015-06-16 Paolo Carlini <paolo.carlini@oracle.com>
|
|
2842
|
|
2843 PR c++/59682
|
|
2844 * parser.c (cp_parser_new_placement): Reject an empty expression-list.
|
|
2845
|
|
2846 2015-06-16 Jason Merrill <jason@redhat.com>
|
|
2847
|
|
2848 PR c++/66536
|
|
2849 * tree.c (replace_placeholders_r) [CONSTRUCTOR]: Handle type
|
|
2850 mismatch.
|
|
2851
|
|
2852 PR c++/58063
|
|
2853 * tree.c (bot_manip): Remap SAVE_EXPR.
|
|
2854
|
|
2855 PR c++/66387
|
|
2856 * pt.c (tsubst_copy) [VAR_DECL]: Use process_outer_var_ref.
|
|
2857
|
|
2858 2015-06-15 Nathan Sidwell <nathan@acm.org>
|
|
2859
|
|
2860 PR c++/58583
|
|
2861 * cp-tree.h (DECL_INSTANTIATING_NSDMI_P): New.
|
|
2862 * init.c (get_nsdmi): Check for DEFAULT_ARG in template case and
|
|
2863 protect it from recursive instantiation.
|
|
2864
|
|
2865 2015-06-15 Paolo Carlini <paolo.carlini@oracle.com>
|
|
2866
|
|
2867 PR c++/51048
|
|
2868 * decl2.c (no_linkage_error): Do not issue a permerror if the DECL
|
|
2869 using a local type is pure virtual.
|
|
2870
|
|
2871 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
|
|
2872
|
|
2873 * call.c: Remove comment documenting the long-deleted
|
|
2874 function build_method_call.
|
|
2875
|
|
2876 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
|
|
2877
|
|
2878 PR c++/65168
|
|
2879 * typeck.c (cp_build_binary_op): Warn when comparing an address
|
|
2880 of a reference against NULL.
|
|
2881
|
|
2882 2015-06-12 Jason Merrill <jason@redhat.com>
|
|
2883
|
|
2884 PR c++/65719
|
|
2885 * pt.c (tsubst_decl) [VAR_DECL]: Mark namespace-scope
|
|
2886 variables as DECL_NOT_REALLY_EXTERN.
|
|
2887
|
|
2888 2015-06-11 Jason Merrill <jason@redhat.com>
|
|
2889
|
|
2890 PR c++/66445
|
|
2891 * constexpr.c (potential_constant_expression_1): Handle a
|
|
2892 DECL_EXPR of TYPE_DECL.
|
|
2893
|
|
2894 PR c++/66450
|
|
2895 * constexpr.c (cxx_eval_store_expression): Avoid messing up outer
|
|
2896 ctx->ctor.
|
|
2897
|
|
2898 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
|
|
2899
|
|
2900 * decl.c (cxx_init_decl_processing): Register the main
|
|
2901 translation unit through the new debug hook.
|
|
2902
|
|
2903 2015-06-10 Jason Merrill <jason@redhat.com>
|
|
2904
|
|
2905 PR c++/66289
|
|
2906 * cp-tree.h (TEMPLATE_DECL_COMPLEX_ALIAS_P): New.
|
|
2907 * pt.c (push_template_decl_real): Set it.
|
|
2908 (dependent_alias_template_spec_p): Use it.
|
|
2909 (dependent_type_p_r): Use dependent_alias_template_spec_p.
|
|
2910 (uses_all_template_parms_data, uses_all_template_parms_r)
|
|
2911 (complex_alias_template_p): New.
|
|
2912 (get_template_parm_index): Handle BOUND_TEMPLATE_TEMPLATE_PARM.
|
|
2913
|
|
2914 2015-06-09 Jason Merrill <jason@redhat.com>
|
|
2915
|
|
2916 DR 1467
|
|
2917 PR c++/51747
|
|
2918 * typeck2.c (digest_init_r): Replace previous change with
|
|
2919 gcc_unreachable.
|
|
2920
|
|
2921 PR c++/66387
|
|
2922 * semantics.c (process_outer_var_ref): Make sure the value is
|
|
2923 actually constant before returning it.
|
|
2924 * typeck.c (cp_build_array_ref): Allow subscripting non-lvalue
|
|
2925 array.
|
|
2926
|
|
2927 2015-06-09 Paolo Carlini <paolo.carlini@oracle.com>
|
|
2928
|
|
2929 PR c++/65815
|
|
2930 * typeck2.c (digest_nsdmi_init): On aggregates use reshape_init.
|
|
2931 * init.c (expand_default_init): Likewise.
|
|
2932
|
|
2933 2015-06-09 Jason Merrill <jason@redhat.com>
|
|
2934
|
|
2935 PR c++/66383
|
|
2936 * tree.c (replace_placeholders_r): Handle placeholders for an
|
|
2937 outer object.
|
|
2938 * typeck2.c (store_init_value): Only replace_placeholders for
|
|
2939 objects of class type.
|
|
2940
|
|
2941 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
|
|
2942
|
|
2943 * call.c : Adjust include files.
|
|
2944 * class.c : Likewise.
|
|
2945 * constexpr.c : Likewise.
|
|
2946 * cp-array-notation.c : Likewise.
|
|
2947 * cp-cilkplus.c : Likewise.
|
|
2948 * cp-gimplify.c : Likewise.
|
|
2949 * cp-lang.c : Likewise.
|
|
2950 * cp-objcp-common.c : Likewise.
|
|
2951 * cp-tree.h : Likewise.
|
|
2952 * cp-ubsan.c : Likewise.
|
|
2953 * cvt.c : Likewise.
|
|
2954 * decl.c : Likewise.
|
|
2955 * decl2.c : Likewise.
|
|
2956 * dump.c : Likewise.
|
|
2957 * error.c : Likewise.
|
|
2958 * except.c : Likewise.
|
|
2959 * expr.c : Likewise.
|
|
2960 * friend.c : Likewise.
|
|
2961 * init.c : Likewise.
|
|
2962 * lambda.c : Likewise.
|
|
2963 * lex.c : Likewise.
|
|
2964 * mangle.c : Likewise.
|
|
2965 * method.c : Likewise.
|
|
2966 * name-lookup.c : Likewise.
|
|
2967 * optimize.c : Likewise.
|
|
2968 * parser.c : Likewise.
|
|
2969 * pt.c : Likewise.
|
|
2970 * ptree.c : Likewise.
|
|
2971 * repo.c : Likewise.
|
|
2972 * rtti.c : Likewise.
|
|
2973 * search.c : Likewise.
|
|
2974 * semantics.c : Likewise.
|
|
2975 * tree.c : Likewise.
|
|
2976 * typeck.c : Likewise.
|
|
2977 * typeck2.c : Likewise.
|
|
2978 * vtable-class-hierarchy.c : Likewise.
|
|
2979
|
|
2980 2015-06-05 Jason Merrill <jason@redhat.com>
|
|
2981
|
|
2982 PR c++/66405
|
|
2983 * pt.c (argument_pack_element_is_expansion_p): Return 2 if
|
|
2984 the expansion has extra args.
|
|
2985 (use_pack_expansion_extra_args_p): Return true in that case.
|
|
2986
|
|
2987 PR c++/66405
|
|
2988 * pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is
|
|
2989 dependent even if it has a type.
|
|
2990
|
|
2991 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
|
|
2992
|
|
2993 * cp-objcp-common.c: Adjust comment for
|
|
2994 cxx_warn_unused_global_decl.
|
|
2995 * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Remove
|
|
2996 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New.
|
|
2997 * cp-tree.h (note_mangling_alias): Protoize.
|
|
2998 (cp_write_global_declarations): Remove.
|
|
2999 (cxx_post_compilation_parsing_cleanups): Protoize.
|
|
3000 * decl.c (wrapup_globals_for_namespace): Remove use of DATA
|
|
3001 argument.
|
|
3002 * decl2.c (mangling_aliases): New global.
|
|
3003 (build_java_method_aliases): New. Adapted from
|
|
3004 collect_candidates_for_java_method_aliases.
|
|
3005 (collect_candidates_for_java_method_aliases): Remove.
|
|
3006 (build_java_method_aliases): Remove.
|
|
3007 (generate_mangling_aliases): New.
|
|
3008 (note_mangling_alias): New. Moved from mangle_decl.
|
|
3009 (locus_at_end_of_parsing): New global.
|
|
3010 (c_parse_final_cleanups): Rename from
|
|
3011 cp_write_global_declarations.
|
|
3012 Use locus_at_end_of_parsing.
|
|
3013 Call generate_mangling_aliases.
|
|
3014 Rename call to collect_candidates_for_java_method_aliases into
|
|
3015 build_java_method_aliases.
|
|
3016 Remove call to finalize_compilation_unit.
|
|
3017 Move vtable handling into cxx_post_compilation_parsing_cleanups.
|
|
3018 Do not call check_global_declarations or
|
|
3019 emit_debug_global_declarations.
|
|
3020 (cxx_post_compilation_parsing_cleanups): New.
|
|
3021 * mangle.c (mangle_decl): Move code to note_mangling_alias.
|
|
3022 * name-lookup.c (do_namespace_alias): Call early_global_decl.
|
|
3023
|
|
3024 2015-06-05 Nathan Sidwell <nathan@acm.org>
|
|
3025
|
|
3026 PR c++/52595
|
|
3027 * parser.c (cp_parser_cache_defarg): Continue looking for
|
|
3028 declarators when scanning a potential template argument list of an
|
|
3029 NSDMI.
|
|
3030
|
|
3031 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
|
|
3032
|
|
3033 * call.c: Adjust includes for restructured coretypes.h.
|
|
3034 * class.c: Likewise.
|
|
3035 * constexpr.c: Likewise.
|
|
3036 * cp-array-notation.c: Likewise.
|
|
3037 * cp-gimplify.c: Likewise.
|
|
3038 * cp-lang.c: Likewise.
|
|
3039 * cp-objcp-common.c: Likewise.
|
|
3040 * cp-tree.h: Likewise.
|
|
3041 * cp-ubsan.c: Likewise.
|
|
3042 * cvt.c: Likewise.
|
|
3043 * decl.c: Likewise.
|
|
3044 * decl2.c: Likewise.
|
|
3045 * dump.c: Likewise.
|
|
3046 * error.c: Likewise.
|
|
3047 * except.c: Likewise.
|
|
3048 * expr.c: Likewise.
|
|
3049 * friend.c: Likewise.
|
|
3050 * init.c: Likewise.
|
|
3051 * lambda.c: Likewise.
|
|
3052 * lex.c: Likewise.
|
|
3053 * mangle.c: Likewise.
|
|
3054 * method.c: Likewise.
|
|
3055 * name-lookup.c: Likewise.
|
|
3056 * optimize.c: Likewise.
|
|
3057 * parser.c: Likewise.
|
|
3058 * pt.c: Likewise.
|
|
3059 * ptree.c: Likewise.
|
|
3060 * repo.c: Likewise.
|
|
3061 * rtti.c: Likewise.
|
|
3062 * search.c: Likewise.
|
|
3063 * semantics.c: Likewise.
|
|
3064 * tree.c: Likewise.
|
|
3065 * typeck.c: Likewise.
|
|
3066 * typeck2.c: Likewise.
|
|
3067 * vtable-class-hierarchy.c: Likewise.
|
|
3068
|
|
3069 2015-06-04 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
|
|
3070
|
|
3071 PR c++/66192
|
|
3072 PR target/66200
|
|
3073 * cp-tree.h (get_guard_cond): Adjust declaration
|
|
3074 * decl.c (expand_static_init): Use atomic load acquire
|
|
3075 and adjust call to get_guard_cond.
|
|
3076 * decl2.c (build_atomic_load_byte): New function.
|
|
3077 (get_guard_cond): Handle thread_safety.
|
|
3078 (one_static_initialization_or_destruction): Adjust call to
|
|
3079 get_guard_cond.
|
|
3080
|
|
3081 2015-06-03 Jason Merrill <jason@redhat.com>
|
|
3082
|
|
3083 PR c++/44282
|
|
3084 * mangle.c (mangle_decl): Always SET_IDENTIFIER_GLOBAL_VALUE.
|
|
3085 (write_CV_qualifiers_for_type): Set G.need_abi_warning.
|
|
3086 (decl_implicit_alias_p): Split out from maybe_remove_implicit_alias.
|
|
3087 * cp-tree.h (DECL_REALLY_EXTERN): Handle null DECL_LANG_SPECIFIC.
|
|
3088
|
|
3089 2015-06-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
|
|
3090 Paolo Carlini <paolo.carlini@oracle.com>
|
|
3091
|
|
3092 PR c++/66130
|
|
3093 * typeck.c (invalid_nonstatic_memfn_p): Add location_t parameter and
|
|
3094 use it in the diagnostic.
|
|
3095 (decay_conversion): Adjust call.
|
|
3096 * semantics.c (finish_decltype_type): Likewise.
|
|
3097 * call.c (resolve_args, build_new_op_1,
|
|
3098 perform_implicit_conversion_flags): Adjust calls.
|
|
3099 * cvt.c (ocp_convert, convert_to_void): Likewise.
|
|
3100 * cp-tree.h (invalid_nonstatic_memfn_p): Update declaration.
|
|
3101
|
|
3102 2015-06-03 Paolo Carlini <paolo.carlini@oracle.com>
|
|
3103
|
|
3104 * decl.c (check_tag_decl): Use declspecs->locations as locations in
|
|
3105 error_at and warning_at calls.
|
|
3106
|
|
3107 2015-06-03 Marek Polacek <polacek@redhat.com>
|
|
3108
|
|
3109 PR sanitizer/66190
|
|
3110 * cp-gimplify.c (struct cp_genericize_data): Add no_sanitize_p.
|
|
3111 (cp_genericize_r): Don't instrument static initializers.
|
|
3112 (cp_genericize_tree): Initialize wtd.no_sanitize_p.
|
|
3113
|
|
3114 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
|
|
3115
|
|
3116 * decl.c (start_function): Call plugin before parsing.
|
|
3117 (finish_function): Call plugin after parsing.
|
|
3118
|
|
3119 2015-06-02 Patrick Palka <patrick@parcs.ath.cx>
|
|
3120
|
|
3121 * cp-tree.h (init_error): Remove declaration.
|
|
3122 * error.c (scratch_pretty_printer): Rename to ...
|
|
3123 (actual_pretty_printer): ... this.
|
|
3124 (cxx_pp): Constify and update accordingly.
|
|
3125 (init_error): Remove definition.
|
|
3126 * lex.c (cxx_init): Do not call init_error.
|
|
3127
|
|
3128 2015-06-02 Paolo Carlini <paolo.carlini@oracle.com>
|
|
3129
|
|
3130 PR c++/61683
|
|
3131 * parser.c (cp_parser_mem_initializer): Allow for decltype-specifier.
|
|
3132
|
|
3133 2015-06-01 Jason Merrill <jason@redhat.com>
|
|
3134
|
|
3135 PR c++/65942
|
|
3136 * decl2.c (mark_used): Don't always instantiate constexpr fns.
|
|
3137 * constexpr.c (cxx_eval_call_expression): Instantiate them here.
|
|
3138
|
|
3139 PR c++/44282
|
|
3140 * mangle.c (attr_strcmp): New.
|
|
3141 (write_CV_qualifiers_for_type): Also write out attributes that
|
|
3142 affect type identity.
|
|
3143 (write_type): Strip all attributes after writing qualifiers.
|
|
3144
|
|
3145 2015-05-31 Jason Merrill <jason@redhat.com>
|
|
3146
|
|
3147 * constexpr.c (cxx_eval_indirect_ref): Try folding first.
|
|
3148
|
|
3149 PR c++/66320
|
|
3150 * constexpr.c (cxx_eval_constant_expression): Treat a placeholder
|
|
3151 with the wrong type as non-constant.
|
|
3152
|
|
3153 2015-05-27 Jason Merrill <jason@redhat.com>
|
|
3154
|
|
3155 * decl.c (check_redeclaration_exception_specification): Depend on
|
|
3156 -Wsystem-headers rather than -pedantic.
|
|
3157
|
|
3158 * decl.c (warn_extern_redeclared_static): Use the location of
|
|
3159 newdecl in diagnostics, not input_location.
|
|
3160 (validate_constexpr_redeclaration): Likewise.
|
|
3161 (check_redeclaration_no_default_args): Likewise.
|
|
3162 (duplicate_decls): Likewise.
|
|
3163 (check_redeclaration_exception_specification): Likewise.
|
|
3164 Change second diagnostic to inform.
|
|
3165
|
|
3166 2015-05-24 Nathan Sidwell <nathan@acm.org>
|
|
3167
|
|
3168 PR c++/66243
|
|
3169 * decl.c (build_enumerator): Don't silently convert scoped enums.
|
|
3170
|
|
3171 2015-05-24 Jan Hubicka <hubicka@ucw.cz>
|
|
3172
|
|
3173 PR lto/66180
|
|
3174 * mangle.c (mangle_decl): Mangle anonymous namespace types as
|
|
3175 "<anon>".
|
|
3176
|
|
3177 2015-05-23 Nathan Sidwell <nathan@acm.org>
|
|
3178
|
|
3179 PR c++/65936
|
|
3180 * pt.c (lookup_template_class_1): Copy may_alias attribute too.
|
|
3181
|
|
3182 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
|
|
3183
|
|
3184 * Make-lang.in (check_g++_parallelize): Update comment.
|
|
3185
|
|
3186 2015-05-22 Paolo Carlini <paolo.carlini@oracle.com>
|
|
3187
|
|
3188 PR c++/65598
|
|
3189 * decl.c (grokdeclarator): Use the correct location in error
|
|
3190 messages about 'explicit'.
|
|
3191
|
|
3192 2015-05-22 Marek Polacek <polacek@redhat.com>
|
|
3193 Edward Smith-Rowland <3dw4rd@verizon.net>
|
|
3194
|
|
3195 PR c/47043
|
|
3196 * cp-tree.h (build_enumerator): Update declaration.
|
|
3197 * decl.c (build_enumerator): Add attributes parameter. Call
|
|
3198 cplus_decl_attributes.
|
|
3199 * init.c (constant_value_1): Pass tf_none to mark_used.
|
|
3200 * parser.c (cp_parser_enumerator_definition): Parse attributes and
|
|
3201 pass them down to build_enumerator.
|
|
3202 * pt.c (tsubst_enum): Pass decl attributes to build_enumerator.
|
|
3203 * semantics.c (finish_id_expression): Don't warn_deprecated_use here.
|
|
3204
|
|
3205 2015-05-21 Nathan Sidwell <nathan@acm.org>
|
|
3206
|
|
3207 PR c++/60943
|
|
3208 * decl2.c (change_return_type): Propagate FUNCTION_REF_QUALIFIED.
|
|
3209
|
|
3210 2015-05-21 Marek Polacek <polacek@redhat.com>
|
|
3211
|
|
3212 * typeck.c (warn_args_num): Don't print "declare here" for builtins.
|
|
3213
|
|
3214 2015-05-20 Jason Merrill <jason@redhat.com>
|
|
3215
|
|
3216 * pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
|
|
3217 before register_specialization.
|
|
3218
|
|
3219 * decl.c (grok_op_properties): Don't complain about size_t
|
|
3220 placement delete here.
|
|
3221 * call.c (second_parm_is_size_t): Split out from...
|
|
3222 (non_placement_deallocation_fn_p): ...here.
|
|
3223 (build_op_delete_call): Warn about size_t placement delete with
|
|
3224 -Wc++14-compat.
|
|
3225
|
|
3226 2015-05-19 Nathan Sidwell <nathan@acm.org>
|
|
3227
|
|
3228 PR c++/65954
|
|
3229 * typeck.c (finish_class_member_access_expr): Diagnose failed
|
|
3230 lookup of enum class member.
|
|
3231
|
|
3232 2015-05-19 Jakub Jelinek <jakub@redhat.com>
|
|
3233
|
|
3234 PR middle-end/66199
|
|
3235 * parser.c (cp_parser_omp_for_loop): Don't add
|
|
3236 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
|
|
3237 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
|
|
3238 (cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
|
|
3239 constructs.
|
|
3240
|
|
3241 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
|
|
3242
|
|
3243 * typeck.c (composite_pointer_type): Use std::swap instead of explicit
|
|
3244 swaps.
|
|
3245
|
|
3246 2015-05-18 Jason Merrill <jason@redhat.com>
|
|
3247
|
|
3248 * pt.c (retrieve_specialization): Make sure our arguments have
|
|
3249 gone through strip_typedefs.
|
|
3250
|
|
3251 * pt.c (tsubst_decl) [VAR_DECL]: Call coerce_innermost_template_parms.
|
|
3252 (determine_specialization): Call coerce_template_parms.
|
|
3253
|
|
3254 DR 1391
|
|
3255 * pt.c (type_unification_real): Check convertibility here.
|
|
3256 (unify_one_argument): Not here.
|
|
3257
|
|
3258 * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
|
|
3259 (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
|
|
3260 [TREE_LIST]: Fix no-change case.
|
|
3261
|
|
3262 * ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.
|
|
3263
|
|
3264 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
|
|
3265
|
|
3266 PR fortran/44054
|
|
3267 * error.c (cp_diagnostic_starter): Use diagnostic_location
|
|
3268 function.
|
|
3269 (cp_print_error_function): Likewise.
|
|
3270 (cp_printer): Replace locus pointer with accessor function.
|
|
3271
|
|
3272 2015-05-12 David Malcolm <dmalcolm@redhat.com>
|
|
3273
|
|
3274 * parser.c (cp_parser_selection_statement): Add location and
|
|
3275 guard_kind arguments to calls to
|
|
3276 cp_parser_implicitly_scoped_statement.
|
|
3277 (cp_parser_iteration_statement): Likewise for calls to
|
|
3278 cp_parser_already_scoped_statement.
|
|
3279 (cp_parser_implicitly_scoped_statement): Add "guard_loc" and
|
|
3280 "guard_kind" params; use them to warn for misleading
|
|
3281 indentation.
|
|
3282 (cp_parser_already_scoped_statement): Likewise.
|
|
3283
|
|
3284 2015-05-11 Jan Hubicka <hubicka@ucw.cz>
|
|
3285
|
|
3286 * class.c (fixup_type_variants): Do not copy TYPE_METHODS
|
|
3287 (one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
|
|
3288 * semantics.c (finish_member_declaration): Likewise.
|
|
3289 * method.c (lazily_declare_fn): Allways add method to main variant list.
|
|
3290
|
|
3291 2015-05-09 Aldy Hernandez <aldyh@redhat.com>
|
|
3292
|
|
3293 PR bootstrap/66085
|
|
3294 * decl2.c (note_mangling_alias): Declare arguments as unused.
|
|
3295
|
|
3296 2015-05-08 Jason Merrill <jason@redhat.com>
|
|
3297
|
|
3298 * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
|
|
3299 -Wc++0x-compat.
|
|
3300
|
|
3301 2015-05-08 Jason Merrill <jason@redhat.com>
|
|
3302
|
|
3303 * decl2.c (mangling_aliases): New variable.
|
|
3304 (note_mangling_alias, generate_mangling_aliases): New.
|
|
3305 (cp_write_global_declarations): Call generate_mangling_aliases.
|
|
3306 (generate_mangling_alias): Split out from...
|
|
3307 * mangle.c (mangle_decl): ...here.
|
|
3308 * cp-tree.h: Declare note_mangling_alias.
|
|
3309
|
|
3310 2015-05-08 Aldy Hernandez <aldyh@redhat.com>
|
|
3311
|
|
3312 * decl2.c (collect_candidates_for_java_method_aliases): Remove.
|
|
3313 (build_java_method_aliases): Adapt to use create_same_body_alias
|
|
3314 instead of assemble_alias. Move variable declarations to
|
|
3315 definition and tidy up.
|
|
3316 (cp_write_global_declarations): Call build_java_method_aliases
|
|
3317 instead of collecting candidates first.
|
|
3318
|
|
3319 2015-05-07 Jason Merrill <jason@redhat.com>
|
|
3320
|
|
3321 PR c++/59012
|
|
3322 * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
|
|
3323 (cp_parser_std_attribute_spec): Handle alignas pack expansion.
|
|
3324 * decl2.c (is_late_template_attribute): An attribute exp is dependent.
|
|
3325 * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
|
|
3326 (apply_late_template_attributes): Handle attribute pack expansion.
|
|
3327
|
|
3328 2015-05-07 Marek Polacek <polacek@redhat.com>
|
|
3329
|
|
3330 PR c/65179
|
|
3331 * typeck.c (cp_build_binary_op): Warn when left shifting a negative
|
|
3332 value.
|
|
3333
|
|
3334 2015-05-07 Jason Merrill <jason@redhat.com>
|
|
3335
|
|
3336 DR 1467
|
|
3337 PR c++/51747
|
|
3338 * typeck2.c (digest_init_r): Fix single element list.
|
|
3339
|
|
3340 2015-05-05 Jason Merrill <jason@redhat.com>
|
|
3341
|
|
3342 * cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
|
|
3343 MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
|
|
3344 MUST_NOT_THROW_EXPR.
|
|
3345 (cp_genericize_data): Add try_block field.
|
|
3346 (cp_genericize_tree): Initialize it.
|
|
3347 * except.c (expand_end_catch_block): Set TREE_NO_WARNING on
|
|
3348 implicit rethrow.
|
|
3349
|
|
3350 * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
|
|
3351 Return false.
|
|
3352
|
|
3353 * semantics.c (finish_call_expr): Check complain.
|
|
3354
|
|
3355 * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
|
|
3356 maybe-in-charge constructor.
|
|
3357
|
|
3358 * decl.c (start_decl): Don't push the plain VAR_DECL for a
|
|
3359 variable template.
|
|
3360
|
|
3361 DR 1518
|
|
3362 DR 1630
|
|
3363 PR c++/54835
|
|
3364 PR c++/60417
|
|
3365 * call.c (convert_like_real): Check value-initialization before
|
|
3366 explicit.
|
|
3367 * typeck2.c (process_init_constructor_record): Don't set
|
|
3368 CONSTRUCTOR_IS_DIRECT_INIT.
|
|
3369 (process_init_constructor_array): Likewise.
|
|
3370 * init.c (build_vec_init): Likewise.
|
|
3371
|
|
3372 2015-05-05 David Malcolm <dmalcolm@redhat.com>
|
|
3373
|
|
3374 * parser.c (cp_parser_asm_definition): Only test for
|
|
3375 error_mark_node if "outputs" was just set. Likewise for "inputs".
|
|
3376
|
|
3377 2015-05-04 Paolo Carlini <paolo.carlini@oracle.com>
|
|
3378 Jakub Jelinek <jakub@redhat.com>
|
|
3379
|
|
3380 PR c++/66007
|
|
3381 * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
|
|
3382 result in an actual error.
|
|
3383
|
|
3384 2015-05-01 Paolo Carlini <paolo.carlini@oracle.com>
|
|
3385 Prathamesh Kulharni <prathamesh.kulkarni@linaro.org>
|
|
3386
|
|
3387 PR c++/65858
|
|
3388 * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
|
|
3389 false.
|
|
3390
|
|
3391 2015-04-30 David Malcolm <dmalcolm@redhat.com>
|
|
3392
|
|
3393 * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
|
|
3394 trailing semicolon.
|
|
3395
|
|
3396 2015-04-29 Jason Merrill <jason@redhat.com>
|
|
3397
|
|
3398 PR c++/50800
|
|
3399 * tree.c (apply_identity_attributes): Fix handling of classes.
|
|
3400
|
|
3401 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
|
|
3402
|
|
3403 * parser.c (cp_parser_oacc_enter_exit_data): Use
|
|
3404 OMP_STANDALONE_CLAUSES.
|
|
3405
|
|
3406 2015-04-29 Paolo Carlini <paolo.carlini@oracle.com>
|
|
3407
|
|
3408 PR c++/64667
|
|
3409 * init.c (perform_member_init): Handle references for -Winit-self.
|
|
3410
|
|
3411 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
|
|
3412
|
|
3413 * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
|
|
3414 OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
|
|
3415
|
|
3416 2015-04-28 Jason Merrill <jason@redhat.com>
|
|
3417
|
|
3418 PR c++/65896
|
|
3419 * constexpr.c (cxx_eval_store_expression): Don't try to actually
|
|
3420 store an empty class.
|
|
3421
|
|
3422 PR c++/65656
|
|
3423 * constexpr.c (cxx_eval_builtin_function_call): Fix
|
|
3424 __builtin_constant_p.
|
|
3425
|
|
3426 PR c++/50800
|
|
3427 * tree.c (strip_typedefs): Add remove_attributes parm.
|
|
3428 (strip_typedefs_expr): Likewise.
|
|
3429 (apply_identity_attributes): New subroutine of strip_typedefs.
|
|
3430 * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs.
|
|
3431 (convert_nontype_argument, unify): Likewise.
|
|
3432 * cp-tree.h: Adjust.
|
|
3433
|
|
3434 PR c++/65734
|
|
3435 * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
|
|
3436
|
|
3437 2015-04-27 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
|
|
3438
|
|
3439 * class.c (layout_class_type): Remove check if
|
|
3440 PCC_BITFIELD_TYPE_MATTERS is defined.
|
|
3441
|
|
3442 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
|
|
3443
|
|
3444 * Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
|
|
3445
|
|
3446 2015-04-24 Jason Merrill <jason@redhat.com>
|
|
3447
|
|
3448 PR c++/50800
|
|
3449 * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
|
|
3450
|
|
3451 * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
|
|
3452 Remove obsolete code.
|
|
3453 [NE_EXPR]: Likewise.
|
|
3454
|
|
3455 2015-04-23 Jason Merrill <jason@redhat.com>
|
|
3456
|
|
3457 PR c++/65646
|
|
3458 * pt.c (check_explicit_specialization): Don't
|
|
3459 SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
|
|
3460 headers.
|
|
3461 * decl.c (grokvardecl): Revert earlier fix.
|
|
3462
|
|
3463 2015-04-20 Paolo Carlini <paolo.carlini@oracle.com>
|
|
3464
|
|
3465 PR c++/65801
|
|
3466 * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
|
|
3467 suppresses the diagnostic.
|
|
3468
|
|
3469 2015-04-20 Ville Voutilainen <ville.voutilainen@gmail.com>
|
|
3470
|
|
3471 Reject trailing return type for an operator auto().
|
|
3472 * decl.c (grokdeclarator): Reject trailing return types for
|
|
3473 all conversion operators, don't handle conversion operators
|
|
3474 in the previous checks that deal with auto.
|
|
3475
|
|
3476 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
|
|
3477
|
|
3478 * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
|
|
3479
|
|
3480 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
|
|
3481
|
|
3482 * class.c (resolve_address_of_overloaded_function, instantiate_type):
|
|
3483 Rename tsubst_flags_t parameter flags -> complain.
|
|
3484
|
|
3485 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
|
|
3486
|
|
3487 * call.c (build_op_delete_call, build_over_call): Check mark_used
|
|
3488 return value.
|
|
3489 * class.c (resolve_address_of_overloaded_function): Likewise.
|
|
3490 * decl.c (cxx_maybe_build_cleanup): Likewise.
|
|
3491 * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
|
|
3492 tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
|
|
3493 * rtti.c (build_dynamic_cast_1): Likewise.
|
|
3494 * semantics.c (process_outer_var_ref): Likewise.
|
|
3495 * typeck.c (build_class_member_access_expr,
|
|
3496 cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
|
|
3497
|
|
3498 2015-04-15 Jason Merrill <jason@redhat.com>
|
|
3499
|
|
3500 * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
|
|
3501 (build_constexpr_constructor_member_initializers): Loop to find
|
|
3502 the BIND_EXPR.
|
|
3503 * decl.c (start_preparsed_function): Clobber the object at the
|
|
3504 beginning of a constructor.
|
|
3505
|
|
3506 * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
|
|
3507 * method.c (implicitly_declare_fn): Likewise.
|
|
3508 * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
|
|
3509
|
|
3510 * decl2.c (determine_visibility): Use get_template_info.
|
|
3511
|
|
3512 2015-04-15 Jason Merrill <jason@redhat.com>
|
|
3513 Marek Polacek <polacek@redhat.com>
|
|
3514
|
|
3515 PR c++/65727
|
|
3516 * lambda.c (lambda_expr_this_capture): In unevaluated context go
|
|
3517 through the normal loop, just don't capture.
|
|
3518 (maybe_resolve_dummy): Handle null return.
|
|
3519
|
|
3520 2015-04-15 Paolo Carlini <paolo.carlini@oracle.com>
|
|
3521
|
|
3522 * call.c (enforce_access): Emit error + inform.
|
|
3523
|
|
3524 2015-04-15 Marek Polacek <polacek@redhat.com>
|
|
3525
|
|
3526 * constexpr.c (use_new_call): Remove #define.
|
|
3527 (lookup_parameter_binding): Remove function.
|
|
3528 (cxx_bind_parameters_in_call): Remove unused code.
|
|
3529 (cxx_eval_call_expression): Likewise.
|
|
3530 (cxx_eval_constant_expression): Likewise.
|
|
3531
|
|
3532 2015-04-14 Mikhail Maltsev <maltsevm@gmail.com>
|
|
3533
|
|
3534 * tree.c (replace_placeholders_t): Remove unused type.
|
|
3535 (replace_placeholders): Remove unused pset.
|
|
3536
|
|
3537 2015-04-14 Jason Merrill <jason@redhat.com>
|
|
3538
|
|
3539 * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
|
|
3540
|
|
3541 PR c++/65695
|
|
3542 * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
|
|
3543
|
|
3544 PR c++/65721
|
|
3545 * name-lookup.c (do_class_using_decl): Complain about specifying
|
|
3546 the current class even if there are dependent bases.
|
|
3547
|
|
3548 2015-04-14 David Krauss <david_work@me.com>
|
|
3549
|
|
3550 PR c++/59766
|
|
3551 * decl.c (grokdeclarator): Do not flag friends with deduced return.
|
|
3552
|
|
3553 2015-04-14 Momchil Velikov <momchil.velikov@gmail.com>
|
|
3554 Jason Merrill <jason@redhat.com>
|
|
3555
|
|
3556 PR c++/60994
|
|
3557 * parser.c (cp_parser_class_name): Add enum_ok parameter.
|
|
3558 (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
|
|
3559 (cp_parser_diagnose_invalid_type_name): Don't assume a template is
|
|
3560 a class template.
|
|
3561
|
|
3562 2015-04-12 Jakub Jelinek <jakub@redhat.com>
|
|
3563
|
|
3564 PR c++/65736
|
|
3565 * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
|
|
3566 don't fold if op01 isn't divisible by TYPE_SIZE_UNIT. Convert
|
|
3567 the expression to the original type at the end.
|
|
3568
|
|
3569 2015-04-09 Jakub Jelinek <jakub@redhat.com>
|
|
3570
|
|
3571 PR c++/65690
|
|
3572 * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
|
|
3573 TYPE_USER_ALIGN.
|
|
3574
|
|
3575 PR c++/65690
|
|
3576 * tree.c (build_cplus_array_type): Layout type before variants are
|
|
3577 set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
|
|
3578 variant.
|
|
3579
|
|
3580 2015-04-03 Paolo Carlini <paolo.carlini@oracle.com>
|
|
3581
|
|
3582 PR c++/64085
|
|
3583 * lambda.c (add_capture): Use dependent_type_p for capture by
|
|
3584 reference too.
|
|
3585
|
|
3586 2015-04-02 Marek Polacek <polacek@redhat.com>
|
|
3587
|
|
3588 PR c++/65642
|
|
3589 * constexpr.c (cxx_eval_pointer_plus_expression): Call
|
|
3590 cxx_eval_constant_expression on the first operand.
|
|
3591
|
|
3592 2015-04-01 Jason Merrill <jason@redhat.com>
|
|
3593
|
|
3594 PR c++/65625
|
|
3595 * decl.c (make_typename_type): Handle seeing a variable template.
|
|
3596
|
|
3597 2015-04-01 Paolo Carlini <paolo.carlini@oracle.com>
|
|
3598
|
|
3599 PR c++/56100
|
|
3600 * pt.c (instantiating_current_function_p): New.
|
|
3601 * name-lookup.c (pushdecl_maybe_friend_1): Use it.
|
|
3602 * cp-tree.h (instantiating_current_function_p): Declare.
|
|
3603
|
|
3604 2015-04-01 Jason Merrill <jason@redhat.com>
|
|
3605
|
|
3606 PR c++/65646
|
|
3607 * decl.c (grokvardecl): Don't call check_explicit_specialization
|
|
3608 for non-template members of a class template.
|
|
3609
|
|
3610 2015-04-01 Marek Polacek <polacek@redhat.com>
|
|
3611
|
|
3612 PR c++/65554
|
|
3613 * class.c (finish_struct): Require that the second field of a
|
|
3614 user-defined initializer_list be of size type.
|
|
3615
|
|
3616 2015-03-31 Marek Polacek <polacek@redhat.com>
|
|
3617
|
|
3618 PR c++/65390
|
|
3619 * tree.c (build_cplus_array_type): Use dependent_type_p rather than
|
|
3620 checking for constness.
|
|
3621
|
|
3622 2015-03-30 Marek Polacek <polacek@redhat.com>
|
|
3623
|
|
3624 PR c++/65398
|
|
3625 * constexpr.c (cxx_fold_indirect_ref): Don't perform the
|
|
3626 *(&A[i] p+ j) => A[i + j] transformation here.
|
|
3627 (cxx_eval_pointer_plus_expression): New function.
|
|
3628 (cxx_eval_constant_expression): Use it here.
|
|
3629
|
|
3630 2015-03-27 Tobias Burnus <burnus@net-b.de>
|
|
3631
|
|
3632 PR c/65586
|
|
3633 * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
|
|
3634 cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
|
|
3635 cp_parser_omp_declare): Don't show error for skipped omp pragmas with
|
|
3636 -fopenmp-simd.
|
|
3637
|
|
3638 2015-03-27 Marek Polacek <polacek@redhat.com>
|
|
3639
|
|
3640 PR c++/65556
|
|
3641 * semantics.c (finish_switch_cond): If the unlowered type is not an
|
|
3642 enum, use the type of the condition.
|
|
3643
|
|
3644 2015-03-27 Jason Merrill <jason@redhat.com>
|
|
3645
|
|
3646 PR c++/65509
|
|
3647 * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
|
|
3648 constants.
|
|
3649
|
|
3650 2015-03-26 Mikhail Maltsev <maltsevm@gmail.com>
|
|
3651
|
|
3652 PR c++/65154
|
|
3653 * init.c (build_vec_init): Fix initializing aggregates
|
|
3654 with empty init list.
|
|
3655
|
|
3656 2015-03-26 Jason Merrill <jason@redhat.com>
|
|
3657
|
|
3658 PR c++/65525
|
|
3659 * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
|
|
3660
|
|
3661 2015-03-25 Marek Polacek <polacek@redhat.com>
|
|
3662
|
|
3663 PR c++/65558
|
|
3664 * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
|
|
3665 on an anonymous namespace.
|
|
3666
|
|
3667 2015-03-25 Marek Polacek <polacek@redhat.com>
|
|
3668
|
|
3669 PR c++/61670
|
|
3670 * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
|
|
3671
|
|
3672 2015-03-24 Jason Merrill <jason@redhat.com>
|
|
3673
|
|
3674 PR c++/65046
|
|
3675 * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
|
|
3676 * parser.c (cp_parser_namespace_definition): Don't set it.
|
|
3677 * name-lookup.c (handle_namespace_attrs): Check
|
|
3678 DECL_NAMESPACE_ASSOCIATIONS instead.
|
|
3679
|
|
3680 PR c++/65498
|
|
3681 * pt.c (get_mostly_instantiated_function_type): Just return the
|
|
3682 type of the partially instantiated template in DECL_TI_TEMPLATE.
|
|
3683
|
|
3684 2015-03-20 Marek Polacek <polacek@redhat.com>
|
|
3685
|
|
3686 PR c++/65398
|
|
3687 * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
|
|
3688 A[i + j].
|
|
3689
|
|
3690 2015-03-20 Marek Polacek <polacek@redhat.com>
|
|
3691
|
|
3692 PR c++/65072
|
|
3693 * typeck.c (lookup_anon_field): Make sure we're dealing with the main
|
|
3694 variant.
|
|
3695
|
|
3696 2015-03-19 Jason Merrill <jason@redhat.com>
|
|
3697
|
|
3698 PR c++/65046
|
|
3699 Automatically propagate ABI tags to variables and functions
|
|
3700 from their (return) type.
|
|
3701 * class.c (check_tag): Handle variables and functions.
|
|
3702 (mark_or_check_attr_tags): Split out from find_abi_tags_r.
|
|
3703 (mark_or_check_tags): Likewise.
|
|
3704 (mark_abi_tags): Use it. Rename from mark_type_abi_tags.
|
|
3705 (check_abi_tags): Add single argument overload for decls.
|
|
3706 Handle inheriting tags for decls.
|
|
3707 * mangle.c (write_mangled_name): Call it.
|
|
3708 (mangle_return_type_p): Split out from write_encoding.
|
|
3709 (unmangled_name_p): Split out from write_mangled_name.
|
|
3710 (write_mangled_name): Ignore abi_tag on namespace.
|
|
3711 * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
|
|
3712 * parser.c (cp_parser_namespace_definition): Set it.
|
|
3713 * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
|
|
3714 about abi_tag attribute on non-inline namespace.
|
|
3715 * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
|
|
3716 (handle_abi_tag_attribute): Allow tags on variables.
|
|
3717
|
|
3718 2015-03-19 Jakub Jelinek <jakub@redhat.com>
|
|
3719
|
|
3720 * decl2.c (cplus_decl_attributes): Also add "omp declare target"
|
|
3721 attribute for DECL_EXTERNAL VAR_DECLs.
|
|
3722
|
|
3723 2015-03-18 Paolo Carlini <paolo.carlini@oracle.com>
|
|
3724
|
|
3725 PR c++/65340
|
|
3726 * call.c (build_over_call): Pass the tsubst_flags_t argument to
|
|
3727 mark_used.
|
|
3728 * decl2.c (mark_used): Inline the require_deduced_type call and
|
|
3729 guard the error call.
|
|
3730
|
|
3731 2015-03-16 Jason Merrill <jason@redhat.com>
|
|
3732
|
|
3733 PR c++/65061
|
|
3734 * parser.c (cp_parser_template_name): Call strip_using_decl.
|
|
3735
|
|
3736 2015-03-16 Marek Polacek <polacek@redhat.com>
|
|
3737
|
|
3738 DR 1688
|
|
3739 PR c++/65327
|
|
3740 * decl.c (grokdeclarator): Allow volatile and constexpr together.
|
|
3741
|
|
3742 2015-03-12 Paolo Carlini <paolo.carlini@oracle.com>
|
|
3743
|
|
3744 PR c++/65323
|
|
3745 * decl.c (check_default_argument): Don't call
|
|
3746 maybe_warn_zero_as_null_pointer_constant.
|
|
3747
|
|
3748 2015-03-11 Aldy Hernandez <aldyh@redhat.com>
|
|
3749
|
|
3750 * cp-gimplify.c (simple_empty_class_p): New.
|
|
3751 * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR. Abstract
|
|
3752 the code for empty class copies into simple_empty_class_p, and
|
|
3753 adapt it to handle COMPOUND_EXPRs.
|
|
3754
|
|
3755 2015-03-10 Paolo Carlini <paolo.carlini@oracle.com>
|
|
3756
|
|
3757 PR c++/65370
|
|
3758 * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
|
|
3759 only if the location of newdecl doesn't match the location of olddecl.
|
|
3760
|
|
3761 2015-03-10 Jakub Jelinek <jakub@redhat.com>
|
|
3762
|
|
3763 PR c++/65127
|
|
3764 * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
|
|
3765 is not a PARM_DECL.
|
|
3766
|
|
3767 2015-03-10 Jason Merrill <jason@redhat.com>
|
|
3768
|
|
3769 PR c++/65333
|
|
3770 DR 1558
|
|
3771 * pt.c (dependent_type_p_r): Check both class and alias template args.
|
|
3772
|
|
3773 2015-03-10 Jakub Jelinek <jakub@redhat.com>
|
|
3774
|
|
3775 PR c/65120
|
|
3776 * parser.c (cp_parser_binary_expression): Check for tcc_comparison
|
|
3777 before preparing arguments to warn_logical_not_parentheses.
|
|
3778 Use maybe_constant_value on rhs.
|
|
3779
|
|
3780 2015-03-09 Jason Merrill <jason@redhat.com>
|
|
3781
|
|
3782 PR c++/65339
|
|
3783 * call.c: Don't call maybe_resolve_dummy when calling a constructor.
|
|
3784
|
|
3785 2015-03-09 Jakub Jelinek <jakub@redhat.com>
|
|
3786
|
|
3787 PR c/65120
|
|
3788 * parser.c (cp_parser_binary_expression): Don't warn for
|
|
3789 !!x == y or !b == y where b is bool.
|
|
3790
|
|
3791 2015-03-06 Aldy Hernandez <aldyh@redhat.com>
|
|
3792
|
|
3793 * ptree.c (cxx_print_lambda_node): New.
|
|
3794 (cxx_print_xnode): Handle LAMBDA_EXPR.
|
|
3795
|
|
3796 2015-03-03 Aldy Hernandez <aldyh@redhat.com>
|
|
3797
|
|
3798 PR c++/65295
|
|
3799 * constexpr.c (cxx_eval_constant_expression): Remove assert in
|
|
3800 RESULT_DECL handling.
|
|
3801
|
|
3802 2015-02-26 Marek Polacek <polacek@redhat.com>
|
|
3803
|
|
3804 PR c++/65202
|
|
3805 * constexpr.c (cxx_eval_constant_expression): Don't evaluate
|
|
3806 a RETURN_EXPR if its operand is null.
|
|
3807
|
|
3808 2015-02-25 Jason Merrill <jason@redhat.com>
|
|
3809
|
|
3810 PR c++/65209
|
|
3811 * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
|
|
3812 DECL_COMDAT.
|
|
3813 (constrain_visibility_for_template): Handle reference arguments.
|
|
3814
|
|
3815 PR debug/58315
|
|
3816 * decl.c (start_preparsed_function): Use create_artificial_label
|
|
3817 for cdtor_label.
|
|
3818
|
|
3819 2015-02-17 Paolo Carlini <paolo.carlini@oracle.com>
|
|
3820 Jakub Jelinek <jakub@redhat.com>
|
|
3821
|
|
3822 PR c++/65075
|
|
3823 * constexpr.c (check_constexpr_bind_expr_vars): Allow
|
|
3824 implicit typedefs for lambda types.
|
|
3825
|
|
3826 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
|
|
3827
|
|
3828 PR c++/60894
|
|
3829 * decl.c (lookup_and_check_tag): Use strip_using_decl.
|
|
3830
|
|
3831 2015-02-13 Jason Merrill <jason@redhat.com>
|
|
3832
|
|
3833 PR c++/65054
|
|
3834 * pt.c (template_args_equal): Look through conversions here.
|
|
3835 * tree.c (cp_tree_equal): Not here.
|
|
3836
|
|
3837 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
|
|
3838
|
|
3839 PR c++/60211
|
|
3840 * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
|
|
3841 pragma_external context.
|
|
3842
|
|
3843 2015-02-13 Jason Merrill <jason@redhat.com>
|
|
3844
|
|
3845 PR c++/65051
|
|
3846 * call.c (reference_binding): Don't look for bad conversion
|
|
3847 if TO is incomplete.
|
|
3848
|
|
3849 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
|
|
3850
|
|
3851 PR c++/64970
|
|
3852 * decl.c (make_typename_type): Pass tsubst_flags_t argument
|
|
3853 to lookup_template_class.
|
|
3854
|
|
3855 2015-02-13 Jakub Jelinek <jakub@redhat.com>
|
|
3856
|
|
3857 PR ipa/65034
|
|
3858 * decl.c (start_preparsed_function): Use void_type_node instead
|
|
3859 of NULL_TREE as LABEL_DECL type.
|
|
3860
|
|
3861 2015-02-12 Jason Merrill <jason@redhat.com>
|
|
3862
|
|
3863 PR c++/64898
|
|
3864 * mangle.c (write_mangled_name): Fix test for variable template
|
|
3865 instantiation.
|
|
3866
|
|
3867 * decl.c (begin_destructor_body): Condition clobber on
|
|
3868 -flifetime-dse.
|
|
3869
|
|
3870 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
|
|
3871
|
|
3872 PR c++/64959
|
|
3873 * parser.c (lookup_literal_operator): Return all candidates.
|
|
3874 (cp_parser_userdef_char_literal): Simplify error handling.
|
|
3875 (cp_parser_userdef_numeric_literal): Pass tf_warning_or_error.
|
|
3876 (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
|
|
3877 Also give higher priority to standard string UDL operator.
|
|
3878
|
|
3879 2015-02-12 Jakub Jelinek <jakub@redhat.com>
|
|
3880
|
|
3881 PR debug/55541
|
|
3882 * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
|
|
3883 * decl.c (poplevel): If functionbody, try not to create an extra
|
|
3884 BLOCK for function body and use subblocks as that, if it is non-NULL
|
|
3885 and doesn't have siblings. Set BLOCK_OUTER_CURLY_BRACE_P flag.
|
|
3886 (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
|
|
3887
|
|
3888 PR sanitizer/64984
|
|
3889 * except.c (check_noexcept_r): Return NULL for internal
|
|
3890 calls.
|
|
3891
|
|
3892 2015-02-10 Jason Merrill <jason@redhat.com>
|
|
3893
|
|
3894 PR c++/64994
|
|
3895 * constexpr.c (cxx_eval_call_expression): Walk the clone list.
|
|
3896
|
|
3897 2015-02-10 Jan Hubicka <hubicka@ucw.cz>
|
|
3898
|
|
3899 PR ipa/64982
|
|
3900 * method.c (use_thunk): Do not check for stdarg thunks.
|
|
3901
|
|
3902 2015-02-06 Jason Merrill <jason@redhat.com>
|
|
3903
|
|
3904 PR c++/64899
|
|
3905 * init.c (build_vec_init): Handle default-initialized array with
|
|
3906 constexpr default constructor.
|
|
3907
|
|
3908 2015-02-04 Jakub Jelinek <jakub@redhat.com>
|
|
3909
|
|
3910 PR c/64824
|
|
3911 PR c/64868
|
|
3912 * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
|
|
3913
|
|
3914 2015-02-03 Paolo Carlini <paolo.carlini@oracle.com>
|
|
3915
|
|
3916 PR c++/64877
|
|
3917 * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
|
|
3918 for generated expressions.
|
|
3919
|
|
3920 2015-02-02 Ville Voutilainen <ville.voutilainen@gmail.com>
|
|
3921
|
|
3922 PR c++/64901
|
|
3923 * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
|
|
3924 DECL_OVERRIDE_P.
|
|
3925
|
|
3926 2015-02-02 Jason Merrill <jason@redhat.com>
|
|
3927
|
|
3928 * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
|
|
3929
|
|
3930 2015-01-30 Joseph Myers <joseph@codesourcery.com>
|
|
3931
|
|
3932 * class.c, except.c, parser.c, pt.c: All callers of fatal_error
|
|
3933 changed to pass input_location as first argument.
|
|
3934
|
|
3935 2015-01-29 Jakub Jelinek <jakub@redhat.com>
|
|
3936
|
|
3937 PR c++/64717
|
|
3938 * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
|
|
3939 into SAVE_EXPR.
|
|
3940
|
|
3941 2015-01-29 Jason Merrill <jason@redhat.com>
|
|
3942
|
|
3943 PR c++/49508
|
|
3944 * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
|
|
3945 erroneous return statement.
|
|
3946
|
|
3947 PR c++/64521
|
|
3948 * repo.c (repo_emit_p): It's OK for a clone to be extern at this
|
|
3949 point.
|
|
3950
|
|
3951 2015-01-27 Caroline Tice <cmtice@google.com>
|
|
3952
|
|
3953 Committing VTV Cywin/Ming patch for Patrick Wollgast
|
|
3954 * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
|
|
3955 check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
|
|
3956
|
|
3957 2015-01-27 Jason Merrill <jason@redhat.com>
|
|
3958
|
|
3959 PR c++/58597
|
|
3960 * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
|
|
3961 current_function_decl.
|
|
3962
|
|
3963 PR c++/63889
|
|
3964 * pt.c (finish_template_variable): Move from semantics.c.
|
|
3965 Handle multiple template arg levels. Handle coercion here.
|
|
3966 (lookup_template_variable): Not here.
|
|
3967
|
|
3968 2015-01-23 Jason Merrill <jason@redhat.com>
|
|
3969
|
|
3970 PR c++/64314
|
|
3971 PR c++/57510
|
|
3972 * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
|
|
3973 that has been completely split out.
|
|
3974
|
|
3975 PR c++/64701
|
|
3976 * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
|
|
3977 statement codes.
|
|
3978
|
|
3979 PR c++/64727
|
|
3980 * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
|
|
3981 of CONST_DECL.
|
|
3982
|
|
3983 2015-01-21 Jason Merrill <jason@redhat.com>
|
|
3984
|
|
3985 PR c++/64603
|
|
3986 * constexpr.c (cxx_eval_constant_expression): Only shortcut
|
|
3987 constant CONSTRUCTORs.
|
|
3988
|
|
3989 PR c++/64647
|
|
3990 * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
|
|
3991 give a hard error in a template instantiation.
|
|
3992
|
|
3993 2015-01-21 Richard Biener <rguenther@suse.de>
|
|
3994
|
|
3995 PR middle-end/64313
|
|
3996 * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
|
|
3997 for builtins the user declared correctly.
|
|
3998
|
|
3999 2015-01-16 Paolo Carlini <paolo.carlini@oracle.com>
|
|
4000
|
|
4001 PR c++/58614
|
|
4002 * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
|
|
4003 TREE_TYPE (elt) == error_mark_node.
|
|
4004
|
|
4005 2015-01-15 Jan Hubicka <hubicka@ucw.cz>
|
|
4006
|
|
4007 PR tree-optimization/62053
|
|
4008 * tree.c (build_cplus_array_type): Layout type after variants are set.
|
|
4009
|
|
4010 2015-01-15 Jakub Jelinek <jakub@redhat.com>
|
|
4011
|
|
4012 * cp-gimplify.c (cp_genericize_r): Call
|
|
4013 cp_ubsan_maybe_instrument_member_call for member calls.
|
|
4014 (cp_ubsan_check_member_access_r): New function.
|
|
4015 (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
|
|
4016 * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
|
|
4017 cp_ubsan_instrument_member_accesses,
|
|
4018 cp_ubsan_maybe_instrument_downcast,
|
|
4019 cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
|
|
4020 * cp-ubsan.c: New file.
|
|
4021 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
|
|
4022 * constexpr.c (cxx_eval_call_expression): Return void_node
|
|
4023 for IFN_UBSAN_VPTR.
|
|
4024 (potential_constant_expression_1): Return true for
|
|
4025 UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
|
|
4026 * typeck.c (build_class_member_access_expr): Provide locus
|
|
4027 for COMPONENT_REFs.
|
|
4028 (build_static_cast_1): Instrument downcasts.
|
|
4029 * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
|
|
4030 add ubsan instrumentation for virtual_access.
|
|
4031 * call.c: Include internal-fn.h.
|
|
4032 (set_flags_from_callee): Handle internal calls.
|
|
4033
|
|
4034 2015-01-15 Momchil Velikov <momchil.velikov@gmail.com>
|
|
4035
|
|
4036 PR c++/59366
|
|
4037 * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
|
|
4038 and function templates, declared only in the class.
|
|
4039 * decl.c (duplicate_decls): Reveal hidden friend functions or
|
|
4040 function templates, if they are redeclared outside the class.
|
|
4041
|
|
4042 2015-01-15 Jason Merrill <jason@redhat.com>
|
|
4043
|
|
4044 PR c++/64356
|
|
4045 * constexpr.c (cxx_eval_binary_expression): Fix pasto.
|
|
4046
|
|
4047 PR c++/63283
|
|
4048 * constexpr.c (potential_constant_expression_1): Handle reference
|
|
4049 args in templates.
|
|
4050
|
|
4051 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
|
|
4052 James Norris <jnorris@codesourcery.com>
|
|
4053 Cesar Philippidis <cesar@codesourcery.com>
|
|
4054 Ilmir Usmanov <i.usmanov@samsung.com>
|
|
4055 Jakub Jelinek <jakub@redhat.com>
|
|
4056
|
|
4057 * parser.c: Include "gomp-constants.h".
|
|
4058 (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
|
|
4059 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
|
|
4060 Use OMP_CLAUSE_SET_MAP_KIND.
|
|
4061 (cp_parser_omp_construct, cp_parser_pragma): Handle
|
|
4062 PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
|
|
4063 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
|
|
4064 PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
|
|
4065 (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
|
|
4066 "create", "delete", "deviceptr", "host", "num_gangs",
|
|
4067 "num_workers", "present", "present_or_copy", "pcopy",
|
|
4068 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
|
|
4069 "present_or_create", "pcreate", "vector_length", "wait".
|
|
4070 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
|
|
4071 (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
|
|
4072 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
|
|
4073 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
|
|
4074 (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
|
|
4075 (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
|
|
4076 (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
|
|
4077 (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
|
|
4078 (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
|
|
4079 (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
|
|
4080 (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
|
|
4081 (cp_parser_oacc_kernels, cp_parser_oacc_loop)
|
|
4082 (cp_parser_oacc_parallel, cp_parser_oacc_update)
|
|
4083 (cp_parser_oacc_wait): New functions.
|
|
4084 * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
|
|
4085 (finish_oacc_parallel): New prototypes.
|
|
4086 * semantics.c: Include "gomp-constants.h".
|
|
4087 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
|
|
4088 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
|
|
4089 OMP_CLAUSE_SET_MAP_KIND.
|
|
4090 (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
|
|
4091 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
|
|
4092 Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
|
|
4093 (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
|
|
4094 functions.
|
|
4095
|
|
4096 2015-01-14 Paolo Carlini <paolo.carlini@oracle.com>
|
|
4097
|
|
4098 PR c++/58671
|
|
4099 * decl2.c (var_defined_without_dynamic_init): Handle gracefully
|
|
4100 self-initialization.
|
|
4101
|
|
4102 2015-01-13 Jason Merrill <jason@redhat.com>
|
|
4103
|
|
4104 PR c++/64356
|
|
4105 PR libstdc++/58777
|
|
4106 * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
|
|
4107 pointer expressions.
|
|
4108 (cxx_eval_increment_expression): Likewise.
|
|
4109
|
|
4110 PR c++/64514
|
|
4111 * pt.c (coerce_template_parameter_pack): Return NULL for a
|
|
4112 zero-length fixed parameter pack with a pack expansion arg.
|
|
4113
|
|
4114 PR c++/64520
|
|
4115 * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
|
|
4116
|
|
4117 2015-01-12 Jason Merrill <jason@redhat.com>
|
|
4118
|
|
4119 PR c++/64547
|
|
4120 * constexpr.c (cxx_eval_call_expression): A call to a void
|
|
4121 function doesn't need to return a value.
|
|
4122
|
|
4123 2015-01-09 Michael Collison <michael.collison@linaro.org>
|
|
4124
|
|
4125 * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
|
|
4126 input.h, alias.h, symtab.h, options.h, fold-const.h,
|
|
4127 wide-int.h, and inchash.h due to flattening of tree.h.
|
|
4128 * class.c: Ditto.
|
|
4129 * constexpr.c: Ditto.
|
|
4130 * cp-array-notation.c: Ditto.
|
|
4131 * cp-gimplify.c: Ditto.
|
|
4132 * cp-lang.c: Ditto.
|
|
4133 * cp-objcp-common.c: Ditto.
|
|
4134 * cvt.c: Ditto.
|
|
4135 * decl2.c: Ditto.
|
|
4136 * decl.c: Ditto.
|
|
4137 * dump.c: Ditto.
|
|
4138 * error.c: Ditto.
|
|
4139 * except.c: Ditto.
|
|
4140 * expr.c: Ditto.
|
|
4141 * friend.c: Ditto.
|
|
4142 * init.c: Ditto.
|
|
4143 * lambda.c: Ditto.
|
|
4144 * lex.c: Ditto.
|
|
4145 * mangle.c: Ditto.
|
|
4146 * name-lookup.c: Ditto.
|
|
4147 * optimize.c: Ditto.
|
|
4148 * parser.c: Ditto.
|
|
4149 * pt.c: Ditto.
|
|
4150 * ptree.c: Ditto.
|
|
4151 * repo.c: Ditto.
|
|
4152 * rtti.c: Ditto.
|
|
4153 * search.c: Ditto.
|
|
4154 * semantics.c: Ditto.
|
|
4155 * tree.c: Ditto.
|
|
4156 * typeck2.c: Ditto.
|
|
4157 * typeck.c: Ditto.
|
|
4158
|
|
4159 2015-01-08 Jason Merrill <jason@redhat.com>
|
|
4160
|
|
4161 * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
|
|
4162 * decl.c (compute_array_index_type): Likewise.
|
|
4163 * init.c (build_vec_init): Likewise.
|
|
4164 * typeck.c (cp_build_binary_op): Likewise.
|
|
4165
|
|
4166 2015-01-08 Jason Merrill <jason@redhat.com>
|
|
4167
|
|
4168 * init.c (build_vec_init): Call ubsan_instrument_bounds to check
|
|
4169 whether an initializer-list is too big for a VLA.
|
|
4170 (throw_bad_array_length): Remove.
|
|
4171 * cp-tree.h: Remove prototype.
|
|
4172
|
|
4173 2015-01-08 Paolo Carlini <paolo.carlini@oracle.com>
|
|
4174
|
|
4175 PR c++/60753
|
|
4176 * decl.c (grokfndecl): Add bool parameter.
|
|
4177 (grokdeclarator): Adjust calls.
|
|
4178 (start_decl): Don't set DECL_DELETED_FN here.
|
|
4179
|
|
4180 2015-01-06 Jason Merrill <jason@redhat.com>
|
|
4181
|
|
4182 * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
|
|
4183 template-ids.
|
|
4184
|
|
4185 PR c++/64455
|
|
4186 * pt.c (type_dependent_expression_p): Handle variable templates.
|
|
4187 * constexpr.c (potential_constant_expression_1): Use it.
|
|
4188
|
|
4189 PR c++/64487
|
|
4190 * semantics.c (finish_offsetof): Handle templates here.
|
|
4191 * parser.c (cp_parser_builtin_offsetof): Not here.
|
|
4192
|
|
4193 PR c++/64496
|
|
4194 * semantics.c (process_outer_var_ref): Diagnose lambda in local
|
|
4195 class NSDMI.
|
|
4196
|
|
4197 2015-01-06 Ville Voutilainen <ville.voutilainen@gmail.com>
|
|
4198
|
|
4199 PR c++/64489
|
|
4200 * class.c (check_field_decls): Make copy assignment operators
|
|
4201 complex only in c++98 mode.
|
|
4202
|
|
4203 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
|
|
4204
|
|
4205 PR c++/31397
|
|
4206 * class.c (check_for_override): Warn when a virtual function is an
|
|
4207 override not marked override.
|
|
4208
|
|
4209 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
|
|
4210
|
|
4211 * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
|
|
4212 hold base_fndecls.
|
|
4213 (get_basefndecls): Adjust.
|
|
4214
|
|
4215 2015-01-05 Jakub Jelinek <jakub@redhat.com>
|
|
4216
|
|
4217 Update copyright years.
|
|
4218
|
|
4219 2015-01-05 Marek Polacek <polacek@redhat.com>
|
|
4220
|
|
4221 PR c/64423
|
|
4222 * typeck.c (cp_build_array_ref): Pass loc down to
|
|
4223 warn_array_subscript_with_type_char.
|
|
4224
|
|
4225
|
|
4226 Copyright (C) 2015 Free Software Foundation, Inc.
|
|
4227
|
|
4228 Copying and distribution of this file, with or without modification,
|
|
4229 are permitted in any medium without royalty provided the copyright
|
|
4230 notice and this notice are preserved.
|