https://github.com/shader-slang/slang
Raw File
Tip revision: 04416431993b1d5efa8eac759a16832d40c2a159 authored by jsmall-nvidia on 13 March 2019, 20:31:29 UTC
Add support for vector/scalar compares for GLSL (#903)
Tip revision: 0441643
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