This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Is fastcall broken?
- From: Andrew Haley <aph-gcc at littlepinkcloud dot COM>
- To: Angus <angus at uducat dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Fri, 29 Jun 2007 09:40:11 +0100
- Subject: Re: Is fastcall broken?
- References: <11348451.post@talk.nabble.com>
Angus writes:
>
> I have gcc 4.0.2 and 4.1.2 and in the one particular case if I use the
> fastcall attribute valgrind reports a bunch of errors, and I get a
> segmentation fault, for which fastcall is key. But I believe it is more than
> just key, I believe the fastcall attribute to be the cause, since when I run
> valgrind on my app w/out fastcall, or in a 64-bit environment, valgrind
> doesn't report anything wrong.
> I'm using the fastcall attribute in 3 places. One is this stand-alone
> function, and the other two are pure virtual methods of a class. Oddly
> enough, the pure virtuals aren't giving me any trouble at all (since I'm
> very caseful to declare the overrides with like attributes). In all cases
> the full attributes declaration is: __attribute__((const, nothrow,
> fastcall)).
> Could I be using fastcall wrong, or is it just a dangerous attribute to
> work with?
I wouldn't say it was dangerous, exactly. I suspect there is a
problem soemewhere with your declarations, but until you give us a
test case we won't know.
Andrew.