[Bug 72686] New: GLSL preprocessor does not eat comments correctly
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Fri Dec 13 10:18:17 PST 2013
https://bugs.freedesktop.org/show_bug.cgi?id=72686
Priority: medium
Bug ID: 72686
CC: idr at freedesktop.org
Assignee: cworth at cworth.org
Summary: GLSL preprocessor does not eat comments correctly
QA Contact: intel-3d-bugs at lists.freedesktop.org
Severity: normal
Classification: Unclassified
OS: All
Reporter: idr at freedesktop.org
Hardware: Other
Status: NEW
Version: git
Component: glsl-compiler
Product: Mesa
The GLSL spec says "Comments are each replaced by one space character," as do
the C and C++ specifications. This means that C code such as
#define X a/*
*/b
X
will produce
# 1 "/tmp/foo.c"
# 1 "<command-line>"
# 1 "/tmp/foo.c"
a b
It also means that GLSL code such as
#version 120
#define X gl_Position/*
*/ =
void main()
{
X vec4(0.);
}
should compile as if it were
#version 120
void main()
{
gl_Position = vec4(0.);
}
On Mesa, this generates an error:
0:3(3): error: syntax error, unexpected '='
--
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20131213/2e6947e3/attachment.html>
More information about the intel-3d-bugs
mailing list