Home | History | Annotate | Line # | Download | only in lint1
op_shl_lp64.c revision 1.3
      1 /*	$NetBSD: op_shl_lp64.c,v 1.3 2021/08/21 11:50:57 rillig Exp $	*/
      2 # 3 "op_shl_lp64.c"
      3 
      4 /*
      5  * Before decl.c 1.215 from 2021-07-31, lint wrongly treated __uint128_t and
      6  * __int128_t as being equivalent to a missing type specifier, thereby
      7  * defaulting to int.  This led to warnings like:
      8  *
      9  *	shift amount 105 is greater than bit-size 32 of 'int' [122]
     10  *
     11  * These warnings had been discovered in ecp_nistp256.c(296).
     12  */
     13 
     14 /* lint1-only-if: lp64 */
     15 
     16 const __uint128_t zero105 =
     17     (((__uint128_t)1) << 105)
     18     - (((__uint128_t)1) << 41)
     19     - (((__uint128_t)1) << 9);
     20 
     21 const __uint128_t shl_128_129 =
     22     /* expect+1: warning: shift equal to size of object [267] */
     23     (((__uint128_t)1) << 128)
     24     /* expect+1: warning: shift amount 129 is greater than bit-size 128 of '__uint128_t' [122] */
     25     - (((__uint128_t)1) << 129);
     26