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

Reply via email to