* [wwwdocs] Add reference to pp_format to Coding Conventions
@ 2022-09-21 9:39 Jonathan Wakely
2022-10-18 11:15 ` [ping] " Jonathan Wakely
0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Wakely @ 2022-09-21 9:39 UTC (permalink / raw)
To: gcc-patches
Finding the docs for the GCC-specific diagnostic formats isn't easy.
This might help.
OK for wwwdocs?
---
htdocs/codingconventions.html | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/htdocs/codingconventions.html b/htdocs/codingconventions.html
index e4d30510..f1d1f165 100644
--- a/htdocs/codingconventions.html
+++ b/htdocs/codingconventions.html
@@ -333,7 +333,8 @@ code token.</li>
<li>Diagnostics using the GCC diagnostic functions should generally
use the GCC-specific formats such as <code>%qs</code> or
<code>%<</code> and <code>%></code> for quoting and
-<code>%m</code> for <code>errno</code> numbers.</li>
+<code>%m</code> for <code>errno</code> numbers. See
+<tt>pp_format</tt> in <tt>pretty-print.cc</tt> for supported formats.</li>
<li>Identifiers should generally be formatted with <code>%E</code> or
<code>%qE</code>; use of <code>identifier_to_locale</code> is needed
--
2.37.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* [ping] [wwwdocs] Add reference to pp_format to Coding Conventions
2022-09-21 9:39 [wwwdocs] Add reference to pp_format to Coding Conventions Jonathan Wakely
@ 2022-10-18 11:15 ` Jonathan Wakely
2022-10-18 11:27 ` Jakub Jelinek
0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Wakely @ 2022-10-18 11:15 UTC (permalink / raw)
To: gcc-patches
ping...
On 21/09/22 10:39 +0100, Jonathan Wakely wrote:
>Finding the docs for the GCC-specific diagnostic formats isn't easy.
>This might help.
>
>OK for wwwdocs?
-- >8 --
htdocs/codingconventions.html | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/htdocs/codingconventions.html b/htdocs/codingconventions.html
index e4d30510..f1d1f165 100644
--- a/htdocs/codingconventions.html
+++ b/htdocs/codingconventions.html
@@ -333,7 +333,8 @@ code token.</li>
<li>Diagnostics using the GCC diagnostic functions should generally
use the GCC-specific formats such as <code>%qs</code> or
<code>%<</code> and <code>%></code> for quoting and
-<code>%m</code> for <code>errno</code> numbers.</li>
+<code>%m</code> for <code>errno</code> numbers. See
+<tt>pp_format</tt> in <tt>pretty-print.cc</tt> for supported formats.</li>
<li>Identifiers should generally be formatted with <code>%E</code> or
<code>%qE</code>; use of <code>identifier_to_locale</code> is needed
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ping] [wwwdocs] Add reference to pp_format to Coding Conventions
2022-10-18 11:15 ` [ping] " Jonathan Wakely
@ 2022-10-18 11:27 ` Jakub Jelinek
0 siblings, 0 replies; 3+ messages in thread
From: Jakub Jelinek @ 2022-10-18 11:27 UTC (permalink / raw)
To: Jonathan Wakely; +Cc: gcc-patches
On Tue, Oct 18, 2022 at 12:15:08PM +0100, Jonathan Wakely via Gcc-patches wrote:
> ping...
>
> On 21/09/22 10:39 +0100, Jonathan Wakely wrote:
> > Finding the docs for the GCC-specific diagnostic formats isn't easy.
> > This might help.
> >
> > OK for wwwdocs?
>
> -- >8 --
>
> htdocs/codingconventions.html | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/htdocs/codingconventions.html b/htdocs/codingconventions.html
> index e4d30510..f1d1f165 100644
> --- a/htdocs/codingconventions.html
> +++ b/htdocs/codingconventions.html
> @@ -333,7 +333,8 @@ code token.</li>
> <li>Diagnostics using the GCC diagnostic functions should generally
> use the GCC-specific formats such as <code>%qs</code> or
> <code>%<</code> and <code>%></code> for quoting and
> -<code>%m</code> for <code>errno</code> numbers.</li>
> +<code>%m</code> for <code>errno</code> numbers. See
> +<tt>pp_format</tt> in <tt>pretty-print.cc</tt> for supported formats.</li>
I'm afraid pretty-print.cc covers only some of them.
E.g. tree-diagnostic.cc (default_tree_printer) adds several important
ones (%T, %E, %D and %F; but unfortunately we don't document those like
the comment about pp_format does).
Then there are the C++ specific formats, cp/error.cc (cp_printer) comment
documents those.
fortran/error.cc (error_print) comment similarly for Fortran FE specific
modifiers.
dumpfile.cc (dump_pretty_printer::decode_format) documents its extensions
too.
Jakub
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-10-18 11:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-21 9:39 [wwwdocs] Add reference to pp_format to Coding Conventions Jonathan Wakely
2022-10-18 11:15 ` [ping] " Jonathan Wakely
2022-10-18 11:27 ` Jakub Jelinek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).