Debian Codegraph @

gcc/testsuite/g++.dg/coroutines/coro1-missing-await-method.C

raw
1 // { dg-additional-options "-fsyntax-only -w" }
2 #include "coro.h"
3
4 #define MISSING_AWAIT_READY
5 #define MISSING_AWAIT_SUSPEND
6 #define MISSING_AWAIT_RESUME
7 #include "coro1-ret-int-yield-int.h"
8
9 coro1
10 bar0 ()
11 {
12 co_await coro1::suspend_never_prt{}; // { dg-error {no member named 'await_ready' in 'coro1::suspend_never_prt'} }
13 co_yield 5; // { dg-error {no member named 'await_suspend' in 'coro1::suspend_always_prt'} }
14 co_await coro1::suspend_always_intprt(5); // { dg-error {no member named 'await_resume' in 'coro1::suspend_always_intprt'} }
15 co_return 0;
16 }
17
18 int main (int ac, char *av[]) {
19 struct coro1 x0 = bar0 ();
20 return 0;
21 }