Fix another problem with undefined macros needing to evaluate to 0 within a preprocessor expression, but not outside a preprocessor expression.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21815 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich
2013-06-03 04:15:57 +00:00
parent 04de88f990
commit ceb0623823
4 changed files with 107 additions and 28 deletions

View File

@@ -68,3 +68,55 @@ sum += 0.05;
// sum should be 987600301.7
gl_Position = vec4(sum);
}
#define A 0
#define B 0
#define C 0
#if (A == B) || (A == C)
#error good1
#endif
#if A == B || (A == C)
#error good2
#endif
#if (A == B || (A == C))
#error good3
#endif
#if (AA == BB) || (AA == CC)
#error good4
#endif
#if AA == BB || (AA == CC)
#error good5
#endif
#if ((AA == BB || (AA == CC)))
#error good6
#endif
#if (A == B || (A == C)
#error bad1
#endif
#if A == B || A == C)
#error bad2
#endif
#if (A == B || (A == C)
#error bad3
#endif
#if AA == BB) || (AA == CC)
#error bad4
#endif
#if AA == BB || (AA == CC
#error bad5
#endif
#if ((AA == BB || (AA == CC))))
#error bad6
#endif