This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/23895] New: switch and struct
- From: "eroenj at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Sep 2005 13:57:07 -0000
- Subject: [Bug c/23895] New: switch and struct
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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