------- Comment #7 from tromey at gcc dot gnu dot org 2008-09-23 20:48 ------- Jan> Tom, could you elaborate why x1 and x2 should be printed differently? Jan> I do not say they should not but I do not see a clear reason for either way.
My view is that "whatis" should print the declared type, as much as possible. Note that this is a contrived example. Here, it hardly matters. However, there are many cases where "whatis" shows something incomprehensible to the user. Jan> Should we also try to record the source name of this variable? Jan> #define OBJECT_VAR(object, var) object ## _ ## var Jan> int OBJECT_VAR (window, width); Yeah, we can't do a perfect job all the time. We have to print something, of course, and I suggest using the tokens naming the type (or variable) after preprocessing -- mostly because that is easy and gets the right answer when the user does not do cpp tricks. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37590