[LCP]gcc: case label does not reduce to an integer constant
Joachim Bauernberger
bj at gmx.net
Fri Mar 22 09:01:05 UTC 2002
Can sombody kindly tell me why the above error happens when compiling
with gcc?
The code looks as follows:
typedef struct ctype_t
{
short type;
.......
} ctype_t;
extern const short CT_TEXT;
.....
int foo(ctype_t *ct)
{
switch (ct->type) {
case CT_TEXT:
break;
.........
}
Many thanks,
Joachim
--
Disclaimer:
By sending an email to ANY of my addresses you are agreeing that:
1) I am by definition, "the intended recipient"
2) All information in the email is mine to do with as I see fit and
make such financial profit, political mileage, or good joke as it lends
itself to. In particular, I may quote it on usenet.
3) I may take the contents as representing the views of your company.
4) This overrides any disclaimer or statement of confidentiality that
may be included on your message.
More information about the linuxCprogramming
mailing list