[Mesa-dev] [PATCH 1/2] glsl/glcpp: Promote "extra token at end of directive" from warning to error

Kenneth Graunke kenneth at whitecape.org
Fri Jun 13 16:37:11 PDT 2014

On Friday, June 13, 2014 04:04:43 PM Carl Worth wrote:
> We've always warned about this case, but a recent confromance test expects
> this to be an error that causes compilation to fail. Make it so.
> Also add a "make check" test to ensure these errors are generated.
> This fixes at least the following Khronos GLES3 conformance tests:
> 	invalid_conditionals.tokens_after_ifdef_vertex
> 	invalid_conditionals.tokens_after_ifdef_fragment
> 	invalid_conditionals.tokens_after_ifndef_vertex
> 	invalid_conditionals.tokens_after_ifndef_fragment
> ---
>  src/glsl/glcpp/glcpp-parse.y                                | 2 +-
>  src/glsl/glcpp/tests/126-garbage-after-directive.c          | 5 +++++
>  src/glsl/glcpp/tests/126-garbage-after-directive.c.expected | 8 ++++++++
>  3 files changed, 14 insertions(+), 1 deletion(-)
>  create mode 100644 src/glsl/glcpp/tests/126-garbage-after-directive.c
>  create mode 100644 src/glsl/glcpp/tests/126-garbage-after-

Right, I'd added a warning about this in commit 65875743542fd1388b18a1, 
apparently to make CorrectPreprocess11.frag from the original 3Dlabs tests 
pass (as it was accepted by both gcc and nvidia's compiler).

We've since determined that CorrectPreprocess11.frag wasn't so correct after 
all, and deleted it from Piglit (commit a9df70269aa25da).  So, I'm fine with 
promoting this.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140613/7b839a18/attachment.sig>

More information about the mesa-dev mailing list