代码搜索:enum
找到约 10,000 项符合「enum」的源代码
代码结果 10,000
www.eeworm.com/read/470693/1459729
c enum3.c
// Build don't link:
// Special g++ 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/470693/1459794
c enum6.c
// Special g++ 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_MAX };
enum E
www.eeworm.com/read/470693/1459811
c enum8.c
// 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:
return 0;
defaul
www.eeworm.com/read/470693/1459812
c enum4.c
// Build don't link:
// Special g++ Options: -Wall
enum tristate { no = -1, maybe, yes };
tristate
definite_tristate (int truth)
{
return (truth) ? yes : no;
}
www.eeworm.com/read/470693/1459845
c enum7.c
// Yet Another testcase for signed/unsigned enums.
// Build don't link:
enum A { AA = 0, AB = 1};
enum B { BA = -1, BB = 1};
void set(int a);
void set(long a);
void
foo()
{
set(AA); // gets bogus
www.eeworm.com/read/470693/1460000
c enum5.c
enum { a = 1 };
int main(void)
{
int l = -1;
return ! (l < a); // testcase fails if a is unsigned
}
www.eeworm.com/read/470693/1462378
c enum-2.c
/* Copyright (C) 2000 Free Software Foundation */
/* by Alexandre Oliva */
enum foo { FOO, BAR };
/* Even though the underlying type of an enum is unspecified, the type
of en
www.eeworm.com/read/470693/1463808
c enum1.c
/* { dg-do run } */
/* { dg-options "-std=gnu89" } */
/* In standard C, enumeration constants always have type int. If they
are not representables are int, they're ill-formed. In GNU C, we
gi
www.eeworm.com/read/470693/1463950
c wswitch-enum.c
/* PR c/5044 */
/* { dg-do compile } */
/* { dg-options "-Wswitch-enum" } */
enum e { e1, e2 };
int
foo (int i, int j, enum e ei, enum e ej, enum e ek, enum e el,
enum e em, enum e en, enum e e