[Mesa-dev] [PATCH 1/4] glcpp: Implicitly resolve version after the first non-space/hash token.

Kenneth Graunke kenneth at whitecape.org
Thu Mar 10 19:26:59 UTC 2016


On Wednesday, March 9, 2016 3:18:50 PM PST Jon Turney wrote:
> On 05/03/2016 03:33, Kenneth Graunke wrote:
> > We resolved the implicit version directive when processing control lines,
> > such as #ifdef, to ensure any built-in macros exist.  However, we failed
> > to resolve it when handling ordinary text.
> [...]
> > diff --git a/src/compiler/glsl/glcpp/tests/146-version-first-
hash.c.expected b/src/compiler/glsl/glcpp/tests/146-version-first-
hash.c.expected
> > new file mode 100644
> > index 0000000..2872090
> > --- /dev/null
> > +++ b/src/compiler/glsl/glcpp/tests/146-version-first-hash.c.expected
> > @@ -0,0 +1,3 @@
> > +0:1(3): preprocessor error: #version must appear on the first line
> > +
> > +
> 
> This last test fails in glcpp-test-cr-lf for me (See attached).
> 
> Can you just confirm that it passes for you, before I start looking into 
> why it might fail just for me...?

Sorry about that.  I had just run glcpp-test, but not glcpp-test-cr-lf.

It turns out that our handling of hash followed by newline was not
counting lines correctly, so it was returning either line 3 or line 4
based on the line terminator characters.  0:1(3) in the test was wrong;
it should have actually been 0:2(1).

Iago just reviewed my patch to fix this, so I've pushed it.  Hopefully
master should work for you now.
-------------- 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: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160310/9090cd1c/attachment.sig>


More information about the mesa-dev mailing list