https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60014
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-06-10
CC| |dodji at gcc dot gnu.org,
| |manu at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #3 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
I can reproduce it in trunk using:
#pragma GCC system_header
#define FOO(a, b) __LINE__;
I think the problem is that there is a push of the system-header-ness flag on
the expansion of the macro, but there is no pop to restore
non-system-header-ness.
That is, we generate:
# 1 "test.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "test.c"
# 1 "test.h" 1
# 2 "test.h" 3
# 2 "test.c" 2
int main()
{
6
# 5 "test.c" 3
;
;
char* a = 1;
}
but we should generate:
# 1 "test.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "test.c"
# 1 "test.h" 1
# 2 "test.h" 3
# 2 "test.c" 2
int main()
{
6
# 5 "test.c" 3
;
# 6 "test.c"
;
char* a = 1;
}