[Bug tree-optimization/93971] std::string considered to alias declared objects of incompatible types

2023-11-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93971 --- Comment #12 from Jonathan Wakely --- (In reply to Jason Merrill from comment #11) > I don't think it's valid to use a plain char array as storage for an object > of another type; the "provides storage" wording in >

[Bug tree-optimization/93971] std::string considered to alias declared objects of incompatible types

2021-12-11 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93971 Jason Merrill changed: What|Removed |Added Status|UNCONFIRMED |NEW CC|

[Bug tree-optimization/93971] std::string considered to alias declared objects of incompatible types

2020-03-02 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93971 --- Comment #10 from Jonathan Wakely --- Using std::string as a dynamically-resizable buffer of bytes isn't completely unreasonable, although I can't see many reasons to prefer std::string to std::vector for that purpose. For either type, it

[Bug tree-optimization/93971] std::string considered to alias declared objects of incompatible types

2020-03-02 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93971 --- Comment #9 from Martin Sebor --- The possibility of storing something other than char in std::string never entered my mind, and I'm pretty sure the container was never meant for that. But whether the standard has all the restrictions in

[Bug tree-optimization/93971] std::string considered to alias declared objects of incompatible types

2020-03-02 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93971 --- Comment #8 from Richard Biener --- (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

[Bug tree-optimization/93971] std::string considered to alias declared objects of incompatible types

2020-03-01 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93971 --- Comment #7 from Marc Glisse --- (In reply to Martin Sebor from comment #6) > (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

[Bug tree-optimization/93971] std::string considered to alias declared objects of incompatible types

2020-03-01 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93971 --- Comment #6 from Martin Sebor --- As a baseline, I think it would be great to get std::string to enjoy the same benefits as other containers WRT aliasing. Going a step further, I'd expect users of all containers to benefit from the aliasing

[Bug tree-optimization/93971] std::string considered to alias declared objects of incompatible types

2020-02-29 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93971 --- Comment #5 from Marc Glisse --- It has never been very clear to me what restrict means on a struct member, but I believe adding it to the pointer in vector means that in a function: void f(vector*a, vector*b) the compiler could assume that

[Bug tree-optimization/93971] std::string considered to alias declared objects of incompatible types

2020-02-28 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93971 Martin Sebor changed: What|Removed |Added Status|RESOLVED|UNCONFIRMED Resolution|WONTFIX

[Bug tree-optimization/93971] std::string considered to alias declared objects of incompatible types

2020-02-28 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93971 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug tree-optimization/93971] std::string considered to alias declared objects of incompatible types

2020-02-28 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93971 Martin Sebor changed: What|Removed |Added Summary|C++ containers considered |std::string considered to