bits/mathdef.h defines float_t to be the type the compiler uses for arithmetic on float values. If FLT_EVAL_METHOD is 0, then C99 (7.12#2) requires float_t to be float; FLT_EVAL_METHOD is 0 with GCC on all processors except x86 and m68k (so float_t being something else in glibc indicates a bug in either GCC or glibc, except on those processors). For some processors such as PowerPC, glibc has the following logic to determine float_t: # ifdef __GNUC__ # if __STDC__ == 1 /* In GNU or ANSI mode, gcc leaves `float' expressions as-is. */ typedef float float_t; /* `float' expressions are evaluated as `float'. */ typedef double double_t; /* `double' expressions are evaluated as `double'. */ # else /* For `gcc -traditional', `float' expressions are evaluated as `double'. */ typedef double float_t; /* `float' expressions are evaluated as `double'. */ typedef double double_t; /* `double' expressions are evaluated as `double'. */ # endif # else /* Wild guess at types for float_t and double_t. */ typedef double float_t; typedef double double_t; # endif This has several problems: * The __STDC__ == 1 conditional is interpreted by GCC's fixincludes as intended to mean strict conformance mode, and so is rewritten to check __STRICT_ANSI__, meaning that in default non-strict mode you actually get the incorrect double type. * glibc doesn't support pre-standard C at all. There's no point in having __STDC__ checks *anywhere* in glibc to allow for pre-standard C. GCC hasn't supported -traditional for some time either. Anyway, these are C99 definitions; hardly likely to be of use in a compatibility mode for ancient code. * The "Wild guess" default of double for float_t for other compilers is unlikely to be right; these processors support float arithmetic, so other compilers are more likely to use float arithmetic. Thus it's simpler, more accurate and avoids the header being changed by fixincludes just to use typedef float float_t; typedef double double_t; unconditionally for these targets. I'll attach a patch to do so.
Created attachment 1416 [details] Patch to simplify bits/mathdef.h files.
There is *NO* reason whatsoever to make the change. Changing just for the sake of it won't happen.