[Top][All Lists]

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

Re: turn off putting flex/bison output in distfile?

From: Akim Demaille
Subject: Re: turn off putting flex/bison output in distfile?
Date: 25 Jul 2002 14:29:15 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Honest Recruiter)

>>>>> "Thomas" == Thomas E Dickey <address@hidden> writes:

Thomas> bison relies on alloca, which is not standard. 

There are two meaning of `relies alloca':

- bison.exe uses alloca
  but has the machinery to emulate it when missing.
  No problem was ever reported.

- the parsers it outputs use alloca
  Recent versions of Bison uses alloca *only* when obviously
  usable (the *user* included alloca.h, or uses GCC).

   /* The parser invokes alloca or malloc; define the necessary symbols.  */
   #  define YYSTACK_ALLOC alloca
   # else
   #   if defined (alloca) || defined (_ALLOCA_H)
   #    define YYSTACK_ALLOC alloca
   #   else
   #    ifdef __GNUC__
   #     define YYSTACK_ALLOC __builtin_alloca
   #    endif
   #   endif
   #  endif
   # endif
   # ifdef YYSTACK_ALLOC
      /* Pacify GCC's `empty if-body' warning. */
   #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
   # else
   #  if defined (__STDC__) || defined (__cplusplus)
   #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
   #   define YYSIZE_T size_t
   #  endif
   #  define YYSTACK_ALLOC malloc
   #  define YYSTACK_FREE free
   # endif

So I think your legitimate point no longer holds.  And for those who
don't trust these conditions, #defining YYSTACK_USE_ALLOCA to 0
definitely settles the matter.

reply via email to

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