From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8CF783858D35; Tue, 19 Mar 2024 11:09:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8CF783858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1710846547; bh=sOU7t2bb+JipS239LZghPIqvHXkj1YBrlNwZrNbbOMI=; h=From:To:Subject:Date:From; b=ZgpCIClaTQse8xmxlr5PBdtKgtmoE6MtdhFPVMy4mAd3kcdYP2+kbFCy3ytQqXfhh HdCdAXNFEhajkrEfvQfjhumdDUzbNdLWmGM6XE+YHYgfhYQeJrgmtGUMAmwRx+KX2+ H7DqvUBm/TktxvXhkGwVsQq74Lb6mw8daPh768hk= From: "prlw1 at cam dot ac.uk" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: prlw1 at cam dot ac.uk X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114393 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 goldbol= t: 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 checkout= s 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.=