Loop optimization

div0 div0 at users.sourceforge.net
Sun May 16 07:07:33 PDT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jérôme M. Berger wrote:
> div0 wrote:
>> Jérôme M. Berger wrote:
>>> 	That depends. In C/C++, the default value for any global variable
>>> is to have all bits set to 0 whatever that means for the actual data
>>> type. 
>> No it's not, it's always uninitialized.
>>
> 	According to the C89 standard and onwards it *must* be initialized
> to 0. If it isn't then your implementation isn't standard compliant
> (needless to say, gcc, Visual, llvm, icc and dmc are all standard
> compliant, so you won't have any difficulty checking).

Ah, I only do C++, where the standard is to not initialise.
I didn't know the two specs had diverged like that.

- --
My enormous talent is exceeded only by my outrageous laziness.
http://www.ssTk.co.uk
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFL7/wlT9LetA9XoXwRAtiuAKCsbvt0KXymdZV4SBNG2lMRB9MM6QCgo9pm
qGbY++2jGP9W/lELsnq47Zs=
=8KpC
-----END PGP SIGNATURE-----


More information about the Digitalmars-d-learn mailing list