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:
Matt Pharr
2011-11-29 21:41:04 -08:00
parent a3641d7691
commit 6b9b7437ed
10 changed files with 59 additions and 5 deletions

View File

@@ -0,0 +1,5 @@
// Can't apply "signed" qualifier to "float" type
struct Foo {
signed float x;
};

View File

@@ -0,0 +1,5 @@
// "signed" qualifier is illegal with non-integer type "float"
int foo() {
signed float x;
}

View File

@@ -0,0 +1,7 @@
// "signed" qualifier is illegal with non-integer type "uniform struct Foo"
struct Foo {
float x;
};
signed Foo f;

View File

@@ -0,0 +1,5 @@
// Error: Illegal to apply both "signed" and "unsigned" qualifiers
int foo() {
signed unsigned int x;
}

View File

@@ -0,0 +1,5 @@
// Can't apply "unsigned" qualifier to "float" type
struct Foo {
unsigned float x;
};

View File

@@ -0,0 +1,7 @@
// "unsigned" qualifier is illegal with "uniform struct Foo" typ
struct Foo {
float x;
};
unsigned Foo f;