1 /* Test qualifiers on function return types in C23 (C23 version of
2 qual-return-5.c): those qualifiers are now ignored for all purposes,
4 /* { dg-do compile } */
5 /* { dg-options "-std=c23 -pedantic-errors" } */
9 volatile int f1 (void) { return 0; }
11 int *restrict
f2 (void) { return 0; }
14 const volatile long f3 (void);
17 const volatile void f4 (void) { }
20 _Atomic
int f5 (void);
24 _Atomic
int f6 (void) { return 0; }
26 /* The standard seems unclear regarding the case where restrict is
27 applied to a function return type that may not be
28 restrict-qualified; assume here that it is disallowed. */
29 restrict
int f7 (void); /* { dg-error "restrict" } */
31 typedef void FT (void);
32 FT
*restrict
f8 (void); /* { dg-error "restrict" } */