Home | History | Annotate | Line # | Download | only in lint1
      1  1.6  rillig /*	$NetBSD: platform_ldbl64.c,v 1.6 2025/04/10 20:37:48 rillig Exp $	*/
      2  1.1  rillig # 3 "platform_ldbl64.c"
      3  1.1  rillig 
      4  1.1  rillig /*
      5  1.1  rillig  * Test features that only apply to platforms that have 64-bit long double.
      6  1.1  rillig  */
      7  1.1  rillig 
      8  1.4  rillig /* lint1-extra-flags: -c -h -a -p -b -r -z -X 351 */
      9  1.5  rillig /* lint1-only-if: ldbl64 */
     10  1.1  rillig 
     11  1.3  rillig typedef int bits_per_byte[((unsigned char)-1) == 255 ? 1 : -1];
     12  1.3  rillig typedef int bytes_per_long_double[sizeof(long double) == 8 ? 1 : -1];
     13  1.4  rillig 
     14  1.4  rillig /* expect+1: warning: floating-point constant out of range [248] */
     15  1.4  rillig double larger_than_ldbl = 1e310;
     16  1.4  rillig /*
     17  1.4  rillig  * Since 'long double' has the same size as 'double', there is no floating
     18  1.4  rillig  * point constant that fits in 'long double' but not in 'double'.
     19  1.4  rillig  */
     20  1.4  rillig /* expect+1: warning: floating-point constant out of range [248] */
     21  1.4  rillig long double larger_than_ldbl_l = 1e310L;
     22