Ver código fonte

added comments to know where the test should break

master
Nathan R 3 anos atrás
pai
commit
ad7f76f5a5
10 arquivos alterados com 25 adições e 30 exclusões
  1. +3
    -3
      tests-err/test14.c
  2. +7
    -7
      tests-err/test15.c
  3. +3
    -4
      tests-err/test23.c
  4. +1
    -2
      tests-err/test26.c
  5. +2
    -4
      tests-err/test41.c
  6. +1
    -1
      tests-err/test43.c
  7. +2
    -2
      tests-err/test45.c
  8. +3
    -3
      tests-err/test5.c
  9. +1
    -1
      tests-err/test57.c
  10. +2
    -3
      tests-err/test66.c

+ 3
- 3
tests-err/test14.c Ver arquivo

@ -1,7 +1,7 @@
main() { main() {
int a; int a;
typedef b = (a);
typedef b = (a); // typedef b is initialized (use __typeof__ instead)
typeof (int *) c; typeof (int *) c;
typeof (d[0](1)) e;
typeof (d[0](1)) e; // d undeclared (first use in this function)
c = &a; c = &a;
}
}

+ 7
- 7
tests-err/test15.c Ver arquivo

@ -1,20 +1,20 @@
//generalized lvalues //generalized lvalues
foo() { foo() {
int a,b,f; int a,b,f;
(a, b) += 5;
a, (b += 5);
&(a, b);
(a, b) += 5; // lvalue required as left operand of assignment
a, (b += 5);
&(a, b); // lvalue required as unary & operand
a, &b; a, &b;
(a ? b : c) = 5 ;
(a ? b : c) = 5 ; // c undeclared (first use in this function)
(a ? b = 5 : (c = 5)) ; (a ? b = 5 : (c = 5)) ;
(int)a = 5 ;
(int)a = 5 ; // lvalue required as left operand of assignment
(int)(a = (char *)(int)5) ; (int)(a = (char *)(int)5) ;
(int)a += 5;
(int)a += 5; // lvalue required as left operand of assignment
(int)(a = (char *)(int) ((int)a + 5)); (int)(a = (char *)(int) ((int)a + 5));
(int)f = 1;
(int)f = 1; // lvalue required as left operand of assignment
(int *)&f; (int *)&f;
} }

+ 3
- 4
tests-err/test23.c Ver arquivo

@ -4,9 +4,8 @@ now() {
double y; double y;
void hack (union foo); void hack (union foo);
union foo u; union foo u;
u = (union foo) x == u.i = x;
u = (union foo) y == u.d = y;
u = (union foo) x == u.i = x; // invalid operands to binary == (have union foo and int)
u = (union foo) y == u.d = y; // invalid operands to binary == (have union foo and 'double')
hack ((union foo) x); hack ((union foo) x);
}
}

+ 1
- 2
tests-err/test26.c Ver arquivo

@ -1,6 +1,5 @@
func (x, y) { func (x, y) {
int x, y;
int x, y; // x redeclared as different kind of symbol / y redeclared as different kind of symbol
return x+y; return x+y;
} }

+ 2
- 4
tests-err/test41.c Ver arquivo

@ -8,7 +8,5 @@ switch (x) {
break; break;
case 2: y=90; case 2: y=90;
break; break;
default:
}
}
default: // label at end of compound statement
}

+ 1
- 1
tests-err/test43.c Ver arquivo

@ -8,7 +8,7 @@ goto l66;;
} else { } else {
y=100; y=100;
y++; y++;
l66:
l66: // label at end of compound statement
} }
} }

+ 2
- 2
tests-err/test45.c Ver arquivo

@ -6,7 +6,7 @@ void gg (h765t *q23w3)
{ {
if (q23w3->ll881ss[3]) { if (q23w3->ll881ss[3]) {
if (1) { if (1) {
q23w3->ll881ss[3] = (void *) (++(int)q23w3->ll881ss[3]);
q23w3->ll881ss[3] = (void *) (++(int)q23w3->ll881ss[3]); // lvalue required as increment operand
} }
} }
}
}

+ 3
- 3
tests-err/test5.c Ver arquivo

@ -12,7 +12,7 @@ PyMapping_SetItemString(o, key, value)
if( ! key) return Py_ReturnNullError(),-1; if( ! key) return Py_ReturnNullError(),-1;
if (!(okey=PyString_FromString(key))) return -1; if (!(okey=PyString_FromString(key))) return -1;
r = PyObject_SetItem(o,okey,value); r = PyObject_SetItem(o,okey,value);
if (--( okey )->ob_refcnt != 0) ; else (*( okey )->ob_type->tp_dealloc)((PyObject *)( okey )) ;
if (--( okey )->ob_refcnt != 0) ; else (*( okey )->ob_type->tp_dealloc)((PyObject *)( okey )) ; // (1)request for member ob_refcnt in something not a structure or union / (2)request for member ob_type in something not a structure or union
// ^(1) ^(2)
return r; return r;
}
}

+ 1
- 1
tests-err/test57.c Ver arquivo

@ -1,6 +1,6 @@
void F(char l) void F(char l)
{ {
return l<= '\~';
return l<= '\~'; // return with a value, in function returning void / unknown escape sequence: '\~'
} }

+ 2
- 3
tests-err/test66.c Ver arquivo

@ -1,4 +1,3 @@
f (__builtin_va_alist ) f (__builtin_va_alist )
int __builtin_va_alist;...
{ }
int __builtin_va_alist;... // expected declaration specifiers before ... token
{ } // expected { at end of input

Carregando…
Cancelar
Salvar