logoalt Hacker News

kevin_thibedeauyesterday at 10:05 PM2 repliesview on HN

The C++ committee has a habit of thumbing its nose at standard practice. They intentionally broke bitwise operators on volatiles because they wanted to be impose their atomic religion everywhere. Then they had to walk that back after they broke every embedded library directly manipulating hardware registers.

Empty infinite loops are also commonplace in embedded C once main is done with init and within exception handlers. They don't care about anything beyond their narrow systems programming worldview.


Replies

112233today at 2:48 AM

By narrow luck compiler writers so far have been the sane bunch, and have ignored C++ committee on many important points. Thus we still have explicitly non-conformant things like -fno-exceptions that lets one use C++ compiler on embedded.

But I wonder how long that can last, with the way C++ is going.

At one point, it will make practical sense to update codebase to some other language, rather than keep fighting this one

show 1 reply
Sniffnoytoday at 2:46 AM

> They intentionally broke bitwise operators on volatiles because they wanted to be impose their atomic religion everywhere.

Could you elaborate on this?

show 1 reply