Issue error on "void" typed variable, function parameter, or struct member.
This commit is contained in:
5
tests_errors/void-1.ispc
Normal file
5
tests_errors/void-1.ispc
Normal file
@@ -0,0 +1,5 @@
|
||||
// "void" type variable illegal in declaration
|
||||
|
||||
int func() {
|
||||
void x;
|
||||
}
|
||||
5
tests_errors/void-2.ispc
Normal file
5
tests_errors/void-2.ispc
Normal file
@@ -0,0 +1,5 @@
|
||||
// Parameter with type "void" illegal in function parameter list
|
||||
|
||||
void func(void x, void y) {
|
||||
return x+y;
|
||||
}
|
||||
5
tests_errors/void-3.ispc
Normal file
5
tests_errors/void-3.ispc
Normal file
@@ -0,0 +1,5 @@
|
||||
// "void" type illegal for struct member
|
||||
|
||||
struct Foo {
|
||||
void x;
|
||||
};
|
||||
3
tests_errors/void-4.ispc
Normal file
3
tests_errors/void-4.ispc
Normal file
@@ -0,0 +1,3 @@
|
||||
// "void" type global variable is illegal
|
||||
|
||||
void x;
|
||||
5
tests_errors/void-array-1.ispc
Normal file
5
tests_errors/void-array-1.ispc
Normal file
@@ -0,0 +1,5 @@
|
||||
// Arrays of "void" type are illegal
|
||||
|
||||
float f_fu(uniform void aFOO[]) {
|
||||
return 0;
|
||||
}
|
||||
4
tests_errors/void-array-2.ispc
Normal file
4
tests_errors/void-array-2.ispc
Normal file
@@ -0,0 +1,4 @@
|
||||
// Arrays of "void" type are illegal
|
||||
|
||||
uniform void aFOO[] = { NULL };
|
||||
|
||||
7
tests_errors/void-array-3.ispc
Normal file
7
tests_errors/void-array-3.ispc
Normal file
@@ -0,0 +1,7 @@
|
||||
// Arrays of "void" type are illegal
|
||||
|
||||
struct Foo {
|
||||
void aFOO[];
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user