[Bug libstdc++/83755] New: Pretty printers treat char* as NTBS
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jan 9 16:10:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83755
Bug ID: 83755
Summary: Pretty printers treat char* as NTBS
Product: gcc
Version: 7.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
Target Milestone: ---
#include <memory>
int main()
{
char a[] = {"abcd";
std::unique_ptr<char> p(&a[0]);
p.release();
}
This prints:
$1 = std::unique_ptr<char> containing 0x7fffffffd38b "abcd"
The stored pointer is not a NTBS, it's just a single char.
(Related to PR 59170)
More information about the Gcc-bugs
mailing list