This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] initial location support for C parser
2008/9/3 Jakub Jelinek <jakub@redhat.com>:
>
> Why do you need it? Isn't %H, %J and %K in error/warning format string
> sufficient? Wonder why warning_at has been added too.
No, those are going to be deprecated. All diagnostics functions will
take an explicit location (such as pedwarn, inform and permerror do
right now). I was working to get this done before we entered stage3
but I did not have enough time to finish the transition.
Just a few reasons to remove them:
* They are not needed once all diagnostic functions take an explicit location.
* They are processed too late to influence the inhibition of
diagnostics depending on system_headers(location).
* They obfuscate code unnecessarily. %J is not as clear as DECL_LOCATION (t).
Meanwhile, adding an error_at function is the right thing to do.
Later, doing s/error_at (location,/error (location,/ will be
straightforward.
Cheers,
Manuel.