Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-Id: <199912210445.WAA08356@hp2.xraylith.wisc.edu> To: Alexey Voinov cc: cygwin AT sourceware DOT cygnus DOT com Subject: Re: flex & gcc 2.95.2 In-reply-to: Your message of "Tue, 21 Dec 1999 07:25:22 +0300." <10309 DOT 991221 AT caravan DOT ru> Date: Mon, 20 Dec 1999 22:45:05 -0600 From: Mumit Khan Alexey Voinov 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 AT 4; .scl 2; .type 32; .endef > _yy_flex_alloc__FUi AT 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 AT sourceware DOT cygnus DOT com