https://github.com/shader-slang/slang
Raw File
Tip revision: 1e5ec5ca8c73e91c63b787e69c7286728f510b5e authored by jsmall-nvidia on 04 December 2019, 18:49:26 UTC
Setting downstream compiler (#1144)
Tip revision: 1e5ec5c
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