• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Don't understand this compiler warning
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Don't understand this compiler warning


  • Subject: Don't understand this compiler warning
  • From: Markus Ruggiero <email@hidden>
  • Date: Tue, 28 Jun 2005 15:39:30 +0200

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Don't understand this compiler warning
      • From: "Justin C. Walker" <email@hidden>
  • Prev by Date: error: conflicting type
  • Next by Date: Re: Don't understand this compiler warning
  • Previous by thread: Re: error: conflicting type
  • Next by thread: Re: Don't understand this compiler warning
  • Index(es):
    • Date
    • Thread