Hi,

On Tue, 8 Nov 2016, Steffen Nurpmeso wrote:

> a tcc(1) compiled on June 6th as well as one of [mob:3054a76] (as
> well as one of [master], accidentally) fails to fail on the
> attached file.

The file being:

enum{ a_0, a_1, a255 };
int
main(int argc, char **argv){
        switch(argc){
        a_0: return 0;
        a_1: return 1;
        a_255: return 255;
        }
}

Why should it fail?  This is valid (albeit silly) code with three dead 
labelled statements.  switch cases are nothing else than normal labeled 
statements (with a special label, though), and nothing says that a switch 
must have any cases.  Also the namespaces for labels and decls are 
separate, so it's also valid to have enums and labels of the same name.


Ciao,
Michael.

_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to