[Bug c++/81159] New warning idea: -Wself-move

2019-04-17 Thread virkony at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81159 Nikolay Orliuk changed: What|Removed |Added CC||virkony at gmail dot com --- Comment

[Bug c++/67906] Missing warning about std::move without effect

2018-08-16 Thread virkony at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67906 --- Comment #9 from Nikolay Orliuk --- Yes. Return value optimization blocked by abusing std::move also close. Somehow I had feeling that I saw something similar from gcc in pre-C++11 times. Regarding sample: struct X { X() { } X(const X&)

[Bug c++/67906] Missing warning about std::move without effect

2017-08-24 Thread virkony at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67906 --- Comment #4 from Nikolay Orliuk --- Hello Sure, struct Value { Value(); Value(const Value&); Value(Value&&); }; struct Frame { Value value; // previously mutable }; Frame top; const

[Bug c++/67906] Missing warning about std::move without effect

2017-08-24 Thread virkony at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67906 --- Comment #3 from Nikolay Orliuk --- Sure, struct Value { Value(); Value(const Value&); Value(Value&&); }; struct Frame { Value value; // previously mutable }; Frame top; const Frame&

[Bug c++/67906] Missing warning about std::move without effect

2017-08-24 Thread virkony at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67906 --- Comment #2 from Nikolay Orliuk --- Sure, struct Value { Value(); Value(const Value&); Value(Value&&); }; struct Frame { Value value; // previously mutable }; Frame top; const Frame&

[Bug c++/67906] New: Missing warning about std::move without effect

2015-10-09 Thread virkony at gmail dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: virkony at gmail dot com Target Milestone: --- It would be nice to have something like -Wno-effect which will issue warnings on usage of std::move for objects that cannot be moved. See also http://stackoverflow.com/q

[Bug c++/59813] New: tail-call elimintation didn't fired with left-shift of char to cout

2014-01-14 Thread virkony at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: virkony at gmail dot com #include iostream using namespace std; void foo() { cout x endl; // ok cout 'x' endl; // kills tail-call elimination in gcc 4.8.2 foo(); } int

[Bug c++/59813] tail-call elimintation didn't fired with left-shift of char to cout

2014-01-14 Thread virkony at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59813 --- Comment #1 from Nikolay Orliuk virkony at gmail dot com --- In 4.7.3 that code works, but changing it to void foo() { cout x endl; // ok cout 'x' endl; // kills tail-call elimination in gcc 4.8.2 struct {} bar; // kills tail

[Bug c++/59813] tail-call elimintation didn't fired with left-shift of char to cout

2014-01-14 Thread virkony at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59813 --- Comment #2 from Nikolay Orliuk virkony at gmail dot com --- My 4.5.4 built without graphite support. Both 4.7.3 and 4.8.2 built with cloog 0.17.0 and isl 0.11.2

[Bug c++/59813] tail-call elimintation didn't fired with left-shift of char to cout

2014-01-14 Thread virkony at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59813 --- Comment #4 from Nikolay Orliuk virkony at gmail dot com --- Andrew Pinski, as long as address of variable isn't taken out of scope of function that is being tail-call optimized there is no need to worry about it and it is safe to optimize. Am