This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/7508] GCC refuses to compile a declartion right after a 'case' in switch


------- Additional Comments From price at ifa dot hawaii dot edu  2005-09-15 18:44 -------
To get it to compile, use curly brackets after the "case":

  case 1:
    {
        int y = 7;
    }


I would suggest that the existence of several duplicates argue for a clearer
error message.

-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]