Remove &~= operator from gmqccs operator table, only fteqcc supports it.

This commit is contained in:
Dale Weiler 2013-08-29 07:19:19 -04:00
parent dd289ed0e1
commit f8af7adcd7
4 changed files with 30 additions and 3 deletions

View file

@ -235,7 +235,6 @@ static const oper_info c_operators[] = {
{ "&=", 2, opid2('&','='), ASSOC_RIGHT, 2, 0, false},
{ "^=", 2, opid2('^','='), ASSOC_RIGHT, 2, 0, false},
{ "|=", 2, opid2('|','='), ASSOC_RIGHT, 2, 0, false},
{ "&~=", 2, opid3('&','~','='), ASSOC_RIGHT, 2, 0, false},
{ ":", 0, opid2(':','?'), ASSOC_RIGHT, 1, 0, false},

View file

@ -6,11 +6,28 @@ void main() {
vector e; e = '1 1 1';
vector f; f = '1 1 1';
#ifdef __STD_FTEQCC__
a &~= 1; // 0
#else
a &= ~1; // 0
#endif
#ifdef __STD_GMQCC__
b &= ~1; // 0
c &= ~d; // 0
#else
b &~= 1; // 0
c &~= 1; // 0
#endif
#ifdef __STD_FTEQCC__
f &~= e; // '0 0 0'
#else
f &= ~e; // '0 0 0'
#endif
#ifdef __STD_GMQCC__
e &= ~e; // '0 0 0'
#else
e &~= e; // '0 0 0'
#endif
print("a: ", ftos(a), "\nb: ",
ftos(b), "\nc: ",

View file

@ -1,8 +1,8 @@
# used to test the builtins
I: bitnot.qc
D: test bitwise not operators
D: test bitwise not operators (fteqcc operators)
T: -execute
C: -std=gmqcc
C: -std=fteqcc
E: $null
M: a: 0
M: b: 0

11
tests/bitnotgmqcc.tmpl Normal file
View file

@ -0,0 +1,11 @@
# used to test the builtins
I: bitnot.qc
D: test bitwise not operators (gmqcc operators)
T: -execute
C: -std=gmqcc -fftepp
E: $null
M: a: 0
M: b: 0
M: c: 0
M: e: '0 0 0'
M: f: '0 0 0'