back to posts

go go gadget broken gcc!

It turns out that my copy of avr-gcc fails with this code:

switch (rx_byte) {
     case 'U':
         int i;
         break;
}

Apparently, gcc has a bug that stops you putting a declaration directly after a label. Simple workaround:

switch (rx_byte) {     
    case 'U': ;         
        int i;         
        break;
}

Ugh, I want my hour back.

2009-03-28 14:05:59
CC 2.5 License Support ScienceCommons!
open