1 /* { dg-do compile } */
2 /* { dg-options "-Wlogical-op -Wtype-limits" } */
5 emacs_lseek (long long offset
)
7 return -1-9223372036854775807LL <= offset
&& offset
<= 9223372036854775807LL;
11 foo (long long offset
)
13 return -1-9223372036854775807LL > offset
&& offset
> 9223372036854775807LL;
17 foo3 (long long offset
)
19 return -1-9223372036854775807LL > offset
&& offset
< 9223372036854775807LL;
23 foo2 (long long offset
)
25 if (-1-9223372036854775807LL <= offset
) return 0;
26 if (offset
<= 9223372036854775807LL) return 0;
27 if (-1-9223372036854775807LL > offset
) return 0;
28 if (offset
> 9223372036854775807LL) return 0;
35 long long get_intmax(void);
37 extern void do_something(void);
41 long long x
= get_intmax();
42 i
= (i
> BOT
&& i
< TOP
); //OK
43 i
= (i
>= BOT
+1 && i
<= TOP
-1); //OK
44 i
= (i
>= BOT
&& i
<= TOP
); //Oops!