diff options
author | Mike Stump <mrs@apple.com> | 2005-04-27 13:23:52 +0000 |
---|---|---|
committer | no-author <no-author@gcc.gnu.org> | 2005-04-27 13:23:52 +0000 |
commit | a460bbfe8dc883d77f9b8c20cab31bf11ec38caf (patch) | |
tree | 4d721e9d2e4794f61c47b6aa906c464580c7b312 /gcc/testsuite/gcc.dg/Wpointer-to-int-cast-1.c | |
parent | 683f7943ebbc2657dec2d5fd3a6440e495697eeb (diff) |
This commit was manufactured by cvs2svn to create branch
'tree-profiling-branch'.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/tree-profiling-branch@98826 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/Wpointer-to-int-cast-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/Wpointer-to-int-cast-1.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/Wpointer-to-int-cast-1.c b/gcc/testsuite/gcc.dg/Wpointer-to-int-cast-1.c new file mode 100644 index 00000000000..d9362a2d119 --- /dev/null +++ b/gcc/testsuite/gcc.dg/Wpointer-to-int-cast-1.c @@ -0,0 +1,12 @@ +/* Test -Wpointer-to-int-cast - on by default. */ +/* Origin: Joseph Myers <joseph@codesourcery.com> */ +/* { dg-do compile } */ +/* { dg-options "" } */ + +void *p; + +char +f (void) +{ + return (char) p; /* { dg-warning "warning: cast from pointer to integer of different size" } */ +} |