aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/cpp/pr90400.c
blob: 4f2cab8d6ab55539b90b862c3262fc4be4b2a925 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* { dg-do compile } */
/* { dg-additional-options "-save-temps" } */
/* PR preprocessor/90400 */

#define OUTER(x) x
#define FOR(x) _Pragma ("GCC unroll 0") for (x)
void f ()
{
    /* If the pragma were to be seen prior to the expansion of FOR, as was
       the case before r12-5454, then the unroll pragma would complain
       because the immediately following statement would be ";" rather than
       a loop.  */
    OUTER (; FOR (int i = 0; i != 1; ++i);) /* { dg-bogus {statement expected before ';' token} } */
}