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