17 Mar 2004 Spooky   » (Master)

Right now I'm in need of a language lawyer. Bug #136898 is the case of a person trying to compile gnome-games with the -fdata-sections option to gcc. I didn't ask why he wanted to do this, but he did and the build failed. The reason is that I have (or had, I changed it) a declaration like int a; in one file and a similar declaration in another file (no extern or anything). These are meant to be the same variable and under normal circumstances it is compiled and linked as such. Compile it with -fdata-sections and the linker complains about "multiple definitions of a". The dispute is now whether this is a bug on my part (i.e. it isn't valid C) or a bug in the compiler/linker.

I'll happily admit that the code in aisleriot was bad code (and has since been fixed), but I'm not convinced it was illegal code. After all it only did what we all do with functions: declare it in one source file and the use an empty prototype definition in another file. Both myself and the reported have of course looked at the C standard and have both come away with the idea that it supports our point of view.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!