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

Re: C++ warnings


  • Subject: Re: C++ warnings
  • From: Alexey Proskuryakov <email@hidden>
  • Date: Thu, 14 Apr 2005 10:40:14 +0400

On 14.04.2005 09:05, "Andrew White" <email@hidden> wrote:

> MSymbols:MSymbols (const Character & p1, int p2, bool p3)
> : chi (p1), k(p2), do_save (p3)
> {
> // body of initialiser
> }
>
> (Parameter names changed so I don't have to deal with parameter vs member
> scoping headaches)
>
> In this case, you are initialising chi before k.

  Actually, the contrary: nonstatic members are always initialized in the
order they are declared in the class definition, regardless of the order
they appear in the initializer list (12.6.2.5).

  So, k is initialized earlier than chi - and since this is so non-obvious,
gcc gives a warning.

On 14.04.2005 09:59, "Justin Walker" <email@hidden> wrote:

> Is there a site or a source for tips like this?  I have a few more
> warning messages weighing heavily on my conscience.

  The best I know is: <http://www.comeaucomputing.com/resources/>.

- WBR, Alexey Proskuryakov


 _______________________________________________
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

References: 
 >Re: C++ warnings (From: Andrew White <email@hidden>)

  • Prev by Date: Re: C++ warnings
  • Next by Date: Re: C++ warnings
  • Previous by thread: Re: C++ warnings
  • Next by thread: Where does "version" come from?
  • Index(es):
    • Date
    • Thread