https://github.com/shader-slang/slang
Raw File
Tip revision: 172f3f0cc47b1f2f57c9c70a17209599d3a16bca authored by Tim Foley on 02 February 2018, 22:43:37 UTC
Fix bug when subscripting a type that must be split (#396)
Tip revision: 172f3f0
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