GLSL: Fix #396: Error when 'defined' comes from macro expansion.
This commit is contained in:
@@ -90,8 +90,10 @@ ERROR: 12:9504: '#if' : unexpected tokens following directive
|
||||
ERROR: 12:9506: '#error' : \ 377
|
||||
ERROR: 12:9507: '#error' : \ 376
|
||||
ERROR: 12:9508: '#error' : \ 377
|
||||
ERROR: 12:9602: 'defined' : cannot use in preprocessor expression when expanded from macros
|
||||
ERROR: 12:9603: '#error' : DEF_DEFINED then
|
||||
ERROR: 12:10002: '' : missing #endif
|
||||
ERROR: 88 compilation errors. No code generated.
|
||||
ERROR: 90 compilation errors. No code generated.
|
||||
|
||||
|
||||
Shader version: 400
|
||||
|
||||
@@ -337,6 +337,16 @@ int aoeua = FOOOM;
|
||||
#error \ 376
|
||||
#error \377
|
||||
|
||||
// ERROR for macro expansion to yield 'defined'
|
||||
#line 9600
|
||||
#define DEF_MAC
|
||||
#define DEF_DEFINED defined
|
||||
#if DEF_DEFINED DEF_MAC
|
||||
#error DEF_DEFINED then
|
||||
#else
|
||||
#error DEF_DEFINED else
|
||||
#endif
|
||||
|
||||
#line 10000
|
||||
#if 1
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user