[Bug libstdc++/66157] bits/random.tcc compiler error when using -fno-for-scope

2015-05-18 Thread luca.stoppa at bbh dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66157 --- Comment #9 from Luca Stoppa --- I see. Thanks again for your answer.

[Bug libstdc++/66157] bits/random.tcc compiler error when using -fno-for-scope

2015-05-15 Thread luca.stoppa at bbh dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66157 --- Comment #7 from Luca Stoppa --- Well, even if my production code is 20 years old, the example I have attached isn't. It is valid c++11/14 code. Would you call something like this "old c++ code"? #include int main() { std::vector v{1,2,

[Bug libstdc++/66157] bits/random.tcc compiler error when using -fno-for-scope

2015-05-15 Thread luca.stoppa at bbh dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66157 --- Comment #5 from Luca Stoppa --- I think you can close this "bug".

[Bug libstdc++/66157] bits/random.tcc compiler error when using -fno-for-scope

2015-05-15 Thread luca.stoppa at bbh dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66157 --- Comment #4 from Luca Stoppa --- It is a very very very... old application written like 20 years ago. Anyway, we'll try to remove that option from our build process. Thanks for your answer.

[Bug libstdc++/66157] bits/random.tcc compiler error when using -fno-for-scope

2015-05-15 Thread luca.stoppa at bbh dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66157 --- Comment #2 from Luca Stoppa --- I'm sorry, what do you mean with "don't do that"? Can you please tell me whether c++11/14 with -fno-for-scope is supported?

[Bug libstdc++/66157] New: bits/random.tcc compiler error when using -fno-for-scope

2015-05-15 Thread luca.stoppa at bbh dot com
Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: luca.stoppa at bbh dot com Target Milestone: --- Created attachment 35545 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35545&action=edit That example won't compile

[Bug libstdc++/59048] std::string operator== between std::string and const char* creates unecessary temporary object

2013-11-08 Thread luca.stoppa at bbh dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59048 --- Comment #10 from Luca Stoppa --- Hi, honestly I don't know what PIC means, but I did like you suggested. I have added a wrapper to memcmp() that is not inlined. __attribute__((noinline)) int memcmp_not_inlined (const char *s1, const char *s2,

[Bug libstdc++/59048] std::string operator== between std::string and const char* creates unecessary temporary object

2013-11-08 Thread luca.stoppa at bbh dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59048 --- Comment #9 from Luca Stoppa --- Created attachment 31182 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31182&action=edit not inlined memcmp used.

[Bug libstdc++/59048] std::string operator== between std::string and const char* creates unecessary temporary object

2013-11-08 Thread luca.stoppa at bbh dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59048 --- Comment #5 from Luca Stoppa --- Thanks a lot, so if memcmp() is called, how can the difference in performance be explained? In short: std::string s="something"; if (s == "something") { ... } and if (0 == strcmp(s.c_str(),"something")) { ..

[Bug libstdc++/59048] std::string operator== between std::string and const char* creates unecessary temporary object

2013-11-08 Thread luca.stoppa at bbh dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59048 --- Comment #3 from Luca Stoppa --- Created attachment 31181 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31181&action=edit testcase g++ -O3 mapping.cpp time ./a.out 1000 f time ./a.out 1000 g time ./a.out 1000 h time ./a.out

[Bug c++/59048] New: std::string operator== between std::string and const char* creates unecessary temporary object

2013-11-08 Thread luca.stoppa at bbh dot com
Severity: major Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: luca.stoppa at bbh dot com Template functions bool operator==( const char*, const std::string& ) and bool operator==( const std::string&, const char* )