浏览代码

added comments to know where the test should break

master
Nathan R 3 年前
父节点
当前提交
ad7f76f5a5
共有 10 个文件被更改,包括 25 次插入30 次删除
  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 查看文件

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

+ 7
- 7
tests-err/test15.c 查看文件

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

+ 3
- 4
tests-err/test23.c 查看文件

@ -4,9 +4,8 @@ now() {
double y;
void hack (union foo);
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);
}
}

+ 1
- 2
tests-err/test26.c 查看文件

@ -1,6 +1,5 @@
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;
}

+ 2
- 4
tests-err/test41.c 查看文件

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

+ 1
- 1
tests-err/test43.c 查看文件

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

+ 2
- 2
tests-err/test45.c 查看文件

@ -6,7 +6,7 @@ void gg (h765t *q23w3)
{
if (q23w3->ll881ss[3]) {
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 查看文件

@ -12,7 +12,7 @@ PyMapping_SetItemString(o, key, value)
if( ! key) return Py_ReturnNullError(),-1;
if (!(okey=PyString_FromString(key))) return -1;
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;
}
}

+ 1
- 1
tests-err/test57.c 查看文件

@ -1,6 +1,6 @@
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 查看文件

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

正在加载...
取消
保存