mesa/src
Carl Worth ea2e9300ec glsl/glcpp: Emit proper error for #define with a non-identifier
Previously, if the preprocessor encountered a #define with a non-identifier,
such as:

	#define 123 456

The lexer had no explicit rules to match non-identifiers in the <DEFINE> start
state. Because of this, flex's default rule was being invoked, (printing
characters to stdout), and all text was being discarded by the compiler until
the next identifier. As one can imagine, this led to all sorts of interesting
and surprising results.

Fix this by adding an explicit rule complementing the existing
identifier-based rules that should catch all non-identifiers after #define and
reliably give a well-formatted error message.

A new test is added to "make check" to ensure this bug stays fixed.

This commit also fixes the following Khronos GLES3 CTS test:

	define_non_identifier_vertex

(The "fragment" variant was passing earlier only because the preprocessor was
behaving so randomly and causing the compilation to fail. It's lucky, in fact,
that the "vertex" version succesfully compiled so we could find and fix this
bug.)

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2014-07-29 15:11:48 -07:00
..
egl egl: Remove unused variable dri_driver_path. 2014-06-17 10:18:12 -07:00
gallium os_process.c: Add cygwin as an expected platform 2014-07-29 17:53:08 +01:00
gbm gbm: Search LIBGL_DRIVERS_PATH if GBM_DRIVERS_PATH is not set 2014-07-24 23:15:06 -07:00
getopt
glsl glsl/glcpp: Emit proper error for #define with a non-identifier 2014-07-29 15:11:48 -07:00
glx glx/dri3: add GPU offloading support. 2014-07-01 13:07:52 +10:00
gtest
hgl
loader mesa: fix the condition in src/loader/Makefile.am 2014-07-01 09:42:44 -06:00
mapi glapi: add indexed blend functions (GL 4.0) 2014-07-28 16:26:27 -07:00
mesa main/get_hash_params: Add GL_SAMPLE_SHADING_ARB 2014-07-29 10:50:38 -07:00
Makefile.am loader: Use drirc device_id parameter in complement to DRI_PRIME 2014-07-01 13:07:40 +10:00
SConscript