Skip to content

Commit 9b50184

Browse files
committed
add warning for calling pure nothrow functions and ignoring the result
1 parent 84b4fd1 commit 9b50184

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/expression.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7548,8 +7548,8 @@ int CallExp::checkSideEffect(int flag)
75487548
)
75497549
{
75507550
result = 0;
7551-
//if (flag == 0)
7552-
//warning("pure nothrow function %s has no effect", e1->toChars());
7551+
if (flag == 0)
7552+
warning("pure nothrow function %s has no effect", e1->toChars());
75537553
}
75547554
else
75557555
result = 1;

0 commit comments

Comments
 (0)