Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gcc trunk unhappy with just() #1285

Closed
prlw1 opened this issue Mar 13, 2024 · 4 comments
Closed

gcc trunk unhappy with just() #1285

prlw1 opened this issue Mar 13, 2024 · 4 comments

Comments

@prlw1
Copy link

prlw1 commented Mar 13, 2024

gcc trunk is unhappy with stdexec::just()

Simply trying gcc trunk on the godbolt README example gives

<source>: In function 'int main()':
<source>:23:45: error: no match for 'operator|' (operand types are 'void' and 'stdexec::__closure::__binder_back<stdexec::__then::then_t, main()::<lambda(int)> >')
   23 |         stdexec::on(sched, stdexec::just(0) | stdexec::then(fun)),
      |                            ~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~
      |                                         |                  |
      |                                         void               stdexec::__closure::__binder_back<stdexec::__then::then_t, main()::<lambda(int)> >

async_scope.hpp is similarly unhappy:

/usr/src/local/stdexec/include/exec/async_scope.hpp: In member function 'auto exec::__scope::async_scope::on_empty() const':
/usr/src/local/stdexec/include/exec/async_scope.hpp:735:31: error: invalid use of void expression
  735 |         return when_empty(just());
      |                           ~~~~^~
@ericniebler
Copy link
Collaborator

/opt/compiler-explorer/libs/stdexec/trunk/include/stdexec/execution.hpp:2623:31: error: invalid use of void expression
 2623 |           __make_sexpr<then_t>(static_cast<_Fun&&>(__fun), static_cast<_Sender&&>(__sndr)));
      |           ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

__make_sexpr invocations can't ever have type void. This seems like a bug in gcc-trunk to me. I suggest reporting it there.

@prlw1
Copy link
Author

prlw1 commented Mar 15, 2024

How did you manage to get it to spit out that error message? (I don't see mention of __make_sexpr anywhere in my output.)

@prlw1
Copy link
Author

prlw1 commented Mar 20, 2024

The gcc team are already on the case: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114393

@prlw1
Copy link
Author

prlw1 commented Apr 15, 2024

@prlw1 prlw1 closed this as completed Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants