public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "prlw1 at cam dot ac.uk" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/114393] New: over eager "invalid use of void expression" ?
Date: Tue, 19 Mar 2024 11:09:06 +0000	[thread overview]
Message-ID: <bug-114393-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114393

            Bug ID: 114393
           Summary: over eager "invalid use of void expression" ?
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: prlw1 at cam dot ac.uk
  Target Milestone: ---

When trying to use the reference implementation of the `std::execution`
proposal over at https://github.com/nvidia/stdexec, I get errors of the form

/usr/src/local/stdexec/include/exec/async_scope.hpp:735:31: error: invalid use
of void expression
  735 |         return when_empty(just());

with `g++ (GCC) 14.0.1 20240318 (experimental)`

In https://github.com/NVIDIA/stdexec/issues/1285 Eric Niebler traces this to
a__make_sexpr invocations which can't ever have type void.

The easiest way to reproduce this is to see the standard example on goldbolt:
https://godbolt.org/z/3cseorf7M

It compiles fine with gcc 12.3 and 13.2 (even with `-Wall -Wextra
--pendantic-errors`, but not with gcc trunk, which possibly suggests a
regression.

I have been using stdexec successfully for a while with trunk. Old checkouts of
stdexec which used to work (with maybe gcc trunk from about 2 months ago?) now
fail, which also points towards a change in gcc rather than in stdexec.

             reply	other threads:[~2024-03-19 11:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-19 11:09 prlw1 at cam dot ac.uk [this message]
2024-03-19 11:29 ` [Bug c++/114393] [14 regression] " redi at gcc dot gnu.org
2024-03-19 11:32 ` redi at gcc dot gnu.org
2024-03-19 11:56 ` [Bug c++/114393] [14 regression] over eager "invalid use of void expression" ? since r14-2170-g4cf64d9cc2faf4 rguenth at gcc dot gnu.org
2024-03-19 22:42 ` pinskia at gcc dot gnu.org
2024-03-20  3:51 ` pinskia at gcc dot gnu.org
2024-03-20  4:04 ` pinskia at gcc dot gnu.org
2024-03-25 19:05 ` ppalka at gcc dot gnu.org
2024-03-29 23:49 ` law at gcc dot gnu.org
2024-04-12 19:08 ` ppalka at gcc dot gnu.org
2024-04-12 19:09 ` ppalka at gcc dot gnu.org
2024-04-12 19:11 ` ppalka at gcc dot gnu.org
2024-04-14 19:27 ` prlw1 at cam dot ac.uk

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=bug-114393-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).