https://github.com/shader-slang/slang
Raw File
Tip revision: 25eeb10a9731b0980f63709d0141ba2cccc954b5 authored by Tim Foley on 21 February 2020, 19:42:27 UTC
Add some missing support for Shader Model 6.4/6.5 (#1237)
Tip revision: 25eeb10
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