the case of the missing label in the switch/case


I maybe very well not understanding something but it looks like a label
targetted by a goto, in a switch statement, gets missing: if I iterate
through the ast and emit all the stmt/expr/decls, then no label-type is

#include <stdio.h>

void myfunc(int a)
        switch(a) {
                case 1:
                        goto my_label;

                case 2:

                case 3:
my_label: // this label does not appear in the ast
                        printf("Hello, world!\n");

any ideas?

Folkert van Heusden

The problem is that you were using CaseStmt::getRHS instead of
No idea what getRHS is supposed to return then.