bug-bison
[Top][All Lists]
Advanced

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

[-Wconversion] on "*yyssp = yystate;"


From: Ulya Fokanova
Subject: [-Wconversion] on "*yyssp = yystate;"
Date: Thu, 06 Aug 2015 19:03:50 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

Hello!

I get the following warning compling bison-3.0.4 generated parser with GCC:

   warning: conversion to ‘yytype_int16 {aka short int}’ from ‘int’ may
   alter its value [-Wconversion]
       *yyssp = yystate;

As I understand, yyssp has to be 16-bit in order to reduce stack space. If this conversion is safe, bison could generate explicit cast; otherwise a more serious fix is needed. Could you fix it, or perhaps you'd like me to try send a patch ? Should I provide an example?

Ulya


reply via email to

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