Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Each number sign (#) can be preceded in its line only by spaces or horizontal tabs #3155

Open
HeXiaoZhi opened this issue Mar 7, 2023 · 3 comments
Labels

Comments

@HeXiaoZhi
Copy link

glcts.exe --deqp-case=KHR-GL45.shaders.preprocessor.basic.stringification_vertex
glcts.exe --deqp-case=KHR-GL45.shaders.preprocessor.basic.stringification_fragment
Following case need report error.
#define VEC4_STRING_PARAM(a, b, c, d) vec4(#a, #b, c, d)

According spec:
Each number sign (#) can be preceded in its line only by spaces or horizontal tabs. It may also be
followed by spaces and horizontal tabs, preceding the directive.

@arcady-lunarg
Copy link
Contributor

This is something of a strange case, because glslang tends to report macro errors when the macro is expanded, rather than when it is defined. So attempting to actually use the macro VEC4_STRING_PARAM does result in the correct error message. Still, I can see the argument for having the error message come on macro definition in cases like this.

@HeXiaoZhi
Copy link
Author

Has this issue been fixed

@arcady-lunarg
Copy link
Contributor

Not yet, but we would be happy to accept patches for it. In this case, it would be a somewhat significant change to how the preprocessor reports errors in general.

jimihem added a commit to jimihem/glslang that referenced this issue Nov 14, 2023
…rizontal tabs KhronosGroup#3155

glcts.exe --deqp-case=KHR-GL45.shaders.preprocessor.basic.stringification_vertex
glcts.exe --deqp-case=KHR-GL45.shaders.preprocessor.basic.stringification_fragment
Following case need report error.

According spec:
Each number sign (#) can be preceded in its line only by spaces or horizontal tabs. It may also be
followed by spaces and horizontal tabs, preceding the directive.
jimihem added a commit to jimihem/glslang that referenced this issue Nov 14, 2023
…rizontal tabs KhronosGroup#3155

glcts.exe --deqp-case=KHR-GL45.shaders.preprocessor.basic.stringification_vertex
glcts.exe --deqp-case=KHR-GL45.shaders.preprocessor.basic.stringification_fragment
Following case need report error.

According spec:
Each number sign (#) can be preceded in its line only by spaces or horizontal tabs. It may also be
followed by spaces and horizontal tabs, preceding the directive.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants