I actually have a vague recollection that gcc used to implement something along these lines, but I couldn't find it in five minutes of searching.
I think you're thinking of the old xref code in the C++ frontend or the old typeinfo. One could get at the names of the members and their sizes as I recall... It was around in 1992, if someone wanted to go find it.