public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/114393] New: over eager "invalid use of void expression" ?
@ 2024-03-19 11:09 prlw1 at cam dot ac.uk
  2024-03-19 11:29 ` [Bug c++/114393] [14 regression] " redi at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: prlw1 at cam dot ac.uk @ 2024-03-19 11:09 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-04-14 19:27 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-19 11:09 [Bug c++/114393] New: over eager "invalid use of void expression" ? prlw1 at cam dot ac.uk
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

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).