[Bug c/23895] New: switch and struct
eroenj at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Sep 15 13:57:00 GMT 2005
Who has the answer to the following issue:
case OPT_USER:
struct passwd *userInfo = (struct passwd *) malloc(sizeof(struct passwd));
Produces the following error:
find.c:390: error: parse error before "struct"
But when I insert another statement:
case OPT_USER:
printf("");
struct passwd *userInfo = (struct passwd *) malloc(sizeof(struct passwd));
It compiles happily ever after!
Who knows what to do?
--
Summary: switch and struct
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: critical
Priority: P1
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: eroenj at gmail dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23895
More information about the Gcc-bugs
mailing list