[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Totally Stumped...Run-Time Check Failure...
From: |
brian plummer |
Subject: |
Re: Totally Stumped...Run-Time Check Failure... |
Date: |
Wed, 18 Sep 2002 23:37:39 +0200 |
Hi Hans:
Thanks for the reply.
>>Is your YYSTYPE defined properly?
Yes, at least I think so. Here is my definition:
typedef union {
int ivalue;
Symbol *sp;
NODE *np;
} YYSTYPE;
I will only say that something very strange is happening here. If I jump
into the the generated yyparse() code and add a memset to set the value of
yyval before it is used, then I'm OK as in:
YYSTYPE yyval; /* the variable used to return */
memset(&yyval,0,sizeof(YYSTYPE));
Additionally, if I build my code on Solaris I don't see anything like this
problem. I'm building in Debug mode in VC++ (version 7, version string is
below) so I wouldn't think the optimizer would be making some kind of
erroneous removal of the yyval variable. Any ideas on this issue are
welcome...
A quick question. I'm seeing different behavior between my Solaris bison
and my WIN32 bison (cygwin) both are version 1.35. On Solaris and Windows
the command is:
bison -l -d -odc5.cpp dc5.y
but on Solaris I get dc5.hpp with header guards and a typedef on the union
for YYSTYPE as yystype as in:
#ifndef YYSTYPE
typedef union {
int ivalue;
Symbol *sp;
NODE *np;
} yystype;
# define YYSTYPE yystype
# define YYSTYPE_IS_TRIVIAL 1
#endif
but on Windows I get a file name dc5.cpp.h without any header guards or the
#ifndef above...any ideas here?
Thanks for your assistance,
Brian Plummer
Here is the version string for my MSVC++:
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.00.9466 for 80x86
Copyright (C) Microsoft Corporation 1984-2001. All rights reserved.
>From: Hans Aberg <address@hidden>
>To: "brian plummer" <address@hidden>
>CC: address@hidden
>Subject: Re: Totally Stumped...Run-Time Check Failure...
>Date: Wed, 18 Sep 2002 20:54:25 +0200
>
>At 18:21 +0000 2002/09/18, brian plummer wrote:
> >I'm getting the following error at runtime in VC++:
> >
> >Run-Time Check Failure #3 - The variable 'yyval' is being used without
>being
> >defined.
> >
> >and the line that is causing the problem is:
> >
> > *++yyvsp = yyval;
> >
> >which is within yyparse().
> >
> >But yyval is defined as far as I can see. I run my code through the
> >pre-processor and yyval is there plain as day:
> >
> > YYSTYPE yyval; /* the variable used to return */
>
>Is your YYSTYPE defined properly?
>
> Hans Aberg
_________________________________________________________________
Join the worldÃs largest e-mail service with MSN Hotmail.
http://www.hotmail.com