view gcc/testsuite/c-c++-common/Wint-to-pointer-cast-2.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 1830386684a0
line wrap: on
line source

/* 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" } */
}