bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OS/2 Patches (4)


From: Bruno Haible
Subject: Re: OS/2 Patches (4)
Date: Thu, 7 Nov 2002 14:16:33 +0100 (CET)

Andreas Buening writes:
> > Most people agree that using the "common" variables feature of
> > Unix linkers is bad, because it's unportable. But this doesn't
> > make implicitly initialized (= BSS allocated) variables a bad
> > feature.
> 
> This I don't understand. If the initial value of that variable
> is indeterminate why should anybody use this feature?

The initial value of BSS allocated variable is zero.

> Is it just because it saves 4 bytes of data size?

No, it saves the CPU from loading 4 zero bytes from disk at program
startup. At run time BSS allocated and DATA allocated variables take
the same amount of memory.

> > Similarly: Division by zero is bad, but that doesn't make the
> > use of division bad by itself. You just have to be careful when you
> > use it.
> 
> This normally raises a SIGFPE

Nope, integer division by zero does not raise a SIGFPE on many
processors (x86 is a notable exception). And floating point division
by zero normally gives Inf, -Inf or NaN.

Bruno






reply via email to

[Prev in Thread] Current Thread [Next in Thread]