[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
C++ and casts
From: |
Bruce Lilly |
Subject: |
C++ and casts |
Date: |
Wed, 25 Dec 2002 00:30:35 -0500 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130 |
Santa Claus asked me to forward the attached patch.
When flex 2.5.25 generates a C scanner which is subsequently
compiled by a C++ compiler, the compiler may complain and
quit because (unlike good old C compilers) it can't deal
with assigning a void * return from yyalloc to some data
pointer without an explicit cast. This happens for example
when building grap
(http://lunabase.org/~faber/Vault/software/grap/).
There may be other places where a similar cast is required to
appease C++ compilers; I haven't looked.
*** flex.skl.orig Wed Dec 25 00:05:50 2002
--- flex.skl Wed Dec 25 00:06:19 2002
***************
*** 909,915 ****
#ifdef YY_USES_REJECT
if ( ! YY_G(yy_state_buf) )
! YY_G(yy_state_buf) = yyalloc(YY_BUF_SIZE + 2 YY_CALL_LAST_ARG);
#endif
if ( ! YY_G(yy_start) )
--- 909,915 ----
#ifdef YY_USES_REJECT
if ( ! YY_G(yy_state_buf) )
! YY_G(yy_state_buf) = (yy_state_type *)yyalloc(YY_BUF_SIZE + 2
YY_CALL_LAST_ARG);
#endif
if ( ! YY_G(yy_start) )
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- C++ and casts,
Bruce Lilly <=