https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66157
--- Comment #9 from Luca Stoppa ---
I see.
Thanks again for your answer.
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,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66157
--- Comment #5 from Luca Stoppa ---
I think you can close this "bug".
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.
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?
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
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,
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.
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")) { ..
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
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* )
11 matches
Mail list logo