Files
ispc/tests_errors/undef-struct-ptrmath-2.ispc
Matt Pharr 55d5c07d00 Issue errors when doing illegal things with incomplete struct types.
Issue an error, rather than crashing, if the user has declared a
struct type but not defined it and subsequently tries to:

- dynamically allocate an instance of the struct type
- do pointer math with a pointer to the struct type
- compute the size of the struct type
2012-04-18 06:08:05 -07:00

8 lines
137 B
Plaintext

// Illegal to perform pointer arithmetic on undefined struct type
struct Foo;
Foo * uniform bar(Foo * uniform f) {
return 1 + f;
}