There are other variants for this test for other GL version.
However, this seems to be disallowed according to all GLSL specs. For instance, according to page 7 of GLSL3.3 :
There are no other number
sign based operators (e.g., no # or #@), nor is there a sizeof operator
This issue becomes apparent when this glslang commit starts to enforce the spec.
I notice there are tests in CTS that specifically test the stringification in GLSL language. For example:
There are other variants for this test for other GL version.
However, this seems to be disallowed according to all GLSL specs. For instance, according to page 7 of GLSL3.3 : There are no other number sign based operators (e.g., no # or #@), nor is there a sizeof operator
This issue becomes apparent when this glslang commit starts to enforce the spec.