• 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: Gcc warning instead of error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Gcc warning instead of error


  • Subject: Re: Gcc warning instead of error
  • From: "Chris Jefferson" <email@hidden>
  • Date: Wed, 23 Jul 2008 13:25:18 +0100

2008/7/23 Steve Checkoway <email@hidden>:
>
> On Jul 23, 2008, at 4:42 AM, Chris Jefferson wrote:
>
>> 2008/7/22 Steve Checkoway <email@hidden>:
>>>
>>> with the warning, "warning: cannot pass objects of non-POD type 'struct
>>> foo'
>>> through '...'; call will abort at runtime."
>>
>> Unfortunately this behaviour is mandated by the C++ standard, so it is
>> very unlikely apple or gcc would change it.
>
>
> What? The standard is very clear about this. The behavior is undefined. It's
> in section 5.2.2.7 [expr.call]. Gcc can do anything it likes  and what it
> likes to do is give a warning. It should give an error.

My reading of the last line of 1.3.13 is that if the compiler cannot
provide that undefined behaviour will occur (i.e., it cannot prove the
line of code with the non-POD call happens), then it is only allowed
to print a warning, not fail to compile. The text is however, like
most standard text, difficult to read!

Chris
 _______________________________________________
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: Gcc warning instead of error
      • From: Steve Checkoway <email@hidden>
References: 
 >Gcc warning instead of error (From: Steve Checkoway <email@hidden>)
 >Re: Gcc warning instead of error (From: "Chris Jefferson" <email@hidden>)
 >Re: Gcc warning instead of error (From: Steve Checkoway <email@hidden>)

  • Prev by Date: Another useless warning - 'Hidden Local Variables'
  • Next by Date: Re: Xcode 3.1 and boost
  • Previous by thread: Re: Gcc warning instead of error
  • Next by thread: Re: Gcc warning instead of error
  • Index(es):
    • Date
    • Thread