diff options
author | Andrew Stubbs <ams@codesourcery.com> | 2018-09-11 10:26:57 +0000 |
---|---|---|
committer | Andrew Stubbs <ams@gcc.gnu.org> | 2018-09-11 10:26:57 +0000 |
commit | ad172f720de079e6169897e5edada8d887560a33 (patch) | |
tree | d3177108bda8a7903b833775c9aafbfc6cadb6b7 /gcc/diagnostic-core.h | |
parent | 075cdac363c06c1524732855eee852965737c5ec (diff) |
Add sorry_at diagnostic function.
The plain "sorry" diagnostic only gives the "current" location, which is
typically the last line of the function or translation unit by time we get to
the back end.
GCN uses "sorry" to report unsupported language features, such as static
constructors, so it's useful to have a "sorry_at" variant.
This patch implements "sorry_at" according to the pattern of the other "at"
variants.
2018-09-11 Andrew Stubbs <ams@codesourcery.com>
gcc/
* diagnostic-core.h (sorry_at): New prototype.
* diagnostic.c (sorry_at): New function.
From-SVN: r264204
Diffstat (limited to 'gcc/diagnostic-core.h')
-rw-r--r-- | gcc/diagnostic-core.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/diagnostic-core.h b/gcc/diagnostic-core.h index e4ebe005ede..80ff39541e6 100644 --- a/gcc/diagnostic-core.h +++ b/gcc/diagnostic-core.h @@ -96,6 +96,7 @@ extern bool permerror (location_t, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3); extern bool permerror (rich_location *, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3); extern void sorry (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2); +extern void sorry_at (location_t, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3); extern void inform (location_t, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3); extern void inform (rich_location *, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3); extern void inform_n (location_t, unsigned HOST_WIDE_INT, const char *, |