mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-07 14:10:37 +01:00
The preprocessor currently accepts multiple else/elif-groups per if-section. The GLSL-preprocessor is defined by the C++ specification, which defines the following parse-rule: if-section: if-group elif-groups(opt) else-group(opt) endif-line This clearly only allows a single else-group, that has to come after any elif-groups. So let's modify the code to follow the specification. Add test to prevent regressions. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Carl Worth <cworth@cworth.org> Cc: 10.0 <mesa-stable@lists.freedesktop.org>
6 lines
43 B
C
6 lines
43 B
C
#if 0
|
|
#else
|
|
int foo;
|
|
#else
|
|
int bar;
|
|
#endif
|