bug-bison
[Top][All Lists]
Advanced

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

Re: bison bug.


From: Hans Aberg
Subject: Re: bison bug.
Date: Sun, 30 Dec 2001 12:25:53 +0100

At 11:23 +0100 2001/12/30, Akim Demaille wrote:
>...Now bison
>has
>
>  if (nitems >= MAXSHORT)
>    fatal (_("too many items (max %d)"), MAXSHORT);

Under STD C, you should #include <limits.h>, and the code can then read:
  if (nitems >= SHRT_MAX)
    fatal (_("too many items (max %d)"), SHRT_MAX);

(And it can never happen that nitems > SHRT_MAX if nitems is a short.)

  Hans Aberg





reply via email to

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