朋友問我有沒有可能找到程式中不會被執行到的 code, 有沒有工具可以支援.
基本上這樣的程式碼, 我們稱之為 unreachable code. 你可在這邊找到一些定義.
https://en.wikipedia.org/wiki/Unreachable_code
DZone 也有文章討論
https://dzone.com/articles/you-have-no-excuse-for-your-dead-code
那有沒有工具可以支援呢? 有些 compiler 本身可以幫忙找出一些. 例如: visual studio 對於 unreachable code 會有些 warning.
https://docs.microsoft.com/en-us/visualstudio/ide/reference/remove-unreachable-code?view=vs-2019
Stackoverflow 上也有人在討論
https://stackoverflow.com/questions/1706114/open-source-tool-to-find-unreachable-unused-c-sharp-code
Uber 也有這方面的一些處理經驗
https://www.infoq.com/news/2020/04/uber-piranha-unreachable-code/
不知大家有沒有這樣的經驗? 以及是否有好的工具可以提供?
個人覺得這些 static analysis tool 應該無法抓全部, 以及是否所有找到的都準, 應該是個大問號
同時也有1部Youtube影片,追蹤數超過44萬的網紅MakeLearningFun,也在其Youtube影片中提到,Programming become more and more important nowadays. Some people may think it is different to learn, but actually it is not! With the right tools and ...
「c program compiler」的推薦目錄:
- 關於c program compiler 在 DavidKo Learning Journey Facebook 的最讚貼文
- 關於c program compiler 在 MakeLearningFun Youtube 的最佳解答
- 關於c program compiler 在 How to Compile and Run C program Using GCC on Ubuntu ... 的評價
- 關於c program compiler 在 Walkthrough: Compile a C program on the command line 的評價
- 關於c program compiler 在 How do I compile and run a C program in Sublime Text 2? 的評價
c program compiler 在 MakeLearningFun Youtube 的最佳解答
Programming become more and more important nowadays. Some people may think it is different to learn, but actually it is not! With the right tools and resources, we believe every one can learn programming!
In this video, we explain hello world c++ program in detail such as iostream,
cout, less than operators, end , main function and return value of the program.
We also demonstration how the compiler can help us and some experiments about the return value.
If you want to watch more video from us, please
-do subscribe us!
-like the video and share to you friend who have kid on the facebook, tweeter, google+....etc
how to learn math
https://www.youtube.com/playlist?list...
stem projects
https://www.youtube.com/playlist?list...
Anpanman Educational Toys
https://www.youtube.com/playlist?list...
Learn Shapes for kids
https://www.youtube.com/playlist?list...
Learn letter A to Z
https://www.youtube.com/playlist?list...
Learn names of fruits and vegetables
https://www.youtube.com/playlist?list...
Learning street vehicles names and vehicle sounds
https://www.youtube.com/playlist?list...
Learn names of animal with animal sound
https://www.youtube.com/playlist?list...

c program compiler 在 Walkthrough: Compile a C program on the command line 的推薦與評價
The Visual Studio build tools include a C compiler that you can use to create everything from basic console programs to full Windows Desktop applications, ... ... <看更多>
c program compiler 在 How to Compile and Run C program Using GCC on Ubuntu ... 的推薦與評價
In this video I am going to show How to Compile and Run C program Using GCC on Ubuntu 22.04 LTS Linux. Same instruction will be valid for ... ... <看更多>