• 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
C++ warnings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

C++ warnings


  • Subject: C++ warnings
  • From: Justin Walker <email@hidden>
  • Date: Wed, 13 Apr 2005 21:26:02 -0700

Hi, all,

This is marginally on-topic, but I could not find a more appropriate list. Using g++ 3.3 (20030304) [and, of course, Xcode], I get a bunch of this kind of error:

hecke/msymbols.h:109: warning: `MSymbols::chi' will be initialized after
hecke/msymbols.h:108: warning:   `int MSymbols::k'

The lines in question are in a class definition (MSymbols) in a .h file, and look like

108:    int k, N ;			// weight, level
109:    Character chi ;		// character
110:    bool do_save ;

in the "private" section of the class definition. They are warnings, so I expect the issue isn't serious, but it is perplexing (why would I care about order of initialization? Even if I cared, it seems that initializing in lexical order is within the parameters of "least surprise" :-}). Also, why not mention how do_save fits into the ordering?

Could it have to do with this (appearing first in the class definition)?
    MSymbols (const Character& chi, int k=2, bool save=false) ;

These are the only mentions of chi in the file.

Can someone with some more "object sense" than me share a clue?

Thanks for the help.

Regards,

Justin

--
Justin C. Walker, Curmudgeon-At-Large *
Institute for General Semantics | "Weaseling out of things is what
| separates us from the animals.
| Well, except the weasel."
| - Homer J Simpson
*--------------------------------------*-------------------------------*


_______________________________________________
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: C++ warnings
      • From: Andrew White <email@hidden>
  • Prev by Date: Re: IOKit and .xcode
  • Next by Date: Re: IOKit and .xcode
  • Previous by thread: Re: IOKit and .xcode
  • Next by thread: Re: C++ warnings
  • Index(es):
    • Date
    • Thread