On Thu, 5 Apr 2001, Frank Heckenbach wrote:
Russ Whitaker wrote:
Hi
try this: sizes.c
#include <stdio.h> main() { printf("\ttype sizes:\n"); printf("char\tint\tlong\tfloat\tdouble\tlong double\n"); printf("%3d\t%3d\t%3d\t%3d\t%3d\t%3d\n", sizeof( char ), sizeof( int ), sizeof( long ), sizeof( float ), sizeof( double ), sizeof( long double ) ); }
results here:
type sizes: char int long float double long double 1 4 4 4 8 12
Yes, that's what I've expected on IA32.
I'm not sure what we're aguing about, or if we are arguing about anything. I think we agree on that. ;-)
That's the default settings for gcc and glibc.
In the source for glibc there's a line which sets length double to 12 with a comment that it can be changed to 16.
In "Usuing and Porting GNU CC" page 290: The RTL has a "TFmode" (Tetra Floating, 16 bytes) page 412: Target Description Macros has a "LONG_DOUBLE_TYPE_SIZE" (size in bits)
And the gcc source has a "float-i128.h"
With this in mind downloaded the latest glibc ( 2.2.2 ). Noted that they reccommend gcc-2.95.2.1 which is 2.95.2 with a patch. Didn't have a copy of the patch so tried 2.95.3
Without changing the length of the long double it compiled ok. Unlike gpc the testing is done before installation and also unlike gpc it quit before all the tests were done.
If I can get glibc to compile, test and install correctly will try changing long double to 16 bytes and see what happens. Will post the results.
It seems the more I know, the less I know ;-) Russ