[Bug c++/114654] New: Alias template cannot be found

2024-04-09 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114654 Bug ID: 114654 Summary: Alias template cannot be found Product: gcc Version: 13.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++

[Bug c++/114537] bit_cast does not work NSDMI of bitfields

2024-04-05 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114537 --- Comment #5 from Fedor Chelnokov --- Sorry, in above example I had to use `unsigned char` type: ``` #include struct A { unsigned char a : 7; }; static_assert( std::bit_cast(std::bit_cast(A{1})).a == 1 ); ``` This program even after the

[Bug c++/114537] bit_cast does not work NSDMI of bitfields

2024-04-01 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114537 --- Comment #1 from Fedor Chelnokov --- Probably related: ``` #include struct A { int a: 7; }; static_assert( 1 == std::bit_cast(std::bit_cast(A{1})).a ); ``` It looks valid and accepted by MSVC, but GCC prints: error: '__builtin_bit_cast'

[Bug c++/114536] wrong constant evaluation of std::bit_cast for bit fields

2024-03-31 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114536 --- Comment #2 from Fedor Chelnokov --- May be just fail constant evaluation then instead of evaluating it to 0?

[Bug c++/114536] New: wrong constant evaluation of std::bit_cast for bit fields

2024-03-31 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114536 Bug ID: 114536 Summary: wrong constant evaluation of std::bit_cast for bit fields Product: gcc Version: 13.2.1 Status: UNCONFIRMED Severity: normal

[Bug c++/104282] Copy elision when initializing a base-class subobject with aggregate initialization

2024-03-22 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104282 --- Comment #8 from Fedor Chelnokov --- One more inconsistency here: struct A { A() {} A(A&&) = delete; }; struct B : A { }; int main() { // ok in GCC B{ A{} }; // error in GCC B b{ A{} }; } GCC allows temporary

[Bug c++/114225] False positive -Werror=dangling-reference

2024-03-04 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114225 --- Comment #4 from Fedor Chelnokov --- Ok. At the same time we see that some false positives of this warning are fixed in Trunk, e.g. struct A { int i; }; struct Getter { const A * a; const int & value() const { return a->i; }

[Bug c++/114225] False positive -Werror=dangling-reference

2024-03-04 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114225 --- Comment #2 from Fedor Chelnokov --- Please note that this is a regression in GCC 13. GCC 12 (or other compilers) do not show a warning here: https://godbolt.org/z/Yhfad47xs

[Bug c++/113755] New: Class without a viable destructor wrongly accepted

2024-02-04 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113755 Bug ID: 113755 Summary: Class without a viable destructor wrongly accepted Product: gcc Version: 13.2.1 Status: UNCONFIRMED Severity: normal Priority: P3

[Bug c++/113713] New: static_assert result depends on optimization settings

2024-02-02 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113713 Bug ID: 113713 Summary: static_assert result depends on optimization settings Product: gcc Version: 13.2.1 Status: UNCONFIRMED Severity: normal Priority: P3

[Bug c++/113529] New: Incorrect result of requires-expression in case of function call ambiguity

2024-01-21 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113529 Bug ID: 113529 Summary: Incorrect result of requires-expression in case of function call ambiguity Product: gcc Version: 13.2.1 Status: UNCONFIRMED Severity:

[Bug c++/113523] New: A conversion function template can have a deduced return type

2024-01-20 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113523 Bug ID: 113523 Summary: A conversion function template can have a deduced return type Product: gcc Version: 13.2.1 Status: UNCONFIRMED Severity: normal

[Bug libstdc++/113522] New: std::swap cannot be called with explicit template argument std::array

2024-01-20 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113522 Bug ID: 113522 Summary: std::swap cannot be called with explicit template argument std::array Product: gcc Version: 13.2.1 Status: UNCONFIRMED Severity:

[Bug libstdc++/113327] New: std::sleep_for(std::chrono::hours::max()) returns immediately

2024-01-10 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113327 Bug ID: 113327 Summary: std::sleep_for(std::chrono::hours::max()) returns immediately Product: gcc Version: 13.2.1 Status: UNCONFIRMED Severity: normal

[Bug c++/113303] New: One can assign to const reference in a template partial specialization

2024-01-09 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113303 Bug ID: 113303 Summary: One can assign to const reference in a template partial specialization Product: gcc Version: 13.2.1 Status: UNCONFIRMED Severity:

[Bug c++/113272] Wrong specialization of class template selected

2024-01-09 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113272 --- Comment #2 from Fedor Chelnokov --- Here is simplified program without #include : template struct A {}; template requires requires(){ *p = 0; } struct A {}; int x = 0; struct B : A<>, A<(const int *)> {}; GCC fails here because of

[Bug c++/113272] New: Wrong specialization of class template selected

2024-01-08 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113272 Bug ID: 113272 Summary: Wrong specialization of class template selected Product: gcc Version: 13.2.1 Status: UNCONFIRMED Severity: normal Priority: P3

[Bug c++/113127] New: Unexpected error: '' was not declared 'constexpr'

2023-12-24 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113127 Bug ID: 113127 Summary: Unexpected error: '' was not declared 'constexpr' Product: gcc Version: 13.2.1 Status: UNCONFIRMED Severity: normal

[Bug c++/113113] New: False -Wmismatched-new-delete in case of destroying operator delete

2023-12-22 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113113 Bug ID: 113113 Summary: False -Wmismatched-new-delete in case of destroying operator delete Product: gcc Version: 13.2.1 Status: UNCONFIRMED Severity: normal

[Bug c++/112775] New: Class template partial specialization with decltype(n) is wrongly rejected

2023-11-30 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112775 Bug ID: 112775 Summary: Class template partial specialization with decltype(n) is wrongly rejected Product: gcc Version: 13.2.1 Status: UNCONFIRMED Severity:

[Bug c++/112744] New: Nested name specifier wrongly produces ambiguity in accessing static field

2023-11-28 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112744 Bug ID: 112744 Summary: Nested name specifier wrongly produces ambiguity in accessing static field Product: gcc Version: 13.2.1 Status: UNCONFIRMED Severity:

[Bug c++/112620] New: Changes to the referenced object in exception handler are lost after rethrow

2023-11-19 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112620 Bug ID: 112620 Summary: Changes to the referenced object in exception handler are lost after rethrow Product: gcc Version: 13.2.1 Status: UNCONFIRMED

[Bug c++/112448] New: Constraint expression b rejected

2023-11-08 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112448 Bug ID: 112448 Summary: Constraint expression b rejected Product: gcc Version: 13.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++

[Bug tree-optimization/112346] [13 Regression] Wrong code produced with -O2

2023-11-02 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112346 --- Comment #4 from Fedor Chelnokov --- According to referenced stackoverflow discussion, the code is reduced from https://github.com/vermaseren/form see https://github.com/vermaseren/form/issues/461

[Bug c/112346] New: Wrong code produced with -O2

2023-11-02 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112346 Bug ID: 112346 Summary: Wrong code produced with -O2 Product: gcc Version: 13.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c

[Bug c++/94264] Array-to-pointer conversion not performed on array prvalues

2023-10-08 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94264 Fedor Chelnokov changed: What|Removed |Added CC||fchelnokov at gmail dot com ---

[Bug libstdc++/111685] Segfault while sorting on array element address

2023-10-06 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111685 --- Comment #12 from Fedor Chelnokov --- Related discussion: https://stackoverflow.com/q/77224270/7325599

[Bug libstdc++/111685] Segfault while sorting on array element address

2023-10-04 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111685 --- Comment #10 from Fedor Chelnokov --- It seems that both libc++ and MS STL implement std::sort without a temporary object passed to cmp, because they are fine with compiling the following code in constant expression (where unrelated pointers

[Bug tree-optimization/104165] [12 Regression] -Warray-bounds for unreachable code inlined from std::sort()

2023-09-27 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104165 --- Comment #10 from Fedor Chelnokov --- This issue happens in GCC 13.2 as well: https://godbolt.org/z/TfGx3YccG

[Bug c++/104661] [C++17+] Catching exception by const value when exception-object has lvalue-reference constructor

2023-09-01 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104661 --- Comment #3 from Fedor Chelnokov --- Related discussion: https://stackoverflow.com/a/77021213/7325599

[Bug c++/111132] New: Function redeclaration in local scope breaks constant expression evaluation

2023-08-24 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32 Bug ID: 32 Summary: Function redeclaration in local scope breaks constant expression evaluation Product: gcc Version: 13.2.1 Status: UNCONFIRMED Severity:

[Bug c++/111113] New: Cannot define friend function of a local class in namespace scope

2023-08-23 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=13 Bug ID: 13 Summary: Cannot define friend function of a local class in namespace scope Product: gcc Version: 13.2.1 Status: UNCONFIRMED Severity: normal

[Bug c++/110619] Dangling pointer returned from constexpr function converts in nullptr

2023-08-07 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110619 --- Comment #8 from Fedor Chelnokov --- Please note that GCC 13 also accepts invalid program (because dangling pointers were converted in nullptr): constexpr auto f(int a) { return } constexpr auto g(int b) { return }

[Bug c++/110642] New: Undefined behavior in same constant expression is found not always

2023-07-12 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110642 Bug ID: 110642 Summary: Undefined behavior in same constant expression is found not always Product: gcc Version: 13.1.0 Status: UNCONFIRMED Severity: normal

[Bug c++/110619] Dangling pointer returned from constexpr function converts in nullptr

2023-07-10 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110619 --- Comment #3 from Fedor Chelnokov --- I think according to https://eel.is/c++draft/basic.stc#general-4 the function shall return an "invalid pointer valued". And nullptr is not considered such. And if one modifies the function slightly (see

[Bug c++/110619] New: Dangling pointer returned from constexpr function converts in nullptr

2023-07-10 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110619 Bug ID: 110619 Summary: Dangling pointer returned from constexpr function converts in nullptr Product: gcc Version: 13.1.0 Status: UNCONFIRMED Severity:

[Bug c++/110584] New: Constant is not visible in nested lambda

2023-07-07 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110584 Bug ID: 110584 Summary: Constant is not visible in nested lambda Product: gcc Version: 13.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++

[Bug c++/110570] New: Error reading mutable subobject in constexpr when object lifetime began within the evaluation of E

2023-07-06 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110570 Bug ID: 110570 Summary: Error reading mutable subobject in constexpr when object lifetime began within the evaluation of E Product: gcc Version: 13.1.0 Status:

[Bug c++/110513] New: Invalid use of incomplete type std::bool_constant inside requires expression

2023-07-01 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110513 Bug ID: 110513 Summary: Invalid use of incomplete type std::bool_constant inside requires expression Product: gcc Version: 13.1.0 Status: UNCONFIRMED

[Bug c++/110463] [13/14 Regression] Mutable subobject is usable in a constant expression

2023-07-01 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110463 --- Comment #5 from Fedor Chelnokov --- Thanks a lot for a very quick fix!

[Bug c++/110497] New: Wrong error on non-static data member referenced in concept definition

2023-06-30 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110497 Bug ID: 110497 Summary: Wrong error on non-static data member referenced in concept definition Product: gcc Version: 13.1.0 Status: UNCONFIRMED Severity:

[Bug c++/110463] New: Mutable subobject is usable in a constant expression

2023-06-28 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110463 Bug ID: 110463 Summary: Mutable subobject is usable in a constant expression Product: gcc Version: 13.1.0 Status: UNCONFIRMED Severity: normal Priority: P3

[Bug c++/110416] New: Error initializing of const union variable with a mutable field

2023-06-26 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110416 Bug ID: 110416 Summary: Error initializing of const union variable with a mutable field Product: gcc Version: 13.1.0 Status: UNCONFIRMED Severity: normal

[Bug c++/110191] New: Alias template in function parameter does not match the nested type it refers to

2023-06-09 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110191 Bug ID: 110191 Summary: Alias template in function parameter does not match the nested type it refers to Product: gcc Version: 13.1.0 Status: UNCONFIRMED

[Bug libstdc++/110158] New: Cannot use union with std::string inside in constant expression

2023-06-07 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110158 Bug ID: 110158 Summary: Cannot use union with std::string inside in constant expression Product: gcc Version: 13.1.0 Status: UNCONFIRMED Severity: normal

[Bug c++/110114] New: ICE on calling overloaded function in case of incomplete argument type

2023-06-04 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110114 Bug ID: 110114 Summary: ICE on calling overloaded function in case of incomplete argument type Product: gcc Version: 13.1.0 Status: UNCONFIRMED Severity:

[Bug c++/109833] New: The value of constexpr anonymous union can be changed in runtime

2023-05-12 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109833 Bug ID: 109833 Summary: The value of constexpr anonymous union can be changed in runtime Product: gcc Version: 13.1.0 Status: UNCONFIRMED Severity: normal

[Bug c++/109523] New: List-initializing constructor of std::vector is selected erroneously

2023-04-15 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109523 Bug ID: 109523 Summary: List-initializing constructor of std::vector is selected erroneously Product: gcc Version: 12.2.1 Status: UNCONFIRMED Severity: normal

[Bug c++/109159] New: explicit constructor is used in copy-initialization

2023-03-16 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109159 Bug ID: 109159 Summary: explicit constructor is used in copy-initialization Product: gcc Version: 12.2.1 Status: UNCONFIRMED Severity: normal Priority: P3

[Bug c++/108588] __is_constructible returns wrong value for invalid (but non deleted) default constructor

2023-02-08 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108588 --- Comment #1 from Fedor Chelnokov --- According to this StackOverflow answer, the behavior of GCC is incorrect here: https://stackoverflow.com/a/75380301/7325599

[Bug c++/108364] New: Construction from prvalue erroneously uses move-constructor

2023-01-10 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108364 Bug ID: 108364 Summary: Construction from prvalue erroneously uses move-constructor Product: gcc Version: 12.2.1 Status: UNCONFIRMED Severity: normal

[Bug c++/107782] New: constexpr volatile variable is permitted to appear in a constant expression

2022-11-20 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107782 Bug ID: 107782 Summary: constexpr volatile variable is permitted to appear in a constant expression Product: gcc Version: 12.2.1 Status: UNCONFIRMED Severity:

[Bug c++/107744] New: Error in constant evaluation of dynamic_cast

2022-11-17 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107744 Bug ID: 107744 Summary: Error in constant evaluation of dynamic_cast Product: gcc Version: 12.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug c++/107509] New: wrong ambiguous overloaded function error if argument class is undefined

2022-11-02 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107509 Bug ID: 107509 Summary: wrong ambiguous overloaded function error if argument class is undefined Product: gcc Version: 12.2.0 Status: UNCONFIRMED Severity:

[Bug c++/107124] Reference template parameter refers to a temporary object

2022-10-30 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107124 --- Comment #3 from Fedor Chelnokov --- The latter example is indeed a bug in MSVC: https://developercommunity.visualstudio.com/t/Cannot-find-template-function-with-expli/1672180 And here is the related discussion according the original issue:

[Bug c++/107168] New: Wrong errors for concepts with default lambda not-type argument

2022-10-06 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107168 Bug ID: 107168 Summary: Wrong errors for concepts with default lambda not-type argument Product: gcc Version: 12.2.0 Status: UNCONFIRMED Severity: normal

[Bug c++/101670] Internal compiler error with concepts

2022-10-06 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101670 --- Comment #3 from Fedor Chelnokov --- A shorter example: template concept x = true; void foo(x auto) {} Online demo: https://godbolt.org/z/sT74G8crE

[Bug c++/107124] New: Reference template parameter refers to a temporary object

2022-10-02 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107124 Bug ID: 107124 Summary: Reference template parameter refers to a temporary object Product: gcc Version: 12.2.0 Status: UNCONFIRMED Severity: normal

[Bug c++/106968] New: ignored noexcept(false) in explicitly-defaulted functions

2022-09-19 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106968 Bug ID: 106968 Summary: ignored noexcept(false) in explicitly-defaulted functions Product: gcc Version: 12.1.0 Status: UNCONFIRMED Severity: normal

[Bug c++/106599] Wrong copy elision in delegating to copy-constructor

2022-08-22 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106599 --- Comment #4 from Fedor Chelnokov --- And if one deletes copy constructor of A: struct A { constexpr A() = default; constexpr A(const A&) = delete; constexpr A(int) : A(A()) {} }; A a(2); Then Clang rejects the program,

[Bug libstdc++/106695] New: Regression 11,12: Explicit copy constructor does not work for a parameter passed via std::async

2022-08-20 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106695 Bug ID: 106695 Summary: Regression 11,12: Explicit copy constructor does not work for a parameter passed via std::async Product: gcc Version: 12.1.0 Status: UNCONFIRMED

[Bug c++/106599] New: Wrong copy elision in delegating to copy-constructor

2022-08-12 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106599 Bug ID: 106599 Summary: Wrong copy elision in delegating to copy-constructor Product: gcc Version: 12.1.0 Status: UNCONFIRMED Severity: normal Priority: P3

[Bug tree-optimization/106247] GCC12 warning in Eigen: array subscript is partly outside array bounds

2022-07-10 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106247 Fedor Chelnokov changed: What|Removed |Added CC||fchelnokov at gmail dot com ---

[Bug c++/106247] New: GCC12 warning in Eigen: array subscript is partly outside array bounds

2022-07-10 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106247 Bug ID: 106247 Summary: GCC12 warning in Eigen: array subscript is partly outside array bounds Product: gcc Version: 12.1.0 Status: UNCONFIRMED Severity:

[Bug c++/105699] [Concepts] Constrained virtual functions are accepted by GCC

2022-05-24 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105699 --- Comment #2 from Fedor Chelnokov --- Another aspect is that the order of destructors in the class change its behavior: #include template struct X { ~X() requires (N==1); virtual ~X(); }; // X is NOT polymorphic in GCC static_assert(

[Bug c++/105693] New: Requires-clause constructor is not selected

2022-05-22 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105693 Bug ID: 105693 Summary: Requires-clause constructor is not selected Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++

[Bug c++/105563] New: Consteval copy-constructor is allowed in not-constant expression

2022-05-11 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105563 Bug ID: 105563 Summary: Consteval copy-constructor is allowed in not-constant expression Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal

[Bug c++/105465] New: С++14 behaviour of inherited constructors broken

2022-05-03 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105465 Bug ID: 105465 Summary: С++14 behaviour of inherited constructors broken Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3

[Bug c++/105407] New: std::construct_at during constant evaluation does not zero-initialize

2022-04-27 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105407 Bug ID: 105407 Summary: std::construct_at during constant evaluation does not zero-initialize Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal

[Bug c++/105350] New: False constructor warning in case of [[depreacated]] field in class

2022-04-22 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105350 Bug ID: 105350 Summary: False constructor warning in case of [[depreacated]] field in class Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal

[Bug c++/88165] error: default member initializer for 'A::B::m' required before the end of its enclosing class

2022-04-22 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88165 --- Comment #11 from Fedor Chelnokov --- Thanks a lot for the explanation!

[Bug c++/104661] New: Catching exception by const value when exception-object has lvalue-reference constructor

2022-02-23 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104661 Bug ID: 104661 Summary: Catching exception by const value when exception-object has lvalue-reference constructor Product: gcc Version: 12.0 Status: UNCONFIRMED

[Bug c++/104000] Ordinary constructor cannot delegate to `consteval` constructor

2022-02-18 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104000 --- Comment #5 from Fedor Chelnokov --- Based on stackoverflow answer, a modified example was found with the delegation to consteval constructor: ``` struct A { int i = 0; consteval A() = default; A(const A&) = delete;

[Bug c++/104512] New: [c++20] consteval constructor does not need to initialize all data members

2022-02-12 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104512 Bug ID: 104512 Summary: [c++20] consteval constructor does not need to initialize all data members Product: gcc Version: 12.0 Status: UNCONFIRMED Severity:

[Bug c++/104490] New: Cannot inherit consteval constructor

2022-02-10 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104490 Bug ID: 104490 Summary: Cannot inherit consteval constructor Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++

[Bug c++/104418] [C++17+] Error inheriting base class constructors by using-declaration

2022-02-08 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104418 --- Comment #7 from Fedor Chelnokov --- Thanks. I submitted Clang bug: https://github.com/llvm/llvm-project/issues/53653

[Bug c++/104418] Error inheriting base class constructors by using-declaration

2022-02-07 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104418 --- Comment #4 from Fedor Chelnokov --- I think `using B::B;` is not the same as redefining each constructor with the explicit call of base class constructor `C(int a) : B{(int)a}{}`. Please consider this example proving it: ``` struct A {

[Bug c++/104418] Error inheriting base class constructors by using-declaration

2022-02-07 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104418 --- Comment #2 from Fedor Chelnokov --- My personal feeling is that if a compiler accepts `B b(i);` then it must accept `C c(i);` as well because of [namespace.udecl] p13: > Constructors that are named by a using-declaration are treated as

[Bug c++/104418] New: Error inheriting base class constructors by using-declaration

2022-02-07 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104418 Bug ID: 104418 Summary: Error inheriting base class constructors by using-declaration Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal

[Bug c++/83264] std::initializer_list with a single element selects the wrong overload

2022-02-05 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83264 --- Comment #9 from Fedor Chelnokov --- There is a related discussion: https://stackoverflow.com/a/47618530/7325599 And it is noted there that according to [over.ics.rank]/2 just before [over.ics.rank]/3: — a standard conversion sequence is a

[Bug c++/104383] New: User-defined conversion is preferred over standard-one

2022-02-04 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104383 Bug ID: 104383 Summary: User-defined conversion is preferred over standard-one Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3

[Bug c++/104305] New: Partial specialization with parameter pack is ignored

2022-01-31 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104305 Bug ID: 104305 Summary: Partial specialization with parameter pack is ignored Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3

[Bug libstdc++/92770] std::unordered_map requires both T and U to be fully declared

2022-01-30 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92770 Fedor Chelnokov changed: What|Removed |Added CC||fchelnokov at gmail dot com ---

[Bug c++/104266] Temporaries with protected destructor are erroneously permitted

2022-01-29 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104266 --- Comment #4 from Fedor Chelnokov --- In your last example, I think Clang is right, because `Y` is not an aggregate in C++11 due to the presence of default member initializer. And it becomes an aggregate only in C++14.

[Bug c++/104282] Copy elision when initializing a base-class subobject with aggregate initialization

2022-01-29 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104282 --- Comment #3 from Fedor Chelnokov --- Both Clang and GCC do not change their output either with `-std=c++20` or with `-std=c++17` options. And both reject the program with -std=c++14`.

[Bug c++/88417] partial specialization of static template variable inside class template gives wrong result

2022-01-29 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88417 Fedor Chelnokov changed: What|Removed |Added CC||fchelnokov at gmail dot com ---

[Bug c++/104282] New: Copy elision when initializing a base-class subobject with aggregate initialization

2022-01-29 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104282 Bug ID: 104282 Summary: Copy elision when initializing a base-class subobject with aggregate initialization Product: gcc Version: 12.0 Status: UNCONFIRMED

[Bug c++/104266] New: Temporaries with protected destructor are erroneously permitted

2022-01-28 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104266 Bug ID: 104266 Summary: Temporaries with protected destructor are erroneously permitted Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal

[Bug c++/104242] Class with constructor from std::any is not copyable

2022-01-26 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104242 --- Comment #1 from Fedor Chelnokov --- The error message is invalid use of incomplete type 'std::__conditional_t, std::__not_ > >' {aka 'struct std::is_copy_constructible'} ...

[Bug c++/104242] New: Class with constructor from std::any is not copyable

2022-01-26 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104242 Bug ID: 104242 Summary: Class with constructor from std::any is not copyable Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3

[Bug c++/104204] Ambiguity error for out of class definition of member function template in the presence of a member function of the same name

2022-01-24 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104204 --- Comment #2 from Fedor Chelnokov --- Are you sure that this is a duplicate? Bug 39270 is about explicit instantiation that is erroneously reported by GCC as specialization. And this bug is about rejection of real explicit specialization in

[Bug c++/104204] New: Ambiguity error for out of class definition of member function template in the presence of a member function of the same name

2022-01-24 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104204 Bug ID: 104204 Summary: Ambiguity error for out of class definition of member function template in the presence of a member function of the same name Product: gcc

[Bug c++/104193] New: Valid function template instantiation rejected

2022-01-23 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104193 Bug ID: 104193 Summary: Valid function template instantiation rejected Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug c++/104192] New: Uninitialized object read is not detected in a constant expression

2022-01-23 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104192 Bug ID: 104192 Summary: Uninitialized object read is not detected in a constant expression Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal

[Bug c++/104000] Ordinary constructor cannot delegate to `consteval` constructor

2022-01-21 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104000 --- Comment #4 from Fedor Chelnokov --- If we take MSVC into consideration, then it rejects ``` struct A { consteval A() = default; A(int) : A() {} }; ``` which GCC accepts. So there is a divergence with MSVC as

[Bug c++/104141] nested requires statement causes access to private member function

2022-01-21 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104141 --- Comment #6 from Fedor Chelnokov --- I agree that Clang behavior here might be wrong. Submitted https://github.com/llvm/llvm-project/issues/53334

[Bug c++/104141] nested requires statement causes access to private member function

2022-01-21 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104141 --- Comment #4 from Fedor Chelnokov --- In ``` template concept t = requires{ A::f(); }; ``` A::f() does not depend on template parameter, so the rules here are somewhat different than in T::f(). A possible answer:

[Bug c++/104141] New: Access to private member function from requires-clause accepted

2022-01-19 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104141 Bug ID: 104141 Summary: Access to private member function from requires-clause accepted Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal

[Bug c++/104111] Concept evaluation depends on context where it was first checked

2022-01-19 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104111 --- Comment #1 from Fedor Chelnokov --- Sorry, related discussion: https://stackoverflow.com/q/53263299/7325599

[Bug c++/104111] New: Concept evaluation depends on context where it was first checked

2022-01-19 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104111 Bug ID: 104111 Summary: Concept evaluation depends on context where it was first checked Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal

  1   2   >