gcc compiles assert() to code that requires linking with gcc

Martin Buchholz martin@xemacs.org
Mon Jun 26 18:02:00 GMT 2000


>>>>> "MvL" == Martin v Loewis <martin@loewis.home.cs.tu-berlin.de> writes:

MvL> long long was taken just as an example. For another example,
MvL> multiplication of integer values always leads to a libgcc call on
MvL> SPARC v7 (as this chip has no hardware multiply). Are you saying
MvL> portable code should not multiply integers?

I thought that in practice, the vast majority of machines running
Solaris on Sparc today have integer multiply.

However, the gcc multiply support on Solaris should be implemented in
such a way that it is binary compatible with the functions in libc.
That is, if libc.a has a magic symbol

.div_integer

then gcc should implement its integer multiply using a .div_integer
with an identical (binary) interface.  A modest amount of reverse
engineering might be necessary.

But assert() is more important, because it affects *every* Sparc
Solaris machine, while integer multiply affects only (I'm speculating)
< 10% of Sparc Solaris machines, and `long long' only affects
libraries using non-portable features.

Martin


More information about the Gcc-bugs mailing list