On Wed, Nov 12, 2008 at 10:20 PM, Graham Cox <[EMAIL PROTECTED]> wrote:
> I just added some fairly old C++ lex/bison code to my app, code that has
> been in use for a long time elsewhere and works fine. My app is compiling
> with much stricter warnings than many of my other projects though, and this
> line is throwing a warning:
>
>
>        lvalp->val = strtod( --wptr, &wptr );
>
> "warning: operation on 'wptr' may be undefined"
>
> wptr is declared:
>
>        static   char*  wptr = NULL;
>
> Can anyone shed any light on what's wrong here? Hopefully the above is
> enough to go on.

The order of evaluation of the arguments to a function is undefined so
you have a problem where you're taking the address of wptr and you're
pre-decrementing it.

-- Chris
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to