forked from ziglang/zig
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove tests for warnings for test of UB that are NOT correct with LLVM.
See ziglang#2 at the end: http://blog.llvm.org/2011/05/what-every-c-programmer-should-know_21.html These generally just return undefined value, but sometimes that undefined value is just certain bits, and Zig isn't prepared to do such analysis. The tests on / and % are correct however, because undefined can be 0, and division or remainder on 0 can cause a SIGFPE (as can INT_MAX / or % -1) There are more sophisticated cases where the result IS defined, but not warning on those is much more difficult, this does not actually remove even the easier to remove bogus warnings. There is a special case here that is also important, in that undef ^ undef => undef, NOT 0.
Showing
1 changed file
with
8 additions
and
357 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters