public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/102613] New: [C++23] P2246R1 - Character encoding of diagnostic text
@ 2021-10-05 16:34 mpolacek at gcc dot gnu.org
2023-08-22 15:30 ` [Bug c++/102613] " jakub at gcc dot gnu.org
2023-08-22 15:33 ` jakub at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-10-05 16:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102613
Bug ID: 102613
Summary: [C++23] P2246R1 - Character encoding of diagnostic
text
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: mpolacek at gcc dot gnu.org
Target Milestone: ---
See https://wg21.link/p2246r1
This might be a noop, but we should include some tests probably.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/102613] [C++23] P2246R1 - Character encoding of diagnostic text
2021-10-05 16:34 [Bug c++/102613] New: [C++23] P2246R1 - Character encoding of diagnostic text mpolacek at gcc dot gnu.org
@ 2023-08-22 15:30 ` jakub at gcc dot gnu.org
2023-08-22 15:33 ` jakub at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-08-22 15:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102613
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org,
| |jason at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Is there anything we need to do here?
From what I can see, e.g. for static assertions which is one of the two changed
points
we reencode the message from -finput-charset= charset if supplied to UTF-8 and
then emit the UTF-8 chars to the terminal regardless of locale's charset
unobfuscated, so say given:
static_assert (false, "��c");
and -finput-charset=ISO-8859-1
00.C:1:16: error: static assertion failed: áæc
1 | static_assert (false, "áæc");
| ^~~~~
is emitted, while without that -finput-charset= (i.e. when it is invalid
UTF-8), we emit
00.C:1:16: error: static assertion failed: ��c
1 | static_assert (false, "��c");
| ^~~~~
On valid UTF-8 emoji:
static_assert (false, "😀");
we emit
01.C:1:16: error: static assertion failed: 😀
1 | static_assert (false, "😀");
| ^~~~~
and with -finput-charset=ISO-8859-1
01.C:1:16: error: static assertion failed: ð
1 | static_assert (false, "ð");
| ^~~~~
Not really sure what to do for our testsuite for this though, because while we
can use -finput-charset= in dg-options, we have no control on what the pseudo
terminal encoding actually is.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/102613] [C++23] P2246R1 - Character encoding of diagnostic text
2021-10-05 16:34 [Bug c++/102613] New: [C++23] P2246R1 - Character encoding of diagnostic text mpolacek at gcc dot gnu.org
2023-08-22 15:30 ` [Bug c++/102613] " jakub at gcc dot gnu.org
@ 2023-08-22 15:33 ` jakub at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-08-22 15:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102613
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Looking at what clang++ does, they emit
01.C:1:1: error: static_assert failed "\360\237\230\200"
etc. and don't really support -finput-charset=ISO-8859-1 etc.
(-finput-charset=utf-8 works).
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-08-22 15:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-05 16:34 [Bug c++/102613] New: [C++23] P2246R1 - Character encoding of diagnostic text mpolacek at gcc dot gnu.org
2023-08-22 15:30 ` [Bug c++/102613] " jakub at gcc dot gnu.org
2023-08-22 15:33 ` jakub at gcc dot gnu.org
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).