This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: bus error in sparc ultra 10 solaris 8 g++ 2.95 3.0
- From: "John Love-Jensen" <eljay at adobe dot com>
- To: "agustin" <asanchez at datatec-ec dot com>, <help-gcc at gnu dot org>
- Date: Tue, 20 Nov 2001 09:33:00 -0600
- Subject: Re: bus error in sparc ultra 10 solaris 8 g++ 2.95 3.0
- References: <01C171A7.0A9CA640@AGUSTIN>
You are trying to perform an illegal operation on the Sun architecture.
A char* is not a long*.
The Sun architecture requires that long data is aligned. You are attempting
an unaligned access, which will cause a BUS signal.
Don't cast. Casts are indicative that you may be doing something wrong. In
this instance, you are.
--Eljay