Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/cpp/builtin-macro-1.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 /* Origin PR preprocessor/64803 | 1 /* Origin PR preprocessor/64803 |
2 | 2 |
3 This test ensures that the value the __LINE__ macro expands to is | 3 This test ensures that the value the __LINE__ macro expands to is |
4 constant and corresponds to the line of the closing parenthesis of | 4 constant and corresponds to the line of the macro expansion point |
5 the top-most function-like macro expansion it's part of. | 5 the function-like macro expansion it's part of. |
6 | 6 |
7 { dg-do run } | 7 { dg-do run } |
8 { do-options -no-integrated-cpp } */ | 8 { do-options -no-integrated-cpp } */ |
9 | 9 |
10 #include <assert.h> | 10 #include <assert.h> |
17 main() | 17 main() |
18 { | 18 { |
19 M(a | 19 M(a |
20 ); | 20 ); |
21 | 21 |
22 assert(L20 == 20); /* 20 is the line number of the | 22 assert(L19 == 19); /* 19 is the line number of the |
23 closing parenthesis of the | 23 macro expansion point of the |
24 invocation of the M macro. Please | 24 invocation of the M macro. Please |
25 adjust in case the layout of this | 25 adjust in case the layout of this |
26 file changes. */ | 26 file changes. */ |
27 return 0; | 27 return 0; |
28 } | 28 } |