Here is a quite simple modcomp, which has the intent of allowing multiple professions to use a building, sharing it's slots.
The icon next to the building will be of the yield produced by the profession higher up in the xml order; likewise, when you drop a citizen in the building, it will by default choose the profession higher up in the xml order (which isn't much of a problem, as you can choose the profession normally through the profession choice popup).
The python and SDK modifications can be found by searching for the tags #Androrc and //Androrc, respectively.
As an example, the Gunsmith profession is set to use the SpecialBuilding that the Blacksmith uses (SPECIALBUILDING_TOOLS).
UPDATE: With the help of KJ Jansson, version 1.1 improves the interface show up of Multiple Professions per Building.
UPDATE 2: Now in version 1.2, when dragging a unit in the city screen to a building that can have multiple professions, a popup appears to ask which profession the unit should have.
UPDATE 3: Fixed a bug. The change can be found by searching for "//Androrc Multiple Professions per Building 1.3" in CvCity.cpp.
UPDATE 4: Fixed another bug; the changes can be found here.
Multiple Professions per Building Modcomp 1.4 2016-10-05
Multiple Professions per Building Modcomp 1.4