On 12 July 2014 03:39, Eric Botcazou <ebotca...@adacore.com> wrote: >> Your patch hides the caret but the location still points to the >> closing brace (so if you use an IDE like emacs this is where you will >> go). >> >> Is there a location for the definition? Could we store/pass one to this >> point? >> >> Otherwise, would it be appropriate to point to the declaration of the >> function? After all, this is what -fstack-usage seems to do. > > Good idea, let's use a consistent location, revised patch attached, thanks.
I personally don't like much this pattern of saving a variable, doing something and then restoring it. This old patch: https://gcc.gnu.org/ml/gcc-patches/2012-04/msg01836.html added control flags to diagnostics, like we have for the various dump_ functions. This seems cleaner to me, but it may be a matter of style. Otherwise, this looks like an improvement overall. Cheers, Manuel.