Home | History | Annotate | Line # | Download | only in lint1
      1  1.12  rillig /*	$NetBSD: msg_142.c,v 1.12 2024/06/08 06:42:59 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.5  rillig  * For 96-bit and 128-bit floating point numbers, a different number of
     10   1.5  rillig  * multipliers is needed to produce an overflow.
     11   1.5  rillig  */
     12   1.5  rillig 
     13  1.11  rillig /* expect+2: warning: operator '*' produces floating point overflow [142] */
     14  1.11  rillig /* expect+1: warning: operator '*' produces floating point overflow [142] */
     15   1.5  rillig double dbl = 1e100 * 1e100 * 1e100 * 1e100 * 1e100;
     16   1.9  rillig 
     17  1.10  rillig /*
     18  1.10  rillig  * Ensure that an addition in the complex number space doesn't generate
     19  1.10  rillig  * wrong warnings. Lint doesn't model complex constants accurately.
     20  1.10  rillig  */
     21   1.9  rillig double _Complex complex_sum = 1e308 + 1e308i;
     22