What is the purpose of __cxa_pure_virtual?

If anywhere in the runtime of your program an object is created with a virtual function pointer not filled in, and when the corresponding function is called, you will be calling a ‘pure virtual function’. The handler you describe should be defined in the default libraries that come with your development environment. If you happen … Read more

How to prevent GCC from optimizing out a busy wait loop?

I developed this answer after following a link from dmckee’s answer, but it takes a different approach than his/her answer. Function Attributes documentation from GCC mentions: noinline This function attribute prevents a function from being considered for inlining. If the function does not have side-effects, there are optimizations other than inlining that causes function calls … Read more