[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Changes to allow compiling with -Werror using gcc 4.6.2 on i386. (is
From: |
dak |
Subject: |
Re: Changes to allow compiling with -Werror using gcc 4.6.2 on i386. (issue 5489092) |
Date: |
Wed, 21 Dec 2011 09:34:42 +0000 |
On 2011/12/21 02:56:37, md5i wrote:
http://codereview.appspot.com/5489092/diff/1/lily/parser.yy
File lily/parser.yy (right):
http://codereview.appspot.com/5489092/diff/1/lily/parser.yy#newcode36
lily/parser.yy:36: /* Define to get rid of conversion warning, int ->
int16_t.
I'd love to see another solution, but this was the only good one I was
able to
find.
Declaring a 16bit type to actually be 32bit with all the ensuing
problems is not what I consider a good solution.
The problem is the part of the resulting parser.cc that reads:
yysetstate:
*yyssp = yystate;
yyssp is a yytype_int16*, and yystate is int. yytype_int16 can be
changed via
the YYTYPE_INT16 macro, but the int cannot be. Why is it an int? I
don't know.
From how it is used in the code I see no reason it should not be a
yytype_int16
as well.
I agree.
Unfortunately, I could not figure out to make this happen, short of
postprocessing the resulting parser.cc file.
That would be one option.
Otherwise, the only solution I can think of for this is to exempt
parser.cc from
-Werror.
Perhaps turn off this particular warning in the source via some #pragma
or what GCC has in stock for that purpose?
Or even do the postprocessing changing the definition of yystate.
And a bug report to Bison upstream as well.
http://codereview.appspot.com/5489092/
- Re: Changes to allow compiling with -Werror using gcc 4.6.2 on i386. (issue 5489092), (continued)
- Re: Changes to allow compiling with -Werror using gcc 4.6.2 on i386. (issue 5489092), dak, 2011/12/20
- Re: Changes to allow compiling with -Werror using gcc 4.6.2 on i386. (issue 5489092), dak, 2011/12/20
- Re: Changes to allow compiling with -Werror using gcc 4.6.2 on i386. (issue 5489092), reinhold . kainhofer, 2011/12/20
- Changes to allow compiling with -Werror using gcc 4.6.2 on i386. (issue 5489092), md5i . mail, 2011/12/20
- Re: Changes to allow compiling with -Werror using gcc 4.6.2 on i386. (issue 5489092), md5i . mail, 2011/12/20
- Re: Changes to allow compiling with -Werror using gcc 4.6.2 on i386. (issue 5489092), md5i . mail, 2011/12/20
- Re: Changes to allow compiling with -Werror using gcc 4.6.2 on i386. (issue 5489092), md5i . mail, 2011/12/20
- Re: Changes to allow compiling with -Werror using gcc 4.6.2 on i386. (issue 5489092), md5i . mail, 2011/12/20
- Re: Changes to allow compiling with -Werror using gcc 4.6.2 on i386. (issue 5489092),
dak <=