[PATCH] fix KJS crash on some more strict platforms

André Wöbbeking Woebbeking at onlinehome.de
Tue Dec 16 22:40:13 GMT 2003


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

On Tuesday 16 December 2003 22:08, Helge Deller wrote:
> Some platforms are pretty strict about the alignment for some types
> of variables.
>
> Code like this (taken from kdelibs/kjs/internal.cpp):
> const unsigned char NaN_Bytes[] = { 0x7f, 0xf8, 0, 0, 0, 0, 0, 0 };
> ....
> double x = * (double*) NaN_Bytes;

what about std::numeric_limits<double>::quiet_NaN() and signaling_NaN()? 
Let me guess, it's not portable enough :-(


André
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/34nRGcp/AjG8ndYRAqmWAJ4tXNMHHtpe6e+E0+4aNRnIZaqYAACeL7Zu
CcmDUBzXP6OW7xbbGyhrs8M=
=PsuS
-----END PGP SIGNATURE-----




More information about the kde-core-devel mailing list