https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93971
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Martin Sebor from comment #6) > I've been thinking of one of two kinds of annotation that wouldn't require > programs to change and would be sufficient if applied only to the definition > of the containers: (1) one that would make "std::string::ptr" on par with > that of any other pointer other than char (i.e., a char that's not allowed > to be used to access anything but a char object) but then std::string s; char *p = s.c_str(); *p = '0'; s[0] breaks? ISTR there's ways to get a char * to the std::string storage.