This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [patch] Hide the caret for -Wstack-usage


> since displaying the caret was made the default, the -Wstack-usage warning has
> a strange-looking final part:
>
> stack-usage-2.c: In function 'foo2':
> stack-usage-2.c:16:1: warning: stack usage is 920 bytes [-Wstack-usage=]
>  }
>  ^

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.

Then you could use warning_at(loc, ...).

Cheers,

Manuel.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]