Characters with bite attacks or other non-hand natural attacks, monks and perhaps other characters with Improved Unarmed Strike, and characters with Monkey Grip using a Longspear and a non-reach weapon all can make melee attacks wile wielding a Longspear though they can not make them with the Longspear.
I believe there are also some non-core feats and what not that allow characters with reach weapons to attack adjacent characters.
I have in the past as a house rule let players use the Longspear and other similar reach weapons an improvised clubs against creatures inside their normal reach.