Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the jobs of not being a compiler in C++?

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly introduces the C++ do not do the compiler work, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, let the editor take you to know about it.

For C++ programmers, sometimes they like to rewrite something according to how the compiler works in order to improve the efficiency of the code. This is really smart and reflects the level of programmers, but it is also risky to do so. Because sometimes you may make very imperceptible mistakes because of some simple clerical mistakes. Similar examples are given in this paper.

This Bug appears in the MySQL source code.

Error code:

Static int rr_cmp (uchar * a dint uchar * b) {if (a [0]! = b [0]) return (int) a [0]-(int) b [0]; if (a [1]! = b [1]) return (int) a [1]-(int) b [1]; if (a [2]! = b [2]) return (int) a [2]-(int) b [2] If (a [3]! = b [3]) return (int) a [3]-(int) b [3]; if (a [4]! = b [4]) return (int) a [4]-(int) b [4]; if (a [5]! = b [5]) return (int) a [1]-(int) b [5]

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report