[Bug libstdc++/67503] String cannot be loaded from binary representation

2015-09-09 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67503 --- Comment #12 from Jonathan Wakely --- (In reply to radventure from comment #6) > Code validity it's great. But what about backward compatibility? We do not retain backwards compatibility with invalid code. Valid code using std::string still

[Bug libstdc++/67503] String cannot be loaded from binary representation

2015-09-09 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67503 --- Comment #11 from Marc Glisse --- (In reply to radventure from comment #9) > I understand the "small string optimization" idea. I agree about allocation > counting. But I don't see space economy, now sizeof(string) is 28 bytes in > 32-bit envi

[Bug libstdc++/67503] String cannot be loaded from binary representation

2015-09-08 Thread radventure at yandex dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67503 --- Comment #10 from radventure at yandex dot ru --- (In reply to radventure from comment #9) > I understand the "small string optimization" idea. I agree about allocation > counting. But I don't see space economy, now sizeof(string) is 28 bytes i

[Bug libstdc++/67503] String cannot be loaded from binary representation

2015-09-08 Thread radventure at yandex dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67503 --- Comment #9 from radventure at yandex dot ru --- I understand the "small string optimization" idea. I agree about allocation counting. But I don't see space economy, now sizeof(string) is 28 bytes in 32-bit environment instead of 4 bytes early.

[Bug libstdc++/67503] String cannot be loaded from binary representation

2015-09-08 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67503 --- Comment #8 from Andrew Pinski --- (In reply to radventure from comment #5) > When you use local buffer for storing string value it not necessary to have > pointer to it. And we can reduce the size of string by the syzeof(pointer). Well an un

[Bug libstdc++/67503] String cannot be loaded from binary representation

2015-09-08 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67503 --- Comment #7 from Andrew Pinski --- This is just like having a struct like: Struct { Char a[4]; Char *b = a; }; Sorry for char and struct being in the wrong case. Also using a c++11 feature to show the case easier. This is a valid thing t

[Bug libstdc++/67503] String cannot be loaded from binary representation

2015-09-08 Thread radventure at yandex dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67503 --- Comment #6 from radventure at yandex dot ru --- (In reply to Jonathan Wakely from comment #4) > (In reply to radventure from comment #3) > > I can solve the alignment but prbolem will not be fixed. > > I agree with remark about "non-trivial t

[Bug libstdc++/67503] String cannot be loaded from binary representation

2015-09-08 Thread radventure at yandex dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67503 --- Comment #5 from radventure at yandex dot ru --- When you use local buffer for storing string value it not necessary to have pointer to it. And we can reduce the size of string by the syzeof(pointer).

[Bug libstdc++/67503] String cannot be loaded from binary representation

2015-09-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67503 Jonathan Wakely changed: What|Removed |Added Resolution|WONTFIX |INVALID --- Comment #4 from Jonathan W

[Bug libstdc++/67503] String cannot be loaded from binary representation

2015-09-08 Thread radventure at yandex dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67503 radventure at yandex dot ru changed: What|Removed |Added Resolution|INVALID |WONTFIX

[Bug libstdc++/67503] String cannot be loaded from binary representation

2015-09-08 Thread radventure at yandex dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67503 --- Comment #3 from radventure at yandex dot ru --- I can solve the alignment but prbolem will not be fixed. I agree with remark about "non-trivial types" but this code works in previous gcc versions and works in visual c++ 2015.

[Bug libstdc++/67503] String cannot be loaded from binary representation

2015-09-08 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67503 --- Comment #2 from Andrew Pinski --- Also there is an alignment issue with your example too.

[Bug libstdc++/67503] String cannot be loaded from binary representation

2015-09-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67503 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---