Debian Codegraph @

gcc/testsuite/g++.dg/coroutines/co-await-syntax-03-auto.C

raw
1 // { dg-additional-options "-fsyntax-only -w" }
2
3 #include "coro.h"
4
5 extern struct awaitable *aw ();
6
7 auto bar () {
8 int x = 1 + co_await *aw(); // { dg-error "cannot be used in a function with a deduced return type" }
9
10 return x;
11 }
12
13 int main () {
14 bar ();
15 return 0;
16 }