summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/trunc-1.c
blob: a78cceb598a0895a0c827e2ed6d41f2f9dc0aaee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* Origin: PR c/675 from aj@suse.de.  */
/* { dg-do compile } */
/* { dg-options "-Wall" } */

#include <stddef.h>

int
main (void)
{
  size_t len;

  len = ~(sizeof (size_t) - 1); /* { dg-bogus "truncated" "bogus truncation warning" } */

  return len - len;
}