bug-bison
[Top][All Lists]
Advanced

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

Re: bison'd files don't compile under Microsoft VC++


From: David Gluss
Subject: Re: bison'd files don't compile under Microsoft VC++
Date: Wed, 13 Feb 2002 12:14:50 -0800

I wouldn't be interested in bison outputting real C++...then you
couldn't use it in C programs any more.  The underlying task
is pretty simple after all...implement a state machine...so the
overhead of C++ seems uncalled for.
I am curious as to why you "don't want to walk that tracks"...is
it because you want it not to work, or because you have a better way?
What's the solution for guys like us?  Should we just stay with an old
version/start our own development effort?
I am working on a combined Unix/Windows project, and Bison was
definitely the right answer up until now.
I use Cygwin on MS, and of course any update you do to Bison goes
straight into the stream, and then I have to go back and patch
each time I download.  Ouch.
DG
----- Original Message -----
From: "Akim Demaille" <address@hidden>
To: "David Gluss" <address@hidden>
Cc: <address@hidden>; <address@hidden>; "Paul Eggert"
<address@hidden>
Sent: Wednesday, February 13, 2002 10:47 AM
Subject: Re: bison'd files don't compile under Microsoft VC++


>
> | One of the 'features' of the Microsoft environment is that size_t isn't
in
> | the std:: namespace.
> | malloc and free didn't make it either.
> | The versions of bison.simple in Bison 1.3.1 and Bison 1.3.3 won't work
with
> | Microsoft.
>
> I was sure this would happen.  Sigh.
>
> | Enclosed a patch for 1.3.3, and a testcase.
> |
> | Dave Gluss
> |
> |
> |
> | *** /usr/share/bison/133/bison.simple Tue Feb 12 09:05:39 2002
> | --- /usr/share/bison/bison.simple Tue Feb 12 09:39:45 2002
> | ***************
> | *** 67,81 ****
> |   # else
> |   #  ifdef __cplusplus
> |   #   include <cstdlib> /* INFRINGES ON USER NAME SPACE */
> | ! #   define YYSIZE_T std::size_t
> |   #  else
> |   #   ifdef __STDC__
> |   #    include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
> |   #    define YYSIZE_T size_t
> |   #   endif
> |   #  endif
> | ! #  define YYSTACK_ALLOC YYSTD (malloc)
> | ! #  define YYSTACK_FREE YYSTD (free)
> |   # endif
> |
> |   /* A type that is properly aligned for any stack member.  */
> | --- 67,90 ----
> |   # else
> |   #  ifdef __cplusplus
> |   #   include <cstdlib> /* INFRINGES ON USER NAME SPACE */
> | ! #   if _WIN32
> | ! #    define YYSIZE_T size_t
> | ! #   else
> | ! #    define YYSIZE_T std::size_t
> | ! #   endif
> |   #  else
> |   #   ifdef __STDC__
> |   #    include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
> |   #    define YYSIZE_T size_t
> |   #   endif
> |   #  endif
> | ! #  ifdef _WIN32
> | ! #   define YYSTACK_ALLOC malloc
> | ! #   define YYSTACK_FREE  free
> | ! #  else
> | ! #   define YYSTACK_ALLOC YYSTD (malloc)
> | ! #   define YYSTACK_FREE YYSTD (free)
> | ! #  endif
> |   # endif
> |
> |   /* A type that is properly aligned for any stack member.  */
> | ***************
> | *** 132,138 ****
> |   #if ! defined (YYSIZE_T)
> |   # ifdef __cplusplus
> |   #  include <cstddef> /* INFRINGES ON USER NAME SPACE */
> | ! #  define YYSIZE_T std::size_t
> |   # else
> |   #  ifdef __STDC__
> |   #   include <stddef.h> /* INFRINGES ON USER NAME SPACE */
> | --- 141,151 ----
> |   #if ! defined (YYSIZE_T)
> |   # ifdef __cplusplus
> |   #  include <cstddef> /* INFRINGES ON USER NAME SPACE */
> | ! #  if _WIN32
> | ! #   define YYSIZE_T size_t
> | ! #  else
> | ! #   define YYSIZE_T std::size_t
> | ! #  endif
> |   # else
> |   #  ifdef __STDC__
> |   #   include <stddef.h> /* INFRINGES ON USER NAME SPACE */
>
>
> Nah, I don't want to walk that tracks...
>
> Well, may I ask you what would happen had Bison output some real C++?
> Would you switch to that environment, or would you still use the C
> parsers compiled with a C++ compiler?
>
> I think we went too far in our attempt to please C++ compilers.
> Bison.simple is definitely meant for C.
>
> Opinions?  Paul?  I hope to be able to release Bison 1.50 with C++
> some time in the next two months, but...
>




reply via email to

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