URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
/* Source: PR 137.
|
/* Source: PR 137.
|
|
|
We would not warn about passing an enum, but would warn about
|
We would not warn about passing an enum, but would warn about
|
passing a enum that was part of an array. TYPE_MAIN_VARIANT was
|
passing a enum that was part of an array. TYPE_MAIN_VARIANT was
|
not used in the appropriate place in the warning code. */
|
not used in the appropriate place in the warning code. */
|
|
|
/* { dg-do compile } */
|
/* { dg-do compile } */
|
/* { dg-options -Wconversion } */
|
/* { dg-options -Wconversion } */
|
|
|
typedef enum { a } __attribute__((packed)) t;
|
typedef enum { a } __attribute__((packed)) t;
|
void f(t x) {}
|
void f(t x) {}
|
|
|
int main(void)
|
int main(void)
|
{
|
{
|
t x[2], y;
|
t x[2], y;
|
f(x[0]); /* { dg-bogus "different width" } */
|
f(x[0]); /* { dg-bogus "different width" } */
|
f(y); /* { dg-bogus "different width" } */
|
f(y); /* { dg-bogus "different width" } */
|
return 0;
|
return 0;
|
}
|
}
|
|
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.