The patch was too big to go through (it said it was waiting for moderation, so maybe it will go through one day). Here it is as an attachment. Here's the commit message and ChangeLog for your convenience: Remove TYPE_CODE, changing all the call sites to use type::code directly. This is quite a big diff, but this was mostly done using sed and coccinelle. A few call sites were done by hand. gdb/ChangeLog: * gdbtypes.h (TYPE_CODE): Remove. Change all call sites to use type::code instead.