• 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: dereferencing type-punned pointer will break strict-aliasing rules
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dereferencing type-punned pointer will break strict-aliasing rules


  • Subject: Re: dereferencing type-punned pointer will break strict-aliasing rules
  • From: Eric Albert <email@hidden>
  • Date: Wed, 17 May 2006 09:33:51 -0700

On May 17, 2006, at 7:40 AM, Ulf Dunkel wrote:

I create UB "deployment" builds of a project and get masses of warnings "dereferencing type-punned pointer will break strict- aliasing rules" then.

When I build "development native" on a PowerPC Mac, no such warning is shown.

Googling around I found that GCC sets a flag -fstrict-aliasing when -O2 is set. This seems to lead to these warnings when building for Intel Macs.

How do I tell GCC in XCode that it should use -fno-strict-aliasing?

Actually, -fstrict-aliasing is turned off by default in Apple's gcc. The documentation is wrong. But it sounds like it's being turned on in your case. Show us the detailed build log of the compiler invocation for one of the source files which produces these warnings and we should be able to figure out what's going on.


-Eric

_______________________________________________
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: dereferencing type-punned pointer will break strict-aliasing rules
      • From: Michael Monscheuer <email@hidden>
References: 
 >dereferencing type-punned pointer will break strict-aliasing rules (From: Ulf Dunkel <email@hidden>)

  • Prev by Date: -exported_symbols_list ist ignored when building library
  • Next by Date: Re: How to run an application bundle that dynamically loads a dylib
  • Previous by thread: dereferencing type-punned pointer will break strict-aliasing rules
  • Next by thread: Re: dereferencing type-punned pointer will break strict-aliasing rules
  • Index(es):
    • Date
    • Thread