Re: [OpenSmalltalk/opensmalltalk-vm] VM should build with -Wall, -Wextra, -Werror (#87)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] VM should build with -Wall, -Wextra, -Werror (#87)

David T Lewis
 

What is the status of this @nicolas-cellier-aka-nice @eliotmiranda? I remember there was some work in that direction in the previous years?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/OpenSmalltalk/opensmalltalk-vm","title":"OpenSmalltalk/opensmalltalk-vm","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm"}},"updates":{"snippets":[{"icon":"PERSON","message":"@clementbera in #87: What is the status of this @nicolas-cellier-aka-nice @eliotmiranda? I remember there was some work in that direction in the previous years?"}],"action":{"name":"View Issue","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/87#issuecomment-379473074"}}}</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] VM should build with -Wall, -Wextra, -Werror (#87)

David T Lewis
 

Just change the WARNINGS variable in build*/common/Makefile.flags, and inspect the generated LOGF, you'll see that we still have plenty of warnings.
Due to inlining, the same warnings are duplicated many times, but still...
Some are benign like a label was not used... Some more suspicious.
Removing them means more work on C Code Generator.

I like to work with Xcode or VisualStudio or whatever IDE for navigating in generated code and for understanding the level of danger related to these warnings, unfortunately we don't maintain such Xcode/MSVC projects, nor are we able to generate them with cmake, we don't use cmake...

Concerning undefined behavior, we have removed some UB yet, but not sure if the work is finished or not.
There are more warnings than UB (false alarms), and not all UB raise warnings
(or it would be impossible to write the most simple signed arithmetic expression, every overflow condition is UB, and potentially, anything can overflow, unless sub-expressions can be bounded).

For UB, I would strongly advise to turn on the runtime checks of clang, at least in debug mode.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/OpenSmalltalk/opensmalltalk-vm","title":"OpenSmalltalk/opensmalltalk-vm","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm"}},"updates":{"snippets":[{"icon":"PERSON","message":"@nicolas-cellier-aka-nice in #87: Just change the WARNINGS variable in build*/common/Makefile.flags, and inspect the generated LOGF, you'll see that we still have plenty of warnings.\r\nDue to inlining, the same warnings are duplicated many times, but still...\r\nSome are benign like a label was not used... Some more suspicious.\r\nRemoving them means more work on C Code Generator.\r\n\r\nI like to work with Xcode or VisualStudio or whatever IDE for navigating in generated code and for understanding the level of danger related to these warnings, unfortunately we don't maintain such Xcode/MSVC projects, nor are we able to generate them with cmake, we don't use cmake...\r\n\r\nConcerning undefined behavior, we have removed some UB yet, but not sure if the work is finished or not.\r\nThere are more warnings than UB (false alarms), and not all UB raise warnings\r\n(or it would be impossible to write the most simple signed arithmetic expression, every overflow condition is UB, and potentially, anything can overflow, unless sub-expressions can be bounded).\r\n\r\nFor UB, I would strongly advise to turn on the runtime checks of clang, at least in debug mode."}],"action":{"name":"View Issue","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/87#issuecomment-379474156"}}}</script>