Mailing Lists: Apple Mailing Lists

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

Don't understand this compiler warning



Folks,

This is some very old private code (from the mid-80ies, pre ANSI-C) that I try to port to the Mac. The code isn't mine but is supposed to compile under Windows 3.x (!) with MSVisualStudio 4. 

I have no clue what the compiler tries to tell me:

    auto unsigned long    lcl_l_flags = 0;

    lcl_l_flags = pgf_setdef_flag_(HYPHEN_PGF,
                                   DDIF_M_T_HYPHENATION_ALLOWED,
                                   DDIF_M_T_HYPHENATION_ALLOWED);

pgf_setdef_flag is a macro defined as follows:

    #define pgf_setdef_flag_(flag,val,def)                    \
        ( (!spgfp) ? lcl_l_flags |= def                    \
               : (spgfp->flags & flag) ? lcl_l_flags |= val        \
                           : 0                \
        )

Thus the above code after preprocessing looks like:

    lcl_l_flags = ( (!spgfp) ? lcl_l_flags |= 1 : (spgfp->flags & (0x02)) ? lcl_l_flags |= 1 : 0 );

And then the compiler says:
    warning: operation on 'lcl_l_flags' may be undefined


What does this warning mean? How can I fix it? Is it a problem at all? How can I ignore it? Lots of questions...
Btw: spgfp->flags is of type unsigned char.

Confused
---markus---

 _______________________________________________
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.