C99 supports mixed declarations and code but the following does not compile
(with --std=c99). It will compile if you uncomment the lone semicolon, a parser
bug, or perhaps I'm missing something?


#include <stdio.h>
main()
{
   int a = 0;
   switch (a) {

   case 0:
      //;
      int b = 0;
      printf("%d\n",b);
      break;

   }
}


-- 
           Summary: mixed declaration and code switch statement parsing
                    issue
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ecollins at vmware dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25779

Reply via email to