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:
Matt Pharr
2012-04-16 08:00:13 -07:00
parent b9d6ba2aa0
commit 55d5c07d00
7 changed files with 84 additions and 3 deletions

View File

@@ -0,0 +1,7 @@
// Can't dynamically allocate storage for declared but not defined type
struct Foo;
Foo * uniform bar() {
return uniform new Foo;
}