help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fwd: *yyssp = yystate; causes warning


From: Håkan Johansson
Subject: Re: Fwd: *yyssp = yystate; causes warning
Date: Tue, 21 Sep 2010 18:59:46 +0200
User-agent: Alpine 1.10 (DEB 962 2008-03-14)


Thanks, this helps.

Håkan


On Tue, 21 Sep 2010, John P. Hartmann wrote:

From a cursory instpection of an output C file, I think that

#define YYTYPE_INT16 int

would make the stack wider.  I don't know what other side effects, if
any, there may be.

  j.

2010/9/21 Håkan Johansson <address@hidden>:
I'm using gcc with the option -Wconversion (and -Werror), which gives a
warning in the generated parser (line number not certain):

gen/y.tab.c: In function 'int yyparse()':
gen/y.tab.c:1679: warning: conversion to 'short int' from 'int' may
alter
its value

this is the line

  *yyssp = yystate;

in the generated function yyparse , the declarations are

    int yystate;

and

    yytype_int16 *yyssp;

explaining the trouble.

Seen on debian lenny with bison 2.4.1, but also 2.4.3 gives the same
issue.

Suggestions?

Cheers,
Håkan
_______________________________________________
address@hidden http://lists.gnu.org/mailman/listinfo/help-bison


_______________________________________________
address@hidden http://lists.gnu.org/mailman/listinfo/help-bison

reply via email to

[Prev in Thread] Current Thread [Next in Thread]