public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* libstdc++ Chapter 28. Demangling example
@ 2023-03-31 15:24 Jonny Grant
  2023-03-31 16:18 ` Jonathan Wakely
  0 siblings, 1 reply; 11+ messages in thread
From: Jonny Grant @ 2023-03-31 15:24 UTC (permalink / raw)
  To: libstdc++

Hello

I tried out this code. Maybe I'm doing something wrong?

https://godbolt.org/z/Y78h4f1W6

https://gcc.gnu.org/onlinedocs/gcc-12.2.0/libstdc++/manual/manual/ext_demangling.html

However only get reduced output after status -2 is returned:

std::bad_exception	=> 

Looks like std::cout gets broken by the nullptr realname (that's a frustration). So I put an if(realname) in the godbolt link above.

Maybe it's also a good time to update the example abi::__cxa_demangle call from those 0 parameters to be NULL?

Cheers, Jonny

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-04-18 23:12 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-31 15:24 libstdc++ Chapter 28. Demangling example Jonny Grant
2023-03-31 16:18 ` Jonathan Wakely
2023-03-31 20:38   ` Jonny Grant
2023-04-04 11:26     ` Jonathan Wakely
2023-04-12 15:09       ` Jonny Grant
2023-04-12 15:36         ` Jonathan Wakely
2023-04-12 16:07           ` Jonny Grant
2023-04-18 13:00             ` Jonny Grant
2023-04-18 14:49               ` Jonathan Wakely
2023-04-18 22:50                 ` Jonny Grant
2023-04-18 23:12                   ` Jonathan Wakely

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).