testsuite: Add test for already-fixed issue with _Pragma expansion [PR90400]
The PR was fixed by r12-5454. Since the fix was somewhat incidental, although related, add a testcase from PR90400 too before closing it out. gcc/testsuite/ChangeLog: PR preprocessor/90400 * c-c++-common/cpp/pr90400.c: New test.
This commit is contained in:
parent
601dbf2a79
commit
d8e08ba939
1 changed files with 14 additions and 0 deletions
14
gcc/testsuite/c-c++-common/cpp/pr90400.c
Normal file
14
gcc/testsuite/c-c++-common/cpp/pr90400.c
Normal file
|
@ -0,0 +1,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} } */
|
||||
}
|
Loading…
Add table
Reference in a new issue