OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [Wconversion.c] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* Source: PR 137.
2
 
3
   We would not warn about passing an enum, but would warn about
4
   passing a enum that was part of an array.  TYPE_MAIN_VARIANT was
5
   not used in the appropriate place in the warning code.  */
6
 
7
/* { dg-do compile } */
8
/* { dg-options -Wconversion } */
9
 
10
typedef enum { a } __attribute__((packed)) t;
11
void f(t x) {}
12
 
13
int main(void)
14
{
15
  t x[2], y;
16
  f(x[0]);                       /* { dg-bogus "different width" } */
17
  f(y);                         /* { dg-bogus "different width" } */
18
  return 0;
19
}
20
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.