summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/Wint-to-pointer-cast-2.c
blob: 5546abb8186085129f9068eeca98b4351f46d323 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* Test -Wint-to-pointer-cast.  */
/* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-do compile } */
/* { dg-options "-Wint-to-pointer-cast" } */

char c;

void *
f (void)
{
  return (void *) c; /* { dg-warning "cast to pointer from integer of different size" } */
}