[antlr-interest] Re: ANTLR 2.7.4: C++ grammar

Francis ANDRE francis.andre at easynet.fr
Mon Dec 6 13:49:17 PST 2004


> What effect does this problem have? Is it just a warning or does
> it stop the run?

It stops the run by a abort popup window
it is a security control done by the MSVC runtime that checks that each
automatic used variable gets a value before beeing referenced


> My understanding is that pointer to character would be
> automatically initialised to a null pointer.
As any true guess, it could be wrong or right...guess what, your is wrong
(you are not in the sandbox of Java)


Cheers

A good friend will come bail you out of jail..........
but, a true friend....will be sitting next to you saying:
 "...that was fun."

----- Original Message ----- 
From: "David Wigg" <wiggjd at lsbu.ac.uk>
To: <francis.andre at easynet.fr>; <antlr-interest at yahoogroups.com>
Sent: Monday, December 06, 2004 2:11 PM
Subject: [antlr-interest] Re: ANTLR 2.7.4: C++ grammar


>
> Hello Francis,
>
> Thanks for your message about run time errors with the generated
> C++ compiler from our C++ parser CPP_parser.g.
>
> This is a new problem for me which may have surfaced because
> MSVC 7.1 is more strict than previous versions. We need to
> clarify the new situation as it could have implications for all
> grammars.
>
> A similar problem was quoted by jimmyatwork1 at yahoo.com in
> antlr-interest digest no. 1893 on 2 December. This was for char
> *s in scope_override.
>
> I wonder if this problem is picked up during a run in those
> cases where a potential definition of an uninitialised pointer
> to character has been bypassed by selection in non guessing mode?
>
> What effect does this problem have? Is it just a warning or does
> it stop the run?
>
> My understanding is that pointer to character would be
> automatically initialised to a null pointer.
>
> If I am correct then a return value of null should not
> necessarily be a problem. (It could be correct?)
>
> If so, then MSVC 7.1 must mark these variables specially when
> initialised (even with null).
>
> Does this mean that to be on the safe side that when we specify
> a return value in a production we should initialise it?
>
> For example,
>
> qualified_ctor_id returns [char *q = '';]
>
> So far the problem seems to have arisen only with pointers to
> characters. What about other sorts of pointers and integers etc.?
>
> David.
>
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 





More information about the antlr-interest mailing list