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/

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to