This website requires JavaScript.
Explore
Help
Sign in
fdo-mirrors
/
mesa
Watch
1
Star
0
Fork
You've already forked mesa
0
mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced
2026-03-07 18:30:46 +01:00
Code
Issues
Projects
Releases
Packages
Wiki
Activity
Actions
1
828686d4eb
mesa
/
src
/
glsl
/
glcpp
/
tests
/
008-define-empty.c.expected
3 lines
3 B
Text
Raw
Normal View
History
Unescape
Escape
test suite: Add expected output for every test. Rather than using the (munged) output of "gcc -E" we now capture precisely the output we expect from every test case. This allows us to stay immune from strange output from gcc (unpredictable whitespace output---aprticularly with different gcc versions). This will also allow us to write tests that capture expected error messages from the preprocessor as well.
2010-06-02 15:59:45 -07:00
glcpp: Avoid accidental token pasting in preprocessed result. Consider this test case: #define EMPTY int foo = 1+EMPTY+4; The expression should compile as the sequence of tokens 1, PLUS, UNARY_POSITIVE, 4. But glcpp has been failing for this case since it results in the string "1++4" which a compiler correctly sees as a syntax error, (1, POST_INCREMENT, 4). We fix this by changing any macro with an empty definition to result in a single SPACE token rather than nothing. This then gives "1+ +4" which compiles correctly. This commit does touch up the two existing test cases which already have empty macros, (to add the space to the expected result). It also adds a new test case to exercise the above scenario.
2010-07-20 16:44:03 -07:00
Reference in a new issue
Copy permalink