This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] avoid non-printable characters in diagnostics (c/77620, c/77521)
- From: Gerald Pfeifer <gerald at pfeifer dot com>
- To: Martin Sebor <msebor at gmail dot com>
- Cc: Joseph Myers <joseph at codesourcery dot com>, gcc-patches at gcc dot gnu dot org
- Date: Sat, 31 Dec 2016 15:08:59 -0400 (AST)
- Subject: Re: [PATCH] avoid non-printable characters in diagnostics (c/77620, c/77521)
- Authentication-results: sourceware.org; auth=none
- References: <57D21C36.3020906@gmail.com> <alpine.DEB.2.20.1609091354170.24297@digraph.polyomino.org.uk> <57D34305.3020908@gmail.com>
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 consistency (and
> to help with readability if there is consensus that one is clearer
> than the other).
I do think hex is the way to go, and that it would be good to be
consistent across the board.
(All e-mail alert, but I don't think I saw a response to that.)
> What I meant by ambiguity is for example a string like "\1234"
> where it's not obvious where the octal sequence ends. Is it '\1'
> followed by "234" or '\12' followed by "34" or '\123' followed
> by "4"? (It's only possible to tell if one knows that GCC always
> uses three digits for the octal character, but not everyone knows
> that.)
Agreed. And octal notation is just not very common today, too,
I'd argue.
Gerald