URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 154 |
Rev 816 |
/* Test warnings when casting from a constant integer to pointer.
|
/* Test warnings when casting from a constant integer to pointer.
|
Test with -pedantic-errors. */
|
Test with -pedantic-errors. */
|
/* Origin: Carlos O'Donell <carlos@codesourcery.com> */
|
/* Origin: Carlos O'Donell <carlos@codesourcery.com> */
|
/* { dg-do compile } */
|
/* { dg-do compile } */
|
/* { dg-options "-std=gnu99 -pedantic-errors" } */
|
/* { dg-options "-std=gnu99 -pedantic-errors" } */
|
|
|
extern int i;
|
extern int i;
|
char c;
|
char c;
|
void
|
void
|
f (void)
|
f (void)
|
{
|
{
|
c = (char)&i; /* { dg-warning "warning: cast from pointer to integer of different size" } */
|
c = (char)&i; /* { dg-warning "warning: cast from pointer to integer of different size" } */
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.