From: Marek Polacek <polacek@redhat.com>
To: Jason Merrill <jason@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [pushed 1/4] c++: copy location to AGGR_INIT_EXPR
Date: Thu, 14 Dec 2023 09:25:29 -0500 [thread overview]
Message-ID: <ZXsQWckALwjvqqM4@redhat.com> (raw)
In-Reply-To: <e2814496-815b-4d2e-a7ad-8630fa33eccc@redhat.com>
On Wed, Dec 13, 2023 at 08:38:12PM -0500, Jason Merrill wrote:
> On 12/13/23 19:00, Marek Polacek wrote:
> > On Wed, Dec 13, 2023 at 11:47:37AM -0500, Jason Merrill wrote:
> > > Tested x86_64-pc-linux-gnu, applying to trunk.
> > >
> > > -- 8< --
> > >
> > > When building an AGGR_INIT_EXPR from a CALL_EXPR, we shouldn't lose location
> > > information.
> >
> > I think the following should be an obvious fix, so I'll check it in.
>
> Thanks, I wonder why I wasn't seeing that?
It must be due to -fimplicit-constexpr. So if you have
GXX_TESTSUITE_STDS=98,11,14,17,20,impcx
then I think the FAIL won't show up.
> > -- >8 --
> > Since r14-6505 I see:
> >
> > FAIL: g++.dg/cpp0x/constexpr-ex1.C -std=c++23 at line 91 (test for errors, line 89)
> > FAIL: g++.dg/cpp0x/constexpr-ex1.C -std=c++23 (test for excess errors)
> > FAIL: g++.dg/cpp0x/constexpr-ex1.C -std=c++26 at line 91 (test for errors, line 89)
> > FAIL: g++.dg/cpp0x/constexpr-ex1.C -std=c++26 (test for excess errors)
> >
> > and it wasn't fixed by r14-6511. So I'm fixing it with the below.
> >
> > gcc/testsuite/ChangeLog:
> >
> > * g++.dg/cpp0x/constexpr-ex1.C: Adjust expected diagnostic line.
> > ---
> > gcc/testsuite/g++.dg/cpp0x/constexpr-ex1.C | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ex1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ex1.C
> > index 383d38a42d4..b26eb5d0c90 100644
> > --- a/gcc/testsuite/g++.dg/cpp0x/constexpr-ex1.C
> > +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ex1.C
> > @@ -88,7 +88,7 @@ struct resource {
> > };
> > constexpr resource f(resource d)
> > { return d; } // { dg-error "non-.constexpr." "" { target { { { ! implicit_constexpr } && c++20_down } || c++11_only } } }
> > -// { dg-error "non-.constexpr." "" { target { c++23 && { ! implicit_constexpr } } } .-2 }
> > +// { dg-error "non-.constexpr." "" { target { c++23 && { ! implicit_constexpr } } } .-1 }
> > constexpr resource d = f(9); // { dg-message ".constexpr." "" { target { { ! implicit_constexpr } || c++11_only } } }
> > // 4.4 floating-point constant expressions
> >
> > base-commit: c535360788e142a92e1d8b1db25bf4452e26f5fb
>
Marek
prev parent reply other threads:[~2023-12-14 14:25 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-03 1:18 [PATCH] c++: End lifetime of objects in constexpr after destructor call [PR71093] Nathaniel Shead
2023-11-03 1:34 ` Nathaniel Shead
2023-11-27 11:08 ` Nathaniel Shead
2023-12-09 20:12 ` Jason Merrill
2023-12-10 10:22 ` Richard Biener
2023-12-10 11:21 ` Alexander Monakov
2023-12-10 15:58 ` Richard Biener
2023-12-10 18:34 ` Jason Merrill
2023-12-11 8:02 ` Richard Biener
2023-12-11 19:12 ` Jason Merrill
2023-12-11 19:17 ` Richard Biener
2023-12-11 19:21 ` Marek Polacek
2023-12-11 22:00 ` Jason Merrill
2023-12-11 22:22 ` Marek Polacek
2023-12-11 23:03 ` Jakub Jelinek
2023-12-12 11:13 ` Alexander Monakov
2023-12-12 11:15 ` Jakub Jelinek
2023-12-12 15:24 ` Jason Merrill
2023-12-12 17:50 ` Jason Merrill
2023-12-13 4:40 ` Jason Merrill
2023-12-13 16:47 ` [pushed 1/4] c++: copy location to AGGR_INIT_EXPR Jason Merrill
2023-12-13 16:47 ` [pushed 2/4] c++: constant direct-initialization [PR108243] Jason Merrill
2023-12-13 16:47 ` [pushed 3/4] c++: fix in-charge parm in constexpr Jason Merrill
2023-12-13 16:47 ` [pushed 4/4] c++: End lifetime of objects in constexpr after destructor call [PR71093] Jason Merrill
2023-12-13 18:05 ` [pushed 1/4] c++: copy location to AGGR_INIT_EXPR Patrick Palka
2023-12-13 20:06 ` [pushed] c++: TARGET_EXPR location in default arg [PR96997] Jason Merrill
2023-12-14 0:00 ` [pushed 1/4] c++: copy location to AGGR_INIT_EXPR Marek Polacek
2023-12-14 1:38 ` Jason Merrill
2023-12-14 14:25 ` Marek Polacek [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZXsQWckALwjvqqM4@redhat.com \
--to=polacek@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jason@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).