Summary: | define (or undef) defined behaves stupidly | ||
---|---|---|---|
Product: | Mesa | Reporter: | Ian Romanick <idr> |
Component: | glsl-compiler | Assignee: | Ian Romanick <idr> |
Status: | RESOLVED FIXED | QA Contact: | Intel 3D Bugs Mailing List <intel-3d-bugs> |
Severity: | minor | ||
Priority: | medium | ||
Version: | git | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Ian Romanick
2016-02-17 02:24:23 UTC
deqp strikes again with completely absurd tests. I'm relieved, reading the github issue that C/C++ say that 'defined' is not macro name, and that glslang has merged a patch to reject such stupidity. I posted a patch to disallow this on mesa-dev: https://lists.freedesktop.org/archives/mesa-dev/2016-February/108008.html Given that GCC, Clang, and now glslang disallow it, it seems pretty clear what the right behavior ought to be. Nothing good can come from making this work. Fixed in master: commit 1c694a6c20da21f31c584fd41d28e2f03522617d Author: Kenneth Graunke <kenneth@whitecape.org> Date: Wed Feb 17 17:15:23 2016 -0800 glcpp: Disallow "defined" as a macro name. Both GCC and Clang disallow this, and glslang has recently started disallowing it as well. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94188 Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> unless of course we have to make #define defined actually work, but hopefully not, because that would be silly and pointless. We can always reopen or something if that happens. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.