diff options
author | Jason Merrill <jason@redhat.com> | 2024-10-22 17:45:00 -0400 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2024-10-29 12:25:18 -0400 |
commit | e6d21cbf5cf035b6fa9946a4321f87cbcfa9f275 (patch) | |
tree | 0072b34c0d4e3c1f4ab7753e4c0e8f7297a9c034 /gcc/fortran/error.cc | |
parent | f003834badbfd9d0c0ad132de8b2f3d550ed120f (diff) | |
download | gcc-e6d21cbf5cf035b6fa9946a4321f87cbcfa9f275.zip gcc-e6d21cbf5cf035b6fa9946a4321f87cbcfa9f275.tar.gz gcc-e6d21cbf5cf035b6fa9946a4321f87cbcfa9f275.tar.bz2 |
c++: printing AGGR_INIT_EXPR args
PR30854 was about wrongly dumping the dummy object argument to a
constructor; r126582 in 4.3 fixed that by skipping the first argument. But
not all functions called by AGGR_INIT_EXPR are constructors, as observed in
PR116634; we shouldn't skip for non-member functions. And let's combine the
printing code for CALL_EXPR and AGGR_INIT_EXPR.
This doesn't make us accept the ill-formed 116634 testcase again with a
pedwarn, just fixes the diagnostic issue.
PR c++/30854
PR c++/116634
gcc/cp/ChangeLog:
* error.cc (dump_aggr_init_expr_args): Remove.
(dump_call_expr_args): Handle AGGR_INIT_EXPR.
(dump_expr): Combine AGGR_INIT_EXPR and CALL_EXPR cases.
gcc/testsuite/ChangeLog:
* g++.dg/coroutines/coro-bad-alloc-02-no-op-new-nt.C: Adjust
diagnostic.
* g++.dg/diagnostic/aggr-init1.C: New test.
Diffstat (limited to 'gcc/fortran/error.cc')
0 files changed, 0 insertions, 0 deletions