mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
parent
4c4b9aef4d
commit
8812065e8b
2 changed files with 4 additions and 8 deletions
|
@ -1445,8 +1445,10 @@ final class CParser(AST) : Parser!AST
|
|||
auto e = cparseOrExp();
|
||||
while (token.value == TOK.andAnd)
|
||||
{
|
||||
e = new AST.CastExp(loc, e, AST.Type.tbool);
|
||||
nextToken();
|
||||
auto e2 = cparseOrExp();
|
||||
e2 = new AST.CastExp(loc, e2, AST.Type.tbool);
|
||||
e = new AST.LogicalExp(loc, EXP.andAnd, e, e2);
|
||||
}
|
||||
return e;
|
||||
|
@ -1465,8 +1467,10 @@ final class CParser(AST) : Parser!AST
|
|||
auto e = cparseAndAndExp();
|
||||
while (token.value == TOK.orOr)
|
||||
{
|
||||
e = new AST.CastExp(loc, e, AST.Type.tbool);
|
||||
nextToken();
|
||||
auto e2 = cparseAndAndExp();
|
||||
e2 = new AST.CastExp(loc, e2, AST.Type.tbool);
|
||||
e = new AST.LogicalExp(loc, EXP.orOr, e, e2);
|
||||
}
|
||||
return e;
|
||||
|
|
|
@ -28,7 +28,6 @@ int testcppcomment()
|
|||
|
||||
void elemi()
|
||||
{
|
||||
#if 0 // TODO ImportC
|
||||
int i;
|
||||
|
||||
i = 47;
|
||||
|
@ -81,12 +80,10 @@ void elemi()
|
|||
assert(i == 1);
|
||||
i = ((i = 1),(!(i & 5))) && (i == 6);
|
||||
assert(i == 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
void elems()
|
||||
{
|
||||
#if 0 // TODO ImportC
|
||||
short i;
|
||||
|
||||
i = 47;
|
||||
|
@ -139,13 +136,11 @@ void elems()
|
|||
assert(i == 1);
|
||||
i = ((i = 1),(!(i & 5))) && (i == 6);
|
||||
assert(i == 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
void eleml()
|
||||
{ long l;
|
||||
|
||||
#if 0 // TODO ImportC
|
||||
l = 47;
|
||||
l = l && 0;
|
||||
assert(l == 0);
|
||||
|
@ -196,13 +191,11 @@ void eleml()
|
|||
assert(l == 1);
|
||||
l = ((l = 1),(!(l & 5))) && (l == 6);
|
||||
assert(l == 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
void elemc()
|
||||
{ char c;
|
||||
|
||||
#if 0 // TODO ImportC
|
||||
c = 47;
|
||||
c = c && 0;
|
||||
assert(c == 0);
|
||||
|
@ -253,7 +246,6 @@ void elemc()
|
|||
assert(c == 1);
|
||||
c = ((c = 1),(!(c & 5))) && (c == 6);
|
||||
assert(c == 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
void align() /* test alignment */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue