CoreAudio SDK and strict aliasing
CoreAudio SDK and strict aliasing
- Subject: CoreAudio SDK and strict aliasing
- From: "Frederik Slijkerman" <email@hidden>
- Date: Wed, 15 Feb 2006 13:36:21 +0100
Hi,
I've run into a bug in the CoreAudio 1.4.3 SDK, in AUScopeElement.cpp:
const UInt8 * AUElement::RestoreState(const UInt8 *state)
{
...
entry.value = *(Float32 *)&temp;
...
}
This breaks the strict-aliasing rules in GCC 4 and therefore the float value
is not restored correctly. I think it should be fixed by using a union.
Questions:
1. Should the CoreAudio SDK be compiled with -fno-strict-aliasing?
2. How to specify -fno-strict-aliasing? I've tried inserting it manually, or
unchecking the Strict Aliasing checkbox, but it doesn't seem to have any
effect. Strict aliasing is probably enabled automatically by -fast, but how
can I get the other -fast effects without strict aliasing?
Frankly, I could do without strict aliasing as it seems to give nothing but
headaches, and it doesn't seem to help much with optimization anyway. So I'm
very willing to disable it -- if I knew how.
Thanks!
Frederik Slijkerman
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden