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
This commit is contained in:
7
tests_errors/undef-struct-ptrmath.ispc
Normal file
7
tests_errors/undef-struct-ptrmath.ispc
Normal file
@@ -0,0 +1,7 @@
|
||||
// Illegal to pre/post increment pointer to undefined struct type
|
||||
|
||||
struct Foo;
|
||||
|
||||
Foo * uniform bar(Foo * uniform f) {
|
||||
return ++f;
|
||||
}
|
||||
Reference in New Issue
Block a user