|
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
| The following quaternion code that used to compile perfectly now crashes: - (id)initAsProductOf:(Quaternion*)q1 mult:(Quaternion*)q2 {// It breaks here with error: "Internal compiler error: Segmentation fault" if (self = [super init]) { double* q1El = q1.elements; double* q2El = q2.elements; elements[3] = q1El[3]*q2El[3] - q1El[0]*q2El[0] - q1El[1]*q2El[1] - q1El[2]*q2El[2]; elements[0] = q1El[3]*q2El[0] + q1El[0]*q2El[3] + q1El[1]*q2El[2] - q1El[2]*q2El[1]; elements[1] = q1El[3]*q2El[1] + q1El[1]*q2El[3] + q1El[2]*q2El[0] - q1El[0]*q2El[2]; elements[2] = q1El[3]*q2El[2] + q1El[2]*q2El[3] + q1El[0]*q2El[1] - q1El[1]*q2El[0]; } return self; } Can anyone spot an obvious mistake made by me, and if not, has anyone else run into these problems? It breaks with the system default compiler, GCC 4.2. However, it works perfectly with LLVM-GCC 4.2. - Fisk |
_______________________________________________ Do not post admin requests to the list. They will be ignored. Objc-language mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
| Home | Archives | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2011 Apple Inc. All rights reserved.