URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.benjamin/] [15756-2.C] - Rev 384
Compare with Previous | Blame | View Log
// { dg-do assemble }
// { dg-options "-Wsign-promo" }
// 981203 bkoz
// g++/15756 test2
// this test may only be valid for 32bit targets at present
#include <limits.h>
enum e_i {
vali
}
enum_int;
enum e_ui {
#if INT_MAX == 32767
valui = 0xF234
#else
valui = 0xF2345678
#endif
}
enum_uint;
int i;
unsigned int ui;
struct caracas {
caracas(int);
caracas(unsigned int);
void foo();
};
int main ()
{
caracas obj_ei ( enum_int ); // { dg-warning "" }
caracas obj_eui ( enum_uint ); // { dg-warning "" }
caracas obj_i ( i );
caracas obj_ui ( ui );
obj_ei.foo();
obj_eui.foo();
obj_i.foo();
obj_ui.foo();
}