This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] libcpp: use better locations for _Pragma tokens (preprocessor/69126)
- From: Steve Ellcey <sellcey at imgtec dot com>
- To: David Malcolm <dmalcolm at redhat dot com>
- Cc: <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 28 Jan 2016 11:12:40 -0800
- Subject: Re: [PATCH] libcpp: use better locations for _Pragma tokens (preprocessor/69126)
- Authentication-results: sourceware.org; auth=none
- References: <1453039793-12628-1-git-send-email-dmalcolm at redhat dot com>
- Reply-to: <sellcey at imgtec dot com>
David,
This patch has broken the top-of-tree glibc build. I get an error on an
undef that is supposed to be protected by Pragmas. It happens when
compiling intl/plural.c in glibc. I created a preprocessed source file
but when I compile it, the error doesn't happen. I will try to create a
small unpreprocessed standalone test case but maybe this is enough for
you to know what is happening.
If I look at the preprocessed code, the statement in question is
under ingore warning pragmas.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wuninitialized"
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
*++yyvsp = __gettextlval;
#pragma GCC diagnostic pop
Steve Ellcey
sellcey@imgtec.com
plural.c: In function '__gettextparse':
plural.c:1767:12: error: '__gettextlval.num' may be used uninitialized
in this function [-Werror=maybe-uninitialized]
*++yyvsp = yylval;
plural.c:66:25: note: '__gettextlval.num' was declared here
#define yylval __gettextlval
^
plural.c:1265:9: note: in expansion of macro 'yylval'
YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
^~~~~~
cc1: all warnings being treated as errors