bug-bison
[Top][All Lists]
Advanced

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

Re: Bison 1.30f


From: Akim Demaille
Subject: Re: Bison 1.30f
Date: 15 Dec 2001 11:07:40 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Civil Service)

>>>>> "Hans" == Hans Aberg <address@hidden> writes:

>> It assumes that the values can be copied merely by copying their
>> bits.  It uses memcpy in places.

Hans> Can you give examples of this (so I can think more about it)?

src/bison-1.29/src % grep memcpy bison.simple -C4                nostromo 11:06
# define YYSTACK_RELOCATE(Type, Stack)                                  \
    do                                                                  \
      {                                                                 \
        YYSIZE_T yynewbytes;                                            \
        yymemcpy ((char *) yyptr, (char *) (Stack),                     \
                  yysize * (YYSIZE_T) sizeof (Type));                   \
        Stack = &yyptr->Stack;                                          \
        yynewbytes = yystacksize * sizeof (Type) + YYSTACK_GAP_MAX;     \
        yyptr += yynewbytes / sizeof (*yyptr);                          \
--
#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif

#if ! defined (yyoverflow) && ! defined (yymemcpy)
# if __GNUC__ > 1               /* GNU C and GNU C++ define this.  */
#  define yymemcpy __builtin_memcpy
# else                          /* not GNU C or C++ */

/* This is the most reliable way to avoid incompatibilities
   in available built-in functions on various systems.  */
static void
#  if defined (__STDC__) || defined (__cplusplus)
yymemcpy (char *yyto, const char *yyfrom, YYSIZE_T yycount)
#  else
yymemcpy (yyto, yyfrom, yycount)
     char *yyto;
     const char *yyfrom;
     YYSIZE_T yycount;
#  endif



reply via email to

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