Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"jump to label crosses initialization of..."



I'm moving a C++ (CFM) project over from CodeWarrior 9.5 to Xcode 2.1. gcc is complaining about the following code:

    #ifdef LUA_DEBUG

    if(0 != lua_gettop(L))
        goto HandleErr;

    #endif

    ...
    const DoubleRect& pos = curSprite->getPos();
    ...

    #ifdef LUA_DEBUG

    HandleErr:
    lua_stringerror(L, "GetPosition expects 0 arguments");

    return 0;

    #endif

The error messages (there are three) are:

LuaSpriteInterface.cpp:1205: error: jump to label 'HandleErr'
LuaSpriteInterface.cpp:1186: error: from here
LuaSpriteInterface.cpp:1194: error: crosses initialization of 'const DoubleRect& pos'



Am I doing something non-standard here? How can I fix it? I would like to continue using goto: as this problem occurs in many places in my code.


Thanks,
Tim

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.