https://github.com/shader-slang/slang
Raw File
Tip revision: 8ec293cfa7c767d652fee683de29629685420f63 authored by Yong He on 16 June 2020, 01:10:02 UTC
Merge pull request #1390 from csyonghe/glsl-loop
Tip revision: 8ec293c
undef.slang
//TEST:SIMPLE:
// #undef support

// warning: undef of something not defined
#undef FOO

#define BAR 1.0f

float foo() { return BAR + 2.0; }

#ifdef BAR
// okay
#else
#error not okay
#endif

#undef BAR

typedef float BAR;

BAR bar() { return 2.0; }

#if !defined(BAR)
// okay
#else
#error not okay
#endif


#define FOO

#undef FOO
back to top