This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: flex & gcc 2.95.2


Alexey Voinov <voins@caravan.ru> writes:
> Hi!
> 
> I think I found bug in gcc 2.95.2 code generation.
> 
> look at flex generated code( flex -oyylex2.cc yylex2.y ):
> ----------------------------
> .
> .
> .
> static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
> static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
> .
> .
> .
> #ifdef YY_USE_PROTOS
> static void *yy_flex_alloc( yy_size_t size )
> #else
> static void *yy_flex_alloc( size )
> yy_size_t size;
> #endif
> {
> .
> .
> .
> #ifdef YY_USE_PROTOS
> static void *yy_flex_realloc( void *ptr, yy_size_t size )
> #else
> static void *yy_flex_realloc( ptr, size )
> void *ptr;
> yy_size_t size;
> #endif
> {
> .
> .
> .
> ----------------------------
> and now assembler code generated by( g++ -S yylex2.cc )
> .
> .
> .
> .def    _yy_flex_alloc__FUi@4;  .scl    2;      .type   32;     .endef
> _yy_flex_alloc__FUi@4:
>                    ^^^ why???
> .
> .
> .
> .def    _yy_flex_realloc__FPvUi;        .scl    3;      .type   32;     .ende
> f
> _yy_flex_realloc__FPvUi:
> .
> .
> .
> ----------------------------
> I cannot understand why @4 appended to yy_flex_alloc and not appended to
> yy_flex_realloc. Functions definitions look same to me.
> All calls to yy_flex_alloc are right ( call _yy_flex_alloc__FUi )
> 

Thanks for your bug report.

It's a bug in the C++ parser, and I've submitted a bug report on this.
Unfortunately, folks who're more familiar with C++ parser than I have
not yet looked at this problem.

See 

   Linkname: (C++) parser bug in handling fn attributes
   URL: http://gcc.gnu.org/ml/gcc-bugs/1999-11/msg00084.html

for a 5-line testcase that demonstrates the bug.

Regards,
Mumit


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]