Do not assume that build architecture has byte/char==8 bits#5962
Do not assume that build architecture has byte/char==8 bits#5962tautschnig merged 1 commit intodiffblue:developfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #5962 +/- ##
===========================================
+ Coverage 74.11% 74.30% +0.19%
===========================================
Files 1444 1444
Lines 157389 157404 +15
===========================================
+ Hits 116646 116957 +311
+ Misses 40743 40447 -296
Continue to review full report at Codecov.
|
martin-cs
left a comment
There was a problem hiding this comment.
Glad to see you and the author of #5873 managed to sort things out ( #5873 (comment) )
10a5c8e to
4f565cc
Compare
|
Note that the commit message isn't entirely true: The changes to ansi-c/library/gcc.c affect the analysis platform, not the build platform. |
The C/C++ standard does not guarantee this, and limits.h/climits has the CHAR_BIT define set properly. All changes in this commit only refer to the platform the tool is being built for. The analysis target requires a separate set of changes where the byte width must be taken from the configuration or annotations within expressions.
Oh, indeed, I've moved those changes to the commit in #917 instead. |
chrisr-diffblue
left a comment
There was a problem hiding this comment.
Thanks for the cleanup - much better :-)
| log.status() << "JANALYZER version " << CBMC_VERSION << " " | ||
| << sizeof(void *) * 8 << "-bit " << config.this_architecture() | ||
| << " " << config.this_operating_system() << messaget::eom; | ||
| << sizeof(void *) * CHAR_BIT << "-bit " |
There was a problem hiding this comment.
Out-of-scope for this PR, but give how this exact log.status pattern is duplicated several times, it does rather feel like a utility function could be useful :-)
There was a problem hiding this comment.
Thank you for highlighting this. Now PR'ed in #6089.
The C/C++ standard does not guarantee this, and limits.h/climits has the
CHAR_BIT define set properly.
All changes in this commit only refer to the platform the tool is being
built for. The analysis target requires a separate set of changes where
the byte width must be taken from the configuration or annotations
within expressions.
This is a first part of #917, now factored into a PR of its own.