[Bug c++/114410] compiler issue in reference_binding when using rvalue reference to member of const object

2024-03-21 Thread cvoica at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114410 --- Comment #7 from Cristian VOICA --- I've found a flag that sounds closer to my needs: -Wcast-qual As the issue seems to me to come from the need to stay compatible with C I think this flag does a pretty decent job to hint at the problem. :

[Bug c++/114410] compiler issue in reference_binding when using rvalue reference to member of const object

2024-03-21 Thread cvoica at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114410 --- Comment #6 from Cristian VOICA --- makes sense, thx!

[Bug c++/114410] compiler issue in reference_binding when using rvalue reference to member of const object

2024-03-21 Thread cvoica at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114410 --- Comment #4 from Cristian VOICA --- I'm also trying to understand another thing. Perhaps you can point me to where to read more about it as I was not expecting casting to a non-const reference to work for a member in a const object. Is

[Bug c++/114410] compiler issue in reference_binding when using rvalue reference to member of const object

2024-03-21 Thread cvoica at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114410 --- Comment #3 from Cristian VOICA --- be aware that is initial issue mentions "If the type of r is changed to const int&, the program correctly compiles with GCC" I have this in my code as well but this is not always what programmer wants as

[Bug c++/114410] New: compiler issue in reference_binding when using rvalue reference to member of const object

2024-03-21 Thread cvoica at gmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: cvoica at gmail dot com Target Milestone: --- The issue "internal compiler error: in reference_binding, at cp/call.cc:2020" is visible when

[Bug c++/54729] New: __compare_and_swap does not return on all paths

2012-09-27 Thread cvoica at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54729 Bug #: 54729 Summary: __compare_and_swap does not return on all paths Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal

[Bug c++/28031] [4.2 regression] bogus jump to case label crosses initialization error with C99 anonymous initializers

2008-10-02 Thread cvoica at gmail dot com
--- Comment #5 from cvoica at gmail dot com 2008-10-02 13:56 --- I was trying to compile some code and got this error and thats how I found this bug. It seems strange to me that I cannot use a switch within a case branch and the use the plain std::string. Testcase: 1. This is working