Debian Codegraph @

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

raw
1 // { dg-additional-options "-fsyntax-only -w" }
2
3 #include "coro.h"
4
5 auto bar () {
6 co_yield 5; // { dg-error "cannot be used in a function with a deduced return type" }
7 }
8
9 int main () {
10 bar ();
11 return 0;
12 }