[Bug c++/85557] Incorrect calculation of function arguments with C++17 sequencing rules

2018-04-30 Thread ixsci at yandex dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85557 --- Comment #4 from Evgeniy Shcherbina --- Jonathan, yes it *should* be called as foo(1, 2) but the result is as if it is called as foo(1, 1). --- Comment #5 from Evgeniy Shcherbina --- Jonathan, yes it *should* be called as foo(1, 2) but the r

[Bug c++/85557] Incorrect calculation of function arguments with C++17 sequencing rules

2018-04-30 Thread ixsci at yandex dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85557 --- Comment #4 from Evgeniy Shcherbina --- Jonathan, yes it *should* be called as foo(1, 2) but the result is as if it is called as foo(1, 1). --- Comment #5 from Evgeniy Shcherbina --- Jonathan, yes it *should* be called as foo(1, 2) but the r

[Bug c++/85557] Incorrect calculation of function arguments with C++17 sequencing rules

2018-04-30 Thread ixsci at yandex dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85557 --- Comment #2 from Evgeniy Shcherbina --- There is 2 parameter calculations: "first" and "second", no matter what is evaluated first or second, the "first" parameter should be initialized with `i = 1`, and "second" with `i = 2`. So "first" shoul

[Bug c++/85557] New: Incorrect calculation of function arguments with C++17 sequencing rules

2018-04-28 Thread ixsci at yandex dot ru
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ixsci at yandex dot ru Target Milestone: --- Given the following simple code: #include using namespace std; int foo(int first, int second) { return first << second;

[Bug c++/85247] Filesystem filename() wrong result for host-like path

2018-04-06 Thread ixsci at yandex dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85247 --- Comment #2 from Evgeniy Shcherbina --- How is that incorrect? It is a pretty valid URI which I can change to this: "ftp://blahblah.org"; and gcc will tell me that filename is "blahblah.org" which is obviously wrong. Anyway, I will find where

[Bug c++/85247] New: Filesystem filename() wrong result for host-like path

2018-04-06 Thread ixsci at yandex dot ru
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ixsci at yandex dot ru Target Milestone: --- Here is a small example which is using a host-like path: #include #include namespace fs = std::filesystem; int main() { std::cout << fs::path("//host

[Bug c++/84476] New: [[nodiscard]] ignored on virtual functions accessed through pointer

2018-02-19 Thread ixsci at yandex dot ru
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ixsci at yandex dot ru Target Milestone: --- Given: A class with a virtual function which result should not be discarded and a pointer to that class. Expected: Access to such a

[Bug c++/83028] New: Incorrect -Wsequence-point warning in correct C++17 code with new evaluation order rules

2017-11-16 Thread ixsci at yandex dot ru
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ixsci at yandex dot ru Target Milestone: --- Compiling the following code: #include using namespace std; int main() { int i = 0; cout << i++ <&

[Bug c++/82959] g++ doesn't appreciate C++17 evaluation order rules for overloaded operators

2017-11-13 Thread ixsci at yandex dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82959 --- Comment #1 from Evgeniy Shcherbina --- Not that it matters much, but it should be "int i = -1;" in the code to match my description fully.

[Bug c++/82959] New: g++ doesn't appreciate C++17 evaluation order rules for overloaded operators

2017-11-13 Thread ixsci at yandex dot ru
erity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ixsci at yandex dot ru Target Milestone: --- Having the following code: #include using namespace std; class Int { public: Int() = default; Int(in