I'm using coroutines in C using several macros to simplify writing code. As it is known, these macros encapsulate the code inside a big switch
statement, and use case __LINE__
to know where to return. The problem is that using a switch inside a coroutine will make it fail, because the case __LINE__
will belong to the inner switch
, and not the outer one.
Is it possible, by passing a parameter to GCC, to "disable" nested switch support, thus ensuring that putting a switch inside another switch will return an error or, at least, a warning?