【发布时间】:2010-04-30 10:50:48
【问题描述】:
gcc 4.4.1 c89
我有以下代码:
static enum states
{
ACTIVE,
RUNNING,
STOPPED,
IDLE
};
我收到警告:
useless class storage specifier in empty declaration
但是,如果我删除 static 关键字,我不会收到该警告。
我正在使用以下标志进行编译:
-Wall -Wextra
非常感谢您的任何建议,
【问题讨论】:
-
在
}之后不应该有;(可能不相关,只是想我会提一下) -
可能错误是问题标题中的“无用”,而不是问题“正文”中的“除非”。
-
@Andreas - 已修复,就在我在问题中输入的位置。