The code-base still has a number of conditionals around the place to handle really really old gcc versions that we no longer compile with. #if defined(__GNUC__) && (__GNUC__ < 3) struct ::stat a_stat, b_stat; #else struct stat a_stat, b_stat; #endif This clutters and uglifies the code - often the code changes were added to workaround a specific gcc2 bug, not present in more recent and compliant gcc's. We should search the code-base for __GNUC__ version checks and kill everything that is for less than 3. Thanks :-)
Just a question: what's the minimal version of gcc required?
Actually it's better than this - the oldest gcc we need to support is 4.0.1 - which is used on Macs I think; so - I suspect that even more of the conditionals can go on that basis :-)
Created attachment 56827 [details] Patch for one such GNUC check
This was my first patch to LO... I wonder which files I have to check. I just grepped like this: find . -name *.cxx | xargs grep __GNU__ and fixed the first low hanging fruit I found. Was this correct?
Carsten, patch looks good. Pushed, thanks. Please add yourself to <http://wiki.documentfoundation.org/Development/Developers>, including a statement under what license your patches are -- preferably the LGPLv3+/MPL1.1+ combo. The easiest way to find relevant parts of the code would probably be just git grep -Flw __GNUC__ to get a list of all files that mention it.
Alexander Bergmann just nailed a number more of these; leaving only a few in sal/ left that are more interesting and Stephan can perhaps comment on on the mailing list (?) so I'll mark this closed: thanks guys !
Migrating Whiteboard tags to Keywords: (EasyHack,DifficultyBeginner,SkillCpp,TopicCleanup) [NinjaEdit]