diff options
Diffstat (limited to 'lib/ccan/cast/test')
-rw-r--r-- | lib/ccan/cast/test/compile_ok-static.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/ccan/cast/test/compile_ok-static.c b/lib/ccan/cast/test/compile_ok-static.c new file mode 100644 index 0000000000..98b667e834 --- /dev/null +++ b/lib/ccan/cast/test/compile_ok-static.c @@ -0,0 +1,10 @@ +/* OpenIndiana's CC (aka suncc) has issues with constants: make sure + * we are one! */ +#include <ccan/cast/cast.h> + +static char *p = cast_const(char *, (const char *)"hello"); + +int main(int argc, char *argv[]) +{ + return p[0] == argv[0][0]; +} |