help-bison
[Top][All Lists]
Advanced

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

Re: 'size_t' undeclared (first use in this function)


From: Hans Aberg
Subject: Re: 'size_t' undeclared (first use in this function)
Date: Wed, 22 Jul 2015 23:55:12 +0200

> On 22 Jul 2015, at 11:17, Tom Wang A <address@hidden> wrote:
> 
> I encounter a compiling error with bison 2.1. The output file y.tab.c cannot 
> pass gcc compiling, while there is no such problem on bison 2.3. However, the 
> linux server which installed bison 2.1 cannot be upgraded with bison 2.3 for 
> some reason. So my question is,  how can I avoid such error with bison 2.1? 
> The error is showed as:

Only the last version is supported, and a number of other bugs have been fixed, 
so it is best to find a way to upgrade. Can’t you install it in the user 
account?

> y.tab.c: In function 'yytnamerr':
> y.tab.c:718: error: 'size_t' undeclared (first use in this function)

There is a typo: it should be YYSIZE_T instead of size_t, at least it is what 
Bison 2.3 outputs. And size_t is in <stdio.h>. You might preprocess the file 
and see what YYSIZE_T is defined to. 





reply via email to

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