Home | History | Annotate | Line # | Download | only in lint1
      1 /*	$NetBSD: msg_142.c,v 1.12 2024/06/08 06:42:59 rillig Exp $	*/
      2 # 3 "msg_142.c"
      3 
      4 // Test for message: operator '%s' produces floating point overflow [142]
      5 
      6 /* lint1-extra-flags: -X 351 */
      7 
      8 /*
      9  * For 96-bit and 128-bit floating point numbers, a different number of
     10  * multipliers is needed to produce an overflow.
     11  */
     12 
     13 /* expect+2: warning: operator '*' produces floating point overflow [142] */
     14 /* expect+1: warning: operator '*' produces floating point overflow [142] */
     15 double dbl = 1e100 * 1e100 * 1e100 * 1e100 * 1e100;
     16 
     17 /*
     18  * Ensure that an addition in the complex number space doesn't generate
     19  * wrong warnings. Lint doesn't model complex constants accurately.
     20  */
     21 double _Complex complex_sum = 1e308 + 1e308i;
     22