You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Defines are very problematic, because they don't create lexical scopes like normal blocks do and can begin in different block to where they end. So to handle them correctly, we would probably have to create alternate versions of the parse tree for each #ifdef block and parse them as separate alternate universes files. I don't have enough time to investigate other ways to do it or to implement this bruteforce one, so it is unlikely that this issue will ever be fixed (and many many other corner cases which exist because of preprocessor).
That said, in this exact case, the unreachable code inspection is actually semi-right, it will be unreachable if the TEXTURE is false :)
I'm not sure how the compiler will treat that but if that end up in a dynamic branching it's not good.
Anyway, no big deal, I just thought I'd mention it. I understand the issue is not simple to tackle.
Also it's a pretty rare corner case, so it's not really a bother.
Hello, I've just noticed an issue with this code :
The last line
gl_FragColor = vec4(1.0);
is marked as unreachable code.The text was updated successfully, but these errors were encountered: