Category: Programming
-
Compiler Warnings
There is an ongoing issue within gcc as to where warnings should be issued. The question is whether warnings should be issued only by the frontend, or whether it is also OK for the optimizers to issue them. The advantage of issuing warnings in the frontend are that warnings are independent of optimization level. Also,…
-
How Does the Gcc Organization Work?
How does the gcc compiler get written? Who works on it and why? It seems to puzzle some people. There are vast numbers of free software projects these days, far more than I try to keep track of. Among these, gcc is unusual in several respects. gcc is more than 20 years old as an…
-
volatile
The volatile qualifier in C/C++ is widely misunderstood. Because it is described so vaguely in language standards, many people interpret it as a do-what-I-mean qualifier. What the standard says is that accesses to volatile objects must be evaluated strictly according to the abstract machine defined by the language standard; this means that if the C/C++…
-
Multi-threading Memory
As I’ve written before, multi-threaded code is hard to write. It becomes even harder to write when you find that lock contention is an efficiency issue. On a modern multi-core system locks require some sort of memory cache coordination between the various cores. If your program is written using fine-grained locks which may be held…
-
Debugging
I think that people who take a computer science degree in college should be required to study debugging. For better or for worse, debugging is an essential part of programming. However, most programmers are left to learn it on their own, in a way that is not true of many other aspects of programming. I…