Re: [PATCH] avoid non-printable characters in diagnostics (c/77620, c/77521)

2017-01-01 Thread Martin Sebor
On 12/31/2016 12:08 PM, Gerald Pfeifer wrote: On Fri, 9 Sep 2016, Martin Sebor wrote: I mentioned the hex vs octal notation to invite input into which of the two of them people would prefer to see used by the %qc and qs directives, and whether it's worth considering changing the %qE directive

Re: [PATCH] avoid non-printable characters in diagnostics (c/77620, c/77521)

2016-12-31 Thread Gerald Pfeifer
On Fri, 9 Sep 2016, Martin Sebor wrote: > I mentioned the hex vs octal notation to invite input into which > of the two of them people would prefer to see used by the %qc and > qs directives, and whether it's worth considering changing the %qE > directive to use the same notation as well, for

Re: [PATCH] avoid non-printable characters in diagnostics (c/77620, c/77521)

2016-09-16 Thread Jeff Law
On 09/08/2016 08:19 PM, Martin Sebor wrote: While working on the -Wformat-length pass I noticed that in some diagnostics that make use of the %qc and %qs directives GCC prints non-printable characters raw. For example, it might print a newline, corrupting the diagnostic stream (bug 77521).

Re: [PATCH] avoid non-printable characters in diagnostics (c/77620, c/77521)

2016-09-16 Thread Jeff Law
On 09/09/2016 05:17 PM, Martin Sebor wrote: On 09/09/2016 07:59 AM, Joseph Myers wrote: On Thu, 8 Sep 2016, Martin Sebor wrote: PS I used hexadecimal based on what c-format.c does but now that I checked more carefully how %qE formats string literals I see it uses octal. I think hexadecimal

Re: [PATCH] avoid non-printable characters in diagnostics (c/77620, c/77521)

2016-09-09 Thread Martin Sebor
On 09/09/2016 07:59 AM, Joseph Myers wrote: On Thu, 8 Sep 2016, Martin Sebor wrote: PS I used hexadecimal based on what c-format.c does but now that I checked more carefully how %qE formats string literals I see it uses octal. I think hexadecimal is preferable because it avoids ambiguity but

Re: [PATCH] avoid non-printable characters in diagnostics (c/77620, c/77521)

2016-09-09 Thread Joseph Myers
On Thu, 8 Sep 2016, Martin Sebor wrote: > PS I used hexadecimal based on what c-format.c does but now that > I checked more carefully how %qE formats string literals I see it > uses octal. I think hexadecimal is preferable because it avoids > ambiguity but I'm open to changing it to octal if

[PATCH] avoid non-printable characters in diagnostics (c/77620, c/77521)

2016-09-08 Thread Martin Sebor
While working on the -Wformat-length pass I noticed that in some diagnostics that make use of the %qc and %qs directives GCC prints non-printable characters raw. For example, it might print a newline, corrupting the diagnostic stream (bug 77521). Some other diagnostics that try to avoid this