This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Hide the caret for -Wstack-usage
- From: Manuel López-Ibáñez <lopezibanez at gmail dot com>
- To: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 12 Jul 2014 18:38:36 -0700
- Subject: Re: [patch] Hide the caret for -Wstack-usage
- Authentication-results: sourceware.org; auth=none
- References: <CAESRpQA1_zyjC5vuOYXPAffZeO=86iQodZDmuf_K_qZYV9MwCw at mail dot gmail dot com> <6995396 dot hkixl5ZJ3M at polaris>
On 12 July 2014 03:39, Eric Botcazou <ebotcazou@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.