-
Notifications
You must be signed in to change notification settings - Fork 84
Add some further library functions #878
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 11 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
7e6a27b
Add `__builtin_popcount{,l,ll}`
michael-schwarz b47b985
Add `__bad_*`
michael-schwarz a19d2dd
Add `pthread_attr_destroy`
michael-schwarz a1bd0cf
Add `puts`
michael-schwarz 8e8ed76
Add `str[c]spn`
michael-schwarz ddc0a66
Add various `strto...`
michael-schwarz 8227170
Add time related library functions
michael-schwarz 91000d4
Add `clearerr`
michael-schwarz ed2b3ea
Add `setbuf`
michael-schwarz 046e153
Add `ntohs`
michael-schwarz 9d3566a
Add `swprintf`
michael-schwarz 31be10f
Remove `wdeep` from strto....
michael-schwarz 442d8cd
Move `__bad_*` to `linux_desc_list`
michael-schwarz ed70c19
Merge branch 'master' into yet_more_library
michael-schwarz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| // PARAM: --set pre.cppflags[+] -DGOBLINT_NO_QSORT | ||
| #include<goblint.h> | ||
| #include <wchar.h> | ||
| #include <stdio.h> | ||
|
|
||
| int g = 8; | ||
|
|
||
| int main() { | ||
|
|
||
| int r = __builtin_popcount(5u); | ||
| int r = __builtin_popcountl(5ul); | ||
| int r = __builtin_popcountll(5ul); | ||
| puts("blarg"); | ||
|
|
||
| int a = strspn("bla","blu"); | ||
| a = strcspn("bla","blu"); | ||
|
|
||
| long r = strtol("bla", 0, 8); | ||
|
|
||
| wchar_t wcsbuf[100]; | ||
| wchar_t wstring[] = L"ABCDE"; | ||
| int num; | ||
|
|
||
| num = swprintf(wcsbuf, 100, L"%s", "xyz"); | ||
|
|
||
| // Should not be invalidated | ||
| __goblint_check(g == 8); | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.