From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zack Weinberg To: Diego Novillo Cc: Florian Weimer , dewar@gnat.com, bosch@gnat.com, gcc@gcc.gnu.org, kenner@vlsi1.ultra.nyu.edu Subject: Re: Ada files now checked in Date: Sat, 06 Oct 2001 19:55:00 -0000 Message-id: <20011006195456.C9432@codesourcery.com> References: <20011006204014.60CF9F28AE@nile.gnat.com> <20011006165021.B29684@tornado.cygnus.com> <87itdse9we.fsf@deneb.enyo.de> <20011006171245.B30573@tornado.cygnus.com> X-SW-Source: 2001-10/msg00461.html On Sat, Oct 06, 2001 at 05:12:45PM -0400, Diego Novillo wrote: > On Sat, 06 Oct 2001, Florian Weimer wrote: > > > Well, Robert probably wants to see something like this: > > > > foo.c: In function `main': > > foo.c:5:7: warning: `b' is used uninitialized at this point > > > > Looking at the warning message and its different modality to the > > standard one, I think the branch currently tackles the problem of > > false positives, not the problem of friendly reporting. > > > Ah, I see. Yes, the warning message uses the line number > information stored in the statement containing the offending > expression. I don't know if absolute line and column numbers are > stored in the trees. I don't know if they are now, but there isn't any deep reason why they couldn't be. For C and C++, we have column number information coming back from the preprocessor now, and I understand that the new C++ parser is going to use that information for its own error reporting. It shouldn't be that much harder to annotate variable uses with their source position at the tree level. It is probably too much to hope for to get that into RTL. I would also like to see this level of detail in uninitialized variable warnings. zw