OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [expr/] [cast3.C] - Blame information for rev 821

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
 
3
enum MyState
4
{
5
        QUIT = 0,
6
        START,
7
        STOP,
8
        PAUSE
9
};
10
 
11
double GetDouble()
12
{
13
        return 1.0;
14
}
15
 
16
int main()
17
{
18
        MyState the_state;
19
 
20
        the_state = (MyState)GetDouble(); // { dg-bogus "invalid cast" }
21
        return 0;
22
}

powered by: WebSVN 2.1.0

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