Re: Bus error with gcc on simple function?
Re: Bus error with gcc on simple function?
- Subject: Re: Bus error with gcc on simple function?
- From: Bill Northcott <email@hidden>
- Date: Wed, 11 Apr 2007 12:36:45 +1000
On 10/04/2007, at 5:08 AM, Ben Weiss wrote:
there?) The crash occurs here regardless of target platform, so the
bug must be in the preprocessor somewhere. Anyway, is this the
preferred syntax for initializing an array of vectors, or is there a
better way?
The code below compiles for me
static void foo() {
#if __VEC__
typedef vector float vfloat;
#elif __SSE__
typedef vFloat vfloat;
#endif
vfloat mult_[4] = { { 1.0f, 1.0f, 1.0f, 1.0f },
{ 2.0f, 2.0f, 2.0f, 2.0f },
{ 3.0f, 3.0f, 3.0f, 3.0f },
{ 4.0f, 4.0f, 4.0f, 4.0f } };
}
[PM-G5BN:Public/Darwin/sse_crasher] billn% gcc -faltivec crasher.c
/usr/bin/ld: Undefined symbols:
_main
collect2: ld returned 1 exit status
[PM-G5BN:Public/Darwin/sse_crasher] billn% gcc -v
Using built-in specs.
Target: powerpc-apple-darwin8
Configured with: /private/var/tmp/gcc/gcc-5367.obj~1/src/configure --
disable-checking -enable-werror --prefix=/usr --mandir=/share/man --
enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg]
[^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-
slibdir=/usr/lib --build=powerpc-apple-darwin8 --host=powerpc-apple-
darwin8 --target=powerpc-apple-darwin8
Thread model: posix
gcc version 4.0.1 (Apple Computer, Inc. build 5367)
[PM-G5BN:Public/Darwin/sse_crasher] billn%
2GHz Dual G5, 3GB, 10.4.9 and Xcode 2.4.1
What is your compile command?
Bill Northcott
_______________________________________________
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