public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/98576] New: std::source_location should return EBCDIC encoding strings under EBCDIC execution charset charsets
@ 2021-01-07 3:43 unlvsur at live dot com
2021-01-07 3:47 ` [Bug c++/98576] " unlvsur at live dot com
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: unlvsur at live dot com @ 2021-01-07 3:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98576
Bug ID: 98576
Summary: std::source_location should return EBCDIC encoding
strings under EBCDIC execution charset charsets
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: unlvsur at live dot com
Target Milestone: ---
-fexec-charset=IBM-12712
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/98576] std::source_location should return EBCDIC encoding strings under EBCDIC execution charset charsets
2021-01-07 3:43 [Bug c++/98576] New: std::source_location should return EBCDIC encoding strings under EBCDIC execution charset charsets unlvsur at live dot com
@ 2021-01-07 3:47 ` unlvsur at live dot com
2021-01-07 3:54 ` unlvsur at live dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: unlvsur at live dot com @ 2021-01-07 3:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98576
cqwrteur <unlvsur at live dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org,
| |unlvsur at live dot com
--- Comment #1 from cqwrteur <unlvsur at live dot com> ---
OH NO!!
#include<iostream>
#include<source_location>
int main()
{
std::cout<<std::source_location::current().file_name();
}
~
~
cqwrteur@Home-Server:~/fast_io/.tmp$ g++ -o source2 source2.cc -Ofast
-std=c++20 -s -flto -fexec-charset=IBM12712
cqwrteur@Home-Server:~/fast_io/.tmp$ ./source2
source2.cccqwrteur@Home-Server:~/fast_io/.tmp$
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/98576] std::source_location should return EBCDIC encoding strings under EBCDIC execution charset charsets
2021-01-07 3:43 [Bug c++/98576] New: std::source_location should return EBCDIC encoding strings under EBCDIC execution charset charsets unlvsur at live dot com
2021-01-07 3:47 ` [Bug c++/98576] " unlvsur at live dot com
@ 2021-01-07 3:54 ` unlvsur at live dot com
2021-01-07 3:55 ` unlvsur at live dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: unlvsur at live dot com @ 2021-01-07 3:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98576
--- Comment #2 from cqwrteur <unlvsur at live dot com> ---
The same issue can be found with any EXEC charset besides UTF-8.
I really hope GCC could provide a macro to let me know what the current
execution charset is so I can output the correct thing under the current
encoding with iconv.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/98576] std::source_location should return EBCDIC encoding strings under EBCDIC execution charset charsets
2021-01-07 3:43 [Bug c++/98576] New: std::source_location should return EBCDIC encoding strings under EBCDIC execution charset charsets unlvsur at live dot com
2021-01-07 3:47 ` [Bug c++/98576] " unlvsur at live dot com
2021-01-07 3:54 ` unlvsur at live dot com
@ 2021-01-07 3:55 ` unlvsur at live dot com
2021-01-07 9:41 ` phdofthehouse at gmail dot com
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: unlvsur at live dot com @ 2021-01-07 3:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98576
--- Comment #3 from cqwrteur <unlvsur at live dot com> ---
(In reply to cqwrteur from comment #2)
> The same issue can be found with any EXEC charset besides UTF-8.
>
> I really hope GCC could provide a macro to let me know what the current
> execution charset is so I can output the correct thing under the current
> encoding with iconv.
Particularly GB18030 I think.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/98576] std::source_location should return EBCDIC encoding strings under EBCDIC execution charset charsets
2021-01-07 3:43 [Bug c++/98576] New: std::source_location should return EBCDIC encoding strings under EBCDIC execution charset charsets unlvsur at live dot com
` (2 preceding siblings ...)
2021-01-07 3:55 ` unlvsur at live dot com
@ 2021-01-07 9:41 ` phdofthehouse at gmail dot com
2021-01-07 9:56 ` unlvsur at live dot com
2021-01-07 10:06 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: phdofthehouse at gmail dot com @ 2021-01-07 9:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98576
JeanHeyd Meneide <phdofthehouse at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |phdofthehouse at gmail dot com
--- Comment #4 from JeanHeyd Meneide <phdofthehouse at gmail dot com> ---
https://gcc.gnu.org/pipermail/gcc-patches/2020-December/560784.html
A new version of GCC will include the execution charset and wide execution
charset as a string option in the preprocessor that matches the iconv
conversion name passed to the command line.
I'm not sure what to do about the other stuff, though. 😅
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/98576] std::source_location should return EBCDIC encoding strings under EBCDIC execution charset charsets
2021-01-07 3:43 [Bug c++/98576] New: std::source_location should return EBCDIC encoding strings under EBCDIC execution charset charsets unlvsur at live dot com
` (3 preceding siblings ...)
2021-01-07 9:41 ` phdofthehouse at gmail dot com
@ 2021-01-07 9:56 ` unlvsur at live dot com
2021-01-07 10:06 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: unlvsur at live dot com @ 2021-01-07 9:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98576
--- Comment #5 from cqwrteur <unlvsur at live dot com> ---
(In reply to JeanHeyd Meneide from comment #4)
> https://gcc.gnu.org/pipermail/gcc-patches/2020-December/560784.html
>
> A new version of GCC will include the execution charset and wide execution
> charset as a string option in the preprocessor that matches the iconv
> conversion name passed to the command line.
>
> I'm not sure what to do about the other stuff, though. 😅
😅 I think leaving it as UTF-8 is fine, as long as we can have macros for
getting execution charsets.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/98576] std::source_location should return EBCDIC encoding strings under EBCDIC execution charset charsets
2021-01-07 3:43 [Bug c++/98576] New: std::source_location should return EBCDIC encoding strings under EBCDIC execution charset charsets unlvsur at live dot com
` (4 preceding siblings ...)
2021-01-07 9:56 ` unlvsur at live dot com
@ 2021-01-07 10:06 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-01-07 10:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98576
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jsm28 at gcc dot gnu.org
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
__builtin_FUNCTION and __builtin_FILE that the __builtin_source_location
implementation is based on don't remap to execution charset either.
const char *
foo (void)
{
return __builtin_FUNCTION ();
}
const char *
bar (void)
{
return "bar";
}
const char *
baz (void)
{
return __FILE__;
}
const char *
qux (void)
{
return __FUNCTION__;
}
const char *
corge (void)
{
return __PRETTY_FUNCTION__;
}
const char *
garply (void)
{
return __builtin_FILE ();
}
./cc1 -quiet -O2 pr98576.c -fexec-charset=EBCDIC-US; grep string pr98576.s
.string "foo"
.string "\202\201\231"
.string "\227\231\371\370\365\367\366K\203"
.string "pr98576.c"
.string "\203\226\231\207\205"
.string "\230\244\247"
./cc1plus -quiet -O2 pr98576.c -fexec-charset=EBCDIC-US; grep string pr98576.s
.string "foo"
.string "\202\201\231"
.string "\227\231\371\370\365\367\366K\203"
.string "\230\244\247"
.string "const char* corge()"
.string "pr98576.c"
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-01-07 10:06 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-07 3:43 [Bug c++/98576] New: std::source_location should return EBCDIC encoding strings under EBCDIC execution charset charsets unlvsur at live dot com
2021-01-07 3:47 ` [Bug c++/98576] " unlvsur at live dot com
2021-01-07 3:54 ` unlvsur at live dot com
2021-01-07 3:55 ` unlvsur at live dot com
2021-01-07 9:41 ` phdofthehouse at gmail dot com
2021-01-07 9:56 ` unlvsur at live dot com
2021-01-07 10:06 ` 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).