]> gcc.gnu.org Git - gcc.git/blame - gcc/cp/ChangeLog
re PR bootstrap/66252 (bootstrap comparison failures on sparc-linux)
[gcc.git] / gcc / cp / ChangeLog
CommitLineData
acb2970c
JM
12015-06-11 Jason Merrill <jason@redhat.com>
2
133bc698
JM
3 PR c++/66445
4 * constexpr.c (potential_constant_expression_1): Handle a
5 DECL_EXPR of TYPE_DECL.
6
acb2970c
JM
7 PR c++/66450
8 * constexpr.c (cxx_eval_store_expression): Avoid messing up outer
9 ctx->ctor.
10
1a4cd2cd
JM
112015-06-10 Jason Merrill <jason@redhat.com>
12
13 PR c++/66289
14 * cp-tree.h (TEMPLATE_DECL_COMPLEX_ALIAS_P): New.
15 * pt.c (push_template_decl_real): Set it.
16 (dependent_alias_template_spec_p): Use it.
17 (dependent_type_p_r): Use dependent_alias_template_spec_p.
18 (uses_all_template_parms_data, uses_all_template_parms_r)
19 (complex_alias_template_p): New.
20 (get_template_parm_index): Handle BOUND_TEMPLATE_TEMPLATE_PARM.
21
5af874fb
JM
222015-06-09 Jason Merrill <jason@redhat.com>
23
34f42d7b
JM
24 DR 1467
25 PR c++/51747
26 * typeck2.c (digest_init_r): Replace previous change with
27 gcc_unreachable.
28
5af874fb
JM
29 PR c++/66387
30 * semantics.c (process_outer_var_ref): Make sure the value is
31 actually constant before returning it.
32 * typeck.c (cp_build_array_ref): Allow subscripting non-lvalue
33 array.
34
ebcf592c
PC
352015-06-09 Paolo Carlini <paolo.carlini@oracle.com>
36
37 PR c++/65815
38 * typeck2.c (digest_nsdmi_init): On aggregates use reshape_init.
39 * init.c (expand_default_init): Likewise.
40
6a9263f7
JM
412015-06-09 Jason Merrill <jason@redhat.com>
42
43 PR c++/66383
44 * tree.c (replace_placeholders_r): Handle placeholders for an
45 outer object.
46 * typeck2.c (store_init_value): Only replace_placeholders for
47 objects of class type.
48
13fdf2e2
AM
492015-06-08 Andrew MacLeod <amacleod@redhat.com>
50
51 * call.c : Adjust include files.
52 * class.c : Likewise.
53 * constexpr.c : Likewise.
54 * cp-array-notation.c : Likewise.
55 * cp-cilkplus.c : Likewise.
56 * cp-gimplify.c : Likewise.
57 * cp-lang.c : Likewise.
58 * cp-objcp-common.c : Likewise.
59 * cp-tree.h : Likewise.
60 * cp-ubsan.c : Likewise.
61 * cvt.c : Likewise.
62 * decl.c : Likewise.
63 * decl2.c : Likewise.
64 * dump.c : Likewise.
65 * error.c : Likewise.
66 * except.c : Likewise.
67 * expr.c : Likewise.
68 * friend.c : Likewise.
69 * init.c : Likewise.
70 * lambda.c : Likewise.
71 * lex.c : Likewise.
72 * mangle.c : Likewise.
73 * method.c : Likewise.
74 * name-lookup.c : Likewise.
75 * optimize.c : Likewise.
76 * parser.c : Likewise.
77 * pt.c : Likewise.
78 * ptree.c : Likewise.
79 * repo.c : Likewise.
80 * rtti.c : Likewise.
81 * search.c : Likewise.
82 * semantics.c : Likewise.
83 * tree.c : Likewise.
84 * typeck.c : Likewise.
85 * typeck2.c : Likewise.
86 * vtable-class-hierarchy.c : Likewise.
87
85d9a299
JM
882015-06-05 Jason Merrill <jason@redhat.com>
89
39f383b7
JM
90 PR c++/66405
91 * pt.c (argument_pack_element_is_expansion_p): Return 2 if
92 the expansion has extra args.
93 (use_pack_expansion_extra_args_p): Return true in that case.
94
85d9a299
JM
95 PR c++/66405
96 * pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is
97 dependent even if it has a type.
98
d7438551
AH
992015-06-05 Aldy Hernandez <aldyh@redhat.com>
100
101 * cp-objcp-common.c: Adjust comment for
102 cxx_warn_unused_global_decl.
103 * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Remove
104 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New.
105 * cp-tree.h (note_mangling_alias): Protoize.
106 (cp_write_global_declarations): Remove.
107 (cxx_post_compilation_parsing_cleanups): Protoize.
108 * decl.c (wrapup_globals_for_namespace): Remove use of DATA
109 argument.
110 * decl2.c (mangling_aliases): New global.
111 (build_java_method_aliases): New. Adapted from
112 collect_candidates_for_java_method_aliases.
113 (collect_candidates_for_java_method_aliases): Remove.
114 (build_java_method_aliases): Remove.
115 (generate_mangling_aliases): New.
116 (note_mangling_alias): New. Moved from mangle_decl.
117 (locus_at_end_of_parsing): New global.
118 (c_parse_final_cleanups): Rename from
119 cp_write_global_declarations.
120 Use locus_at_end_of_parsing.
121 Call generate_mangling_aliases.
122 Rename call to collect_candidates_for_java_method_aliases into
123 build_java_method_aliases.
124 Remove call to finalize_compilation_unit.
125 Move vtable handling into cxx_post_compilation_parsing_cleanups.
126 Do not call check_global_declarations or
127 emit_debug_global_declarations.
128 (cxx_post_compilation_parsing_cleanups): New.
129 * mangle.c (mangle_decl): Move code to note_mangling_alias.
130 * name-lookup.c (do_namespace_alias): Call early_global_decl.
131
ac59f9be
NS
1322015-06-05 Nathan Sidwell <nathan@acm.org>
133
134 PR c++/52595
135 * parser.c (cp_parser_cache_defarg): Continue looking for
136 declarators when scanning a potential template argument list of an
137 NSDMI.
138
ecb9f223
AM
1392015-06-04 Andrew MacLeod <amacleod@redhat.com>
140
141 * call.c: Adjust includes for restructured coretypes.h.
142 * class.c: Likewise.
143 * constexpr.c: Likewise.
144 * cp-array-notation.c: Likewise.
145 * cp-gimplify.c: Likewise.
146 * cp-lang.c: Likewise.
147 * cp-objcp-common.c: Likewise.
148 * cp-tree.h: Likewise.
149 * cp-ubsan.c: Likewise.
150 * cvt.c: Likewise.
151 * decl.c: Likewise.
152 * decl2.c: Likewise.
153 * dump.c: Likewise.
154 * error.c: Likewise.
155 * except.c: Likewise.
156 * expr.c: Likewise.
157 * friend.c: Likewise.
158 * init.c: Likewise.
159 * lambda.c: Likewise.
160 * lex.c: Likewise.
161 * mangle.c: Likewise.
162 * method.c: Likewise.
163 * name-lookup.c: Likewise.
164 * optimize.c: Likewise.
165 * parser.c: Likewise.
166 * pt.c: Likewise.
167 * ptree.c: Likewise.
168 * repo.c: Likewise.
169 * rtti.c: Likewise.
170 * search.c: Likewise.
171 * semantics.c: Likewise.
172 * tree.c: Likewise.
173 * typeck.c: Likewise.
174 * typeck2.c: Likewise.
175 * vtable-class-hierarchy.c: Likewise.
176
e93ca5ca
RR
1772015-06-04 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
178
179 PR c++/66192
180 PR target/66200
181 * cp-tree.h (get_guard_cond): Adjust declaration
182 * decl.c (expand_static_init): Use atomic load acquire
183 and adjust call to get_guard_cond.
184 * decl2.c (build_atomic_load_byte): New function.
185 (get_guard_cond): Handle thread_safety.
186 (one_static_initialization_or_destruction): Adjust call to
187 get_guard_cond.
188
1cc1ac7f
JM
1892015-06-03 Jason Merrill <jason@redhat.com>
190
191 PR c++/44282
192 * mangle.c (mangle_decl): Always SET_IDENTIFIER_GLOBAL_VALUE.
193 (write_CV_qualifiers_for_type): Set G.need_abi_warning.
194 (decl_implicit_alias_p): Split out from maybe_remove_implicit_alias.
195 * cp-tree.h (DECL_REALLY_EXTERN): Handle null DECL_LANG_SPECIFIC.
196
d3ea4c06
MLI
1972015-06-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
198 Paolo Carlini <paolo.carlini@oracle.com>
199
200 PR c++/66130
201 * typeck.c (invalid_nonstatic_memfn_p): Add location_t parameter and
202 use it in the diagnostic.
203 (decay_conversion): Adjust call.
204 * semantics.c (finish_decltype_type): Likewise.
205 * call.c (resolve_args, build_new_op_1,
206 perform_implicit_conversion_flags): Adjust calls.
207 * cvt.c (ocp_convert, convert_to_void): Likewise.
208 * cp-tree.h (invalid_nonstatic_memfn_p): Update declaration.
209
4753e009
PC
2102015-06-03 Paolo Carlini <paolo.carlini@oracle.com>
211
212 * decl.c (check_tag_decl): Use declspecs->locations as locations in
213 error_at and warning_at calls.
214
7b3a9795
MP
2152015-06-03 Marek Polacek <polacek@redhat.com>
216
217 PR sanitizer/66190
218 * cp-gimplify.c (struct cp_genericize_data): Add no_sanitize_p.
219 (cp_genericize_r): Don't instrument static initializers.
220 (cp_genericize_tree): Initialize wtd.no_sanitize_p.
221
ea5b45b6
AT
2222015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
223
224 * decl.c (start_function): Call plugin before parsing.
225 (finish_function): Call plugin after parsing.
226
5d58db82
PP
2272015-06-02 Patrick Palka <patrick@parcs.ath.cx>
228
229 * cp-tree.h (init_error): Remove declaration.
230 * error.c (scratch_pretty_printer): Rename to ...
231 (actual_pretty_printer): ... this.
232 (cxx_pp): Constify and update accordingly.
233 (init_error): Remove definition.
234 * lex.c (cxx_init): Do not call init_error.
235
a983abd2
PC
2362015-06-02 Paolo Carlini <paolo.carlini@oracle.com>
237
238 PR c++/61683
239 * parser.c (cp_parser_mem_initializer): Allow for decltype-specifier.
240
603eaec4
JM
2412015-06-01 Jason Merrill <jason@redhat.com>
242
81371eff
JM
243 PR c++/65942
244 * decl2.c (mark_used): Don't always instantiate constexpr fns.
245 * constexpr.c (cxx_eval_call_expression): Instantiate them here.
246
603eaec4
JM
247 PR c++/44282
248 * mangle.c (attr_strcmp): New.
249 (write_CV_qualifiers_for_type): Also write out attributes that
250 affect type identity.
251 (write_type): Strip all attributes after writing qualifiers.
252
6ad6af49
JM
2532015-05-31 Jason Merrill <jason@redhat.com>
254
255a48d6
JM
255 * constexpr.c (cxx_eval_indirect_ref): Try folding first.
256
6ad6af49
JM
257 PR c++/66320
258 * constexpr.c (cxx_eval_constant_expression): Treat a placeholder
259 with the wrong type as non-constant.
260
f4252989
JM
2612015-05-27 Jason Merrill <jason@redhat.com>
262
cba16cca
JM
263 * decl.c (check_redeclaration_exception_specification): Depend on
264 -Wsystem-headers rather than -pedantic.
265
f4252989
JM
266 * decl.c (warn_extern_redeclared_static): Use the location of
267 newdecl in diagnostics, not input_location.
268 (validate_constexpr_redeclaration): Likewise.
269 (check_redeclaration_no_default_args): Likewise.
270 (duplicate_decls): Likewise.
271 (check_redeclaration_exception_specification): Likewise.
272 Change second diagnostic to inform.
273
6f2d72e0
NS
2742015-05-24 Nathan Sidwell <nathan@acm.org>
275
276 PR c++/66243
277 * decl.c (build_enumerator): Don't silently convert scoped enums.
278
2792015-05-24 Jan Hubicka <hubicka@ucw.cz>
233ce289
JH
280
281 PR lto/66180
282 * mangle.c (mangle_decl): Mangle anonymous namespace types as
283 "<anon>".
284
84a3423b
NS
2852015-05-23 Nathan Sidwell <nathan@acm.org>
286
287 PR c++/65936
288 * pt.c (lookup_template_class_1): Copy may_alias attribute too.
289
a95492ab
JW
2902015-05-22 Jim Wilson <jim.wilson@linaro.org>
291
292 * Make-lang.in (check_g++_parallelize): Update comment.
293
320d13ec
PC
2942015-05-22 Paolo Carlini <paolo.carlini@oracle.com>
295
296 PR c++/65598
297 * decl.c (grokdeclarator): Use the correct location in error
298 messages about 'explicit'.
299
fd5c817a
MP
3002015-05-22 Marek Polacek <polacek@redhat.com>
301 Edward Smith-Rowland <3dw4rd@verizon.net>
302
303 PR c/47043
304 * cp-tree.h (build_enumerator): Update declaration.
305 * decl.c (build_enumerator): Add attributes parameter. Call
306 cplus_decl_attributes.
307 * init.c (constant_value_1): Pass tf_none to mark_used.
308 * parser.c (cp_parser_enumerator_definition): Parse attributes and
309 pass them down to build_enumerator.
310 * pt.c (tsubst_enum): Pass decl attributes to build_enumerator.
311 * semantics.c (finish_id_expression): Don't warn_deprecated_use here.
312
9ab2fcc1
NS
3132015-05-21 Nathan Sidwell <nathan@acm.org>
314
315 PR c++/60943
316 * decl2.c (change_return_type): Propagate FUNCTION_REF_QUALIFIED.
317
6b6dd1aa
MP
3182015-05-21 Marek Polacek <polacek@redhat.com>
319
320 * typeck.c (warn_args_num): Don't print "declare here" for builtins.
321
12101053
JM
3222015-05-20 Jason Merrill <jason@redhat.com>
323
226a93b7
JM
324 * pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
325 before register_specialization.
326
12101053
JM
327 * decl.c (grok_op_properties): Don't complain about size_t
328 placement delete here.
329 * call.c (second_parm_is_size_t): Split out from...
330 (non_placement_deallocation_fn_p): ...here.
331 (build_op_delete_call): Warn about size_t placement delete with
332 -Wc++14-compat.
333
9ab2fcc1 3342015-05-19 Nathan Sidwell <nathan@acm.org>
09b59d4d
NS
335
336 PR c++/65954
337 * typeck.c (finish_class_member_access_expr): Diagnose failed
338 lookup of enum class member.
339
41b37d5e
JJ
3402015-05-19 Jakub Jelinek <jakub@redhat.com>
341
342 PR middle-end/66199
343 * parser.c (cp_parser_omp_for_loop): Don't add
344 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
345 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
346 (cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
347 constructs.
348
fab27f52
MM
3492015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
350
351 * typeck.c (composite_pointer_type): Use std::swap instead of explicit
352 swaps.
353
80f1c14d
JM
3542015-05-18 Jason Merrill <jason@redhat.com>
355
f41aecf4
JM
356 * pt.c (retrieve_specialization): Make sure our arguments have
357 gone through strip_typedefs.
358
b237c4cb
JM
359 * pt.c (tsubst_decl) [VAR_DECL]: Call coerce_innermost_template_parms.
360 (determine_specialization): Call coerce_template_parms.
361
c4d6d7bc
JM
362 DR 1391
363 * pt.c (type_unification_real): Check convertibility here.
364 (unify_one_argument): Not here.
365
8f56fadc
JM
366 * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
367 (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
368 [TREE_LIST]: Fix no-change case.
369
80f1c14d
JM
370 * ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.
371
40de31cf
MLI
3722015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
373
374 PR fortran/44054
375 * error.c (cp_diagnostic_starter): Use diagnostic_location
376 function.
377 (cp_print_error_function): Likewise.
378 (cp_printer): Replace locus pointer with accessor function.
379
c3388e62
DM
3802015-05-12 David Malcolm <dmalcolm@redhat.com>
381
382 * parser.c (cp_parser_selection_statement): Add location and
383 guard_kind arguments to calls to
384 cp_parser_implicitly_scoped_statement.
385 (cp_parser_iteration_statement): Likewise for calls to
386 cp_parser_already_scoped_statement.
387 (cp_parser_implicitly_scoped_statement): Add "guard_loc" and
388 "guard_kind" params; use them to warn for misleading
389 indentation.
390 (cp_parser_already_scoped_statement): Likewise.
391
5ce039df
JH
3922015-05-11 Jan Hubicka <hubicka@ucw.cz>
393
394 * class.c (fixup_type_variants): Do not copy TYPE_METHODS
395 (one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
396 * semantics.c (finish_member_declaration): Likewise.
397 * method.c (lazily_declare_fn): Allways add method to main variant list.
398
a31765ef
AH
3992015-05-09 Aldy Hernandez <aldyh@redhat.com>
400
401 PR bootstrap/66085
402 * decl2.c (note_mangling_alias): Declare arguments as unused.
403
765189ff
JM
4042015-05-08 Jason Merrill <jason@redhat.com>
405
406 * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
407 -Wc++0x-compat.
408
613aba20
JM
4092015-05-08 Jason Merrill <jason@redhat.com>
410
411 * decl2.c (mangling_aliases): New variable.
412 (note_mangling_alias, generate_mangling_aliases): New.
413 (cp_write_global_declarations): Call generate_mangling_aliases.
414 (generate_mangling_alias): Split out from...
415 * mangle.c (mangle_decl): ...here.
416 * cp-tree.h: Declare note_mangling_alias.
417
09c5f835
AH
4182015-05-08 Aldy Hernandez <aldyh@redhat.com>
419
420 * decl2.c (collect_candidates_for_java_method_aliases): Remove.
421 (build_java_method_aliases): Adapt to use create_same_body_alias
422 instead of assemble_alias. Move variable declarations to
423 definition and tidy up.
424 (cp_write_global_declarations): Call build_java_method_aliases
425 instead of collecting candidates first.
426
90f11cf9
JM
4272015-05-07 Jason Merrill <jason@redhat.com>
428
429 PR c++/59012
430 * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
431 (cp_parser_std_attribute_spec): Handle alignas pack expansion.
432 * decl2.c (is_late_template_attribute): An attribute exp is dependent.
433 * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
434 (apply_late_template_attributes): Handle attribute pack expansion.
435
0173bd2a
MP
4362015-05-07 Marek Polacek <polacek@redhat.com>
437
438 PR c/65179
439 * typeck.c (cp_build_binary_op): Warn when left shifting a negative
440 value.
441
d5449acf
JM
4422015-05-07 Jason Merrill <jason@redhat.com>
443
444 DR 1467
445 PR c++/51747
446 * typeck2.c (digest_init_r): Fix single element list.
447
b8dd6913
JM
4482015-05-05 Jason Merrill <jason@redhat.com>
449
8243e2a9
JM
450 * cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
451 MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
452 MUST_NOT_THROW_EXPR.
453 (cp_genericize_data): Add try_block field.
454 (cp_genericize_tree): Initialize it.
455 * except.c (expand_end_catch_block): Set TREE_NO_WARNING on
456 implicit rethrow.
457
81b6a6c5
JM
458 * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
459 Return false.
460
32ad49af
JM
461 * semantics.c (finish_call_expr): Check complain.
462
15ed2619
JM
463 * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
464 maybe-in-charge constructor.
465
f8aa3dd3
JM
466 * decl.c (start_decl): Don't push the plain VAR_DECL for a
467 variable template.
468
b8dd6913
JM
469 DR 1518
470 DR 1630
471 PR c++/54835
472 PR c++/60417
473 * call.c (convert_like_real): Check value-initialization before
474 explicit.
475 * typeck2.c (process_init_constructor_record): Don't set
476 CONSTRUCTOR_IS_DIRECT_INIT.
477 (process_init_constructor_array): Likewise.
478 * init.c (build_vec_init): Likewise.
479
21c0a521
DM
4802015-05-05 David Malcolm <dmalcolm@redhat.com>
481
482 * parser.c (cp_parser_asm_definition): Only test for
483 error_mark_node if "outputs" was just set. Likewise for "inputs".
484
f5322614
PC
4852015-05-04 Paolo Carlini <paolo.carlini@oracle.com>
486 Jakub Jelinek <jakub@redhat.com>
487
488 PR c++/66007
489 * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
490 result in an actual error.
491
38920aec
PC
4922015-05-01 Paolo Carlini <paolo.carlini@oracle.com>
493 Prathamesh Kulharni <prathamesh.kulkarni@linaro.org>
494
495 PR c++/65858
496 * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
497 false.
498
6f3d1a5e
DM
4992015-04-30 David Malcolm <dmalcolm@redhat.com>
500
501 * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
502 trailing semicolon.
503
9f7fb685
JM
5042015-04-29 Jason Merrill <jason@redhat.com>
505
506 PR c++/50800
507 * tree.c (apply_identity_attributes): Fix handling of classes.
508
b811915d
TS
5092015-04-29 Thomas Schwinge <thomas@codesourcery.com>
510
511 * parser.c (cp_parser_oacc_enter_exit_data): Use
512 OMP_STANDALONE_CLAUSES.
513
0aa359c1
PC
5142015-04-29 Paolo Carlini <paolo.carlini@oracle.com>
515
516 PR c++/64667
517 * init.c (perform_member_init): Handle references for -Winit-self.
518
2c8f0683
TS
5192015-04-29 Thomas Schwinge <thomas@codesourcery.com>
520
521 * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
522 OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
523
7bfc5ada
JM
5242015-04-28 Jason Merrill <jason@redhat.com>
525
3f8e2835
JM
526 PR c++/65896
527 * constexpr.c (cxx_eval_store_expression): Don't try to actually
528 store an empty class.
529
5756d0f9
JM
530 PR c++/65656
531 * constexpr.c (cxx_eval_builtin_function_call): Fix
532 __builtin_constant_p.
533
b71983a5
JM
534 PR c++/50800
535 * tree.c (strip_typedefs): Add remove_attributes parm.
536 (strip_typedefs_expr): Likewise.
537 (apply_identity_attributes): New subroutine of strip_typedefs.
538 * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs.
539 (convert_nontype_argument, unify): Likewise.
540 * cp-tree.h: Adjust.
541
7bfc5ada
JM
542 PR c++/65734
543 * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
544
1d0275e2
TS
5452015-04-27 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
546
547 * class.c (layout_class_type): Remove check if
548 PCC_BITFIELD_TYPE_MATTERS is defined.
549
46bf0b0a
JW
5502015-04-27 Jim Wilson <jim.wilson@linaro.org>
551
552 * Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
553
f8815f7a
JM
5542015-04-24 Jason Merrill <jason@redhat.com>
555
c6f044f7
JM
556 PR c++/50800
557 * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
558
f8815f7a
JM
559 * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
560 Remove obsolete code.
561 [NE_EXPR]: Likewise.
562
6c283621
JM
5632015-04-23 Jason Merrill <jason@redhat.com>
564
565 PR c++/65646
566 * pt.c (check_explicit_specialization): Don't
567 SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
568 headers.
569 * decl.c (grokvardecl): Revert earlier fix.
570
2821fc6b
PC
5712015-04-20 Paolo Carlini <paolo.carlini@oracle.com>
572
573 PR c++/65801
574 * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
575 suppresses the diagnostic.
576
0cfabb37
VV
5772015-04-20 Ville Voutilainen <ville.voutilainen@gmail.com>
578
579 Reject trailing return type for an operator auto().
580 * decl.c (grokdeclarator): Reject trailing return types for
581 all conversion operators, don't handle conversion operators
582 in the previous checks that deal with auto.
583
06aca1d5
IV
5842015-04-20 Ilya Verbin <ilya.verbin@intel.com>
585
586 * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
587
988db853
PC
5882015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
589
590 * class.c (resolve_address_of_overloaded_function, instantiate_type):
591 Rename tsubst_flags_t parameter flags -> complain.
592
9f635aba
PC
5932015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
594
595 * call.c (build_op_delete_call, build_over_call): Check mark_used
596 return value.
597 * class.c (resolve_address_of_overloaded_function): Likewise.
598 * decl.c (cxx_maybe_build_cleanup): Likewise.
599 * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
600 tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
601 * rtti.c (build_dynamic_cast_1): Likewise.
602 * semantics.c (process_outer_var_ref): Likewise.
603 * typeck.c (build_class_member_access_expr,
604 cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
605
bf5730d7
JM
6062015-04-15 Jason Merrill <jason@redhat.com>
607
58cc255c
JM
608 * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
609 (build_constexpr_constructor_member_initializers): Loop to find
610 the BIND_EXPR.
611 * decl.c (start_preparsed_function): Clobber the object at the
612 beginning of a constructor.
613
efb5e817
JM
614 * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
615 * method.c (implicitly_declare_fn): Likewise.
616 * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
617
bf5730d7
JM
618 * decl2.c (determine_visibility): Use get_template_info.
619
5ce3039e
JM
6202015-04-15 Jason Merrill <jason@redhat.com>
621 Marek Polacek <polacek@redhat.com>
622
623 PR c++/65727
624 * lambda.c (lambda_expr_this_capture): In unevaluated context go
625 through the normal loop, just don't capture.
626 (maybe_resolve_dummy): Handle null return.
627
3a1351b9
PC
6282015-04-15 Paolo Carlini <paolo.carlini@oracle.com>
629
630 * call.c (enforce_access): Emit error + inform.
631
0567dcd2
MP
6322015-04-15 Marek Polacek <polacek@redhat.com>
633
634 * constexpr.c (use_new_call): Remove #define.
635 (lookup_parameter_binding): Remove function.
636 (cxx_bind_parameters_in_call): Remove unused code.
637 (cxx_eval_call_expression): Likewise.
638 (cxx_eval_constant_expression): Likewise.
639
182d115c
MM
6402015-04-14 Mikhail Maltsev <maltsevm@gmail.com>
641
642 * tree.c (replace_placeholders_t): Remove unused type.
643 (replace_placeholders): Remove unused pset.
644
0f19e7ad
JM
6452015-04-14 Jason Merrill <jason@redhat.com>
646
57c5e96e
JM
647 * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
648
fb899e32
JM
649 PR c++/65695
650 * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
651
0f19e7ad
JM
652 PR c++/65721
653 * name-lookup.c (do_class_using_decl): Complain about specifying
654 the current class even if there are dependent bases.
655
688e531e
DK
6562015-04-14 David Krauss <david_work@me.com>
657
658 PR c++/59766
659 * decl.c (grokdeclarator): Do not flag friends with deduced return.
660
2fd16d0f
MV
6612015-04-14 Momchil Velikov <momchil.velikov@gmail.com>
662 Jason Merrill <jason@redhat.com>
663
664 PR c++/60994
665 * parser.c (cp_parser_class_name): Add enum_ok parameter.
666 (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
667 (cp_parser_diagnose_invalid_type_name): Don't assume a template is
668 a class template.
669
6338536c
JJ
6702015-04-12 Jakub Jelinek <jakub@redhat.com>
671
672 PR c++/65736
673 * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
674 don't fold if op01 isn't divisible by TYPE_SIZE_UNIT. Convert
675 the expression to the original type at the end.
676
00da5e28
JJ
6772015-04-09 Jakub Jelinek <jakub@redhat.com>
678
0212e31e
JJ
679 PR c++/65690
680 * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
681 TYPE_USER_ALIGN.
682
00da5e28
JJ
683 PR c++/65690
684 * tree.c (build_cplus_array_type): Layout type before variants are
685 set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
686 variant.
687
a3d94329
PC
6882015-04-03 Paolo Carlini <paolo.carlini@oracle.com>
689
690 PR c++/64085
691 * lambda.c (add_capture): Use dependent_type_p for capture by
692 reference too.
693
894bec68
MP
6942015-04-02 Marek Polacek <polacek@redhat.com>
695
696 PR c++/65642
697 * constexpr.c (cxx_eval_pointer_plus_expression): Call
698 cxx_eval_constant_expression on the first operand.
699
37978db4
JM
7002015-04-01 Jason Merrill <jason@redhat.com>
701
702 PR c++/65625
703 * decl.c (make_typename_type): Handle seeing a variable template.
704
c23a9ec5
PC
7052015-04-01 Paolo Carlini <paolo.carlini@oracle.com>
706
707 PR c++/56100
708 * pt.c (instantiating_current_function_p): New.
709 * name-lookup.c (pushdecl_maybe_friend_1): Use it.
710 * cp-tree.h (instantiating_current_function_p): Declare.
711
f87cb0b7
JM
7122015-04-01 Jason Merrill <jason@redhat.com>
713
714 PR c++/65646
715 * decl.c (grokvardecl): Don't call check_explicit_specialization
716 for non-template members of a class template.
717
14e51ef2
MP
7182015-04-01 Marek Polacek <polacek@redhat.com>
719
720 PR c++/65554
721 * class.c (finish_struct): Require that the second field of a
722 user-defined initializer_list be of size type.
723
397ad54d
MP
7242015-03-31 Marek Polacek <polacek@redhat.com>
725
726 PR c++/65390
727 * tree.c (build_cplus_array_type): Use dependent_type_p rather than
728 checking for constness.
729
ef4bac78
MP
7302015-03-30 Marek Polacek <polacek@redhat.com>
731
732 PR c++/65398
733 * constexpr.c (cxx_fold_indirect_ref): Don't perform the
734 *(&A[i] p+ j) => A[i + j] transformation here.
735 (cxx_eval_pointer_plus_expression): New function.
736 (cxx_eval_constant_expression): Use it here.
737
62021f64
TB
7382015-03-27 Tobias Burnus <burnus@net-b.de>
739
740 PR c/65586
741 * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
742 cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
743 cp_parser_omp_declare): Don't show error for skipped omp pragmas with
744 -fopenmp-simd.
745
5964a3a6
MP
7462015-03-27 Marek Polacek <polacek@redhat.com>
747
748 PR c++/65556
749 * semantics.c (finish_switch_cond): If the unlowered type is not an
750 enum, use the type of the condition.
751
0b7dccc6
JM
7522015-03-27 Jason Merrill <jason@redhat.com>
753
754 PR c++/65509
755 * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
756 constants.
757
08227658
MM
7582015-03-26 Mikhail Maltsev <maltsevm@gmail.com>
759
760 PR c++/65154
761 * init.c (build_vec_init): Fix initializing aggregates
762 with empty init list.
763
41b38772
JM
7642015-03-26 Jason Merrill <jason@redhat.com>
765
766 PR c++/65525
767 * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
768
1cc57b59
MP
7692015-03-25 Marek Polacek <polacek@redhat.com>
770
771 PR c++/65558
772 * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
773 on an anonymous namespace.
774
2a924bb4
MP
7752015-03-25 Marek Polacek <polacek@redhat.com>
776
777 PR c++/61670
778 * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
779
4b7c558d
JM
7802015-03-24 Jason Merrill <jason@redhat.com>
781
a9f0423f
JM
782 PR c++/65046
783 * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
784 * parser.c (cp_parser_namespace_definition): Don't set it.
785 * name-lookup.c (handle_namespace_attrs): Check
786 DECL_NAMESPACE_ASSOCIATIONS instead.
787
4b7c558d
JM
788 PR c++/65498
789 * pt.c (get_mostly_instantiated_function_type): Just return the
790 type of the partially instantiated template in DECL_TI_TEMPLATE.
791
f594abf4
MP
7922015-03-20 Marek Polacek <polacek@redhat.com>
793
794 PR c++/65398
795 * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
796 A[i + j].
797
b75cebc4
MP
7982015-03-20 Marek Polacek <polacek@redhat.com>
799
800 PR c++/65072
801 * typeck.c (lookup_anon_field): Make sure we're dealing with the main
802 variant.
803
7cb73573
JM
8042015-03-19 Jason Merrill <jason@redhat.com>
805
806 PR c++/65046
807 Automatically propagate ABI tags to variables and functions
808 from their (return) type.
809 * class.c (check_tag): Handle variables and functions.
810 (mark_or_check_attr_tags): Split out from find_abi_tags_r.
811 (mark_or_check_tags): Likewise.
812 (mark_abi_tags): Use it. Rename from mark_type_abi_tags.
813 (check_abi_tags): Add single argument overload for decls.
814 Handle inheriting tags for decls.
815 * mangle.c (write_mangled_name): Call it.
816 (mangle_return_type_p): Split out from write_encoding.
817 (unmangled_name_p): Split out from write_mangled_name.
818 (write_mangled_name): Ignore abi_tag on namespace.
819 * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
820 * parser.c (cp_parser_namespace_definition): Set it.
821 * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
822 about abi_tag attribute on non-inline namespace.
823 * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
824 (handle_abi_tag_attribute): Allow tags on variables.
825
9b65e171
JJ
8262015-03-19 Jakub Jelinek <jakub@redhat.com>
827
828 * decl2.c (cplus_decl_attributes): Also add "omp declare target"
829 attribute for DECL_EXTERNAL VAR_DECLs.
830
41cee85a
PC
8312015-03-18 Paolo Carlini <paolo.carlini@oracle.com>
832
833 PR c++/65340
834 * call.c (build_over_call): Pass the tsubst_flags_t argument to
835 mark_used.
836 * decl2.c (mark_used): Inline the require_deduced_type call and
837 guard the error call.
838
3d17be83
JM
8392015-03-16 Jason Merrill <jason@redhat.com>
840
841 PR c++/65061
842 * parser.c (cp_parser_template_name): Call strip_using_decl.
843
ec638c55
MP
8442015-03-16 Marek Polacek <polacek@redhat.com>
845
846 DR 1688
847 PR c++/65327
848 * decl.c (grokdeclarator): Allow volatile and constexpr together.
849
b7e7f412
PC
8502015-03-12 Paolo Carlini <paolo.carlini@oracle.com>
851
852 PR c++/65323
853 * decl.c (check_default_argument): Don't call
854 maybe_warn_zero_as_null_pointer_constant.
855
25de0a29
AH
8562015-03-11 Aldy Hernandez <aldyh@redhat.com>
857
858 * cp-gimplify.c (simple_empty_class_p): New.
859 * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR. Abstract
860 the code for empty class copies into simple_empty_class_p, and
861 adapt it to handle COMPOUND_EXPRs.
862
58cbf8d4
PC
8632015-03-10 Paolo Carlini <paolo.carlini@oracle.com>
864
865 PR c++/65370
866 * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
867 only if the location of newdecl doesn't match the location of olddecl.
868
704c7904
JJ
8692015-03-10 Jakub Jelinek <jakub@redhat.com>
870
871 PR c++/65127
872 * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
873 is not a PARM_DECL.
874
a4d66d7d
JM
8752015-03-10 Jason Merrill <jason@redhat.com>
876
877 PR c++/65333
878 DR 1558
879 * pt.c (dependent_type_p_r): Check both class and alias template args.
880
7ccb1a11
JJ
8812015-03-10 Jakub Jelinek <jakub@redhat.com>
882
883 PR c/65120
884 * parser.c (cp_parser_binary_expression): Check for tcc_comparison
885 before preparing arguments to warn_logical_not_parentheses.
886 Use maybe_constant_value on rhs.
887
a2f259ef
JM
8882015-03-09 Jason Merrill <jason@redhat.com>
889
890 PR c++/65339
891 * call.c: Don't call maybe_resolve_dummy when calling a constructor.
892
01177669
JJ
8932015-03-09 Jakub Jelinek <jakub@redhat.com>
894
895 PR c/65120
896 * parser.c (cp_parser_binary_expression): Don't warn for
897 !!x == y or !b == y where b is bool.
898
a78cbe29
AH
8992015-03-06 Aldy Hernandez <aldyh@redhat.com>
900
901 * ptree.c (cxx_print_lambda_node): New.
902 (cxx_print_xnode): Handle LAMBDA_EXPR.
903
bf66b9b4
AH
9042015-03-03 Aldy Hernandez <aldyh@redhat.com>
905
906 PR c++/65295
907 * constexpr.c (cxx_eval_constant_expression): Remove assert in
908 RESULT_DECL handling.
909
75e0295b
MP
9102015-02-26 Marek Polacek <polacek@redhat.com>
911
912 PR c++/65202
913 * constexpr.c (cxx_eval_constant_expression): Don't evaluate
914 a RETURN_EXPR if its operand is null.
915
9b276dad
JM
9162015-02-25 Jason Merrill <jason@redhat.com>
917
2b8f9c8f
JM
918 PR c++/65209
919 * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
920 DECL_COMDAT.
921 (constrain_visibility_for_template): Handle reference arguments.
922
9b276dad
JM
923 PR debug/58315
924 * decl.c (start_preparsed_function): Use create_artificial_label
925 for cdtor_label.
926
4414e22e
PC
9272015-02-17 Paolo Carlini <paolo.carlini@oracle.com>
928 Jakub Jelinek <jakub@redhat.com>
929
930 PR c++/65075
931 * constexpr.c (check_constexpr_bind_expr_vars): Allow
932 implicit typedefs for lambda types.
933
6e4f01ff
PC
9342015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
935
936 PR c++/60894
937 * decl.c (lookup_and_check_tag): Use strip_using_decl.
938
ef796bef
JM
9392015-02-13 Jason Merrill <jason@redhat.com>
940
941 PR c++/65054
942 * pt.c (template_args_equal): Look through conversions here.
943 * tree.c (cp_tree_equal): Not here.
944
e84abfa4
PC
9452015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
946
947 PR c++/60211
948 * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
949 pragma_external context.
950
f9b600ba
JM
9512015-02-13 Jason Merrill <jason@redhat.com>
952
953 PR c++/65051
954 * call.c (reference_binding): Don't look for bad conversion
955 if TO is incomplete.
956
81adbcea
PC
9572015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
958
959 PR c++/64970
960 * decl.c (make_typename_type): Pass tsubst_flags_t argument
961 to lookup_template_class.
962
730f474b
JJ
9632015-02-13 Jakub Jelinek <jakub@redhat.com>
964
965 PR ipa/65034
966 * decl.c (start_preparsed_function): Use void_type_node instead
967 of NULL_TREE as LABEL_DECL type.
968
f522930c
JM
9692015-02-12 Jason Merrill <jason@redhat.com>
970
3b95b65c
JM
971 PR c++/64898
972 * mangle.c (write_mangled_name): Fix test for variable template
973 instantiation.
974
f522930c
JM
975 * decl.c (begin_destructor_body): Condition clobber on
976 -flifetime-dse.
977
bc81eb3f
AA
9782015-02-12 Andrea Azzarone <azzaronea@gmail.com>
979
980 PR c++/64959
981 * parser.c (lookup_literal_operator): Return all candidates.
982 (cp_parser_userdef_char_literal): Simplify error handling.
983 (cp_parser_userdef_numeric_literal): Pass tf_warning_or_error.
984 (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
985 Also give higher priority to standard string UDL operator.
986
40595b8e
JJ
9872015-02-12 Jakub Jelinek <jakub@redhat.com>
988
12d0d358
JJ
989 PR debug/55541
990 * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
991 * decl.c (poplevel): If functionbody, try not to create an extra
992 BLOCK for function body and use subblocks as that, if it is non-NULL
993 and doesn't have siblings. Set BLOCK_OUTER_CURLY_BRACE_P flag.
994 (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
995
40595b8e
JJ
996 PR sanitizer/64984
997 * except.c (check_noexcept_r): Return NULL for internal
998 calls.
999
0ec052fe
JM
10002015-02-10 Jason Merrill <jason@redhat.com>
1001
1002 PR c++/64994
1003 * constexpr.c (cxx_eval_call_expression): Walk the clone list.
1004
d90cae08
JH
10052015-02-10 Jan Hubicka <hubicka@ucw.cz>
1006
1007 PR ipa/64982
1008 * method.c (use_thunk): Do not check for stdarg thunks.
1009
a02f26f6
JM
10102015-02-06 Jason Merrill <jason@redhat.com>
1011
1012 PR c++/64899
1013 * init.c (build_vec_init): Handle default-initialized array with
1014 constexpr default constructor.
1015
4886ec8e
JJ
10162015-02-04 Jakub Jelinek <jakub@redhat.com>
1017
1018 PR c/64824
1019 PR c/64868
1020 * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
1021
457d0ace
PC
10222015-02-03 Paolo Carlini <paolo.carlini@oracle.com>
1023
1024 PR c++/64877
1025 * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
1026 for generated expressions.
1027
879887f1
VV
10282015-02-02 Ville Voutilainen <ville.voutilainen@gmail.com>
1029
1030 PR c++/64901
1031 * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
1032 DECL_OVERRIDE_P.
1033
4c5cf0b2
JM
10342015-02-02 Jason Merrill <jason@redhat.com>
1035
1036 * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
1037
40fecdd6
JM
10382015-01-30 Joseph Myers <joseph@codesourcery.com>
1039
1040 * class.c, except.c, parser.c, pt.c: All callers of fatal_error
1041 changed to pass input_location as first argument.
1042
a7c3e87e
JJ
10432015-01-29 Jakub Jelinek <jakub@redhat.com>
1044
1045 PR c++/64717
1046 * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
1047 into SAVE_EXPR.
1048
e1ef8aa9
JM
10492015-01-29 Jason Merrill <jason@redhat.com>
1050
3dbb8427
JM
1051 PR c++/49508
1052 * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
1053 erroneous return statement.
1054
e1ef8aa9
JM
1055 PR c++/64521
1056 * repo.c (repo_emit_p): It's OK for a clone to be extern at this
1057 point.
1058
f7f049fa
CT
10592015-01-27 Caroline Tice <cmtice@google.com>
1060
1061 Committing VTV Cywin/Ming patch for Patrick Wollgast
1062 * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
1063 check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
1064
94e54b8d
JM
10652015-01-27 Jason Merrill <jason@redhat.com>
1066
2cc7f90b
JM
1067 PR c++/58597
1068 * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
1069 current_function_decl.
1070
94e54b8d
JM
1071 PR c++/63889
1072 * pt.c (finish_template_variable): Move from semantics.c.
1073 Handle multiple template arg levels. Handle coercion here.
1074 (lookup_template_variable): Not here.
1075
7c83622c
JM
10762015-01-23 Jason Merrill <jason@redhat.com>
1077
fa4e8db2
JM
1078 PR c++/64314
1079 PR c++/57510
1080 * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
1081 that has been completely split out.
1082
c6e7c499 1083 PR c++/64701
8a7261b2
JM
1084 * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
1085 statement codes.
c6e7c499 1086
7c83622c
JM
1087 PR c++/64727
1088 * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
1089 of CONST_DECL.
1090
f1eac182
JM
10912015-01-21 Jason Merrill <jason@redhat.com>
1092
b85a3242
JM
1093 PR c++/64603
1094 * constexpr.c (cxx_eval_constant_expression): Only shortcut
1095 constant CONSTRUCTORs.
1096
f1eac182
JM
1097 PR c++/64647
1098 * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
1099 give a hard error in a template instantiation.
1100
cbf5d0e7
RB
11012015-01-21 Richard Biener <rguenther@suse.de>
1102
1103 PR middle-end/64313
1104 * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
1105 for builtins the user declared correctly.
1106
de37b21e
PC
11072015-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1108
1109 PR c++/58614
1110 * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
1111 TREE_TYPE (elt) == error_mark_node.
1112
67933728
JH
11132015-01-15 Jan Hubicka <hubicka@ucw.cz>
1114
1115 PR tree-optimization/62053
1116 * tree.c (build_cplus_array_type): Layout type after variants are set.
1117
35228ac7
JJ
11182015-01-15 Jakub Jelinek <jakub@redhat.com>
1119
1120 * cp-gimplify.c (cp_genericize_r): Call
1121 cp_ubsan_maybe_instrument_member_call for member calls.
1122 (cp_ubsan_check_member_access_r): New function.
1123 (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
1124 * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
1125 cp_ubsan_instrument_member_accesses,
1126 cp_ubsan_maybe_instrument_downcast,
1127 cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
1128 * cp-ubsan.c: New file.
1129 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
1130 * constexpr.c (cxx_eval_call_expression): Return void_node
1131 for IFN_UBSAN_VPTR.
1132 (potential_constant_expression_1): Return true for
1133 UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
1134 * typeck.c (build_class_member_access_expr): Provide locus
1135 for COMPONENT_REFs.
1136 (build_static_cast_1): Instrument downcasts.
1137 * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
1138 add ubsan instrumentation for virtual_access.
1139 * call.c: Include internal-fn.h.
1140 (set_flags_from_callee): Handle internal calls.
1141
199b7a35
MV
11422015-01-15 Momchil Velikov <momchil.velikov@gmail.com>
1143
1144 PR c++/59366
1145 * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
1146 and function templates, declared only in the class.
1147 * decl.c (duplicate_decls): Reveal hidden friend functions or
1148 function templates, if they are redeclared outside the class.
1149
c3c29ba5
JM
11502015-01-15 Jason Merrill <jason@redhat.com>
1151
134efa82
JM
1152 PR c++/64356
1153 * constexpr.c (cxx_eval_binary_expression): Fix pasto.
1154
c3c29ba5
JM
1155 PR c++/63283
1156 * constexpr.c (potential_constant_expression_1): Handle reference
1157 args in templates.
1158
41dbbb37
TS
11592015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1160 James Norris <jnorris@codesourcery.com>
1161 Cesar Philippidis <cesar@codesourcery.com>
1162 Ilmir Usmanov <i.usmanov@samsung.com>
1163 Jakub Jelinek <jakub@redhat.com>
1164
1165 * parser.c: Include "gomp-constants.h".
1166 (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1167 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1168 Use OMP_CLAUSE_SET_MAP_KIND.
1169 (cp_parser_omp_construct, cp_parser_pragma): Handle
1170 PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
1171 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
1172 PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
1173 (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
1174 "create", "delete", "deviceptr", "host", "num_gangs",
1175 "num_workers", "present", "present_or_copy", "pcopy",
1176 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1177 "present_or_create", "pcreate", "vector_length", "wait".
1178 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
1179 (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1180 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1181 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1182 (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
1183 (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
1184 (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
1185 (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
1186 (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
1187 (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
1188 (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
1189 (cp_parser_oacc_kernels, cp_parser_oacc_loop)
1190 (cp_parser_oacc_parallel, cp_parser_oacc_update)
1191 (cp_parser_oacc_wait): New functions.
1192 * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
1193 (finish_oacc_parallel): New prototypes.
1194 * semantics.c: Include "gomp-constants.h".
1195 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1196 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1197 OMP_CLAUSE_SET_MAP_KIND.
1198 (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
1199 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
1200 Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1201 (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
1202 functions.
1203
36b218ee
PC
12042015-01-14 Paolo Carlini <paolo.carlini@oracle.com>
1205
1206 PR c++/58671
1207 * decl2.c (var_defined_without_dynamic_init): Handle gracefully
1208 self-initialization.
1209
8f413ae2
JM
12102015-01-13 Jason Merrill <jason@redhat.com>
1211
caee690e
JM
1212 PR c++/64356
1213 PR libstdc++/58777
1214 * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
1215 pointer expressions.
1216 (cxx_eval_increment_expression): Likewise.
1217
7c368fb2
JM
1218 PR c++/64514
1219 * pt.c (coerce_template_parameter_pack): Return NULL for a
1220 zero-length fixed parameter pack with a pack expansion arg.
1221
8f413ae2
JM
1222 PR c++/64520
1223 * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
1224
49c8bc0c
JM
12252015-01-12 Jason Merrill <jason@redhat.com>
1226
1227 PR c++/64547
1228 * constexpr.c (cxx_eval_call_expression): A call to a void
1229 function doesn't need to return a value.
1230
adfac8df
JJ
12312015-01-09 Michael Collison <michael.collison@linaro.org>
1232
1233 * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1234 input.h, alias.h, symtab.h, options.h, fold-const.h,
1235 wide-int.h, and inchash.h due to flattening of tree.h.
1236 * class.c: Ditto.
1237 * constexpr.c: Ditto.
1238 * cp-array-notation.c: Ditto.
1239 * cp-gimplify.c: Ditto.
1240 * cp-lang.c: Ditto.
1241 * cp-objcp-common.c: Ditto.
1242 * cvt.c: Ditto.
1243 * decl2.c: Ditto.
1244 * decl.c: Ditto.
1245 * dump.c: Ditto.
1246 * error.c: Ditto.
1247 * except.c: Ditto.
1248 * expr.c: Ditto.
1249 * friend.c: Ditto.
1250 * init.c: Ditto.
1251 * lambda.c: Ditto.
1252 * lex.c: Ditto.
1253 * mangle.c: Ditto.
1254 * name-lookup.c: Ditto.
1255 * optimize.c: Ditto.
1256 * parser.c: Ditto.
1257 * pt.c: Ditto.
1258 * ptree.c: Ditto.
1259 * repo.c: Ditto.
1260 * rtti.c: Ditto.
1261 * search.c: Ditto.
1262 * semantics.c: Ditto.
1263 * tree.c: Ditto.
1264 * typeck2.c: Ditto.
1265 * typeck.c: Ditto.
1266
f5481fc4
JM
12672015-01-08 Jason Merrill <jason@redhat.com>
1268
1269 * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
1270 * decl.c (compute_array_index_type): Likewise.
1271 * init.c (build_vec_init): Likewise.
1272 * typeck.c (cp_build_binary_op): Likewise.
1273
46621807
JM
12742015-01-08 Jason Merrill <jason@redhat.com>
1275
1276 * init.c (build_vec_init): Call ubsan_instrument_bounds to check
1277 whether an initializer-list is too big for a VLA.
1278 (throw_bad_array_length): Remove.
1279 * cp-tree.h: Remove prototype.
1280
247ecdf3
PC
12812015-01-08 Paolo Carlini <paolo.carlini@oracle.com>
1282
1283 PR c++/60753
1284 * decl.c (grokfndecl): Add bool parameter.
1285 (grokdeclarator): Adjust calls.
1286 (start_decl): Don't set DECL_DELETED_FN here.
1287
47867b4f
JM
12882015-01-06 Jason Merrill <jason@redhat.com>
1289
efcdb22f
JM
1290 * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
1291 template-ids.
1292
c6a38536
JM
1293 PR c++/64455
1294 * pt.c (type_dependent_expression_p): Handle variable templates.
1295 * constexpr.c (potential_constant_expression_1): Use it.
1296
b433d944
JM
1297 PR c++/64487
1298 * semantics.c (finish_offsetof): Handle templates here.
1299 * parser.c (cp_parser_builtin_offsetof): Not here.
1300
47867b4f
JM
1301 PR c++/64496
1302 * semantics.c (process_outer_var_ref): Diagnose lambda in local
1303 class NSDMI.
1304
864822bd
VV
13052015-01-06 Ville Voutilainen <ville.voutilainen@gmail.com>
1306
1307 PR c++/64489
1308 * class.c (check_field_decls): Make copy assignment operators
1309 complex only in c++98 mode.
1310
2f42e5de
TS
13112015-01-05 Trevor Saunders <tsaunders@mozilla.com>
1312
1313 PR c++/31397
1314 * class.c (check_for_override): Warn when a virtual function is an
1315 override not marked override.
1316
86cfdb4e
TS
13172015-01-05 Trevor Saunders <tsaunders@mozilla.com>
1318
1319 * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
1320 hold base_fndecls.
1321 (get_basefndecls): Adjust.
1322
5624e564
JJ
13232015-01-05 Jakub Jelinek <jakub@redhat.com>
1324
1325 Update copyright years.
1326
5bd012f8
MP
13272015-01-05 Marek Polacek <polacek@redhat.com>
1328
1329 PR c/64423
1330 * typeck.c (cp_build_array_ref): Pass loc down to
1331 warn_array_subscript_with_type_char.
1332
ad41bd84 1333\f
5624e564 1334Copyright (C) 2015 Free Software Foundation, Inc.
ad41bd84
JM
1335
1336Copying and distribution of this file, with or without modification,
1337are permitted in any medium without royalty provided the copyright
1338notice and this notice are preserved.
This page took 1.956492 seconds and 5 git commands to generate.