代码搜索:enum
找到约 10,000 项符合「enum」的源代码
代码结果 10,000
www.eeworm.com/read/233448/4675070
c enum10.c
// { dg-do assemble }
// GROUPS passed enums
class Type
{
public:
enum name
{
A
};
};
class A
{
};
class B: public A
{
public:
B();
};
www.eeworm.com/read/233448/4675079
c enum11.c
// { dg-do assemble }
// GROUPS passed enums
class X
{
enum
{
oneMask = 0x0000FFFF,
twoMask = 0x000F0000,
thiMask = 0xFFF00000, // { dg-error "comma at end" }
};
www.eeworm.com/read/233448/4675112
c enum5.c
// { dg-do assemble }
// { dg-options "-pedantic-errors" }
// GROUPS passed enums
enum Thing { FIRST, SECOND } ;
int main()
{
Thing x = FIRST ;
x = 27 ; // this line should be a typ
www.eeworm.com/read/233448/4675143
c enum1.c
// { dg-do assemble }
// GROUPS passed enums
class foo {
public:
enum bar { baz = 1, bat = 7 };
};
class derv : public foo { };
int main()
{
foo::bar x = foo::baz;
derv::bar y = derv::bat;
}
www.eeworm.com/read/233448/4675540
c enum1.c
// { dg-do assemble }
// Warn if a enum cannot fit into a small bit-field.
enum TypeKind { ATK, BTK, CTK, DTK } ;
struct Type {
enum TypeKind kind : 1; // { dg-warning "" }
void setBTK();
};
www.eeworm.com/read/233448/4675765
c enum2.c
// { dg-do assemble }
enum tristate { no = -1, maybe, yes };
void foobar ()
{
tristate var = no; // { dg-bogus "" }
}
www.eeworm.com/read/233448/4675785
c enum3.c
// { dg-do assemble }
// { dg-options "-Wall" }
enum tristate { no = -1, maybe, yes };
tristate
tristate_satisfies (register tristate const t1, register tristate const t2)
{
switch (t1)
{
www.eeworm.com/read/233448/4675850
c enum6.c
// { dg-do run }
// { dg-options "-fshort-enums" }
#include
enum A { a1 = 0x7fffffff };
enum B { b1 = 0x80000000 };
enum C { c1 = -1, c2 = 0x80000000 };
enum D { d1 = CHAR_MIN, d2 = CHAR
www.eeworm.com/read/233448/4675867
c enum8.c
// { dg-do run }
// Bug: the switch fails on the Alpha because folding ef - 1 fails.
enum foo { one=1, thirty=30 };
int f (enum foo ef)
{
switch (ef)
{
case one:
case thirty:
re
www.eeworm.com/read/233448/4675868
c enum4.c
// { dg-do assemble }
// { dg-options "-Wall" }
enum tristate { no = -1, maybe, yes };
tristate
definite_tristate (int truth)
{
return (truth) ? yes : no;
}