This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/60014] Bad warning suppression caused by track-macro-expansion when not using integrated cpp
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 10 Jun 2014 10:24:04 +0000
- Subject: [Bug preprocessor/60014] Bad warning suppression caused by track-macro-expansion when not using integrated cpp
- Auto-submitted: auto-generated
- References: <bug-60014-4 at http dot gcc dot gnu dot org/bugzilla/>
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;
}