Parse and then mostly ignore "signed" qualifier.
Just issue errors if both "signed" and "unsigned" are specified, or if "signed" is applied to a non-int type.
This commit is contained in:
5
tests_errors/signed-float-1.ispc
Normal file
5
tests_errors/signed-float-1.ispc
Normal file
@@ -0,0 +1,5 @@
|
||||
// Can't apply "signed" qualifier to "float" type
|
||||
|
||||
struct Foo {
|
||||
signed float x;
|
||||
};
|
||||
5
tests_errors/signed-float.ispc
Normal file
5
tests_errors/signed-float.ispc
Normal file
@@ -0,0 +1,5 @@
|
||||
// "signed" qualifier is illegal with non-integer type "float"
|
||||
|
||||
int foo() {
|
||||
signed float x;
|
||||
}
|
||||
7
tests_errors/signed-struct.ispc
Normal file
7
tests_errors/signed-struct.ispc
Normal file
@@ -0,0 +1,7 @@
|
||||
// "signed" qualifier is illegal with non-integer type "uniform struct Foo"
|
||||
|
||||
struct Foo {
|
||||
float x;
|
||||
};
|
||||
|
||||
signed Foo f;
|
||||
5
tests_errors/signed-unsigned.ispc
Normal file
5
tests_errors/signed-unsigned.ispc
Normal file
@@ -0,0 +1,5 @@
|
||||
// Error: Illegal to apply both "signed" and "unsigned" qualifiers
|
||||
|
||||
int foo() {
|
||||
signed unsigned int x;
|
||||
}
|
||||
5
tests_errors/unsigned-float-1.ispc
Normal file
5
tests_errors/unsigned-float-1.ispc
Normal file
@@ -0,0 +1,5 @@
|
||||
// Can't apply "unsigned" qualifier to "float" type
|
||||
|
||||
struct Foo {
|
||||
unsigned float x;
|
||||
};
|
||||
7
tests_errors/unsigned-struct.ispc
Normal file
7
tests_errors/unsigned-struct.ispc
Normal file
@@ -0,0 +1,7 @@
|
||||
// "unsigned" qualifier is illegal with "uniform struct Foo" typ
|
||||
|
||||
struct Foo {
|
||||
float x;
|
||||
};
|
||||
|
||||
unsigned Foo f;
|
||||
Reference in New Issue
Block a user