1 1.11 rillig /* $NetBSD: msg_142.c,v 1.11 2023/07/09 11:01:27 rillig Exp $ */ 2 1.1 rillig # 3 "msg_142.c" 3 1.1 rillig 4 1.11 rillig // Test for message: operator '%s' produces floating point overflow [142] 5 1.1 rillig 6 1.8 rillig /* lint1-extra-flags: -X 351 */ 7 1.8 rillig 8 1.5 rillig /* 9 1.9 rillig * VAX has floating point formats with different limits than the other 10 1.9 rillig * platforms, which all implement IEEE 754. 11 1.9 rillig */ 12 1.9 rillig /* xlint1-skip-if: vax */ 13 1.9 rillig 14 1.9 rillig /* 15 1.5 rillig * For 96-bit and 128-bit floating point numbers, a different number of 16 1.5 rillig * multipliers is needed to produce an overflow. 17 1.5 rillig */ 18 1.5 rillig 19 1.11 rillig /* expect+2: warning: operator '*' produces floating point overflow [142] */ 20 1.11 rillig /* expect+1: warning: operator '*' produces floating point overflow [142] */ 21 1.5 rillig double dbl = 1e100 * 1e100 * 1e100 * 1e100 * 1e100; 22 1.9 rillig 23 1.10 rillig /* 24 1.10 rillig * Ensure that an addition in the complex number space doesn't generate 25 1.10 rillig * wrong warnings. Lint doesn't model complex constants accurately. 26 1.10 rillig */ 27 1.9 rillig double _Complex complex_sum = 1e308 + 1e308i; 28