public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/106098] New: error message that uses ANSI codes that can cause characters to disappear
@ 2022-06-27 1:48 jonathan.poelen at gmail dot com
2022-06-27 1:52 ` [Bug c++/106098] " pinskia at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: jonathan.poelen at gmail dot com @ 2022-06-27 1:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106098
Bug ID: 106098
Summary: error message that uses ANSI codes that can cause
characters to disappear
Product: gcc
Version: 12.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: jonathan.poelen at gmail dot com
Target Milestone: ---
Created attachment 53204
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53204&action=edit
comparison between a 106 and 127 column terminal
int main() {
char const* b = "" + "";
}
$ g++ -fdiagnostics-color=always test.cpp
test.cpp: In function ‘int main()’:
test.cpp:2:22: error: invalid operands of types ‘const char [1]’ and ‘const
char [1]’ to binary ‘operator ’
[...]
On a terminal of 106 characters per line, the `+` sign disappeared. This is due
to the use of the ANSI code \x1b[K which normally removes the characters to the
right of the cursor. However, many terminals make the last character of the
line disappear when this code is used at the end of the line. This is the case
here with a 106 column terminal ($COLUMNS=106).
I don't know why \x1b[K is used, but as far as I can see, it is useless.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/106098] error message that uses ANSI codes that can cause characters to disappear
2022-06-27 1:48 [Bug c++/106098] New: error message that uses ANSI codes that can cause characters to disappear jonathan.poelen at gmail dot com
@ 2022-06-27 1:52 ` pinskia at gcc dot gnu.org
2022-06-27 1:57 ` pinskia at gcc dot gnu.org
2022-06-27 1:59 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-06-27 1:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106098
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
What terminal are you using?
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/106098] error message that uses ANSI codes that can cause characters to disappear
2022-06-27 1:48 [Bug c++/106098] New: error message that uses ANSI codes that can cause characters to disappear jonathan.poelen at gmail dot com
2022-06-27 1:52 ` [Bug c++/106098] " pinskia at gcc dot gnu.org
@ 2022-06-27 1:57 ` pinskia at gcc dot gnu.org
2022-06-27 1:59 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-06-27 1:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106098
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 90411.
*** This bug has been marked as a duplicate of bug 90411 ***
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/106098] error message that uses ANSI codes that can cause characters to disappear
2022-06-27 1:48 [Bug c++/106098] New: error message that uses ANSI codes that can cause characters to disappear jonathan.poelen at gmail dot com
2022-06-27 1:52 ` [Bug c++/106098] " pinskia at gcc dot gnu.org
2022-06-27 1:57 ` pinskia at gcc dot gnu.org
@ 2022-06-27 1:59 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-06-27 1:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106098
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> What terminal are you using?
Basically some terminals implement this differently and maybe even incorrectly.
See the other (still open) bug report for more details on this and even on the
some of the terminals emulations and such.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-06-27 1:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-27 1:48 [Bug c++/106098] New: error message that uses ANSI codes that can cause characters to disappear jonathan.poelen at gmail dot com
2022-06-27 1:52 ` [Bug c++/106098] " pinskia at gcc dot gnu.org
2022-06-27 1:57 ` pinskia at gcc dot gnu.org
2022-06-27 1:59 ` pinskia 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).